[Libreoffice-commits] core.git: 3 commits - ucb/source xmloff/source

Michael Stahl mstahl at redhat.com
Fri Dec 9 10:45:43 UTC 2016


 ucb/source/sorter/sortresult.cxx              |  140 +++++++-------------------
 ucb/source/sorter/sortresult.hxx              |   26 ----
 xmloff/source/text/XMLChangeImportContext.cxx |   25 ++--
 xmloff/source/text/XMLChangeImportContext.hxx |   16 +-
 xmloff/source/text/txtimp.cxx                 |    7 -
 xmloff/source/text/txtparae.cxx               |   14 +-
 xmloff/source/text/txtparai.cxx               |    7 -
 7 files changed, 77 insertions(+), 158 deletions(-)

New commits:
commit ff3d175eef06d67133ba686ff8b2ea9261de2c2b
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Dec 8 22:46:54 2016 +0100

    xmloff: XMLChangeImportContext: replace boolean pair with proper enum
    
    Change-Id: I82ec75058a2309b8bcf0f8e78d8ef0db367014b0

diff --git a/xmloff/source/text/XMLChangeImportContext.cxx b/xmloff/source/text/XMLChangeImportContext.cxx
index f8b863a..54c8bea 100644
--- a/xmloff/source/text/XMLChangeImportContext.cxx
+++ b/xmloff/source/text/XMLChangeImportContext.cxx
@@ -34,15 +34,12 @@ XMLChangeImportContext::XMLChangeImportContext(
     SvXMLImport& rImport,
     sal_Int16 nPrefix,
     const OUString& rLocalName,
-    bool bStart,
-    bool bEnd,
-    bool bOutsideOfParagraph) :
-        SvXMLImportContext(rImport, nPrefix, rLocalName),
-        bIsStart(bStart),
-        bIsEnd(bEnd),
-        bIsOutsideOfParagraph(bOutsideOfParagraph)
+    Element const eElement,
+    bool bOutsideOfParagraph)
+    :   SvXMLImportContext(rImport, nPrefix, rLocalName)
+    ,   m_Element(eElement)
+    ,   m_bIsOutsideOfParagraph(bOutsideOfParagraph)
 {
-    DBG_ASSERT(bStart || bEnd, "Must be either start, end, or both!");
 }
 
 XMLChangeImportContext::~XMLChangeImportContext()
@@ -69,14 +66,14 @@ void XMLChangeImportContext::StartElement(
                 GetImport().GetTextImport();
             OUString sID = xAttrList->getValueByIndex(nAttr);
 
-            // call for bStart and bEnd (may both be true)
-            if (bIsStart)
-                rHelper->RedlineSetCursor(sID, true, bIsOutsideOfParagraph);
-            if (bIsEnd)
-                rHelper->RedlineSetCursor(sID, false, bIsOutsideOfParagraph);
+            // <text:change> is both start and end
+            if (Element::START == m_Element || Element::POINT == m_Element)
+                rHelper->RedlineSetCursor(sID, true, m_bIsOutsideOfParagraph);
+            if (Element::END == m_Element || Element::POINT == m_Element)
+                rHelper->RedlineSetCursor(sID, false, m_bIsOutsideOfParagraph);
 
             // outside of paragraph and still open? set open redline ID
-            if (bIsOutsideOfParagraph)
+            if (m_bIsOutsideOfParagraph)
             {
                 rHelper->SetOpenRedlineId(sID);
             }
diff --git a/xmloff/source/text/XMLChangeImportContext.hxx b/xmloff/source/text/XMLChangeImportContext.hxx
index fbab1b1..a2e88e8 100644
--- a/xmloff/source/text/XMLChangeImportContext.hxx
+++ b/xmloff/source/text/XMLChangeImportContext.hxx
@@ -38,26 +38,20 @@ namespace com { namespace sun { namespace star {
  */
 class XMLChangeImportContext : public SvXMLImportContext
 {
-    bool bIsStart;
-    bool bIsEnd;
-    bool bIsOutsideOfParagraph;
-
 public:
-
+    enum class Element { START, END, POINT };
 
     /**
      * import a change mark
      * (<text:change>, <text:change-start>, <text:change-end>)
      * Note: a <text:change> mark denotes start and end of a change
-     * simultaniously, so both bIsStart and bIsEnd parameters would
-     * be set true.
+     * simultaneously, as in Element::POINT.
      */
     XMLChangeImportContext(
         SvXMLImport& rImport,
         sal_Int16 nPrefix,
         const OUString& rLocalName,
-        bool bIsStart,  /// mark start of a change
-        bool bIsEnd,    /// mark end of a change
+        Element eElement,
         /// true if change mark is encountered outside of a paragraph
         /// (usually before a section or table)
         bool bIsOutsideOfParagraph);
@@ -66,6 +60,10 @@ public:
 
     virtual void StartElement(
         const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override;
+
+private:
+    Element m_Element;
+    bool m_bIsOutsideOfParagraph;
 };
 
 #endif
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index f4b66c8..06da069 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2294,8 +2294,11 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
     case XML_TOK_TEXT_CHANGE_END:
         pContext = new XMLChangeImportContext(
             rImport, nPrefix, rLocalName,
-            (XML_TOK_TEXT_CHANGE_END != nToken),
-            (XML_TOK_TEXT_CHANGE_START != nToken),
+            ((nToken == XML_TOK_TEXTP_CHANGE_END)
+                ? XMLChangeImportContext::Element::END
+                : (nToken == XML_TOK_TEXTP_CHANGE_START)
+                    ? XMLChangeImportContext::Element::START
+                    : XMLChangeImportContext::Element::POINT),
             true);
         break;
 
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 58c201e..d35a052 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -1683,8 +1683,11 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext(
     case XML_TOK_TEXTP_CHANGE:
         pContext = new XMLChangeImportContext(
             rImport, nPrefix, rLocalName,
-            (nToken != XML_TOK_TEXTP_CHANGE_END),
-            (nToken != XML_TOK_TEXTP_CHANGE_START),
+            ((nToken == XML_TOK_TEXTP_CHANGE_END)
+                ? XMLChangeImportContext::Element::END
+                : (nToken == XML_TOK_TEXTP_CHANGE_START)
+                    ? XMLChangeImportContext::Element::START
+                    : XMLChangeImportContext::Element::POINT),
             false);
         break;
 
commit a547b2559c9dd25e03ab78a22eb9c06a38e9b574
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Dec 8 22:29:48 2016 +0100

    xmloff: convert some DBG_ASSERT in txtparae.cxx
    
    Change-Id: I7b53726e3bb16ff1d9a6cdb05ce4cf4273eb5ac4

diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index ed8bc40..4468ea5 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2525,9 +2525,8 @@ void XMLTextParagraphExport::exportTextMark(
         }
 
         // export element
-        DBG_ASSERT(pElements != nullptr, "illegal element array");
-        DBG_ASSERT(nElement >= 0, "illegal element number");
-        DBG_ASSERT(nElement <= 2, "illegal element number");
+        assert(pElements != nullptr);
+        assert(0 <= nElement && nElement <= 2);
         SvXMLElementExport aElem(GetExport(),
                                  XML_NAMESPACE_TEXT, pElements[nElement],
                                  false, false);
@@ -3647,7 +3646,7 @@ void XMLTextParagraphExport::exportRuby(
             // ruby start
 
             // we can only start a ruby if none is open
-            DBG_ASSERT(! bOpenRuby, "Can't open a ruby inside of ruby!");
+            assert(!bOpenRuby && "Can't open a ruby inside of ruby!");
             if( bOpenRuby )
                 return;
 
@@ -3657,9 +3656,8 @@ void XMLTextParagraphExport::exportRuby(
 
             // ruby style
             GetExport().CheckAttrList();
-            OUString sStyleName(Find( XML_STYLE_FAMILY_TEXT_RUBY, rPropSet,
-                                        "" ));
-            DBG_ASSERT(!sStyleName.isEmpty(), "I can't find the style!");
+            OUString sStyleName(Find(XML_STYLE_FAMILY_TEXT_RUBY, rPropSet, ""));
+            SAL_WARN_IF(sStyleName.isEmpty(), "xmloff", "Can't find ruby style!");
             GetExport().AddAttribute(XML_NAMESPACE_TEXT,
                                      XML_STYLE_NAME, sStyleName);
 
@@ -3675,7 +3673,7 @@ void XMLTextParagraphExport::exportRuby(
             // ruby end
 
             // check for an open ruby
-            DBG_ASSERT(bOpenRuby, "Can't close a ruby if none is open!");
+            assert(bOpenRuby && "Can't close a ruby if none is open!");
             if( !bOpenRuby )
                 return;
 
commit 96ec36cf261eec3ec07f3caa2673a916571c4287
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Dec 8 21:49:47 2016 +0100

    ucb: replace "SimpleList" trash
    
    * pointless use of void*
    * stupid casting everywhere
    * ridiculously overloaded Remove()
    * defensively programmed implementation
    
    Change-Id: I1c86ffac636cafbe3e13e668a65a2b14377b6e95

diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index e6b28f8..5a289b5 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -1322,23 +1322,22 @@ void SortedResultSet::PropertyChanged( const PropertyChangeEvent& rEvt )
 void SortedResultSet::CopyData( SortedResultSet *pSource )
 {
     const SortedEntryList& rSrcS2O = pSource->maS2O;
-    const SimpleList&      rSrcO2S = pSource->maO2S;
 
     sal_IntPtr i, nCount;
 
     maS2O.Clear();
-    maO2S.Clear();
-    maModList.Clear();
+    m_O2S.clear();
+    m_ModList.clear();
 
     maS2O.Insert( nullptr, 0 );
-    maO2S.Insert( nullptr, (sal_uInt32) 0 );  // value, pos
+    m_O2S.push_back(0);
 
     nCount = rSrcS2O.Count();
 
     for ( i=1; i<nCount; i++ )
     {
         maS2O.Insert( new SortListData( rSrcS2O[ i ] ), i );
-        maO2S.Insert( rSrcO2S.GetObject( i ), (sal_uInt32) i );
+        m_O2S.push_back(pSource->m_O2S[i]);
     }
 
     mnLastSort = maS2O.Count();
@@ -1384,17 +1383,17 @@ void SortedResultSet::Initialize(
 
     // when we have fetched all the elements, we can create the
     // original to sorted mapping list from the s2o list
-    maO2S.Clear();
-    maO2S.Insert( nullptr, (sal_uInt32) 0 );
+    m_O2S.clear();
+    m_O2S.push_back(0);
 
     // insert some dummy entries first and replace then
     // the entries with the right ones
     size_t i;
 
     for ( i=1; i<maS2O.Count(); i++ )
-        maO2S.Insert( nullptr, i );   // Insert( data, pos )
+        m_O2S.push_back(0);
     for ( i=1; i<maS2O.Count(); i++ )
-        maO2S.Replace( reinterpret_cast<void*>(i), maS2O[ i ] ); // Insert( data, pos )
+        m_O2S[maS2O[i]] = i;
 
     mnCount = maS2O.Count() - 1;
 }
@@ -1464,7 +1463,7 @@ void SortedResultSet::InsertNew( sal_IntPtr nPos, sal_IntPtr nCount )
         pData = new SortListData( nEnd );
 
         maS2O.Insert( pData, nEnd );    // Insert( Value, Position )
-        maO2S.Insert( reinterpret_cast<void*>(nEnd), (sal_uInt32)(nPos+i) );  // Insert( Value, Position )
+        m_O2S.insert(m_O2S.begin() + nPos + i, nEnd);
     }
 
     mnCount += nCount;
@@ -1473,7 +1472,7 @@ void SortedResultSet::InsertNew( sal_IntPtr nPos, sal_IntPtr nCount )
 
 void SortedResultSet::Remove( sal_IntPtr nPos, sal_IntPtr nCount, EventList *pEvents )
 {
-    sal_uInt32  i, j;
+    sal_uInt32  i;
     sal_IntPtr        nOldLastSort;
 
     // correct mnLastSort first
@@ -1490,22 +1489,22 @@ void SortedResultSet::Remove( sal_IntPtr nPos, sal_IntPtr nCount, EventList *pEv
     // in the original2sorted list
     for ( i=0; i < (sal_uInt32) nCount; i++ )
     {
-        sal_IntPtr nSortPos = reinterpret_cast<sal_IntPtr>( maO2S.GetObject( nPos ) );
-        maO2S.Remove( (sal_uInt32) nPos );
+        sal_IntPtr nSortPos = m_O2S[nPos];
+        m_O2S.erase(m_O2S.begin() + nPos);
 
-        for ( j=1; j<=maO2S.Count(); j++ )
+        for (size_t j=1; j <= m_O2S.size(); ++j)
         {
-            sal_IntPtr nVal = reinterpret_cast<sal_IntPtr>( maO2S.GetObject( j ) );
+            sal_IntPtr nVal = m_O2S[j];
             if ( nVal > nSortPos )
             {
                 --nVal;
-                maO2S.Replace( reinterpret_cast<void*>(nVal), j );
+                m_O2S[j] = nVal;
             }
         }
 
         SortListData *pData = maS2O.Remove( nSortPos );
         if ( pData->mbModified )
-            maModList.Remove( static_cast<void*>(pData) );
+            m_ModList.erase(std::find(m_ModList.begin(), m_ModList.end(), pData));
         delete pData;
 
         // generate remove Event, but not for new entries
@@ -1535,7 +1534,7 @@ void SortedResultSet::Move( sal_IntPtr nPos, sal_IntPtr nCount, sal_IntPtr nOffs
 
     for ( i=0; i<nCount; i++ )
     {
-        nSortPos = reinterpret_cast<sal_IntPtr>(maO2S.GetObject( nPos+i ));
+        nSortPos = m_O2S[nPos + i];
         pData = maS2O.GetData( nSortPos );
         pData->mnCurPos += nOffset;
     }
@@ -1544,7 +1543,7 @@ void SortedResultSet::Move( sal_IntPtr nPos, sal_IntPtr nCount, sal_IntPtr nOffs
     {
         for ( i=nPos+nOffset; i<nPos; i++ )
         {
-            nSortPos = reinterpret_cast<sal_IntPtr>(maO2S.GetObject( i ));
+            nSortPos = m_O2S[i];
             pData = maS2O.GetData( nSortPos );
             pData->mnCurPos += nCount;
         }
@@ -1555,7 +1554,7 @@ void SortedResultSet::Move( sal_IntPtr nPos, sal_IntPtr nCount, sal_IntPtr nOffs
         sal_IntPtr nEnd = nStart + nOffset;
         for ( i=nStart; i<nEnd; i++ )
         {
-            nSortPos = reinterpret_cast<sal_IntPtr>(maO2S.GetObject( i ));
+            nSortPos = m_O2S[i];
             pData = maS2O.GetData( nSortPos );
             pData->mnCurPos -= nCount;
         }
@@ -1564,7 +1563,7 @@ void SortedResultSet::Move( sal_IntPtr nPos, sal_IntPtr nCount, sal_IntPtr nOffs
     // remember the to be moved entries
     std::unique_ptr<sal_IntPtr[]> pTmpArr(new sal_IntPtr[ nCount ]);
     for ( i=0; i<nCount; i++ )
-        pTmpArr[i] = reinterpret_cast<sal_IntPtr>(maO2S.GetObject( (sal_uInt32)( nPos+i ) ));
+        pTmpArr[i] = m_O2S[nPos + i];
 
     // now move the entries, which are in the way
     if ( nOffset < 0 )
@@ -1577,8 +1576,8 @@ void SortedResultSet::Move( sal_IntPtr nPos, sal_IntPtr nCount, sal_IntPtr nOffs
         // same for i here
         for ( i=0; i>nOffset; i-- )
         {
-            sal_IntPtr nVal = reinterpret_cast<sal_IntPtr>( maO2S.GetObject( (sal_uInt32)( nFrom+i ) ) );
-            maO2S.Replace( reinterpret_cast<void*>(nVal), (sal_uInt32)( nTo+i ) );
+            sal_IntPtr const nVal = m_O2S[nFrom + i];
+            m_O2S[nTo + i] = nVal;
         }
 
     }
@@ -1587,8 +1586,8 @@ void SortedResultSet::Move( sal_IntPtr nPos, sal_IntPtr nCount, sal_IntPtr nOffs
         sal_IntPtr nStart = nPos + nCount;
         for ( i=0; i<nOffset; i++ )
         {
-            sal_IntPtr nVal = reinterpret_cast<sal_IntPtr>( maO2S.GetObject( (sal_uInt32)( nStart+i ) ) );
-            maO2S.Replace( reinterpret_cast<void*>(nVal), (sal_uInt32)( nPos+i ) );
+            sal_IntPtr const nVal = m_O2S[nStart + i];
+            m_O2S[nPos + i] = nVal;
         }
     }
 
@@ -1596,7 +1595,7 @@ void SortedResultSet::Move( sal_IntPtr nPos, sal_IntPtr nCount, sal_IntPtr nOffs
     nTo = nPos + nOffset;
     for ( i=0; i<nCount; i++ )
     {
-        maO2S.Replace( reinterpret_cast<void*>(pTmpArr[ i ]), (sal_uInt32)( nTo+i ) );
+        m_O2S[nTo + i] = pTmpArr[i];
     }
 }
 
@@ -1656,14 +1655,14 @@ void SortedResultSet::SetChanged( sal_IntPtr nPos, sal_IntPtr nCount )
 {
     for ( sal_IntPtr i=0; i<nCount; i++ )
     {
-        sal_IntPtr nSortPos = reinterpret_cast<sal_IntPtr>(maO2S.GetObject( nPos ));
+        sal_IntPtr const nSortPos = m_O2S[nPos];
         if ( nSortPos < mnLastSort )
         {
             SortListData *pData = maS2O.GetData( nSortPos );
             if ( ! pData->mbModified )
             {
                 pData->mbModified = true;
-                maModList.Append( pData );
+                m_ModList.push_back(pData);
             }
         }
         nPos += 1;
@@ -1673,21 +1672,20 @@ void SortedResultSet::SetChanged( sal_IntPtr nPos, sal_IntPtr nCount )
 
 void SortedResultSet::ResortModified( EventList* pList )
 {
-    sal_uInt32 i, j;
     sal_IntPtr nCompare, nCurPos, nNewPos;
     sal_IntPtr nStart, nEnd, nOffset, nVal;
     ListAction *pAction;
 
     try {
-        for ( i=0; i<maModList.Count(); i++ )
+        for (size_t i = 0; i < m_ModList.size(); ++i)
         {
-            SortListData *pData = static_cast<SortListData*>(maModList.GetObject( i ));
+            SortListData *const pData = m_ModList[i];
             nCompare = CompareImpl( mxOther, mxOriginal,
                                     pData->mnOldPos, pData->mnCurPos );
             pData->mbModified = false;
             if ( nCompare != 0 )
             {
-                nCurPos = reinterpret_cast<sal_IntPtr>( maO2S.GetObject( (sal_uInt32) pData->mnCurPos ) );
+                nCurPos = m_O2S[pData->mnCurPos];
                 if ( nCompare < 0 )
                 {
                     nNewPos = FindPos( pData, 1, nCurPos-1 );
@@ -1708,17 +1706,17 @@ void SortedResultSet::ResortModified( EventList* pList )
                     // correct the lists!
                     maS2O.Remove( (sal_uInt32) nCurPos );
                     maS2O.Insert( pData, nNewPos );
-                        for ( j=1; j<maO2S.Count(); j++ )
+                    for (size_t j = 1; j < m_O2S.size(); ++j)
                     {
-                        nVal = reinterpret_cast<sal_IntPtr>( maO2S.GetObject( (sal_uInt32)j ) );
+                        nVal = m_O2S[j];
                         if ( ( nStart <= nVal ) && ( nVal <= nEnd ) )
                         {
                             nVal += nOffset;
-                            maO2S.Replace( reinterpret_cast<void*>(nVal), (sal_uInt32)j );
+                            m_O2S[j] = nVal;
                         }
                     }
 
-                    maO2S.Replace( reinterpret_cast<void*>(nNewPos), (sal_uInt32) pData->mnCurPos );
+                    m_O2S[pData->mnCurPos] = nNewPos;
 
                     pAction = new ListAction;
                     pAction->Position = nCurPos;
@@ -1736,31 +1734,30 @@ void SortedResultSet::ResortModified( EventList* pList )
         OSL_FAIL( "SortedResultSet::ResortModified() : Got unexpected SQLException" );
     }
 
-    maModList.Clear();
+    m_ModList.clear();
 }
 
 
 void SortedResultSet::ResortNew( EventList* pList )
 {
-    sal_IntPtr            i, j, nNewPos, nVal;
+    sal_IntPtr            i, nNewPos, nVal;
 
     try {
         for ( i = mnLastSort; i<(sal_IntPtr)maS2O.Count(); i++ )
         {
-            SortListData *pData = static_cast<SortListData*>(maModList.GetObject( i ));
+            SortListData *const pData = m_ModList[i];
             nNewPos = FindPos( pData, 1, mnLastSort );
             if ( nNewPos != i )
             {
                 maS2O.Remove( (sal_uInt32) i );
                 maS2O.Insert( pData, nNewPos );
-                // maO2S liste korigieren
-                for ( j=1; j<(sal_IntPtr)maO2S.Count(); j++ )
+                for (size_t j=1; j< m_O2S.size(); ++j)
                 {
-                    nVal = reinterpret_cast<sal_IntPtr>(maO2S.GetObject( (sal_uInt32)j ));
+                    nVal = m_O2S[j];
                     if ( nVal >= nNewPos )
-                        maO2S.Replace( reinterpret_cast<void*>(nVal+1), (sal_uInt32)( j ) );
+                        m_O2S[j] = nVal + 1;
                 }
-                maO2S.Replace( reinterpret_cast<void*>(nNewPos), (sal_uInt32) pData->mnCurPos );
+                m_O2S[pData->mnCurPos] = nNewPos;
             }
             mnLastSort++;
             pList->AddEvent( ListActionType::INSERTED, nNewPos );
@@ -1857,63 +1854,8 @@ sal_IntPtr SortedEntryList::operator [] ( sal_IntPtr nPos ) const
     }
 }
 
-
-void SimpleList::Remove( sal_uInt32 nPos )
-{
-    if ( nPos < (sal_uInt32) maData.size() )
-    {
-        maData.erase( maData.begin() + nPos );
-    }
-}
-
-
-void SimpleList::Remove( void* pData )
-{
-    bool    bFound = false;
-    sal_uInt32  i;
-
-    for ( i = 0; i < (sal_uInt32) maData.size(); i++ )
-    {
-        if ( maData[ i ] == pData )
-        {
-            bFound = true;
-            break;
-        }
-    }
-
-    if ( bFound )
-        maData.erase( maData.begin() + i );
-}
-
-
-void SimpleList::Insert( void* pData, sal_uInt32 nPos )
-{
-    if ( nPos < (sal_uInt32) maData.size() )
-        maData.insert( maData.begin() + nPos, pData );
-    else
-        maData.push_back( pData );
-}
-
-
-void* SimpleList::GetObject( sal_uInt32 nPos ) const
-{
-    if ( nPos < (sal_uInt32) maData.size() )
-        return maData[ nPos ];
-    else
-        return nullptr;
-}
-
-
-void SimpleList::Replace( void* pData, sal_uInt32 nPos )
-{
-    if ( nPos < (sal_uInt32) maData.size() )
-        maData[ nPos ] = pData;
-}
-
-
 // class SRSPropertySetInfo.
 
-
 SRSPropertySetInfo::SRSPropertySetInfo()
 {
     maProps[0].Name = "RowCount";
diff --git a/ucb/source/sorter/sortresult.hxx b/ucb/source/sorter/sortresult.hxx
index af481be..c7c7b26 100644
--- a/ucb/source/sorter/sortresult.hxx
+++ b/ucb/source/sorter/sortresult.hxx
@@ -85,28 +85,6 @@ public:
 };
 
 
-class SimpleList
-{
-    std::deque < void* > maData;
-
-public:
-                     SimpleList(){}
-                    ~SimpleList(){ Clear(); }
-
-    sal_uInt32      Count() { return (sal_uInt32) maData.size(); }
-    void            Clear() { maData.clear(); }
-
-    void            Remove( sal_uInt32 nPos );
-    void            Remove( void* pData );
-
-    void            Append( void* pData )
-                        { maData.push_back( pData ); }
-    void            Insert( void* pData, sal_uInt32 nPos );
-    void*           GetObject( sal_uInt32 nPos ) const;
-    void            Replace( void* pData, sal_uInt32 nPos );
-};
-
-
 #define RESULTSET_SERVICE_NAME  "com.sun.star.ucb.SortedResultSet"
 
 
@@ -131,8 +109,8 @@ class SortedResultSet: public cppu::WeakImplHelper <
     SortInfo*           mpSortInfo;
     osl::Mutex          maMutex;
     SortedEntryList     maS2O;          // maps the sorted entries to the original ones
-    SimpleList          maO2S;          // maps the original Entries to the sorted ones
-    SimpleList          maModList;      // keeps track of modified entries
+    std::deque<sal_IntPtr> m_O2S;       /// maps the original Entries to the sorted ones
+    std::deque<SortListData*> m_ModList; /// keeps track of modified entries
     sal_IntPtr          mnLastSort;     // index of the last sorted entry;
     sal_IntPtr          mnCurEntry;     // index of the current entry
     sal_IntPtr          mnCount;        // total count of the elements


More information about the Libreoffice-commits mailing list