[Libreoffice-commits] core.git: 14 commits - basctl/source cui/source dbaccess/source desktop/source dtrans/Library_dnd.mk dtrans/Library_ftransl.mk dtrans/Library_sysdtrans.mk dtrans/source editeng/inc editeng/source fpicker/source framework/source i18npool/source linguistic/inc linguistic/source offapi/com offapi/type_reference offapi/UnoApi_offapi.mk reportdesign/source sc/source sdext/source sd/source sfx2/inc sfx2/source starmath/source svtools/inc svtools/source svx/source sw/inc sw/source vcl/aqua vcl/ios vcl/source vcl/unx vcl/win xmloff/inc xmloff/source xmlscript/source
Noel Grandin
noel at peralex.com
Tue Feb 12 00:17:14 PST 2013
basctl/source/basicide/baside2.cxx | 37 --
basctl/source/basicide/baside3.cxx | 41 --
basctl/source/basicide/moduldl2.cxx | 54 +--
basctl/source/dlged/dlgedclip.cxx | 21 -
cui/source/dialogs/SpellDialog.cxx | 6
cui/source/dialogs/insdlg.cxx | 52 +--
cui/source/options/optdict.cxx | 2
cui/source/options/personalization.cxx | 14
cui/source/options/treeopt.cxx | 4
dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx | 2
dbaccess/source/filter/xml/xmlTable.cxx | 4
dbaccess/source/filter/xml/xmlfilter.cxx | 23 -
dbaccess/source/filter/xml/xmlfilter.hxx | 2
desktop/source/deployment/gui/dp_gui_dialog2.cxx | 16
dtrans/Library_dnd.mk | 1
dtrans/Library_ftransl.mk | 1
dtrans/Library_sysdtrans.mk | 1
dtrans/source/cnttype/mcnttfactory.cxx | 3
dtrans/source/cnttype/mcnttfactory.hxx | 3
dtrans/source/cnttype/mctfentry.cxx | 4
dtrans/source/generic/clipboardmanager.hxx | 8
dtrans/source/inc/DtObjFactory.hxx | 6
dtrans/source/win32/clipb/WinClipbImpl.cxx | 4
dtrans/source/win32/clipb/WinClipboard.cxx | 4
dtrans/source/win32/clipb/WinClipboard.hxx | 7
dtrans/source/win32/clipb/wcbentry.cxx | 3
dtrans/source/win32/dnd/dndentry.cxx | 5
dtrans/source/win32/dnd/source.cxx | 6
dtrans/source/win32/dnd/source.hxx | 4
dtrans/source/win32/dnd/target.cxx | 6
dtrans/source/win32/dnd/target.hxx | 4
dtrans/source/win32/dtobj/DOTransferable.cxx | 12
dtrans/source/win32/dtobj/DOTransferable.hxx | 4
dtrans/source/win32/dtobj/DataFmtTransl.cxx | 8
dtrans/source/win32/dtobj/DataFmtTransl.hxx | 5
dtrans/source/win32/dtobj/DtObjFactory.cxx | 8
dtrans/source/win32/dtobj/FetcList.cxx | 23 -
dtrans/source/win32/dtobj/FetcList.hxx | 6
dtrans/source/win32/dtobj/XTDataObject.cxx | 8
dtrans/source/win32/dtobj/XTDataObject.hxx | 3
dtrans/source/win32/ftransl/ftransl.cxx | 12
dtrans/source/win32/ftransl/ftransl.hxx | 5
dtrans/source/win32/ftransl/ftranslentry.cxx | 3
editeng/inc/editeng/unolingu.hxx | 16
editeng/source/editeng/editview.cxx | 2
editeng/source/editeng/impedit3.cxx | 10
editeng/source/misc/SvXMLAutoCorrectImport.cxx | 8
editeng/source/misc/SvXMLAutoCorrectImport.hxx | 4
editeng/source/misc/splwrap.cxx | 2
editeng/source/misc/svxacorr.cxx | 57 +--
editeng/source/misc/unolingu.cxx | 23 -
editeng/source/xml/xmltxtimp.cxx | 14
fpicker/source/aqua/SalAquaFilePicker.hxx | 17
fpicker/source/aqua/SalAquaFilePicker.mm | 11
fpicker/source/win32/filepicker/FilePicker.cxx | 11
fpicker/source/win32/filepicker/FilePicker.hxx | 20 -
fpicker/source/win32/filepicker/VistaFilePicker.hxx | 18 -
framework/source/uielement/toolbarmanager.cxx | 8
i18npool/source/inputchecker/inputsequencechecker.cxx | 3
linguistic/inc/iprcache.hxx | 6
linguistic/inc/linguistic/misc.hxx | 8
linguistic/inc/linguistic/spelldta.hxx | 5
linguistic/source/convdicxml.hxx | 2
linguistic/source/dlistimp.cxx | 2
linguistic/source/hyphdsp.hxx | 4
linguistic/source/iprcache.cxx | 6
linguistic/source/lngsvcmgr.cxx | 6
linguistic/source/misc.cxx | 50 +-
linguistic/source/spelldsp.cxx | 6
linguistic/source/spelldsp.hxx | 2
linguistic/source/spelldta.cxx | 4
offapi/UnoApi_offapi.mk | 16
offapi/com/sun/star/animations/SequenceTimeContainer.idl | 38 ++
offapi/com/sun/star/cui/ColorPicker.idl | 42 ++
offapi/com/sun/star/document/XMLOasisBasicImporter.idl | 17
offapi/com/sun/star/document/XXMLOasisBasicImporter.idl | 52 +++
offapi/com/sun/star/i18n/InputSequenceChecker.idl | 7
offapi/com/sun/star/linguistic2/DictionaryList.idl | 10
offapi/com/sun/star/script/DocumentDialogLibraryContainer.idl | 2
offapi/com/sun/star/script/DocumentScriptLibraryContainer.idl | 1
offapi/com/sun/star/ui/dialogs/FilePicker.idl | 61 ---
offapi/com/sun/star/ui/dialogs/XFilePicker3.idl | 78 ++++
offapi/type_reference/types.rdb |binary
reportdesign/source/filter/xml/xmlFixedContent.cxx | 2
reportdesign/source/filter/xml/xmlSection.cxx | 3
reportdesign/source/filter/xml/xmlTable.cxx | 1
reportdesign/source/filter/xml/xmlfilter.cxx | 52 +--
reportdesign/source/filter/xml/xmlfilter.hxx | 4
sc/source/core/data/globalx.cxx | 41 --
sc/source/filter/xml/xmlimprt.cxx | 15
sc/source/filter/xml/xmlimprt.hxx | 2
sc/source/ui/xmlsource/xmlsourcedlg.cxx | 8
sd/source/core/CustomAnimationEffect.cxx | 57 +--
sdext/source/minimizer/fileopendialog.cxx | 25 -
sdext/source/minimizer/fileopendialog.hxx | 7
sfx2/inc/sfx2/filedlghelper.hxx | 1
sfx2/inc/sfx2/tbxctrl.hxx | 2
sfx2/source/dialog/filedlghelper.cxx | 2
sfx2/source/toolbox/tbxitem.cxx | 6
starmath/source/mathmlimport.cxx | 10
starmath/source/mathmlimport.hxx | 2
svtools/inc/svtools/framestatuslistener.hxx | 6
svtools/source/control/filectrl2.cxx | 56 +--
svtools/source/control/toolbarmenu.cxx | 9
svtools/source/control/toolbarmenuimp.hxx | 1
svtools/source/dialogs/colrdlg.cxx | 8
svtools/source/misc/imagemgr.cxx | 5
svtools/source/misc/transfer.cxx | 171 ++++------
svtools/source/uno/framestatuslistener.cxx | 18 -
svx/source/inc/xmlxtimp.hxx | 2
svx/source/xml/xmlxtimp.cxx | 12
sw/inc/SwXMLSectionList.hxx | 2
sw/source/core/bastyp/checkit.cxx | 13
sw/source/core/inc/SwXMLBlockImport.hxx | 4
sw/source/core/swg/SwXMLBlockImport.cxx | 10
sw/source/core/swg/SwXMLSectionList.cxx | 4
sw/source/core/swg/SwXMLTextBlocks1.cxx | 27 -
sw/source/filter/xml/swxml.cxx | 4
sw/source/filter/xml/xmlimp.cxx | 15
sw/source/filter/xml/xmlimp.hxx | 2
sw/source/filter/xml/xmlitemi.cxx | 2
sw/source/ui/lingu/olmenu.cxx | 6
vcl/aqua/source/dtrans/DataFlavorMapping.cxx | 10
vcl/aqua/source/dtrans/aqua_clipboard.cxx | 14
vcl/ios/source/dtrans/ios_clipboard.cxx | 13
vcl/source/control/edit.cxx | 11
vcl/source/edit/texteng.cxx | 11
vcl/source/gdi/print3.cxx | 75 +---
vcl/unx/kde/UnxFilePicker.cxx | 10
vcl/unx/kde/UnxFilePicker.hxx | 22 -
vcl/unx/kde4/KDE4FilePicker.cxx | 11
vcl/unx/kde4/KDE4FilePicker.hxx | 21 -
vcl/win/source/gdi/salprn.cxx | 46 +-
xmloff/inc/MetaImportComponent.hxx | 2
xmloff/inc/SchXMLImport.hxx | 2
xmloff/inc/xmloff/xmlimp.hxx | 9
xmloff/inc/xmlversion.hxx | 3
xmloff/source/chart/SchXMLImport.cxx | 12
xmloff/source/core/DocumentSettingsContext.cxx | 7
xmloff/source/core/XMLEmbeddedObjectImportContext.cxx | 6
xmloff/source/core/xmlimp.cxx | 25 -
xmloff/source/draw/animationimport.cxx | 24 -
xmloff/source/draw/sdxmlimp.cxx | 7
xmloff/source/draw/sdxmlimp_impl.hxx | 3
xmloff/source/draw/ximpstyl.cxx | 6
xmloff/source/forms/elementimport.cxx | 3
xmloff/source/meta/MetaImportComponent.cxx | 7
xmloff/source/meta/xmlmetai.cxx | 2
xmloff/source/meta/xmlversion.cxx | 13
xmloff/source/script/xmlbasici.cxx | 25 -
xmloff/source/script/xmlbasici.hxx | 4
xmloff/source/text/XMLAutoTextEventImport.cxx | 9
xmloff/source/text/XMLAutoTextEventImport.hxx | 4
xmlscript/source/xmlflat_imexp/xmlbas_import.hxx | 10
154 files changed, 967 insertions(+), 1171 deletions(-)
New commits:
commit 0e286f768ed028ce91bb4730010363dac30acec6
Author: Noel Grandin <noel at peralex.com>
Date: Mon Feb 11 14:44:18 2013 +0200
fdo#46808, use constructor for datatransfer::DataFormatTranslator
Change-Id: I68fd87ae71f764099b00b05a29cf5194d24da58d
diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx
index e232cb4..86eb617 100644
--- a/dtrans/source/cnttype/mcnttfactory.cxx
+++ b/dtrans/source/cnttype/mcnttfactory.cxx
@@ -52,8 +52,7 @@ namespace
// ctor
//------------------------------------------------------------------------
-CMimeContentTypeFactory::CMimeContentTypeFactory( const Reference< XMultiServiceFactory >& rSrvMgr ) :
- m_SrvMgr( rSrvMgr )
+CMimeContentTypeFactory::CMimeContentTypeFactory()
{
}
diff --git a/dtrans/source/cnttype/mcnttfactory.hxx b/dtrans/source/cnttype/mcnttfactory.hxx
index a64f890..94721d9 100644
--- a/dtrans/source/cnttype/mcnttfactory.hxx
+++ b/dtrans/source/cnttype/mcnttfactory.hxx
@@ -33,7 +33,7 @@ class CMimeContentTypeFactory : public
{
public:
- CMimeContentTypeFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSrvMgr );
+ CMimeContentTypeFactory();
//------------------------------------------------
// XMimeContentTypeFactory
@@ -57,7 +57,6 @@ public:
private:
::osl::Mutex m_aMutex;
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
};
diff --git a/dtrans/source/cnttype/mctfentry.cxx b/dtrans/source/cnttype/mctfentry.cxx
index 913fc03..096a942 100644
--- a/dtrans/source/cnttype/mctfentry.cxx
+++ b/dtrans/source/cnttype/mctfentry.cxx
@@ -57,9 +57,9 @@ namespace
// so we should give it to every UNO-Implementation component
//-----------------------------------------------------------------------------------------------------------
- Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
+ Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& )
{
- return Reference< XInterface >( static_cast< XMimeContentTypeFactory* >( new CMimeContentTypeFactory( rServiceManager ) ) );
+ return Reference< XInterface >( static_cast< XMimeContentTypeFactory* >( new CMimeContentTypeFactory() ) );
}
}
diff --git a/dtrans/source/generic/clipboardmanager.hxx b/dtrans/source/generic/clipboardmanager.hxx
index 11d94a7..7da462d 100644
--- a/dtrans/source/generic/clipboardmanager.hxx
+++ b/dtrans/source/generic/clipboardmanager.hxx
@@ -40,10 +40,10 @@ typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Reference< ::com::su
namespace dtrans
{
- class ClipboardManager : public ::cppu::WeakComponentImplHelper3 < \
- ::com::sun::star::datatransfer::clipboard::XClipboardManager, \
- ::com::sun::star::lang::XEventListener, \
- ::com::sun::star::lang::XServiceInfo >
+ class ClipboardManager : public ::cppu::WeakComponentImplHelper3 <
+ ::com::sun::star::datatransfer::clipboard::XClipboardManager,
+ ::com::sun::star::lang::XEventListener,
+ ::com::sun::star::lang::XServiceInfo >
{
ClipboardMap m_aClipboardMap;
::osl::Mutex m_aMutex;
diff --git a/dtrans/source/inc/DtObjFactory.hxx b/dtrans/source/inc/DtObjFactory.hxx
index e196a49..3427236 100644
--- a/dtrans/source/inc/DtObjFactory.hxx
+++ b/dtrans/source/inc/DtObjFactory.hxx
@@ -22,17 +22,17 @@
#define _DTOBJFACTORY_HXX_
#include <com/sun/star/datatransfer/XTransferable.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <systools/win32/comtools.hxx>
class CDTransObjFactory
{
public:
- virtual IDataObjectPtr SAL_CALL createDataObjFromTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager,
+ virtual IDataObjectPtr SAL_CALL createDataObjFromTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable >& refXTransferable );
virtual com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable > SAL_CALL createTransferableFromDataObj(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager, IDataObjectPtr pIDataObject );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, IDataObjectPtr pIDataObject );
};
#endif
diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx
index 841d601..167e889 100644
--- a/dtrans/source/win32/clipb/WinClipbImpl.cxx
+++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx
@@ -120,7 +120,7 @@ Reference< XTransferable > SAL_CALL CWinClipbImpl::getContents( ) throw( Runtime
CDTransObjFactory objFactory;
// remeber pIDo destroys itself due to the smart pointer
- rClipContent = objFactory.createTransferableFromDataObj( m_pWinClipboard->m_SrvMgr, pIDo );
+ rClipContent = objFactory.createTransferableFromDataObj( m_pWinClipboard->m_xContext, pIDo );
}
return rClipContent;
@@ -143,7 +143,7 @@ void SAL_CALL CWinClipbImpl::setContents(
ClearableMutexGuard aGuard( m_ClipContentMutex );
m_pCurrentClipContent = new CXNotifyingDataObject(
- objFactory.createDataObjFromTransferable( m_pWinClipboard->m_SrvMgr , xTransferable ),
+ objFactory.createDataObjFromTransferable( m_pWinClipboard->m_xContext , xTransferable ),
xTransferable,
xClipboardOwner,
this );
diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx
index 88661c4a..7bf9687 100644
--- a/dtrans/source/win32/clipb/WinClipboard.cxx
+++ b/dtrans/source/win32/clipb/WinClipboard.cxx
@@ -59,9 +59,9 @@ namespace
// ctor
//------------------------------------------------------------------------
/*XEventListener,*/
-CWinClipboard::CWinClipboard( const Reference< XMultiServiceFactory >& rServiceManager, const OUString& aClipboardName ) :
+CWinClipboard::CWinClipboard( const Reference< XComponentContext >& rxContext, const OUString& aClipboardName ) :
WeakComponentImplHelper3< XSystemClipboard, XFlushableClipboard, XServiceInfo >( m_aCbListenerMutex ),
- m_SrvMgr( rServiceManager )
+ m_xContext( rxContext )
{
m_pImpl.reset( new CWinClipbImpl( aClipboardName, this ) );
}
diff --git a/dtrans/source/win32/clipb/WinClipboard.hxx b/dtrans/source/win32/clipb/WinClipboard.hxx
index a5edc97..65688d5 100644
--- a/dtrans/source/win32/clipb/WinClipboard.hxx
+++ b/dtrans/source/win32/clipb/WinClipboard.hxx
@@ -32,6 +32,7 @@
#include <com/sun/star/datatransfer/clipboard/XSystemClipboard.hpp>
#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <osl/conditn.hxx>
#include <memory>
@@ -68,7 +69,7 @@ class CWinClipboard :
::com::sun::star::lang::XServiceInfo >
{
public:
- CWinClipboard( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
+ CWinClipboard( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::rtl::OUString& aClipboardName );
//------------------------------------------------
@@ -134,8 +135,8 @@ private:
void SAL_CALL notifyAllClipboardListener( );
private:
- ::std::auto_ptr< CWinClipbImpl > m_pImpl;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
+ ::std::auto_ptr< CWinClipbImpl > m_pImpl;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
friend class CWinClipbImpl;
};
diff --git a/dtrans/source/win32/clipb/wcbentry.cxx b/dtrans/source/win32/clipb/wcbentry.cxx
index f8973a9..695fba7 100644
--- a/dtrans/source/win32/clipb/wcbentry.cxx
+++ b/dtrans/source/win32/clipb/wcbentry.cxx
@@ -18,6 +18,7 @@
*/
#include <cppuhelper/factory.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/container/XSet.hpp>
#include <osl/diagnose.h>
#include "WinClipboard.hxx"
@@ -58,7 +59,7 @@ namespace
Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
{
- return Reference< XInterface >( static_cast< XClipboard* >( new CWinClipboard( rServiceManager, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "" ) ) ) ) );
+ return Reference< XInterface >( static_cast< XClipboard* >( new CWinClipboard( comphelper::getComponentContext(rServiceManager), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "" ) ) ) ) );
}
}
diff --git a/dtrans/source/win32/dnd/dndentry.cxx b/dtrans/source/win32/dnd/dndentry.cxx
index 6a45cbe..c463dee 100644
--- a/dtrans/source/win32/dnd/dndentry.cxx
+++ b/dtrans/source/win32/dnd/dndentry.cxx
@@ -18,6 +18,7 @@
*/
#include <cppuhelper/factory.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/container/XSet.hpp>
#include <osl/diagnose.h>
@@ -34,13 +35,13 @@ rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
Reference< XInterface > SAL_CALL createDragSource( const Reference< XMultiServiceFactory >& rServiceManager )
{
- DragSource* pSource= new DragSource( rServiceManager );
+ DragSource* pSource= new DragSource( comphelper::getComponentContext(rServiceManager) );
return Reference<XInterface>( static_cast<XInitialization*>(pSource), UNO_QUERY);
}
Reference< XInterface > SAL_CALL createDropTarget( const Reference< XMultiServiceFactory >& rServiceManager )
{
- DropTarget* pTarget= new DropTarget( rServiceManager );
+ DropTarget* pTarget= new DropTarget( comphelper::getComponentContext(rServiceManager) );
return Reference<XInterface>( static_cast<XInitialization*>(pTarget), UNO_QUERY);
}
diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx
index 2b4cd83..bc3ad7f 100644
--- a/dtrans/source/win32/dnd/source.cxx
+++ b/dtrans/source/win32/dnd/source.cxx
@@ -67,9 +67,9 @@ unsigned __stdcall DndOleSTAFunc(LPVOID pParams);
//----------------------------------------------------
/** Ctor
*/
-DragSource::DragSource( const Reference<XMultiServiceFactory>& sf):
+DragSource::DragSource( const Reference<XComponentContext>& rxContext):
WeakComponentImplHelper3< XDragSource, XInitialization, XServiceInfo >(m_mutex),
- m_serviceFactory( sf),
+ m_xContext( rxContext ),
// m_pcurrentContext_impl(0),
m_hAppWindow(0),
m_MouseButton(0),
@@ -131,7 +131,7 @@ void DragSource::StartDragImpl(
//<-- TRA
m_spDataObject= m_aDataConverter.createDataObjFromTransferable(
- m_serviceFactory, trans);
+ m_xContext, trans);
// Obtain the id of the thread that created the window
DWORD processId;
diff --git a/dtrans/source/win32/dnd/source.hxx b/dtrans/source/win32/dnd/source.hxx
index 5690b04..736e2bc 100644
--- a/dtrans/source/win32/dnd/source.hxx
+++ b/dtrans/source/win32/dnd/source.hxx
@@ -51,7 +51,7 @@ class DragSource:
public IDropSource
{
- Reference<XMultiServiceFactory> m_serviceFactory;
+ Reference<XComponentContext> m_xContext;
HWND m_hAppWindow;
// The mouse button that set off the drag and drop operation
@@ -89,7 +89,7 @@ public:
sal_Int8 m_sourceActions;
public:
- DragSource(const Reference<XMultiServiceFactory>& sf);
+ DragSource(const Reference<XComponentContext>& rxContext);
virtual ~DragSource();
// XInitialization
diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx
index cb9430e..4afce4b 100644
--- a/dtrans/source/win32/dnd/target.cxx
+++ b/dtrans/source/win32/dnd/target.cxx
@@ -46,7 +46,7 @@ extern Reference< XTransferable > g_XTransferable;
extern rtl_StandardModuleCount g_moduleCount;
DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams);
-DropTarget::DropTarget( const Reference<XMultiServiceFactory>& sf):
+DropTarget::DropTarget( const Reference<XComponentContext>& rxContext):
WeakComponentImplHelper3<XInitialization,XDropTarget, XServiceInfo>(m_mutex),
m_hWnd( NULL),
m_threadIdWindow(0),
@@ -54,7 +54,7 @@ DropTarget::DropTarget( const Reference<XMultiServiceFactory>& sf):
m_hOleThread(0),
m_oleThreadId( 0),
m_pDropTarget( NULL),
- m_serviceFactory( sf),
+ m_xContext( rxContext ),
m_bActive(sal_True),
m_nDefaultActions(ACTION_COPY|ACTION_MOVE|ACTION_LINK|ACTION_DEFAULT),
m_nCurrentDropAction( ACTION_NONE),
@@ -340,7 +340,7 @@ HRESULT DropTarget::DragEnter( IDataObject *pDataObj,
{
// Convert the IDataObject to a XTransferable
m_currentData= m_aDataConverter.createTransferableFromDataObj(
- m_serviceFactory, IDataObjectPtr(pDataObj));
+ m_xContext, IDataObjectPtr(pDataObj));
}
//<-- TRA
diff --git a/dtrans/source/win32/dnd/target.hxx b/dtrans/source/win32/dnd/target.hxx
index d78e3af..16e5b89 100644
--- a/dtrans/source/win32/dnd/target.hxx
+++ b/dtrans/source/win32/dnd/target.hxx
@@ -85,7 +85,7 @@ private:
// this class.
IDropTarget* m_pDropTarget;
- Reference<XMultiServiceFactory> m_serviceFactory;
+ Reference<XComponentContext> m_xContext;
// If m_bActive == sal_True then events are fired to XDropTargetListener s,
// none otherwise. The default value is sal_True.
sal_Bool m_bActive;
@@ -116,7 +116,7 @@ private:
DropTarget &operator= (DropTarget&);
public:
- DropTarget(const Reference<XMultiServiceFactory>& sf);
+ DropTarget(const Reference<XComponentContext>& rxContext);
virtual ~DropTarget();
// Overrides WeakComponentImplHelper::disposing which is called by
diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx
index b2bbb03..bf615f1 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.cxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.cxx
@@ -76,10 +76,10 @@ namespace
//------------------------------------------------------------------------
CDOTransferable::CDOTransferable(
- const Reference< XMultiServiceFactory >& ServiceManager, IDataObjectPtr rDataObject ) :
+ const Reference< XComponentContext >& rxContext, IDataObjectPtr rDataObject ) :
m_rDataObject( rDataObject ),
- m_SrvMgr( ServiceManager ),
- m_DataFormatTranslator( m_SrvMgr ),
+ m_xContext( rxContext ),
+ m_DataFormatTranslator( rxContext ),
m_bUnicodeRegistered( sal_False ),
m_TxtFormatOnClipboard( CF_INVALID )
{
@@ -493,7 +493,7 @@ sal_Bool SAL_CALL CDOTransferable::compareDataFlavors(
{
if ( !m_rXMimeCntFactory.is( ) )
{
- m_rXMimeCntFactory = MimeContentTypeFactory::create( comphelper::getComponentContext(m_SrvMgr) );
+ m_rXMimeCntFactory = MimeContentTypeFactory::create( m_xContext );
}
sal_Bool bRet = sal_False;
diff --git a/dtrans/source/win32/dtobj/DOTransferable.hxx b/dtrans/source/win32/dtobj/DOTransferable.hxx
index 2b423a5..4634216 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.hxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.hxx
@@ -63,7 +63,7 @@ public:
private:
// should be created only by CDTransObjFactory
explicit CDOTransferable(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ServiceManager,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
IDataObjectPtr rDataObject );
//------------------------------------------------------------------------
@@ -97,7 +97,7 @@ private:
private:
IDataObjectPtr m_rDataObject;
com::sun::star::uno::Sequence< com::sun::star::datatransfer::DataFlavor > m_FlavorList;
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
CDataFormatTranslator m_DataFormatTranslator;
com::sun::star::uno::Reference< com::sun::star::datatransfer::XMimeContentTypeFactory > m_rXMimeCntFactory;
::osl::Mutex m_aMutex;
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx
index c3ba962..4a9ca7a 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx
+++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx
@@ -27,6 +27,8 @@
#include "DTransHelper.hxx"
#include <rtl/string.h>
#include "Fetc.hxx"
+#include <com/sun/star/datatransfer/DataFormatTranslator.hpp>
+
#if defined _MSC_VER
#pragma warning(push,1)
@@ -66,11 +68,9 @@ const OUString HTML_FORMAT_NAME_SOFFICE ("HTML (HyperText Markup Language)");
//
//------------------------------------------------------------------------
-CDataFormatTranslator::CDataFormatTranslator( const Reference< XMultiServiceFactory >& aServiceManager ) :
- m_SrvMgr( aServiceManager )
+CDataFormatTranslator::CDataFormatTranslator( const Reference< XComponentContext >& rxContext )
{
- m_XDataFormatTranslator = Reference< XDataFormatTranslator >(
- m_SrvMgr->createInstance( OUString("com.sun.star.datatransfer.DataFormatTranslator") ), UNO_QUERY );
+ m_XDataFormatTranslator = DataFormatTranslator::create( rxContext );
}
//------------------------------------------------------------------------
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.hxx b/dtrans/source/win32/dtobj/DataFmtTransl.hxx
index c585bc2..7cb0684 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.hxx
+++ b/dtrans/source/win32/dtobj/DataFmtTransl.hxx
@@ -23,7 +23,7 @@
#include <com/sun/star/datatransfer/XDataFormatTranslator.hpp>
#include <com/sun/star/datatransfer/XTransferable.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <sal/types.h>
#include <rtl/ustring.hxx>
@@ -44,7 +44,7 @@ class CFormatEtc;
class CDataFormatTranslator
{
public:
- CDataFormatTranslator( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager );
+ CDataFormatTranslator( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
CFormatEtc getFormatEtcFromDataFlavor( const com::sun::star::datatransfer::DataFlavor& aDataFlavor ) const;
com::sun::star::datatransfer::DataFlavor getDataFlavorFromFormatEtc(
@@ -64,7 +64,6 @@ private:
rtl::OUString SAL_CALL getTextCharsetFromLCID( LCID lcid, CLIPFORMAT aClipformat ) const;
private:
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
com::sun::star::uno::Reference< com::sun::star::datatransfer::XDataFormatTranslator > m_XDataFormatTranslator;
};
diff --git a/dtrans/source/win32/dtobj/DtObjFactory.cxx b/dtrans/source/win32/dtobj/DtObjFactory.cxx
index 0732879..9909dfa 100644
--- a/dtrans/source/win32/dtobj/DtObjFactory.cxx
+++ b/dtrans/source/win32/dtobj/DtObjFactory.cxx
@@ -35,16 +35,16 @@ using namespace com::sun::star::lang;
// implementation
//------------------------------------------------------------------------
-IDataObjectPtr SAL_CALL CDTransObjFactory::createDataObjFromTransferable(const Reference<XMultiServiceFactory>& aServiceManager,
+IDataObjectPtr SAL_CALL CDTransObjFactory::createDataObjFromTransferable(const Reference<XComponentContext>& rxContext,
const Reference< XTransferable >& refXTransferable)
{
- return (IDataObjectPtr(new CXTDataObject(aServiceManager, refXTransferable)));
+ return (IDataObjectPtr(new CXTDataObject(rxContext, refXTransferable)));
}
-Reference< XTransferable > SAL_CALL CDTransObjFactory::createTransferableFromDataObj( const Reference< XMultiServiceFactory >& aServiceManager,
+Reference< XTransferable > SAL_CALL CDTransObjFactory::createTransferableFromDataObj( const Reference< XComponentContext >& rxContext,
IDataObjectPtr pIDataObject )
{
- CDOTransferable* pTransf = new CDOTransferable(aServiceManager, pIDataObject);
+ CDOTransferable* pTransf = new CDOTransferable(rxContext, pIDataObject);
Reference<XTransferable> refDOTransf(pTransf);
pTransf->acquire();
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index c343a01..5b8bb97 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -71,14 +71,13 @@ public:
// ctor
//------------------------------------------------------------------------
-CXTDataObject::CXTDataObject( const Reference< XMultiServiceFactory >& aServiceManager,
+CXTDataObject::CXTDataObject( const Reference< XComponentContext >& rxContext,
const Reference< XTransferable >& aXTransferable )
: m_nRefCnt( 0 )
- , m_SrvMgr( aServiceManager )
, m_XTransferable( aXTransferable )
, m_bFormatEtcContainerInitialized( sal_False )
- , m_DataFormatTranslator( aServiceManager )
- , m_FormatRegistrar( comphelper::getComponentContext(m_SrvMgr), m_DataFormatTranslator )
+ , m_DataFormatTranslator( rxContext )
+ , m_FormatRegistrar( rxContext, m_DataFormatTranslator )
{
}
diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx
index c54040d..a8a87c6 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.hxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.hxx
@@ -63,7 +63,7 @@ class CStgTransferHelper;
class CXTDataObject : public IDataObject
{
public:
- CXTDataObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager,
+ CXTDataObject( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& aXTransferable );
virtual ~CXTDataObject() {}
@@ -120,7 +120,6 @@ private:
private:
LONG m_nRefCnt;
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > m_XTransferable;
CFormatEtcContainer m_FormatEtcContainer;
sal_Bool m_bFormatEtcContainerInitialized;
commit 851067c2684c68758afeaa7da23bb6dd69c51358
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 6 17:14:00 2013 +0200
fdo#46808, use constructor for datatransfer::MimeContentTypeFactory
Change-Id: I576a472e22ad0e3798f4b34d808ac320f13d3e6d
diff --git a/basctl/source/dlged/dlgedclip.cxx b/basctl/source/dlged/dlgedclip.cxx
index 54cd68b..68fbf4f 100644
--- a/basctl/source/dlged/dlgedclip.cxx
+++ b/basctl/source/dlged/dlgedclip.cxx
@@ -22,7 +22,7 @@
#include <vcl/svapp.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/datatransfer/XMimeContentType.hpp>
-#include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp>
+#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
namespace basctl
{
@@ -56,21 +56,18 @@ sal_Bool DlgEdTransferableImpl::compareDataFlavors( const DataFlavor& lFlavor, c
bool bRet = false;
// compare mime content types
- Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
+ Reference< uno::XComponentContext > xContext = getProcessComponentContext();
Reference< datatransfer::XMimeContentTypeFactory >
- xMCntTypeFactory( xMSF->createInstance( "com.sun.star.datatransfer.MimeContentTypeFactory" ), UNO_QUERY );
+ xMCntTypeFactory = MimeContentTypeFactory::create(xContext);;
- if ( xMCntTypeFactory.is( ) )
- {
- // compare full media types
- Reference< datatransfer::XMimeContentType > xLType = xMCntTypeFactory->createMimeContentType( lFlavor.MimeType );
- Reference< datatransfer::XMimeContentType > xRType = xMCntTypeFactory->createMimeContentType( rFlavor.MimeType );
+ // compare full media types
+ Reference< datatransfer::XMimeContentType > xLType = xMCntTypeFactory->createMimeContentType( lFlavor.MimeType );
+ Reference< datatransfer::XMimeContentType > xRType = xMCntTypeFactory->createMimeContentType( rFlavor.MimeType );
- OUString aLFullMediaType = xLType->getFullMediaType();
- OUString aRFullMediaType = xRType->getFullMediaType();
+ OUString aLFullMediaType = xLType->getFullMediaType();
+ OUString aRFullMediaType = xRType->getFullMediaType();
- bRet = aLFullMediaType.equalsIgnoreAsciiCase( aRFullMediaType );
- }
+ bRet = aLFullMediaType.equalsIgnoreAsciiCase( aRFullMediaType );
return bRet;
}
diff --git a/dtrans/Library_dnd.mk b/dtrans/Library_dnd.mk
index 6314a64..05ed37e 100644
--- a/dtrans/Library_dnd.mk
+++ b/dtrans/Library_dnd.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_Library_set_componentfile,dnd,dtrans/util/dnd))
$(eval $(call gb_Library_use_sdk_api,dnd))
$(eval $(call gb_Library_use_libraries,dnd,\
+ comphelper \
cppu \
cppuhelper \
sal \
diff --git a/dtrans/Library_ftransl.mk b/dtrans/Library_ftransl.mk
index fcad409..8e062bf 100644
--- a/dtrans/Library_ftransl.mk
+++ b/dtrans/Library_ftransl.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_Library_set_componentfile,ftransl,dtrans/util/ftransl))
$(eval $(call gb_Library_use_sdk_api,ftransl))
$(eval $(call gb_Library_use_libraries,ftransl,\
+ comphelper \
cppu \
cppuhelper \
sal \
diff --git a/dtrans/Library_sysdtrans.mk b/dtrans/Library_sysdtrans.mk
index 9ab2396..8d456ae 100644
--- a/dtrans/Library_sysdtrans.mk
+++ b/dtrans/Library_sysdtrans.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_Library_add_defs,sysdtrans,\
))
$(eval $(call gb_Library_use_libraries,sysdtrans,\
+ comphelper \
cppu \
cppuhelper \
sal \
diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx
index 15f8fb9..b2bbb03 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.cxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.cxx
@@ -29,6 +29,8 @@
#include "MimeAttrib.hxx"
#include "FmtFilter.hxx"
#include "Fetc.hxx"
+#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
+#include <comphelper/processfactory.hxx>
#define STR2(x) #x
#define STR(x) STR2(x)
@@ -491,10 +493,8 @@ sal_Bool SAL_CALL CDOTransferable::compareDataFlavors(
{
if ( !m_rXMimeCntFactory.is( ) )
{
- m_rXMimeCntFactory = Reference< XMimeContentTypeFactory >( m_SrvMgr->createInstance(
- OUString("com.sun.star.datatransfer.MimeContentTypeFactory") ), UNO_QUERY );
+ m_rXMimeCntFactory = MimeContentTypeFactory::create( comphelper::getComponentContext(m_SrvMgr) );
}
- OSL_ASSERT( m_rXMimeCntFactory.is( ) );
sal_Bool bRet = sal_False;
diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx
index 7031dac..00bc9d3 100644
--- a/dtrans/source/win32/dtobj/FetcList.cxx
+++ b/dtrans/source/win32/dtobj/FetcList.cxx
@@ -20,7 +20,7 @@
#include <osl/diagnose.h>
#include "FetcList.hxx"
#include "Fetc.hxx"
-#include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp>
+#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
#include <com/sun/star/datatransfer/XMimeContentType.hpp>
#include "DataFmtTransl.hxx"
@@ -165,11 +165,11 @@ sal_Bool SAL_CALL CFormatEtcContainer::skipFormatEtc( sal_uInt32 aNum )
//
//------------------------------------------------------------------------
-CFormatRegistrar::CFormatRegistrar( const Reference< XMultiServiceFactory >& ServiceManager,
+CFormatRegistrar::CFormatRegistrar( const Reference< XComponentContext >& rxContext,
const CDataFormatTranslator& aDataFormatTranslator ) :
m_DataFormatTranslator( aDataFormatTranslator ),
m_bHasSynthesizedLocale( sal_False ),
- m_SrvMgr( ServiceManager )
+ m_xContext( rxContext )
{
}
@@ -346,17 +346,14 @@ OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor&
try
{
- Reference< XMimeContentTypeFactory > xMimeFac(
- m_SrvMgr->createInstance( OUString( "com.sun.star.datatransfer.MimeContentTypeFactory" ) ), UNO_QUERY );
+ Reference< XMimeContentTypeFactory > xMimeFac =
+ MimeContentTypeFactory::create(m_xContext);
- if( xMimeFac.is( ) )
- {
- Reference< XMimeContentType > xMimeType( xMimeFac->createMimeContentType( aFlavor.MimeType ) );
- if ( xMimeType->hasParameter( TEXTPLAIN_PARAM_CHARSET ) )
- charset = xMimeType->getParameterValue( TEXTPLAIN_PARAM_CHARSET );
- else
- charset = getMimeCharsetFromWinCP( GetACP( ), PRE_WINDOWS_CODEPAGE );
- }
+ Reference< XMimeContentType > xMimeType( xMimeFac->createMimeContentType( aFlavor.MimeType ) );
+ if ( xMimeType->hasParameter( TEXTPLAIN_PARAM_CHARSET ) )
+ charset = xMimeType->getParameterValue( TEXTPLAIN_PARAM_CHARSET );
+ else
+ charset = getMimeCharsetFromWinCP( GetACP( ), PRE_WINDOWS_CODEPAGE );
}
catch(NoSuchElementException&)
{
diff --git a/dtrans/source/win32/dtobj/FetcList.hxx b/dtrans/source/win32/dtobj/FetcList.hxx
index e980130..7e3058b 100644
--- a/dtrans/source/win32/dtobj/FetcList.hxx
+++ b/dtrans/source/win32/dtobj/FetcList.hxx
@@ -23,7 +23,7 @@
#include <sal/types.h>
#include <com/sun/star/datatransfer/XTransferable.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include "Fetc.hxx"
#if defined _MSC_VER
@@ -97,7 +97,7 @@ class CDataFormatTranslator;
class CFormatRegistrar
{
public:
- CFormatRegistrar( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ServiceManager,
+ CFormatRegistrar( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const CDataFormatTranslator& aDataFormatTranslator );
void SAL_CALL RegisterFormats( const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable >& aXTransferable,
@@ -131,7 +131,7 @@ private:
sal_Bool m_bHasSynthesizedLocale;
com::sun::star::datatransfer::DataFlavor m_RegisteredTextFlavor;
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
static LCID m_TxtLocale;
static sal_uInt32 m_TxtCodePage;
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index a8e2ad2..c343a01 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -26,6 +26,7 @@
#include "TxtCnvtHlp.hxx"
#include <com/sun/star/datatransfer/clipboard/XClipboardEx.hpp>
#include "FmtFilter.hxx"
+#include <comphelper/processfactory.hxx>
#if defined _MSC_VER
#pragma warning(push,1)
@@ -77,7 +78,7 @@ CXTDataObject::CXTDataObject( const Reference< XMultiServiceFactory >& aServiceM
, m_XTransferable( aXTransferable )
, m_bFormatEtcContainerInitialized( sal_False )
, m_DataFormatTranslator( aServiceManager )
- , m_FormatRegistrar( m_SrvMgr, m_DataFormatTranslator )
+ , m_FormatRegistrar( comphelper::getComponentContext(m_SrvMgr), m_DataFormatTranslator )
{
}
diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index 422ea63..53611cb 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -21,6 +21,8 @@
#include "ftransl.hxx"
#include <com/sun/star/datatransfer/XMimeContentType.hpp>
+#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include "../misc/ImplHelper.hxx"
#if defined _MSC_VER
@@ -107,8 +109,8 @@ FormatEntry::FormatEntry(
// ctor
//------------------------------------------------------------------------
-CDataFormatTranslator::CDataFormatTranslator( const Reference< XMultiServiceFactory >& rSrvMgr ) :
- m_SrvMgr( rSrvMgr )
+CDataFormatTranslator::CDataFormatTranslator( const Reference< XComponentContext >& rxContext ) :
+ m_xContext( rxContext )
{
initTranslationTable( );
}
@@ -124,11 +126,7 @@ Any SAL_CALL CDataFormatTranslator::getSystemDataTypeFromDataFlavor( const DataF
try
{
- Reference< XMimeContentTypeFactory > refXMimeCntFactory( m_SrvMgr->createInstance(
- "com.sun.star.datatransfer.MimeContentTypeFactory" ), UNO_QUERY );
-
- if ( !refXMimeCntFactory.is( ) )
- throw RuntimeException( );
+ Reference< XMimeContentTypeFactory > refXMimeCntFactory = MimeContentTypeFactory::create( m_xContext );
Reference< XMimeContentType >
refXMimeCntType( refXMimeCntFactory->createMimeContentType( aDataFlavor.MimeType ) );
diff --git a/dtrans/source/win32/ftransl/ftransl.hxx b/dtrans/source/win32/ftransl/ftransl.hxx
index 195dc52..4650fc0 100644
--- a/dtrans/source/win32/ftransl/ftransl.hxx
+++ b/dtrans/source/win32/ftransl/ftransl.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/datatransfer/XDataFormatTranslator.hpp>
#include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include "../misc/WinClip.hxx"
#include <vector>
@@ -66,7 +67,7 @@ class CDataFormatTranslator : public
{
public:
- CDataFormatTranslator( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSrvMgr );
+ CDataFormatTranslator( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
//------------------------------------------------
// XDataFormatTranslator
@@ -108,7 +109,7 @@ private:
private:
std::vector< FormatEntry > m_TranslTable;
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
};
diff --git a/dtrans/source/win32/ftransl/ftranslentry.cxx b/dtrans/source/win32/ftransl/ftranslentry.cxx
index eecdb3c..2b04e18 100644
--- a/dtrans/source/win32/ftransl/ftranslentry.cxx
+++ b/dtrans/source/win32/ftransl/ftranslentry.cxx
@@ -18,6 +18,7 @@
*/
#include <cppuhelper/factory.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/container/XSet.hpp>
#include <osl/diagnose.h>
@@ -60,7 +61,7 @@ namespace
Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
{
- return Reference< XInterface >( static_cast< XDataFormatTranslator* >( new CDataFormatTranslator( rServiceManager ) ) );
+ return Reference< XInterface >( static_cast< XDataFormatTranslator* >( new CDataFormatTranslator( comphelper::getComponentContext(rServiceManager) ) ) );
}
}
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 6e6cda2..97988ce 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -43,7 +43,7 @@
#include <comphelper/seqstream.hxx>
#include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp>
#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
-#include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp>
+#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
#include <com/sun/star/datatransfer/XMimeContentType.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -212,73 +212,65 @@ static ::rtl::OUString ImplGetParameterString( const TransferableObjectDescripto
static void ImplSetParameterString( TransferableObjectDescriptor& rObjDesc, const DataFlavorEx& rFlavorEx )
{
- Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
- Reference< XMimeContentTypeFactory > xMimeFact;
+ Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
try
{
- if( xFact.is() )
- {
- xMimeFact = Reference< XMimeContentTypeFactory >( xFact->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.datatransfer.MimeContentTypeFactory" )) ),
- UNO_QUERY );
- }
+ Reference< XMimeContentTypeFactory > xMimeFact = MimeContentTypeFactory::create( xContext );
- if( xMimeFact.is() )
- {
- Reference< XMimeContentType > xMimeType( xMimeFact->createMimeContentType( rFlavorEx.MimeType ) );
+ Reference< XMimeContentType > xMimeType( xMimeFact->createMimeContentType( rFlavorEx.MimeType ) );
- if( xMimeType.is() )
+ if( xMimeType.is() )
+ {
+ const ::rtl::OUString aClassNameString(RTL_CONSTASCII_USTRINGPARAM( "classname" ));
+ const ::rtl::OUString aTypeNameString(RTL_CONSTASCII_USTRINGPARAM( "typename" ));
+ const ::rtl::OUString aDisplayNameString(RTL_CONSTASCII_USTRINGPARAM( "displayname" ));
+ const ::rtl::OUString aViewAspectString(RTL_CONSTASCII_USTRINGPARAM( "viewaspect" ));
+ const ::rtl::OUString aWidthString(RTL_CONSTASCII_USTRINGPARAM( "width" ));
+ const ::rtl::OUString aHeightString(RTL_CONSTASCII_USTRINGPARAM( "height" ));
+ const ::rtl::OUString aPosXString(RTL_CONSTASCII_USTRINGPARAM( "posx" ));
+ const ::rtl::OUString aPosYString(RTL_CONSTASCII_USTRINGPARAM( "posy" ));
+
+ if( xMimeType->hasParameter( aClassNameString ) )
{
- const ::rtl::OUString aClassNameString(RTL_CONSTASCII_USTRINGPARAM( "classname" ));
- const ::rtl::OUString aTypeNameString(RTL_CONSTASCII_USTRINGPARAM( "typename" ));
- const ::rtl::OUString aDisplayNameString(RTL_CONSTASCII_USTRINGPARAM( "displayname" ));
- const ::rtl::OUString aViewAspectString(RTL_CONSTASCII_USTRINGPARAM( "viewaspect" ));
- const ::rtl::OUString aWidthString(RTL_CONSTASCII_USTRINGPARAM( "width" ));
- const ::rtl::OUString aHeightString(RTL_CONSTASCII_USTRINGPARAM( "height" ));
- const ::rtl::OUString aPosXString(RTL_CONSTASCII_USTRINGPARAM( "posx" ));
- const ::rtl::OUString aPosYString(RTL_CONSTASCII_USTRINGPARAM( "posy" ));
-
- if( xMimeType->hasParameter( aClassNameString ) )
- {
- rObjDesc.maClassName.MakeId( xMimeType->getParameterValue( aClassNameString ) );
- }
+ rObjDesc.maClassName.MakeId( xMimeType->getParameterValue( aClassNameString ) );
+ }
- if( xMimeType->hasParameter( aTypeNameString ) )
- {
- rObjDesc.maTypeName = xMimeType->getParameterValue( aTypeNameString );
- }
+ if( xMimeType->hasParameter( aTypeNameString ) )
+ {
+ rObjDesc.maTypeName = xMimeType->getParameterValue( aTypeNameString );
+ }
- if( xMimeType->hasParameter( aDisplayNameString ) )
- {
- // the display name might contain unacceptable characters, in this case they should be encoded
- // this seems to be the only parameter currently that might contain such characters
- rObjDesc.maDisplayName = ::rtl::Uri::decode( xMimeType->getParameterValue( aDisplayNameString ), rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
- }
+ if( xMimeType->hasParameter( aDisplayNameString ) )
+ {
+ // the display name might contain unacceptable characters, in this case they should be encoded
+ // this seems to be the only parameter currently that might contain such characters
+ rObjDesc.maDisplayName = ::rtl::Uri::decode( xMimeType->getParameterValue( aDisplayNameString ), rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
+ }
- if( xMimeType->hasParameter( aViewAspectString ) )
- {
- rObjDesc.mnViewAspect = static_cast< sal_uInt16 >( xMimeType->getParameterValue( aViewAspectString ).toInt32() );
- }
+ if( xMimeType->hasParameter( aViewAspectString ) )
+ {
+ rObjDesc.mnViewAspect = static_cast< sal_uInt16 >( xMimeType->getParameterValue( aViewAspectString ).toInt32() );
+ }
- if( xMimeType->hasParameter( aWidthString ) )
- {
- rObjDesc.maSize.Width() = xMimeType->getParameterValue( aWidthString ).toInt32();
- }
+ if( xMimeType->hasParameter( aWidthString ) )
+ {
+ rObjDesc.maSize.Width() = xMimeType->getParameterValue( aWidthString ).toInt32();
+ }
- if( xMimeType->hasParameter( aHeightString ) )
- {
- rObjDesc.maSize.Height() = xMimeType->getParameterValue( aHeightString ).toInt32();
- }
+ if( xMimeType->hasParameter( aHeightString ) )
+ {
+ rObjDesc.maSize.Height() = xMimeType->getParameterValue( aHeightString ).toInt32();
+ }
- if( xMimeType->hasParameter( aPosXString ) )
- {
- rObjDesc.maDragStartPos.X() = xMimeType->getParameterValue( aPosXString ).toInt32();
- }
+ if( xMimeType->hasParameter( aPosXString ) )
+ {
+ rObjDesc.maDragStartPos.X() = xMimeType->getParameterValue( aPosXString ).toInt32();
+ }
- if( xMimeType->hasParameter( aPosYString ) )
- {
- rObjDesc.maDragStartPos.Y() = xMimeType->getParameterValue( aPosYString ).toInt32();
- }
+ if( xMimeType->hasParameter( aPosYString ) )
+ {
+ rObjDesc.maDragStartPos.Y() = xMimeType->getParameterValue( aPosYString ).toInt32();
}
}
}
@@ -1350,14 +1342,11 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor
{
try
{
- Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
- Reference< XMimeContentTypeFactory > xMimeFact;
+ Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ Reference< XMimeContentTypeFactory > xMimeFact = MimeContentTypeFactory::create( xContext );
DataFlavorEx aFlavorEx;
const ::rtl::OUString aCharsetStr(RTL_CONSTASCII_USTRINGPARAM( "charset" ));
- if( xFact.is() )
- xMimeFact = Reference< XMimeContentTypeFactory >( xFact->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.datatransfer.MimeContentTypeFactory" )) ),
- UNO_QUERY );
for( sal_Int32 i = 0; i < rDataFlavorSeq.getLength(); i++ )
{
@@ -1366,7 +1355,7 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor
try
{
- if( xMimeFact.is() && !rFlavor.MimeType.isEmpty() )
+ if( !rFlavor.MimeType.isEmpty() )
xMimeType = xMimeFact->createMimeContentType( rFlavor.MimeType );
}
catch( const ::com::sun::star::uno::Exception& )
@@ -2275,52 +2264,46 @@ sal_Bool TransferableDataHelper::IsEqual( const ::com::sun::star::datatransfer::
const ::com::sun::star::datatransfer::DataFlavor& rRequestFlavor,
sal_Bool )
{
- Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
- Reference< XMimeContentTypeFactory > xMimeFact;
+ Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
sal_Bool bRet = sal_False;
try
{
- if( xFact.is() )
- xMimeFact = Reference< XMimeContentTypeFactory >( xFact->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.datatransfer.MimeContentTypeFactory" )) ),
- UNO_QUERY );
+ Reference< XMimeContentTypeFactory > xMimeFact = MimeContentTypeFactory::create( xContext );
- if( xMimeFact.is() )
- {
- Reference< XMimeContentType > xRequestType1( xMimeFact->createMimeContentType( rInternalFlavor.MimeType ) );
- Reference< XMimeContentType > xRequestType2( xMimeFact->createMimeContentType( rRequestFlavor.MimeType ) );
+ Reference< XMimeContentType > xRequestType1( xMimeFact->createMimeContentType( rInternalFlavor.MimeType ) );
+ Reference< XMimeContentType > xRequestType2( xMimeFact->createMimeContentType( rRequestFlavor.MimeType ) );
- if( xRequestType1.is() && xRequestType2.is() )
+ if( xRequestType1.is() && xRequestType2.is() )
+ {
+ if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( xRequestType2->getFullMediaType() ) )
{
- if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( xRequestType2->getFullMediaType() ) )
+ if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text/plain" )) ) )
{
- if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text/plain" )) ) )
- {
- // special handling for text/plain media types
- const ::rtl::OUString aCharsetString(RTL_CONSTASCII_USTRINGPARAM( "charset" ));
+ // special handling for text/plain media types
+ const ::rtl::OUString aCharsetString(RTL_CONSTASCII_USTRINGPARAM( "charset" ));
- if( !xRequestType2->hasParameter( aCharsetString ) ||
- xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "utf-16" )) ) ||
- xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unicode" )) ) )
- {
- bRet = sal_True;
- }
- }
- else if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice" )) ) )
+ if( !xRequestType2->hasParameter( aCharsetString ) ||
+ xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "utf-16" )) ) ||
+ xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unicode" )) ) )
{
- // special handling for application/x-openoffice media types
- const ::rtl::OUString aFormatString(RTL_CONSTASCII_USTRINGPARAM( "windows_formatname" ));
-
- if( xRequestType1->hasParameter( aFormatString ) &&
- xRequestType2->hasParameter( aFormatString ) &&
- xRequestType1->getParameterValue( aFormatString ).equalsIgnoreAsciiCase( xRequestType2->getParameterValue( aFormatString ) ) )
- {
- bRet = sal_True;
- }
+ bRet = sal_True;
}
- else
+ }
+ else if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice" )) ) )
+ {
+ // special handling for application/x-openoffice media types
+ const ::rtl::OUString aFormatString(RTL_CONSTASCII_USTRINGPARAM( "windows_formatname" ));
+
+ if( xRequestType1->hasParameter( aFormatString ) &&
+ xRequestType2->hasParameter( aFormatString ) &&
+ xRequestType1->getParameterValue( aFormatString ).equalsIgnoreAsciiCase( xRequestType2->getParameterValue( aFormatString ) ) )
+ {
bRet = sal_True;
+ }
}
+ else
+ bRet = sal_True;
}
}
}
diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index 01dbde5..a338bd2 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -22,7 +22,7 @@
#include "PictToBmpFlt.hxx"
#include "com/sun/star/datatransfer/UnsupportedFlavorException.hpp"
#include "com/sun/star/datatransfer/XMimeContentType.hpp"
-#include "com/sun/star/lang/XMultiServiceFactory.hpp"
+#include "com/sun/star/datatransfer/MimeContentTypeFactory.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "comphelper/processfactory.hxx"
@@ -498,12 +498,8 @@ Any FileListDataProvider::getOOoData()
DataFlavorMapper::DataFlavorMapper()
{
- Reference<XMultiServiceFactory> mrServiceManager = comphelper::getProcessServiceFactory();
- mrXMimeCntFactory = Reference<XMimeContentTypeFactory>(mrServiceManager->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory"))), UNO_QUERY);
-
- if (!mrXMimeCntFactory.is())
- throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Cannot create com.sun.star.datatransfer.MimeContentTypeFactory")), NULL);
+ Reference<XComponentContext> xContext = comphelper::getProcessComponentContext();
+ mrXMimeCntFactory = MimeContentTypeFactory::create( xContext );
}
DataFlavor DataFlavorMapper::systemToOpenOfficeFlavor(NSString* systemDataFlavor) const
diff --git a/vcl/aqua/source/dtrans/aqua_clipboard.cxx b/vcl/aqua/source/dtrans/aqua_clipboard.cxx
index 06b4e48..87a7b6d 100644
--- a/vcl/aqua/source/dtrans/aqua_clipboard.cxx
+++ b/vcl/aqua/source/dtrans/aqua_clipboard.cxx
@@ -21,7 +21,7 @@
#include "DataFlavorMapping.hxx"
#include "OSXTransferable.hxx"
-
+#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
#include "comphelper/makesequence.hxx"
#include "comphelper/processfactory.hxx"
@@ -85,17 +85,9 @@ AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard
WeakComponentImplHelper3<XSystemClipboard, XFlushableClipboard, XServiceInfo>(m_aMutex),
mIsSystemPasteboard(bUseSystemPasteboard)
{
- Reference<XMultiServiceFactory> mrServiceMgr = comphelper::getProcessServiceFactory();
-
- mrXMimeCntFactory = Reference<XMimeContentTypeFactory>(mrServiceMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory"))), UNO_QUERY);
+ Reference<XComponentContext> xContext = comphelper::getProcessComponentContext();
- if (!mrXMimeCntFactory.is())
- {
- throw RuntimeException(OUString(
- RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Cannot create com.sun.star.datatransfer.MimeContentTypeFactory")),
- static_cast<XClipboardEx*>(this));
- }
+ mrXMimeCntFactory = MimeContentTypeFactory::create(xContext);
mpDataFlavorMapper = DataFlavorMapperPtr_t(new DataFlavorMapper());
diff --git a/vcl/ios/source/dtrans/ios_clipboard.cxx b/vcl/ios/source/dtrans/ios_clipboard.cxx
index 03c8c9c..03e4937 100644
--- a/vcl/ios/source/dtrans/ios_clipboard.cxx
+++ b/vcl/ios/source/dtrans/ios_clipboard.cxx
@@ -20,7 +20,7 @@
#include "ios_clipboard.hxx"
#include "iOSTransferable.hxx"
-
+#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
#include "comphelper/makesequence.hxx"
#include "comphelper/processfactory.hxx"
@@ -84,17 +84,10 @@ IosClipboard::IosClipboard(UIPasteboard* pasteboard, bool bUseSystemPasteboard)
WeakComponentImplHelper3<XSystemClipboard, XFlushableClipboard, XServiceInfo>(m_aMutex),
mIsSystemPasteboard(bUseSystemPasteboard)
{
- Reference<XMultiServiceFactory> mrServiceMgr = comphelper::getProcessServiceFactory();
+ Reference<XComponentContext> xContext = comphelper::getProcessComponentContext();
- mrXMimeCntFactory = Reference<XMimeContentTypeFactory>(mrServiceMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory"))), UNO_QUERY);
+ mrXMimeCntFactory = MimeContentTypeFactory::create(xContext);
- if (!mrXMimeCntFactory.is())
- {
- throw RuntimeException(OUString(
- RTL_CONSTASCII_USTRINGPARAM("IosClipboard: Cannot create com.sun.star.datatransfer.MimeContentTypeFactory")),
- static_cast<XClipboardEx*>(this));
- }
#if 0 // ???
mpDataFlavorMapper = DataFlavorMapperPtr_t(new DataFlavorMapper());
#endif
commit 2969846c29402baec792e43cfd4524366fb05613
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 6 15:27:31 2013 +0200
fdo#46808, convert some code to XComponentContext
Change-Id: I627e0270fc9d4e5b84ae99320445d28648b7654c
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index f8bc484..2a3f714 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -223,9 +223,10 @@ static String GetImageExtensionByFactory_Impl( const String& rURL )
try
{
// get the TypeDetection service to access all registered types
- ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > xFac = ::comphelper::getProcessServiceFactory();
+ ::com::sun::star::uno::Reference < ::com::sun::star::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
::com::sun::star::uno::Reference < ::com::sun::star::document::XTypeDetection > xTypeDetector(
- xFac->createInstance( ASCII_STRING("com.sun.star.document.TypeDetection") ), ::com::sun::star::uno::UNO_QUERY );
+ xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", xContext),
+ ::com::sun::star::uno::UNO_QUERY );
::rtl::OUString aInternalType = xTypeDetector->queryTypeByURL( rURL );
::com::sun::star::uno::Reference < ::com::sun::star::container::XNameAccess > xAccess( xTypeDetector, ::com::sun::star::uno::UNO_QUERY );
commit 4d23fcf0c0444aaa8b3d6ad99f0d741a80a2a247
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 6 15:22:34 2013 +0200
fdo#46808, Adapt cui::ColorPicker UNO service to new style
The service already existed, it just did not have an IDL file
Change-Id: I7a43b3f8c1299afde3a613dc7ec1c522c4b7a057
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 1d7f4bb..5854aaf 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -71,6 +71,9 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/configurat
Update \
theDefaultProvider \
))
+$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/cui,\
+ ColorPicker \
+))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/datatransfer,\
DataFormatTranslator \
MimeContentTypeFactory \
diff --git a/offapi/com/sun/star/cui/ColorPicker.idl b/offapi/com/sun/star/cui/ColorPicker.idl
new file mode 100644
index 0000000..215b3f7
--- /dev/null
+++ b/offapi/com/sun/star/cui/ColorPicker.idl
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_cui_ColorPicker_idl__
+#define __com_sun_star_cui_ColorPicker_idl__
+
+#include <com/sun/star/ui/dialogs/XExecutableDialog.idl>
+#include <com/sun/star/awt/XWindow.idl>
+
+
+module com { module sun { module star { module cui {
+
+/**
+ @since LibreOffice 4.1
+ */
+service ColorPicker : com::sun::star::ui::dialogs::XExecutableDialog
+{
+ createWithParent([in] com::sun::star::awt::XWindow Parent);
+};
+
+
+}; }; }; };
+
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/dialogs/colrdlg.cxx b/svtools/source/dialogs/colrdlg.cxx
index 96ee20a..0b7cfbc 100644
--- a/svtools/source/dialogs/colrdlg.cxx
+++ b/svtools/source/dialogs/colrdlg.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/XPropertyAccess.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/cui/ColorPicker.hpp>
#include <comphelper/processfactory.hxx>
@@ -76,14 +77,11 @@ short SvColorDialog::Execute()
try
{
const OUString sColor( RTL_CONSTASCII_USTRINGPARAM( "Color" ) );
- Reference< XMultiServiceFactory > xSMGR( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
+ Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference< com::sun::star::awt::XWindow > xParent( VCLUnoHelper::GetInterface( mpParent ) );
- Sequence< Any > args(1);
- args[0] = Any( xParent );
-
- Reference< XExecutableDialog > xDialog( xSMGR->createInstanceWithArguments(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.cui.ColorPicker")), args), UNO_QUERY_THROW );
+ Reference< XExecutableDialog > xDialog = com::sun::star::cui::ColorPicker::createWithParent(xContext, xParent);
Reference< XPropertyAccess > xPropertyAccess( xDialog, UNO_QUERY_THROW );
Sequence< PropertyValue > props( 2 );
commit 36d0933b6689c31abe65c1fdfa10d18e22d1e958
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 6 15:08:28 2013 +0200
fdo#46808, convert some svtools code to XComponentContext
Change-Id: Icf939095f130e684db88a8563c56f4eb1e6079bc
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 941a1f4..cf529fa 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -124,7 +124,7 @@ class ImageOrientationListener : public svt::FrameStatusListener
{
public:
ImageOrientationListener( const Reference< XStatusListener > rReceiver,
- const Reference< XMultiServiceFactory > rServiceManager,
+ const Reference< XComponentContext > rxContext,
const Reference< XFrame > rFrame );
virtual ~ImageOrientationListener();
@@ -136,9 +136,9 @@ class ImageOrientationListener : public svt::FrameStatusListener
ImageOrientationListener::ImageOrientationListener(
const Reference< XStatusListener > rReceiver,
- const Reference< XMultiServiceFactory > rServiceManager,
+ const Reference< XComponentContext > rxContext,
const Reference< XFrame > rFrame ) :
- FrameStatusListener( rServiceManager, rFrame ),
+ FrameStatusListener( rxContext, rFrame ),
m_xReceiver( rReceiver )
{
}
@@ -1143,7 +1143,7 @@ void ToolBarManager::AddImageOrientationListener()
m_bImageOrientationRegistered = sal_True;
ImageOrientationListener* pImageOrientation = new ImageOrientationListener(
Reference< XStatusListener >( static_cast< ::cppu::OWeakObject *>( this ), UNO_QUERY ),
- m_xServiceManager,
+ comphelper::getComponentContext(m_xServiceManager),
m_xFrame );
m_xImageOrientationListener = Reference< XComponent >( static_cast< ::cppu::OWeakObject *>(
pImageOrientation ), UNO_QUERY );
diff --git a/sfx2/inc/sfx2/tbxctrl.hxx b/sfx2/inc/sfx2/tbxctrl.hxx
index f675140..c5a890a 100644
--- a/sfx2/inc/sfx2/tbxctrl.hxx
+++ b/sfx2/inc/sfx2/tbxctrl.hxx
@@ -80,7 +80,7 @@ enum SfxPopupWindowType
class SfxFrameStatusListener : public svt::FrameStatusListener
{
public:
- SfxFrameStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
+ SfxFrameStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame,
SfxStatusListenerInterface* pCallee );
virtual ~SfxFrameStatusListener();
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index f88a781..d2c2ac8 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -1016,10 +1016,10 @@ Window* SfxToolBoxControl::CreateItemWindow( Window * )
//--------------------------------------------------------------------
SfxFrameStatusListener::SfxFrameStatusListener(
- const Reference< XMultiServiceFactory >& rServiceManager,
+ const Reference< XComponentContext >& rxContext,
const Reference< XFrame >& xFrame,
SfxStatusListenerInterface* pCallee ) :
- svt::FrameStatusListener( rServiceManager, xFrame ),
+ svt::FrameStatusListener( rxContext, xFrame ),
m_pCallee( pCallee )
{
}
@@ -1224,7 +1224,7 @@ SfxFrameStatusListener* SfxPopupWindow::GetOrCreateStatusListener()
if ( !m_xStatusListener.is() )
{
m_pStatusListener = new SfxFrameStatusListener(
- ::comphelper::getProcessServiceFactory(),
+ ::comphelper::getProcessComponentContext(),
m_xFrame,
this );
m_xStatusListener = Reference< XComponent >( static_cast< cppu::OWeakObject* >(
diff --git a/svtools/inc/svtools/framestatuslistener.hxx b/svtools/inc/svtools/framestatuslistener.hxx
index 3ef523a..cc04fba 100644
--- a/svtools/inc/svtools/framestatuslistener.hxx
+++ b/svtools/inc/svtools/framestatuslistener.hxx
@@ -21,7 +21,7 @@
#define _SVTOOLS_FRAMESTATUSLISTENER_HXX
#include "svtools/svtdllapi.h"
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XFrameActionListener.hpp>
@@ -43,7 +43,7 @@ class SVT_DLLPUBLIC FrameStatusListener : public ::com::sun::star::frame::XStatu
public ::cppu::OWeakObject
{
public:
- FrameStatusListener( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
+ FrameStatusListener( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame );
virtual ~FrameStatusListener();
@@ -90,7 +90,7 @@ class SVT_DLLPUBLIC FrameStatusListener : public ::com::sun::star::frame::XStatu
sal_Bool m_bInitialized : 1,
m_bDisposed : 1;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
URLToDispatchMap m_aListenerMap;
};
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index e68cffd..4b817c1 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -193,7 +193,6 @@ Reference< XAccessible > ToolbarMenuEntry::getAccessibleChild( sal_Int32 index )
ToolbarMenu_Impl::ToolbarMenu_Impl( ToolbarMenu& rMenu, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame )
: mrMenu( rMenu )
, mxFrame( xFrame )
-, mxServiceManager( ::comphelper::getProcessServiceFactory() )
, mnCheckPos(0)
, mnImagePos(0)
, mnTextPos(0)
@@ -1585,8 +1584,7 @@ void SAL_CALL ToolbarMenu::statusChanged( const ::com::sun::star::frame::Feature
class ToolbarMenuStatusListener : public svt::FrameStatusListener
{
public:
- ToolbarMenuStatusListener( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceManager,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame,
+ ToolbarMenuStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame,
ToolbarMenu& rToolbarMenu );
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
@@ -1598,10 +1596,9 @@ public:
// --------------------------------------------------------------------
ToolbarMenuStatusListener::ToolbarMenuStatusListener(
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceManager,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame,
ToolbarMenu& rToolbarMenu )
-: svt::FrameStatusListener( xServiceManager, xFrame )
+: svt::FrameStatusListener( ::comphelper::getProcessComponentContext(), xFrame )
, mpMenu( &rToolbarMenu )
{
}
@@ -1627,7 +1624,7 @@ void SAL_CALL ToolbarMenuStatusListener::statusChanged( const ::com::sun::star::
void ToolbarMenu::initStatusListener()
{
if( !mpImpl->mxStatusListener.is() )
- mpImpl->mxStatusListener.set( new ToolbarMenuStatusListener( mpImpl->mxServiceManager, mpImpl->mxFrame, *this ) );
+ mpImpl->mxStatusListener.set( new ToolbarMenuStatusListener( mpImpl->mxFrame, *this ) );
}
// --------------------------------------------------------------------
diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx
index 163e4cc..81c71a3 100644
--- a/svtools/source/control/toolbarmenuimp.hxx
+++ b/svtools/source/control/toolbarmenuimp.hxx
@@ -270,7 +270,6 @@ struct ToolbarMenu_Impl
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
rtl::Reference< svt::FrameStatusListener > mxStatusListener;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxServiceManager;
rtl::Reference< ToolbarMenuAcc > mxAccessible;
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxOldSelection;
diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx
index 008321e..5e42e71 100644
--- a/svtools/source/uno/framestatuslistener.cxx
+++ b/svtools/source/uno/framestatuslistener.cxx
@@ -37,13 +37,13 @@ namespace svt
{
FrameStatusListener::FrameStatusListener(
- const Reference< XMultiServiceFactory >& rServiceManager,
+ const Reference< XComponentContext >& rxContext,
const Reference< XFrame >& xFrame ) :
OWeakObject()
, m_bInitialized( sal_True )
, m_bDisposed( sal_False )
, m_xFrame( xFrame )
- , m_xServiceManager( rServiceManager )
+ , m_xContext( rxContext )
{
}
@@ -96,7 +96,7 @@ throw (::com::sun::star::uno::RuntimeException)
try
{
Reference< XDispatch > xDispatch( pIter->second );
- Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager) ) );
+ Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( m_xContext ) );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = pIter->first;
xURLTransformer->parseStrict( aTargetURL );
@@ -181,9 +181,9 @@ void FrameStatusListener::addStatusListener( const rtl::OUString& aCommandURL )
{
// Add status listener directly as intialize has already been called.
Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
- if ( m_xServiceManager.is() && xDispatchProvider.is() )
+ if ( m_xContext.is() && xDispatchProvider.is() )
{
- Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager) ) );
+ Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( m_xContext ) );
aTargetURL.Complete = aCommandURL;
xURLTransformer->parseStrict( aTargetURL );
xDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
@@ -235,13 +235,13 @@ void FrameStatusListener::bindListener()
// Collect all registered command URL's and store them temporary
Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
- if ( m_xServiceManager.is() && xDispatchProvider.is() )
+ if ( m_xContext.is() && xDispatchProvider.is() )
{
xStatusListener = Reference< XStatusListener >( static_cast< OWeakObject* >( this ), UNO_QUERY );
URLToDispatchMap::iterator pIter = m_aListenerMap.begin();
while ( pIter != m_aListenerMap.end() )
{
- Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager) ) );
+ Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( m_xContext ) );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = pIter->first;
xURLTransformer->parseStrict( aTargetURL );
@@ -304,13 +304,13 @@ void FrameStatusListener::unbindListener()
// Collect all registered command URL's and store them temporary
Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
- if ( m_xServiceManager.is() && xDispatchProvider.is() )
+ if ( m_xContext.is() && xDispatchProvider.is() )
{
Reference< XStatusListener > xStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY );
URLToDispatchMap::iterator pIter = m_aListenerMap.begin();
while ( pIter != m_aListenerMap.end() )
{
- Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager) ) );
+ Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( m_xContext ) );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = pIter->first;
xURLTransformer->parseStrict( aTargetURL );
commit a74854cb9aaeb260175d3174185631fc5d37bf9b
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 6 14:11:00 2013 +0200
fdo#46808, script::DocumentDialogLibraryContainer needed a new constructor
Change-Id: I44184dc45150e9b3b8ca4b838ea88ad260578b93
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index c64ee31..92e54d0 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -50,6 +50,7 @@
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/script/DocumentScriptLibraryContainer.hpp>
+#include <com/sun/star/script/DocumentDialogLibraryContainer.hpp>
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
#include <com/sun/star/script/XLibraryContainerExport.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
@@ -781,7 +782,6 @@ void LibPage::NewLib()
void LibPage::InsertLib()
{
- Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
// file open dialog
Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILEOPEN_SIMPLE);
@@ -858,10 +858,8 @@ void LibPage::InsertLib()
OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
if ( xSFA->exists( aDlgURL ) )
{
- Sequence <Any> aSeqDlgURL(1);
- aSeqDlgURL[0] <<= aDlgURL;
- xDlgLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments(
- "com.sun.star.script.DocumentDialogLibraryContainer", aSeqDlgURL ), UNO_QUERY );
+ xDlgLibContImport = Reference< script::XLibraryContainer2 >(
+ script::DocumentDialogLibraryContainer::createWithURL(xContext, aDlgURL), UNO_QUERY );
}
if ( xModLibContImport.is() || xDlgLibContImport.is() )
diff --git a/offapi/com/sun/star/script/DocumentDialogLibraryContainer.idl b/offapi/com/sun/star/script/DocumentDialogLibraryContainer.idl
index 7f93192..3f765f8 100644
--- a/offapi/com/sun/star/script/DocumentDialogLibraryContainer.idl
+++ b/offapi/com/sun/star/script/DocumentDialogLibraryContainer.idl
@@ -54,6 +54,8 @@ service DocumentDialogLibraryContainer : XStorageBasedLibraryContainer
*/
create( [in] ::com::sun::star::document::XStorageBasedDocument Document )
raises( ::com::sun::star::lang::IllegalArgumentException );
+
+ createWithURL( [in] string URL );
};
commit b0e7466f9d9dd952b081202145f8a831ce742c76
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 6 13:40:53 2013 +0200
fdo#46808, script::DocumentScriptLibraryContainer needed a new constructor
Change-Id: I9a657cf3fd7715b4890257e1aa4d97d0cf79cecc
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index f07e1af..c64ee31 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -49,7 +49,7 @@
#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/script/XLibraryContainer2.hpp>
+#include <com/sun/star/script/DocumentScriptLibraryContainer.hpp>
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
#include <com/sun/star/script/XLibraryContainerExport.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
@@ -851,10 +851,8 @@ void LibPage::InsertLib()
OUString aModURL( aModURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
if ( xSFA->exists( aModURL ) )
{
- Sequence <Any> aSeqModURL(1);
- aSeqModURL[0] <<= aModURL;
- xModLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments(
- "com.sun.star.script.DocumentScriptLibraryContainer", aSeqModURL ), UNO_QUERY );
+ xModLibContImport = Reference< script::XLibraryContainer2 >(
+ script::DocumentScriptLibraryContainer::createWithURL(xContext, aModURL), UNO_QUERY );
}
OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
diff --git a/offapi/com/sun/star/script/DocumentScriptLibraryContainer.idl b/offapi/com/sun/star/script/DocumentScriptLibraryContainer.idl
index 1be616a..e7c2c45 100644
--- a/offapi/com/sun/star/script/DocumentScriptLibraryContainer.idl
+++ b/offapi/com/sun/star/script/DocumentScriptLibraryContainer.idl
@@ -55,6 +55,7 @@ service DocumentScriptLibraryContainer : XStorageBasedLibraryContainer
create( [in] ::com::sun::star::document::XStorageBasedDocument Document )
raises( ::com::sun::star::lang::IllegalArgumentException );
+ createWithURL( [in] string URL );
};
commit 4b51374a7021d52f7f1be1861e2ee6a011b30ecd
Author: Noel Grandin <noel at peralex.com>
Date: Tue Feb 12 09:23:05 2013 +0200
fdo#46808, Adapt ui::dialogs::FilePicker UNO service to new style
Change-Id: I1cafbfc53994e5d74241042dbd1d292ddbda67d5
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 4dcc13a..7bcc2dc 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+#include <com/sun/star/ui/dialogs/FilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <comphelper/processfactory.hxx>
@@ -433,23 +434,15 @@ bool ModulWindow::LoadBasic()
DBG_CHKTHIS( ModulWindow, 0 );
bool bDone = false;
- Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
- Reference < XFilePicker > xFP;
- if( xMSF.is() )
- {
- Sequence <Any> aServiceType(1);
- aServiceType[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
- xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
- "com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
- }
+ Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILEOPEN_SIMPLE);
if ( !aCurPath.isEmpty() )
xFP->setDisplayDirectory ( aCurPath );
- Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
- xFltMgr->appendFilter( "BASIC" , "*.bas" );
- xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), OUString( FilterMask_All ) );
- xFltMgr->setCurrentFilter( "BASIC" );
+ xFP->appendFilter( "BASIC" , "*.bas" );
+ xFP->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), OUString( FilterMask_All ) );
+ xFP->setCurrentFilter( "BASIC" );
if( xFP->execute() == RET_OK )
{
@@ -487,15 +480,8 @@ bool ModulWindow::SaveBasicSource()
DBG_CHKTHIS( ModulWindow, 0 );
bool bDone = false;
- Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
- Reference < XFilePicker > xFP;
- if( xMSF.is() )
- {
- Sequence <Any> aServiceType(1);
- aServiceType[0] <<= TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD;
- xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
- "com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
- }
+ Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD);
Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false);
@@ -506,10 +492,9 @@ bool ModulWindow::SaveBasicSource()
if ( !aCurPath.isEmpty() )
xFP->setDisplayDirectory ( aCurPath );
- Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
- xFltMgr->appendFilter( "BASIC", "*.bas" );
- xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), OUString( FilterMask_All ) );
- xFltMgr->setCurrentFilter( "BASIC" );
+ xFP->appendFilter( "BASIC", "*.bas" );
+ xFP->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), OUString( FilterMask_All ) );
+ xFP->setCurrentFilter( "BASIC" );
if( xFP->execute() == RET_OK )
{
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 4d4e0bc..a23b09c 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+#include <com/sun/star/ui/dialogs/FilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <comphelper/processfactory.hxx>
@@ -689,15 +690,8 @@ bool DialogWindow::SaveDialog()
DBG_CHKTHIS( DialogWindow, 0 );
bool bDone = false;
- Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
- Reference < XFilePicker > xFP;
- if( xMSF.is() )
- {
- Sequence <Any> aServiceType(1);
- aServiceType[0] <<= TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD;
- xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
- "com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
- }
+ Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
+ Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD);
Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false);
@@ -711,10 +705,9 @@ bool DialogWindow::SaveDialog()
xFP->setDefaultName( OUString( GetName() ) );
OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME));
- Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
- xFltMgr->appendFilter( aDialogStr, String( "*.xdl" ) );
- xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( FilterMask_All ) );
- xFltMgr->setCurrentFilter( aDialogStr );
+ xFP->appendFilter( aDialogStr, String( "*.xdl" ) );
+ xFP->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( FilterMask_All ) );
+ xFP->setCurrentFilter( aDialogStr );
if( xFP->execute() == RET_OK )
{
@@ -723,11 +716,10 @@ bool DialogWindow::SaveDialog()
// export dialog model to xml
Reference< container::XNameContainer > xDialogModel = GetDialog();
- Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, GetDocument().isDocument() ? GetDocument().getDocument() : Reference< frame::XModel >() );
Reference< XInputStream > xInput( xISP->createInputStream() );
- Reference< XSimpleFileAccess3 > xSFI( SimpleFileAccess::create(comphelper::getProcessComponentContext()) );
+ Reference< XSimpleFileAccess3 > xSFI( SimpleFileAccess::create(xContext) );
Reference< XOutputStream > xOutput;
try
@@ -950,14 +942,8 @@ bool implImportDialog( Window* pWin, const OUString& rCurPath, const ScriptDocum
bool bDone = false;
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
- Reference < XFilePicker > xFP;
- if( xMSF.is() )
- {
- Sequence <Any> aServiceType(1);
- aServiceType[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
- xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
- "com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
- }
+ Reference< XComponentContext > xContext( comphelper::getComponentContext( xMSF ) );
+ Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILEOPEN_SIMPLE);
Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false);
@@ -970,10 +956,9 @@ bool implImportDialog( Window* pWin, const OUString& rCurPath, const ScriptDocum
xFP->setDisplayDirectory ( aCurPath );
OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME));
- Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
- xFltMgr->appendFilter( aDialogStr, String( "*.xdl" ) );
- xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( FilterMask_All ) );
- xFltMgr->setCurrentFilter( aDialogStr );
+ xFP->appendFilter( aDialogStr, String( "*.xdl" ) );
+ xFP->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( FilterMask_All ) );
+ xFP->setCurrentFilter( aDialogStr );
if( xFP->execute() == RET_OK )
{
@@ -998,8 +983,6 @@ bool implImportDialog( Window* pWin, const OUString& rCurPath, const ScriptDocum
if( xSFI->exists( aCurPath ) )
xInput = xSFI->openFileRead( aCurPath );
- Reference< XComponentContext > xContext(
- comphelper::getComponentContext( xMSF ) );
::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() );
OUString aXmlDlgName;
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 4437f64..f07e1af 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -45,7 +45,7 @@
#include <sot/storage.hxx>
#include <com/sun/star/io/Pipe.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/FilePicker.hpp>
#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
@@ -781,16 +781,10 @@ void LibPage::NewLib()
void LibPage::InsertLib()
{
- // file open dialog
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
- Reference < XFilePicker > xFP;
- if( xMSF.is() )
- {
- Sequence <Any> aServiceType(1);
- aServiceType[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
- xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
- "com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
- }
+ Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ // file open dialog
+ Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILEOPEN_SIMPLE);
xFP->setTitle( String( IDEResId( RID_STR_APPENDLIBS ) ) );
// filter
@@ -852,27 +846,24 @@ void LibPage::InsertLib()
aDlgURLObj.setBase( aDlgBase );
}
- if ( xMSF.is() )
- {
- Reference< XSimpleFileAccess3 > xSFA( SimpleFileAccess::create(comphelper::getProcessComponentContext()) );
+ Reference< XSimpleFileAccess3 > xSFA( SimpleFileAccess::create(comphelper::getProcessComponentContext()) );
- OUString aModURL( aModURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
- if ( xSFA->exists( aModURL ) )
- {
- Sequence <Any> aSeqModURL(1);
- aSeqModURL[0] <<= aModURL;
- xModLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments(
- "com.sun.star.script.DocumentScriptLibraryContainer", aSeqModURL ), UNO_QUERY );
- }
+ OUString aModURL( aModURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ if ( xSFA->exists( aModURL ) )
+ {
+ Sequence <Any> aSeqModURL(1);
+ aSeqModURL[0] <<= aModURL;
+ xModLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments(
+ "com.sun.star.script.DocumentScriptLibraryContainer", aSeqModURL ), UNO_QUERY );
+ }
- OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
- if ( xSFA->exists( aDlgURL ) )
- {
- Sequence <Any> aSeqDlgURL(1);
- aSeqDlgURL[0] <<= aDlgURL;
- xDlgLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments(
- "com.sun.star.script.DocumentDialogLibraryContainer", aSeqDlgURL ), UNO_QUERY );
- }
+ OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ if ( xSFA->exists( aDlgURL ) )
+ {
+ Sequence <Any> aSeqDlgURL(1);
+ aSeqDlgURL[0] <<= aDlgURL;
+ xDlgLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments(
+ "com.sun.star.script.DocumentDialogLibraryContainer", aSeqDlgURL ), UNO_QUERY );
}
if ( xModLibContImport.is() || xDlgLibContImport.is() )
@@ -1253,16 +1244,11 @@ Reference< XProgressHandler > OLibCommandEnvironment::getProgressHandler()
void LibPage::ExportAsPackage( const String& aLibName )
{
// file open dialog
- Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) );
Reference< XSimpleFileAccess3 > xSFA = SimpleFileAccess::create(xContext);
- Reference < XFilePicker > xFP;
- Sequence <Any> aServiceType(1);
- aServiceType[0] <<= TemplateDescription::FILESAVE_SIMPLE;
- xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
- "com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
+ Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILESAVE_SIMPLE);
xFP->setTitle( String( IDEResId( RID_STR_EXPORTPACKAGE ) ) );
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 4163afc..36253d3 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -19,7 +19,7 @@
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/FilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -112,40 +112,28 @@ IMPL_LINK_INLINE_END( SvInsertOleDlg, DoubleClickHdl, ListBox *, pListBox )
IMPL_LINK_NOARG(SvInsertOleDlg, BrowseHdl)
{
- Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
- if( xFactory.is() )
- {
- Reference< XFilePicker > xFilePicker( xFactory->createInstance( "com.sun.star.ui.dialogs.FilePicker" ), UNO_QUERY );
- DBG_ASSERT( xFilePicker.is(), "could not get FilePicker service" );
+ Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- Reference< XInitialization > xInit( xFilePicker, UNO_QUERY );
- Reference< XFilterManager > xFilterMgr( xFilePicker, UNO_QUERY );
- if( xInit.is() && xFilePicker.is() && xFilterMgr.is() )
- {
- Sequence< Any > aServiceType( 1 );
- aServiceType[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
- xInit->initialize( aServiceType );
+ Reference< XFilePicker3 > xFilePicker = FilePicker::createWithMode(xContext, TemplateDescription::FILEOPEN_SIMPLE);
- // add filter
- try
- {
- xFilterMgr->appendFilter(
- OUString(),
- OUString( "*.*" )
- );
- }
- catch( IllegalArgumentException& )
- {
- DBG_ASSERT( 0, "caught IllegalArgumentException when registering filter\n" );
- }
+ // add filter
+ try
+ {
+ xFilePicker->appendFilter(
+ OUString(),
+ OUString( "*.*" )
+ );
+ }
+ catch( const IllegalArgumentException& )
+ {
+ DBG_ASSERT( 0, "caught IllegalArgumentException when registering filter\n" );
+ }
- if( xFilePicker->execute() == ExecutableDialogResults::OK )
- {
- Sequence< OUString > aPathSeq( xFilePicker->getFiles() );
- INetURLObject aObj( aPathSeq[0] );
- m_pEdFilepath->SetText( aObj.PathToFileName() );
- }
- }
+ if( xFilePicker->execute() == ExecutableDialogResults::OK )
+ {
+ Sequence< OUString > aPathSeq( xFilePicker->getFiles() );
+ INetURLObject aObj( aPathSeq[0] );
+ m_pEdFilepath->SetText( aObj.PathToFileName() );
}
return 0;
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index 14e071f..f1ba980 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -24,7 +24,7 @@
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/FilePicker.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
@@ -209,13 +209,9 @@ void SvxPersonalizationTabPage::Reset( const SfxItemSet & )
IMPL_LINK( SvxPersonalizationTabPage, SelectBackground, PushButton*, /*pButton*/ )
{
- uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
- if ( !xFactory.is() )
- return 0;
+ uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- uno::Reference< ui::dialogs::XFilePicker > xFilePicker( xFactory->createInstance( "com.sun.star.ui.dialogs.FilePicker" ), uno::UNO_QUERY );
- if ( !xFilePicker.is() )
- return 0;
+ uno::Reference< ui::dialogs::XFilePicker3 > xFilePicker = ui::dialogs::FilePicker::createDefault(xContext);
xFilePicker->setMultiSelectionMode( false );
@@ -223,9 +219,7 @@ IMPL_LINK( SvxPersonalizationTabPage, SelectBackground, PushButton*, /*pButton*/
if ( xController.is() )
xController->setValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, uno::makeAny( sal_True ) );
- uno::Reference< ui::dialogs::XFilterManager > xFilterMgr( xFilePicker, uno::UNO_QUERY );
- if ( xFilterMgr.is() )
- xFilterMgr->appendFilter( "Background images (*.jpg;*.png)", "*.jpg;*.png" ); // TODO localize
+ xFilePicker->appendFilter( "Background images (*.jpg;*.png)", "*.jpg;*.png" ); // TODO localize
while ( xFilePicker->execute() == ui::dialogs::ExecutableDialogResults::OK )
{
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 696e5e7..643e851 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -63,7 +63,7 @@
#include "com/sun/star/ui/dialogs/ExecutableDialogResults.hpp"
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
-#include "com/sun/star/ui/dialogs/XFilePicker.hpp"
+#include "com/sun/star/ui/dialogs/FilePicker.hpp"
#include "com/sun/star/ui/dialogs/XFilterManager.hpp"
#include "com/sun/star/uno/Any.hxx"
@@ -886,12 +886,9 @@ bool ExtMgrDialog::acceptLicense( const uno::Reference< deployment::XPackage > &
//------------------------------------------------------------------------------
uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
{
- const uno::Any mode( static_cast< sal_Int16 >( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE ) );
const uno::Reference< uno::XComponentContext > xContext( m_pManager->getContext() );
- const uno::Reference< ui::dialogs::XFilePicker > xFilePicker(
- xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.ui.dialogs.FilePicker",
- uno::Sequence< uno::Any >( &mode, 1 ), xContext ), uno::UNO_QUERY_THROW );
+ const uno::Reference< ui::dialogs::XFilePicker3 > xFilePicker =
+ ui::dialogs::FilePicker::createWithMode(xContext, ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE);
xFilePicker->setTitle( m_sAddPackages );
if ( m_sLastFolderURL.Len() )
@@ -927,15 +924,14 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
}
}
- const uno::Reference< ui::dialogs::XFilterManager > xFilterManager( xFilePicker, uno::UNO_QUERY_THROW );
// All files at top:
- xFilterManager->appendFilter( StrAllFiles::get(), "*.*" );
+ xFilePicker->appendFilter( StrAllFiles::get(), "*.*" );
// then supported ones:
t_string2string::const_iterator iPos( title2filter.begin() );
const t_string2string::const_iterator iEnd( title2filter.end() );
for ( ; iPos != iEnd; ++iPos ) {
try {
- xFilterManager->appendFilter( iPos->first, iPos->second );
+ xFilePicker->appendFilter( iPos->first, iPos->second );
}
catch (const lang::IllegalArgumentException & exc) {
OSL_FAIL( ::rtl::OUStringToOString(
@@ -943,7 +939,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
(void) exc;
}
}
- xFilterManager->setCurrentFilter( sDefaultFilter );
+ xFilePicker->setCurrentFilter( sDefaultFilter );
if ( xFilePicker->execute() != ui::dialogs::ExecutableDialogResults::OK )
return uno::Sequence<OUString>(); // cancelled
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list