diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-01 13:09:25 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-01 13:12:42 +0100 |
commit | 9ca8a63fff65acf2ea13b391495ad232f4636548 (patch) | |
tree | 31a8e255ec7029e08b847d33d8567c22b32b2a56 /sw | |
parent | d9262e19c942f2719bfa7de3a5059e4f6e0039c6 (diff) |
Use consistent integer types in the SwRedlineTable interface
ddd84d08c9bb6e00fbd9a73bd52a28688a8c1ba7 "Convert
SV_DECL_PTRARR_SORT_DEL(_SwRedlineTbl) to o3tl::sorted_vector" had introduced
size and operator[] operating on underlying vector's size_type, but had left the
other functions at sal_uInt16. Keep everything at sal_uInt16 for now until
fixing everything to use that underlying vector size_type instead.
Change-Id: I92570dcb8ab5fa88b52e2b24899b833829693a88
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/docary.hxx | 5 | ||||
-rw-r--r-- | sw/qa/core/uwriter.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 8 |
3 files changed, 9 insertions, 6 deletions
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index 45f9e4509ed3..2de106f9fc1e 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -318,7 +318,10 @@ class SwRedlineTable public: typedef o3tl::sorted_vector<SwRangeRedline*, CompareSwRedlineTable, o3tl::find_partialorder_ptrequals> vector_type; - typedef vector_type::size_type size_type; + typedef sal_uInt16 size_type; + //TOOD: should be vector_type::size_type, but then all the uses of + // sal_uInt16 in this class that represent positions in maVector need to + // be changed, too private: vector_type maVector; public: diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index c0c45601fc8a..a32605d932d3 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -775,7 +775,7 @@ void SwDocTest::testSwScanner() const SwRedlineTable& rTable = m_pDoc->getIDocumentRedlineAccess().GetRedlineTable(); SwNodes& rNds = m_pDoc->GetNodes(); - CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rTable.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(1), rTable.size()); SwNodeIndex* pNodeIdx = rTable[0]->GetContentIdx(); CPPUNIT_ASSERT(pNodeIdx); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index d9c76ba5c459..dd969a437a50 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -839,7 +839,7 @@ void SwUiWriterTest::testCp1000071() SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable(); - CPPUNIT_ASSERT_EQUAL( size_t( 2 ), rTable.size()); + CPPUNIT_ASSERT_EQUAL( SwRedlineTable::size_type( 2 ), rTable.size()); sal_uLong redlineStart0NodeIndex = rTable[ 0 ]->Start()->nNode.GetIndex(); sal_Int32 redlineStart0Index = rTable[ 0 ]->Start()->nContent.GetIndex(); sal_uLong redlineEnd0NodeIndex = rTable[ 0 ]->End()->nNode.GetIndex(); @@ -861,7 +861,7 @@ void SwUiWriterTest::testCp1000071() rUndoManager.Undo(); // Check that redlines are the same like at the beginning. - CPPUNIT_ASSERT_EQUAL( size_t( 2 ), rTable.size()); + CPPUNIT_ASSERT_EQUAL( SwRedlineTable::size_type( 2 ), rTable.size()); CPPUNIT_ASSERT_EQUAL( redlineStart0NodeIndex, rTable[ 0 ]->Start()->nNode.GetIndex()); CPPUNIT_ASSERT_EQUAL( redlineStart0Index, rTable[ 0 ]->Start()->nContent.GetIndex()); CPPUNIT_ASSERT_EQUAL( redlineEnd0NodeIndex, rTable[ 0 ]->End()->nNode.GetIndex()); @@ -4012,7 +4012,7 @@ void SwUiWriterTest::testRedlineViewAuthor() // Now assert that SwView::SetRedlineAuthor() had an effect. const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable(); - CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rTable.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(1), rTable.size()); SwRangeRedline* pRedline = rTable[0]; // This was 'Unknown Author' instead of 'A U. Thor'. CPPUNIT_ASSERT_EQUAL(aAuthor, pRedline->GetAuthorString()); @@ -4067,7 +4067,7 @@ void SwUiWriterTest::testRedlineTimestamp() // The relatively rare case when waiting for a second also changes the minute. return; - CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rTable.size()); + CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), rTable.size()); sal_uInt16 nSec1 = rTable[0]->GetRedlineData().GetTimeStamp().GetSec(); sal_uInt16 nSec2 = rTable[1]->GetRedlineData().GetTimeStamp().GetSec(); // This failed, seconds was always 0. |