diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 13:27:23 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 14:12:28 +0100 |
commit | e1d6d5dd87b0504cf581b42bbf3942095a0028f1 (patch) | |
tree | 0600a11d14e70b674508fd794a614ed298339f94 /oox | |
parent | ed609b5119bea695de24a78892e817132082060d (diff) |
oox: Use appropriate OUString functions on string constants
Change-Id: I63db342676e1116c2ed1eef4e27599add0a318c9
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/core/relations.cxx | 4 | ||||
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 4 | ||||
-rw-r--r-- | oox/source/docprop/docprophandler.cxx | 4 | ||||
-rw-r--r-- | oox/source/drawingml/chart/objectformatter.cxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/diagram/diagram.cxx | 2 | ||||
-rw-r--r-- | oox/source/export/chartexport.cxx | 16 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 12 |
7 files changed, 22 insertions, 22 deletions
diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx index b7a4faad8fed..1b44f9e590d3 100644 --- a/oox/source/core/relations.cxx +++ b/oox/source/core/relations.cxx @@ -40,12 +40,12 @@ OUString lclAppendFileName( const OUString& rPath, const OUString& rFileName ) OUString createOfficeDocRelationTypeTransitional(const OUString& rType) { - return OUString("http://schemas.openxmlformats.org/officeDocument/2006/relationships/") + rType; + return "http://schemas.openxmlformats.org/officeDocument/2006/relationships/" + rType; } OUString createOfficeDocRelationTypeStrict(const OUString& rType) { - return OUString("http://purl.oclc.org/ooxml/officeDocument/relationships/") + rType; + return "http://purl.oclc.org/ooxml/officeDocument/relationships/" + rType; } } diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index c54f3fbc0c16..c6493ade513f 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -252,12 +252,12 @@ namespace { OUString getTransitionalRelationshipOfficeDocType(const OUString& rPart) { - return OUString("http://schemas.openxmlformats.org/officeDocument/2006/relationships/") + rPart; + return "http://schemas.openxmlformats.org/officeDocument/2006/relationships/" + rPart; } OUString getStrictRelationshipOfficeDocType(const OUString& rPart) { - return OUString("http://purl.oclc.org/ooxml/officeDocument/relationships/") + rPart; + return "http://purl.oclc.org/ooxml/officeDocument/relationships/" + rPart; } } diff --git a/oox/source/docprop/docprophandler.cxx b/oox/source/docprop/docprophandler.cxx index 54b3c50497f4..fb3b42eb8644 100644 --- a/oox/source/docprop/docprophandler.cxx +++ b/oox/source/docprop/docprophandler.cxx @@ -58,7 +58,7 @@ void OOXMLDocPropHandler::InitNew() { m_nState = 0; m_nBlock = 0; - m_aCustomPropertyName = ""; + m_aCustomPropertyName.clear(); m_nType = 0; m_nInBlock = 0; } @@ -342,7 +342,7 @@ void SAL_CALL OOXMLDocPropHandler::endFastElement( ::sal_Int32 ) else if ( m_nInBlock == 1 ) { m_nBlock = 0; - m_aCustomPropertyName = ""; + m_aCustomPropertyName.clear(); } else if ( m_nInBlock == 2 ) m_nType = 0; diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index abe671c6e9ee..f6550083095d 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -1098,7 +1098,7 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo sal_Int32 nPropId = bPercent ? PROP_PercentageNumberFormat : PROP_NumberFormat; OUString sFormatCode(rNumberFormat.maFormatCode); if (bPercent && bGeneral) - sFormatCode = OUString("0%"); + sFormatCode = "0%"; try { sal_Int32 nIndex = bGeneral && !bPercent ? diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index 3961bebef28e..1209f004fdf3 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -352,7 +352,7 @@ uno::Sequence<beans::PropertyValue> Diagram::getDomsAsPropertyValues() const if ( 0 < maDataRelsMap.getLength() ) { - pValue[0].Name = OUString("OOXDiagramDataRels"); + pValue[0].Name = "OOXDiagramDataRels"; pValue[0].Value = uno::makeAny ( maDataRelsMap ); ++pValue; } diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index cf3ad46f1958..31bb95ee4e32 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -184,9 +184,9 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen { (void)ex; // avoid warning for pro build OSL_FAIL( OUStringToOString( - OUString( "Exception caught. Type: " ) + + "Exception caught. Type: " + OUString::createFromAscii( typeid( ex ).name()) + - OUString( ", Message: " ) + + ", Message: " + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } @@ -301,9 +301,9 @@ bool lcl_isSeriesAttachedToFirstAxis( { (void)ex; // avoid warning for pro build OSL_FAIL( OUStringToOString( - OUString( "Exception caught. Type: " ) + + "Exception caught. Type: " + OUString::createFromAscii( typeid( ex ).name()) + - OUString( ", Message: " ) + + ", Message: " + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } @@ -652,9 +652,9 @@ void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XCha { (void)ex; // avoid warning for pro build OSL_FAIL( OUStringToOString( - OUString( "Exception caught. Type: " ) + + "Exception caught. Type: " + OUString::createFromAscii( typeid( ex ).name()) + - OUString( ", Message: " ) + + ", Message: " + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); } } @@ -1591,7 +1591,7 @@ void ChartExport::exportUpDownBars( Reference< chart2::XChartType > xChartType) FSEND ); // For Linechart with UpDownBars, spPr is not getting imported // so no need to call the exportShapeProps() for LineChart - if(xChartType->getChartType().equals("com.sun.star.chart2.CandleStickChartType")) + if(xChartType->getChartType() == "com.sun.star.chart2.CandleStickChartType") { exportShapeProps(xChartPropSet); } @@ -1602,7 +1602,7 @@ void ChartExport::exportUpDownBars( Reference< chart2::XChartType > xChartType) { pFS->startElement( FSNS( XML_c, XML_downBars ), FSEND ); - if(xChartType->getChartType().equals("com.sun.star.chart2.CandleStickChartType")) + if(xChartType->getChartType() == "com.sun.star.chart2.CandleStickChartType") { exportShapeProps(xChartPropSet); } diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 79a2c2d41808..e2ba6dfc788a 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1553,24 +1553,24 @@ OUString GetAutoNumType(sal_Int16 nNumberingType, bool bSDot, bool bPBehind, boo { case SVX_NUM_CHARS_UPPER_LETTER_N : case SVX_NUM_CHARS_UPPER_LETTER : - return OUString("alphaUc") + sPrefixSuffix; + return "alphaUc" + sPrefixSuffix; case SVX_NUM_CHARS_LOWER_LETTER_N : case SVX_NUM_CHARS_LOWER_LETTER : - return OUString("alphaLc") + sPrefixSuffix; + return "alphaLc" + sPrefixSuffix; case SVX_NUM_ROMAN_UPPER : - return OUString("romanUc") + sPrefixSuffix; + return "romanUc" + sPrefixSuffix; case SVX_NUM_ROMAN_LOWER : - return OUString("romanLc") + sPrefixSuffix; + return "romanLc" + sPrefixSuffix; case SVX_NUM_ARABIC : { if (sPrefixSuffix.isEmpty()) return OUString("arabicPlain"); else - return OUString("arabic") + sPrefixSuffix; + return "arabic" + sPrefixSuffix; } default: break; @@ -1875,7 +1875,7 @@ void DrawingML::WriteText( Reference< XInterface > rXIface, const OUString& pres for ( sal_Int32 i = 0, nElems = aProps.getLength(); i < nElems; ++i ) { sal_Int32 nTextRotateAngle = 0; - if ( aProps[ i ].Name.equals( "TextPreRotateAngle" ) && ( aProps[ i ].Value >>= nTextRotateAngle ) ) + if ( aProps[ i ].Name == "TextPreRotateAngle" && ( aProps[ i ].Value >>= nTextRotateAngle ) ) { if ( nTextRotateAngle == -90 ) { |