summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-01 15:39:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-01 20:12:35 +0200
commit29dbb864097cc3136b036fbeb0bfa7d24b1147d7 (patch)
treeb98819a130393a7e63d792600d85a95e0085c9b6 /sd
parentc96d58cca2503fd257c3c742188af66075e194de (diff)
use more BitmapEx in sd
Change-Id: I5c24ca437a329b105151adfedcaed0016bdaf771 Reviewed-on: https://gerrit.libreoffice.org/55191 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/dlg/animobjs.cxx2
-rw-r--r--sd/source/ui/docshell/docshel2.cxx2
-rw-r--r--sd/source/ui/presenter/PresenterPreviewCache.cxx4
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx34
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx8
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx28
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx22
-rw-r--r--sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx12
-rw-r--r--sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx6
-rw-r--r--sd/source/ui/slidesorter/cache/SlsPageCache.cxx6
-rw-r--r--sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsClipboard.cxx4
-rw-r--r--sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx4
-rw-r--r--sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx8
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx4
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx6
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx18
-rw-r--r--sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx2
19 files changed, 87 insertions, 87 deletions
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 50d795504875..837ac5a37745 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -542,7 +542,7 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls)
: sd::OUTPUT_DRAWMODE_COLOR );
pVD->Erase();
pObject->SingleObjectPainter( *pVD.get() );
- aBmp = BitmapEx( pVD->GetBitmap( aObjRect.TopLeft(), aObjSize ) );
+ aBmp = pVD->GetBitmapEx( aObjRect.TopLeft(), aObjSize );
}
m_pCtlDisplay->SetBitmapEx(&aBmp);
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index b5c6ba0f147a..434d6271ce94 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -262,7 +262,7 @@ BitmapEx DrawDocShell::GetPagePreviewBitmap(SdPage* pPage)
pVDev->SetMapMode( MapMode() );
- BitmapEx aPreview( pVDev->GetBitmap( aNullPt, pVDev->GetOutputSizePixel() ) );
+ BitmapEx aPreview( pVDev->GetBitmapEx( aNullPt, pVDev->GetOutputSizePixel() ) );
DBG_ASSERT(!!aPreview, "Preview-Bitmap could not be generated");
diff --git a/sd/source/ui/presenter/PresenterPreviewCache.cxx b/sd/source/ui/presenter/PresenterPreviewCache.cxx
index ea15e2808c86..1c347cc35c8f 100644
--- a/sd/source/ui/presenter/PresenterPreviewCache.cxx
+++ b/sd/source/ui/presenter/PresenterPreviewCache.cxx
@@ -51,7 +51,7 @@ public:
// CacheContext
virtual void NotifyPreviewCreation (
CacheKey aKey,
- const Bitmap& rPreview) override;
+ const BitmapEx& rPreview) override;
virtual bool IsIdle() override;
virtual bool IsVisible (CacheKey aKey) override;
virtual const SdrPage* GetPage (CacheKey aKey) override;
@@ -247,7 +247,7 @@ void PresenterPreviewCache::PresenterCacheContext::RemovePreviewCreationNotifyLi
void PresenterPreviewCache::PresenterCacheContext::NotifyPreviewCreation (
CacheKey aKey,
- const Bitmap&)
+ const BitmapEx&)
{
if ( ! mxSlides.is())
return;
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index 03f3d125fe78..78f714a3c810 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -39,7 +39,7 @@ namespace sd { namespace slidesorter { namespace cache {
class BitmapCache::CacheEntry
{
public:
- CacheEntry(const Bitmap& rBitmap, sal_Int32 nLastAccessTime, bool bIsPrecious);
+ CacheEntry(const BitmapEx& rBitmap, sal_Int32 nLastAccessTime, bool bIsPrecious);
CacheEntry(sal_Int32 nLastAccessTime, bool bIsPrecious);
inline void Recycle (const CacheEntry& rEntry);
inline sal_Int32 GetMemorySize() const;
@@ -51,12 +51,12 @@ public:
sal_Int32 GetAccessTime() const { return mnLastAccessTime; }
void SetAccessTime (sal_Int32 nAccessTime) { mnLastAccessTime = nAccessTime; }
- const Bitmap& GetPreview() const { return maPreview; }
- inline void SetPreview (const Bitmap& rPreview);
+ const BitmapEx& GetPreview() const { return maPreview; }
+ inline void SetPreview (const BitmapEx& rPreview);
bool HasPreview() const;
- const Bitmap& GetMarkedPreview() const { return maMarkedPreview; }
- inline void SetMarkedPreview (const Bitmap& rMarkePreview);
+ const BitmapEx& GetMarkedPreview() const { return maMarkedPreview; }
+ inline void SetMarkedPreview (const BitmapEx& rMarkePreview);
bool HasReplacement() const { return (mpReplacement.get() != nullptr); }
inline bool HasLosslessReplacement() const;
@@ -65,8 +65,8 @@ public:
void SetPrecious (bool bIsPrecious) { mbIsPrecious = bIsPrecious; }
private:
- Bitmap maPreview;
- Bitmap maMarkedPreview;
+ BitmapEx maPreview;
+ BitmapEx maMarkedPreview;
std::shared_ptr<BitmapReplacement> mpReplacement;
std::shared_ptr<BitmapCompressor> mpCompressor;
bool mbIsUpToDate;
@@ -167,7 +167,7 @@ bool BitmapCache::BitmapIsUpToDate (const CacheKey& rKey)
return bIsUpToDate;
}
-Bitmap BitmapCache::GetBitmap (const CacheKey& rKey)
+BitmapEx BitmapCache::GetBitmap (const CacheKey& rKey)
{
::osl::MutexGuard aGuard (maMutex);
@@ -176,7 +176,7 @@ Bitmap BitmapCache::GetBitmap (const CacheKey& rKey)
{
// Create an empty bitmap for the given key that acts as placeholder
// until we are given the real one. Mark it as not being up to date.
- SetBitmap(rKey, Bitmap(), false);
+ SetBitmap(rKey, BitmapEx(), false);
iEntry = mpBitmapContainer->find(rKey);
iEntry->second.SetUpToDate(false);
}
@@ -195,7 +195,7 @@ Bitmap BitmapCache::GetBitmap (const CacheKey& rKey)
return iEntry->second.GetPreview();
}
-Bitmap BitmapCache::GetMarkedBitmap (const CacheKey& rKey)
+BitmapEx BitmapCache::GetMarkedBitmap (const CacheKey& rKey)
{
::osl::MutexGuard aGuard (maMutex);
@@ -206,7 +206,7 @@ Bitmap BitmapCache::GetMarkedBitmap (const CacheKey& rKey)
return iEntry->second.GetMarkedPreview();
}
else
- return Bitmap();
+ return BitmapEx();
}
void BitmapCache::ReleaseBitmap (const CacheKey& rKey)
@@ -258,7 +258,7 @@ void BitmapCache::InvalidateCache()
void BitmapCache::SetBitmap (
const CacheKey& rKey,
- const Bitmap& rPreview,
+ const BitmapEx& rPreview,
bool bIsPrecious)
{
::osl::MutexGuard aGuard (maMutex);
@@ -285,7 +285,7 @@ void BitmapCache::SetBitmap (
void BitmapCache::SetMarkedBitmap (
const CacheKey& rKey,
- const Bitmap& rPreview)
+ const BitmapEx& rPreview)
{
::osl::MutexGuard aGuard (maMutex);
@@ -317,7 +317,7 @@ void BitmapCache::SetPrecious (const CacheKey& rKey, bool bIsPrecious)
{
iEntry = mpBitmapContainer->emplace(
rKey,
- CacheEntry(Bitmap(), mnCurrentAccessTime++, bIsPrecious)
+ CacheEntry(BitmapEx(), mnCurrentAccessTime++, bIsPrecious)
).first;
UpdateCacheSize(iEntry->second, ADD);
}
@@ -459,7 +459,7 @@ BitmapCache::CacheEntry::CacheEntry(
}
BitmapCache::CacheEntry::CacheEntry(
- const Bitmap& rPreview,
+ const BitmapEx& rPreview,
sal_Int32 nLastAccessTime,
bool bIsPrecious)
: maPreview(rPreview),
@@ -530,7 +530,7 @@ inline void BitmapCache::CacheEntry::Decompress()
}
}
-inline void BitmapCache::CacheEntry::SetPreview (const Bitmap& rPreview)
+inline void BitmapCache::CacheEntry::SetPreview (const BitmapEx& rPreview)
{
maPreview = rPreview;
maMarkedPreview.SetEmpty();
@@ -543,7 +543,7 @@ bool BitmapCache::CacheEntry::HasPreview() const
return ! maPreview.IsEmpty();
}
-inline void BitmapCache::CacheEntry::SetMarkedPreview (const Bitmap& rMarkedPreview)
+inline void BitmapCache::CacheEntry::SetMarkedPreview (const BitmapEx& rMarkedPreview)
{
maMarkedPreview = rMarkedPreview;
}
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
index f4c2f971481d..119067421db1 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
@@ -93,11 +93,11 @@ public:
/** Return the preview bitmap for the given contact object.
*/
- Bitmap GetBitmap (const CacheKey& rKey);
+ BitmapEx GetBitmap (const CacheKey& rKey);
/** Return the marked preview bitmap for the given contact object.
*/
- Bitmap GetMarkedBitmap (const CacheKey& rKey);
+ BitmapEx GetMarkedBitmap (const CacheKey& rKey);
/** Release the reference to the preview bitmap that is associated with
the given key.
@@ -121,14 +121,14 @@ public:
*/
void SetBitmap (
const CacheKey& rKey,
- const Bitmap& rPreview,
+ const BitmapEx& rPreview,
bool bIsPrecious);
/** Add or replace a marked bitmap for the given key.
*/
void SetMarkedBitmap (
const CacheKey& rKey,
- const Bitmap& rPreview);
+ const BitmapEx& rPreview);
/** Mark the specified preview bitmap as precious, i.e. that it must not
be compressed or otherwise removed from the cache.
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
index a158b625202e..4cf521e622f0 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
@@ -35,19 +35,19 @@ class NoBitmapCompression::DummyReplacement
: public BitmapReplacement
{
public:
- Bitmap maPreview;
+ BitmapEx maPreview;
- explicit DummyReplacement (const Bitmap& rPreview) : maPreview(rPreview) { }
+ explicit DummyReplacement (const BitmapEx& rPreview) : maPreview(rPreview) { }
virtual ~DummyReplacement() {}
virtual sal_Int32 GetMemorySize() const override { return maPreview.GetSizeBytes(); }
};
-std::shared_ptr<BitmapReplacement> NoBitmapCompression::Compress (const Bitmap& rBitmap) const
+std::shared_ptr<BitmapReplacement> NoBitmapCompression::Compress (const BitmapEx& rBitmap) const
{
return std::shared_ptr<BitmapReplacement>(new DummyReplacement(rBitmap));
}
-Bitmap NoBitmapCompression::Decompress (const BitmapReplacement& rBitmapData) const
+BitmapEx NoBitmapCompression::Decompress (const BitmapReplacement& rBitmapData) const
{
return dynamic_cast<const DummyReplacement&>(rBitmapData).maPreview;
}
@@ -59,16 +59,16 @@ bool NoBitmapCompression::IsLossless() const
//===== CompressionByDeletion =================================================
-std::shared_ptr<BitmapReplacement> CompressionByDeletion::Compress (const Bitmap& ) const
+std::shared_ptr<BitmapReplacement> CompressionByDeletion::Compress (const BitmapEx& ) const
{
return std::shared_ptr<BitmapReplacement>();
}
-Bitmap CompressionByDeletion::Decompress (const BitmapReplacement& ) const
+BitmapEx CompressionByDeletion::Decompress (const BitmapReplacement& ) const
{
// Return a NULL pointer. This will eventually lead to a request for
// the creation of a new one.
- return Bitmap();
+ return BitmapEx();
}
bool CompressionByDeletion::IsLossless() const
@@ -83,7 +83,7 @@ bool CompressionByDeletion::IsLossless() const
class ResolutionReduction::ResolutionReducedReplacement : public BitmapReplacement
{
public:
- Bitmap maPreview;
+ BitmapEx maPreview;
Size maOriginalSize;
virtual ~ResolutionReducedReplacement();
@@ -100,7 +100,7 @@ sal_Int32 ResolutionReduction::ResolutionReducedReplacement::GetMemorySize() con
}
std::shared_ptr<BitmapReplacement> ResolutionReduction::Compress (
- const Bitmap& rBitmap) const
+ const BitmapEx& rBitmap) const
{
ResolutionReducedReplacement* pResult = new ResolutionReducedReplacement;
pResult->maPreview = rBitmap;
@@ -115,9 +115,9 @@ std::shared_ptr<BitmapReplacement> ResolutionReduction::Compress (
return std::shared_ptr<BitmapReplacement>(pResult);
}
-Bitmap ResolutionReduction::Decompress (const BitmapReplacement& rBitmapData) const
+BitmapEx ResolutionReduction::Decompress (const BitmapReplacement& rBitmapData) const
{
- Bitmap aResult;
+ BitmapEx aResult;
const ResolutionReducedReplacement* pData (
dynamic_cast<const ResolutionReducedReplacement*>(&rBitmapData));
@@ -160,7 +160,7 @@ public:
}
};
-std::shared_ptr<BitmapReplacement> PngCompression::Compress (const Bitmap& rBitmap) const
+std::shared_ptr<BitmapReplacement> PngCompression::Compress (const BitmapEx& rBitmap) const
{
vcl::PNGWriter aWriter ((BitmapEx(rBitmap)));
SvMemoryStream aStream (32768, 32768);
@@ -175,10 +175,10 @@ std::shared_ptr<BitmapReplacement> PngCompression::Compress (const Bitmap& rBitm
return std::shared_ptr<BitmapReplacement>(pResult);
}
-Bitmap PngCompression::Decompress (
+BitmapEx PngCompression::Decompress (
const BitmapReplacement& rBitmapData) const
{
- Bitmap aResult;
+ BitmapEx aResult;
const PngReplacement* pData (dynamic_cast<const PngReplacement*>(&rBitmapData));
if (pData != nullptr)
{
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx
index a77a809f9403..678f20bfa54d 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx
@@ -23,7 +23,7 @@
#include <sal/types.h>
#include <memory>
-class Bitmap;
+class BitmapEx;
namespace sd { namespace slidesorter { namespace cache {
@@ -38,7 +38,7 @@ public:
/** Compress the given bitmap into a replacement format that is specific
to the compressor class.
*/
- virtual std::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const = 0;
+ virtual std::shared_ptr<BitmapReplacement> Compress (const BitmapEx& rBitmap) const = 0;
/** Decompress the given replacement data into a preview bitmap.
Depending on the compression technique the returned bitmap may
@@ -47,7 +47,7 @@ public:
task of the caller to create a new preview bitmap if the returned
one is not as desired.
*/
- virtual Bitmap Decompress (const BitmapReplacement& rBitmapData)const=0;
+ virtual BitmapEx Decompress (const BitmapReplacement& rBitmapData)const=0;
/** Return whether the compression and decompression is lossless. This
value is used by the caller of Decompress() to decide whether to use
@@ -82,8 +82,8 @@ class NoBitmapCompression
class DummyReplacement;
public:
virtual ~NoBitmapCompression() {}
- virtual std::shared_ptr<BitmapReplacement> Compress (const Bitmap& rpBitmap) const override;
- virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const override;
+ virtual std::shared_ptr<BitmapReplacement> Compress (const BitmapEx& rpBitmap) const override;
+ virtual BitmapEx Decompress (const BitmapReplacement& rBitmapData) const override;
virtual bool IsLossless() const override;
};
@@ -97,8 +97,8 @@ class CompressionByDeletion
{
public:
virtual ~CompressionByDeletion() {}
- virtual std::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const override;
- virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const override;
+ virtual std::shared_ptr<BitmapReplacement> Compress (const BitmapEx& rBitmap) const override;
+ virtual BitmapEx Decompress (const BitmapReplacement& rBitmapData) const override;
virtual bool IsLossless() const override;
};
@@ -114,10 +114,10 @@ class ResolutionReduction
static const sal_Int32 mnWidth = 100;
public:
virtual ~ResolutionReduction() {}
- virtual std::shared_ptr<BitmapReplacement> Compress (const Bitmap& rpBitmap) const override;
+ virtual std::shared_ptr<BitmapReplacement> Compress (const BitmapEx& rpBitmap) const override;
/** Scale the replacement bitmap up to the original size.
*/
- virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const override;
+ virtual BitmapEx Decompress (const BitmapReplacement& rBitmapData) const override;
virtual bool IsLossless() const override;
};
@@ -130,8 +130,8 @@ class PngCompression
class PngReplacement;
public:
virtual ~PngCompression() {}
- virtual std::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const override;
- virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const override;
+ virtual std::shared_ptr<BitmapReplacement> Compress (const BitmapEx& rBitmap) const override;
+ virtual BitmapEx Decompress (const BitmapReplacement& rBitmapData) const override;
virtual bool IsLossless() const override;
};
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
index f09318faff32..13f68447b4f4 100644
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
@@ -102,13 +102,13 @@ void GenericPageCache::ChangePreviewSize (
}
}
-Bitmap GenericPageCache::GetPreviewBitmap (
+BitmapEx GenericPageCache::GetPreviewBitmap (
const CacheKey aKey,
const bool bResize)
{
assert(aKey != nullptr);
- Bitmap aPreview;
+ BitmapEx aPreview;
bool bMayBeUpToDate = true;
ProvideCacheAndProcessor();
const SdrPage* pPage = mpCacheContext->GetPage(aKey);
@@ -140,21 +140,21 @@ Bitmap GenericPageCache::GetPreviewBitmap (
return aPreview;
}
-Bitmap GenericPageCache::GetMarkedPreviewBitmap (
+BitmapEx GenericPageCache::GetMarkedPreviewBitmap (
const CacheKey aKey)
{
assert(aKey != nullptr);
ProvideCacheAndProcessor();
const SdrPage* pPage = mpCacheContext->GetPage(aKey);
- Bitmap aMarkedPreview (mpBitmapCache->GetMarkedBitmap(pPage));
+ BitmapEx aMarkedPreview (mpBitmapCache->GetMarkedBitmap(pPage));
return aMarkedPreview;
}
void GenericPageCache::SetMarkedPreviewBitmap (
const CacheKey aKey,
- const Bitmap& rMarkedBitmap)
+ const BitmapEx& rMarkedBitmap)
{
assert(aKey != nullptr);
@@ -179,7 +179,7 @@ void GenericPageCache::RequestPreviewBitmap (
bIsUpToDate = mpBitmapCache->BitmapIsUpToDate (pPage);
if (bIsUpToDate)
{
- const Bitmap aPreview (mpBitmapCache->GetBitmap(pPage));
+ const BitmapEx aPreview (mpBitmapCache->GetBitmap(pPage));
if (aPreview.IsEmpty() || aPreview.GetSizePixel()!=maPreviewSize)
bIsUpToDate = false;
}
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
index 7ebabdf79bc1..39f9be01f3aa 100644
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
@@ -77,14 +77,14 @@ public:
Returns a bitmap that is either empty, contains a scaled (up or
down) version or is the requested bitmap.
*/
- Bitmap GetPreviewBitmap (
+ BitmapEx GetPreviewBitmap (
const CacheKey aKey,
const bool bResize);
- Bitmap GetMarkedPreviewBitmap (
+ BitmapEx GetMarkedPreviewBitmap (
const CacheKey aKey);
void SetMarkedPreviewBitmap (
const CacheKey aKey,
- const Bitmap& rMarkedBitmap);
+ const BitmapEx& rMarkedBitmap);
/** When the requested preview bitmap does not yet exist or is not
up-to-date then the rendering of one is scheduled. Otherwise this
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
index 57636708bbfd..d91d810799ad 100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
@@ -52,14 +52,14 @@ void PageCache::ChangeSize (
mpImplementation->ChangePreviewSize(rPreviewSize, bDoSuperSampling);
}
-Bitmap PageCache::GetPreviewBitmap (
+BitmapEx PageCache::GetPreviewBitmap (
const CacheKey aKey,
const bool bResize)
{
return mpImplementation->GetPreviewBitmap(aKey, bResize);
}
-Bitmap PageCache::GetMarkedPreviewBitmap (
+BitmapEx PageCache::GetMarkedPreviewBitmap (
const CacheKey aKey)
{
return mpImplementation->GetMarkedPreviewBitmap(aKey);
@@ -67,7 +67,7 @@ Bitmap PageCache::GetMarkedPreviewBitmap (
void PageCache::SetMarkedPreviewBitmap (
const CacheKey aKey,
- const Bitmap& rMarkedBitmap)
+ const BitmapEx& rMarkedBitmap)
{
mpImplementation->SetMarkedPreviewBitmap(aKey, rMarkedBitmap);
}
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
index d9e962ff8cb3..75145ed9afda 100644
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -150,7 +150,7 @@ void QueueProcessor::ProcessOneRequest (
const SdPage* pSdPage = dynamic_cast<const SdPage*>(mpCacheContext->GetPage(aKey));
if (pSdPage != nullptr)
{
- const Bitmap aPreview (
+ const BitmapEx aPreview (
maBitmapFactory.CreateBitmap(*pSdPage, maPreviewSize, mbDoSuperSampling));
mpCache->SetBitmap (pSdPage, aPreview, ePriorityClass!=NOT_VISIBLE);
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 7ac3ed0e4eda..1ffe7e69c59e 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -422,7 +422,7 @@ void Clipboard::CreateSlideTransferable (
model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
if ( ! pDescriptor || pDescriptor->GetPage()==nullptr)
continue;
- Bitmap aPreview (pPreviewCache->GetPreviewBitmap(pDescriptor->GetPage(), false));
+ BitmapEx aPreview (pPreviewCache->GetPreviewBitmap(pDescriptor->GetPage(), false));
aRepresentatives.emplace_back(
aPreview,
pDescriptor->HasState(model::PageDescriptor::ST_Excluded));
@@ -533,7 +533,7 @@ std::shared_ptr<SdTransferable::UserData> Clipboard::CreateTransferableUserData
model::SharedPageDescriptor pDescriptor (rSlideSorter.GetModel().GetPageDescriptor((nPageIndex-1)/2));
if ( ! pDescriptor || pDescriptor->GetPage()==nullptr)
break;
- Bitmap aPreview (pPreviewCache->GetPreviewBitmap(pDescriptor->GetPage(), false));
+ BitmapEx aPreview (pPreviewCache->GetPreviewBitmap(pDescriptor->GetPage(), false));
aRepresentatives.emplace_back(
aPreview,
pDescriptor->HasState(model::PageDescriptor::ST_Excluded));
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx b/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
index fe0ff6ae1f86..ed2548a80cb3 100644
--- a/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
@@ -26,7 +26,7 @@
#include <vector>
class SdrPage;
-class Bitmap;
+class BitmapEx;
namespace sd { namespace slidesorter { namespace cache {
@@ -49,7 +49,7 @@ public:
*/
virtual void NotifyPreviewCreation (
CacheKey aKey,
- const Bitmap& rPreview) = 0;
+ const BitmapEx& rPreview) = 0;
/** Called to determine whether the system is idle and a preview can be
created without annoying the user.
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
index fffcefb2a4f2..096322324333 100644
--- a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
@@ -22,7 +22,7 @@
#include <cache/SlsCacheContext.hxx>
#include <sal/types.h>
-#include <vcl/bitmap.hxx>
+#include <vcl/bitmapex.hxx>
#include <memory>
class Size;
@@ -103,15 +103,15 @@ public:
Returns a bitmap that is either empty, contains a scaled (up or
down) version or is the requested bitmap.
*/
- Bitmap GetPreviewBitmap (
+ BitmapEx GetPreviewBitmap (
const CacheKey aKey,
const bool bResize);
- Bitmap GetMarkedPreviewBitmap (
+ BitmapEx GetMarkedPreviewBitmap (
const CacheKey aKey);
void SetMarkedPreviewBitmap (
const CacheKey aKey,
- const Bitmap& rBitmap);
+ const BitmapEx& rBitmap);
/** When the requested preview bitmap does not yet exist or is not
up-to-date then the rendering of one is scheduled. Otherwise this
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx b/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx
index 9625ca43ce60..35b3480286c5 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx
@@ -43,10 +43,10 @@ public:
class Representative
{
public:
- Representative (const Bitmap& rBitmap, const bool bIsExcluded)
+ Representative (const BitmapEx& rBitmap, const bool bIsExcluded)
: maBitmap(rBitmap), mbIsExcluded(bIsExcluded) {}
- Bitmap maBitmap;
+ BitmapEx maBitmap;
bool mbIsExcluded;
};
diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
index 9fd424a286ae..ce7098a86a0d 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
@@ -64,7 +64,7 @@ public:
@return
The returned bitmap may have a different size then the preview area.
*/
- Bitmap GetPreviewBitmap (
+ BitmapEx GetPreviewBitmap (
const model::SharedPageDescriptor& rpDescriptor,
const OutputDevice* pReferenceDevice) const;
@@ -105,9 +105,9 @@ private:
OutputDevice& rDevice,
const model::SharedPageDescriptor& rpDescriptor) const;
- static Bitmap CreateMarkedPreview(
+ static BitmapEx CreateMarkedPreview(
const Size& rSize,
- const Bitmap& rPreview,
+ const BitmapEx& rPreview,
const BitmapEx& rOverlay,
const OutputDevice* pReferenceDevice);
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
index c8601496c56e..bd8c071b8895 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -141,20 +141,20 @@ void PageObjectPainter::PaintPreview (
const SdrPage* pPage = rpDescriptor->GetPage();
mpCache->SetPreciousFlag(pPage, true);
- const Bitmap aPreview (GetPreviewBitmap(rpDescriptor, &rDevice));
+ const BitmapEx aPreview (GetPreviewBitmap(rpDescriptor, &rDevice));
if ( ! aPreview.IsEmpty())
{
if (aPreview.GetSizePixel() != aBox.GetSize())
- rDevice.DrawBitmap(aBox.TopLeft(), aBox.GetSize(), aPreview);
+ rDevice.DrawBitmapEx(aBox.TopLeft(), aBox.GetSize(), aPreview);
else
- rDevice.DrawBitmap(aBox.TopLeft(), aPreview);
+ rDevice.DrawBitmapEx(aBox.TopLeft(), aPreview);
}
}
}
-Bitmap PageObjectPainter::CreateMarkedPreview (
+BitmapEx PageObjectPainter::CreateMarkedPreview (
const Size& rSize,
- const Bitmap& rPreview,
+ const BitmapEx& rPreview,
const BitmapEx& rOverlay,
const OutputDevice* pReferenceDevice)
{
@@ -165,7 +165,7 @@ Bitmap PageObjectPainter::CreateMarkedPreview (
pDevice.disposeAndReset(VclPtr<VirtualDevice>::Create());
pDevice->SetOutputSizePixel(rSize);
- pDevice->DrawBitmap(Point(0,0), rSize, rPreview);
+ pDevice->DrawBitmapEx(Point(0,0), rSize, rPreview);
// Paint bitmap tiled over the preview to mark it as excluded.
const sal_Int32 nIconWidth (rOverlay.GetSizePixel().Width());
@@ -176,10 +176,10 @@ Bitmap PageObjectPainter::CreateMarkedPreview (
for (long nY=0; nY<rSize.Height(); nY+=nIconHeight)
pDevice->DrawBitmapEx(Point(nX,nY), rOverlay);
}
- return pDevice->GetBitmap(Point(0,0), rSize);
+ return pDevice->GetBitmapEx(Point(0,0), rSize);
}
-Bitmap PageObjectPainter::GetPreviewBitmap (
+BitmapEx PageObjectPainter::GetPreviewBitmap (
const model::SharedPageDescriptor& rpDescriptor,
const OutputDevice* pReferenceDevice) const
{
@@ -190,7 +190,7 @@ Bitmap PageObjectPainter::GetPreviewBitmap (
{
PageObjectLayouter *pPageObjectLayouter = mrLayouter.GetPageObjectLayouter().get();
- Bitmap aMarkedPreview (mpCache->GetMarkedPreviewBitmap(pPage));
+ BitmapEx aMarkedPreview (mpCache->GetMarkedPreviewBitmap(pPage));
const ::tools::Rectangle aPreviewBox (pPageObjectLayouter->GetBoundingBox(
rpDescriptor,
PageObjectLayouter::Part::Preview,
diff --git a/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx b/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
index 9cdd42160ff2..27ec932f8678 100644
--- a/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
+++ b/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
@@ -47,7 +47,7 @@ ViewCacheContext::~ViewCacheContext()
void ViewCacheContext::NotifyPreviewCreation (
cache::CacheKey aKey,
- const Bitmap&)
+ const BitmapEx&)
{
const model::SharedPageDescriptor pDescriptor (GetDescriptor(aKey));
if (pDescriptor.get() != nullptr)
diff --git a/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx b/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
index 88047a335167..62f1074f8d1d 100644
--- a/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
+++ b/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
@@ -41,7 +41,7 @@ class ViewCacheContext : public cache::CacheContext
public:
explicit ViewCacheContext (SlideSorter& rSlideSorter);
virtual ~ViewCacheContext() override;
- virtual void NotifyPreviewCreation (cache::CacheKey aKey, const Bitmap& rPreview) override;
+ virtual void NotifyPreviewCreation (cache::CacheKey aKey, const BitmapEx& rPreview) override;
virtual bool IsIdle() override;
virtual bool IsVisible (cache::CacheKey aKey) override;
virtual const SdrPage* GetPage (cache::CacheKey aKey) override;