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

2023-10-18 Thread Noel Grandin (via logerrit)
 cppcanvas/source/mtfrenderer/implrenderer.cxx |2 +-
 drawinglayer/source/tools/wmfemfhelper.cxx|2 +-
 filter/source/msfilter/mstoolbar.cxx  |2 +-
 svx/source/dialog/_bmpmask.cxx|4 ++--
 svx/source/dialog/_contdlg.cxx|4 ++--
 vcl/source/graphic/GraphicObject2.cxx |2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 25f4ef5aa5488869b3bad045ba203c6b22b2e2f0
Author: Noel Grandin 
AuthorDate: Wed Oct 18 09:53:15 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Oct 18 13:38:36 2023 +0200

tdf#157792 followup

avoid doing some extra Invert() operations by creating an AlphaMask
instead of a Bitmap to pass to the BitmapEx constructor.

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

diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 6bd99840f0a8..d3cfe793f45f 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -208,7 +208,7 @@ namespace
 aWhite, rMaskColor
 };
 
-Bitmap aMask( rBitmap.CreateMask( aWhite ));
+AlphaMask aMask( rBitmap.CreateAlphaMask( aWhite ));
 Bitmap aSolid( rBitmap.GetSizePixel(),
vcl::PixelFormat::N8_BPP,
&aBiLevelPalette );
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx 
b/drawinglayer/source/tools/wmfemfhelper.cxx
index aa48149219f3..31bad2a0abd4 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -642,7 +642,7 @@ namespace wmfemfhelper
 aWhite, rMaskColor
 };
 
-Bitmap aMask(rBitmap.CreateMask(aWhite));
+AlphaMask aMask(rBitmap.CreateAlphaMask(aWhite));
 Bitmap aSolid(rBitmap.GetSizePixel(), vcl::PixelFormat::N8_BPP, 
&aBiLevelPalette);
 
 aSolid.Erase(rMaskColor);
diff --git a/filter/source/msfilter/mstoolbar.cxx 
b/filter/source/msfilter/mstoolbar.cxx
index aa781c4717c8..fa78dce52443 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -303,7 +303,7 @@ void TBCData::ImportToolBarControl( 
CustomToolBarImportHelper& helper, std::vect
 // according to the spec:
 // "the iconMask is white in all the areas in 
which the icon is
 // displayed as transparent and is black in all 
other areas."
-aBitEx = BitmapEx(aBitEx.GetBitmap(), 
rMaskBase.CreateMask(COL_WHITE));
+aBitEx = BitmapEx(aBitEx.GetBitmap(), 
rMaskBase.CreateAlphaMask(COL_WHITE));
 }
 }
 
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index ba11eeacd1da..1db7e661cdd7 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -612,10 +612,10 @@ BitmapEx SvxBmpMask::ImpMaskTransparent( const BitmapEx& 
rBitmapEx, const Color&
 EnterWait();
 
 BitmapExaBmpEx;
-Bitmap  aMask( rBitmapEx.GetBitmap().CreateMask( rColor, nTol ) );
+AlphaMask   aMask( rBitmapEx.GetBitmap().CreateAlphaMask( rColor, nTol ) );
 
 if( rBitmapEx.IsAlpha() )
-aMask.CombineOr( rBitmapEx.GetAlphaMask() );
+aMask.AlphaCombineOr( rBitmapEx.GetAlphaMask() );
 
 aBmpEx = BitmapEx( rBitmapEx.GetBitmap(), aMask );
 LeaveWait();
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index ec122e3b1373..725ce095c9ed 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -631,10 +631,10 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, 
ContourWindow&, rWnd, void )
 {
 const tools::Long  nTol = 
static_cast(m_xMtfTolerance->get_value(FieldUnit::PERCENT) * 255 / 
100);
 
-Bitmap aMask = aGraphic.GetBitmapEx().GetBitmap().CreateMask( 
rColor, nTol );
+AlphaMask aMask = 
aGraphic.GetBitmapEx().GetBitmap().CreateAlphaMask( rColor, nTol );
 
 if( aGraphic.IsTransparent() )
-aMask.CombineOr( aGraphic.GetBitmapEx().GetAlphaMask() );
+aMask.AlphaCombineOr( aGraphic.GetBitmapEx().GetAlphaMask() );
 
 if( !aMask.IsEmpty() )
 {
diff --git a/vcl/source/graphic/GraphicObject2.cxx 
b/vcl/source/graphic/GraphicObject2.cxx
index a654baeba6bf..02a9374759bf 100644
--- a/vcl/source/graphic/GraphicObject2.cxx
+++ b/vcl/source/graphic/GraphicObject2.cxx
@@ -321,7 +321,7 @@ bool GraphicObject::ImplDrawTiled(OutputDevice& rOut, const 
tools::Rectangle& rA
 AlphaMask( aVDev->GetBitmap( 
Point(0,0), aVDev->GetOutputSize() ) ) );
 else
 aTileBi

[Libreoffice-commits] core.git: cppcanvas/source drawinglayer/source editeng/source emfio/source filter/source include/editeng include/vcl sc/source starmath/source svx/source sw/source toolkit/source

2021-09-03 Thread Noel Grandin (via logerrit)
 cppcanvas/source/mtfrenderer/implrenderer.cxx   |   10 
 cppcanvas/source/mtfrenderer/textaction.cxx |7 
 drawinglayer/source/primitive2d/textlayoutdevice.cxx|2 
 drawinglayer/source/processor2d/vclprocessor2d.cxx  |7 
 editeng/source/editeng/impedit3.cxx |   33 --
 editeng/source/items/svxfont.cxx|6 
 editeng/source/outliner/outliner.cxx|6 
 emfio/source/reader/mtftools.cxx|7 
 filter/source/svg/svgwriter.cxx |8 
 include/editeng/svxfont.hxx |2 
 include/vcl/outdev.hxx  |2 
 include/vcl/vcllayout.hxx   |2 
 sc/source/ui/view/output2.cxx   |2 
 starmath/source/accessibility.cxx   |   16 -
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |9 
 sw/source/core/txtnode/fntcache.cxx |  222 +++-
 toolkit/source/awt/vclxfont.cxx |6 
 vcl/inc/sallayout.hxx   |6 
 vcl/qa/cppunit/complextext.cxx  |2 
 vcl/source/filter/svm/SvmConverter.cxx  |8 
 vcl/source/filter/wmf/emfwr.cxx |7 
 vcl/source/filter/wmf/wmfwr.cxx |   12 
 vcl/source/gdi/CommonSalLayout.cxx  |   14 -
 vcl/source/gdi/sallayout.cxx|   65 ++--
 vcl/source/gdi/textlayout.cxx   |   11 
 vcl/source/outdev/text.cxx  |   12 
 vcl/workben/vcldemo.cxx |8 
 27 files changed, 235 insertions(+), 257 deletions(-)

New commits:
commit d4dc6b5cfdb02ad00a06ad32650948648abe010d
Author: Noel Grandin 
AuthorDate: Thu Sep 2 20:05:09 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 4 08:17:06 2021 +0200

use std::vector for fetching DX array data

because I'm trying to track down a related heap corruption, and that is
much easier if the access to the array is checked by the std::vector
debug runtime

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

diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 667e78546588..64ac3a164c86 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2567,15 +2567,15 @@ namespace cppcanvas::internal
 // generating a DX array, and uniformly
 // distributing the excess/insufficient width
 // to every logical character.
-std::unique_ptr< ::tools::Long []> pDXArray( new 
::tools::Long[nLen] );
+std::vector<::tools::Long> aDXArray;
 
-rVDev.GetTextArray( pAct->GetText(), pDXArray.get(),
+rVDev.GetTextArray( pAct->GetText(), &aDXArray,
 pAct->GetIndex(), pAct->GetLen() );
 
-const sal_Int32 nWidthDifference( pAct->GetWidth() - 
pDXArray[ nLen-1 ] );
+const sal_Int32 nWidthDifference( pAct->GetWidth() - 
aDXArray[ nLen-1 ] );
 
 // Last entry of pDXArray contains total width of the 
text
-::tools::Long* p = pDXArray.get();
+::tools::Long* p = aDXArray.data();
 for (sal_Int32 i = 1; i <= nLen; ++i)
 {
 // calc ratio for every array entry, to
@@ -2592,7 +2592,7 @@ namespace cppcanvas::internal
 sText,
 pAct->GetIndex(),
 nLen,
-pDXArray.get(),
+aDXArray.data(),
 rFactoryParms,
 bSubsettableActions );
 }
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx 
b/cppcanvas/source/mtfrenderer/textaction.cxx
index 0ffe14e3c04b..6af8984534e0 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -186,12 +186,11 @@ namespace cppcanvas::internal
 {
 // no external DX array given, create one from given
 // string
-std::unique_ptr< ::tools::Long []> pCharWidths( new 
::tools::Long[nLen] );
+std::vector<::tools::Long> aCharWidths;
 
-rVDev.GetTextArray( rText, pCharWidths.get(),
-nStartPos, nLen );
+rVDev.GetTextArray( rText, 

[Libreoffice-commits] core.git: cppcanvas/source drawinglayer/source include/svx include/vcl sd/qa svx/source vcl/source

2021-04-29 Thread Luboš Luňák (via logerrit)
 cppcanvas/source/mtfrenderer/implrenderer.cxx  |6 -
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |   53 +---
 include/svx/xdash.hxx  |   22 ++---
 include/vcl/lineinfo.hxx   |   26 +++---
 sd/qa/unit/export-tests-ooxml2.cxx |6 -
 sd/qa/unit/uiimpress.cxx   |   24 +
 svx/source/xoutdev/xattr.cxx   |   12 +-
 vcl/source/filter/idxf/dxfvec.cxx  |6 -
 vcl/source/gdi/lineinfo.cxx|   55 +++--
 vcl/source/outdev/polyline.cxx |8 -
 10 files changed, 122 insertions(+), 96 deletions(-)

New commits:
commit b71d9a6d15cfb8a50afdea5ac064f40d84c561f8
Author: Luboš Luňák 
AuthorDate: Tue Apr 27 11:44:48 2021 +0200
Commit: Luboš Luňák 
CommitDate: Thu Apr 29 16:05:53 2021 +0200

do not apply line dashing in drawinglayer (tdf#136957)

basegfx::utils::applyLineDashing() is not as good as the actual
VCL backend dashing, and there are some rounding errors because of
all the canvas transformation matrices or whatever, which leads
to the drawing problem. So use LineInfo to carry the dashing
information.
As a part of this change, also make LineInfo use doubles instead
of ints. The use of transformation matrices means that the values
may be fractional and less than one.

Change-Id: Ia5ac7d266cab344b7137052c81fbd96c1ce28003
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114710
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 24f7f3fbf969..a9df9eb2c6b8 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -161,13 +161,13 @@ namespace
 // interpret dash info only if explicitly enabled as
 // style
 const ::basegfx::B2DSize aDistance( rLineInfo.GetDistance(), 0 );
-const double nDistance( (rState.mapModeTransform * aDistance).getX() );
+const double nDistance( (rState.mapModeTransform * 
aDistance).getLength() );
 
 const ::basegfx::B2DSize aDashLen( rLineInfo.GetDashLen(), 0 );
-const double nDashLen( (rState.mapModeTransform * aDashLen).getX() );
+const double nDashLen( (rState.mapModeTransform * 
aDashLen).getLength() );
 
 const ::basegfx::B2DSize aDotLen( rLineInfo.GetDotLen(), 0 );
-const double nDotLen( (rState.mapModeTransform * aDotLen).getX() );
+const double nDotLen( (rState.mapModeTransform * aDotLen).getLength() 
);
 
 const sal_Int32 nNumArryEntries( 2*rLineInfo.GetDashCount() +
  2*rLineInfo.GetDotCount() );
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 6f690ca55f46..0dc0904015f0 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1574,31 +1574,60 @@ void 
VclMetafileProcessor2D::processPolygonStrokePrimitive2D(
 if (basegfx::fTools::more(rLine.getWidth(), 0.0))
 {
 const attribute::StrokeAttribute& rStroke = 
rStrokePrimitive.getStrokeAttribute();
-basegfx::B2DPolyPolygon aHairLinePolyPolygon;
 
+const basegfx::BColor aHairlineColor(
+maBColorModifierStack.getModifiedColor(rLine.getColor()));
+mpOutputDevice->SetLineColor(Color(aHairlineColor));
+mpOutputDevice->SetFillColor();
+
+// use the transformed line width
+LineInfo aLineInfo(LineStyle::Solid,
+   
basegfx::fround(getTransformedLineWidth(rLine.getWidth(;
+aLineInfo.SetLineJoin(rLine.getLineJoin());
+aLineInfo.SetLineCap(rLine.getLineCap());
+
+basegfx::B2DPolyPolygon aHairLinePolyPolygon;
 if (0.0 == rStroke.getFullDotDashLen())
 {
 aHairLinePolyPolygon.append(rBasePolygon);
 }
+else if (rStroke.getDotDashArray().size() == 2)
+{
+aHairLinePolyPolygon.append(rBasePolygon);
+// This will be used by setupStrokeAttributes() in cppcanvas.
+aLineInfo.SetStyle(LineStyle::Dash);
+aLineInfo.SetDashCount(1);
+aLineInfo.SetDashLen(
+
basegfx::fround(getTransformedLineWidth(rStroke.getDotDashArray()[0])));
+aLineInfo.SetDistance(
+
basegfx::fround(getTransformedLineWidth(rStroke.getDotDashArray()[1])));
+}
+else if (rStroke.getDotDashArray().size() == 4
+ && rStroke.getDotDashArray()[1] == 
rS

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

2017-11-06 Thread Noel Grandin
 cppcanvas/source/mtfrenderer/emfpbrush.cxx |2 +-
 cppcanvas/source/mtfrenderer/emfpbrush.hxx |2 +-
 cppcanvas/source/mtfrenderer/emfpcustomlinecap.cxx |4 ++--
 cppcanvas/source/mtfrenderer/emfpcustomlinecap.hxx |4 ++--
 cppcanvas/source/mtfrenderer/emfppath.cxx  |2 +-
 cppcanvas/source/mtfrenderer/emfppath.hxx  |2 +-
 cppcanvas/source/mtfrenderer/emfppen.cxx   |4 ++--
 cppcanvas/source/mtfrenderer/emfppen.hxx   |4 ++--
 drawinglayer/source/tools/emfpbrush.cxx|2 +-
 drawinglayer/source/tools/emfpbrush.hxx|2 +-
 drawinglayer/source/tools/emfpcustomlinecap.cxx|4 ++--
 drawinglayer/source/tools/emfpcustomlinecap.hxx|4 ++--
 drawinglayer/source/tools/emfphelperdata.cxx   |2 +-
 drawinglayer/source/tools/emfphelperdata.hxx   |2 +-
 drawinglayer/source/tools/emfppath.cxx |2 +-
 drawinglayer/source/tools/emfppath.hxx |2 +-
 drawinglayer/source/tools/emfppen.cxx  |4 ++--
 drawinglayer/source/tools/emfppen.hxx  |4 ++--
 tools/source/stream/strmunx.cxx|2 +-
 19 files changed, 27 insertions(+), 27 deletions(-)

New commits:
commit 84b1fab6548481313e9b65a9d56965e1c112
Author: Noel Grandin 
Date:   Sat Nov 4 08:59:25 2017 +0200

loplugin:constparams in cppcanvas,drawinglayer

Change-Id: I15cac1411c985afe8d7cb9439214a8092702bdb8
Reviewed-on: https://gerrit.libreoffice.org/44343
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/cppcanvas/source/mtfrenderer/emfpbrush.cxx 
b/cppcanvas/source/mtfrenderer/emfpbrush.cxx
index b9f2ed4246e2..fb8a41c5d846 100644
--- a/cppcanvas/source/mtfrenderer/emfpbrush.cxx
+++ b/cppcanvas/source/mtfrenderer/emfpbrush.cxx
@@ -89,7 +89,7 @@ namespace cppcanvas
 }
 }
 
-void EMFPBrush::Read(SvStream& s, ImplRenderer& rR)
+void EMFPBrush::Read(SvStream& s, ImplRenderer const & rR)
 {
 sal_uInt32 header;
 
diff --git a/cppcanvas/source/mtfrenderer/emfpbrush.hxx 
b/cppcanvas/source/mtfrenderer/emfpbrush.hxx
index 3d5561b55846..dc1e8d890dc6 100644
--- a/cppcanvas/source/mtfrenderer/emfpbrush.hxx
+++ b/cppcanvas/source/mtfrenderer/emfpbrush.hxx
@@ -121,7 +121,7 @@ namespace cppcanvas
 sal_uInt32 GetType() const { return type; }
 const ::Color& GetColor() const { return solidColor; }
 
-void Read(SvStream& s, ImplRenderer& rR);
+void Read(SvStream& s, ImplRenderer const & rR);
 };
 }
 }
diff --git a/cppcanvas/source/mtfrenderer/emfpcustomlinecap.cxx 
b/cppcanvas/source/mtfrenderer/emfpcustomlinecap.cxx
index d53d14fb155e..90e48264933a 100644
--- a/cppcanvas/source/mtfrenderer/emfpcustomlinecap.cxx
+++ b/cppcanvas/source/mtfrenderer/emfpcustomlinecap.cxx
@@ -74,7 +74,7 @@ namespace cppcanvas
 aAttributes.MiterLimit = miterLimit;
 }
 
-void EMFPCustomLineCap::ReadPath(SvStream& s, ImplRenderer& rR, bool 
bFill)
+void EMFPCustomLineCap::ReadPath(SvStream& s, ImplRenderer const & rR, 
bool bFill)
 {
 sal_Int32 pathLength;
 s.ReadInt32(pathLength);
@@ -101,7 +101,7 @@ namespace cppcanvas
 polygon.transform(aMatrix);
 };
 
-void EMFPCustomLineCap::Read(SvStream& s, ImplRenderer& rR)
+void EMFPCustomLineCap::Read(SvStream& s, ImplRenderer const & rR)
 {
 sal_uInt32 header;
 
diff --git a/cppcanvas/source/mtfrenderer/emfpcustomlinecap.hxx 
b/cppcanvas/source/mtfrenderer/emfpcustomlinecap.hxx
index c5b96a10e81e..cd5a45eec997 100644
--- a/cppcanvas/source/mtfrenderer/emfpcustomlinecap.hxx
+++ b/cppcanvas/source/mtfrenderer/emfpcustomlinecap.hxx
@@ -35,8 +35,8 @@ namespace cppcanvas
 EMFPCustomLineCap();
 
 void SetAttributes(com::sun::star::rendering::StrokeAttributes& 
aAttributes);
-void ReadPath(SvStream& s, ImplRenderer& rR, bool bFill);
-void Read(SvStream& s, ImplRenderer& rR);
+void ReadPath(SvStream& s, ImplRenderer const & rR, bool bFill);
+void Read(SvStream& s, ImplRenderer const & rR);
 };
 }
 }
diff --git a/cppcanvas/source/mtfrenderer/emfppath.cxx 
b/cppcanvas/source/mtfrenderer/emfppath.cxx
index 506a01f424b1..39dc1bcb9f99 100644
--- a/cppcanvas/source/mtfrenderer/emfppath.cxx
+++ b/cppcanvas/source/mtfrenderer/emfppath.cxx
@@ -102,7 +102,7 @@ namespace cppcanvas
 #endif
 }
 
-::basegfx::B2DPolyPolygon& EMFPPath::GetPolygon (ImplRenderer& rR, 
bool bMapIt, bool bAddLineToCloseShape)
+::basegfx::B2DPolyPolygon& EMFPPath::GetPolygon (ImplRenderer const & 
rR, bool bMapIt, bool bAddLineToCloseShape)
 {
 ::basegfx::B2DPolygon polygon;
 
diff --git a/cppcanvas/source/mtfrenderer/emfppath.hxx 
b/cppcanvas/source/mtfrenderer/emfppath.hxx
index 7f60a76f896f..47fb32a047e6 10064

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

2017-11-03 Thread Noel Grandin
 cppcanvas/source/inc/implrenderer.hxx  |6 +--
 cppcanvas/source/mtfrenderer/emfplus.cxx   |6 +--
 drawinglayer/source/processor2d/hittestprocessor2d.cxx |4 +-
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |2 -
 drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx |2 -
 drawinglayer/source/processor3d/defaultprocessor3d.cxx |4 +-
 drawinglayer/source/processor3d/zbufferprocessor3d.cxx |2 -
 drawinglayer/source/tools/emfpfont.hxx |8 ++---
 drawinglayer/source/tools/emfphelperdata.cxx   |6 +--
 drawinglayer/source/tools/emfphelperdata.hxx   |6 +--
 drawinglayer/source/tools/emfpstringformat.hxx |   20 ++---
 include/drawinglayer/processor2d/hittestprocessor2d.hxx|4 +-
 include/drawinglayer/processor3d/defaultprocessor3d.hxx|4 +-
 13 files changed, 37 insertions(+), 37 deletions(-)

New commits:
commit 7795907fa9434441a86e878799b04149700fe622
Author: Noel Grandin 
Date:   Thu Nov 2 15:17:06 2017 +0200

loplugin:constmethod in drawinglayer

Change-Id: I6a33765f6589fc2941162eb2dcaa4e0a2d9e46e1
Reviewed-on: https://gerrit.libreoffice.org/44214
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/cppcanvas/source/inc/implrenderer.hxx 
b/cppcanvas/source/inc/implrenderer.hxx
index e61f3407169a..295da4ee73d7 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -195,9 +195,9 @@ namespace cppcanvas
 /* EMF+ */
 static void ReadRectangle (SvStream& s, float& x, float& y, float 
&width, float& height, bool bCompressed = false);
 static void ReadPoint (SvStream& s, float& x, float& y, sal_uInt32 
flags);
-void MapToDevice (double &x, double &y);
-::basegfx::B2DPoint Map (double ix, double iy);
-::basegfx::B2DSize MapSize (double iwidth, double iheight);
+void MapToDevice (double &x, double &y) const;
+::basegfx::B2DPoint Map (double ix, double iy) const;
+::basegfx::B2DSize MapSize (double iwidth, double iheight) const;
 void GraphicStatePush (GraphicStateMap& map, sal_Int32 index, 
OutDevState const & rState);
 void GraphicStatePop (GraphicStateMap& map, sal_Int32 index, 
OutDevState& rState);
 
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 60f9f51b3e15..369ac9ccb3b9 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -251,14 +251,14 @@ namespace cppcanvas
 s.ReadFloat( x ).ReadFloat( y );
 }
 
-void ImplRenderer::MapToDevice (double& x, double& y)
+void ImplRenderer::MapToDevice (double& x, double& y) const
 {
 // TODO: other units
 x = 100*nMmX*x/nPixX;
 y = 100*nMmY*y/nPixY;
 }
 
-::basegfx::B2DPoint ImplRenderer::Map (double ix, double iy)
+::basegfx::B2DPoint ImplRenderer::Map (double ix, double iy) const
 {
 double x, y;
 
@@ -276,7 +276,7 @@ namespace cppcanvas
 return ::basegfx::B2DPoint (x, y);
 }
 
-::basegfx::B2DSize ImplRenderer::MapSize (double iwidth, double 
iheight)
+::basegfx::B2DSize ImplRenderer::MapSize (double iwidth, double 
iheight) const
 {
 double w, h;
 
diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx 
b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
index ef512060cf06..d0d428370d41 100644
--- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
@@ -75,7 +75,7 @@ namespace drawinglayer
 
 bool HitTestProcessor2D::checkHairlineHitWithTolerance(
 const basegfx::B2DPolygon& rPolygon,
-double fDiscreteHitTolerance)
+double fDiscreteHitTolerance) const
 {
 basegfx::B2DPolygon aLocalPolygon(rPolygon);
 
aLocalPolygon.transform(getViewInformation2D().getObjectToViewTransformation());
@@ -103,7 +103,7 @@ namespace drawinglayer
 
 bool HitTestProcessor2D::checkFillHitWithTolerance(
 const basegfx::B2DPolyPolygon& rPolyPolygon,
-double fDiscreteHitTolerance)
+double fDiscreteHitTolerance) const
 {
 bool bRetval(false);
 basegfx::B2DPolyPolygon aLocalPolyPolygon(rPolyPolygon);
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index e9473c3e4d23..eb984b5d9c65 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -282,7 +282,7 @@ namespace drawinglayer
 void 
VclMetafileProcessor2D::impConvertFillGradientAttribute

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

2017-10-16 Thread Bartosz Kosiorek
 cppcanvas/source/mtfrenderer/emfplus.cxx |   62 +
 drawinglayer/source/tools/emfphelperdata.cxx |   79 +--
 2 files changed, 69 insertions(+), 72 deletions(-)

New commits:
commit f2410ad4d0f1e93c7f12ee51da9e1a1a90f0f5a4
Author: Bartosz Kosiorek 
Date:   Sun Oct 15 18:13:29 2017 +0200

tdf#31814 Resolve TODO from EMF+ DrawImage and DrawImagePoints

Change-Id: I1b128aa467286b5ae5e0d3cc298ee59f3e6ec12d
Reviewed-on: https://gerrit.libreoffice.org/43408
Tested-by: Jenkins 
Reviewed-by: Patrick Jaap 
Reviewed-by: Bartosz Kosiorek 

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index acc0b3f58573..47e1b1d48d3f 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1181,10 +1181,10 @@ namespace cppcanvas
 SAL_INFO("cppcanvas.emf", "EMF+ " << (type == 
EmfPlusRecordTypeDrawImagePoints ? "DrawImagePoints" : "DrawImage") << 
"attributes index: " << attrIndex << "source unit: " << sourceUnit);
 SAL_INFO("cppcanvas.emf", "EMF+\tTODO: use image 
attributes");
 
-if (sourceUnit == 2 && aObjects [flags & 0xff]) { 
// we handle only GraphicsUnit.Pixel now
+// For DrawImage and DrawImagePoints, source unit 
of measurement type must be 1 pixel
+if (sourceUnit == UnitTypePixel && aObjects [flags 
& 0xff]) {
 EMFPImage& image = *static_cast( 
aObjects [flags & 0xff].get());
 float sx, sy, sw, sh;
-sal_Int32 aCount;
 
 ReadRectangle (rMF, sx, sy, sw, sh);
 ::tools::Rectangle aSource(Point(sx, sy), 
Size(sw, sh));
@@ -1193,12 +1193,13 @@ namespace cppcanvas
 
 ::basegfx::B2DPoint aDstPoint;
 ::basegfx::B2DSize aDstSize;
-bool bValid = false;
 
 if (type == EmfPlusRecordTypeDrawImagePoints) {
+sal_Int32 aCount;
 rMF.ReadInt32( aCount );
 
-if( aCount == 3) { // TODO: now that we 
now that this value is count we should support it better
+// Number of points used by 
DrawImagePoints. Exactly 3 points must be specified.
+if( aCount == 3 ) {
 float x1, y1, x2, y2, x3, y3;
 
 ReadPoint (rMF, x1, y1, flags);
@@ -1210,8 +1211,9 @@ namespace cppcanvas
 
 aDstPoint = Map (x1, y1);
 aDstSize = MapSize(x2 - x1, y3 - y1);
-
-bValid = true;
+} else {
+SAL_WARN("cppcanvas.emf", "EMF+ 
DrawImagePoints Wrong EMF+ file. Expected 3 points, received: "<< aCount);
+break;
 }
 } else if (type == EmfPlusRecordTypeDrawImage) 
{
 float dx, dy, dw, dh;
@@ -1222,39 +1224,33 @@ namespace cppcanvas
 
 aDstPoint = Map (dx, dy);
 aDstSize = MapSize(dw, dh);
-
-bValid = true;
 }
 
-if (bValid) {
-BitmapEx aBmp( image.graphic.GetBitmapEx 
() );
-aBmp.Crop( aSource );
-
-Size aSize( aBmp.GetSizePixel() );
-SAL_INFO("cppcanvas.emf", "EMF+ bitmap 
size: " << aSize.Width() << "x" << aSize.Height());
-if( aSize.Width() > 0 && aSize.Height() > 
0 ) {
-std::shared_ptr pBmpAction (
-
internal::BitmapActionFactory::createBitmapAction (
-aBmp,
-rState.mapModeTransform * 
aDstPoint,
-rState.mapModeTransform * 
aDstSize,
-rCanvas,
-rState));
-
-if( pBmpAction ) {
-maActions.emplace_back( pBmpAction,
-
rFactoryParms.mrCurrActionIndex );
-
-  

[Libreoffice-commits] core.git: cppcanvas/source drawinglayer/source editeng/source filter/source include/editeng include/filter

2017-01-24 Thread Noel Grandin
 cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx  |1 -
 drawinglayer/source/primitive2d/metafileprimitive2d.cxx   |4 
 editeng/source/accessibility/AccessibleStaticTextBase.cxx |5 -
 editeng/source/misc/SvXMLAutoCorrectExport.hxx|2 --
 editeng/source/uno/unoedprx.cxx   |1 -
 filter/source/graphicfilter/egif/egif.cxx |1 -
 filter/source/graphicfilter/eps/eps.cxx   |5 -
 filter/source/graphicfilter/etiff/etiff.cxx   |6 --
 filter/source/graphicfilter/icgm/bundles.hxx  |2 --
 filter/source/graphicfilter/ipbm/ipbm.cxx |5 -
 filter/source/graphicfilter/ipcx/ipcx.cxx |5 -
 filter/source/graphicfilter/iras/iras.cxx |6 --
 filter/source/graphicfilter/itiff/itiff.cxx   |4 
 filter/source/msfilter/viscache.hxx   |3 ---
 filter/source/placeware/exporter.cxx  |5 -
 filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx   |3 ---
 filter/source/xmlfilterdetect/filterdetect.hxx|2 --
 include/editeng/forbiddencharacterstable.hxx  |1 -
 include/editeng/svxrtf.hxx|1 -
 include/filter/msfilter/mstoolbar.hxx |8 
 20 files changed, 70 deletions(-)

New commits:
commit 1d7c589d502fb7f0d874c13e30011ca33a3fb6e4
Author: Noel Grandin 
Date:   Tue Jan 24 11:29:05 2017 +0200

loplugin: unnecessary destructor cppcanvas..filter

Change-Id: I009cdd60869a67d210edf879ddb451663a7b8676
Reviewed-on: https://gerrit.libreoffice.org/33491
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx 
b/cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx
index 86568ec..68e5649 100644
--- a/cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx
+++ b/cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx
@@ -61,7 +61,6 @@ namespace cppcanvas
  */
 CachedPrimitiveBase( const CanvasSharedPtr& rCanvas,
  bool   
bOnlyRedrawWithSameTransform );
-virtual ~CachedPrimitiveBase() override {}
 
 CachedPrimitiveBase(const CachedPrimitiveBase&) = delete;
 const CachedPrimitiveBase& operator=(const CachedPrimitiveBase&) = 
delete;
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx 
b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index fbc15f5..6c3cfe9 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -127,10 +127,6 @@ namespace
 {
 }
 
-~PropertyHolder()
-{
-}
-
 /// read/write accesses
 const basegfx::B2DHomMatrix& getTransformation() const { return 
maTransformation; }
 void setTransformation(const basegfx::B2DHomMatrix& rNew) { if(rNew != 
maTransformation) maTransformation = rNew; }
diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx 
b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
index 93a4358..c4804cf 100644
--- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx
+++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
@@ -109,7 +109,6 @@ namespace accessibility
 
 // receive pointer to our frontend class and view window
 AccessibleStaticTextBase_Impl();
-~AccessibleStaticTextBase_Impl();
 
 void SetEditSource( ::std::unique_ptr< SvxEditSource > && pEditSource 
);
 
@@ -190,10 +189,6 @@ namespace accessibility
 // now the maTextParagraph has an empty parent reference set
 }
 
-AccessibleStaticTextBase_Impl::~AccessibleStaticTextBase_Impl()
-{
-}
-
 void AccessibleStaticTextBase_Impl::SetEditSource( ::std::unique_ptr< 
SvxEditSource > && pEditSource )
 {
 
diff --git a/editeng/source/misc/SvXMLAutoCorrectExport.hxx 
b/editeng/source/misc/SvXMLAutoCorrectExport.hxx
index 3b3de1d..53ddb2b 100644
--- a/editeng/source/misc/SvXMLAutoCorrectExport.hxx
+++ b/editeng/source/misc/SvXMLAutoCorrectExport.hxx
@@ -36,7 +36,6 @@ public:
 const OUString &rFileName,
 css::uno::Reference< css::xml::sax::XDocumentHandler> &rHandler);
 
-virtual ~SvXMLAutoCorrectExport() override {}
 sal_uInt32 exportDoc(enum ::xmloff::token::XMLTokenEnum eClass = 
::xmloff::token::XML_TOKEN_INVALID) override;
 void ExportAutoStyles_() override {}
 void ExportMasterStyles_ () override {}
@@ -56,7 +55,6 @@ public:
 const OUString &rFileName,
 css::uno::Reference< css::xml::sax::XDocumentHandler> &rHandler);
 
-virtual ~SvXMLExceptionListExport() override {}
 sal_uInt32 exportDoc(enum ::xmloff::token::XMLTokenEnum eClass = 
::xmloff::token::XML_TOKEN_INVALID) override;
 void Exp

[Libreoffice-commits] core.git: cppcanvas/source drawinglayer/source filter/source include/tools sd/source svx/source tools/source vcl/source

2016-12-05 Thread Noel Grandin
 cppcanvas/source/mtfrenderer/implrenderer.cxx   |6 +++---
 drawinglayer/source/primitive2d/metafileprimitive2d.cxx |6 +++---
 filter/source/flash/swfwriter1.cxx  |6 +++---
 filter/source/graphicfilter/eps/eps.cxx |6 +++---
 filter/source/graphicfilter/icgm/class4.cxx |4 ++--
 filter/source/msfilter/eschesdo.cxx |   12 ++--
 filter/source/svg/svgwriter.cxx |6 +++---
 include/tools/poly.hxx  |   10 +-
 sd/source/filter/eppt/epptso.cxx|   14 +++---
 svx/source/customshapes/EnhancedCustomShape2d.cxx   |2 +-
 tools/source/generic/poly.cxx   |6 +++---
 vcl/source/filter/wmf/emfwr.cxx |6 +++---
 vcl/source/filter/wmf/winmtf.cxx|6 +++---
 vcl/source/gdi/gdimetafiletools.cxx |6 +++---
 vcl/source/gdi/gdimtf.cxx   |6 +++---
 vcl/source/gdi/print2.cxx   |6 +++---
 vcl/source/gdi/svmconverter.cxx |6 +++---
 vcl/source/outdev/curvedshapes.cxx  |6 +++---
 18 files changed, 60 insertions(+), 60 deletions(-)

New commits:
commit 70f05aa69acca911298201b8a61e3312ec1ab30e
Author: Noel Grandin 
Date:   Mon Dec 5 13:59:20 2016 +0200

convert PolyStyle to scoped enum

Change-Id: Ia35fdbb5e40888db9558988ac069741b31721f0e
Reviewed-on: https://gerrit.libreoffice.org/31633
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 0e41235..3d630e6 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2007,7 +2007,7 @@ namespace cppcanvas
 // TODO(F1): Missing basegfx functionality. Mind empty 
rects!
 const ::tools::Polygon aToolsPoly( 
static_cast(pCurrAct)->GetRect(),
  
static_cast(pCurrAct)->GetStartPoint(),
- 
static_cast(pCurrAct)->GetEndPoint(), POLY_ARC );
+ 
static_cast(pCurrAct)->GetEndPoint(), PolyStyle::Arc );
 ::basegfx::B2DPolygon aPoly( 
aToolsPoly.getB2DPolygon() );
 aPoly.transform( rStates.getState().mapModeTransform );
 
@@ -2021,7 +2021,7 @@ namespace cppcanvas
 // TODO(F1): Missing basegfx functionality. Mind empty 
rects!
 const ::tools::Polygon aToolsPoly( 
static_cast(pCurrAct)->GetRect(),
  
static_cast(pCurrAct)->GetStartPoint(),
- 
static_cast(pCurrAct)->GetEndPoint(), POLY_PIE );
+ 
static_cast(pCurrAct)->GetEndPoint(), PolyStyle::Pie );
 ::basegfx::B2DPolygon aPoly( 
aToolsPoly.getB2DPolygon() );
 aPoly.transform( rStates.getState().mapModeTransform );
 
@@ -2035,7 +2035,7 @@ namespace cppcanvas
 // TODO(F1): Missing basegfx functionality. Mind empty 
rects!
 const ::tools::Polygon aToolsPoly( 
static_cast(pCurrAct)->GetRect(),
  
static_cast(pCurrAct)->GetStartPoint(),
- 
static_cast(pCurrAct)->GetEndPoint(), POLY_CHORD );
+ 
static_cast(pCurrAct)->GetEndPoint(), PolyStyle::Chord );
 ::basegfx::B2DPolygon aPoly( 
aToolsPoly.getB2DPolygon() );
 aPoly.transform( rStates.getState().mapModeTransform );
 
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx 
b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 0784603..fbc15f5 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -1845,7 +1845,7 @@ namespace
 if(rPropertyHolders.Current().getLineColorActive())
 {
 const MetaArcAction* pA = static_cast(pAction);
-const tools::Polygon aToolsPoly(pA->GetRect(), 
pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC);
+const tools::Polygon aToolsPoly(pA->GetRect(), 
pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Arc);
 const basegfx::B2DPolygon 
aOutline(aToolsPoly.getB2DPolygon());
 
 createHairlinePrimitive(aOutline, 
rTargetHolders.Current(), rPropertyHolder

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

2016-10-25 Thread Rosen
 cppcanvas/source/mtfrenderer/implrenderer.cxx   |8 
 drawinglayer/source/primitive2d/animatedprimitive2d.cxx |2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 8ae33b1652cb1e654c426350169d3bb9fa031a4f
Author: Rosen 
Date:   Fri Sep 23 07:29:44 2016 +0530

tdf#96505 Get rid of cargo cult "long" integer literals

fixed all long integer literals in file

Change-Id: Ib557d88d4e4f17d5c334c92d611d002fe163f2f6
Reviewed-on: https://gerrit.libreoffice.org/29235
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 0491553..2a2bcc2 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1577,8 +1577,8 @@ namespace cppcanvas
 // #i44110# correct null-sized output - there
 // are metafiles which have zero size in at
 // least one dimension
-const Size aMtfSizePix( ::std::max( 
aMtfSizePixPre.Width(), 1L ),
-::std::max( 
aMtfSizePixPre.Height(), 1L ) );
+const Size aMtfSizePix( ::std::max( 
(int)aMtfSizePixPre.Width(), 1 ),
+::std::max( 
(int)aMtfSizePixPre.Height(), 1 ) );
 
 // Setup local transform, such that the
 // metafile renders itself into the given
@@ -2914,8 +2914,8 @@ namespace cppcanvas
 
 // #i44110# correct null-sized output - there are shapes
 // which have zero size in at least one dimension
-const Size aMtfSizePix( ::std::max( aMtfSizePixPre.Width(), 1L ),
-::std::max( aMtfSizePixPre.Height(), 1L ) 
);
+const Size aMtfSizePix( ::std::max( (int)aMtfSizePixPre.Width(), 1 
),
+::std::max( (int)aMtfSizePixPre.Height(), 
1 ) );
 
 sal_Int32 nCurrActions(0);
 ActionFactoryParameters aParms(aStateStack,
diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx 
b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
index 2fa2916..2ea970a 100644
--- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
@@ -80,7 +80,7 @@ namespace drawinglayer
 
 if(nIndex >= nLen)
 {
-nIndex = nLen - 1L;
+nIndex = nLen - 1;
 }
 
 const Primitive2DReference xRef(getChildren()[nIndex], 
uno::UNO_QUERY_THROW);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cppcanvas/source drawinglayer/source filter/source include/vcl svtools/source svx/source test/source vcl/source

2015-05-15 Thread Caolán McNamara
 cppcanvas/source/mtfrenderer/implrenderer.cxx|8 
 cppcanvas/source/mtfrenderer/transparencygroupaction.cxx |2 +-
 drawinglayer/source/primitive2d/metafileprimitive2d.cxx  |2 +-
 filter/source/flash/swfwriter1.cxx   |2 +-
 filter/source/graphicfilter/eos2met/eos2met.cxx  |2 +-
 filter/source/graphicfilter/epict/epict.cxx  |2 +-
 filter/source/graphicfilter/eps/eps.cxx  |2 +-
 filter/source/svg/svgwriter.cxx  |2 +-
 include/vcl/metaactiontypes.hxx  |2 +-
 svtools/source/graphic/grfcache.cxx  |2 +-
 svtools/source/graphic/grfmgr2.cxx   |2 +-
 svx/source/svdraw/svdfmtf.cxx|2 +-
 test/source/mtfxmldump.cxx   |2 +-
 vcl/source/filter/wmf/emfwr.cxx  |2 +-
 vcl/source/filter/wmf/wmfwr.cxx  |2 +-
 vcl/source/gdi/cvtsvm.cxx|2 +-
 vcl/source/gdi/gdimetafiletools.cxx  |2 +-
 vcl/source/gdi/gdimtf.cxx|4 ++--
 vcl/source/gdi/metaact.cxx   |8 
 vcl/source/gdi/pdfwriter_impl2.cxx   |2 +-
 vcl/source/gdi/print2.cxx|   12 ++--
 21 files changed, 33 insertions(+), 33 deletions(-)

New commits:
commit dd466513a9b5412f59c38bfa1786782852033c2c
Author: Caolán McNamara 
Date:   Fri May 15 10:01:31 2015 +0100

window ftbfs: MetaActionType::TRANSPARENT->MetaActionType::Transparent

ideally camel case the rest of these for consistency

Change-Id: I7f66b8051ea58963ea28d128f73900aefe5d2846

diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index dcdbf5e..99c76b2 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -99,7 +99,7 @@ namespace
 
 // force alpha part of color to
 // opaque. transparent painting is done
-// explicitly via MetaActionType::TRANSPARENT
+// explicitly via MetaActionType::Transparent
 aColor.SetTransparency(0);
 //aColor.SetTransparency(128);
 
@@ -1242,7 +1242,7 @@ namespace cppcanvas
 // execute every action, to keep VDev state up-to-date
 // currently used only for
 // - the map mode
-// - the line/fill color when processing a 
MetaActionType::TRANSPARENT
+// - the line/fill color when processing a 
MetaActionType::Transparent
 // - SetFont to process font metric specific actions
 pCurrAct->Execute( &rVDev );
 
@@ -1431,7 +1431,7 @@ namespace cppcanvas
 
 // force alpha part of color to
 // opaque. transparent painting is done
-// explicitly via MetaActionType::TRANSPARENT
+// explicitly via MetaActionType::Transparent
 aColor.SetTransparency(0);
 
 rStates.getState().textColor =
@@ -2408,7 +2408,7 @@ namespace cppcanvas
 // TODO(F2): NYI
 break;
 
-case MetaActionType::TRANSPARENT:
+case MetaActionType::Transparent:
 {
 const OutDevState& rState( rStates.getState() );
 if( rState.lineColor.getLength() ||
diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx 
b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
index b83f9a5..cd274b3 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
@@ -311,7 +311,7 @@ namespace cppcanvas
 case MetaActionType::MASKSCALEPART:
 case MetaActionType::GRADIENTEX:
 case MetaActionType::WALLPAPER:
-case MetaActionType::TRANSPARENT:
+case MetaActionType::Transparent:
 case MetaActionType::FLOATTRANSPARENT:
 case MetaActionType::TEXT:
 case MetaActionType::TEXTARRAY:
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx 
b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 6deb31e..100d2f3 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -2833,7 +2833,7 @@ namespace
 
 break;
 }
-case MetaActionType::TRANSPARENT :
+  

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

2014-08-21 Thread Noel Grandin
 cppcanvas/source/inc/implrenderer.hxx   |2 
 cppcanvas/source/inc/outdevstate.hxx|2 
 cppcanvas/source/mtfrenderer/implrenderer.cxx   |2 
 drawinglayer/source/primitive2d/metafileprimitive2d.cxx |   14 ++--
 include/vcl/metaact.hxx |6 +-
 include/vcl/outdev.hxx  |2 
 include/vcl/outdevstate.hxx |   45 ++--
 include/vcl/pdfwriter.hxx   |2 
 test/source/mtfxmldump.cxx  |8 +-
 vcl/source/filter/wmf/wmfwr.hxx |2 
 vcl/source/gdi/gdimetafiletools.cxx |6 +-
 vcl/source/gdi/gdimtf.cxx   |6 +-
 vcl/source/gdi/metaact.cxx  |8 +-
 vcl/source/gdi/pdfwriter.cxx|2 
 vcl/source/gdi/pdfwriter_impl.cxx   |   14 ++--
 vcl/source/gdi/pdfwriter_impl.hxx   |6 +-
 vcl/source/outdev/outdevstate.cxx   |2 
 17 files changed, 72 insertions(+), 57 deletions(-)

New commits:
commit a69f8ea61ce274a5839f1904d1eba9ea91ce6676
Author: Noel Grandin 
Date:   Thu Aug 21 07:31:11 2014 +0200

vcl: convert push flags to type-safe enum-like class

Change-Id: Ib49a0dd5ecee0225f51bea2ff1c0ab5326595a47

diff --git a/cppcanvas/source/inc/implrenderer.hxx 
b/cppcanvas/source/inc/implrenderer.hxx
index 7ff185e..deb3765 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -68,7 +68,7 @@ namespace cppcanvas
 public:
 OutDevState& getState();
 const OutDevState& getState() const;
-void pushState(sal_uInt16 nFlags);
+void pushState(PushFlags nFlags);
 void popState();
 void clearStateStack();
 private:
diff --git a/cppcanvas/source/inc/outdevstate.hxx 
b/cppcanvas/source/inc/outdevstate.hxx
index d1e8c1f..15d33ec 100644
--- a/cppcanvas/source/inc/outdevstate.hxx
+++ b/cppcanvas/source/inc/outdevstate.hxx
@@ -100,7 +100,7 @@ namespace cppcanvas
 double 
 fontRotation;
 
 sal_uInt16 
 textEmphasisMarkStyle;
-sal_uInt16 
 pushFlags;
+PushFlags  
 pushFlags;
 sal_Int8   
 textDirection;
 sal_Int8   
 textAlignment;
 sal_Int8   
 textReliefStyle;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 63cb370..837609a 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -261,7 +261,7 @@ namespace cppcanvas
 return m_aStates.back();
 }
 
-void VectorOfOutDevStates::pushState(sal_uInt16 nFlags)
+void VectorOfOutDevStates::pushState(PushFlags nFlags)
 {
 m_aStates.push_back( getState() );
 getState().pushFlags = nFlags;
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx 
b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 8f77949..052d43a 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -91,7 +91,7 @@ namespace
 RasterOpmaRasterOp;
 ComplexTextLayoutMode   mnLayoutMode;
 LanguageTypemaLanguageType;
-sal_uInt16  mnPushFlags;
+PushFlags   mnPushFlags;
 
 /// bitfield
 /// contains all active markers
@@ -118,7 +118,7 @@ namespace
 maRasterOp(ROP_OVERPAINT),
 mnLayoutMode(TEXT_LAYOUT_DEFAULT),
 maLanguageType(0),
-mnPushFlags(0),
+mnPushFlags(PUSH_NONE),
 mbLineColor(false),
 mbFillColor(false),
 mbTextColor(true),
@@ -190,8 +190,8 @@ namespace
 LanguageType getLanguageType() const { return maLanguageType; }
 void setLanguageType(LanguageType aNew) { if(aNew != maLanguageType) 
maLanguageType = aNew; }
 
-sal_uInt16 getPushFlags() const { return mnPushFlags; }
-void setPushFlags(sal_uInt16 nNew) { if(nNew != mnPushFlags) 
mnPushFlags = nNew; }
+PushFlags getPushFlags() const { return mnPushFlags; }
+void setPushFlags(PushFlags nNew) { if(nNew != mnPushFlags)