summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-08 09:41:34 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-08 10:41:06 +0000
commit27a673ac52e02f921ae78d409d0becc85bb7f602 (patch)
tree42ec69c2708df550a425b58a536a14f78f140d57 /vcl/source/control
parent193ec57c899c6941675a86b7a24d6af60e410938 (diff)
coverity#1371289 Missing move assignment operator
Change-Id: Idc26faf904f0c89cfd66f53bb311d8ce9b41eaab
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/field2.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index a2c740b948ce..9fa92591f04f 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -1963,8 +1963,11 @@ static bool ImplIsValidTimePortion( bool _bSkipInvalidCharacters, const OUString
static bool ImplCutTimePortion( OUStringBuffer& _rStr, sal_Int32 _nSepPos, bool _bSkipInvalidCharacters, short* _pPortion )
{
OUString sPortion(_rStr.getStr(), _nSepPos );
- _rStr = _nSepPos < _rStr.getLength()
- ? _rStr.copy( _nSepPos + 1 ) : OUStringBuffer();
+
+ if (_nSepPos < _rStr.getLength())
+ _rStr = _rStr.copy(_nSepPos + 1);
+ else
+ _rStr.truncate();
if ( !ImplIsValidTimePortion( _bSkipInvalidCharacters, sPortion ) )
return false;