diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-02-22 21:09:12 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-02-22 21:11:11 +0400 |
commit | 046ad9ffad7b4647fcc66291dec73bbb67a7fe85 (patch) | |
tree | 193fff78aeb70de2d4408c3c90e63a268e5af286 /svl | |
parent | 3a5ae29f0d2f4467ec75803d6e3b5b461672428a (diff) |
fix string conversion in 1da3af5f1eb6a32fd0ab10da7cf2f8ddb298a3a1
Change-Id: I683002c12f9bb8f053dafea70c889a2881a70b99
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/custritm.cxx | 16 |
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; } //============================================================================ |