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

Fridrich Å trba fridrich.strba at bluewin.ch
Tue Jun 11 22:04:11 PDT 2013


 cppcanvas/source/inc/implrenderer.hxx         |    4 ++++
 cppcanvas/source/mtfrenderer/implrenderer.cxx |    2 ++
 vcl/source/filter/wmf/winmtf.cxx              |    7 +++++++
 3 files changed, 13 insertions(+)

New commits:
commit f387c5da5a824df6cf2874155c13445a86804475
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Jun 12 07:03:16 2013 +0200

    Pass also the bounding box in device units to the EMF+ part
    
    Change-Id: I71d3029d4b3aafdc44d82b0bd9db9a54f9b8b81f

diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx
index 79a2967..ae47ab8 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -295,6 +295,10 @@ static float GetSwapFloat( SvStream& rSt )
             sal_Int32       nHDPI;
             sal_Int32       nVDPI;
             /* EMF+ emf header info */
+            sal_Int32       nBoundsLeft;
+            sal_Int32       nBoundsTop;
+            sal_Int32       nBoundsRight;
+            sal_Int32       nBoundsBottom;
             sal_Int32       nFrameLeft;
             sal_Int32       nFrameTop;
             sal_Int32       nFrameRight;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 85a5cef..ca217d1 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1867,6 +1867,8 @@ namespace cppcanvas
 
                             SvMemoryStream rMF ((void*) pAct->GetData (), pAct->GetDataSize (), STREAM_READ);
 
+                            rMF >> nBoundsLeft >> nBoundsTop >> nBoundsRight >> nBoundsBottom;
+                            SAL_INFO ("cppcanvas.emf", "EMF+ picture bounds: " << nBoundsLeft << "," << nBoundsTop << " - " << nBoundsRight << "," << nBoundsBottom);
                             rMF >> nFrameLeft >> nFrameTop >> nFrameRight >> nFrameBottom;
                             SAL_INFO ("cppcanvas.emf", "EMF+ picture frame: " << nFrameLeft << "," << nFrameTop << " - " << nFrameRight << "," << nFrameBottom);
                             rMF >> nPixX >> nPixY >> nMmX >> nMmY;
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 42d605c..ac3fec1 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -2233,14 +2233,21 @@ void WinMtfOutput::PassEMFPlusHeaderInfo()
     EMFP_DEBUG(printf ("\t\t\tadd EMF_PLUS header info\n"));
 
     SvMemoryStream mem;
+    sal_Int32 nDevLeft, nDevRight, nDevTop, nDevBottom;
     sal_Int32 nLeft, nRight, nTop, nBottom;
 
+    nDevLeft = mrclBounds.Left();
+    nDevRight = mrclBounds.Right();
+    nDevTop = mrclBounds.Top();
+    nDevBottom = mrclBounds.Bottom();
+
     nLeft = mrclFrame.Left();
     nTop = mrclFrame.Top();
     nRight = mrclFrame.Right();
     nBottom = mrclFrame.Bottom();
 
     // emf header info
+    mem << nDevLeft << nDevTop << nDevRight << nDevBottom;
     mem << nLeft << nTop << nRight << nBottom;
     mem << mnPixX << mnPixY << mnMillX << mnMillY;
 


More information about the Libreoffice-commits mailing list