summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2013-02-22 21:09:12 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2013-02-22 21:11:11 +0400
commit046ad9ffad7b4647fcc66291dec73bbb67a7fe85 (patch)
tree193fff78aeb70de2d4408c3c90e63a268e5af286 /svl
parent3a5ae29f0d2f4467ec75803d6e3b5b461672428a (diff)
Change-Id: I683002c12f9bb8f053dafea70c889a2881a70b99
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/custritm.cxx16
1 files changed, 3 insertions, 13 deletions
diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx
index 3b3128dc7413..d44b43c1c382 100644
--- a/svl/source/items/custritm.cxx
+++ b/svl/source/items/custritm.cxx
@@ -54,19 +54,9 @@ int CntUnencodedStringItem::Compare(SfxPoolItem const & rWith) const
DBG_CHKTHIS(CntUnencodedStringItem, 0);
DBG_ASSERT(rWith.ISA(CntUnencodedStringItem),
"CntUnencodedStringItem::Compare(): Bad type");
- switch (m_aValue.compareTo(static_cast< CntUnencodedStringItem const * >(
- &rWith)->
- m_aValue))
- {
- case COMPARE_LESS:
- return -1;
-
- case COMPARE_EQUAL:
- return 0;
-
- default: // COMPARE_GREATER
- return 1;
- }
+ sal_Int32 nCmp = m_aValue.compareTo(
+ static_cast< CntUnencodedStringItem const * >(&rWith)->m_aValue);
+ return (nCmp == 0) ? 0 : (nCmp < 0) ? -1 : 1;
}
//============================================================================