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
e52a5e29
Kaydet (Commit)
e52a5e29
authored
Ara 10, 2012
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, use service constructor for ui::GlobalAcceleratorConfiguration
Change-Id: Icab69ba138b28c3baed4352da86a1b3b0c0cc195
üst
2f998bdf
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
31 deletions
+19
-31
acccfg.cxx
cui/source/customize/acccfg.cxx
+2
-2
services.h
framework/inc/services.h
+0
-1
globalacceleratorconfiguration.cxx
...rk/source/accelerators/globalacceleratorconfiguration.cxx
+1
-1
menubarmanager.cxx
framework/source/uielement/menubarmanager.cxx
+2
-3
newmenucontroller.cxx
framework/source/uielement/newmenucontroller.cxx
+2
-3
toolbarmanager.cxx
framework/source/uielement/toolbarmanager.cxx
+2
-3
GlobalAcceleratorConfiguration.idl
offapi/com/sun/star/ui/GlobalAcceleratorConfiguration.idl
+1
-2
acceleratorexecute.hxx
svtools/inc/svtools/acceleratorexecute.hxx
+3
-2
acceleratorexecute.cxx
svtools/source/misc/acceleratorexecute.cxx
+6
-14
No files found.
cui/source/customize/acccfg.cxx
Dosyayı görüntüle @
e52a5e29
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <svl/stritem.hxx>
#include <svl/stritem.hxx>
#include "svtools/treelistentry.hxx"
#include "svtools/treelistentry.hxx"
#include <com/sun/star/embed/StorageFactory.hpp>
#include <com/sun/star/embed/StorageFactory.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <sal/macros.h>
#include <sal/macros.h>
...
@@ -77,7 +78,6 @@ using namespace com::sun::star;
...
@@ -77,7 +78,6 @@ using namespace com::sun::star;
//-----------------------------------------------
//-----------------------------------------------
static
::
rtl
::
OUString
SERVICE_UICONFIGMGR
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.ui.UIConfigurationManager"
));
static
::
rtl
::
OUString
SERVICE_UICONFIGMGR
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.ui.UIConfigurationManager"
));
static
::
rtl
::
OUString
SERVICE_DESKTOP
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.Desktop"
));
static
::
rtl
::
OUString
SERVICE_DESKTOP
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.Desktop"
));
static
::
rtl
::
OUString
SERVICE_GLOBALACCCFG
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.ui.GlobalAcceleratorConfiguration"
));
static
::
rtl
::
OUString
MODULEPROP_SHORTNAME
(
RTL_CONSTASCII_USTRINGPARAM
(
"ooSetupFactoryShortName"
));
static
::
rtl
::
OUString
MODULEPROP_SHORTNAME
(
RTL_CONSTASCII_USTRINGPARAM
(
"ooSetupFactoryShortName"
));
static
::
rtl
::
OUString
MODULEPROP_UINAME
(
RTL_CONSTASCII_USTRINGPARAM
(
"ooSetupFactoryUIName"
));
static
::
rtl
::
OUString
MODULEPROP_UINAME
(
RTL_CONSTASCII_USTRINGPARAM
(
"ooSetupFactoryUIName"
));
...
@@ -852,7 +852,7 @@ void SfxAcceleratorConfigPage::InitAccCfg()
...
@@ -852,7 +852,7 @@ void SfxAcceleratorConfigPage::InitAccCfg()
m_sModuleUIName
=
lModuleProps
.
getUnpackedValueOrDefault
(
MODULEPROP_UINAME
,
::
rtl
::
OUString
());
m_sModuleUIName
=
lModuleProps
.
getUnpackedValueOrDefault
(
MODULEPROP_UINAME
,
::
rtl
::
OUString
());
// get global accelerator configuration
// get global accelerator configuration
m_xGlobal
=
css
::
u
no
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
(
m_xSMGR
->
createInstance
(
SERVICE_GLOBALACCCFG
),
css
::
uno
::
UNO_QUERY_THROW
);
m_xGlobal
=
css
::
u
i
::
GlobalAcceleratorConfiguration
::
create
(
comphelper
::
getComponentContext
(
m_xSMGR
)
);
// get module accelerator configuration
// get module accelerator configuration
...
...
framework/inc/services.h
Dosyayı görüntüle @
e52a5e29
...
@@ -65,7 +65,6 @@ namespace framework{
...
@@ -65,7 +65,6 @@ namespace framework{
#define SERVICENAME_WINDOWSTATECONFIGURATION DECLARE_ASCII("com.sun.star.ui.WindowStateConfiguration" )
#define SERVICENAME_WINDOWSTATECONFIGURATION DECLARE_ASCII("com.sun.star.ui.WindowStateConfiguration" )
#define SERVICENAME_STARTMODULE DECLARE_ASCII("com.sun.star.frame.StartModule" )
#define SERVICENAME_STARTMODULE DECLARE_ASCII("com.sun.star.frame.StartModule" )
#define SERVICENAME_FRAMECONTROLLER DECLARE_ASCII("com.sun.star.frame.Controller" )
#define SERVICENAME_FRAMECONTROLLER DECLARE_ASCII("com.sun.star.frame.Controller" )
#define SERVICENAME_GLOBALACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.GlobalAcceleratorConfiguration")
#define SERVICENAME_MODULEACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.ModuleAcceleratorConfiguration")
#define SERVICENAME_MODULEACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.ModuleAcceleratorConfiguration")
#define SERVICENAME_DOCUMENTACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.DocumentAcceleratorConfiguration")
#define SERVICENAME_DOCUMENTACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.DocumentAcceleratorConfiguration")
#define SERVICENAME_PACKAGESTRUCTURECREATOR DECLARE_ASCII("com.sun.star.embed.PackageStructureCreator" )
#define SERVICENAME_PACKAGESTRUCTURECREATOR DECLARE_ASCII("com.sun.star.embed.PackageStructureCreator" )
...
...
framework/source/accelerators/globalacceleratorconfiguration.cxx
Dosyayı görüntüle @
e52a5e29
...
@@ -53,7 +53,7 @@ DEFINE_XTYPEPROVIDER_2_WITH_BASECLASS(GlobalAcceleratorConfiguration,
...
@@ -53,7 +53,7 @@ DEFINE_XTYPEPROVIDER_2_WITH_BASECLASS(GlobalAcceleratorConfiguration,
DEFINE_XSERVICEINFO_MULTISERVICE
(
GlobalAcceleratorConfiguration
,
DEFINE_XSERVICEINFO_MULTISERVICE
(
GlobalAcceleratorConfiguration
,
::
cppu
::
OWeakObject
,
::
cppu
::
OWeakObject
,
SERVICENAME_GLOBALACCELERATORCONFIGURATION
,
DECLARE_ASCII
(
"com.sun.star.ui.GlobalAcceleratorConfiguration"
)
,
IMPLEMENTATIONNAME_GLOBALACCELERATORCONFIGURATION
)
IMPLEMENTATIONNAME_GLOBALACCELERATORCONFIGURATION
)
DEFINE_INIT_SERVICE
(
GlobalAcceleratorConfiguration
,
DEFINE_INIT_SERVICE
(
GlobalAcceleratorConfiguration
,
...
...
framework/source/uielement/menubarmanager.cxx
Dosyayı görüntüle @
e52a5e29
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
#include <com/sun/star/frame/XPopupMenuController.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
#include <com/sun/star/frame/XUIControllerRegistration.hpp>
#include <com/sun/star/lang/SystemDependent.hpp>
#include <com/sun/star/lang/SystemDependent.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/ItemType.hpp>
#include <com/sun/star/ui/ItemType.hpp>
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
...
@@ -1598,9 +1599,7 @@ void MenuBarManager::RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuSh
...
@@ -1598,9 +1599,7 @@ void MenuBarManager::RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuSh
if
(
!
xGlobalAccelCfg
.
is
()
)
if
(
!
xGlobalAccelCfg
.
is
()
)
{
{
xGlobalAccelCfg
=
Reference
<
XAcceleratorConfiguration
>
(
getServiceFactory
()
->
createInstance
(
xGlobalAccelCfg
=
GlobalAcceleratorConfiguration
::
create
(
comphelper
::
getComponentContext
(
getServiceFactory
())
);
SERVICENAME_GLOBALACCELERATORCONFIGURATION
),
UNO_QUERY
);
m_xGlobalAcceleratorManager
=
xGlobalAccelCfg
;
m_xGlobalAcceleratorManager
=
xGlobalAccelCfg
;
}
}
}
}
...
...
framework/source/uielement/newmenucontroller.cxx
Dosyayı görüntüle @
e52a5e29
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <com/sun/star/awt/MenuItemStyle.hpp>
#include <com/sun/star/awt/MenuItemStyle.hpp>
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <vcl/svapp.hxx>
#include <vcl/svapp.hxx>
...
@@ -215,9 +216,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu )
...
@@ -215,9 +216,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu )
if
(
!
xGlobalAccelCfg
.
is
()
)
if
(
!
xGlobalAccelCfg
.
is
()
)
{
{
xGlobalAccelCfg
=
Reference
<
XAcceleratorConfiguration
>
(
m_xServiceManager
->
createInstance
(
xGlobalAccelCfg
=
GlobalAcceleratorConfiguration
::
create
(
comphelper
::
getComponentContext
(
m_xServiceManager
)
);
SERVICENAME_GLOBALACCELERATORCONFIGURATION
),
UNO_QUERY
);
m_xGlobalAcceleratorManager
=
xGlobalAccelCfg
;
m_xGlobalAcceleratorManager
=
xGlobalAccelCfg
;
}
}
}
}
...
...
framework/source/uielement/toolbarmanager.cxx
Dosyayı görüntüle @
e52a5e29
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/XUIElementSettings.hpp>
#include <com/sun/star/ui/XUIElementSettings.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
...
@@ -2267,9 +2268,7 @@ bool ToolBarManager::RetrieveShortcut( const rtl::OUString& rCommandURL, rtl::OU
...
@@ -2267,9 +2268,7 @@ bool ToolBarManager::RetrieveShortcut( const rtl::OUString& rCommandURL, rtl::OU
if
(
!
xGlobalAccelCfg
.
is
()
)
if
(
!
xGlobalAccelCfg
.
is
()
)
{
{
xGlobalAccelCfg
=
Reference
<
XAcceleratorConfiguration
>
(
m_xServiceManager
->
createInstance
(
xGlobalAccelCfg
=
GlobalAcceleratorConfiguration
::
create
(
comphelper
::
getComponentContext
(
m_xServiceManager
)
);
SERVICENAME_GLOBALACCELERATORCONFIGURATION
),
UNO_QUERY
);
m_xGlobalAcceleratorManager
=
xGlobalAccelCfg
;
m_xGlobalAcceleratorManager
=
xGlobalAccelCfg
;
}
}
}
}
...
...
offapi/com/sun/star/ui/GlobalAcceleratorConfiguration.idl
Dosyayı görüntüle @
e52a5e29
...
@@ -27,8 +27,7 @@ module com { module sun { module star { module ui {
...
@@ -27,8 +27,7 @@ module com { module sun { module star { module ui {
@
since
OOo
2.0
@
since
OOo
2.0
*/
*/
service
GlobalAcceleratorConfiguration
:
XAcceleratorConfiguration
service
GlobalAcceleratorConfiguration
:
XAcceleratorConfiguration
;
{}
;
}
; }; }; }; // com.sun.star
}
; }; }; }; // com.sun.star
...
...
svtools/inc/svtools/acceleratorexecute.hxx
Dosyayı görüntüle @
e52a5e29
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include <vector>
#include <vector>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
...
@@ -201,11 +202,11 @@ class SVT_DLLPUBLIC AcceleratorExecute : private TMutexInit
...
@@ -201,11 +202,11 @@ class SVT_DLLPUBLIC AcceleratorExecute : private TMutexInit
//---------------------------------------
//---------------------------------------
/** TODO document me */
/** TODO document me */
static
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
st_openGlobalConfig
(
const
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>&
xSMGR
);
static
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
st_openGlobalConfig
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
rxContext
);
//---------------------------------------
//---------------------------------------
/** TODO document me */
/** TODO document me */
static
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
st_openModuleConfig
(
const
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>&
xSMGR
,
static
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
st_openModuleConfig
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
rxContext
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xFrame
);
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xFrame
);
//---------------------------------------
//---------------------------------------
...
...
svtools/source/misc/acceleratorexecute.cxx
Dosyayı görüntüle @
e52a5e29
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
...
@@ -142,11 +143,11 @@ void AcceleratorExecute::init(const css::uno::Reference< css::lang::XMultiServic
...
@@ -142,11 +143,11 @@ void AcceleratorExecute::init(const css::uno::Reference< css::lang::XMultiServic
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
xDocCfg
;
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
xDocCfg
;
// global cfg
// global cfg
xGlobalCfg
=
AcceleratorExecute
::
st_openGlobalConfig
(
xSMGR
);
xGlobalCfg
=
css
::
ui
::
GlobalAcceleratorConfiguration
::
create
(
comphelper
::
getComponentContext
(
xSMGR
)
);
if
(
!
bDesktopIsUsed
)
if
(
!
bDesktopIsUsed
)
{
{
// module cfg
// module cfg
xModuleCfg
=
AcceleratorExecute
::
st_openModuleConfig
(
xSMGR
,
xEnv
);
xModuleCfg
=
AcceleratorExecute
::
st_openModuleConfig
(
comphelper
::
getComponentContext
(
xSMGR
)
,
xEnv
);
// doc cfg
// doc cfg
css
::
uno
::
Reference
<
css
::
frame
::
XController
>
xController
;
css
::
uno
::
Reference
<
css
::
frame
::
XController
>
xController
;
...
@@ -365,20 +366,11 @@ KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey)
...
@@ -365,20 +366,11 @@ KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey)
}
}
//-----------------------------------------------
//-----------------------------------------------
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
AcceleratorExecute
::
st_openGlobalConfig
(
const
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>&
xSMGR
)
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
AcceleratorExecute
::
st_openModuleConfig
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
rxContext
,
{
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
xAccCfg
(
xSMGR
->
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.ui.GlobalAcceleratorConfiguration"
))),
css
::
uno
::
UNO_QUERY_THROW
);
return
xAccCfg
;
}
//-----------------------------------------------
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
AcceleratorExecute
::
st_openModuleConfig
(
const
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>&
xSMGR
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xFrame
)
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xFrame
)
{
{
css
::
uno
::
Reference
<
css
::
frame
::
XModuleManager2
>
xModuleDetection
(
css
::
uno
::
Reference
<
css
::
frame
::
XModuleManager2
>
xModuleDetection
(
css
::
frame
::
ModuleManager
::
create
(
comphelper
::
getComponentContext
(
xSMGR
)
));
css
::
frame
::
ModuleManager
::
create
(
rxContext
));
::
rtl
::
OUString
sModule
;
::
rtl
::
OUString
sModule
;
try
try
...
@@ -391,7 +383,7 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st
...
@@ -391,7 +383,7 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st
{
return
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
();
}
{
return
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
();
}
css
::
uno
::
Reference
<
css
::
ui
::
XModuleUIConfigurationManagerSupplier
>
xUISupplier
(
css
::
uno
::
Reference
<
css
::
ui
::
XModuleUIConfigurationManagerSupplier
>
xUISupplier
(
css
::
ui
::
ModuleUIConfigurationManagerSupplier
::
create
(
comphelper
::
getComponentContext
(
xSMGR
)
)
);
css
::
ui
::
ModuleUIConfigurationManagerSupplier
::
create
(
rxContext
)
);
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
xAccCfg
;
css
::
uno
::
Reference
<
css
::
ui
::
XAcceleratorConfiguration
>
xAccCfg
;
try
try
...
...
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