diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-09 22:47:20 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-03-11 11:07:09 +0100 |
commit | 937b63af3322f7f8b5e869b2c7431a2deaec3113 (patch) | |
tree | a832f6672188551a5be9538a02fb80d6e3fc8497 /xmloff | |
parent | 5c32ac5104e9cade52c8a373033644282de9ceff (diff) |
use startsWith() instead of compareToAscii()
brain damage...
Change-Id: I4dc63c7346f724eded9ac7b82cda25c2bb60beff
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/eventimp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/shadwhdl.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/transform/StyleOASISTContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/transform/TransformerBase.cxx | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx index 3cdd5797909a..fb711d8a1fef 100644 --- a/xmloff/source/draw/eventimp.cxx +++ b/xmloff/source/draw/eventimp.cxx @@ -415,7 +415,7 @@ void SdXMLEventContext::EndElement() // so check here if its realy a bookmark or maybe a document if( meClickAction == ClickAction_BOOKMARK ) { - if( msBookmark.compareToAscii( "#", 1 ) != 0 ) + if( !msBookmark.startsWith( "#" ) ) meClickAction = ClickAction_DOCUMENT; } diff --git a/xmloff/source/style/shadwhdl.cxx b/xmloff/source/style/shadwhdl.cxx index 13c1d9a1932c..8df434f91be0 100644 --- a/xmloff/source/style/shadwhdl.cxx +++ b/xmloff/source/style/shadwhdl.cxx @@ -64,7 +64,7 @@ sal_Bool XMLShadowPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rV bRet = sal_True; break; } - else if( !bColorFound && aToken.compareToAscii( "#", 1 ) == 0 ) + else if( !bColorFound && aToken.startsWith("#") ) { sal_Int32 nColor(0); bRet = ::sax::Converter::convertColor( nColor, aToken ); diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx index 6f7caf7daf66..cd76458ad584 100644 --- a/xmloff/source/transform/StyleOASISTContext.cxx +++ b/xmloff/source/transform/StyleOASISTContext.cxx @@ -871,7 +871,7 @@ void XMLStyleOASISTContext::StartElement( --nAttrCount; break; case XML_ATACTION_DECODE_STYLE_NAME: - m_bControlStyle = 0 == rAttrValue.compareToAscii( "ctrl", 4 ); + m_bControlStyle = rAttrValue.startsWith( "ctrl" ); case XML_ATACTION_DECODE_STYLE_NAME_REF: { OUString aAttrValue( rAttrValue ); diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 4adfc9727bd0..00665efdeda2 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -1382,7 +1382,7 @@ sal_Bool XMLTransformerBase::ConvertURIToOOo( ::rtl::OUString& rURI, if( bPackage && bSupportPackage ) { OUString sTmp( OUString::valueOf( sal_Unicode( '#' ) ) ); - if( 0 == rURI.compareToAscii( "./", 2 ) ) + if( rURI.startsWith( "./" ) ) rURI = rURI.copy( 2 ); sTmp += rURI; rURI = sTmp; |