Kaydet (Commit) aa454b22 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane Kaydeden (comit) Norbert Thiebaud

AUTH_FIELD_END looks like it is made for this

avoids mucking with casts and allows more accurate typing

Change-Id: I968a2f7fcfa5534947102918125b095ca3b4a66c
Reviewed-on: https://gerrit.libreoffice.org/11313Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
Tested-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst dd2abe04
...@@ -70,12 +70,12 @@ static void lcl_FillAuthPattern(SwFormTokens &rAuthTokens, sal_uInt16 nTypeId) ...@@ -70,12 +70,12 @@ static void lcl_FillAuthPattern(SwFormTokens &rAuthTokens, sal_uInt16 nTypeId)
AUTH_FIELD_AUTHOR, AUTH_FIELD_AUTHOR,
AUTH_FIELD_TITLE, AUTH_FIELD_TITLE,
AUTH_FIELD_YEAR, AUTH_FIELD_YEAR,
nTypeId == AUTH_TYPE_WWW ? static_cast<sal_uInt16>(AUTH_FIELD_URL) : SAL_MAX_UINT16 nTypeId == AUTH_TYPE_WWW ? AUTH_FIELD_URL : AUTH_FIELD_END
}; };
for(size_t i = 0; i < SAL_N_ELEMENTS(nVals); ++i) for(size_t i = 0; i < SAL_N_ELEMENTS(nVals); ++i)
{ {
if(nVals[i] == SAL_MAX_UINT16) if(nVals[i] == AUTH_FIELD_END)
break; break;
if( i > 0 ) if( i > 0 )
rAuthTokens.push_back( aTextToken ); rAuthTokens.push_back( aTextToken );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment