diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2008-11-20 14:55:36 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2008-11-20 14:55:36 +0000 |
commit | f7a9b6b5c3794f6a21684cb6e9ebccf5faee2e30 (patch) | |
tree | 012a964d62ff1f78cc219c7f2f4404ea5301d8a8 | |
parent | a2121084269dc4a2745e926d416d2ec54a4bdf06 (diff) |
CWS-TOOLING: integrate CWS impress163_DEV300
-rw-r--r-- | sd/inc/drawdoc.hxx | 4 | ||||
-rw-r--r-- | sd/inc/stlpool.hxx | 3 | ||||
-rw-r--r-- | sd/source/core/drawdoc2.cxx | 30 | ||||
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 14 | ||||
-rw-r--r-- | sd/source/core/stlpool.cxx | 35 | ||||
-rw-r--r-- | sd/source/filter/xml/sdtransform.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/framework/configuration/ConfigurationController.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/func/fuolbull.cxx | 24 | ||||
-rw-r--r-- | sd/source/ui/func/fuprlout.cxx | 30 | ||||
-rw-r--r-- | sd/source/ui/inc/fuprlout.hxx | 6 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlideSorterController.cxx | 7 | ||||
-rw-r--r-- | slideshow/source/engine/slideview.cxx | 10 |
12 files changed, 98 insertions, 78 deletions
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index c9bbe818b5a0..33dedd794879 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -266,6 +266,10 @@ public: void InsertPage(SdrPage* pPage, USHORT nPos=0xFFFF); void DeletePage(USHORT nPgNum); SdrPage* RemovePage(USHORT nPgNum); + + virtual void InsertMasterPage(SdrPage* pPage, USHORT nPos=0xFFFF); + virtual SdrPage* RemoveMasterPage(USHORT nPgNum); + void RemoveUnnessesaryMasterPages( SdPage* pMaster=NULL, BOOL bOnlyDuplicatePages=FALSE, BOOL bUndo=TRUE ); SD_DLLPUBLIC void SetMasterPage(USHORT nSdPageNum, const String& rLayoutName, SdDrawDocument* pSourceDoc, BOOL bMaster, BOOL bCheckMasters); diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx index d4a2d192cadc..a924c5d8a995 100644 --- a/sd/inc/stlpool.hxx +++ b/sd/inc/stlpool.hxx @@ -61,6 +61,7 @@ typedef ::cppu::ImplInheritanceHelper4< SfxStyleSheetPool, class SdStyleSheetPool : public SdStyleSheetPoolBase, public SfxListener { + friend class SdDrawDocument; public: SdStyleSheetPool(SfxItemPool const& rPool, SdDrawDocument* pDocument); @@ -135,8 +136,6 @@ protected: using SfxStyleSheetPool::Create; virtual ~SdStyleSheetPool(); - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - void AddStyleFamily( const SdPage* pPage ); void RemoveStyleFamily( const SdPage* pPage ); diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 93e21ea437d2..3fb085ba651d 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: drawdoc2.cxx,v $ - * $Revision: 1.46 $ + * $Revision: 1.46.76.1 $ * * This file is part of OpenOffice.org. * @@ -364,6 +364,34 @@ SdrPage* SdDrawDocument::RemovePage(USHORT nPgNum) return pPage; } +// Warning: This is not called for new master pages created from SdrModel::Merge, +// you also have to modify code in SdDrawDocument::Merge! +void SdDrawDocument::InsertMasterPage(SdrPage* pPage, USHORT nPos ) +{ + FmFormModel::InsertMasterPage( pPage, nPos ); + if( pPage && pPage->IsMasterPage() && (static_cast<SdPage*>(pPage)->GetPageKind() == PK_STANDARD) ) + { + // new master page created, add its style family + SdStyleSheetPool* pStylePool = (SdStyleSheetPool*) GetStyleSheetPool(); + if( pStylePool ) + pStylePool->AddStyleFamily( static_cast<SdPage*>(pPage) ); + } +} + +SdrPage* SdDrawDocument::RemoveMasterPage(USHORT nPgNum) +{ + SdPage* pPage = static_cast<SdPage*>(GetMasterPage(nPgNum )); + if( pPage && pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) ) + { + // master page removed, remove its style family + SdStyleSheetPool* pStylePool = (SdStyleSheetPool*) GetStyleSheetPool(); + if( pStylePool ) + pStylePool->RemoveStyleFamily( pPage ); + } + + return FmFormModel::RemoveMasterPage(nPgNum); +} + /************************************************************************* |* |* Seiten selektieren diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 4ca4b70b139d..7d815c1892b6 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1976,5 +1976,19 @@ void SdDrawDocument::Merge(SdrModel& rSourceModel, FASTBOOL bMergeMasterPages, FASTBOOL bAllMasterPages, FASTBOOL bUndo, FASTBOOL bTreadSourceAsConst) { + sal_uInt16 nMasterPageCount = GetMasterPageCount(); SdrModel::Merge( rSourceModel, nFirstPageNum, nLastPageNum, nDestPos, bMergeMasterPages, bAllMasterPages, bUndo, bTreadSourceAsConst ); + + // add style family for each new master page + for( sal_uInt16 nMaster = nMasterPageCount; nMaster < GetMasterPageCount(); nMaster++ ) + { + SdPage* pPage = static_cast< SdPage* >( GetMasterPage( nMaster ) ); + if( pPage && pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) ) + { + // new master page created, add its style family + SdStyleSheetPool* pStylePool = (SdStyleSheetPool*) GetStyleSheetPool(); + if( pStylePool ) + pStylePool->AddStyleFamily( pPage ); + } + } } diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 86bf6c5ebaaf..10bf4e9dc4f3 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: stlpool.cxx,v $ - * $Revision: 1.41 $ + * $Revision: 1.41.68.2 $ * * This file is part of OpenOffice.org. * @@ -111,7 +111,7 @@ SdStyleSheetPool::SdStyleSheetPool(SfxItemPool const& _rPool, SdDrawDocument* pD for( sal_uInt16 nPage = 0; nPage < nCount; ++nPage ) AddStyleFamily( mpDoc->GetMasterSdPage(nPage,PK_STANDARD) ); - StartListening( *mpDoc ); +// StartListening( *mpDoc ); } } @@ -674,6 +674,8 @@ void SdStyleSheetPool::CopyTableStyles(SdStyleSheetPool& rSourcePool) void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily ) { + String aHelpFile; + sal_uInt32 nCount = rSourcePool.aStyles.size(); std::vector< std::pair< rtl::Reference< SfxStyleSheetBase >, String > > aNewStyles; @@ -696,6 +698,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily if( aParent.Len() ) aNewStyles.push_back( std::pair< rtl::Reference< SfxStyleSheetBase >, String >( xNewSheet, aParent ) ); + xNewSheet->SetHelpId( aHelpFile, xSheet->GetHelpId( aHelpFile ) ); xNewSheet->GetItemSet().Put( xSheet->GetItemSet() ); } } @@ -732,6 +735,7 @@ void SdStyleSheetPool::CopyLayoutSheets(const String& rLayoutName, SdStyleSheetP List* pNameList = CreateLayoutSheetNames(rLayoutName); + String sEmpty; String* pName = (String*)pNameList->First(); while (pName) { @@ -744,6 +748,7 @@ void SdStyleSheetPool::CopyLayoutSheets(const String& rLayoutName, SdStyleSheetP { // falls einer mit Methusalem-Doks. ankommt SfxStyleSheetBase& rNewSheet = Make(*pName, SD_STYLE_FAMILY_MASTERPAGE); + rNewSheet.SetHelpId( sEmpty, pSourceSheet->GetHelpId( sEmpty ) ); rNewSheet.GetItemSet().Put(pSourceSheet->GetItemSet()); rCreatedSheets.push_back( SdStyleSheetRef( static_cast< SdStyleSheet* >( &rNewSheet ) ) ); } @@ -1210,30 +1215,6 @@ Font SdStyleSheetPool::GetBulletFont() const // -------------------------------------------------------------------- -void SdStyleSheetPool::Notify( SfxBroadcaster&, const SfxHint& rHint ) -{ - const SdrHint* pSdrHint = dynamic_cast< const SdrHint* >( &rHint ); - if( pSdrHint && pSdrHint->GetKind() == HINT_PAGEORDERCHG ) - { - const SdPage* pPage = static_cast< const SdPage* >( pSdrHint->GetPage() ); - if( pPage && pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) ) - { - if( pPage->IsInserted() ) - { - // new master page created, add its style family - AddStyleFamily( pPage ); - } - else - { - // master page removed, remove its style family - RemoveStyleFamily( pPage ); - } - } - } -} - -// -------------------------------------------------------------------- - void SdStyleSheetPool::AddStyleFamily( const SdPage* pPage ) { rtl::Reference< SfxStyleSheetPool > xPool( this ); @@ -1452,7 +1433,7 @@ void SAL_CALL SdStyleSheetPool::dispose() throw (RuntimeException) { } - EndListening( *mpDoc ); +// EndListening( *mpDoc ); mpDoc = 0; } } diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx index a1484d0e97e0..309f1dedfe2c 100644 --- a/sd/source/filter/xml/sdtransform.cxx +++ b/sd/source/filter/xml/sdtransform.cxx @@ -237,7 +237,7 @@ void SdTransformOOo2xDocument::transformTextShape( SdrTextObj& rTextShape ) bool bState = false; const sal_Int16 nDepth = mrOutliner.GetDepth( nPara ); - if( (nDepth != -1) && getBulletState( aParaSet, mrOutliner.GetStyleSheet( nPara ), bState ) && !bState ) + if( (nDepth != -1) && (!getBulletState( aParaSet, mrOutliner.GetStyleSheet( nPara ), bState ) || !bState) ) { // disable bullet if text::enable-bullet="false" is found if( (nDepth > 0 ) && (rTextShape.GetObjInventor() == SdrInventor) && (rTextShape.GetObjIdentifier() == OBJ_OUTLINETEXT) ) @@ -257,7 +257,10 @@ void SdTransformOOo2xDocument::transformTextShape( SdrTextObj& rTextShape ) while(nWhich) { if(SFX_ITEM_SET != aParaSet.GetItemState(nWhich, true)) + { aParaSet.Put(rStyleSet.Get(nWhich)); + bItemChange = true; + } nWhich = aIter.NextWhich(); } diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx index a943728326c6..5e21e672d3bc 100644 --- a/sd/source/ui/framework/configuration/ConfigurationController.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ConfigurationController.cxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.68.1 $ * * This file is part of OpenOffice.org. * @@ -305,7 +305,11 @@ void SAL_CALL ConfigurationController::unlock (void) throw (RuntimeException) { ::osl::MutexGuard aGuard (maMutex); - ThrowIfDisposed(); + + // Allow unlocking while the ConfigurationController is being disposed + // (but not when that is done and the controller is disposed.) + if (rBHelper.bDisposed) + ThrowIfDisposed(); OSL_ASSERT(mpImplementation->mnLockCount>0); --mpImplementation->mnLockCount; diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index 79cfb4cba6d2..29bc28e91e17 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: fuolbull.cxx,v $ - * $Revision: 1.11 $ + * $Revision: 1.11.104.1 $ * * This file is part of OpenOffice.org. * @@ -101,16 +101,22 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq ) case RET_OK: { SfxItemSet aSet( *pDlg->GetOutputItemSet() ); -/* i35937 - if (mpView->ISA(DrawViewShell) ) + + OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); + + std::auto_ptr< OutlineViewModelChangeGuard > aGuard; + + if (mpView->ISA(OutlineView)) { - if( mpView->GetMarkedObjectList().GetMarkCount() == 0) - { - SfxUInt16Item aBulletState( EE_PARA_BULLETSTATE, 0 ); - aSet.Put(aBulletState); - } + pOLV = static_cast<OutlineView*>(mpView) + ->GetViewByWindow(mpViewShell->GetActiveWindow()); + + aGuard.reset( new OutlineViewModelChangeGuard( static_cast<OutlineView&>(*mpView) ) ); } -*/ + + if( pOLV ) + pOLV->EnableBullets(); + rReq.Done( aSet ); pArgs = rReq.GetArgs(); } diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx index b88d6f226d0f..6975aa66fba9 100644 --- a/sd/source/ui/func/fuprlout.cxx +++ b/sd/source/ui/func/fuprlout.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: fuprlout.cxx,v $ - * $Revision: 1.17 $ + * $Revision: 1.17.130.1 $ * * This file is part of OpenOffice.org. * @@ -287,32 +287,4 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) } } -/************************************************************************* -|* -|* Layoutvorlage von einem StyleSheetPool in einen anderen uebertragen -|* -\************************************************************************/ - -void FuPresentationLayout::TransferLayoutTemplate(String aFromName, - String aToName, - SfxStyleSheetBasePool* pFrom, - SfxStyleSheetBasePool* pTo) -{ - SfxStyleSheetBase* pHis = pFrom->Find(aFromName,SD_STYLE_FAMILY_MASTERPAGE); - SfxStyleSheetBase* pMy = pTo->Find(aToName, SD_STYLE_FAMILY_MASTERPAGE); - - DBG_ASSERT(pHis, "neue Layoutvorlage nicht gefunden"); - - // gibt's noch nicht: neu anlegen - if (!pMy) - { - pMy = &(pTo->Make(aToName, SD_STYLE_FAMILY_MASTERPAGE)); - } - - // Inhalte neu setzen - if (pHis) - pMy->GetItemSet().Set(pHis->GetItemSet()); -} - - } // end of namespace sd diff --git a/sd/source/ui/inc/fuprlout.hxx b/sd/source/ui/inc/fuprlout.hxx index 60d7a7d307dd..09dab1a735d0 100644 --- a/sd/source/ui/inc/fuprlout.hxx +++ b/sd/source/ui/inc/fuprlout.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: fuprlout.hxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.130.1 $ * * This file is part of OpenOffice.org. * @@ -59,10 +59,6 @@ private: ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq); - - void TransferLayoutTemplate(String aFromName, String aToName, - SfxStyleSheetBasePool* pFrom, - SfxStyleSheetBasePool* pTo); }; } // end of namespace sd diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 8e29e7d1ade5..8ebc2725a19f 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -467,7 +467,14 @@ bool SlideSorterController::Command ( } mbIsContextMenuOpen = false; if (pPage == NULL) + { + // Select slide before the insertion indicator before it is + // hidden, so that a pending slide insertion slot finds the + // right place to insert a new slide. + mpPageSelector->SelectPage( + mrView.GetOverlay().GetInsertionIndicatorOverlay().GetInsertionPageIndex()-1); mrView.GetOverlay().GetInsertionIndicatorOverlay().Hide(); + } bEventHasBeenHandled = true; } break; diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index 8032d2ae256a..9d48612457b3 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -543,8 +543,14 @@ private: maTransformation ); basegfx::B2DHomMatrix aMatrix( maTransformation ); - aMatrix.translate( -basegfx::fround(aTmpRect.getMinX()), - -basegfx::fround(aTmpRect.getMinY()) ); + + // Add translation according to the origin of aTmpRect. Ignore the + // translation when aTmpRect was not properly initialized. + if ( ! aTmpRect.isEmpty()) + { + aMatrix.translate( -basegfx::fround(aTmpRect.getMinX()), + -basegfx::fround(aTmpRect.getMinY()) ); + } return aMatrix; } |