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
a8f9feb9
Kaydet (Commit)
a8f9feb9
authored
Ock 09, 2014
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fwk: Constructor feature for single-instance TaskCreatorService.
Change-Id: I9e994ebb4822458039709690aa5dd0a7f75735ac
üst
6c15ca4d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
117 additions
and
156 deletions
+117
-156
persistentwindowstate.hxx
framework/inc/helper/persistentwindowstate.hxx
+1
-0
taskcreatordefs.hxx
framework/inc/taskcreatordefs.hxx
+3
-93
taskcreator.cxx
framework/source/classes/taskcreator.cxx
+1
-1
registerservices.cxx
framework/source/register/registerservices.cxx
+0
-2
taskcreatorsrv.cxx
framework/source/services/taskcreatorsrv.cxx
+109
-59
fwk.component
framework/util/fwk.component
+2
-1
native-code.py
solenv/bin/native-code.py
+1
-0
No files found.
framework/inc/helper/persistentwindowstate.hxx
Dosyayı görüntüle @
a8f9feb9
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XFrameActionListener.hpp>
#include <com/sun/star/frame/XFrameActionListener.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <unotools/moduleoptions.hxx>
#include <unotools/moduleoptions.hxx>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase2.hxx>
...
...
framework/inc/
services/taskcreatorsrv
.hxx
→
framework/inc/
taskcreatordefs
.hxx
Dosyayı görüntüle @
a8f9feb9
...
@@ -17,29 +17,8 @@
...
@@ -17,29 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
*/
#ifndef INCLUDED_FRAMEWORK_INC_SERVICES_TASKCREATORSRV_HXX
#ifndef INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
#define INCLUDED_FRAMEWORK_INC_SERVICES_TASKCREATORSRV_HXX
#define INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
#include <threadhelp/threadhelpbase.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
#include <general.h>
#include <stdtypes.h>
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/frame/XFrame2.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
#include <cppuhelper/implbase2.hxx>
#include <comphelper/sequenceashashmap.hxx>
//_______________________________________________
// definition
/// [XFrame] if it's set, it will be used as parent frame for the new created frame.
/// [XFrame] if it's set, it will be used as parent frame for the new created frame.
const
char
ARGUMENT_PARENTFRAME
[]
=
"ParentFrame"
;
// XFrame
const
char
ARGUMENT_PARENTFRAME
[]
=
"ParentFrame"
;
// XFrame
...
@@ -74,75 +53,6 @@ const char ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE[] = "SupportPersistentWindowSta
...
@@ -74,75 +53,6 @@ const char ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE[] = "SupportPersistentWindowSta
*/
*/
const
char
ARGUMENT_ENABLE_TITLEBARUPDATE
[]
=
"EnableTitleBarUpdate"
;
// sal_Bool
const
char
ARGUMENT_ENABLE_TITLEBARUPDATE
[]
=
"EnableTitleBarUpdate"
;
// sal_Bool
#endif // INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
namespace
framework
{
//_______________________________________________
/**
* TODO document me
*/
class
TaskCreatorService
:
// attention! Must be the first base class to guarentee right initialize lock ...
private
ThreadHelpBase
,
public
::
cppu
::
WeakImplHelper2
<
css
::
lang
::
XServiceInfo
,
css
::
lang
::
XSingleServiceFactory
>
{
//___________________________________________
// member
private
:
//---------------------------------------
/** @short the global uno service manager.
@descr Must be used to create own needed services.
*/
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
m_xContext
;
//___________________________________________
// interface
public
:
TaskCreatorService
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
xContext
);
virtual
~
TaskCreatorService
(
);
// XInterface, XTypeProvider, XServiceInfo
DECLARE_XSERVICEINFO
// XSingleServiceFactory
virtual
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
SAL_CALL
createInstance
()
throw
(
css
::
uno
::
Exception
,
css
::
uno
::
RuntimeException
);
virtual
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
SAL_CALL
createInstanceWithArguments
(
const
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>&
lArguments
)
throw
(
css
::
uno
::
Exception
,
css
::
uno
::
RuntimeException
);
//___________________________________________
// helper
private
:
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>
implts_createContainerWindow
(
const
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>&
xParentWindow
,
const
css
::
awt
::
Rectangle
&
aPosSize
,
sal_Bool
bTopWindow
);
void
implts_applyDocStyleToWindow
(
const
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>&
xWindow
)
const
;
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>
implts_createFrame
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xParentFrame
,
const
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>&
xContainerWindow
,
const
OUString
&
sName
);
void
implts_establishWindowStateListener
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>&
xFrame
);
void
implts_establishTitleBarUpdate
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>&
xFrame
);
void
implts_establishDocModifyListener
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>&
xFrame
);
OUString
impl_filterNames
(
const
OUString
&
sName
);
};
}
// namespace framework
#endif // INCLUDED_FRAMEWORK_INC_SERVICES_TASKCREATORSRV_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
framework/source/classes/taskcreator.cxx
Dosyayı görüntüle @
a8f9feb9
...
@@ -18,10 +18,10 @@
...
@@ -18,10 +18,10 @@
*/
*/
#include <classes/taskcreator.hxx>
#include <classes/taskcreator.hxx>
#include "services/taskcreatorsrv.hxx"
#include <threadhelp/readguard.hxx>
#include <threadhelp/readguard.hxx>
#include <loadenv/targethelper.hxx>
#include <loadenv/targethelper.hxx>
#include <services.h>
#include <services.h>
#include <taskcreatordefs.hxx>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/TaskCreator.hpp>
#include <com/sun/star/frame/TaskCreator.hpp>
...
...
framework/source/register/registerservices.cxx
Dosyayı görüntüle @
a8f9feb9
...
@@ -40,7 +40,6 @@
...
@@ -40,7 +40,6 @@
#include "uiconfiguration/windowstateconfiguration.hxx"
#include "uiconfiguration/windowstateconfiguration.hxx"
#include <uifactory/statusbarfactory.hxx>
#include <uifactory/statusbarfactory.hxx>
#include <services/sessionlistener.hxx>
#include <services/sessionlistener.hxx>
#include <services/taskcreatorsrv.hxx>
#include <services/ContextChangeEventMultiplexer.hxx>
#include <services/ContextChangeEventMultiplexer.hxx>
...
@@ -53,7 +52,6 @@ COMPONENTGETFACTORY ( fwk,
...
@@ -53,7 +52,6 @@ COMPONENTGETFACTORY ( fwk,
IFFACTORY
(
::
framework
::
StatusBarFactory
)
else
IFFACTORY
(
::
framework
::
StatusBarFactory
)
else
IFFACTORY
(
::
framework
::
SessionListener
)
else
IFFACTORY
(
::
framework
::
SessionListener
)
else
IFFACTORY
(
::
framework
::
SessionListener
)
else
IFFACTORY
(
::
framework
::
SessionListener
)
else
IFFACTORY
(
::
framework
::
TaskCreatorService
)
else
IFFACTORY
(
::
framework
::
ContextChangeEventMultiplexer
)
IFFACTORY
(
::
framework
::
ContextChangeEventMultiplexer
)
)
)
...
...
framework/source/services/taskcreatorsrv.cxx
Dosyayı görüntüle @
a8f9feb9
...
@@ -17,58 +17,107 @@
...
@@ -17,58 +17,107 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
*/
#include "services/taskcreatorsrv.hxx"
#include <helper/persistentwindowstate.hxx>
#include <helper/persistentwindowstate.hxx>
#include <helper/tagwindowasmodified.hxx>
#include <helper/tagwindowasmodified.hxx>
#include <helper/titlebarupdate.hxx>
#include <helper/titlebarupdate.hxx>
#include <threadhelp/readguard.hxx>
#include <threadhelp/writeguard.hxx>
#include <loadenv/targethelper.hxx>
#include <loadenv/targethelper.hxx>
#include <
services.h
>
#include <
taskcreatordefs.hxx
>
#include <com/sun/star/frame/Frame.hpp>
#include <com/sun/star/frame/Frame.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XFrame2.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/awt/Toolkit.hpp>
#include <com/sun/star/awt/Toolkit.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/WindowDescriptor.hpp>
#include <com/sun/star/awt/WindowDescriptor.hpp>
#include <com/sun/star/awt/WindowAttribute.hpp>
#include <com/sun/star/awt/WindowAttribute.hpp>
#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <comphelper/sequenceashashmap.hxx>
#include <cppuhelper/compbase2.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <svtools/colorcfg.hxx>
#include <svtools/colorcfg.hxx>
#include <vcl/svapp.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <vcl/window.hxx>
//_______________________________________________
using
namespace
framework
;
// namespaces
namespace
{
typedef
::
cppu
::
WeakComponentImplHelper2
<
css
::
lang
::
XServiceInfo
,
css
::
lang
::
XSingleServiceFactory
>
TaskCreatorService_BASE
;
namespace
framework
class
TaskCreatorService
:
private
osl
::
Mutex
,
public
TaskCreatorService_BASE
{
{
//-----------------------------------------------
private
:
DEFINE_XSERVICEINFO_ONEINSTANCESERVICE_2
(
TaskCreatorService
,
::
cppu
::
OWeakObject
,
"com.sun.star.frame.TaskCreator"
,
IMPLEMENTATIONNAME_FWK_TASKCREATOR
)
//-----------------------------------------------
//---------------------------------------
DEFINE_INIT_SERVICE
(
/** @short the global uno service manager.
TaskCreatorService
,
@descr Must be used to create own needed services.
{
*/
/*Attention
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
m_xContext
;
I think we don't need any mutex or lock here ... because we are called by our own static method impl_createInstance()
to create a new instance of this class by our own supported service factory.
public
:
see macro DEFINE_XSERVICEINFO_MULTISERVICE and "impl_initService()" for further information!
*/
TaskCreatorService
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
xContext
);
}
virtual
~
TaskCreatorService
(
);
)
virtual
OUString
SAL_CALL
getImplementationName
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
OUString
(
"com.sun.star.comp.framework.TaskCreator"
);
}
virtual
sal_Bool
SAL_CALL
supportsService
(
OUString
const
&
ServiceName
)
throw
(
css
::
uno
::
RuntimeException
)
{
return
cppu
::
supportsService
(
this
,
ServiceName
);
}
virtual
css
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
css
::
uno
::
RuntimeException
)
{
css
::
uno
::
Sequence
<
OUString
>
aSeq
(
1
);
aSeq
[
0
]
=
OUString
(
"com.sun.star.frame.TaskCreator"
);
return
aSeq
;
}
// XSingleServiceFactory
virtual
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
SAL_CALL
createInstance
()
throw
(
css
::
uno
::
Exception
,
css
::
uno
::
RuntimeException
);
virtual
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
SAL_CALL
createInstanceWithArguments
(
const
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>&
lArguments
)
throw
(
css
::
uno
::
Exception
,
css
::
uno
::
RuntimeException
);
private
:
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>
implts_createContainerWindow
(
const
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>&
xParentWindow
,
const
css
::
awt
::
Rectangle
&
aPosSize
,
sal_Bool
bTopWindow
);
void
implts_applyDocStyleToWindow
(
const
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>&
xWindow
)
const
;
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>
implts_createFrame
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xParentFrame
,
const
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>&
xContainerWindow
,
const
OUString
&
sName
);
void
implts_establishWindowStateListener
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>&
xFrame
);
void
implts_establishTitleBarUpdate
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>&
xFrame
);
void
implts_establishDocModifyListener
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>&
xFrame
);
OUString
impl_filterNames
(
const
OUString
&
sName
);
};
//-----------------------------------------------
//-----------------------------------------------
TaskCreatorService
::
TaskCreatorService
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
xContext
)
TaskCreatorService
::
TaskCreatorService
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
xContext
)
:
T
hreadHelpBase
(
&
Application
::
GetSolarMutex
(
))
:
T
askCreatorService_BASE
(
*
static_cast
<
osl
::
Mutex
*>
(
this
))
,
m_xContext
(
xContext
)
,
m_xContext
(
xContext
)
{
{
}
}
...
@@ -185,14 +234,8 @@ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContai
...
@@ -185,14 +234,8 @@ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContai
const
css
::
awt
::
Rectangle
&
aPosSize
,
const
css
::
awt
::
Rectangle
&
aPosSize
,
sal_Bool
bTopWindow
)
sal_Bool
bTopWindow
)
{
{
// SAFE ->
ReadGuard
aReadLock
(
m_aLock
);
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
xContext
=
m_xContext
;
aReadLock
.
unlock
();
// <- SAFE
// get toolkit to create task container window
// get toolkit to create task container window
css
::
uno
::
Reference
<
css
::
awt
::
XToolkit2
>
xToolkit
=
css
::
awt
::
Toolkit
::
create
(
xContext
);
css
::
uno
::
Reference
<
css
::
awt
::
XToolkit2
>
xToolkit
=
css
::
awt
::
Toolkit
::
create
(
m_
xContext
);
// Check if child frames can be created really. We need at least a valid window at the parent frame ...
// Check if child frames can be created really. We need at least a valid window at the parent frame ...
css
::
uno
::
Reference
<
css
::
awt
::
XWindowPeer
>
xParentWindowPeer
;
css
::
uno
::
Reference
<
css
::
awt
::
XWindowPeer
>
xParentWindowPeer
;
...
@@ -248,14 +291,8 @@ css::uno::Reference< css::frame::XFrame2 > TaskCreatorService::implts_createFram
...
@@ -248,14 +291,8 @@ css::uno::Reference< css::frame::XFrame2 > TaskCreatorService::implts_createFram
const
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>&
xContainerWindow
,
const
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>&
xContainerWindow
,
const
OUString
&
sName
)
const
OUString
&
sName
)
{
{
// SAFE ->
ReadGuard
aReadLock
(
m_aLock
);
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
xContext
=
m_xContext
;
aReadLock
.
unlock
();
// <- SAFE
// create new frame.
// create new frame.
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>
xNewFrame
=
css
::
frame
::
Frame
::
create
(
xContext
);
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>
xNewFrame
=
css
::
frame
::
Frame
::
create
(
m_
xContext
);
// Set window on frame.
// Set window on frame.
// Do it before calling any other interface methods ...
// Do it before calling any other interface methods ...
...
@@ -281,17 +318,11 @@ css::uno::Reference< css::frame::XFrame2 > TaskCreatorService::implts_createFram
...
@@ -281,17 +318,11 @@ css::uno::Reference< css::frame::XFrame2 > TaskCreatorService::implts_createFram
//-----------------------------------------------
//-----------------------------------------------
void
TaskCreatorService
::
implts_establishWindowStateListener
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>&
xFrame
)
void
TaskCreatorService
::
implts_establishWindowStateListener
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>&
xFrame
)
{
{
// SAFE ->
ReadGuard
aReadLock
(
m_aLock
);
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
xContext
=
m_xContext
;
aReadLock
.
unlock
();
// <- SAFE
// Special feature: It's allowed for frames using a top level window only!
// Special feature: It's allowed for frames using a top level window only!
// We must create a special listener service and couple it with the new created task frame.
// We must create a special listener service and couple it with the new created task frame.
// He will restore or save the window state of it ...
// He will restore or save the window state of it ...
// See used classes for further information too.
// See used classes for further information too.
PersistentWindowState
*
pPersistentStateHandler
=
new
PersistentWindowState
(
xContext
);
PersistentWindowState
*
pPersistentStateHandler
=
new
PersistentWindowState
(
m_
xContext
);
css
::
uno
::
Reference
<
css
::
lang
::
XInitialization
>
xInit
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
pPersistentStateHandler
),
css
::
uno
::
UNO_QUERY_THROW
);
css
::
uno
::
Reference
<
css
::
lang
::
XInitialization
>
xInit
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
pPersistentStateHandler
),
css
::
uno
::
UNO_QUERY_THROW
);
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
lInitData
(
1
);
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
lInitData
(
1
);
...
@@ -316,13 +347,7 @@ void TaskCreatorService::implts_establishDocModifyListener( const css::uno::Refe
...
@@ -316,13 +347,7 @@ void TaskCreatorService::implts_establishDocModifyListener( const css::uno::Refe
//-----------------------------------------------
//-----------------------------------------------
void
TaskCreatorService
::
implts_establishTitleBarUpdate
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>&
xFrame
)
void
TaskCreatorService
::
implts_establishTitleBarUpdate
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame2
>&
xFrame
)
{
{
// SAFE ->
TitleBarUpdate
*
pHelper
=
new
TitleBarUpdate
(
m_xContext
);
ReadGuard
aReadLock
(
m_aLock
);
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
xContext
=
m_xContext
;
aReadLock
.
unlock
();
// <- SAFE
TitleBarUpdate
*
pHelper
=
new
TitleBarUpdate
(
xContext
);
css
::
uno
::
Reference
<
css
::
lang
::
XInitialization
>
xInit
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
pHelper
),
css
::
uno
::
UNO_QUERY_THROW
);
css
::
uno
::
Reference
<
css
::
lang
::
XInitialization
>
xInit
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
pHelper
),
css
::
uno
::
UNO_QUERY_THROW
);
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
lInitData
(
1
);
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
lInitData
(
1
);
...
@@ -338,6 +363,31 @@ OUString TaskCreatorService::impl_filterNames( const OUString& sName )
...
@@ -338,6 +363,31 @@ OUString TaskCreatorService::impl_filterNames( const OUString& sName )
return
sFiltered
;
return
sFiltered
;
}
}
}
// namespace framework
struct
Instance
{
explicit
Instance
(
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
const
&
context
)
:
instance
(
static_cast
<
cppu
::
OWeakObject
*>
(
new
TaskCreatorService
(
context
)))
{
}
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
instance
;
};
struct
Singleton
:
public
rtl
::
StaticWithArg
<
Instance
,
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
,
Singleton
>
{};
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
css
::
uno
::
XInterface
*
SAL_CALL
com_sun_star_comp_framework_TaskCreator_get_implementation
(
css
::
uno
::
XComponentContext
*
context
,
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
const
&
)
{
return
cppu
::
acquire
(
static_cast
<
cppu
::
OWeakObject
*>
(
Singleton
::
get
(
context
).
instance
.
get
()));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
framework/util/fwk.component
Dosyayı görüntüle @
a8f9feb9
...
@@ -121,7 +121,8 @@
...
@@ -121,7 +121,8 @@
constructor=
"com_sun_star_comp_framework_StatusIndicatorFactory_get_implementation"
>
constructor=
"com_sun_star_comp_framework_StatusIndicatorFactory_get_implementation"
>
<service
name=
"com.sun.star.task.StatusIndicatorFactory"
/>
<service
name=
"com.sun.star.task.StatusIndicatorFactory"
/>
</implementation>
</implementation>
<implementation
name=
"com.sun.star.comp.framework.TaskCreator"
>
<implementation
name=
"com.sun.star.comp.framework.TaskCreator"
constructor=
"com_sun_star_comp_framework_TaskCreator_get_implementation"
>
<service
name=
"com.sun.star.frame.TaskCreator"
/>
<service
name=
"com.sun.star.frame.TaskCreator"
/>
</implementation>
</implementation>
<implementation
name=
"com.sun.star.comp.framework.ToolBarControllerFactory"
<implementation
name=
"com.sun.star.comp.framework.ToolBarControllerFactory"
...
...
solenv/bin/native-code.py
Dosyayı görüntüle @
a8f9feb9
...
@@ -59,6 +59,7 @@ core_constructor_list = [
...
@@ -59,6 +59,7 @@ core_constructor_list = [
"com_sun_star_comp_framework_PathSettings_get_implementation"
,
"com_sun_star_comp_framework_PathSettings_get_implementation"
,
"com_sun_star_comp_framework_PathSubstitution_get_implementation"
,
"com_sun_star_comp_framework_PathSubstitution_get_implementation"
,
"com_sun_star_comp_framework_StatusIndicatorFactory_get_implementation"
,
"com_sun_star_comp_framework_StatusIndicatorFactory_get_implementation"
,
"com_sun_star_comp_framework_TaskCreator_get_implementation"
,
"com_sun_star_comp_framework_ToolBarControllerFactory_get_implementation"
,
"com_sun_star_comp_framework_ToolBarControllerFactory_get_implementation"
,
"com_sun_star_comp_framework_UIConfigurationManager_get_implementation"
,
"com_sun_star_comp_framework_UIConfigurationManager_get_implementation"
,
"com_sun_star_comp_framework_UIElementFactoryManager_get_implementation"
,
"com_sun_star_comp_framework_UIElementFactoryManager_get_implementation"
,
...
...
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