summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-11-27 10:39:28 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-11-27 10:39:28 +0100
commitcc360f0a483e7c68ece7a30424f204d660d74b1c (patch)
tree0e81c30bf1805cebdd7d3b8097085bf44f0a8528 /fpicker
parent41f08d42696fdb1f38baaafdde63088febdfd06d (diff)
fdo#46808: Missing adaptions to XFolderPicker2
c988da288ec473a28f61ebb53aa3ff82bab11ef4 "fdo#46808, Adapt ui::dialogs::FolderPicker UNO service to new style" had left some FolderPicker implementations at XFolderPicker, so creating them caused DeploymentExceptions. Change-Id: I3463161f9bb87a69a2777c331eb5b93d487790b0
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/aqua/FPentry.mm1
-rw-r--r--fpicker/source/aqua/SalAquaFolderPicker.hxx11
-rw-r--r--fpicker/source/aqua/SalAquaFolderPicker.mm4
-rw-r--r--fpicker/source/office/OfficeFolderPicker.cxx11
-rw-r--r--fpicker/source/office/OfficeFolderPicker.hxx32
-rw-r--r--fpicker/source/win32/filepicker/FPentry.cxx3
-rw-r--r--fpicker/source/win32/folderpicker/FolderPicker.hxx1
-rw-r--r--fpicker/source/win32/folderpicker/WinFOPImpl.cxx2
-rw-r--r--fpicker/source/win32/folderpicker/workbench/Test_fops.cxx6
9 files changed, 30 insertions, 41 deletions
diff --git a/fpicker/source/aqua/FPentry.mm b/fpicker/source/aqua/FPentry.mm
index d51486838819..7f9a3e1ca288 100644
--- a/fpicker/source/aqua/FPentry.mm
+++ b/fpicker/source/aqua/FPentry.mm
@@ -33,7 +33,6 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::registry;
using namespace ::cppu;
using ::com::sun::star::ui::dialogs::XFilePicker;
-using ::com::sun::star::ui::dialogs::XFolderPicker;
static Reference< XInterface > SAL_CALL createFileInstance(
diff --git a/fpicker/source/aqua/SalAquaFolderPicker.hxx b/fpicker/source/aqua/SalAquaFolderPicker.hxx
index f66d88dfc981..3a329190c31b 100644
--- a/fpicker/source/aqua/SalAquaFolderPicker.hxx
+++ b/fpicker/source/aqua/SalAquaFolderPicker.hxx
@@ -20,12 +20,12 @@
#ifndef _SALAQUAFOLDERPICKER_HXX_
#define _SALAQUAFOLDERPICKER_HXX_
-#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/util/XCancellable.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
+#include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
#include "SalAquaPicker.hxx"
@@ -41,11 +41,10 @@
class SalAquaFolderPicker :
public SalAquaPicker,
- public cppu::WeakImplHelper4<
- ::com::sun::star::ui::dialogs::XFolderPicker,
+ public cppu::WeakImplHelper3<
+ ::com::sun::star::ui::dialogs::XFolderPicker2,
::com::sun::star::lang::XServiceInfo,
- ::com::sun::star::lang::XEventListener,
- ::com::sun::star::util::XCancellable >
+ ::com::sun::star::lang::XEventListener >
{
public:
diff --git a/fpicker/source/aqua/SalAquaFolderPicker.mm b/fpicker/source/aqua/SalAquaFolderPicker.mm
index 6496e12d2673..8d06b7fb2e80 100644
--- a/fpicker/source/aqua/SalAquaFolderPicker.mm
+++ b/fpicker/source/aqua/SalAquaFolderPicker.mm
@@ -121,7 +121,7 @@ sal_Int16 SAL_CALL SalAquaFolderPicker::execute() throw( uno::RuntimeException )
break;
default:
- throw uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The dialog returned with an unknown result!")), static_cast< XFolderPicker* >( this ));
+ throw uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The dialog returned with an unknown result!")), static_cast< cppu::OWeakObject * >( this ));
break;
}
@@ -173,7 +173,7 @@ rtl::OUString SAL_CALL SalAquaFolderPicker::getDirectory() throw( uno::RuntimeEx
OSL_TRACE("# of items: %d", nFiles);
if (nFiles < 1) {
- throw uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("no directory selected")), static_cast< XFolderPicker* >( this ));
+ throw uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("no directory selected")), static_cast< cppu::OWeakObject * >( this ));
}
rtl::OUString aDirectory;
diff --git a/fpicker/source/office/OfficeFolderPicker.cxx b/fpicker/source/office/OfficeFolderPicker.cxx
index c1a3912e1950..f04de647613a 100644
--- a/fpicker/source/office/OfficeFolderPicker.cxx
+++ b/fpicker/source/office/OfficeFolderPicker.cxx
@@ -36,7 +36,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
SvtFolderPicker::SvtFolderPicker( const Reference < XMultiServiceFactory >& _rxFactory )
- :OCommonPicker( _rxFactory )
+ :SvtFolderPicker_Base( _rxFactory )
{
}
@@ -44,10 +44,6 @@ SvtFolderPicker::~SvtFolderPicker()
{
}
-IMPLEMENT_FORWARD_XINTERFACE2( SvtFolderPicker, OCommonPicker, SvtFolderPicker_Base )
-
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( SvtFolderPicker, OCommonPicker, SvtFolderPicker_Base )
-
void SAL_CALL SvtFolderPicker::setTitle( const ::rtl::OUString& _rTitle ) throw (RuntimeException)
{
OCommonPicker::setTitle( _rTitle );
@@ -151,6 +147,11 @@ void SAL_CALL SvtFolderPicker::setDescription( const ::rtl::OUString& aDescripti
m_aDescription = aDescription;
}
+void SvtFolderPicker::cancel() throw (RuntimeException)
+{
+ OCommonPicker::cancel();
+}
+
/* XServiceInfo */
::rtl::OUString SAL_CALL SvtFolderPicker::getImplementationName() throw( RuntimeException )
{
diff --git a/fpicker/source/office/OfficeFolderPicker.hxx b/fpicker/source/office/OfficeFolderPicker.hxx
index 0330972a2c92..44ac0921f271 100644
--- a/fpicker/source/office/OfficeFolderPicker.hxx
+++ b/fpicker/source/office/OfficeFolderPicker.hxx
@@ -20,7 +20,7 @@
#define INCLUDED_SVT_FOLDERPICKER_HXX
#include <cppuhelper/implbase3.hxx>
-#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
+#include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
#include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
@@ -30,15 +30,14 @@
class Dialog;
-// class SvtFolderPicker ---------------------------------------------------
+typedef
+ cppu::ImplInheritanceHelper3<
+ svt::OCommonPicker, com::sun::star::ui::dialogs::XFolderPicker2,
+ com::sun::star::ui::dialogs::XAsynchronousExecutableDialog,
+ com::sun::star::lang::XServiceInfo >
+ SvtFolderPicker_Base;
-typedef ::cppu::ImplHelper3 < ::com::sun::star::ui::dialogs::XFolderPicker
- , ::com::sun::star::ui::dialogs::XAsynchronousExecutableDialog
- , ::com::sun::star::lang::XServiceInfo
- > SvtFolderPicker_Base;
-
-class SvtFolderPicker :public SvtFolderPicker_Base
- ,public ::svt::OCommonPicker
+class SvtFolderPicker: public SvtFolderPicker_Base
{
private:
::rtl::OUString m_aDescription;
@@ -54,17 +53,7 @@ public:
virtual ~SvtFolderPicker();
//------------------------------------------------------------------------------------
- // disambiguate XInterface
- //------------------------------------------------------------------------------------
- DECLARE_XINTERFACE( )
-
- //------------------------------------------------------------------------------------
- // disambiguate XTypeProvider
- //------------------------------------------------------------------------------------
- DECLARE_XTYPEPROVIDER( )
-
- //------------------------------------------------------------------------------------
- // XFolderPicker functions
+ // XFolderPicker2 functions
//------------------------------------------------------------------------------------
virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory ) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
@@ -72,6 +61,9 @@ public:
virtual ::rtl::OUString SAL_CALL getDirectory() throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setDescription( const ::rtl::OUString& aDescription ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL cancel()
+ throw (com::sun::star::uno::RuntimeException);
+
//------------------------------------------------------------------------------------
// XExecutableDialog functions
//------------------------------------------------------------------------------------
diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx
index f09938ddec51..5c26204a5d27 100644
--- a/fpicker/source/win32/filepicker/FPentry.cxx
+++ b/fpicker/source/win32/filepicker/FPentry.cxx
@@ -46,7 +46,6 @@ using namespace ::com::sun::star::registry ;
using namespace ::cppu ;
using ::com::sun::star::ui::dialogs::XFilePicker;
using ::com::sun::star::ui::dialogs::XFilePicker2;
-using ::com::sun::star::ui::dialogs::XFolderPicker;
//------------------------------------------------
//
@@ -82,7 +81,7 @@ static Reference< XInterface > SAL_CALL createInstance(
static Reference< XInterface > SAL_CALL
createInstance_fop( const Reference< XMultiServiceFactory >& rServiceManager )
{
- return Reference< XInterface >( static_cast< XFolderPicker* >( new CFolderPicker( rServiceManager ) ) );
+ return Reference< XInterface >( static_cast< cppu::OWeakObject * >( new CFolderPicker( rServiceManager ) ) );
}
diff --git a/fpicker/source/win32/folderpicker/FolderPicker.hxx b/fpicker/source/win32/folderpicker/FolderPicker.hxx
index 1f1e4c8f8ad3..3854de3aeb04 100644
--- a/fpicker/source/win32/folderpicker/FolderPicker.hxx
+++ b/fpicker/source/win32/folderpicker/FolderPicker.hxx
@@ -25,7 +25,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
-#include <com/sun/star/util/XCancellable.hpp>
#include <memory>
diff --git a/fpicker/source/win32/folderpicker/WinFOPImpl.cxx b/fpicker/source/win32/folderpicker/WinFOPImpl.cxx
index 1576eb1cbc8d..6f49d07d17bf 100644
--- a/fpicker/source/win32/folderpicker/WinFOPImpl.cxx
+++ b/fpicker/source/win32/folderpicker/WinFOPImpl.cxx
@@ -79,7 +79,7 @@ void SAL_CALL CWinFolderPickerImpl::setDisplayDirectory( const OUString& aDirect
if ( ::osl::FileBase::E_None != rc )
throw IllegalArgumentException(
OUString(RTL_CONSTASCII_USTRINGPARAM( "directory is not a valid file url" )),
- static_cast< XFolderPicker* >( m_pFolderPicker ),
+ static_cast< cppu::OWeakObject * >( m_pFolderPicker ),
1 );
// we ensure that there is a trailing '/' at the end of
diff --git a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx
index de842138a70d..ba60c97b9d26 100644
--- a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx
+++ b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx
@@ -27,7 +27,7 @@
#include <sal/types.h>
#include <osl/diagnose.h>
-#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
+#include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <cppuhelper/implbase1.hxx>
@@ -95,9 +95,9 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ )
// try to get an Interface to a XFilePicker Service
//-------------------------------------------------
- Reference< XFolderPicker > xFolderPicker;
+ Reference< XFolderPicker2 > xFolderPicker;
- xFolderPicker = Reference< XFolderPicker >(
+ xFolderPicker = Reference< XFolderPicker2 >(
g_xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM ( FOLDER_PICKER_SERVICE_NAME ) ) ), UNO_QUERY );
if ( xFolderPicker.is() == sal_False )