diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-06-16 14:51:13 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-06-16 16:52:43 +0200 |
commit | aca32a55456aa4e907b216fb490b3c15d26c3d55 (patch) | |
tree | ad6056715749b05c2c50ae0b0b251834fb0912c4 /xmlsecurity | |
parent | 4da11a5d39ccd9f59e326011d4de7ffee8a71d10 (diff) |
tdf#146547 sfx2: allow read-only documents to be modified
This is particularly useful for a Writer document that contains a
section that is set to be editable in a read-only document, so that the
user is warned when closing such a document without saving it.
Originally this check was added in commit
27db57efc51487b3976fbf73df1868b8fb78d201 "CWS fwkbugfix05"
"#i39869#: readonly docs should never become modified"
but the actual problem there was that the read-only document was
displayed in a wizard dialog, not in a document view, so let's instead
check that the document is some kind of "internal" document.
Also the dialog's Save button should do something, and since the
document is read-only, a Save As dialog appears appropriate.
Change-Id: I339cbe92a2c9eb74a1f5061246f921037a47f79c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153180
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/qa/unit/signing/signing.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx index d59a0e84a666..bb7e050a3886 100644 --- a/xmlsecurity/qa/unit/signing/signing.cxx +++ b/xmlsecurity/qa/unit/signing/signing.cxx @@ -756,6 +756,10 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testPDFAddVisibleSignature) SdrView* pView = SfxViewShell::Current()->GetDrawView(); svx::SignatureLineHelper::setShapeCertificate(pView, aCertificates[0]); + // the document is modified now, but Sign function can't show SaveAs dialog + // in unit test, so just clear the modified + pObjectShell->SetModified(false); + // When: do the actual signing. pObjectShell->SignDocumentContentUsingCertificate(aCertificates[0]); |