[Libreoffice-commits] core.git: include/vcl vcl/source
Noel Grandin
noel.grandin at collabora.co.uk
Wed May 30 10:22:41 UTC 2018
include/vcl/splitwin.hxx | 2 -
vcl/source/window/splitwin.cxx | 54 ++---------------------------------------
2 files changed, 3 insertions(+), 53 deletions(-)
New commits:
commit 109bc7b92427e193441b729677757cb39badc5fe
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed May 30 08:49:30 2018 +0200
ImplSplitSet::mpBitmap is unused
Change-Id: Iadbeb462a34b9bdabe5bf71249eeef798fe6372a
Reviewed-on: https://gerrit.libreoffice.org/55044
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/vcl/splitwin.hxx b/include/vcl/splitwin.hxx
index 4e5b4511b213..0c8edcfe298e 100644
--- a/include/vcl/splitwin.hxx
+++ b/include/vcl/splitwin.hxx
@@ -103,8 +103,6 @@ private:
static SAL_DLLPRIVATE void ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool bHide,
bool bRows );
SAL_DLLPRIVATE void ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet );
- SAL_DLLPRIVATE static void ImplDrawBack(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect,
- const Wallpaper* pWall, const Bitmap* pBitmap );
static SAL_DLLPRIVATE sal_uInt16 ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos,
bool bRows );
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index c1166fd1fe74..710ffb1acd96 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -86,7 +86,6 @@ public:
std::vector< ImplSplitItem > mvItems;
std::unique_ptr<Wallpaper> mpWallpaper;
- std::unique_ptr<Bitmap> mpBitmap;
long mnLastSize;
long mnSplitSize;
sal_uInt16 mnId;
@@ -118,7 +117,6 @@ ImplSplitItem::ImplSplitItem()
ImplSplitSet::ImplSplitSet() :
mpWallpaper( nullptr ),
- mpBitmap( nullptr ),
mnLastSize( 0 ),
mnSplitSize( SPLITWIN_SPLITSIZE ),
mnId( 0 ),
@@ -129,7 +127,6 @@ ImplSplitSet::ImplSplitSet() :
ImplSplitSet::~ImplSplitSet()
{
mpWallpaper.reset();
- mpBitmap.reset();
}
/** Check whether the given size is inside the valid range defined by
@@ -894,64 +891,22 @@ static void ImplCalcLogSize( std::vector< ImplSplitItem > & rItems, size_t nItem
}
}
-void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect,
- const Wallpaper* pWall, const Bitmap* pBitmap)
-{
- if (pBitmap)
- {
- Point aPos = rRect.TopLeft();
- Size aBmpSize = pBitmap->GetSizePixel();
- rRenderContext.Push(PushFlags::CLIPREGION);
- rRenderContext.IntersectClipRegion(rRect);
- do
- {
- aPos.setX( rRect.Left() );
- do
- {
- rRenderContext.DrawBitmap(aPos, *pBitmap);
- aPos.AdjustX(aBmpSize.Width() );
- }
- while (aPos.X() < rRect.Right());
- aPos.AdjustY(aBmpSize.Height() );
- }
- while (aPos.Y() < rRect.Bottom());
- rRenderContext.Pop();
- }
- else
- {
- rRenderContext.DrawWallpaper(rRect, *pWall);
- }
-}
-
void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet)
{
size_t nItems = pSet->mvItems.size();
std::vector< ImplSplitItem >& rItems = pSet->mvItems;
- // also draw background for mainset
- if (pSet->mnId == 0)
- {
- if (pSet->mpBitmap)
- {
- tools::Rectangle aRect(mnLeftBorder, mnTopBorder,
- mnDX - mnRightBorder - 1,
- mnDY - mnBottomBorder - 1);
-
- ImplDrawBack(rRenderContext, aRect, pSet->mpWallpaper.get(), pSet->mpBitmap.get());
- }
- }
-
for (size_t i = 0; i < nItems; i++)
{
pSet = rItems[i].mpSet.get();
if (pSet)
{
- if (pSet->mpBitmap || pSet->mpWallpaper)
+ if (pSet->mpWallpaper)
{
Point aPoint(rItems[i].mnLeft, rItems[i].mnTop);
Size aSize(rItems[i].mnWidth, rItems[i].mnHeight);
tools::Rectangle aRect(aPoint, aSize);
- ImplDrawBack(rRenderContext, aRect, pSet->mpWallpaper.get(), pSet->mpBitmap.get());
+ rRenderContext.DrawWallpaper(aRect, *pSet->mpWallpaper);
}
}
}
@@ -1278,12 +1233,9 @@ void SplitWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
void SplitWindow::ImplInitSettings()
{
- // If a bitmap was set for MainSet, we should not delete the background.
// If MainSet has a Wallpaper, this is the background,
// otherwise it is the standard colour
- if ( mpMainSet->mpBitmap )
- SetBackground();
- else if ( mpMainSet->mpWallpaper )
+ if ( mpMainSet->mpWallpaper )
SetBackground( *mpMainSet->mpWallpaper );
else
{
More information about the Libreoffice-commits
mailing list