summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-10-03 05:49:51 -0400
committerAshod Nakashian <ashnakash@gmail.com>2019-12-26 04:35:55 +0100
commite6a6449aab2b63252ccb4ca9e3e009534c5f0c48 (patch)
tree9576dba13f9005492a871e465c12a628fa1b7363
parentd50f6eb167a1b3c74dbe6e66b10ec906c2d1e351 (diff)
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@gmail.com> (cherry picked from commit 10a0693a60d11cfd2401f9f96041bc3d5d7c4c5b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85808 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r--sw/source/core/edit/edfcol.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 8068e618ffcf..b97ce353a840 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)