Kaydet (Commit) 74edd968 authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Noel Grandin

cppcheck: knownConditionTrueFalse

Change-Id: I7aa3e47db67072c06f4de4c219710325cfdb748e
Reviewed-on: https://gerrit.libreoffice.org/58613
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst f8046f99
...@@ -1342,7 +1342,6 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, Button*, pIB, void) ...@@ -1342,7 +1342,6 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, Button*, pIB, void)
} }
bool SvxNumberFormatTabPage::Click_Impl(PushButton* pIB) bool SvxNumberFormatTabPage::Click_Impl(PushButton* pIB)
{ {
bool bDeleted = false;
sal_uLong nReturn = 0; sal_uLong nReturn = 0;
const sal_uLong nReturnChanged = 0x1; // THE boolean return value const sal_uLong nReturnChanged = 0x1; // THE boolean return value
const sal_uLong nReturnAdded = 0x2; // temp: format added const sal_uLong nReturnAdded = 0x2; // temp: format added
...@@ -1391,7 +1390,6 @@ bool SvxNumberFormatTabPage::Click_Impl(PushButton* pIB) ...@@ -1391,7 +1390,6 @@ bool SvxNumberFormatTabPage::Click_Impl(PushButton* pIB)
nCatLbSelPos, nCatLbSelPos,
nFmtLbSelPos, nFmtLbSelPos,
a2EntryList); a2EntryList);
bDeleted = true;
a2EntryList.clear(); a2EntryList.clear();
m_pEdFormat->GrabFocus(); m_pEdFormat->GrabFocus();
m_pEdFormat->SetSelection( Selection( 0, SELECTION_MAX ) ); m_pEdFormat->SetSelection( Selection( 0, SELECTION_MAX ) );
...@@ -1449,36 +1447,34 @@ bool SvxNumberFormatTabPage::Click_Impl(PushButton* pIB) ...@@ -1449,36 +1447,34 @@ bool SvxNumberFormatTabPage::Click_Impl(PushButton* pIB)
nCatLbSelPos, nCatLbSelPos,
nFmtLbSelPos, nFmtLbSelPos,
aEntryList ); aEntryList );
bDeleted = true;
m_pEdComment->SetText(m_pLbCategory->GetEntry(1)); m_pEdComment->SetText(m_pLbCategory->GetEntry(1));
if ( bDeleted )
if( nFmtLbSelPos>=0 && static_cast<size_t>(nFmtLbSelPos)<aEntryList.size() )
{ {
if( nFmtLbSelPos>=0 && static_cast<size_t>(nFmtLbSelPos)<aEntryList.size() ) aFormat = aEntryList[nFmtLbSelPos];
{ }
aFormat = aEntryList[nFmtLbSelPos];
}
FillFormatListBox_Impl( aEntryList ); FillFormatListBox_Impl( aEntryList );
if ( nFmtLbSelPos != SELPOS_NONE ) if ( nFmtLbSelPos != SELPOS_NONE )
{ {
if(bOneAreaFlag) //@@ ??? if(bOneAreaFlag) //@@ ???
SetCategory(0); SetCategory(0);
else else
SetCategory(nCatLbSelPos ); SetCategory(nCatLbSelPos );
m_pLbFormat->SelectEntryPos( static_cast<sal_uInt16>(nFmtLbSelPos) ); m_pLbFormat->SelectEntryPos( static_cast<sal_uInt16>(nFmtLbSelPos) );
m_pEdFormat->SetText( aFormat ); m_pEdFormat->SetText( aFormat );
ChangePreviewText( static_cast<sal_uInt16>(nFmtLbSelPos) ); ChangePreviewText( static_cast<sal_uInt16>(nFmtLbSelPos) );
}
else
{
// set to "all/standard"
SetCategory(0);
SelFormatHdl_Impl(m_pLbCategory);
}
} }
else
{
// set to "all/standard"
SetCategory(0);
SelFormatHdl_Impl(m_pLbCategory);
}
EditHdl_Impl(m_pEdFormat); EditHdl_Impl(m_pEdFormat);
aEntryList.clear(); aEntryList.clear();
......
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