10#ifndef INCLUDED_SFX2_CLASSIFICATIONHELPER_HXX
11#define INCLUDED_SFX2_CLASSIFICATIONHELPER_HXX
18#include <rtl/ustring.hxx>
24class XPropertyContainer;
28class XDocumentProperties;
57 static bool IsClassified(
58 const css::uno::Reference<css::document::XDocumentProperties>& xDocumentProperties);
61 CheckPaste(
const css::uno::Reference<css::document::XDocumentProperties>& xSource,
62 const css::uno::Reference<css::document::XDocumentProperties>& xDestination);
67 const css::uno::Reference<css::document::XDocumentProperties>& xDocumentProperties,
68 bool bUseLocalizedPolicy =
true);
73 std::vector<OUString> GetBACNames();
75 std::vector<OUString> GetBACIdentifiers();
77 const OUString& GetAbbreviatedBACName(
const OUString& sFullName);
79 OUString GetBACNameForIdentifier(std::u16string_view sIdentifier);
81 std::vector<OUString> GetAbbreviatedBACNames();
85 OUString GetHigherClass(
const OUString& first,
const OUString& second);
87 bool HasImpactLevel();
90 sal_Int32 GetImpactLevel();
92 OUString GetImpactScale();
93 OUString GetDocumentWatermark();
95 bool HasDocumentHeader();
97 bool HasDocumentFooter();
100 std::vector<OUString>
const& GetMarkings()
const;
101 std::vector<OUString>
const& GetIntellectualPropertyParts()
const;
102 std::vector<OUString>
const& GetIntellectualPropertyPartNumbers()
const;
110 static const OUString& PROP_DOCHEADER();
112 static const OUString& PROP_DOCFOOTER();
114 static const OUString& PROP_DOCWATERMARK();
116 static const OUString& PROP_PREFIX_INTELLECTUALPROPERTY();
166 return getPolicyKey() +
"BusinessAuthorizationCategory:Name";
176 return getPolicyKey() +
"BusinessAuthorizationCategory:Identifier";
198 return getPolicyKey() +
"Custom:IntellectualPropertyPart";
213 return getPolicyKey() +
"Custom:FullTexturalRepresentation";
221 css::uno::Reference<css::beans::XPropertyContainer>
const& rxPropertyContainer,
Implementation details of SfxClassificationHelper.
Shared code to handle Business Authorization Identification and Labeling Scheme (BAILS) properties.
~SfxClassificationHelper()
std::unique_ptr< Impl > m_pImpl
SfxClassificationPolicyType
Specifies a policy type, to be used with SetBACName(). Getters always use IntellectualProperty for no...
SfxClassificationCheckPasteResult
Return code of SfxClassificationHelper::CheckPaste().
@ DocClassificationTooLow
OUString makeCreationOriginKey() const
Classification creation origin key.
bool isMarkingKey(std::u16string_view aKey) const
OUString makeNumberedMarkingKey()
OUString makeFullTextualRepresentationKey() const
bool isMarkingTextKey(std::u16string_view aKey) const
OUString makeNumberedIntellectualPropertyPartKey()
sal_Int32 m_nMarkingNumber
OUString const & getPolicyKey() const
OUString makeMarkingKey() const
sal_Int32 m_nIPPartNumber
const SfxClassificationPolicyType m_ePolicyType
bool isCategoryIdentifierKey(std::u16string_view aKey) const
bool isCategoryNameKey(std::u16string_view aKey) const
ClassificationKeyCreator(SfxClassificationPolicyType ePolicyType)
OUString makeCategoryNameKey() const
OUString makeCategoryIdentifierKey() const
OUString makeNumberedTextKey()
OUString makeTextKey() const
OUString makeIntellectualPropertyPartKey() const
bool isIntellectualPropertyPartKey(std::u16string_view aKey) const
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
sfx::ClassificationCreationOrigin getCreationOriginProperty(uno::Reference< beans::XPropertyContainer > const &rxPropertyContainer, sfx::ClassificationKeyCreator const &rKeyCreator)
ClassificationCreationOrigin
Specifies the origin: either defined by the BAF policy or manual via. the advanced classification dia...