diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-06-29 21:24:12 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-06-29 21:52:54 +0000 |
commit | ba0a57702cdef7a0389c06841711d7e3079d471c (patch) | |
tree | 223c0dd50de4b71cf7df9d0073f7cacca1f18c8d /oox/source | |
parent | 8a7ede404ca4980f169c4ce634805ea5c1b6b56e (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 'oox/source')
-rw-r--r-- | oox/source/core/filterdetect.cxx | 2 | ||||
-rw-r--r-- | oox/source/export/chartexport.cxx | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index 3d84a94abc40..12f53e460fc5 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -633,7 +633,7 @@ Reference< XInputStream > FilterDetect::extractUnencryptedPackage( MediaDescript #if USE_TLS_NSS // Retrieve the valid key so we can get its size later SequenceAsHashMap aHashData( aEncryptionData ); - Sequence<sal_Int8> validKey( aHashData.getUnpackedValueOrDefault( OUString("AES128EncryptionKey"), Sequence<sal_Int8>() ) ); + Sequence<sal_Int8> validKey( aHashData.getUnpackedValueOrDefault("AES128EncryptionKey", Sequence<sal_Int8>() ) ); PK11SlotInfo *aSlot( PK11_GetBestSlot( CKM_AES_ECB, NULL ) ); sal_uInt8 *key = new sal_uInt8[ validKey.getLength() ]; diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 49e234405da5..a79512bb6772 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -289,7 +289,7 @@ bool lcl_isSeriesAttachedToFirstAxis( sal_Int32 nAxisIndex = 0; Reference< beans::XPropertySet > xProp( xDataSeries, uno::UNO_QUERY_THROW ); if( xProp.is() ) - xProp->getPropertyValue( OUString( "AttachedAxisIndex" ) ) >>= nAxisIndex; + xProp->getPropertyValue("AttachedAxisIndex") >>= nAxisIndex; bResult = (0==nAxisIndex); } catch( const uno::Exception & ex ) @@ -465,7 +465,7 @@ OUString ChartExport::parseFormula( const OUString& rRange ) { try { - xParser.set( xSF->createInstance( OUString("com.sun.star.sheet.FormulaParser") ), UNO_QUERY ); + xParser.set( xSF->createInstance("com.sun.star.sheet.FormulaParser"), UNO_QUERY ); } catch( Exception& ) { @@ -477,12 +477,12 @@ OUString ChartExport::parseFormula( const OUString& rRange ) Reference< XPropertySet > xParserProps( xParser, uno::UNO_QUERY ); if( xParserProps.is() ) { - xParserProps->setPropertyValue( OUString("FormulaConvention"), uno::makeAny(::com::sun::star::sheet::AddressConvention::OOO) ); + xParserProps->setPropertyValue("FormulaConvention", uno::makeAny(::com::sun::star::sheet::AddressConvention::OOO) ); } uno::Sequence<sheet::FormulaToken> aTokens = xParser->parseFormula( rRange, CellAddress( 0, 0, 0 ) ); if( xParserProps.is() ) { - xParserProps->setPropertyValue( OUString("FormulaConvention"), uno::makeAny(::com::sun::star::sheet::AddressConvention::XL_OOX) ); + xParserProps->setPropertyValue("FormulaConvention", uno::makeAny(::com::sun::star::sheet::AddressConvention::XL_OOX) ); } aResult = xParser->printFormula( aTokens, CellAddress( 0, 0, 0 ) ); } @@ -910,7 +910,7 @@ void ChartExport::exportTitle( Reference< XShape > xShape ) Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY ); if( xPropSet.is()) { - xPropSet->getPropertyValue( OUString( "String" )) >>= sText; + xPropSet->getPropertyValue("String") >>= sText; } if( sText.isEmpty() ) return; @@ -927,7 +927,7 @@ void ChartExport::exportTitle( Reference< XShape > xShape ) // TODO: bodyPr const char* sWritingMode = NULL; sal_Bool bVertical = sal_False; - xPropSet->getPropertyValue( OUString( "StackedText" )) >>= bVertical; + xPropSet->getPropertyValue("StackedText") >>= bVertical; if( bVertical ) sWritingMode = "wordArtVert"; @@ -1416,7 +1416,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_ sal_Bool bJapaneseCandleSticks = sal_False; Reference< beans::XPropertySet > xCTProp( xChartType, uno::UNO_QUERY ); if( xCTProp.is()) - xCTProp->getPropertyValue( OUString("Japanese")) >>= bJapaneseCandleSticks; + xCTProp->getPropertyValue("Japanese") >>= bJapaneseCandleSticks; exportCandleStickSeries( xDSCnt->getDataSeries(), bJapaneseCandleSticks, nAttachedAxis ); return; @@ -1448,7 +1448,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_ { Reference< beans::XPropertySet > xSeqProp( xTempValueSeq, uno::UNO_QUERY ); if( xSeqProp.is()) - xSeqProp->getPropertyValue(OUString("Role")) >>= aRole; + xSeqProp->getPropertyValue("Role") >>= aRole; // "main" sequence if( aRole.equals( aLabelRole )) { |