SV_DECL_VARARR_SORT(ScRTFColTwips) o3tl::sorted_vector
Change-Id: I6d048af2b32ad02952cfe91d155ca17f5067ecee
diff --git a/sc/source/filter/inc/rtfparse.hxx b/sc/source/filter/inc/rtfparse.hxx
index 3b43648..c381378d 100644
--- a/sc/source/filter/inc/rtfparse.hxx
+++ b/sc/source/filter/inc/rtfparse.hxx
@@ -33,6 +33,7 @@
#ifdef SC_RTFPARSE_CXX
#include <boost/ptr_container/ptr_vector.hpp>
#include <o3tl/sorted_vector.hxx>
struct ScRTFCellDefault
{
@@ -46,7 +47,7 @@ struct ScRTFCellDefault
};
// deswegen ULONG, typedef bringt's auch nicht :-(
SV_DECL_VARARR_SORT( ScRTFColTwips, sal_uLong, 16 )
class ScRTFColTwips : public o3tl::sorted_vector<sal_uLong> {};
#else // SC_RTFPARSE_CXX
diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx
index 40e848f..511d905 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -46,9 +46,6 @@
SV_IMPL_VARARR_SORT( ScRTFColTwips, sal_uLong );
ScRTFParser::ScRTFParser( EditEngine* pEditP ) :
ScEEParser( pEditP ),
@@ -126,12 +123,13 @@ inline void ScRTFParser::NextRow()
sal_Bool ScRTFParser::SeekTwips( sal_uInt16 nTwips, SCCOL* pCol )
{
sal_uInt16 nPos;
sal_Bool bFound = pColTwips->Seek_Entry( nTwips, &nPos );
ScRTFColTwips::const_iterator it = pColTwips->find( nTwips );
sal_Bool bFound = it != pColTwips->end();
sal_uInt16 nPos = it - pColTwips->end();
*pCol = static_cast<SCCOL>(nPos);
if ( bFound )
return sal_True;
sal_uInt16 nCount = pColTwips->Count();
sal_uInt16 nCount = pColTwips->size();
if ( !nCount )
return false;
SCCOL nCol = *pCol;
@@ -173,7 +171,7 @@ void ScRTFParser::ColAdjust()
nColMax = nCol;
}
nStartAdjust = (sal_uLong)~0;
pColTwips->Remove( (sal_uInt16)0, pColTwips->Count() );
pColTwips->clear();
}
}
@@ -252,7 +250,7 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
const ScRTFCellDefault& rD = maDefaultList[i];
SCCOL nCol;
if ( !SeekTwips(rD.nTwips, &nCol) )
pColTwips->Insert( rD.nTwips );
pColTwips->insert( rD.nTwips );
}
}
pDefMerge = NULL;