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 /editeng | |
parent | L10n of SWF export options dialog (diff) | |
download | core-288f0029c69ab0532165877637a146f774d5e740.tar.gz core-288f0029c69ab0532165877637a146f774d5e740.zip |
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 'editeng')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 8f331c80d209..18b0c9a15686 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -862,26 +862,6 @@ sal_Bool EditView::IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMa return pImpEditView->IsWrongSpelledWord( aPaM , bMarkIfWrong ); } - -static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl ) -{ - Image aRes; - OUString aTmp; - osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp ); -// OString aPath = OString( aTmp.getStr(), aTmp.getLength(), osl_getThreadTextEncoding() ); -#if defined(WNT) -// aTmp = lcl_Win_GetShortPathName( aTmp ); -#endif - Graphic aGraphic; - const OUString aFilterName( IMP_PNG ); - if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) ) - { - aRes = Image( aGraphic.GetBitmapEx() ); - } - return aRes; -} - - void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) { DBG_CHKTHIS( EditView, 0 ); @@ -1036,7 +1016,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) xSvcInfo->getImplementationName()) ); if (!aDictionaryImageUrl.isEmpty() ) { - Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) ); + Image aImage( aDictionaryImageUrl ); pInsertMenu->SetItemImage( nPos, aImage ); } } |