Kaydet (Commit) 608cd2cf authored tarafından Ashod Nakashian's avatar Ashod Nakashian Kaydeden (comit) Ashod Nakashian

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: 's avatarAshod Nakashian <ashnakash@gmail.com>
üst 42c9821c
...@@ -2160,6 +2160,12 @@ void SwEditShell::ClassifyDocPerHighestParagraphClass() ...@@ -2160,6 +2160,12 @@ void SwEditShell::ClassifyDocPerHighestParagraphClass()
const SfxClassificationPolicyType eHighestClassType = SfxClassificationHelper::stringToPolicyType(sHighestClass); 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), // Check the origin, if "manual" (created via advanced classification dialog),
// then we just need to set the category name. // then we just need to set the category name.
if (sfx::getCreationOriginProperty(xPropertyContainer, aKeyCreator) == sfx::ClassificationCreationOrigin::MANUAL) if (sfx::getCreationOriginProperty(xPropertyContainer, aKeyCreator) == sfx::ClassificationCreationOrigin::MANUAL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment