diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 16:55:21 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 20:21:13 -0500 |
commit | 12343c15568dcc2c9209d8ca41fda2263122448f (patch) | |
tree | 3212a89c6cd8ea2e0aee7103aa9669bbb8a6f307 /sc/source/ui/dbgui/pvfundlg.cxx | |
parent | 99745dbcbb25b61437914c9782475d0b67a4b0bd (diff) | |
parent | ce6308e4fad2281241bf4ca78280eba29f744d43 (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Diffstat (limited to 'sc/source/ui/dbgui/pvfundlg.cxx')
-rw-r--r-- | sc/source/ui/dbgui/pvfundlg.cxx | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index f0da7090a2a4..403ae802fc1e 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -70,7 +70,7 @@ namespace { @return true = The passed string list contains an empty string entry. */ template< typename ListBoxType > -bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, USHORT nEmptyPos = LISTBOX_APPEND ) +bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, sal_uInt16 nEmptyPos = LISTBOX_APPEND ) { bool bEmpty = false; const OUString* pStr = rStrings.getConstArray(); @@ -91,7 +91,7 @@ bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, U } template< typename ListBoxType > -bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rMembers, USHORT nEmptyPos = LISTBOX_APPEND ) +bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rMembers, sal_uInt16 nEmptyPos = LISTBOX_APPEND ) { bool bEmpty = false; vector<ScDPLabelData::Member>::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end(); @@ -110,7 +110,7 @@ bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rM } /** This table represents the order of the strings in the resource string array. */ -static const USHORT spnFunctions[] = +static const sal_uInt16 spnFunctions[] = { PIVOT_FUNC_SUM, PIVOT_FUNC_COUNT, @@ -125,12 +125,12 @@ static const USHORT spnFunctions[] = PIVOT_FUNC_STD_VARP }; -const USHORT SC_BASEITEM_PREV_POS = 0; -const USHORT SC_BASEITEM_NEXT_POS = 1; -const USHORT SC_BASEITEM_USER_POS = 2; +const sal_uInt16 SC_BASEITEM_PREV_POS = 0; +const sal_uInt16 SC_BASEITEM_NEXT_POS = 1; +const sal_uInt16 SC_BASEITEM_USER_POS = 2; -const USHORT SC_SORTNAME_POS = 0; -const USHORT SC_SORTDATA_POS = 1; +const sal_uInt16 SC_SORTNAME_POS = 0; +const sal_uInt16 SC_SORTDATA_POS = 1; const long SC_SHOW_DEFAULT = 10; @@ -173,19 +173,19 @@ ScDPFunctionListBox::ScDPFunctionListBox( Window* pParent, const ResId& rResId ) FillFunctionNames(); } -void ScDPFunctionListBox::SetSelection( USHORT nFuncMask ) +void ScDPFunctionListBox::SetSelection( sal_uInt16 nFuncMask ) { if( (nFuncMask == PIVOT_FUNC_NONE) || (nFuncMask == PIVOT_FUNC_AUTO) ) SetNoSelection(); else - for( USHORT nEntry = 0, nCount = GetEntryCount(); nEntry < nCount; ++nEntry ) + for( sal_uInt16 nEntry = 0, nCount = GetEntryCount(); nEntry < nCount; ++nEntry ) SelectEntryPos( nEntry, (nFuncMask & spnFunctions[ nEntry ]) != 0 ); } -USHORT ScDPFunctionListBox::GetSelection() const +sal_uInt16 ScDPFunctionListBox::GetSelection() const { - USHORT nFuncMask = PIVOT_FUNC_NONE; - for( USHORT nSel = 0, nCount = GetSelectEntryCount(); nSel < nCount; ++nSel ) + sal_uInt16 nFuncMask = PIVOT_FUNC_NONE; + for( sal_uInt16 nSel = 0, nCount = GetSelectEntryCount(); nSel < nCount; ++nSel ) nFuncMask |= spnFunctions[ GetSelectEntryPos( nSel ) ]; return nFuncMask; } @@ -195,15 +195,15 @@ void ScDPFunctionListBox::FillFunctionNames() DBG_ASSERT( !GetEntryCount(), "ScDPFunctionListBox::FillFunctionNames - do not add texts to resource" ); Clear(); ResStringArray aArr( ScResId( SCSTR_DPFUNCLISTBOX ) ); - for( USHORT nIndex = 0, nCount = sal::static_int_cast<USHORT>(aArr.Count()); nIndex < nCount; ++nIndex ) + for( sal_uInt16 nIndex = 0, nCount = sal::static_int_cast<sal_uInt16>(aArr.Count()); nIndex < nCount; ++nIndex ) InsertEntry( aArr.GetString( nIndex ) ); } // ============================================================================ ScDPFunctionDlg::ScDPFunctionDlg( - Window* pParent, const ScDPLabelDataVec& rLabelVec, - const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData ) : + Window* pParent, const ScDPLabelDataVector& rLabelVec, + const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData ) : ModalDialog ( pParent, ScResId( RID_SCDLG_DPDATAFIELD ) ), maFlFunc ( this, ScResId( FL_FUNC ) ), maLbFunc ( this, ScResId( LB_FUNC ) ), @@ -228,7 +228,7 @@ ScDPFunctionDlg::ScDPFunctionDlg( Init( rLabelData, rFuncData ); } -USHORT ScDPFunctionDlg::GetFuncMask() const +sal_uInt16 ScDPFunctionDlg::GetFuncMask() const { return maLbFunc.GetSelection(); } @@ -240,7 +240,7 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const aRef.ReferenceType = maLbTypeWrp.GetControlValue(); aRef.ReferenceField = GetBaseFieldName(maLbBaseField.GetSelectEntry()); - USHORT nBaseItemPos = maLbBaseItem.GetSelectEntryPos(); + sal_uInt16 nBaseItemPos = maLbBaseItem.GetSelectEntryPos(); switch( nBaseItemPos ) { case SC_BASEITEM_PREV_POS: @@ -260,10 +260,10 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const return aRef; } -void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData ) +void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData ) { // list box - USHORT nFuncMask = (rFuncData.mnFuncMask == PIVOT_FUNC_NONE) ? PIVOT_FUNC_SUM : rFuncData.mnFuncMask; + sal_uInt16 nFuncMask = (rFuncData.mnFuncMask == PIVOT_FUNC_NONE) ? PIVOT_FUNC_SUM : rFuncData.mnFuncMask; maLbFunc.SetSelection( nFuncMask ); // field name @@ -325,8 +325,8 @@ void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData& } else { - USHORT nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS; - USHORT nPos = FindBaseItemPos( rFuncData.maFieldRef.ReferenceItemName, nStartPos ); + sal_uInt16 nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS; + sal_uInt16 nPos = FindBaseItemPos( rFuncData.maFieldRef.ReferenceItemName, nStartPos ); if( nPos >= maLbBaseItem.GetEntryCount() ) nPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS; maLbBaseItem.SelectEntryPos( nPos ); @@ -347,7 +347,7 @@ const OUString& ScDPFunctionDlg::GetBaseItemName(const OUString& rLayoutName) co return itr == maBaseItemNameMap.end() ? rLayoutName : itr->second; } -sal_uInt16 ScDPFunctionDlg::FindBaseItemPos( const String& rEntry, USHORT nStartPos ) const +sal_uInt16 ScDPFunctionDlg::FindBaseItemPos( const String& rEntry, sal_uInt16 nStartPos ) const { sal_uInt16 nPos = nStartPos; bool bFound = false; @@ -417,7 +417,7 @@ IMPL_LINK( ScDPFunctionDlg, SelectHdl, ListBox*, pLBox ) } // select base item - USHORT nItemPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS; + sal_uInt16 nItemPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS; maLbBaseItem.SelectEntryPos( nItemPos ); } return 0; @@ -432,7 +432,7 @@ IMPL_LINK( ScDPFunctionDlg, DblClickHdl, MultiListBox*, EMPTYARG ) // ============================================================================ ScDPSubtotalDlg::ScDPSubtotalDlg( Window* pParent, ScDPObject& rDPObj, - const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData, + const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData, const ScDPNameVec& rDataFields, bool bEnableLayout ) : ModalDialog ( pParent, ScResId( RID_SCDLG_PIVOTSUBT ) ), maFlSubt ( this, ScResId( FL_FUNC ) ), @@ -456,9 +456,9 @@ ScDPSubtotalDlg::ScDPSubtotalDlg( Window* pParent, ScDPObject& rDPObj, Init( rLabelData, rFuncData ); } -USHORT ScDPSubtotalDlg::GetFuncMask() const +sal_uInt16 ScDPSubtotalDlg::GetFuncMask() const { - USHORT nFuncMask = PIVOT_FUNC_NONE; + sal_uInt16 nFuncMask = PIVOT_FUNC_NONE; if( maRbAuto.IsChecked() ) nFuncMask = PIVOT_FUNC_AUTO; @@ -479,7 +479,7 @@ void ScDPSubtotalDlg::FillLabelData( ScDPLabelData& rLabelData ) const rLabelData.maShowInfo = maLabelData.maShowInfo; } -void ScDPSubtotalDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData ) +void ScDPSubtotalDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData ) { // field name maFtName.SetText(rLabelData.getDisplayName()); @@ -604,8 +604,8 @@ void ScDPSubtotalOptDlg::FillLabelData( ScDPLabelData& rLabelData ) const // *** HIDDEN ITEMS *** rLabelData.maMembers = maLabelData.maMembers; - ULONG nVisCount = maLbHide.GetEntryCount(); - for( USHORT nPos = 0; nPos < nVisCount; ++nPos ) + sal_uLong nVisCount = maLbHide.GetEntryCount(); + for( sal_uInt16 nPos = 0; nPos < nVisCount; ++nPos ) rLabelData.maMembers[nPos].mbVisible = !maLbHide.IsChecked(nPos); // *** HIERARCHY *** @@ -634,7 +634,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou if( maLbSortBy.GetEntryCount() > SC_SORTDATA_POS ) maLbSortBy.SetSeparatorPos( SC_SORTDATA_POS - 1 ); - USHORT nSortPos = SC_SORTNAME_POS; + sal_uInt16 nSortPos = SC_SORTNAME_POS; if( nSortMode == DataPilotFieldSortMode::DATA ) { nSortPos = FindListBoxEntry( maLbSortBy, maLabelData.maSortInfo.Field, SC_SORTDATA_POS ); @@ -704,7 +704,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou lclFillListBox( maLbHierarchy, maLabelData.maHiers ); sal_Int32 nHier = maLabelData.mnUsedHier; if( (nHier < 0) || (nHier >= maLabelData.maHiers.getLength()) ) nHier = 0; - maLbHierarchy.SelectEntryPos( static_cast< USHORT >( nHier ) ); + maLbHierarchy.SelectEntryPos( static_cast< sal_uInt16 >( nHier ) ); maLbHierarchy.SetSelectHdl( LINK( this, ScDPSubtotalOptDlg, SelectHdl ) ); } else @@ -720,7 +720,7 @@ void ScDPSubtotalOptDlg::InitHideListBox() lclFillListBox( maLbHide, maLabelData.maMembers ); size_t n = maLabelData.maMembers.size(); for (size_t i = 0; i < n; ++i) - maLbHide.CheckEntryPos(static_cast<USHORT>(i), !maLabelData.maMembers[i].mbVisible); + maLbHide.CheckEntryPos(static_cast<sal_uInt16>(i), !maLabelData.maMembers[i].mbVisible); bool bEnable = maLbHide.GetEntryCount() > 0; maFlHide.Enable( bEnable ); maLbHide.Enable( bEnable ); @@ -733,7 +733,7 @@ const OUString& ScDPSubtotalOptDlg::GetFieldName(const OUString& rLayoutName) co } sal_uInt16 ScDPSubtotalOptDlg::FindListBoxEntry( - const ListBox& rLBox, const String& rEntry, USHORT nStartPos ) const + const ListBox& rLBox, const String& rEntry, sal_uInt16 nStartPos ) const { sal_uInt16 nPos = nStartPos; bool bFound = false; @@ -786,7 +786,7 @@ IMPL_LINK( ScDPSubtotalOptDlg, SelectHdl, ListBox*, pLBox ) // ============================================================================ -ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHORT nOrient ) : +ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient ) : ModalDialog ( pParent, ScResId( RID_SCDLG_DPSHOWDETAIL ) ), maFtDims ( this, ScResId( FT_DIMS ) ), maLbDims ( this, ScResId( LB_DIMS ) ), @@ -802,7 +802,7 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHOR long nDimCount = rDPObj.GetDimCount(); for (long nDim=0; nDim<nDimCount; nDim++) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; sal_Int32 nDimFlags = 0; String aName = rDPObj.GetDimName( nDim, bIsDataLayout, &nDimFlags ); if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) && ScDPObject::IsOrientationAllowed( nOrient, nDimFlags ) ) @@ -843,7 +843,7 @@ String ScDPShowDetailDlg::GetDimensionName() const return aSelectedName; long nDim = itr->second; - BOOL bIsDataLayout = false; + sal_Bool bIsDataLayout = false; return mrDPObj.GetDimName(nDim, bIsDataLayout); } |