diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-29 09:59:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-12-03 11:34:45 +0200 |
commit | 9083e8d1ca0246ba21423726d568846cb89efae9 (patch) | |
tree | 129faad1dc95f13be74ace8ded8c72d03e6f0755 /svx | |
parent | 63947810107e042ebe440b865904c62e2d3f74d8 (diff) |
convert SvxNumberFormatShell::AddFormat from xub_Strlen to sal_Int32
And make the return code be -1 for error.
Change-Id: I17d066180a604208f0ad689d5dffb77d126c256b
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/items/numfmtsh.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index a5f717383570..118ff9a1b765 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -225,7 +225,7 @@ void SvxNumberFormatShell::FormatChanged( sal_uInt16 nFmtLbPos, } // ----------------------------------------------------------------------- -bool SvxNumberFormatShell::AddFormat( OUString& rFormat, xub_StrLen& rErrPos, +bool SvxNumberFormatShell::AddFormat( OUString& rFormat, sal_Int32& rErrPos, sal_uInt16& rCatLbSelPos, short& rFmtSelPos, std::vector<OUString>& rFmtEntries ) { @@ -247,13 +247,11 @@ bool SvxNumberFormatShell::AddFormat( OUString& rFormat, xub_StrLen& rErrPos, } else // neues Format { - OUString sTemp(rFormat); sal_Int32 nPos; - bInserted = pFormatter->PutEntry( sTemp, nPos, + bInserted = pFormatter->PutEntry( rFormat, nPos, nCurCategory, nAddKey, eCurLanguage ); - rErrPos = (nPos >= 0) ? (xub_StrLen)nPos : 0xFFFF; - rFormat = sTemp; + rErrPos = (nPos >= 0) ? nPos : -1; if (bInserted) { @@ -342,15 +340,15 @@ void SvxNumberFormatShell::MakeFormat( OUString& rFormat, { if( aCurrencyFormatList.size() > static_cast<size_t>(nCurrencyPos) ) { - xub_StrLen rErrPos=0; + sal_Int32 rErrPos=0; std::vector<OUString> aFmtEList; sal_uInt32 nFound = pFormatter->TestNewString( aCurrencyFormatList[nCurrencyPos], eCurLanguage ); if ( nFound == NUMBERFORMAT_ENTRY_NOT_FOUND ) { - sal_uInt16 rCatLbSelPos=0; - short rFmtSelPos=0; + sal_uInt16 rCatLbSelPos =0; + short rFmtSelPos = 0; AddFormat( aCurrencyFormatList[nCurrencyPos],rErrPos,rCatLbSelPos, rFmtSelPos,aFmtEList); } |