diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-11-16 16:14:53 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-11-16 16:18:37 -0500 |
commit | 43cd14d317dd463a9e7c15fd6bcd6b289f96491f (patch) | |
tree | f9f899b2c368c06527101abb48cfbe991bd39f42 /svtools/source/contnr | |
parent | 032164972c7f4c720937e6117c0e147cfdd448b0 (diff) |
Fix the Windows build breakage by reorganizing svtools headers.
Also removed a fair amount of implicit inline methods to promote use
of more forward declaration.
Change-Id: I5ad21f0d7abc85281708b7e87f1036b02a053627
Diffstat (limited to 'svtools/source/contnr')
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 4 | ||||
-rw-r--r-- | svtools/source/contnr/svimpbox.cxx | 12 | ||||
-rw-r--r-- | svtools/source/contnr/svlbitm.cxx | 1 | ||||
-rw-r--r-- | svtools/source/contnr/svtabbx.cxx | 1 | ||||
-rw-r--r-- | svtools/source/contnr/treelist.cxx | 17 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 11 | ||||
-rw-r--r-- | svtools/source/contnr/treelistentry.cxx | 1 |
7 files changed, 41 insertions, 6 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 212e5810b945..4713aacf67ee 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -26,8 +26,9 @@ * ************************************************************************/ +#include "fileview.hxx" #include "sal/config.h" - +#include "svtools/treelistentry.hxx" #include <svtools/fileview.hxx> #include <svtools/svtresid.hxx> #include <svtools/imagemgr.hxx> @@ -35,7 +36,6 @@ #include <svtools/svtabbx.hxx> #include <svtools/svtools.hrc> #include "fileview.hrc" -#include "fileview.hxx" #include "contentenumeration.hxx" #include <svtools/AccessibleBrowseBoxObjType.hxx> #include <com/sun/star/util/DateTime.hpp> diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 06145918f11d..b7e7f9505901 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -42,6 +42,8 @@ #include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> +#include "svtools/treelistentry.hxx" + #define NODE_BMP_TABDIST_NOTVALID -2000000 #define FIRST_ENTRY_TAB 1 @@ -3325,6 +3327,16 @@ void SvImpLBox::NotifyTabsChanged() } } +bool SvImpLBox::IsExpandable() const +{ + return pCursor->HasChildren() || pCursor->HasChildrenOnDemand(); +} + +bool SvImpLBox::IsNowExpandable() const +{ + return IsExpandable() && !pView->IsExpanded( pCursor ); +} + IMPL_LINK(SvImpLBox,MyUserEvent,void*, pArg ) { nCurUserEvent = 0xffffffff; diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index 314bc310a822..0cdc4a906c27 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -28,6 +28,7 @@ #include <svtools/treelistbox.hxx> #include <svtools/svlbitm.hxx> +#include "svtools/treelistentry.hxx" #include <vcl/svapp.hxx> #include <vcl/button.hxx> #include <vcl/decoview.hxx> diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 929c429cc00c..6f5e99bd841e 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -31,6 +31,7 @@ #include <svtools/svtresid.hxx> #include <svtools/svlbitm.hxx> #include <svtools/svtools.hrc> +#include "svtools/treelistentry.hxx" #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include "svtaccessiblefactory.hxx" diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index ed278f1d2dfd..dbe6df752cec 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -26,7 +26,8 @@ * ************************************************************************/ -#include <svtools/treelist.hxx> +#include "svtools/treelist.hxx" +#include "svtools/treelistentry.hxx" #include "osl/diagnose.h" #include <stdio.h> @@ -1100,13 +1101,18 @@ sal_uLong SvTreeList::Insert( SvTreeListEntry* pEntry,SvTreeListEntry* pParent,s |* *************************************************************************/ -sal_uLong SvTreeList::GetAbsPos( SvTreeListEntry* pEntry) const +sal_uLong SvTreeList::GetAbsPos( const SvTreeListEntry* pEntry) const { if ( !bAbsPositionsValid ) ((SvTreeList*)this)->SetAbsolutePositions(); return pEntry->nAbsPos; } +sal_uLong SvTreeList::GetRelPos( const SvTreeListEntry* pChild ) const +{ + return pChild->GetChildListPos(); +} + /************************************************************************* |* |* SvTreeList:: @@ -1816,7 +1822,7 @@ void SvTreeList::GetInsertionPos( SvTreeListEntry* pEntry, SvTreeListEntry* pPar } } -sal_Bool SvTreeList::HasChildren( SvTreeListEntry* pEntry ) const +bool SvTreeList::HasChildren( const SvTreeListEntry* pEntry ) const { if ( !pEntry ) pEntry = pRootItem; @@ -1824,6 +1830,11 @@ sal_Bool SvTreeList::HasChildren( SvTreeListEntry* pEntry ) const return !pEntry->maChildren.empty(); } +bool SvTreeList::HasParent( const SvTreeListEntry* pEntry ) const +{ + return pEntry->pParent != pRootItem; +} + SvTreeListEntry* SvTreeList::GetEntry( SvTreeListEntry* pParent, sal_uLong nPos ) const { if ( !pParent ) pParent = pRootItem; diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 167035b79416..c60d1b58ac9a 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -46,6 +46,7 @@ #include <svtools/svmedit.hxx> #include <svtools/svlbitm.hxx> +#include "svtools/treelistentry.hxx" #include "svimpbox.hxx" #include <set> @@ -973,6 +974,16 @@ sal_uLong SvTreeListBox::GetLevelChildCount( SvTreeListEntry* _pParent ) const return nCount; } +SvViewDataItem* SvTreeListBox::GetViewDataItem( SvTreeListEntry* pEntry, SvLBoxItem* pItem ) const +{ + SvViewDataEntry* pEntryData = + (SvViewDataEntry*)SvListView::GetViewData(pEntry); + DBG_ASSERT(pEntryData,"Entry not in View"); + DBG_ASSERT(pEntryData->pItemData,"No ItemData"); + sal_uInt16 nItemPos = pEntry->GetPos(pItem); + return (pEntryData->pItemData+nItemPos); +} + SvViewData* SvTreeListBox::CreateViewData( SvTreeListEntry* ) { DBG_CHKTHIS(SvTreeListBox,0); diff --git a/svtools/source/contnr/treelistentry.cxx b/svtools/source/contnr/treelistentry.cxx index b98b24af9bf5..c34b53c680b2 100644 --- a/svtools/source/contnr/treelistentry.cxx +++ b/svtools/source/contnr/treelistentry.cxx @@ -28,7 +28,6 @@ #include "svtools/treelistentry.hxx" #include "svtools/treelist.hxx" -#include "svtools/treelistbox.hxx" #include <limits> |