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

2020-12-29 Thread Noel Grandin (via logerrit)
 cppcanvas/source/mtfrenderer/implrenderer.cxx |2 +-
 vcl/source/gdi/pdfwriter_impl.cxx |2 +-
 vcl/source/gdi/sallayout.cxx  |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 388c0893a2defa4296fbad31c2add980079b4fee
Author: Noel Grandin 
AuthorDate: Mon Dec 28 21:09:22 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 29 19:10:41 2020 +0100

use new toRadians function in more places

Change-Id: Id9da8dadab277b62053071a59813d7a4bd38f345
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108432
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index eea91a021e6b..bf93f6bf2e3e 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -574,7 +574,7 @@ namespace cppcanvas::internal
 const ::basegfx::B2DVector aOffset(
 rGradient.GetOfsX() / 100.0,
 rGradient.GetOfsY() / 100.0);
-double fRotation( rGradient.GetAngle().get() * M_PI / 
1800.0 );
+double fRotation = toRadians( rGradient.GetAngle() );
 const double fBorder( rGradient.GetBorder() / 100.0 );
 
 basegfx::B2DHomMatrix aRot90;
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 3ba778e09d49..cb1efa987c60 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6065,7 +6065,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const 
OUString& rText, bool
 while( nAngle < 0_deg10 )
 nAngle += 3600_deg10;
 nAngle = nAngle % 3600_deg10;
-double fAngle = static_cast(nAngle.get()) * M_PI / 1800.0;
+double fAngle = toRadians(nAngle);
 
 Matrix3 aRotScale;
 aRotScale.scale( fXScale, 1.0 );
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index fc3338929ec5..067672dc5366 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -572,7 +572,7 @@ Point SalLayout::GetDrawPosition( const Point& rRelative ) 
const
 if( nOldOrientation != mnOrientation )
 {
 nOldOrientation = mnOrientation;
-double fRad = mnOrientation.get() * (M_PI / 1800.0);
+double fRad = toRadians(mnOrientation);
 fCos = cos( fRad );
 fSin = sin( fRad );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-02-25 Thread Douglas Mencken
 cppcanvas/source/inc/implrenderer.hxx |7 +--
 vcl/source/filter/wmf/enhwmf.cxx  |7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 63de81621a8d075d1df00d54798e06271083110e
Author: Douglas Mencken dougmenc...@gmail.com
Date:   Mon Feb 24 11:47:03 2014 -0500

Update little-to-big endian GetSwapFloat functions

rSt  pPtr[3]  pPtr[2]  pPtr[1]  pPtr[0] results in error:
  no match for 'operator' in 'rSt  *(pPtr + 3u)'

Change-Id: I1820bac8c72f7633ab01a17bf5d073b988e1b58c
Reviewed-on: https://gerrit.libreoffice.org/8207
Tested-by: Michael Stahl mst...@redhat.com
Reviewed-by: Michael Stahl mst...@redhat.com

diff --git a/cppcanvas/source/inc/implrenderer.hxx 
b/cppcanvas/source/inc/implrenderer.hxx
index 1762645..4f043b9b 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -137,12 +137,15 @@ namespace cppcanvas
 }
 
 #ifdef OSL_BIGENDIAN
-// currently unused
+// little endian - big endian switch
 static float GetSwapFloat( SvStream rSt )
 {
 float   fTmp;
 sal_Int8* pPtr = (sal_Int8*)fTmp;
-rSt  pPtr[3]  pPtr[2]  pPtr[1]  pPtr[0];// Little 
Endian - Big Endian switch
+rSt.ReadSChar( pPtr[3] );
+rSt.ReadSChar( pPtr[2] );
+rSt.ReadSChar( pPtr[1] );
+rSt.ReadSChar( pPtr[0] );
 return fTmp;
 }
 #endif
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 9023c50..f2df15d 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -155,12 +155,15 @@ using namespace std;
 
 
 #ifdef OSL_BIGENDIAN
-// currently unused
+// little endian - big endian switch
 static float GetSwapFloat( SvStream rSt )
 {
 float   fTmp;
 sal_Int8* pPtr = (sal_Int8*)fTmp;
-rSt  pPtr[3]  pPtr[2]  pPtr[1]  pPtr[0];// little endian - 
big endian switch
+rSt.ReadSChar( pPtr[3] );
+rSt.ReadSChar( pPtr[2] );
+rSt.ReadSChar( pPtr[1] );
+rSt.ReadSChar( pPtr[0] );
 return fTmp;
 }
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-08-30 Thread Fridrich Štrba
 cppcanvas/source/inc/implrenderer.hxx |5 +
 cppcanvas/source/mtfrenderer/emfplus.cxx  |   15 +++
 cppcanvas/source/mtfrenderer/implrenderer.cxx |5 +++--
 vcl/source/filter/wmf/winmtf.cxx  |   16 +---
 4 files changed, 28 insertions(+), 13 deletions(-)

New commits:
commit 21ee132af1b888f50a9d916337011879570ca357
Author: Fridrich Å trba fridrich.st...@bluewin.ch
Date:   Fri Aug 30 14:31:29 2013 +0200

Revert some random work-in-progress that is most probably bitrotten

Revert EMF+: aBaseTransform is a hardcoded identity matrix, don't bother 
with it

This reverts commit 2b700a710e44d2d09f45793f5f2448268e66d4fe.

Revert Pass also the bounding box in device units to the EMF+ part

This reverts commit f387c5da5a824df6cf2874155c13445a86804475.

diff --git a/cppcanvas/source/inc/implrenderer.hxx 
b/cppcanvas/source/inc/implrenderer.hxx
index 63cce82f..79a2967 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -286,6 +286,7 @@ static float GetSwapFloat( SvStream rSt )
 ActionVector maActions;
 
 /* EMF+ */
+XForm   aBaseTransform;
 XForm   aWorldTransform;
 EMFPObject* aObjects [256];
 float   fPageScale;
@@ -294,10 +295,6 @@ 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/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 384dd2c..a88ae12 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -865,6 +865,9 @@ namespace cppcanvas
 x -= nFrameLeft;
 y -= nFrameTop;
 
+x *= aBaseTransform.eM11;
+y *= aBaseTransform.eM22;
+
 return ::basegfx::B2DPoint (x, y);
 }
 
@@ -877,6 +880,9 @@ namespace cppcanvas
 
 MapToDevice (w, h);
 
+w *= aBaseTransform.eM11;
+h *= aBaseTransform.eM22;
+
 return ::basegfx::B2DSize (w, h);
 }
 
@@ -927,6 +933,7 @@ namespace cppcanvas
 
 ::basegfx::B2DHomMatrix aTextureTransformation;
 ::basegfx::B2DHomMatrix aWorldTransformation;
+::basegfx::B2DHomMatrix aBaseTransformation;
 rendering::Texture aTexture;
 
 aWorldTransformation.set (0, 0, aWorldTransform.eM11);
@@ -936,6 +943,13 @@ namespace cppcanvas
 aWorldTransformation.set (1, 1, aWorldTransform.eM22);
 aWorldTransformation.set (1, 2, aWorldTransform.eDy);
 
+aBaseTransformation.set (0, 0, aBaseTransform.eM11);
+aBaseTransformation.set (0, 1, aBaseTransform.eM21);
+aBaseTransformation.set (0, 2, aBaseTransform.eDx);
+aBaseTransformation.set (1, 0, aBaseTransform.eM12);
+aBaseTransformation.set (1, 1, aBaseTransform.eM22);
+aBaseTransformation.set (1, 2, aBaseTransform.eDy);
+
 if (brush-type == 4) {
 aTextureTransformation.scale (brush-areaWidth, 
brush-areaHeight);
 aTextureTransformation.translate (brush-areaX, 
brush-areaY);
@@ -962,6 +976,7 @@ namespace cppcanvas
 aTextureTransformation.scale (100.0*nMmX/nPixX, 
100.0*nMmY/nPixY);
 aTextureTransformation.translate (-nFrameLeft, -nFrameTop);
 aTextureTransformation *= rState.mapModeTransform;
+aTextureTransformation *= aBaseTransformation;
 
 aTexture.RepeatModeX = rendering::TexturingMode::CLAMP;
 aTexture.RepeatModeY = rendering::TexturingMode::CLAMP;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 17c68c4..c9489afd 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1787,12 +1787,13 @@ 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;
 

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

2013-06-12 Thread Fridrich Štrba
 cppcanvas/source/inc/implrenderer.hxx |1 -
 cppcanvas/source/mtfrenderer/emfplus.cxx  |   15 ---
 cppcanvas/source/mtfrenderer/implrenderer.cxx |3 ---
 vcl/source/filter/wmf/winmtf.cxx  |9 -
 4 files changed, 28 deletions(-)

New commits:
commit 2b700a710e44d2d09f45793f5f2448268e66d4fe
Author: Fridrich Å trba fridrich.st...@bluewin.ch
Date:   Wed Jun 12 10:03:28 2013 +0200

EMF+: aBaseTransform is a hardcoded identity matrix, don't bother with it

Change-Id: Ifa4f42c4f17a70c7238347a13897ef6742eb4679

diff --git a/cppcanvas/source/inc/implrenderer.hxx 
b/cppcanvas/source/inc/implrenderer.hxx
index ae47ab8..63cce82f 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -286,7 +286,6 @@ static float GetSwapFloat( SvStream rSt )
 ActionVector maActions;
 
 /* EMF+ */
-XForm   aBaseTransform;
 XForm   aWorldTransform;
 EMFPObject* aObjects [256];
 float   fPageScale;
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 47fa726..c73d7f1 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -853,9 +853,6 @@ namespace cppcanvas
 x -= nFrameLeft;
 y -= nFrameTop;
 
-x *= aBaseTransform.eM11;
-y *= aBaseTransform.eM22;
-
 return ::basegfx::B2DPoint (x, y);
 }
 
@@ -868,9 +865,6 @@ namespace cppcanvas
 
 MapToDevice (w, h);
 
-w *= aBaseTransform.eM11;
-h *= aBaseTransform.eM22;
-
 return ::basegfx::B2DSize (w, h);
 }
 
@@ -921,7 +915,6 @@ namespace cppcanvas
 
 ::basegfx::B2DHomMatrix aTextureTransformation;
 ::basegfx::B2DHomMatrix aWorldTransformation;
-::basegfx::B2DHomMatrix aBaseTransformation;
 rendering::Texture aTexture;
 
 aWorldTransformation.set (0, 0, aWorldTransform.eM11);
@@ -931,13 +924,6 @@ namespace cppcanvas
 aWorldTransformation.set (1, 1, aWorldTransform.eM22);
 aWorldTransformation.set (1, 2, aWorldTransform.eDy);
 
-aBaseTransformation.set (0, 0, aBaseTransform.eM11);
-aBaseTransformation.set (0, 1, aBaseTransform.eM21);
-aBaseTransformation.set (0, 2, aBaseTransform.eDx);
-aBaseTransformation.set (1, 0, aBaseTransform.eM12);
-aBaseTransformation.set (1, 1, aBaseTransform.eM22);
-aBaseTransformation.set (1, 2, aBaseTransform.eDy);
-
 if (brush-type == 4) {
 aTextureTransformation.scale (brush-areaWidth, 
brush-areaHeight);
 aTextureTransformation.translate (brush-areaX, 
brush-areaY);
@@ -964,7 +950,6 @@ namespace cppcanvas
 aTextureTransformation.scale (100.0*nMmX/nPixX, 
100.0*nMmY/nPixY);
 aTextureTransformation.translate (-nFrameLeft, -nFrameTop);
 aTextureTransformation *= rState.mapModeTransform;
-aTextureTransformation *= aBaseTransformation;
 
 aTexture.RepeatModeX = rendering::TexturingMode::CLAMP;
 aTexture.RepeatModeY = rendering::TexturingMode::CLAMP;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index ca217d1..2fcff5a 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1873,9 +1873,6 @@ namespace cppcanvas
 SAL_INFO (cppcanvas.emf, EMF+ picture frame:  
 nFrameLeft  ,  nFrameTop   -   nFrameRight  ,  
nFrameBottom);
 rMF  nPixX  nPixY  nMmX  nMmY;
 SAL_INFO (cppcanvas.emf, EMF+ ref device pixel 
size:   nPixX  x  nPixY   mm size:   nMmX  x  nMmY);
-
-rMF  aBaseTransform;
-//aWorldTransform.Set (aBaseTransform);
 }
 }
 break;
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index ac3fec1..62530c1 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -2251,15 +2251,6 @@ void WinMtfOutput::PassEMFPlusHeaderInfo()
 mem  nLeft  nTop  nRight  nBottom;
 mem  mnPixX  mnPixY  mnMillX  mnMillY;
 
-float one, zero;
-
-one = 1;
-zero = 0;
-
-// add transformation matrix to be used in vcl's metaact.cxx for
-// rotate and scale operations
-mem  one  zero  zero  one  zero  zero;
-
 // need to flush the stream, otherwise GetEndOfData will return 0
 // on windows where the function parameters are 

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

2013-06-11 Thread Fridrich Štrba
 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.st...@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;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-05-12 Thread Chris Sherlock
 cppcanvas/source/mtfrenderer/emfplus.cxx |   35 +++
 vcl/source/filter/wmf/enhwmf.cxx |3 +-
 2 files changed, 28 insertions(+), 10 deletions(-)

New commits:
commit 00fbf73b07adc4d8f0e37e36bb844f2e9d19ae15
Author: Chris Sherlock chris.sherloc...@gmail.com
Date:   Sun May 12 11:11:52 2013 +1000

EMF+ fixes

A number of fixes have been made to commit
256e42646bedbeb9cba900f962f36ba4b1a1cda3:

* Missing redirect in SAL_WARN - only gets picked up when DBG_LEVEL  1
* Some errant newlines in SAL_INFO
* Some missing braces
* Missing semi-colon fixed (!)
* Changed int to sal_Int32 (causing ambiguity error)
* Add dumpWords to the SAL_WARN that ensures that size is not greater
  than length
* Show values when proessing EMF+ comment record (only enabled when
  DBG_LEVEL  2)
* Missing std::hex in SAL_INFO

Change-Id: I059ba24964dd428a56a31d100109cfec938a8a49
Reviewed-on: https://gerrit.libreoffice.org/3861
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index c0f9172..7203cc3 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -102,10 +102,12 @@ namespace cppcanvas
 {
 sal_uInt32 pos = s.Tell ();
 sal_Int16 data;
+SAL_INFO (cppcanvas.emf, EMF+ dumping words);
 for (; i  0; i --) {
 s  data;
 SAL_INFO (cppcanvas.emf, EMF+\tdata:   std::hex  data 
 std::dec);
 }
+SAL_INFO (cppcanvas.emf, EMF+ end dumping words);
 s.Seek (pos);
 }
 #endif
@@ -226,7 +228,7 @@ namespace cppcanvas
 }
 }
 
-if (polygon.count ())
+if (polygon.count ()) {
 aPolygon.append (polygon);
 
 #if OSL_DEBUG_LEVEL  1
@@ -238,15 +240,16 @@ namespace cppcanvas
 SAL_INFO (cppcanvas.emf, point:   
point.getX()  ,  point.getY());
 if (polygon.isPrevControlPointUsed(j)) {
 point = polygon.getPrevControlPoint(j);
-SAL_INFO (cppcanvas.emf, prev:   
point.getX() ,  point.getY());
+SAL_INFO (cppcanvas.emf, prev:   
point.getX()  ,  point.getY());
 }
 if (polygon.isNextControlPointUsed(j)) {
 point = polygon.getNextControlPoint(j);
-SAL_INFO (cppcanvas.emf, next:   
point.getX() ,  point.getY());
+SAL_INFO (cppcanvas.emf, next:   
point.getX()  ,  point.getY());
 }
 }
 }
 #endif
+}
 
 return aPolygon;
 }
@@ -370,7 +373,8 @@ namespace cppcanvas
 
 s  header  type;
 
-SAL_INFO (cppcanvas.emf, EMF+\tbrush\nEMF+\theader: 0x  
std::hex  header   type:   type  std::dec);
+SAL_INFO (cppcanvas.emf, EMF+\tbrush);
+SAL_INFO (cppcanvas.emf, EMF+\theader: 0x  std::hex  
header   type:std::hex  type  std::dec);
 
 switch (type) {
 case 0:
@@ -607,6 +611,7 @@ namespace cppcanvas
 #if OSL_DEBUG_LEVEL  1
 if (width == 0.0) {
 SAL_INFO (cppcanvas.emf, TODO: pen with zero width - 
using minimal which might not be correct\n);
+}
 #endif
 rStrokeAttributes.StrokeWidth = (rState.mapModeTransform * 
rR.MapSize (width == 0.0 ? 0.05 : width, 0)).getX ();
 }
@@ -618,7 +623,8 @@ namespace cppcanvas
 
 s  header  unknown  penFlags  unknown2  width;
 
-SAL_INFO(cppcanvas.emf, EMF+\tpen\nEMF+\theader: 0x  
std::hex  header   unknown: 0x  unknown 
+SAL_INFO(cppcanvas.emf, EMF+\tpen);
+SAL_INFO(cppcanvas.emf, EMF+\theader: 0x  std::hex  
header   unknown: 0x  unknown 
  additional flags: 0x  penFlags   unknown: 
0x  unknown2   width:   std::dec  width );
 
 if (penFlags  1)
@@ -751,7 +757,7 @@ namespace cppcanvas
 // debug code - write the stream to debug file 
/tmp/emf-stream.emf
 #if OSL_DEBUG_LEVEL  1
 mfStream.Seek(0);
-static int emfp_debug_stream_number = 0;
+static sal_Int32 emfp_debug_stream_number = 0;
 OUString 
emfp_debug_filename(/tmp/emf-embedded-stream);
 emfp_debug_filename += 
OUString::valueOf(emfp_debug_stream_number++);
 emfp_debug_filename += OUString(.emf);
@@ -760,7 +766,7 @@ namespace