[Libreoffice-commits] core.git: compilerplugins/clang include/vcl vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 27 09:14:40 UTC 2018
compilerplugins/clang/unusedenumconstants.readonly.results | 2 --
include/vcl/GraphicObject.hxx | 11 ++++-------
vcl/source/graphic/GraphicObject.cxx | 5 ++---
vcl/source/graphic/GraphicObject2.cxx | 12 ++++++------
4 files changed, 12 insertions(+), 18 deletions(-)
New commits:
commit ba51e421670c6710f1ed13e38aab8646c1ec8ce9
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Nov 26 09:41:23 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Nov 27 10:14:13 2018 +0100
remove unused GraphicManagerDrawFlags enum value
Change-Id: I9e832da8f6b7a90d72c07ab712cbe00774496b76
Reviewed-on: https://gerrit.libreoffice.org/64060
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results b/compilerplugins/clang/unusedenumconstants.readonly.results
index 1eb66c1a180d..7c11fde9de35 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -884,8 +884,6 @@ include/vcl/fontcapabilities.hxx:191
enum vcl::CodePageCoverage::CodePageCoverageEnum CP850
include/vcl/fontcapabilities.hxx:192
enum vcl::CodePageCoverage::CodePageCoverageEnum CP437
-include/vcl/GraphicObject.hxx:36
- enum GraphicManagerDrawFlags USE_DRAWMODE_SETTINGS
include/vcl/GraphicObject.hxx:55
enum GraphicAdjustmentFlags DRAWMODE
include/vcl/GraphicObject.hxx:56
diff --git a/include/vcl/GraphicObject.hxx b/include/vcl/GraphicObject.hxx
index 88038fb71afe..b30808e493f4 100644
--- a/include/vcl/GraphicObject.hxx
+++ b/include/vcl/GraphicObject.hxx
@@ -33,12 +33,11 @@ enum class GraphicManagerDrawFlags
{
CACHED = 0x01,
SMOOTHSCALE = 0x02,
- USE_DRAWMODE_SETTINGS = 0x04,
- STANDARD = (CACHED|SMOOTHSCALE),
+ STANDARD = CACHED | SMOOTHSCALE,
};
namespace o3tl
{
- template<> struct typed_flags<GraphicManagerDrawFlags> : is_typed_flags<GraphicManagerDrawFlags, 0x07> {};
+ template<> struct typed_flags<GraphicManagerDrawFlags> : is_typed_flags<GraphicManagerDrawFlags, 0x02> {};
}
// Adjustment defines
@@ -255,8 +254,7 @@ private:
int nNumTilesX,
int nNumTilesY,
const Size& rTileSize,
- const GraphicAttr* pAttr,
- GraphicManagerDrawFlags nFlags
+ const GraphicAttr* pAttr
);
void VCL_DLLPRIVATE ImplTransformBitmap(
@@ -336,8 +334,7 @@ public:
OutputDevice* pOut,
const Point& rPt,
const Size& rSz,
- const GraphicAttr* pAttr = nullptr,
- GraphicManagerDrawFlags nFlags = GraphicManagerDrawFlags::STANDARD
+ const GraphicAttr* pAttr = nullptr
);
/** Draw the graphic repeatedly into the given output rectangle
diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx
index 7710708fc6fe..66b4f6fd9b6f 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -463,7 +463,7 @@ void GraphicObject::SetUserData( const OUString& rUserData )
}
bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags )
+ const GraphicAttr* pAttr )
{
GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() );
Point aPt( rPt );
@@ -475,8 +475,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
// #i29534# Provide output rects for PDF writer
tools::Rectangle aCropRect;
- if( !( GraphicManagerDrawFlags::USE_DRAWMODE_SETTINGS & nFlags ) )
- pOut->SetDrawMode( nOldDrawMode & ~DrawModeFlags( DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient ) );
+ pOut->SetDrawMode( nOldDrawMode & ~DrawModeFlags( DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient ) );
// mirrored horizontically
if( aSz.Width() < 0 )
diff --git a/vcl/source/graphic/GraphicObject2.cxx b/vcl/source/graphic/GraphicObject2.cxx
index da5f61f588a1..644814e6e763 100644
--- a/vcl/source/graphic/GraphicObject2.cxx
+++ b/vcl/source/graphic/GraphicObject2.cxx
@@ -178,7 +178,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
Point aCurrPos(aTileInfo.aNextTileTopLeft.X(), aTileInfo.aTileTopLeft.Y());
for (int nX=0; nX < aTileInfo.nTilesEmptyX; nX += nMSBFactor)
{
- if (!pTileGraphic->Draw(&rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr, nFlags))
+ if (!pTileGraphic->Draw(&rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr))
return false;
aCurrPos.AdjustX(aTileInfo.aTileSizePixel.Width() );
@@ -199,7 +199,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
aCurrPos.setY( aTileInfo.aNextTileTopLeft.Y() );
for (int nY=0; nY < aTileInfo.nTilesEmptyY; nY += nMSBFactor)
{
- if (!pTileGraphic->Draw(&rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr, nFlags))
+ if (!pTileGraphic->Draw(&rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr))
return false;
aCurrPos.AdjustY(aTileInfo.aTileSizePixel.Height() );
@@ -259,7 +259,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
{
if( bNoFirstTileDraw )
bNoFirstTileDraw = false; // don't draw first tile position
- else if (!pTileGraphic->Draw(&rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr, nFlags))
+ else if (!pTileGraphic->Draw(&rVDev, aCurrPos, aTileInfo.aTileSizePixel, pAttr))
return false;
aCurrPos.AdjustX(aTileInfo.aTileSizePixel.Width() );
@@ -378,7 +378,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const tools::Rectangle& r
bRet = ImplDrawTiled( *pOut, aOutStart,
(aOutArea.GetWidth() + aOutArea.Left() - aOutStart.X() + rSizePixel.Width() - 1) / rSizePixel.Width(),
(aOutArea.GetHeight() + aOutArea.Top() - aOutStart.Y() + rSizePixel.Height() - 1) / rSizePixel.Height(),
- rSizePixel, pAttr, nFlags );
+ rSizePixel, pAttr );
pOut->Pop();
}
@@ -388,7 +388,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const tools::Rectangle& r
bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
int nNumTilesX, int nNumTilesY,
- const Size& rTileSizePixel, const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags )
+ const Size& rTileSizePixel, const GraphicAttr* pAttr )
{
Point aCurrPos( rPosPixel );
Size aTileSizeLogic( rOut.PixelToLogic( rTileSizePixel ) );
@@ -420,7 +420,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
bRet |= Draw( &rOut,
bDrawInPixel ? aCurrPos : rOut.PixelToLogic( aCurrPos ),
bDrawInPixel ? rTileSizePixel : aTileSizeLogic,
- pAttr, nFlags );
+ pAttr );
aCurrPos.AdjustX(rTileSizePixel.Width() );
}
More information about the Libreoffice-commits
mailing list