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
99b6c3d4
Kaydet (Commit)
99b6c3d4
authored
Mar 18, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use SolarMutexGuard directly
Change-Id: I8c6a0873e2b0bb371775a2342292a819fe630b51
üst
32a082a7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
20 deletions
+14
-20
menumanager.hxx
framework/inc/classes/menumanager.hxx
+2
-4
menumanager.cxx
framework/source/classes/menumanager.cxx
+11
-15
menubarmanager.cxx
framework/source/uielement/menubarmanager.cxx
+1
-1
No files found.
framework/inc/classes/menumanager.hxx
Dosyayı görüntüle @
99b6c3d4
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
#include <vcl/menu.hxx>
#include <vcl/menu.hxx>
#include <vcl/accel.hxx>
#include <vcl/accel.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase1.hxx>
#include <threadhelp/threadhelpbase.hxx>
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
uno
{
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
uno
{
class
XComponentContext
;
class
XComponentContext
;
...
@@ -44,8 +43,7 @@ namespace framework
...
@@ -44,8 +43,7 @@ namespace framework
class
BmkMenu
;
class
BmkMenu
;
class
AddonMenu
;
class
AddonMenu
;
class
AddonPopupMenu
;
class
AddonPopupMenu
;
class
MenuManager
:
public
ThreadHelpBase
,
class
MenuManager
:
public
::
cppu
::
WeakImplHelper1
<
css
::
frame
::
XStatusListener
>
public
::
cppu
::
WeakImplHelper1
<
css
::
frame
::
XStatusListener
>
{
{
public
:
public
:
MenuManager
(
MenuManager
(
...
@@ -69,7 +67,7 @@ class MenuManager : public ThreadHelpBase ,
...
@@ -69,7 +67,7 @@ class MenuManager : public ThreadHelpBase ,
void
RemoveListener
();
void
RemoveListener
();
static
void
UpdateSpecialWindowMenu
(
Menu
*
pMenu
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
xContext
,
LockHelper
&
_rMutex
);
static
void
UpdateSpecialWindowMenu
(
Menu
*
pMenu
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
xContext
);
static
void
FillMenuImages
(
static
void
FillMenuImages
(
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xFrame
,
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xFrame
,
Menu
*
_pMenu
,
Menu
*
_pMenu
,
...
...
framework/source/classes/menumanager.cxx
Dosyayı görüntüle @
99b6c3d4
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
#include <framework/bmkmenu.hxx>
#include <framework/bmkmenu.hxx>
#include <framework/addonmenu.hxx>
#include <framework/addonmenu.hxx>
#include <framework/imageproducer.hxx>
#include <framework/imageproducer.hxx>
#include <threadhelp/guard.hxx>
#include "framework/addonsoptions.hxx"
#include "framework/addonsoptions.hxx"
#include <classes/fwkresid.hxx>
#include <classes/fwkresid.hxx>
#include <services.h>
#include <services.h>
...
@@ -107,7 +106,6 @@ MenuManager::MenuManager(
...
@@ -107,7 +106,6 @@ MenuManager::MenuManager(
const
Reference
<
XComponentContext
>&
rxContext
,
const
Reference
<
XComponentContext
>&
rxContext
,
Reference
<
XFrame
>&
rFrame
,
Menu
*
pMenu
,
sal_Bool
bDelete
,
sal_Bool
bDeleteChildren
)
Reference
<
XFrame
>&
rFrame
,
Menu
*
pMenu
,
sal_Bool
bDelete
,
sal_Bool
bDeleteChildren
)
:
:
ThreadHelpBase
(
&
Application
::
GetSolarMutex
()
),
m_xContext
(
rxContext
)
m_xContext
(
rxContext
)
{
{
m_bActive
=
sal_False
;
m_bActive
=
sal_False
;
...
@@ -293,7 +291,7 @@ MenuManager::~MenuManager()
...
@@ -293,7 +291,7 @@ MenuManager::~MenuManager()
MenuManager
::
MenuItemHandler
*
MenuManager
::
GetMenuItemHandler
(
sal_uInt16
nItemId
)
MenuManager
::
MenuItemHandler
*
MenuManager
::
GetMenuItemHandler
(
sal_uInt16
nItemId
)
{
{
Guard
aGuard
(
m_aLock
)
;
SolarMutexGuard
g
;
std
::
vector
<
MenuItemHandler
*
>::
iterator
p
;
std
::
vector
<
MenuItemHandler
*
>::
iterator
p
;
for
(
p
=
m_aMenuItemHandlerVector
.
begin
();
p
!=
m_aMenuItemHandlerVector
.
end
();
++
p
)
for
(
p
=
m_aMenuItemHandlerVector
.
begin
();
p
!=
m_aMenuItemHandlerVector
.
end
();
++
p
)
...
@@ -314,7 +312,7 @@ throw ( RuntimeException, std::exception )
...
@@ -314,7 +312,7 @@ throw ( RuntimeException, std::exception )
MenuItemHandler
*
pStatusChangedMenu
=
NULL
;
MenuItemHandler
*
pStatusChangedMenu
=
NULL
;
{
{
Guard
aGuard
(
m_aLock
)
;
SolarMutexGuard
g
;
std
::
vector
<
MenuItemHandler
*
>::
iterator
p
;
std
::
vector
<
MenuItemHandler
*
>::
iterator
p
;
for
(
p
=
m_aMenuItemHandlerVector
.
begin
();
p
!=
m_aMenuItemHandlerVector
.
end
();
++
p
)
for
(
p
=
m_aMenuItemHandlerVector
.
begin
();
p
!=
m_aMenuItemHandlerVector
.
end
();
++
p
)
...
@@ -332,8 +330,6 @@ throw ( RuntimeException, std::exception )
...
@@ -332,8 +330,6 @@ throw ( RuntimeException, std::exception )
{
{
SolarMutexGuard
aSolarGuard
;
SolarMutexGuard
aSolarGuard
;
{
{
Guard
aGuard
(
m_aLock
);
sal_Bool
bSetCheckmark
=
sal_False
;
sal_Bool
bSetCheckmark
=
sal_False
;
sal_Bool
bCheckmark
=
sal_False
;
sal_Bool
bCheckmark
=
sal_False
;
sal_Bool
bMenuItemEnabled
=
m_pVCLMenu
->
IsItemEnabled
(
pStatusChangedMenu
->
nItemId
);
sal_Bool
bMenuItemEnabled
=
m_pVCLMenu
->
IsItemEnabled
(
pStatusChangedMenu
->
nItemId
);
...
@@ -372,7 +368,7 @@ throw ( RuntimeException, std::exception )
...
@@ -372,7 +368,7 @@ throw ( RuntimeException, std::exception )
void
MenuManager
::
RemoveListener
()
void
MenuManager
::
RemoveListener
()
{
{
Guard
aGuard
(
m_aLock
)
;
SolarMutexGuard
g
;
ClearMenuDispatch
();
ClearMenuDispatch
();
}
}
...
@@ -411,7 +407,7 @@ void SAL_CALL MenuManager::disposing( const EventObject& Source ) throw ( Runtim
...
@@ -411,7 +407,7 @@ void SAL_CALL MenuManager::disposing( const EventObject& Source ) throw ( Runtim
{
{
if
(
Source
.
Source
==
m_xFrame
)
if
(
Source
.
Source
==
m_xFrame
)
{
{
Guard
aGuard
(
m_aLock
)
;
SolarMutexGuard
g
;
ClearMenuDispatch
(
Source
,
false
);
ClearMenuDispatch
(
Source
,
false
);
}
}
else
else
...
@@ -420,7 +416,7 @@ void SAL_CALL MenuManager::disposing( const EventObject& Source ) throw ( Runtim
...
@@ -420,7 +416,7 @@ void SAL_CALL MenuManager::disposing( const EventObject& Source ) throw ( Runtim
MenuItemHandler
*
pMenuItemDisposing
=
NULL
;
MenuItemHandler
*
pMenuItemDisposing
=
NULL
;
{
{
Guard
aGuard
(
m_aLock
)
;
SolarMutexGuard
g
;
std
::
vector
<
MenuItemHandler
*
>::
iterator
p
;
std
::
vector
<
MenuItemHandler
*
>::
iterator
p
;
for
(
p
=
m_aMenuItemHandlerVector
.
begin
();
p
!=
m_aMenuItemHandlerVector
.
end
();
++
p
)
for
(
p
=
m_aMenuItemHandlerVector
.
begin
();
p
!=
m_aMenuItemHandlerVector
.
end
();
++
p
)
...
@@ -517,7 +513,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
...
@@ -517,7 +513,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
}
}
{
{
Guard
aGuard
(
m_aLock
)
;
SolarMutexGuard
g
;
int
nRemoveItemCount
=
0
;
int
nRemoveItemCount
=
0
;
int
nItemCount
=
pMenu
->
GetItemCount
();
int
nItemCount
=
pMenu
->
GetItemCount
();
...
@@ -614,7 +610,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
...
@@ -614,7 +610,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
}
}
}
}
void
MenuManager
::
UpdateSpecialWindowMenu
(
Menu
*
pMenu
,
const
Reference
<
XComponentContext
>&
xContext
,
LockHelper
&
_rMutex
)
void
MenuManager
::
UpdateSpecialWindowMenu
(
Menu
*
pMenu
,
const
Reference
<
XComponentContext
>&
xContext
)
{
{
// update window list
// update window list
::
std
::
vector
<
OUString
>
aNewWindowListVector
;
::
std
::
vector
<
OUString
>
aNewWindowListVector
;
...
@@ -648,7 +644,7 @@ void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu,const Reference< XCompone
...
@@ -648,7 +644,7 @@ void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu,const Reference< XCompone
}
}
{
{
Guard
aGuard
(
_rMutex
)
;
SolarMutexGuard
g
;
int
nItemCount
=
pMenu
->
GetItemCount
();
int
nItemCount
=
pMenu
->
GetItemCount
();
...
@@ -755,7 +751,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
...
@@ -755,7 +751,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
if
(
m_aMenuItemCommand
==
aSpecialFileMenu
||
m_aMenuItemCommand
==
aSlotSpecialFileMenu
||
aCommand
==
aSpecialFileCommand
)
if
(
m_aMenuItemCommand
==
aSpecialFileMenu
||
m_aMenuItemCommand
==
aSlotSpecialFileMenu
||
aCommand
==
aSpecialFileCommand
)
UpdateSpecialFileMenu
(
pMenu
);
UpdateSpecialFileMenu
(
pMenu
);
else
if
(
m_aMenuItemCommand
==
aSpecialWindowMenu
||
m_aMenuItemCommand
==
aSlotSpecialWindowMenu
||
aCommand
==
aSpecialWindowCommand
)
else
if
(
m_aMenuItemCommand
==
aSpecialWindowMenu
||
m_aMenuItemCommand
==
aSlotSpecialWindowMenu
||
aCommand
==
aSpecialWindowCommand
)
UpdateSpecialWindowMenu
(
pMenu
,
m_xContext
,
m_aLock
);
UpdateSpecialWindowMenu
(
pMenu
,
m_xContext
);
// Check if some modes have changed so we have to update our menu images
// Check if some modes have changed so we have to update our menu images
if
(
bShowMenuImages
!=
m_bShowMenuImages
)
if
(
bShowMenuImages
!=
m_bShowMenuImages
)
...
@@ -771,7 +767,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
...
@@ -771,7 +767,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
{
{
URL
aTargetURL
;
URL
aTargetURL
;
Guard
aGuard
(
m_aLock
)
;
SolarMutexGuard
g
;
Reference
<
XDispatchProvider
>
xDispatchProvider
(
m_xFrame
,
UNO_QUERY
);
Reference
<
XDispatchProvider
>
xDispatchProvider
(
m_xFrame
,
UNO_QUERY
);
if
(
xDispatchProvider
.
is
()
)
if
(
xDispatchProvider
.
is
()
)
...
@@ -841,7 +837,7 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu )
...
@@ -841,7 +837,7 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu )
Reference
<
XDispatch
>
xDispatch
;
Reference
<
XDispatch
>
xDispatch
;
{
{
Guard
aGuard
(
m_aLock
)
;
SolarMutexGuard
g
;
sal_uInt16
nCurItemId
=
pMenu
->
GetCurItemId
();
sal_uInt16
nCurItemId
=
pMenu
->
GetCurItemId
();
if
(
pMenu
==
m_pVCLMenu
&&
if
(
pMenu
==
m_pVCLMenu
&&
...
...
framework/source/uielement/menubarmanager.cxx
Dosyayı görüntüle @
99b6c3d4
...
@@ -818,7 +818,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
...
@@ -818,7 +818,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
OUString
aMenuCommand
(
m_aMenuItemCommand
);
OUString
aMenuCommand
(
m_aMenuItemCommand
);
if
(
m_aMenuItemCommand
==
aSpecialWindowMenu
||
m_aMenuItemCommand
==
aSlotSpecialWindowMenu
||
aMenuCommand
==
aSpecialWindowCommand
)
if
(
m_aMenuItemCommand
==
aSpecialWindowMenu
||
m_aMenuItemCommand
==
aSlotSpecialWindowMenu
||
aMenuCommand
==
aSpecialWindowCommand
)
MenuManager
::
UpdateSpecialWindowMenu
(
pMenu
,
m_xContext
,
m_aLock
);
MenuManager
::
UpdateSpecialWindowMenu
(
pMenu
,
m_xContext
);
// Check if some modes have changed so we have to update our menu images
// Check if some modes have changed so we have to update our menu images
OUString
sIconTheme
=
SvtMiscOptions
().
GetIconTheme
();
OUString
sIconTheme
=
SvtMiscOptions
().
GetIconTheme
();
...
...
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