summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2009-12-14 13:46:00 +0100
committerCarsten Driesner <cd@openoffice.org>2009-12-14 13:46:00 +0100
commit8d867c72e6c982c65b267daceb43dc7f3e5ad351 (patch)
tree3d855e11e597a22869e48272cb3369f825725dcf /sfx2
parent4f2b43e261d4632321770b75c3c89b484b123a8f (diff)
Support png instead of bmp file format for splash/about images
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/about.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx
index e76b38922166..ba3d04b42927 100644
--- a/sfx2/source/dialog/about.cxx
+++ b/sfx2/source/dialog/about.cxx
@@ -47,6 +47,8 @@
#include <unotools/bootstrap.hxx>
#include <com/sun/star/uno/Any.h>
#include <unotools/configmgr.hxx>
+#include <vcl/graph.hxx>
+#include <svtools/filter.hxx>
#include <sfx2/sfxuno.hxx>
#include "about.hxx"
@@ -92,8 +94,15 @@ static bool impl_loadBitmap(
SvFileStream aStrm( aObj.PathToFileName(), STREAM_STD_READ );
if ( !aStrm.GetError() )
{
- Bitmap aBmp;
- aStrm >> aBmp;
+ // Use graphic class to also support more graphic formats (bmp,png,...)
+ Graphic aGraphic;
+
+ GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
+ pGF->ImportGraphic( aGraphic, String(), aStrm, GRFILTER_FORMAT_DONTKNOW );
+
+ // Default case, we load the intro bitmap from a seperate file
+ // (e.g. staroffice_intro.bmp or starsuite_intro.bmp)
+ BitmapEx aBmp = aGraphic.GetBitmapEx();
rLogo = Image( aBmp );
return true;
}
@@ -151,14 +160,14 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
{
bLoaded = impl_loadBitmap(
rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ),
- rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo );
+ rtl::OUString::createFromAscii( "about.png" ), aAppLogo );
}
if ( !bLoaded )
{
bLoaded = impl_loadBitmap(
rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ),
- rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo );
+ rtl::OUString::createFromAscii( "about.png" ), aAppLogo );
}
// Transparenter Font