diff options
87 files changed, 376 insertions, 572 deletions
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index fdf5f8c7db18..7e92020eb88f 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -477,7 +477,6 @@ #include "sfx2/tabdlg.hxx" #include "sfx2/tbxctrl.hxx" #include "sfx2/templdlg.hxx" -#include "sfx2/topfrm.hxx" #include "sfx2/tplpitem.hxx" #include "sfx2/viewfac.hxx" #include "sfx2/viewfrm.hxx" diff --git a/sd/inc/pres.hxx b/sd/inc/pres.hxx index 6dd9b08ea442..6efd1cbe89f2 100644 --- a/sd/inc/pres.hxx +++ b/sd/inc/pres.hxx @@ -39,7 +39,6 @@ enum PresObjKind PRESOBJ_ORGCHART, PRESOBJ_TABLE, PRESOBJ_IMAGE, - PRESOBJ_BACKGROUND, PRESOBJ_PAGE, PRESOBJ_HANDOUT, PRESOBJ_NOTES, diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index dff2344a5395..0dad3ca237cb 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -69,6 +69,11 @@ class DrawDocShell; class SdGlobalResourceContainer; } +namespace com { namespace sun { namespace star { namespace frame { + class XFrame; +} } } } + + // ---------------------- // - SdOptionStreamMode - // ---------------------- @@ -165,8 +170,8 @@ private: SfxFrame* ExecuteNewDocument( SfxRequest& rReq ); static void ChangeMedium( ::sd::DrawDocShell* pDocShell, SfxViewFrame* pViewFrame, const sal_Int32 eMedium ); - static SfxFrame* CreateEmptyDocument( DocumentType eDocType, SfxFrame* pTargetFrame = 0 ); - static SfxFrame* CreateFromTemplate( const String& rTemplatePath, SfxFrame* pTargetFrame = 0 ); + static SfxFrame* CreateEmptyDocument( DocumentType eDocType, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame ); + static SfxFrame* CreateFromTemplate( const String& rTemplatePath, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame ); /** The resource container controls the lifetime of some singletons. */ diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index 76d0317fe735..51a1a03d838a 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -157,8 +157,6 @@ protected: /** a helper class to manipulate effects inside the main sequence */ boost::shared_ptr< sd::MainSequence > mpMainSequence; - void AdjustBackgroundSize(); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage(); SfxItemSet* mpItems; @@ -194,11 +192,13 @@ public: sd::ShapeList& GetPresentationShapeList() { return maPresentationShapeList; } + void EnsureMasterPageDefaultBackground(); SdrObject* CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rectangle& rRect, BOOL bInsert=FALSE); SdrObject* CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert); SdrObject* GetPresObj(PresObjKind eObjKind, int nIndex = 1 ); PresObjKind GetPresObjKind(SdrObject* pObj) const; String GetPresObjText(PresObjKind eObjKind) const; + SfxStyleSheet* GetStyleSheetForMasterPageBackground() const; SfxStyleSheet* GetStyleSheetForPresObj(PresObjKind eObjKind) const; bool RestoreDefaultText( SdrObject* pObj ); diff --git a/sd/res/buttons/glas-blue.zip b/sd/res/buttons/glas-blue.zip Binary files differindex 8eaace3eb91f..93a380b6c522 100644 --- a/sd/res/buttons/glas-blue.zip +++ b/sd/res/buttons/glas-blue.zip diff --git a/sd/res/buttons/glas-green.zip b/sd/res/buttons/glas-green.zip Binary files differindex 9e99fcff6cf0..af1543545442 100644 --- a/sd/res/buttons/glas-green.zip +++ b/sd/res/buttons/glas-green.zip diff --git a/sd/res/buttons/glas-red.zip b/sd/res/buttons/glas-red.zip Binary files differindex 3a6914740e36..914514c7f166 100644 --- a/sd/res/buttons/glas-red.zip +++ b/sd/res/buttons/glas-red.zip diff --git a/sd/res/buttons/round-gorilla.zip b/sd/res/buttons/round-gorilla.zip Binary files differindex 3f75e1180b98..727df6b92e52 100644 --- a/sd/res/buttons/round-gorilla.zip +++ b/sd/res/buttons/round-gorilla.zip diff --git a/sd/res/buttons/round-white.zip b/sd/res/buttons/round-white.zip Binary files differindex 2d2aa97dbfde..9c5f1b2aaa3e 100644 --- a/sd/res/buttons/round-white.zip +++ b/sd/res/buttons/round-white.zip diff --git a/sd/res/buttons/simple.zip b/sd/res/buttons/simple.zip Binary files differindex 5bb1cb5c4907..60c0b095702a 100644 --- a/sd/res/buttons/simple.zip +++ b/sd/res/buttons/simple.zip diff --git a/sd/res/buttons/square-blue.zip b/sd/res/buttons/square-blue.zip Binary files differindex 5db6e2a30b92..86c33465fb6d 100644 --- a/sd/res/buttons/square-blue.zip +++ b/sd/res/buttons/square-blue.zip diff --git a/sd/res/buttons/square-gray.zip b/sd/res/buttons/square-gray.zip Binary files differindex 57b7d37bfc79..31713b7975c3 100644 --- a/sd/res/buttons/square-gray.zip +++ b/sd/res/buttons/square-gray.zip diff --git a/sd/res/buttons/square-green.zip b/sd/res/buttons/square-green.zip Binary files differindex 3b26abce7eba..6962225306d0 100644 --- a/sd/res/buttons/square-green.zip +++ b/sd/res/buttons/square-green.zip diff --git a/sd/res/buttons/square-red.zip b/sd/res/buttons/square-red.zip Binary files differindex 06f0d793ff00..8199cbe736b6 100644 --- a/sd/res/buttons/square-red.zip +++ b/sd/res/buttons/square-red.zip diff --git a/sd/res/buttons/square-yellow.zip b/sd/res/buttons/square-yellow.zip Binary files differindex a264603189e5..27af86075ee5 100644 --- a/sd/res/buttons/square-yellow.zip +++ b/sd/res/buttons/square-yellow.zip diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 4294a55aee4d..e2fdc2f805e5 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -42,7 +42,6 @@ #include <unotools/useroptions.hxx> #include <sfx2/printer.hxx> -#include <sfx2/topfrm.hxx> #include <sfx2/app.hxx> #include <sfx2/linkmgr.hxx> #include <svx/dialogs.hrc> @@ -634,25 +633,6 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) if( aName != pPage->GetName() ) pPage->SetName( aName ); - - SdrObject* pPresObj = pPage->GetPresObj( PRESOBJ_BACKGROUND ) ; - - if( pPage->GetPageKind() == PK_STANDARD ) - { - DBG_ASSERT( pPresObj, "Masterpage without a background object!" ); - if (pPresObj && pPresObj->GetOrdNum() != 0 ) - pPage->NbcSetObjectOrdNum(pPresObj->GetOrdNum(),0); - } - else - { - DBG_ASSERT( pPresObj == NULL, "Non Standard Masterpage with a background object!\n(This assertion is ok for old binary files)" ); - if( pPresObj ) - { - pPage->RemoveObject( pPresObj->GetOrdNum() ); - pPage->RemovePresObj(pPresObj); - SdrObject::Free( pPresObj ); - } - } } // Sprachabhaengige Namen der StandardLayer erzeugen @@ -724,11 +704,6 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) SdPage* pPage = (SdPage*)GetMasterPage(nPage); NewOrLoadCompleted( pPage, pSPool ); - - // BackgroundObjekt vor Selektion schuetzen #62144# - SdrObject* pBackObj = pPage->GetPresObj(PRESOBJ_BACKGROUND); - if(pBackObj) - pBackObj->SetMarkProtect(TRUE); } } diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index aad4bfca227b..950d98a487e9 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -177,6 +177,29 @@ SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex ) return 0; } +/** create background properties */ +void SdPage::EnsureMasterPageDefaultBackground() +{ + if(mbMaster) + { + // no hard attributes on MasterPage attributes + getSdrPageProperties().ClearItem(); + SfxStyleSheet* pSheetForPresObj = GetStyleSheetForMasterPageBackground(); + + if(pSheetForPresObj) + { + // set StyleSheet for background fill attributes + getSdrPageProperties().SetStyleSheet(pSheetForPresObj); + } + else + { + // no style found, assert and set at least XFILL_NONE + OSL_ENSURE(false, "No Style for MasterPageBackground fill found (!)"); + getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); + } + } +} + /** creates a presentation object with the given PresObjKind on this page. A user call will be set */ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rectangle& rRect, BOOL /* bInsert */ ) @@ -287,15 +310,6 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec } break; - case PRESOBJ_BACKGROUND: - { - pSdrObj = new SdrRectObj(); - pSdrObj->SetMoveProtect(TRUE); - pSdrObj->SetResizeProtect(TRUE); - pSdrObj->SetMarkProtect(TRUE); - } - break; - case PRESOBJ_HANDOUT: { //Erste Standardseite am SdrPageObj vermerken @@ -446,18 +460,9 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec { SdrLayerAdmin& rLayerAdmin = pModel->GetLayerAdmin(); - if (eObjKind == PRESOBJ_BACKGROUND) - { - // Hintergrund der MasterPage - pSdrObj->SetLayer( rLayerAdmin. - GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE) ); - } - else - { - // Hintergrundobjekte der MasterPage - pSdrObj->SetLayer( rLayerAdmin. - GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE) ); - } + // Hintergrundobjekte der MasterPage + pSdrObj->SetLayer( rLayerAdmin. + GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE) ); } // Objekt am StyleSheet anmelden @@ -524,6 +529,25 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec |* \************************************************************************/ +SfxStyleSheet* SdPage::GetStyleSheetForMasterPageBackground() const +{ + String aName(GetLayoutName()); + String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR )); + USHORT nPos = aName.Search(aSep); + + if (nPos != STRING_NOTFOUND) + { + nPos = nPos + aSep.Len(); + aName.Erase(nPos); + } + + aName += String(SdResId(STR_LAYOUT_BACKGROUND)); + + SfxStyleSheetBasePool* pStShPool = pModel->GetStyleSheetPool(); + SfxStyleSheetBase* pResult = pStShPool->Find(aName, SD_STYLE_FAMILY_MASTERPAGE); + return (SfxStyleSheet*)pResult; +} + SfxStyleSheet* SdPage::GetStyleSheetForPresObj(PresObjKind eObjKind) const { String aName(GetLayoutName()); @@ -549,10 +573,6 @@ SfxStyleSheet* SdPage::GetStyleSheetForPresObj(PresObjKind eObjKind) const aName += String(SdResId(STR_LAYOUT_TITLE)); break; - case PRESOBJ_BACKGROUND: - aName += String(SdResId(STR_LAYOUT_BACKGROUND)); - break; - case PRESOBJ_NOTES: aName += String(SdResId(STR_LAYOUT_NOTES)); break; @@ -718,9 +738,7 @@ void SdPage::CreateTitleAndLayout(BOOL bInit, BOOL bCreate ) **************************************************************************/ if( mePageKind == PK_STANDARD ) { - SdrObject* pMasterBackground = pMasterPage->GetPresObj( PRESOBJ_BACKGROUND ); - if( pMasterBackground == NULL ) - pMasterPage->CreateDefaultPresObj(PRESOBJ_BACKGROUND, true); + pMasterPage->EnsureMasterPageDefaultBackground(); } if( ( (SdDrawDocument*) GetModel() )->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ) @@ -904,15 +922,6 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert) return NULL; } } - else if( eObjKind == PRESOBJ_BACKGROUND ) - { - Point aBackgroundPos ( GetLftBorder(), GetUppBorder() ); - Size aBackgroundSize ( GetSize() ); - aBackgroundSize.Width() -= GetLftBorder() + GetRgtBorder() - 1; - aBackgroundSize.Height() -= GetUppBorder() + GetLwrBorder() - 1; - Rectangle aBackgroundRect(aBackgroundPos, aBackgroundSize); - return CreatePresObj( PRESOBJ_BACKGROUND, FALSE, aBackgroundRect, bInsert ); - } else { DBG_ERROR("SdPage::CreateDefaultPresObj() - unknown PRESOBJ kind" ); @@ -1646,7 +1655,6 @@ void SdPage::SetSize(const Size& aSize) if (aSize != aOldSize) { FmFormPage::SetSize(aSize); - AdjustBackgroundSize(); if (aOldSize.Height() == 10 && aOldSize.Width() == 10) { @@ -1677,7 +1685,6 @@ void SdPage::SetBorder(INT32 nLft, INT32 nUpp, INT32 nRgt, INT32 nLwr) nRgt != GetRgtBorder() || nLwr != GetLwrBorder() ) { FmFormPage::SetBorder(nLft, nUpp, nRgt, nLwr); - AdjustBackgroundSize(); } } @@ -1693,7 +1700,6 @@ void SdPage::SetLftBorder(INT32 nBorder) if (nBorder != GetLftBorder() ) { FmFormPage::SetLftBorder(nBorder); - AdjustBackgroundSize(); } } @@ -1709,7 +1715,6 @@ void SdPage::SetRgtBorder(INT32 nBorder) if (nBorder != GetRgtBorder() ) { FmFormPage::SetRgtBorder(nBorder); - AdjustBackgroundSize(); } } @@ -1725,7 +1730,6 @@ void SdPage::SetUppBorder(INT32 nBorder) if (nBorder != GetUppBorder() ) { FmFormPage::SetUppBorder(nBorder); - AdjustBackgroundSize(); } } @@ -1741,7 +1745,6 @@ void SdPage::SetLwrBorder(INT32 nBorder) if (nBorder != GetLwrBorder() ) { FmFormPage::SetLwrBorder(nBorder); - AdjustBackgroundSize(); } } @@ -1756,7 +1759,6 @@ void SdPage::SetBackgroundFullSize( BOOL bIn ) if( bIn != mbBackgroundFullSize ) { mbBackgroundFullSize = bIn; - AdjustBackgroundSize(); } } @@ -1846,18 +1848,10 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR if (pObj) { - USHORT nIndexBackground = 0; // #88084# remember aTopLeft as original TopLeft Point aTopLeft(pObj->GetCurrentBoundRect().TopLeft()); - if (bIsPresObjOnMaster && (pObj == GetPresObj(PRESOBJ_BACKGROUND, nIndexBackground)) ) - { - /************************************************************** - * 1. Praesentationsobjekte auf Handzettelseite sollen nur positioniert werden - * 2. Hintergrundobjekt wird nicht skaliert - **************************************************************/ - } - else if (!pObj->IsEdgeObj()) + if (!pObj->IsEdgeObj()) { /************************************************************** * Objekt skalieren @@ -1972,7 +1966,6 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR } pOutlineSheet->GetItemSet().Put(aTempSet); - pOutlineSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED)); } } @@ -2570,43 +2563,6 @@ const String& SdPage::GetName() const return maCreatedPageName; } - -/************************************************************************* -|* -|* -|* -\************************************************************************/ - -void SdPage::AdjustBackgroundSize() -{ - SdrObject* pObj = GetPresObj(PRESOBJ_BACKGROUND); - - if (pObj) - { - // Hintergrund-Objekt verschieben - pObj->SetMoveProtect(FALSE); - pObj->SetResizeProtect(FALSE); - - { - sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement ); - - Point aBackgroundPos; - Size aBackgroundSize( GetSize() ); - - if( !mbBackgroundFullSize ) - { - aBackgroundPos = Point( GetLftBorder(), GetUppBorder() ); - aBackgroundSize.Width() -= GetLftBorder() + GetRgtBorder() - 1; - aBackgroundSize.Height() -= GetUppBorder() + GetLwrBorder() - 1; - } - Rectangle aBackgroundRect (aBackgroundPos, aBackgroundSize); - pObj->SetLogicRect(aBackgroundRect); - } - pObj->SetMoveProtect(TRUE); - pObj->SetResizeProtect(TRUE); - } -} - /************************************************************************* |* |* diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx index a306b956c897..7d28e5285f40 100644 --- a/sd/source/filter/cgm/sdcgmfilter.cxx +++ b/sd/source/filter/cgm/sdcgmfilter.cxx @@ -111,16 +111,14 @@ sal_Bool SdCGMFilter::Import() if( ( nRetValue &~0xff000000 ) != 0xffffff ) // maybe the backgroundcolor is already white { // so we must not set a master page mrDocument.StopWorkStartupDelay(); - SdrObject* pObj = mrDocument.GetMasterSdPage(0, PK_STANDARD)->GetPresObj(PRESOBJ_BACKGROUND); + SdPage* pSdPage = mrDocument.GetMasterSdPage(0, PK_STANDARD); - if( pObj ) + if(pSdPage) { - SfxItemSet aSet( mrDocument.GetPool() ); - Color aColor( (BYTE)( nRetValue >> 16 ), (BYTE)( nRetValue >> 8 ), (BYTE)( nRetValue >> 16 ) ); - - aSet.Put( XFillColorItem( String(), aColor ) ); - aSet.Put( XFillStyleItem( XFILL_SOLID ) ); - pObj->SetMergedItemSetAndBroadcast( aSet ); + // set PageFill to given color + const Color aColor((BYTE)(nRetValue >> 16), (BYTE)(nRetValue >> 8), (BYTE)(nRetValue >> 16)); + pSdPage->getSdrPageProperties().PutItem(XFillColorItem(String(), aColor)); + pSdPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_SOLID)); } } } diff --git a/sd/source/filter/html/buttonset.cxx b/sd/source/filter/html/buttonset.cxx index e65a07d2e7fc..be6da8ddb74b 100644 --- a/sd/source/filter/html/buttonset.cxx +++ b/sd/source/filter/html/buttonset.cxx @@ -72,7 +72,7 @@ ButtonsImpl::ButtonsImpl( const OUString& rURL ) { try { - mxStorage = comphelper::OStorageHelper::GetStorageFromURL( rURL, ElementModes::READ ); + mxStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL( ZIP_STORAGE_FORMAT_STRING, rURL, ElementModes::READ ); } catch( Exception& ) { diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 89c823dc6493..59d5b5e0b98a 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -255,6 +255,8 @@ sal_Bool ImplSdPPTImport::Import() return FALSE; pSdrModel->setLock( sal_True ); + pSdrModel->EnableUndo(false); + SdrOutliner& rOutl = mpDoc->GetDrawOutliner(); sal_uInt32 nControlWord = rOutl.GetEditEngine().GetControlWord(); nControlWord |= EE_CNTRL_ULSPACESUMMATION; @@ -861,35 +863,29 @@ sal_Bool ImplSdPPTImport::Import() { if ( pMPage->GetPageKind() == PK_STANDARD ) { - // Hintergrundobjekt gefunden (erstes Objekt der MasterPage) - pObj->SetEmptyPresObj( TRUE ); - pObj->SetUserCall( pMPage ); - pObj->SetLayer( mnBackgroundLayerID ); - - // Schatten am ersten Objekt (Hintergrundobjekt) entfernen (#57918#) - SfxItemSet aTempAttr( mpDoc->GetPool() ); - aTempAttr.Put( pObj->GetMergedItemSet() ); + // transform data from imported background object to new form + // and delete the object. It was used as container to transport + // the attributes of the MasterPage background fill + SfxStyleSheet* pSheet = pMPage->GetStyleSheetForMasterPageBackground(); - BOOL bShadowIsOn = ( (SdrShadowItem&)( aTempAttr.Get( SDRATTR_SHADOW ) ) ).GetValue(); - if( bShadowIsOn ) + if(pSheet) { - aTempAttr.Put( SdrShadowItem( FALSE ) ); - pObj->SetMergedItemSet( aTempAttr ); - } - SfxStyleSheet* pSheet = pMPage->GetStyleSheetForPresObj( PRESOBJ_BACKGROUND ); - if ( pSheet ) - { // StyleSheet fuellen und dem Objekt zuweisen + // if we have a StyleSheet (for Masterpages), set attributes there and use it pSheet->GetItemSet().ClearItem(); - pSheet->GetItemSet().Put( pObj->GetMergedItemSet() ); - aTempAttr.ClearItem(); - pObj->SetMergedItemSet( aTempAttr ); - pObj->SetStyleSheet( pSheet, FALSE ); + pSheet->GetItemSet().Put(pObj->GetMergedItemSet()); + pMPage->getSdrPageProperties().ClearItem(); + pMPage->getSdrPageProperties().SetStyleSheet(pSheet); + } + else + { + // without StyleSheet, set attributes directly. This + // should not be done at all and is an error (will be asserted by SdrPage) + pMPage->getSdrPageProperties().ClearItem(); + pMPage->getSdrPageProperties().PutItemSet(pObj->GetMergedItemSet()); } - pMPage->InsertPresObj( pObj, PRESOBJ_BACKGROUND ); - // #110094#-15 - // tell the page that it's visualization has changed - pMPage->ActionChanged(); + pMPage->RemoveObject(pObj->GetOrdNum()); + SdrObject::Free(pObj); } } } @@ -1419,6 +1415,7 @@ sal_Bool ImplSdPPTImport::Import() xDocProps->setTemplateName(::rtl::OUString()); pSdrModel->setLock( sal_False ); + pSdrModel->EnableUndo(true); return bOk; } diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 36c824e1b919..aa42fec50f9c 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -338,7 +338,7 @@ void AnnotationManagerImpl::ExecuteDeleteAnnotation(SfxRequest& rReq) if( pArgs ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == pArgs->GetItemState( SID_DELETE_POSTIT, TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == pArgs->GetItemState( SID_DELETEALLBYAUTHOR_POSTIT, TRUE, &pPoolItem ) ) { OUString sAuthor( (( const SfxStringItem* ) pPoolItem )->GetValue() ); DeleteAnnotationsByAuthor( sAuthor ); @@ -1072,7 +1072,7 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation USHORT nId = 0; // set slot images - Reference< ::com::sun::star::frame::XFrame > xFrame( mrBase.GetMainViewShell()->GetViewFrame()->GetFrame()->GetFrameInterface() ); + Reference< ::com::sun::star::frame::XFrame > xFrame( mrBase.GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface() ); if( xFrame.is() ) { const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); @@ -1091,7 +1091,7 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation } } - nId = pMenu->Execute( pParent, rContextRect, POPUPMENU_EXECUTE_DOWN ); + nId = pMenu->Execute( pParent, rContextRect, POPUPMENU_EXECUTE_DOWN|POPUPMENU_NOMOUSEUPCLOSE ); switch( nId ) { case SID_REPLYTO_POSTIT: diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index eaacc332725d..ad6709c776ce 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -780,6 +780,8 @@ void AnnotationWindow::Command( const CommandEvent& rCEvt ) { if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) { + if( mpMeta->IsVisible() &&(mpMeta->GetPosPixel().Y() < rCEvt.GetMousePosPixel().Y()) ) + return; mrManager.ExecuteAnnotationContextMenu( mxAnnotation, this, Rectangle(rCEvt.GetMousePosPixel(),Size(1,1)) ); } else diff --git a/sd/source/ui/app/menuportal_tmpl.src b/sd/source/ui/app/menuportal_tmpl.src index e96ca6101fdc..29d7c6da1e4a 100644 --- a/sd/source/ui/app/menuportal_tmpl.src +++ b/sd/source/ui/app/menuportal_tmpl.src @@ -68,7 +68,6 @@ Menu SD_MENU_PORTAL MI ( ITEM_FILE_PRINTDOC ) MI ( ITEM_FILE_SETUPPRINTER ) SEPARATOR - MI ( ITEM_FILE_BACKTOWEBTOP ) MI ( ITEM_FILE_LOGOUT ) }; }; diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index 6f7e34a3c0fe..e3181f792d04 100644..100755 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -675,7 +675,8 @@ BOOL SdOptionsMisc::ReadData( const Any* pValues ) if( pValues[13].hasValue() ) SetDefaultObjectSizeHeight( *(sal_uInt32*) pValues[ 13 ].getValue() ); if( pValues[14].hasValue() ) SetPrinterIndependentLayout( *(sal_uInt16*) pValues[ 14 ].getValue() ); - if( pValues[15].hasValue() ) SetShowComments( *(sal_Bool*) pValues[ 11 ].getValue() ); + if( pValues[15].hasValue() ) + SetShowComments( *(sal_Bool*) pValues[ 15 ].getValue() ); // just for Impress if( GetConfigId() == SDCFG_IMPRESS ) @@ -787,6 +788,7 @@ SdOptionsMiscItem::SdOptionsMiscItem( USHORT _nWhich, SdOptions* pOpts, ::sd::Fr maOptionsMisc.SetPreviewTransitions(pOpts->IsPreviewTransitions()); maOptionsMisc.SetDisplay(pOpts->GetDisplay()); + maOptionsMisc.SetShowComments( pOpts->IsShowComments() ); } if( pView ) @@ -865,6 +867,7 @@ void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) const // #90356# pOpts->SetShowUndoDeleteWarning( maOptionsMisc.IsShowUndoDeleteWarning() ); pOpts->SetPrinterIndependentLayout( maOptionsMisc.GetPrinterIndependentLayout() ); + pOpts->SetShowComments( maOptionsMisc.IsShowComments() ); // #97016# pOpts->SetDefaultObjectSizeWidth( maOptionsMisc.GetDefaultObjectSizeWidth() ); pOpts->SetDefaultObjectSizeHeight( maOptionsMisc.GetDefaultObjectSizeHeight() ); diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index fcc22b73f424..743b7a35610d 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -84,6 +84,8 @@ using ::sd::framework::FrameworkHelper; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::frame::XFrame; namespace { @@ -302,13 +304,7 @@ void SdModule::OutlineToImpress (SfxRequest& rRequest) } SFX_REQUEST_ARG( rRequest, pFrmItem, SfxFrameItem, SID_DOCFRAME, FALSE); - if ( pFrmItem ) - { - SfxFrame* pFrame = pFrmItem->GetFrame(); - pFrame->InsertDocument( pDocSh ); - } - else - SfxViewFrame::CreateViewFrame(*pDocSh, ::sd::OUTLINE_FACTORY_ID); + SfxViewFrame::LoadDocumentIntoFrame( *pDocSh, pFrmItem, ::sd::OUTLINE_FACTORY_ID ); ::sd::ViewShell* pViewSh = pDocSh->GetViewShell(); @@ -533,7 +529,7 @@ void SdModule::AddSummaryPage (SfxViewFrame* pViewFrame, SdDrawDocument* pDocume } } -SfxFrame* SdModule::CreateFromTemplate( const String& rTemplatePath, SfxFrame* pTargetFrame ) +SfxFrame* SdModule::CreateFromTemplate( const String& rTemplatePath, const Reference< XFrame >& i_rFrame ) { SfxFrame* pFrame = 0; @@ -552,17 +548,9 @@ SfxFrame* SdModule::CreateFromTemplate( const String& rTemplatePath, SfxFrame* p } else if( pDocShell ) { - if ( pTargetFrame ) - { - pFrame = pTargetFrame; - pFrame->InsertDocument( pDocShell ); - } - else - { - SfxViewFrame* pViewFrame = SfxViewFrame::CreateViewFrame( *pDocShell ); - if( pViewFrame ) - pFrame = pViewFrame->GetFrame(); - } + SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *pDocShell, i_rFrame ); + OSL_ENSURE( pViewFrame, "SdModule::CreateFromTemplate: no view frame - was the document really loaded?" ); + pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL; } return pFrame; @@ -574,10 +562,10 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) SfxFrame* pFrame = 0; if ( SvtModuleOptions().IsImpress() ) { - SfxFrame* pTargetFrame = 0; - SFX_REQUEST_ARG( rReq, pFrmItem, SfxFrameItem, SID_DOCFRAME, FALSE); + Reference< XFrame > xTargetFrame; + SFX_REQUEST_ARG( rReq, pFrmItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE); if ( pFrmItem ) - pTargetFrame = pFrmItem->GetFrame(); + xTargetFrame = pFrmItem->GetFrame(); bool bMakeLayoutVisible = false; SfxViewFrame* pViewFrame = NULL; @@ -597,12 +585,12 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) if( aStandardTemplate.Len() > 0 ) { //load a template document - pFrame = CreateFromTemplate( aStandardTemplate, pTargetFrame ); + pFrame = CreateFromTemplate( aStandardTemplate, xTargetFrame ); } else { //create an empty document - pFrame = CreateEmptyDocument( DOCUMENT_TYPE_IMPRESS, pTargetFrame ); + pFrame = CreateEmptyDocument( DOCUMENT_TYPE_IMPRESS, xTargetFrame ); bMakeLayoutVisible = true; } } @@ -635,7 +623,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) SfxStringItem aReferer( SID_REFERER, UniString() ); SfxStringItem aPassword( SID_PASSWORD, aPasswrd ); - if ( pTargetFrame ) + if ( xTargetFrame.is() ) { SfxAllItemSet aSet( *rReq.GetArgs()->GetPool() ); aSet.Put( aFile ); @@ -645,10 +633,10 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) if (aPasswrd.Len() > 0) aSet.Put( aPassword ); - const SfxPoolItem* pRet = pTargetFrame->LoadDocumentSynchron( aSet ); + const SfxPoolItem* pRet = SfxFrame::OpenDocumentSynchron( aSet, xTargetFrame ); const SfxViewFrameItem* pFrameItem = PTR_CAST( SfxViewFrameItem, pRet ); if ( pFrameItem && pFrameItem->GetFrame() ) - pFrame = pFrameItem->GetFrame()->GetFrame(); + pFrame = &pFrameItem->GetFrame()->GetFrame(); } else { @@ -667,7 +655,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) const SfxPoolItem* pRet = SFX_APP()->ExecuteSlot (aRequest); const SfxViewFrameItem* pFrameItem = PTR_CAST( SfxViewFrameItem, pRet ); if ( pFrameItem ) - pFrame = pFrameItem->GetFrame()->GetFrame(); + pFrame = &pFrameItem->GetFrame()->GetFrame(); } catch (::com::sun::star::uno::Exception e) { @@ -691,20 +679,9 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) SfxObjectShell* pShell = xShell; if( pShell ) { - if ( pTargetFrame ) - { - pFrame = pTargetFrame; - pFrame->InsertDocument( pShell ); - pViewFrame = pFrame->GetCurrentViewFrame(); - } - else - { - pViewFrame = SfxViewFrame::CreateViewFrame( *pShell ); - if( pViewFrame ) - pFrame = pViewFrame->GetFrame(); - } - + pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *pShell, xTargetFrame ); DBG_ASSERT( pViewFrame, "no ViewFrame!!" ); + pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL; if(bNewDocDirect && !bStartWithTemplate) { @@ -790,7 +767,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) return pFrame; } -SfxFrame* SdModule::CreateEmptyDocument( DocumentType eDocType, SfxFrame* pTargetFrame ) +SfxFrame* SdModule::CreateEmptyDocument( DocumentType eDocType, const Reference< XFrame >& i_rFrame ) { SfxFrame* pFrame = 0; @@ -807,17 +784,9 @@ SfxFrame* SdModule::CreateEmptyDocument( DocumentType eDocType, SfxFrame* pTarge pDoc->StopWorkStartupDelay(); } - if ( pTargetFrame ) - { - pFrame = pTargetFrame; - pFrame->InsertDocument( pNewDocSh ); - } - else - { - SfxViewFrame* pViewFrame = SfxViewFrame::CreateViewFrame( *pNewDocSh ); - if( pViewFrame ) - pFrame = pViewFrame->GetFrame(); - } + SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *pNewDocSh, i_rFrame ); + OSL_ENSURE( pViewFrame, "SdModule::CreateEmptyDocument: no view frame - was the document really loaded?" ); + pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL; } return pFrame; diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index c82bda44f846..d398724a3074 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -1591,14 +1591,13 @@ void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview ) aReq.AppendItem( SfxStringItem( SID_FILE_NAME, aDocFile )); aReq.AppendItem( SfxStringItem( SID_REFERER, aEmptyStr ) ); aReq.AppendItem( SfxStringItem( SID_TARGETNAME, aTargetStr ) ); - aReq.AppendItem( SfxBoolItem( SID_VIEW, FALSE ) ); + aReq.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) ); aReq.AppendItem( SfxBoolItem( SID_PREVIEW, bDocPreview ) ); - const SfxObjectShellItem* pRet = (SfxObjectShellItem*) - SFX_APP()->ExecuteSlot( aReq ); + const SfxViewFrameItem* pRet = PTR_CAST( SfxViewFrameItem, SFX_APP()->ExecuteSlot( aReq ) ); - if( pRet && pRet->GetObjectShell() ) - xDocShell = pRet->GetObjectShell(); + if ( pRet && pRet->GetFrame() && pRet->GetFrame()->GetObjectShell() ) + xDocShell = pRet->GetFrame()->GetObjectShell(); } diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index d6e358cc5411..294e61f3fe40 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -856,8 +856,7 @@ void PresLayoutPreview::Paint( OutputDevice& aOut, SdrTextObj* pObj, bool bVisib aObjectTransform.translate(maOutRect.TopLeft().X(), maOutRect.TopLeft().Y()); // create geometry using unit range and object transform - const basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0); - basegfx::B2DPolyPolygon aGeometry(basegfx::tools::createPolygonFromRect(aUnitRange)); + basegfx::B2DPolyPolygon aGeometry(basegfx::tools::createUnitPolygon()); aGeometry.transform(aObjectTransform); // apply line pattern if wanted diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index 1dbd1b1ce923..f284651b91e5 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -59,7 +59,6 @@ #ifndef _SO_CLSIDS_HXX #include <sot/clsids.hxx> #endif -#include <sfx2/topfrm.hxx> #include <svl/cjkoptions.hxx> #include <svl/visitem.hxx> @@ -146,7 +145,7 @@ void DrawDocShell::Construct( bool bClipboard ) // the document's ref device. UpdateRefDevice(); - SetModel( new SdXImpressDocument( this, bClipboard ) ); + SetBaseModel( new SdXImpressDocument( this, bClipboard ) ); SetPool( &mpDoc->GetItemPool() ); mpUndoManager = new sd::UndoManager; mpDoc->SetSdrUndoManager( mpUndoManager ); @@ -163,7 +162,7 @@ void DrawDocShell::Construct( bool bClipboard ) DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, BOOL bDataObject, - DocumentType eDocumentType,BOOL bScriptSupport) : + DocumentType eDocumentType) : SfxObjectShell( eMode == SFX_CREATE_MODE_INTERNAL ? SFX_CREATE_MODE_EMBEDDED : eMode), mpDoc(NULL), mpUndoManager(NULL), @@ -176,8 +175,6 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, mbOwnPrinter(FALSE), mbNewDocument( sal_True ) { - if ( !bScriptSupport ) - SetHasNoBasic(); Construct( eMode == SFX_CREATE_MODE_INTERNAL ); } @@ -187,6 +184,28 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, |* \************************************************************************/ +DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, BOOL bDataObject, DocumentType eDocumentType ) : + SfxObjectShell( nModelCreationFlags ), + mpDoc(NULL), + mpUndoManager(NULL), + mpPrinter(NULL), + mpViewShell(NULL), + mpFontList(NULL), + meDocType(eDocumentType), + mpFilterSIDs(0), + mbSdDataObj(bDataObject), + mbOwnPrinter(FALSE), + mbNewDocument( sal_True ) +{ + Construct( FALSE ); +} + +/************************************************************************* +|* +|* Konstruktor 3 +|* +\************************************************************************/ + DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode, BOOL bDataObject, DocumentType eDocumentType) : @@ -362,7 +381,7 @@ void DrawDocShell::InPlaceActivate( BOOL bActive ) ViewShell* pViewSh = NULL; SfxViewShell* pSfxViewSh = NULL; - SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, 0, false); + SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, false); while (pSfxViewFrame) { @@ -376,7 +395,7 @@ void DrawDocShell::InPlaceActivate( BOOL bActive ) pFrameViewList->Insert( new FrameView( mpDoc, pViewSh->GetFrameView() ) ); } - pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, 0, false); + pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, false); } } } @@ -392,7 +411,7 @@ void DrawDocShell::InPlaceActivate( BOOL bActive ) { ViewShell* pViewSh = NULL; SfxViewShell* pSfxViewSh = NULL; - SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, 0,false); + SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, false); sal_uInt32 i; for( i = 0; pSfxViewFrame && (i < pFrameViewList->Count()); i++ ) @@ -406,7 +425,7 @@ void DrawDocShell::InPlaceActivate( BOOL bActive ) pViewSh->ReadFrameViewData( (FrameView*)pFrameViewList->GetObject(i) ); } - pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, 0,false); + pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, false); } } } @@ -570,7 +589,7 @@ IMPL_LINK(DrawDocShell, OnlineSpellCallback, SpellCallbackInfo*, pInfo) void DrawDocShell::ClearUndoBuffer() { // clear possible undo buffers of outliners - SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, 0, false); + SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, false); while(pSfxViewFrame) { ViewShellBase* pViewShellBase = dynamic_cast< ViewShellBase* >( pSfxViewFrame->GetViewShell() ); @@ -593,7 +612,7 @@ void DrawDocShell::ClearUndoBuffer() } } } - pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, 0, false); + pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, false); } SfxUndoManager* pUndoManager = GetUndoManager(); diff --git a/sd/source/ui/docshell/grdocsh.cxx b/sd/source/ui/docshell/grdocsh.cxx index 38dff2996fcf..d5e7315144c0 100644 --- a/sd/source/ui/docshell/grdocsh.cxx +++ b/sd/source/ui/docshell/grdocsh.cxx @@ -68,8 +68,16 @@ SFX_IMPL_OBJECTFACTORY( GraphicDocShell, SvGlobalName(SO3_SDRAW_CLASSID_60), SFX GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode, BOOL bDataObject, - DocumentType eDocType,BOOL bScriptSupport) : - DrawDocShell(eMode, bDataObject, eDocType, bScriptSupport) + DocumentType eDocType) : + DrawDocShell(eMode, bDataObject, eDocType) +{ + SetStyleFamily( SD_STYLE_FAMILY_GRAPHICS ); +} + +GraphicDocShell::GraphicDocShell(const sal_uInt64 nModelCreationFlags, + BOOL bDataObject, + DocumentType eDocType) : + DrawDocShell(nModelCreationFlags, bDataObject, eDocType) { SetStyleFamily( SD_STYLE_FAMILY_GRAPHICS ); } diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx index 131b3a401936..74088422b4ab 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.cxx +++ b/sd/source/ui/framework/factories/FullScreenPane.cxx @@ -31,7 +31,7 @@ #include "ViewShellBase.hxx" #include <cppcanvas/vclfactory.hxx> #include <sfx2/dispatch.hxx> -#include <sfx2/topfrm.hxx> +#include <vcl/wrkwin.hxx> #include <vcl/svapp.hxx> #include <vcl/dialog.hxx> #include <toolkit/helper/vclunohelper.hxx> diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index f45ed82f4d3e..92b1450624e1 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -210,7 +210,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractDialog* pDlg = pFact ? pFact->CreateSfxDialog( &mpView->GetViewShell()->GetViewFrame()->GetWindow(), aSet, - mpView->GetViewShell()->GetViewFrame()->GetFrame()->GetFrameInterface(), + mpView->GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ) : 0; if( !pDlg ) return; diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 134646f2368e..de1dadc3ae43 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -276,20 +276,28 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) } else { - // Only this page, check if there is a background-object on that page - SdrObject* pObj = mpPage->GetBackgroundObj(); - if( pObj ) + // Only this page, get attributes for background fill + const SfxItemSet& rBackgroundAttributes = mpPage->getSdrPageProperties().GetItemSet(); + + if(XFILL_NONE != ((const XFillStyleItem&)rBackgroundAttributes.Get(XATTR_FILLSTYLE)).GetValue()) { - aMergedAttr.Put(pObj->GetMergedItemSet()); + // page attributes are used, take them + aMergedAttr.Put(rBackgroundAttributes); } else { - // if the page hasn't got a background-object, than use - // the fillstyle-settings of the masterpage for the dialog - if( pStyleSheet && pStyleSheet->GetItemSet().GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DEFAULT ) - mergeItemSetsImpl( aMergedAttr, pStyleSheet->GetItemSet() ); + if(pStyleSheet + && XFILL_NONE != ((const XFillStyleItem&)pStyleSheet->GetItemSet().Get(XATTR_FILLSTYLE)).GetValue()) + { + // if the page has no fill style, use the settings from the + // background stylesheet (if used) + mergeItemSetsImpl(aMergedAttr, pStyleSheet->GetItemSet()); + } else - aMergedAttr.Put( XFillStyleItem( XFILL_NONE ) ); + { + // no fill style from page, start with no fill style + aMergedAttr.Put(XFillStyleItem(XFILL_NONE)); + } } } } @@ -371,12 +379,14 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) if( mbPageBckgrdDeleted ) { - mpBackgroundObjUndoAction = new SdBackgroundObjUndoAction( *mpDoc, *mpPage, mpPage->GetBackgroundObj() ); - mpPage->SetBackgroundObj( NULL ); - - // #110094#-15 - // tell the page that it's visualization has changed - mpPage->ActionChanged(); + mpBackgroundObjUndoAction = new SdBackgroundObjUndoAction( + *mpDoc, *mpPage, mpPage->getSdrPageProperties().GetItemSet()); + + if(!mpPage->IsMasterPage()) + { + // on normal pages, switch off fill attribute usage + mpPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); + } } } @@ -403,15 +413,12 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) mpDoc->SetChanged(TRUE); - SdrObject* pObj = mpPage->IsMasterPage() ? - mpPage->GetPresObj( PRESOBJ_BACKGROUND ) : - ((SdPage&)(mpPage->TRG_GetMasterPage())).GetPresObj( PRESOBJ_BACKGROUND ); - if( pObj ) - { - // BackgroundObj: no hard attributes allowed - SfxItemSet aSet( mpDoc->GetPool() ); - pObj->SetMergedItemSet(aSet); - } + // BackgroundFill of Masterpage: no hard attributes allowed + SdrPage& rUsedMasterPage = mpPage->IsMasterPage() ? *mpPage : mpPage->TRG_GetMasterPage(); + OSL_ENSURE(rUsedMasterPage.IsMasterPage(), "No MasterPage (!)"); + rUsedMasterPage.getSdrPageProperties().ClearItem(); + OSL_ENSURE(0 != rUsedMasterPage.getSdrPageProperties().GetStyleSheet(), + "MasterPage without StyleSheet detected (!)"); } aNewAttr.Put(*(pTempSet.get())); @@ -536,28 +543,11 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs ) if( !mbMasterPage && !mbPageBckgrdDeleted ) { // Only this page - SdrObject* pObj = mpPage->GetBackgroundObj(); - delete mpBackgroundObjUndoAction; - mpBackgroundObjUndoAction = new SdBackgroundObjUndoAction( *mpDoc, *mpPage, pObj ); - - if( !pObj ) - { - pObj = new SdrRectObj(); - mpPage->SetBackgroundObj( pObj ); - } - - Point aPos ( nLeft, nUpper ); - Size aSize( mpPage->GetSize() ); - aSize.Width() -= nLeft + nRight - 1; - aSize.Height() -= nUpper + nLower - 1; - Rectangle aRect( aPos, aSize ); - pObj->SetLogicRect( aRect ); - pObj->SetMergedItemSet(*pArgs); - - // #110094#-15 - // tell the page that it's visualization has changed - mpPage->ActionChanged(); + mpBackgroundObjUndoAction = new SdBackgroundObjUndoAction( + *mpDoc, *mpPage, mpPage->getSdrPageProperties().GetItemSet()); + mpPage->getSdrPageProperties().ClearItem(); + mpPage->getSdrPageProperties().PutItemSet(*pArgs); } } diff --git a/sd/source/ui/func/undoback.cxx b/sd/source/ui/func/undoback.cxx index 2f1ab259bc55..7f0245c50cda 100644 --- a/sd/source/ui/func/undoback.cxx +++ b/sd/source/ui/func/undoback.cxx @@ -32,6 +32,7 @@ #include "sdpage.hxx" #include "sdresid.hxx" #include "strings.hrc" +#include <svl/itemset.hxx> // --------------------------- // - BackgroundObjUndoAction - @@ -41,10 +42,13 @@ TYPEINIT1( SdBackgroundObjUndoAction, SdUndoAction ); // ----------------------------------------------------------------------------- -SdBackgroundObjUndoAction::SdBackgroundObjUndoAction( SdDrawDocument& rDoc, SdPage& rPage, const SdrObject* pBackgroundObj ) : - SdUndoAction( &rDoc ), - mrPage( rPage ), - mpBackgroundObj( pBackgroundObj ? pBackgroundObj->Clone() : NULL ) +SdBackgroundObjUndoAction::SdBackgroundObjUndoAction( + SdDrawDocument& rDoc, + SdPage& rPage, + const SfxItemSet& rItenSet) +: SdUndoAction(&rDoc), + mrPage(rPage), + mpItemSet(new SfxItemSet(rItenSet)) { String aString( SdResId( STR_UNDO_CHANGE_PAGEFORMAT ) ); SetComment( aString ); @@ -54,20 +58,18 @@ SdBackgroundObjUndoAction::SdBackgroundObjUndoAction( SdDrawDocument& rDoc, SdPa SdBackgroundObjUndoAction::~SdBackgroundObjUndoAction() { - SdrObject::Free( mpBackgroundObj ); + delete mpItemSet; } // ----------------------------------------------------------------------------- void SdBackgroundObjUndoAction::ImplRestoreBackgroundObj() { - SdrObject* pOldObj = mrPage.GetBackgroundObj(); - - if( pOldObj ) - pOldObj = pOldObj->Clone(); - - mrPage.SetBackgroundObj( mpBackgroundObj ); - mpBackgroundObj = pOldObj; + SfxItemSet* pNew = new SfxItemSet(mrPage.getSdrPageProperties().GetItemSet()); + mrPage.getSdrPageProperties().ClearItem(); + mrPage.getSdrPageProperties().PutItemSet(*mpItemSet); + delete mpItemSet; + mpItemSet = pNew; // #110094#-15 // tell the page that it's visualization has changed @@ -92,5 +94,5 @@ void SdBackgroundObjUndoAction::Redo() SdUndoAction* SdBackgroundObjUndoAction::Clone() const { - return new SdBackgroundObjUndoAction( *mpDoc, mrPage, mpBackgroundObj ); + return new SdBackgroundObjUndoAction(*mpDoc, mrPage, *mpItemSet); } diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index 2509a4f4f375..f2b77d01f96c 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -70,8 +70,12 @@ public: DrawDocShell ( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, BOOL bSdDataObj=FALSE, - DocumentType=DOCUMENT_TYPE_IMPRESS, - BOOL bScriptSupport=TRUE); + DocumentType=DOCUMENT_TYPE_IMPRESS); + + DrawDocShell ( + const sal_uInt64 nModelCreationFlags, + BOOL bSdDataObj=FALSE, + DocumentType=DOCUMENT_TYPE_IMPRESS); DrawDocShell ( SdDrawDocument* pDoc, diff --git a/sd/source/ui/inc/GraphicDocShell.hxx b/sd/source/ui/inc/GraphicDocShell.hxx index 61f3f75110ce..7b506c515185 100644 --- a/sd/source/ui/inc/GraphicDocShell.hxx +++ b/sd/source/ui/inc/GraphicDocShell.hxx @@ -57,8 +57,12 @@ public: GraphicDocShell ( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, BOOL bSdDataObj=FALSE, - DocumentType=DOCUMENT_TYPE_DRAW, - BOOL bScriptSupport=TRUE); + DocumentType=DOCUMENT_TYPE_DRAW); + + GraphicDocShell ( + const sal_uInt64 nModelCreationFlags, + BOOL bSdDataObj=FALSE, + DocumentType=DOCUMENT_TYPE_DRAW); virtual ~GraphicDocShell (void); }; diff --git a/sd/source/ui/inc/drawview.hxx b/sd/source/ui/inc/drawview.hxx index 9c0d621f2ca3..f2b621814c49 100644 --- a/sd/source/ui/inc/drawview.hxx +++ b/sd/source/ui/inc/drawview.hxx @@ -74,8 +74,6 @@ public: void PresPaint(const Region& rRegion); - virtual SdrObject* GetMaxToBtmObj(SdrObject* pObj) const; - virtual void DeleteMarked(); // from SdrView protected: virtual void ModelHasChanged(); diff --git a/sd/source/ui/inc/undoback.hxx b/sd/source/ui/inc/undoback.hxx index 2496b8c4732b..ca62c6cae0b0 100644 --- a/sd/source/ui/inc/undoback.hxx +++ b/sd/source/ui/inc/undoback.hxx @@ -32,7 +32,7 @@ class SdDrawDocument; class SdPage; -class SdrObject; +class SfxItemSet; // ----------------------------- // - SdBackgroundObjUndoAction - @@ -43,7 +43,7 @@ class SdBackgroundObjUndoAction : public SdUndoAction private: SdPage& mrPage; - SdrObject* mpBackgroundObj; + SfxItemSet* mpItemSet; void ImplRestoreBackgroundObj(); @@ -51,7 +51,10 @@ public: TYPEINFO(); - SdBackgroundObjUndoAction( SdDrawDocument& rDoc, SdPage& rPage, const SdrObject* pBackgroundObj ); + SdBackgroundObjUndoAction( + SdDrawDocument& rDoc, + SdPage& rPage, + const SfxItemSet& rItenSet); virtual ~SdBackgroundObjUndoAction(); virtual void Undo(); diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 421129b8dba7..c951f68d9b74 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -44,7 +44,6 @@ #include <svx/svdpool.hxx> #include <svl/itemprop.hxx> -#include <sfx2/topfrm.hxx> #include <sfx2/viewfrm.hxx> #include <toolkit/unohlp.hxx> @@ -704,9 +703,9 @@ void SAL_CALL SlideShow::end() throw(RuntimeException) { PresentationViewShell* pShell = dynamic_cast<PresentationViewShell*>(pFullScreenViewShellBase->GetMainViewShell().get()); - if( pShell && pShell->GetViewFrame() && pShell->GetViewFrame()->GetTopFrame() ) + if( pShell && pShell->GetViewFrame() ) { - WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetTopFrame()->GetWindow().GetParent()); + WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetTopFrame().GetWindow().GetParent()); if( pWorkWindow ) { pWorkWindow->StartPresentationMode( FALSE, isAlwaysOnTop() ); @@ -1200,7 +1199,7 @@ void SlideShow::StartFullscreenPresentation( ) // The new frame is created hidden. To make it visible and activate the // new view shell--a prerequisite to process slot calls and initialize // its panes--a GrabFocus() has to be called later on. - SfxTopFrame* pNewFrame = SfxTopFrame::Create( mpDoc->GetDocSh(), pWorkWindow, PRESENTATION_FACTORY_ID, TRUE); + SfxFrame* pNewFrame = SfxFrame::Create( *mpDoc->GetDocSh(), *pWorkWindow, PRESENTATION_FACTORY_ID, true ); pNewFrame->SetPresentationMode(TRUE); mpFullScreenViewShellBase = static_cast<ViewShellBase*>(pNewFrame->GetCurrentViewFrame()->GetViewShell()); diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 137136c80fc0..d58cfcb3f6c9 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -2218,9 +2218,9 @@ IMPL_LINK( SlideshowImpl, ContextMenuHdl, void*, EMPTYARG ) PopupMenu* pPageMenu = pMenu->GetPopupMenu( CM_GOTO ); SfxViewFrame* pViewFrame = getViewFrame(); - if( pViewFrame && pViewFrame->GetFrame() ) + if( pViewFrame ) { - Reference< ::com::sun::star::frame::XFrame > xFrame( pViewFrame->GetFrame()->GetFrameInterface() ); + Reference< ::com::sun::star::frame::XFrame > xFrame( pViewFrame->GetFrame().GetFrameInterface() ); if( xFrame.is() ) { pMenu->SetItemImage( CM_NEXT_SLIDE, GetImage( xFrame, OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:10617") ), FALSE, FALSE ) ); @@ -2843,12 +2843,12 @@ void SlideshowImpl::setActiveXToolbarsVisible( sal_Bool bVisible ) // this is a plugin/activex mode, no toolbars should be visible during slide show // after the end of slide show they should be visible again SfxViewFrame* pViewFrame = getViewFrame(); - if( pViewFrame && pViewFrame->GetFrame() && pViewFrame->GetFrame()->GetTopFrame() ) + if( pViewFrame ) { try { Reference< frame::XLayoutManager > xLayoutManager; - Reference< beans::XPropertySet > xFrameProps( pViewFrame->GetFrame()->GetTopFrame()->GetFrameInterface(), UNO_QUERY_THROW ); + Reference< beans::XPropertySet > xFrameProps( pViewFrame->GetFrame().GetTopFrame().GetFrameInterface(), UNO_QUERY_THROW ); if ( ( xFrameProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ) ) >>= xLayoutManager ) && xLayoutManager.is() ) diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 5f1e2a056a34..d90f6f0f824f 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -82,7 +82,6 @@ #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/dispatch.hxx> -#include <sfx2/topfrm.hxx> #include <tools/link.hxx> #include <vcl/svapp.hxx> @@ -649,7 +648,7 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet) SfxViewFrame* pSlideViewFrame = SfxViewFrame::Current(); DBG_ASSERT(pSlideViewFrame!=NULL, "SlideSorterController::GetCtrlState: ViewFrame not found"); - if (pSlideViewFrame && pSlideViewFrame->ISA(SfxTopViewFrame)) + if (pSlideViewFrame) { pSlideViewFrame->GetSlotState (SID_RELOAD, NULL, &rSet); } diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 8033f5ac16bd..126a599c21d3 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -77,7 +77,6 @@ #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> -#include <sfx2/topfrm.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <svx/svxids.hrc> @@ -498,14 +497,7 @@ void SlotManager::GetCtrlState (SfxItemSet& rSet) SfxViewFrame* pSlideViewFrame = pShell->GetViewFrame(); DBG_ASSERT(pSlideViewFrame!=NULL, "SlideSorterController::GetCtrlState: ViewFrame not found"); - if (pSlideViewFrame->ISA(SfxTopViewFrame)) - { - pSlideViewFrame->GetSlotState (SID_RELOAD, NULL, &rSet); - } - else // MI sagt: kein MDIFrame --> disablen - { - rSet.DisableItem(SID_RELOAD); - } + pSlideViewFrame->GetSlotState (SID_RELOAD, NULL, &rSet); } } diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObject.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObject.hxx index 51908fd046a9..0f4ede6216c1 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObject.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObject.hxx @@ -54,7 +54,8 @@ public: private: model::SharedPageDescriptor mpDescriptor; - virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact (void); +protected: + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); }; diff --git a/sd/source/ui/slidesorter/view/SlsPageObject.cxx b/sd/source/ui/slidesorter/view/SlsPageObject.cxx index 790a1ad63edc..28c572de9594 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObject.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObject.cxx @@ -67,7 +67,7 @@ SharedPageDescriptor PageObject::GetDescriptor (void) const -sdr::contact::ViewContact* PageObject::CreateObjectSpecificViewContact (void) +sdr::contact::ViewContact* PageObject::CreateObjectSpecificViewContact() { if (mpDescriptor.get() != NULL) return mpDescriptor->GetPageObjectFactory().CreateViewContact(this, mpDescriptor); diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx index 0c485afed3d2..2e121098194a 100644 --- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx +++ b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx @@ -43,7 +43,7 @@ #include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/container/XIndexAccess.hpp> #include "stlpool.hxx" - +#include <svx/xfillit0.hxx> using namespace ::com::sun::star; namespace sd { namespace toolpanel { namespace controls { @@ -446,9 +446,10 @@ void DocumentHelper::AssignMasterPageToPage ( // not override the new master page) and assign the master page to // the regular slide. pDocument->GetDocSh()->GetUndoManager()->AddUndoAction( - new SdBackgroundObjUndoAction(*pDocument, *pPage, pPage->GetBackgroundObj()), - TRUE); - pPage->SetBackgroundObj(NULL); + new SdBackgroundObjUndoAction( + *pDocument, *pPage, pPage->getSdrPageProperties().GetItemSet()), + TRUE); + pPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); pDocument->SetMasterPage ( (pPage->GetPageNum()-1)/2, diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx index 8d6bd5f6b4bc..81678d1af7c0 100644 --- a/sd/source/ui/tools/EventMultiplexer.cxx +++ b/sd/source/ui/tools/EventMultiplexer.cxx @@ -265,7 +265,7 @@ EventMultiplexer::Implementation::Implementation (ViewShellBase& rBase) // Connect to the frame to listen for controllers being exchanged. // Listen to changes of certain properties. Reference<frame::XFrame> xFrame ( - mrBase.GetFrame()->GetTopFrame()->GetFrameInterface(), + mrBase.GetFrame()->GetTopFrame().GetFrameInterface(), uno::UNO_QUERY); mxFrameWeak = xFrame; if (xFrame.is()) diff --git a/sd/source/ui/tools/IdleDetection.cxx b/sd/source/ui/tools/IdleDetection.cxx index ae36f8954e56..46ac4174cbe7 100644 --- a/sd/source/ui/tools/IdleDetection.cxx +++ b/sd/source/ui/tools/IdleDetection.cxx @@ -82,18 +82,15 @@ sal_Int32 IdleDetection::CheckSlideShowRunning (void) // Ignore the current frame when it does not exist, is not valid, or // is not active. bool bIgnoreFrame (true); - if (pViewFrame->GetFrame() != NULL) + uno::Reference<frame::XFrame> xFrame (pViewFrame->GetFrame().GetFrameInterface()); + try { - uno::Reference<frame::XFrame> xFrame (pViewFrame->GetFrame()->GetFrameInterface()); - try - { - if (xFrame.is() && xFrame->isActive()) - bIgnoreFrame = false; - } - catch (uno::RuntimeException e) - { - (void) e; - } + if (xFrame.is() && xFrame->isActive()) + bIgnoreFrame = false; + } + catch (uno::RuntimeException e) + { + (void) e; } if (bIgnoreFrame) continue; diff --git a/sd/source/ui/unoidl/unodoc.cxx b/sd/source/ui/unoidl/unodoc.cxx index 48aed3ccad39..a423692caa4f 100644 --- a/sd/source/ui/unoidl/unodoc.cxx +++ b/sd/source/ui/unoidl/unodoc.cxx @@ -66,12 +66,9 @@ uno::Reference< uno::XInterface > SAL_CALL SdDrawingDocument_createInstance( SdDLL::Init(); - const SfxObjectCreateMode eCreateMode = ( _nCreationFlags & SFXMODEL_EMBEDDED_OBJECT ) ? SFX_CREATE_MODE_EMBEDDED : SFX_CREATE_MODE_STANDARD; - const bool bScriptSupport = ( _nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0; - SfxObjectShell* pShell = new ::sd::GraphicDocShell( - eCreateMode, FALSE, DOCUMENT_TYPE_DRAW, bScriptSupport ); + _nCreationFlags, FALSE, DOCUMENT_TYPE_DRAW ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } @@ -98,12 +95,9 @@ uno::Reference< uno::XInterface > SAL_CALL SdPresentationDocument_createInstance SdDLL::Init(); - const SfxObjectCreateMode eCreateMode = ( _nCreationFlags & SFXMODEL_EMBEDDED_OBJECT ) ? SFX_CREATE_MODE_EMBEDDED : SFX_CREATE_MODE_STANDARD; - const bool bScriptSupport = ( _nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0; - SfxObjectShell* pShell = new ::sd::DrawDocShell( - eCreateMode, FALSE, DOCUMENT_TYPE_IMPRESS, bScriptSupport ); + _nCreationFlags, FALSE, DOCUMENT_TYPE_IMPRESS ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 47f3818f6ddc..5b0594ba58b0 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -455,23 +455,9 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { if( hasEventListeners() ) { - - bool bBackgroundShape = false; - - // the background shape itself has no api representation, so filter all notifies for it - const SdrObject* pSdrObj = pSdrHint->GetObject(); - if( pSdrObj && (pSdrObj->GetObjInventor() == SdrInventor) && (pSdrObj->GetObjIdentifier() == OBJ_RECT) ) - { - SdPage* pPage = (SdPage*)pSdrObj->GetPage(); - bBackgroundShape = pPage && (pPage->GetPresObjKind(const_cast<SdrObject*>(pSdrObj)) == PRESOBJ_BACKGROUND); - } - - if( !bBackgroundShape ) - { - document::EventObject aEvent; - if( SvxUnoDrawMSFactory::createEvent( mpDoc, pSdrHint, aEvent ) ) - notifyEvent( aEvent ); - } + document::EventObject aEvent; + if( SvxUnoDrawMSFactory::createEvent( mpDoc, pSdrHint, aEvent ) ) + notifyEvent( aEvent ); } if( pSdrHint->GetKind() == HINT_MODELCLEARED ) @@ -2743,13 +2729,9 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn pMPage->SetLayoutName( aLayoutName ); mpDoc->InsertMasterPage(pMPage, (USHORT)nInsertPos); - { // insert background object - Point aBackgroundPos ( pMPage->GetLftBorder(), pMPage->GetUppBorder() ); - Size aBackgroundSize ( pMPage->GetSize() ); - aBackgroundSize.Width() -= pMPage->GetLftBorder() + pMPage->GetRgtBorder() - 1; - aBackgroundSize.Height() -= pMPage->GetUppBorder() + pMPage->GetLwrBorder() - 1; - Rectangle aBackgroundRect (aBackgroundPos, aBackgroundSize); - pMPage->CreatePresObj(PRESOBJ_BACKGROUND, FALSE, aBackgroundRect, sal_True ); + { + // ensure default MasterPage fill + pMPage->EnsureMasterPageDefaultBackground(); } xDrawPage = uno::Reference< drawing::XDrawPage >::query( pMPage->getUnoPage() ); diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 834d79bcd5e4..69d961d7237a 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -356,7 +356,6 @@ SdGenericDrawPage::SdGenericDrawPage( SdXImpressDocument* _pModel, SdPage* pInPa mpModel ( _pModel ), mpSdrModel(0), mpPropSet ( _pSet ), - mbHasBackgroundObject(sal_False), mbIsImpressDocument(false) { mpSdrModel = SvxFmDrawPage::mpModel; @@ -1384,9 +1383,6 @@ Reference< drawing::XShape > SdGenericDrawPage::_CreateShape( SdrObject *pObj ) case PRESOBJ_TABLE: aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("TableShape") ); break; - case PRESOBJ_BACKGROUND: - DBG_ASSERT( sal_False, "Danger! Someone got hold of the horrible background shape!" ); - break; case PRESOBJ_PAGE: aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("PageShape") ); break; @@ -2461,40 +2457,11 @@ void SdDrawPage::setBackground( const Any& rValue ) if( !xSet.is() ) { - // the easy case, clear the background obj - GetPage()->SetBackgroundObj( NULL ); - - // #110094#-15 - // tell the page that it's visualization has changed - GetPage()->ActionChanged(); - + // the easy case, no background set. Set XFILL_NONE to represent this + GetPage()->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); return; } - // prepare background object - SdrObject* pObj = GetPage()->GetBackgroundObj(); - if( NULL == pObj ) - { - pObj = new SdrRectObj(); - GetPage()->SetBackgroundObj( pObj ); - - // #110094#-15 - // tell the page that it's visualization has changed - GetPage()->ActionChanged(); - } - - const sal_Int32 nLeft = GetPage()->GetLftBorder(); - const sal_Int32 nRight = GetPage()->GetRgtBorder(); - const sal_Int32 nUpper = GetPage()->GetUppBorder(); - const sal_Int32 nLower = GetPage()->GetLwrBorder(); - - Point aPos ( nLeft, nRight ); - Size aSize( GetPage()->GetSize() ); - aSize.Width() -= nLeft + nRight - 1; - aSize.Height() -= nUpper + nLower - 1; - Rectangle aRect( aPos, aSize ); - pObj->SetLogicRect( aRect ); - // is it our own implementation? SdUnoPageBackground* pBack = SdUnoPageBackground::getImplementation( xSet ); @@ -2532,11 +2499,14 @@ void SdDrawPage::setBackground( const Any& rValue ) //-/ pObj->NbcSetAttributes( aSet, sal_False ); if( aSet.Count() == 0 ) { - GetPage()->SetBackgroundObj( NULL ); + // no background fill, represent by setting XFILL_NONE + GetPage()->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); } else { - pObj->SetMergedItemSet(aSet); + // background fill, set at page (not sure if ClearItem is needed) + GetPage()->getSdrPageProperties().ClearItem(); + GetPage()->getSdrPageProperties().PutItemSet(aSet); } // repaint only @@ -2567,14 +2537,19 @@ Reference< XAnnotationEnumeration > SAL_CALL SdGenericDrawPage::createAnnotation void SdDrawPage::getBackground( Any& rValue ) throw() { - SdrObject* pObj = GetPage()->GetBackgroundObj(); - if( NULL == pObj ) + const SfxItemSet& rFillAttributes = GetPage()->getSdrPageProperties().GetItemSet(); + + if(XFILL_NONE == ((const XFillStyleItem&)rFillAttributes.Get(XATTR_FILLSTYLE)).GetValue()) { + // no fill set (switched off by XFILL_NONE), clear rValue to represent this rValue.clear(); } else { - Reference< beans::XPropertySet > xSet( new SdUnoPageBackground( GetModel()->GetDoc(), pObj ) ); + // there is a fill set, export to rValue + Reference< beans::XPropertySet > xSet(new SdUnoPageBackground( + GetModel()->GetDoc(), + &GetPage()->getSdrPageProperties().GetItemSet())); rValue <<= xSet; } } @@ -2678,7 +2653,6 @@ Any SdGenericDrawPage::getNavigationOrder() SdMasterPage::SdMasterPage( SdXImpressDocument* pModel, SdPage* pPage ) throw() : SdGenericDrawPage( pModel, pPage, ImplGetMasterPagePropertySet( pPage ? pPage->GetPageKind() : PK_STANDARD ) ) { - mbHasBackgroundObject = pPage && GetPage()->GetPageKind() == PK_STANDARD; } SdMasterPage::~SdMasterPage() throw() @@ -2823,7 +2797,7 @@ sal_Bool SAL_CALL SdMasterPage::hasElements() throw(uno::RuntimeException) if( SvxFmDrawPage::mpPage == NULL ) return sal_False; - return (SvxFmDrawPage::mpPage->GetObjCount() > 1) || (!mbHasBackgroundObject && SvxFmDrawPage::mpPage->GetObjCount() == 1 ); + return SvxFmDrawPage::mpPage->GetObjCount() > 0; } uno::Type SAL_CALL SdMasterPage::getElementType() @@ -2840,13 +2814,7 @@ sal_Int32 SAL_CALL SdMasterPage::getCount() throwIfDisposed(); - sal_Int32 nCount = SdGenericDrawPage::getCount(); - DBG_ASSERT( !mbHasBackgroundObject || (nCount > 0), "possible wrong shape count!" ); - - if( mbHasBackgroundObject && ( nCount > 0 ) ) - nCount--; - - return nCount; + return SdGenericDrawPage::getCount(); } Any SAL_CALL SdMasterPage::getByIndex( sal_Int32 Index ) @@ -2856,9 +2824,6 @@ Any SAL_CALL SdMasterPage::getByIndex( sal_Int32 Index ) throwIfDisposed(); - if( mbHasBackgroundObject ) - Index++; - return SdGenericDrawPage::getByIndex(Index); } @@ -2958,16 +2923,9 @@ void SdMasterPage::setBackground( const Any& rValue ) } } - - // if no background style is available, try the background object - SdrObject* pObj = GetPage()->GetPresObj(PRESOBJ_BACKGROUND); - if( pObj == NULL ) - return; - - pObj->SetMergedItemSet(aSet); - - // repaint only - SvxFmDrawPage::mpPage->ActionChanged(); + // if no background style is available, set at page directly. This + // is an error and should NOT happen (and will be asserted from the SdrPage) + GetPage()->getSdrPageProperties().PutItemSet(aSet); } } catch( Exception& ) @@ -3010,23 +2968,19 @@ void SdMasterPage::getBackground( Any& rValue ) throw() } } - // no stylesheet? try old fashion background rectangle - SdrObject* pObj = NULL; - if( SvxFmDrawPage::mpPage->GetObjCount() >= 1 ) + // No style found, use fill attributes from page background. This + // should NOT happen and is an error + const SfxItemSet& rFallbackItemSet(SvxFmDrawPage::mpPage->getSdrPageProperties().GetItemSet()); + + if(XFILL_NONE == ((const XFillStyleItem&)rFallbackItemSet.Get(XATTR_FILLSTYLE)).GetValue()) { - pObj = SvxFmDrawPage::mpPage->GetObj(0); - if( pObj->GetObjInventor() != SdrInventor || pObj->GetObjIdentifier() != OBJ_RECT ) - pObj = NULL; + rValue <<= Reference< beans::XPropertySet >( + new SdUnoPageBackground(GetModel()->GetDoc(), &rFallbackItemSet)); } - - if( pObj ) + else { - rValue <<= Reference< beans::XPropertySet >( new SdUnoPageBackground( GetModel()->GetDoc(), pObj ) ); - return; + rValue.clear(); } - - - rValue.clear(); } } catch( Exception& ) diff --git a/sd/source/ui/unoidl/unopage.hxx b/sd/source/ui/unoidl/unopage.hxx index a9452793f777..52e5cc061f7d 100644 --- a/sd/source/ui/unoidl/unopage.hxx +++ b/sd/source/ui/unoidl/unopage.hxx @@ -94,7 +94,6 @@ protected: void SetWidth( sal_Int32 nWidth ); void SetHeight( sal_Int32 nHeight ); - sal_Bool mbHasBackgroundObject; bool mbIsImpressDocument; virtual void disposing() throw(); diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index 341cd0c53d40..1ac62fb1363f 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -65,21 +65,12 @@ const SvxItemPropertySet* ImplGetPageBackgroundPropertySet() UNO3_GETIMPLEMENTATION_IMPL( SdUnoPageBackground ); -SdUnoPageBackground::SdUnoPageBackground( SdDrawDocument* pDoc /* = NULL */, SdrObject* pObj /* = NULL */ ) throw() -: mpPropSet( ImplGetPageBackgroundPropertySet() ), mpSet( NULL ), mpDoc( pDoc ) -{ - if( pDoc ) - { - StartListening( *pDoc ); - mpSet = new SfxItemSet( pDoc->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST ); - - if( pObj ) - mpSet->Put(pObj->GetMergedItemSet()); - } -} - -SdUnoPageBackground::SdUnoPageBackground( SdDrawDocument* pDoc, const SfxItemSet* pSet ) throw() -: mpPropSet( ImplGetPageBackgroundPropertySet() ), mpSet( NULL ), mpDoc( pDoc ) +SdUnoPageBackground::SdUnoPageBackground( + SdDrawDocument* pDoc /* = NULL */, + const SfxItemSet* pSet /* = NULL */) throw() +: mpPropSet(ImplGetPageBackgroundPropertySet()), + mpSet(NULL), + mpDoc(pDoc) { if( pDoc ) { diff --git a/sd/source/ui/unoidl/unopback.hxx b/sd/source/ui/unoidl/unopback.hxx index dfe876cc95b8..530a75856662 100644 --- a/sd/source/ui/unoidl/unopback.hxx +++ b/sd/source/ui/unoidl/unopback.hxx @@ -40,8 +40,6 @@ #include <cppuhelper/implbase4.hxx> const SvxItemPropertySet* ImplGetPageBackgroundPropertySet(); - -class SdrObject; class SdDrawDocument; class SfxItemSet; @@ -59,8 +57,7 @@ protected: const SfxItemPropertySimpleEntry* getPropertyMapEntry( const ::rtl::OUString& rPropertyName ) const throw(); public: - SdUnoPageBackground( SdDrawDocument* pDoc = NULL, SdrObject* pObj = NULL ) throw(); - SdUnoPageBackground( SdDrawDocument* pDoc, const SfxItemSet* pSet ) throw(); + SdUnoPageBackground( SdDrawDocument* pDoc = NULL, const SfxItemSet* pSet = NULL) throw(); ~SdUnoPageBackground() throw(); // internal diff --git a/sd/source/ui/view/PresentationViewShellBase.cxx b/sd/source/ui/view/PresentationViewShellBase.cxx index 273f7a3fd613..a16b12d3cb63 100644 --- a/sd/source/ui/view/PresentationViewShellBase.cxx +++ b/sd/source/ui/view/PresentationViewShellBase.cxx @@ -89,10 +89,10 @@ PresentationViewShellBase::PresentationViewShellBase ( GetUpdateLockManager()->Disable(); // Hide the automatic (non-context sensitive) tool bars. - if (_pFrame!=NULL && _pFrame->GetFrame()!=NULL) + if (_pFrame!=NULL) { Reference<beans::XPropertySet> xFrameSet ( - _pFrame->GetFrame()->GetFrameInterface(), + _pFrame->GetFrame().GetFrameInterface(), UNO_QUERY); if (xFrameSet.is()) { diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx index e2a75849c524..4919a9fe2bbb 100644 --- a/sd/source/ui/view/ToolBarManager.cxx +++ b/sd/source/ui/view/ToolBarManager.cxx @@ -718,8 +718,8 @@ void ToolBarManager::Implementation::SetValid (bool bValid) if (mbIsValid) { Reference<frame::XFrame> xFrame; - if (mrBase.GetViewFrame() != NULL && mrBase.GetViewFrame()->GetFrame()) - xFrame = mrBase.GetViewFrame()->GetFrame()->GetFrameInterface(); + if (mrBase.GetViewFrame() != NULL) + xFrame = mrBase.GetViewFrame()->GetFrame().GetFrameInterface(); try { Reference<beans::XPropertySet> xFrameProperties (xFrame, UNO_QUERY_THROW); diff --git a/sd/source/ui/view/UpdateLockManager.cxx b/sd/source/ui/view/UpdateLockManager.cxx index 2c992e826f0f..f373042f627b 100644 --- a/sd/source/ui/view/UpdateLockManager.cxx +++ b/sd/source/ui/view/UpdateLockManager.cxx @@ -396,11 +396,10 @@ Reference< ::com::sun::star::frame::XLayoutManager> if (mxLayoutManager.get() == NULL) { - if (mrBase.GetViewFrame()!=NULL - && mrBase.GetViewFrame()->GetFrame()!=NULL) + if (mrBase.GetViewFrame()!=NULL) { Reference<beans::XPropertySet> xFrameProperties ( - mrBase.GetViewFrame()->GetFrame()->GetFrameInterface(), + mrBase.GetViewFrame()->GetFrame().GetFrameInterface(), UNO_QUERY); if (xFrameProperties.is()) { diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 4a60d92e6bcb..6640d2455c20 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -280,11 +280,7 @@ ViewShellBase::ViewShellBase ( SfxViewFrame* _pFrame, SfxViewShell*) : SfxViewShell (_pFrame, - SFX_VIEW_MAXIMIZE_FIRST - | SFX_VIEW_OPTIMIZE_EACH - | SFX_VIEW_DISABLE_ACCELS - | SFX_VIEW_OBJECTSIZE_EMBEDDED - | SFX_VIEW_CAN_PRINT + SFX_VIEW_CAN_PRINT | SFX_VIEW_HAS_PRINTOPTIONS), maMutex(), mpImpl(), @@ -1054,7 +1050,7 @@ void ViewShellBase::UpdateBorder ( bool bForce /* = false */ ) // calls for the views in side panes but prevents calling an already // dying SfxViewShell base class. // For issue #140703# we have to check the existence of the window, - // too. The SfxTopViewFrame accesses the window without checking it. + // too. The SfxViewFrame accesses the window without checking it. ViewShell* pMainViewShell = GetMainViewShell().get(); if (pMainViewShell != NULL && GetWindow()!=NULL) { @@ -1270,7 +1266,7 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const Reference< XMultiServiceFactory > xServiceManager( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); Reference< XModuleManager > xModuleManager( xServiceManager->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager") ) ), UNO_QUERY_THROW ); - Reference< XInterface > xIfac( GetMainViewShell()->GetViewFrame()->GetFrame()->GetFrameInterface(), UNO_QUERY_THROW ); + Reference< XInterface > xIfac( GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(), UNO_QUERY_THROW ); ::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) ); diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 304b9bf3de4b..81e69f36300c 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -303,8 +303,7 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet, String aTemplateName(aLayoutName); if (ePresObjKind == PRESOBJ_TITLE || - ePresObjKind == PRESOBJ_NOTES || - ePresObjKind == PRESOBJ_BACKGROUND) + ePresObjKind == PRESOBJ_NOTES) { // Presentation object (except outline) SfxStyleSheet* pSheet = rPage.GetStyleSheetForPresObj( ePresObjKind ); @@ -577,17 +576,6 @@ void DrawView::HideSdrPage() ::sd::View::HideSdrPage(); } -SdrObject* DrawView::GetMaxToBtmObj(SdrObject* pObj) const -{ - if( pObj ) - { - SdPage* pPage = (SdPage*)pObj->GetPage(); - if( pPage && pPage->IsMasterPage() ) - return pPage->GetPresObj( PRESOBJ_BACKGROUND ) ; - } - return NULL; -} - void DrawView::DeleteMarked() { sd::UndoManager* pUndoManager = mpDoc->GetUndoManager(); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index e7ea82bb345a..852e56096a76 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -98,9 +98,12 @@ #include <com/sun/star/drawing/framework/XControllerManager.hpp> #include <com/sun/star/drawing/framework/XConfigurationController.hpp> #include <com/sun/star/drawing/framework/XConfiguration.hpp> +#include <com/sun/star/frame/XFrame.hpp> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::drawing::framework; +using ::com::sun::star::frame::XFrame; +using ::com::sun::star::frame::XController; namespace sd { @@ -375,17 +378,15 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) try { + Reference< XFrame > xFrame( pFrame->GetFrame().GetFrameInterface(), UNO_SET_THROW ); + // Save the current configuration of panes and views. Reference<XControllerManager> xControllerManager ( GetViewShellBase().GetController(), UNO_QUERY_THROW); Reference<XConfigurationController> xConfigurationController ( - xControllerManager->getConfigurationController()); - if ( ! xConfigurationController.is()) - throw RuntimeException(); + xControllerManager->getConfigurationController(), UNO_QUERY_THROW ); Reference<XConfiguration> xConfiguration ( - xConfigurationController->getRequestedConfiguration()); - if ( ! xConfiguration.is()) - throw RuntimeException(); + xConfigurationController->getRequestedConfiguration(), UNO_SET_THROW ); SfxChildWindow* pWindow = pFrame->GetChildWindow(nId); if(pWindow) @@ -398,14 +399,12 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) // Normale Weiterleitung an ViewFrame zur Ausfuehrung GetViewFrame()->ExecuteSlot(rReq); - // From here on we must cope with this object already being + // From here on we must cope with this object and the frame already being // deleted. Do not call any methods or use data members. - ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pFrame); - OSL_ASSERT(pBase!=NULL); + Reference<XController> xController( xFrame->getController(), UNO_SET_THROW ); // Restore the configuration. - xControllerManager = Reference<XControllerManager>( - pBase->GetController(), UNO_QUERY_THROW); + xControllerManager = Reference<XControllerManager>( xController, UNO_QUERY_THROW); xConfigurationController = Reference<XConfigurationController>( xControllerManager->getConfigurationController()); if ( ! xConfigurationController.is()) diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index f3f4d3ded05e..18ff686fc612 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -153,7 +153,7 @@ void DrawViewShell::ArrangeGUIElements (void) if ( pIPClient && pIPClient->IsObjectInPlaceActive() ) bClientActive = TRUE; - BOOL bInPlaceActive = GetViewFrame()->GetFrame()->IsInPlace(); + BOOL bInPlaceActive = GetViewFrame()->GetFrame().IsInPlace(); if ( mbZoomOnPage && !bInPlaceActive && !bClientActive ) { diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index f718bc46ba93..e0cb78095bd0 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1592,9 +1592,9 @@ void DrawViewShell::GetModeSwitchingMenuState (SfxItemSet &rSet) // view mode is allowed. const bool bIsRunning = SlideShow::IsRunning(GetViewShellBase()); - if (GetViewFrame()->GetFrame()->IsInPlace() || bIsRunning) + if (GetViewFrame()->GetFrame().IsInPlace() || bIsRunning) { - if ( !GetViewFrame()->GetFrame()->IsInPlace() ) + if ( !GetViewFrame()->GetFrame().IsInPlace() ) { rSet.ClearItem( SID_DRAWINGMODE ); rSet.DisableItem( SID_DRAWINGMODE ); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index fa17b73d1b6c..6f6f49fdc93c 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -67,7 +67,6 @@ #include <toolkit/helper/vclunohelper.hxx> #include <avmedia/mediawindow.hxx> #include <svl/urihelper.hxx> -#include <sfx2/topfrm.hxx> #include <sfx2/docfile.hxx> #include "DrawViewShell.hxx" diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 9f4e8da5a2ab..ac6b46f3018b 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -59,7 +59,6 @@ #include <svx/svdouno.hxx> #include <tools/urlobj.hxx> #include <svx/fmshell.hxx> -#include <sfx2/topfrm.hxx> #include <svl/cjkoptions.hxx> #ifndef SD_FRAME_VIEW diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index e358ebf4d562..aca0130624ce 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -33,7 +33,6 @@ #ifndef _SVXIDS_HRC #include <svx/svxids.hrc> #endif -#include <sfx2/topfrm.hxx> #include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/drawing/framework/ResourceId.hpp> #include <rtl/ustrbuf.hxx> @@ -54,6 +53,7 @@ #include "sdiocmpt.hxx" #include "framework/FrameworkHelper.hxx" #include <comphelper/processfactory.hxx> +#include <sfx2/viewfrm.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -100,8 +100,7 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK * ULONG nSdViewShellCount = 0; ViewShellBase* pBase = NULL; SfxViewShell* pSfxViewSh = NULL; - SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(pDocShell, - TYPE(SfxTopViewFrame)); + SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(pDocShell); while (pSfxViewFrame) { @@ -142,8 +141,7 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK * } } - pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, pDocShell, - TYPE(SfxTopViewFrame)); + pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, pDocShell); } SdDrawDocument* pDoc = pDocShell->GetDoc(); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 90fd7b1e6bbe..bbdcf35a4e34 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -58,7 +58,6 @@ #include <sfx2/tplpitem.hxx> #include <svx/svdorect.hxx> #include <sot/formats.hxx> -#include <sfx2/topfrm.hxx> #include <com/sun/star/linguistic2/XThesaurus.hpp> #include <com/sun/star/i18n/TransliterationModules.hpp> #include <com/sun/star/i18n/TransliterationModulesExtra.hpp> diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 15b2f0f15d0f..30daec8b636e 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -209,7 +209,7 @@ OutlineView::OutlineView( DrawDocShell* pDocSh, ::Window* pWindow, OutlineViewSh maBulletFont.SetShadow(FALSE); - Reference<XFrame> xFrame (mpOutlineViewShell->GetViewShellBase().GetFrame()->GetTopFrame()->GetFrameInterface(), UNO_QUERY); + Reference<XFrame> xFrame (mpOutlineViewShell->GetViewShellBase().GetFrame()->GetTopFrame().GetFrameInterface(), UNO_QUERY); const OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( ".uno:ShowSlide" )); maSlideImage = GetImage( xFrame, aSlotURL, true, false /* todo, hc mode */ ); diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx index fde6287e3038..11f20c7a83d4 100644 --- a/sd/source/ui/view/presvish.cxx +++ b/sd/source/ui/view/presvish.cxx @@ -38,7 +38,6 @@ #include "optsitem.hxx" #include "sddll.hxx" #include <sfx2/request.hxx> -#include <sfx2/topfrm.hxx> #ifndef _SFX_DISPATCH_HXX #include <sfx2/dispatch.hxx> #endif diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 94bf70287ccd..813c6caba95a 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -261,11 +261,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP if( !bSubContentProcessing || !pObject->IsNotVisibleAsMaster() ) { eKind = pObjectsSdPage ? pObjectsSdPage->GetPresObjKind(pObject) : PRESOBJ_NONE; - - if( eKind != PRESOBJ_BACKGROUND ) - { - bCreateOutline = true; - } + bCreateOutline = true; } } else if( ( pObject->GetObjInventor() == SdrInventor ) && ( pObject->GetObjIdentifier() == OBJ_TEXT ) ) @@ -311,7 +307,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP // create dashed border { // create object polygon - basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0))); + basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon()); aPolygon.transform(aObjectMatrix); // create line and stroke attribute diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx index 8f563a57546f..358029e08590 100644 --- a/slideshow/source/engine/animationfactory.cxx +++ b/slideshow/source/engine/animationfactory.cxx @@ -151,7 +151,7 @@ namespace slideshow virtual bool operator()( const ::basegfx::B2DTuple& rValue ) { - ENSURE_OR_RETURN( mpAttrLayer && mpShape, + ENSURE_OR_RETURN_FALSE( mpAttrLayer && mpShape, "TupleAnimation::operator(): Invalid ShapeAttributeLayer" ); ValueT aValue( rValue.getX(), @@ -314,7 +314,7 @@ namespace slideshow virtual bool operator()( double nValue ) { - ENSURE_OR_RETURN( mpAttrLayer && mpShape, + ENSURE_OR_RETURN_FALSE( mpAttrLayer && mpShape, "PathAnimation::operator(): Invalid ShapeAttributeLayer" ); ::basegfx::B2DPoint rOutPos = ::basegfx::tools::getPositionRelative( maPathPoly, @@ -534,7 +534,7 @@ namespace slideshow */ bool operator()( const ValueT& x ) { - ENSURE_OR_RETURN( mpAttrLayer && mpShape, + ENSURE_OR_RETURN_FALSE( mpAttrLayer && mpShape, "GenericAnimation::operator(): Invalid ShapeAttributeLayer" ); ((*mpAttrLayer).*mpSetValueFunc)( maSetterModifier( x ) ); @@ -549,7 +549,7 @@ namespace slideshow */ bool operator()( ValueT x ) { - ENSURE_OR_RETURN( mpAttrLayer && mpShape, + ENSURE_OR_RETURN_FALSE( mpAttrLayer && mpShape, "GenericAnimation::operator(): Invalid ShapeAttributeLayer" ); ((*mpAttrLayer).*mpSetValueFunc)( maSetterModifier( x ) ); diff --git a/slideshow/source/engine/animationnodes/animationnodefactory.cxx b/slideshow/source/engine/animationnodes/animationnodefactory.cxx index d8d02653e8e8..868a0b8d81ac 100644 --- a/slideshow/source/engine/animationnodes/animationnodefactory.cxx +++ b/slideshow/source/engine/animationnodes/animationnodefactory.cxx @@ -198,7 +198,7 @@ bool implCreateIteratedNodes( // ================================== // TODO(E1): I'm not too sure what to expect here... - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( xIterNode->getTarget().hasValue(), "implCreateIteratedNodes(): no target on ITERATE node" ); @@ -213,14 +213,14 @@ bool implCreateIteratedNodes( { // no shape provided. Maybe a ParagraphTarget? if( !(xIterNode->getTarget() >>= aTarget) ) - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( false, "implCreateIteratedNodes(): could not extract any " "target information" ); xTargetShape = aTarget.Shape; - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( xTargetShape.is(), "implCreateIteratedNodes(): invalid shape in ParagraphTarget" ); @@ -251,7 +251,7 @@ bool implCreateIteratedNodes( // paragraph) if( bParagraphTarget ) { - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( aTarget.Paragraph >= 0 && rTreeNodeSupplier.getNumberOfTreeNodes( DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH ) > aTarget.Paragraph, @@ -322,7 +322,7 @@ bool implCreateIteratedNodes( if( !::anim::for_each_childNode( xNode, aCreator ) ) { - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( false, "implCreateIteratedNodes(): iterated child node creation failed" ); } @@ -445,7 +445,7 @@ bool implCreateIteratedNodes( if( !::anim::for_each_childNode( xNode, aCreator ) ) { - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( false, "implCreateIteratedNodes(): " "iterated child node creation failed" ); } diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx index c6e2f697a5b9..b0cfa99c34f5 100644 --- a/slideshow/source/engine/animationnodes/basenode.cxx +++ b/slideshow/source/engine/animationnodes/basenode.cxx @@ -671,7 +671,7 @@ bool BaseNode::registerDeactivatingListener( if (! checkValidNode()) return false; - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( rNotifee, "BaseNode::registerDeactivatingListener(): invalid notifee" ); maDeactivatingListeners.push_back( rNotifee ); diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx index 899b05dc52ae..ea910d60e575 100644 --- a/slideshow/source/engine/eventmultiplexer.cxx +++ b/slideshow/source/engine/eventmultiplexer.cxx @@ -612,7 +612,7 @@ bool EventMultiplexerImpl::notifyMouseHandlers( uno::Reference<presentation::XSlideShowView> xView( e.Source, uno::UNO_QUERY ); - ENSURE_OR_RETURN( xView.is(), "EventMultiplexer::notifyHandlers(): " + ENSURE_OR_RETURN_FALSE( xView.is(), "EventMultiplexer::notifyHandlers(): " "event source is not an XSlideShowView" ); // find corresponding view (to map mouse position into user @@ -627,7 +627,7 @@ bool EventMultiplexerImpl::notifyMouseHandlers( boost::cref( xView ), boost::bind( &UnoView::getUnoView, _1 ) ) ) ) == aEnd) { - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( false, "EventMultiplexer::notifyHandlers(): " "event source not found under registered views" ); } diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx index 3b5cd31f1307..f7af3156ff0b 100644 --- a/slideshow/source/engine/eventqueue.cxx +++ b/slideshow/source/engine/eventqueue.cxx @@ -109,7 +109,7 @@ namespace slideshow rEvent.get(), rEvent->getActivationTime(0.0)); #endif - ENSURE_OR_RETURN( rEvent, + ENSURE_OR_RETURN_FALSE( rEvent, "EventQueue::addEvent: event ptr NULL" ); // prepare entry @@ -138,7 +138,7 @@ namespace slideshow rEvent->getActivationTime(0.0)); #endif - ENSURE_OR_RETURN( rEvent.get() != NULL, + ENSURE_OR_RETURN_FALSE( rEvent.get() != NULL, "EventQueue::addEvent: event ptr NULL" ); maNextEvents.push_back( EventEntry( rEvent, rEvent->getActivationTime( @@ -158,7 +158,7 @@ namespace slideshow rpEvent->getActivationTime(0.0)); #endif - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( rpEvent.get() != NULL, "EventQueue::addEvent: event ptr NULL"); diff --git a/slideshow/source/engine/shapeattributelayer.cxx b/slideshow/source/engine/shapeattributelayer.cxx index 4f6de9a0fd58..ca3b9f8997aa 100644 --- a/slideshow/source/engine/shapeattributelayer.cxx +++ b/slideshow/source/engine/shapeattributelayer.cxx @@ -211,7 +211,7 @@ namespace slideshow bool ShapeAttributeLayer::revokeChildLayer( const ShapeAttributeLayerSharedPtr& rChildLayer ) { - ENSURE_OR_RETURN( rChildLayer, + ENSURE_OR_RETURN_FALSE( rChildLayer, "ShapeAttributeLayer::revokeChildLayer(): Will not remove NULL child" ); if( !haveChild() ) diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx index 1e99658c5743..6c1cab84e0eb 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx @@ -700,7 +700,7 @@ bool ActivityImpl::perform() if( !isActive() ) return false; - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( mpDrawShape, "ActivityImpl::perform(): still active, but NULL draw shape" ); diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx index e192d731fa36..dc8fe959a0e8 100644 --- a/slideshow/source/engine/shapes/drawshape.cxx +++ b/slideshow/source/engine/shapes/drawshape.cxx @@ -327,7 +327,7 @@ namespace slideshow mbForceUpdate = false; mbAttributeLayerRevoked = false; - ENSURE_OR_RETURN( !maViewShapes.empty(), + ENSURE_OR_RETURN_FALSE( !maViewShapes.empty(), "DrawShape::implRender(): render called on DrawShape without views" ); if( maBounds.isEmpty() ) @@ -1059,7 +1059,7 @@ namespace slideshow bool DrawShape::setIntrinsicAnimationFrame( ::std::size_t nCurrFrame ) { - ENSURE_OR_RETURN( nCurrFrame < maAnimationFrames.size(), + ENSURE_OR_RETURN_FALSE( nCurrFrame < maAnimationFrames.size(), "DrawShape::setIntrinsicAnimationFrame(): frame index out of bounds" ); if( mnCurrFrame != nCurrFrame ) diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 0702ee52913c..ea58ec2af9d7 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -186,7 +186,7 @@ bool getMetaFile( const uno::Reference< lang::XComponent >& xSource, int mtfLoadFlags, const uno::Reference< uno::XComponentContext >& rxContext ) { - ENSURE_OR_RETURN( rxContext.is(), + ENSURE_OR_RETURN_FALSE( rxContext.is(), "getMetaFile(): Invalid context" ); // create dummy XGraphicRenderer, which receives the @@ -386,7 +386,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, break; default: - ENSURE_OR_RETURN(false, + ENSURE_OR_RETURN_FALSE(false, "getAnimationFromGraphic(): Unexpected case" ); break; } diff --git a/slideshow/source/engine/shapes/viewappletshape.cxx b/slideshow/source/engine/shapes/viewappletshape.cxx index c6c8f4381db3..fe15638edef9 100644 --- a/slideshow/source/engine/shapes/viewappletshape.cxx +++ b/slideshow/source/engine/shapes/viewappletshape.cxx @@ -138,7 +138,7 @@ namespace slideshow bool ViewAppletShape::startApplet( const ::basegfx::B2DRectangle& rBounds ) { - ENSURE_OR_RETURN( mpViewLayer && mpViewLayer->getCanvas() && mpViewLayer->getCanvas()->getUNOCanvas().is(), + ENSURE_OR_RETURN_FALSE( mpViewLayer && mpViewLayer->getCanvas() && mpViewLayer->getCanvas()->getUNOCanvas().is(), "ViewAppletShape::startApplet(): Invalid or disposed view" ); try { diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx index a35e850339b5..bbaef1f486e0 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx @@ -68,7 +68,7 @@ namespace slideshow const GDIMetaFileSharedPtr& rMtf ) const { RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewBackgroundShape::prefetch()" ); - ENSURE_OR_RETURN( rMtf, + ENSURE_OR_RETURN_FALSE( rMtf, "ViewBackgroundShape::prefetch(): no valid metafile!" ); const ::basegfx::B2DHomMatrix& rCanvasTransform( @@ -128,7 +128,7 @@ namespace slideshow *rMtf.get(), ::cppcanvas::Renderer::Parameters() ) ); - ENSURE_OR_RETURN( pRenderer, + ENSURE_OR_RETURN_FALSE( pRenderer, "ViewBackgroundShape::prefetch(): Could not create Renderer" ); pRenderer->setTransformation( aShapeTransform ); @@ -169,7 +169,7 @@ namespace slideshow if( !prefetch( rDestinationCanvas, rMtf ) ) return false; - ENSURE_OR_RETURN( mxBitmap.is(), + ENSURE_OR_RETURN_FALSE( mxBitmap.is(), "ViewBackgroundShape::draw(): Invalid background bitmap" ); ::basegfx::B2DHomMatrix aTransform( mpViewLayer->getTransformation() ); diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index c96b7ba41d72..1c0b6f9b71a1 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -272,7 +272,7 @@ namespace slideshow { if( !mxPlayer.is() && mxShape.is() ) { - ENSURE_OR_RETURN( mpViewLayer->getCanvas(), + ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(), "ViewMediaShape::update(): Invalid layer canvas" ); uno::Reference< rendering::XCanvas > xCanvas( mpViewLayer->getCanvas()->getUNOCanvas() ); diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index 79b96feb2b36..76bce5ebe3e7 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -78,7 +78,7 @@ namespace slideshow const ShapeAttributeLayerSharedPtr& rAttr ) const { RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewShape::prefetch()" ); - ENSURE_OR_RETURN( rMtf, + ENSURE_OR_RETURN_FALSE( rMtf, "ViewShape::prefetch(): no valid metafile!" ); if( rMtf != io_rCacheEntry.mpMtf || @@ -204,7 +204,7 @@ namespace slideshow ::cppcanvas::RendererSharedPtr pRenderer( getRenderer( rDestinationCanvas, rMtf, rAttr ) ); - ENSURE_OR_RETURN( pRenderer, "ViewShape::draw(): Invalid renderer" ); + ENSURE_OR_RETURN_FALSE( pRenderer, "ViewShape::draw(): Invalid renderer" ); pRenderer->setTransformation( rTransform ); #if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0 @@ -396,7 +396,7 @@ namespace slideshow mpSprite->resize( rSpriteSizePixel ); } - ENSURE_OR_RETURN( mpSprite, "ViewShape::renderSprite(): No sprite" ); + ENSURE_OR_RETURN_FALSE( mpSprite, "ViewShape::renderSprite(): No sprite" ); VERBOSE_TRACE( "ViewShape::renderSprite(): Rendering sprite 0x%X", mpSprite.get() ); @@ -870,7 +870,7 @@ namespace slideshow bool bIsVisible ) const { RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewShape::update()" ); - ENSURE_OR_RETURN( mpViewLayer->getCanvas(), "ViewShape::update(): Invalid layer canvas" ); + ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(), "ViewShape::update(): Invalid layer canvas" ); // Shall we render to a sprite, or to a plain canvas? if( isBackgroundDetached() ) diff --git a/slideshow/source/engine/slide/shapemanagerimpl.cxx b/slideshow/source/engine/slide/shapemanagerimpl.cxx index 93d8fc6719af..5144e88fbd60 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.cxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.cxx @@ -339,7 +339,7 @@ bool ShapeManagerImpl::listenerAdded( if( (aIter = mrGlobalListenersMap.find( xShape )) == mrGlobalListenersMap.end() ) { - ENSURE_OR_RETURN(false, + ENSURE_OR_RETURN_FALSE(false, "ShapeManagerImpl::listenerAdded(): global " "shape listener map inconsistency!"); } diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index 0343c357a51a..55831ba1609f 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -822,9 +822,9 @@ bool SlideImpl::implPrefetchShow() if( mbShowLoaded ) return true; - ENSURE_OR_RETURN( mxDrawPage.is(), + ENSURE_OR_RETURN_FALSE( mxDrawPage.is(), "SlideImpl::implPrefetchShow(): Invalid draw page" ); - ENSURE_OR_RETURN( mpLayerManager, + ENSURE_OR_RETURN_FALSE( mpLayerManager, "SlideImpl::implPrefetchShow(): Invalid layer manager" ); // fetch desired page content @@ -968,7 +968,7 @@ bool SlideImpl::applyInitialShapeAttributes( try { - ENSURE_OR_RETURN( maContext.mxComponentContext.is(), + ENSURE_OR_RETURN_FALSE( maContext.mxComponentContext.is(), "SlideImpl::applyInitialShapeAttributes(): Invalid component context" ); uno::Reference<lang::XMultiComponentFactory> xFac( @@ -996,7 +996,7 @@ bool SlideImpl::applyInitialShapeAttributes( // could not determine initial shape attributes - this // is an error, as some effects might then be plainly // invisible - ENSURE_OR_RETURN( false, + ENSURE_OR_RETURN_FALSE( false, "SlideImpl::applyInitialShapeAttributes(): " "couldn't create TargetPropertiesCreator." ); } @@ -1101,9 +1101,9 @@ bool SlideImpl::loadShapes() if( mbShapesLoaded ) return true; - ENSURE_OR_RETURN( mxDrawPage.is(), + ENSURE_OR_RETURN_FALSE( mxDrawPage.is(), "SlideImpl::loadShapes(): Invalid draw page" ); - ENSURE_OR_RETURN( mpLayerManager, + ENSURE_OR_RETURN_FALSE( mpLayerManager, "SlideImpl::loadShapes(): Invalid layer manager" ); // fetch desired page content diff --git a/slideshow/source/engine/slidebitmap.cxx b/slideshow/source/engine/slidebitmap.cxx index 68921576fcf4..01df83697fc6 100644 --- a/slideshow/source/engine/slidebitmap.cxx +++ b/slideshow/source/engine/slidebitmap.cxx @@ -65,7 +65,7 @@ namespace slideshow bool SlideBitmap::draw( const ::cppcanvas::CanvasSharedPtr& rCanvas ) const { - ENSURE_OR_RETURN( rCanvas && rCanvas->getUNOCanvas().is(), + ENSURE_OR_RETURN_FALSE( rCanvas && rCanvas->getUNOCanvas().is(), "SlideBitmap::draw(): Invalid canvas" ); // selectively only copy the transformation from current viewstate, diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index ca9ab91d0e41..d2af8c0daaed 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1402,8 +1402,8 @@ sal_Bool SlideShowImpl::addView( DBG_TESTSOLARMUTEX(); // first of all, check if view has a valid canvas - ENSURE_OR_RETURN( xView.is(), "addView(): Invalid view" ); - ENSURE_OR_RETURN( xView->getCanvas().is(), + ENSURE_OR_RETURN_FALSE( xView.is(), "addView(): Invalid view" ); + ENSURE_OR_RETURN_FALSE( xView->getCanvas().is(), "addView(): View does not provide a valid canvas" ); UnoViewSharedPtr const pView( createSlideView( @@ -1446,7 +1446,7 @@ sal_Bool SlideShowImpl::removeView( // precondition: must only be called from the main thread! DBG_TESTSOLARMUTEX(); - ENSURE_OR_RETURN( xView.is(), "removeView(): Invalid view" ); + ENSURE_OR_RETURN_FALSE( xView.is(), "removeView(): Invalid view" ); UnoViewSharedPtr const pView( maViewContainer.removeView( xView ) ); if( !pView ) diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index 8110fee710b3..9573f3c29a3d 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -83,9 +83,7 @@ struct StaticUnitRectPoly : public rtl::StaticWithInit<basegfx::B2DPolygon, Stat { basegfx::B2DPolygon operator()() { - return basegfx::tools::createPolygonFromRect( - basegfx::B2DRectangle( 0.0, 0.0, - 1.0, 1.0 ) ); + return basegfx::tools::createUnitPolygon(); } }; @@ -852,7 +850,7 @@ bool SlideView::updateScreen() const { osl::MutexGuard aGuard( m_aMutex ); - ENSURE_OR_RETURN( mpCanvas.get(), + ENSURE_OR_RETURN_FALSE( mpCanvas.get(), "SlideView::updateScreen(): Disposed" ); return mpCanvas->updateScreen( false ); @@ -862,7 +860,7 @@ bool SlideView::paintScreen() const { osl::MutexGuard aGuard( m_aMutex ); - ENSURE_OR_RETURN( mpCanvas.get(), + ENSURE_OR_RETURN_FALSE( mpCanvas.get(), "SlideView::paintScreen(): Disposed" ); return mpCanvas->updateScreen( true ); diff --git a/slideshow/source/engine/transitions/shapetransitionfactory.cxx b/slideshow/source/engine/transitions/shapetransitionfactory.cxx index 7e120e7e57bb..667bd6d17c22 100644 --- a/slideshow/source/engine/transitions/shapetransitionfactory.cxx +++ b/slideshow/source/engine/transitions/shapetransitionfactory.cxx @@ -182,7 +182,7 @@ void ClippingAnimation::end_() bool ClippingAnimation::operator()( double nValue ) { - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( mpAttrLayer && mpShape, "ClippingAnimation::operator(): Invalid ShapeAttributeLayer" ); diff --git a/slideshow/source/engine/usereventqueue.cxx b/slideshow/source/engine/usereventqueue.cxx index 7ecbe62acd9b..0b043968b9c6 100644 --- a/slideshow/source/engine/usereventqueue.cxx +++ b/slideshow/source/engine/usereventqueue.cxx @@ -178,7 +178,7 @@ public: virtual bool handleAnimationEvent( const AnimationNodeSharedPtr& rNode ) { - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( rNode, "AllAnimationEventHandler::handleAnimationEvent(): Invalid node" ); |