sc/source/ui/dbgui/pvfundlg.cxx | 28 ++++++++++++++-------------- sc/source/ui/inc/pvfundlg.hxx | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-)
New commits: commit 425c0b91026ea4e319ee195e686befcc98de9e60 Author: Eike Rathke <er...@redhat.com> Date: Wed Mar 5 19:05:24 2014 +0100 more list type correctness Change-Id: I97cc37c05782b6ab2cd7b8b63a4315ba2386f1ef diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index 2f2910b..9bc0b1c 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -176,14 +176,14 @@ void ScDPFunctionListBox::SetSelection( sal_uInt16 nFuncMask ) if( (nFuncMask == PIVOT_FUNC_NONE) || (nFuncMask == PIVOT_FUNC_AUTO) ) SetNoSelection(); else - for( sal_uInt16 nEntry = 0, nCount = GetEntryCount(); nEntry < nCount; ++nEntry ) + for( sal_Int32 nEntry = 0, nCount = GetEntryCount(); nEntry < nCount; ++nEntry ) SelectEntryPos( nEntry, (nFuncMask & spnFunctions[ nEntry ]) != 0 ); } sal_uInt16 ScDPFunctionListBox::GetSelection() const { sal_uInt16 nFuncMask = PIVOT_FUNC_NONE; - for( sal_uInt16 nSel = 0, nCount = GetSelectEntryCount(); nSel < nCount; ++nSel ) + for( sal_Int32 nSel = 0, nCount = GetSelectEntryCount(); nSel < nCount; ++nSel ) nFuncMask |= spnFunctions[ GetSelectEntryPos( nSel ) ]; return nFuncMask; } @@ -233,7 +233,7 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const aRef.ReferenceType = mxLbTypeWrp->GetControlValue(); aRef.ReferenceField = GetBaseFieldName(mpLbBaseField->GetSelectEntry()); - sal_uInt16 nBaseItemPos = mpLbBaseItem->GetSelectEntryPos(); + sal_Int32 nBaseItemPos = mpLbBaseItem->GetSelectEntryPos(); switch( nBaseItemPos ) { case SC_BASEITEM_PREV_POS: @@ -309,8 +309,8 @@ void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncDa } else { - sal_uInt16 nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS; - sal_uInt16 nPos = FindBaseItemPos( rFuncData.maFieldRef.ReferenceItemName, nStartPos ); + sal_Int32 nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS; + sal_Int32 nPos = FindBaseItemPos( rFuncData.maFieldRef.ReferenceItemName, nStartPos ); if( nPos >= mpLbBaseItem->GetEntryCount() ) nPos = (mpLbBaseItem->GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS; mpLbBaseItem->SelectEntryPos( nPos ); @@ -331,9 +331,9 @@ const OUString& ScDPFunctionDlg::GetBaseItemName(const OUString& rLayoutName) co return itr == maBaseItemNameMap.end() ? rLayoutName : itr->second; } -sal_uInt16 ScDPFunctionDlg::FindBaseItemPos( const OUString& rEntry, sal_uInt16 nStartPos ) const +sal_Int32 ScDPFunctionDlg::FindBaseItemPos( const OUString& rEntry, sal_Int32 nStartPos ) const { - sal_uInt16 nPos = nStartPos; + sal_Int32 nPos = nStartPos; bool bFound = false; while (nPos < mpLbBaseItem->GetEntryCount()) { @@ -625,7 +625,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou if( m_pLbSortBy->GetEntryCount() > SC_SORTDATA_POS ) m_pLbSortBy->SetSeparatorPos( SC_SORTDATA_POS - 1 ); - sal_uInt16 nSortPos = SC_SORTNAME_POS; + sal_Int32 nSortPos = SC_SORTNAME_POS; if( nSortMode == DataPilotFieldSortMode::DATA ) { nSortPos = FindListBoxEntry( *m_pLbSortBy, maLabelData.maSortInfo.Field, SC_SORTDATA_POS ); @@ -691,7 +691,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou lclFillListBox( *m_pLbHierarchy, maLabelData.maHiers ); sal_Int32 nHier = maLabelData.mnUsedHier; if( (nHier < 0) || (nHier >= maLabelData.maHiers.getLength()) ) nHier = 0; - m_pLbHierarchy->SelectEntryPos( static_cast< sal_uInt16 >( nHier ) ); + m_pLbHierarchy->SelectEntryPos( static_cast< sal_Int32 >( nHier ) ); m_pLbHierarchy->SetSelectHdl( LINK( this, ScDPSubtotalOptDlg, SelectHdl ) ); } else @@ -706,8 +706,8 @@ void ScDPSubtotalOptDlg::InitHideListBox() m_pLbHide->Clear(); lclFillListBox( *m_pLbHide, maLabelData.maMembers ); size_t n = maLabelData.maMembers.size(); - for (size_t i = 0; i < n; ++i) - m_pLbHide->CheckEntryPos(static_cast<sal_uInt16>(i), !maLabelData.maMembers[i].mbVisible); + for (sal_uLong i = 0; i < n; ++i) + m_pLbHide->CheckEntryPos(i, !maLabelData.maMembers[i].mbVisible); bool bEnable = m_pLbHide->GetEntryCount() > 0; m_pHideFrame->Enable(bEnable); } @@ -718,10 +718,10 @@ ScDPName ScDPSubtotalOptDlg::GetFieldName(const OUString& rLayoutName) const return itr == maDataFieldNameMap.end() ? ScDPName() : itr->second; } -sal_uInt16 ScDPSubtotalOptDlg::FindListBoxEntry( - const ListBox& rLBox, const OUString& rEntry, sal_uInt16 nStartPos ) const +sal_Int32 ScDPSubtotalOptDlg::FindListBoxEntry( + const ListBox& rLBox, const OUString& rEntry, sal_Int32 nStartPos ) const { - sal_uInt16 nPos = nStartPos; + sal_Int32 nPos = nStartPos; bool bFound = false; while (nPos < rLBox.GetEntryCount()) { diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx index 6bdf14b..22739e5 100644 --- a/sc/source/ui/inc/pvfundlg.hxx +++ b/sc/source/ui/inc/pvfundlg.hxx @@ -79,7 +79,7 @@ private: const OUString& GetBaseItemName(const OUString& rLayoutName) const; /** Searches for a listbox entry, starts search at specified position. */ - sal_uInt16 FindBaseItemPos( const OUString& rEntry, sal_uInt16 nStartPos ) const; + sal_Int32 FindBaseItemPos( const OUString& rEntry, sal_Int32 nStartPos ) const; DECL_LINK( SelectHdl, ListBox* ); DECL_LINK( DblClickHdl, void* ); @@ -158,7 +158,7 @@ private: ScDPName GetFieldName(const OUString& rLayoutName) const; /** Searches for a listbox entry, starts search at specified position. */ - sal_uInt16 FindListBoxEntry( const ListBox& rLBox, const OUString& rEntry, sal_uInt16 nStartPos ) const; + sal_Int32 FindListBoxEntry( const ListBox& rLBox, const OUString& rEntry, sal_Int32 nStartPos ) const; DECL_LINK( RadioClickHdl, RadioButton* ); DECL_LINK( CheckHdl, CheckBox* ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits