diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-02 10:47:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-05 09:18:18 +0000 |
commit | 6281eb0e0792da0194c07da18296e94dd944b8e5 (patch) | |
tree | 89237ceee4cb92a865e28de9531362365c297310 /sw | |
parent | 86e35fb7e360938c0aa50ef65eadf70b35657e13 (diff) |
GetTokenCount on empty string is always 0
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/fldui/fldmgr.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index 7cd374fe0b96..426f36fe2873 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -1352,7 +1352,7 @@ sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) case TYP_DROPDOWN : { pFld = new SwDropDownField(pCurShell->GetFldType( 0, RES_DROPDOWN )); - xub_StrLen nTokenCount = rData.sPar2.Len() ? rData.sPar2.GetTokenCount(DB_DELIM) : 0; + xub_StrLen nTokenCount = rData.sPar2.GetTokenCount(DB_DELIM); Sequence<OUString> aEntries(nTokenCount); OUString* pArray = aEntries.getArray(); for(xub_StrLen nToken = 0; nToken < nTokenCount; nToken++) @@ -1516,7 +1516,7 @@ void SwFldMgr::UpdateCurFld(sal_uLong nFormat, break; case TYP_DROPDOWN: { - xub_StrLen nTokenCount = sPar2.Len() ? sPar2.GetTokenCount(DB_DELIM) : 0; + xub_StrLen nTokenCount = sPar2.GetTokenCount(DB_DELIM); Sequence<OUString> aEntries(nTokenCount); OUString* pArray = aEntries.getArray(); for(xub_StrLen nToken = 0; nToken < nTokenCount; nToken++) |