summaryrefslogtreecommitdiff
path: root/sfx2/source
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 20:08:31 +0100
commit17bbff0e686fb32e3062316c238c7bdded037b9a (patch)
treee7d5add80a47c9814889aded8e5135abdb75b2bc /sfx2/source
parenteee523f82fa3d258f720a4c2ea246b52ae141a93 (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 (cherry picked from commit 0143805a565418d2a114c16b7eeba3b784176d9e)
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/control/shell.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 6822af7e8d2c..bbbe3f541533 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -638,17 +638,13 @@ void SfxShell::Activate
in order to give the Subclasses the opportunity to respond to the
to the enabling.
- The base implementation is empty and does not need to be called.
-
[Cross-reference]
StarView SystemWindow::Activate(sal_Bool)
*/
{
- SfxViewFrame* pViewFrame = GetFrame();
- if (pViewFrame != NULL)
- pImp->maContextChangeBroadcaster.Activate(pViewFrame->GetFrame().GetFrameInterface());
+ BroadcastContextForActivation(true);
}
//--------------------------------------------------------------------
@@ -673,19 +669,16 @@ void SfxShell::Deactivate
Virtual method that is called when disabling the SfxShell instance,
to give the Subclasses the opportunity to respond to the disabling.
- The base implementation is empty and does not need to be called.
-
[Cross-reference]
StarView SystemWindow::Dectivate(sal_Bool)
*/
{
- SfxViewFrame* pViewFrame = GetFrame();
- if (pViewFrame != NULL)
- pImp->maContextChangeBroadcaster.Deactivate(pViewFrame->GetFrame().GetFrameInterface());
+ BroadcastContextForActivation(false);
}
+
void SfxShell::ParentActivate
(
)
@@ -1171,6 +1164,16 @@ void SfxShell::SetViewShell_Impl( SfxViewShell* pView )
pImp->pViewSh = pView;
}
-
+void SfxShell::BroadcastContextForActivation (const bool bIsActivated)
+{
+ SfxViewFrame* pViewFrame = GetFrame();
+ if (pViewFrame != NULL)
+ {
+ if (bIsActivated)
+ pImp->maContextChangeBroadcaster.Activate(pViewFrame->GetFrame().GetFrameInterface());
+ else
+ pImp->maContextChangeBroadcaster.Deactivate(pViewFrame->GetFrame().GetFrameInterface());
+ }
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */