From 0143805a565418d2a114c16b7eeba3b784176d9e Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Mon, 27 May 2013 11:18:04 +0000 Subject: Resolves: #i122332# Don't change sidebar context when switching... to other application window (cherry picked from commit 604502e2a4b53f35aedbf0205598a9b691c0d532) Conflicts: sd/source/ui/view/drviewsa.cxx sfx2/inc/sfx2/shell.hxx sfx2/source/control/shell.cxx svx/inc/svx/sidebar/SelectionAnalyzer.hxx svx/inc/svx/sidebar/SelectionChangeHandler.hxx Change-Id: Id3c427e02714ef0d6686a78094e2f7f3b390a693 --- include/svx/sidebar/SelectionAnalyzer.hxx | 16 +++++++++++----- include/svx/sidebar/SelectionChangeHandler.hxx | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'include/svx/sidebar') diff --git a/include/svx/sidebar/SelectionAnalyzer.hxx b/include/svx/sidebar/SelectionAnalyzer.hxx index 601a96e977f9..1a3623265b69 100644 --- a/include/svx/sidebar/SelectionAnalyzer.hxx +++ b/include/svx/sidebar/SelectionAnalyzer.hxx @@ -37,19 +37,25 @@ class SVX_DLLPUBLIC SelectionAnalyzer public : static sfx2::sidebar::EnumContext::Context GetContextForSelection_SC ( const SdrMarkList& rMarkList); + + enum ViewType + { + VT_Standard, + VT_Master, + VT_Handout, + VT_Notes, + VT_Outline + }; static sfx2::sidebar::EnumContext::Context GetContextForSelection_SD ( const SdrMarkList& rMarkList, - const bool bIsMasterPage, - const bool bIsHandoutPage, - const bool bIsNotesPage); + const ViewType eViewType); private: static sfx2::sidebar::EnumContext::Context GetContextForObjectId_SC ( const sal_uInt16 nObjectId); static sfx2::sidebar::EnumContext::Context GetContextForObjectId_SD ( const sal_uInt16 nObjectId, - const bool bIsHandoutPage, - const bool bIsNotesPage); + const ViewType eViewType); static sal_uInt32 GetInventorTypeFromMark ( const SdrMarkList& rMarkList); static sal_uInt16 GetObjectTypeFromMark ( diff --git a/include/svx/sidebar/SelectionChangeHandler.hxx b/include/svx/sidebar/SelectionChangeHandler.hxx index 29116e5249b8..da1e4e703a12 100644 --- a/include/svx/sidebar/SelectionChangeHandler.hxx +++ b/include/svx/sidebar/SelectionChangeHandler.hxx @@ -53,7 +53,7 @@ class SVX_DLLPUBLIC SelectionChangeHandler { public: SelectionChangeHandler ( - const boost::function& rSelectionChangeCallback, + const boost::function& rSelectionChangeCallback, const cssu::Reference& rxController, const sfx2::sidebar::EnumContext::Context eDefaultContext); virtual ~SelectionChangeHandler (void); @@ -71,7 +71,7 @@ public: void Disconnect (void); private: - const boost::function maSelectionChangeCallback; + const boost::function maSelectionChangeCallback; cssu::Reference mxController; const sfx2::sidebar::EnumContext::Context meDefaultContext; bool mbIsConnected; -- cgit