[Libreoffice-commits] core.git: svgio/source

Chr. Rossmanith ChrRossmanith at gmx.de
Tue Jun 18 08:09:26 PDT 2013


 svgio/source/svgreader/svgcharacternode.cxx   |   14 +++----
 svgio/source/svgreader/svgclippathnode.cxx    |    2 -
 svgio/source/svgreader/svgdocument.cxx        |    6 +--
 svgio/source/svgreader/svgdocumenthandler.cxx |   10 ++---
 svgio/source/svgreader/svggradientnode.cxx    |    6 +--
 svgio/source/svgreader/svgimagenode.cxx       |    8 ++--
 svgio/source/svgreader/svgmarkernode.cxx      |    2 -
 svgio/source/svgreader/svgmasknode.cxx        |    4 +-
 svgio/source/svgreader/svgnode.cxx            |   14 +++----
 svgio/source/svgreader/svgpatternnode.cxx     |    8 ++--
 svgio/source/svgreader/svgstyleattributes.cxx |   46 +++++++++++++-------------
 svgio/source/svgreader/svgstylenode.cxx       |    6 +--
 svgio/source/svgreader/svgtextpathnode.cxx    |    6 +--
 svgio/source/svgreader/svgtools.cxx           |    8 ++--
 14 files changed, 70 insertions(+), 70 deletions(-)

New commits:
commit f8d1dcc621b04fd17577905e9b1bdf71f33c7b57
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date:   Mon Jun 17 11:46:22 2013 +0200

    fdo#43460: Use isEmpty() instead of getLength() in svgio
    
    Change-Id: I31298a08408a14e1ae0d43b474681e6336b08003
    Reviewed-on: https://gerrit.libreoffice.org/4340
    Reviewed-by: Noel Power <noel.power at suse.com>
    Tested-by: Noel Power <noel.power at suse.com>

diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx
index 0d2d575..a30a89c 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -50,7 +50,7 @@ namespace svgio
             {
                 case SVGTokenX:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         SvgNumberVector aVector;
 
@@ -63,7 +63,7 @@ namespace svgio
                 }
                 case SVGTokenY:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         SvgNumberVector aVector;
 
@@ -76,7 +76,7 @@ namespace svgio
                 }
                 case SVGTokenDx:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         SvgNumberVector aVector;
 
@@ -89,7 +89,7 @@ namespace svgio
                 }
                 case SVGTokenDy:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         SvgNumberVector aVector;
 
@@ -102,7 +102,7 @@ namespace svgio
                 }
                 case SVGTokenRotate:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         SvgNumberVector aVector;
 
@@ -128,7 +128,7 @@ namespace svgio
                 }
                 case SVGTokenLengthAdjust:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrSpacing(OUString::createFromAscii("spacing"));
                         static OUString aStrSpacingAndGlyphs(OUString::createFromAscii("spacingAndGlyphs"));
@@ -572,7 +572,7 @@ namespace svgio
 
         void SvgCharacterNode::decomposeText(drawinglayer::primitive2d::Primitive2DSequence& rTarget, SvgTextPosition& rSvgTextPosition) const
         {
-            if(getText().getLength())
+            if(!getText().isEmpty())
             {
                 const SvgStyleAttributes* pSvgStyleAttributes = getSvgStyleAttributes();
 
diff --git a/svgio/source/svgreader/svgclippathnode.cxx b/svgio/source/svgreader/svgclippathnode.cxx
index f536f5e..c0858ce 100644
--- a/svgio/source/svgreader/svgclippathnode.cxx
+++ b/svgio/source/svgreader/svgclippathnode.cxx
@@ -79,7 +79,7 @@ namespace svgio
                 }
                 case SVGTokenClipPathUnits:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         if(aContent.match(commonStrings::aStrUserSpaceOnUse, 0))
                         {
diff --git a/svgio/source/svgreader/svgdocument.cxx b/svgio/source/svgreader/svgdocument.cxx
index 705df54..7a34e38 100644
--- a/svgio/source/svgreader/svgdocument.cxx
+++ b/svgio/source/svgreader/svgdocument.cxx
@@ -51,7 +51,7 @@ namespace svgio
 
         void SvgDocument::addSvgNodeToMapper(const OUString& rStr, const SvgNode& rNode)
         {
-            if(rStr.getLength())
+            if(!rStr.isEmpty())
             {
                 maIdTokenMapperList.insert(IdTokenValueType(rStr, &rNode));
             }
@@ -59,7 +59,7 @@ namespace svgio
 
         void SvgDocument::removeSvgNodeFromMapper(const OUString& rStr)
         {
-            if(rStr.getLength())
+            if(!rStr.isEmpty())
             {
                 maIdTokenMapperList.erase(rStr);
             }
@@ -81,7 +81,7 @@ namespace svgio
 
         void SvgDocument::addSvgStyleAttributesToMapper(const OUString& rStr, const SvgStyleAttributes& rSvgStyleAttributes)
         {
-            if(rStr.getLength())
+            if(!rStr.isEmpty())
             {
                 maIdStyleTokenMapperList.insert(IdStyleTokenValueType(rStr, &rSvgStyleAttributes));
             }
diff --git a/svgio/source/svgreader/svgdocumenthandler.cxx b/svgio/source/svgreader/svgdocumenthandler.cxx
index 3345f0b..f8637ea 100644
--- a/svgio/source/svgreader/svgdocumenthandler.cxx
+++ b/svgio/source/svgreader/svgdocumenthandler.cxx
@@ -76,7 +76,7 @@ namespace
 
                             // pCharNode may have lost all text. If that's the case, ignore
                             // as invalid character node
-                            if(pCharNode->getText().getLength())
+                            if(!pCharNode->getText().isEmpty())
                             {
                                 if(pLast)
                                 {
@@ -171,7 +171,7 @@ namespace svgio
 
         void SvgDocHdl::startElement( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs ) throw (xml::sax::SAXException, uno::RuntimeException)
         {
-            if(aName.getLength())
+            if(!aName.isEmpty())
             {
                 const SVGToken aSVGToken(StrToSVGToken(aName));
 
@@ -385,7 +385,7 @@ namespace svgio
 
         void SvgDocHdl::endElement( const OUString& aName ) throw (xml::sax::SAXException, uno::RuntimeException)
         {
-            if(aName.getLength())
+            if(!aName.isEmpty())
             {
                 const SVGToken aSVGToken(StrToSVGToken(aName));
                 SvgNode* pWhitespaceCheck(SVGTokenText == aSVGToken ? mpTarget : 0);
@@ -471,7 +471,7 @@ namespace svgio
                 {
                     const OUString aText(pSvgTitleDescNode->getText());
 
-                    if(aText.getLength())
+                    if(!aText.isEmpty())
                     {
                         if(SVGTokenTitle == aSVGToken)
                         {
@@ -551,7 +551,7 @@ namespace svgio
                             {
                                 const OUString aTrimmedChars(aChars.trim());
 
-                                if(aTrimmedChars.getLength())
+                                if(!aTrimmedChars.isEmpty())
                                 {
                                     std::vector< OUString >::iterator aString(maCssContents.end() - 1);
                                     (*aString) += aTrimmedChars;
diff --git a/svgio/source/svgreader/svggradientnode.cxx b/svgio/source/svgreader/svggradientnode.cxx
index 215ce39..b13971a 100644
--- a/svgio/source/svgreader/svggradientnode.cxx
+++ b/svgio/source/svgreader/svggradientnode.cxx
@@ -29,7 +29,7 @@ namespace svgio
     {
         void SvgGradientNode::tryToFindLink()
         {
-            if(!mpXLink && maXLink.getLength())
+            if(!mpXLink && !maXLink.isEmpty())
             {
                 mpXLink = dynamic_cast< const SvgGradientNode* >(getDocument().findSvgNodeById(maXLink));
             }
@@ -180,7 +180,7 @@ namespace svgio
                 }
                 case SVGTokenGradientUnits:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         if(aContent.match(commonStrings::aStrUserSpaceOnUse, 0))
                         {
@@ -195,7 +195,7 @@ namespace svgio
                 }
                 case SVGTokenSpreadMethod:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrPad(OUString::createFromAscii("pad"));
                         static OUString aStrReflect(OUString::createFromAscii("reflect"));
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx
index 31788f5..f47cf99 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -212,7 +212,7 @@ namespace svgio
                     const basegfx::B2DRange aTarget(fX, fY, fX + fWidth, fY + fHeight);
                     basegfx::B2DRange aViewBox(aTarget);
 
-                    if(maMimeType.getLength() && maData.getLength())
+                    if(!maMimeType.isEmpty() && !maData.isEmpty())
                     {
                         // use embedded base64 encoded data
                         ::com::sun::star::uno::Sequence< sal_Int8 > aPass;
@@ -232,12 +232,12 @@ namespace svgio
                             }
                         }
                     }
-                    else if(maUrl.getLength())
+                    else if(!maUrl.isEmpty())
                     {
                         const OUString& rPath = getDocument().getAbsolutePath();
                         const OUString aAbsUrl(rtl::Uri::convertRelToAbs(rPath, maUrl));
 
-                        if(aAbsUrl.getLength())
+                        if(!aAbsUrl.isEmpty())
                         {
                             SvFileStream aStream(aAbsUrl, STREAM_STD_READ);
                             Graphic aGraphic;
@@ -251,7 +251,7 @@ namespace svgio
                             }
                         }
                     }
-                    else if(maXLink.getLength())
+                    else if(!maXLink.isEmpty())
                     {
                         const SvgNode* mpXLink = getDocument().findSvgNodeById(maXLink);
 
diff --git a/svgio/source/svgreader/svgmarkernode.cxx b/svgio/source/svgreader/svgmarkernode.cxx
index fdbb8bd..94eb24a 100644
--- a/svgio/source/svgreader/svgmarkernode.cxx
+++ b/svgio/source/svgreader/svgmarkernode.cxx
@@ -107,7 +107,7 @@ namespace svgio
                 }
                 case SVGTokenMarkerUnits:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrStrokeWidth(OUString::createFromAscii("strokeWidth"));
 
diff --git a/svgio/source/svgreader/svgmasknode.cxx b/svgio/source/svgreader/svgmasknode.cxx
index d0f3f29..fc8e307 100644
--- a/svgio/source/svgreader/svgmasknode.cxx
+++ b/svgio/source/svgreader/svgmasknode.cxx
@@ -132,7 +132,7 @@ namespace svgio
                 }
                 case SVGTokenMaskUnits:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         if(aContent.match(commonStrings::aStrUserSpaceOnUse, 0))
                         {
@@ -147,7 +147,7 @@ namespace svgio
                 }
                 case SVGTokenMaskContentUnits:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         if(aContent.match(commonStrings::aStrUserSpaceOnUse, 0))
                         {
diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx
index 7cb7487..3bc092d 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -67,7 +67,7 @@ namespace svgio
                             aId = aId + aOUTokenValue;
                             pNew = rDocument.findSvgStyleAttributesById(aId);
 
-                            if(!pNew && rClassStr.getLength())
+                            if(!pNew && !rClassStr.isEmpty())
                             {
                                 // look for CSS style common to class.token
                                 aId = rClassStr + aId;
@@ -93,7 +93,7 @@ namespace svgio
                         }
                     }
 
-                    if(maCssStyleVector.empty() && rClassStr.getLength())
+                    if(maCssStyleVector.empty() && !rClassStr.isEmpty())
                     {
                         // if none found, search for CSS style equal to class type
                         const SvgStyleAttributes* pNew = rDocument.findSvgStyleAttributesById(rClassStr);
@@ -326,7 +326,7 @@ namespace svgio
             {
                 case SVGTokenId:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         setId(&aContent);
                     }
@@ -334,7 +334,7 @@ namespace svgio
                 }
                 case SVGTokenClass:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         setClass(&aContent);
                     }
@@ -342,7 +342,7 @@ namespace svgio
                 }
                 case SVGTokenXmlSpace:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrDefault(OUString::createFromAscii("default"));
                         static OUString aStrPreserve(OUString::createFromAscii("preserve"));
@@ -443,7 +443,7 @@ namespace svgio
                         const OUString& rTitle = pStyles->getTitle();
                         const OUString& rDesc = pStyles->getDesc();
 
-                        if(rTitle.getLength() || rDesc.getLength())
+                        if(!rTitle.isEmpty() || !rDesc.isEmpty())
                         {
                             // default object name is empty
                             OUString aObjectName;
@@ -453,7 +453,7 @@ namespace svgio
                             {
                                 aObjectName = getDocument().getAbsolutePath();
 
-                                if(aObjectName.getLength())
+                                if(!aObjectName.isEmpty())
                                 {
                                     INetURLObject aURL(aObjectName);
 
diff --git a/svgio/source/svgreader/svgpatternnode.cxx b/svgio/source/svgreader/svgpatternnode.cxx
index 522f024..dd40639 100644
--- a/svgio/source/svgreader/svgpatternnode.cxx
+++ b/svgio/source/svgreader/svgpatternnode.cxx
@@ -28,7 +28,7 @@ namespace svgio
     {
         void SvgPatternNode::tryToFindLink()
         {
-            if(!mpXLink && maXLink.getLength())
+            if(!mpXLink && !maXLink.isEmpty())
             {
                 mpXLink = dynamic_cast< const SvgPatternNode* >(getDocument().findSvgNodeById(maXLink));
             }
@@ -147,7 +147,7 @@ namespace svgio
                 }
                 case SVGTokenPatternUnits:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         if(aContent.match(commonStrings::aStrUserSpaceOnUse, 0))
                         {
@@ -162,7 +162,7 @@ namespace svgio
                 }
                 case SVGTokenPatternContentUnits:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         if(aContent.match(commonStrings::aStrUserSpaceOnUse, 0))
                         {
@@ -274,7 +274,7 @@ namespace svgio
                 decomposeSvgNode(const_cast< SvgPatternNode* >(this)->aPrimitives, true);
             }
 
-            if(!aPrimitives.hasElements() && maXLink.getLength())
+            if(!aPrimitives.hasElements() && !maXLink.isEmpty())
             {
                 const_cast< SvgPatternNode* >(this)->tryToFindLink();
 
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index b7a128b..c8dc5c4 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -183,7 +183,7 @@ namespace svgio
                 OUStringBuffer aTokenName;
                 copyString(rCandidate, nPos, aTokenName, nLen);
 
-                if(aTokenName.getLength())
+                if(!aTokenName.isEmpty())
                 {
                     skip_char(rCandidate, sal_Unicode(' '), sal_Unicode(':'), nPos, nLen);
                     OUStringBuffer aTokenValue;
@@ -1085,7 +1085,7 @@ namespace svgio
                     aSource = drawinglayer::primitive2d::Primitive2DSequence(&xRef, 1);
                 }
 
-                if(getClipPathXLink().getLength())
+                if(!getClipPathXLink().isEmpty())
                 {
                     // try to access linked ClipPath
                     const SvgClipPathNode* mpClip = dynamic_cast< const SvgClipPathNode* >(mrOwner.getDocument().findSvgNodeById(getClipPathXLink()));
@@ -1098,7 +1098,7 @@ namespace svgio
 
                 if(aSource.hasElements()) // test again, applied clipPath may have lead to empty geometry
                 {
-                    if(getMaskXLink().getLength())
+                    if(!getMaskXLink().isEmpty())
                     {
                         // try to access linked Mask
                         const SvgMaskNode* mpMask = dynamic_cast< const SvgMaskNode* >(mrOwner.getDocument().findSvgNodeById(getMaskXLink()));
@@ -1193,7 +1193,7 @@ namespace svgio
                     {
                         setFill(aSvgPaint);
                     }
-                    else if(aURL.getLength())
+                    else if(!aURL.isEmpty())
                     {
                         const SvgNode* pNode = mrOwner.getDocument().findSvgNodeById(aURL);
 
@@ -1226,7 +1226,7 @@ namespace svgio
                 }
                 case SVGTokenFillRule:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         if(aContent.match(commonStrings::aStrNonzero))
                         {
@@ -1248,7 +1248,7 @@ namespace svgio
                     {
                         setStroke(aSvgPaint);
                     }
-                    else if(aURL.getLength())
+                    else if(!aURL.isEmpty())
                     {
                         const SvgNode* pNode = mrOwner.getDocument().findSvgNodeById(aURL);
 
@@ -1268,7 +1268,7 @@ namespace svgio
                 }
                 case SVGTokenStrokeDasharray:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static rtl::OUString aStrNone(rtl::OUString::createFromAscii("none"));
                         SvgNumberVector aVector;
@@ -1303,7 +1303,7 @@ namespace svgio
                 }
                 case SVGTokenStrokeLinecap:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrButt(OUString::createFromAscii("butt"));
                         static OUString aStrRound(OUString::createFromAscii("round"));
@@ -1326,7 +1326,7 @@ namespace svgio
                 }
                 case SVGTokenStrokeLinejoin:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrMiter(OUString::createFromAscii("miter"));
                         static OUString aStrRound(OUString::createFromAscii("round"));
@@ -1440,7 +1440,7 @@ namespace svgio
                 }
                 case SVGTokenFontStretch:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrNormal(OUString::createFromAscii("normal"));
                         static OUString aStrWider(OUString::createFromAscii("wider"));
@@ -1503,7 +1503,7 @@ namespace svgio
                 }
                 case SVGTokenFontStyle:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrNormal(OUString::createFromAscii("normal"));
                         static OUString aStrItalic(OUString::createFromAscii("italic"));
@@ -1526,7 +1526,7 @@ namespace svgio
                 }
                 case SVGTokenFontVariant:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrNormal(OUString::createFromAscii("normal"));
                         static OUString aStrSmallCaps(OUString::createFromAscii("small-caps"));
@@ -1544,7 +1544,7 @@ namespace svgio
                 }
                 case SVGTokenFontWeight:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrNormal(OUString::createFromAscii("normal"));
                         static OUString aStrBold(OUString::createFromAscii("bold"));
@@ -1617,7 +1617,7 @@ namespace svgio
                 }
                 case SVGTokenTextDecoration:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrNone(OUString::createFromAscii("none"));
                         static OUString aStrUnderline(OUString::createFromAscii("underline"));
@@ -1658,7 +1658,7 @@ namespace svgio
                 }
                 case SVGTokenTextAnchor:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrStart(OUString::createFromAscii("start"));
                         static OUString aStrMiddle(OUString::createFromAscii("middle"));
@@ -1681,7 +1681,7 @@ namespace svgio
                 }
                 case SVGTokenTextAlign:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrLeft(OUString::createFromAscii("left"));
                         static OUString aStrRight(OUString::createFromAscii("right"));
@@ -1750,7 +1750,7 @@ namespace svgio
                 }
                 case SVGTokenClipRule:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         if(aContent.match(commonStrings::aStrNonzero))
                         {
@@ -2426,7 +2426,7 @@ namespace svgio
 
         OUString SvgStyleAttributes::getMarkerStartXLink() const
         {
-            if(maMarkerStartXLink.getLength())
+            if(!maMarkerStartXLink.isEmpty())
             {
                 return maMarkerStartXLink;
             }
@@ -2447,7 +2447,7 @@ namespace svgio
             {
                 const OUString aMarker(getMarkerStartXLink());
 
-                if(aMarker.getLength())
+                if(!aMarker.isEmpty())
                 {
                     const_cast< SvgStyleAttributes* >(this)->mpMarkerStartXLink = dynamic_cast< const SvgMarkerNode* >(mrOwner.getDocument().findSvgNodeById(getMarkerStartXLink()));
                 }
@@ -2458,7 +2458,7 @@ namespace svgio
 
         OUString SvgStyleAttributes::getMarkerMidXLink() const
         {
-            if(maMarkerMidXLink.getLength())
+            if(!maMarkerMidXLink.isEmpty())
             {
                 return maMarkerMidXLink;
             }
@@ -2479,7 +2479,7 @@ namespace svgio
             {
                 const OUString aMarker(getMarkerMidXLink());
 
-                if(aMarker.getLength())
+                if(!aMarker.isEmpty())
                 {
                     const_cast< SvgStyleAttributes* >(this)->mpMarkerMidXLink = dynamic_cast< const SvgMarkerNode* >(mrOwner.getDocument().findSvgNodeById(getMarkerMidXLink()));
                 }
@@ -2490,7 +2490,7 @@ namespace svgio
 
         OUString SvgStyleAttributes::getMarkerEndXLink() const
         {
-            if(maMarkerEndXLink.getLength())
+            if(!maMarkerEndXLink.isEmpty())
             {
                 return maMarkerEndXLink;
             }
@@ -2511,7 +2511,7 @@ namespace svgio
             {
                 const OUString aMarker(getMarkerEndXLink());
 
-                if(aMarker.getLength())
+                if(!aMarker.isEmpty())
                 {
                     const_cast< SvgStyleAttributes* >(this)->mpMarkerEndXLink = dynamic_cast< const SvgMarkerNode* >(mrOwner.getDocument().findSvgNodeById(getMarkerEndXLink()));
                 }
diff --git a/svgio/source/svgreader/svgstylenode.cxx b/svgio/source/svgreader/svgstylenode.cxx
index 13d5085..8ee7aaf 100644
--- a/svgio/source/svgreader/svgstylenode.cxx
+++ b/svgio/source/svgreader/svgstylenode.cxx
@@ -54,7 +54,7 @@ namespace svgio
             {
                 case SVGTokenType:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrTextCss(OUString::createFromAscii("text/css"));
 
@@ -88,14 +88,14 @@ namespace svgio
                     copyToLimiter(aContent, sal_Unicode('{'), nPos, aTokenValue, nLen);
                     const OUString aStyleName = aTokenValue.makeStringAndClear().trim();
 
-                    if(aStyleName.getLength() && nPos < nLen)
+                    if(!aStyleName.isEmpty() && nPos < nLen)
                     {
                         skip_char(aContent, sal_Unicode(' '), sal_Unicode('{'), nPos, nLen);
                         copyToLimiter(aContent, sal_Unicode('}'), nPos, aTokenValue, nLen);
                         skip_char(aContent, sal_Unicode(' '), sal_Unicode('}'), nPos, nLen);
                         const OUString aStyleContent = aTokenValue.makeStringAndClear().trim();
 
-                        if(aStyleContent.getLength())
+                        if(!aStyleContent.isEmpty())
                         {
                             // create new style
                             SvgStyleAttributes* pNewStyle = new SvgStyleAttributes(*this);
diff --git a/svgio/source/svgreader/svgtextpathnode.cxx b/svgio/source/svgreader/svgtextpathnode.cxx
index e01c70b..7738fac 100644
--- a/svgio/source/svgreader/svgtextpathnode.cxx
+++ b/svgio/source/svgreader/svgtextpathnode.cxx
@@ -159,7 +159,7 @@ namespace svgio
                     const OUString aTrimmedChars(aText.copy(nIndex, nLength).trim());
                     const double fEndPos(mfPosition + fSnippetWidth);
 
-                    if(aTrimmedChars.getLength() && (mfPosition < mfBasegfxPathLength || fEndPos > 0.0))
+                    if(!aTrimmedChars.isEmpty() && (mfPosition < mfBasegfxPathLength || fEndPos > 0.0))
                     {
                         const double fHalfSnippetWidth(fSnippetWidth * 0.5);
 
@@ -300,7 +300,7 @@ namespace svgio
                 }
                 case SVGTokenMethod:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrAlign(OUString::createFromAscii("align"));
                         static OUString aStrStretch(OUString::createFromAscii("stretch"));
@@ -318,7 +318,7 @@ namespace svgio
                 }
                 case SVGTokenSpacing:
                 {
-                    if(aContent.getLength())
+                    if(!aContent.isEmpty())
                     {
                         static OUString aStrAuto(OUString::createFromAscii("auto"));
                         static OUString aStrExact(OUString::createFromAscii("exact"));
diff --git a/svgio/source/svgreader/svgtools.cxx b/svgio/source/svgreader/svgtools.cxx
index 8e107a7..2b89f0d 100644
--- a/svgio/source/svgreader/svgtools.cxx
+++ b/svgio/source/svgreader/svgtools.cxx
@@ -384,7 +384,7 @@ namespace svgio
                     }
                 }
 
-                if(aNum.getLength())
+                if(!aNum.isEmpty())
                 {
                     rtl_math_ConversionStatus eStatus;
 
@@ -1248,7 +1248,7 @@ namespace svgio
                     OUStringBuffer aTokenName;
                     copyString(rCandidate, nPos, aTokenName, nLen);
 
-                    if(aTokenName.getLength())
+                    if(!aTokenName.isEmpty())
                     {
                         switch(StrToSVGToken(aTokenName.makeStringAndClear()))
                         {
@@ -1370,7 +1370,7 @@ namespace svgio
                     skip_char(rCandidate, sal_Unicode(','), sal_Unicode(' '), nPos, nLen);
                     const OUString aString = aTokenValue.makeStringAndClear();
 
-                    if(aString.getLength())
+                    if(!aString.isEmpty())
                     {
                         rSvgStringVector.push_back(aString);
                     }
@@ -1406,7 +1406,7 @@ namespace svgio
                     skip_char(rCandidate, sal_Unicode(' '), sal_Unicode(';'), nPos, nLen);
                     rMimeType = aBuffer.makeStringAndClear();
 
-                    if(rMimeType.getLength() && nPos < nLen)
+                    if(!rMimeType.isEmpty() && nPos < nLen)
                     {
                         static OUString aStrImage(OUString::createFromAscii("image"));
 


More information about the Libreoffice-commits mailing list