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
0252f24c
Kaydet (Commit)
0252f24c
authored
May 06, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: clean up some defensive programming in modcfg.cxx
Change-Id: I901d934d1c2bdf6f15760292481091eb740dfda1
üst
c150d910
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
37 deletions
+22
-37
modcfg.cxx
sw/source/uibase/config/modcfg.cxx
+22
-37
No files found.
sw/source/uibase/config/modcfg.cxx
Dosyayı görüntüle @
0252f24c
...
...
@@ -347,16 +347,14 @@ void SwRevisionConfig::Load()
const
Sequence
<
OUString
>&
aNames
=
GetPropertyNames
();
Sequence
<
Any
>
aValues
=
GetProperties
(
aNames
);
const
Any
*
pValues
=
aValues
.
getConstArray
();
OSL_ENSURE
(
aValues
.
getLength
()
==
aNames
.
getLength
(),
"GetProperties failed"
);
if
(
aValues
.
getLength
()
==
aNames
.
getLength
()
)
assert
(
aValues
.
getLength
()
==
aNames
.
getLength
()
);
for
(
sal_Int32
nProp
=
0
;
nProp
<
aNames
.
getLength
();
++
nProp
)
{
for
(
int
nProp
=
0
;
nProp
<
aNames
.
getLength
();
nProp
++
)
{
if
(
pValues
[
nProp
].
hasValue
())
if
(
pValues
[
nProp
].
hasValue
())
{
sal_Int32
nVal
=
0
;
pValues
[
nProp
]
>>=
nVal
;
switch
(
nProp
)
switch
(
nProp
)
{
case
0
:
lcl_ConvertCfgToAttr
(
nVal
,
aInsertAttr
);
break
;
case
1
:
aInsertAttr
.
nColor
=
nVal
;
break
;
...
...
@@ -369,7 +367,6 @@ void SwRevisionConfig::Load()
}
}
}
}
}
enum
InsertConfigProp
...
...
@@ -874,9 +871,7 @@ void SwInsertConfig::Load()
const
Sequence
<
OUString
>&
aNames
=
GetPropertyNames
();
Sequence
<
Any
>
aValues
=
GetProperties
(
aNames
);
const
Any
*
pValues
=
aValues
.
getConstArray
();
OSL_ENSURE
(
aValues
.
getLength
()
==
aNames
.
getLength
(),
"GetProperties failed"
);
if
(
aValues
.
getLength
()
==
aNames
.
getLength
())
{
assert
(
aValues
.
getLength
()
==
aNames
.
getLength
());
InsCaptionOpt
*
pWriterTableOpt
=
0
;
InsCaptionOpt
*
pWriterFrameOpt
=
0
;
InsCaptionOpt
*
pWriterGraphicOpt
=
0
;
...
...
@@ -885,7 +880,7 @@ void SwInsertConfig::Load()
InsCaptionOpt
*
pOLEChartOpt
=
0
;
InsCaptionOpt
*
pOLEFormulaOpt
=
0
;
InsCaptionOpt
*
pOLEDrawOpt
=
0
;
if
(
pCapOptions
)
if
(
pCapOptions
)
{
pWriterTableOpt
=
pCapOptions
->
Find
(
TABLE_CAP
,
0
);
pWriterFrameOpt
=
pCapOptions
->
Find
(
FRAME_CAP
,
0
);
...
...
@@ -896,16 +891,16 @@ void SwInsertConfig::Load()
pOLEFormulaOpt
=
pCapOptions
->
Find
(
OLE_CAP
,
&
aGlobalNames
[
GLOB_NAME_MATH
]);
pOLEChartOpt
=
pCapOptions
->
Find
(
OLE_CAP
,
&
aGlobalNames
[
GLOB_NAME_CHART
]);
}
else
if
(
!
bIsWeb
)
else
if
(
!
bIsWeb
)
return
;
sal_uInt16
nInsTblFlags
=
0
;
for
(
int
nProp
=
0
;
nProp
<
aNames
.
getLength
();
nProp
++
)
for
(
sal_Int32
nProp
=
0
;
nProp
<
aNames
.
getLength
();
++
nProp
)
{
if
(
pValues
[
nProp
].
hasValue
())
if
(
pValues
[
nProp
].
hasValue
())
{
bool
bBool
=
nProp
<
INS_PROP_CAP_OBJECT_TABLE_ENABLE
&&
*
static_cast
<
sal_Bool
const
*>
(
pValues
[
nProp
].
getValue
());
switch
(
nProp
)
switch
(
nProp
)
{
case
INS_PROP_TABLE_HEADER
:
{
...
...
@@ -1087,7 +1082,7 @@ void SwInsertConfig::Load()
break
;
}
}
else
if
(
nProp
==
INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST
)
else
if
(
nProp
==
INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST
)
{
//#i61007# initialize caption order, right now only HUNGARIAN seems to need a different order
SvtSysLocaleOptions
aSysLocaleOptions
;
...
...
@@ -1097,7 +1092,6 @@ void SwInsertConfig::Load()
}
aInsTblOpts
.
mnInsMode
=
nInsTblFlags
;
}
}
const
Sequence
<
OUString
>&
SwTableConfig
::
GetPropertyNames
()
...
...
@@ -1162,15 +1156,13 @@ void SwTableConfig::Load()
const
Sequence
<
OUString
>&
aNames
=
GetPropertyNames
();
Sequence
<
Any
>
aValues
=
GetProperties
(
aNames
);
const
Any
*
pValues
=
aValues
.
getConstArray
();
OSL_ENSURE
(
aValues
.
getLength
()
==
aNames
.
getLength
(),
"GetProperties failed"
);
if
(
aValues
.
getLength
()
==
aNames
.
getLength
())
{
for
(
int
nProp
=
0
;
nProp
<
aNames
.
getLength
();
nProp
++
)
assert
(
aValues
.
getLength
()
==
aNames
.
getLength
());
for
(
sal_Int32
nProp
=
0
;
nProp
<
aNames
.
getLength
();
++
nProp
)
{
if
(
pValues
[
nProp
].
hasValue
())
if
(
pValues
[
nProp
].
hasValue
())
{
sal_Int32
nTemp
=
0
;
switch
(
nProp
)
switch
(
nProp
)
{
case
0
:
pValues
[
nProp
]
>>=
nTemp
;
nTblHMove
=
(
sal_uInt16
)
convertMm100ToTwip
(
nTemp
);
break
;
//"Shift/Row",
case
1
:
pValues
[
nProp
]
>>=
nTemp
;
nTblVMove
=
(
sal_uInt16
)
convertMm100ToTwip
(
nTemp
);
break
;
//"Shift/Column",
...
...
@@ -1183,7 +1175,6 @@ void SwTableConfig::Load()
}
}
}
}
}
SwMiscConfig
::
SwMiscConfig
()
:
...
...
@@ -1271,15 +1262,13 @@ void SwMiscConfig::Load()
const
Sequence
<
OUString
>&
aNames
=
GetPropertyNames
();
Sequence
<
Any
>
aValues
=
GetProperties
(
aNames
);
const
Any
*
pValues
=
aValues
.
getConstArray
();
OSL_ENSURE
(
aValues
.
getLength
()
==
aNames
.
getLength
(),
"GetProperties failed"
);
if
(
aValues
.
getLength
()
==
aNames
.
getLength
())
{
assert
(
aValues
.
getLength
()
==
aNames
.
getLength
());
OUString
sTmp
;
for
(
int
nProp
=
0
;
nProp
<
aNames
.
getLength
();
nProp
++
)
for
(
sal_Int32
nProp
=
0
;
nProp
<
aNames
.
getLength
();
++
nProp
)
{
if
(
pValues
[
nProp
].
hasValue
())
if
(
pValues
[
nProp
].
hasValue
())
{
switch
(
nProp
)
switch
(
nProp
)
{
case
0
:
pValues
[
nProp
]
>>=
sTmp
;
sWordDelimiter
=
SwModuleOptions
::
ConvertWordDelimiter
(
sTmp
,
true
);
...
...
@@ -1298,7 +1287,6 @@ void SwMiscConfig::Load()
}
}
}
}
}
const
Sequence
<
OUString
>&
SwCompareConfig
::
GetPropertyNames
()
...
...
@@ -1360,12 +1348,10 @@ void SwCompareConfig::Load()
const
Sequence
<
OUString
>&
aNames
=
GetPropertyNames
();
Sequence
<
Any
>
aValues
=
GetProperties
(
aNames
);
const
Any
*
pValues
=
aValues
.
getConstArray
();
DBG_ASSERT
(
aValues
.
getLength
()
==
aNames
.
getLength
(),
"GetProperties failed"
);
if
(
aValues
.
getLength
()
==
aNames
.
getLength
()
)
assert
(
aValues
.
getLength
()
==
aNames
.
getLength
()
);
for
(
sal_Int32
nProp
=
0
;
nProp
<
aNames
.
getLength
();
nProp
++
)
{
for
(
int
nProp
=
0
;
nProp
<
aNames
.
getLength
();
nProp
++
)
{
if
(
pValues
[
nProp
].
hasValue
())
if
(
pValues
[
nProp
].
hasValue
())
{
sal_Int32
nVal
=
0
;
pValues
[
nProp
]
>>=
nVal
;
...
...
@@ -1380,7 +1366,6 @@ void SwCompareConfig::Load()
}
}
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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