summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-28 12:50:02 +0200
committerNoel Grandin <noel@peralex.com>2014-05-29 09:01:40 +0200
commitebc0a15515c2e29259a7e229cfbdfb5d26fc3006 (patch)
tree2ce9446ed312a1a7aed53183b19ecc9fefabea8a /fpicker
parentf0ae48b684e89acd7088c31a8feff5fc03d51105 (diff)
remove more unnecesary OUString constructor use
when throwing exceptions Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx2
-rw-r--r--fpicker/source/win32/filepicker/WinFileOpenImpl.cxx8
-rw-r--r--fpicker/source/win32/filepicker/previewbase.cxx4
-rw-r--r--fpicker/source/win32/folderpicker/WinFOPImpl.cxx2
-rw-r--r--fpicker/source/win32/misc/WinImplHelper.cxx16
5 files changed, 16 insertions, 16 deletions
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 7c2520ad102c..02e747a7c31c 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -958,7 +958,7 @@ void SAL_CALL SvtFilePicker::appendFilterGroup( const OUString& sGroupTitle,
// check the names
if ( FilterNameExists( aFilters ) )
throw IllegalArgumentException(
- OUString("filter name exists"),
+ "filter name exists",
static_cast< OWeakObject * >(this), 1);
// ensure that we have a filter list
diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
index 7879f091a43b..ef11558db6ba 100644
--- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
+++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
@@ -118,7 +118,7 @@ void CWinFileOpenImpl::setDisplayDirectory(const OUString& aDirectory)
if ( ::osl::FileBase::E_None !=
::osl::FileBase::getSystemPathFromFileURL(aDirectory,aSysDirectory))
throw IllegalArgumentException(
- OUString("Invalid directory"),
+ "Invalid directory",
static_cast<XFilePicker2*>(m_FilePicker), 1);
// we ensure that there is a trailing '/' at the end of
@@ -189,7 +189,7 @@ sal_Int16 SAL_CALL CWinFileOpenImpl::execute( ) throw(uno::RuntimeException)
rc = ::com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
else
throw uno::RuntimeException(
- OUString("Error executing dialog"),
+ "Error executing dialog",
static_cast<XFilePicker2*>(m_FilePicker));
return rc;
@@ -208,7 +208,7 @@ void SAL_CALL CWinFileOpenImpl::appendFilter(const OUString& aTitle, const OUStr
if (!bRet)
throw IllegalArgumentException(
- OUString("filter already exists"),
+ "filter already exists",
static_cast<XFilePicker2*>(m_FilePicker), 1);
// #95345# see MSDN OPENFILENAME
@@ -233,7 +233,7 @@ void SAL_CALL CWinFileOpenImpl::setCurrentFilter(const OUString& aTitle)
if (filterPos < 0)
throw IllegalArgumentException(
- OUString("filter doesn't exist"),
+ "filter doesn't exist",
static_cast<XFilePicker2*>(m_FilePicker), 1);
// filter index of the base class starts with 1
diff --git a/fpicker/source/win32/filepicker/previewbase.cxx b/fpicker/source/win32/filepicker/previewbase.cxx
index e745c60c3da4..347d88acd481 100644
--- a/fpicker/source/win32/filepicker/previewbase.cxx
+++ b/fpicker/source/win32/filepicker/previewbase.cxx
@@ -79,11 +79,11 @@ void SAL_CALL PreviewBase::setImage( sal_Int16 aImageFormat, const ::com::sun::s
{
if (aImageFormat != ::com::sun::star::ui::dialogs::FilePreviewImageFormats::BITMAP)
throw IllegalArgumentException(
- OUString("unsupported image format"), 0, 1);
+ "unsupported image format", 0, 1);
if (aImage.hasValue() && (aImage.getValueType() != getCppuType((Sequence<sal_Int8>*)0)))
throw IllegalArgumentException(
- OUString("invalid image data"), 0, 2);
+ "invalid image data", 0, 2);
// save the new image data and force a redraw
m_ImageData = aImage;
diff --git a/fpicker/source/win32/folderpicker/WinFOPImpl.cxx b/fpicker/source/win32/folderpicker/WinFOPImpl.cxx
index c148cea73822..25b76dfd19da 100644
--- a/fpicker/source/win32/folderpicker/WinFOPImpl.cxx
+++ b/fpicker/source/win32/folderpicker/WinFOPImpl.cxx
@@ -77,7 +77,7 @@ void SAL_CALL CWinFolderPickerImpl::setDisplayDirectory( const OUString& aDirect
if ( ::osl::FileBase::E_None != rc )
throw IllegalArgumentException(
- OUString( "directory is not a valid file url" ),
+ "directory is not a valid file url",
static_cast< cppu::OWeakObject * >( m_pFolderPicker ),
1 );
diff --git a/fpicker/source/win32/misc/WinImplHelper.cxx b/fpicker/source/win32/misc/WinImplHelper.cxx
index e12241c09611..da5c04198b57 100644
--- a/fpicker/source/win32/misc/WinImplHelper.cxx
+++ b/fpicker/source/win32/misc/WinImplHelper.cxx
@@ -138,7 +138,7 @@ void SAL_CALL ListboxAddItem( HWND hwnd, const Any& aItem, const Reference< XInt
if ( !aItem.hasValue( ) ||
aItem.getValueType( ) != cppu::UnoType<OUString>::get() )
throw IllegalArgumentException(
- OUString( "invalid value type or any has no value" ),
+ "invalid value type or any has no value",
rXInterface,
aArgPos );
@@ -160,7 +160,7 @@ void SAL_CALL ListboxAddItems( HWND hwnd, const Any& aItemList, const Reference<
if ( !aItemList.hasValue( ) ||
aItemList.getValueType( ) != getCppuType((Sequence<OUString>*)0) )
throw IllegalArgumentException(
- OUString( "invalid value type or any has no value" ),
+ "invalid value type or any has no value",
rXInterface,
aArgPos );
@@ -188,7 +188,7 @@ void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Referenc
(aPosition.getValueType( ) != cppu::UnoType<sal_Int16>::get()) &&
(aPosition.getValueType( ) != cppu::UnoType<sal_Int8>::get()) ) )
throw IllegalArgumentException(
- OUString( "invalid value type or any has no value" ),
+ "invalid value type or any has no value",
rXInterface,
aArgPos );
@@ -201,7 +201,7 @@ void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Referenc
// index was not correct
if ( CB_ERR == lRet )
throw IllegalArgumentException(
- OUString( "invalid item position" ),
+ "invalid item position",
rXInterface,
aArgPos );
}
@@ -240,7 +240,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref
(aPosition.getValueType( ) != cppu::UnoType<sal_Int16>::get()) &&
(aPosition.getValueType( ) != cppu::UnoType<sal_Int8>::get()) ) )
throw IllegalArgumentException(
- OUString( "invalid value type or any has no value" ),
+ "invalid value type or any has no value",
rXInterface,
aArgPos );
@@ -249,7 +249,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref
if ( nPos < -1 )
throw IllegalArgumentException(
- OUString("invalid index"),
+ "invalid index",
rXInterface,
aArgPos );
@@ -257,7 +257,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref
if ( (CB_ERR == lRet) && (-1 != nPos) )
throw IllegalArgumentException(
- OUString("invalid index"),
+ "invalid index",
rXInterface,
aArgPos );
}
@@ -350,7 +350,7 @@ void SAL_CALL CheckboxSetState(
if ( !aState.hasValue( ) ||
aState.getValueType( ) != cppu::UnoType<sal_Bool>::get())
throw IllegalArgumentException(
- OUString( "invalid value type or any has no value" ),
+ "invalid value type or any has no value",
rXInterface,
aArgPos );