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/inc | |
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/inc')
-rw-r--r-- | svtools/inc/svtools/treelist.hxx | 13 | ||||
-rw-r--r-- | svtools/inc/svtools/treelistbox.hxx | 23 | ||||
-rwxr-xr-x | svtools/inc/svtools/treelistentries.hxx | 20 | ||||
-rw-r--r-- | svtools/inc/svtools/treelistentry.hxx | 6 |
4 files changed, 40 insertions, 22 deletions
diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx index 79fbc1b796e9..2332e5882633 100644 --- a/svtools/inc/svtools/treelist.hxx +++ b/svtools/inc/svtools/treelist.hxx @@ -30,7 +30,8 @@ #define _SVTREELIST_HXX #include "svtools/svtdllapi.h" -#include "svtools/treelistentry.hxx" +#include "svtools/treelistentries.hxx" + #include <tools/solar.h> #include <tools/link.hxx> #include <tools/string.hxx> @@ -248,9 +249,8 @@ public: bool Remove( const SvTreeListEntry* pEntry ); void Clear(); - sal_Bool HasChildren( SvTreeListEntry* pEntry ) const; - sal_Bool HasParent( SvTreeListEntry* pEntry ) const - { return (sal_Bool)(pEntry->pParent!=pRootItem); } + bool HasChildren( const SvTreeListEntry* pEntry ) const; + bool HasParent( const SvTreeListEntry* pEntry ) const; bool IsChild(const SvTreeListEntry* pParent, const SvTreeListEntry* pChild) const; SvTreeListEntry* GetEntry( SvTreeListEntry* pParent, sal_uLong nPos ) const; @@ -270,9 +270,8 @@ public: std::pair<SvTreeListEntries::iterator, SvTreeListEntries::iterator> GetChildIterators(SvTreeListEntry* pParent); - sal_uLong GetAbsPos( SvTreeListEntry* pEntry ) const; - sal_uLong GetRelPos( SvTreeListEntry* pChild ) const - { return pChild->GetChildListPos(); } + sal_uLong GetAbsPos( const SvTreeListEntry* pEntry ) const; + sal_uLong GetRelPos( const SvTreeListEntry* pChild ) const; sal_uLong GetChildCount( const SvTreeListEntry* pParent ) const; sal_uInt16 GetDepth( const SvTreeListEntry* pEntry ) const; diff --git a/svtools/inc/svtools/treelistbox.hxx b/svtools/inc/svtools/treelistbox.hxx index a7e05d36fde5..cd7aa36bd1c9 100644 --- a/svtools/inc/svtools/treelistbox.hxx +++ b/svtools/inc/svtools/treelistbox.hxx @@ -194,6 +194,18 @@ public: virtual void Clone( SvLBoxItem* pSource ) = 0; }; +inline SvLBoxItem* new_clone(const SvLBoxItem& rSrc) +{ + SvLBoxItem* p = rSrc.Create(); + p->Clone(const_cast<SvLBoxItem*>(&rSrc)); + return p; +} + +inline void delete_clone(const SvLBoxItem* p) +{ + delete p; +} + // ********************************************************************* // ****************************** SvTreeListBox ************************ // ********************************************************************* @@ -829,17 +841,6 @@ public: void Hide(); }; -inline 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); -} - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/inc/svtools/treelistentries.hxx b/svtools/inc/svtools/treelistentries.hxx new file mode 100755 index 000000000000..d52d09aac107 --- /dev/null +++ b/svtools/inc/svtools/treelistentries.hxx @@ -0,0 +1,20 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __SVTOOLS_TREELISTENTRIES_HXX__ +#define __SVTOOLS_TREELISTENTRIES_HXX__ + +#include <boost/ptr_container/ptr_vector.hpp> + +class SvTreeListEntry; +typedef boost::ptr_vector<SvTreeListEntry> SvTreeListEntries; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/inc/svtools/treelistentry.hxx b/svtools/inc/svtools/treelistentry.hxx index 7eb015c7199b..b3df912149bf 100644 --- a/svtools/inc/svtools/treelistentry.hxx +++ b/svtools/inc/svtools/treelistentry.hxx @@ -31,6 +31,8 @@ #include "svtdllapi.h" #include "tools/solar.h" +#include "treelistbox.hxx" +#include "treelistentries.hxx" #include <boost/ptr_container/ptr_vector.hpp> @@ -46,10 +48,6 @@ #define SV_ENTRYFLAG_USER_FLAGS 0xF000 #define SV_ENTRYFLAG_SEMITRANSPARENT 0x8000 // draw semi-transparent entry bitmaps -class SvLBoxItem; -class SvTreeListEntry; - -typedef boost::ptr_vector<SvTreeListEntry> SvTreeListEntries; class SVT_DLLPUBLIC SvTreeListEntry { |