diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2011-02-28 17:12:48 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2011-02-28 17:12:48 +0100 |
commit | 973d2ca14b29d856023ea1c7b49e6bddd3ca2bc7 (patch) | |
tree | f0550da7abf84599799b5dab66f45cc8eee7ab21 /sd/source | |
parent | a0e99ecace0b744ae75c9f2fbcde9990a2b6faa4 (diff) | |
parent | 086ff12951769a2fadfc0f92f57c2e4f41108b72 (diff) |
CWS-TOOLING: integrate CWS impress195
Diffstat (limited to 'sd/source')
-rw-r--r--[-rwxr-xr-x] | sd/source/ui/framework/factories/BasicViewFactory.cxx | 3 | ||||
-rwxr-xr-x | sd/source/ui/framework/factories/BasicViewFactory.hxx | 1 | ||||
-rwxr-xr-x | sd/source/ui/framework/module/ModuleController.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlideSorterController.cxx | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/toolpanel/TaskPaneFocusManager.cxx | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/toolpanel/TaskPaneFocusManager.hxx | 1 | ||||
-rwxr-xr-x | sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx | 2 |
7 files changed, 26 insertions, 9 deletions
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx index 902c6f48a9a7..95c2833a2d12 100755..100644 --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -141,8 +141,9 @@ BasicViewFactory::BasicViewFactory ( mpViewShellContainer(new ViewShellContainer()), mpBase(NULL), mpFrameView(NULL), + mpWindow(new WorkWindow(NULL,WB_STDWORK)), mpViewCache(new ViewCache()), - mxLocalPane(new Pane(Reference<XResourceId>(), new WorkWindow(NULL,WB_STDWORK))) + mxLocalPane(new Pane(Reference<XResourceId>(), mpWindow.get())) { (void)rxContext; } diff --git a/sd/source/ui/framework/factories/BasicViewFactory.hxx b/sd/source/ui/framework/factories/BasicViewFactory.hxx index 0cdb45ffc7c1..50edcc919899 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<Window> mpWindow; ::boost::shared_ptr<ViewCache> mpViewCache; css::uno::Reference<css::drawing::framework::XPane> mxLocalPane; 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(); } diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 43d5928df349..390ade9c7a7e 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -372,7 +372,12 @@ bool SlideSorterController::Command ( { bool bEventHasBeenHandled = false; + if (pWindow == NULL) + return false; + ViewShell* pViewShell = mrSlideSorter.GetViewShell(); + if (pViewShell == NULL) + return false; switch (rEvent.GetCommand()) { diff --git a/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx b/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx index 48882d0f2f9e..d1c5d2c0ff53 100644..100755 --- a/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx +++ b/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx @@ -31,9 +31,9 @@ #include "TaskPaneFocusManager.hxx" #include <vcl/window.hxx> -#include <vos/mutex.hxx> #include <vcl/svapp.hxx> #include <vcl/event.hxx> +#include <rtl/instance.hxx> #include <hash_map> 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 index b9b28154dc5b..0b5199a9a7cc 100644..100755 --- 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<LinkMap> mpLinks; diff --git a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx index 29018cb3a3ca..9b6e45c35194 100755 --- 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. |