[Libreoffice-commits] core.git: 2 commits - drawinglayer/source vcl/source

Armin Le Grand alg at apache.org
Thu Apr 24 07:03:59 PDT 2014


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

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

    Resolves: #i124686# reuse already set font for interpreting...
    
    the MetaFile action META_TEXTRECT_ACTION correctly
    
    (cherry picked from commit 7ce0a0a7680255159beae7726ec63d539ef0c7f9)
    
    Change-Id: If802a58ae0fb38292d5a875d85448cc2c3967066

diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index ab098ad..46d4467 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -2116,8 +2116,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
+                                // #i124686# ...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 121aac37673c1a8142db01e26e50be6de7b36987
Author: Armin Le Grand <alg at apache.org>
Date:   Wed Apr 23 16:19:30 2014 +0000

    Related: #i124686# give empty constructed default font a default height
    
    (cherry picked from commit 4a7c54e07713f02a5658471e4aa9163de53f7460)
    
    Change-Id: Iaff17eb95d1ad1e1b9bca4388b03703899d9a0db

diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index 489304e..60230e3 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -63,6 +63,12 @@ Impl_Font::Impl_Font() :
     mbVertical          = false;
     mbTransparent       = true;
     mbConfigLookup      = false;
+
+    // #i124686# 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);
 }
 
 Impl_Font::Impl_Font( const Impl_Font& rImplFont )


More information about the Libreoffice-commits mailing list