diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-23 14:39:23 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-23 16:09:02 +0100 |
commit | 633e9b9b66f1717a90db73ee6954c8145b934ecb (patch) | |
tree | 3d4f75b484049421bb0ff134abef30be3bdb0aab /sfx2 | |
parent | 27e2955e01d997a3b2be852126475cdf2aa7140b (diff) |
sfx2 classification: write category ID to document metadata
The assumption is that the name may not be unique, but the ID always is.
Change-Id: If6c5e34999c88732c978ed88871b384d9fe5c272
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/classification/example.xml | 8 | ||||
-rw-r--r-- | sfx2/source/view/classificationhelper.cxx | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/sfx2/classification/example.xml b/sfx2/classification/example.xml index 40acd8a01709..053caeb3e027 100644 --- a/sfx2/classification/example.xml +++ b/sfx2/classification/example.xml @@ -9,7 +9,7 @@ <baf:BusinessAuthorizationCategory Identifier="urn:example:tscp:1:non-business" Name="Non-Business"> <baf:LabelingRules/> <baf:ImpactLevel> - <baf:Scale>UK Cabinet</baf:Scale> + <baf:Scale>UK-Cabinet</baf:Scale> <baf:ConfidentalityValue>0</baf:ConfidentalityValue> </baf:ImpactLevel> </baf:BusinessAuthorizationCategory> @@ -21,7 +21,7 @@ </baf:VisualMarkingPart> </baf:LabelingRules> <baf:ImpactLevel> - <baf:Scale>UK Cabinet</baf:Scale> + <baf:Scale>UK-Cabinet</baf:Scale> <baf:ConfidentalityValue>1</baf:ConfidentalityValue> </baf:ImpactLevel> </baf:BusinessAuthorizationCategory> @@ -41,7 +41,7 @@ </baf:VisualMarkingPart> </baf:LabelingRules> <baf:ImpactLevel> - <baf:Scale>UK Cabinet</baf:Scale> + <baf:Scale>UK-Cabinet</baf:Scale> <baf:ConfidentalityValue>2</baf:ConfidentalityValue> </baf:ImpactLevel> </baf:BusinessAuthorizationCategory> @@ -61,7 +61,7 @@ </baf:VisualMarkingPart> </baf:LabelingRules> <baf:ImpactLevel> - <baf:Scale>UK Cabinet</baf:Scale> + <baf:Scale>UK-Cabinet</baf:Scale> <baf:ConfidentalityValue>3</baf:ConfidentalityValue> </baf:ImpactLevel> </baf:BusinessAuthorizationCategory> diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx index 014c5a849c8c..8c1d4b550e88 100644 --- a/sfx2/source/view/classificationhelper.cxx +++ b/sfx2/source/view/classificationhelper.cxx @@ -131,20 +131,22 @@ throw (xml::sax::SAXException, uno::RuntimeException, std::exception) OUString aName = xAttribs->getValueByName("Name"); if (!m_pCategory && !aName.isEmpty()) { + OUString aIdentifier = xAttribs->getValueByName("Identifier"); + // Create a new category and initialize it with the data that's true for all categories. SfxClassificationCategory& rCategory = m_aCategories[aName]; rCategory.m_aLabels["urn:bails:IntellectualProperty:PolicyAuthority:Name"] = m_aPolicyAuthorityName; rCategory.m_aLabels["urn:bails:IntellectualProperty:Policy:Name"] = m_aPolicyName; + rCategory.m_aLabels["urn:bails:IntellectualProperty:BusinessAuthorization:Identifier"] = m_aProgramID; + rCategory.m_aLabels["urn:bails:IntellectualProperty:BusinessAuthorizationCategory:Identifier"] = aIdentifier; + rCategory.m_aLabels["urn:bails:IntellectualProperty:BusinessAuthorizationCategory:Name"] = aName; // Also initialize defaults. rCategory.m_aLabels["urn:bails:IntellectualProperty:PolicyAuthority:Identifier"] = "None"; rCategory.m_aLabels["urn:bails:IntellectualProperty:PolicyAuthority:Country"] = "None"; rCategory.m_aLabels["urn:bails:IntellectualProperty:Policy:Identifier"] = "None"; rCategory.m_aLabels["urn:bails:IntellectualProperty:BusinessAuthorization:Name"] = "None"; - rCategory.m_aLabels["urn:bails:IntellectualProperty:BusinessAuthorization:Identifier"] = "None"; rCategory.m_aLabels["urn:bails:IntellectualProperty:BusinessAuthorization:Locator"] = "None"; - rCategory.m_aLabels["urn:bails:IntellectualProperty:BusinessAuthorizationCategory:Name"] = "None"; - rCategory.m_aLabels["urn:bails:IntellectualProperty:BusinessAuthorizationCategory:Identifier"] = "None"; rCategory.m_aLabels["urn:bails:IntellectualProperty:BusinessAuthorizationCategory:Identifier:OID"] = "None"; rCategory.m_aLabels["urn:bails:IntellectualProperty:BusinessAuthorizationCategory:Locator"] = "None"; rCategory.m_aLabels["urn:bails:IntellectualProperty:BusinessAuthorization:Locator"] = "None"; |