diff options
author | José Guilherme Vanz <vanz@libreoffice.org> | 2013-10-20 01:43:00 -0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-10-20 12:25:45 +0000 |
commit | 288f0029c69ab0532165877637a146f774d5e740 (patch) | |
tree | bbe152c9f188fc17a75613bb10c00b1ba4c75055 /sfx2 | |
parent | 63f705643ee92421a8bc689fb33190340d8ece6a (diff) |
fdo#52622 - Reduce copy and paste code
This commit removes copy and paste code, creating a constructor for it
Change-Id: I7a66cfda7fc7c11308d155a7a890352fdacfaacc
Reviewed-on: https://gerrit.libreoffice.org/6356
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/menu/mnumgr.cxx | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 23c917c9ebac..344834ae78e0 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -128,27 +128,6 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen } } - -//-------------------------------------------------------------------- - - -static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl ) -{ - Image aRes; - - OUString aTmp; - osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp ); - - Graphic aGraphic; - const OUString aFilterName( IMP_PNG ); - if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) ) - { - aRes = Image( aGraphic.GetBitmapEx() ); - } - return aRes; -} - - PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu ) { @@ -188,7 +167,7 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu ) OUString sThesImplName( aHelper.GetThesImplName( aLocale ) ); OUString aSynonymsImageUrl( aCfg.GetSynonymsContextImage( sThesImplName ) ); if (!sThesImplName.isEmpty() && !aSynonymsImageUrl.isEmpty()) - aImage = Image( lcl_GetImageFromPngUrl( aSynonymsImageUrl ) ); + aImage = Image( aSynonymsImageUrl ); for (sal_uInt16 i = 0; (size_t)i < nNumSynonyms; ++i) { |