[Libreoffice-commits] core.git: sw/source

Lionel Elie Mamane lionel at mamane.lu
Sun Sep 7 00:37:30 PDT 2014


 sw/source/core/tox/tox.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit aa454b228cb96920d63456be4f920aca1fe3b60e
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sun Sep 7 09:05:08 2014 +0200

    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/11313
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
    Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 98f7599..07b8333 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -70,12 +70,12 @@ static void lcl_FillAuthPattern(SwFormTokens &rAuthTokens, sal_uInt16 nTypeId)
         AUTH_FIELD_AUTHOR,
         AUTH_FIELD_TITLE,
         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)
     {
-        if(nVals[i] == SAL_MAX_UINT16)
+        if(nVals[i] == AUTH_FIELD_END)
             break;
         if( i > 0 )
             rAuthTokens.push_back( aTextToken );


More information about the Libreoffice-commits mailing list