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
ccc2b4ec
Kaydet (Commit)
ccc2b4ec
authored
Şub 07, 2017
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use OUStringLiteral
Change-Id: I15580bd0395145f9554cd3a155c4825ba95005b3
üst
40035bbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
23 deletions
+11
-23
loggerconfig.cxx
extensions/source/logging/loggerconfig.cxx
+11
-23
No files found.
extensions/source/logging/loggerconfig.cxx
Dosyayı görüntüle @
ccc2b4ec
...
...
@@ -79,19 +79,8 @@ namespace logging
{
struct
Variable
{
const
sal_Char
*
pVariablePattern
;
const
sal_Int32
nPatternLength
;
rtl_TextEncoding
eEncoding
;
const
OUString
sVariableValue
;
Variable
(
const
sal_Char
*
_pVariablePattern
,
const
sal_Int32
_nPatternLength
,
rtl_TextEncoding
_eEncoding
,
const
OUString
&
_rVariableValue
)
:
pVariablePattern
(
_pVariablePattern
)
,
nPatternLength
(
_nPatternLength
)
,
eEncoding
(
_eEncoding
)
,
sVariableValue
(
_rVariableValue
)
{
}
OUStringLiteral
pVariablePattern
;
OUString
sVariableValue
;
};
OUString
sLoggerName
;
...
...
@@ -132,22 +121,21 @@ namespace logging
aProcessId
=
info
.
Ident
;
rtl
::
OUString
aPID
=
OUString
::
number
(
aProcessId
);
Variable
aVariables
[]
=
Variable
const
aVariables
[]
=
{
Variable
(
RTL_CONSTASCII_USTRINGPARAM
(
"$(loggername)"
),
sLoggerName
)
,
Variable
(
RTL_CONSTASCII_USTRINGPARAM
(
"$(date)"
),
sDate
)
,
Variable
(
RTL_CONSTASCII_USTRINGPARAM
(
"$(time)"
),
sTime
)
,
Variable
(
RTL_CONSTASCII_USTRINGPARAM
(
"$(datetime)"
),
sDateTime
)
,
Variable
(
RTL_CONSTASCII_USTRINGPARAM
(
"$(pid)"
),
aPID
)
{
"$(loggername)"
,
sLoggerName
}
,
{
"$(date)"
,
sDate
}
,
{
"$(time)"
,
sTime
}
,
{
"$(datetime)"
,
sDateTime
}
,
{
"$(pid)"
,
aPID
}
};
for
(
Variable
&
aVariable
:
aVariables
)
for
(
Variable
const
&
aVariable
:
aVariables
)
{
OUString
sPattern
(
aVariable
.
pVariablePattern
,
aVariable
.
nPatternLength
,
aVariable
.
eEncoding
);
sal_Int32
nVariableIndex
=
_inout_rFileURL
.
indexOf
(
sPattern
);
sal_Int32
nVariableIndex
=
_inout_rFileURL
.
indexOf
(
aVariable
.
pVariablePattern
);
if
(
nVariableIndex
>=
0
)
{
_inout_rFileURL
=
_inout_rFileURL
.
replaceAt
(
nVariableIndex
,
sPattern
.
getLength
()
,
aVariable
.
sVariableValue
);
_inout_rFileURL
=
_inout_rFileURL
.
replaceAt
(
nVariableIndex
,
aVariable
.
pVariablePattern
.
size
,
aVariable
.
sVariableValue
);
}
}
}
...
...
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