From 2caeda091a394dd134783dbd1656910f730ad040 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Mon, 1 Mar 2010 19:08:10 +0100 Subject: #i109713# applied patch to fix missing initialized member variable --- sd/source/ui/func/fupoor.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index 936802ff34cb..82e3404346e4 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -107,6 +107,7 @@ FuPoor::FuPoor ( bNoScrollUntilInside (TRUE), bScrollable (FALSE), bDelayActive (FALSE), + bFirstMouseMove (FALSE), // #95491# remember MouseButton state mnCode(0) { -- cgit v1.2.3 From 007870b2956c7e8bc734f68b9663063847bee65c Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Tue, 9 Mar 2010 15:30:04 +0100 Subject: #i109210# set backgrounds to all master if user choose so --- sd/source/ui/func/fupage.cxx | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 420f6d762065..df3ae9272652 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -87,6 +87,7 @@ #include "undoback.hxx" #include "sdabstdlg.hxx" #include "sdresid.hxx" +#include "sdundogr.hxx" #include "helpids.h" namespace sd { @@ -401,10 +402,51 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) if( mbMasterPage ) { +/* StyleSheetUndoAction* pAction = new StyleSheetUndoAction(mpDoc, (SfxStyleSheet*)pStyleSheet, &(*pTempSet.get())); mpDocSh->GetUndoManager()->AddUndoAction(pAction); pStyleSheet->GetItemSet().Put( *(pTempSet.get()) ); pStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED)); +*/ + String aComment(SdResId(STR_UNDO_CHANGE_PAGEFORMAT)); + SfxUndoManager* pUndoMgr = mpDocSh->GetUndoManager(); + pUndoMgr->EnterListAction(aComment, aComment); + SdUndoGroup* pUndoGroup = new SdUndoGroup(mpDoc); + pUndoGroup->SetComment(aComment); + + //Set background on all master pages + USHORT nMasterPageCount = mpDoc->GetMasterSdPageCount(ePageKind); + for (USHORT i = 0; i < nMasterPageCount; ++i) + { + SdPage *pMasterPage = mpDoc->GetMasterSdPage(i, ePageKind); + SdStyleSheet *pStyle = + pMasterPage->getPresentationStyle(HID_PSEUDOSHEET_BACKGROUND); + StyleSheetUndoAction* pAction = + new StyleSheetUndoAction(mpDoc, (SfxStyleSheet*)pStyle, &(*pTempSet.get())); + pUndoGroup->AddAction(pAction); + pStyle->GetItemSet().Put( *(pTempSet.get()) ); + pStyle->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED)); + } + + //Remove background from all pages to reset to the master bg + USHORT nPageCount(mpDoc->GetSdPageCount(ePageKind)); + for(USHORT i=0; iGetSdPage(i, ePageKind); + + const SfxItemSet& rFillAttributes = pPage->getSdrPageProperties().GetItemSet(); + if(XFILL_NONE != ((const XFillStyleItem&)rFillAttributes.Get(XATTR_FILLSTYLE)).GetValue()) + { + SdBackgroundObjUndoAction *pBackgroundObjUndoAction = new SdBackgroundObjUndoAction(*mpDoc, *pPage, rFillAttributes); + pUndoGroup->AddAction(pBackgroundObjUndoAction); + pPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); + pPage->ActionChanged(); + } + } + + pUndoMgr->AddUndoAction(pUndoGroup); + pUndoMgr->LeaveListAction(); + } const SfxPoolItem *pItem; -- cgit v1.2.3 From df66a0ddc600f4cb495d074067dd0184a141054f Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 16 Apr 2010 12:48:58 +0200 Subject: #i110938# removed z-index hack after background shape was removed --- sd/source/ui/unoidl/unoobj.cxx | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 54c3f88a6916..d4ea1dce196f 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -737,22 +737,6 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, aAny <<= aName; } } - else if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_shape_zorder ) ) ) - { - SdrObject* pObj = mpShape->GetSdrObject(); - SdPage* pPage = pObj ? (SdPage*)pObj->GetPage() : NULL; - if( pPage && pPage == pObj->GetObjList() && pPage->IsMasterPage() && pPage->GetPageKind() == PK_STANDARD ) - { - sal_Int32 nOrdNum; - if( aAny >>= nOrdNum ) - { - // if this is a masterpage, there is always a background shape with the ord num 0 - // so we add one to the api ordnum to hide the background shape over the api - nOrdNum++; - aAny <<= nOrdNum; - } - } - } mpShape->_setPropertyValue(aPropertyName, aAny); } @@ -910,30 +894,6 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, aRet <<= aName; } } - else if( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_shape_zorder ) ) ) - { - SdrObject* pObj = mpShape->GetSdrObject(); - SdPage* pPage = pObj ? (SdPage*)pObj->GetPage() : NULL; - if( pPage && pPage == pObj->GetObjList() && pPage->IsMasterPage() && pPage->GetPageKind() == PK_STANDARD ) - { - sal_Int32 nOrdNum; - if( aRet >>= nOrdNum ) - { - // if this is a masterpage, there is always a background shape with the ord num 0 - // so we add one to the api ordnum to hide the background shape over the api - if( nOrdNum > 0 ) - { - nOrdNum--; - aRet <<= nOrdNum; - } - else - { - DBG_ERROR( "Masterpage without a background shape, ZOrder property will be corrupt!" ); - } - } - } - } - } return aRet; -- cgit v1.2.3 From 9bc155a7dcccafea620fce64cc02f3f052e16d09 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 16 Apr 2010 13:50:13 +0200 Subject: #i109210# when in master page mode, only change background of current master page and not all (regression from last applied patch) --- sd/source/ui/func/fupage.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 48c9f872ebb7..9fb0007cc72c 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -360,6 +360,8 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) ( ( (XFillStyleItem*) aMergedAttr.GetItem( XATTR_FILLSTYLE ) )->GetValue() == XFILL_NONE ) ) ) mbPageBckgrdDeleted = TRUE; + bool bSetToAllPages = false; + // Ask, wether the setting are for the background-page or for the current page if( !mbMasterPage && bChanges ) { @@ -375,7 +377,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) aTit, aTxt ); aQuestionBox.SetImage( QueryBox::GetStandardImage() ); - mbMasterPage = ( RET_YES == aQuestionBox.Execute() ); + bSetToAllPages = ( RET_YES == aQuestionBox.Execute() ); } if( mbPageBckgrdDeleted ) @@ -399,12 +401,13 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) if( mbMasterPage ) { -/* StyleSheetUndoAction* pAction = new StyleSheetUndoAction(mpDoc, (SfxStyleSheet*)pStyleSheet, &(*pTempSet.get())); mpDocSh->GetUndoManager()->AddUndoAction(pAction); pStyleSheet->GetItemSet().Put( *(pTempSet.get()) ); pStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED)); -*/ + } + else if( bSetToAllPages ) + { String aComment(SdResId(STR_UNDO_CHANGE_PAGEFORMAT)); SfxUndoManager* pUndoMgr = mpDocSh->GetUndoManager(); pUndoMgr->EnterListAction(aComment, aComment); -- cgit v1.2.3 From ee7c2a7a4c94a45dd6427ee8e989a05d4bb59d29 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 16 Apr 2010 14:27:22 +0200 Subject: #i109783# fixed typo --- sd/source/ui/animations/CustomAnimation.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd/source/ui/animations/CustomAnimation.src b/sd/source/ui/animations/CustomAnimation.src index 1320e75d3e36..449107f05c75 100644 --- a/sd/source/ui/animations/CustomAnimation.src +++ b/sd/source/ui/animations/CustomAnimation.src @@ -202,7 +202,7 @@ Menu RID_CUSTOMANIMATION_FONTSTYLE_POPUP MenuItem { Identifier = CM_UNDERLINED ; - Text [ en-US ] = "Underlinded" ; + Text [ en-US ] = "Underlined" ; }; }; }; -- cgit v1.2.3 From c842884262ee413138165123f96a5cc81ffe6647 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 16 Apr 2010 15:08:05 +0200 Subject: #i10880# fixed pause logo in impress slideshow --- sd/source/ui/slideshow/slideshowimpl.cxx | 37 +++++--------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index d58cfcb3f6c9..0afcb7df053b 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -51,7 +51,8 @@ #include #include -#include "sfx2/docfile.hxx" +#include +#include #include #include @@ -3472,39 +3473,11 @@ void SAL_CALL SlideshowImpl::gotoNextSlide( ) throw (RuntimeException) { if( maPresSettings.mnPauseTimeout ) { - boost::scoped_ptr< Graphic > pGraphic; - - if( maPresSettings.mbShowPauseLogo ) + if( mpShowWindow ) { - // load about image from module path - String aBmpFileName( RTL_CONSTASCII_USTRINGPARAM("about.bmp") ); - INetURLObject aObj( SvtPathOptions().GetModulePath(), INET_PROT_FILE ); - aObj.insertName( aBmpFileName ); - SvFileStream aStrm( aObj.PathToFileName(), STREAM_STD_READ ); - if ( !aStrm.GetError() ) - { - Bitmap aBmp; - aStrm >> aBmp; - pGraphic.reset( new Graphic(aBmp) ); - pGraphic->SetPrefMapMode(MAP_PIXEL); - } - else - { - //if no image is located in the module path - //use default logo from iso resource: - - String aMgrName( RTL_CONSTASCII_USTRINGPARAM( "iso" ) ); - boost::scoped_ptr< ResMgr > pResMgr( ResMgr::CreateResMgr( U2S( aMgrName )) ); - DBG_ASSERT(pResMgr,"No ResMgr found"); - if(pResMgr.get()) - { - pGraphic.reset( new Graphic( Bitmap( ResId( RID_DEFAULT_ABOUT_BMP_LOGO, *pResMgr ) ) ) ); - pGraphic->SetPrefMapMode(MAP_PIXEL); - } - } + Graphic aGraphic( SfxApplication::GetApplicationLogo().GetBitmapEx() ); + mpShowWindow->SetPauseMode( 0, maPresSettings.mnPauseTimeout, &aGraphic ); } - if( mpShowWindow ) - mpShowWindow->SetPauseMode( 0, maPresSettings.mnPauseTimeout, pGraphic.get() ); } else { -- cgit v1.2.3 From bf8b1838a7ad9a5895fcbee511985cdfb665c966 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 16 Apr 2010 16:10:11 +0200 Subject: #i108132# dispose stylesheets to avoid dangling references --- sd/inc/stlpool.hxx | 2 ++ sd/source/core/stlpool.cxx | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx index d49d743b6dee..7dfeac99121b 100644 --- a/sd/inc/stlpool.hxx +++ b/sd/inc/stlpool.hxx @@ -126,6 +126,8 @@ public: virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire (void) throw (); + virtual void SAL_CALL release (void) throw (); protected: void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily ); diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index e592ba45a27e..c91fee735954 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -1437,6 +1437,8 @@ void SAL_CALL SdStyleSheetPool::dispose() throw (RuntimeException) // EndListening( *mpDoc ); mpDoc = 0; + + Clear(); } } @@ -1475,3 +1477,15 @@ SdStyleSheetVector SdStyleSheetPool::CreateChildList( SdStyleSheet* pSheet ) } // -------------------------------------------------------------------- + +void SAL_CALL SdStyleSheetPool::acquire (void) throw () +{ + SdStyleSheetPoolBase::acquire(); +} + +void SAL_CALL SdStyleSheetPool::release (void) throw () +{ + SdStyleSheetPoolBase::release(); +} + +// -------------------------------------------------------------------- -- cgit v1.2.3