summaryrefslogtreecommitdiff
path: root/sdext
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 /sdext
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 'sdext')
-rw-r--r--sdext/source/minimizer/unodialog.cxx16
-rw-r--r--sdext/source/pdfimport/filterdet.cxx4
-rw-r--r--sdext/source/presenter/PresenterController.cxx4
-rw-r--r--sdext/source/presenter/PresenterScreen.cxx2
-rw-r--r--sdext/source/presenter/PresenterSlideSorter.cxx4
5 files changed, 15 insertions, 15 deletions
diff --git a/sdext/source/minimizer/unodialog.cxx b/sdext/source/minimizer/unodialog.cxx
index 352aff0903e2..f1a3e7062dcb 100644
--- a/sdext/source/minimizer/unodialog.cxx
+++ b/sdext/source/minimizer/unodialog.cxx
@@ -149,7 +149,7 @@ Reference< XButton > UnoDialog::insertButton( const OUString& rName, Reference<
Reference< XInterface > xButtonModel( insertControlModel( OUString( "com.sun.star.awt.UnoControlButtonModel" ),
rName, rPropertyNames, rPropertyValues ) );
Reference< XPropertySet > xPropertySet( xButtonModel, UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) );
+ xPropertySet->setPropertyValue("Name", Any( rName ) );
xButton = Reference< XButton >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
if ( xActionListener.is() )
@@ -174,7 +174,7 @@ Reference< XFixedText > UnoDialog::insertFixedText( const OUString& rName, const
{
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlFixedTextModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) );
+ xPropertySet->setPropertyValue("Name", Any( rName ) );
xFixedText = Reference< XFixedText >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
@@ -192,7 +192,7 @@ Reference< XCheckBox > UnoDialog::insertCheckBox( const OUString& rName, const S
{
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlCheckBoxModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) );
+ xPropertySet->setPropertyValue("Name", Any( rName ) );
xCheckBox = Reference< XCheckBox >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
@@ -210,7 +210,7 @@ Reference< XControl > UnoDialog::insertFormattedField( const OUString& rName, co
{
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlFormattedFieldModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) );
+ xPropertySet->setPropertyValue("Name", Any( rName ) );
xControl = Reference< XControl >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
@@ -228,7 +228,7 @@ Reference< XComboBox > UnoDialog::insertComboBox( const OUString& rName, const S
{
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlComboBoxModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) );
+ xPropertySet->setPropertyValue("Name", Any( rName ) );
xControl = Reference< XComboBox >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
@@ -246,7 +246,7 @@ Reference< XRadioButton > UnoDialog::insertRadioButton( const OUString& rName, c
{
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlRadioButtonModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) );
+ xPropertySet->setPropertyValue("Name", Any( rName ) );
xControl = Reference< XRadioButton >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
@@ -264,7 +264,7 @@ Reference< XListBox > UnoDialog::insertListBox( const OUString& rName, const Seq
{
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlListBoxModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) );
+ xPropertySet->setPropertyValue("Name", Any( rName ) );
xControl = Reference< XListBox >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
@@ -282,7 +282,7 @@ Reference< XControl > UnoDialog::insertImage( const OUString& rName, const Seque
{
Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlImageControlModel" ),
rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) );
+ xPropertySet->setPropertyValue("Name", Any( rName ) );
xControl = Reference< XControl >( mxDialog->getControl( rName ), UNO_QUERY_THROW );
}
catch ( Exception& )
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx
index 032ac5777721..8dc8453cad1f 100644
--- a/sdext/source/pdfimport/filterdet.cxx
+++ b/sdext/source/pdfimport/filterdet.cxx
@@ -129,13 +129,13 @@ namespace {
uno::UNO_QUERY_THROW );
OUString aFilename( rFilename.copy(rFilename.lastIndexOf('/')+1) );
OUString aLabel;
- xPropSet->getPropertyValue(OUString( "Label" )) >>= aLabel;
+ xPropSet->getPropertyValue("Label") >>= aLabel;
const char pFileName[] = "%FILENAME";
aLabel = aLabel.replaceAt(
aLabel.indexOfAsciiL(pFileName,SAL_N_ELEMENTS(pFileName)-1),
SAL_N_ELEMENTS(pFileName)-1,
aFilename );
- xPropSet->setPropertyValue(OUString( "Label" ),
+ xPropSet->setPropertyValue("Label",
uno::makeAny(aLabel));
uno::Sequence<OUString> aListboxItems(3);
diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx
index ceceadd2a213..d0521e453bbf 100644
--- a/sdext/source/presenter/PresenterController.cxx
+++ b/sdext/source/presenter/PresenterController.cxx
@@ -1105,8 +1105,8 @@ double PresenterController::GetSlideAspectRatio (void) const
Reference<beans::XPropertySet> xProperties(xSlides->getByIndex(0),UNO_QUERY_THROW);
sal_Int32 nWidth (28000);
sal_Int32 nHeight (21000);
- if ((xProperties->getPropertyValue(OUString("Width")) >>= nWidth)
- && (xProperties->getPropertyValue(OUString("Height")) >>= nHeight)
+ if ((xProperties->getPropertyValue("Width") >>= nWidth)
+ && (xProperties->getPropertyValue("Height") >>= nHeight)
&& nHeight > 0)
{
nSlideAspectRatio = double(nWidth) / double(nHeight);
diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx
index f361912f3882..2f1aeaa22778 100644
--- a/sdext/source/presenter/PresenterScreen.cxx
+++ b/sdext/source/presenter/PresenterScreen.cxx
@@ -157,7 +157,7 @@ Any SAL_CALL PresenterScreenJob::execute(
}
Reference< XServiceInfo > xInfo( xModel, UNO_QUERY );
- if( xInfo.is() && xInfo->supportsService( OUString( "com.sun.star.presentation.PresentationDocument" ) ) )
+ if( xInfo.is() && xInfo->supportsService("com.sun.star.presentation.PresentationDocument") )
{
// Create a new listener that waits for the full screen presentation
// to start and to end. It takes care of its own lifetime.
diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx
index daad9e1c5284..084f7186a7c3 100644
--- a/sdext/source/presenter/PresenterSlideSorter.cxx
+++ b/sdext/source/presenter/PresenterSlideSorter.cxx
@@ -854,8 +854,8 @@ double PresenterSlideSorter::GetSlideAspectRatio (void) const
Reference<beans::XPropertySet> xProperties(xSlides->getByIndex(0),UNO_QUERY_THROW);
sal_Int32 nWidth (28000);
sal_Int32 nHeight (21000);
- if ((xProperties->getPropertyValue(OUString("Width")) >>= nWidth)
- && (xProperties->getPropertyValue(OUString("Height")) >>= nHeight)
+ if ((xProperties->getPropertyValue("Width") >>= nWidth)
+ && (xProperties->getPropertyValue("Height") >>= nHeight)
&& nHeight > 0)
{
nSlideAspectRatio = double(nWidth) / double(nHeight);