[Libreoffice-commits] .: fpicker/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Sep 17 07:46:37 PDT 2012
fpicker/source/odma/ODMAFilePicker.cxx | 12 ++++++------
fpicker/source/odma/ODMAFilePicker.hxx | 4 +++-
2 files changed, 9 insertions(+), 7 deletions(-)
New commits:
commit 7371e3dbeb3637587eab141ee20f4cd8a4fc9373
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Sep 17 16:45:30 2012 +0200
Attempt at adapting Windows-only code to ucbhelper::Content changes
Change-Id: Ib17e2153746da9e097cccef1bd70bbbd349c7920
diff --git a/fpicker/source/odma/ODMAFilePicker.cxx b/fpicker/source/odma/ODMAFilePicker.cxx
index 21063f0..291f3f2 100644
--- a/fpicker/source/odma/ODMAFilePicker.cxx
+++ b/fpicker/source/odma/ODMAFilePicker.cxx
@@ -62,7 +62,7 @@ using namespace ::utl;
//------------------------------------------------------------------------------------
// class ODMAFilePicker
//------------------------------------------------------------------------------------
-ODMAFilePicker::ODMAFilePicker( const Reference < XMultiServiceFactory >& xFactory ) :
+ODMAFilePicker::ODMAFilePicker( const Reference < XComponentContext >& rxContext ) :
cppu::WeakComponentImplHelper9<
XFilterManager,
XFilterGroupManager,
@@ -73,14 +73,15 @@ ODMAFilePicker::ODMAFilePicker( const Reference < XMultiServiceFactory >& xFacto
XCancellable,
XEventListener,
XServiceInfo>( m_rbHelperMtx ),
+ m_xContext( rxContext ),
m_bMultiSelectionMode( sal_False ),
m_aDefaultName( ),
m_aFiles( ),
m_nDialogKind( OPEN )
{
m_bUseDMS = ::odma::DMSsAvailable();
- m_xSystemFilePicker = xFactory->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.Win32FilePicker" ) ));
+ m_xSystemFilePicker = rxContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.ui.dialogs.Win32FilePicker", rxContext);
}
// XExecutableDialog functions
@@ -198,7 +199,7 @@ sal_Int16 SAL_CALL ODMAFilePicker::execute( )
// Create a Content for the odma URL so that
// odma::ContentProvider will learn about the DOCID we
// just created.
- ucbhelper::Content content( s, Reference< XCommandEnvironment >() );
+ ucbhelper::Content content( s, Reference< XCommandEnvironment >(), m_xContext );
m_aFiles = Sequence< rtl::OUString >( &s, 1 );
return ExecutableDialogResults::OK;
}
@@ -538,8 +539,7 @@ Reference< XInterface > SAL_CALL ODMAFilePicker::impl_createInstance(
const Reference< XComponentContext >& rxContext)
throw( Exception )
{
- Reference< XMultiServiceFactory > xServiceManager (rxContext->getServiceManager(), UNO_QUERY_THROW);
- return Reference< XInterface >( *new ODMAFilePicker( xServiceManager ) );
+ return Reference< XInterface >( *new ODMAFilePicker( rxContext ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/odma/ODMAFilePicker.hxx b/fpicker/source/odma/ODMAFilePicker.hxx
index bb389d8..8ec400a 100644
--- a/fpicker/source/odma/ODMAFilePicker.hxx
+++ b/fpicker/source/odma/ODMAFilePicker.hxx
@@ -58,6 +58,8 @@ class ODMAFilePicker :
::com::sun::star::lang::XServiceInfo >
{
private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ m_xContext
sal_Bool m_bUseDMS;
sal_Bool m_bMultiSelectionMode;
rtl::OUString m_aDefaultName;
@@ -72,7 +74,7 @@ protected:
public:
- ODMAFilePicker( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
+ ODMAFilePicker( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
// XFilterManager functions
More information about the Libreoffice-commits
mailing list