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
745fe08e
Kaydet (Commit)
745fe08e
authored
Ara 01, 2016
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
svl: convert some legacy DBG_ASSERT
Change-Id: I8fc4d849e434e245d871dc2d2eef42713e1359bb
üst
bac1c69c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
aeitem.cxx
svl/source/items/aeitem.cxx
+3
-3
cenumitm.cxx
svl/source/items/cenumitm.cxx
+3
-3
cintitem.cxx
svl/source/items/cintitem.cxx
+8
-8
No files found.
svl/source/items/aeitem.cxx
Dosyayı görüntüle @
745fe08e
...
@@ -93,13 +93,13 @@ sal_uInt16 SfxAllEnumItem::GetValueCount() const
...
@@ -93,13 +93,13 @@ sal_uInt16 SfxAllEnumItem::GetValueCount() const
OUString
SfxAllEnumItem
::
GetValueTextByPos
(
sal_uInt16
nPos
)
const
OUString
SfxAllEnumItem
::
GetValueTextByPos
(
sal_uInt16
nPos
)
const
{
{
DBG_ASSERT
(
pValues
&&
nPos
<
pValues
->
size
(),
"enum overflow"
);
assert
(
pValues
&&
nPos
<
pValues
->
size
()
);
return
(
*
pValues
)[
nPos
].
aText
;
return
(
*
pValues
)[
nPos
].
aText
;
}
}
sal_uInt16
SfxAllEnumItem
::
GetValueByPos
(
sal_uInt16
nPos
)
const
sal_uInt16
SfxAllEnumItem
::
GetValueByPos
(
sal_uInt16
nPos
)
const
{
{
DBG_ASSERT
(
pValues
&&
nPos
<
pValues
->
size
(),
"enum overflow"
);
assert
(
pValues
&&
nPos
<
pValues
->
size
()
);
return
(
*
pValues
)[
nPos
].
nValue
;
return
(
*
pValues
)[
nPos
].
nValue
;
}
}
...
@@ -192,7 +192,7 @@ bool SfxAllEnumItem::IsEnabled( sal_uInt16 nValue ) const
...
@@ -192,7 +192,7 @@ bool SfxAllEnumItem::IsEnabled( sal_uInt16 nValue ) const
void
SfxAllEnumItem
::
RemoveValue
(
sal_uInt16
nValue
)
void
SfxAllEnumItem
::
RemoveValue
(
sal_uInt16
nValue
)
{
{
sal_uInt16
nPos
=
GetPosByValue
(
nValue
);
sal_uInt16
nPos
=
GetPosByValue
(
nValue
);
DBG_ASSERT
(
nPos
!=
USHRT_MAX
,
"removing value not in enum"
);
assert
(
nPos
!=
USHRT_MAX
);
pValues
->
erase
(
pValues
->
begin
()
+
nPos
);
pValues
->
erase
(
pValues
->
begin
()
+
nPos
);
}
}
...
...
svl/source/items/cenumitm.cxx
Dosyayı görüntüle @
745fe08e
...
@@ -65,7 +65,7 @@ bool SfxEnumItemInterface::PutValue(const css::uno::Any& rVal,
...
@@ -65,7 +65,7 @@ bool SfxEnumItemInterface::PutValue(const css::uno::Any& rVal,
SetEnumValue
(
sal_uInt16
(
nTheValue
));
SetEnumValue
(
sal_uInt16
(
nTheValue
));
return
true
;
return
true
;
}
}
OSL_FAIL
(
"SfxEnumItemInterface::PutValue(): Wrong type"
);
SAL_WARN
(
"svl.items"
,
"SfxEnumItemInterface::PutValue(): Wrong type"
);
return
false
;
return
false
;
}
}
...
@@ -141,7 +141,7 @@ void SfxEnumItem::SetEnumValue(sal_uInt16 const nTheValue)
...
@@ -141,7 +141,7 @@ void SfxEnumItem::SetEnumValue(sal_uInt16 const nTheValue)
void
SfxEnumItem
::
SetValue
(
sal_uInt16
const
nTheValue
)
void
SfxEnumItem
::
SetValue
(
sal_uInt16
const
nTheValue
)
{
{
DBG_ASSERT
(
GetRefCount
()
==
0
,
"SfxEnumItem::SetValue(): Pooled item"
);
assert
(
GetRefCount
()
==
0
&&
"SfxEnumItem::SetValue(): Pooled item"
);
m_nValue
=
nTheValue
;
m_nValue
=
nTheValue
;
}
}
...
@@ -199,7 +199,7 @@ bool SfxBoolItem::PutValue(const css::uno::Any& rVal, sal_uInt8)
...
@@ -199,7 +199,7 @@ bool SfxBoolItem::PutValue(const css::uno::Any& rVal, sal_uInt8)
m_bValue
=
bTheValue
;
m_bValue
=
bTheValue
;
return
true
;
return
true
;
}
}
OSL_FAIL
(
"SfxBoolItem::PutValue(): Wrong type"
);
SAL_WARN
(
"svl.items"
,
"SfxBoolItem::PutValue(): Wrong type"
);
return
false
;
return
false
;
}
}
...
...
svl/source/items/cintitem.cxx
Dosyayı görüntüle @
745fe08e
...
@@ -57,7 +57,7 @@ bool CntByteItem::PutValue(const css::uno::Any& rVal, sal_uInt8)
...
@@ -57,7 +57,7 @@ bool CntByteItem::PutValue(const css::uno::Any& rVal, sal_uInt8)
return
true
;
return
true
;
}
}
OSL_FAIL
(
"CntByteItem::PutValue - Wrong type!"
);
SAL_WARN
(
"svl.items"
,
"CntByteItem::PutValue - Wrong type!"
);
return
false
;
return
false
;
}
}
...
@@ -123,12 +123,12 @@ bool CntUInt16Item::PutValue(const css::uno::Any& rVal, sal_uInt8)
...
@@ -123,12 +123,12 @@ bool CntUInt16Item::PutValue(const css::uno::Any& rVal, sal_uInt8)
sal_Int32
nValue
=
0
;
sal_Int32
nValue
=
0
;
if
(
rVal
>>=
nValue
)
if
(
rVal
>>=
nValue
)
{
{
DBG_ASSERT
(
nValue
<=
USHRT_MAX
,
"Overflow in UInt16 value!"
);
SAL_WARN_IF
(
nValue
>
USHRT_MAX
,
"svl.items"
,
"Overflow in UInt16 value!"
);
m_nValue
=
(
sal_uInt16
)
nValue
;
m_nValue
=
static_cast
<
sal_uInt16
>
(
nValue
)
;
return
true
;
return
true
;
}
}
OSL_FAIL
(
"CntUInt16Item::PutValue - Wrong type!"
);
SAL_WARN
(
"svl.items"
,
"CntUInt16Item::PutValue - Wrong type!"
);
return
false
;
return
false
;
}
}
...
@@ -194,7 +194,7 @@ bool CntInt32Item::PutValue(const css::uno::Any& rVal, sal_uInt8)
...
@@ -194,7 +194,7 @@ bool CntInt32Item::PutValue(const css::uno::Any& rVal, sal_uInt8)
return
true
;
return
true
;
}
}
OSL_FAIL
(
"CntInt32Item::PutValue - Wrong type!"
);
SAL_WARN
(
"svl.items"
,
"CntInt32Item::PutValue - Wrong type!"
);
return
false
;
return
false
;
}
}
...
@@ -248,7 +248,7 @@ bool CntUInt32Item::GetPresentation(SfxItemPresentation,
...
@@ -248,7 +248,7 @@ bool CntUInt32Item::GetPresentation(SfxItemPresentation,
bool
CntUInt32Item
::
QueryValue
(
css
::
uno
::
Any
&
rVal
,
sal_uInt8
)
const
bool
CntUInt32Item
::
QueryValue
(
css
::
uno
::
Any
&
rVal
,
sal_uInt8
)
const
{
{
sal_Int32
nValue
=
m_nValue
;
sal_Int32
nValue
=
m_nValue
;
DBG_ASSERT
(
nValue
>=
0
,
"Overflow in UInt32 value!"
);
SAL_WARN_IF
(
nValue
<
0
,
"svl.items"
,
"Overflow in UInt32 value!"
);
rVal
<<=
nValue
;
rVal
<<=
nValue
;
return
true
;
return
true
;
}
}
...
@@ -259,12 +259,12 @@ bool CntUInt32Item::PutValue(const css::uno::Any& rVal, sal_uInt8)
...
@@ -259,12 +259,12 @@ bool CntUInt32Item::PutValue(const css::uno::Any& rVal, sal_uInt8)
sal_Int32
nValue
=
0
;
sal_Int32
nValue
=
0
;
if
(
rVal
>>=
nValue
)
if
(
rVal
>>=
nValue
)
{
{
DBG_ASSERT
(
nValue
>=
0
,
"Overflow in UInt32 value!"
);
SAL_WARN_IF
(
nValue
<
0
,
"svl.items"
,
"Overflow in UInt32 value!"
);
m_nValue
=
nValue
;
m_nValue
=
nValue
;
return
true
;
return
true
;
}
}
OSL_FAIL
(
"CntUInt32Item::PutValue - Wrong type!"
);
SAL_WARN
(
"svl.items"
,
"CntUInt32Item::PutValue - Wrong type!"
);
return
false
;
return
false
;
}
}
...
...
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