[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - drawinglayer/source vcl/source

Armin Le Grand alg at apache.org
Wed Apr 23 13:08:05 PDT 2014


 drawinglayer/source/primitive2d/metafileprimitive2d.cxx |    7 ++++++-
 vcl/source/gdi/font.cxx                                 |    6 ++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 7ce0a0a7680255159beae7726ec63d539ef0c7f9
Author: Armin Le Grand <alg at apache.org>
Date:   Wed Apr 23 16:20:16 2014 +0000

    i124686 reuse already set font for interpreting the MetaFile action META_TEXTRECT_ACTION correctly

diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index de67a51..412e4d2 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -2127,8 +2127,13 @@ namespace
                             drawinglayer::primitive2d::Primitive2DSequence xSubContent;
                             {
                                 rTargetHolders.Push();
-                                // #i# for sub-Mteafile contents, do start with new, default render state
+
+                                // for sub-Mteafile contents, do start with new, default render state
+                                // #124686# ...but copy font, this is already set accordingly
+                                const Font& rTargetFont = rPropertyHolders.Current().getFont();
                                 rPropertyHolders.PushDefault();
+                                rPropertyHolders.Current().setFont(rTargetFont);
+
                                 interpretMetafile(aGDIMetaFile, rTargetHolders, rPropertyHolders, rViewInformation);
                                 xSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current());
                                 rPropertyHolders.Pop();
commit 4a7c54e07713f02a5658471e4aa9163de53f7460
Author: Armin Le Grand <alg at apache.org>
Date:   Wed Apr 23 16:19:30 2014 +0000

    i124686 give empty constructed default font a default height

diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index 1826c92..6972467 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -74,6 +74,12 @@ Impl_Font::Impl_Font() :
     mbVertical          = false;
     mbTransparent       = true;
     mbConfigLookup      = false;
+
+    // #124686# the Size is defaulted to (0,0) when default constructed,
+    // this is not useful for a default font. Init it to a useful default
+    // so that the Font::Font() constructor which uses a 'naked' static
+    // Impl_Font instance (aStaticImplFont) creates a useful default font
+    maSize = Size(0, 16);
 }
 
 // -----------------------------------------------------------------------


More information about the Libreoffice-commits mailing list