summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx23
1 files changed, 10 insertions, 13 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 78015cd9c94f..4051b1527228 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -789,23 +789,20 @@ ErrCode FileDialogHelper_Impl::getGraphic( Graphic& rGraphic ) const
{
ErrCode nRet = ERRCODE_NONE;
- if ( ! maGraphic )
- {
- OUString aPath;;
- Sequence < OUString > aPathSeq = mxFileDlg->getFiles();
+ // rhbz#1079672 do not return maGraphic, it need not be the selected file
- if ( aPathSeq.getLength() == 1 )
- {
- aPath = aPathSeq[0];
- }
+ OUString aPath;;
+ Sequence<OUString> aPathSeq = mxFileDlg->getFiles();
- if ( !aPath.isEmpty() )
- nRet = getGraphic( aPath, rGraphic );
- else
- nRet = ERRCODE_IO_GENERAL;
+ if (aPathSeq.getLength() == 1)
+ {
+ aPath = aPathSeq[0];
}
+
+ if (!aPath.isEmpty())
+ nRet = getGraphic(aPath, rGraphic);
else
- rGraphic = maGraphic;
+ nRet = ERRCODE_IO_GENERAL;
return nRet;
}