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
bf9728a8
Kaydet (Commit)
bf9728a8
authored
Haz 27, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up uses of Any::getValue() in unotools
Change-Id: I2e1d98c5947d0d72c369fa6b2df17eb2eec1f64c
üst
12110961
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
18 deletions
+19
-18
fltrcfg.cxx
unotools/source/config/fltrcfg.cxx
+6
-5
fontcfg.cxx
unotools/source/config/fontcfg.cxx
+6
-8
misccfg.cxx
unotools/source/config/misccfg.cxx
+6
-3
saveopt.cxx
unotools/source/config/saveopt.cxx
+1
-2
No files found.
unotools/source/config/fltrcfg.cxx
Dosyayı görüntüle @
bf9728a8
...
...
@@ -19,6 +19,7 @@
#include <config_features.h>
#include <o3tl/any.hxx>
#include <unotools/fltrcfg.hxx>
#include <tools/debug.hxx>
#include <tools/solar.h>
...
...
@@ -113,9 +114,9 @@ void SvtAppFilterOptions_Impl::Load()
const
Any
*
pValues
=
aValues
.
getConstArray
();
if
(
pValues
[
0
].
hasValue
())
bLoadVBA
=
*
static_cast
<
sal_Bool
const
*>
(
pValues
[
0
].
getValue
()
);
bLoadVBA
=
*
o3tl
::
doAccess
<
bool
>
(
pValues
[
0
]
);
if
(
pValues
[
1
].
hasValue
())
bSaveVBA
=
*
static_cast
<
sal_Bool
const
*>
(
pValues
[
1
].
getValue
()
);
bSaveVBA
=
*
o3tl
::
doAccess
<
bool
>
(
pValues
[
1
]
);
}
class
SvtWriterFilterOptions_Impl
:
public
SvtAppFilterOptions_Impl
...
...
@@ -161,7 +162,7 @@ void SvtWriterFilterOptions_Impl::Load()
Sequence
<
Any
>
aValues
=
GetProperties
(
aNames
);
const
Any
*
pValues
=
aValues
.
getConstArray
();
if
(
pValues
[
0
].
hasValue
())
bLoadExecutable
=
*
static_cast
<
sal_Bool
const
*>
(
pValues
[
0
].
getValue
()
);
bLoadExecutable
=
*
o3tl
::
doAccess
<
bool
>
(
pValues
[
0
]
);
}
class
SvtCalcFilterOptions_Impl
:
public
SvtAppFilterOptions_Impl
...
...
@@ -207,7 +208,7 @@ void SvtCalcFilterOptions_Impl::Load()
Sequence
<
Any
>
aValues
=
GetProperties
(
aNames
);
const
Any
*
pValues
=
aValues
.
getConstArray
();
if
(
pValues
[
0
].
hasValue
())
bLoadExecutable
=
*
static_cast
<
sal_Bool
const
*>
(
pValues
[
0
].
getValue
()
);
bLoadExecutable
=
*
o3tl
::
doAccess
<
bool
>
(
pValues
[
0
]
);
}
struct
SvtFilterOptions_Impl
...
...
@@ -392,7 +393,7 @@ void SvtFilterOptions::Load()
{
if
(
pValues
[
nProp
].
hasValue
())
{
bool
bVal
=
*
static_cast
<
sal_Bool
const
*>
(
pValues
[
nProp
].
getValue
()
);
bool
bVal
=
*
o3tl
::
doAccess
<
bool
>
(
pValues
[
nProp
]
);
sal_uLong
nFlag
=
lcl_GetFlag
(
nProp
);
pImpl
->
SetFlag
(
nFlag
,
bVal
);
}
...
...
unotools/source/config/fontcfg.cxx
Dosyayı görüntüle @
bf9728a8
...
...
@@ -18,6 +18,7 @@
*/
#include <i18nlangtag/mslangid.hxx>
#include <o3tl/any.hxx>
#include <unotools/fontcfg.hxx>
#include <unotools/fontdefs.hxx>
#include <comphelper/processfactory.hxx>
...
...
@@ -867,9 +868,8 @@ void FontSubstConfiguration::fillSubstVector( const css::uno::Reference< XNameAc
try
{
Any
aAny
=
rFont
->
getByName
(
rType
);
if
(
a
Any
.
getValueTypeClass
()
==
TypeClass_STRING
)
if
(
a
uto
pLine
=
o3tl
::
tryAccess
<
OUString
>
(
aAny
)
)
{
const
OUString
*
pLine
=
static_cast
<
const
OUString
*>
(
aAny
.
getValue
());
sal_Int32
nLength
=
pLine
->
getLength
();
if
(
nLength
)
{
...
...
@@ -916,9 +916,8 @@ FontWeight FontSubstConfiguration::getSubstWeight( const css::uno::Reference< XN
try
{
Any
aAny
=
rFont
->
getByName
(
rType
);
if
(
a
Any
.
getValueTypeClass
()
==
TypeClass_STRING
)
if
(
a
uto
pLine
=
o3tl
::
tryAccess
<
OUString
>
(
aAny
)
)
{
const
OUString
*
pLine
=
static_cast
<
const
OUString
*>
(
aAny
.
getValue
());
if
(
!
pLine
->
isEmpty
()
)
{
for
(
weight
=
SAL_N_ELEMENTS
(
pWeightNames
)
-
1
;
weight
>=
0
;
weight
--
)
...
...
@@ -944,9 +943,8 @@ FontWidth FontSubstConfiguration::getSubstWidth( const css::uno::Reference< XNam
try
{
Any
aAny
=
rFont
->
getByName
(
rType
);
if
(
a
Any
.
getValueTypeClass
()
==
TypeClass_STRING
)
if
(
a
uto
pLine
=
o3tl
::
tryAccess
<
OUString
>
(
aAny
)
)
{
const
OUString
*
pLine
=
static_cast
<
const
OUString
*>
(
aAny
.
getValue
());
if
(
!
pLine
->
isEmpty
()
)
{
for
(
width
=
SAL_N_ELEMENTS
(
pWidthNames
)
-
1
;
width
>=
0
;
width
--
)
...
...
@@ -972,9 +970,9 @@ ImplFontAttrs FontSubstConfiguration::getSubstType( const css::uno::Reference< X
try
{
Any
aAny
=
rFont
->
getByName
(
rType
);
if
(
aAny
.
getValueTypeClass
()
!=
TypeClass_STRING
)
auto
pLine
=
o3tl
::
tryAccess
<
OUString
>
(
aAny
);
if
(
!
pLine
)
return
ImplFontAttrs
::
None
;
const
OUString
*
pLine
=
static_cast
<
const
OUString
*>
(
aAny
.
getValue
());
if
(
pLine
->
isEmpty
()
)
return
ImplFontAttrs
::
None
;
sal_Int32
nIndex
=
0
;
...
...
unotools/source/config/misccfg.cxx
Dosyayı görüntüle @
bf9728a8
...
...
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/config.h>
#include <o3tl/any.hxx>
#include <unotools/misccfg.hxx>
#include <rtl/instance.hxx>
#include <unotools/configmgr.hxx>
...
...
@@ -141,9 +144,9 @@ void SfxMiscCfg::Load()
{
switch
(
nProp
)
{
case
0
:
bPaperSize
=
*
static_cast
<
sal_Bool
const
*>
(
pValues
[
nProp
].
getValue
()
);
break
;
//"Print/Warning/PaperSize",
case
1
:
bPaperOrientation
=
*
static_cast
<
sal_Bool
const
*>
(
pValues
[
nProp
].
getValue
()
);
break
;
//"Print/Warning/PaperOrientation",
case
2
:
bNotFound
=
*
static_cast
<
sal_Bool
const
*>
(
pValues
[
nProp
].
getValue
()
);
break
;
//"Print/Warning/NotFound",
case
0
:
bPaperSize
=
*
o3tl
::
doAccess
<
bool
>
(
pValues
[
nProp
]
);
break
;
//"Print/Warning/PaperSize",
case
1
:
bPaperOrientation
=
*
o3tl
::
doAccess
<
bool
>
(
pValues
[
nProp
]
);
break
;
//"Print/Warning/PaperOrientation",
case
2
:
bNotFound
=
*
o3tl
::
doAccess
<
bool
>
(
pValues
[
nProp
]
);
break
;
//"Print/Warning/NotFound",
case
3
:
pValues
[
nProp
]
>>=
nYear2000
;
break
;
//"DateFormat/TwoDigitYear",
}
}
...
...
unotools/source/config/saveopt.cxx
Dosyayı görüntüle @
bf9728a8
...
...
@@ -789,8 +789,7 @@ SvtLoadOptions_Impl::SvtLoadOptions_Impl()
EnableNotification
(
aNames
);
const
Any
*
pValues
=
aValues
.
getConstArray
();
DBG_ASSERT
(
aValues
.
getLength
()
==
aNames
.
getLength
(),
"GetProperties failed"
);
if
(
pValues
[
0
].
getValueTypeClass
()
==
css
::
uno
::
TypeClass_BOOLEAN
)
bLoadUserDefinedSettings
=
*
static_cast
<
sal_Bool
const
*>
(
pValues
[
0
].
getValue
());
pValues
[
0
]
>>=
bLoadUserDefinedSettings
;
}
SvtLoadOptions_Impl
::~
SvtLoadOptions_Impl
()
...
...
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