summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-26 21:43:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-29 09:56:05 +0100
commiteb71f3d572b6e1c24a072bd2fcd9c29e08113d32 (patch)
tree0b916d55bbf886ea079e4d3da5b8f6442c242402 /editeng
parentaaae59cbf20136b76c9019a9cbc6766b1e0111b3 (diff)
callcatcher: debug-only and unused code
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editdoc.cxx29
-rw-r--r--editeng/source/editeng/editdoc.hxx6
2 files changed, 10 insertions, 25 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index c0b19179a393..806c2cdb7152 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -2065,17 +2065,6 @@ EditCharAttrib* CharAttribList::FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nF
return 0;
}
-sal_Bool CharAttribList::HasAttrib( sal_uInt16 nWhich ) const
-{
- for ( sal_uInt16 nAttr = aAttribs.Count(); nAttr; )
- {
- const EditCharAttrib* pAttr = aAttribs[--nAttr];
- if ( pAttr->Which() == nWhich )
- return sal_True;
- }
- return sal_False;
-}
-
sal_Bool CharAttribList::HasAttrib( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) const
{
sal_Bool bAttr = sal_False;
@@ -2160,31 +2149,27 @@ void CharAttribList::DeleteEmptyAttribs( SfxItemPool& rItemPool )
bHasEmptyAttribs = sal_False;
}
-sal_Bool CharAttribList::DbgCheckAttribs()
+#if OSL_DEBUG_LEVEL > 2
+bool CharAttribList::DbgCheckAttribs() const
{
-#ifdef DBG_UTIL
- sal_Bool bOK = sal_True;
+ bool bOK = true;
for ( sal_uInt16 nAttr = 0; nAttr < aAttribs.Count(); nAttr++ )
{
- EditCharAttrib* pAttr = aAttribs[nAttr];
+ const EditCharAttrib* pAttr = aAttribs[nAttr];
if ( pAttr->GetStart() > pAttr->GetEnd() )
{
- bOK = sal_False;
+ bOK = false;
OSL_FAIL( "Attribute is distorted" );
}
else if ( pAttr->IsFeature() && ( pAttr->GetLen() != 1 ) )
{
- bOK = sal_False;
+ bOK = false;
OSL_FAIL( "Feature, Len != 1" );
}
}
return bOK;
-#else
- return sal_True;
-#endif
}
-
-
+#endif
SvxFontTable::SvxFontTable()
{
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index c923ee2c127a..a51d07122f37 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -255,14 +255,14 @@ public:
sal_Bool HasEmptyAttribs() const { return bHasEmptyAttribs; }
sal_Bool& HasEmptyAttribs() { return bHasEmptyAttribs; }
sal_Bool HasBoundingAttrib( sal_uInt16 nBound );
- sal_Bool HasAttrib( sal_uInt16 nWhich ) const;
sal_Bool HasAttrib( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) const;
CharAttribArray& GetAttribs() { return aAttribs; }
const CharAttribArray& GetAttribs() const { return aAttribs; }
-
+#if OSL_DEBUG_LEVEL > 2
// Debug:
- sal_Bool DbgCheckAttribs();
+ bool DbgCheckAttribs() const;
+#endif
};
// -------------------------------------------------------------------------