Kaydet (Commit) d8a17866 authored tarafından Noel Grandin's avatar Noel Grandin

fix build after my hasty commit

10a1b861
"convert MarkType to enum class"

Change-Id: Iad1c294c4836ededea23c5edcb67dea54dd5357a
üst 90a684b3
...@@ -203,7 +203,7 @@ void SwMacrosTest::testBookmarkDeleteAndJoin() ...@@ -203,7 +203,7 @@ void SwMacrosTest::testBookmarkDeleteAndJoin()
aPaM.Move(fnMoveForward, fnGoDoc); aPaM.Move(fnMoveForward, fnGoDoc);
IDocumentMarkAccess & rIDMA = *pDoc->getIDocumentMarkAccess(); IDocumentMarkAccess & rIDMA = *pDoc->getIDocumentMarkAccess();
sw::mark::IMark *pMark = sw::mark::IMark *pMark =
rIDMA.makeMark(aPaM, "test", IDocumentMarkAccess::BOOKMARK); rIDMA.makeMark(aPaM, "test", IDocumentMarkAccess::MarkType::BOOKMARK);
CPPUNIT_ASSERT(pMark); CPPUNIT_ASSERT(pMark);
// select so pMark start position is on a node that is fully deleted // select so pMark start position is on a node that is fully deleted
aPaM.Move(fnMoveBackward, fnGoNode); aPaM.Move(fnMoveBackward, fnGoNode);
......
...@@ -1179,19 +1179,19 @@ void SwDocTest::testMarkMove() ...@@ -1179,19 +1179,19 @@ void SwDocTest::testMarkMove()
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 1")); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 1"));
aPaM.SetMark(); aPaM.SetMark();
aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex(); aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex();
pMarksAccess->makeMark(aPaM, OUString("Para1"), IDocumentMarkAccess::BOOKMARK); pMarksAccess->makeMark(aPaM, OUString("Para1"), IDocumentMarkAccess::MarkType::BOOKMARK);
m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 2")); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 2"));
aPaM.SetMark(); aPaM.SetMark();
aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex(); aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex();
pMarksAccess->makeMark(aPaM, OUString("Para2"), IDocumentMarkAccess::BOOKMARK); pMarksAccess->makeMark(aPaM, OUString("Para2"), IDocumentMarkAccess::MarkType::BOOKMARK);
m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 3")); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 3"));
aPaM.SetMark(); aPaM.SetMark();
aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex(); aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex();
pMarksAccess->makeMark(aPaM, OUString("Para3"), IDocumentMarkAccess::BOOKMARK); pMarksAccess->makeMark(aPaM, OUString("Para3"), IDocumentMarkAccess::MarkType::BOOKMARK);
} }
// join paragraph 2 and 3 and check // join paragraph 2 and 3 and check
......
...@@ -245,7 +245,7 @@ int MMTest::documentStartPageNumber( int document ) const ...@@ -245,7 +245,7 @@ int MMTest::documentStartPageNumber( int document ) const
int pos = 0; int pos = 0;
for( mark = marks->getAllMarksBegin(); mark != marks->getAllMarksEnd() && pos < document; ++mark ) for( mark = marks->getAllMarksBegin(); mark != marks->getAllMarksEnd() && pos < document; ++mark )
{ {
if( IDocumentMarkAccess::GetType( **mark ) == IDocumentMarkAccess::UNO_BOOKMARK ) if( IDocumentMarkAccess::GetType( **mark ) == IDocumentMarkAccess::MarkType::UNO_BOOKMARK )
++pos; ++pos;
} }
CPPUNIT_ASSERT( pos == document ); CPPUNIT_ASSERT( pos == document );
......
...@@ -708,7 +708,7 @@ void SwUiWriterTest::testBookmarkUndo() ...@@ -708,7 +708,7 @@ void SwUiWriterTest::testBookmarkUndo()
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
SwPaM aPaM( SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1) ); SwPaM aPaM( SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1) );
pMarkAccess->makeMark(aPaM, OUString("Mark"), IDocumentMarkAccess::BOOKMARK); pMarkAccess->makeMark(aPaM, OUString("Mark"), IDocumentMarkAccess::MarkType::BOOKMARK);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
rUndoManager.Undo(); rUndoManager.Undo();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount()); CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment