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
f789715a
Kaydet (Commit)
f789715a
authored
Agu 23, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Stephan Bergmann
Agu 27, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, Use factory methods for frame::DispatchHelper instances
Change-Id: I7bdf16fc6d042e5ecd404c604a8b7c31c1ac7bc1
üst
65c78617
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
94 additions
and
121 deletions
+94
-121
ChartController_Window.cxx
chart2/source/controller/main/ChartController_Window.cxx
+10
-15
so_instance.cxx
extensions/source/nsplugin/source/so_instance.cxx
+2
-8
FrameHelper.cxx
framework/source/lomenubar/FrameHelper.cxx
+2
-3
basmethnode.cxx
scripting/source/basprov/basmethnode.cxx
+15
-19
appserv.cxx
sfx2/source/appl/appserv.cxx
+25
-31
docsh2.cxx
sw/source/ui/app/docsh2.cxx
+40
-45
No files found.
chart2/source/controller/main/ChartController_Window.cxx
Dosyayı görüntüle @
f789715a
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
#include <com/sun/star/chart2/RelativeSize.hpp>
#include <com/sun/star/chart2/RelativeSize.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/frame/
X
DispatchHelper.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/util/XUpdatable.hpp>
#include <comphelper/InlineContainer.hxx>
#include <comphelper/InlineContainer.hxx>
...
@@ -1550,20 +1550,15 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
...
@@ -1550,20 +1550,15 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
if
(
!
bReturn
&&
if
(
!
bReturn
&&
nCode
==
KEY_ESCAPE
)
nCode
==
KEY_ESCAPE
)
{
{
uno
::
Reference
<
frame
::
XDispatchHelper
>
xDispatchHelper
(
uno
::
Reference
<
frame
::
XDispatchHelper
>
xDispatchHelper
(
frame
::
DispatchHelper
::
create
(
m_xCC
)
);
m_xCC
->
getServiceManager
()
->
createInstanceWithContext
(
uno
::
Sequence
<
beans
::
PropertyValue
>
aArgs
;
C2U
(
"com.sun.star.frame.DispatchHelper"
),
m_xCC
),
uno
::
UNO_QUERY
);
xDispatchHelper
->
executeDispatch
(
if
(
xDispatchHelper
.
is
())
uno
::
Reference
<
frame
::
XDispatchProvider
>
(
m_xFrame
,
uno
::
UNO_QUERY
),
{
C2U
(
".uno:TerminateInplaceActivation"
),
uno
::
Sequence
<
beans
::
PropertyValue
>
aArgs
;
C2U
(
"_parent"
),
xDispatchHelper
->
executeDispatch
(
frame
::
FrameSearchFlag
::
PARENT
,
uno
::
Reference
<
frame
::
XDispatchProvider
>
(
m_xFrame
,
uno
::
UNO_QUERY
),
aArgs
);
C2U
(
".uno:TerminateInplaceActivation"
),
bReturn
=
true
;
C2U
(
"_parent"
),
frame
::
FrameSearchFlag
::
PARENT
,
aArgs
);
bReturn
=
true
;
}
}
}
if
(
!
bReturn
&&
if
(
!
bReturn
&&
...
...
extensions/source/nsplugin/source/so_instance.cxx
Dosyayı görüntüle @
f789715a
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
#include <com/sun/star/lang/SystemDependent.hpp>
#include <com/sun/star/lang/SystemDependent.hpp>
#include <com/sun/star/awt/XSystemChildFactory.hpp>
#include <com/sun/star/awt/XSystemChildFactory.hpp>
...
@@ -299,14 +300,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
...
@@ -299,14 +300,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
debug_fprintf
(
NSP_LOG_APPEND
,
"load document success
\n
"
);
debug_fprintf
(
NSP_LOG_APPEND
,
"load document success
\n
"
);
// create frame::XDispatchHelper and frame::XDispatchProvider
// create frame::XDispatchHelper and frame::XDispatchProvider
m_xDispatcher
=
Reference
<
frame
::
XDispatchHelper
>
(
m_xDispatcher
=
Reference
<
frame
::
XDispatchHelper
>
(
frame
::
DispatchHelper
::
create
(
xContext
)
);
mxRemoteMSF
->
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.DispatchHelper"
))),
uno
::
UNO_QUERY
);
if
(
!
m_xDispatcher
.
is
())
{
debug_fprintf
(
NSP_LOG_APPEND
,
"m_xDispatcher can not be getten
\n
"
);
return
sal_False
;
}
m_xDispatchProvider
=
Reference
<
frame
::
XDispatchProvider
>
(
m_xFrame
,
uno
::
UNO_QUERY
);
m_xDispatchProvider
=
Reference
<
frame
::
XDispatchProvider
>
(
m_xFrame
,
uno
::
UNO_QUERY
);
if
(
!
m_xDispatchProvider
.
is
())
if
(
!
m_xDispatchProvider
.
is
())
{
{
...
...
framework/source/lomenubar/FrameHelper.cxx
Dosyayı görüntüle @
f789715a
...
@@ -42,10 +42,10 @@
...
@@ -42,10 +42,10 @@
#include <com/sun/star/awt/XMenuExtended.hpp>
#include <com/sun/star/awt/XMenuExtended.hpp>
#include <com/sun/star/awt/XMenuListener.hpp>
#include <com/sun/star/awt/XMenuListener.hpp>
#include <com/sun/star/awt/XPopupMenuExtended.hpp>
#include <com/sun/star/awt/XPopupMenuExtended.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XDispatchHelper.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XModel.hpp>
...
@@ -718,8 +718,7 @@ void
...
@@ -718,8 +718,7 @@ void
FrameHelper
::
dispatchCommand
(
OUString
command
)
FrameHelper
::
dispatchCommand
(
OUString
command
)
{
{
OUString
target
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
""
));
OUString
target
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
""
));
Reference
<
XDispatchHelper
>
xdh
(
m_xMSF
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.DispatchHelper"
))),
Reference
<
XDispatchHelper
>
xdh
(
DispatchHelper
::
create
(
comphelper
::
ComponentContext
(
m_xMSF
).
getUNOContext
())
);
UNO_QUERY
);
// 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.
...
...
scripting/source/basprov/basmethnode.cxx
Dosyayı görüntüle @
f789715a
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
#include "basmethnode.hxx"
#include "basmethnode.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XDispatchHelper.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
...
@@ -263,24 +263,20 @@ namespace basprov
...
@@ -263,24 +263,20 @@ namespace basprov
if
(
xProv
.
is
()
)
if
(
xProv
.
is
()
)
{
{
Reference
<
frame
::
XDispatchHelper
>
xHelper
(
xSMgr
->
createInstanceWithContext
(
Reference
<
frame
::
XDispatchHelper
>
xHelper
(
frame
::
DispatchHelper
::
create
(
m_xContext
)
);
::
rtl
::
OUString
(
"com.sun.star.frame.DispatchHelper"
),
m_xContext
),
UNO_QUERY
);
Sequence
<
PropertyValue
>
aArgs
(
7
);
if
(
xHelper
.
is
()
)
aArgs
[
0
].
Name
=
::
rtl
::
OUString
(
"Document"
);
{
aArgs
[
0
].
Value
<<=
sDocURL
;
Sequence
<
PropertyValue
>
aArgs
(
7
);
aArgs
[
1
].
Name
=
::
rtl
::
OUString
(
"LibName"
);
aArgs
[
0
].
Name
=
::
rtl
::
OUString
(
"Document"
);
aArgs
[
1
].
Value
<<=
sLibName
;
aArgs
[
0
].
Value
<<=
sDocURL
;
aArgs
[
2
].
Name
=
::
rtl
::
OUString
(
"Name"
);
aArgs
[
1
].
Name
=
::
rtl
::
OUString
(
"LibName"
);
aArgs
[
2
].
Value
<<=
sModName
;
aArgs
[
1
].
Value
<<=
sLibName
;
aArgs
[
3
].
Name
=
::
rtl
::
OUString
(
"Type"
);
aArgs
[
2
].
Name
=
::
rtl
::
OUString
(
"Name"
);
aArgs
[
3
].
Value
<<=
::
rtl
::
OUString
(
"Module"
);
aArgs
[
2
].
Value
<<=
sModName
;
aArgs
[
4
].
Name
=
::
rtl
::
OUString
(
"Line"
);
aArgs
[
3
].
Name
=
::
rtl
::
OUString
(
"Type"
);
aArgs
[
4
].
Value
<<=
static_cast
<
sal_uInt32
>
(
nLine1
);
aArgs
[
3
].
Value
<<=
::
rtl
::
OUString
(
"Module"
);
xHelper
->
executeDispatch
(
xProv
,
::
rtl
::
OUString
(
".uno:BasicIDEAppear"
),
::
rtl
::
OUString
(),
0
,
aArgs
);
aArgs
[
4
].
Name
=
::
rtl
::
OUString
(
"Line"
);
aArgs
[
4
].
Value
<<=
static_cast
<
sal_uInt32
>
(
nLine1
);
xHelper
->
executeDispatch
(
xProv
,
::
rtl
::
OUString
(
".uno:BasicIDEAppear"
),
::
rtl
::
OUString
(),
0
,
aArgs
);
}
}
}
}
}
}
}
...
...
sfx2/source/appl/appserv.cxx
Dosyayı görüntüle @
f789715a
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
#include <com/sun/star/frame/DispatchResultState.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
#include <com/sun/star/task/XJobExecutor.hpp>
#include <com/sun/star/task/XJobExecutor.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XDispatchHelper.hpp>
#include <com/sun/star/frame/XFramesSupplier.hpp>
#include <com/sun/star/frame/XFramesSupplier.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
...
@@ -1308,27 +1308,24 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
...
@@ -1308,27 +1308,24 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
}
}
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xORB
=
::
comphelper
::
getProcessServiceFactory
();
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xORB
=
::
comphelper
::
getProcessServiceFactory
();
Reference
<
uno
::
XComponentContext
>
xContext
=
::
comphelper
::
getProcessComponentContext
();
Reference
<
com
::
sun
::
star
::
frame
::
XDispatchProvider
>
xProv
(
Reference
<
com
::
sun
::
star
::
frame
::
XDispatchProvider
>
xProv
(
xORB
->
createInstance
(
::
rtl
::
OUString
(
"com.sun.star.drawing.ModuleDispatcher"
)),
UNO_QUERY
);
xORB
->
createInstance
(
::
rtl
::
OUString
(
"com.sun.star.drawing.ModuleDispatcher"
)),
UNO_QUERY
);
if
(
xProv
.
is
()
)
if
(
xProv
.
is
()
)
{
{
::
rtl
::
OUString
aCmd
=
::
rtl
::
OUString
::
createFromAscii
(
GetInterface
()
->
GetSlot
(
rReq
.
GetSlot
()
)
->
GetUnoName
()
);
::
rtl
::
OUString
aCmd
=
::
rtl
::
OUString
::
createFromAscii
(
GetInterface
()
->
GetSlot
(
rReq
.
GetSlot
()
)
->
GetUnoName
()
);
Reference
<
com
::
sun
::
star
::
frame
::
XDispatchHelper
>
xHelper
(
Reference
<
frame
::
XDispatchHelper
>
xHelper
(
frame
::
DispatchHelper
::
create
(
xContext
)
);
xORB
->
createInstance
(
::
rtl
::
OUString
(
"com.sun.star.frame.DispatchHelper"
)),
UNO_QUERY
);
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>
aSeq
;
if
(
xHelper
.
is
()
)
if
(
rReq
.
GetArgs
()
)
{
TransformItems
(
rReq
.
GetSlot
(),
*
rReq
.
GetArgs
(),
aSeq
);
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>
aSeq
;
Any
aResult
=
xHelper
->
executeDispatch
(
xProv
,
aCmd
,
::
rtl
::
OUString
(),
0
,
aSeq
);
if
(
rReq
.
GetArgs
()
)
::
com
::
sun
::
star
::
frame
::
DispatchResultEvent
aEvent
;
TransformItems
(
rReq
.
GetSlot
(),
*
rReq
.
GetArgs
(),
aSeq
);
sal_Bool
bSuccess
=
(
Any
aResult
=
xHelper
->
executeDispatch
(
xProv
,
aCmd
,
::
rtl
::
OUString
(),
0
,
aSeq
);
(
aResult
>>=
aEvent
)
&&
::
com
::
sun
::
star
::
frame
::
DispatchResultEvent
aEvent
;
(
aEvent
.
State
==
::
com
::
sun
::
star
::
frame
::
DispatchResultState
::
SUCCESS
)
sal_Bool
bSuccess
=
(
);
(
aResult
>>=
aEvent
)
&&
rReq
.
SetReturnValue
(
SfxBoolItem
(
rReq
.
GetSlot
(),
bSuccess
)
);
(
aEvent
.
State
==
::
com
::
sun
::
star
::
frame
::
DispatchResultState
::
SUCCESS
)
);
rReq
.
SetReturnValue
(
SfxBoolItem
(
rReq
.
GetSlot
(),
bSuccess
)
);
}
}
}
}
}
break
;
break
;
...
@@ -1338,27 +1335,24 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
...
@@ -1338,27 +1335,24 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
case
FN_XFORMS_INIT
:
case
FN_XFORMS_INIT
:
{
{
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xORB
=
::
comphelper
::
getProcessServiceFactory
();
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xORB
=
::
comphelper
::
getProcessServiceFactory
();
Reference
<
uno
::
XComponentContext
>
xContext
=
::
comphelper
::
getProcessComponentContext
();
Reference
<
com
::
sun
::
star
::
frame
::
XDispatchProvider
>
xProv
(
Reference
<
com
::
sun
::
star
::
frame
::
XDispatchProvider
>
xProv
(
xORB
->
createInstance
(
::
rtl
::
OUString
(
"com.sun.star.text.ModuleDispatcher"
)),
UNO_QUERY
);
xORB
->
createInstance
(
::
rtl
::
OUString
(
"com.sun.star.text.ModuleDispatcher"
)),
UNO_QUERY
);
if
(
xProv
.
is
()
)
if
(
xProv
.
is
()
)
{
{
::
rtl
::
OUString
aCmd
=
::
rtl
::
OUString
::
createFromAscii
(
GetInterface
()
->
GetSlot
(
rReq
.
GetSlot
()
)
->
GetUnoName
()
);
::
rtl
::
OUString
aCmd
=
::
rtl
::
OUString
::
createFromAscii
(
GetInterface
()
->
GetSlot
(
rReq
.
GetSlot
()
)
->
GetUnoName
()
);
Reference
<
com
::
sun
::
star
::
frame
::
XDispatchHelper
>
xHelper
(
Reference
<
frame
::
XDispatchHelper
>
xHelper
(
frame
::
DispatchHelper
::
create
(
xContext
)
);
xORB
->
createInstance
(
::
rtl
::
OUString
(
"com.sun.star.frame.DispatchHelper"
)),
UNO_QUERY
);
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>
aSeq
;
if
(
xHelper
.
is
()
)
if
(
rReq
.
GetArgs
()
)
{
TransformItems
(
rReq
.
GetSlot
(),
*
rReq
.
GetArgs
(),
aSeq
);
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>
aSeq
;
Any
aResult
=
xHelper
->
executeDispatch
(
xProv
,
aCmd
,
::
rtl
::
OUString
(),
0
,
aSeq
);
if
(
rReq
.
GetArgs
()
)
::
com
::
sun
::
star
::
frame
::
DispatchResultEvent
aEvent
;
TransformItems
(
rReq
.
GetSlot
(),
*
rReq
.
GetArgs
(),
aSeq
);
sal_Bool
bSuccess
=
(
Any
aResult
=
xHelper
->
executeDispatch
(
xProv
,
aCmd
,
::
rtl
::
OUString
(),
0
,
aSeq
);
(
aResult
>>=
aEvent
)
&&
::
com
::
sun
::
star
::
frame
::
DispatchResultEvent
aEvent
;
(
aEvent
.
State
==
::
com
::
sun
::
star
::
frame
::
DispatchResultState
::
SUCCESS
)
sal_Bool
bSuccess
=
(
);
(
aResult
>>=
aEvent
)
&&
rReq
.
SetReturnValue
(
SfxBoolItem
(
rReq
.
GetSlot
(),
bSuccess
)
);
(
aEvent
.
State
==
::
com
::
sun
::
star
::
frame
::
DispatchResultState
::
SUCCESS
)
);
rReq
.
SetReturnValue
(
SfxBoolItem
(
rReq
.
GetSlot
(),
bSuccess
)
);
}
}
}
}
}
break
;
break
;
...
...
sw/source/ui/app/docsh2.cxx
Dosyayı görüntüle @
f789715a
...
@@ -28,8 +28,9 @@
...
@@ -28,8 +28,9 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/frame/
X
DispatchHelper.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/processfactory.hxx>
#include <hintids.hxx>
#include <hintids.hxx>
...
@@ -1005,34 +1006,31 @@ void SwDocShell::Execute(SfxRequest& rReq)
...
@@ -1005,34 +1006,31 @@ void SwDocShell::Execute(SfxRequest& rReq)
if
(
!
ERRCODE_TOERROR
(
eErr
)
)
if
(
!
ERRCODE_TOERROR
(
eErr
)
)
{
{
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xORB
=
::
comphelper
::
getProcessServiceFactory
();
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xORB
=
::
comphelper
::
getProcessServiceFactory
();
uno
::
Reference
<
uno
::
XComponentContext
>
xContext
=
::
comphelper
::
getProcessComponentContext
();
uno
::
Reference
<
frame
::
XDispatchProvider
>
xProv
(
uno
::
Reference
<
frame
::
XDispatchProvider
>
xProv
(
xORB
->
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.drawing.ModuleDispatcher"
))),
UNO_QUERY
);
xORB
->
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.drawing.ModuleDispatcher"
))),
UNO_QUERY
);
if
(
xProv
.
is
()
)
if
(
xProv
.
is
()
)
{
{
::
rtl
::
OUString
aCmd
(
RTL_CONSTASCII_USTRINGPARAM
(
"SendOutlineToImpress"
));
::
rtl
::
OUString
aCmd
(
RTL_CONSTASCII_USTRINGPARAM
(
"SendOutlineToImpress"
));
uno
::
Reference
<
frame
::
XDispatchHelper
>
xHelper
(
uno
::
Reference
<
frame
::
XDispatchHelper
>
xHelper
(
frame
::
DispatchHelper
::
create
(
xContext
)
);
xORB
->
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.DispatchHelper"
))),
UNO_QUERY
);
pStrm
->
Seek
(
STREAM_SEEK_TO_END
);
if
(
xHelper
.
is
()
)
*
pStrm
<<
'\0'
;
pStrm
->
Seek
(
STREAM_SEEK_TO_BEGIN
);
// Transfer ownership of stream to a lockbytes object
SvLockBytes
aLockBytes
(
pStrm
,
sal_True
);
SvLockBytesStat
aStat
;
if
(
aLockBytes
.
Stat
(
&
aStat
,
SVSTATFLAG_DEFAULT
)
==
ERRCODE_NONE
)
{
{
pStrm
->
Seek
(
STREAM_SEEK_TO_END
);
sal_uInt32
nLen
=
aStat
.
nSize
;
*
pStrm
<<
'\0'
;
sal_uLong
nRead
=
0
;
pStrm
->
Seek
(
STREAM_SEEK_TO_BEGIN
);
uno
::
Sequence
<
sal_Int8
>
aSeq
(
nLen
);
aLockBytes
.
ReadAt
(
0
,
aSeq
.
getArray
(),
nLen
,
&
nRead
);
// Transfer ownership of stream to a lockbytes object
SvLockBytes
aLockBytes
(
pStrm
,
sal_True
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aArgs
(
1
);
SvLockBytesStat
aStat
;
aArgs
[
0
].
Name
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"RtfOutline"
));
if
(
aLockBytes
.
Stat
(
&
aStat
,
SVSTATFLAG_DEFAULT
)
==
ERRCODE_NONE
)
aArgs
[
0
].
Value
<<=
aSeq
;
{
xHelper
->
executeDispatch
(
xProv
,
aCmd
,
::
rtl
::
OUString
(),
0
,
aArgs
);
sal_uInt32
nLen
=
aStat
.
nSize
;
sal_uLong
nRead
=
0
;
uno
::
Sequence
<
sal_Int8
>
aSeq
(
nLen
);
aLockBytes
.
ReadAt
(
0
,
aSeq
.
getArray
(),
nLen
,
&
nRead
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aArgs
(
1
);
aArgs
[
0
].
Name
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"RtfOutline"
));
aArgs
[
0
].
Value
<<=
aSeq
;
xHelper
->
executeDispatch
(
xProv
,
aCmd
,
::
rtl
::
OUString
(),
0
,
aArgs
);
}
}
}
}
}
}
}
...
@@ -1079,34 +1077,31 @@ void SwDocShell::Execute(SfxRequest& rReq)
...
@@ -1079,34 +1077,31 @@ void SwDocShell::Execute(SfxRequest& rReq)
if
(
nWhich
==
FN_OUTLINE_TO_IMPRESS
)
if
(
nWhich
==
FN_OUTLINE_TO_IMPRESS
)
{
{
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xORB
=
::
comphelper
::
getProcessServiceFactory
();
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xORB
=
::
comphelper
::
getProcessServiceFactory
();
uno
::
Reference
<
uno
::
XComponentContext
>
xContext
=
::
comphelper
::
getProcessComponentContext
();
uno
::
Reference
<
frame
::
XDispatchProvider
>
xProv
(
uno
::
Reference
<
frame
::
XDispatchProvider
>
xProv
(
xORB
->
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.drawing.ModuleDispatcher"
))),
UNO_QUERY
);
xORB
->
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.drawing.ModuleDispatcher"
))),
UNO_QUERY
);
if
(
xProv
.
is
()
)
if
(
xProv
.
is
()
)
{
{
::
rtl
::
OUString
aCmd
(
RTL_CONSTASCII_USTRINGPARAM
(
"SendOutlineToImpress"
));
::
rtl
::
OUString
aCmd
(
RTL_CONSTASCII_USTRINGPARAM
(
"SendOutlineToImpress"
));
uno
::
Reference
<
frame
::
XDispatchHelper
>
xHelper
(
uno
::
Reference
<
frame
::
XDispatchHelper
>
xHelper
(
frame
::
DispatchHelper
::
create
(
xContext
)
);
xORB
->
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.DispatchHelper"
))),
UNO_QUERY
);
pStrm
->
Seek
(
STREAM_SEEK_TO_END
);
if
(
xHelper
.
is
()
)
*
pStrm
<<
'\0'
;
pStrm
->
Seek
(
STREAM_SEEK_TO_BEGIN
);
// Transfer ownership of stream to a lockbytes object
SvLockBytes
aLockBytes
(
pStrm
,
sal_True
);
SvLockBytesStat
aStat
;
if
(
aLockBytes
.
Stat
(
&
aStat
,
SVSTATFLAG_DEFAULT
)
==
ERRCODE_NONE
)
{
{
pStrm
->
Seek
(
STREAM_SEEK_TO_END
);
sal_uInt32
nLen
=
aStat
.
nSize
;
*
pStrm
<<
'\0'
;
sal_uLong
nRead
=
0
;
pStrm
->
Seek
(
STREAM_SEEK_TO_BEGIN
);
uno
::
Sequence
<
sal_Int8
>
aSeq
(
nLen
);
aLockBytes
.
ReadAt
(
0
,
aSeq
.
getArray
(),
nLen
,
&
nRead
);
// Transfer ownership of stream to a lockbytes object
SvLockBytes
aLockBytes
(
pStrm
,
sal_True
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aArgs
(
1
);
SvLockBytesStat
aStat
;
aArgs
[
0
].
Name
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"RtfOutline"
));
if
(
aLockBytes
.
Stat
(
&
aStat
,
SVSTATFLAG_DEFAULT
)
==
ERRCODE_NONE
)
aArgs
[
0
].
Value
<<=
aSeq
;
{
xHelper
->
executeDispatch
(
xProv
,
aCmd
,
::
rtl
::
OUString
(),
0
,
aArgs
);
sal_uInt32
nLen
=
aStat
.
nSize
;
sal_uLong
nRead
=
0
;
uno
::
Sequence
<
sal_Int8
>
aSeq
(
nLen
);
aLockBytes
.
ReadAt
(
0
,
aSeq
.
getArray
(),
nLen
,
&
nRead
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aArgs
(
1
);
aArgs
[
0
].
Name
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"RtfOutline"
));
aArgs
[
0
].
Value
<<=
aSeq
;
xHelper
->
executeDispatch
(
xProv
,
aCmd
,
::
rtl
::
OUString
(),
0
,
aArgs
);
}
}
}
}
}
}
}
...
...
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