diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2017-09-11 14:30:42 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2017-09-19 15:22:47 +0200 |
commit | 901bacd637c6f2ca7394a9f13f1c5b7fb56a63ce (patch) | |
tree | cffc6caa94a45215435e2ca6847f753ddb3d39d6 /include/svx/ClassificationField.hxx | |
parent | TSCP: Extend the BAF policy with marking and IP parts (diff) | |
download | core-901bacd637c6f2ca7394a9f13f1c5b7fb56a63ce.tar.gz core-901bacd637c6f2ca7394a9f13f1c5b7fb56a63ce.zip |
TSCP: Classification Text Editor based on EditEngine
Change-Id: I70f4999fe3a787b866ee1f8959cf1eb225b81f07
Diffstat (limited to 'include/svx/ClassificationField.hxx')
-rw-r--r-- | include/svx/ClassificationField.hxx | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/include/svx/ClassificationField.hxx b/include/svx/ClassificationField.hxx new file mode 100644 index 000000000000..ab2b01a8e122 --- /dev/null +++ b/include/svx/ClassificationField.hxx @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#ifndef INCLUDED_SVX_CLASSIFICATIONFIELD_HXX +#define INCLUDED_SVX_CLASSIFICATIONFIELD_HXX + +#include <sal/config.h> +#include <svx/svxdllapi.h> + +namespace svx { + +enum class ClassificationType +{ + CLASSIFICATION, + MARKINGS, + TEXT, +}; + +class SVX_DLLPUBLIC ClassificationField : public SvxFieldData +{ +public: + ClassificationType meType; + OUString msDescription; + + ClassificationField(ClassificationType eType, OUString const & sDescription) + : SvxFieldData() + , meType(eType) + , msDescription(sDescription) + {} + + ClassificationField* Clone() const override + { + return new ClassificationField(meType, msDescription); + } + + bool operator==(const SvxFieldData& rOther) const override + { + if (typeid(rOther) != typeid(*this)) + return false; + + const ClassificationField& rOtherField = static_cast<const ClassificationField&>(rOther); + return (meType == rOtherField.meType) && + (msDescription == rOtherField.msDescription); + } +}; + +struct SVX_DLLPUBLIC ClassificationResult +{ + ClassificationType meType; + OUString msString; + sal_Int32 mnParagraph; +}; + +} // end svx namespace + +#endif // INCLUDED_SVX_CLASSIFICATIONFIELD_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |