include/vcl/bitmap.hxx | 3 svx/inc/sdr/overlay/overlaytools.hxx | 10 - svx/inc/sdr/primitive2d/sdrprimitivetools.hxx | 2 svx/source/dialog/_bmpmask.cxx | 2 svx/source/dialog/_contdlg.cxx | 2 svx/source/sdr/overlay/overlayanimatedbitmapex.cxx | 4 svx/source/sdr/overlay/overlaybitmapex.cxx | 2 svx/source/sdr/overlay/overlaytools.cxx | 10 - svx/source/svdraw/svdfmtf.cxx | 14 - svx/source/svdraw/svdhdl.cxx | 10 - svx/source/svdraw/svdxcgv.cxx | 2 svx/source/xoutdev/_xoutbmp.cxx | 2 svx/source/xoutdev/xattrbmp.cxx | 2 vcl/source/bitmap/bitmap.cxx | 190 +++++++++++++++++++++ 14 files changed, 224 insertions(+), 31 deletions(-)
New commits: commit b31eba58d9522c543e56a96672ce2ce9a5153a9d Author: Noel Grandin <[email protected]> AuthorDate: Sat Aug 30 21:14:46 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sun Aug 31 07:38:36 2025 +0200 BitmapEx->Bitmap in svx Change-Id: I3e976602430d5524500a0240c70e6315f9380276 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190424 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index d5fd388efca3..ce8f5450bcbd 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -545,6 +545,9 @@ public: */ void ReplaceTransparency( const Color& rColor ); + /** Get contours in image */ + tools::Polygon GetContour( bool bContourEdgeDetect, const tools::Rectangle* pWorkRect ); + /** Change various global color characteristics @param nLuminancePercent diff --git a/svx/inc/sdr/primitive2d/sdrprimitivetools.hxx b/svx/inc/sdr/primitive2d/sdrprimitivetools.hxx index 891ba95bc517..5a9570b0d31c 100644 --- a/svx/inc/sdr/primitive2d/sdrprimitivetools.hxx +++ b/svx/inc/sdr/primitive2d/sdrprimitivetools.hxx @@ -32,7 +32,7 @@ class BColor; namespace drawinglayer::primitive2d { -// create a 3x3 cross in given color as BitmapEx +// create a 3x3 cross in given color as Bitmap Bitmap createDefaultCross_3x3(const basegfx::BColor& rBColor); } // end of namespace drawinglayer::primitive2d diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index cbe38c725bc9..6ce94651a462 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -616,7 +616,7 @@ Bitmap SvxBmpMask::ImpMaskTransparent( const Bitmap& rBitmap, const Color& rColo if( rBitmap.HasAlpha() ) aMask.AlphaCombineOr( rBitmap.CreateAlphaMask() ); - Bitmap aBmp(BitmapEx( rBitmap.CreateColorBitmap(), aMask )); + Bitmap aBmp( rBitmap.CreateColorBitmap(), aMask ); LeaveWait(); return aBmp; diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index af486f9bfbbb..e22dd9fd2a69 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -162,7 +162,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic, aBmp.SetPrefSize( rGraphic.GetPrefSize() ); aBmp.SetPrefMapMode( rGraphic.GetPrefMapMode() ); - return tools::PolyPolygon( BitmapEx(aBmp).GetContour( bContourEdgeDetect, pRect ) ); + return tools::PolyPolygon( aBmp.GetContour( bContourEdgeDetect, pRect ) ); } // Loop through to super class, no virtual Methods to not become incompatible diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 1435c160ceaa..70eafa5c26d9 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -1348,12 +1348,12 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScalePartAction const & rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaMaskAction const & rAct) { tools::Rectangle aRect(rAct.GetPoint(), rAct.GetBitmap().GetSizePixel()); - BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor()); + Bitmap aBitmap(rAct.GetBitmap(), rAct.GetColor()); aRect.AdjustRight( 1 ); aRect.AdjustBottom( 1 ); rtl::Reference<SdrGrafObj> pGraf = new SdrGrafObj( *mpModel, - Bitmap(aBitmapEx), + aBitmap, aRect); // This action is not creating line and fill, set directly, do not use SetAttributes(..) @@ -1365,12 +1365,12 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskAction const & rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScaleAction const & rAct) { tools::Rectangle aRect(rAct.GetPoint(), rAct.GetSize()); - BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor()); + Bitmap aBitmap(rAct.GetBitmap(), rAct.GetColor()); aRect.AdjustRight( 1 ); aRect.AdjustBottom( 1 ); rtl::Reference<SdrGrafObj> pGraf = new SdrGrafObj( *mpModel, - Bitmap(aBitmapEx), + aBitmap, aRect); // This action is not creating line and fill, set directly, do not use SetAttributes(..) @@ -1382,13 +1382,13 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScaleAction const & rAct) void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScalePartAction const & rAct) { tools::Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize()); - BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor()); + Bitmap aBitmap(rAct.GetBitmap(), rAct.GetColor()); aRect.AdjustRight( 1 ); aRect.AdjustBottom( 1 ); - aBitmapEx.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); + aBitmap.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize())); rtl::Reference<SdrGrafObj> pGraf = new SdrGrafObj( *mpModel, - Bitmap(aBitmapEx), + aBitmap, aRect); // This action is not creating line and fill, set directly, do not use SetAttributes(..) diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index edc9323f61b7..432a12fa0b93 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -752,7 +752,7 @@ Bitmap ImpGetBitmap(BitmapMarkerKind eKindOfMarker, BitmapColorIndex eIndex) if (!sMarkerName.isEmpty()) { OUString sMarkerPrefix(u"svx/res/marker-"_ustr); - BitmapEx aBitmapEx; + Bitmap aBitmap; if (eKindOfMarker == BitmapMarkerKind::Crosshair || eKindOfMarker == BitmapMarkerKind::Anchor @@ -762,15 +762,15 @@ Bitmap ImpGetBitmap(BitmapMarkerKind eKindOfMarker, BitmapColorIndex eIndex) || eKindOfMarker == BitmapMarkerKind::Glue || eKindOfMarker == BitmapMarkerKind::Glue_Deselected) { - aBitmapEx = vcl::bitmap::loadFromName(sMarkerPrefix + sMarkerName + ".png"); + aBitmap = vcl::bitmap::loadFromName(sMarkerPrefix + sMarkerName + ".png"); } else { - aBitmapEx = vcl::bitmap::loadFromName(sMarkerPrefix + sMarkerName + "-" + appendMarkerColor(eIndex) + ".png"); + aBitmap = vcl::bitmap::loadFromName(sMarkerPrefix + sMarkerName + "-" + appendMarkerColor(eIndex) + ".png"); } - if (!aBitmapEx.IsEmpty()) - return Bitmap(aBitmapEx); + if (!aBitmap.IsEmpty()) + return aBitmap; } } diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index f57c23762c4d..90590d1c8e36 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -487,7 +487,7 @@ Bitmap SdrExchangeView::GetMarkedObjBitmap(bool bNoVDevIfOneBmpMarked, const sal eRangeUnit = o3tl::Length::twip; } - // if we have geometry and it has a range, convert to BitmapEx using + // if we have geometry and it has a range, convert to Bitmap using // common tooling aBmp = drawinglayer::convertPrimitive2DContainerToBitmap( std::move(xPrimitives), diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index 81f190917e8c..a3632ccdb81b 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -71,7 +71,7 @@ Animation XOutBitmap::MirrorAnimation( const Animation& rAnimation, bool bHMirr, { AnimationFrame aAnimationFrame( aNewAnim.Get( i ) ); - // mirror the BitmapEx + // mirror the Bitmap aAnimationFrame.maBitmap.Mirror( nMirrorFlags ); // Adjust the positions inside the whole bitmap diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index be5f4e34cbd5..448888aed7fe 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -69,7 +69,7 @@ void XOBitmap::Bitmap2Array() { ScopedVclPtrInstance< VirtualDevice > pVDev; bool bPixelColor = false; - const BitmapEx aBitmap( GetBitmap() ); + const Bitmap aBitmap( GetBitmap() ); const sal_Int32 nLines = 8; // type dependent if( !m_pPixelArray ) diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index ba2f35895503..4bf24b5cea8a 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -2529,4 +2529,194 @@ Bitmap createAlphaBlendFrame( return pSVData->mpBlendFrameCache->m_aLastResult; } +static Bitmap DetectEdges( const Bitmap& rBmp ) +{ + constexpr sal_uInt8 cEdgeDetectThreshold = 128; + const Size aSize( rBmp.GetSizePixel() ); + + if( ( aSize.Width() <= 2 ) || ( aSize.Height() <= 2 ) ) + return rBmp; + + Bitmap aWorkBmp( rBmp ); + + if( !aWorkBmp.Convert( BmpConversion::N8BitGreys ) ) + return rBmp; + + ScopedVclPtr<VirtualDevice> pVirDev(VclPtr<VirtualDevice>::Create()); + pVirDev->SetOutputSizePixel(aSize); + BitmapScopedReadAccess pReadAcc(aWorkBmp); + if( !pReadAcc ) + return rBmp; + + const tools::Long nWidth = aSize.Width(); + const tools::Long nWidth2 = nWidth - 2; + const tools::Long nHeight = aSize.Height(); + const tools::Long nHeight2 = nHeight - 2; + const tools::Long lThres2 = static_cast<tools::Long>(cEdgeDetectThreshold) * cEdgeDetectThreshold; + tools::Long nSum1; + tools::Long nSum2; + tools::Long lGray; + + // initialize border with white pixels + pVirDev->SetLineColor( COL_WHITE ); + pVirDev->DrawLine( Point(), Point( nWidth - 1, 0L ) ); + pVirDev->DrawLine( Point( nWidth - 1, 0L ), Point( nWidth - 1, nHeight - 1 ) ); + pVirDev->DrawLine( Point( nWidth - 1, nHeight - 1 ), Point( 0L, nHeight - 1 ) ); + pVirDev->DrawLine( Point( 0, nHeight - 1 ), Point() ); + + for( tools::Long nY = 0, nY1 = 1, nY2 = 2; nY < nHeight2; nY++, nY1++, nY2++ ) + { + Scanline pScanlineRead = pReadAcc->GetScanline( nY ); + Scanline pScanlineRead1 = pReadAcc->GetScanline( nY1 ); + Scanline pScanlineRead2 = pReadAcc->GetScanline( nY2 ); + for( tools::Long nX = 0, nXDst = 1, nXTmp; nX < nWidth2; nX++, nXDst++ ) + { + nXTmp = nX; + + nSum2 = pReadAcc->GetIndexFromData( pScanlineRead, nXTmp++ ); + nSum1 = -nSum2; + nSum2 += static_cast<tools::Long>(pReadAcc->GetIndexFromData( pScanlineRead, nXTmp++ )) << 1; + lGray = pReadAcc->GetIndexFromData( pScanlineRead, nXTmp ); + nSum1 += lGray; + nSum2 += lGray; + + nSum1 += static_cast<tools::Long>(pReadAcc->GetIndexFromData( pScanlineRead1, nXTmp )) << 1; + nXTmp -= 2; + nSum1 -= static_cast<tools::Long>(pReadAcc->GetIndexFromData( pScanlineRead1, nXTmp )) << 1; + + lGray = -static_cast<tools::Long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp++ )); + nSum1 += lGray; + nSum2 += lGray; + nSum2 -= static_cast<tools::Long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp++ )) << 1; + lGray = static_cast<tools::Long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp )); + nSum1 += lGray; + nSum2 -= lGray; + + if( ( nSum1 * nSum1 + nSum2 * nSum2 ) < lThres2 ) + pVirDev->DrawPixel( Point(nXDst, nY), COL_WHITE ); + else + pVirDev->DrawPixel( Point(nXDst, nY), COL_BLACK ); + } + } + + pReadAcc.reset(); + + Bitmap aRetBmp = pVirDev->GetBitmap(Point(0,0), aSize); + + if( aRetBmp.IsEmpty() ) + aRetBmp = rBmp; + else + { + aRetBmp.SetPrefMapMode( rBmp.GetPrefMapMode() ); + aRetBmp.SetPrefSize( rBmp.GetPrefSize() ); + } + + return aRetBmp; +} + +/** Get contours in image */ +tools::Polygon Bitmap::GetContour( bool bContourEdgeDetect, + const tools::Rectangle* pWorkRectPixel ) +{ + Bitmap aWorkBmp; + tools::Rectangle aWorkRect( Point(), GetSizePixel() ); + + if( pWorkRectPixel ) + aWorkRect.Intersection( *pWorkRectPixel ); + + aWorkRect.Normalize(); + + if ((aWorkRect.GetWidth() <= 4) || (aWorkRect.GetHeight() <= 4)) + return tools::Polygon(); + + // if the flag is set, we need to detect edges + if( bContourEdgeDetect ) + aWorkBmp = DetectEdges( CreateColorBitmap() ); + else + aWorkBmp = CreateColorBitmap(); + + BitmapScopedReadAccess pAcc(aWorkBmp); + + const tools::Long nWidth = pAcc ? pAcc->Width() : 0; + const tools::Long nHeight = pAcc ? pAcc->Height() : 0; + + if (!pAcc || !nWidth || !nHeight) + return tools::Polygon(); + + // tdf#161833 treat semi-transparent pixels as opaque + // Limiting the contour wrapping polygon to only opaque pixels + // causes clipping of any shadows or other semi-transparent + // areas in the image. So, instead of testing for fully opaque + // pixels, treat pixels that are not fully transparent as opaque. + // tdf#162062 only apply fix for tdf#161833 if there is a palette + const BitmapColor aTransparent = pAcc->GetBestMatchingColor( pAcc->HasPalette() ? COL_ALPHA_TRANSPARENT : COL_ALPHA_OPAQUE ); + + std::unique_ptr<Point[]> pPoints1; + std::unique_ptr<Point[]> pPoints2; + + pPoints1.reset(new Point[ nHeight ]); + pPoints2.reset(new Point[ nHeight ]); + + const tools::Long nStartX1 = aWorkRect.Left() + 1; + const tools::Long nEndX1 = aWorkRect.Right(); + const tools::Long nStartX2 = nEndX1 - 1; + const tools::Long nStartY1 = aWorkRect.Top() + 1; + const tools::Long nEndY1 = aWorkRect.Bottom(); + + sal_uInt16 nPolyPos = 0; + + for (tools::Long nY = nStartY1; nY < nEndY1; nY++) + { + tools::Long nX = nStartX1; + Scanline pScanline = pAcc->GetScanline( nY ); + + // scan row from left to right + while( nX < nEndX1 ) + { + if( aTransparent != pAcc->GetPixelFromData( pScanline, nX ) ) + { + pPoints1[ nPolyPos ] = Point( nX, nY ); + nX = nStartX2; + + // this loop always breaks eventually as there is at least one pixel + while( true ) + { + if( aTransparent != pAcc->GetPixelFromData( pScanline, nX ) ) + { + pPoints2[ nPolyPos ] = Point( nX, nY ); + break; + } + + nX--; + } + + nPolyPos++; + break; + } + + nX++; + } + } + + const sal_uInt16 nNewSize1 = nPolyPos << 1; + + tools::Polygon aRetPoly(nPolyPos, pPoints1.get()); + aRetPoly.SetSize( nNewSize1 + 1 ); + aRetPoly[ nNewSize1 ] = aRetPoly[ 0 ]; + + for( sal_uInt16 j = nPolyPos; nPolyPos < nNewSize1; ) + { + aRetPoly[ nPolyPos++ ] = pPoints2[ --j ]; + } + + Size const& rPrefSize = aWorkBmp.GetPrefSize(); + const double fFactorX = static_cast<double>(rPrefSize.Width()) / nWidth; + const double fFactorY = static_cast<double>(rPrefSize.Height()) / nHeight; + + if( ( fFactorX != 0. ) && ( fFactorY != 0. ) ) + aRetPoly.Scale( fFactorX, fFactorY ); + + return aRetPoly; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit dc5f16572e250d9538ebbf035940e0ed1a778c54 Author: Noel Grandin <[email protected]> AuthorDate: Sat Aug 30 21:05:45 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sun Aug 31 07:38:27 2025 +0200 BitmapEx->Bitmap in OverlayBitmapExPrimitive now that Bitmap supports transparency Change-Id: I6b41360f13905bf0ae21fb7120d05a7ab12e9856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190423 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/svx/inc/sdr/overlay/overlaytools.hxx b/svx/inc/sdr/overlay/overlaytools.hxx index 853bb7607114..0539cbbe7c30 100644 --- a/svx/inc/sdr/overlay/overlaytools.hxx +++ b/svx/inc/sdr/overlay/overlaytools.hxx @@ -68,13 +68,13 @@ namespace drawinglayer::primitive2d class OverlayBitmapExPrimitive final : public DiscreteMetricDependentPrimitive2D { private: - // The BitmapEx to use, PixelSize is used - BitmapEx maBitmapEx; + // The Bitmap to use, PixelSize is used + Bitmap maBitmap; // The logic position basegfx::B2DPoint maBasePosition; - // The pixel inside the BitmapEx which is associated with + // The pixel inside the Bitmap which is associated with // the target position (offset in the bitmap) sal_uInt16 mnCenterX; sal_uInt16 mnCenterY; @@ -87,7 +87,7 @@ namespace drawinglayer::primitive2d public: OverlayBitmapExPrimitive( - const BitmapEx& rBitmapEx, + const Bitmap& rBitmap, const basegfx::B2DPoint& rBasePosition, sal_uInt16 nCenterX, sal_uInt16 nCenterY, @@ -95,7 +95,7 @@ namespace drawinglayer::primitive2d double fRotation); // data access - const BitmapEx& getBitmapEx() const { return maBitmapEx; } + const Bitmap& getBitmap() const { return maBitmap; } const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; } sal_uInt16 getCenterX() const { return mnCenterX; } sal_uInt16 getCenterY() const { return mnCenterY; } diff --git a/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx b/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx index 2985f613737f..eca000c828b2 100644 --- a/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx +++ b/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx @@ -30,7 +30,7 @@ namespace sdr::overlay { const drawinglayer::primitive2d::Primitive2DReference aPrimitive( new drawinglayer::primitive2d::OverlayBitmapExPrimitive( - BitmapEx(maBitmap1), + maBitmap1, getBasePosition(), mnCenterX1, mnCenterY1, @@ -43,7 +43,7 @@ namespace sdr::overlay { const drawinglayer::primitive2d::Primitive2DReference aPrimitive( new drawinglayer::primitive2d::OverlayBitmapExPrimitive( - BitmapEx(maBitmap2), + maBitmap2, getBasePosition(), mnCenterX2, mnCenterY2, diff --git a/svx/source/sdr/overlay/overlaybitmapex.cxx b/svx/source/sdr/overlay/overlaybitmapex.cxx index 40127afcc053..0beaedaf1c78 100644 --- a/svx/source/sdr/overlay/overlaybitmapex.cxx +++ b/svx/source/sdr/overlay/overlaybitmapex.cxx @@ -28,7 +28,7 @@ namespace sdr::overlay { drawinglayer::primitive2d::Primitive2DReference aReference( new drawinglayer::primitive2d::OverlayBitmapExPrimitive( - BitmapEx(maBitmap), + maBitmap, getBasePosition(), mnCenterX, mnCenterY, diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx index 1368713bacba..442fa25b7aa6 100644 --- a/svx/source/sdr/overlay/overlaytools.cxx +++ b/svx/source/sdr/overlay/overlaytools.cxx @@ -121,13 +121,13 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const OverlayBitmapExPrimitive::OverlayBitmapExPrimitive( - const BitmapEx& rBitmapEx, + const Bitmap& rBitmap, const basegfx::B2DPoint& rBasePosition, sal_uInt16 nCenterX, sal_uInt16 nCenterY, double fShearX, double fRotation) - : maBitmapEx(rBitmapEx), + : maBitmap(rBitmap), maBasePosition(rBasePosition), mnCenterX(nCenterX), mnCenterY(nCenterY), @@ -137,7 +137,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const Primitive2DReference OverlayBitmapExPrimitive::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { - const Size aBitmapSize(getBitmapEx().GetSizePixel()); + const Size aBitmapSize(getBitmap().GetSizePixel()); if(!aBitmapSize.Width() || !aBitmapSize.Height() || getDiscreteUnit() <= 0.0) return nullptr; @@ -175,7 +175,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const // add BasePosition aTransform.translate(getBasePosition().getX(), getBasePosition().getY()); - return new BitmapPrimitive2D(Bitmap(getBitmapEx()), aTransform); + return new BitmapPrimitive2D(getBitmap(), aTransform); } bool OverlayBitmapExPrimitive::operator==( const BasePrimitive2D& rPrimitive ) const @@ -184,7 +184,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const { const OverlayBitmapExPrimitive& rCompare = static_cast< const OverlayBitmapExPrimitive& >(rPrimitive); - return (getBitmapEx() == rCompare.getBitmapEx() + return (getBitmap() == rCompare.getBitmap() && getBasePosition() == rCompare.getBasePosition() && getCenterX() == rCompare.getCenterX() && getCenterY() == rCompare.getCenterY()
