summaryrefslogtreecommitdiff
path: root/toolkit
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 /toolkit
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 'toolkit')
-rw-r--r--toolkit/source/awt/animatedimagespeer.cxx2
-rw-r--r--toolkit/source/awt/vclxwindows.cxx10
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx22
-rw-r--r--toolkit/source/controls/grid/gridcontrol.cxx4
-rw-r--r--toolkit/source/controls/roadmapcontrol.cxx8
-rw-r--r--toolkit/source/controls/tabpagecontainer.cxx2
-rw-r--r--toolkit/source/controls/unocontrol.cxx4
-rw-r--r--toolkit/source/controls/unocontrolcontainer.cxx4
-rw-r--r--toolkit/source/helper/formpdfexport.cxx10
9 files changed, 33 insertions, 33 deletions
diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx
index 57614e993422..5ccee20789e6 100644
--- a/toolkit/source/awt/animatedimagespeer.cxx
+++ b/toolkit/source/awt/animatedimagespeer.cxx
@@ -156,7 +156,7 @@ namespace toolkit
if ( i_graphic.is() )
{
const Reference< XPropertySet > xGraphicProps( i_graphic, UNO_QUERY_THROW );
- OSL_VERIFY( xGraphicProps->getPropertyValue( OUString( "SizePixel" ) ) >>= aSizePixel );
+ OSL_VERIFY( xGraphicProps->getPropertyValue("SizePixel") >>= aSizePixel );
}
}
catch( const Exception& )
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index fc8286ceb628..001741c7430d 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2143,10 +2143,10 @@ void SAL_CALL VCLXListBox::itemListChanged( const EventObject& i_rEvent ) throw
uno::Reference< beans::XPropertySet > xPropSet( i_rEvent.Source, uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySetInfo > xPSI( xPropSet->getPropertySetInfo(), uno::UNO_QUERY_THROW );
uno::Reference< resource::XStringResourceResolver > xStringResourceResolver;
- if ( xPSI->hasPropertyByName( OUString( "ResourceResolver" ) ) )
+ if ( xPSI->hasPropertyByName("ResourceResolver") )
{
xStringResourceResolver.set(
- xPropSet->getPropertyValue( OUString( "ResourceResolver" ) ),
+ xPropSet->getPropertyValue("ResourceResolver"),
uno::UNO_QUERY
);
}
@@ -4614,12 +4614,12 @@ void SAL_CALL VCLXComboBox::itemListChanged( const EventObject& i_rEvent ) throw
uno::Reference< beans::XPropertySet > xPropSet( i_rEvent.Source, uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySetInfo > xPSI( xPropSet->getPropertySetInfo(), uno::UNO_QUERY_THROW );
- // bool localize = xPSI->hasPropertyByName( OUString( "ResourceResolver" ) );
+ // bool localize = xPSI->hasPropertyByName("ResourceResolver");
uno::Reference< resource::XStringResourceResolver > xStringResourceResolver;
- if ( xPSI->hasPropertyByName( OUString( "ResourceResolver" ) ) )
+ if ( xPSI->hasPropertyByName("ResourceResolver") )
{
xStringResourceResolver.set(
- xPropSet->getPropertyValue( OUString( "ResourceResolver" ) ),
+ xPropSet->getPropertyValue("ResourceResolver"),
uno::UNO_QUERY
);
}
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index e2dbf17cc382..1b14d4c70665 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -395,7 +395,7 @@ Reference< XInterface > ControlModelContainerBase::createInstance( const OUStrin
Reference< XAggregation > xAgg( xCloneAccess, UNO_QUERY );
if ( xAgg.is() )
{
- if ( xSI->supportsService(OUString("com.sun.star.awt.UnoControlModel")) )
+ if ( xSI->supportsService("com.sun.star.awt.UnoControlModel") )
{
// release 3 of the 4 references we have to the object
xAgg.clear();
@@ -991,8 +991,8 @@ void ControlModelContainerBase::implUpdateGroupStructure()
#if OSL_DEBUG_LEVEL > 1
Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY );
OUString sLabel;
- if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( OUString("Label") ) )
- xModelProps->getPropertyValue( OUString("Label") ) >>= sLabel;
+ if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName("Label") )
+ xModelProps->getPropertyValue("Label") >>= sLabel;
aCurrentGroupLabels.push_back( sLabel );
#endif
}
@@ -1024,8 +1024,8 @@ void ControlModelContainerBase::implUpdateGroupStructure()
#if OSL_DEBUG_LEVEL > 1
Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY );
OUString sLabel;
- if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( OUString("Label") ) )
- xModelProps->getPropertyValue( OUString("Label") ) >>= sLabel;
+ if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName("Label") )
+ xModelProps->getPropertyValue("Label") >>= sLabel;
aCurrentGroupLabels.push_back( sLabel );
#endif
continue;
@@ -1054,8 +1054,8 @@ void ControlModelContainerBase::implUpdateGroupStructure()
#if OSL_DEBUG_LEVEL > 1
Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY );
OUString sLabel;
- if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( OUString("Label") ) )
- xModelProps->getPropertyValue( OUString("Label") ) >>= sLabel;
+ if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName("Label") )
+ xModelProps->getPropertyValue("Label") >>= sLabel;
aCurrentGroupLabels.push_back( sLabel );
#endif
}
@@ -1418,10 +1418,10 @@ void ControlContainerBase::ImplSetPosSize( Reference< XControl >& rxCtrl )
Reference< XPropertySet > xP( rxCtrl->getModel(), UNO_QUERY );
sal_Int32 nX = 0, nY = 0, nWidth = 0, nHeight = 0;
- xP->getPropertyValue( OUString( "PositionX" ) ) >>= nX;
- xP->getPropertyValue( OUString( "PositionY" ) ) >>= nY;
- xP->getPropertyValue( OUString( "Width" ) ) >>= nWidth;
- xP->getPropertyValue( OUString( "Height" ) ) >>= nHeight;
+ xP->getPropertyValue("PositionX") >>= nX;
+ xP->getPropertyValue("PositionY") >>= nY;
+ xP->getPropertyValue("Width") >>= nWidth;
+ xP->getPropertyValue("Height") >>= nHeight;
MapMode aMode( MAP_APPFONT );
OutputDevice*pOutDev = Application::GetDefaultDevice();
if ( pOutDev )
diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx
index 939e6f16b610..3535916dc4c9 100644
--- a/toolkit/source/controls/grid/gridcontrol.cxx
+++ b/toolkit/source/controls/grid/gridcontrol.cxx
@@ -318,7 +318,7 @@ namespace
try
{
Reference< XContainer > const xColModel(
- xModelProps->getPropertyValue( OUString( "ColumnModel" ) ),
+ xModelProps->getPropertyValue("ColumnModel"),
UNO_QUERY_THROW );
if ( i_add )
xColModel->addContainerListener( i_listener.get() );
@@ -326,7 +326,7 @@ namespace
xColModel->removeContainerListener( i_listener.get() );
Reference< XGridDataModel > const xDataModel(
- xModelProps->getPropertyValue( OUString( "GridDataModel" ) ),
+ xModelProps->getPropertyValue("GridDataModel"),
UNO_QUERY_THROW
);
Reference< XMutableGridDataModel > const xMutableDataModel( xDataModel, UNO_QUERY );
diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx
index d5ffa5b9a3be..8b2e8363309d 100644
--- a/toolkit/source/controls/roadmapcontrol.cxx
+++ b/toolkit/source/controls/roadmapcontrol.cxx
@@ -187,7 +187,7 @@ static void lcl_throwIndexOutOfBoundsException( )
if ( !xRoadmapItem.is() )
lcl_throwIllegalArgumentException();
Reference< XServiceInfo > xServiceInfo( xRoadmapItem, UNO_QUERY );
- sal_Bool bIsRoadmapItem = xServiceInfo->supportsService( OUString("com.sun.star.awt.RoadmapItem") );
+ sal_Bool bIsRoadmapItem = xServiceInfo->supportsService("com.sun.star.awt.RoadmapItem");
if ( !bIsRoadmapItem )
lcl_throwIllegalArgumentException();
}
@@ -201,12 +201,12 @@ static void lcl_throwIndexOutOfBoundsException( )
if ( xProps.is() )
{
sal_Int32 LocID = 0;
- Any aValue = xPropertySet->getPropertyValue( OUString("ID") );
+ Any aValue = xPropertySet->getPropertyValue("ID");
aValue >>= LocID;
if (LocID < 0) // index may not be smaller than zero
{
aAny <<= GetUniqueID();
- xPropertySet->setPropertyValue( OUString("ID"), aAny );
+ xPropertySet->setPropertyValue("ID", aAny );
}
}
}
@@ -229,7 +229,7 @@ static void lcl_throwIndexOutOfBoundsException( )
{
CurRoadmapItem = *i;
Reference< XPropertySet > xPropertySet( CurRoadmapItem, UNO_QUERY );
- aAny = xPropertySet->getPropertyValue( OUString("ID") );
+ aAny = xPropertySet->getPropertyValue("ID");
aAny >>= n_CurItemID;
if (n_CurItemID == CurID)
{
diff --git a/toolkit/source/controls/tabpagecontainer.cxx b/toolkit/source/controls/tabpagecontainer.cxx
index 26036c14a091..7d2e1dc6f3eb 100644
--- a/toolkit/source/controls/tabpagecontainer.cxx
+++ b/toolkit/source/controls/tabpagecontainer.cxx
@@ -102,7 +102,7 @@ namespace
try
{
Reference< XPropertySetInfo > const xPSI( i_parentModel->getPropertySetInfo() );
- bool const isGeometryControlModel = xPSI.is() && xPSI->hasPropertyByName( OUString( "PositionX" ) );
+ bool const isGeometryControlModel = xPSI.is() && xPSI->hasPropertyByName("PositionX");
Reference< XInterface > xInstance;
if ( isGeometryControlModel )
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 499d331f464d..49333fcf4483 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -236,7 +236,7 @@ bool UnoControl::ImplCheckLocalize( OUString& _rPossiblyLocalizable )
{
Reference< XPropertySet > xPropSet( mxModel, UNO_QUERY_THROW );
Reference< resource::XStringResourceResolver > xStringResourceResolver(
- xPropSet->getPropertyValue( OUString( "ResourceResolver" ) ),
+ xPropSet->getPropertyValue("ResourceResolver"),
UNO_QUERY
);
if ( xStringResourceResolver.is() )
@@ -1355,7 +1355,7 @@ sal_Bool UnoControl::setModel( const Reference< XControlModel >& rxModel ) throw
Sequence< OUString> aNames = lcl_ImplGetPropertyNames( xPropSet );
xPropSet->addPropertiesChangeListener( aNames, xListener );
- mpData->bLocalizationSupport = xPSI->hasPropertyByName( OUString( "ResourceResolver" ) );
+ mpData->bLocalizationSupport = xPSI->hasPropertyByName("ResourceResolver");
}
catch( const Exception& )
{
diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx
index 015dd1b37069..685c92394ca8 100644
--- a/toolkit/source/controls/unocontrolcontainer.cxx
+++ b/toolkit/source/controls/unocontrolcontainer.cxx
@@ -289,7 +289,7 @@ UnoControlHolderList::ControlIdentifier UnoControlHolderList::impl_getFreeIdenti
if ( existent == maControls.end() )
return candidateId;
}
- throw uno::RuntimeException( OUString( "out of identifiers" ), NULL );
+ throw uno::RuntimeException("out of identifiers", NULL );
}
//------------------------------------------------------------------------
@@ -308,7 +308,7 @@ OUString UnoControlHolderList::impl_getFreeName_throw()
if ( loop == maControls.end() )
return candidateName;
}
- throw uno::RuntimeException( OUString( "out of identifiers" ), NULL );
+ throw uno::RuntimeException("out of identifiers", NULL );
}
// ----------------------------------------------------
// Function to set the controls' visibility according
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index 6d4824acf30e..516fbb788231 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -458,7 +458,7 @@ namespace toolkitform
{
::vcl::PDFWriter::PushButtonWidget* pButtonWidget = static_cast< ::vcl::PDFWriter::PushButtonWidget* >( _rpDescriptor.get() );
FormButtonType eButtonType = FormButtonType_PUSH;
- OSL_VERIFY( xModelProps->getPropertyValue( OUString( "ButtonType" ) ) >>= eButtonType );
+ OSL_VERIFY( xModelProps->getPropertyValue("ButtonType") >>= eButtonType );
static const OUString FM_PROP_TARGET_URL("TargetURL");
if ( eButtonType == FormButtonType_SUBMIT )
{
@@ -470,12 +470,12 @@ namespace toolkitform
if ( xParentProps.is() )
{
Reference< XServiceInfo > xParentSI( xParentProps, UNO_QUERY );
- if ( xParentSI.is() && xParentSI->supportsService( OUString( "com.sun.star.form.component.HTMLForm" ) ) )
+ if ( xParentSI.is() && xParentSI->supportsService("com.sun.star.form.component.HTMLForm") )
{
OSL_VERIFY( xParentProps->getPropertyValue( FM_PROP_TARGET_URL ) >>= pButtonWidget->URL );
pButtonWidget->Submit = true;
FormSubmitMethod eMethod = FormSubmitMethod_POST;
- OSL_VERIFY( xParentProps->getPropertyValue( OUString( "SubmitMethod" ) ) >>= eMethod );
+ OSL_VERIFY( xParentProps->getPropertyValue("SubmitMethod") >>= eMethod );
pButtonWidget->SubmitGet = (eMethod == FormSubmitMethod_GET);
}
}
@@ -558,7 +558,7 @@ namespace toolkitform
OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_DROPDOWN ) >>= pListWidget->DropDown );
// ............................
// multi selection
- OSL_VERIFY( xModelProps->getPropertyValue( OUString( "MultiSelection" ) ) >>= pListWidget->MultiSelect );
+ OSL_VERIFY( xModelProps->getPropertyValue("MultiSelection") >>= pListWidget->MultiSelect );
// ............................
// entries
getStringItemVector( xModelProps, pListWidget->Entries );
@@ -568,7 +568,7 @@ namespace toolkitform
// get selected items
Sequence< sal_Int16 > aSelectIndices;
- OSL_VERIFY( xModelProps->getPropertyValue( OUString( "SelectedItems" ) ) >>= aSelectIndices );
+ OSL_VERIFY( xModelProps->getPropertyValue("SelectedItems") >>= aSelectIndices );
if( aSelectIndices.getLength() > 0 )
{
pListWidget->SelectedEntries.resize( 0 );