summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-09 10:26:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-09 10:34:31 +0000
commit30e39e4793bbfe59a53b41422b5d86a03cfe31d3 (patch)
tree989d282b0ef9b180e56a69a946d69aba17c92ead /drawinglayer
parent0e0e3ea312dc09de6726318c3579671fec7de7ee (diff)
loplugin:expandablemethods in drawinglayer..editeng
Change-Id: Ic7fe13651e18b4eec90ef3fd8d7aab81197e0f39 Reviewed-on: https://gerrit.libreoffice.org/30707 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/attribute/sdrfillgraphicattribute.cxx7
-rw-r--r--drawinglayer/source/primitive2d/borderlineprimitive2d.cxx2
-rw-r--r--drawinglayer/source/primitive2d/primitivetools2d.cxx2
-rw-r--r--drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx19
4 files changed, 11 insertions, 19 deletions
diff --git a/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx b/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
index 09398e5cd15f..f191dc373e03 100644
--- a/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
+++ b/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
@@ -211,11 +211,6 @@ namespace drawinglayer
return mpSdrFillGraphicAttribute->getTiling();
}
- bool SdrFillGraphicAttribute::getStretch() const
- {
- return mpSdrFillGraphicAttribute->getStretch();
- }
-
FillGraphicAttribute SdrFillGraphicAttribute::createFillGraphicAttribute(const basegfx::B2DRange& rRange) const
{
// get logical size of bitmap (before possibly expanding it)
@@ -226,7 +221,7 @@ namespace drawinglayer
basegfx::B2DVector aBitmapTopLeft(0.0, 0.0);
//UUUU are changes needed? When stretched we are already done, all other values will have no influence
- if(getTiling() || !getStretch())
+ if(getTiling() || !mpSdrFillGraphicAttribute->getStretch())
{
// init values with range sizes
const double fRangeWidth(0.0 != rRange.getWidth() ? rRange.getWidth() : 1.0);
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
index 671143f309fa..3db5cb2d799e 100644
--- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
@@ -240,7 +240,7 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
const basegfx::B2DPoint aTmpEnd(getEnd() + (fExt * aVector));
// Get which is the line to show
- bool bIsSolidline = isSolidLine();
+ bool bIsSolidline = mnStyle == css::table::BorderLineStyle::SOLID;
double nWidth = getLeftWidth();
basegfx::BColor aColor = getRGBColorLeft();
if ( basegfx::fTools::equal( 0.0, mfLeftWidth ) )
diff --git a/drawinglayer/source/primitive2d/primitivetools2d.cxx b/drawinglayer/source/primitive2d/primitivetools2d.cxx
index 509bff79a83e..494a8cd38f6f 100644
--- a/drawinglayer/source/primitive2d/primitivetools2d.cxx
+++ b/drawinglayer/source/primitive2d/primitivetools2d.cxx
@@ -43,7 +43,7 @@ namespace drawinglayer
if(getBuffered2DDecomposition().empty())
{
// remember new valid DiscreteUnit
- const_cast< DiscreteMetricDependentPrimitive2D* >(this)->updateDiscreteUnit(fDiscreteUnit);
+ const_cast< DiscreteMetricDependentPrimitive2D* >(this)->mfDiscreteUnit = fDiscreteUnit;
}
// call base implementation
diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
index e0fe820c3838..144759735e14 100644
--- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
@@ -346,16 +346,6 @@ namespace drawinglayer
{
}
- bool TextDecoratedPortionPrimitive2D::decoratedIsNeeded() const
- {
- return (TEXT_LINE_NONE != getFontOverline()
- || TEXT_LINE_NONE != getFontUnderline()
- || TEXT_STRIKEOUT_NONE != getTextStrikeout()
- || TEXT_FONT_EMPHASIS_MARK_NONE != getTextEmphasisMark()
- || TEXT_RELIEF_NONE != getTextRelief()
- || getShadow());
- }
-
bool TextDecoratedPortionPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
{
if(TextSimplePortionPrimitive2D::operator==(rPrimitive))
@@ -384,7 +374,14 @@ namespace drawinglayer
// inking area, so add them if needed
basegfx::B2DRange TextDecoratedPortionPrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const
{
- if(decoratedIsNeeded())
+ // check if this needs to be a TextDecoratedPortionPrimitive2D or
+ // if a TextSimplePortionPrimitive2D would be suficcient
+ if (TEXT_LINE_NONE != getFontOverline()
+ || TEXT_LINE_NONE != getFontUnderline()
+ || TEXT_STRIKEOUT_NONE != getTextStrikeout()
+ || TEXT_FONT_EMPHASIS_MARK_NONE != getTextEmphasisMark()
+ || TEXT_RELIEF_NONE != getTextRelief()
+ || getShadow())
{
// decoration is used, fallback to BufferedDecompositionPrimitive2D::getB2DRange which uses
// the own local decomposition for computation and thus creates all necessary