summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-03-01 03:13:28 +0100
committerEike Rathke <erack@redhat.com>2014-03-05 07:31:19 -0600
commit68ec95b3f80408ae50897b043eed69a07d084df9 (patch)
tree5d32076e843fae44f28e3c8d9dbbacf7648fecbc /svtools
parentc3403ac888c2e62edaf8befe7982f5f8cc95c16f (diff)
made ListBox handle more than 64k elements, fdo#61520 related
ListBox and related now handle up to sal_Int32 elements correctly. sal_Int32 instead of sal_Size or size_t because of UNO and a11y API. Also disentangled some of the mess of SvTreeList and other containers regarding sal_uInt16, sal_uLong, long, size_t, ... type mixtures. Change-Id: Idb6e0ae689dc5bc2cf980721972b57b0261e688a Reviewed-on: https://gerrit.libreoffice.org/8460 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx28
-rw-r--r--svtools/source/contnr/treelist.cxx8
-rw-r--r--svtools/source/contnr/treelistbox.cxx12
-rw-r--r--svtools/source/control/ctrlbox.cxx77
-rw-r--r--svtools/source/control/toolbarmenu.cxx14
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx8
-rw-r--r--svtools/source/uno/treecontrolpeer.hxx2
7 files changed, 75 insertions, 74 deletions
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index 09634dfcfb3d..20f6cfc6fcb7 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -64,13 +64,13 @@ namespace svt
(!pEvt->GetKeyCode().IsShift() && pEvt->GetKeyCode().IsMod1()))
{
// select next resp. previous entry
- int nPos = GetEntryPos(GetText());
- nPos = nPos + (rKey.GetCode() == KEY_DOWN ? 1 : -1);
- if (nPos < 0)
- nPos = 0;
- if (nPos >= GetEntryCount())
- nPos = GetEntryCount() - 1;
- SetText(GetEntry(sal::static_int_cast< sal_uInt16 >(nPos)));
+ sal_Int32 nPos = GetEntryPos(GetText());
+ int nDir = (rKey.GetCode() == KEY_DOWN ? 1 : -1);
+ if (!((nPos == 0 && nDir == -1) || (nPos >= GetEntryCount() && nDir == 1)))
+ {
+ nPos += nDir;
+ SetText(GetEntry(nPos));
+ }
return true;
}
}
@@ -171,13 +171,13 @@ namespace svt
(!pEvt->GetKeyCode().IsShift() && pEvt->GetKeyCode().IsMod1()))
{
// select next resp. previous entry
- int nPos = GetSelectEntryPos();
- nPos = nPos + (rKey.GetCode() == KEY_DOWN ? 1 : -1);
- if (nPos < 0)
- nPos = 0;
- if (nPos >= GetEntryCount())
- nPos = GetEntryCount() - 1;
- SelectEntryPos(sal::static_int_cast< sal_uInt16 >(nPos));
+ sal_Int32 nPos = GetSelectEntryPos();
+ int nDir = (rKey.GetCode() == KEY_DOWN ? 1 : -1);
+ if (!((nPos == 0 && nDir == -1) || (nPos >= GetEntryCount() && nDir == 1)))
+ {
+ nPos += nDir;
+ SelectEntryPos(nPos);
+ }
Select(); // for calling Modify
return true;
}
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index e6f3b110eaa2..94dae1cf5921 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -898,7 +898,7 @@ sal_uLong SvTreeList::Insert( SvTreeListEntry* pEntry,SvTreeListEntry* pParent,s
rList.push_back(pEntry);
nEntryCount++;
- if (nPos != ULONG_MAX && (nPos != (rList.size()-1)))
+ if (nPos != TREELIST_APPEND && (nPos != (rList.size()-1)))
SetListPositions(rList);
else
pEntry->nListPos = rList.size()-1;
@@ -1525,7 +1525,7 @@ void SvTreeList::ResortChildren( SvTreeListEntry* pParent )
for (; it != itEnd; ++it)
{
SvTreeListEntry* p = *it;
- sal_uLong nListPos = ULONG_MAX;
+ sal_uLong nListPos = TREELIST_APPEND;
GetInsertionPos(p, pParent, nListPos);
if (nListPos < pParent->maChildren.size())
{
@@ -1550,7 +1550,7 @@ void SvTreeList::GetInsertionPos( SvTreeListEntry* pEntry, SvTreeListEntry* pPar
if( eSortMode == SortNone )
return;
- rPos = ULONG_MAX;
+ rPos = TREELIST_ENTRY_NOTFOUND;
const SvTreeListEntries& rChildList = GetChildList(pParent);
if (!rChildList.empty())
@@ -1581,7 +1581,7 @@ void SvTreeList::GetInsertionPos( SvTreeListEntry* pEntry, SvTreeListEntry* pPar
if( nCompare != 0 )
{
if (i > static_cast<long>(rChildList.size()-1)) // not found, end of list
- rPos = ULONG_MAX;
+ rPos = TREELIST_ENTRY_NOTFOUND;
else
rPos = i; // not found, middle of list
}
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 88829aee26f8..c65bc33daf65 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -598,7 +598,7 @@ sal_Bool SvTreeListBox::NotifyMoving(
if( IsExpanded(pTarget))
rNewChildPos = 0;
else
- rNewChildPos = LIST_APPEND;
+ rNewChildPos = TREELIST_APPEND;
}
return sal_True;
}
@@ -654,7 +654,7 @@ sal_Bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry*
{
pSourceEntry = *it;
SvTreeListEntry* pNewParent = 0;
- sal_uLong nInsertionPos = ULONG_MAX;
+ sal_uLong nInsertionPos = TREELIST_APPEND;
sal_Bool bOk=NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
if ( bOk )
{
@@ -711,12 +711,12 @@ sal_Bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSourc
pSourceEntry = *it;
SvTreeListEntry* pNewParent = 0;
- sal_uLong nInsertionPos = ULONG_MAX;
+ sal_uLong nInsertionPos = TREELIST_APPEND;
sal_Bool bOk = NotifyMoving(pTarget,pSourceEntry,pNewParent,nInsertionPos);
sal_Bool bCopyOk = bOk;
if ( !bOk && bAllowCopyFallback )
{
- nInsertionPos = LIST_APPEND;
+ nInsertionPos = TREELIST_APPEND;
bCopyOk = NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
}
@@ -2183,7 +2183,7 @@ void SvTreeListBox::KeyInput( const KeyEvent& rKEvt )
void SvTreeListBox::RequestingChildren( SvTreeListEntry* pParent )
{
if( !pParent->HasChildren() )
- InsertEntry( OUString("<dummy>"), pParent, sal_False, LIST_APPEND );
+ InsertEntry( OUString("<dummy>"), pParent, sal_False, TREELIST_APPEND );
}
void SvTreeListBox::GetFocus()
@@ -3560,7 +3560,7 @@ void SvTreeListBox::RemoveParentKeepChildren( SvTreeListEntry* pParent )
SvTreeListEntry* pChild = FirstChild( pParent );
while( pChild )
{
- pModel->Move( pChild, pNewParent, LIST_APPEND );
+ pModel->Move( pChild, pNewParent, TREELIST_APPEND );
pChild = FirstChild( pParent );
}
}
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index ea1cdee711b0..7508659a58e9 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -141,13 +141,13 @@ ColorListBox::~ColorListBox()
-sal_uInt16 ColorListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
+sal_Int32 ColorListBox::InsertEntry( const OUString& rStr, sal_Int32 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR )
{
ImplColorListData* pData = new ImplColorListData;
- if ( nPos < pColorList->size() )
+ if ( static_cast<size_t>(nPos) < pColorList->size() )
{
ImpColorList::iterator it = pColorList->begin();
::std::advance( it, nPos );
@@ -164,14 +164,14 @@ sal_uInt16 ColorListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
-sal_uInt16 ColorListBox::InsertEntry( const Color& rColor, const OUString& rStr,
- sal_uInt16 nPos )
+sal_Int32 ColorListBox::InsertEntry( const Color& rColor, const OUString& rStr,
+ sal_Int32 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR )
{
ImplColorListData* pData = new ImplColorListData( rColor );
- if ( nPos < pColorList->size() )
+ if ( static_cast<size_t>(nPos) < pColorList->size() )
{
ImpColorList::iterator it = pColorList->begin();
::std::advance( it, nPos );
@@ -196,10 +196,10 @@ void ColorListBox::InsertAutomaticEntryColor(const Color &rColor)
-void ColorListBox::RemoveEntry( sal_uInt16 nPos )
+void ColorListBox::RemoveEntry( sal_Int32 nPos )
{
ListBox::RemoveEntry( nPos );
- if ( nPos < pColorList->size() )
+ if ( 0 <= nPos && static_cast<size_t>(nPos) < pColorList->size() )
{
ImpColorList::iterator it = pColorList->begin();
::std::advance( it, nPos );
@@ -228,10 +228,10 @@ void ColorListBox::CopyEntries( const ColorListBox& rBox )
for ( size_t n = 0; n < nCount; n++ )
{
ImplColorListData* pData = (*rBox.pColorList)[ n ];
- sal_uInt16 nPos = InsertEntry( rBox.GetEntry( n ), LISTBOX_APPEND );
+ sal_Int32 nPos = InsertEntry( rBox.GetEntry( n ), LISTBOX_APPEND );
if ( nPos != LISTBOX_ERROR )
{
- if ( nPos < pColorList->size() )
+ if ( static_cast<size_t>(nPos) < pColorList->size() )
{
ImpColorList::iterator it = pColorList->begin();
::std::advance( it, nPos );
@@ -247,9 +247,9 @@ void ColorListBox::CopyEntries( const ColorListBox& rBox )
-sal_uInt16 ColorListBox::GetEntryPos( const Color& rColor ) const
+sal_Int32 ColorListBox::GetEntryPos( const Color& rColor ) const
{
- for( sal_uInt16 n = (sal_uInt16) pColorList->size(); n; )
+ for( sal_Int32 n = (sal_Int32) pColorList->size(); n; )
{
ImplColorListData* pData = (*pColorList)[ --n ];
if ( pData->bColor && ( pData->aColor == rColor ) )
@@ -260,10 +260,11 @@ sal_uInt16 ColorListBox::GetEntryPos( const Color& rColor ) const
-Color ColorListBox::GetEntryColor( sal_uInt16 nPos ) const
+Color ColorListBox::GetEntryColor( sal_Int32 nPos ) const
{
Color aColor;
- ImplColorListData* pData = ( nPos < pColorList->size() ) ? (*pColorList)[ nPos ] : NULL;
+ ImplColorListData* pData = ( 0 <= nPos && static_cast<size_t>(nPos) < pColorList->size() ) ?
+ (*pColorList)[ nPos ] : NULL;
if ( pData && pData->bColor )
aColor = pData->aColor;
return aColor;
@@ -528,10 +529,10 @@ Color ImpLineListData::GetColorDist( const Color& rMain, const Color& rDefault )
return ( *m_pColorDistFn )( rMain, rDefault );
}
-sal_uInt16 LineListBox::GetSelectEntryStyle( sal_uInt16 nSelIndex ) const
+sal_uInt16 LineListBox::GetSelectEntryStyle( sal_Int32 nSelIndex ) const
{
sal_uInt16 nStyle = table::BorderLineStyle::SOLID;
- sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
+ sal_Int32 nPos = GetSelectEntryPos( nSelIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
if (!m_sNone.isEmpty())
@@ -788,22 +789,22 @@ LineListBox::~LineListBox()
delete pLineList;
}
-sal_uInt16 LineListBox::GetStylePos( sal_uInt16 nListPos, long nWidth )
+sal_Int32 LineListBox::GetStylePos( sal_Int32 nListPos, long nWidth )
{
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
if (!m_sNone.isEmpty())
nListPos--;
- sal_uInt16 i = 0;
- sal_uInt16 n = 0;
- sal_uInt16 nCount = pLineList->size();
+ sal_Int32 n = 0;
+ size_t i = 0;
+ size_t nCount = pLineList->size();
while ( nPos == LISTBOX_ENTRY_NOTFOUND && i < nCount )
{
ImpLineListData* pData = (*pLineList)[ i ];
if ( pData && pData->GetMinWidth() <= nWidth )
{
if ( nListPos == n )
- nPos = i;
+ nPos = static_cast<sal_Int32>(i);
n++;
}
i++;
@@ -815,14 +816,14 @@ sal_uInt16 LineListBox::GetStylePos( sal_uInt16 nListPos, long nWidth )
void LineListBox::SelectEntry( sal_uInt16 nStyle, sal_Bool bSelect )
{
- sal_uInt16 nPos = GetEntryPos( nStyle );
+ sal_Int32 nPos = GetEntryPos( nStyle );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
ListBox::SelectEntryPos( nPos, bSelect );
}
-sal_uInt16 LineListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
+sal_Int32 LineListBox::InsertEntry( const OUString& rStr, sal_Int32 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR ) {
@@ -850,11 +851,11 @@ void LineListBox::InsertEntry(
-void LineListBox::RemoveEntry( sal_uInt16 nPos )
+void LineListBox::RemoveEntry( sal_Int32 nPos )
{
ListBox::RemoveEntry( nPos );
- if ( nPos < pLineList->size() ) {
+ if ( 0 <= nPos && nPos < pLineList->size() ) {
ImpLineList::iterator it = pLineList->begin();
::std::advance( it, nPos );
if ( *it ) delete *it;
@@ -878,7 +879,7 @@ void LineListBox::Clear()
-sal_uInt16 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
+sal_Int32 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
{
for ( size_t i = 0, n = pLineList->size(); i < n; ++i ) {
ImpLineListData* pData = (*pLineList)[ i ];
@@ -889,7 +890,7 @@ sal_uInt16 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
size_t nPos = i;
if (!m_sNone.isEmpty())
nPos ++;
- return (sal_uInt16)nPos;
+ return (sal_Int32)nPos;
}
}
}
@@ -898,9 +899,9 @@ sal_uInt16 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
-sal_uInt16 LineListBox::GetEntryStyle( sal_uInt16 nPos ) const
+sal_uInt16 LineListBox::GetEntryStyle( sal_Int32 nPos ) const
{
- ImpLineListData* pData = (nPos < pLineList->size()) ? (*pLineList)[ nPos ] : NULL;
+ ImpLineListData* pData = (0 <= nPos && nPos < pLineList->size()) ? (*pLineList)[ nPos ] : NULL;
return ( pData ) ? pData->GetStyle() : table::BorderLineStyle::NONE;
}
@@ -925,8 +926,8 @@ void LineListBox::UpdateEntries( long nOldWidth )
UpdatePaintLineColor( );
- sal_uInt16 nSelEntry = GetSelectEntryPos();
- sal_uInt16 nTypePos = GetStylePos( nSelEntry, nOldWidth );
+ sal_Int32 nSelEntry = GetSelectEntryPos();
+ sal_Int32 nTypePos = GetStylePos( nSelEntry, nOldWidth );
// Remove the old entries
while ( GetEntryCount( ) > 0 )
@@ -966,7 +967,7 @@ void LineListBox::UpdateEntries( long nOldWidth )
-Color LineListBox::GetColorLine1( sal_uInt16 nPos )
+Color LineListBox::GetColorLine1( sal_Int32 nPos )
{
Color rResult = GetPaintColor( );
@@ -978,7 +979,7 @@ Color LineListBox::GetColorLine1( sal_uInt16 nPos )
return rResult;
}
-Color LineListBox::GetColorLine2( sal_uInt16 nPos )
+Color LineListBox::GetColorLine2( sal_Int32 nPos )
{
Color rResult = GetPaintColor( );
@@ -990,7 +991,7 @@ Color LineListBox::GetColorLine2( sal_uInt16 nPos )
return rResult;
}
-Color LineListBox::GetColorDist( sal_uInt16 nPos )
+Color LineListBox::GetColorDist( sal_Int32 nPos )
{
Color rResult = GetSettings().GetStyleSettings().GetFieldColor();
@@ -1476,12 +1477,12 @@ void FontStyleBox::Modify()
CharClass aChrCls( ::comphelper::getProcessComponentContext(),
GetSettings().GetLanguageTag() );
OUString aStr = GetText();
- sal_uInt16 nEntryCount = GetEntryCount();
+ sal_Int32 nEntryCount = GetEntryCount();
if ( GetEntryPos( aStr ) == COMBOBOX_ENTRY_NOTFOUND )
{
aStr = aChrCls.uppercase(aStr);
- for ( sal_uInt16 i = 0; i < nEntryCount; i++ )
+ for ( sal_Int32 i = 0; i < nEntryCount; i++ )
{
OUString aEntryText = aChrCls.uppercase(GetEntry(i));
@@ -1504,7 +1505,7 @@ void FontStyleBox::Fill( const OUString& rName, const FontList* pList )
// else aLastStyle will overwritten
// store prior selection position and clear box
OUString aOldText = GetText();
- sal_uInt16 nPos = GetEntryPos( aOldText );
+ sal_Int32 nPos = GetEntryPos( aOldText );
Clear();
// does a font with this name already exist?
@@ -1797,7 +1798,7 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList )
OUString aStr = GetText();
Clear();
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
if ( !aFontSizeNames.IsEmpty() )
{
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 858bc77cee85..5f91e2e45809 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -1075,11 +1075,11 @@ static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLa
ValueSet* pValueSet = dynamic_cast< ValueSet* >( pControl );
if( pValueSet )
{
- sal_uInt16 nItemPos = pValueSet->GetItemPos( pValueSet->GetSelectItemId() );
+ size_t nItemPos = pValueSet->GetItemPos( pValueSet->GetSelectItemId() );
if( nItemPos != VALUESET_ITEM_NOTFOUND )
{
const sal_uInt16 nColCount = pValueSet->GetColCount();
- const sal_uInt16 nLine = nItemPos / nColCount;
+ const size_t nLine = nItemPos / nColCount;
nLastColumn = nItemPos - (nLine * nColCount);
@@ -1089,7 +1089,7 @@ static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLa
}
else
{
- const sal_uInt16 nLineCount = (pValueSet->GetItemCount() + nColCount - 1) / nColCount;
+ const size_t nLineCount = (pValueSet->GetItemCount() + nColCount - 1) / nColCount;
return (nLine+1) < nLineCount;
}
}
@@ -1183,19 +1183,19 @@ void ToolbarMenu_Impl::implHighlightControl( sal_uInt16 nCode, Control* pControl
ValueSet* pValueSet = dynamic_cast< ValueSet* >( pControl );
if( pValueSet )
{
- const sal_uInt16 nItemCount = pValueSet->GetItemCount();
- sal_uInt16 nItemPos = VALUESET_ITEM_NOTFOUND;
+ const size_t nItemCount = pValueSet->GetItemCount();
+ size_t nItemPos = VALUESET_ITEM_NOTFOUND;
switch( nCode )
{
case KEY_UP:
{
const sal_uInt16 nColCount = pValueSet->GetColCount();
const sal_uInt16 nLastLine = nItemCount / nColCount;
- nItemPos = std::min( ((nLastLine-1) * nColCount) + mnLastColumn, nItemCount-1 );
+ nItemPos = std::min( static_cast<size_t>(((nLastLine-1) * nColCount) + mnLastColumn), nItemCount-1 );
break;
}
case KEY_DOWN:
- nItemPos = std::min( mnLastColumn, nItemCount-1 );
+ nItemPos = std::min( static_cast<size_t>(mnLastColumn), nItemCount-1 );
break;
case KEY_END:
nItemPos = nItemCount -1;
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index c5070a68476f..b2c282bca892 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -87,7 +87,7 @@ public:
UnoTreeListBoxImpl( TreeControlPeer* pPeer, Window* pParent, WinBits nWinStyle );
~UnoTreeListBoxImpl();
- sal_uInt32 insert( SvTreeListEntry* pEntry,SvTreeListEntry* pParent,sal_uLong nPos=LIST_APPEND );
+ sal_uInt32 insert( SvTreeListEntry* pEntry,SvTreeListEntry* pParent,sal_uLong nPos=TREELIST_APPEND );
virtual void RequestingChildren( SvTreeListEntry* pParent );
@@ -230,7 +230,7 @@ void TreeControlPeer::SetWindow( Window* pWindow )
-UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos /* = LIST_APPEND */ )
+UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos /* = TREELIST_APPEND */ )
{
UnoTreeListEntry* pEntry = 0;
if( mpTreeImpl )
@@ -437,7 +437,7 @@ void TreeControlPeer::addNode( UnoTreeListBoxImpl& rTree, const Reference< XTree
{
if( xNode.is() )
{
- UnoTreeListEntry* pEntry = createEntry( xNode, pParentEntry, LIST_APPEND );
+ UnoTreeListEntry* pEntry = createEntry( xNode, pParentEntry, TREELIST_APPEND );
const sal_Int32 nChildCount = xNode->getChildCount();
for( sal_Int32 nChild = 0; nChild < nChildCount; nChild++ )
addNode( rTree, xNode->getChildAt( nChild ), pEntry );
@@ -1073,7 +1073,7 @@ void TreeControlPeer::updateNode( UnoTreeListBoxImpl& rTree, const Reference< XT
{
Reference< XTreeNode > xParentNode( xNode->getParent() );
UnoTreeListEntry* pParentEntry = 0;
- sal_uLong nChild = LIST_APPEND;
+ sal_uLong nChild = TREELIST_APPEND;
if( xParentNode.is() )
{
diff --git a/svtools/source/uno/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx
index a96593103d87..8657cb125503 100644
--- a/svtools/source/uno/treecontrolpeer.hxx
+++ b/svtools/source/uno/treecontrolpeer.hxx
@@ -127,7 +127,7 @@ private:
void fillTree( UnoTreeListBoxImpl& rTree, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeDataModel >& xDataModel );
void addNode( UnoTreeListBoxImpl& rTree, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParentEntry );
- UnoTreeListEntry* createEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos = LIST_APPEND );
+ UnoTreeListEntry* createEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos = TREELIST_APPEND );
bool updateEntry( UnoTreeListEntry* pEntry );
void updateTree( const ::com::sun::star::awt::tree::TreeDataModelEvent& rEvent, bool bRecursive );