[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 3 13:17:11 UTC 2019


 sw/source/core/edit/edfcol.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 608cd2cfe9c82855360c94d629eaac7a76ae212a
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Oct 3 05:49:51 2018 -0400
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Thu Jan 3 14:16:44 2019 +0100

    sw: paragraph-sign: avoid re-validating paragraphs when classifying
    
    When setting the classification watermark, every edit to the document
    is triggering a re-validation of signatures, which is excessive and
    excessively expensive.
    
    Change-Id: I7808877263f553a871f2c31856da1a2f9e50c4bb
    Reviewed-on: https://gerrit.libreoffice.org/63007
    Tested-by: Jenkins
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index a3ca45f5ad5a..bd057fb90c66 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -2160,6 +2160,12 @@ void SwEditShell::ClassifyDocPerHighestParagraphClass()
 
     const SfxClassificationPolicyType eHighestClassType = SfxClassificationHelper::stringToPolicyType(sHighestClass);
 
+    // Prevent paragraph signature validation since the below changes (f.e. watermarking) are benign.
+    const bool bOldValidationFlag = SetParagraphSignatureValidation(false);
+    comphelper::ScopeGuard const g([this, bOldValidationFlag]() {
+        SetParagraphSignatureValidation(bOldValidationFlag);
+    });
+
     // Check the origin, if "manual" (created via advanced classification dialog),
     // then we just need to set the category name.
     if (sfx::getCreationOriginProperty(xPropertyContainer, aKeyCreator) == sfx::ClassificationCreationOrigin::MANUAL)


More information about the Libreoffice-commits mailing list