summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-08-03 13:39:20 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-08-03 15:00:22 +0200
commitc88ff9298b25132fc34102230cef0263f045a523 (patch)
treead0c86c0b5965a065056dccf683e6bc64799c665 /drawinglayer
parente6671ea1ceb9e6925ef396156c922a62ded19461 (diff)
tdf#142436 svx: fix handling of linked background images
Regression from commit 9fb7aaf570c03c8a26d763f1205fb8c890e8211a (Make linked graphic register into LinkedManager again, 2018-04-13), the problem was that now SvXMLImport::loadGraphicByURL() produces a Graphic that has its type set to GraphicType::Default, but when drawinglayer::primitive2d::createNewSdrFillGraphicAttribute() consumes this graphic, it expects that the type is either a bitmap or a metafile. Fix the problem by explicitly loading the image when the default-type, origin-url-set case happens: this is rendering, so no problem to load the URL and that will give us the expected graphic type. This is also meant to keep the original problem fixed, since the Graphic that is part of the doc model is unchanged. Change-Id: If5bba09faa23ef35f99152d4b5d30cd9cf67ace8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119935 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/tools/primitive2dxmldump.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx
index d48115baafa6..a78b4a894e7a 100644
--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
+++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
@@ -422,7 +422,9 @@ void Primitive2dXmlDump::decomposeAndWrite(
}
rWriter.attribute("x", aTranslate.getX());
rWriter.attribute("y", aTranslate.getY());
- rWriter.attribute("text", rTextSimplePortionPrimitive2D.getText());
+ OUString aText = rTextSimplePortionPrimitive2D.getText();
+ // TODO share code with sax_fastparser::FastSaxSerializer::write().
+ rWriter.attribute("text", aText.replaceAll("", "&#9;"));
rWriter.attribute("fontcolor", convertColorToString(
rTextSimplePortionPrimitive2D.getFontColor()));