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
39ce314c
Kaydet (Commit)
39ce314c
authored
Agu 19, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
comphelper::isA(Type... -> Type == cppu::UnoType...
Change-Id: I1bfb99b1715a907a03af5a30df6c7a41f91fd2fb
üst
884e970b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
25 deletions
+11
-25
types.cxx
comphelper/source/misc/types.cxx
+11
-11
types.hxx
include/comphelper/types.hxx
+0
-14
No files found.
comphelper/source/misc/types.cxx
Dosyayı görüntüle @
39ce314c
...
@@ -289,7 +289,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
...
@@ -289,7 +289,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
break
;
break
;
}
}
case
TypeClass_STRUCT
:
case
TypeClass_STRUCT
:
if
(
isA
(
_rType
,
static_cast
<
FontDescriptor
*>
(
NULL
)
))
if
(
_rType
==
cppu
::
UnoType
<
FontDescriptor
>::
get
(
))
{
{
FontDescriptor
aTemp
;
FontDescriptor
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
...
@@ -301,19 +301,19 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
...
@@ -301,19 +301,19 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
bRes
=
false
;
bRes
=
false
;
break
;
break
;
}
}
if
(
isA
(
_rType
,
static_cast
<
Date
*>
(
NULL
)
))
if
(
_rType
==
cppu
::
UnoType
<
Date
>::
get
(
))
{
{
Date
aDummy
;
Date
aDummy
;
bConversionSuccess
=
tryCompare
(
pData
,
_rValue
,
bRes
,
aDummy
);
bConversionSuccess
=
tryCompare
(
pData
,
_rValue
,
bRes
,
aDummy
);
break
;
break
;
}
}
if
(
isA
(
_rType
,
static_cast
<
Time
*>
(
NULL
)
))
if
(
_rType
==
cppu
::
UnoType
<
Time
>::
get
(
))
{
{
Time
aDummy
;
Time
aDummy
;
bConversionSuccess
=
tryCompare
(
pData
,
_rValue
,
bRes
,
aDummy
);
bConversionSuccess
=
tryCompare
(
pData
,
_rValue
,
bRes
,
aDummy
);
break
;
break
;
}
}
if
(
isA
(
_rType
,
static_cast
<
DateTime
*>
(
NULL
)
))
if
(
_rType
==
cppu
::
UnoType
<
DateTime
>::
get
(
))
{
{
DateTime
aDummy
;
DateTime
aDummy
;
bConversionSuccess
=
tryCompare
(
pData
,
_rValue
,
bRes
,
aDummy
);
bConversionSuccess
=
tryCompare
(
pData
,
_rValue
,
bRes
,
aDummy
);
...
@@ -321,7 +321,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
...
@@ -321,7 +321,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
}
}
break
;
break
;
case
TypeClass_SEQUENCE
:
case
TypeClass_SEQUENCE
:
if
(
isA
(
_rType
,
static_cast
<
Sequence
<
sal_Int8
>*
>
(
NULL
)
))
if
(
_rType
==
cppu
::
UnoType
<
Sequence
<
sal_Int8
>>::
get
(
))
{
{
Sequence
<
sal_Int8
>
aTemp
;
Sequence
<
sal_Int8
>
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
...
@@ -333,7 +333,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
...
@@ -333,7 +333,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
())
==
0
;
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
())
==
0
;
}
}
}
}
else
if
(
isA
(
_rType
,
static_cast
<
Sequence
<
sal_uInt8
>*
>
(
NULL
)
))
else
if
(
_rType
==
cppu
::
UnoType
<
Sequence
<
sal_uInt8
>>::
get
(
))
{
{
Sequence
<
sal_uInt8
>
aTemp
;
Sequence
<
sal_uInt8
>
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
...
@@ -345,7 +345,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
...
@@ -345,7 +345,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
())
==
0
;
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
())
==
0
;
}
}
}
}
else
if
(
isA
(
_rType
,
static_cast
<
Sequence
<
sal_Int16
>*
>
(
NULL
)
))
else
if
(
_rType
==
cppu
::
UnoType
<
Sequence
<
sal_Int16
>>::
get
(
))
{
{
Sequence
<
sal_Int16
>
aTemp
;
Sequence
<
sal_Int16
>
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
...
@@ -357,7 +357,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
...
@@ -357,7 +357,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
()
*
sizeof
(
sal_Int16
))
==
0
;
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
()
*
sizeof
(
sal_Int16
))
==
0
;
}
}
}
}
else
if
(
isA
(
_rType
,
static_cast
<
Sequence
<
sal_uInt16
>*
>
(
NULL
)
))
else
if
(
_rType
==
cppu
::
UnoType
<
cppu
::
UnoSequenceType
<
cppu
::
UnoUnsignedShortType
>>::
get
(
))
{
{
Sequence
<
sal_uInt16
>
aTemp
;
Sequence
<
sal_uInt16
>
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
...
@@ -369,7 +369,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
...
@@ -369,7 +369,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
()
*
sizeof
(
sal_uInt16
))
==
0
;
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
()
*
sizeof
(
sal_uInt16
))
==
0
;
}
}
}
}
else
if
(
isA
(
_rType
,
static_cast
<
Sequence
<
sal_Int32
>*
>
(
NULL
)
))
else
if
(
_rType
==
cppu
::
UnoType
<
Sequence
<
sal_Int32
>>::
get
(
))
{
{
Sequence
<
sal_Int32
>
aTemp
;
Sequence
<
sal_Int32
>
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
...
@@ -381,7 +381,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
...
@@ -381,7 +381,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
()
*
sizeof
(
sal_Int32
))
==
0
;
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
()
*
sizeof
(
sal_Int32
))
==
0
;
}
}
}
}
else
if
(
isA
(
_rType
,
static_cast
<
Sequence
<
sal_uInt32
>*
>
(
NULL
)
))
else
if
(
_rType
==
cppu
::
UnoType
<
Sequence
<
sal_uInt32
>>::
get
(
))
{
{
Sequence
<
sal_uInt32
>
aTemp
;
Sequence
<
sal_uInt32
>
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
...
@@ -393,7 +393,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
...
@@ -393,7 +393,7 @@ bool compare_impl(const Type& _rType, const void* pData, const Any& _rValue)
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
()
*
sizeof
(
sal_uInt32
))
==
0
;
memcmp
(
rLeftSeq
.
getConstArray
(),
rRightSeq
.
getConstArray
(),
rLeftSeq
.
getLength
()
*
sizeof
(
sal_uInt32
))
==
0
;
}
}
}
}
else
if
(
isA
(
_rType
,
static_cast
<
Sequence
<
OUString
>*
>
(
NULL
)
))
else
if
(
_rType
==
cppu
::
UnoType
<
Sequence
<
OUString
>>::
get
(
))
{
{
Sequence
<
OUString
>
aTemp
;
Sequence
<
OUString
>
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
bConversionSuccess
=
_rValue
>>=
aTemp
;
...
...
include/comphelper/types.hxx
Dosyayı görüntüle @
39ce314c
...
@@ -55,20 +55,6 @@ namespace comphelper
...
@@ -55,20 +55,6 @@ namespace comphelper
/// returns sal_True if objects of the types given are "compatible"
/// returns sal_True if objects of the types given are "compatible"
COMPHELPER_DLLPUBLIC
bool
isAssignableFrom
(
const
css
::
uno
::
Type
&
_rAssignable
,
const
css
::
uno
::
Type
&
_rFrom
);
COMPHELPER_DLLPUBLIC
bool
isAssignableFrom
(
const
css
::
uno
::
Type
&
_rAssignable
,
const
css
::
uno
::
Type
&
_rFrom
);
/** just a small shortcut ...
check if a type you have at hand at runtime is equal to another type you have at compile time
if all our compiler would accept function calls with explicit template arguments (like
isA<classFoo>(runtimeType)), we wouldn't need the second parameter. But unfortunately at
least the current solaris compiler doesn't allow this ....
So this function is nearly senseless ....
*/
template
<
class
TYPE
>
bool
isA
(
const
css
::
uno
::
Type
&
_rType
,
TYPE
*
pDummy
)
{
return
_rType
.
equals
(
cppu
::
getTypeFavourUnsigned
(
pDummy
));
}
/** ask the given object for an XComponent interface and dispose on it
/** ask the given object for an XComponent interface and dispose on it
*/
*/
template
<
class
TYPE
>
template
<
class
TYPE
>
...
...
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