[Libreoffice] [REVIEW] Easy patch on l10ntools

Eike Rathke erack at redhat.com
Tue Jan 3 11:01:17 PST 2012


Hi julien2412,

On Wednesday, 2011-12-28 14:31:21 -0800, julien2412 wrote:

> Cppcheck report tells this :
> 1474	duplicateBranch	style	Found duplicate branches for if and else
> for l10ntools/source/export.cxx
> 
> 
> Even if this seems easy, perhaps it could be something else than just
> "rText" here.
> 
> diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
> index bd1fbfb..fbed184 100644
> --- a/l10ntools/source/export.cxx
> +++ b/l10ntools/source/export.cxx
> @@ -1475,7 +1475,7 @@ void Export::InsertListEntry( const ByteString &rText,
> const ByteString &rLine )
>              (*pCurEntry)[ SOURCE_LANGUAGE ] = rLine;
>          }
>          else
> -            (*pCurEntry)[ SOURCE_LANGUAGE ] = rLine;
> +            (*pCurEntry)[ SOURCE_LANGUAGE ] = rText;
>  
>          pList->NewSourceLanguageListEntry();
>      }
> 
> Your opinion ?

Makes sense, especially when seen with context of the block immediately
above:

    // For paired list use the line to set proper lid
    if( nList == LIST_PAIRED ){
        (*pCurEntry)[ m_sListLang ] = rLine;
    }else
        (*pCurEntry)[ m_sListLang ] = rText;


  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120103/f863703c/attachment.pgp>


More information about the LibreOffice mailing list