Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
96471119
Kaydet (Commit)
96471119
authored
Nis 30, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert CVC_ flags to scoped enum
Change-Id: Iadc9b6240121e9fee91de299b94a9f8629656507
üst
b35828ba
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
+22
-14
configvaluecontainer.hxx
include/unotools/configvaluecontainer.hxx
+17
-9
fmsrccfg.cxx
svx/source/form/fmsrccfg.cxx
+1
-1
configvaluecontainer.cxx
unotools/source/config/configvaluecontainer.cxx
+4
-4
No files found.
include/unotools/configvaluecontainer.hxx
Dosyayı görüntüle @
96471119
...
...
@@ -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
);
...
...
svx/source/form/fmsrccfg.cxx
Dosyayı görüntüle @
96471119
...
...
@@ -150,7 +150,7 @@ namespace svxform
#define TA( c ) &c, cppu::UnoType<decltype(c)>::get()
FmSearchConfigItem
::
FmSearchConfigItem
()
:
OConfigurationValueContainer
(
::
comphelper
::
getProcessComponentContext
(),
m_aMutex
,
"/org.openoffice.Office.DataAccess/FormSearchOptions"
,
CVC
_UPDATE_ACCESS
|
CVC_
LAZY_UPDATE
,
2
)
:
OConfigurationValueContainer
(
::
comphelper
::
getProcessComponentContext
(),
m_aMutex
,
"/org.openoffice.Office.DataAccess/FormSearchOptions"
,
CVC
Flags
::
UPDATE_ACCESS
|
CVCFlags
::
LAZY_UPDATE
,
2
)
{
// register our members so the data exchange with the node values is done automatically
...
...
unotools/source/config/configvaluecontainer.cxx
Dosyayı görüntüle @
96471119
...
...
@@ -212,7 +212,7 @@ namespace utl
OConfigurationValueContainer
::
OConfigurationValueContainer
(
const
Reference
<
XComponentContext
>&
_rxORB
,
::
osl
::
Mutex
&
_rAccessSafety
,
const
sal_Char
*
_pConfigLocation
,
const
sal_uInt16
_nAccessFlags
,
const
sal_Int32
_nLevels
)
const
sal_Char
*
_pConfigLocation
,
const
CVCFlags
_nAccessFlags
,
const
sal_Int32
_nLevels
)
:
m_pImpl
(
new
OConfigurationValueContainerImpl
(
_rxORB
,
_rAccessSafety
)
)
{
implConstruct
(
OUString
::
createFromAscii
(
_pConfigLocation
),
_nAccessFlags
,
_nLevels
);
...
...
@@ -224,7 +224,7 @@ namespace utl
}
void
OConfigurationValueContainer
::
implConstruct
(
const
OUString
&
_rConfigLocation
,
const
sal_uInt16
_nAccessFlags
,
const
sal_Int32
_nLevels
)
const
CVCFlags
_nAccessFlags
,
const
sal_Int32
_nLevels
)
{
SAL_WARN_IF
(
m_pImpl
->
aConfigRoot
.
isValid
(),
"unotools.config"
,
"OConfigurationValueContainer::implConstruct: already initialized!"
);
...
...
@@ -233,8 +233,8 @@ namespace utl
m_pImpl
->
xORB
,
_rConfigLocation
,
_nLevels
,
(
_nAccessFlags
&
CVC
_
UPDATE_ACCESS
)
?
OConfigurationTreeRoot
::
CM_UPDATABLE
:
OConfigurationTreeRoot
::
CM_READONLY
,
(
_nAccessFlags
&
CVC_IMMEDIATE_UPDATE
)
==
0
(
_nAccessFlags
&
CVC
Flags
::
UPDATE_ACCESS
)
?
OConfigurationTreeRoot
::
CM_UPDATABLE
:
OConfigurationTreeRoot
::
CM_READONLY
,
!
bool
(
_nAccessFlags
&
CVCFlags
::
IMMEDIATE_UPDATE
)
);
SAL_WARN_IF
(
!
m_pImpl
->
aConfigRoot
.
isValid
(),
"unotools.config"
,
"Could not access the configuration node located at "
<<
_rConfigLocation
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment