diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-10-24 16:07:05 +0400 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2017-10-28 15:52:07 +0200 |
commit | b480d5e4c03438487b645ae10347c5c22f36bb25 (patch) | |
tree | f2f71844ff7a8d0f66d076e3165d3015c474e642 /include/svx | |
parent | 7a2e7c32d38db02aaa5d78d5e8aaf86cabfde586 (diff) |
TSCP: bump the doc classification if lower than paragraph
The document classification should not be lower than
the highest-classificed paragraph. This insures that
the document classification is as high as the highest
classified paragraph upon saving.
Change-Id: Ic838b886ecf97da2eca56870f68aa3e51c7291f6
Reviewed-on: https://gerrit.libreoffice.org/43772
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/ClassificationDialog.hxx | 2 | ||||
-rw-r--r-- | include/svx/ClassificationField.hxx | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/include/svx/ClassificationDialog.hxx b/include/svx/ClassificationDialog.hxx index c2e48e4a760c..19e869a5f74d 100644 --- a/include/svx/ClassificationDialog.hxx +++ b/include/svx/ClassificationDialog.hxx @@ -49,7 +49,7 @@ private: DECL_LINK(SelectIPPartNumbersHdl, ListBox&, void); DECL_LINK(DoubleClickIPPartHdl, ListBox&, void); - void insertField(ClassificationType eType, OUString const & rString); + void insertField(ClassificationType eType, OUString const & rString, OUString const & rFullString); public: ClassificationDialog(vcl::Window* pParent, bool bPerParagraph, const std::function<void()>& rParagraphSignHandler = [](){}); diff --git a/include/svx/ClassificationField.hxx b/include/svx/ClassificationField.hxx index 53237dae1921..559ed66511d8 100644 --- a/include/svx/ClassificationField.hxx +++ b/include/svx/ClassificationField.hxx @@ -30,16 +30,18 @@ class SVX_DLLPUBLIC ClassificationField : public SvxFieldData public: ClassificationType meType; OUString msDescription; + OUString msFullClassName; - ClassificationField(ClassificationType eType, OUString const & sDescription) + ClassificationField(ClassificationType eType, OUString const & sDescription, OUString const & sFullClassName) : SvxFieldData() , meType(eType) , msDescription(sDescription) + , msFullClassName(sFullClassName) {} ClassificationField* Clone() const override { - return new ClassificationField(meType, msDescription); + return new ClassificationField(meType, msDescription, msFullClassName); } bool operator==(const SvxFieldData& rOther) const override @@ -49,7 +51,8 @@ public: const ClassificationField& rOtherField = static_cast<const ClassificationField&>(rOther); return (meType == rOtherField.meType && - msDescription == rOtherField.msDescription); + msDescription == rOtherField.msDescription && + msFullClassName == rOtherField.msFullClassName); } }; @@ -57,6 +60,7 @@ struct SVX_DLLPUBLIC ClassificationResult { ClassificationType meType; OUString msString; + OUString msAbbreviatedString; sal_Int32 mnParagraph; }; |