summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-06-29 21:24:12 +0200
committerThomas Arnhold <thomas@arnhold.org>2013-06-29 21:52:54 +0000
commitba0a57702cdef7a0389c06841711d7e3079d471c (patch)
tree223c0dd50de4b71cf7df9d0073f7cacca1f18c8d /svtools
parent8a7ede404ca4980f169c4ce634805ea5c1b6b56e (diff)
remove OUString wrap for string literals
For some functions and all kinds of Exceptions. CannotConvertException CloseVetoException DisposedException EmptyUndoStackException ErrorCodeIOException Exception GridInvalidDataException GridInvalidModelException IOException IllegalAccessException IllegalArgumentException IllegalTypeException IndexOutOfBoundsException NoMasterException NoSuchElementException NoSupportException PropertyVetoException RuntimeException SAXException ScannerException StorageWrappedTargetException UnsupportedFlavorException VetoException WrappedTargetException ZipIOException throwGenericSQLException throwIllegallArgumentException createInstance createInstanceWithContext forName getByName getPackageManager getPropertyValue getUnpackedValueOrDefault getValueByName hasPropertyByName openKey setName setPropertyValue supportsService bash command: for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx' | cut -d ':' -f1 | sort -u | xargs sed -i -e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g" -e "s/\($i.*\)\"+ /\1\" + /g"; done Change-Id: Iaf8e641b0abf28c082906014f87a183517630535 Reviewed-on: https://gerrit.libreoffice.org/4624 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/contentenumeration.cxx4
-rw-r--r--svtools/source/control/toolbarmenuacc.cxx2
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx2
-rw-r--r--svtools/source/dialogs/insdlg.cxx4
-rw-r--r--svtools/source/filter/SvFilterOptionsDialog.cxx4
-rw-r--r--svtools/source/filter/exportdialog.cxx4
-rw-r--r--svtools/source/uno/svtxgridcontrol.cxx4
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx2
-rw-r--r--svtools/source/uno/unoiface.cxx8
9 files changed, 17 insertions, 17 deletions
diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx
index 6fe10375d750..39e337381775 100644
--- a/svtools/source/contnr/contentenumeration.cxx
+++ b/svtools/source/contnr/contentenumeration.cxx
@@ -256,8 +256,8 @@ namespace svt
::ucbhelper::Content aCnt( aTargetURL, xEnvironment, comphelper::getProcessComponentContext() );
try
{
- aCnt.getPropertyValue( OUString( "Size" ) ) >>= pData->maSize;
- aCnt.getPropertyValue( OUString( "DateModified" ) ) >>= aDT;
+ aCnt.getPropertyValue("Size") >>= pData->maSize;
+ aCnt.getPropertyValue("DateModified") >>= aDT;
}
catch (...) {}
}
diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx
index 4291e0686752..c7f008e8e87a 100644
--- a/svtools/source/control/toolbarmenuacc.cxx
+++ b/svtools/source/control/toolbarmenuacc.cxx
@@ -596,7 +596,7 @@ void ToolbarMenuAcc::ThrowIfDisposed (void) throw (DisposedException)
{
if(rBHelper.bDisposed || rBHelper.bInDispose || !mpParent)
{
- throw DisposedException ( OUString("object has been already disposed"), static_cast<XWeak*>(this));
+ throw DisposedException ("object has been already disposed", static_cast<XWeak*>(this));
}
}
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index dc5887ce6124..295153228f7e 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -1226,7 +1226,7 @@ void AssignmentPersistentData::Commit()
if ( xProp.is() )
{
OUString sName;
- xProp->getPropertyValue(OUString("DataSourceName")) >>= sName;
+ xProp->getPropertyValue("DataSourceName") >>= sName;
INetURLObject aURL( sName );
if( aURL.GetProtocol() != INET_PROT_NOT_VALID )
diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx
index cca25679c349..2ba079b0e2bb 100644
--- a/svtools/source/dialogs/insdlg.cxx
+++ b/svtools/source/dialogs/insdlg.cxx
@@ -135,8 +135,8 @@ void SvObjectServerList::FillInsertObjects()
{
OUString aUIName;
OUString aClassID;
- xEntry->getByName( OUString( "ObjectUIName" ) ) >>= aUIName;
- xEntry->getByName( OUString( "ClassID" ) ) >>= aClassID;
+ xEntry->getByName("ObjectUIName") >>= aUIName;
+ xEntry->getByName("ClassID") >>= aClassID;
if ( !aUIName.isEmpty() )
{
diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx
index 70e92aa504e4..c2e2a3bd7996 100644
--- a/svtools/source/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter/SvFilterOptionsDialog.cxx
@@ -239,9 +239,9 @@ void SvFilterOptionsDialog::setSourceDocument( const uno::Reference< lang::XComp
( xDoc, uno::UNO_QUERY );
if ( xServiceInfo.is() )
{
- if ( xServiceInfo->supportsService( OUString( "com.sun.star.presentation.PresentationDocument" ) ) )
+ if ( xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument") )
aConfigPath = String( RTL_CONSTASCII_USTRINGPARAM( "Office.Impress/Layout/Other/MeasureUnit" ) );
- else if ( xServiceInfo->supportsService( OUString( "com.sun.star.drawing.DrawingDocument" ) ) )
+ else if ( xServiceInfo->supportsService("com.sun.star.drawing.DrawingDocument") )
aConfigPath = String( RTL_CONSTASCII_USTRINGPARAM( "Office.Draw/Layout/Other/MeasureUnit" ) );
if ( aConfigPath.Len() )
{
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index b7c30adcc100..c9e648b75940 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -347,9 +347,9 @@ awt::Size ExportDialog::GetOriginalSize()
sal_Int32 nWidth = 0;
sal_Int32 nHeight= 0;
com::sun::star::uno::Any aAny;
- aAny = xPagePropSet->getPropertyValue(OUString("Width"));
+ aAny = xPagePropSet->getPropertyValue("Width");
aAny >>= nWidth;
- aAny = xPagePropSet->getPropertyValue(OUString("Height"));
+ aAny = xPagePropSet->getPropertyValue("Height");
aAny >>= nHeight;
aShapesRange = basegfx::B2DRange( 0, 0, nWidth, nHeight );
}
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx
index daaa2d405d32..5397dc7450f2 100644
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/svtools/source/uno/svtxgridcontrol.cxx
@@ -402,7 +402,7 @@ void SVTXGridControl::setProperty( const OUString& PropertyName, const Any& aVal
{
Reference< XGridDataModel > const xDataModel( aValue, UNO_QUERY );
if ( !xDataModel.is() )
- throw GridInvalidDataException( OUString( "Invalid data model." ), *this );
+ throw GridInvalidDataException("Invalid data model.", *this );
m_pTableModel->setDataModel( xDataModel );
impl_checkTableModelInit();
@@ -414,7 +414,7 @@ void SVTXGridControl::setProperty( const OUString& PropertyName, const Any& aVal
// obtain new col model
Reference< XGridColumnModel > const xColumnModel( aValue, UNO_QUERY );
if ( !xColumnModel.is() )
- throw GridInvalidModelException( OUString( "Invalid column model." ), *this );
+ throw GridInvalidModelException("Invalid column model.", *this );
// remove all old columns
m_pTableModel->removeAllColumns();
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index 4c74be5e50ec..7b675a902250 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -123,7 +123,7 @@ Reference< XLayoutManager > ToolboxController::getLayoutManager() const
{
try
{
- xLayoutManager.set(xPropSet->getPropertyValue( OUString( "LayoutManager" )),UNO_QUERY);
+ xLayoutManager.set(xPropSet->getPropertyValue("LayoutManager"),UNO_QUERY);
}
catch ( Exception& )
{
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index a08b93f3d8b6..fd7d5b3200a0 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -1449,7 +1449,7 @@ void SVTXRoadmap::propertyChange( const ::com::sun::star::beans::PropertyChangeE
xRoadmapItem = evt.Source;
sal_Int32 nID = 0;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropertySet( xRoadmapItem, ::com::sun::star::uno::UNO_QUERY );
- ::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue(OUString( "ID" ));
+ ::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue("ID");
aValue >>= nID;
::com::sun::star::uno::Any rVal = evt.NewValue;
@@ -1498,11 +1498,11 @@ RMItemData SVTXRoadmap::GetRMItemData( const ::com::sun::star::container::Contai
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropertySet( xRoadmapItem, ::com::sun::star::uno::UNO_QUERY );
if ( xPropertySet.is() )
{
- ::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue(OUString( "Label" ));
+ ::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue("Label");
aValue >>= aCurRMItemData.Label;
- aValue = xPropertySet->getPropertyValue(OUString( "ID" ));
+ aValue = xPropertySet->getPropertyValue("ID");
aValue >>= aCurRMItemData.n_ID;
- aValue = xPropertySet->getPropertyValue(OUString( "Enabled" ));
+ aValue = xPropertySet->getPropertyValue("Enabled");
aValue >>= aCurRMItemData.b_Enabled;
}
else