[Libreoffice-commits] core.git: svx/source xmloff/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Wed Jun 27 05:14:43 UTC 2018
svx/source/svdraw/svdograf.cxx | 5 ++++-
xmloff/source/draw/SignatureLineContext.cxx | 7 +++++++
2 files changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 79e434948d65dd9eba150bc986e968bcb3754631
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Mon Jun 18 11:46:10 2018 +0200
tdf#117904 Don't allow copying signed shapes
Instead just copy the "unsigned" graphic
Change-Id: I5183b0b33be0469dceaace142d73aa403cc32ef2
Reviewed-on: https://gerrit.libreoffice.org/56472
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 0dc387891990..aefebe7b3a7c 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -884,7 +884,6 @@ SdrGrafObj& SdrGrafObj::operator=( const SdrGrafObj& rObj )
return *this;
SdrRectObj::operator=( rObj );
- mpGraphicObject->SetGraphic( rObj.GetGraphic(), &rObj.GetGraphicObject() );
aFileName = rObj.aFileName;
aFilterName = rObj.aFilterName;
bMirrored = rObj.bMirrored;
@@ -898,6 +897,10 @@ SdrGrafObj& SdrGrafObj::operator=( const SdrGrafObj& rObj )
mbIsSignatureLineShowSignDate = rObj.mbIsSignatureLineShowSignDate;
mbIsSignatureLineCanAddComment = rObj.mbIsSignatureLineCanAddComment;
mpSignatureLineUnsignedGraphic = rObj.mpSignatureLineUnsignedGraphic;
+ if (mbIsSignatureLine && rObj.mpSignatureLineUnsignedGraphic)
+ mpGraphicObject->SetGraphic(rObj.mpSignatureLineUnsignedGraphic);
+ else
+ mpGraphicObject->SetGraphic( rObj.GetGraphic(), &rObj.GetGraphicObject() );
if( rObj.IsLinkedGraphic() )
{
diff --git a/xmloff/source/draw/SignatureLineContext.cxx b/xmloff/source/draw/SignatureLineContext.cxx
index 3adc70dd779c..445d9c73c2bc 100644
--- a/xmloff/source/draw/SignatureLineContext.cxx
+++ b/xmloff/source/draw/SignatureLineContext.cxx
@@ -100,6 +100,13 @@ SignatureLineContext::SignatureLineContext(SvXMLImport& rImport, sal_uInt16 nPrf
"No InvalidSignatureLineImage!");
xGraphic = xSignatureInfo[i].InvalidSignatureLineImage;
}
+
+ // Save unsigned graphic
+ Reference<XGraphic> xUnsignedGraphic;
+ xPropSet->getPropertyValue("Graphic") >>= xUnsignedGraphic;
+ if (xUnsignedGraphic.is())
+ xPropSet->setPropertyValue("SignatureLineUnsignedImage", Any(xUnsignedGraphic));
+
xPropSet->setPropertyValue("Graphic", Any(xGraphic));
break;
}
More information about the Libreoffice-commits
mailing list