diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-15 11:05:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-19 10:29:31 +0200 |
commit | 610b2b94b33b0fc2d79cd515f9e293ca1c2610e8 (patch) | |
tree | 6eab2639cb8104ca54daa3f7a2ebd83ef1566cf0 /extensions | |
parent | 2c35fff7eca3a143d28dc75e6a73fe1101d2af77 (diff) |
remove unnecessary use of OUString constructor when assigning
change code like
aStr = OUString("xxxx");
to
aStr = "xxxx";
Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
Diffstat (limited to 'extensions')
18 files changed, 38 insertions, 38 deletions
diff --git a/extensions/source/logging/consolehandler.cxx b/extensions/source/logging/consolehandler.cxx index 95a9a51e4bd3..637a3a2a2f92 100644 --- a/extensions/source/logging/consolehandler.cxx +++ b/extensions/source/logging/consolehandler.cxx @@ -296,7 +296,7 @@ namespace logging Sequence< OUString > SAL_CALL ConsoleHandler::getSupportedServiceNames_static() { Sequence< OUString > aServiceNames(1); - aServiceNames[0] = OUString( "com.sun.star.logging.ConsoleHandler" ); + aServiceNames[0] = "com.sun.star.logging.ConsoleHandler"; return aServiceNames; } diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx index 15f4e3592178..e600315d6321 100644 --- a/extensions/source/logging/filehandler.cxx +++ b/extensions/source/logging/filehandler.cxx @@ -398,7 +398,7 @@ namespace logging Sequence< OUString > SAL_CALL FileHandler::getSupportedServiceNames_static() { Sequence< OUString > aServiceNames(1); - aServiceNames[0] = OUString( "com.sun.star.logging.FileHandler" ); + aServiceNames[0] = "com.sun.star.logging.FileHandler"; return aServiceNames; } diff --git a/extensions/source/logging/logger.cxx b/extensions/source/logging/logger.cxx index bf678f3a59e9..7145f72d2e07 100644 --- a/extensions/source/logging/logger.cxx +++ b/extensions/source/logging/logger.cxx @@ -293,7 +293,7 @@ namespace logging Sequence< OUString > SAL_CALL EventLogger::getSupportedServiceNames() throw(RuntimeException) { Sequence< OUString > aServiceNames(1); - aServiceNames[0] = OUString( "com.sun.star.logging.Logger" ); + aServiceNames[0] = "com.sun.star.logging.Logger"; return aServiceNames; } diff --git a/extensions/source/logging/plaintextformatter.cxx b/extensions/source/logging/plaintextformatter.cxx index bf9bff1d26f3..2f4e0a6eb381 100644 --- a/extensions/source/logging/plaintextformatter.cxx +++ b/extensions/source/logging/plaintextformatter.cxx @@ -178,7 +178,7 @@ namespace logging Sequence< OUString > SAL_CALL PlainTextFormatter::getSupportedServiceNames_static() { Sequence< OUString > aServiceNames(1); - aServiceNames[0] = OUString( "com.sun.star.logging.PlainTextFormatter" ); + aServiceNames[0] = "com.sun.star.logging.PlainTextFormatter"; return aServiceNames; } diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index 3e9d0311dda7..f75694b8c2c8 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -408,7 +408,7 @@ namespace pcr Reference< XGraphicProvider > xGraphicProvider( GraphicProvider::create(xContext) ); Sequence< PropertyValue > aMediaProperties(1); - aMediaProperties[0].Name = OUString( "URL" ); + aMediaProperties[0].Name = "URL"; aMediaProperties[0].Value <<= _rImageURL; Reference< XGraphic > xGraphic( xGraphicProvider->queryGraphic( aMediaProperties ), UNO_QUERY_THROW ); diff --git a/extensions/source/propctrlr/buttonnavigationhandler.cxx b/extensions/source/propctrlr/buttonnavigationhandler.cxx index b0bfc6237ec9..4f7446bcde69 100644 --- a/extensions/source/propctrlr/buttonnavigationhandler.cxx +++ b/extensions/source/propctrlr/buttonnavigationhandler.cxx @@ -72,7 +72,7 @@ namespace pcr Sequence< OUString > SAL_CALL ButtonNavigationHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { Sequence< OUString > aSupported( 1 ); - aSupported[0] = OUString( "com.sun.star.form.inspection.ButtonNavigationHandler" ); + aSupported[0] = "com.sun.star.form.inspection.ButtonNavigationHandler"; return aSupported; } diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx index 3106efcd4e18..5aa52a448578 100644 --- a/extensions/source/propctrlr/cellbindinghandler.cxx +++ b/extensions/source/propctrlr/cellbindinghandler.cxx @@ -70,7 +70,7 @@ namespace pcr Sequence< OUString > SAL_CALL CellBindingPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { Sequence< OUString > aSupported( 1 ); - aSupported[0] = OUString( "com.sun.star.form.inspection.CellBindingPropertyHandler" ); + aSupported[0] = "com.sun.star.form.inspection.CellBindingPropertyHandler"; return aSupported; } diff --git a/extensions/source/propctrlr/editpropertyhandler.cxx b/extensions/source/propctrlr/editpropertyhandler.cxx index bca96ac2dc3a..7e00aac66e20 100644 --- a/extensions/source/propctrlr/editpropertyhandler.cxx +++ b/extensions/source/propctrlr/editpropertyhandler.cxx @@ -73,7 +73,7 @@ namespace pcr Sequence< OUString > SAL_CALL EditPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { Sequence< OUString > aSupported( 1 ); - aSupported[0] = OUString( "com.sun.star.form.inspection.EditPropertyHandler" ); + aSupported[0] = "com.sun.star.form.inspection.EditPropertyHandler"; return aSupported; } diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index 28332e210695..8d1417fa0b8a 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -81,7 +81,7 @@ namespace pcr Sequence< OUString > SAL_CALL EFormsPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { Sequence< OUString > aSupported( 1 ); - aSupported[0] = OUString( "com.sun.star.form.inspection.XMLFormsPropertyHandler" ); + aSupported[0] = "com.sun.star.form.inspection.XMLFormsPropertyHandler"; return aSupported; } @@ -468,7 +468,7 @@ namespace pcr } aDescriptor.DisplayName = m_pInfoService->getPropertyTranslation( nPropId ); - aDescriptor.Category = OUString( "Data" ); + aDescriptor.Category = "Data"; aDescriptor.HelpURL = HelpIdUrl::getHelpURL( m_pInfoService->getPropertyHelpId( nPropId ) ); return aDescriptor; } diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 56e63367b02a..58253b1faa7e 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -169,7 +169,7 @@ namespace pcr Sequence< OUString > SAL_CALL FormComponentPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { Sequence< OUString > aSupported( 1 ); - aSupported[0] = OUString( "com.sun.star.form.inspection.FormComponentPropertyHandler" ); + aSupported[0] = "com.sun.star.form.inspection.FormComponentPropertyHandler"; return aSupported; } diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index 2d46ae622ccf..3995229df83c 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -323,7 +323,7 @@ namespace pcr Sequence< OUString > SAL_CALL FormGeometryHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { Sequence< OUString > aSupported( 1 ); - aSupported[0] = OUString( "com.sun.star.form.inspection.FormGeometryHandler" ); + aSupported[0] = "com.sun.star.form.inspection.FormGeometryHandler"; return aSupported; } diff --git a/extensions/source/propctrlr/pcrunodialogs.cxx b/extensions/source/propctrlr/pcrunodialogs.cxx index 117b6ac6814c..49eb6fa22667 100644 --- a/extensions/source/propctrlr/pcrunodialogs.cxx +++ b/extensions/source/propctrlr/pcrunodialogs.cxx @@ -99,8 +99,8 @@ namespace pcr ::comphelper::StringSequence OTabOrderDialog::getSupportedServiceNames_static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(2); - aSupported.getArray()[0] = OUString( "com.sun.star.form.ui.TabOrderDialog" ); - aSupported.getArray()[1] = OUString( "com.sun.star.form.TabOrderDialog" ); + aSupported.getArray()[0] = "com.sun.star.form.ui.TabOrderDialog"; + aSupported.getArray()[1] = "com.sun.star.form.TabOrderDialog"; return aSupported; } diff --git a/extensions/source/propctrlr/propertyhandler.cxx b/extensions/source/propctrlr/propertyhandler.cxx index 78359d4659cc..c25028e18dbc 100644 --- a/extensions/source/propctrlr/propertyhandler.cxx +++ b/extensions/source/propctrlr/propertyhandler.cxx @@ -219,9 +219,9 @@ namespace pcr aDescriptor.DisplayName = m_pInfoService->getPropertyTranslation( nPropId ); if ( ( m_pInfoService->getPropertyUIFlags( nPropId ) & PROP_FLAG_DATA_PROPERTY ) != 0 ) - aDescriptor.Category = OUString( "Data" ); + aDescriptor.Category = "Data"; else - aDescriptor.Category = OUString( "General" ); + aDescriptor.Category = "General"; return aDescriptor; } @@ -379,28 +379,28 @@ namespace pcr OUString sConfigurationProperty; if ( xDocumentSI->supportsService( SERVICE_WEB_DOCUMENT ) ) { // writer - sConfigurationLocation = OUString( "/org.openoffice.Office.WriterWeb/Layout/Other" ); - sConfigurationProperty = OUString( "MeasureUnit" ); + sConfigurationLocation = "/org.openoffice.Office.WriterWeb/Layout/Other"; + sConfigurationProperty = "MeasureUnit"; } else if ( xDocumentSI->supportsService( SERVICE_TEXT_DOCUMENT ) ) { // writer - sConfigurationLocation = OUString( "/org.openoffice.Office.Writer/Layout/Other" ); - sConfigurationProperty = OUString( "MeasureUnit" ); + sConfigurationLocation = "/org.openoffice.Office.Writer/Layout/Other"; + sConfigurationProperty = "MeasureUnit"; } else if ( xDocumentSI->supportsService( SERVICE_SPREADSHEET_DOCUMENT ) ) { // calc - sConfigurationLocation = OUString( "/org.openoffice.Office.Calc/Layout/Other/MeasureUnit" ); - sConfigurationProperty = OUString( "Metric" ); + sConfigurationLocation = "/org.openoffice.Office.Calc/Layout/Other/MeasureUnit"; + sConfigurationProperty = "Metric"; } else if ( xDocumentSI->supportsService( SERVICE_DRAWING_DOCUMENT ) ) { - sConfigurationLocation = OUString( "/org.openoffice.Office.Draw/Layout/Other/MeasureUnit" ); - sConfigurationProperty = OUString( "Metric" ); + sConfigurationLocation = "/org.openoffice.Office.Draw/Layout/Other/MeasureUnit"; + sConfigurationProperty = "Metric"; } else if ( xDocumentSI->supportsService( SERVICE_PRESENTATION_DOCUMENT ) ) { - sConfigurationLocation = OUString( "/org.openoffice.Office.Impress/Layout/Other/MeasureUnit" ); - sConfigurationProperty = OUString( "Metric" ); + sConfigurationLocation = "/org.openoffice.Office.Impress/Layout/Other/MeasureUnit"; + sConfigurationProperty = "Metric"; } // read the measurement unit from the configuration diff --git a/extensions/source/propctrlr/sqlcommanddesign.cxx b/extensions/source/propctrlr/sqlcommanddesign.cxx index 67522ddb29de..4672ac6ff147 100644 --- a/extensions/source/propctrlr/sqlcommanddesign.cxx +++ b/extensions/source/propctrlr/sqlcommanddesign.cxx @@ -243,7 +243,7 @@ namespace pcr aArgs[3].Name = PROPERTY_ESCAPE_PROCESSING; aArgs[3].Value <<= m_xObjectAdapter->getEscapeProcessing(); - aArgs[4].Name = OUString( "GraphicalDesign" ); + aArgs[4].Name = "GraphicalDesign"; aArgs[4].Value <<= m_xObjectAdapter->getEscapeProcessing(); Reference< XComponent > xQueryDesign = xLoader->loadComponentFromURL( diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx index 495db591461d..c2d20037bd4f 100644 --- a/extensions/source/propctrlr/submissionhandler.cxx +++ b/extensions/source/propctrlr/submissionhandler.cxx @@ -113,7 +113,7 @@ namespace pcr Sequence< OUString > SAL_CALL SubmissionPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { Sequence< OUString > aSupported( 1 ); - aSupported[0] = OUString( "com.sun.star.form.inspection.SubmissionPropertyHandler" ); + aSupported[0] = "com.sun.star.form.inspection.SubmissionPropertyHandler"; return aSupported; } @@ -312,7 +312,7 @@ namespace pcr LineDescriptor aDescriptor; aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, sal_False, sal_True ); aDescriptor.DisplayName = m_pInfoService->getPropertyTranslation( nPropId ); - aDescriptor.Category = OUString( "General" ); + aDescriptor.Category = "General"; aDescriptor.HelpURL = HelpIdUrl::getHelpURL( m_pInfoService->getPropertyHelpId( nPropId ) ); return aDescriptor; } diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index 2594e02ee1e7..54ce977fd3d1 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -95,7 +95,7 @@ namespace pcr Sequence< OUString > SAL_CALL XSDValidationPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { Sequence< OUString > aSupported( 1 ); - aSupported[0] = OUString( "com.sun.star.form.inspection.XSDValidationPropertyHandler" ); + aSupported[0] = "com.sun.star.form.inspection.XSDValidationPropertyHandler"; return aSupported; } @@ -323,8 +323,8 @@ namespace pcr aDescriptor.PrimaryButtonId = OUString::createFromAscii(UID_PROP_ADD_DATA_TYPE); aDescriptor.SecondaryButtonId = OUString::createFromAscii(UID_PROP_REMOVE_DATA_TYPE);; aDescriptor.HasPrimaryButton = aDescriptor.HasSecondaryButton = sal_True; - aDescriptor.PrimaryButtonImageURL = OUString( "private:graphicrepository/extensions/res/buttonplus.png" ); - aDescriptor.SecondaryButtonImageURL = OUString( "private:graphicrepository/extensions/res/buttonminus.png" ); + aDescriptor.PrimaryButtonImageURL = "private:graphicrepository/extensions/res/buttonplus.png"; + aDescriptor.SecondaryButtonImageURL = "private:graphicrepository/extensions/res/buttonminus.png"; break; case PROPERTY_ID_XSD_WHITESPACES: @@ -419,7 +419,7 @@ namespace pcr break; } - aDescriptor.Category = OUString( "Data" ); + aDescriptor.Category = "Data"; aDescriptor.DisplayName = m_pInfoService->getPropertyTranslation( nPropId ); aDescriptor.HelpURL = HelpIdUrl::getHelpURL( m_pInfoService->getPropertyHelpId( nPropId ) ); diff --git a/extensions/source/scanner/scanner.cxx b/extensions/source/scanner/scanner.cxx index ec2f088594ec..671968d9c748 100644 --- a/extensions/source/scanner/scanner.cxx +++ b/extensions/source/scanner/scanner.cxx @@ -88,7 +88,7 @@ Sequence< OUString > ScannerManager::getSupportedServiceNames_Static() throw () { Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[0] = OUString( "com.sun.star.scanner.ScannerManager" ); + aSNS.getArray()[0] = "com.sun.star.scanner.ScannerManager"; return aSNS; } diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx index 12f8fcbd1dfa..319445f178d5 100644 --- a/extensions/source/scanner/scanwin.cxx +++ b/extensions/source/scanner/scanwin.cxx @@ -866,7 +866,7 @@ uno::Sequence< ScannerContext > SAL_CALL ScannerManager::getAvailableScanners() osl::MutexGuard aGuard( maProtector ); uno::Sequence< ScannerContext > aRet( 1 ); - aRet.getArray()[0].ScannerName = OUString( "TWAIN" ); + aRet.getArray()[0].ScannerName = "TWAIN" ; aRet.getArray()[0].InternalData = 0; return aRet; @@ -878,7 +878,7 @@ sal_Bool SAL_CALL ScannerManager::configureScannerAndScan( ScannerContext& rCont osl::MutexGuard aGuard( maProtector ); uno::Reference< XScannerManager > xThis( this ); - if( rContext.InternalData != 0 || rContext.ScannerName != OUString( "TWAIN" ) ) + if( rContext.InternalData != 0 || rContext.ScannerName != "TWAIN" ) throw ScannerException("Scanner does not exist", xThis, ScanError_InvalidContext ); ReleaseData(); @@ -892,7 +892,7 @@ void SAL_CALL ScannerManager::startScan( const ScannerContext& rContext, const u osl::MutexGuard aGuard( maProtector ); uno::Reference< XScannerManager > xThis( this ); - if( rContext.InternalData != 0 || rContext.ScannerName != OUString( "TWAIN" ) ) + if( rContext.InternalData != 0 || rContext.ScannerName != "TWAIN" ) throw ScannerException("Scanner does not exist", xThis, ScanError_InvalidContext ); ReleaseData(); @@ -905,7 +905,7 @@ ScanError SAL_CALL ScannerManager::getError( const ScannerContext& rContext ) osl::MutexGuard aGuard( maProtector ); uno::Reference< XScannerManager > xThis( this ); - if( rContext.InternalData != 0 || rContext.ScannerName != OUString( "TWAIN" ) ) + if( rContext.InternalData != 0 || rContext.ScannerName != "TWAIN" ) throw ScannerException("Scanner does not exist", xThis, ScanError_InvalidContext ); return( ( aTwain.GetState() == TWAIN_STATE_CANCELED ) ? ScanError_ScanCanceled : ScanError_ScanErrorNone ); |