summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-08-29 11:22:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-08-29 11:43:50 +0100
commitcbba41823a2e67add2620e4901bf0ead542c2932 (patch)
tree921e608e0b72f88d0acfe48b7953bb4c37205799 /vcl
parent2fa8271155450894ed1716a6cce97540950518b0 (diff)
String::Expand -> string::padToLength
Change-Id: I684e371c31ba76d2e9b563eed70449764346161b
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/field2.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index b30e275da104..ec5ad7e7df99 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -753,10 +753,12 @@ void PatternFormatter::ImplSetMask(const rtl::OString& rEditMask,
if ( m_aEditMask.getLength() != maLiteralMask.Len() )
{
- if ( m_aEditMask.getLength() < maLiteralMask.Len() )
- maLiteralMask.Erase(m_aEditMask.getLength());
+ OUStringBuffer aBuf(maLiteralMask);
+ if (m_aEditMask.getLength() < aBuf.getLength())
+ aBuf.remove(m_aEditMask.getLength(), aBuf.getLength() - m_aEditMask.getLength());
else
- maLiteralMask.Expand(m_aEditMask.getLength(), ' ');
+ comphelper::string::padToLength(aBuf, m_aEditMask.getLength(), ' ');
+ maLiteralMask = aBuf.makeStringAndClear();
}
// Strict mode allows only the input mode if only equal characters are allowed as mask and if