summaryrefslogtreecommitdiff
path: root/include/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-24 19:01:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-25 08:23:54 +0200
commit84f4f7f99f92c0ecec0dd9d754fdfa8c652a7ec0 (patch)
treeb81bdf68955de076e4ece1003803d40ff34c9e41 /include/unotools
parente192e1542a84b26cb0685860b84339019021de96 (diff)
simplify SvFontSubst
in the process, needed to expose some functionality in ConfigManager and ConfigItem, to avoid repeating code Change-Id: Ic0256a010070a79cd649dfd11267bec2f77e5221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119470 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/unotools')
-rw-r--r--include/unotools/configitem.hxx35
-rw-r--r--include/unotools/configmgr.hxx4
2 files changed, 34 insertions, 5 deletions
diff --git a/include/unotools/configitem.hxx b/include/unotools/configitem.hxx
index e14aaf0f2418..20612d401ab8 100644
--- a/include/unotools/configitem.hxx
+++ b/include/unotools/configitem.hxx
@@ -93,13 +93,14 @@ namespace utl
// LOCALE VALUE
// "de" "Mein Name"
// "en-US" "my name"
- void impl_packLocalizedProperties ( const css::uno::Sequence< OUString >& lInNames ,
+ static void impl_packLocalizedProperties ( const css::uno::Sequence< OUString >& lInNames ,
const css::uno::Sequence< css::uno::Any >& lInValues ,
css::uno::Sequence< css::uno::Any >& lOutValues );
- void impl_unpackLocalizedProperties ( const css::uno::Sequence< OUString >& lInNames ,
- const css::uno::Sequence< css::uno::Any >& lInValues ,
- css::uno::Sequence< OUString >& lOutNames ,
- css::uno::Sequence< css::uno::Any >& lOutValues );
+ static void impl_unpackLocalizedProperties (
+ const css::uno::Sequence< OUString >& lInNames ,
+ const css::uno::Sequence< css::uno::Any >& lInValues ,
+ css::uno::Sequence< OUString >& lOutNames ,
+ css::uno::Sequence< css::uno::Any >& lOutValues);
css::uno::Reference< css::container::XHierarchicalNameAccess>
GetTree();
@@ -178,6 +179,30 @@ namespace utl
void Commit();
ConfigItemMode GetMode() const { return m_nMode;}
+
+ //returns all members of a node in a specific format
+ static css::uno::Sequence< OUString > GetNodeNames(
+ css::uno::Reference<css::container::XHierarchicalNameAccess> const & xHierarchyAccess,
+ const OUString& rNode, ConfigNameFormat eFormat);
+ static css::uno::Sequence< css::uno::Any> GetProperties(
+ css::uno::Reference<css::container::XHierarchicalNameAccess> const & xHierarchyAccess,
+ const css::uno::Sequence< OUString >& rNames,
+ bool bAllLocales);
+ static bool PutProperties(
+ css::uno::Reference<css::container::XHierarchicalNameAccess> const & xHierarchyAccess,
+ const css::uno::Sequence< OUString >& rNames,
+ const css::uno::Sequence< css::uno::Any>& rValues,
+ bool bAllLocales);
+ // remove all members of a set
+ static bool ClearNodeSet(
+ css::uno::Reference<css::container::XHierarchicalNameAccess> const & xHierarchyAccess,
+ const OUString& rNode);
+ // remove, change or add members of a set
+ static bool ReplaceSetProperties(
+ css::uno::Reference<css::container::XHierarchicalNameAccess> const & xHierarchyAccess,
+ const OUString& rNode,
+ const css::uno::Sequence< css::beans::PropertyValue >& rValues,
+ bool bAllLocales);
};
}//namespace utl
#endif // INCLUDED_UNOTOOLS_CONFIGITEM_HXX
diff --git a/include/unotools/configmgr.hxx b/include/unotools/configmgr.hxx
index a4d46cb8e19e..e8d42a28fd7e 100644
--- a/include/unotools/configmgr.hxx
+++ b/include/unotools/configmgr.hxx
@@ -22,6 +22,7 @@
#include <sal/config.h>
+#include <string_view>
#include <vector>
#include <com/sun/star/uno/Reference.hxx>
@@ -62,6 +63,9 @@ public:
SAL_DLLPRIVATE static css::uno::Reference< css::container::XHierarchicalNameAccess>
acquireTree(utl::ConfigItem const & item);
+ static css::uno::Reference< css::container::XHierarchicalNameAccess>
+ acquireTree(std::u16string_view rSubTreeName);
+
SAL_DLLPRIVATE ConfigManager();
SAL_DLLPRIVATE ~ConfigManager();