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
4c21d3ac
Kaydet (Commit)
4c21d3ac
authored
Ara 02, 2014
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
editeng: convert that to assert
Change-Id: I03e43d35efb813f985b93bc05c3b50c4462f9111
üst
54988348
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
20 deletions
+14
-20
editdoc.cxx
editeng/source/editeng/editdoc.cxx
+13
-19
editdoc.hxx
editeng/source/editeng/editdoc.hxx
+1
-1
No files found.
editeng/source/editeng/editdoc.cxx
Dosyayı görüntüle @
4c21d3ac
...
...
@@ -847,12 +847,12 @@ ParaPortion* ParaPortionList::SafeGetObject(sal_Int32 nPos)
void
ParaPortionList
::
DbgCheck
(
ParaPortionList
const
&
rParas
,
EditDoc
const
&
rDoc
)
{
DBG_ASSERT
(
rParas
.
Count
()
==
rDoc
.
Count
(),
"ParaPortionList::DbgCheck() - Count() unequal!"
);
assert
(
rParas
.
Count
()
==
rDoc
.
Count
()
);
for
(
sal_Int32
i
=
0
;
i
<
rParas
.
Count
();
++
i
)
{
DBG_ASSERT
(
rParas
.
SafeGetObject
(
i
),
"ParaPortionList::DbgCheck() - Null-Pointer in List!"
);
DBG_ASSERT
(
rParas
.
SafeGetObject
(
i
)
->
GetNode
(),
"ParaPortionList::DbgCheck() - Null-Pointer in List(2)!"
);
DBG_ASSERT
(
rParas
.
SafeGetObject
(
i
)
->
GetNode
()
==
rDoc
.
GetObject
(
i
),
"ParaPortionList::DbgCheck() - Entries intersect!"
);
assert
(
rParas
.
SafeGetObject
(
i
)
!=
nullptr
);
assert
(
rParas
.
SafeGetObject
(
i
)
->
GetNode
()
!=
nullptr
);
assert
(
rParas
.
SafeGetObject
(
i
)
->
GetNode
()
==
rDoc
.
GetObject
(
i
)
);
}
}
#endif
...
...
@@ -1560,7 +1560,9 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode )
sal_Int32
nNewStart
=
maString
.
getLength
();
OSL_ENSURE
(
CharAttribList
::
DbgCheckAttribs
(
aCharAttribList
),
"Attribute before AppendAttribs broken"
);
#if OSL_DEBUG_LEVEL > 0
CharAttribList
::
DbgCheckAttribs
(
aCharAttribList
);
#endif
sal_Int32
nAttr
=
0
;
CharAttribList
::
AttribsType
&
rNextAttribs
=
pNextNode
->
GetCharAttribs
().
GetAttribs
();
...
...
@@ -1614,7 +1616,9 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode )
// For the Attributes that just moved over:
rNextAttribs
.
clear
();
OSL_ENSURE
(
CharAttribList
::
DbgCheckAttribs
(
aCharAttribList
),
"Attribute after AppendAttribs broken"
);
#if OSL_DEBUG_LEVEL > 0
CharAttribList
::
DbgCheckAttribs
(
aCharAttribList
);
#endif
}
void
ContentNode
::
CreateDefFont
()
...
...
@@ -2985,32 +2989,22 @@ void CharAttribList::DeleteEmptyAttribs( SfxItemPool& rItemPool )
}
#if OSL_DEBUG_LEVEL > 0
bool
CharAttribList
::
DbgCheckAttribs
(
CharAttribList
const
&
rAttribs
)
void
CharAttribList
::
DbgCheckAttribs
(
CharAttribList
const
&
rAttribs
)
{
bool
bOK
=
true
;
AttribsType
::
const_iterator
it
=
rAttribs
.
aAttribs
.
begin
();
AttribsType
::
const_iterator
itEnd
=
rAttribs
.
aAttribs
.
end
();
std
::
set
<
std
::
pair
<
sal_Int32
,
sal_uInt16
>>
zero_set
;
for
(;
it
!=
itEnd
;
++
it
)
{
const
EditCharAttrib
&
rAttr
=
*
it
;
if
(
rAttr
.
GetStart
()
>
rAttr
.
GetEnd
())
{
bOK
=
false
;
OSL_FAIL
(
"Attribute is distorted"
);
}
if
(
rAttr
.
IsFeature
()
&&
rAttr
.
GetLen
()
!=
1
)
{
bOK
=
false
;
OSL_FAIL
(
"Feature, Len != 1"
);
}
assert
(
rAttr
.
GetStart
()
<=
rAttr
.
GetEnd
());
assert
(
!
rAttr
.
IsFeature
()
||
rAttr
.
GetLen
()
==
1
);
if
(
0
==
rAttr
.
GetLen
())
{
// not sure if 0-length attributes allowed at all in non-empty para?
assert
(
zero_set
.
insert
(
std
::
make_pair
(
rAttr
.
GetStart
(),
rAttr
.
Which
())).
second
&&
"duplicate 0-length attribute detected"
);
}
}
return
bOK
;
}
#endif
...
...
editeng/source/editeng/editdoc.hxx
Dosyayı görüntüle @
4c21d3ac
...
...
@@ -230,7 +230,7 @@ public:
void
Release
(
const
EditCharAttrib
*
p
);
#if OSL_DEBUG_LEVEL > 0
static
bool
DbgCheckAttribs
(
CharAttribList
const
&
rAttribs
);
static
void
DbgCheckAttribs
(
CharAttribList
const
&
rAttribs
);
#endif
};
...
...
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