[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svgio/source

2014-07-15 Thread Joren De Cuyper
 svgio/source/svgreader/svgsvgnode.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 763e3855caacbfc4818e70464bca348de10fbc3d
Author: Joren De Cuyper jore...@libreoffice.org
Date:   Mon Jul 14 17:57:06 2014 +0200

fdo#78554 - SVG: Text from SVG no longer displayed in LibreOffice

regression of 3b7472b284131c09d91b69f26d5d26d54648f939

Change-Id: I95a30acbf4b2684dda9684f5b51b887356a940e1
Reviewed-on: https://gerrit.libreoffice.org/10304
Reviewed-by: Tomaž Vajngerl qui...@gmail.com
Tested-by: Tomaž Vajngerl qui...@gmail.com

diff --git a/svgio/source/svgreader/svgsvgnode.cxx 
b/svgio/source/svgreader/svgsvgnode.cxx
index cde5387..f85318b 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -60,8 +60,13 @@ namespace svgio
 
 const SvgStyleAttributes* SvgSvgNode::getSvgStyleAttributes() const
 {
-checkForCssStyle(OUString(svg), maSvgStyleAttributes);
-return maSvgStyleAttributes.getCssStyleParent();
+const SvgStyleAttributes* aCheckCssStyle = 
checkForCssStyle(OUString(svg), maSvgStyleAttributes);
+const SvgStyleAttributes* aGetCssStyleParent = 
maSvgStyleAttributes.getCssStyleParent();
+
+if (aGetCssStyleParent == NULL)
+return aCheckCssStyle;
+
+return aGetCssStyleParent;
 }
 
 void SvgSvgNode::parseAttribute(const OUString rTokenName, SVGToken 
aSVGToken, const OUString aContent)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svgio/source

2014-04-16 Thread Tomaž Vajngerl
 svgio/source/svgreader/svgstyleattributes.cxx |   16 +++-
 svgio/source/svgreader/svgsvgnode.cxx |3 ++-
 2 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 8d15b2c3dbad718782d3923ece0eb6816beafab0
Author: Tomaž Vajngerl tomaz.vajng...@collabora.com
Date:   Wed Apr 16 09:40:29 2014 +0200

fdo#74743 avoid infinite loop when gathering svg element styles

Change-Id: Ifcfd0c64302b9174510e3d774607f5ca60173885
Signed-off-by: Andras Timar andras.ti...@collabora.com

diff --git a/svgio/source/svgreader/svgstyleattributes.cxx 
b/svgio/source/svgreader/svgstyleattributes.cxx
index ecddfbf..0fae736 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -205,17 +205,15 @@ namespace svgio
 
 const SvgStyleAttributes* SvgStyleAttributes::getParentStyle() const
 {
-if(getCssStyleParent())
-{
-return getCssStyleParent();
-}
+const SvgStyleAttributes* pParentStyle = getCssStyleParent();
 
-if(mrOwner.getParent())
-{
-return mrOwner.getParent()-getSvgStyleAttributes();
-}
+// no parent style set, check parent for its style attributes
+if(pParentStyle == NULL  mrOwner.getParent() != NULL)
+   pParentStyle = mrOwner.getParent()-getSvgStyleAttributes();
 
-return 0;
+if (pParentStyle != this) // to prevent infinite loop
+return pParentStyle;
+return NULL;
 }
 
 void SvgStyleAttributes::add_text(
diff --git a/svgio/source/svgreader/svgsvgnode.cxx 
b/svgio/source/svgreader/svgsvgnode.cxx
index 8e107c6..cde5387 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -60,7 +60,8 @@ namespace svgio
 
 const SvgStyleAttributes* SvgSvgNode::getSvgStyleAttributes() const
 {
-return checkForCssStyle(OUString(svg), maSvgStyleAttributes);
+checkForCssStyle(OUString(svg), maSvgStyleAttributes);
+return maSvgStyleAttributes.getCssStyleParent();
 }
 
 void SvgSvgNode::parseAttribute(const OUString rTokenName, SVGToken 
aSVGToken, const OUString aContent)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svgio/source

2014-02-28 Thread Stephan Bergmann
 svgio/source/svgreader/svgimagenode.cxx |   14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit f1e3e9e514aa90ff4d8234801d86b317b6bc5d24
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Feb 28 17:43:23 2014 +0100

fdo#75582: Handle MalformedUriException

Cherry-picks from master 29c3bb0968cb9770f7b822f5cf466314be9db825 Handle
vnd.sun.star.Package: URLs provoking MalrformedUriException,
eaa876e48695e7927563ee56a08e11acb0036e4a typo in comment, and
33ca98314133a93e71edb1a003fe8ddb7b36e8a9 Catching MalformedUriException
subsumes the rPath.isEmpty() case now, which are based on master-only
87432aeecdfa7194bb5050f912656e03294cf6c7 Resolves: #i123042# corrected 
reload
of linked content... but which is not needed to fix this issue.

Conflicts:
svgio/source/svgreader/svgimagenode.cxx

Change-Id: I68ea3410be2f758c869ef284718ccf139f1c9b78
Reviewed-on: https://gerrit.libreoffice.org/8399
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svgio/source/svgreader/svgimagenode.cxx 
b/svgio/source/svgreader/svgimagenode.cxx
index 30300e0..8542b65 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -235,7 +235,19 @@ namespace svgio
 else if(!maUrl.isEmpty())
 {
 const OUString rPath = 
getDocument().getAbsolutePath();
-const OUString 
aAbsUrl(rtl::Uri::convertRelToAbs(rPath, maUrl));
+OUString aAbsUrl;
+try {
+aAbsUrl = rtl::Uri::convertRelToAbs(rPath, maUrl);
+} catch (rtl::MalformedUriException  e) {
+// Happens for the odd rPath =
+// vnd.sun.star.Package:Pictures/... scheme using
+// path components not starting with a slash by 
mis-
+// design:
+SAL_INFO(
+svg,
+caught rtl::MalformedUriException \
+ e.getMessage()  \);
+}
 
 if(!aAbsUrl.isEmpty())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits