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
229d6324
Kaydet (Commit)
229d6324
authored
Agu 18, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ByteString->rtl::OString
üst
1aae9d16
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
26 deletions
+27
-26
dialogs.cxx
basic/source/app/dialogs.cxx
+1
-1
config.hxx
tools/inc/tools/config.hxx
+6
-6
config.cxx
tools/source/generic/config.cxx
+20
-19
No files found.
basic/source/app/dialogs.cxx
Dosyayı görüntüle @
229d6324
...
@@ -804,7 +804,7 @@ StringList* GenericOptions::GetAllGroups()
...
@@ -804,7 +804,7 @@ StringList* GenericOptions::GetAllGroups()
StringList
*
pGroups
=
new
StringList
();
StringList
*
pGroups
=
new
StringList
();
for
(
sal_uInt16
i
=
0
;
i
<
aConf
.
GetGroupCount
()
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
aConf
.
GetGroupCount
()
;
i
++
)
{
{
String
*
pGroup
=
new
String
(
aConf
.
GetGroupName
(
i
),
RTL_TEXTENCODING_UTF8
);
String
*
pGroup
=
new
String
(
rtl
::
OStringToOUString
(
aConf
.
GetGroupName
(
i
),
RTL_TEXTENCODING_UTF8
)
);
pGroups
->
push_back
(
pGroup
);
pGroups
->
push_back
(
pGroup
);
}
}
return
pGroups
;
return
pGroups
;
...
...
tools/inc/tools/config.hxx
Dosyayı görüntüle @
229d6324
...
@@ -42,7 +42,7 @@ class TOOLS_DLLPUBLIC Config
...
@@ -42,7 +42,7 @@ class TOOLS_DLLPUBLIC Config
{
{
private
:
private
:
XubString
maFileName
;
XubString
maFileName
;
ByteString
maGroupName
;
rtl
::
OString
maGroupName
;
ImplConfigData
*
mpData
;
ImplConfigData
*
mpData
;
ImplGroupData
*
mpActGroup
;
ImplGroupData
*
mpActGroup
;
sal_uIntPtr
mnDataUpdateId
;
sal_uIntPtr
mnDataUpdateId
;
...
@@ -63,12 +63,12 @@ public:
...
@@ -63,12 +63,12 @@ public:
static
XubString
GetDefDirectory
();
static
XubString
GetDefDirectory
();
static
XubString
GetConfigName
(
const
XubString
&
rPath
,
const
XubString
&
rBaseName
);
static
XubString
GetConfigName
(
const
XubString
&
rPath
,
const
XubString
&
rBaseName
);
void
SetGroup
(
const
ByteString
&
rGroup
);
void
SetGroup
(
const
rtl
::
OString
&
rGroup
);
const
ByteString
&
GetGroup
()
const
{
return
maGroupName
;
}
const
rtl
::
OString
&
GetGroup
()
const
{
return
maGroupName
;
}
void
DeleteGroup
(
const
ByteString
&
rGroup
);
void
DeleteGroup
(
const
rtl
::
OString
&
rGroup
);
ByteString
GetGroupName
(
sal_uInt16
nGroup
)
const
;
rtl
::
OString
GetGroupName
(
sal_uInt16
nGroup
)
const
;
sal_uInt16
GetGroupCount
()
const
;
sal_uInt16
GetGroupCount
()
const
;
sal_Bool
HasGroup
(
const
ByteString
&
rGroup
)
const
;
sal_Bool
HasGroup
(
const
rtl
::
OString
&
rGroup
)
const
;
ByteString
ReadKey
(
const
ByteString
&
rKey
)
const
;
ByteString
ReadKey
(
const
ByteString
&
rKey
)
const
;
UniString
ReadKey
(
const
ByteString
&
rKey
,
rtl_TextEncoding
eEncoding
)
const
;
UniString
ReadKey
(
const
ByteString
&
rKey
,
rtl_TextEncoding
eEncoding
)
const
;
...
...
tools/source/generic/config.cxx
Dosyayı görüntüle @
229d6324
...
@@ -65,7 +65,7 @@ struct ImplGroupData
...
@@ -65,7 +65,7 @@ struct ImplGroupData
{
{
ImplGroupData
*
mpNext
;
ImplGroupData
*
mpNext
;
ImplKeyData
*
mpFirstKey
;
ImplKeyData
*
mpFirstKey
;
ByteString
maGroupName
;
rtl
::
OString
maGroupName
;
sal_uInt16
mnEmptyLines
;
sal_uInt16
mnEmptyLines
;
};
};
...
@@ -489,7 +489,7 @@ static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uIntPtr&
...
@@ -489,7 +489,7 @@ static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uIntPtr&
// Leere Gruppen werden nicht geschrieben
// Leere Gruppen werden nicht geschrieben
if
(
pGroup
->
mpFirstKey
)
if
(
pGroup
->
mpFirstKey
)
{
{
nBufLen
+=
pGroup
->
maGroupName
.
Len
()
+
nLineEndLen
+
2
;
nBufLen
+=
pGroup
->
maGroupName
.
getLength
()
+
nLineEndLen
+
2
;
pKey
=
pGroup
->
mpFirstKey
;
pKey
=
pGroup
->
mpFirstKey
;
while
(
pKey
)
while
(
pKey
)
{
{
...
@@ -541,8 +541,8 @@ static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uIntPtr&
...
@@ -541,8 +541,8 @@ static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uIntPtr&
if
(
pGroup
->
mpFirstKey
)
if
(
pGroup
->
mpFirstKey
)
{
{
*
pBuf
=
'['
;
pBuf
++
;
*
pBuf
=
'['
;
pBuf
++
;
memcpy
(
pBuf
,
pGroup
->
maGroupName
.
GetBuffer
(),
pGroup
->
maGroupName
.
Len
()
);
memcpy
(
pBuf
,
pGroup
->
maGroupName
.
getStr
(),
pGroup
->
maGroupName
.
getLength
()
);
pBuf
+=
pGroup
->
maGroupName
.
Len
();
pBuf
+=
pGroup
->
maGroupName
.
getLength
();
*
pBuf
=
']'
;
pBuf
++
;
*
pBuf
=
']'
;
pBuf
++
;
*
pBuf
=
aLineEndBuf
[
0
];
pBuf
++
;
*
pBuf
=
aLineEndBuf
[
0
];
pBuf
++
;
if
(
nLineEndLen
==
2
)
if
(
nLineEndLen
==
2
)
...
@@ -736,7 +736,7 @@ ImplGroupData* Config::ImplGetGroup() const
...
@@ -736,7 +736,7 @@ ImplGroupData* Config::ImplGetGroup() const
ImplGroupData
*
pGroup
=
mpData
->
mpFirstGroup
;
ImplGroupData
*
pGroup
=
mpData
->
mpFirstGroup
;
while
(
pGroup
)
while
(
pGroup
)
{
{
if
(
pGroup
->
maGroupName
.
EqualsIgnoreCaseAscii
(
maGroupName
)
)
if
(
pGroup
->
maGroupName
.
equalsIgnoreAsciiCase
(
maGroupName
)
)
break
;
break
;
pPrevGroup
=
pGroup
;
pPrevGroup
=
pGroup
;
...
@@ -821,7 +821,7 @@ XubString Config::GetConfigName( const XubString& rPath,
...
@@ -821,7 +821,7 @@ XubString Config::GetConfigName( const XubString& rPath,
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
void
Config
::
SetGroup
(
const
ByteString
&
rGroup
)
void
Config
::
SetGroup
(
const
rtl
::
OString
&
rGroup
)
{
{
// Wenn neue Gruppe gesetzt wird, muss beim naechsten mal die
// Wenn neue Gruppe gesetzt wird, muss beim naechsten mal die
// Gruppe neu ermittelt werden
// Gruppe neu ermittelt werden
...
@@ -834,7 +834,7 @@ void Config::SetGroup( const ByteString& rGroup )
...
@@ -834,7 +834,7 @@ void Config::SetGroup( const ByteString& rGroup )
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
void
Config
::
DeleteGroup
(
const
ByteString
&
rGroup
)
void
Config
::
DeleteGroup
(
const
rtl
::
OString
&
rGroup
)
{
{
// Config-Daten evt. updaten
// Config-Daten evt. updaten
if
(
!
mnLockCount
||
!
mpData
->
mbRead
)
if
(
!
mnLockCount
||
!
mpData
->
mbRead
)
...
@@ -847,7 +847,7 @@ void Config::DeleteGroup( const ByteString& rGroup )
...
@@ -847,7 +847,7 @@ void Config::DeleteGroup( const ByteString& rGroup )
ImplGroupData
*
pGroup
=
mpData
->
mpFirstGroup
;
ImplGroupData
*
pGroup
=
mpData
->
mpFirstGroup
;
while
(
pGroup
)
while
(
pGroup
)
{
{
if
(
pGroup
->
maGroupName
.
EqualsIgnoreCaseAscii
(
rGroup
)
)
if
(
pGroup
->
maGroupName
.
equalsIgnoreAsciiCase
(
rGroup
)
)
break
;
break
;
pPrevGroup
=
pGroup
;
pPrevGroup
=
pGroup
;
...
@@ -889,7 +889,7 @@ void Config::DeleteGroup( const ByteString& rGroup )
...
@@ -889,7 +889,7 @@ void Config::DeleteGroup( const ByteString& rGroup )
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
ByteString
Config
::
GetGroupName
(
sal_uInt16
nGroup
)
const
rtl
::
OString
Config
::
GetGroupName
(
sal_uInt16
nGroup
)
const
{
{
// Config-Daten evt. updaten
// Config-Daten evt. updaten
if
(
!
mnLockCount
)
if
(
!
mnLockCount
)
...
@@ -897,7 +897,7 @@ ByteString Config::GetGroupName( sal_uInt16 nGroup ) const
...
@@ -897,7 +897,7 @@ ByteString Config::GetGroupName( sal_uInt16 nGroup ) const
ImplGroupData
*
pGroup
=
mpData
->
mpFirstGroup
;
ImplGroupData
*
pGroup
=
mpData
->
mpFirstGroup
;
sal_uInt16
nGroupCount
=
0
;
sal_uInt16
nGroupCount
=
0
;
ByteString
aGroupName
;
rtl
::
OString
aGroupName
;
while
(
pGroup
)
while
(
pGroup
)
{
{
if
(
nGroup
==
nGroupCount
)
if
(
nGroup
==
nGroupCount
)
...
@@ -934,7 +934,7 @@ sal_uInt16 Config::GetGroupCount() const
...
@@ -934,7 +934,7 @@ sal_uInt16 Config::GetGroupCount() const
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
sal_Bool
Config
::
HasGroup
(
const
ByteString
&
rGroup
)
const
sal_Bool
Config
::
HasGroup
(
const
rtl
::
OString
&
rGroup
)
const
{
{
// Config-Daten evt. updaten
// Config-Daten evt. updaten
if
(
!
mnLockCount
)
if
(
!
mnLockCount
)
...
@@ -945,7 +945,7 @@ sal_Bool Config::HasGroup( const ByteString& rGroup ) const
...
@@ -945,7 +945,7 @@ sal_Bool Config::HasGroup( const ByteString& rGroup ) const
while
(
pGroup
)
while
(
pGroup
)
{
{
if
(
pGroup
->
maGroupName
.
EqualsIgnoreCaseAscii
(
rGroup
)
)
if
(
pGroup
->
maGroupName
.
equalsIgnoreAsciiCase
(
rGroup
)
)
{
{
bRet
=
sal_True
;
bRet
=
sal_True
;
break
;
break
;
...
@@ -981,7 +981,7 @@ ByteString Config::ReadKey( const ByteString& rKey, const ByteString& rDefault )
...
@@ -981,7 +981,7 @@ ByteString Config::ReadKey( const ByteString& rKey, const ByteString& rDefault )
ByteString
aTraceStr
(
"Config::ReadKey( "
);
ByteString
aTraceStr
(
"Config::ReadKey( "
);
aTraceStr
+=
rKey
;
aTraceStr
+=
rKey
;
aTraceStr
+=
" ) from "
;
aTraceStr
+=
" ) from "
;
aTraceStr
+=
GetGroup
(
);
aTraceStr
+=
ByteString
(
GetGroup
()
);
aTraceStr
+=
" in "
;
aTraceStr
+=
" in "
;
aTraceStr
+=
ByteString
(
maFileName
,
RTL_TEXTENCODING_UTF8
);
aTraceStr
+=
ByteString
(
maFileName
,
RTL_TEXTENCODING_UTF8
);
OSL_TRACE
(
"%s"
,
aTraceStr
.
GetBuffer
()
);
OSL_TRACE
(
"%s"
,
aTraceStr
.
GetBuffer
()
);
...
@@ -1127,12 +1127,13 @@ void Config::DeleteKey( const ByteString& rKey )
...
@@ -1127,12 +1127,13 @@ void Config::DeleteKey( const ByteString& rKey )
sal_uInt16
Config
::
GetKeyCount
()
const
sal_uInt16
Config
::
GetKeyCount
()
const
{
{
#ifdef DBG_UTIL
#ifdef DBG_UTIL
ByteString
aTraceStr
(
"Config::GetKeyCount()"
);
rtl
::
OStringBuffer
aTraceStr
(
aTraceStr
+=
" from "
;
RTL_CONSTASCII_STRINGPARAM
(
"Config::GetKeyCount()"
));
aTraceStr
+=
GetGroup
();
aTraceStr
.
append
(
RTL_CONSTASCII_STRINGPARAM
(
" from "
));
aTraceStr
+=
" in "
;
aTraceStr
.
append
(
GetGroup
());
aTraceStr
+=
ByteString
(
maFileName
,
RTL_TEXTENCODING_UTF8
);
aTraceStr
.
append
(
RTL_CONSTASCII_STRINGPARAM
(
" in "
));
OSL_TRACE
(
"%s"
,
aTraceStr
.
GetBuffer
()
);
aTraceStr
.
append
(
rtl
::
OUStringToOString
(
maFileName
,
RTL_TEXTENCODING_UTF8
));
OSL_TRACE
(
"%s"
,
aTraceStr
.
getStr
());
#endif
#endif
// Config-Daten evt. updaten
// Config-Daten evt. updaten
...
...
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