diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2010-04-27 12:15:15 +0200 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2010-04-27 12:15:15 +0200 |
commit | 08e866f42776fb96268b77751495c3487f63a12c (patch) | |
tree | 49f9e688ec1fecffa70245f37627c4edaf0beee4 /sd/source | |
parent | f258dffe023a459eda7d7dec9fd6be778653d624 (diff) | |
parent | b316ddbb7c819779c7fca6ef7a86dfe4fd66324a (diff) |
Merge to DEV300_m77
Diffstat (limited to 'sd/source')
59 files changed, 325 insertions, 811 deletions
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/makefile.mk b/sd/source/ui/app/makefile.mk index 84fbe3676b97..d64d9b672f7e 100644 --- a/sd/source/ui/app/makefile.mk +++ b/sd/source/ui/app/makefile.mk @@ -95,11 +95,7 @@ $(INCCOM)$/sddll0.hxx: makefile.mk .IF "$(GUI)"=="UNX" echo \#define DLL_NAME \"libsd$(DLLPOSTFIX)$(DLLPOST)\" >$@ .ELSE # "$(GUI)"=="UNX" -.IF "$(USE_SHELL)"!="4nt" echo \#define DLL_NAME \"sd$(DLLPOSTFIX).DLL\" >$@ -.ELSE # "$(USE_SHELL)"!="4nt" - echo #define DLL_NAME "sd$(DLLPOSTFIX).DLL" >$@ -.ENDIF # "$(USE_SHELL)"!="4nt" .ENDIF # "$(GUI)"=="UNX" LOCALIZE_ME = tbxids_tmpl.src menuids2_tmpl.src menu_tmpl.src menuids_tmpl.src menuids4_tmpl.src popup2_tmpl.src toolbox2_tmpl.src menuportal_tmpl.src menuids3_tmpl.src 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/futext2.cxx b/sd/source/ui/func/futext2.cxx deleted file mode 100644 index 5e6bed107e93..000000000000 --- a/sd/source/ui/func/futext2.cxx +++ /dev/null @@ -1,30 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" - diff --git a/sd/source/ui/func/makefile.mk b/sd/source/ui/func/makefile.mk index 332d5d505792..9ec946325239 100644 --- a/sd/source/ui/func/makefile.mk +++ b/sd/source/ui/func/makefile.mk @@ -61,7 +61,6 @@ SLOFILES = \ $(SLO)$/fuscale.obj \ $(SLO)$/futransf.obj \ $(SLO)$/futext.obj \ - $(SLO)$/futext2.obj \ $(SLO)$/fuline.obj \ $(SLO)$/sdundo.obj \ $(SLO)$/sdundogr.obj \ @@ -133,7 +132,6 @@ LIB1OBJFILES= \ $(SLO)$/fuscale.obj \ $(SLO)$/futransf.obj \ $(SLO)$/futext.obj \ - $(SLO)$/futext2.obj \ $(SLO)$/fuline.obj \ $(SLO)$/sdundo.obj \ $(SLO)$/sdundogr.obj \ 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/ControlDescriptorIterator.cxx b/sd/source/ui/toolpanel/ControlDescriptorIterator.cxx deleted file mode 100644 index 9d873b897402..000000000000 --- a/sd/source/ui/toolpanel/ControlDescriptorIterator.cxx +++ /dev/null @@ -1,223 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" - -/* -#include "ControlDescriptorIterator.hxx" - -#include "ControlContainer.hxx" -#include "ControlContainerDescriptor.hxx" - -namespace sd { namespace toolpanel { - - -ControlDescriptorIterator::ControlDescriptorIterator (void) - : mpContainer (NULL), - mbSkipInvisibleControls(true) -{ -} - - - - -ControlDescriptorIterator::ControlDescriptorIterator ( - ControlDescriptorList& rContainer, - const ControlDescriptorList::iterator& aIterator, - bool bSkipInvisibleControls) - : mpContainer(&rContainer), - maIterator (aIterator), - mbSkipInvisibleControls(bSkipInvisibleControls) -{ - AdvanceToNextVisibleControl(); -} - - - - -ControlDescriptorIterator::ControlDescriptorIterator ( - const ControlDescriptorIterator& aIterator) - : mpContainer (aIterator.mpContainer), - maIterator (aIterator.maIterator), - mbSkipInvisibleControls (aIterator.mbSkipInvisibleControls) -{ -} - - - - -ControlDescriptorIterator& ControlDescriptorIterator::operator= ( - const ControlDescriptorIterator& aIterator) -{ - mpContainer = aIterator.mpContainer; - maIterator = aIterator.maIterator; - mbSkipInvisibleControls = aIterator.mbSkipInvisibleControls; - - AdvanceToNextVisibleControl(); - - return *this; -} - - - - -ControlDescriptorIterator::value_type& - ControlDescriptorIterator::operator* (void) -{ - return *maIterator; -} - - - - -const ControlDescriptorIterator::value_type& - ControlDescriptorIterator::operator* (void) - const -{ - return *maIterator; -} - - - - -ControlDescriptorIterator::value_type& - ControlDescriptorIterator::operator-> (void) -{ - return *maIterator; -} - - - - -const ControlDescriptorIterator::value_type& - ControlDescriptorIterator::operator-> (void) - const -{ - return *maIterator; -} - - - - -bool ControlDescriptorIterator::operator== ( - const ControlDescriptorIterator& aIterator) const -{ - return ! operator!=(aIterator); -} - - - - -bool ControlDescriptorIterator::operator!= ( - const ControlDescriptorIterator& aIterator) const -{ - return maIterator != aIterator.maIterator; -} - - - - -ControlDescriptorIterator& ControlDescriptorIterator::operator++ (void) -{ - maIterator++; - AdvanceToNextVisibleControl(); - return *this; -} - - - -ControlDescriptorIterator ControlDescriptorIterator::operator++ (int) -{ - ControlDescriptorIterator aIterator (*this); - ++(*this); - return aIterator; -} - - - - -ControlDescriptorIterator& ControlDescriptorIterator::operator-- (void) -{ - maIterator--; - AdvanceToPreviousVisibleControl(); - return *this; -} - - - -ControlDescriptorIterator ControlDescriptorIterator::operator-- (int) -{ - ControlDescriptorIterator aIterator (*this); - --(*this); - return aIterator; -} - - - - -ControlDescriptorIterator ControlDescriptorIterator::operator+ ( - int nValue) const -{ - return ControlDescriptorIterator (*mpContainer, maIterator+nValue); -} - - - -ControlDescriptorIterator ControlDescriptorIterator::operator- ( - int nValue) const -{ - return ControlDescriptorIterator (*mpContainer, maIterator-nValue); -} - - - -void ControlDescriptorIterator::AdvanceToNextVisibleControl (void) -{ - if (mbSkipInvisibleControls && mpContainer!=NULL) - { - while (maIterator != mpContainer->end() - && ! (**maIterator).IsVisible()) - ++maIterator; - } -} - - - - -void ControlDescriptorIterator::AdvanceToPreviousVisibleControl (void) -{ - if (mbSkipInvisibleControls && mpContainer!=NULL) - { - while (maIterator != mpContainer->begin() - && ! (**maIterator).IsVisible()) - --maIterator; - } -} - -} } // end of namespace ::sd::toolpanel -*/ 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/DocumentRenderer.src b/sd/source/ui/view/DocumentRenderer.src index 5a1030f1c18d..6419cb5c4e90 100644 --- a/sd/source/ui/view/DocumentRenderer.src +++ b/sd/source/ui/view/DocumentRenderer.src @@ -160,7 +160,7 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS { < "Original colors" ; > ; < "Grayscale" ; > ; - < "Black & White" ; > ; + < "Black & white" ; > ; }; }; StringArray _STR_IMPRESS_PRINT_UI_QUALITY_CHOICES_HELP @@ -184,8 +184,8 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS { < "Original size" ; > ; < "Fit to printable page" ; > ; - < "Distribute on multiple paper sheets" ; > ; - < "Tile paper sheet with repeated slides" ; > ; + < "Distribute on multiple sheets of paper" ; > ; + < "Tile sheet of paper with repeated slides" ; > ; }; }; StringArray _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW @@ -194,8 +194,8 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS { < "Original size" ; > ; < "Fit to printable page" ; > ; - < "Distribute on multiple paper sheets" ; > ; - < "Tile paper sheet with repeated pages" ; > ; + < "Distribute on multiple sheets of paper" ; > ; + < "Tile sheet of paper with repeated pages" ; > ; }; }; StringArray _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_HELP 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 d3ae49a1f068..1a667b28f6d4 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -66,7 +66,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 e5af6dcf991a..0a5f743bb738 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/makefile.mk b/sd/source/ui/view/makefile.mk index 074497ca1de7..3b3bca4ff3d5 100644 --- a/sd/source/ui/view/makefile.mk +++ b/sd/source/ui/view/makefile.mk @@ -53,7 +53,6 @@ SLOFILES = \ $(SLO)$/sdview2.obj \ $(SLO)$/sdview3.obj \ $(SLO)$/sdview4.obj \ - $(SLO)$/sdview5.obj \ $(SLO)$/viewshel.obj \ $(SLO)$/viewshe2.obj \ $(SLO)$/viewshe3.obj \ diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 65e92b26c420..1467e6c24bd0 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.hdl> #include <editeng/unolingu.hxx> 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/sd/source/ui/view/sdview5.cxx b/sd/source/ui/view/sdview5.cxx deleted file mode 100644 index 51c6725f6d83..000000000000 --- a/sd/source/ui/view/sdview5.cxx +++ /dev/null @@ -1,29 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" |