[Libreoffice-commits] core.git: 2 commits - drawinglayer/source solenv/clang-format
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 14 21:24:09 UTC 2020
drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 6
drawinglayer/source/processor2d/vclpixelprocessor2d.hxx | 120 ++++++++--------
solenv/clang-format/blacklist | 1
3 files changed, 69 insertions(+), 58 deletions(-)
New commits:
commit 38c5cfa1da8f0a615e479a68f3bcb238395109a8
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:22:26 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Apr 14 23:23:50 2020 +0200
fdo#43157: VclPixelProcessor2D replace OSL_ENSURE with SAL_WARN_IF
Change-Id: I4a6c46f9054f9a32d52f1f60f5f7547e62cf7a5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92223
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 972c08481040..9102230f4305 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -581,7 +581,7 @@ namespace drawinglayer::processor2d
{
// single transparent tools::PolyPolygon identified, use directly
const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = static_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(pBasePrimitive);
- OSL_ENSURE(pPoPoColor, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+ SAL_WARN_IF(!pPoPoColor, "drawinglayer", "OOps, PrimitiveID and PrimitiveType do not match (!)");
bDrawTransparentUsed = true;
tryDrawPolyPolygonColorPrimitive2DDirect(*pPoPoColor, rUniTransparenceCandidate.getTransparence());
break;
@@ -590,7 +590,7 @@ namespace drawinglayer::processor2d
{
// single transparent PolygonHairlinePrimitive2D identified, use directly
const primitive2d::PolygonHairlinePrimitive2D* pPoHair = static_cast< const primitive2d::PolygonHairlinePrimitive2D* >(pBasePrimitive);
- OSL_ENSURE(pPoHair, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+ SAL_WARN_IF(!pPoHair, "drawinglayer", "OOps, PrimitiveID and PrimitiveType do not match (!)");
// do no tallow by default - problem is that self-overlapping parts of this geometry will
// not be in an all-same transparency but will already alpha-cover themselves with blending.
@@ -604,7 +604,7 @@ namespace drawinglayer::processor2d
{
// single transparent PolygonStrokePrimitive2D identified, use directly
const primitive2d::PolygonStrokePrimitive2D* pPoStroke = static_cast< const primitive2d::PolygonStrokePrimitive2D* >(pBasePrimitive);
- OSL_ENSURE(pPoStroke, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+ SAL_WARN_IF(!pPoStroke, "drawinglayer", "OOps, PrimitiveID and PrimitiveType do not match (!)");
// do no tallow by default - problem is that self-overlapping parts of this geometry will
// not be in an all-same transparency but will already alpha-cover themselves with blending.
commit b753515b0e6f24193d70dd64506df1b484e65423
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:17:28 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Apr 14 23:23:32 2020 +0200
remove vclpixelprocessor2d.hxx from clang-format blacklist
Change-Id: I5fe33322ff0df5191f57f1364a2d32eefc889d68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92222
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
index 1ee765ab1e51..5c834056c947 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
@@ -24,69 +24,81 @@
#include <memory>
-namespace drawinglayer::primitive2d {
- class PolyPolygonColorPrimitive2D;
- class PolygonHairlinePrimitive2D;
- class PolygonStrokePrimitive2D;
- class WrongSpellPrimitive2D;
- class TextSimplePortionPrimitive;
- class BitmapPrimitive2D;
- class PolyPolygonGradientPrimitive2D;
- class UnifiedTransparencePrimitive2D;
- class ControlPrimitive2D;
- class PolygonStrokePrimitive2D;
- class FillHatchPrimitive2D;
- class BackgroundColorPrimitive2D;
- class BorderLinePrimitive2D;
+namespace drawinglayer::primitive2d
+{
+class PolyPolygonColorPrimitive2D;
+class PolygonHairlinePrimitive2D;
+class PolygonStrokePrimitive2D;
+class WrongSpellPrimitive2D;
+class TextSimplePortionPrimitive;
+class BitmapPrimitive2D;
+class PolyPolygonGradientPrimitive2D;
+class UnifiedTransparencePrimitive2D;
+class ControlPrimitive2D;
+class PolygonStrokePrimitive2D;
+class FillHatchPrimitive2D;
+class BackgroundColorPrimitive2D;
+class BorderLinePrimitive2D;
}
namespace drawinglayer::processor2d
{
- /** VclPixelProcessor2D class
+/** VclPixelProcessor2D class
- This processor derived from VclProcessor2D is the base class for rendering
- all fed primitives to a VCL Window. It is the currently used renderer
- for all VCL editing output from the DrawingLayer.
- */
- class VclPixelProcessor2D final : public VclProcessor2D
- {
- struct Impl;
- std::unique_ptr<Impl> m_pImpl;
+ This processor derived from VclProcessor2D is the base class for rendering
+ all fed primitives to a VCL Window. It is the currently used renderer
+ for all VCL editing output from the DrawingLayer.
+ */
+class VclPixelProcessor2D final : public VclProcessor2D
+{
+ struct Impl;
+ std::unique_ptr<Impl> m_pImpl;
- /* the local processor for BasePrimitive2D-Implementation based primitives,
- called from the common process()-implementation
- */
- virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) override;
+ /* the local processor for BasePrimitive2D-Implementation based primitives,
+ called from the common process()-implementation
+ */
+ virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) override;
- // some helpers to try direct paints (shortcuts)
- void tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency);
- bool tryDrawPolygonHairlinePrimitive2DDirect(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D& rSource, double fTransparency);
- bool tryDrawPolygonStrokePrimitive2DDirect(const drawinglayer::primitive2d::PolygonStrokePrimitive2D& rSource, double fTransparency);
+ // some helpers to try direct paints (shortcuts)
+ void tryDrawPolyPolygonColorPrimitive2DDirect(
+ const primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency);
+ bool
+ tryDrawPolygonHairlinePrimitive2DDirect(const primitive2d::PolygonHairlinePrimitive2D& rSource,
+ double fTransparency);
+ bool tryDrawPolygonStrokePrimitive2DDirect(const primitive2d::PolygonStrokePrimitive2D& rSource,
+ double fTransparency);
- void processWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellPrimitive);
- void processTextSimplePortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
- void processTextDecoratedPortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
- void processPolygonHairlinePrimitive2D(const primitive2d::PolygonHairlinePrimitive2D& rPolygonHairlinePrimitive2D);
- void processBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
- void processPolyPolygonGradientPrimitive2D(const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate);
- void processPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolyPolygonColorPrimitive2D);
- void processUnifiedTransparencePrimitive2D(const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate);
- void processControlPrimitive2D(const primitive2d::ControlPrimitive2D& rControlPrimitive);
- void processPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive2D);
- void processFillHatchPrimitive2D(const primitive2d::FillHatchPrimitive2D& rFillHatchPrimitive);
- void processBackgroundColorPrimitive2D(const primitive2d::BackgroundColorPrimitive2D& rPrimitive);
- void processBorderLinePrimitive2D(const drawinglayer::primitive2d::BorderLinePrimitive2D& rBorder);
- void processInvertPrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
- void processMetaFilePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
+ void
+ processWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellPrimitive);
+ void processTextSimplePortionPrimitive2D(
+ const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
+ void processTextDecoratedPortionPrimitive2D(
+ const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
+ void processPolygonHairlinePrimitive2D(
+ const primitive2d::PolygonHairlinePrimitive2D& rPolygonHairlinePrimitive2D);
+ void processBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
+ void processPolyPolygonGradientPrimitive2D(
+ const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate);
+ void processPolyPolygonColorPrimitive2D(
+ const primitive2d::PolyPolygonColorPrimitive2D& rPolyPolygonColorPrimitive2D);
+ void processUnifiedTransparencePrimitive2D(
+ const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate);
+ void processControlPrimitive2D(const primitive2d::ControlPrimitive2D& rControlPrimitive);
+ void processPolygonStrokePrimitive2D(
+ const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive2D);
+ void processFillHatchPrimitive2D(const primitive2d::FillHatchPrimitive2D& rFillHatchPrimitive);
+ void
+ processBackgroundColorPrimitive2D(const primitive2d::BackgroundColorPrimitive2D& rPrimitive);
+ void
+ processBorderLinePrimitive2D(const drawinglayer::primitive2d::BorderLinePrimitive2D& rBorder);
+ void processInvertPrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
+ void processMetaFilePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
- public:
- /// constructor/destructor
- VclPixelProcessor2D(
- const geometry::ViewInformation2D& rViewInformation,
- OutputDevice& rOutDev);
- virtual ~VclPixelProcessor2D() override;
- };
+public:
+ /// constructor/destructor
+ VclPixelProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev);
+ virtual ~VclPixelProcessor2D() override;
+};
} // end of namespace drawinglayer::processor2d
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 7da40d322789..d92622eb77a1 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -3757,7 +3757,6 @@ drawinglayer/source/processor2d/vclhelperbufferdevice.hxx
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
-drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
drawinglayer/source/processor2d/vclprocessor2d.cxx
drawinglayer/source/processor3d/baseprocessor3d.cxx
drawinglayer/source/processor3d/cutfindprocessor3d.cxx
More information about the Libreoffice-commits
mailing list