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
f35b1397
Kaydet (Commit)
f35b1397
authored
Haz 17, 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 chart2
Change-Id: I53224053ea05c715f5e359a4c68e1ae5efbfe792
üst
e6c004dd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
19 deletions
+15
-19
CppunitTest_chart2_common_functors.mk
chart2/CppunitTest_chart2_common_functors.mk
+4
-0
AxisItemConverter.cxx
...t2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+3
-3
CharacterPropertyItemConverter.cxx
...troller/itemsetwrapper/CharacterPropertyItemConverter.cxx
+3
-4
CommonFunctors.hxx
chart2/source/inc/CommonFunctors.hxx
+5
-12
No files found.
chart2/CppunitTest_chart2_common_functors.mk
Dosyayı görüntüle @
f35b1397
...
...
@@ -19,6 +19,10 @@ $(eval $(call gb_CppunitTest_add_defs,chart2_common_functors,\
-DOOO_DLLIMPLEMENTATION_CHARTTOOLS \
))
$(eval $(call gb_CppunitTest_use_externals,chart2_common_functors, \
boost_headers \
))
$(eval $(call gb_CppunitTest_use_libraries,chart2_common_functors, \
cppu \
cppuhelper \
...
...
chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
Dosyayı görüntüle @
f35b1397
...
...
@@ -39,6 +39,7 @@
#include <com/sun/star/chart2/AxisOrientation.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
#include <o3tl/any.hxx>
#include <svl/eitem.hxx>
#include <svx/chrtitem.hxx>
#include <svl/intitem.hxx>
...
...
@@ -286,10 +287,9 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
{
if
(
rSubIncrements
.
getLength
()
>
0
&&
rSubIncrements
[
0
].
IntervalCount
.
hasValue
())
{
OSL_ASSERT
(
rSubIncrements
[
0
].
IntervalCount
.
getValueTypeClass
()
==
uno
::
TypeClass_LONG
);
rOutItemSet
.
Put
(
SfxInt32Item
(
nWhichId
,
*
static_cast
<
const
sal_Int32
*
>
(
rSubIncrements
[
0
].
IntervalCount
.
getValue
()
)
));
*
o3tl
::
doAccess
<
sal_Int32
>
(
rSubIncrements
[
0
].
IntervalCount
)
));
}
else
{
...
...
chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
Dosyayı görüntüle @
f35b1397
...
...
@@ -30,6 +30,7 @@
#include <editeng/postitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <o3tl/any.hxx>
#include <svl/stritem.hxx>
#include <com/sun/star/beans/XPropertyState.hpp>
...
...
@@ -150,8 +151,7 @@ void CharacterPropertyItemConverter::FillSpecialItem(
}
aValue
=
GetPropertySet
()
->
getPropertyValue
(
"CharUnderlineHasColor"
);
if
(
aValue
.
hasValue
()
&&
*
static_cast
<
const
sal_Bool
*
>
(
aValue
.
getValue
())
)
if
(
aValue
.
hasValue
()
&&
*
o3tl
::
doAccess
<
bool
>
(
aValue
)
)
{
aItem
.
PutValue
(
aValue
,
MID_TL_HASCOLOR
);
bModified
=
true
;
...
...
@@ -182,8 +182,7 @@ void CharacterPropertyItemConverter::FillSpecialItem(
}
aValue
=
GetPropertySet
()
->
getPropertyValue
(
"CharOverlineHasColor"
);
if
(
aValue
.
hasValue
()
&&
*
static_cast
<
const
sal_Bool
*
>
(
aValue
.
getValue
()
)
)
if
(
aValue
.
hasValue
()
&&
*
o3tl
::
doAccess
<
bool
>
(
aValue
)
)
{
aItem
.
PutValue
(
aValue
,
MID_TL_HASCOLOR
);
bModified
=
true
;
...
...
chart2/source/inc/CommonFunctors.hxx
Dosyayı görüntüle @
f35b1397
...
...
@@ -21,6 +21,7 @@
#include <algorithm>
#include <functional>
#include <o3tl/any.hxx>
#include <rtl/math.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <rtl/ustring.hxx>
...
...
@@ -56,13 +57,7 @@ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToDouble : public ::std::unary_function< css:
{
double
fResult
;
::
rtl
::
math
::
setNan
(
&
fResult
);
css
::
uno
::
TypeClass
eClass
(
rAny
.
getValueType
().
getTypeClass
()
);
if
(
eClass
==
css
::
uno
::
TypeClass_DOUBLE
)
{
fResult
=
*
static_cast
<
const
double
*
>
(
rAny
.
getValue
()
);
}
rAny
>>=
fResult
;
return
fResult
;
}
};
...
...
@@ -74,10 +69,8 @@ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToString : public ::std::unary_function< css:
{
OUString
operator
()
(
const
css
::
uno
::
Any
&
rAny
)
{
css
::
uno
::
TypeClass
eClass
(
rAny
.
getValueType
().
getTypeClass
()
);
if
(
eClass
==
css
::
uno
::
TypeClass_DOUBLE
)
if
(
auto
pDouble
=
o3tl
::
tryAccess
<
double
>
(
rAny
)
)
{
const
double
*
pDouble
=
static_cast
<
const
double
*
>
(
rAny
.
getValue
()
);
if
(
::
rtl
::
math
::
isNan
(
*
pDouble
)
)
return
OUString
();
return
::
rtl
::
math
::
doubleToUString
(
...
...
@@ -88,9 +81,9 @@ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToString : public ::std::unary_function< css:
true
// remove trailing zeros
);
}
else
if
(
eClass
==
css
::
uno
::
TypeClass_STRING
)
else
if
(
auto
s
=
o3tl
::
tryAccess
<
OUString
>
(
rAny
)
)
{
return
*
static_cast
<
const
OUString
*
>
(
rAny
.
getValue
()
)
;
return
*
s
;
}
return
OUString
();
...
...
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