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
4809fedd
Kaydet (Commit)
4809fedd
authored
Haz 21, 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 svl
Change-Id: I2005ce59d6211181ed039eaff60ffd31084e1d40
üst
c7c27b9b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
16 deletions
+14
-16
poolitem.hxx
include/svl/poolitem.hxx
+4
-11
cjkoptions.cxx
svl/source/config/cjkoptions.cxx
+2
-1
itemprop.cxx
svl/source/items/itemprop.cxx
+3
-1
fstathelper.cxx
svl/source/misc/fstathelper.cxx
+2
-1
numfmuno.cxx
svl/source/numbers/numfmuno.cxx
+3
-2
No files found.
include/svl/poolitem.hxx
Dosyayı görüntüle @
4809fedd
...
...
@@ -50,18 +50,11 @@ enum SfxItemKind {
inline
bool
Any2Bool
(
const
css
::
uno
::
Any
&
rValue
)
{
bool
bValue
=
false
;
if
(
rValue
.
hasValue
(
)
)
if
(
!
(
rValue
>>=
bValue
)
)
{
if
(
rValue
.
getValueType
()
==
cppu
::
UnoType
<
bool
>::
get
()
)
{
bValue
=
*
static_cast
<
sal_Bool
const
*>
(
rValue
.
getValue
());
}
else
{
sal_Int32
nNum
=
0
;
if
(
rValue
>>=
nNum
)
bValue
=
nNum
!=
0
;
}
sal_Int32
nNum
=
0
;
if
(
rValue
>>=
nNum
)
bValue
=
nNum
!=
0
;
}
return
bValue
;
...
...
svl/source/config/cjkoptions.cxx
Dosyayı görüntüle @
4809fedd
...
...
@@ -19,6 +19,7 @@
#include <svl/cjkoptions.hxx>
#include <o3tl/any.hxx>
#include <svl/languageoptions.hxx>
#include <i18nlangtag/lang.h>
#include <unotools/configitem.hxx>
...
...
@@ -179,7 +180,7 @@ void SvtCJKOptions_Impl::Load()
{
if
(
pValues
[
nProp
].
hasValue
()
)
{
bool
bValue
=
*
static_cast
<
sal_Bool
const
*>
(
pValues
[
nProp
].
getValue
()
);
bool
bValue
=
*
o3tl
::
doAccess
<
bool
>
(
pValues
[
nProp
]
);
switch
(
nProp
)
{
case
0
:
{
bCJKFont
=
bValue
;
bROCJKFont
=
pROStates
[
nProp
];
}
break
;
...
...
svl/source/items/itemprop.cxx
Dosyayı görüntüle @
4809fedd
...
...
@@ -17,7 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/config.h>
#include <o3tl/any.hxx>
#include <svl/itemprop.hxx>
#include <svl/itempool.hxx>
#include <svl/itemset.hxx>
...
...
@@ -198,7 +200,7 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn
if
(
rEntry
.
aType
.
getTypeClass
()
==
TypeClass_ENUM
&&
rAny
.
getValueTypeClass
()
==
TypeClass_LONG
)
{
sal_Int32
nTmp
=
*
static_cast
<
sal_Int32
const
*>
(
rAny
.
getValue
()
);
sal_Int32
nTmp
=
*
o3tl
::
forceAccess
<
sal_Int32
>
(
rAny
);
rAny
.
setValue
(
&
nTmp
,
rEntry
.
aType
);
}
}
...
...
svl/source/misc/fstathelper.cxx
Dosyayı görüntüle @
4809fedd
...
...
@@ -19,6 +19,7 @@
#include <com/sun/star/util/DateTime.hpp>
#include <comphelper/processfactory.hxx>
#include <o3tl/any.hxx>
#include <rtl/ustring.hxx>
#include <svl/fstathelper.hxx>
#include <tools/date.hxx>
...
...
@@ -43,7 +44,7 @@ bool FStatHelper::GetModifiedDateTimeOfFile( const OUString& rURL,
if
(
aAny
.
hasValue
()
)
{
bRet
=
true
;
const
util
::
DateTime
*
pDT
=
static_cast
<
util
::
DateTime
const
*>
(
aAny
.
getValue
()
);
auto
pDT
=
o3tl
::
doAccess
<
util
::
DateTime
>
(
aAny
);
if
(
pDate
)
*
pDate
=
Date
(
pDT
->
Day
,
pDT
->
Month
,
pDT
->
Year
);
if
(
pTime
)
...
...
svl/source/numbers/numfmuno.cxx
Dosyayı görüntüle @
4809fedd
...
...
@@ -19,6 +19,7 @@
#include <tools/color.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <o3tl/any.hxx>
#include <osl/mutex.hxx>
#include <osl/diagnose.h>
#include <rtl/ustring.hxx>
...
...
@@ -952,8 +953,8 @@ void SAL_CALL SvNumberFormatSettingsObj::setPropertyValue( const OUString& aProp
if
(
aPropertyName
==
PROPERTYNAME_NOZERO
)
{
// operator >>= shouldn't be used for bool (?)
if
(
a
Value
.
getValueTypeClass
()
==
uno
::
TypeClass_BOOLEAN
)
pFormatter
->
SetNoZero
(
*
static_cast
<
sal_Bool
const
*>
(
aValue
.
getValue
())
);
if
(
a
uto
b
=
o3tl
::
tryAccess
<
bool
>
(
aValue
)
)
pFormatter
->
SetNoZero
(
*
b
);
}
else
if
(
aPropertyName
==
PROPERTYNAME_NULLDATE
)
{
...
...
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