summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorBartosz Kosiorek <gang65@poczta.onet.pl>2018-11-06 00:43:53 +0100
committerBartosz Kosiorek <gang65@poczta.onet.pl>2018-11-08 20:59:41 +0100
commit1873ba08d82efdc228462d839e16c802ffb6cfa3 (patch)
tree7f32fae72ba2cec04c8042f6158d4c9cda234f4d /drawinglayer
parent97abda34fa0e3501f291cceb8b03ccc98e2b9845 (diff)
tdf#113624 EMF+ Fix shift of DrawString without StringFormat
While we are drawing DrawString record, in most cases optional StringFormat information is available. If StringFromat information is available then we should use default values. For LeadingMargin for String the default value is 1/6 inch. Change-Id: I4a0a68df5ebe74e810f8b5864232b477b3aac255 Reviewed-on: https://gerrit.libreoffice.org/62927 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/tools/emfphelperdata.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index dd95f2fb6027..5f35ef931682 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -1320,7 +1320,6 @@ namespace emfplushelper
break;
}
mrPropertyHolders.Current().setFont(vcl::Font(font->family, Size(font->emSize, font->emSize)));
- // done reading
const OUString emptyString;
drawinglayer::attribute::FontAttribute fontAttribute(
@@ -1359,6 +1358,10 @@ namespace emfplushelper
}
else
{
+ // By default LeadingMargin is 1/6 inch
+ // TODO for typographic fonts set value to 0.
+ stringAlignmentHorizontalOffset = 16.0;
+
// use system default
locale = Application::GetSettings().GetLanguageTag().getLocale();
}