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
eb179971
Kaydet (Commit)
eb179971
authored
Şub 12, 2014
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cleaning the code a bit
Change-Id: I4cc9c16fb79f669ae70d10a50ace3943075edd46
üst
5691ef0b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
31 deletions
+20
-31
menubarfactory.hxx
framework/inc/uifactory/menubarfactory.hxx
+2
-4
menubarfactory.cxx
framework/source/uifactory/menubarfactory.cxx
+10
-12
statusbarfactory.cxx
framework/source/uifactory/statusbarfactory.cxx
+4
-8
toolbarfactory.cxx
framework/source/uifactory/toolbarfactory.cxx
+4
-7
No files found.
framework/inc/uifactory/menubarfactory.hxx
Dosyayı görüntüle @
eb179971
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/ui/XUIElementFactory.hpp>
#include <com/sun/star/ui/XUIElementFactory.hpp>
#include <com/sun/star/frame/XModuleManager2.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <toolkit/awt/vclxmenu.hxx>
#include <toolkit/awt/vclxmenu.hxx>
...
@@ -67,11 +66,10 @@ typedef ::cppu::WeakImplHelper2<
...
@@ -67,11 +66,10 @@ typedef ::cppu::WeakImplHelper2<
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ui
::
XUIElement
>
SAL_CALL
createUIElement
(
const
OUString
&
ResourceURL
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>&
Args
)
throw
(
::
com
::
sun
::
star
::
container
::
NoSuchElementException
,
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ui
::
XUIElement
>
SAL_CALL
createUIElement
(
const
OUString
&
ResourceURL
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>&
Args
)
throw
(
::
com
::
sun
::
star
::
container
::
NoSuchElementException
,
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
static
void
CreateUIElement
(
const
OUString
&
ResourceURL
static
void
CreateUIElement
(
const
OUString
&
ResourceURL
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>&
Args
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>&
Args
,
const
char
*
_pExtraMode
,
const
char
*
_pExtraMode
,
const
char
*
_pAsciiNam
e
,
const
OUString
&
ResourceTyp
e
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ui
::
XUIElement
>&
_xMenuBar
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ui
::
XUIElement
>&
_xMenuBar
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XModuleManager2
>&
_xModuleManager
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>&
_rxContext
);
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>&
_rxContext
);
protected
:
protected
:
...
...
framework/source/uifactory/menubarfactory.cxx
Dosyayı görüntüle @
eb179971
...
@@ -58,21 +58,17 @@ Reference< XUIElement > SAL_CALL MenuBarFactory::createUIElement(
...
@@ -58,21 +58,17 @@ Reference< XUIElement > SAL_CALL MenuBarFactory::createUIElement(
const
Sequence
<
PropertyValue
>&
Args
)
const
Sequence
<
PropertyValue
>&
Args
)
throw
(
::
com
::
sun
::
star
::
container
::
NoSuchElementException
,
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
throw
(
::
com
::
sun
::
star
::
container
::
NoSuchElementException
,
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
{
// SAFE
Reference
<
::
com
::
sun
::
star
::
ui
::
XUIElement
>
xMenuBar
(
SolarMutexClearableGuard
g
;
static_cast
<
OWeakObject
*>
(
new
MenuBarWrapper
(
m_xContext
)),
UNO_QUERY
);
MenuBarWrapper
*
pMenuBarWrapper
=
new
MenuBarWrapper
(
m_xContext
);
CreateUIElement
(
ResourceURL
,
Args
,
"MenuOnly"
,
"private:resource/menubar/"
,
xMenuBar
,
m_xContext
);
Reference
<
::
com
::
sun
::
star
::
ui
::
XUIElement
>
xMenuBar
(
(
OWeakObject
*
)
pMenuBarWrapper
,
UNO_QUERY
);
Reference
<
::
com
::
sun
::
star
::
frame
::
XModuleManager2
>
xModuleManager
=
ModuleManager
::
create
(
m_xContext
);
g
.
clear
();
CreateUIElement
(
ResourceURL
,
Args
,
"MenuOnly"
,
"private:resource/menubar/"
,
xMenuBar
,
xModuleManager
,
m_xContext
);
return
xMenuBar
;
return
xMenuBar
;
}
}
void
MenuBarFactory
::
CreateUIElement
(
const
OUString
&
ResourceURL
void
MenuBarFactory
::
CreateUIElement
(
const
OUString
&
ResourceURL
,
const
Sequence
<
PropertyValue
>&
Args
,
const
Sequence
<
PropertyValue
>&
Args
,
const
char
*
_pExtraMode
,
const
char
*
_pExtraMode
,
const
char
*
_pAsciiNam
e
,
const
OUString
&
ResourceTyp
e
,
const
Reference
<
::
com
::
sun
::
star
::
ui
::
XUIElement
>&
_xMenuBar
,
const
Reference
<
::
com
::
sun
::
star
::
ui
::
XUIElement
>&
_xMenuBar
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XModuleManager2
>&
_xModuleManager
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>&
_rxContext
)
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>&
_rxContext
)
{
{
Reference
<
XUIConfigurationManager
>
xCfgMgr
;
Reference
<
XUIConfigurationManager
>
xCfgMgr
;
...
@@ -95,7 +91,7 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
...
@@ -95,7 +91,7 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
else
if
(
_pExtraMode
&&
Args
[
n
].
Name
.
equalsAscii
(
_pExtraMode
))
else
if
(
_pExtraMode
&&
Args
[
n
].
Name
.
equalsAscii
(
_pExtraMode
))
Args
[
n
].
Value
>>=
bExtraMode
;
Args
[
n
].
Value
>>=
bExtraMode
;
}
}
if
(
aResourceURL
.
indexOf
(
OUString
::
createFromAscii
(
_pAsciiName
))
!=
0
)
if
(
!
aResourceURL
.
startsWith
(
ResourceType
)
)
throw
IllegalArgumentException
();
throw
IllegalArgumentException
();
// Identify frame and determine document based ui configuration manager/module ui configuration manager
// Identify frame and determine document based ui configuration manager/module ui configuration manager
...
@@ -120,7 +116,9 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
...
@@ -120,7 +116,9 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
if
(
!
bHasSettings
)
if
(
!
bHasSettings
)
{
{
OUString
aModuleIdentifier
=
_xModuleManager
->
identify
(
xFrame
);
Reference
<
::
com
::
sun
::
star
::
frame
::
XModuleManager2
>
xModuleManager
=
ModuleManager
::
create
(
_rxContext
);
OUString
aModuleIdentifier
=
xModuleManager
->
identify
(
xFrame
);
if
(
!
aModuleIdentifier
.
isEmpty
()
)
if
(
!
aModuleIdentifier
.
isEmpty
()
)
{
{
Reference
<
XModuleUIConfigurationManagerSupplier
>
xModuleCfgSupplier
=
Reference
<
XModuleUIConfigurationManagerSupplier
>
xModuleCfgSupplier
=
...
...
framework/source/uifactory/statusbarfactory.cxx
Dosyayı görüntüle @
eb179971
...
@@ -77,14 +77,10 @@ Reference< XUIElement > SAL_CALL StatusBarFactory::createUIElement(
...
@@ -77,14 +77,10 @@ Reference< XUIElement > SAL_CALL StatusBarFactory::createUIElement(
const
Sequence
<
PropertyValue
>&
Args
)
const
Sequence
<
PropertyValue
>&
Args
)
throw
(
::
com
::
sun
::
star
::
container
::
NoSuchElementException
,
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
throw
(
::
com
::
sun
::
star
::
container
::
NoSuchElementException
,
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
{
// SAFE
Reference
<
::
com
::
sun
::
star
::
ui
::
XUIElement
>
xStatusBar
(
SolarMutexClearableGuard
g
;
static_cast
<
OWeakObject
*>
(
new
StatusBarWrapper
(
m_xContext
)),
UNO_QUERY
);
StatusBarWrapper
*
pWrapper
=
new
StatusBarWrapper
(
m_xContext
);
MenuBarFactory
::
CreateUIElement
(
ResourceURL
,
Args
,
NULL
,
"private:resource/statusbar/"
,
xStatusBar
,
m_xContext
);
Reference
<
::
com
::
sun
::
star
::
ui
::
XUIElement
>
xMenuBar
(
(
OWeakObject
*
)
pWrapper
,
UNO_QUERY
);
return
xStatusBar
;
Reference
<
::
com
::
sun
::
star
::
frame
::
XModuleManager2
>
xModuleManager
=
ModuleManager
::
create
(
m_xContext
);
g
.
clear
();
MenuBarFactory
::
CreateUIElement
(
ResourceURL
,
Args
,
NULL
,
"private:resource/statusbar/"
,
xMenuBar
,
xModuleManager
,
m_xContext
);
return
xMenuBar
;
}
}
}
}
...
...
framework/source/uifactory/toolbarfactory.cxx
Dosyayı görüntüle @
eb179971
...
@@ -77,13 +77,10 @@ Reference< XUIElement > SAL_CALL ToolBarFactory::createUIElement(
...
@@ -77,13 +77,10 @@ Reference< XUIElement > SAL_CALL ToolBarFactory::createUIElement(
const
Sequence
<
PropertyValue
>&
Args
)
const
Sequence
<
PropertyValue
>&
Args
)
throw
(
::
com
::
sun
::
star
::
container
::
NoSuchElementException
,
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
throw
(
::
com
::
sun
::
star
::
container
::
NoSuchElementException
,
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
{
SolarMutexClearableGuard
g
;
Reference
<
::
com
::
sun
::
star
::
ui
::
XUIElement
>
xToolBar
(
ToolBarWrapper
*
pWrapper
=
new
ToolBarWrapper
(
m_xContext
);
static_cast
<
OWeakObject
*>
(
new
ToolBarWrapper
(
m_xContext
)),
UNO_QUERY
);
Reference
<
::
com
::
sun
::
star
::
ui
::
XUIElement
>
xMenuBar
(
(
OWeakObject
*
)
pWrapper
,
UNO_QUERY
);
CreateUIElement
(
ResourceURL
,
Args
,
"PopupMode"
,
"private:resource/toolbar/"
,
xToolBar
,
m_xContext
);
Reference
<
::
com
::
sun
::
star
::
frame
::
XModuleManager2
>
xModuleManager
=
ModuleManager
::
create
(
m_xContext
);
return
xToolBar
;
g
.
clear
();
CreateUIElement
(
ResourceURL
,
Args
,
"PopupMode"
,
"private:resource/toolbar/"
,
xMenuBar
,
xModuleManager
,
m_xContext
);
return
xMenuBar
;
}
}
}
}
...
...
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