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
47204c74
Kaydet (Commit)
47204c74
authored
May 28, 2013
tarafından
Ariel Constenla-Haile
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add missing copy&paste of SfxAppToolBoxControl_Impl::Select
üst
83bf5a7b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
19 deletions
+66
-19
popuptoolbarcontroller.hxx
framework/inc/uielement/popuptoolbarcontroller.hxx
+3
-0
popuptoolbarcontroller.cxx
framework/source/uielement/popuptoolbarcontroller.cxx
+39
-1
toolboxcontroller.hxx
svtools/inc/svtools/toolboxcontroller.hxx
+18
-5
toolboxcontroller.cxx
svtools/source/uno/toolboxcontroller.cxx
+6
-13
No files found.
framework/inc/uielement/popuptoolbarcontroller.hxx
Dosyayı görüntüle @
47204c74
...
...
@@ -82,7 +82,10 @@ namespace framework
private
:
void
functionExecuted
(
const
rtl
::
OUString
&
rCommand
);
void
SAL_CALL
statusChanged
(
const
::
com
::
sun
::
star
::
frame
::
FeatureStateEvent
&
rEvent
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
void
SAL_CALL
execute
(
sal_Int16
KeyModifier
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
void
setItemImage
(
const
rtl
::
OUString
&
rCommand
);
rtl
::
OUString
m_aLastURL
;
};
class
WizardsToolbarController
:
public
PopupMenuToolbarController
...
...
framework/source/uielement/popuptoolbarcontroller.cxx
Dosyayı görüntüle @
47204c74
...
...
@@ -23,6 +23,8 @@
#include "precompiled_framework.hxx"
#include <uielement/popuptoolbarcontroller.hxx>
#include <framework/menuconfiguration.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <comphelper/processfactory.hxx>
#include <svtools/imagemgr.hxx>
#include <svtools/miscopt.hxx>
...
...
@@ -35,9 +37,10 @@
#include <com/sun/star/awt/PopupMenuDirection.hpp>
#include <com/sun/star/frame/PopupMenuControllerFactory.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#define UNO_COMMAND_RECENT_FILE_LIST ".uno:RecentFileList"
#define SFX_REFERER_USER "private:user"
using
rtl
::
OUString
;
namespace
css
=
::
com
::
sun
::
star
;
...
...
@@ -278,6 +281,39 @@ NewToolbarController::statusChanged(
enable
(
rEvent
.
IsEnabled
);
}
void
SAL_CALL
NewToolbarController
::
execute
(
sal_Int16
/*KeyModifier*/
)
throw
(
css
::
uno
::
RuntimeException
)
{
osl
::
MutexGuard
aGuard
(
m_aMutex
);
if
(
!
m_aLastURL
.
getLength
()
)
return
;
OUString
aTarget
(
RTL_CONSTASCII_USTRINGPARAM
(
"_default"
)
);
if
(
m_xPopupMenu
.
is
()
)
{
// TODO investigate how to wrap Get/SetUserValue in css::awt::XMenu
MenuConfiguration
::
Attributes
*
pMenuAttributes
(
0
);
VCLXPopupMenu
*
pTkPopupMenu
=
dynamic_cast
<
VCLXPopupMenu
*
>
(
VCLXMenu
::
GetImplementation
(
m_xPopupMenu
)
);
vos
::
OGuard
aSolarMutexGuard
(
Application
::
GetSolarMutex
()
);
PopupMenu
*
pVCLPopupMenu
=
dynamic_cast
<
PopupMenu
*
>
(
pTkPopupMenu
->
GetMenu
()
);
if
(
pVCLPopupMenu
)
pMenuAttributes
=
reinterpret_cast
<
MenuConfiguration
::
Attributes
*
>
(
pVCLPopupMenu
->
GetUserValue
(
pVCLPopupMenu
->
GetCurItemId
()
)
);
if
(
pMenuAttributes
)
aTarget
=
pMenuAttributes
->
aTargetFrame
;
}
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>
aArgs
(
1
);
aArgs
[
0
].
Name
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Referer"
));
aArgs
[
0
].
Value
<<=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
SFX_REFERER_USER
)
);
dispatchCommand
(
m_aLastURL
,
aArgs
,
aTarget
);
}
void
NewToolbarController
::
functionExecuted
(
const
OUString
&
rCommand
)
{
setItemImage
(
rCommand
);
...
...
@@ -409,6 +445,8 @@ void NewToolbarController::setItemImage( const OUString &rCommand )
}
else
pToolBox
->
SetItemImage
(
m_nToolBoxId
,
aImage
);
m_aLastURL
=
aURL
;
}
...
...
svtools/inc/svtools/toolboxcontroller.hxx
Dosyayı görüntüle @
47204c74
...
...
@@ -56,8 +56,6 @@ class ToolBox;
namespace
svt
{
struct
DispatchInfo
;
class
SVT_DLLPUBLIC
ToolboxController
:
public
::
com
::
sun
::
star
::
frame
::
XStatusListener
,
public
::
com
::
sun
::
star
::
frame
::
XToolbarController
,
public
::
com
::
sun
::
star
::
lang
::
XInitialization
,
...
...
@@ -126,12 +124,10 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL
const
rtl
::
OUString
&
getCommandURL
()
const
{
return
m_aCommandURL
;
}
const
rtl
::
OUString
&
getModuleName
()
const
{
return
m_sModuleName
;
}
void
dispatchCommand
(
const
::
rtl
::
OUString
&
sCommandURL
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>&
rArgs
);
void
dispatchCommand
(
const
::
rtl
::
OUString
&
sCommandURL
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>&
rArgs
,
const
rtl
::
OUString
&
sTarget
=
rtl
::
OUString
()
);
void
enable
(
bool
bEnable
);
DECL_STATIC_LINK
(
ToolboxController
,
ExecuteHdl_Impl
,
DispatchInfo
*
);
protected
:
bool
getToolboxId
(
sal_uInt16
&
rItemId
,
ToolBox
**
ppToolBox
);
void
setSupportVisiableProperty
(
sal_Bool
bValue
);
//shizhoubo
...
...
@@ -144,6 +140,23 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XDispatch
>
xDispatch
;
};
struct
DispatchInfo
{
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XDispatch
>
mxDispatch
;
const
::
com
::
sun
::
star
::
util
::
URL
maURL
;
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>
maArgs
;
DispatchInfo
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XDispatch
>&
xDispatch
,
const
::
com
::
sun
::
star
::
util
::
URL
&
rURL
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>&
rArgs
)
:
mxDispatch
(
xDispatch
)
,
maURL
(
rURL
)
,
maArgs
(
rArgs
)
{}
};
DECL_STATIC_LINK
(
ToolboxController
,
ExecuteHdl_Impl
,
DispatchInfo
*
);
typedef
::
std
::
hash_map
<
::
rtl
::
OUString
,
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
frame
::
XDispatch
>
,
::
rtl
::
OUStringHash
,
...
...
svtools/source/uno/toolboxcontroller.cxx
Dosyayı görüntüle @
47204c74
...
...
@@ -56,16 +56,6 @@ using namespace ::com::sun::star::frame;
namespace
svt
{
struct
DispatchInfo
{
Reference
<
XDispatch
>
mxDispatch
;
const
URL
maURL
;
const
Sequence
<
PropertyValue
>
maArgs
;
DispatchInfo
(
const
Reference
<
XDispatch
>&
xDispatch
,
const
URL
&
rURL
,
const
Sequence
<
PropertyValue
>&
rArgs
)
:
mxDispatch
(
xDispatch
),
maURL
(
rURL
),
maArgs
(
rArgs
)
{}
};
ToolboxController
::
ToolboxController
(
const
Reference
<
XMultiServiceFactory
>&
rServiceManager
,
...
...
@@ -724,7 +714,7 @@ Reference< ::com::sun::star::awt::XWindow > ToolboxController::getParent() const
return
m_xParentWindow
;
}
void
ToolboxController
::
dispatchCommand
(
const
OUString
&
sCommandURL
,
const
Sequence
<
PropertyValue
>&
rArgs
)
void
ToolboxController
::
dispatchCommand
(
const
OUString
&
sCommandURL
,
const
Sequence
<
PropertyValue
>&
rArgs
,
const
OUString
&
sTarget
)
{
try
{
...
...
@@ -733,9 +723,12 @@ void ToolboxController::dispatchCommand( const OUString& sCommandURL, const Sequ
aURL
.
Complete
=
sCommandURL
;
getURLTransformer
()
->
parseStrict
(
aURL
);
Reference
<
XDispatch
>
xDispatch
(
xDispatchProvider
->
queryDispatch
(
aURL
,
OUString
()
,
0
),
UNO_QUERY_THROW
);
Reference
<
XDispatch
>
xDispatch
(
xDispatchProvider
->
queryDispatch
(
aURL
,
sTarget
,
0
),
UNO_QUERY_THROW
);
Application
::
PostUserEvent
(
STATIC_LINK
(
0
,
ToolboxController
,
ExecuteHdl_Impl
),
new
DispatchInfo
(
xDispatch
,
aURL
,
rArgs
)
);
DispatchInfo
*
pDispatchInfo
=
new
DispatchInfo
(
xDispatch
,
aURL
,
rArgs
);
if
(
!
Application
::
PostUserEvent
(
STATIC_LINK
(
0
,
ToolboxController
,
ExecuteHdl_Impl
),
pDispatchInfo
)
)
delete
pDispatchInfo
;
}
catch
(
Exception
&
)
...
...
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