[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/source
Marco Cecchetti
marco.cecchetti at collabora.com
Wed Jul 5 19:24:58 UTC 2017
sw/source/uibase/shells/grfsh.cxx | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
New commits:
commit ea9bb344441bffb9b2486d42d5ef50e9d41ae96a
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Wed Jul 5 12:27:40 2017 +0200
Fix a bit obscure pointer check
Change-Id: Ib5276bacfb1b4e429960d93ddccdf63f61db6f03
Reviewed-on: https://gerrit.libreoffice.org/39574
Reviewed-by: Marco Cecchetti <mrcekets at gmail.com>
Tested-by: Marco Cecchetti <mrcekets at gmail.com>
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index c269f75ba66a..9d101211db5d 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -133,11 +133,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
case SID_SAVE_GRAPHIC:
{
GraphicAttr aGraphicAttr;
- const GraphicObject* pGraphicObj = rSh.GetGraphicObj();
- if (pGraphicObj)
- {
- rSh.GetGraphicAttr(aGraphicAttr);
- }
+ rSh.GetGraphicAttr(aGraphicAttr);
short nState = RET_CANCEL;
if (aGraphicAttr != GraphicAttr()) // the image has been modified
@@ -155,11 +151,15 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if (nState == RET_YES)
{
- Graphic aGraphic = pGraphicObj->GetTransformedGraphic(pGraphicObj->GetPrefSize(), pGraphicObj->GetPrefMapMode(), aGraphicAttr);
- OUString sGrfNm;
- OUString sFilterNm;
- rSh.GetGrfNms( &sGrfNm, &sFilterNm );
- GraphicHelper::ExportGraphic( aGraphic, sGrfNm );
+ const GraphicObject* pGraphicObj = rSh.GetGraphicObj();
+ if (pGraphicObj)
+ {
+ Graphic aGraphic = pGraphicObj->GetTransformedGraphic(pGraphicObj->GetPrefSize(), pGraphicObj->GetPrefMapMode(), aGraphicAttr);
+ OUString sGrfNm;
+ OUString sFilterNm;
+ rSh.GetGrfNms( &sGrfNm, &sFilterNm );
+ GraphicHelper::ExportGraphic( aGraphic, sGrfNm );
+ }
}
else if (nState == RET_NO)
{
More information about the Libreoffice-commits
mailing list