[Libreoffice-commits] core.git: 2 commits - include/vcl sc/source sw/source vcl/source vcl/workben

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 5 06:51:46 UTC 2018


 include/vcl/GraphicObject.hxx         |   17 +----------------
 include/vcl/outdev.hxx                |    7 +++----
 include/vcl/salgtype.hxx              |    7 +++----
 sc/source/ui/view/printfun.cxx        |    1 -
 sw/source/core/layout/paintfrm.cxx    |    1 -
 vcl/source/graphic/GraphicObject.cxx  |    4 ++--
 vcl/source/graphic/GraphicObject2.cxx |   16 ++++++++--------
 vcl/source/outdev/rect.cxx            |    4 ----
 vcl/workben/vcldemo.cxx               |    1 -
 9 files changed, 17 insertions(+), 41 deletions(-)

New commits:
commit 6ba25b96e6187931c0651f099413dbf1e2a7ab97
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Dec 4 09:16:04 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Dec 5 07:51:32 2018 +0100

    remove unused InvertFlags::Highlight
    
    Change-Id: Id881142f39a6160b8040d0446476767aad83f260
    Reviewed-on: https://gerrit.libreoffice.org/64558
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 0d6b80eb6bc2..1d4a936e22a6 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -267,13 +267,12 @@ namespace o3tl
 enum class InvertFlags
 {
     NONE                    = 0x0000,
-    Highlight               = 0x0001,
-    N50                     = 0x0002,
-    TrackFrame              = 0x0004
+    N50                     = 0x0001,
+    TrackFrame              = 0x0002
 };
 namespace o3tl
 {
-    template<> struct typed_flags<InvertFlags> : is_typed_flags<InvertFlags, 0x0007> {};
+    template<> struct typed_flags<InvertFlags> : is_typed_flags<InvertFlags, 0x0003> {};
 }
 
 enum OutDevType { OUTDEV_WINDOW, OUTDEV_PRINTER, OUTDEV_VIRDEV, OUTDEV_PDF };
diff --git a/include/vcl/salgtype.hxx b/include/vcl/salgtype.hxx
index d920ede00dac..a373a0a62d07 100644
--- a/include/vcl/salgtype.hxx
+++ b/include/vcl/salgtype.hxx
@@ -84,13 +84,12 @@ enum class SalROPColor {
 
 enum class SalInvert {
     NONE       = 0x00,
-    Highlight  = 0x01,
-    N50        = 0x02,
-    TrackFrame = 0x04
+    N50        = 0x01,
+    TrackFrame = 0x02
 };
 namespace o3tl
 {
-    template<> struct typed_flags<SalInvert> : is_typed_flags<SalInvert, 0x07> {};
+    template<> struct typed_flags<SalInvert> : is_typed_flags<SalInvert, 0x03> {};
 }
 
 #endif // INCLUDED_VCL_SALGTYPE_HXX
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 0770b68db5b6..67343278a1be 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -149,8 +149,6 @@ void OutputDevice::Invert( const tools::Rectangle& rRect, InvertFlags nFlags )
         return;
 
     SalInvert nSalFlags = SalInvert::NONE;
-    if ( nFlags & InvertFlags::Highlight )
-        nSalFlags |= SalInvert::Highlight;
     if ( nFlags & InvertFlags::N50 )
         nSalFlags |= SalInvert::N50;
     if ( nFlags & InvertFlags::TrackFrame )
@@ -182,8 +180,6 @@ void OutputDevice::Invert( const tools::Polygon& rPoly, InvertFlags nFlags )
         return;
 
     SalInvert nSalFlags = SalInvert::NONE;
-    if ( nFlags & InvertFlags::Highlight )
-        nSalFlags |= SalInvert::Highlight;
     if ( nFlags & InvertFlags::N50 )
         nSalFlags |= SalInvert::N50;
     if ( nFlags & InvertFlags::TrackFrame )
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index b14bc4d96c80..27950196282b 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -767,7 +767,6 @@ public:
                 auto aRegions = partition(rCtx, 2, 2);
                 doInvert(rDev, aRegions[0], InvertFlags::NONE);
                 doInvert(rDev, aRegions[1], InvertFlags::N50);
-                doInvert(rDev, aRegions[2], InvertFlags::Highlight);
                 doInvert(rDev, aRegions[3], InvertFlags::TrackFrame);
             }
         }
commit df55a6ca81848a5a095f08ae5265186d38176d40
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Dec 4 08:37:09 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Dec 5 07:51:19 2018 +0100

    remove unused GraphicManagerDrawFlags enum
    
    Change-Id: I12ef5e6257db337c4432b251bc92107a2c2ea88b
    Reviewed-on: https://gerrit.libreoffice.org/64557
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/vcl/GraphicObject.hxx b/include/vcl/GraphicObject.hxx
index 854cc14ec6fd..9ffbd9a73ba2 100644
--- a/include/vcl/GraphicObject.hxx
+++ b/include/vcl/GraphicObject.hxx
@@ -27,17 +27,6 @@
 namespace com { namespace sun { namespace star { namespace graphic { class XGraphic; } } } }
 namespace o3tl { template <typename T> struct typed_flags; }
 
-enum class GraphicManagerDrawFlags
-{
-    CACHED                  = 0x01,
-    SMOOTHSCALE             = 0x02,
-    STANDARD                = CACHED | SMOOTHSCALE,
-};
-namespace o3tl
-{
-    template<> struct typed_flags<GraphicManagerDrawFlags> : is_typed_flags<GraphicManagerDrawFlags, 0x02> {};
-}
-
 // Adjustment defines
 enum class GraphicAdjustmentFlags
 {
@@ -214,8 +203,7 @@ private:
                                 int nNumTilesX,
                                 int nNumTilesY,
                                 const Size& rTileSizePixel,
-                                const GraphicAttr* pAttr,
-                                GraphicManagerDrawFlags nFlags
+                                const GraphicAttr* pAttr
                             );
 
     /// internally called by ImplRenderTempTile()
@@ -229,7 +217,6 @@ private:
                                 int nRemainderTilesY,
                                 const Size& rTileSizePixel,
                                 const GraphicAttr* pAttr,
-                                GraphicManagerDrawFlags nFlags,
                                 ImplTileInfo& rTileInfo
                             );
 
@@ -239,7 +226,6 @@ private:
                                 const Size& rSizePixel,
                                 const Size& rOffset,
                                 const GraphicAttr* pAttr,
-                                GraphicManagerDrawFlags nFlags,
                                 int nTileCacheSize1D
                             );
 
@@ -365,7 +351,6 @@ public:
                                 const tools::Rectangle& rArea,
                                 const Size& rSize,
                                 const Size& rOffset,
-                                GraphicManagerDrawFlags nFlags = GraphicManagerDrawFlags::STANDARD,
                                 int nTileCacheSize1D=128
                             );
 
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index b2de8a6bf82d..e144046b7fd7 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1229,7 +1229,6 @@ static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOu
                             const double    Abitmap( k1/k2 * aSize.Width()*aSize.Height() );
 
                             aObject.DrawTiled( pOut, rOrg, aGrfSize, Size(0,0),
-                                               GraphicManagerDrawFlags::STANDARD,
                                                ::std::max( 128, static_cast<int>( sqrt(sqrt( Abitmap)) + .5 ) ) );
                         }
                         else
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 57d7d95da130..020ae12a4f3d 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1927,7 +1927,6 @@ void DrawGraphic(
                                         aAlignedPaintRect.SVRect(),
                                         aGrf.SSize(),
                                         Size( aPaintOffset.X(), aPaintOffset.Y() ),
-                                        GraphicManagerDrawFlags::STANDARD,
                                         std::max( 128, static_cast<int>( sqrt(sqrt( Abitmap)) + .5 ) ) );
             }
             // reset clipping at output device
diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx
index cbfd8a84f4d5..bcfc50c849a1 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -529,7 +529,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
 }
 
 void GraphicObject::DrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea, const Size& rSize,
-                               const Size& rOffset, GraphicManagerDrawFlags nFlags, int nTileCacheSize1D )
+                               const Size& rOffset, int nTileCacheSize1D )
 {
     if( pOut == nullptr || rSize.Width() == 0 || rSize.Height() == 0 )
         return;
@@ -547,7 +547,7 @@ void GraphicObject::DrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea
     while ((static_cast<sal_Int64>(rSize.Height()) * nTileCacheSize1D) > SAL_MAX_UINT16)
         nTileCacheSize1D /= 2;
 
-    ImplDrawTiled( pOut, rArea, aOutTileSize, rOffset, nullptr, nFlags, nTileCacheSize1D );
+    ImplDrawTiled( pOut, rArea, aOutTileSize, rOffset, nullptr, nTileCacheSize1D );
 }
 
 bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz,
diff --git a/vcl/source/graphic/GraphicObject2.cxx b/vcl/source/graphic/GraphicObject2.cxx
index 644814e6e763..ac3be21a5bfa 100644
--- a/vcl/source/graphic/GraphicObject2.cxx
+++ b/vcl/source/graphic/GraphicObject2.cxx
@@ -67,7 +67,7 @@ struct ImplTileInfo
 bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev,
                                         int nNumTilesX, int nNumTilesY,
                                         const Size& rTileSizePixel,
-                                        const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags )
+                                        const GraphicAttr* pAttr )
 {
     // how many tiles to generate per recursion step
     const int nExponent = 2;
@@ -93,7 +93,7 @@ bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev,
     rVDev.EnableMapMode( false );
 
     bool bRet( ImplRenderTileRecursive( rVDev, nExponent, nMSBFactor, nNumTilesX, nNumTilesY,
-                                        nNumTilesX, nNumTilesY, rTileSizePixel, pAttr, nFlags, aTileInfo ) );
+                                        nNumTilesX, nNumTilesY, rTileSizePixel, pAttr, aTileInfo ) );
 
     rVDev.EnableMapMode( bOldMap );
 
@@ -111,7 +111,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
                                              int nNumOrigTilesX, int nNumOrigTilesY,
                                              int nRemainderTilesX, int nRemainderTilesY,
                                              const Size& rTileSizePixel, const GraphicAttr* pAttr,
-                                             GraphicManagerDrawFlags nFlags, ImplTileInfo& rTileInfo )
+                                             ImplTileInfo& rTileInfo )
 {
     // gets loaded with our tile bitmap
     std::unique_ptr<GraphicObject> xTmpGraphic;
@@ -145,7 +145,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
     else if( ImplRenderTileRecursive( rVDev, nExponent, nMSBFactor/nExponent,
                                       nNumOrigTilesX, nNumOrigTilesY,
                                       nNewRemainderX, nNewRemainderY,
-                                      rTileSizePixel, pAttr, nFlags, aTileInfo ) )
+                                      rTileSizePixel, pAttr, aTileInfo ) )
     {
         // extract generated tile -> see comment on the first loop below
         BitmapEx aTileBitmap( rVDev.GetBitmap( aTileInfo.aTileTopLeft, aTileInfo.aTileSizePixel ) );
@@ -282,7 +282,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
 }
 
 bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const tools::Rectangle& rArea, const Size& rSizePixel,
-                                   const Size& rOffset, const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags, int nTileCacheSize1D )
+                                   const Size& rOffset, const GraphicAttr* pAttr, int nTileCacheSize1D )
 {
     const MapMode   aOutMapMode( pOut->GetMapMode() );
     const MapMode   aMapMode( aOutMapMode.GetMapUnit(), Point(), aOutMapMode.GetScaleX(), aOutMapMode.GetScaleY() );
@@ -307,7 +307,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const tools::Rectangle& r
 
         // draw bitmap content
         if( ImplRenderTempTile( *aVDev.get(), nNumTilesInCacheX,
-                                nNumTilesInCacheY, rSizePixel, pAttr, nFlags ) )
+                                nNumTilesInCacheY, rSizePixel, pAttr ) )
         {
             BitmapEx aTileBitmap( aVDev->GetBitmap( Point(0,0), aVDev->GetOutputSize() ) );
 
@@ -322,7 +322,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const tools::Rectangle& r
                     aAlphaGraphic.SetGraphic( GetGraphic().GetBitmapEx().GetMask() );
 
                 if( aAlphaGraphic.ImplRenderTempTile( *aVDev.get(), nNumTilesInCacheX,
-                                                      nNumTilesInCacheY, rSizePixel, pAttr, nFlags ) )
+                                                      nNumTilesInCacheY, rSizePixel, pAttr ) )
                 {
                     // Combine bitmap and alpha/mask
                     if( GetGraphic().IsAlpha() )
@@ -338,7 +338,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const tools::Rectangle& r
             GraphicObject aTmpGraphic( aTileBitmap );
             bRet = aTmpGraphic.ImplDrawTiled( pOut, rArea,
                                               aTileBitmap.GetSizePixel(),
-                                              rOffset, pAttr, nFlags, nTileCacheSize1D );
+                                              rOffset, pAttr, nTileCacheSize1D );
         }
     }
     else


More information about the Libreoffice-commits mailing list