summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2012-10-04 07:40:24 +0200
committerTomaž Vajngerl <quikee@gmail.com>2012-10-04 07:45:45 +0200
commit6f221adc31e8323284720e7ccfe4818430a9bd66 (patch)
tree06e172d548210922b4f9ac0fad9ebf572f411caa /sd/source/ui/slidesorter
parent1e6985da53b91fd0f2a3d44cd30dd3a73dcd6919 (diff)
Improve quality of page previews in Impress/Draw with supersampling
Change-Id: I9c5b28fc32b73b2147162f74919b21d99401b501
Diffstat (limited to 'sd/source/ui/slidesorter')
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx14
-rw-r--r--sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx4
-rw-r--r--sd/source/ui/slidesorter/view/SlideSorterView.cxx2
3 files changed, 9 insertions, 11 deletions
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
index 2d901efae1ce..6b31439680f4 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
@@ -41,10 +41,6 @@
#include <vcl/bmpacc.hxx>
#include <vcl/pngwrite.hxx>
-const static sal_Int32 gnSuperSampleFactor (2);
-const static bool gbAllowSuperSampling (false);
-
-
namespace sd { namespace slidesorter { namespace view {
class SlideSorterView;
class PageObjectViewObjectContact;
@@ -73,10 +69,12 @@ Bitmap BitmapFactory::CreateBitmap (
const bool bDoSuperSampling)
{
Size aSize (rPixelSize);
- if (bDoSuperSampling && gbAllowSuperSampling)
+ if (bDoSuperSampling)
{
- aSize.Width() *= gnSuperSampleFactor;
- aSize.Height() *= gnSuperSampleFactor;
+ // Supersampling factor
+ int aSuperSamplingFactor = 2;
+ aSize.Width() *= aSuperSamplingFactor;
+ aSize.Height() *= aSuperSamplingFactor;
}
Bitmap aPreview (maRenderer.RenderPage (
@@ -85,7 +83,7 @@ Bitmap BitmapFactory::CreateBitmap (
String(),
true,
false).GetBitmapEx().GetBitmap());
- if (bDoSuperSampling && gbAllowSuperSampling)
+ if (bDoSuperSampling)
{
aPreview.Scale(rPixelSize, BMP_SCALE_BEST);
}
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
index db3f12d377ab..27c263d1a35b 100644
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
@@ -147,7 +147,7 @@ Bitmap GenericPageCache::GetPreviewBitmap (
// i.e. the bitmap is not empty.
if (bResize && aBitmapSize.Width()>0 && aBitmapSize.Height()>0)
{
- aPreview.Scale(maPreviewSize, BMP_SCALE_FAST);
+ aPreview.Scale(maPreviewSize);
}
bMayBeUpToDate = false;
}
@@ -184,7 +184,7 @@ Bitmap GenericPageCache::GetMarkedPreviewBitmap (
// i.e. the bitmap is not empty.
if (aBitmapSize.Width()>0 && aBitmapSize.Height()>0)
{
- aMarkedPreview.Scale(maPreviewSize, BMP_SCALE_FAST);
+ aMarkedPreview.Scale(maPreviewSize);
}
}
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 23516a95b3a2..66c3cdf0d315 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -819,7 +819,7 @@ void SlideSorterView::ConfigurationChanged (
mpPreviewCache.reset(
new cache::PageCache(
mpLayouter->GetPageObjectSize(),
- false,
+ true,
cache::SharedCacheContext(new ViewCacheContext(mrSlideSorter))));
}