summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-08-28 09:40:36 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-08-28 09:40:36 +0200
commita206b04ceb4108fdd1414dd70addcfcd42a8c29a (patch)
tree9d41dda39775e59054aae39b226d149e7b4ff1f9 /starmath
parent625c93a8daa2d23bfd42908e6fbba428d5967e84 (diff)
Simplify SmFontStyles::GetStyleName
Change-Id: I2df721af0eb60e28cd9882195f68a034a5fa802e
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/dialog.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 57ab5bae7754..7fe760c9bb6d 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <cassert>
+
#include "tools/rcid.h"
#include <comphelper/string.hxx>
#include <svl/eitem.hxx>
@@ -77,7 +81,6 @@ class SmFontStyles
OUString aBold;
OUString aItalic;
OUString aBoldItalic;
- OUString aEmpty;
public:
SmFontStyles();
@@ -118,17 +121,14 @@ const OUString& SmFontStyles::GetStyleName( sal_uInt16 nIdx ) const
// 0 = "normal", 1 = "italic",
// 2 = "bold", 3 = "bold italic"
-#if OSL_DEBUG_LEVEL > 1
- OSL_ENSURE( nIdx < GetCount(), "index out of range" );
-#endif
+ assert( nIdx < GetCount() );
switch (nIdx)
{
case 0 : return aNormal;
case 1 : return aItalic;
case 2 : return aBold;
- case 3 : return aBoldItalic;
+ default: /*case 3:*/ return aBoldItalic;
}
- return aEmpty;
}
const SmFontStyles & GetFontStyles()