Kaydet (Commit) d47508e0 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Move SvListEntry and SvLBoxEntry into own files.

They will be merged later.

Change-Id: I8529f9ee442fce10dc63e44d7cb26bdb2f3b8eb7
üst dad00b3c
...@@ -105,6 +105,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ ...@@ -105,6 +105,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/contnr/templwin \ svtools/source/contnr/templwin \
svtools/source/contnr/treelist \ svtools/source/contnr/treelist \
svtools/source/contnr/treelistbox \ svtools/source/contnr/treelistbox \
svtools/source/contnr/treelistentry \
svtools/source/control/asynclink \ svtools/source/control/asynclink \
svtools/source/control/calendar \ svtools/source/control/calendar \
svtools/source/control/collatorres \ svtools/source/control/collatorres \
......
...@@ -139,6 +139,7 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/stdmenu.hxx,svtools/st ...@@ -139,6 +139,7 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/stdmenu.hxx,svtools/st
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/stringtransfer.hxx,svtools/stringtransfer.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/stringtransfer.hxx,svtools/stringtransfer.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svlbitm.hxx,svtools/svlbitm.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svlbitm.hxx,svtools/svlbitm.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/treelistbox.hxx,svtools/treelistbox.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/treelistbox.hxx,svtools/treelistbox.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/treelistentry.hxx,svtools/treelistentry.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svmedit.hxx,svtools/svmedit.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svmedit.hxx,svtools/svmedit.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svmedit2.hxx,svtools/svmedit2.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svmedit2.hxx,svtools/svmedit2.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svparser.hxx,svtools/svparser.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svparser.hxx,svtools/svparser.hxx))
......
...@@ -29,16 +29,17 @@ ...@@ -29,16 +29,17 @@
#ifndef _SVTREELIST_HXX #ifndef _SVTREELIST_HXX
#define _SVTREELIST_HXX #define _SVTREELIST_HXX
#include <limits.h>
#include "svtools/svtdllapi.h" #include "svtools/svtdllapi.h"
#include "svtools/treelistentry.hxx"
#include <tools/solar.h> #include <tools/solar.h>
#include <vector>
#include <boost/ptr_container/ptr_map.hpp>
#include <tools/link.hxx> #include <tools/link.hxx>
#include <tools/string.hxx> #include <tools/string.hxx>
#include <tools/debug.hxx> #include <tools/debug.hxx>
#include <limits.h>
#include <vector>
#include <boost/ptr_container/ptr_map.hpp>
#define LISTACTION_INSERTED 1 #define LISTACTION_INSERTED 1
#define LISTACTION_REMOVING 2 #define LISTACTION_REMOVING 2
#define LISTACTION_REMOVED 3 #define LISTACTION_REMOVED 3
...@@ -101,47 +102,6 @@ public: ...@@ -101,47 +102,6 @@ public:
SvListEntry* back(); SvListEntry* back();
}; };
//=============================================================================
class SVT_DLLPUBLIC SvListEntry
{
friend class SvTreeList;
friend class SvListView;
private:
SvListEntry* pParent;
SvTreeEntryList* pChildren;
sal_uLong nAbsPos;
sal_uLong nListPos;
void SetListPositions();
void InvalidateChildrensListPositions()
{
nListPos |= 0x80000000;
}
public:
SvListEntry();
SvListEntry( const SvListEntry& );
virtual ~SvListEntry();
sal_Bool HasChildren() { return (sal_Bool)(pChildren!=0); }
sal_Bool HasChildListPos() const
{
if( pParent && !(pParent->nListPos & 0x80000000) )
return sal_True;
else return sal_False;
}
sal_uLong GetChildListPos() const
{
if( pParent && (pParent->nListPos & 0x80000000) )
pParent->SetListPositions();
return ( nListPos & 0x7fffffff );
}
virtual void Clone( SvListEntry* pSource );
};
class SvListView; class SvListView;
class SvViewData class SvViewData
......
...@@ -198,55 +198,6 @@ public: ...@@ -198,55 +198,6 @@ public:
virtual void Clone( SvLBoxItem* pSource ) = 0; virtual void Clone( SvLBoxItem* pSource ) = 0;
}; };
// Flags, die am Model haengen
#define SV_ENTRYFLAG_CHILDREN_ON_DEMAND 0x0001
#define SV_ENTRYFLAG_DISABLE_DROP 0x0002
#define SV_ENTRYFLAG_IN_USE 0x0004
// wird gesetzt, wenn RequestingChildren keine Children gestzt hat
#define SV_ENTRYFLAG_NO_NODEBMP 0x0008
// Eintrag hatte oder hat Kinder
#define SV_ENTRYFLAG_HAD_CHILDREN 0x0010
#define SV_ENTRYFLAG_USER_FLAGS 0xF000
#define SV_ENTRYFLAG_SEMITRANSPARENT 0x8000 // draw semi-transparent entry bitmaps
class SVT_DLLPUBLIC SvLBoxEntry : public SvListEntry
{
friend class SvTreeListBox;
std::vector<SvLBoxItem*> aItems;
void* pUserData;
sal_uInt16 nEntryFlags;
SVT_DLLPRIVATE void DeleteItems_Impl();
public:
SvLBoxEntry();
virtual ~SvLBoxEntry();
sal_uInt16 ItemCount() const { return (sal_uInt16)aItems.size(); }
// DARF NUR GERUFEN WERDEN, WENN DER EINTRAG NOCH NICHT IM MODEL
// EINGEFUEGT IST, DA SONST FUER DAS ITEM KEINE VIEW-ABHAENGIGEN
// DATEN ALLOZIERT WERDEN!
void AddItem( SvLBoxItem* pItem );
void ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos );
SvLBoxItem* GetItem( sal_uInt16 nPos ) const { return aItems[nPos]; }
SvLBoxItem* GetFirstItem( sal_uInt16 nId );
sal_uInt16 GetPos( SvLBoxItem* pItem ) const
{
std::vector<SvLBoxItem*>::const_iterator it = std::find( aItems.begin(), aItems.end(), pItem );
return it == aItems.end() ? USHRT_MAX : it - aItems.begin();
}
void* GetUserData() const { return pUserData; }
void SetUserData( void* pPtr ) { pUserData = pPtr; }
virtual void Clone( SvListEntry* pSource );
void EnableChildrenOnDemand( sal_Bool bEnable=sal_True );
sal_Bool HasChildrenOnDemand() const { return (sal_Bool)((nEntryFlags & SV_ENTRYFLAG_CHILDREN_ON_DEMAND)!=0); }
sal_Bool HasInUseEmphasis() const { return (sal_Bool)((nEntryFlags & SV_ENTRYFLAG_IN_USE)!=0); }
sal_uInt16 GetFlags() const { return nEntryFlags; }
void SetFlags( sal_uInt16 nFlags ) { nEntryFlags = nFlags; }
};
class SVT_DLLPUBLIC SvLBoxTreeList : public SvTreeList class SVT_DLLPUBLIC SvLBoxTreeList : public SvTreeList
{ {
public: public:
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __SVTOOLS_TREELISTENTRY_HXX__
#define __SVTOOLS_TREELISTENTRY_HXX__
#include "svtdllapi.h"
#include "tools/solar.h"
#include <vector>
class SvTreeEntryList;
class SvLBoxItem;
class SVT_DLLPUBLIC SvListEntry
{
friend class SvTreeList;
friend class SvListView;
private:
SvListEntry* pParent;
SvTreeEntryList* pChildren;
sal_uLong nAbsPos;
sal_uLong nListPos;
void SetListPositions();
void InvalidateChildrensListPositions()
{
nListPos |= 0x80000000;
}
public:
SvListEntry();
SvListEntry( const SvListEntry& );
virtual ~SvListEntry();
sal_Bool HasChildren() { return (sal_Bool)(pChildren!=0); }
sal_Bool HasChildListPos() const
{
if( pParent && !(pParent->nListPos & 0x80000000) )
return sal_True;
else return sal_False;
}
sal_uLong GetChildListPos() const
{
if( pParent && (pParent->nListPos & 0x80000000) )
pParent->SetListPositions();
return ( nListPos & 0x7fffffff );
}
virtual void Clone( SvListEntry* pSource );
};
// Flags, die am Model haengen
#define SV_ENTRYFLAG_CHILDREN_ON_DEMAND 0x0001
#define SV_ENTRYFLAG_DISABLE_DROP 0x0002
#define SV_ENTRYFLAG_IN_USE 0x0004
// wird gesetzt, wenn RequestingChildren keine Children gestzt hat
#define SV_ENTRYFLAG_NO_NODEBMP 0x0008
// Eintrag hatte oder hat Kinder
#define SV_ENTRYFLAG_HAD_CHILDREN 0x0010
#define SV_ENTRYFLAG_USER_FLAGS 0xF000
#define SV_ENTRYFLAG_SEMITRANSPARENT 0x8000 // draw semi-transparent entry bitmaps
class SVT_DLLPUBLIC SvLBoxEntry : public SvListEntry
{
friend class SvTreeListBox;
std::vector<SvLBoxItem*> aItems;
void* pUserData;
sal_uInt16 nEntryFlags;
SVT_DLLPRIVATE void DeleteItems_Impl();
public:
SvLBoxEntry();
virtual ~SvLBoxEntry();
sal_uInt16 ItemCount() const { return (sal_uInt16)aItems.size(); }
// DARF NUR GERUFEN WERDEN, WENN DER EINTRAG NOCH NICHT IM MODEL
// EINGEFUEGT IST, DA SONST FUER DAS ITEM KEINE VIEW-ABHAENGIGEN
// DATEN ALLOZIERT WERDEN!
void AddItem( SvLBoxItem* pItem );
void ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos );
SvLBoxItem* GetItem( sal_uInt16 nPos ) const { return aItems[nPos]; }
SvLBoxItem* GetFirstItem( sal_uInt16 nId );
sal_uInt16 GetPos( SvLBoxItem* pItem ) const;
void* GetUserData() const { return pUserData; }
void SetUserData( void* pPtr ) { pUserData = pPtr; }
virtual void Clone( SvListEntry* pSource );
void EnableChildrenOnDemand( sal_Bool bEnable=sal_True );
sal_Bool HasChildrenOnDemand() const { return (sal_Bool)((nEntryFlags & SV_ENTRYFLAG_CHILDREN_ON_DEMAND)!=0); }
sal_Bool HasInUseEmphasis() const { return (sal_Bool)((nEntryFlags & SV_ENTRYFLAG_IN_USE)!=0); }
sal_uInt16 GetFlags() const { return nEntryFlags; }
void SetFlags( sal_uInt16 nFlags ) { nEntryFlags = nFlags; }
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -28,9 +28,6 @@ ...@@ -28,9 +28,6 @@
#include <svtools/treelist.hxx> #include <svtools/treelist.hxx>
DBG_NAME(SvListEntry);
SvTreeEntryList::SvTreeEntryList() {} SvTreeEntryList::SvTreeEntryList() {}
void SvTreeEntryList::push_back( SvListEntry* pItem ) void SvTreeEntryList::push_back( SvListEntry* pItem )
...@@ -158,65 +155,6 @@ SvTreeEntryList::SvTreeEntryList(const SvTreeEntryList& rList) ...@@ -158,65 +155,6 @@ SvTreeEntryList::SvTreeEntryList(const SvTreeEntryList& rList)
maEntryList.push_back(const_cast<SvListEntry*>(rList[i])); maEntryList.push_back(const_cast<SvListEntry*>(rList[i]));
} }
SvListEntry::SvListEntry()
{
DBG_CTOR(SvListEntry,0);
pChildren = 0;
pParent = 0;
nListPos = 0;
nAbsPos = 0;
}
SvListEntry::SvListEntry( const SvListEntry& rEntry )
{
DBG_CTOR(SvListEntry,0);
pChildren = 0;
pParent = 0;
nListPos &= 0x80000000;
nListPos |= ( rEntry.nListPos & 0x7fffffff);
nAbsPos = rEntry.nAbsPos;
}
SvListEntry::~SvListEntry()
{
DBG_DTOR(SvListEntry,0);
if ( pChildren )
{
pChildren->DestroyAll();
delete pChildren;
}
#ifdef DBG_UTIL
pChildren = 0;
pParent = 0;
#endif
}
void SvListEntry::Clone( SvListEntry* pSource)
{
DBG_CHKTHIS(SvListEntry,0);
nListPos &= 0x80000000;
nListPos |= ( pSource->nListPos & 0x7fffffff);
nAbsPos = pSource->nAbsPos;
}
void SvListEntry::SetListPositions()
{
if( pChildren )
{
SvTreeEntryList::iterator it = pChildren->begin(), itEnd = pChildren->end();
sal_uLong nCur = 0;
for (; it != itEnd; ++it)
{
SvListEntry* pEntry = *it;
pEntry->nListPos &= 0x80000000;
pEntry->nListPos |= nCur;
++nCur;
}
}
nListPos &= (~0x80000000);
}
DBG_NAME(SvViewData); DBG_NAME(SvViewData);
SvViewData::SvViewData() SvViewData::SvViewData()
......
...@@ -385,103 +385,6 @@ SvViewDataItem::~SvViewDataItem() ...@@ -385,103 +385,6 @@ SvViewDataItem::~SvViewDataItem()
DBG_DTOR(SvViewDataItem,0); DBG_DTOR(SvViewDataItem,0);
} }
// ***************************************************************
// class SvLBoxEntry
// ***************************************************************
DBG_NAME(SvLBoxEntry);
SvLBoxEntry::SvLBoxEntry() : aItems()
{
DBG_CTOR(SvLBoxEntry,0);
nEntryFlags = 0;
pUserData = 0;
}
SvLBoxEntry::~SvLBoxEntry()
{
DBG_DTOR(SvLBoxEntry,0);
DeleteItems_Impl();
}
void SvLBoxEntry::DeleteItems_Impl()
{
DBG_CHKTHIS(SvLBoxEntry,0);
sal_uInt16 nCount = aItems.size();
while( nCount )
{
nCount--;
SvLBoxItem* pItem = aItems[ nCount ];
delete pItem;
}
aItems.clear();
}
void SvLBoxEntry::AddItem( SvLBoxItem* pItem )
{
DBG_CHKTHIS(SvLBoxEntry,0);
aItems.push_back( pItem );
}
void SvLBoxEntry::Clone( SvListEntry* pSource )
{
DBG_CHKTHIS(SvLBoxEntry,0);
SvListEntry::Clone( pSource );
SvLBoxItem* pNewItem;
DeleteItems_Impl();
sal_uInt16 nCount = ((SvLBoxEntry*)pSource)->ItemCount();
sal_uInt16 nCurPos = 0;
while( nCurPos < nCount )
{
SvLBoxItem* pItem = ((SvLBoxEntry*)pSource)->GetItem( nCurPos );
pNewItem = pItem->Create();
pNewItem->Clone( pItem );
AddItem( pNewItem );
nCurPos++;
}
pUserData = ((SvLBoxEntry*)pSource)->GetUserData();
nEntryFlags = ((SvLBoxEntry*)pSource)->nEntryFlags;
}
void SvLBoxEntry::EnableChildrenOnDemand( sal_Bool bEnable )
{
DBG_CHKTHIS(SvLBoxEntry,0);
if ( bEnable )
nEntryFlags |= SV_ENTRYFLAG_CHILDREN_ON_DEMAND;
else
nEntryFlags &= (~SV_ENTRYFLAG_CHILDREN_ON_DEMAND);
}
void SvLBoxEntry::ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos )
{
DBG_CHKTHIS(SvLBoxEntry,0);
DBG_ASSERT(pNewItem,"ReplaceItem:No Item");
SvLBoxItem* pOld = GetItem( nPos );
if ( pOld )
{
aItems[ nPos ] = pNewItem;
delete pOld;
}
}
SvLBoxItem* SvLBoxEntry::GetFirstItem( sal_uInt16 nId )
{
sal_uInt16 nCount = aItems.size();
sal_uInt16 nCur = 0;
SvLBoxItem* pItem;
while( nCur < nCount )
{
pItem = GetItem( nCur );
if( pItem->IsA() == nId )
return pItem;
nCur++;
}
return 0;
}
SvLBoxEntry* SvLBoxTreeList::First() const SvLBoxEntry* SvLBoxTreeList::First() const
{ {
return (SvLBoxEntry*)SvTreeList::First(); return (SvLBoxEntry*)SvTreeList::First();
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "svtools/treelistentry.hxx"
#include "svtools/treelist.hxx"
#include "svtools/treelistbox.hxx"
#include "tools/debug.hxx"
DBG_NAME(SvListEntry);
SvListEntry::SvListEntry()
{
DBG_CTOR(SvListEntry,0);
pChildren = 0;
pParent = 0;
nListPos = 0;
nAbsPos = 0;
}
SvListEntry::SvListEntry( const SvListEntry& rEntry )
{
DBG_CTOR(SvListEntry,0);
pChildren = 0;
pParent = 0;
nListPos &= 0x80000000;
nListPos |= ( rEntry.nListPos & 0x7fffffff);
nAbsPos = rEntry.nAbsPos;
}
SvListEntry::~SvListEntry()
{
DBG_DTOR(SvListEntry,0);
if ( pChildren )
{
pChildren->DestroyAll();
delete pChildren;
}
#ifdef DBG_UTIL
pChildren = 0;
pParent = 0;
#endif
}
void SvListEntry::Clone( SvListEntry* pSource)
{
DBG_CHKTHIS(SvListEntry,0);
nListPos &= 0x80000000;
nListPos |= ( pSource->nListPos & 0x7fffffff);
nAbsPos = pSource->nAbsPos;
}
void SvListEntry::SetListPositions()
{
if( pChildren )
{
SvTreeEntryList::iterator it = pChildren->begin(), itEnd = pChildren->end();
sal_uLong nCur = 0;
for (; it != itEnd; ++it)
{
SvListEntry* pEntry = *it;
pEntry->nListPos &= 0x80000000;
pEntry->nListPos |= nCur;
++nCur;
}
}
nListPos &= (~0x80000000);
}
// ***************************************************************
// class SvLBoxEntry
// ***************************************************************
DBG_NAME(SvLBoxEntry);
SvLBoxEntry::SvLBoxEntry() : aItems()
{
DBG_CTOR(SvLBoxEntry,0);
nEntryFlags = 0;
pUserData = 0;
}
SvLBoxEntry::~SvLBoxEntry()
{
DBG_DTOR(SvLBoxEntry,0);
DeleteItems_Impl();
}
void SvLBoxEntry::DeleteItems_Impl()
{
DBG_CHKTHIS(SvLBoxEntry,0);
sal_uInt16 nCount = aItems.size();
while( nCount )
{
nCount--;
SvLBoxItem* pItem = aItems[ nCount ];
delete pItem;
}
aItems.clear();
}
void SvLBoxEntry::AddItem( SvLBoxItem* pItem )
{
DBG_CHKTHIS(SvLBoxEntry,0);
aItems.push_back( pItem );
}
void SvLBoxEntry::Clone( SvListEntry* pSource )
{
DBG_CHKTHIS(SvLBoxEntry,0);
SvListEntry::Clone( pSource );
SvLBoxItem* pNewItem;
DeleteItems_Impl();
sal_uInt16 nCount = ((SvLBoxEntry*)pSource)->ItemCount();
sal_uInt16 nCurPos = 0;
while( nCurPos < nCount )
{
SvLBoxItem* pItem = ((SvLBoxEntry*)pSource)->GetItem( nCurPos );
pNewItem = pItem->Create();
pNewItem->Clone( pItem );
AddItem( pNewItem );
nCurPos++;
}
pUserData = ((SvLBoxEntry*)pSource)->GetUserData();
nEntryFlags = ((SvLBoxEntry*)pSource)->nEntryFlags;
}
void SvLBoxEntry::EnableChildrenOnDemand( sal_Bool bEnable )
{
DBG_CHKTHIS(SvLBoxEntry,0);
if ( bEnable )
nEntryFlags |= SV_ENTRYFLAG_CHILDREN_ON_DEMAND;
else
nEntryFlags &= (~SV_ENTRYFLAG_CHILDREN_ON_DEMAND);
}
void SvLBoxEntry::ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos )
{
DBG_CHKTHIS(SvLBoxEntry,0);
DBG_ASSERT(pNewItem,"ReplaceItem:No Item");
SvLBoxItem* pOld = GetItem( nPos );
if ( pOld )
{
aItems[ nPos ] = pNewItem;
delete pOld;
}
}
SvLBoxItem* SvLBoxEntry::GetFirstItem( sal_uInt16 nId )
{
sal_uInt16 nCount = aItems.size();
sal_uInt16 nCur = 0;
SvLBoxItem* pItem;
while( nCur < nCount )
{
pItem = GetItem( nCur );
if( pItem->IsA() == nId )
return pItem;
nCur++;
}
return 0;
}
sal_uInt16 SvLBoxEntry::GetPos( SvLBoxItem* pItem ) const
{
std::vector<SvLBoxItem*>::const_iterator it = std::find( aItems.begin(), aItems.end(), pItem );
return it == aItems.end() ? USHRT_MAX : it - aItems.begin();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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