summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/gdimtf.hxx3
-rw-r--r--sd/source/ui/unoidl/unopage.cxx3
-rw-r--r--sfx2/source/doc/docinf.cxx4
-rw-r--r--sfx2/source/doc/graphhelp.cxx2
-rw-r--r--vcl/source/gdi/gdimtf.cxx6
5 files changed, 8 insertions, 10 deletions
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index d14d6a2a50bf..d7de82fd59f5 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -213,7 +213,8 @@ public:
friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile );
friend VCL_DLLPUBLIC SvStream& WriteGDIMetaFile( SvStream& rOStm, const GDIMetaFile& rGDIMetaFile );
- sal_Bool CreateThumbnail( sal_uInt32 nMaximumExtent, BitmapEx& rBmpEx, const BitmapEx* pOverlay = NULL, const Rectangle* pOverlayRect = NULL ) const;
+ /// Creates an antialiased thumbnail, with maximum height or width of nMaximumExtent.
+ sal_Bool CreateThumbnail( BitmapEx& rBmpEx, sal_uInt32 nMaximumSize = 256, const BitmapEx* pOverlay = NULL, const Rectangle* pOverlayRect = NULL ) const;
void UseCanvas( sal_Bool _bUseCanvas );
sal_Bool GetUseCanvas() const { return bUseCanvas; }
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 21fd8b534ee0..1aaa1c15934b 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1111,8 +1111,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
::boost::shared_ptr<GDIMetaFile> pMetaFile =
pDocShell->GetPreviewMetaFile();
BitmapEx aBitmap;
- if ( pMetaFile && pMetaFile->CreateThumbnail( 160, /* magic value taken from GraphicHelper::getThumbnailFormatFromGDI_Impl() */
- aBitmap ) )
+ if (pMetaFile && pMetaFile->CreateThumbnail(aBitmap))
{
SvMemoryStream aMemStream;
WriteDIB(aBitmap.GetBitmap(), aMemStream, false, false);
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index a5f967f69423..f3c56bd05118 100644
--- a/sfx2/source/doc/docinf.cxx
+++ b/sfx2/source/doc/docinf.cxx
@@ -306,8 +306,8 @@ uno::Sequence<sal_uInt8> SFX2_DLLPUBLIC convertMetaFile(GDIMetaFile* i_pThumb)
if (i_pThumb) {
BitmapEx aBitmap;
SvMemoryStream aStream;
-// magic value 160 taken from GraphicHelper::getThumbnailFormatFromGDI_Impl()
- if( i_pThumb->CreateThumbnail( 160, aBitmap ) ) {
+ if (i_pThumb->CreateThumbnail(aBitmap))
+ {
WriteDIB(aBitmap.GetBitmap(), aStream, false, false);
aStream.Seek(STREAM_SEEK_TO_END);
uno::Sequence<sal_uInt8> aSeq(aStream.Tell());
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index 7cd16ee195d3..515384ea4fbd 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -283,7 +283,7 @@ sal_Bool GraphicHelper::getThumbnailFormatFromGDI_Impl( GDIMetaFile* pMetaFile,
if ( bSigned )
pSignatureBitmap = new BitmapEx( SfxResId( BMP_SIGNATURE ) );
- bResult = pMetaFile->CreateThumbnail(THUMBNAIL_RESOLUTION, aResultBitmap, pSignatureBitmap);
+ bResult = pMetaFile->CreateThumbnail(aResultBitmap, THUMBNAIL_RESOLUTION, pSignatureBitmap);
if ( bResult )
bResult = ( !aResultBitmap.IsEmpty()
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index d5bff9de99c5..9609d48e4614 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2869,10 +2869,8 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
return rOStm;
}
-sal_Bool GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
- BitmapEx& rBmpEx,
- const BitmapEx* pOverlay,
- const Rectangle* pOverlayRect ) const
+sal_Bool GDIMetaFile::CreateThumbnail(BitmapEx& rBmpEx, sal_uInt32 nMaximumExtent,
+ const BitmapEx* pOverlay, const Rectangle* pOverlayRect) const
{
// initialization seems to be complicated but is used to avoid rounding errors
VirtualDevice aVDev;