Files
libreoffice/sd/source/ui/docshell/docshel4.cxx

1245 lines
40 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2000-09-18 16:07:07 +00:00
#include "DrawDocShell.hxx"
#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>
#include <editeng/flstitem.hxx>
#include <editeng/eeitem.hxx>
#include <svl/aeitem.hxx>
#include <svl/flagitem.hxx>
#include <sot/storage.hxx>
#include <sfx2/dinfdlg.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>
#include <svl/style.hxx>
2000-09-18 16:07:07 +00:00
#include <sfx2/printer.hxx>
#include <svtools/ctrltool.hxx>
#include <svtools/sfxecode.hxx>
#include <comphelper/classids.hxx>
2000-09-18 16:07:07 +00:00
#include <sot/formats.hxx>
#include <sfx2/request.hxx>
#include <unotools/fltrcfg.hxx>
#include <sfx2/frame.hxx>
#include <sfx2/viewfrm.hxx>
#include <unotools/saveopt.hxx>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XDrawView.hpp>
#include <comphelper/processfactory.hxx>
2000-09-18 16:07:07 +00:00
#include "app.hrc"
#include "glob.hrc"
#include "strings.hrc"
#include "strmname.h"
#include "FrameView.hxx"
2000-09-18 16:07:07 +00:00
#include "optsitem.hxx"
#include "Outliner.hxx"
2000-09-18 16:07:07 +00:00
#include "sdattr.hxx"
#include "drawdoc.hxx"
#include "ViewShell.hxx"
#include "sdmod.hxx"
#include "View.hxx"
2000-09-18 16:07:07 +00:00
#include "sdpage.hxx"
#include "sdresid.hxx"
#include "DrawViewShell.hxx"
#include "ViewShellBase.hxx"
#include "Window.hxx"
#include "OutlineViewShell.hxx"
2001-02-13 11:17:06 +00:00
#include "sdxmlwrp.hxx"
#include "sdpptwrp.hxx"
#include "sdcgmfilter.hxx"
#include "sdgrffilter.hxx"
#include "sdhtmlfilter.hxx"
#include "framework/FrameworkHelper.hxx"
2000-09-18 16:07:07 +00:00
#include "SdUnoDrawView.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using ::sd::framework::FrameworkHelper;
namespace sd {
/**
* Creates (if necessary) and returns a SfxPrinter
*/
SfxPrinter* DrawDocShell::GetPrinter(sal_Bool bCreate)
2000-09-18 16:07:07 +00:00
{
if (bCreate && !mpPrinter)
2000-09-18 16:07:07 +00:00
{
// create ItemSet with special pool area
2000-09-18 16:07:07 +00:00
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 );
// set PrintOptionsSet
2000-09-18 16:07:07 +00:00
SdOptionsPrintItem aPrintItem( ATTR_OPTIONS_PRINT,
SD_MOD()->GetSdOptions(mpDoc->GetDocumentType()));
2000-09-18 16:07:07 +00:00
SfxFlagItem aFlagItem( SID_PRINTER_CHANGESTODOC );
sal_uInt16 nFlags = 0;
2000-09-18 16:07:07 +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 );
pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aPrintItem.GetOptionsPrint().IsWarningPrinter() ) );
2000-09-18 16:07:07 +00:00
pSet->Put( aFlagItem );
mpPrinter = new SfxPrinter(pSet);
mbOwnPrinter = sal_True;
2000-09-18 16:07:07 +00:00
// set output quality
sal_uInt16 nQuality = aPrintItem.GetOptionsPrint().GetOutputQuality();
2000-09-18 16:07:07 +00:00
sal_uLong nMode = DRAWMODE_DEFAULT;
// 1 == Grayscale, 2 == Black & White (with grayscale images)
2000-09-18 16:07:07 +00:00
if( nQuality == 1 )
nMode = DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT;
2000-09-18 16:07:07 +00:00
else if( nQuality == 2 )
nMode = DRAWMODE_BLACKLINE | DRAWMODE_WHITEFILL | DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_WHITEGRADIENT;
2000-09-18 16:07:07 +00:00
mpPrinter->SetDrawMode( nMode );
2000-09-18 16:07:07 +00:00
MapMode aMM (mpPrinter->GetMapMode());
2000-09-18 16:07:07 +00:00
aMM.SetMapUnit(MAP_100TH_MM);
mpPrinter->SetMapMode(aMM);
2002-07-26 07:32:44 +00:00
UpdateRefDevice();
2000-09-18 16:07:07 +00:00
}
return mpPrinter;
2000-09-18 16:07:07 +00:00
}
/**
* Set new SfxPrinter (transfer of ownership)
*/
void DrawDocShell::SetPrinter(SfxPrinter *pNewPrinter)
2000-09-18 16:07:07 +00:00
{
if ( mpViewShell )
2000-09-18 16:07:07 +00:00
{
::sd::View* pView = mpViewShell->GetView();
2000-09-18 16:07:07 +00:00
if ( pView->IsTextEdit() )
pView->SdrEndTextEdit();
2000-09-18 16:07:07 +00:00
}
if ( mpPrinter && mbOwnPrinter && (mpPrinter != pNewPrinter) )
2000-09-18 16:07:07 +00:00
{
delete mpPrinter;
2000-09-18 16:07:07 +00:00
}
mpPrinter = pNewPrinter;
mbOwnPrinter = sal_True;
if ( mpDoc->GetPrinterIndependentLayout() == ::com::sun::star::document::PrinterIndependentLayout::DISABLED )
UpdateFontList();
UpdateRefDevice();
}
2000-09-18 16:07:07 +00:00
void DrawDocShell::UpdateFontList()
{
delete mpFontList;
OutputDevice* pRefDevice = NULL;
if ( mpDoc->GetPrinterIndependentLayout() == ::com::sun::star::document::PrinterIndependentLayout::DISABLED )
pRefDevice = GetPrinter(sal_True);
else
pRefDevice = SD_MOD()->GetVirtualRefDevice();
mpFontList = new FontList( pRefDevice, NULL, sal_False );
SvxFontListItem aFontListItem( mpFontList, SID_ATTR_CHAR_FONTLIST );
2000-09-18 16:07:07 +00:00
PutItem( aFontListItem );
}
Printer* DrawDocShell::GetDocumentPrinter()
2000-09-18 16:07:07 +00:00
{
return GetPrinter(sal_False);
2000-09-18 16:07:07 +00:00
}
void DrawDocShell::OnDocumentPrinterChanged(Printer* pNewPrinter)
2000-09-18 16:07:07 +00:00
{
// if we already have a printer, see if its the same
if( mpPrinter )
{
// easy case
if( mpPrinter == pNewPrinter )
return;
// compare if its the same printer with the same job setup
if( (mpPrinter->GetName() == pNewPrinter->GetName()) &&
(mpPrinter->GetJobSetup() == pNewPrinter->GetJobSetup()))
return;
}
// if (mpPrinter->IsA(SfxPrinter))
2000-09-18 16:07:07 +00:00
{
// Since we do not have RTTI we use a hard cast (...)
2000-09-18 16:07:07 +00:00
SetPrinter((SfxPrinter*) pNewPrinter);
// container owns printer
mbOwnPrinter = sal_False;
2000-09-18 16:07:07 +00:00
}
}
void DrawDocShell::UpdateRefDevice()
2002-07-26 07:32:44 +00:00
{
if( mpDoc )
2002-07-26 07:32:44 +00:00
{
// Determine the device for which the output will be formatted.
OutputDevice* pRefDevice = NULL;
switch (mpDoc->GetPrinterIndependentLayout())
{
case ::com::sun::star::document::PrinterIndependentLayout::DISABLED:
pRefDevice = mpPrinter;
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.
DBG_ASSERT(false, "DrawDocShell::UpdateRefDevice(): Unexpected printer layout mode");
pRefDevice = mpPrinter;
break;
}
mpDoc->SetRefDevice( pRefDevice );
2002-07-26 07:32:44 +00:00
::sd::Outliner* pOutl = mpDoc->GetOutliner( sal_False );
2002-07-26 07:32:44 +00:00
if( pOutl )
pOutl->SetRefDevice( pRefDevice );
::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
/**
* Creates new document, opens streams
*/
sal_Bool DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
2000-09-18 16:07:07 +00:00
{
sal_Bool bRet = SfxObjectShell::InitNew( xStorage );
2000-09-18 16:07:07 +00:00
Rectangle aVisArea( Point(0, 0), Size(14100, 10000) );
SetVisArea(aVisArea);
if (bRet)
{
if( !mbSdDataObj )
mpDoc->NewOrLoadCompleted(NEW_DOC); // otherwise calling
2000-09-18 16:07:07 +00:00
// NewOrLoadCompleted(NEW_LOADED) in
// SdDrawDocument::AllocModel()
}
return bRet;
}
/**
* loads pools and document
*/
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;
sal_Bool bRet = sal_False;
bool bStartPresentation = false;
ErrCode nError = ERRCODE_NONE;
2001-02-13 11:17:06 +00:00
SfxItemSet* pSet = rMedium.GetItemSet();
2000-09-18 16:07:07 +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
{
mpDoc->SetStarDrawPreviewMode( true );
2000-09-18 16:07:07 +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
{
bStartPresentation = true;
mpDoc->SetStartWithPresentation( true );
2001-02-13 11:17:06 +00:00
}
}
bRet = SfxObjectShell::Load( rMedium );
if( bRet )
{
bRet = SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Normal, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError );
}
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
// 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.
//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
{
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 );
const INetURLObject aUrl;
SfxObjectShell::SetAutoLoad( aUrl, 0, sal_False );
2001-02-13 11:17:06 +00:00
}
else
{
if( nError == ERRCODE_IO_BROKENPACKAGE )
SetError( ERRCODE_IO_BROKENPACKAGE, OSL_LOG_PREFIX );
// TODO/LATER: correct error handling?!
//pStore->SetError( SVSTREAM_WRONGVERSION, OUString( OSL_LOG_PREFIX ) );
else
SetError( ERRCODE_ABORT, OSL_LOG_PREFIX );
}
2000-09-18 16:07:07 +00:00
// tell SFX to change viewshell when in preview mode
if( IsPreview() || bStartPresentation )
{
SfxItemSet *pMediumSet = GetMedium()->GetItemSet();
if( pMediumSet )
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, bStartPresentation ? 1 : 5 ) );
}
2001-02-13 11:17:06 +00:00
return bRet;
}
2000-09-18 16:07:07 +00:00
/**
* loads content for organizer
*/
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;
if( mpViewShell )
pWait = new WaitObject( (Window*) mpViewShell->GetActiveWindow() );
2000-09-18 16:07:07 +00:00
mpDoc->NewOrLoadCompleted( NEW_DOC );
mpDoc->CreateFirstPages();
mpDoc->StopWorkStartupDelay();
// TODO/LATER: nobody is interested in the error code?!
ErrCode nError = ERRCODE_NONE;
sal_Bool bRet = SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Organizer, SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError );
2000-09-18 16:07: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;
}
/**
* load from 3rd party format
*/
bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
uno::Reference<text::XTextRange> const& xInsertPosition)
{
const sal_Bool bRet = SfxObjectShell::ImportFrom(rMedium, xInsertPosition);
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;
}
/**
* load from a foreign format
*/
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;
const OUString aFilterName( rMedium.GetFilter()->GetFilterName() );
sal_Bool bRet = sal_False;
bool bStartPresentation = false;
2001-02-13 11:17:06 +00:00
SetWaitCursor( sal_True );
2001-02-13 11:17:06 +00:00
SfxItemSet* pSet = rMedium.GetItemSet();
if( pSet )
{
if( ( SFX_ITEM_SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() )
{
mpDoc->SetStarDrawPreviewMode( true );
}
if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() )
{
bStartPresentation = true;
mpDoc->SetStartWithPresentation( true );
}
}
if( aFilterName == pFilterPowerPoint97
|| aFilterName == pFilterPowerPoint97Template
|| aFilterName == pFilterPowerPoint97AutoPlay)
2001-02-13 11:17:06 +00:00
{
mpDoc->StopWorkStartupDelay();
bRet = SdPPTFilter( rMedium, *this, sal_True ).Import();
2001-02-13 11:17:06 +00:00
}
else if (aFilterName.indexOf("impress8") >= 0 ||
aFilterName.indexOf("draw8") >= 0)
2001-02-13 11:17:06 +00:00
{
// TODO/LATER: nobody is interested in the error code?!
mpDoc->CreateFirstPages();
mpDoc->StopWorkStartupDelay();
ErrCode nError = ERRCODE_NONE;
bRet = SdXMLFilter( rMedium, *this, sal_True ).Import( nError );
2001-02-13 11:17:06 +00:00
}
else if (aFilterName.indexOf("StarOffice XML (Draw)") >= 0 ||
aFilterName.indexOf("StarOffice XML (Impress)") >= 0)
{
// TODO/LATER: nobody is interested in the error code?!
mpDoc->CreateFirstPages();
mpDoc->StopWorkStartupDelay();
ErrCode nError = ERRCODE_NONE;
bRet = SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 ).Import( nError );
}
2012-04-18 16:09:02 -03:00
else if( aFilterName.equals( "CGM - Computer Graphics Metafile" ) )
2001-02-13 11:17:06 +00:00
{
mpDoc->CreateFirstPages();
mpDoc->StopWorkStartupDelay();
bRet = SdCGMFilter( rMedium, *this, sal_True ).Import();
2001-02-13 11:17:06 +00:00
}
else
{
mpDoc->CreateFirstPages();
mpDoc->StopWorkStartupDelay();
bRet = SdGRFFilter( rMedium, *this ).Import();
2001-02-13 11:17:06 +00:00
}
FinishedLoading( SFX_LOADED_MAINDOCUMENT | SFX_LOADED_IMAGES );
// tell SFX to change viewshell when in preview mode
if( IsPreview() )
{
SfxItemSet *pMediumSet = GetMedium()->GetItemSet();
if( pMediumSet )
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, 5 ) );
}
SetWaitCursor( sal_False );
2001-02-13 11:17:06 +00:00
// tell SFX to change viewshell when in preview mode
if( IsPreview() || bStartPresentation )
{
SfxItemSet *pMediumSet = GetMedium()->GetItemSet();
if( pMediumSet )
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, bStartPresentation ? 1 : 5 ) );
}
2001-02-13 11:17:06 +00:00
return bRet;
2000-09-18 16:07:07 +00:00
}
/**
* Writes pools and document to the open streams
*/
sal_Bool DrawDocShell::Save()
2000-09-18 16:07:07 +00:00
{
mpDoc->StopWorkStartupDelay();
2000-09-18 16:07:07 +00:00
//TODO/LATER: why this?!
2001-02-13 11:17:06 +00:00
if( GetCreateMode() == SFX_CREATE_MODE_STANDARD )
SfxObjectShell::SetVisArea( Rectangle() );
2000-09-18 16:07:07 +00: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
UpdateDocInfoForSave();
bRet = SdXMLFilter( *GetMedium(), *this, sal_True, SDXMLMODE_Normal, SotStorage::GetVersion( GetMedium()->GetStorage() ) ).Export();
2000-09-18 16:07:07 +00:00
}
return bRet;
}
/**
* Writes pools and document to the provided storage
*/
sal_Bool DrawDocShell::SaveAs( SfxMedium& rMedium )
2000-09-18 16:07:07 +00:00
{
mpDoc->setDocAccTitle(OUString());
SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
if (pFrame1)
{
::Window* pWindow = &pFrame1->GetWindow();
if ( pWindow )
{
::Window* pSysWin = pWindow->GetSystemWindow();
if ( pSysWin )
{
pSysWin->SetAccessibleName(OUString());
}
}
}
mpDoc->StopWorkStartupDelay();
2000-09-18 16:07:07 +00:00
//TODO/LATER: why this?!
2001-02-13 11:17:06 +00:00
if( GetCreateMode() == SFX_CREATE_MODE_STANDARD )
SfxObjectShell::SetVisArea( Rectangle() );
2000-09-18 16:07:07 +00: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
UpdateDocInfoForSave();
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 )
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
/**
* save to foreign format
*/
sal_Bool DrawDocShell::ConvertTo( SfxMedium& rMedium )
2001-02-13 11:17:06 +00:00
{
sal_Bool bRet = sal_False;
2000-09-18 16:07:07 +00:00
if( mpDoc->GetPageCount() )
2001-02-13 11:17:06 +00:00
{
const SfxFilter* pMediumFilter = rMedium.GetFilter();
const OUString aTypeName( pMediumFilter->GetTypeName() );
SdFilter* pFilter = NULL;
2000-09-18 16:07:07 +00:00
if( aTypeName.indexOf( "graphic_HTML" ) >= 0 )
{
pFilter = new SdHTMLFilter( rMedium, *this, sal_True );
}
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
}
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 );
}
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
}
else if( aTypeName.indexOf( "StarOffice_XML_Impress" ) >= 0 ||
aTypeName.indexOf( "StarOffice_XML_Draw" ) >= 0 )
{
pFilter = new SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 );
UpdateDocInfoForSave();
}
else
{
pFilter = new SdGRFFilter( rMedium, *this );
}
2001-02-13 11:17:06 +00:00
if( pFilter )
{
const sal_uLong nOldSwapMode = mpDoc->GetSwapGraphicsMode();
2000-09-18 16:07:07 +00:00
mpDoc->SetSwapGraphicsMode( SDR_SWAPGRAPHICSMODE_TEMP );
2000-09-18 16:07:07 +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
}
/**
* Reopen own streams to ensure that nobody else can prevent use from opening
* them.
*/
sal_Bool DrawDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
2000-09-18 16:07:07 +00:00
{
sal_Bool bRet = sal_False;
2000-09-18 16:07:07 +00:00
if( SfxObjectShell::SaveCompleted(xStorage) )
2000-09-18 16:07:07 +00:00
{
mpDoc->NbcSetChanged( sal_False );
2000-09-18 16:07:07 +00:00
if( mpViewShell )
{
if( mpViewShell->ISA( OutlineViewShell ) )
static_cast<OutlineView*>(mpViewShell->GetView())
->GetOutliner()->ClearModifyFlag();
SdrOutliner* pOutl = mpViewShell->GetView()->GetTextEditOutliner();
if( pOutl )
{
SdrObject* pObj = mpViewShell->GetView()->GetTextEditObject();
if( pObj )
pObj->NbcSetOutlinerParaObject( pOutl->CreateParaObject() );
pOutl->ClearModifyFlag();
}
}
2000-09-18 16:07:07 +00:00
bRet = sal_True;
2000-09-18 16:07:07 +00:00
SfxViewFrame* pFrame = ( mpViewShell && mpViewShell->GetViewFrame() ) ?
mpViewShell->GetViewFrame() :
2001-03-21 10:46:52 +00:00
SfxViewFrame::Current();
if( pFrame )
pFrame->GetBindings().Invalidate( SID_NAVIGATOR_STATE, true, false );
2000-09-18 16:07:07 +00:00
}
return bRet;
}
SdDrawDocument* DrawDocShell::GetDoc()
2000-09-18 16:07:07 +00:00
{
return mpDoc;
2000-09-18 16:07:07 +00:00
}
SfxStyleSheetBasePool* DrawDocShell::GetStyleSheetPool()
2000-09-18 16:07:07 +00:00
{
return( (SfxStyleSheetBasePool*) mpDoc->GetStyleSheetPool() );
2000-09-18 16:07:07 +00:00
}
sal_Bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
2000-09-18 16:07:07 +00:00
{
sal_Bool bFound = sal_False;
2000-09-18 16:07:07 +00:00
if (mpViewShell && mpViewShell->ISA(DrawViewShell))
2000-09-18 16:07:07 +00:00
{
DrawViewShell* pDrawViewShell = static_cast<DrawViewShell*>(mpViewShell);
ViewShellBase& rBase (mpViewShell->GetViewShellBase());
2000-09-18 16:07:07 +00:00
sal_Bool bIsMasterPage = sal_False;
sal_uInt16 nPageNumber = SDRPAGE_NOTFOUND;
SdrObject* pObj = NULL;
2000-09-18 16:07:07 +00:00
OUString sBookmark( rBookmark );
const 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
{
const 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
{
OUString aDestination( sBookmark.copy( sInteraction.getLength() + sJump.getLength() ) );
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;
}
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;
}
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;
}
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
{
OUString aBookmark( rBookmark );
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
// Is the bookmark a page?
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->GetPageByName( aBookmark, bIsMasterPage );
if (nPageNumber == SDRPAGE_NOTFOUND)
{
// Is the bookmark a object?
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
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();
}
}
}
if (nPageNumber != SDRPAGE_NOTFOUND)
2000-09-18 16:07:07 +00:00
{
// Jump to the bookmarked page. This is done in three steps.
bFound = sal_True;
SdPage* pPage;
if (bIsMasterPage)
pPage = (SdPage*) mpDoc->GetMasterPage(nPageNumber);
else
pPage = (SdPage*) mpDoc->GetPage(nPageNumber);
2000-09-18 16:07:07 +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();
if( (eNewPageKind != PK_STANDARD) && (mpDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW) )
return sal_False;
if (eNewPageKind != pDrawViewShell->GetPageKind())
2000-09-18 16:07:07 +00:00
{
// change work area
2000-09-18 16:07:07 +00:00
GetFrameView()->SetPageKind(eNewPageKind);
OUString sViewURL;
switch (eNewPageKind)
{
case PK_STANDARD:
sViewURL = FrameworkHelper::msImpressViewURL;
break;
case PK_NOTES:
sViewURL = FrameworkHelper::msNotesViewURL;
break;
case PK_HANDOUT:
sViewURL = FrameworkHelper::msHandoutViewURL;
break;
default:
break;
}
if (!sViewURL.isEmpty())
{
::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;
}
2000-09-18 16:07:07 +00:00
}
if (pDrawViewShell != NULL)
2000-09-18 16:07:07 +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
if (eNewEditMode != pDrawViewShell->GetEditMode())
{
// EditMode setzen
pDrawViewShell->ChangeEditMode(eNewEditMode, false);
}
// 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.
sal_uInt16 nSdPgNum = (nPageNumber - 1) / 2;
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
if (pObj != NULL)
{
// show and select object
pDrawViewShell->MakeVisible(pObj->GetLogicRect(),
*pDrawViewShell->GetActiveWindow());
pDrawViewShell->GetView()->UnmarkAll();
pDrawViewShell->GetView()->MarkObj(
pObj,
pDrawViewShell->GetView()->GetSdrPageView(), false);
}
2000-09-18 16:07:07 +00:00
}
}
SfxBindings& rBindings = (pDrawViewShell->GetViewFrame()!=NULL
? pDrawViewShell->GetViewFrame()
: SfxViewFrame::Current() )->GetBindings();
rBindings.Invalidate(SID_NAVIGATOR_STATE, true, false);
rBindings.Invalidate(SID_NAVIGATOR_PAGENAME);
2000-09-18 16:07:07 +00:00
}
return (bFound);
}
//If object is marked , return true , else return false .
sal_Bool DrawDocShell::IsMarked( SdrObject* pObject )
{
sal_Bool bisMarked =sal_False;
if (mpViewShell && mpViewShell->ISA(DrawViewShell))
{
DrawViewShell* pDrViewSh = (DrawViewShell*) mpViewShell;
if (pObject )
{
bisMarked = pDrViewSh->GetView()->IsObjMarked(pObject);
}
}
return bisMarked;
}
//If object is marked , return true , else return false .
sal_Bool DrawDocShell::GetObjectIsmarked(const OUString& rBookmark)
{
OSL_TRACE("GotoBookmark %s",
OUStringToOString(rBookmark, RTL_TEXTENCODING_UTF8).getStr());
sal_Bool bUnMark = sal_False;
if (mpViewShell && mpViewShell->ISA(DrawViewShell))
{
DrawViewShell* pDrViewSh = (DrawViewShell*) mpViewShell;
OUString aBookmark( rBookmark );
if( rBookmark.startsWith("#") )
aBookmark = rBookmark.copy( 1 );
// Ist das Bookmark eine Seite?
sal_Bool bIsMasterPage;
sal_uInt16 nPgNum = mpDoc->GetPageByName( aBookmark, bIsMasterPage );
SdrObject* pObj = NULL;
if (nPgNum == SDRPAGE_NOTFOUND)
{
// Ist das Bookmark ein Objekt?
pObj = mpDoc->GetObj(aBookmark);
if (pObj)
{
nPgNum = pObj->GetPage()->GetPageNum();
}
}
if (nPgNum != SDRPAGE_NOTFOUND)
{
/**********************************************************
* Zur Seite springen
**********************************************************/
SdPage* pPage = (SdPage*) mpDoc->GetPage(nPgNum);
PageKind eNewPageKind = pPage->GetPageKind();
if (eNewPageKind != pDrViewSh->GetPageKind())
{
// Arbeitsbereich wechseln
GetFrameView()->SetPageKind(eNewPageKind);
( ( mpViewShell && mpViewShell->GetViewFrame() ) ?
mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->
GetDispatcher()->Execute( SID_VIEWSHELL0, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
// Die aktuelle ViewShell hat sich geaendert!
pDrViewSh = (DrawViewShell*) mpViewShell;
}
EditMode eNewEditMode = EM_PAGE;
if( bIsMasterPage )
{
eNewEditMode = EM_MASTERPAGE;
}
if (eNewEditMode != pDrViewSh->GetEditMode())
{
// EditMode setzen
pDrViewSh->ChangeEditMode(eNewEditMode, false);
}
// Jump to the page. This is done by using the API because this
// takes care of all the little things to be done. Especially
// writing the view data to the frame view (see bug #107803#).
sal_uInt16 nSdPgNum = (nPgNum - 1) / 2;
SdUnoDrawView* pUnoDrawView = new SdUnoDrawView (
*pDrViewSh,
*pDrViewSh->GetView());
if (pUnoDrawView != NULL)
{
::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage> xDrawPage (
pPage->getUnoPage(), ::com::sun::star::uno::UNO_QUERY);
pUnoDrawView->setCurrentPage (xDrawPage);
}
else
{
// As a fall back switch to the page via the core.
DBG_ASSERT (pUnoDrawView!=NULL,
"SdDrawDocShell::GotoBookmark: can't switch page via API");
pDrViewSh->SwitchPage(nSdPgNum);
}
delete pUnoDrawView;
if (pObj)
{
// Objekt einblenden und selektieren
pDrViewSh->MakeVisible(pObj->GetLogicRect(),
*pDrViewSh->GetActiveWindow());
bUnMark = pDrViewSh->GetView()->IsObjMarked(pObj);
}
}
}
return ( bUnMark);
}
//realize multi-selection of objects
sal_Bool DrawDocShell::GotoTreeBookmark(const OUString& rBookmark)
{
OSL_TRACE("GotoBookmark %s",
OUStringToOString(rBookmark, RTL_TEXTENCODING_UTF8).getStr());
sal_Bool bFound = sal_False;
if (mpViewShell && mpViewShell->ISA(DrawViewShell))
{
DrawViewShell* pDrViewSh = (DrawViewShell*) mpViewShell;
OUString aBookmark( rBookmark );
if( rBookmark.startsWith("#") )
aBookmark = rBookmark.copy( 1 );
// Ist das Bookmark eine Seite?
sal_Bool bIsMasterPage;
sal_uInt16 nPgNum = mpDoc->GetPageByName( aBookmark, bIsMasterPage );
SdrObject* pObj = NULL;
if (nPgNum == SDRPAGE_NOTFOUND)
{
// Ist das Bookmark ein Objekt?
pObj = mpDoc->GetObj(aBookmark);
if (pObj)
{
nPgNum = pObj->GetPage()->GetPageNum();
}
}
if (nPgNum != SDRPAGE_NOTFOUND)
{
/**********************************************************
* Zur Seite springen
**********************************************************/
bFound = sal_True;
SdPage* pPage = (SdPage*) mpDoc->GetPage(nPgNum);
PageKind eNewPageKind = pPage->GetPageKind();
if (eNewPageKind != pDrViewSh->GetPageKind())
{
// Arbeitsbereich wechseln
GetFrameView()->SetPageKind(eNewPageKind);
( ( mpViewShell && mpViewShell->GetViewFrame() ) ?
mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->
GetDispatcher()->Execute( SID_VIEWSHELL0, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
// Die aktuelle ViewShell hat sich geaendert!
pDrViewSh = (DrawViewShell*) mpViewShell;
}
EditMode eNewEditMode = EM_PAGE;
if( bIsMasterPage )
{
eNewEditMode = EM_MASTERPAGE;
}
if (eNewEditMode != pDrViewSh->GetEditMode())
{
// EditMode setzen
pDrViewSh->ChangeEditMode(eNewEditMode, false);
}
// Jump to the page. This is done by using the API because this
// takes care of all the little things to be done. Especially
// writing the view data to the frame view (see bug #107803#).
sal_uInt16 nSdPgNum = (nPgNum - 1) / 2;
SdUnoDrawView* pUnoDrawView = new SdUnoDrawView (
*pDrViewSh,
*pDrViewSh->GetView());
if (pUnoDrawView != NULL)
{
::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPage> xDrawPage (
pPage->getUnoPage(), ::com::sun::star::uno::UNO_QUERY);
pUnoDrawView->setCurrentPage (xDrawPage);
}
else
{
// As a fall back switch to the page via the core.
DBG_ASSERT (pUnoDrawView!=NULL,
"SdDrawDocShell::GotoBookmark: can't switch page via API");
pDrViewSh->SwitchPage(nSdPgNum);
}
delete pUnoDrawView;
if (pObj)
{
// Objekt einblenden und selektieren
pDrViewSh->MakeVisible(pObj->GetLogicRect(),
*pDrViewSh->GetActiveWindow());
sal_Bool bUnMark = pDrViewSh->GetView()->IsObjMarked(pObj);
pDrViewSh->GetView()->MarkObj(pObj, pDrViewSh->GetView()->GetSdrPageView(), bUnMark);
}
}
SfxBindings& rBindings = ( ( mpViewShell && mpViewShell->GetViewFrame() ) ?
mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings();
rBindings.Invalidate(SID_NAVIGATOR_STATE, true, false);
rBindings.Invalidate(SID_NAVIGATOR_PAGENAME);
}
return (bFound);
}
/**
* If it should become a document template.
*/
sal_Bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
2000-09-18 16:07:07 +00:00
{
2000-09-18 16:07:07 +00:00
const SfxFilter* pFilter = rMedium.GetFilter();
if (pFilter->IsOwnTemplateFormat())
{
/* now the StarDraw specialty:
we assign known layout names to the layout template of the first
page, we set the layout names of the affected masterpages and pages.
We inform all text objects of the affected standard, note and
masterpages about the name change.
*/
OUString aLayoutName;
SfxStringItem* pLayoutItem;
if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, false, (const SfxPoolItem**) & pLayoutItem ) == SFX_ITEM_SET )
{
aLayoutName = pLayoutItem->GetValue();
}
else
{
INetURLObject aURL( rMedium.GetName() );
aURL.removeExtension();
aLayoutName = aURL.getName();
}
if (!aLayoutName.isEmpty())
{
sal_uInt32 nCount = mpDoc->GetMasterSdPageCount(PK_STANDARD);
for (sal_uInt32 i = 0; i < nCount; ++i)
{
OUString aOldPageLayoutName = mpDoc->GetMasterSdPage(i, PK_STANDARD)->GetLayoutName();
OUString aNewLayoutName = aLayoutName;
// Don't add suffix for the first master page
if( i > 0 )
aNewLayoutName += OUString::number(i);
mpDoc->RenameLayoutTemplate(aOldPageLayoutName, aNewLayoutName);
}
}
2000-09-18 16:07:07 +00:00
}
return SfxObjectShell::SaveAsOwnFormat(rMedium);
}
void DrawDocShell::FillClass(SvGlobalName* pClassName,
sal_uInt32* pFormat,
OUString* ,
OUString* pFullTypeName,
OUString* pShortTypeName,
CWS-TOOLING: integrate CWS fwk92 2008-12-04 14:43:28 +0100 oc r264844 : #i96788# 2008-12-03 02:15:17 +0100 fredrikh r264734 : i96817 2008-12-02 16:42:46 +0100 tbo r264720 : #i96763# changes to password dialog for framework, math, global 2008-11-26 16:26:28 +0100 mav r264418 : #i93617# fix typo 2008-11-26 16:13:03 +0100 mav r264411 : #i93617# fix the linux scenario 2008-11-25 17:58:01 +0100 mav r264323 : #i93617# fix the windows problems 2008-11-25 17:51:33 +0100 mav r264321 : #i93617# fix the windows problems 2008-11-21 16:01:18 +0100 mav r264145 : #i78753# integrate the patch 2008-11-21 14:08:32 +0100 mav r264136 : #i93617# integrate the patch 2008-11-21 13:01:56 +0100 mav r264127 : #i82947# integrate the patch 2008-11-20 18:14:19 +0100 mav r264092 : #i95793# look for import filter 2008-11-18 15:23:44 +0100 pb r263776 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls 2008-11-18 15:21:39 +0100 pb r263774 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls 2008-11-18 15:18:54 +0100 pb r263772 : fix: #i92583# SvxSearchPage::InitControls_Impl() added 2008-11-18 15:16:07 +0100 pb r263771 : fix: #i92579# columns calculated newly 2008-11-18 11:09:28 +0100 mav r263751 : #i21923# small fixes 2008-11-17 17:22:04 +0100 mav r263730 : #i21923# integrate the patch 2008-11-17 14:29:02 +0100 mav r263723 : #i21923# integrate the patch 2008-11-13 16:46:08 +0100 mav r263653 : #i88127# integrate the patch 2008-11-13 14:46:56 +0100 mav r263645 : #i54638# integrate the patch 2008-11-11 13:11:03 +0100 pb r263554 : fix: #i93142# disable maRecommReadOnlyCB on read-only documents 2008-11-10 13:30:58 +0100 pb r263516 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in 2008-11-10 13:29:10 +0100 pb r263515 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in 2008-11-10 06:10:11 +0100 pb r263505 : fix: #i94937# now .uno.ExtendedHelp without image 2008-11-04 20:52:50 +0100 mav r263337 : migrate cws fwk92 to svn
2008-12-12 12:52:51 +00:00
sal_Int32 nFileFormat,
bool bTemplate /* = false */) const
2000-09-18 16:07:07 +00:00
{
if (nFileFormat == SOFFICE_FILEFORMAT_60)
2000-09-18 16:07:07 +00:00
{
if ( meDocType == DOCUMENT_TYPE_DRAW )
2000-09-18 16:07:07 +00:00
{
*pClassName = SvGlobalName(SO3_SDRAW_CLASSID_60);
*pFormat = SOT_FORMATSTR_ID_STARDRAW_60;
*pFullTypeName = OUString(SdResId(STR_GRAPHIC_DOCUMENT_FULLTYPE_60));
2000-09-18 16:07:07 +00:00
}
else
{
*pClassName = SvGlobalName(SO3_SIMPRESS_CLASSID_60);
*pFormat = SOT_FORMATSTR_ID_STARIMPRESS_60;
*pFullTypeName = OUString(SdResId(STR_IMPRESS_DOCUMENT_FULLTYPE_60));
}
}
else if (nFileFormat == SOFFICE_FILEFORMAT_8)
{
if ( meDocType == DOCUMENT_TYPE_DRAW )
2000-09-18 16:07:07 +00:00
{
*pClassName = SvGlobalName(SO3_SDRAW_CLASSID_60);
CWS-TOOLING: integrate CWS fwk92 2008-12-04 14:43:28 +0100 oc r264844 : #i96788# 2008-12-03 02:15:17 +0100 fredrikh r264734 : i96817 2008-12-02 16:42:46 +0100 tbo r264720 : #i96763# changes to password dialog for framework, math, global 2008-11-26 16:26:28 +0100 mav r264418 : #i93617# fix typo 2008-11-26 16:13:03 +0100 mav r264411 : #i93617# fix the linux scenario 2008-11-25 17:58:01 +0100 mav r264323 : #i93617# fix the windows problems 2008-11-25 17:51:33 +0100 mav r264321 : #i93617# fix the windows problems 2008-11-21 16:01:18 +0100 mav r264145 : #i78753# integrate the patch 2008-11-21 14:08:32 +0100 mav r264136 : #i93617# integrate the patch 2008-11-21 13:01:56 +0100 mav r264127 : #i82947# integrate the patch 2008-11-20 18:14:19 +0100 mav r264092 : #i95793# look for import filter 2008-11-18 15:23:44 +0100 pb r263776 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls 2008-11-18 15:21:39 +0100 pb r263774 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls 2008-11-18 15:18:54 +0100 pb r263772 : fix: #i92583# SvxSearchPage::InitControls_Impl() added 2008-11-18 15:16:07 +0100 pb r263771 : fix: #i92579# columns calculated newly 2008-11-18 11:09:28 +0100 mav r263751 : #i21923# small fixes 2008-11-17 17:22:04 +0100 mav r263730 : #i21923# integrate the patch 2008-11-17 14:29:02 +0100 mav r263723 : #i21923# integrate the patch 2008-11-13 16:46:08 +0100 mav r263653 : #i88127# integrate the patch 2008-11-13 14:46:56 +0100 mav r263645 : #i54638# integrate the patch 2008-11-11 13:11:03 +0100 pb r263554 : fix: #i93142# disable maRecommReadOnlyCB on read-only documents 2008-11-10 13:30:58 +0100 pb r263516 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in 2008-11-10 13:29:10 +0100 pb r263515 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in 2008-11-10 06:10:11 +0100 pb r263505 : fix: #i94937# now .uno.ExtendedHelp without image 2008-11-04 20:52:50 +0100 mav r263337 : migrate cws fwk92 to svn
2008-12-12 12:52:51 +00:00
*pFormat = bTemplate ? SOT_FORMATSTR_ID_STARDRAW_8_TEMPLATE : SOT_FORMATSTR_ID_STARDRAW_8;
*pFullTypeName = "Draw 8"; // HACK: method will be removed with new storage API
}
else
{
*pClassName = SvGlobalName(SO3_SIMPRESS_CLASSID_60);
CWS-TOOLING: integrate CWS fwk92 2008-12-04 14:43:28 +0100 oc r264844 : #i96788# 2008-12-03 02:15:17 +0100 fredrikh r264734 : i96817 2008-12-02 16:42:46 +0100 tbo r264720 : #i96763# changes to password dialog for framework, math, global 2008-11-26 16:26:28 +0100 mav r264418 : #i93617# fix typo 2008-11-26 16:13:03 +0100 mav r264411 : #i93617# fix the linux scenario 2008-11-25 17:58:01 +0100 mav r264323 : #i93617# fix the windows problems 2008-11-25 17:51:33 +0100 mav r264321 : #i93617# fix the windows problems 2008-11-21 16:01:18 +0100 mav r264145 : #i78753# integrate the patch 2008-11-21 14:08:32 +0100 mav r264136 : #i93617# integrate the patch 2008-11-21 13:01:56 +0100 mav r264127 : #i82947# integrate the patch 2008-11-20 18:14:19 +0100 mav r264092 : #i95793# look for import filter 2008-11-18 15:23:44 +0100 pb r263776 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls 2008-11-18 15:21:39 +0100 pb r263774 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls 2008-11-18 15:18:54 +0100 pb r263772 : fix: #i92583# SvxSearchPage::InitControls_Impl() added 2008-11-18 15:16:07 +0100 pb r263771 : fix: #i92579# columns calculated newly 2008-11-18 11:09:28 +0100 mav r263751 : #i21923# small fixes 2008-11-17 17:22:04 +0100 mav r263730 : #i21923# integrate the patch 2008-11-17 14:29:02 +0100 mav r263723 : #i21923# integrate the patch 2008-11-13 16:46:08 +0100 mav r263653 : #i88127# integrate the patch 2008-11-13 14:46:56 +0100 mav r263645 : #i54638# integrate the patch 2008-11-11 13:11:03 +0100 pb r263554 : fix: #i93142# disable maRecommReadOnlyCB on read-only documents 2008-11-10 13:30:58 +0100 pb r263516 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in 2008-11-10 13:29:10 +0100 pb r263515 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in 2008-11-10 06:10:11 +0100 pb r263505 : fix: #i94937# now .uno.ExtendedHelp without image 2008-11-04 20:52:50 +0100 mav r263337 : migrate cws fwk92 to svn
2008-12-12 12:52:51 +00:00
*pFormat = bTemplate ? SOT_FORMATSTR_ID_STARIMPRESS_8_TEMPLATE : SOT_FORMATSTR_ID_STARIMPRESS_8;
*pFullTypeName = "Impress 8"; // HACK: method will be removed with new storage API
2000-09-18 16:07:07 +00:00
}
}
*pShortTypeName = OUString(SdResId( (meDocType == DOCUMENT_TYPE_DRAW) ?
STR_GRAPHIC_DOCUMENT : STR_IMPRESS_DOCUMENT ));
2000-09-18 16:07:07 +00:00
}
OutputDevice* DrawDocShell::GetDocumentRefDev (void)
{
OutputDevice* pReferenceDevice = SfxObjectShell::GetDocumentRefDev ();
// Only when our parent does not have a reference device then we return
// our own.
if (pReferenceDevice == NULL && mpDoc != NULL)
pReferenceDevice = mpDoc->GetRefDevice ();
return pReferenceDevice;
}
/** 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 OUString& rBookmarkURL )
{
SfxStringItem aStrItem( SID_FILE_NAME, rBookmarkURL );
SfxStringItem aReferer( SID_REFERER, GetMedium()->GetName() );
const SfxPoolItem* ppArgs[] = { &aStrItem, &aReferer, 0 };
( mpViewShell ? mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings().Execute( SID_OPENHYPERLINK, ppArgs );
}
SfxDocumentInfoDialog* DrawDocShell::CreateDocumentInfoDialog( ::Window *pParent, const SfxItemSet &rSet )
{
SfxDocumentInfoDialog* pDlg = new SfxDocumentInfoDialog( pParent, rSet );
DrawDocShell* pDocSh = PTR_CAST(DrawDocShell,SfxObjectShell::Current());
if( pDocSh == this )
{
pDlg->AddFontTabPage();
}
return pDlg;
}
void DrawDocShell::setDocAccTitle( const OUString& rTitle )
{
if (mpDoc )
{
mpDoc->setDocAccTitle( rTitle );
}
}
const OUString DrawDocShell::getDocAccTitle() const
{
OUString sRet;
if (mpDoc)
{
sRet = mpDoc->getDocAccTitle();
}
return sRet;
}
void DrawDocShell::setDocReadOnly( sal_Bool bReadOnly)
{
if (mpDoc )
{
mpDoc->setDocReadOnly( bReadOnly );
}
}
sal_Bool DrawDocShell::getDocReadOnly() const
{
if (mpDoc)
{
return mpDoc->getDocReadOnly();
}
return sal_False;
}
} // end of namespace sd
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */