Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
520cc667
Kaydet (Commit)
520cc667
authored
Eki 02, 2013
tarafından
Andre Fischer
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
123276: Properly forward Deactivate() call and still don't broadcast context change.
üst
685921ea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
3 deletions
+44
-3
drviews1.cxx
sd/source/ui/view/drviews1.cxx
+7
-2
shell.hxx
sfx2/inc/sfx2/shell.hxx
+4
-0
ContextChangeBroadcaster.hxx
sfx2/inc/sfx2/sidebar/ContextChangeBroadcaster.hxx
+9
-0
shell.cxx
sfx2/source/control/shell.cxx
+9
-0
ContextChangeBroadcaster.cxx
sfx2/source/sidebar/ContextChangeBroadcaster.cxx
+15
-1
No files found.
sd/source/ui/view/drviews1.cxx
Dosyayı görüntüle @
520cc667
...
@@ -53,7 +53,6 @@
...
@@ -53,7 +53,6 @@
#include <svx/fmglob.hxx>
#include <svx/fmglob.hxx>
#include <editeng/outliner.hxx>
#include <editeng/outliner.hxx>
#include "misc.hxx"
#include "misc.hxx"
#ifdef STARIMAGE_AVAILABLE
#ifdef STARIMAGE_AVAILABLE
...
@@ -148,7 +147,13 @@ void DrawViewShell::UIDeactivated( SfxInPlaceClient* pCli )
...
@@ -148,7 +147,13 @@ void DrawViewShell::UIDeactivated( SfxInPlaceClient* pCli )
void
DrawViewShell
::
Deactivate
(
sal_Bool
bIsMDIActivate
)
void
DrawViewShell
::
Deactivate
(
sal_Bool
bIsMDIActivate
)
{
{
// Do not forward to ViewShell::Deactivate() to prevent a context change.
// Temporarily disable context broadcasting while the Deactivate()
// call is forwarded to our base class.
const
bool
bIsContextBroadcasterEnabled
(
SfxShell
::
SetContextBroadcasterEnabled
(
false
));
ViewShell
::
Deactivate
(
bIsMDIActivate
);
SfxShell
::
SetContextBroadcasterEnabled
(
bIsContextBroadcasterEnabled
);
}
}
namespace
namespace
...
...
sfx2/inc/sfx2/shell.hxx
Dosyayı görüntüle @
520cc667
...
@@ -269,6 +269,10 @@ public:
...
@@ -269,6 +269,10 @@ public:
*/
*/
void
BroadcastContextForActivation
(
const
bool
bIsActivated
);
void
BroadcastContextForActivation
(
const
bool
bIsActivated
);
/** Enabled or disable the context broadcaster. Returns the old state.
*/
bool
SetContextBroadcasterEnabled
(
const
bool
bIsEnabled
);
#ifndef _SFXSH_HXX
#ifndef _SFXSH_HXX
SAL_DLLPRIVATE
bool
CanExecuteSlot_Impl
(
const
SfxSlot
&
rSlot
);
SAL_DLLPRIVATE
bool
CanExecuteSlot_Impl
(
const
SfxSlot
&
rSlot
);
SAL_DLLPRIVATE
void
DoActivate_Impl
(
SfxViewFrame
*
pFrame
,
sal_Bool
bMDI
);
SAL_DLLPRIVATE
void
DoActivate_Impl
(
SfxViewFrame
*
pFrame
,
sal_Bool
bMDI
);
...
...
sfx2/inc/sfx2/sidebar/ContextChangeBroadcaster.hxx
Dosyayı görüntüle @
520cc667
...
@@ -44,9 +44,18 @@ public:
...
@@ -44,9 +44,18 @@ public:
void
Activate
(
const
cssu
::
Reference
<
css
::
frame
::
XFrame
>&
rxFrame
);
void
Activate
(
const
cssu
::
Reference
<
css
::
frame
::
XFrame
>&
rxFrame
);
void
Deactivate
(
const
cssu
::
Reference
<
css
::
frame
::
XFrame
>&
rxFrame
);
void
Deactivate
(
const
cssu
::
Reference
<
css
::
frame
::
XFrame
>&
rxFrame
);
/** Enable or disable the broadcaster.
@param bIsEnabled
The new value of the "enabled" state.
@return
The old value of the "enabled" state is returned.
*/
bool
SetBroadcasterEnabled
(
const
bool
bIsEnabled
);
private
:
private
:
rtl
::
OUString
msContextName
;
rtl
::
OUString
msContextName
;
bool
mbIsContextActive
;
bool
mbIsContextActive
;
bool
mbIsBroadcasterEnabled
;
void
BroadcastContextChange
(
void
BroadcastContextChange
(
const
cssu
::
Reference
<
css
::
frame
::
XFrame
>&
rxFrame
,
const
cssu
::
Reference
<
css
::
frame
::
XFrame
>&
rxFrame
,
...
...
sfx2/source/control/shell.cxx
Dosyayı görüntüle @
520cc667
...
@@ -1289,6 +1289,7 @@ void SfxShell::SetViewShell_Impl( SfxViewShell* pView )
...
@@ -1289,6 +1289,7 @@ void SfxShell::SetViewShell_Impl( SfxViewShell* pView )
void
SfxShell
::
BroadcastContextForActivation
(
const
bool
bIsActivated
)
void
SfxShell
::
BroadcastContextForActivation
(
const
bool
bIsActivated
)
{
{
SfxViewFrame
*
pViewFrame
=
GetFrame
();
SfxViewFrame
*
pViewFrame
=
GetFrame
();
...
@@ -1298,3 +1299,11 @@ void SfxShell::BroadcastContextForActivation (const bool bIsActivated)
...
@@ -1298,3 +1299,11 @@ void SfxShell::BroadcastContextForActivation (const bool bIsActivated)
else
else
pImp
->
maContextChangeBroadcaster
.
Deactivate
(
pViewFrame
->
GetFrame
().
GetFrameInterface
());
pImp
->
maContextChangeBroadcaster
.
Deactivate
(
pViewFrame
->
GetFrame
().
GetFrameInterface
());
}
}
bool
SfxShell
::
SetContextBroadcasterEnabled
(
const
bool
bIsEnabled
)
{
return
pImp
->
maContextChangeBroadcaster
.
SetBroadcasterEnabled
(
bIsEnabled
);
}
sfx2/source/sidebar/ContextChangeBroadcaster.cxx
Dosyayı görüntüle @
520cc667
...
@@ -39,7 +39,8 @@ namespace sfx2 { namespace sidebar {
...
@@ -39,7 +39,8 @@ namespace sfx2 { namespace sidebar {
ContextChangeBroadcaster
::
ContextChangeBroadcaster
(
void
)
ContextChangeBroadcaster
::
ContextChangeBroadcaster
(
void
)
:
msContextName
(),
:
msContextName
(),
mbIsContextActive
(
false
)
mbIsContextActive
(
false
),
mbIsBroadcasterEnabled
(
true
)
{
{
}
}
...
@@ -85,11 +86,24 @@ void ContextChangeBroadcaster::Deactivate (const cssu::Reference<css::frame::XFr
...
@@ -85,11 +86,24 @@ void ContextChangeBroadcaster::Deactivate (const cssu::Reference<css::frame::XFr
bool
ContextChangeBroadcaster
::
SetBroadcasterEnabled
(
const
bool
bIsEnabled
)
{
const
bool
bWasEnabled
(
mbIsBroadcasterEnabled
);
mbIsBroadcasterEnabled
=
bIsEnabled
;
return
bWasEnabled
;
}
void
ContextChangeBroadcaster
::
BroadcastContextChange
(
void
ContextChangeBroadcaster
::
BroadcastContextChange
(
const
cssu
::
Reference
<
css
::
frame
::
XFrame
>&
rxFrame
,
const
cssu
::
Reference
<
css
::
frame
::
XFrame
>&
rxFrame
,
const
::
rtl
::
OUString
&
rsModuleName
,
const
::
rtl
::
OUString
&
rsModuleName
,
const
::
rtl
::
OUString
&
rsContextName
)
const
::
rtl
::
OUString
&
rsContextName
)
{
{
if
(
!
mbIsBroadcasterEnabled
)
return
;
if
(
rsContextName
.
getLength
()
==
0
)
if
(
rsContextName
.
getLength
()
==
0
)
return
;
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment