diff options
Diffstat (limited to 'include/svx/ClassificationField.hxx')
-rw-r--r-- | include/svx/ClassificationField.hxx | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/include/svx/ClassificationField.hxx b/include/svx/ClassificationField.hxx new file mode 100644 index 000000000000..53237dae1921 --- /dev/null +++ b/include/svx/ClassificationField.hxx @@ -0,0 +1,67 @@ +/* -*- 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> +#include <editeng/flditem.hxx> + +namespace svx { + +enum class ClassificationType +{ + CATEGORY, + MARKING, + TEXT, + INTELLECTUAL_PROPERTY_PART +}; + +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: */ |