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

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Fri Nov 17 12:40:37 UTC 2017


 sw/inc/strings.hrc             |    6 ++++++
 sw/source/core/edit/edfcol.cxx |    7 +++++++
 2 files changed, 13 insertions(+)

New commits:
commit 3b501c4478e5da43ea092c51e5afdb66790d028a
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Fri Nov 17 12:34:22 2017 +0900

    TSCP: show "OK" dialog when doc. classification changes on save
    
    Change-Id: If0b24ceb5789ce505dc329d17fdad114749374d7
    Reviewed-on: https://gerrit.libreoffice.org/44859
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 75f64148a4e5..76388ee520ca 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -1338,6 +1338,12 @@
 #define STR_MENU_DOWN                           NC_("STR_MENU_DOWN", "Do~wnwards")
 
 /*--------------------------------------------------------------------
+    Description: Classification strings
+ --------------------------------------------------------------------*/
+
+#define STR_CLASSIFICATION_LEVEL_CHANGED        NC_("STR_CLASSIFICATION_LEVEL_CHANGED", "Document classification has changed because a paragraph classification level is higher")
+
+/*--------------------------------------------------------------------
     Description: Paragraph Signature
  --------------------------------------------------------------------*/
 #define STR_VALID                               NC_("STR_VALID", " Valid ")
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index cccf2ab539a2..d76ab5a2120e 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -57,6 +57,7 @@
 #include <svx/ClassificationCommon.hxx>
 #include <svl/cryptosign.hxx>
 #include <vcl/svapp.hxx>
+#include <vcl/msgbox.hxx>
 
 #include <hintids.hxx>
 #include <doc.hxx>
@@ -2105,6 +2106,12 @@ void SwEditShell::ClassifyDocPerHighestParagraphClass()
         sHighestClass = aHelper.GetHigherClass(sHighestClass, aClassificationCategory);
     }
 
+    if (aClassificationCategory != sHighestClass)
+    {
+        ScopedVclPtrInstance<QueryBox> aQueryBox(nullptr, MessBoxStyle::Ok, SwResId(STR_CLASSIFICATION_LEVEL_CHANGED));
+        aQueryBox->Execute();
+    }
+
     const SfxClassificationPolicyType eHighestClassType = SfxClassificationHelper::stringToPolicyType(sHighestClass);
 
     // Check the origin, if "manual" (created via advanced classification dialog),


More information about the Libreoffice-commits mailing list