diff options
author | Andre Fischer <af@apache.org> | 2013-05-27 11:18:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-28 17:03:22 +0100 |
commit | 0143805a565418d2a114c16b7eeba3b784176d9e (patch) | |
tree | 6334f551f1971c252c00730dffcc7a640198ef30 /sc | |
parent | ec3fafa60efa8f4bec1ca53e5bbe0e7b2be61f54 (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 'sc')
-rw-r--r-- | sc/source/ui/drawfunc/drawsh2.cxx | 26 | ||||
-rw-r--r-- | sc/source/ui/inc/drawsh.hxx | 4 |
2 files changed, 24 insertions, 6 deletions
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 47df366fdf93..94c685275957 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -35,6 +35,7 @@ #include <svx/fontworkbar.hxx> #include <svx/sidebar/SelectionChangeHandler.hxx> #include <svx/sidebar/SelectionAnalyzer.hxx> +#include <svx/sidebar/ContextChangeEventMultiplexer.hxx> #include "drawsh.hxx" #include "drawview.hxx" @@ -61,7 +62,7 @@ ScDrawShell::ScDrawShell( ScViewData* pData ) : SfxShell(pData->GetViewShell()), pViewData( pData ), mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler( - ::boost::bind(&ScDrawShell::GetContextForSelection, this), + ::boost::bind(&ScDrawShell::GetSidebarContextName, this), GetFrame()->GetFrame().GetController(), sfx2::sidebar::EnumContext::Context_Cell)) { @@ -396,10 +397,27 @@ void ScDrawShell::GetDrawAttrStateForIFBX( SfxItemSet& rSet ) } } -sfx2::sidebar::EnumContext::Context ScDrawShell::GetContextForSelection (void) + + + +void ScDrawShell::Activate (const sal_Bool bMDI) +{ + (void)bMDI; + + ContextChangeEventMultiplexer::NotifyContextChange( + GetFrame()->GetFrame().GetController(), + ::sfx2::sidebar::EnumContext::GetContextEnum( + GetSidebarContextName())); +} + + + + +::rtl::OUString ScDrawShell::GetSidebarContextName (void) { - return ::svx::sidebar::SelectionAnalyzer::GetContextForSelection_SC( - GetDrawView()->GetMarkedObjectList()); + return sfx2::sidebar::EnumContext::GetContextName( + ::svx::sidebar::SelectionAnalyzer::GetContextForSelection_SC( + GetDrawView()->GetMarkedObjectList())); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/drawsh.hxx b/sc/source/ui/inc/drawsh.hxx index d251eee63d77..34050b1375d7 100644 --- a/sc/source/ui/inc/drawsh.hxx +++ b/sc/source/ui/inc/drawsh.hxx @@ -23,7 +23,6 @@ #include <sfx2/shell.hxx> #include "shellids.hxx" #include <sfx2/module.hxx> -#include <sfx2/sidebar/EnumContext.hxx> #include <svx/svdmark.hxx> #include <tools/link.hxx> #include <rtl/ref.hxx> @@ -45,6 +44,7 @@ class ScDrawShell : public SfxShell void SetHlinkForObject( SdrObject* pObj, const OUString& rHlnk ); protected: + virtual void Activate(sal_Bool bMDI); ScViewData* GetViewData() { return pViewData; } public: @@ -83,7 +83,7 @@ public: sal_Bool AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark); void GetDrawAttrStateForIFBX( SfxItemSet& rSet ); - ::sfx2::sidebar::EnumContext::Context GetContextForSelection (void); + ::rtl::OUString GetSidebarContextName (void); }; |