tdf#120703 PVS: V547 Expression is always true/false

Change-Id: I8217b1a0b6ccc29052257d54ba7844c0970ad9a4
Reviewed-on: https://gerrit.libreoffice.org/62859
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index c6b01cd..bc2510f 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1785,16 +1785,13 @@
        SupportHdl( m_pAsianSupportCB );
    }

    const NfCurrencyEntry* pCurr = &SvNumberFormatter::GetCurrencyEntry(
    const NfCurrencyEntry& rCurr = SvNumberFormatter::GetCurrencyEntry(
            (eLang == LANGUAGE_USER_SYSTEM_CONFIG) ? MsLangId::getSystemLanguage() : eLang);
    sal_Int32 nPos = m_pCurrencyLB->GetEntryPos( nullptr );
    if (pCurr)
    {
        // Update the "Default ..." currency.
        m_pCurrencyLB->RemoveEntry( nPos );
        OUString aDefaultCurr = m_sSystemDefaultString + " - " + pCurr->GetBankSymbol();
        nPos = m_pCurrencyLB->InsertEntry( aDefaultCurr );
    }
    // Update the "Default ..." currency.
    m_pCurrencyLB->RemoveEntry(nPos);
    OUString aDefaultCurr = m_sSystemDefaultString + " - " + rCurr.GetBankSymbol();
    nPos = m_pCurrencyLB->InsertEntry(aDefaultCurr);
    m_pCurrencyLB->SelectEntryPos( nPos );

    // obtain corresponding locale data
diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
index 8f9ac22..c36fc62 100644
--- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
+++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
@@ -78,7 +78,7 @@
    m_lRefs(1),
    m_pContentReader(nullptr),
    m_pMetaInfoReader(nullptr),
    m_eState(FilteringContent),
    m_eState(FilterState::FilteringContent),
    m_ulUnicodeBufferLen(0),
    m_ulUnicodeCharsRead(0),
    m_ulPropertyNum(0),
@@ -263,14 +263,14 @@
        if ( m_fContents )
        {
            m_fEof = FALSE;
            m_eState = FilteringContent;
            m_eState = FilterState::FilteringContent;
            m_ulUnicodeCharsRead = 0;
            m_ChunkPosition = 0;
        }
        else
        {
            m_fEof = TRUE;
            m_eState = FilteringProperty;
            m_eState = FilterState::FilteringProperty;
        }
        m_ulChunkID = 1;
    }
@@ -307,7 +307,7 @@
    {
        switch ( m_eState )
        {
        case FilteringContent:
        case FilterState::FilteringContent:
        {
            if( m_ChunkPosition == m_pContentReader ->getChunkBuffer().size() )
            {
@@ -317,7 +317,7 @@

            if ( !m_fContents || m_fEof )
            {
                m_eState = FilteringProperty;
                m_eState = FilterState::FilteringProperty;
                continue;
            }
            m_pwsBuffer = m_pContentReader -> getChunkBuffer()[m_ChunkPosition].second;
@@ -339,7 +339,7 @@
            m_ChunkPosition++;
            return S_OK;
        }
        case FilteringProperty:
        case FilterState::FilteringProperty:
        {
            if ( m_cAttributes ==  0 )
                return FILTER_E_END_OF_CHUNKS;
@@ -377,8 +377,6 @@
                return S_OK;
            }
        }
        default:
            return E_FAIL;
        }//switch(...)
    }//for(;;)
}
@@ -401,9 +399,9 @@
{
    switch ( m_eState )
    {
    case FilteringProperty:
    case FilterState::FilteringProperty:
        return FILTER_E_NO_TEXT;
    case FilteringContent:
    case FilterState::FilteringContent:
    {
        if ( !m_fContents || 0 == m_ulUnicodeBufferLen )
        {
@@ -425,9 +423,8 @@
        }
        return S_OK;
    }
    default:
        return E_FAIL;
    }
    return E_FAIL; // Should not happen!
}
//M-------------------------------------------------------------------------
//  Method:     GetMetaInfoNameFromPropertyId
@@ -463,9 +460,9 @@

SCODE STDMETHODCALLTYPE COooFilter::GetValue(PROPVARIANT ** ppPropValue)
{
    if (m_eState == FilteringContent)
    if (m_eState == FilterState::FilteringContent)
        return FILTER_E_NO_VALUES;
    else if (m_eState == FilteringProperty)
    else // m_eState == FilteringProperty
    {
        if ( m_cAttributes == 0 || ( m_ulCurrentPropertyNum == m_ulPropertyNum ) )
            return FILTER_E_NO_MORE_VALUES;
@@ -489,8 +486,6 @@
        m_ulCurrentPropertyNum = m_ulPropertyNum;
        return S_OK;
    }
    else
        return E_FAIL;
}
//M-------------------------------------------------------------------------
//  Method:     COooFilter::BindRegion          (IFilter::BindRegion)
diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx
index f63b86f..6a793d7 100644
--- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx
+++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx
@@ -64,7 +64,7 @@
const CLSID CLSID_FILTER_HANDLER =
{0x7bc0e710, 0x5703, 0x45be, {0xa2, 0x9d, 0x5d, 0x46, 0xd8, 0xb3, 0x92, 0x62}};

enum FilterState
enum class FilterState
{
    FilteringContent,                           // Filtering the content property
    FilteringProperty                           // Filtering the pseudo property