summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-05-27 11:18:04 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-28 17:03:22 +0100
commit0143805a565418d2a114c16b7eeba3b784176d9e (patch)
tree6334f551f1971c252c00730dffcc7a640198ef30 /include
parentec3fafa60efa8f4bec1ca53e5bbe0e7b2be61f54 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/shell.hxx15
-rw-r--r--include/svx/sidebar/SelectionAnalyzer.hxx16
-rw-r--r--include/svx/sidebar/SelectionChangeHandler.hxx4
3 files changed, 27 insertions, 8 deletions
diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index cb5b149714df..ddeb677e3127 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -238,7 +238,20 @@ public:
virtual SfxItemSet* CreateItemSet( sal_uInt16 nId );
virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet );
- void SetContextName (const ::rtl::OUString& rsContextName);
+ /** Set the name of the sidebar context that is broadcast on calls
+ to Activation().
+ */
+ void SetContextName (const ::rtl::OUString& rsContextName);
+
+ /** Broadcast a sidebar context change.
+ This method is typically called from Activate() or
+ Deactivate().
+ @param bIsActivated
+ When <TRUE/> then broadcast the context name that was
+ defined with an earlier call to SetContextName().
+ When <FALSE/> then broadcast the 'default' context.
+ */
+ void BroadcastContextForActivation (const bool bIsActivated);
#ifndef _SFXSH_HXX
SAL_DLLPRIVATE bool CanExecuteSlot_Impl( const SfxSlot &rSlot );
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<sfx2::sidebar::EnumContext::Context(void)>& rSelectionChangeCallback,
+ const boost::function<rtl::OUString(void)>& rSelectionChangeCallback,
const cssu::Reference<css::frame::XController>& rxController,
const sfx2::sidebar::EnumContext::Context eDefaultContext);
virtual ~SelectionChangeHandler (void);
@@ -71,7 +71,7 @@ public:
void Disconnect (void);
private:
- const boost::function<sfx2::sidebar::EnumContext::Context(void)> maSelectionChangeCallback;
+ const boost::function<rtl::OUString(void)> maSelectionChangeCallback;
cssu::Reference<css::frame::XController> mxController;
const sfx2::sidebar::EnumContext::Context meDefaultContext;
bool mbIsConnected;