[Libreoffice-commits] .: svtools/inc svtools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Sep 27 16:59:21 PDT 2012


 svtools/inc/svtools/svlbox.hxx   |   20 ++++++++++--
 svtools/inc/svtools/treelist.hxx |   37 ----------------------
 svtools/source/contnr/svlbox.cxx |   65 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 83 insertions(+), 39 deletions(-)

New commits:
commit 77a0acae58828d2186bce241b562c363da93343b
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Sep 27 15:37:27 2012 -0400

    Remove DECLARE_SVTREELIST.
    
    There is only one place that uses it.
    
    Change-Id: Ie3a41b36a5273c9b658b6a2f0e5d029bcb148546

diff --git a/svtools/inc/svtools/svlbox.hxx b/svtools/inc/svtools/svlbox.hxx
index 6c7c0fb..b582806 100644
--- a/svtools/inc/svtools/svlbox.hxx
+++ b/svtools/inc/svtools/svlbox.hxx
@@ -215,6 +215,24 @@ public:
     void        SetFlags( sal_uInt16 nFlags ) { nEntryFlags = nFlags; }
 };
 
+class SVT_DLLPUBLIC SvLBoxTreeList : public SvTreeList
+{
+public:
+    SvLBoxEntry* First() const;
+    SvLBoxEntry* Next( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
+    SvLBoxEntry* Prev( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
+    SvLBoxEntry* Last() const;
+    SvLBoxEntry* Clone( SvListEntry* pEntry, sal_uLong& nCloneCount ) const;
+    SvLBoxEntry* GetEntry( SvListEntry* pParent, sal_uLong nPos ) const;
+    SvLBoxEntry* GetEntry( sal_uLong nRootPos ) const;
+    SvLBoxEntry* GetParent( SvListEntry* pEntry ) const;
+    SvLBoxEntry* FirstChild( SvLBoxEntry* pParent ) const;
+    SvLBoxEntry* NextSibling( SvLBoxEntry* pEntry ) const;
+    SvLBoxEntry* PrevSibling( SvLBoxEntry* pEntry ) const;
+    SvLBoxEntry* LastSibling( SvLBoxEntry* pEntry ) const;
+    SvLBoxEntry* GetEntryAtAbsPos( sal_uLong nAbsPos ) const;
+};
+
 // *********************************************************************
 // ****************************** SvLBox *******************************
 // *********************************************************************
@@ -232,8 +250,6 @@ public:
 // Das Drop-Target ist in diesem Fall 0
 #define SV_DRAGDROP_ENABLE_TOP      (DragDropMode)0x0020
 
-DECLARE_SVTREELIST(SvLBoxTreeList, SvLBoxEntry*)
-
 #define SVLISTBOX_ID_LBOX 0   // fuer SvLBox::IsA()
 
 #define SVLBOX_IN_EDT           0x0001
diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx
index d5ba003..bc0b683 100644
--- a/svtools/inc/svtools/treelist.hxx
+++ b/svtools/inc/svtools/treelist.hxx
@@ -603,43 +603,6 @@ inline SvListEntry* SvTreeList::GetParent( SvListEntry* pEntry ) const
     return pParent;
 }
 
-#define DECLARE_SVTREELIST( ClassName, Type )                                   \
-class ClassName : public SvTreeList                                             \
-{                                                                               \
-public:                                                                         \
-    Type        First() const                                                   \
-                    { return (Type)SvTreeList::First(); }                       \
-    Type        Next( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const         \
-                    { return (Type)SvTreeList::Next(pEntry,pDepth); }           \
-    Type        Prev( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const         \
-                    { return (Type)SvTreeList::Prev(pEntry,pDepth); }           \
-    Type        Last() const                                                    \
-                    { return (Type)SvTreeList::Last(); }                        \
-                                                                                \
-    Type        Clone( SvListEntry* pEntry, sal_uLong& nCloneCount ) const      \
-                    { return (Type)SvTreeList::Clone(pEntry,nCloneCount); }     \
-    Type        GetEntry( SvListEntry* pParent, sal_uLong nPos ) const          \
-                    { return (Type)SvTreeList::GetEntry(pParent,nPos); }        \
-    Type        GetEntry( sal_uLong nRootPos ) const                            \
-                    { return (Type)SvTreeList::GetEntry(nRootPos); }            \
-    Type        GetParent( SvListEntry* pEntry ) const                          \
-                    { return (Type)SvTreeList::GetParent(pEntry); }             \
-    using SvTreeList::FirstChild;                                               \
-    Type        FirstChild( Type pParent ) const                                \
-                    { return (Type)SvTreeList::FirstChild(pParent); }           \
-    using SvTreeList::NextSibling;                                              \
-    Type        NextSibling( Type pEntry ) const                                \
-                    { return (Type)SvTreeList::NextSibling(pEntry); }           \
-    using SvTreeList::PrevSibling;                                              \
-    Type        PrevSibling( Type pEntry ) const                                \
-                    { return (Type)SvTreeList::PrevSibling(pEntry); }           \
-    using SvTreeList::LastSibling;                                              \
-    Type        LastSibling( Type pEntry ) const                                \
-                    { return (Type)SvTreeList::LastSibling(pEntry); }           \
-    Type        GetEntryAtAbsPos( sal_uLong nAbsPos ) const                     \
-                    { return (Type)SvTreeList::GetEntryAtAbsPos( nAbsPos); }    \
-};
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx
index d3e0c03..a16e723 100644
--- a/svtools/source/contnr/svlbox.cxx
+++ b/svtools/source/contnr/svlbox.cxx
@@ -480,6 +480,71 @@ SvLBoxItem* SvLBoxEntry::GetFirstItem( sal_uInt16 nId )
     return 0;
 }
 
+SvLBoxEntry* SvLBoxTreeList::First() const
+{
+    return (SvLBoxEntry*)SvTreeList::First();
+}
+
+SvLBoxEntry* SvLBoxTreeList::Next( SvListEntry* pEntry, sal_uInt16* pDepth ) const
+{
+    return (SvLBoxEntry*)SvTreeList::Next(pEntry,pDepth);
+}
+
+SvLBoxEntry* SvLBoxTreeList::Prev( SvListEntry* pEntry, sal_uInt16* pDepth ) const
+{
+    return (SvLBoxEntry*)SvTreeList::Prev(pEntry,pDepth);
+}
+
+SvLBoxEntry* SvLBoxTreeList::Last() const
+{
+    return (SvLBoxEntry*)SvTreeList::Last();
+}
+
+SvLBoxEntry* SvLBoxTreeList::Clone( SvListEntry* pEntry, sal_uLong& nCloneCount ) const
+{
+    return (SvLBoxEntry*)SvTreeList::Clone(pEntry,nCloneCount);
+}
+
+SvLBoxEntry* SvLBoxTreeList::GetEntry( SvListEntry* pParent, sal_uLong nPos ) const
+{
+    return (SvLBoxEntry*)SvTreeList::GetEntry(pParent,nPos);
+}
+
+SvLBoxEntry* SvLBoxTreeList::GetEntry( sal_uLong nRootPos ) const
+{
+    return (SvLBoxEntry*)SvTreeList::GetEntry(nRootPos);
+}
+
+SvLBoxEntry* SvLBoxTreeList::GetParent( SvListEntry* pEntry ) const
+{
+    return (SvLBoxEntry*)SvTreeList::GetParent(pEntry);
+}
+
+SvLBoxEntry* SvLBoxTreeList::FirstChild( SvLBoxEntry* pParent ) const
+{
+    return (SvLBoxEntry*)SvTreeList::FirstChild(pParent);
+}
+
+SvLBoxEntry* SvLBoxTreeList::NextSibling( SvLBoxEntry* pEntry ) const
+{
+    return (SvLBoxEntry*)SvTreeList::NextSibling(pEntry);
+}
+
+SvLBoxEntry* SvLBoxTreeList::PrevSibling( SvLBoxEntry* pEntry ) const
+{
+    return (SvLBoxEntry*)SvTreeList::PrevSibling(pEntry);
+}
+
+SvLBoxEntry* SvLBoxTreeList::LastSibling( SvLBoxEntry* pEntry ) const
+{
+    return (SvLBoxEntry*)SvTreeList::LastSibling(pEntry);
+}
+
+SvLBoxEntry* SvLBoxTreeList::GetEntryAtAbsPos( sal_uLong nAbsPos ) const
+{
+    return (SvLBoxEntry*)SvTreeList::GetEntryAtAbsPos( nAbsPos);
+}
+
 // ***************************************************************
 // class SvLBoxViewData
 // ***************************************************************


More information about the Libreoffice-commits mailing list