summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-26 11:00:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-26 11:52:56 +0100
commit505573b8c76fd8e99aae3ac2555a3fbb0ac9a975 (patch)
treedf661f553b891f8beeb9ea065cdd0ed9fb5ba4e6 /sfx2/source
parent8cd1ae22eb2d464516717d767bd3e5f6c2f4bd34 (diff)
remove sfx2 bitmaps from .src files
Change-Id: Ibc4261af5f479badd281211e467d2c7b524af3f3
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/sfx.src55
-rw-r--r--sfx2/source/control/recentdocsview.cxx17
-rw-r--r--sfx2/source/control/recentdocsviewitem.cxx5
-rw-r--r--sfx2/source/control/templatelocalview.cxx9
-rw-r--r--sfx2/source/control/templatesearchview.cxx9
-rw-r--r--sfx2/source/control/templateview.hrc4
-rw-r--r--sfx2/source/control/templateview.src20
-rw-r--r--sfx2/source/control/templateviewitem.cxx3
-rw-r--r--sfx2/source/dialog/dialog.hrc3
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx3
-rw-r--r--sfx2/source/dialog/dinfdlg.src5
-rw-r--r--sfx2/source/dialog/templdlg.cxx7
-rw-r--r--sfx2/source/dialog/templdlg.src15
-rw-r--r--sfx2/source/dialog/titledockwin.cxx3
-rw-r--r--sfx2/source/dialog/titledockwin.src28
-rw-r--r--sfx2/source/doc/doc.src5
-rw-r--r--sfx2/source/doc/graphhelp.cxx24
-rw-r--r--sfx2/source/doc/graphhelp.hxx6
-rw-r--r--sfx2/source/doc/graphhelp.src47
-rw-r--r--sfx2/source/doc/objstor.cxx6
-rw-r--r--sfx2/source/doc/templatedlg.cxx5
-rw-r--r--sfx2/source/inc/sfxlocal.hrc4
22 files changed, 53 insertions, 230 deletions
diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src
index 45f4e8d3522b..c6162a8ff9e6 100644
--- a/sfx2/source/appl/sfx.src
+++ b/sfx2/source/appl/sfx.src
@@ -39,59 +39,4 @@ String STR_MODULENOTINSTALLED
Text [ en-US ] = "The action could not be executed. The %PRODUCTNAME program module needed for this action is currently not installed.";
};
-Bitmap ( SFX_THUMBNAIL_TEXT )
-{
- File = "ott_96_8.png";
-};
-
-Bitmap ( SFX_THUMBNAIL_SHEET )
-{
- File = "ots_96_8.png";
-};
-
-Bitmap ( SFX_THUMBNAIL_PRESENTATION )
-{
- File = "otp_96_8.png";
-};
-
-Bitmap ( SFX_THUMBNAIL_DRAWING )
-{
- File = "otg_96_8.png";
-};
-
-Bitmap ( SFX_FILE_THUMBNAIL_TEXT )
-{
- File = "writer128.png";
-};
-
-Bitmap ( SFX_FILE_THUMBNAIL_SHEET )
-{
- File = "calc128.png";
-};
-
-Bitmap ( SFX_FILE_THUMBNAIL_PRESENTATION )
-{
- File = "impress128.png";
-};
-
-Bitmap ( SFX_FILE_THUMBNAIL_DRAWING )
-{
- File = "draw128.png";
-};
-
-Bitmap ( SFX_FILE_THUMBNAIL_DATABASE )
-{
- File = "base128.png";
-};
-
-Bitmap ( SFX_FILE_THUMBNAIL_MATH )
-{
- File = "math128.png";
-};
-
-Bitmap ( SFX_FILE_THUMBNAIL_DEFAULT )
-{
- File = "main128.png";
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index e068c0f3d989..d61e0e05e6aa 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <templateview.hrc>
+#include "bitmaps.hlst"
#include <officecfg/Office/Common.hxx>
@@ -62,7 +63,7 @@ RecentDocsView::RecentDocsView( vcl::Window* pParent )
, mnItemPadding(5)
, mnItemMaxTextLength(30)
, mnLastMouseDownItem(THUMBNAILVIEW_ITEM_NOTFOUND)
- , maWelcomeImage(BitmapEx(SfxResId(BMP_WELCOME)))
+ , maWelcomeImage(BitmapEx(BMP_WELCOME))
, maWelcomeLine1(SfxResId(STR_WELCOME_LINE1))
, maWelcomeLine2(SfxResId(STR_WELCOME_LINE2))
{
@@ -140,19 +141,19 @@ BitmapEx RecentDocsView::getDefaultThumbnail(const OUString &rURL)
OUString aExt = aUrl.getExtension();
if (typeMatchesExtension(ApplicationType::TYPE_WRITER, aExt))
- aImg = BitmapEx ( SfxResId( SFX_FILE_THUMBNAIL_TEXT ) );
+ aImg = BitmapEx(SFX_FILE_THUMBNAIL_TEXT);
else if (typeMatchesExtension(ApplicationType::TYPE_CALC, aExt))
- aImg = BitmapEx ( SfxResId( SFX_FILE_THUMBNAIL_SHEET ) );
+ aImg = BitmapEx(SFX_FILE_THUMBNAIL_SHEET);
else if (typeMatchesExtension(ApplicationType::TYPE_IMPRESS, aExt))
- aImg = BitmapEx ( SfxResId( SFX_FILE_THUMBNAIL_PRESENTATION ) );
+ aImg = BitmapEx(SFX_FILE_THUMBNAIL_PRESENTATION);
else if (typeMatchesExtension(ApplicationType::TYPE_DRAW, aExt))
- aImg = BitmapEx ( SfxResId( SFX_FILE_THUMBNAIL_DRAWING ) );
+ aImg = BitmapEx(SFX_FILE_THUMBNAIL_DRAWING);
else if (typeMatchesExtension(ApplicationType::TYPE_DATABASE, aExt))
- aImg = BitmapEx ( SfxResId( SFX_FILE_THUMBNAIL_DATABASE ) );
+ aImg = BitmapEx(SFX_FILE_THUMBNAIL_DATABASE);
else if (typeMatchesExtension(ApplicationType::TYPE_MATH, aExt))
- aImg = BitmapEx ( SfxResId( SFX_FILE_THUMBNAIL_MATH ) );
+ aImg = BitmapEx(SFX_FILE_THUMBNAIL_MATH);
else
- aImg = BitmapEx ( SfxResId( SFX_FILE_THUMBNAIL_DEFAULT ) );
+ aImg = BitmapEx(SFX_FILE_THUMBNAIL_DEFAULT);
return aImg;
}
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index 5b8080171d93..289edbb7ba19 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -24,6 +24,7 @@
#include <vcl/svapp.hxx>
#include <templateview.hrc>
+#include "bitmaps.hlst"
using namespace basegfx;
using namespace com::sun::star;
@@ -36,8 +37,8 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR
: ThumbnailViewItem(rView, nId),
maURL(rURL),
m_bRemoveIconHighlighted(false),
- m_aRemoveRecentBitmap(SfxResId(BMP_RECENTDOC_REMOVE)),
- m_aRemoveRecentBitmapHighlighted(SfxResId(BMP_RECENTDOC_REMOVE_HIGHLIGHTED))
+ m_aRemoveRecentBitmap(BMP_RECENTDOC_REMOVE),
+ m_aRemoveRecentBitmapHighlighted(BMP_RECENTDOC_REMOVE_HIGHLIGHTED)
{
OUString aTitle(rTitle);
INetURLObject aURLObj(rURL);
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index db5b07420333..d6432a65ed28 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -36,6 +36,7 @@
#include <doc.hrc>
#include "templateview.hrc"
+#include "bitmaps.hlst"
#define MNI_OPEN 1
#define MNI_EDIT 2
@@ -1020,13 +1021,13 @@ BitmapEx TemplateLocalView::getDefaultThumbnail( const OUString& rPath )
OUString aExt = aUrl.getExtension();
if ( ViewFilter_Application::isFilteredExtension( FILTER_APPLICATION::WRITER, aExt) )
- aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_TEXT ) );
+ aImg = BitmapEx(SFX_THUMBNAIL_TEXT);
else if ( ViewFilter_Application::isFilteredExtension( FILTER_APPLICATION::CALC, aExt) )
- aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_SHEET ) );
+ aImg = BitmapEx(SFX_THUMBNAIL_SHEET);
else if ( ViewFilter_Application::isFilteredExtension( FILTER_APPLICATION::IMPRESS, aExt) )
- aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_PRESENTATION ) );
+ aImg = BitmapEx(SFX_THUMBNAIL_PRESENTATION);
else if ( ViewFilter_Application::isFilteredExtension( FILTER_APPLICATION::DRAW, aExt) )
- aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_DRAWING ) );
+ aImg = BitmapEx(SFX_THUMBNAIL_DRAWING);
return aImg;
}
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx
index 1695fa25913f..55e424873dc3 100644
--- a/sfx2/source/control/templatesearchview.cxx
+++ b/sfx2/source/control/templatesearchview.cxx
@@ -15,6 +15,7 @@
#include <vcl/layout.hxx>
#include <doc.hrc>
+#include "bitmaps.hlst"
#include <vcl/builderfactory.hxx>
@@ -242,13 +243,13 @@ BitmapEx TemplateSearchView::getDefaultThumbnail( const OUString& rPath )
OUString aExt = aUrl.getExtension();
if ( ViewFilter_Application::isFilteredExtension( FILTER_APPLICATION::WRITER, aExt) )
- aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_TEXT ) );
+ aImg = BitmapEx(SFX_THUMBNAIL_TEXT);
else if ( ViewFilter_Application::isFilteredExtension( FILTER_APPLICATION::CALC, aExt) )
- aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_SHEET ) );
+ aImg = BitmapEx(SFX_THUMBNAIL_SHEET);
else if ( ViewFilter_Application::isFilteredExtension( FILTER_APPLICATION::IMPRESS, aExt) )
- aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_PRESENTATION ) );
+ aImg = BitmapEx(SFX_THUMBNAIL_PRESENTATION);
else if ( ViewFilter_Application::isFilteredExtension( FILTER_APPLICATION::DRAW, aExt) )
- aImg = BitmapEx ( SfxResId( SFX_THUMBNAIL_DRAWING ) );
+ aImg = BitmapEx(SFX_THUMBNAIL_DRAWING);
return aImg;
}
diff --git a/sfx2/source/control/templateview.hrc b/sfx2/source/control/templateview.hrc
index 693cceafa509..c06aba80b963 100644
--- a/sfx2/source/control/templateview.hrc
+++ b/sfx2/source/control/templateview.hrc
@@ -9,9 +9,5 @@
#define STR_WELCOME_LINE1 259
#define STR_WELCOME_LINE2 260
-#define BMP_WELCOME 261
-#define BMP_RECENTDOC_REMOVE 262
-#define BMP_RECENTDOC_REMOVE_HIGHLIGHTED 263
-#define BMP_DEFAULT 264
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/templateview.src b/sfx2/source/control/templateview.src
index cf05b69773e9..0a39ee7243a6 100644
--- a/sfx2/source/control/templateview.src
+++ b/sfx2/source/control/templateview.src
@@ -19,24 +19,4 @@ String STR_WELCOME_LINE2
Text [ en-US ] = "Drop a document here or pick an app from the left side to create one.";
};
-Bitmap BMP_WELCOME
-{
- File = "logo.png";
-};
-
-Bitmap BMP_RECENTDOC_REMOVE
-{
- File = "recentdoc_remove.png";
-};
-
-Bitmap BMP_RECENTDOC_REMOVE_HIGHLIGHTED
-{
- File = "recentdoc_remove_highlighted.png";
-};
-
-Bitmap BMP_DEFAULT
-{
- File = "templatestar.png";
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx
index 9a32bc8efa09..ffa069410ab0 100644
--- a/sfx2/source/control/templateviewitem.cxx
+++ b/sfx2/source/control/templateviewitem.cxx
@@ -24,6 +24,7 @@
#include <sfx2/sfxresid.hxx>
#include <templateview.hrc>
+#include "bitmaps.hlst"
using namespace basegfx;
using namespace basegfx::tools;
@@ -34,7 +35,7 @@ TemplateViewItem::TemplateViewItem (ThumbnailView &rView, sal_uInt16 nId)
: ThumbnailViewItem(rView, nId),
mnRegionId(USHRT_MAX),
mnDocId(USHRT_MAX),
- maDefaultBitmap(SfxResId(BMP_DEFAULT)),
+ maDefaultBitmap(BMP_DEFAULT),
mbIsDefaultTemplate(false)
{
}
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index fc3e67ea53ab..52e2477aec36 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -53,9 +53,6 @@
#define STR_STYLE_ELEMTLIST ( RC_DIALOG_BEGIN + 125 )
#define STR_FONT_TABPAGE ( RC_DIALOG_BEGIN + 126 )
#define STR_PREVIEW_CHECKBOX ( RC_DIALOG_BEGIN + 127 )
-#define RID_SFXBMP_WATERCAN ( RC_DIALOG_BEGIN + 128 )
-#define RID_SFXBMP_NEW_BY_EXAMPLE ( RC_DIALOG_BEGIN + 129 )
-#define RID_SFXBMP_UPDATE_BY_EXAMPLE ( RC_DIALOG_BEGIN + 130 )
#endif
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 68b5eda251a8..d74c57e53f23 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -70,6 +70,7 @@
#include "app.hrc"
#include "sfxlocal.hrc"
#include <dialog.hrc>
+#include "bitmaps.hlst"
#include <vcl/help.hxx>
#include <vcl/builderfactory.hxx>
@@ -1450,7 +1451,7 @@ CustomPropertyLine::CustomPropertyLine( vcl::Window* pParent ) :
m_aTimeField->SetExtFormat( ExtTimeFieldFormat::Long24H );
m_aDateField->SetExtDateFormat( ExtDateFieldFormat::SystemShortYYYY );
- m_aRemoveButton->SetModeImage(Image(BitmapEx(SfxResId(SFX_BMP_PROPERTY_REMOVE))));
+ m_aRemoveButton->SetModeImage(Image(BitmapEx(SFX_BMP_PROPERTY_REMOVE)));
m_aRemoveButton->SetQuickHelpText(SfxResId(STR_SFX_REMOVE_PROPERTY).toString());
m_aEditButton->SetText(SfxResId(SFX_ST_EDIT).toString());
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
index 96cd929e63f5..15fca113f380 100644
--- a/sfx2/source/dialog/dinfdlg.src
+++ b/sfx2/source/dialog/dinfdlg.src
@@ -93,11 +93,6 @@ String STR_SFX_REMOVE_PROPERTY
Text [ en-US ] = "Remove Property" ;
};
-Bitmap SFX_BMP_PROPERTY_REMOVE
-{
- File = "deleterow.bmp";
-};
-
String STR_SFX_QUERY_WRONG_TYPE
{
Text [ en-US ] = "The value entered does not match the specified type.\nThe value will be stored as text." ;
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index bd5684b947a2..b2a323aa6fe7 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -58,6 +58,7 @@
#include <sfx2/doctempl.hxx>
#include <sfx2/module.hxx>
#include "helpid.hrc"
+#include "bitmaps.hlst"
#include "appdata.hxx"
#include <sfx2/viewfrm.hxx>
@@ -2160,13 +2161,13 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(SfxBindings* pB, SfxTemplatePanel
, m_aActionTbL(VclPtrInstance<DropToolBox_Impl>(pDlgWindow, this))
, m_aActionTbR(VclPtrInstance<ToolBox>(pDlgWindow))
{
- m_aActionTbR->InsertItem(SID_STYLE_WATERCAN, Image(BitmapEx(SfxResId(RID_SFXBMP_WATERCAN))), SfxResId(STR_STYLE_FILL_FORMAT_MODE).toString());
+ m_aActionTbR->InsertItem(SID_STYLE_WATERCAN, Image(BitmapEx(RID_SFXBMP_WATERCAN)), SfxResId(STR_STYLE_FILL_FORMAT_MODE).toString());
m_aActionTbR->SetHelpId(SID_STYLE_WATERCAN, HID_TEMPLDLG_WATERCAN);
- m_aActionTbR->InsertItem(SID_STYLE_NEW_BY_EXAMPLE, Image(BitmapEx(SfxResId(RID_SFXBMP_NEW_BY_EXAMPLE))), SfxResId(STR_STYLE_NEW_STYLE_FROM_SELECTION).toString());
+ m_aActionTbR->InsertItem(SID_STYLE_NEW_BY_EXAMPLE, Image(BitmapEx(RID_SFXBMP_NEW_BY_EXAMPLE)), SfxResId(STR_STYLE_NEW_STYLE_FROM_SELECTION).toString());
m_aActionTbR->SetHelpId(SID_STYLE_NEW_BY_EXAMPLE, HID_TEMPLDLG_NEWBYEXAMPLE);
- m_aActionTbR->InsertItem(SID_STYLE_UPDATE_BY_EXAMPLE, Image(BitmapEx(SfxResId(RID_SFXBMP_UPDATE_BY_EXAMPLE))), SfxResId(STR_STYLE_UPDATE_STYLE).toString());
+ m_aActionTbR->InsertItem(SID_STYLE_UPDATE_BY_EXAMPLE, Image(BitmapEx(RID_SFXBMP_UPDATE_BY_EXAMPLE)), SfxResId(STR_STYLE_UPDATE_STYLE).toString());
m_aActionTbR->SetHelpId(SID_STYLE_UPDATE_BY_EXAMPLE, HID_TEMPLDLG_UPDATEBYEXAMPLE);
Initialize();
diff --git a/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src
index 5eb3c9db886d..d1c7fc510171 100644
--- a/sfx2/source/dialog/templdlg.src
+++ b/sfx2/source/dialog/templdlg.src
@@ -21,21 +21,6 @@
#include "dialog.hrc"
#include "helpid.hrc"
-Bitmap RID_SFXBMP_WATERCAN
-{
- File = "sc05554.png";
-};
-
-Bitmap RID_SFXBMP_NEW_BY_EXAMPLE
-{
- File = "sc05555.png";
-};
-
-Bitmap RID_SFXBMP_UPDATE_BY_EXAMPLE
-{
- File = "sc05556.png";
-};
-
// Strings ---------------------------------------------------------------
String STR_STYLE_ELEMTLIST
{
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index e917c24a4b98..e8496186bb19 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -22,6 +22,7 @@
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include "sfxlocal.hrc"
+#include "bitmaps.hlst"
#include <sfx2/sfxresid.hxx>
#include <svl/eitem.hxx>
@@ -214,7 +215,7 @@ namespace sfx2
m_aToolbox->Clear();
// Get the closer bitmap and set it as right most button.
- BitmapEx aBitmapEx(SfxResId(SFX_BMP_CLOSE_DOC));
+ BitmapEx aBitmapEx(SFX_BMP_CLOSE_DOC);
m_aToolbox->InsertItem(1, Image(aBitmapEx));
m_aToolbox->ShowItem( 1 );
}
diff --git a/sfx2/source/dialog/titledockwin.src b/sfx2/source/dialog/titledockwin.src
deleted file mode 100644
index f60c61f17085..000000000000
--- a/sfx2/source/dialog/titledockwin.src
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <sfx2/sfx.hrc>
-#include "sfxlocal.hrc"
-
-Bitmap SFX_BMP_CLOSE_DOC
-{
- File = "closedoc.png";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/doc.src b/sfx2/source/doc/doc.src
index a85b510eef75..f884e0d6651d 100644
--- a/sfx2/source/doc/doc.src
+++ b/sfx2/source/doc/doc.src
@@ -304,9 +304,4 @@ String STR_QMSG_ERROR_OPENING_FILE_CONTINUE
Text [ en-US ] = "\nProceeding with import may cause data loss or corruption, and application may become unstable or crash.\n\nDo you want to ignore the error and attempt to continue loading the file?";
};
-Bitmap BMP_ACTION_REFRESH
-{
- File = "reload.png";
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index 581895ba693f..be1c58bc96ef 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -52,6 +52,7 @@
#include <sfx2/sfxresid.hxx>
#include "graphhelp.hxx"
#include "doc.hrc"
+#include "bitmaps.hlst"
#include <memory>
@@ -205,16 +206,16 @@ bool GraphicHelper::getThumbnailFormatFromGDI_Impl(GDIMetaFile* pMetaFile, const
}
// static
-bool GraphicHelper::getThumbnailReplacement_Impl( sal_Int32 nResID, const uno::Reference< io::XStream >& xStream )
+bool GraphicHelper::getThumbnailReplacement_Impl(const OUString& rResID, const uno::Reference< io::XStream >& xStream )
{
bool bResult = false;
- if ( nResID && xStream.is() )
+ if (!rResID.isEmpty() && xStream.is())
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
try
{
uno::Reference< graphic::XGraphicProvider > xGraphProvider(graphic::GraphicProvider::create(xContext));
- const OUString aURL{"private:resource/sfx/bitmapex/"+OUString::number( nResID )};
+ const OUString aURL{"private:graphicrepository/" + rResID};
uno::Sequence< beans::PropertyValue > aMediaProps( 1 );
aMediaProps[0].Name = "URL";
@@ -241,34 +242,33 @@ bool GraphicHelper::getThumbnailReplacement_Impl( sal_Int32 nResID, const uno::R
return bResult;
}
-
// static
-sal_uInt16 GraphicHelper::getThumbnailReplacementIDByFactoryName_Impl( const OUString& aFactoryShortName, bool /*bIsTemplate*/ )
+OUString GraphicHelper::getThumbnailReplacementIDByFactoryName_Impl( const OUString& aFactoryShortName, bool /*bIsTemplate*/ )
{
- sal_uInt16 nResult = 0;
+ OUString sResult;
if ( aFactoryShortName == "scalc" )
{
- nResult = BMP_128X128_CALC_DOC;
+ sResult = BMP_128X128_CALC_DOC;
}
else if ( aFactoryShortName == "sdraw" )
{
- nResult = BMP_128X128_DRAW_DOC;
+ sResult = BMP_128X128_DRAW_DOC;
}
else if ( aFactoryShortName == "simpress" )
{
- nResult = BMP_128X128_IMPRESS_DOC;
+ sResult = BMP_128X128_IMPRESS_DOC;
}
else if ( aFactoryShortName == "smath" )
{
- nResult = BMP_128X128_MATH_DOC;
+ sResult = BMP_128X128_MATH_DOC;
}
else if ( aFactoryShortName == "swriter" || aFactoryShortName.startsWith("swriter/") )
{
- nResult = BMP_128X128_WRITER_DOC;
+ sResult = BMP_128X128_WRITER_DOC;
}
- return nResult;
+ return sResult;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/graphhelp.hxx b/sfx2/source/doc/graphhelp.hxx
index f70ebccf5a10..8a1d8ac89d97 100644
--- a/sfx2/source/doc/graphhelp.hxx
+++ b/sfx2/source/doc/graphhelp.hxx
@@ -52,11 +52,11 @@ public:
GDIMetaFile* pMetaFile,
const css::uno::Reference< css::io::XStream >& xStream );
- static sal_uInt16 getThumbnailReplacementIDByFactoryName_Impl( const OUString& aFactoryShortName,
- bool bIsTemplate );
+ static OUString getThumbnailReplacementIDByFactoryName_Impl(const OUString& aFactoryShortName,
+ bool bIsTemplate);
static bool getThumbnailReplacement_Impl(
- sal_Int32 nResID,
+ const OUString& rResID,
const css::uno::Reference< css::io::XStream >& xStream );
};
diff --git a/sfx2/source/doc/graphhelp.src b/sfx2/source/doc/graphhelp.src
deleted file mode 100644
index db2357fc1ab0..000000000000
--- a/sfx2/source/doc/graphhelp.src
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "doc.hrc"
-
-Bitmap BMP_128X128_CALC_DOC
-{
- File = "128x128_calc_doc-p.png";
-};
-
-Bitmap BMP_128X128_DRAW_DOC
-{
- File = "128x128_draw_doc-p.png";
-};
-
-Bitmap BMP_128X128_IMPRESS_DOC
-{
- File = "128x128_impress_doc-p.png";
-};
-
-Bitmap BMP_128X128_MATH_DOC
-{
- File = "128x128_math_doc-p.png";
-};
-
-Bitmap BMP_128X128_WRITER_DOC
-{
- File = "128x128_writer_doc-p.png";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 68fc849b58ec..dc2c032263f2 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3471,11 +3471,11 @@ bool SfxObjectShell::WriteThumbnail(bool bEncrypted, bool bIsTemplate, const uno
xSet->setPropertyValue("MediaType", uno::makeAny(OUString("image/png")));
if (bEncrypted)
{
- const sal_uInt16 nResID = GraphicHelper::getThumbnailReplacementIDByFactoryName_Impl(
+ const OUString sResID = GraphicHelper::getThumbnailReplacementIDByFactoryName_Impl(
GetFactory().GetFactoryName(),
bIsTemplate);
- if (nResID)
- bResult = GraphicHelper::getThumbnailReplacement_Impl(nResID, xStream);
+ if (!sResID.isEmpty())
+ bResult = GraphicHelper::getThumbnailReplacement_Impl(sResID, xStream);
}
else
{
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index a0f8da28cbb4..a5ae425edc26 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -58,6 +58,7 @@
#include <com/sun/star/task/InteractionHandler.hpp>
#include "doc.hrc"
+#include "bitmaps.hlst"
const char TM_SETTING_MANAGER[] = "TemplateManager";
const char TM_SETTING_LASTFOLDER[] = "LastFolder";
@@ -170,7 +171,7 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window *parent)
mpActionMenu = VclPtr<PopupMenu>::Create();
mpActionMenu->InsertItem(MNI_ACTION_NEW_FOLDER,
SfxResId(STR_CATEGORY_NEW).toString(),
- Image(BitmapEx(SfxResId(BMP_ACTION_REFRESH))));
+ Image(BitmapEx(BMP_ACTION_REFRESH)));
mpActionMenu->InsertItem(MNI_ACTION_RENAME_FOLDER,
SfxResId(STR_CATEGORY_RENAME).toString());
mpActionMenu->InsertItem(MNI_ACTION_DELETE_FOLDER,
@@ -178,7 +179,7 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window *parent)
mpActionMenu->InsertSeparator();
mpActionMenu->InsertItem(MNI_ACTION_REFRESH,
SfxResId(STR_ACTION_REFRESH).toString(),
- Image(BitmapEx(SfxResId(BMP_ACTION_REFRESH))));
+ Image(BitmapEx(BMP_ACTION_REFRESH)));
mpActionMenu->InsertItem(MNI_ACTION_DEFAULT,SfxResId(STR_ACTION_DEFAULT).toString());
mpActionMenu->SetSelectHdl(LINK(this,SfxTemplateManagerDlg,MenuSelectHdl));
diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc
index 100d008cbd48..bc7ff0fc20c7 100644
--- a/sfx2/source/inc/sfxlocal.hrc
+++ b/sfx2/source/inc/sfxlocal.hrc
@@ -39,10 +39,6 @@
#define SFX_LB_PROPERTY_STRINGARRAY (RID_SFX_SFXLOCAL_START + 12)
#define SFX_CB_PROPERTY_STRINGARRAY (RID_SFX_SFXLOCAL_START + 13)
-// Images ----------------------------------------------------------------
-#define SFX_BMP_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 0)
-#define SFX_BMP_CLOSE_DOC (RID_SFX_SFXLOCAL_START + 2)
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */