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/source/ui/drawfunc/drawsh2.cxx | |
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/source/ui/drawfunc/drawsh2.cxx')
-rw-r--r-- | sc/source/ui/drawfunc/drawsh2.cxx | 26 |
1 files changed, 22 insertions, 4 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: */ |