From c21a1d8c48e057ce95cfffed85306471724e73d1 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 14 Jul 2010 13:35:16 +0200 Subject: impress195: #i101808# Allow unused master pages to be deleted in master pages control. --- sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx (limited to 'sd') diff --git a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx old mode 100644 new mode 100755 index 7f4149d7e6fd..a82262307f41 --- a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx @@ -227,7 +227,7 @@ void CurrentMasterPagesSelector::Execute (SfxRequest& rRequest) // i.e. is not used. SdPage* pMasterPage = GetSelectedMasterPage(); if (pMasterPage != NULL - && mrDocument.GetMasterPageUserCount(pMasterPage) > 0) + && mrDocument.GetMasterPageUserCount(pMasterPage) == 0) { // Removing the precious flag so that the following call to // RemoveUnnessesaryMasterPages() will remove this master page. -- cgit From a800b0d9fdf41cf11f8dbd91ff04321190bf289d Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 14 Jul 2010 13:48:47 +0200 Subject: impress195: #i102142# Stop leaking windows. --- sd/source/ui/framework/factories/BasicViewFactory.cxx | 3 ++- sd/source/ui/framework/factories/BasicViewFactory.hxx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'sd') diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx index 1320df5c827b..44f92622a38d 100755 --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -142,7 +142,8 @@ BasicViewFactory::BasicViewFactory ( mpBase(NULL), mpFrameView(NULL), mpViewCache(new ViewCache()), - mxLocalPane(new Pane(Reference(), new WorkWindow(NULL,WB_STDWORK))) + mpWindow(new WorkWindow(NULL,WB_STDWORK)), + mxLocalPane(new Pane(Reference(), mpWindow.get())) { (void)rxContext; } diff --git a/sd/source/ui/framework/factories/BasicViewFactory.hxx b/sd/source/ui/framework/factories/BasicViewFactory.hxx index e5bb43551a24..74bb04de36e3 100755 --- a/sd/source/ui/framework/factories/BasicViewFactory.hxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.hxx @@ -119,6 +119,7 @@ private: FrameView* mpFrameView; class ViewCache; + ::boost::shared_ptr mpWindow; ::boost::shared_ptr mpViewCache; css::uno::Reference mxLocalPane; -- cgit From cff2fd00939de5cf59ea6b6039b33ff3daf6bfd0 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 14 Jul 2010 14:03:14 +0200 Subject: impress195: #i112510# Stop leaking task pane FocusManager singleton. --- sd/source/ui/toolpanel/TaskPaneFocusManager.cxx | 19 +++++++++++++------ sd/source/ui/toolpanel/TaskPaneFocusManager.hxx | 1 - 2 files changed, 13 insertions(+), 7 deletions(-) mode change 100644 => 100755 sd/source/ui/toolpanel/TaskPaneFocusManager.cxx mode change 100644 => 100755 sd/source/ui/toolpanel/TaskPaneFocusManager.hxx (limited to 'sd') diff --git a/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx b/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx old mode 100644 new mode 100755 index 48882d0f2f9e..d1c5d2c0ff53 --- a/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx +++ b/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx @@ -31,9 +31,9 @@ #include "TaskPaneFocusManager.hxx" #include -#include #include #include +#include #include namespace { @@ -70,16 +70,23 @@ class FocusManager::LinkMap -FocusManager* FocusManager::spInstance = NULL; - - FocusManager& FocusManager::Instance (void) { + static FocusManager* spInstance = NULL; + if (spInstance == NULL) { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + ::osl::MutexGuard aGuard (::osl::Mutex::getGlobalMutex()); if (spInstance == NULL) - spInstance = new FocusManager (); + { + static FocusManager aInstance; + OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); + spInstance = &aInstance; + } + } + else + { + OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); } return *spInstance; } diff --git a/sd/source/ui/toolpanel/TaskPaneFocusManager.hxx b/sd/source/ui/toolpanel/TaskPaneFocusManager.hxx old mode 100644 new mode 100755 index b9b28154dc5b..0b5199a9a7cc --- a/sd/source/ui/toolpanel/TaskPaneFocusManager.hxx +++ b/sd/source/ui/toolpanel/TaskPaneFocusManager.hxx @@ -103,7 +103,6 @@ public: bool TransferFocus (::Window* pSource, const KeyCode& rCode); private: - static FocusManager* spInstance; class LinkMap; ::std::auto_ptr mpLinks; -- cgit From c8125819e1b831f36203d8545b49df9041cc106c Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Mon, 9 Aug 2010 15:34:32 +0200 Subject: impress195: #i113720# Break cyclic dependency between DrawController and ModuleController. --- sd/source/ui/framework/module/ModuleController.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sd') diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx index e910a8df7496..27d18fec51c1 100755 --- a/sd/source/ui/framework/module/ModuleController.cxx +++ b/sd/source/ui/framework/module/ModuleController.cxx @@ -143,6 +143,10 @@ ModuleController::~ModuleController (void) throw() void SAL_CALL ModuleController::disposing (void) { + // Break the cyclic reference back to DrawController object + mpLoadedFactories.reset(); + mpResourceToFactoryMap.reset(); + mxController.clear(); } -- cgit From 0eee4cff9975faf99d72056f6aeab2bae87016b7 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Fri, 15 Oct 2010 14:15:00 +0200 Subject: impress195: #158718# Added some checks to validate pointers. --- .../slidesorter/controller/SlideSorterController.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 69c2a02ddc24..c779e785c32e 100755 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -351,7 +351,12 @@ bool SlideSorterController::Command ( { bool bEventHasBeenHandled = false; + if (pWindow == NULL) + return false; + ViewShell* pViewShell = mrSlideSorter.GetViewShell(); + if (pViewShell == NULL) + return false; switch (rEvent.GetCommand()) { @@ -409,12 +414,9 @@ bool SlideSorterController::Command ( if (rEvent.IsMouseEvent()) { mbIsContextMenuOpen = true; - if (pViewShell != NULL) - { - SfxDispatcher* pDispatcher = pViewShell->GetDispatcher(); - if (pDispatcher != NULL) - pDispatcher->ExecutePopup(SdResId(nPopupId)); - } + SfxDispatcher* pDispatcher = pViewShell->GetDispatcher(); + if (pDispatcher != NULL) + pDispatcher->ExecutePopup(SdResId(nPopupId)); } else { @@ -432,8 +434,9 @@ bool SlideSorterController::Command ( view::SlideSorterView::BBT_SHAPE)); Point aPosition (aBBox.Center()); mbIsContextMenuOpen = true; - if (pViewShell != NULL) - pViewShell->GetViewFrame()->GetDispatcher()->ExecutePopup( + SfxDispatcher* pDispatcher = pViewShell->GetViewFrame()->GetDispatcher(); + if (pDispatcher != NULL) + pDispatcher->ExecutePopup( SdResId(nPopupId), pWindow, &aPosition); -- cgit From b3a10141801bd0f2d2b3d5aa04ffe61d43dce46f Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 17 Dec 2010 11:00:57 +0100 Subject: sw34bf03: #i93908#: ODF: fix bogus style:num-suffix on bullet lists: Svx{Bullet,Num}PickTabPage, SwAutoFormat, SwWrtShell::NumOrBulletOn(): clear suffix when bullet lists are created. xmlnumi.cxx: ignore style:num-suffix written by defective OOo versions. --- sd/source/core/stlpool.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sd') diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 205e007d9e97..9dbc353fe60b 100755 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -1063,6 +1063,9 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, { SvxNumberFormat aFrmt( pDefaultRule->GetLevel(i) ); aFrmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); + // #i93908# clear suffix for bullet lists + aFmt.SetPrefix(::rtl::OUString()); + aFmt.SetSuffix(::rtl::OUString()); aFrmt.SetStart(1); aFrmt.SetBulletRelSize(45); aFrmt.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34 -- cgit From c8ba0c921140c1afc84cc2703ed229f6fba4f7d9 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 26 Jan 2011 10:42:37 +0100 Subject: impress195: #i102142# Fixed order of initialization in constructor. --- sd/source/ui/framework/factories/BasicViewFactory.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 sd/source/ui/framework/factories/BasicViewFactory.cxx (limited to 'sd') diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx old mode 100755 new mode 100644 index 155ceec943ba..80f9668fdeea --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -141,8 +141,8 @@ BasicViewFactory::BasicViewFactory ( mpViewShellContainer(new ViewShellContainer()), mpBase(NULL), mpFrameView(NULL), - mpViewCache(new ViewCache()), mpWindow(new WorkWindow(NULL,WB_STDWORK)), + mpViewCache(new ViewCache()), mxLocalPane(new Pane(Reference(), mpWindow.get())) { (void)rxContext; -- cgit From bcc28239b8bbb249ef58331e0cc6f0850781c044 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 14 Feb 2011 14:06:49 +0100 Subject: sw34bf03: stlpool.cxx: fix stupid typo --- sd/source/core/stlpool.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sd') diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index a3e73d959119..a2abfd199fe9 100755 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -1061,8 +1061,8 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, SvxNumberFormat aFrmt( pDefaultRule->GetLevel(i) ); aFrmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); // #i93908# clear suffix for bullet lists - aFmt.SetPrefix(::rtl::OUString()); - aFmt.SetSuffix(::rtl::OUString()); + aFrmt.SetPrefix(::rtl::OUString()); + aFrmt.SetSuffix(::rtl::OUString()); aFrmt.SetStart(1); aFrmt.SetBulletRelSize(45); aFrmt.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34 -- cgit From 0d9aa8be6f176b400a0f137ff228964a3f644f39 Mon Sep 17 00:00:00 2001 From: os Date: Fri, 18 Feb 2011 10:06:26 +0100 Subject: os150: SvxFontItem member access changed to Set-methods --- sd/source/ui/func/fuhhconv.cxx | 10 +++++----- sd/source/ui/presenter/PresenterTextView.cxx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx index abe45670c100..c4efbbba1612 100755 --- a/sd/source/ui/func/fuhhconv.cxx +++ b/sd/source/ui/func/fuhhconv.cxx @@ -203,11 +203,11 @@ void FuHangulHanjaConversion::ConvertStyles( sal_Int16 nTargetLanguage, const Fo { // set new font attribute SvxFontItem aFontItem( (SvxFontItem&) rSet.Get( EE_CHAR_FONTINFO_CJK ) ); - aFontItem.GetFamilyName() = pTargetFont->GetName(); - aFontItem.GetFamily() = pTargetFont->GetFamily(); - aFontItem.GetStyleName() = pTargetFont->GetStyleName(); - aFontItem.GetPitch() = pTargetFont->GetPitch(); - aFontItem.GetCharSet() = pTargetFont->GetCharSet(); + aFontItem.SetFamilyName( pTargetFont->GetName()); + aFontItem.SetFamily( pTargetFont->GetFamily()); + aFontItem.SetStyleName( pTargetFont->GetStyleName()); + aFontItem.SetPitch( pTargetFont->GetPitch()); + aFontItem.SetCharSet( pTargetFont->GetCharSet()); rSet.Put( aFontItem ); } diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index 991beade0f2f..7134358e80bc 100755 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -498,7 +498,7 @@ void PresenterTextView::Implementation::SetFontDescriptor ( mpEditEngineItemPool->SetPoolDefaultItem( aFontHeight); SvxFontItem aSvxFontItem (EE_CHAR_FONTINFO); - aSvxFontItem.GetFamilyName() = rFontDescriptor.Name; + aSvxFontItem.SetFamilyName( rFontDescriptor.Name ); mpEditEngineItemPool->SetPoolDefaultItem(aSvxFontItem); mnTotalHeight = -1; -- cgit