diff options
Diffstat (limited to 'fpicker/source/office/OfficeFilePicker.cxx')
-rw-r--r-- | fpicker/source/office/OfficeFilePicker.cxx | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index 49a00f429fb2..c0ba40632a0c 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -23,6 +23,7 @@ #include "iodlg.hxx" #include "RemoteFilesDialog.hxx" +#include <utility> #include <vector> #include <algorithm> #include <sal/log.hxx> @@ -44,7 +45,6 @@ using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::awt; -using namespace ::utl; struct FilterEntry @@ -56,13 +56,13 @@ protected: UnoFilterList m_aSubFilters; public: - FilterEntry( const OUString& _rTitle, const OUString& _rFilter ) - :m_sTitle( _rTitle ) - ,m_sFilter( _rFilter ) + FilterEntry( OUString _aTitle, OUString _aFilter ) + :m_sTitle(std::move( _aTitle )) + ,m_sFilter(std::move( _aFilter )) { } - FilterEntry( const OUString& _rTitle, const UnoFilterList& _rSubFilters ); + FilterEntry( OUString _aTitle, const UnoFilterList& _rSubFilters ); const OUString& getTitle() const { return m_sTitle; } const OUString& getFilter() const { return m_sFilter; } @@ -80,8 +80,8 @@ public: }; -FilterEntry::FilterEntry( const OUString& _rTitle, const UnoFilterList& _rSubFilters ) - :m_sTitle( _rTitle ) +FilterEntry::FilterEntry( OUString _aTitle, const UnoFilterList& _rSubFilters ) + :m_sTitle(std::move( _aTitle )) ,m_aSubFilters( _rSubFilters ) { } @@ -424,7 +424,7 @@ sal_Int16 SvtFilePicker::implExecutePicker( ) // now we are ready to execute the dialog sal_Int16 nRet = m_xDlg->run(); - // the execution of the dialog yields, so it is possible the at this point the window or the dialog is closed + // coverity[check_after_deref] - the execution of the dialog yields, so it is possible the at this point the window or the dialog is closed if (m_xDlg) m_xDlg->SetFileCallback( nullptr ); @@ -463,7 +463,15 @@ IMPLEMENT_FORWARD_XINTERFACE3( SvtRemoteFilePicker, SvtFilePicker, OCommonPicker // disambiguate XTypeProvider -IMPLEMENT_FORWARD_XTYPEPROVIDER3( SvtRemoteFilePicker, SvtFilePicker, OCommonPicker, SvtFilePicker_Base ) +css::uno::Sequence< css::uno::Type > SAL_CALL SvtRemoteFilePicker::getTypes( ) +{ + return ::comphelper::concatSequences( + SvtFilePicker::getTypes(), + OCommonPicker::getTypes(), + SvtFilePicker_Base::getTypes() + ); +} +IMPLEMENT_GET_IMPLEMENTATION_ID( SvtRemoteFilePicker ) // XExecutableDialog functions @@ -872,7 +880,7 @@ void SAL_CALL SvtFilePicker::appendFilterGroup( const OUString& sGroupTitle, if ( FilterNameExists( aFilters ) ) throw IllegalArgumentException( "filter name exists", - static_cast< OWeakObject * >(this), 1); + getXWeak(), 1); // ensure that we have a filter list OUString sInitialCurrentFilter; |