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 /cui | |
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 'cui')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 0686caf04833..d32a172249c5 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -802,19 +802,6 @@ void SpellDialog::SetLanguage( sal_uInt16 nLang ) m_pLanguageLB->SelectLanguage( nLang ); } -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; -} void SpellDialog::SetTitle_Impl(LanguageType nLang) { OUString sTitle = rParent.HasGrammarChecking() ? m_sTitleSpellingGrammar : m_sTitleSpelling; @@ -876,7 +863,7 @@ int SpellDialog::InitUserDicts() xSvcInfo->getImplementationName()) ); if (!aDictionaryImageUrl.isEmpty()) { - Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) ); + Image aImage( aDictionaryImageUrl ); pMenu->SetItemImage( nItemId, aImage ); } } |