diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-17 00:50:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-17 09:54:14 +0100 |
commit | 8a0941ad1d85994d8ddf313dfe17af03906fd930 (patch) | |
tree | 2f6340670f017d90d05c5dc76a6d29c90a232aff | |
parent | ab8feacc507e94bf29f19b3b6790806a2cccee2f (diff) |
use RTL_CONSTASCII_LENGTH/SAL_N_ELEMENTS
-rw-r--r-- | desktop/source/deployment/registry/configuration/dp_configuration.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index bcf44d359b23..e49253aa0765 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -376,7 +376,7 @@ void BackendImpl::configmgrini_verify_init( if (readLine( &line, OUSTR("SCHEMA="), ucb_content, RTL_TEXTENCODING_UTF8 )) { - sal_Int32 index = sizeof ("SCHEMA=") - 1; + sal_Int32 index = RTL_CONSTASCII_LENGTH("SCHEMA="); do { OUString token( line.getToken( 0, ' ', index ).trim() ); if (token.getLength() > 0) { @@ -391,7 +391,7 @@ void BackendImpl::configmgrini_verify_init( } if (readLine( &line, OUSTR("DATA="), ucb_content, RTL_TEXTENCODING_UTF8 )) { - sal_Int32 index = sizeof ("DATA=") - 1; + sal_Int32 index = RTL_CONSTASCII_LENGTH("DATA="); do { OUString token( line.getToken( 0, ' ', index ).trim() ); if (token.getLength() > 0) @@ -639,7 +639,7 @@ OUString replaceOrigin( else if (rtl_str_shortenedCompare_WithLength( pBytes, nBytes, RTL_CONSTASCII_STRINGPARAM("origin%"), - sizeof ("origin%") - 1 ) == 0) + RTL_CONSTASCII_LENGTH("origin%")) == 0) { if (origin.getLength() == 0) { // encode only once @@ -650,8 +650,8 @@ OUString replaceOrigin( } pAdd = origin.getStr(); nAdd = origin.getLength(); - pBytes += (sizeof ("origin%") - 1); - nBytes -= (sizeof ("origin%") - 1); + pBytes += SAL_N_ELEMENTS("origin%"); + nBytes -= SAL_N_ELEMENTS("origin%"); use_filtered = true; } if ((write_pos + nAdd) > filtered.getLength()) |