diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-26 11:00:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-04-26 11:52:56 +0100 |
commit | 505573b8c76fd8e99aae3ac2555a3fbb0ac9a975 (patch) | |
tree | df661f553b891f8beeb9ea065cdd0ed9fb5ba4e6 /sfx2/source/doc/graphhelp.cxx | |
parent | 8cd1ae22eb2d464516717d767bd3e5f6c2f4bd34 (diff) |
remove sfx2 bitmaps from .src files
Change-Id: Ibc4261af5f479badd281211e467d2c7b524af3f3
Diffstat (limited to 'sfx2/source/doc/graphhelp.cxx')
-rw-r--r-- | sfx2/source/doc/graphhelp.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
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: */ |