2010-10-12 15:51:52 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-09-18 16:07:07 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 18:59:27 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 18:59:27 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 18:59:27 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 18:59:27 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 18:59:27 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 18:59:27 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 17:45:09 +00:00
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
#include "DrawDocShell.hxx"
|
2003-04-24 13:38:03 +00:00
|
|
|
#include <com/sun/star/document/PrinterIndependentLayout.hpp>
|
2002-08-01 10:30:12 +00:00
|
|
|
#include <tools/urlobj.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <sfx2/progress.hxx>
|
|
|
|
#include <vcl/waitobj.hxx>
|
|
|
|
#include <svx/svxids.hrc>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/flstitem.hxx>
|
|
|
|
#include <editeng/eeitem.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/aeitem.hxx>
|
|
|
|
#include <svl/flagitem.hxx>
|
2004-10-04 17:30:29 +00:00
|
|
|
#include <sot/storage.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <sfx2/docfile.hxx>
|
|
|
|
#include <sfx2/docfilt.hxx>
|
|
|
|
#include <sfx2/dispatch.hxx>
|
|
|
|
#include <svx/svdotext.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/style.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <sfx2/printer.hxx>
|
|
|
|
#include <svtools/ctrltool.hxx>
|
|
|
|
#include <svtools/sfxecode.hxx>
|
2004-10-04 17:30:29 +00:00
|
|
|
#include <sot/clsids.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <sot/formats.hxx>
|
|
|
|
#include <sfx2/request.hxx>
|
2009-10-06 07:38:24 +02:00
|
|
|
#include <unotools/fltrcfg.hxx>
|
2004-10-04 17:30:29 +00:00
|
|
|
#include <sfx2/frame.hxx>
|
|
|
|
#include <sfx2/viewfrm.hxx>
|
2009-10-06 07:38:24 +02:00
|
|
|
#include <unotools/saveopt.hxx>
|
2003-04-08 14:20:29 +00:00
|
|
|
#include <com/sun/star/drawing/XDrawPage.hpp>
|
2006-03-21 16:14:37 +00:00
|
|
|
#include <com/sun/star/drawing/XDrawView.hpp>
|
2007-04-03 14:42:53 +00:00
|
|
|
#include <comphelper/processfactory.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
#include "app.hrc"
|
|
|
|
#include "glob.hrc"
|
|
|
|
#include "strings.hrc"
|
|
|
|
#include "strmname.h"
|
2004-02-02 09:54:17 +00:00
|
|
|
#include "FrameView.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "optsitem.hxx"
|
2004-02-02 09:54:17 +00:00
|
|
|
#include "Outliner.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "sdattr.hxx"
|
|
|
|
#include "drawdoc.hxx"
|
2004-02-02 09:54:17 +00:00
|
|
|
#include "ViewShell.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "app.hxx"
|
2004-02-02 09:54:17 +00:00
|
|
|
#include "View.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "sdpage.hxx"
|
|
|
|
#include "sdresid.hxx"
|
2004-02-02 09:54:17 +00:00
|
|
|
#include "DrawViewShell.hxx"
|
2004-11-26 14:10:11 +00:00
|
|
|
#include "ViewShellBase.hxx"
|
2004-02-02 09:54:17 +00:00
|
|
|
#include "Window.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "sdmod.hxx"
|
2004-02-02 09:54:17 +00:00
|
|
|
#include "OutlineViewShell.hxx"
|
2001-02-13 11:17:06 +00:00
|
|
|
#include "sdxmlwrp.hxx"
|
|
|
|
#include "sdpptwrp.hxx"
|
|
|
|
#include "sdcgmfilter.hxx"
|
|
|
|
#include "sdgrffilter.hxx"
|
2002-04-18 14:48:12 +00:00
|
|
|
#include "sdhtmlfilter.hxx"
|
2007-04-03 14:42:53 +00:00
|
|
|
#include "framework/FrameworkHelper.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
using namespace ::com::sun::star;
|
2007-04-03 14:42:53 +00:00
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using ::sd::framework::FrameworkHelper;
|
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
namespace sd {
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SfxPrinter ggf. erzeugen und zurueckgeben
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
SfxPrinter* DrawDocShell::GetPrinter(sal_Bool bCreate)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
if (bCreate && !mpPrinter)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
// ItemSet mit speziellem Poolbereich anlegen
|
|
|
|
SfxItemSet* pSet = new SfxItemSet( GetPool(),
|
|
|
|
SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
|
|
|
|
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
|
|
|
|
ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT,
|
|
|
|
0 );
|
|
|
|
// PrintOptionsSet setzen
|
|
|
|
SdOptionsPrintItem aPrintItem( ATTR_OPTIONS_PRINT,
|
2006-12-12 16:12:22 +00:00
|
|
|
SD_MOD()->GetSdOptions(mpDoc->GetDocumentType()));
|
2000-09-18 16:07:07 +00:00
|
|
|
SfxFlagItem aFlagItem( SID_PRINTER_CHANGESTODOC );
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nFlags = 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
nFlags = (aPrintItem.GetOptionsPrint().IsWarningSize() ? SFX_PRINTER_CHG_SIZE : 0) |
|
|
|
|
(aPrintItem.GetOptionsPrint().IsWarningOrientation() ? SFX_PRINTER_CHG_ORIENTATION : 0);
|
2000-09-18 16:07:07 +00:00
|
|
|
aFlagItem.SetValue( nFlags );
|
|
|
|
|
|
|
|
pSet->Put( aPrintItem );
|
2006-12-12 16:12:22 +00:00
|
|
|
pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aPrintItem.GetOptionsPrint().IsWarningPrinter() ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
pSet->Put( aFlagItem );
|
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
mpPrinter = new SfxPrinter(pSet);
|
2011-01-17 11:41:00 +01:00
|
|
|
mbOwnPrinter = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// Ausgabequalitaet setzen
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nQuality = aPrintItem.GetOptionsPrint().GetOutputQuality();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uLong nMode = DRAWMODE_DEFAULT;
|
2002-03-06 15:27:58 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
if( nQuality == 1 )
|
2012-07-27 17:05:20 +02:00
|
|
|
nMode = DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT;
|
2000-09-18 16:07:07 +00:00
|
|
|
else if( nQuality == 2 )
|
2012-07-27 17:05:20 +02:00
|
|
|
nMode = DRAWMODE_BLACKLINE | DRAWMODE_WHITEFILL | DRAWMODE_BLACKTEXT | DRAWMODE_WHITEBITMAP | DRAWMODE_WHITEGRADIENT;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
mpPrinter->SetDrawMode( nMode );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
MapMode aMM (mpPrinter->GetMapMode());
|
2000-09-18 16:07:07 +00:00
|
|
|
aMM.SetMapUnit(MAP_100TH_MM);
|
2006-12-12 16:12:22 +00:00
|
|
|
mpPrinter->SetMapMode(aMM);
|
2002-07-26 07:32:44 +00:00
|
|
|
UpdateRefDevice();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2006-12-12 16:12:22 +00:00
|
|
|
return mpPrinter;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* neuen SfxPrinter setzen (Eigentuemeruebergang)
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
void DrawDocShell::SetPrinter(SfxPrinter *pNewPrinter)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
if ( mpViewShell )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
::sd::View* pView = mpViewShell->GetView();
|
2000-09-18 16:07:07 +00:00
|
|
|
if ( pView->IsTextEdit() )
|
2006-11-14 13:26:45 +00:00
|
|
|
pView->SdrEndTextEdit();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
if ( mpPrinter && mbOwnPrinter && (mpPrinter != pNewPrinter) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
delete mpPrinter;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
mpPrinter = pNewPrinter;
|
2011-01-17 11:41:00 +01:00
|
|
|
mbOwnPrinter = sal_True;
|
2006-12-12 16:12:22 +00:00
|
|
|
if ( mpDoc->GetPrinterIndependentLayout() == ::com::sun::star::document::PrinterIndependentLayout::DISABLED )
|
2006-05-04 13:58:13 +00:00
|
|
|
UpdateFontList();
|
|
|
|
UpdateRefDevice();
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-05-04 13:58:13 +00:00
|
|
|
void DrawDocShell::UpdateFontList()
|
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
delete mpFontList;
|
2006-05-04 13:58:13 +00:00
|
|
|
OutputDevice* pRefDevice = NULL;
|
2006-12-12 16:12:22 +00:00
|
|
|
if ( mpDoc->GetPrinterIndependentLayout() == ::com::sun::star::document::PrinterIndependentLayout::DISABLED )
|
2011-01-17 11:41:00 +01:00
|
|
|
pRefDevice = GetPrinter(sal_True);
|
2006-05-04 13:58:13 +00:00
|
|
|
else
|
|
|
|
pRefDevice = SD_MOD()->GetVirtualRefDevice();
|
2011-01-17 11:41:00 +01:00
|
|
|
mpFontList = new FontList( pRefDevice, NULL, sal_False );
|
2007-05-10 14:28:15 +00:00
|
|
|
SvxFontListItem aFontListItem( mpFontList, SID_ATTR_CHAR_FONTLIST );
|
2000-09-18 16:07:07 +00:00
|
|
|
PutItem( aFontListItem );
|
|
|
|
}
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
Printer* DrawDocShell::GetDocumentPrinter()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
return GetPrinter(sal_False);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
void DrawDocShell::OnDocumentPrinterChanged(Printer* pNewPrinter)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2002-10-28 10:08:56 +00:00
|
|
|
// if we already have a printer, see if its the same
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpPrinter )
|
2002-10-28 10:08:56 +00:00
|
|
|
{
|
|
|
|
// easy case
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpPrinter == pNewPrinter )
|
2002-10-28 10:08:56 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
// compare if its the same printer with the same job setup
|
2006-12-12 16:12:22 +00:00
|
|
|
if( (mpPrinter->GetName() == pNewPrinter->GetName()) &&
|
|
|
|
(mpPrinter->GetJobSetup() == pNewPrinter->GetJobSetup()))
|
2002-10-28 10:08:56 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
// if (mpPrinter->IsA(SfxPrinter))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
// Da kein RTTI verfuegbar, wird hart gecasted (...)
|
|
|
|
SetPrinter((SfxPrinter*) pNewPrinter);
|
|
|
|
|
|
|
|
// Printer gehoert dem Container
|
2011-01-17 11:41:00 +01:00
|
|
|
mbOwnPrinter = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
void DrawDocShell::UpdateRefDevice()
|
2002-07-26 07:32:44 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpDoc )
|
2002-07-26 07:32:44 +00:00
|
|
|
{
|
2003-04-24 13:38:03 +00:00
|
|
|
// Determine the device for which the output will be formatted.
|
|
|
|
OutputDevice* pRefDevice = NULL;
|
2006-12-12 16:12:22 +00:00
|
|
|
switch (mpDoc->GetPrinterIndependentLayout())
|
2003-04-24 13:38:03 +00:00
|
|
|
{
|
|
|
|
case ::com::sun::star::document::PrinterIndependentLayout::DISABLED:
|
2006-12-12 16:12:22 +00:00
|
|
|
pRefDevice = mpPrinter;
|
2003-04-24 13:38:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ::com::sun::star::document::PrinterIndependentLayout::ENABLED:
|
|
|
|
pRefDevice = SD_MOD()->GetVirtualRefDevice();
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
// We are confronted with an invalid or un-implemented
|
|
|
|
// layout mode. Use the printer as formatting device
|
|
|
|
// as a fall-back.
|
2004-02-02 09:54:17 +00:00
|
|
|
DBG_ASSERT(false, "DrawDocShell::UpdateRefDevice(): Unexpected printer layout mode");
|
2003-04-24 13:38:03 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
pRefDevice = mpPrinter;
|
2003-04-24 13:38:03 +00:00
|
|
|
break;
|
|
|
|
}
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->SetRefDevice( pRefDevice );
|
2002-07-26 07:32:44 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
::sd::Outliner* pOutl = mpDoc->GetOutliner( sal_False );
|
2002-07-26 07:32:44 +00:00
|
|
|
|
|
|
|
if( pOutl )
|
|
|
|
pOutl->SetRefDevice( pRefDevice );
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
::sd::Outliner* pInternalOutl = mpDoc->GetInternalOutliner( sal_False );
|
2002-07-26 07:32:44 +00:00
|
|
|
|
|
|
|
if( pInternalOutl )
|
|
|
|
pInternalOutl->SetRefDevice( pRefDevice );
|
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* InitNew, (Dokument wird neu erzeugt): Streams oeffnen
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bRet = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
bRet = SfxObjectShell::InitNew( xStorage );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
Rectangle aVisArea( Point(0, 0), Size(14100, 10000) );
|
|
|
|
SetVisArea(aVisArea);
|
|
|
|
|
|
|
|
if (bRet)
|
|
|
|
{
|
2011-12-06 03:27:48 +01:00
|
|
|
mpDoc->SetDrawingLayerPoolDefaults();
|
2006-12-12 16:12:22 +00:00
|
|
|
if( !mbSdDataObj )
|
|
|
|
mpDoc->NewOrLoadCompleted(NEW_DOC); // otherwise calling
|
2000-09-18 16:07:07 +00:00
|
|
|
// NewOrLoadCompleted(NEW_LOADED) in
|
|
|
|
// SdDrawDocument::AllocModel()
|
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Load: Pools und Dokument laden
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool DrawDocShell::Load( SfxMedium& rMedium )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2002-08-01 10:30:12 +00:00
|
|
|
mbNewDocument = sal_False;
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bRet = sal_False;
|
2003-05-16 13:17:31 +00:00
|
|
|
bool bStartPresentation = false;
|
2004-10-04 17:30:29 +00:00
|
|
|
ErrCode nError = ERRCODE_NONE;
|
2001-02-13 11:17:06 +00:00
|
|
|
|
2005-01-11 11:11:28 +00:00
|
|
|
SfxItemSet* pSet = rMedium.GetItemSet();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2003-05-16 13:17:31 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
if( pSet )
|
|
|
|
{
|
|
|
|
if( ( SFX_ITEM_SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
mpDoc->SetStarDrawPreviewMode( sal_True );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
|
|
|
|
( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
bStartPresentation = true;
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->SetStartWithPresentation( true );
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
|
|
|
}
|
2004-10-04 17:30:29 +00:00
|
|
|
|
2005-01-11 11:11:28 +00:00
|
|
|
bRet = SfxObjectShell::Load( rMedium );
|
2004-10-04 17:30:29 +00:00
|
|
|
if( bRet )
|
|
|
|
{
|
2005-01-11 11:11:28 +00:00
|
|
|
bRet = SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Normal, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError );
|
2004-10-04 17:30:29 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
if( bRet )
|
|
|
|
{
|
|
|
|
UpdateTablePointers();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-02-07 22:11:09 +01:00
|
|
|
// If we're an embedded OLE object, use tight bounds
|
2003-04-04 18:17:55 +00:00
|
|
|
// for our visArea. No point in showing the user lots of empty
|
|
|
|
// space. Had to remove the check for empty VisArea below,
|
|
|
|
// since XML load always sets a VisArea before.
|
2004-10-04 17:30:29 +00:00
|
|
|
//TODO/LATER: looks a little bit strange!
|
|
|
|
if( ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) && SfxObjectShell::GetVisArea( ASPECT_CONTENT ).IsEmpty() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
SdPage* pPage = mpDoc->GetSdPage( 0, PK_STANDARD );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
if( pPage )
|
|
|
|
SetVisArea( Rectangle( pPage->GetAllObjBoundRect() ) );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
FinishedLoading( SFX_LOADED_ALL );
|
2008-07-30 13:11:08 +00:00
|
|
|
|
|
|
|
const INetURLObject aUrl;
|
|
|
|
SfxObjectShell::SetAutoLoad( aUrl, 0, sal_False );
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
|
|
|
else
|
2003-03-27 09:58:12 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
if( nError == ERRCODE_IO_BROKENPACKAGE )
|
2012-04-13 19:37:04 -03:00
|
|
|
SetError( ERRCODE_IO_BROKENPACKAGE, OSL_LOG_PREFIX );
|
2003-03-27 09:58:12 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
// TODO/LATER: correct error handling?!
|
CWS-TOOLING: integrate CWS fwk103
2009-05-26 12:44:25 +0200 mst r272292 : #i100727#
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
+ fix warning: rename method to prevent overloading
2009-05-19 13:42:31 +0200 mav r272075 : #i101356# add comment
2009-05-19 10:56:24 +0200 mav r272062 : #i101356# register the singleton correctly
2009-05-19 10:25:42 +0200 mav r272060 : #i101356# register the singleton correctly
2009-05-18 12:48:48 +0200 mav r272013 : #i91306# fix the typo
2009-05-14 08:50:06 +0200 mav r271871 : #i101356# reduce the amount of macros
2009-05-13 13:26:08 +0200 mav r271858 : #i101356# reduce the amount of macros
2009-05-13 11:29:16 +0200 mav r271849 : #i101356# reduce the amount of macros
2009-05-12 12:09:42 +0200 mav r271815 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 12:03:20 +0200 mav r271814 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:58:48 +0200 mav r271813 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:53:05 +0200 mav r271812 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:48:36 +0200 mav r271810 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:43:45 +0200 mav r271809 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:39:38 +0200 mav r271808 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:37:38 +0200 mav r271806 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:33:58 +0200 mav r271805 : #i101356# allow to generate a small log if a document can not be stored
2009-05-12 11:30:01 +0200 mav r271804 : #i101356# allow to generate a small log if a document can not be stored
2009-05-06 17:43:38 +0200 mst r271607 : #i100727#
- svtools/source/svhtml/parhtml.cxx:
+ adapt code to renaming of HTML constants (sb107)
2009-05-05 11:14:18 +0200 mav r271507 : #i101222# avoid warning
2009-05-05 10:27:23 +0200 mav r271505 : #i101426# send the modified() notification only when the document can be modified
2009-05-05 10:25:07 +0200 mav r271504 : #i101426# send the modified() notification only when the document is modified
2009-05-05 08:42:48 +0200 mav r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk@271427 (milestone: DEV300:m47)
2009-04-30 13:32:11 +0200 mav r271412 : #i100518# check the template folders quietly
2009-04-29 20:04:25 +0200 mst r271393 : - sw/source/filter/html/swhtml.cxx:
+ fix wrong initialization order in constructor
2009-04-28 12:28:46 +0200 mav r271319 : #i99142# set the error correctly
2009-04-28 08:44:48 +0200 mav r271305 : #i99050# clear hidden flag if necessary
2009-04-28 08:40:10 +0200 mav r271304 : #i99050# avoid crash
2009-04-22 07:40:11 +0200 mav r271056 : #i101093# lets not affect the performance
2009-04-15 09:30:47 +0200 cd r270820 : #i99771# Fix warnings for gcc 4.4
2009-04-15 09:19:52 +0200 cd r270819 : #i99771# Fix warnings for gcc 4.4
2009-04-15 08:42:34 +0200 cd r270817 : #i99771# Fix warnings for gcc 4.4
2009-04-14 14:31:01 +0200 mav r270768 : #i99493# fix typo
2009-04-01 12:45:43 +0200 mst r270317 : fix #i100727#
- svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
+ move SvKeyValue stuff from sfx2 to svtools
- svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
+ move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
to HTMLParser (svtools)
+ make HTMLParser::ParseMetaOptions() a virtual function
+ HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
+ new template method HTMLParser::AddMetaUserDefined()
- svtools/source/svhtml/makefile.mk:
+ enable exceptions for parhtml.cxx
- dbaccess/source/ui/misc/HtmlReader.cxx,
sc/source/filter/html/htmlpars.cxx:
+ remove encoding related code duplication
- sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
+ new SwHTMLParser::AddMetaUserDefined() for import of
DOCINFO field subtypes INFO[1-4]
+ do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
2009-03-31 17:01:35 +0200 mav r270288 : #i91214# fix typo
2009-03-31 15:19:41 +0200 mav r270285 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 15:00:36 +0200 mav r270284 : #i100123# allow to turn OOo locking mechanics off
2009-03-31 12:19:13 +0200 mav r270270 : #i100123# taking the lock file over throws no exception
2009-03-30 13:57:21 +0200 mav r270227 : #i100351# fix the typo
2009-03-30 13:47:26 +0200 mav r270225 : #i99885# let OK be default button
2009-03-29 19:38:55 +0200 mav r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk@270033 (milestone: DEV300:m45)
2009-03-16 16:39:48 +0100 mav r269558 : #i93558# convert the attributes as well
2009-03-13 15:35:55 +0100 mav r269488 : #i93558# improve manifest.xml parsing
2009-03-13 08:47:00 +0100 mav r269454 : #i96205# allow to remove password on SaveAs
2009-03-12 13:36:07 +0100 mav r269398 : #i91306# show special error in case of shared document
2009-03-12 13:33:35 +0100 mav r269397 : #i91306# introduce the new error-message
2009-03-12 11:40:42 +0100 mst r269378 : fix #i90877#
- svtools/source/uno/unoevent.cxx:
+ use proper operator delete[]
2009-02-26 15:23:10 +0100 mav r268526 : #i91214# do not use ATL
2009-02-26 14:19:06 +0100 mav r268516 : #i98909# integrate the patch
2009-02-10 17:29:52 +0100 cd r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.
2009-06-16 16:15:54 +00:00
|
|
|
//pStore->SetError( SVSTREAM_WRONGVERSION, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
|
2004-10-04 17:30:29 +00:00
|
|
|
else
|
2012-04-13 19:37:04 -03:00
|
|
|
SetError( ERRCODE_ABORT, OSL_LOG_PREFIX );
|
2003-03-27 09:58:12 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-08-07 12:36:07 +00:00
|
|
|
// tell SFX to change viewshell when in preview mode
|
2003-05-16 13:17:31 +00:00
|
|
|
if( IsPreview() || bStartPresentation )
|
2001-08-07 12:36:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
SfxItemSet *pMediumSet = GetMedium()->GetItemSet();
|
|
|
|
if( pMediumSet )
|
|
|
|
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, bStartPresentation ? 1 : 5 ) );
|
2001-08-07 12:36:07 +00:00
|
|
|
}
|
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
return bRet;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* LoadFrom: Inhalte fuer Organizer laden
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool DrawDocShell::LoadFrom( SfxMedium& rMedium )
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2002-08-01 10:30:12 +00:00
|
|
|
mbNewDocument = sal_False;
|
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
WaitObject* pWait = NULL;
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpViewShell )
|
|
|
|
pWait = new WaitObject( (Window*) mpViewShell->GetActiveWindow() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bRet = sal_False;
|
2001-05-03 11:20:25 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->NewOrLoadCompleted( NEW_DOC );
|
|
|
|
mpDoc->CreateFirstPages();
|
|
|
|
mpDoc->StopWorkStartupDelay();
|
2001-05-03 11:20:25 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
// TODO/LATER: nobody is interested in the error code?!
|
|
|
|
ErrCode nError = ERRCODE_NONE;
|
2005-01-11 11:11:28 +00:00
|
|
|
bRet = SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Organizer, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError );
|
2001-05-03 11:20:25 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-08-07 12:36:07 +00:00
|
|
|
// tell SFX to change viewshell when in preview mode
|
|
|
|
if( IsPreview() )
|
|
|
|
{
|
|
|
|
SfxItemSet *pSet = GetMedium()->GetItemSet();
|
|
|
|
|
|
|
|
if( pSet )
|
|
|
|
pSet->Put( SfxUInt16Item( SID_VIEW_ID, 5 ) );
|
|
|
|
}
|
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
delete pWait;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2010-10-13 18:03:02 +02:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* ImportFrom: load from 3rd party format
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2011-05-31 13:56:08 +02:00
|
|
|
sal_Bool DrawDocShell::ImportFrom( SfxMedium &rMedium, bool bInsert )
|
2010-10-13 18:03:02 +02:00
|
|
|
{
|
2011-05-31 13:56:08 +02:00
|
|
|
const sal_Bool bRet=SfxObjectShell::ImportFrom(rMedium, bInsert);
|
2010-10-13 18:03:02 +02:00
|
|
|
|
|
|
|
SfxItemSet* pSet = rMedium.GetItemSet();
|
|
|
|
if( pSet )
|
|
|
|
{
|
|
|
|
if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
|
|
|
|
( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() )
|
|
|
|
{
|
|
|
|
mpDoc->SetStartWithPresentation( true );
|
|
|
|
|
|
|
|
// tell SFX to change viewshell when in preview mode
|
|
|
|
if( IsPreview() )
|
|
|
|
{
|
|
|
|
SfxItemSet *pMediumSet = GetMedium()->GetItemSet();
|
|
|
|
if( pMediumSet )
|
|
|
|
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, 1 ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
2001-02-13 11:17:06 +00:00
|
|
|
|* ConvertFrom: aus Fremdformat laden
|
2000-09-18 16:07:07 +00:00
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2002-08-01 10:30:12 +00:00
|
|
|
mbNewDocument = sal_False;
|
|
|
|
|
2012-04-18 16:09:02 -03:00
|
|
|
const rtl::OUString aFilterName( rMedium.GetFilter()->GetFilterName() );
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bRet = sal_False;
|
2006-03-10 15:18:21 +00:00
|
|
|
bool bStartPresentation = false;
|
2001-02-13 11:17:06 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
SetWaitCursor( sal_True );
|
2001-02-13 11:17:06 +00:00
|
|
|
|
2006-03-10 15:18:21 +00:00
|
|
|
SfxItemSet* pSet = rMedium.GetItemSet();
|
|
|
|
if( pSet )
|
|
|
|
{
|
|
|
|
if( ( SFX_ITEM_SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() )
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
mpDoc->SetStarDrawPreviewMode( sal_True );
|
2006-03-10 15:18:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
|
|
|
|
( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() )
|
|
|
|
{
|
|
|
|
bStartPresentation = true;
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->SetStartWithPresentation( true );
|
2006-03-10 15:18:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-10-13 18:03:02 +02:00
|
|
|
if( aFilterName == pFilterPowerPoint97
|
|
|
|
|| aFilterName == pFilterPowerPoint97Template
|
|
|
|
|| aFilterName == pFilterPowerPoint97AutoPlay)
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->StopWorkStartupDelay();
|
2004-10-04 17:30:29 +00:00
|
|
|
bRet = SdPPTFilter( rMedium, *this, sal_True ).Import();
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
2012-07-08 17:16:27 +07:00
|
|
|
else if (aFilterName.indexOf("impress8") >= 0 ||
|
|
|
|
aFilterName.indexOf("draw8") >= 0)
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
// TODO/LATER: nobody is interested in the error code?!
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->CreateFirstPages();
|
|
|
|
mpDoc->StopWorkStartupDelay();
|
2004-10-04 17:30:29 +00:00
|
|
|
ErrCode nError = ERRCODE_NONE;
|
|
|
|
bRet = SdXMLFilter( rMedium, *this, sal_True ).Import( nError );
|
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
2012-07-08 17:16:27 +07:00
|
|
|
else if (aFilterName.indexOf("StarOffice XML (Draw)") >= 0 ||
|
|
|
|
aFilterName.indexOf("StarOffice XML (Impress)") >= 0)
|
2004-07-13 06:44:12 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
// TODO/LATER: nobody is interested in the error code?!
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->CreateFirstPages();
|
|
|
|
mpDoc->StopWorkStartupDelay();
|
2004-10-04 17:30:29 +00:00
|
|
|
ErrCode nError = ERRCODE_NONE;
|
|
|
|
bRet = SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 ).Import( nError );
|
2004-07-13 06:44:12 +00:00
|
|
|
}
|
2012-04-18 16:09:02 -03:00
|
|
|
else if( aFilterName.equals( "CGM - Computer Graphics Metafile" ) )
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->CreateFirstPages();
|
|
|
|
mpDoc->StopWorkStartupDelay();
|
2004-10-04 17:30:29 +00:00
|
|
|
bRet = SdCGMFilter( rMedium, *this, sal_True ).Import();
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->CreateFirstPages();
|
|
|
|
mpDoc->StopWorkStartupDelay();
|
2006-11-14 13:26:45 +00:00
|
|
|
bRet = SdGRFFilter( rMedium, *this ).Import();
|
2001-02-13 11:17:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
FinishedLoading( SFX_LOADED_MAINDOCUMENT | SFX_LOADED_IMAGES );
|
|
|
|
|
2001-08-07 12:36:07 +00:00
|
|
|
// tell SFX to change viewshell when in preview mode
|
|
|
|
if( IsPreview() )
|
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
SfxItemSet *pMediumSet = GetMedium()->GetItemSet();
|
2001-08-07 12:36:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
if( pMediumSet )
|
|
|
|
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, 5 ) );
|
2001-08-07 12:36:07 +00:00
|
|
|
}
|
2011-01-17 11:41:00 +01:00
|
|
|
SetWaitCursor( sal_False );
|
2001-02-13 11:17:06 +00:00
|
|
|
|
2006-03-10 15:18:21 +00:00
|
|
|
// tell SFX to change viewshell when in preview mode
|
|
|
|
if( IsPreview() || bStartPresentation )
|
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
SfxItemSet *pMediumSet = GetMedium()->GetItemSet();
|
|
|
|
if( pMediumSet )
|
|
|
|
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, bStartPresentation ? 1 : 5 ) );
|
2006-03-10 15:18:21 +00:00
|
|
|
}
|
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
return bRet;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Save: Pools und Dokument in die offenen Streams schreiben
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool DrawDocShell::Save()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->StopWorkStartupDelay();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
//TODO/LATER: why this?!
|
2001-02-13 11:17:06 +00:00
|
|
|
if( GetCreateMode() == SFX_CREATE_MODE_STANDARD )
|
2004-10-04 17:30:29 +00:00
|
|
|
SfxObjectShell::SetVisArea( Rectangle() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bRet = SfxObjectShell::Save();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if( bRet )
|
|
|
|
{
|
2011-02-07 22:11:09 +01:00
|
|
|
// Call UpdateDocInfoForSave() before export
|
2001-07-05 12:09:12 +00:00
|
|
|
UpdateDocInfoForSave();
|
|
|
|
|
2005-01-11 11:11:28 +00:00
|
|
|
bRet = SdXMLFilter( *GetMedium(), *this, sal_True, SDXMLMODE_Normal, SotStorage::GetVersion( GetMedium()->GetStorage() ) ).Export();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SaveAs: Pools und Dokument in den angegebenen Storage sichern
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool DrawDocShell::SaveAs( SfxMedium& rMedium )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->StopWorkStartupDelay();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
//TODO/LATER: why this?!
|
2001-02-13 11:17:06 +00:00
|
|
|
if( GetCreateMode() == SFX_CREATE_MODE_STANDARD )
|
2004-10-04 17:30:29 +00:00
|
|
|
SfxObjectShell::SetVisArea( Rectangle() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt32 nVBWarning = ERRCODE_NONE;
|
|
|
|
sal_Bool bRet = SfxObjectShell::SaveAs( rMedium );
|
2001-02-13 11:17:06 +00:00
|
|
|
|
|
|
|
if( bRet )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-02-07 22:11:09 +01:00
|
|
|
// Call UpdateDocInfoForSave() before export
|
2004-10-04 17:30:29 +00:00
|
|
|
UpdateDocInfoForSave();
|
2005-01-11 11:11:28 +00:00
|
|
|
bRet = SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Normal, SotStorage::GetVersion( rMedium.GetStorage() ) ).Export();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
if( GetError() == ERRCODE_NONE )
|
2012-04-13 19:37:04 -03:00
|
|
|
SetError( nVBWarning, OSL_LOG_PREFIX );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
return bRet;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* ConvertTo: im Fremdformat speichern
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool DrawDocShell::ConvertTo( SfxMedium& rMedium )
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bRet = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpDoc->GetPageCount() )
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
2002-04-18 14:48:12 +00:00
|
|
|
const SfxFilter* pMediumFilter = rMedium.GetFilter();
|
2012-04-18 16:09:02 -03:00
|
|
|
const rtl::OUString aTypeName( pMediumFilter->GetTypeName() );
|
2002-04-18 14:48:12 +00:00
|
|
|
SdFilter* pFilter = NULL;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2012-07-08 17:16:27 +07:00
|
|
|
if( aTypeName.indexOf( "graphic_HTML" ) >= 0 )
|
2002-04-18 14:48:12 +00:00
|
|
|
{
|
|
|
|
pFilter = new SdHTMLFilter( rMedium, *this, sal_True );
|
|
|
|
}
|
2012-07-08 17:16:27 +07:00
|
|
|
else if( aTypeName.indexOf( "MS_PowerPoint_97" ) >= 0 )
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
|
|
|
pFilter = new SdPPTFilter( rMedium, *this, sal_True );
|
2001-03-16 12:44:56 +00:00
|
|
|
((SdPPTFilter*)pFilter)->PreSaveBasic();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2012-07-08 17:16:27 +07:00
|
|
|
else if ( aTypeName.indexOf( "CGM_Computer_Graphics_Metafile" ) >= 0 )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2001-02-13 11:17:06 +00:00
|
|
|
pFilter = new SdCGMFilter( rMedium, *this, sal_True );
|
|
|
|
}
|
2012-07-08 17:16:27 +07:00
|
|
|
else if( aTypeName.indexOf( "draw8" ) >= 0 ||
|
|
|
|
aTypeName.indexOf( "impress8" ) >= 0 )
|
2001-02-13 11:17:06 +00:00
|
|
|
{
|
|
|
|
pFilter = new SdXMLFilter( rMedium, *this, sal_True );
|
|
|
|
UpdateDocInfoForSave();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2012-07-08 17:16:27 +07:00
|
|
|
else if( aTypeName.indexOf( "StarOffice_XML_Impress" ) >= 0 ||
|
|
|
|
aTypeName.indexOf( "StarOffice_XML_Draw" ) >= 0 )
|
2004-07-13 06:44:12 +00:00
|
|
|
{
|
|
|
|
pFilter = new SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 );
|
|
|
|
UpdateDocInfoForSave();
|
|
|
|
}
|
2002-04-18 14:48:12 +00:00
|
|
|
else
|
|
|
|
{
|
2006-11-14 13:26:45 +00:00
|
|
|
pFilter = new SdGRFFilter( rMedium, *this );
|
2002-04-18 14:48:12 +00:00
|
|
|
}
|
2000-10-30 10:50:43 +00:00
|
|
|
|
2001-02-13 11:17:06 +00:00
|
|
|
if( pFilter )
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
const sal_uLong nOldSwapMode = mpDoc->GetSwapGraphicsMode();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
mpDoc->SetSwapGraphicsMode( SDR_SWAPGRAPHICSMODE_TEMP );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
bRet = pFilter->Export();
|
|
|
|
if( !bRet )
|
|
|
|
mpDoc->SetSwapGraphicsMode( nOldSwapMode );
|
2001-02-13 11:17:06 +00:00
|
|
|
|
|
|
|
delete pFilter;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2001-02-13 11:17:06 +00:00
|
|
|
|
|
|
|
return bRet;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SaveCompleted: die eigenen Streams wieder oeffnen, damit kein anderer
|
|
|
|
|* sie "besetzt"
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool DrawDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bRet = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-10-04 17:30:29 +00:00
|
|
|
if( SfxObjectShell::SaveCompleted(xStorage) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
mpDoc->NbcSetChanged( sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpViewShell )
|
2001-04-20 08:45:44 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
if( mpViewShell->ISA( OutlineViewShell ) )
|
|
|
|
static_cast<OutlineView*>(mpViewShell->GetView())
|
2004-02-02 09:54:17 +00:00
|
|
|
->GetOutliner()->ClearModifyFlag();
|
2001-04-20 08:45:44 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
SdrOutliner* pOutl = mpViewShell->GetView()->GetTextEditOutliner();
|
2001-04-20 08:45:44 +00:00
|
|
|
if( pOutl )
|
2001-05-16 11:30:45 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
SdrObject* pObj = mpViewShell->GetView()->GetTextEditObject();
|
2001-05-16 11:30:45 +00:00
|
|
|
if( pObj )
|
|
|
|
pObj->NbcSetOutlinerParaObject( pOutl->CreateParaObject() );
|
|
|
|
|
2001-04-20 08:45:44 +00:00
|
|
|
pOutl->ClearModifyFlag();
|
2001-05-16 11:30:45 +00:00
|
|
|
}
|
2001-04-20 08:45:44 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
bRet = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
SfxViewFrame* pFrame = ( mpViewShell && mpViewShell->GetViewFrame() ) ?
|
|
|
|
mpViewShell->GetViewFrame() :
|
2001-03-21 10:46:52 +00:00
|
|
|
SfxViewFrame::Current();
|
|
|
|
|
|
|
|
if( pFrame )
|
2011-01-17 11:41:00 +01:00
|
|
|
pFrame->GetBindings().Invalidate( SID_NAVIGATOR_STATE, sal_True, sal_False );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Referenz auf Dokument
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
SdDrawDocument* DrawDocShell::GetDoc()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
return mpDoc;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Referenz auf Dokument
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
SfxStyleSheetBasePool* DrawDocShell::GetStyleSheetPool()
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
return( (SfxStyleSheetBasePool*) mpDoc->GetStyleSheetPool() );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Sprung zu Bookmark
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool DrawDocShell::GotoBookmark(const String& rBookmark)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bFound = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
if (mpViewShell && mpViewShell->ISA(DrawViewShell))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2007-04-03 14:42:53 +00:00
|
|
|
DrawViewShell* pDrawViewShell = static_cast<DrawViewShell*>(mpViewShell);
|
|
|
|
ViewShellBase& rBase (mpViewShell->GetViewShellBase());
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bIsMasterPage = sal_False;
|
|
|
|
sal_uInt16 nPageNumber = SDRPAGE_NOTFOUND;
|
2007-04-03 14:42:53 +00:00
|
|
|
SdrObject* pObj = NULL;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
rtl::OUString sBookmark( rBookmark );
|
2012-04-13 19:37:04 -03:00
|
|
|
const rtl::OUString sInteraction( "action?" );
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
if ( sBookmark.match( sInteraction ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-04-13 19:37:04 -03:00
|
|
|
const rtl::OUString sJump( "jump=" );
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
if ( sBookmark.match( sJump, sInteraction.getLength() ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
rtl::OUString aDestination( sBookmark.copy( sInteraction.getLength() + sJump.getLength() ) );
|
2012-04-13 19:37:04 -03:00
|
|
|
if ( aDestination.match( "firstslide" ) )
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
{
|
|
|
|
nPageNumber = 1;
|
|
|
|
}
|
2012-04-13 19:37:04 -03:00
|
|
|
else if ( aDestination.match( "lastslide" ) )
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
{
|
|
|
|
nPageNumber = mpDoc->GetPageCount() - 2;
|
|
|
|
}
|
2012-04-13 19:37:04 -03:00
|
|
|
else if ( aDestination.match( "previousslide" ) )
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
{
|
|
|
|
SdPage* pPage = pDrawViewShell->GetActualPage();
|
|
|
|
nPageNumber = pPage->GetPageNum();
|
|
|
|
nPageNumber = nPageNumber > 2 ? nPageNumber - 2 : SDRPAGE_NOTFOUND;
|
|
|
|
}
|
2012-04-13 19:37:04 -03:00
|
|
|
else if ( aDestination.match( "nextslide" ) )
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
{
|
|
|
|
SdPage* pPage = pDrawViewShell->GetActualPage();
|
|
|
|
nPageNumber = pPage->GetPageNum() + 2;
|
|
|
|
if ( nPageNumber >= mpDoc->GetPageCount() )
|
|
|
|
nPageNumber = SDRPAGE_NOTFOUND;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
String aBookmark( rBookmark );
|
|
|
|
|
|
|
|
// Ist das Bookmark eine Seite?
|
|
|
|
nPageNumber = mpDoc->GetPageByName( aBookmark, bIsMasterPage );
|
|
|
|
|
|
|
|
if (nPageNumber == SDRPAGE_NOTFOUND)
|
|
|
|
{
|
|
|
|
// Ist das Bookmark ein Objekt?
|
|
|
|
pObj = mpDoc->GetObj(aBookmark);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
if (pObj)
|
|
|
|
{
|
|
|
|
nPageNumber = pObj->GetPage()->GetPageNum();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-04-03 14:42:53 +00:00
|
|
|
if (nPageNumber != SDRPAGE_NOTFOUND)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-11-26 14:10:11 +00:00
|
|
|
// Jump to the bookmarked page. This is done in three steps.
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
bFound = sal_True;
|
2003-12-01 09:09:07 +00:00
|
|
|
SdPage* pPage;
|
|
|
|
if (bIsMasterPage)
|
2007-04-03 14:42:53 +00:00
|
|
|
pPage = (SdPage*) mpDoc->GetMasterPage(nPageNumber);
|
2003-12-01 09:09:07 +00:00
|
|
|
else
|
2007-04-03 14:42:53 +00:00
|
|
|
pPage = (SdPage*) mpDoc->GetPage(nPageNumber);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-11-26 14:10:11 +00:00
|
|
|
// 1.) Change the view shell to the edit view, the notes view,
|
|
|
|
// or the handout view.
|
2000-09-18 16:07:07 +00:00
|
|
|
PageKind eNewPageKind = pPage->GetPageKind();
|
2006-01-16 14:19:26 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
if( (eNewPageKind != PK_STANDARD) && (mpDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW) )
|
2011-01-17 11:41:00 +01:00
|
|
|
return sal_False;
|
2006-01-16 14:19:26 +00:00
|
|
|
|
2007-04-03 14:42:53 +00:00
|
|
|
if (eNewPageKind != pDrawViewShell->GetPageKind())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
// Arbeitsbereich wechseln
|
|
|
|
GetFrameView()->SetPageKind(eNewPageKind);
|
2007-04-03 14:42:53 +00:00
|
|
|
::rtl::OUString sViewURL;
|
|
|
|
switch (eNewPageKind)
|
2004-11-26 14:10:11 +00:00
|
|
|
{
|
2007-04-03 14:42:53 +00:00
|
|
|
case PK_STANDARD:
|
|
|
|
sViewURL = FrameworkHelper::msImpressViewURL;
|
|
|
|
break;
|
|
|
|
case PK_NOTES:
|
|
|
|
sViewURL = FrameworkHelper::msNotesViewURL;
|
|
|
|
break;
|
|
|
|
case PK_HANDOUT:
|
|
|
|
sViewURL = FrameworkHelper::msHandoutViewURL;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2012-01-08 09:52:25 -02:00
|
|
|
if (!sViewURL.isEmpty())
|
2007-04-03 14:42:53 +00:00
|
|
|
{
|
|
|
|
::boost::shared_ptr<FrameworkHelper> pHelper (
|
|
|
|
FrameworkHelper::Instance(rBase));
|
|
|
|
pHelper->RequestView(
|
|
|
|
sViewURL,
|
|
|
|
FrameworkHelper::msCenterPaneURL);
|
|
|
|
pHelper->WaitForUpdate();
|
|
|
|
|
|
|
|
// Get the new DrawViewShell.
|
|
|
|
mpViewShell = pHelper->GetViewShell(FrameworkHelper::msCenterPaneURL).get();
|
|
|
|
pDrawViewShell = dynamic_cast<sd::DrawViewShell*>(mpViewShell);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pDrawViewShell = NULL;
|
2004-11-26 14:10:11 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2007-04-03 14:42:53 +00:00
|
|
|
if (pDrawViewShell != NULL)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2007-04-03 14:42:53 +00:00
|
|
|
// Set the edit mode to either the normal edit mode or the
|
|
|
|
// master page mode.
|
|
|
|
EditMode eNewEditMode = EM_PAGE;
|
|
|
|
if (bIsMasterPage)
|
|
|
|
{
|
|
|
|
eNewEditMode = EM_MASTERPAGE;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2007-04-03 14:42:53 +00:00
|
|
|
if (eNewEditMode != pDrawViewShell->GetEditMode())
|
|
|
|
{
|
|
|
|
// EditMode setzen
|
2011-01-17 11:41:00 +01:00
|
|
|
pDrawViewShell->ChangeEditMode(eNewEditMode, sal_False);
|
2007-04-03 14:42:53 +00:00
|
|
|
}
|
2003-04-08 14:20:29 +00:00
|
|
|
|
2007-04-03 14:42:53 +00:00
|
|
|
// Make the bookmarked page the current page. This is done
|
|
|
|
// by using the API because this takes care of all the
|
|
|
|
// little things to be done. Especially writing the view
|
2011-02-07 22:11:09 +01:00
|
|
|
// data to the frame view.
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nSdPgNum = (nPageNumber - 1) / 2;
|
2007-04-03 14:42:53 +00:00
|
|
|
Reference<drawing::XDrawView> xController (rBase.GetController(), UNO_QUERY);
|
|
|
|
if (xController.is())
|
|
|
|
{
|
|
|
|
Reference<drawing::XDrawPage> xDrawPage (pPage->getUnoPage(), UNO_QUERY);
|
|
|
|
xController->setCurrentPage (xDrawPage);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// As a fall back switch to the page via the core.
|
|
|
|
DBG_ASSERT (xController.is(),
|
|
|
|
"DrawDocShell::GotoBookmark: can't switch page via API");
|
|
|
|
pDrawViewShell->SwitchPage(nSdPgNum);
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2007-04-03 14:42:53 +00:00
|
|
|
if (pObj != NULL)
|
|
|
|
{
|
|
|
|
// Objekt einblenden und selektieren
|
|
|
|
pDrawViewShell->MakeVisible(pObj->GetLogicRect(),
|
|
|
|
*pDrawViewShell->GetActiveWindow());
|
|
|
|
pDrawViewShell->GetView()->UnmarkAll();
|
|
|
|
pDrawViewShell->GetView()->MarkObj(
|
|
|
|
pObj,
|
2011-01-17 11:41:00 +01:00
|
|
|
pDrawViewShell->GetView()->GetSdrPageView(), sal_False);
|
2007-04-03 14:42:53 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-04-03 14:42:53 +00:00
|
|
|
SfxBindings& rBindings = (pDrawViewShell->GetViewFrame()!=NULL
|
|
|
|
? pDrawViewShell->GetViewFrame()
|
|
|
|
: SfxViewFrame::Current() )->GetBindings();
|
2000-09-21 15:12:50 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
rBindings.Invalidate(SID_NAVIGATOR_STATE, sal_True, sal_False);
|
2000-09-21 15:12:50 +00:00
|
|
|
rBindings.Invalidate(SID_NAVIGATOR_PAGENAME);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return (bFound);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* SaveAsOwnFormat: wenn es eine Dokumentvorlage werden soll,
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2001-07-10 07:02:15 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
const SfxFilter* pFilter = rMedium.GetFilter();
|
|
|
|
|
|
|
|
if (pFilter->IsOwnTemplateFormat())
|
|
|
|
{
|
|
|
|
// jetzt die StarDraw-Spezialitaeten:
|
|
|
|
// die Layoutvorlagen der ersten Seite werden mit dem jetzt
|
|
|
|
// bekannten Layoutnamen versehen, die Layoutnamen der betroffenen
|
|
|
|
// Masterpages und Seiten werden gesetzt;
|
|
|
|
// alle Textobjekte der betroffenen Standard-, Notiz- und
|
|
|
|
// Masterpages werden ueber die Namensaenderung informiert
|
2001-07-10 07:02:15 +00:00
|
|
|
|
2001-11-05 14:23:46 +00:00
|
|
|
String aLayoutName;
|
|
|
|
|
2001-07-10 07:02:15 +00:00
|
|
|
SfxStringItem* pLayoutItem;
|
2011-01-17 11:41:00 +01:00
|
|
|
if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, sal_False, (const SfxPoolItem**) & pLayoutItem ) == SFX_ITEM_SET )
|
2001-07-10 07:02:15 +00:00
|
|
|
{
|
2001-11-05 14:23:46 +00:00
|
|
|
aLayoutName = pLayoutItem->GetValue();
|
2001-07-10 07:02:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-11-05 14:23:46 +00:00
|
|
|
INetURLObject aURL( rMedium.GetName() );
|
|
|
|
aURL.removeExtension();
|
|
|
|
aLayoutName = aURL.getName();
|
|
|
|
}
|
|
|
|
|
|
|
|
if( aLayoutName.Len() )
|
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
String aOldPageLayoutName = mpDoc->GetSdPage(0, PK_STANDARD)->GetLayoutName();
|
|
|
|
mpDoc->RenameLayoutTemplate(aOldPageLayoutName, aLayoutName);
|
2001-07-10 07:02:15 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return SfxObjectShell::SaveAsOwnFormat(rMedium);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* FillClass
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
void DrawDocShell::FillClass(SvGlobalName* pClassName,
|
2005-12-14 13:37:58 +00:00
|
|
|
sal_uInt32* pFormat,
|
2006-12-12 16:12:22 +00:00
|
|
|
String* ,
|
2000-09-18 16:07:07 +00:00
|
|
|
String* pFullTypeName,
|
|
|
|
String* pShortTypeName,
|
2008-12-12 12:52:51 +00:00
|
|
|
sal_Int32 nFileFormat,
|
|
|
|
sal_Bool bTemplate /* = sal_False */) const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
if (nFileFormat == SOFFICE_FILEFORMAT_60)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
if ( meDocType == DOCUMENT_TYPE_DRAW )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
*pClassName = SvGlobalName(SO3_SDRAW_CLASSID_60);
|
|
|
|
*pFormat = SOT_FORMATSTR_ID_STARDRAW_60;
|
|
|
|
*pFullTypeName = String(SdResId(STR_GRAPHIC_DOCUMENT_FULLTYPE_60));
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2004-10-04 17:30:29 +00:00
|
|
|
else
|
2004-07-13 06:44:12 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
*pClassName = SvGlobalName(SO3_SIMPRESS_CLASSID_60);
|
|
|
|
*pFormat = SOT_FORMATSTR_ID_STARIMPRESS_60;
|
|
|
|
*pFullTypeName = String(SdResId(STR_IMPRESS_DOCUMENT_FULLTYPE_60));
|
2004-07-13 06:44:12 +00:00
|
|
|
}
|
2004-10-04 17:30:29 +00:00
|
|
|
}
|
|
|
|
else if (nFileFormat == SOFFICE_FILEFORMAT_8)
|
|
|
|
{
|
2006-12-12 16:12:22 +00:00
|
|
|
if ( meDocType == DOCUMENT_TYPE_DRAW )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
*pClassName = SvGlobalName(SO3_SDRAW_CLASSID_60);
|
2008-12-12 12:52:51 +00:00
|
|
|
*pFormat = bTemplate ? SOT_FORMATSTR_ID_STARDRAW_8_TEMPLATE : SOT_FORMATSTR_ID_STARDRAW_8;
|
2012-04-13 19:37:04 -03:00
|
|
|
*pFullTypeName = "Draw 8"; // HACK: method will be removed with new storage API
|
2004-10-04 17:30:29 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*pClassName = SvGlobalName(SO3_SIMPRESS_CLASSID_60);
|
2008-12-12 12:52:51 +00:00
|
|
|
*pFormat = bTemplate ? SOT_FORMATSTR_ID_STARIMPRESS_8_TEMPLATE : SOT_FORMATSTR_ID_STARIMPRESS_8;
|
2012-04-13 19:37:04 -03:00
|
|
|
*pFullTypeName = "Impress 8"; // HACK: method will be removed with new storage API
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2004-10-04 17:30:29 +00:00
|
|
|
|
2006-12-12 16:12:22 +00:00
|
|
|
*pShortTypeName = String(SdResId( (meDocType == DOCUMENT_TYPE_DRAW) ?
|
2004-10-04 17:30:29 +00:00
|
|
|
STR_GRAPHIC_DOCUMENT : STR_IMPRESS_DOCUMENT ));
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2003-04-24 13:38:03 +00:00
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
OutputDevice* DrawDocShell::GetDocumentRefDev (void)
|
2003-04-24 13:38:03 +00:00
|
|
|
{
|
2004-10-04 17:30:29 +00:00
|
|
|
OutputDevice* pReferenceDevice = SfxObjectShell::GetDocumentRefDev ();
|
2003-04-24 13:38:03 +00:00
|
|
|
// Only when our parent does not have a reference device then we return
|
|
|
|
// our own.
|
2006-12-12 16:12:22 +00:00
|
|
|
if (pReferenceDevice == NULL && mpDoc != NULL)
|
|
|
|
pReferenceDevice = mpDoc->GetRefDevice ();
|
2003-04-24 13:38:03 +00:00
|
|
|
return pReferenceDevice;
|
|
|
|
}
|
2004-11-26 19:06:11 +00:00
|
|
|
|
|
|
|
/** executes the SID_OPENDOC slot to let the framework open a document
|
|
|
|
with the given URL and this document as a referer */
|
|
|
|
void DrawDocShell::OpenBookmark( const String& rBookmarkURL )
|
|
|
|
{
|
|
|
|
SfxStringItem aStrItem( SID_FILE_NAME, rBookmarkURL );
|
|
|
|
SfxStringItem aReferer( SID_REFERER, GetMedium()->GetName() );
|
2009-02-19 08:26:23 +00:00
|
|
|
const SfxPoolItem* ppArgs[] = { &aStrItem, &aReferer, 0 };
|
|
|
|
( mpViewShell ? mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings().Execute( SID_OPENHYPERLINK, ppArgs );
|
2004-11-26 19:06:11 +00:00
|
|
|
}
|
|
|
|
|
2004-02-02 09:54:17 +00:00
|
|
|
} // end of namespace sd
|
2010-10-12 15:51:52 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|