diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-21 10:21:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-23 08:29:15 +0200 |
commit | 7a06928bcf638e1eeedebc9d53c306a1b852cc9b (patch) | |
tree | c0402c2da4e2c522ecf32a0b413128f727cbc0fa /svx/source/tbxctrls/itemwin.cxx | |
parent | macosx: add a LSMinimumSystemVersion in Info.plist (diff) | |
download | core-7a06928bcf638e1eeedebc9d53c306a1b852cc9b.tar.gz core-7a06928bcf638e1eeedebc9d53c306a1b852cc9b.zip |
convert code to use OUString::endsWith
Convert places that call
aStr[aStr.getLength()-1] == 'x'
to use the shorter form
aStr.endsWith("x")
Change-Id: I1b3a19c0e89b8989cdbeed440f95fc76f9a4b6b6
Diffstat (limited to 'svx/source/tbxctrls/itemwin.cxx')
-rw-r--r-- | svx/source/tbxctrls/itemwin.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 6435eaa2553d..3d10cb337d33 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -28,8 +28,8 @@ #include <svx/dialogs.hrc> -#define TMP_STR_BEGIN '[' -#define TMP_STR_END ']' +#define TMP_STR_BEGIN "[" +#define TMP_STR_END "]" #define DELAY_TIMEOUT 100 @@ -318,13 +318,13 @@ void SvxColorBox::Update( const XLineColorItem* pItem ) { // Last entry gets tested against temporary color aTmpStr = GetEntry( nCount - 1 ); - if( aTmpStr[0] == TMP_STR_BEGIN && - aTmpStr[aTmpStr.getLength()-1] == TMP_STR_END ) + if( aTmpStr.startsWith(TMP_STR_BEGIN) && + aTmpStr.endsWith(TMP_STR_END) ) { RemoveEntry( nCount - 1 ); } } - aTmpStr = OUString(TMP_STR_BEGIN) + aString + OUString(TMP_STR_END); + aTmpStr = TMP_STR_BEGIN + aString + TMP_STR_END; sal_uInt16 nPos = InsertEntry( aColor, aTmpStr ); SelectEntryPos( nPos ); |