summaryrefslogtreecommitdiff
path: root/sfx2/source/doc
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r--sfx2/source/doc/templatedlg.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index d3721ab8c6e1..8bb8035f018b 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1534,6 +1534,31 @@ void SfxTemplateManagerDlg::syncRepositories() const
}
}
+BitmapEx SfxTemplateManagerDlg::getDefaultThumbnail( const OUString& rPath )
+{
+ INetURLObject aUrl(rPath);
+ OUString aExt = aUrl.getExtension();
+
+ BitmapEx aImg;
+ if ( aExt == "ott" || aExt == "stw" || aExt == "oth" || aExt == "dot" || aExt == "dotx" )
+ {
+ aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_TEXT ) );
+ }
+ else if ( aExt == "ots" || aExt == "stc" || aExt == "xlt" || aExt == "xltm" || aExt == "xltx" )
+ {
+ aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_SHEET ) );
+ }
+ else if ( aExt == "otp" || aExt == "sti" || aExt == "pot" || aExt == "potm" || aExt == "potx" )
+ {
+ aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_PRESENTATION ) );
+ }
+ else if ( aExt == "otg" || aExt == "std" )
+ {
+ aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_DRAWING ) );
+ }
+ return aImg;
+}
+
static bool lcl_getServiceName ( const OUString &rFileURL, OUString &rName )
{
bool bRet = false;