Kaydet (Commit) 82a1d75e authored tarafından Chr. Rossmanith's avatar Chr. Rossmanith Kaydeden (comit) Markus Mohrhard

fdo#43460: Use isEmpty() instead of getLength() in svgio

Change-Id: I65beeb09285553177a160e260d606e6ba3f1c023
Reviewed-on: https://gerrit.libreoffice.org/4641Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 07010b8e
...@@ -1199,7 +1199,7 @@ namespace svgio ...@@ -1199,7 +1199,7 @@ namespace svgio
if(pNode) if(pNode)
{ {
if(SVGTokenLinearGradient == pNode->getType() || SVGTokenRadialGradient == pNode->getType()) if(SVGTokenLinearGradient == pNode->getType() || SVGTokenRadialGradient == pNode->getType())
{ {
setSvgGradientNodeFill(static_cast< const SvgGradientNode* >(pNode)); setSvgGradientNodeFill(static_cast< const SvgGradientNode* >(pNode));
} }
...@@ -1790,7 +1790,7 @@ namespace svgio ...@@ -1790,7 +1790,7 @@ namespace svgio
// style="display:none" // style="display:none"
// taken from a svg example; this needs to be parsed and set at the owning node. Do not call // taken from a svg example; this needs to be parsed and set at the owning node. Do not call
// mrOwner.parseAttribute(...) here, this would lead to a recursion // mrOwner.parseAttribute(...) here, this would lead to a recursion
if(aContent.getLength()) if(!aContent.isEmpty())
{ {
mrOwner.setDisplay(getDisplayFromContent(aContent)); mrOwner.setDisplay(getDisplayFromContent(aContent));
} }
...@@ -1798,7 +1798,7 @@ namespace svgio ...@@ -1798,7 +1798,7 @@ namespace svgio
} }
case SVGTokenBaselineShift: case SVGTokenBaselineShift:
{ {
if(aContent.getLength()) if(!aContent.isEmpty())
{ {
static rtl::OUString aStrSub(rtl::OUString::createFromAscii("sub")); static rtl::OUString aStrSub(rtl::OUString::createFromAscii("sub"));
static rtl::OUString aStrSuper(rtl::OUString::createFromAscii("super")); static rtl::OUString aStrSuper(rtl::OUString::createFromAscii("super"));
......
...@@ -1169,9 +1169,7 @@ namespace svgio ...@@ -1169,9 +1169,7 @@ namespace svgio
bool readSvgPaint(const OUString& rCandidate, SvgPaint& rSvgPaint, OUString& rURL) bool readSvgPaint(const OUString& rCandidate, SvgPaint& rSvgPaint, OUString& rURL)
{ {
const sal_Int32 nLen(rCandidate.getLength()); if( !rCandidate.isEmpty() )
if(nLen)
{ {
basegfx::BColor aColor; basegfx::BColor aColor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment