summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx6
-rw-r--r--xmloff/source/draw/SignatureLineContext.cxx12
2 files changed, 12 insertions, 6 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 6f8a78ac501b..c613bdaa94dd 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2170,6 +2170,12 @@ DECLARE_ODFEXPORT_TEST(testSignatureLineProperties, "signatureline-properties.fo
getProperty<OUString>(xShape, "SignatureLineSigningInstructions"));
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xShape, "SignatureLineCanAddComment"));
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xShape, "SignatureLineShowSignDate"));
+
+ // tdf#130917 This needs to be always set when importing a doc, ooxml export expects it.
+ uno::Reference<graphic::XGraphic> xUnsignedGraphic;
+ uno::Reference<beans::XPropertySet> xProps(xShape, uno::UNO_QUERY);
+ xProps->getPropertyValue("SignatureLineUnsignedImage") >>= xUnsignedGraphic;
+ CPPUNIT_ASSERT_EQUAL(true, xUnsignedGraphic.is());
}
DECLARE_ODFEXPORT_TEST(testQrCodeGenProperties, "qrcode-properties.odt")
diff --git a/xmloff/source/draw/SignatureLineContext.cxx b/xmloff/source/draw/SignatureLineContext.cxx
index 880d613e3f3f..bbc99277cc47 100644
--- a/xmloff/source/draw/SignatureLineContext.cxx
+++ b/xmloff/source/draw/SignatureLineContext.cxx
@@ -60,6 +60,12 @@ SignatureLineContext::SignatureLineContext(SvXMLImport& rImport, sal_uInt16 nPrf
xPropSet->setPropertyValue("SignatureLineShowSignDate", Any(bShowSignDate));
xPropSet->setPropertyValue("SignatureLineCanAddComment", Any(bCanAddComment));
+ // Save unsigned graphic (need it when exporting)
+ Reference<XGraphic> xUnsignedGraphic;
+ xPropSet->getPropertyValue("Graphic") >>= xUnsignedGraphic;
+ if (xUnsignedGraphic.is())
+ xPropSet->setPropertyValue("SignatureLineUnsignedImage", Any(xUnsignedGraphic));
+
Reference<XGraphic> xGraphic;
bool bIsSigned(false);
try
@@ -107,12 +113,6 @@ SignatureLineContext::SignatureLineContext(SvXMLImport& rImport, sal_uInt16 nPrf
xGraphic = pSignatureInfo->InvalidSignatureLineImage;
}
- // Save unsigned graphic
- Reference<XGraphic> xUnsignedGraphic;
- xPropSet->getPropertyValue("Graphic") >>= xUnsignedGraphic;
- if (xUnsignedGraphic.is())
- xPropSet->setPropertyValue("SignatureLineUnsignedImage", Any(xUnsignedGraphic));
-
xPropSet->setPropertyValue("Graphic", Any(xGraphic));
}
xPropSet->setPropertyValue("SignatureLineIsSigned", Any(bIsSigned));