diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-25 21:59:48 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-25 21:59:48 -0200 |
commit | 3dbb89e5a39e7811d2fc0c1fbad012c3d565396b (patch) | |
tree | c30b07e879ad20c5bded2291296f9633c273ab5e /xmloff/source/style | |
parent | 4228c5542b57b43064bbefb3cc79c4eb51e059d6 (diff) |
Fix for fdo43460 Part XLVIII getLength() to isEmpty()
Part XLVIII
Modules
xmloff (part 2)
Diffstat (limited to 'xmloff/source/style')
-rw-r--r-- | xmloff/source/style/DashStyle.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/FillStyleContext.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/GradientStyle.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/HatchStyle.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/ImageStyle.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/style/MarkerStyle.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/PageMasterImportContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/PageMasterPropHdl.cxx | 12 | ||||
-rw-r--r-- | xmloff/source/style/TransGradientStyle.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/XMLBackgroundImageContext.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/style/XMLBackgroundImageExport.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/style/XMLFontAutoStylePool.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/XMLPageExport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/bordrhdl.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/cdouthdl.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/chrhghdl.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/style/chrlohdl.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/csmaphdl.cxx | 2 |
18 files changed, 42 insertions, 42 deletions
diff --git a/xmloff/source/style/DashStyle.cxx b/xmloff/source/style/DashStyle.cxx index f38e9dcaffdc..b2f24d6b9d3e 100644 --- a/xmloff/source/style/DashStyle.cxx +++ b/xmloff/source/style/DashStyle.cxx @@ -211,7 +211,7 @@ sal_Bool XMLDashStyleImport::importXML( rValue <<= aLineDash; - if( aDisplayName.getLength() ) + if( !aDisplayName.isEmpty() ) { rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_STROKE_DASH_ID, rStrName, aDisplayName ); @@ -245,7 +245,7 @@ sal_Bool XMLDashStyleExport::exportXML( drawing::LineDash aLineDash; - if( rStrName.getLength() ) + if( !rStrName.isEmpty() ) { if( rValue >>= aLineDash ) { diff --git a/xmloff/source/style/FillStyleContext.cxx b/xmloff/source/style/FillStyleContext.cxx index 9f1947ac992a..03f54e5328c3 100644 --- a/xmloff/source/style/FillStyleContext.cxx +++ b/xmloff/source/style/FillStyleContext.cxx @@ -164,7 +164,7 @@ SvXMLImportContext* XMLBitmapStyleContext::CreateChildContext( sal_uInt16 nPrefi { OUString sURL; maAny >>= sURL; - if( !sURL.getLength() && !mxBase64Stream.is() ) + if( sURL.isEmpty() && !mxBase64Stream.is() ) { mxBase64Stream = GetImport().GetStreamForGraphicObjectURLFromBase64(); if( mxBase64Stream.is() ) @@ -186,7 +186,7 @@ void XMLBitmapStyleContext::EndElement() OUString sURL; maAny >>= sURL; - if( !sURL.getLength() && mxBase64Stream.is() ) + if( sURL.isEmpty() && mxBase64Stream.is() ) { sURL = GetImport().ResolveGraphicObjectURLFromBase64( mxBase64Stream ); mxBase64Stream = 0; diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx index deb08203fb6d..0c347f4e85e6 100644 --- a/xmloff/source/style/GradientStyle.cxx +++ b/xmloff/source/style/GradientStyle.cxx @@ -215,7 +215,7 @@ sal_Bool XMLGradientStyleImport::importXML( rValue <<= aGradient; - if( aDisplayName.getLength() ) + if( !aDisplayName.isEmpty() ) { rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_GRADIENT_ID, rStrName, aDisplayName ); @@ -251,7 +251,7 @@ sal_Bool XMLGradientStyleExport::exportXML( sal_Bool bRet = sal_False; awt::Gradient aGradient; - if( rStrName.getLength() ) + if( !rStrName.isEmpty() ) { if( rValue >>= aGradient ) { diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx index ea8e51b3ed22..e7b94d78a708 100644 --- a/xmloff/source/style/HatchStyle.cxx +++ b/xmloff/source/style/HatchStyle.cxx @@ -172,7 +172,7 @@ sal_Bool XMLHatchStyleImport::importXML( rValue <<= aHatch; - if( aDisplayName.getLength() ) + if( !aDisplayName.isEmpty() ) { rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_HATCH_ID, rStrName, aDisplayName ); @@ -207,7 +207,7 @@ sal_Bool XMLHatchStyleExport::exportXML( sal_Bool bRet = sal_False; drawing::Hatch aHatch; - if( rStrName.getLength() ) + if( !rStrName.isEmpty() ) { if( rValue >>= aHatch ) { diff --git a/xmloff/source/style/ImageStyle.cxx b/xmloff/source/style/ImageStyle.cxx index 4bea489aef25..29b9d5222cb3 100644 --- a/xmloff/source/style/ImageStyle.cxx +++ b/xmloff/source/style/ImageStyle.cxx @@ -77,7 +77,7 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any& OUString sImageURL; - if( rStrName.getLength() ) + if( !rStrName.isEmpty() ) { if( rValue >>= sImageURL ) { @@ -95,7 +95,7 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any& // uri const OUString aStr( rExport.AddEmbeddedGraphicObject( sImageURL ) ); - if( aStr.getLength() ) + if( !aStr.isEmpty() ) { rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aStr ); rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); @@ -106,7 +106,7 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any& // Do Write SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_FILL_IMAGE, sal_True, sal_True ); - if( sImageURL.getLength() ) + if( !sImageURL.isEmpty() ) { // optional office:binary-data rExport.AddEmbeddedGraphicObjectAsBase64( sImageURL ); @@ -190,7 +190,7 @@ sal_Bool XMLImageStyle::ImpImportXML( const uno::Reference< xml::sax::XAttribute rValue <<= aStrURL; - if( aDisplayName.getLength() ) + if( !aDisplayName.isEmpty() ) { rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_FILL_IMAGE_ID, rStrName, aDisplayName ); diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx index ff806f77e371..05a57e6ef093 100644 --- a/xmloff/source/style/MarkerStyle.cxx +++ b/xmloff/source/style/MarkerStyle.cxx @@ -143,7 +143,7 @@ sal_Bool XMLMarkerStyleImport::importXML( rValue <<= aSourcePolyPolygon; } - if( aDisplayName.getLength() ) + if( !aDisplayName.isEmpty() ) { rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_MARKER_ID, rStrName, aDisplayName ); @@ -178,7 +178,7 @@ sal_Bool XMLMarkerStyleExport::exportXML( { sal_Bool bRet(sal_False); - if(rStrName.getLength()) + if(!rStrName.isEmpty()) { drawing::PolyPolygonBezierCoords aBezier; diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx index cdb0052b3859..cc7fdb23fdb0 100644 --- a/xmloff/source/style/PageMasterImportContext.cxx +++ b/xmloff/source/style/PageMasterImportContext.cxx @@ -168,7 +168,7 @@ void PageStyleContext::FillPropertySet( const uno::Reference<beans::XPropertySet > & rPropSet ) { XMLPropStyleContext::FillPropertySet(rPropSet); - if (sPageUsage.getLength()) + if (!sPageUsage.isEmpty()) { uno::Any aPageUsage; XMLPMPropHdl_PageStyleLayout aPageUsageHdl; diff --git a/xmloff/source/style/PageMasterPropHdl.cxx b/xmloff/source/style/PageMasterPropHdl.cxx index 80d399f527a1..be7e5a0c13e9 100644 --- a/xmloff/source/style/PageMasterPropHdl.cxx +++ b/xmloff/source/style/PageMasterPropHdl.cxx @@ -233,7 +233,7 @@ sal_Bool XMLPMPropHdl_NumLetterSync::exportXML( OUStringBuffer aBuffer( 5 ); rUnitConverter.convertNumLetterSync( aBuffer, nNumType ); rStrExpValue = aBuffer.makeStringAndClear(); - bRet = rStrExpValue.getLength() > 0; + bRet = !rStrExpValue.isEmpty(); } return bRet; } @@ -333,7 +333,7 @@ sal_Bool XMLPMPropHdl_Print::exportXML( { if( getBOOL( rValue ) ) { - if( rStrExpValue.getLength() ) + if( !rStrExpValue.isEmpty() ) rStrExpValue += OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) ); rStrExpValue += sAttrValue; } @@ -355,7 +355,7 @@ sal_Bool XMLPMPropHdl_CenterHorizontal::importXML( { sal_Bool bRet = sal_False; - if (rStrImpValue.getLength()) + if (!rStrImpValue.isEmpty()) if (IsXMLToken( rStrImpValue, XML_BOTH) || IsXMLToken( rStrImpValue, XML_HORIZONTAL)) { @@ -377,7 +377,7 @@ sal_Bool XMLPMPropHdl_CenterHorizontal::exportXML( if ( ::cppu::any2bool( rValue ) ) { bRet = sal_True; - if (rStrExpValue.getLength()) + if (!rStrExpValue.isEmpty()) rStrExpValue = GetXMLToken(XML_BOTH); else rStrExpValue = GetXMLToken(XML_HORIZONTAL); @@ -397,7 +397,7 @@ sal_Bool XMLPMPropHdl_CenterVertical::importXML( { sal_Bool bRet = sal_False; - if (rStrImpValue.getLength()) + if (!rStrImpValue.isEmpty()) if (IsXMLToken(rStrImpValue, XML_BOTH) || IsXMLToken(rStrImpValue, XML_VERTICAL) ) { @@ -418,7 +418,7 @@ sal_Bool XMLPMPropHdl_CenterVertical::exportXML( if ( ::cppu::any2bool( rValue ) ) { bRet = sal_True; - if (rStrExpValue.getLength()) + if (!rStrExpValue.isEmpty()) rStrExpValue = GetXMLToken(XML_BOTH); else rStrExpValue = GetXMLToken(XML_VERTICAL); diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx index 967d5a71afce..aea7cd3793c3 100644 --- a/xmloff/source/style/TransGradientStyle.cxx +++ b/xmloff/source/style/TransGradientStyle.cxx @@ -213,7 +213,7 @@ sal_Bool XMLTransGradientStyleImport::importXML( rValue <<= aGradient; - if( aDisplayName.getLength() ) + if( !aDisplayName.isEmpty() ) { rImport.AddStyleDisplayName( XML_STYLE_FAMILY_SD_GRADIENT_ID, rStrName, aDisplayName ); @@ -249,7 +249,7 @@ sal_Bool XMLTransGradientStyleExport::exportXML( sal_Bool bRet = sal_False; awt::Gradient aGradient; - if( rStrName.getLength() ) + if( !rStrName.isEmpty() ) { if( rValue >>= aGradient ) { diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx index a8a5e0bb4baa..3c466000bd3c 100644 --- a/xmloff/source/style/XMLBackgroundImageContext.cxx +++ b/xmloff/source/style/XMLBackgroundImageContext.cxx @@ -367,7 +367,7 @@ SvXMLImportContext *XMLBackgroundImageContext::CreateChildContext( xmloff::token::IsXMLToken( rLocalName, xmloff::token::XML_BINARY_DATA ) ) { - if( !sURL.getLength() && !xBase64Stream.is() ) + if( sURL.isEmpty() && !xBase64Stream.is() ) { xBase64Stream = GetImport().GetStreamForGraphicObjectURLFromBase64(); if( xBase64Stream.is() ) @@ -386,7 +386,7 @@ SvXMLImportContext *XMLBackgroundImageContext::CreateChildContext( void XMLBackgroundImageContext::EndElement() { - if( sURL.getLength() ) + if( !sURL.isEmpty() ) { sURL = GetImport().ResolveGraphicObjectURL( sURL, sal_False ); } @@ -396,7 +396,7 @@ void XMLBackgroundImageContext::EndElement() xBase64Stream = 0; } - if( !sURL.getLength() ) + if( sURL.isEmpty() ) ePos = GraphicLocation_NONE; else if( GraphicLocation_NONE == ePos ) ePos = GraphicLocation_TILED; diff --git a/xmloff/source/style/XMLBackgroundImageExport.cxx b/xmloff/source/style/XMLBackgroundImageExport.cxx index 5465098cd78b..0db36cab8147 100644 --- a/xmloff/source/style/XMLBackgroundImageExport.cxx +++ b/xmloff/source/style/XMLBackgroundImageExport.cxx @@ -67,10 +67,10 @@ void XMLBackgroundImageExport::exportXML( const Any& rURL, OUString sURL; rURL >>= sURL; - if( sURL.getLength() && GraphicLocation_NONE != ePos ) + if( !sURL.isEmpty() && GraphicLocation_NONE != ePos ) { OUString sTempURL( GetExport().AddEmbeddedGraphicObject( sURL ) ); - if( sTempURL.getLength() ) + if( !sTempURL.isEmpty() ) { GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sTempURL ); GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, @@ -146,7 +146,7 @@ void XMLBackgroundImageExport::exportXML( const Any& rURL, { OUString sFilter; (*pFilter) >>= sFilter; - if( sFilter.getLength() ) + if( !sFilter.isEmpty() ) GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FILTER_NAME, sFilter ); } @@ -166,7 +166,7 @@ void XMLBackgroundImageExport::exportXML( const Any& rURL, { SvXMLElementExport aElem( GetExport(), nPrefix, rLocalName, sal_True, sal_True ); - if( sURL.getLength() && GraphicLocation_NONE != ePos ) + if( !sURL.isEmpty() && GraphicLocation_NONE != ePos ) { // optional office:binary-data GetExport().AddEmbeddedGraphicObjectAsBase64( sURL ); diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index 68b87d0925f8..e5e3323e8e7c 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -189,7 +189,7 @@ OUString XMLFontAutoStylePool::Add( sName.trim(); } - if( !sName.getLength() ) + if( sName.isEmpty() ) sName = OUString::valueOf( sal_Unicode( 'F' ) ); if( pNames->Seek_Entry( &sName, 0 ) ) @@ -261,7 +261,7 @@ void XMLFontAutoStylePool::exportXML() XML_FONT_FAMILY, sTmp ); const OUString& rStyleName = pEntry->GetStyleName(); - if( rStyleName.getLength() ) + if( !rStyleName.isEmpty() ) GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FONT_ADORNMENTS, rStyleName ); diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx index 41eccc2e25ed..d98d8d7bdc85 100644 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -82,7 +82,7 @@ void XMLPageExport::collectPageMasterAutoStyle( { OUString sParent; rPageMasterName = rExport.GetAutoStylePool()->Find( XML_STYLE_FAMILY_PAGE_MASTER, sParent, xPropStates ); - if (!rPageMasterName.getLength()) + if (rPageMasterName.isEmpty()) rPageMasterName = rExport.GetAutoStylePool()->Add(XML_STYLE_FAMILY_PAGE_MASTER, sParent, xPropStates); } } @@ -141,7 +141,7 @@ sal_Bool XMLPageExport::exportStyle( OUString sNextName; xPropSet->getPropertyValue( sFollowStyle ) >>= sNextName; - if( sName != sNextName && sNextName.getLength() ) + if( sName != sNextName && !sNextName.isEmpty() ) { GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NEXT_STYLE_NAME, GetExport().EncodeStyleName( sNextName ) ); diff --git a/xmloff/source/style/bordrhdl.cxx b/xmloff/source/style/bordrhdl.cxx index ab6acfd3b3c6..385f82447951 100644 --- a/xmloff/source/style/bordrhdl.cxx +++ b/xmloff/source/style/bordrhdl.cxx @@ -220,7 +220,7 @@ sal_Bool XMLBorderHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue sal_Int32 nColor = 0; sal_Int32 nTemp; - while( aTokens.getNextToken( aToken ) && aToken.getLength() != 0 ) + while( aTokens.getNextToken( aToken ) && !aToken.isEmpty() ) { if( !bHasWidth && rUnitConverter.convertEnum( nNamedWidth, aToken, diff --git a/xmloff/source/style/cdouthdl.cxx b/xmloff/source/style/cdouthdl.cxx index 347ef8dc5180..bf98639bf128 100644 --- a/xmloff/source/style/cdouthdl.cxx +++ b/xmloff/source/style/cdouthdl.cxx @@ -298,7 +298,7 @@ sal_Bool XMLCrossedOutTextPropHdl::importXML( const OUString& rStrImpValue, uno: { sal_Bool bRet = sal_False; - if( rStrImpValue.getLength() ) + if( !rStrImpValue.isEmpty() ) { sal_Int16 eStrikeout = ('/' == rStrImpValue[0] ? FontStrikeout::SLASH diff --git a/xmloff/source/style/chrhghdl.cxx b/xmloff/source/style/chrhghdl.cxx index 584acf928064..8b8f842ec7f7 100644 --- a/xmloff/source/style/chrhghdl.cxx +++ b/xmloff/source/style/chrhghdl.cxx @@ -89,7 +89,7 @@ sal_Bool XMLCharHeightHdl::exportXML( OUString& rStrExpValue, const uno::Any& rV } rStrExpValue = aOut.makeStringAndClear(); - return rStrExpValue.getLength() != 0; + return !rStrExpValue.isEmpty(); } /////////////////////////////////////////////////////////////////////////////// @@ -128,7 +128,7 @@ sal_Bool XMLCharHeightPropHdl::exportXML( OUString& rStrExpValue, const uno::Any } rStrExpValue = aOut.makeStringAndClear(); - return rStrExpValue.getLength() != 0; + return !rStrExpValue.isEmpty(); } /////////////////////////////////////////////////////////////////////////////// @@ -167,7 +167,7 @@ sal_Bool XMLCharHeightDiffHdl::exportXML( OUString& rStrExpValue, const uno::Any rStrExpValue = aOut.makeStringAndClear(); } - return rStrExpValue.getLength() != 0; + return !rStrExpValue.isEmpty(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx index 33b3dfafe872..36710a7df1d8 100644 --- a/xmloff/source/style/chrlohdl.cxx +++ b/xmloff/source/style/chrlohdl.cxx @@ -88,7 +88,7 @@ sal_Bool XMLCharLanguageHdl::exportXML( OUString& rStrExpValue, const uno::Any& rStrExpValue = aLocale.Language; - if( !rStrExpValue.getLength() ) + if( rStrExpValue.isEmpty() ) rStrExpValue = GetXMLToken( XML_NONE ); return sal_True; @@ -136,7 +136,7 @@ sal_Bool XMLCharCountryHdl::exportXML( OUString& rStrExpValue, const uno::Any& r rStrExpValue = aLocale.Country; - if( !rStrExpValue.getLength() ) + if( rStrExpValue.isEmpty() ) rStrExpValue = GetXMLToken( XML_NONE ); return sal_True; diff --git a/xmloff/source/style/csmaphdl.cxx b/xmloff/source/style/csmaphdl.cxx index b877e106ce4f..e6bda045a0be 100644 --- a/xmloff/source/style/csmaphdl.cxx +++ b/xmloff/source/style/csmaphdl.cxx @@ -133,7 +133,7 @@ sal_Bool XMLCaseMapVariantHdl::exportXML( OUString& rStrExpValue, const uno::Any } rStrExpValue = aOut.makeStringAndClear(); - return rStrExpValue.getLength() != 0; + return !rStrExpValue.isEmpty(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |