summaryrefslogtreecommitdiff
path: root/include/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-30 15:45:27 +0200
committerNoel Grandin <noel@peralex.com>2015-05-06 09:01:26 +0200
commit96471119f0157d85c1fb33b114919a94272744c6 (patch)
tree95efb613abd8d4653e271e230489d328891364b6 /include/unotools
parentb35828ba7dc33af81d17c8c870ec981d18a57b08 (diff)
convert CVC_ flags to scoped enum
Change-Id: Iadc9b6240121e9fee91de299b94a9f8629656507
Diffstat (limited to 'include/unotools')
-rw-r--r--include/unotools/configvaluecontainer.hxx26
1 files changed, 17 insertions, 9 deletions
diff --git a/include/unotools/configvaluecontainer.hxx b/include/unotools/configvaluecontainer.hxx
index 7ec278cd8d26..1da4e77e3f8b 100644
--- a/include/unotools/configvaluecontainer.hxx
+++ b/include/unotools/configvaluecontainer.hxx
@@ -16,20 +16,28 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <unotools/unotoolsdllapi.h>
-
#ifndef INCLUDED_UNOTOOLS_CONFIGVALUECONTAINER_HXX
#define INCLUDED_UNOTOOLS_CONFIGVALUECONTAINER_HXX
+
+#include <unotools/unotoolsdllapi.h>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <osl/mutex.hxx>
+#include <o3tl/typed_flags_set.hxx>
-namespace utl
-{
-#define CVC_UPDATE_ACCESS 0x0001
+enum class CVCFlags
+{
+ LAZY_UPDATE = 0x0000,
+ UPDATE_ACCESS = 0x0001,
+ IMMEDIATE_UPDATE = 0x0002,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<CVCFlags> : is_typed_flags<CVCFlags, 0x03> {};
+}
-#define CVC_LAZY_UPDATE 0x0000
-#define CVC_IMMEDIATE_UPDATE 0x0002
+namespace utl
+{
struct OConfigurationValueContainerImpl;
struct NodeValueAccessor;
@@ -84,7 +92,7 @@ namespace utl
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB,
::osl::Mutex& _rAccessSafety,
const sal_Char* _pConfigLocation,
- const sal_uInt16 _nAccessFlags = CVC_UPDATE_ACCESS | CVC_LAZY_UPDATE,
+ const CVCFlags _nAccessFlags = CVCFlags::UPDATE_ACCESS | CVCFlags::LAZY_UPDATE,
const sal_Int32 _nLevels = -1
);
@@ -162,7 +170,7 @@ namespace utl
/// implements the ctors
void implConstruct(
const OUString& _rConfigLocation,
- const sal_uInt16 _nAccessFlags,
+ const CVCFlags _nAccessFlags,
const sal_Int32 _nLevels
);