summaryrefslogtreecommitdiff
path: root/sw/source/core/crsr/crstrvl.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-07-06 23:21:51 +0200
committerMichael Stahl <mstahl@redhat.com>2017-07-07 13:48:29 +0200
commit0a710a098e65a5e83c1ea47d5bdc1b56ef48f314 (patch)
tree8552401dc826127c567f1bf178bd21b12380df0d /sw/source/core/crsr/crstrvl.cxx
parentc113d386888152632ae26fae9f59faf4f1d2f2dc (diff)
sw: convert SwTextInputField OSL_ENSUREs to assert() and simplify
Change-Id: I86df59e4b77d2ddc479144f32342113a6e29a725
Diffstat (limited to 'sw/source/core/crsr/crstrvl.cxx')
-rw-r--r--sw/source/core/crsr/crstrvl.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index d96f2729dd14..7df6263076c2 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -892,22 +892,16 @@ bool SwCursorShell::DocPtInsideInputField( const Point& rDocPt ) const
sal_Int32 SwCursorShell::StartOfInputFieldAtPos( const SwPosition& rPos )
{
const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, true ));
- if ( pTextInputField == nullptr )
- {
- OSL_ENSURE( false, "<SwEditShell::StartOfInputFieldAtPos(..)> - no Input Field at given position" );
- return 0;
- }
+ assert(pTextInputField != nullptr
+ && "<SwEditShell::StartOfInputFieldAtPos(..)> - no Input Field at given position");
return pTextInputField->GetStart();
}
sal_Int32 SwCursorShell::EndOfInputFieldAtPos( const SwPosition& rPos )
{
const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, true ));
- if ( pTextInputField == nullptr )
- {
- OSL_ENSURE( false, "<SwEditShell::EndOfInputFieldAtPos(..)> - no Input Field at given position" );
- return 0;
- }
+ assert(pTextInputField != nullptr
+ && "<SwEditShell::EndOfInputFieldAtPos(..)> - no Input Field at given position");
return *(pTextInputField->End());
}