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

Chr. Rossmanith ChrRossmanith at gmx.de
Sun Oct 5 12:57:55 PDT 2014


 svgio/source/svgreader/svgnode.cxx      |    4 ++--
 svgio/source/svgreader/svgstylenode.cxx |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 48381e5c2e0a6dc0ad7c3827d988e1010e3f301a
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date:   Fri Oct 3 21:47:56 2014 +0200

    use isEmpty() instead of getLength() where appropriate
    
    Change-Id: I87bb3473af631dc321c5a8c2b06b0b5ccdf8e73b
    Reviewed-on: https://gerrit.libreoffice.org/11813
    Reviewed-by: Christina Roßmanith <ChrRossmanith at web.de>
    Tested-by: Christina Roßmanith <ChrRossmanith at web.de>

diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx
index b68d083..3e85aed 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -135,7 +135,7 @@ namespace svgio
                 }
 
                 // check for class-dependent references to CssStyles
-                if(rClassStr.getLength())
+                if(!rClassStr.isEmpty())
                 {
                     OUString aNewConcatenated(aConcatenated);
 
@@ -213,7 +213,7 @@ namespace svgio
             {
                 // #i125293# rOriginal will be the last element in the linked list; use no CssStyleParent
                 // there (reset it) to ensure that the parent hierarchy will be used when it's base
-                // is referenced. This new chaning inserts the CssStyles before the original style,
+                // is referenced. This new chaining inserts the CssStyles before the original style,
                 // this makes the whole process much safer since the original style when used will
                 // be not different to the situation without CssStyles; thus loops which may be caused
                 // by trying to use the parent hierarchy of the owner of the style will be avoided
diff --git a/svgio/source/svgreader/svgstylenode.cxx b/svgio/source/svgreader/svgstylenode.cxx
index c9c455e..bca95c6 100644
--- a/svgio/source/svgreader/svgstylenode.cxx
+++ b/svgio/source/svgreader/svgstylenode.cxx
@@ -85,7 +85,7 @@ namespace svgio
         {
             // aSelectors: CssStyle selectors, any combination, no comma separations, no spaces at start/end
             // rNewStyle: the already preapared style to register on that name
-            if(aSelectors.getLength())
+            if(!aSelectors.isEmpty())
             {
                 std::vector< OUString > aSelectorParts;
                 const sal_Int32 nLen(aSelectors.getLength());
@@ -100,7 +100,7 @@ namespace svgio
                     skip_char(aSelectors, sal_Unicode(' '), nPos, nLen);
                     const OUString aSelectorPart(aToken.makeStringAndClear().trim());
 
-                    if(aSelectorPart.getLength())
+                    if(!aSelectorPart.isEmpty())
                     {
                         aSelectorParts.push_back(aSelectorPart);
                     }
@@ -147,7 +147,7 @@ namespace svgio
         {
             // aSelectors: possible comma-separated list of CssStyle definitions, no spaces at start/end
             // aContent: the svg style definitions as string
-            if(aSelectors.getLength() && aContent.getLength())
+            if(!aSelectors.isEmpty() && !aContent.isEmpty())
             {
                 // create new style and add to local list (for ownership control)
                 SvgStyleAttributes* pNewStyle = new SvgStyleAttributes(*this);
@@ -203,7 +203,7 @@ namespace svgio
                     const OUString aSelectors(aToken.makeStringAndClear().trim());
                     OUString aContent;
 
-                    if(aSelectors.getLength() && nPos < nLen)
+                    if(!aSelectors.isEmpty() && nPos < nLen)
                     {
                         // isolate content as text, embraced by '{' and '}'
                         copyToLimiter(aSelectorsAndContent, sal_Unicode('}'), nPos, aToken, nLen);
@@ -212,7 +212,7 @@ namespace svgio
                         aContent = aToken.makeStringAndClear().trim();
                     }
 
-                    if(aSelectors.getLength() && aContent.getLength())
+                    if(!aSelectors.isEmpty() && !aContent.isEmpty())
                     {
                         addCssStyleSheet(aSelectors, aContent);
                     }


More information about the Libreoffice-commits mailing list