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 /cui | |
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 'cui')
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 5552c3a017bd..3212d48d8d05 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -1272,7 +1272,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB) std::vector<OUString> a2EntryList; sal_uInt16 nCatLbSelPos = 0; short nFmtLbSelPos = SELPOS_NONE; - xub_StrLen nErrPos=0; + sal_Int32 nErrPos=0; pNumFmtShell->SetCurCurrencyEntry(NULL); bAdded = pNumFmtShell->AddFormat( aFormat, nErrPos, @@ -1309,7 +1309,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB) a2EntryList); if(bDeleted) a2EntryList.clear(); m_pEdFormat->GrabFocus(); - m_pEdFormat->SetSelection( Selection( (short)nErrPos, SELECTION_MAX ) ); + m_pEdFormat->SetSelection( Selection( 0, SELECTION_MAX ) ); nReturn |= nReturnOneArea; } else @@ -1345,7 +1345,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB) else // syntax error { m_pEdFormat->GrabFocus(); - m_pEdFormat->SetSelection( Selection( (short)nErrPos, SELECTION_MAX ) ); + m_pEdFormat->SetSelection( Selection( nErrPos == -1 ? SELECTION_MAX : nErrPos, SELECTION_MAX ) ); } EditHdl_Impl(m_pEdFormat); nReturn = ((nReturn & nReturnOneArea) ? 0 : (nReturn & nReturnChanged)); |