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
207bbf87
Kaydet (Commit)
207bbf87
authored
Nis 06, 2011
tarafından
Xisco Fauli
Kaydeden (comit)
Tor Lillqvist
Nis 07, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use RTL_CONSTASCII_USTRINGPARAM
üst
265a8353
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
39 deletions
+37
-39
undomanagerhelper.cxx
framework/source/fwe/helper/undomanagerhelper.cxx
+2
-2
helpers.cxx
framework/source/layoutmanager/helpers.cxx
+1
-1
FrameHelper.cxx
framework/source/lomenubar/FrameHelper.cxx
+27
-29
FrameJob.cxx
framework/source/lomenubar/FrameJob.cxx
+7
-7
No files found.
framework/source/fwe/helper/undomanagerhelper.cxx
Dosyayı görüntüle @
207bbf87
...
@@ -651,7 +651,7 @@ namespace framework
...
@@ -651,7 +651,7 @@ namespace framework
?
rUndoManager
.
GetUndoActionCount
(
IUndoManager
::
TopLevel
)
?
rUndoManager
.
GetUndoActionCount
(
IUndoManager
::
TopLevel
)
:
rUndoManager
.
GetRedoActionCount
(
IUndoManager
::
TopLevel
);
:
rUndoManager
.
GetRedoActionCount
(
IUndoManager
::
TopLevel
);
if
(
nElements
==
0
)
if
(
nElements
==
0
)
throw
EmptyUndoStackException
(
::
rtl
::
OUString
::
createFromAscii
(
"stack is empty"
),
getXUndoManager
()
);
throw
EmptyUndoStackException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"stack is empty"
)
),
getXUndoManager
()
);
aGuard
.
clear
();
aGuard
.
clear
();
// <--- SYNCHRONIZED
// <--- SYNCHRONIZED
...
@@ -1116,7 +1116,7 @@ namespace framework
...
@@ -1116,7 +1116,7 @@ namespace framework
IUndoManager
&
rUndoManager
=
m_pImpl
->
getUndoManager
();
IUndoManager
&
rUndoManager
=
m_pImpl
->
getUndoManager
();
if
(
rUndoManager
.
IsUndoEnabled
()
)
if
(
rUndoManager
.
IsUndoEnabled
()
)
throw
NotLockedException
(
::
rtl
::
OUString
::
createFromAscii
(
"Undo manager is not locked"
),
m_pImpl
->
getXUndoManager
()
);
throw
NotLockedException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Undo manager is not locked"
)
),
m_pImpl
->
getXUndoManager
()
);
rUndoManager
.
EnableUndo
(
true
);
rUndoManager
.
EnableUndo
(
true
);
// <--- SYNCHRONIZED
// <--- SYNCHRONIZED
}
}
...
...
framework/source/layoutmanager/helpers.cxx
Dosyayı görüntüle @
207bbf87
...
@@ -381,7 +381,7 @@ void impl_setDockingWindowVisibility( const css::uno::Reference< css::lang::XMul
...
@@ -381,7 +381,7 @@ void impl_setDockingWindowVisibility( const css::uno::Reference< css::lang::XMul
xDispatcher
->
executeDispatch
(
xDispatcher
->
executeDispatch
(
xProvider
,
xProvider
,
aDockWinCommand
,
aDockWinCommand
,
::
rtl
::
OUString
::
createFromAscii
(
"_self"
),
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"_self"
)
),
0
,
0
,
aArgs
);
aArgs
);
}
}
...
...
framework/source/lomenubar/FrameHelper.cxx
Dosyayı görüntüle @
207bbf87
...
@@ -131,9 +131,9 @@ item_about_to_show (DbusmenuMenuitem *item, gpointer user_data)
...
@@ -131,9 +131,9 @@ item_about_to_show (DbusmenuMenuitem *item, gpointer user_data)
FrameHelper
*
helper
=
(
FrameHelper
*
)
user_data
;
FrameHelper
*
helper
=
(
FrameHelper
*
)
user_data
;
Reference
<
XFrame
>
xFrame
=
helper
->
getFrame
();
Reference
<
XFrame
>
xFrame
=
helper
->
getFrame
();
Reference
<
XPropertySet
>
frameProps
(
xFrame
,
UNO_QUERY
);
Reference
<
XPropertySet
>
frameProps
(
xFrame
,
UNO_QUERY
);
Reference
<
XLayoutManager
>
xLayoutManager
(
frameProps
->
getPropertyValue
(
OUString
::
createFromAscii
(
"LayoutManager"
)),
Reference
<
XLayoutManager
>
xLayoutManager
(
frameProps
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"LayoutManager"
)
)),
UNO_QUERY
);
UNO_QUERY
);
Reference
<
XUIElement
>
menuBar
(
xLayoutManager
->
getElement
(
OUString
::
createFromAscii
(
"private:resource/menubar/menubar"
)),
Reference
<
XUIElement
>
menuBar
(
xLayoutManager
->
getElement
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"private:resource/menubar/menubar"
)
)),
UNO_QUERY
);
UNO_QUERY
);
Reference
<
XPropertySet
>
menuPropSet
(
menuBar
,
UNO_QUERY
);
Reference
<
XPropertySet
>
menuPropSet
(
menuBar
,
UNO_QUERY
);
...
@@ -142,7 +142,7 @@ item_about_to_show (DbusmenuMenuitem *item, gpointer user_data)
...
@@ -142,7 +142,7 @@ item_about_to_show (DbusmenuMenuitem *item, gpointer user_data)
return
FALSE
;
return
FALSE
;
}
}
Reference
<
XMenu
>
xMenu
(
menuPropSet
->
getPropertyValue
(
OUString
::
createFromAscii
(
"XMenuBar"
)),
Reference
<
XMenu
>
xMenu
(
menuPropSet
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"XMenuBar"
)
)),
UNO_QUERY
);
UNO_QUERY
);
if
(
!
xMenu
.
is
())
if
(
!
xMenu
.
is
())
{
{
...
@@ -204,14 +204,14 @@ FrameHelper::FrameHelper(const Reference< XMultiServiceFactory >& rServiceManag
...
@@ -204,14 +204,14 @@ FrameHelper::FrameHelper(const Reference< XMultiServiceFactory >& rServiceManag
this
->
m_server
=
server
;
this
->
m_server
=
server
;
//Get xUICommands database (to retrieve labels, see FrameJob::getLabelFromCommandURL ())
//Get xUICommands database (to retrieve labels, see FrameJob::getLabelFromCommandURL ())
Reference
<
XNameAccess
>
xNameAccess
(
m_xMSF
->
createInstance
(
OUString
::
createFromAscii
(
"com.sun.star.frame.UICommandDescription"
)),
Reference
<
XNameAccess
>
xNameAccess
(
m_xMSF
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.UICommandDescription"
)
)),
UNO_QUERY
);
UNO_QUERY
);
m_xMM
=
Reference
<
XModuleManager
>
(
m_xMSF
->
createInstance
(
OUString
::
createFromAscii
(
"com.sun.star.frame.ModuleManager"
)),
m_xMM
=
Reference
<
XModuleManager
>
(
m_xMSF
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.ModuleManager"
)
)),
UNO_QUERY
);
UNO_QUERY
);
xNameAccess
->
getByName
(
m_xMM
->
identify
(
xFrame
))
>>=
m_xUICommands
;
xNameAccess
->
getByName
(
m_xMM
->
identify
(
xFrame
))
>>=
m_xUICommands
;
m_xdp
=
Reference
<
XDispatchProvider
>
(
xFrame
,
UNO_QUERY
);
m_xdp
=
Reference
<
XDispatchProvider
>
(
xFrame
,
UNO_QUERY
);
m_xTrans
=
Reference
<
XURLTransformer
>
(
m_xMSF
->
createInstance
(
rtl
::
OUString
::
createFromAscii
(
"com.sun.star.util.URLTransformer"
)),
UNO_QUERY
);
m_xTrans
=
Reference
<
XURLTransformer
>
(
m_xMSF
->
createInstance
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.util.URLTransformer"
)
)),
UNO_QUERY
);
m_xSL
=
(
XStatusListener
*
)
new
MenuItemStatusListener
(
this
);
m_xSL
=
(
XStatusListener
*
)
new
MenuItemStatusListener
(
this
);
...
@@ -219,7 +219,7 @@ FrameHelper::FrameHelper(const Reference< XMultiServiceFactory >& rServiceManag
...
@@ -219,7 +219,7 @@ FrameHelper::FrameHelper(const Reference< XMultiServiceFactory >& rServiceManag
getAcceleratorConfigurations
(
xFrame
->
getController
()
->
getModel
(),
m_xMM
);
getAcceleratorConfigurations
(
xFrame
->
getController
()
->
getModel
(),
m_xMM
);
// This information is needed for the dynamic submenus
// This information is needed for the dynamic submenus
m_xPCF
=
Reference
<
XMultiComponentFactory
>
(
m_xMSF
->
createInstance
(
OUString
::
createFromAscii
(
"com.sun.star.frame.PopupMenuControllerFactory"
)),
m_xPCF
=
Reference
<
XMultiComponentFactory
>
(
m_xMSF
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.PopupMenuControllerFactory"
)
)),
UNO_QUERY
);
UNO_QUERY
);
...
@@ -234,11 +234,11 @@ FrameHelper::FrameHelper(const Reference< XMultiServiceFactory >& rServiceManag
...
@@ -234,11 +234,11 @@ FrameHelper::FrameHelper(const Reference< XMultiServiceFactory >& rServiceManag
m_args
=
Sequence
<
Any
>
(
2
);
m_args
=
Sequence
<
Any
>
(
2
);
PropertyValue
item
;
PropertyValue
item
;
item
.
Name
=
OUString
::
createFromAscii
(
"ModuleName"
);
item
.
Name
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"ModuleName"
)
);
item
.
Value
<<=
m_xMM
->
identify
(
xFrame
);
item
.
Value
<<=
m_xMM
->
identify
(
xFrame
);
m_args
[
0
]
<<=
item
;
m_args
[
0
]
<<=
item
;
item
.
Name
=
OUString
::
createFromAscii
(
"Frame"
);
item
.
Name
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Frame"
)
);
item
.
Value
<<=
xFrame
;
item
.
Value
<<=
xFrame
;
m_args
[
1
]
<<=
item
;
m_args
[
1
]
<<=
item
;
...
@@ -343,9 +343,9 @@ FrameHelper::frameAction(const FrameActionEvent& action) throw (RuntimeException
...
@@ -343,9 +343,9 @@ FrameHelper::frameAction(const FrameActionEvent& action) throw (RuntimeException
m_xFrame
->
removeFrameActionListener
(
this
);
m_xFrame
->
removeFrameActionListener
(
this
);
Reference
<
XPropertySet
>
frameProps
(
m_xFrame
,
UNO_QUERY
);
Reference
<
XPropertySet
>
frameProps
(
m_xFrame
,
UNO_QUERY
);
Reference
<
XLayoutManager
>
xLayoutManager
(
frameProps
->
getPropertyValue
(
OUString
::
createFromAscii
(
"LayoutManager"
)),
Reference
<
XLayoutManager
>
xLayoutManager
(
frameProps
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"LayoutManager"
)
)),
UNO_QUERY
);
UNO_QUERY
);
xLayoutManager
->
showElement
(
OUString
::
createFromAscii
(
"private:resource/menubar/menubar"
));
xLayoutManager
->
showElement
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"private:resource/menubar/menubar"
)
));
unsigned
long
xid
=
getXID
();
unsigned
long
xid
=
getXID
();
...
@@ -447,7 +447,7 @@ FrameHelper::rebuildMenu (Reference < XMenu > xMenu,
...
@@ -447,7 +447,7 @@ FrameHelper::rebuildMenu (Reference < XMenu > xMenu,
continue
;
continue
;
// We drop the WindowList, doesn't work properly and it's useless anyhow
// We drop the WindowList, doesn't work properly and it's useless anyhow
if
(
oUCommand
.
equals
(
OUString
::
createFromAscii
(
".uno:WindowList"
)))
if
(
oUCommand
.
equals
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:WindowList"
)
)))
continue
;
continue
;
//We set the default properties (in case it was not visible or a separator)
//We set the default properties (in case it was not visible or a separator)
...
@@ -551,7 +551,7 @@ FrameHelper::rebuildMenu (Reference < XMenu > xMenu,
...
@@ -551,7 +551,7 @@ FrameHelper::rebuildMenu (Reference < XMenu > xMenu,
if
(
isSpecialSubmenu
(
oUCommand
))
if
(
isSpecialSubmenu
(
oUCommand
))
{
{
Reference
<
XPropertySet
>
xMSFProps
(
m_xMSF
,
UNO_QUERY
);
Reference
<
XPropertySet
>
xMSFProps
(
m_xMSF
,
UNO_QUERY
);
Reference
<
XComponentContext
>
xContext
(
xMSFProps
->
getPropertyValue
(
OUString
::
createFromAscii
(
"DefaultContext"
)),
Reference
<
XComponentContext
>
xContext
(
xMSFProps
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DefaultContext"
)
)),
UNO_QUERY
);
UNO_QUERY
);
Reference
<
XPopupMenuController
>
xRFC
(
m_xPCF
->
createInstanceWithArgumentsAndContext
(
oUCommand
,
Reference
<
XPopupMenuController
>
xRFC
(
m_xPCF
->
createInstanceWithArgumentsAndContext
(
oUCommand
,
...
@@ -559,7 +559,7 @@ FrameHelper::rebuildMenu (Reference < XMenu > xMenu,
...
@@ -559,7 +559,7 @@ FrameHelper::rebuildMenu (Reference < XMenu > xMenu,
xContext
),
xContext
),
UNO_QUERY
);
UNO_QUERY
);
Reference
<
XPopupMenu
>
xPO
(
m_xMSF
->
createInstance
(
OUString
::
createFromAscii
(
"stardiv.Toolkit.VCLXPopupMenu"
)),
Reference
<
XPopupMenu
>
xPO
(
m_xMSF
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"stardiv.Toolkit.VCLXPopupMenu"
)
)),
UNO_QUERY
);
UNO_QUERY
);
if
(
xRFC
.
is
()
&&
xPO
.
is
())
if
(
xRFC
.
is
()
&&
xPO
.
is
())
...
@@ -636,16 +636,16 @@ FrameHelper::rebuildMenuFromRoot ()
...
@@ -636,16 +636,16 @@ FrameHelper::rebuildMenuFromRoot ()
{
{
Reference
<
XFrame
>
xFrame
=
getFrame
();
Reference
<
XFrame
>
xFrame
=
getFrame
();
Reference
<
XPropertySet
>
frameProps
(
xFrame
,
UNO_QUERY
);
Reference
<
XPropertySet
>
frameProps
(
xFrame
,
UNO_QUERY
);
Reference
<
XLayoutManager
>
xLayoutManager
(
frameProps
->
getPropertyValue
(
OUString
::
createFromAscii
(
"LayoutManager"
)
),
Reference
<
XLayoutManager
>
xLayoutManager
(
frameProps
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"LayoutManager"
)
=
),
UNO_QUERY
);
UNO_QUERY
);
Reference
<
XUIElement
>
menuBar
(
xLayoutManager
->
getElement
(
OUString
::
createFromAscii
(
"private:resource/menubar/menubar"
)),
Reference
<
XUIElement
>
menuBar
(
xLayoutManager
->
getElement
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"private:resource/menubar/menubar"
)
)),
UNO_QUERY
);
UNO_QUERY
);
Reference
<
XPropertySet
>
menuPropSet
(
menuBar
,
UNO_QUERY
);
Reference
<
XPropertySet
>
menuPropSet
(
menuBar
,
UNO_QUERY
);
if
(
!
menuPropSet
.
is
())
if
(
!
menuPropSet
.
is
())
return
;
return
;
Reference
<
XMenu
>
xMenu
(
menuPropSet
->
getPropertyValue
(
OUString
::
createFromAscii
(
"XMenuBar"
)),
Reference
<
XMenu
>
xMenu
(
menuPropSet
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"XMenuBar"
)
)),
UNO_QUERY
);
UNO_QUERY
);
if
(
!
xMenu
.
is
())
if
(
!
xMenu
.
is
())
return
;
return
;
...
@@ -680,15 +680,13 @@ FrameHelper::isSpecialSubmenu (OUString command)
...
@@ -680,15 +680,13 @@ FrameHelper::isSpecialSubmenu (OUString command)
void
void
FrameHelper
::
dispatchCommand
(
OUString
command
)
FrameHelper
::
dispatchCommand
(
OUString
command
)
{
{
OUString
target
=
OUString
::
createFromAscii
(
""
);
OUString
target
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
""
)
);
Reference
<
XDispatchHelper
>
xdh
(
m_xMSF
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.DispatchHelper"
))),
Reference
<
XDispatchHelper
>
xdh
(
m_xMSF
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.DispatchHelper"
))),
UNO_QUERY
);
UNO_QUERY
);
//g_debug ("%s", OUStringToOString (command, RTL_TEXTENCODING_ASCII_US).getStr());
// This is a special case, we don't want the helper to be disconnected from the frame
// This is a special case, we don't want the helper to be disconnected from the frame
// when PrintPreview dettaches. See the frameAction method.
// when PrintPreview dettaches. See the frameAction method.
if
(
command
.
equals
(
OUString
::
createFromAscii
(
".uno:PrintPreview"
)))
if
(
command
.
equals
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:PrintPreview"
)
)))
{
{
m_blockDetach
=
TRUE
;
m_blockDetach
=
TRUE
;
}
}
...
@@ -696,18 +694,18 @@ FrameHelper::dispatchCommand (OUString command)
...
@@ -696,18 +694,18 @@ FrameHelper::dispatchCommand (OUString command)
// This is a special case for the recentfilelist
// This is a special case for the recentfilelist
if
(
command
.
matchAsciiL
(
"vnd.sun.star.popup:RecentFileList"
,
33
,
0
))
if
(
command
.
matchAsciiL
(
"vnd.sun.star.popup:RecentFileList"
,
33
,
0
))
{
{
target
=
OUString
::
createFromAscii
(
"_default"
);
target
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"_default"
)
);
Reference
<
XPropertySet
>
xMSFProps
(
m_xMSF
,
UNO_QUERY
);
Reference
<
XPropertySet
>
xMSFProps
(
m_xMSF
,
UNO_QUERY
);
Reference
<
XComponentContext
>
xContext
(
xMSFProps
->
getPropertyValue
(
OUString
::
createFromAscii
(
"DefaultContext"
)),
Reference
<
XComponentContext
>
xContext
(
xMSFProps
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DefaultContext"
)
)),
UNO_QUERY
);
UNO_QUERY
);
Reference
<
XPopupMenuController
>
xRFC
(
m_xPCF
->
createInstanceWithArgumentsAndContext
(
OUString
::
createFromAscii
(
".uno:RecentFileList"
),
Reference
<
XPopupMenuController
>
xRFC
(
m_xPCF
->
createInstanceWithArgumentsAndContext
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:RecentFileList"
)
),
m_args
,
m_args
,
xContext
),
xContext
),
UNO_QUERY
);
UNO_QUERY
);
Reference
<
XMenuListener
>
xML
(
xRFC
,
UNO_QUERY
);
Reference
<
XMenuListener
>
xML
(
xRFC
,
UNO_QUERY
);
Reference
<
XPopupMenu
>
xPO
(
m_xMSF
->
createInstance
(
OUString
::
createFromAscii
(
"stardiv.Toolkit.VCLXPopupMenu"
)),
Reference
<
XPopupMenu
>
xPO
(
m_xMSF
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"stardiv.Toolkit.VCLXPopupMenu"
)
)),
UNO_QUERY
);
UNO_QUERY
);
if
(
xRFC
.
is
()
&&
xPO
.
is
())
if
(
xRFC
.
is
()
&&
xPO
.
is
())
...
@@ -736,7 +734,7 @@ FrameHelper::dispatchCommand (OUString command)
...
@@ -736,7 +734,7 @@ FrameHelper::dispatchCommand (OUString command)
}
}
if
(
command
.
matchAsciiL
(
"private:factory/"
,
16
,
0
))
if
(
command
.
matchAsciiL
(
"private:factory/"
,
16
,
0
))
target
=
OUString
::
createFromAscii
(
"_blank"
);
target
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"_blank"
)
);
xdh
->
executeDispatch
(
Reference
<
XDispatchProvider
>
(
m_xFrame
,
UNO_QUERY
),
xdh
->
executeDispatch
(
Reference
<
XDispatchProvider
>
(
m_xFrame
,
UNO_QUERY
),
command
,
command
,
...
@@ -757,14 +755,14 @@ FrameHelper::getAcceleratorConfigurations (Reference < XModel > xModel,
...
@@ -757,14 +755,14 @@ FrameHelper::getAcceleratorConfigurations (Reference < XModel > xModel,
this
->
m_docAccelConf
=
docAccelConf
;
this
->
m_docAccelConf
=
docAccelConf
;
//Get module shurtcut database
//Get module shurtcut database
Reference
<
XModuleUIConfigurationManagerSupplier
>
modUISupplier
(
m_xMSF
->
createInstance
(
OUString
::
createFromAscii
(
"com.sun.star.ui.ModuleUIConfigurationManagerSupplier"
)),
Reference
<
XModuleUIConfigurationManagerSupplier
>
modUISupplier
(
m_xMSF
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.ui.ModuleUIConfigurationManagerSupplier"
)
)),
UNO_QUERY
);
UNO_QUERY
);
Reference
<
XUIConfigurationManager
>
modUIManager
=
modUISupplier
->
getUIConfigurationManager
(
xModuleManager
->
identify
(
m_xFrame
));
Reference
<
XUIConfigurationManager
>
modUIManager
=
modUISupplier
->
getUIConfigurationManager
(
xModuleManager
->
identify
(
m_xFrame
));
Reference
<
XAcceleratorConfiguration
>
modAccelConf
(
modUIManager
->
getShortCutManager
(),
UNO_QUERY
);
Reference
<
XAcceleratorConfiguration
>
modAccelConf
(
modUIManager
->
getShortCutManager
(),
UNO_QUERY
);
this
->
m_modAccelConf
=
modAccelConf
;
this
->
m_modAccelConf
=
modAccelConf
;
//Get global shortcut database
//Get global shortcut database
Reference
<
XAcceleratorConfiguration
>
globAccelConf
(
m_xMSF
->
createInstance
(
OUString
::
createFromAscii
(
"com.sun.star.ui.GlobalAcceleratorConfiguration"
)),
Reference
<
XAcceleratorConfiguration
>
globAccelConf
(
m_xMSF
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.ui.GlobalAcceleratorConfiguration"
)
)),
UNO_QUERY
);
UNO_QUERY
);
this
->
m_globAccelConf
=
globAccelConf
;
this
->
m_globAccelConf
=
globAccelConf
;
}
}
...
@@ -821,7 +819,7 @@ FrameHelper::findShortcutForCommand (OUString command)
...
@@ -821,7 +819,7 @@ FrameHelper::findShortcutForCommand (OUString command)
{}
{}
//NOTE: For some reason this item does not return its shortcut. Setting manually:
//NOTE: For some reason this item does not return its shortcut. Setting manually:
if
(
command
.
equals
(
OUString
::
createFromAscii
(
".uno:HelpIndex"
)))
if
(
command
.
equals
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
".uno:HelpIndex"
)
)))
{
{
kev
.
KeyCode
=
awt
::
Key
::
F1
;
kev
.
KeyCode
=
awt
::
Key
::
F1
;
}
}
...
...
framework/source/lomenubar/FrameJob.cxx
Dosyayı görüntüle @
207bbf87
...
@@ -190,9 +190,9 @@ on_registrar_available (GDBusConnection * /*connection*/,
...
@@ -190,9 +190,9 @@ on_registrar_available (GDBusConnection * /*connection*/,
//Hide menubar
//Hide menubar
Reference
<
XFrame
>
xFrame
=
helper
->
getFrame
();
Reference
<
XFrame
>
xFrame
=
helper
->
getFrame
();
Reference
<
XPropertySet
>
frameProps
(
xFrame
,
UNO_QUERY
);
Reference
<
XPropertySet
>
frameProps
(
xFrame
,
UNO_QUERY
);
Reference
<
XLayoutManager
>
xLayoutManager
(
frameProps
->
getPropertyValue
(
OUString
::
createFromAscii
(
"LayoutManager"
)),
Reference
<
XLayoutManager
>
xLayoutManager
(
frameProps
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"LayoutManager"
)
)),
UNO_QUERY
);
UNO_QUERY
);
xLayoutManager
->
hideElement
(
OUString
::
createFromAscii
(
"private:resource/menubar/menubar"
));
xLayoutManager
->
hideElement
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"private:resource/menubar/menubar"
)
));
return
;
return
;
}
}
...
@@ -209,9 +209,9 @@ on_registrar_unavailable (GDBusConnection * /*connection*/,
...
@@ -209,9 +209,9 @@ on_registrar_unavailable (GDBusConnection * /*connection*/,
FrameHelper
*
helper
=
(
FrameHelper
*
)
user_data
;
FrameHelper
*
helper
=
(
FrameHelper
*
)
user_data
;
Reference
<
XFrame
>
xFrame
=
helper
->
getFrame
();
Reference
<
XFrame
>
xFrame
=
helper
->
getFrame
();
Reference
<
XPropertySet
>
frameProps
(
xFrame
,
UNO_QUERY
);
Reference
<
XPropertySet
>
frameProps
(
xFrame
,
UNO_QUERY
);
Reference
<
XLayoutManager
>
xLayoutManager
(
frameProps
->
getPropertyValue
(
OUString
::
createFromAscii
(
"LayoutManager"
)),
Reference
<
XLayoutManager
>
xLayoutManager
(
frameProps
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"LayoutManager"
)
)),
UNO_QUERY
);
UNO_QUERY
);
xLayoutManager
->
showElement
(
OUString
::
createFromAscii
(
"private:resource/menubar/menubar"
));
xLayoutManager
->
showElement
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"private:resource/menubar/menubar"
)
));
return
;
return
;
}
}
// ------------------------------- FrameJob --------------------------------------------
// ------------------------------- FrameJob --------------------------------------------
...
@@ -270,7 +270,7 @@ FrameJob::exportMenus (Reference < XFrame > xFrame)
...
@@ -270,7 +270,7 @@ FrameJob::exportMenus (Reference < XFrame > xFrame)
Reference
<
XPropertySet
>
frameProps
(
xFrame
,
UNO_QUERY
);
Reference
<
XPropertySet
>
frameProps
(
xFrame
,
UNO_QUERY
);
Reference
<
XLayoutManager
>
xLayoutManager
(
frameProps
->
getPropertyValue
(
OUString
::
createFromAscii
(
"LayoutManager"
)),
Reference
<
XLayoutManager
>
xLayoutManager
(
frameProps
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"LayoutManager"
)
)),
UNO_QUERY
);
UNO_QUERY
);
if
(
!
xLayoutManager
.
is
())
if
(
!
xLayoutManager
.
is
())
{
{
...
@@ -278,7 +278,7 @@ FrameJob::exportMenus (Reference < XFrame > xFrame)
...
@@ -278,7 +278,7 @@ FrameJob::exportMenus (Reference < XFrame > xFrame)
return
;
return
;
}
}
Reference
<
XUIElement
>
menuBar
(
xLayoutManager
->
getElement
(
OUString
::
createFromAscii
(
"private:resource/menubar/menubar"
)),
Reference
<
XUIElement
>
menuBar
(
xLayoutManager
->
getElement
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"private:resource/menubar/menubar"
)
)),
UNO_QUERY
);
UNO_QUERY
);
Reference
<
XPropertySet
>
menuPropSet
(
menuBar
,
UNO_QUERY
);
Reference
<
XPropertySet
>
menuPropSet
(
menuBar
,
UNO_QUERY
);
...
@@ -288,7 +288,7 @@ FrameJob::exportMenus (Reference < XFrame > xFrame)
...
@@ -288,7 +288,7 @@ FrameJob::exportMenus (Reference < XFrame > xFrame)
return
;
return
;
}
}
Reference
<
XMenu
>
xMenu
(
menuPropSet
->
getPropertyValue
(
OUString
::
createFromAscii
(
"XMenuBar"
)),
Reference
<
XMenu
>
xMenu
(
menuPropSet
->
getPropertyValue
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"XMenuBar"
)
)),
UNO_QUERY
);
UNO_QUERY
);
if
(
!
xMenu
.
is
())
if
(
!
xMenu
.
is
())
...
...
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