summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-05-20 13:05:49 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-05-20 13:05:49 +0200
commitab465b90f6c6da5595393a0ba73f33a1e71a2b65 (patch)
tree36b77192de2799a11b4bf0b269cb3f74d0a0bb1f /sw/qa
parent0db96caf0fcce09b87621c11b584a6d81cc7df86 (diff)
bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-point
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/complex/accessibility/AccessibleRelationSet.java12
-rw-r--r--sw/qa/complex/writer/CheckCrossReferences.java112
-rw-r--r--sw/qa/complex/writer/CheckTable.java2
-rw-r--r--sw/qa/core/macros-test.cxx38
-rw-r--r--sw/qa/core/test_ToxLinkProcessor.cxx16
-rw-r--r--sw/qa/core/test_ToxTextGenerator.cxx8
-rw-r--r--sw/qa/core/uwriter.cxx314
-rw-r--r--sw/qa/extras/globalfilter/globalfilter.cxx6
-rw-r--r--sw/qa/extras/htmlimport/htmlimport.cxx12
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx12
-rw-r--r--sw/qa/extras/mailmerge/mailmerge.cxx34
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx74
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx2
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx2
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx8
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx134
-rw-r--r--sw/qa/python/check_table.py2
18 files changed, 395 insertions, 395 deletions
diff --git a/sw/qa/complex/accessibility/AccessibleRelationSet.java b/sw/qa/complex/accessibility/AccessibleRelationSet.java
index 562bcfe98d7e..b1d0b4cc58ea 100644
--- a/sw/qa/complex/accessibility/AccessibleRelationSet.java
+++ b/sw/qa/complex/accessibility/AccessibleRelationSet.java
@@ -71,11 +71,11 @@ public class AccessibleRelationSet {
"didn't gain correct relation type for paragraph 0", types[2],
types[firstrelation]);
- XAccessibleText paraTxt2 =
+ XAccessibleText paraText2 =
UnoRuntime.queryInterface(XAccessibleText.class, para2);
assertEquals(
"didn't gain correct target paragraph", atarget.getText(),
- paraTxt2.getText());
+ paraText2.getText());
}
@Test public void contents_flows_from() {
@@ -131,21 +131,21 @@ public class AccessibleRelationSet {
"didn't gain correct relation type for paragraph 1", types[1],
types[relationtypes[0]]);
- XAccessibleText paraTxt1 =
+ XAccessibleText paraText1 =
UnoRuntime.queryInterface(XAccessibleText.class, para1);
assertEquals(
"didn't gain correct target paragraph", atargets[0].getText(),
- paraTxt1.getText());
+ paraText1.getText());
assertEquals(
"didn't gain correct relation type for paragraph 3", types[2],
types[relationtypes[1]]);
- XAccessibleText paraTxt3 =
+ XAccessibleText paraText3 =
UnoRuntime.queryInterface(XAccessibleText.class, para3);
assertEquals(
"didn't gain correct target paragraph", atargets[1].getText(),
- paraTxt3.getText());
+ paraText3.getText());
}
@Before public void before()
diff --git a/sw/qa/complex/writer/CheckCrossReferences.java b/sw/qa/complex/writer/CheckCrossReferences.java
index 508ca6cf6a04..651604b439b7 100644
--- a/sw/qa/complex/writer/CheckCrossReferences.java
+++ b/sw/qa/complex/writer/CheckCrossReferences.java
@@ -33,7 +33,7 @@ public class CheckCrossReferences {
private com.sun.star.container.XEnumeration xParaEnum;
private com.sun.star.container.XEnumeration xPortionEnum;
- private com.sun.star.util.XRefreshable xFldsRefresh;
+ private com.sun.star.util.XRefreshable xFieldsRefresh;
public com.sun.star.text.XTextField getNextField()
throws com.sun.star.uno.Exception
@@ -86,18 +86,18 @@ public class CheckCrossReferences {
public void checkField( com.sun.star.text.XTextField xField,
com.sun.star.beans.XPropertySet xProps,
short nFormat,
- String aExpectedFldResult )
+ String aExpectedFieldResult )
throws com.sun.star.uno.Exception
{
// set requested format
xProps.setPropertyValue("ReferenceFieldPart", Short.valueOf(nFormat));
// refresh fields in order to get new format applied
- xFldsRefresh.refresh();
+ xFieldsRefresh.refresh();
- String aFldResult = xField.getPresentation( false );
+ String aFieldResult = xField.getPresentation( false );
assertEquals( "set reference field format doesn't result in correct field result",
- aExpectedFldResult, aFldResult);
+ aExpectedFieldResult, aFieldResult);
}
@Test public void checkCrossReferences() throws com.sun.star.uno.Exception {
@@ -114,25 +114,25 @@ public class CheckCrossReferences {
com.sun.star.text.XTextFieldsSupplier xFieldSupp =
UnoRuntime.queryInterface(
com.sun.star.text.XTextFieldsSupplier.class, document);
- xFldsRefresh = UnoRuntime.queryInterface(
+ xFieldsRefresh = UnoRuntime.queryInterface(
com.sun.star.util.XRefreshable.class, xFieldSupp.getTextFields());
}
// check first reference field
{
// strings for checking
- final String FldResult1 = "*i*";
- final String FldResult2 = "+b+*i*";
- final String FldResult3 = "-1-+b+*i*";
- final String FldResult4 = "1";
- final String FldResult5 = "1";
- final String FldResult6 = "A.1";
- final String FldResult7 = "2(a)";
- final String FldResult8 = "2(b)";
- final String FldResult9 = "2";
- final String FldResult10 = "1(a)";
- final String FldResult11 = "(b)";
- final String FldResult12 = "(a)";
+ final String FieldResult1 = "*i*";
+ final String FieldResult2 = "+b+*i*";
+ final String FieldResult3 = "-1-+b+*i*";
+ final String FieldResult4 = "1";
+ final String FieldResult5 = "1";
+ final String FieldResult6 = "A.1";
+ final String FieldResult7 = "2(a)";
+ final String FieldResult8 = "2(b)";
+ final String FieldResult9 = "2";
+ final String FieldResult10 = "1(a)";
+ final String FieldResult11 = "(b)";
+ final String FieldResult12 = "(a)";
// variables for current field
com.sun.star.text.XTextField xField = null;
@@ -140,75 +140,75 @@ public class CheckCrossReferences {
xField = getNextField();
xProps = getFieldProps( xField );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult2 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult1 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult3 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FieldResult2 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FieldResult1 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FieldResult3 );
xField = getNextField();
xProps = getFieldProps( xField );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult1 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult1 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult3 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FieldResult1 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FieldResult1 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FieldResult3 );
xField = getNextField();
xProps = getFieldProps( xField );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult3 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult1 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult3 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FieldResult3 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FieldResult1 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FieldResult3 );
xField = getNextField();
xProps = getFieldProps( xField );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult5 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult4 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult6 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FieldResult5 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FieldResult4 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FieldResult6 );
xField = getNextField();
xProps = getFieldProps( xField );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult4 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult4 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult6 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FieldResult4 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FieldResult4 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FieldResult6 );
xField = getNextField();
xProps = getFieldProps( xField );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult6 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult4 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult6 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FieldResult6 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FieldResult4 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FieldResult6 );
xField = getNextField();
xProps = getFieldProps( xField );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult7 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult12 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult7 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FieldResult7 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FieldResult12 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FieldResult7 );
xField = getNextField();
xProps = getFieldProps( xField );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult8 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult11 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult8 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FieldResult8 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FieldResult11 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FieldResult8 );
xField = getNextField();
xProps = getFieldProps( xField );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult9 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult9 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult9 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FieldResult9 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FieldResult9 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FieldResult9 );
xField = getNextField();
xProps = getFieldProps( xField );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult4 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult4 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult4 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FieldResult4 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FieldResult4 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FieldResult4 );
xField = getNextField();
xProps = getFieldProps( xField );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult10 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult12 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult10 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FieldResult10 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FieldResult12 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FieldResult10 );
xField = getNextField();
xProps = getFieldProps( xField );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult12 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FldResult12 );
- checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FldResult7 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FieldResult12 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_NO_CONTEXT, FieldResult12 );
+ checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER_FULL_CONTEXT, FieldResult7 );
}
// insert a certain cross-reference bookmark and a reference field to this bookmark
@@ -267,7 +267,7 @@ public class CheckCrossReferences {
UnoRuntime.queryInterface(
com.sun.star.text.XTextRange.class, xParaEnum.nextElement());
xNewField.attach(xFieldTextRange.getEnd());
- xFldsRefresh.refresh();
+ xFieldsRefresh.refresh();
}
// check inserted reference field
@@ -278,7 +278,7 @@ public class CheckCrossReferences {
"J", xField.getPresentation( false ) );
xParaTextRange.getStart().setString( "Hallo new bookmark: " );
- xFldsRefresh.refresh();
+ xFieldsRefresh.refresh();
assertEquals( "inserted reference field doesn't has correct field result",
"Hallo new bookmark: J", xField.getPresentation( false ) );
}
diff --git a/sw/qa/complex/writer/CheckTable.java b/sw/qa/complex/writer/CheckTable.java
index 83b92da818f8..e4d33d3ee6f1 100644
--- a/sw/qa/complex/writer/CheckTable.java
+++ b/sw/qa/complex/writer/CheckTable.java
@@ -275,7 +275,7 @@ public class CheckTable
// get anchor
XTextRange xAnchor = xTable.getAnchor();
// check all properties on the anchor - shouldn't crash despite
- // pointing to a non-SwTxtNode
+ // pointing to a non-SwTextNode
XPropertySet xProps = UnoRuntime.queryInterface(XPropertySet.class, xAnchor);
XPropertySetInfo xPropsInfo = xProps.getPropertySetInfo();
Property[] props = xPropsInfo.getProperties();
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index c754bb431517..5b90d8acfe80 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -193,14 +193,14 @@ void SwMacrosTest::testBookmarkDeleteAndJoin()
SwPaM aPaM(aIdx);
IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations());
- rIDCO.AppendTxtNode(*aPaM.GetPoint());
+ rIDCO.AppendTextNode(*aPaM.GetPoint());
rIDCO.InsertString(aPaM, OUString("A"));
- rIDCO.AppendTxtNode(*aPaM.GetPoint());
+ rIDCO.AppendTextNode(*aPaM.GetPoint());
rIDCO.InsertString(aPaM, OUString("A"));
- rIDCO.AppendTxtNode(*aPaM.GetPoint());
+ rIDCO.AppendTextNode(*aPaM.GetPoint());
aPaM.Move(fnMoveBackward, fnGoNode);
aPaM.Move(fnMoveBackward, fnGoNode);
- aPaM.Move(fnMoveBackward, fnGoCntnt);
+ aPaM.Move(fnMoveBackward, fnGoContent);
aPaM.SetMark();
aPaM.Move(fnMoveForward, fnGoDoc);
IDocumentMarkAccess & rIDMA = *pDoc->getIDocumentMarkAccess();
@@ -210,7 +210,7 @@ void SwMacrosTest::testBookmarkDeleteAndJoin()
// select so pMark start position is on a node that is fully deleted
aPaM.Move(fnMoveBackward, fnGoNode);
// must leave un-selected content in last node to get the bJoinPrev flag!
- aPaM.Move(fnMoveBackward, fnGoCntnt);
+ aPaM.Move(fnMoveBackward, fnGoContent);
aPaM.Exchange();
aPaM.Move(fnMoveBackward, fnGoDoc);
// delete
@@ -219,8 +219,8 @@ void SwMacrosTest::testBookmarkDeleteAndJoin()
for (IDocumentMarkAccess::const_iterator_t i = rIDMA.getAllMarksBegin(); i != rIDMA.getAllMarksEnd(); ++i)
{
// problem was that the nContent was pointing at deleted node
- CPPUNIT_ASSERT((*i)->GetMarkStart().nNode.GetNode().GetCntntNode() ==
- static_cast<const SwCntntNode*>((*i)->GetMarkStart().nContent.GetIdxReg()));
+ CPPUNIT_ASSERT((*i)->GetMarkStart().nNode.GetNode().GetContentNode() ==
+ static_cast<const SwContentNode*>((*i)->GetMarkStart().nContent.GetIdxReg()));
}
}
@@ -232,11 +232,11 @@ void SwMacrosTest::testBookmarkDeleteTdf90816()
SwPaM aPaM(aIdx);
IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations());
- rIDCO.AppendTxtNode(*aPaM.GetPoint());
+ rIDCO.AppendTextNode(*aPaM.GetPoint());
rIDCO.InsertString(aPaM, OUString("ABC"));
- aPaM.Move(fnMoveBackward, fnGoCntnt);
+ aPaM.Move(fnMoveBackward, fnGoContent);
aPaM.SetMark();
- aPaM.Move(fnMoveBackward, fnGoCntnt);
+ aPaM.Move(fnMoveBackward, fnGoContent);
IDocumentMarkAccess & rIDMA = *pDoc->getIDocumentMarkAccess();
sw::mark::IMark *pMark =
rIDMA.makeMark(aPaM, "test", IDocumentMarkAccess::MarkType::BOOKMARK);
@@ -435,18 +435,18 @@ void SwMacrosTest::testFindReplace()
// we need a full document with view and layout etc. because ::GetNode()
Reference<lang::XComponent> const xComponent =
loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
- SwXTextDocument *const pTxtDoc = dynamic_cast<SwXTextDocument *>(xComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- SwDoc *const pDoc = pTxtDoc->GetDocShell()->GetDoc();
+ SwXTextDocument *const pTextDoc = dynamic_cast<SwXTextDocument *>(xComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc *const pDoc = pTextDoc->GetDocShell()->GetDoc();
SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
// use a UnoCrsr so it will be corrected when deleting nodes
SwUnoCrsr *const pPaM(pDoc->CreateUnoCrsr(SwPosition(aIdx), false));
IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations());
rIDCO.InsertString(*pPaM, OUString("foo"));
- rIDCO.AppendTxtNode(*pPaM->GetPoint());
+ rIDCO.AppendTextNode(*pPaM->GetPoint());
rIDCO.InsertString(*pPaM, OUString("bar"));
- rIDCO.AppendTxtNode(*pPaM->GetPoint());
+ rIDCO.AppendTextNode(*pPaM->GetPoint());
rIDCO.InsertString(*pPaM, OUString("baz"));
pPaM->Move(fnMoveBackward, fnGoDoc);
@@ -467,7 +467,7 @@ void SwMacrosTest::testFindReplace()
opts, false, DOCPOS_CURR, DOCPOS_END, bCancel, FND_IN_BODY, false);
CPPUNIT_ASSERT(bFound);
CPPUNIT_ASSERT(pPaM->HasMark());
- CPPUNIT_ASSERT_EQUAL(OUString(""), pPaM->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), pPaM->GetText());
// now do another Find, inside the selection from the first Find
// opts.searchFlags = 71680;
@@ -475,7 +475,7 @@ void SwMacrosTest::testFindReplace()
opts, false, DOCPOS_CURR, DOCPOS_END, bCancel, FND_IN_SEL, false);
CPPUNIT_ASSERT(bFound);
CPPUNIT_ASSERT(pPaM->HasMark());
- CPPUNIT_ASSERT_EQUAL(OUString(""), pPaM->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString(""), pPaM->GetText());
rIDCO.ReplaceRange(*pPaM, " ", true);
@@ -484,10 +484,10 @@ void SwMacrosTest::testFindReplace()
// problem was that after the 2nd Find, the wrong newline was selected
CPPUNIT_ASSERT_EQUAL(OUString("foo bar"),
- pPaM->Start()->nNode.GetNode().GetTxtNode()->GetTxt());
+ pPaM->Start()->nNode.GetNode().GetTextNode()->GetText());
pPaM->Move(fnMoveForward, fnGoNode);
CPPUNIT_ASSERT_EQUAL(OUString("baz"),
- pPaM->End()->nNode.GetNode().GetTxtNode()->GetTxt());
+ pPaM->End()->nNode.GetNode().GetTextNode()->GetText());
}
SwMacrosTest::SwMacrosTest()
diff --git a/sw/qa/core/test_ToxLinkProcessor.cxx b/sw/qa/core/test_ToxLinkProcessor.cxx
index 7c16c18b03a6..e768c210ce2b 100644
--- a/sw/qa/core/test_ToxLinkProcessor.cxx
+++ b/sw/qa/core/test_ToxLinkProcessor.cxx
@@ -104,8 +104,8 @@ ToxLinkProcessorTest::LinkIsCreatedCorrectly()
sut.StartNewLink(0, STYLE_NAME_1);
sut.CloseLink(1, URL_1);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Style is stored correctly in link", STYLE_NAME_1, sut.mClosedLinks.at(0).mINetFmt.GetVisitedFmt());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Url is stored correctly in link", URL_1, sut.mClosedLinks.at(0).mINetFmt.GetValue());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Style is stored correctly in link", STYLE_NAME_1, sut.mClosedLinks.at(0).mINetFormat.GetVisitedFormat());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Url is stored correctly in link", URL_1, sut.mClosedLinks.at(0).mINetFormat.GetValue());
}
void
@@ -122,18 +122,18 @@ ToxLinkProcessorTest::LinkSequenceIsPreserved()
// check first closed element
CPPUNIT_ASSERT_EQUAL_MESSAGE("Style is stored correctly in link",
- STYLE_NAME_2, sut.mClosedLinks.at(0).mINetFmt.GetVisitedFmt());
+ STYLE_NAME_2, sut.mClosedLinks.at(0).mINetFormat.GetVisitedFormat());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Pool id is stored correctly in link",
- POOL_ID_2, sut.mClosedLinks.at(0).mINetFmt.GetINetFmtId());
+ POOL_ID_2, sut.mClosedLinks.at(0).mINetFormat.GetINetFormatId());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Url is stored correctly in link",
- URL_2, sut.mClosedLinks.at(0).mINetFmt.GetValue());
+ URL_2, sut.mClosedLinks.at(0).mINetFormat.GetValue());
// check second closed element
CPPUNIT_ASSERT_EQUAL_MESSAGE("Style is stored correctly in link",
- STYLE_NAME_1, sut.mClosedLinks.at(1).mINetFmt.GetVisitedFmt());
+ STYLE_NAME_1, sut.mClosedLinks.at(1).mINetFormat.GetVisitedFormat());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Pool id is stored correctly in link",
- POOL_ID_1, sut.mClosedLinks.at(1).mINetFmt.GetINetFmtId());
+ POOL_ID_1, sut.mClosedLinks.at(1).mINetFormat.GetINetFormatId());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Url is stored correctly in link",
- URL_1, sut.mClosedLinks.at(1).mINetFmt.GetValue());
+ URL_1, sut.mClosedLinks.at(1).mINetFormat.GetValue());
}
// Put the test suite in the registry
diff --git a/sw/qa/core/test_ToxTextGenerator.cxx b/sw/qa/core/test_ToxTextGenerator.cxx
index 2101c4a8b825..0dcda9f18717 100644
--- a/sw/qa/core/test_ToxTextGenerator.cxx
+++ b/sw/qa/core/test_ToxTextGenerator.cxx
@@ -86,7 +86,7 @@ void
ToxTextGeneratorTest::EmptyStringIsReturnedAsNumStringIfNoTextMarkIsSet()
{
MockedSortTab sortTab;
- sortTab.pTxtMark = NULL;
+ sortTab.pTextMark = NULL;
OUString expected("");
OUString actual = ToxTextGenerator::GetNumStringOfFirstNode(sortTab, false, 0);
@@ -97,7 +97,7 @@ void
ToxTextGeneratorTest::EmptyStringIsReturnedAsNumStringIfToxSourcesIsEmpty()
{
MockedSortTab sortTab;
- sortTab.pTxtMark = reinterpret_cast<SwTxtTOXMark*>(1);
+ sortTab.pTextMark = reinterpret_cast<SwTextTOXMark*>(1);
OUString expected("");
OUString actual = ToxTextGenerator::GetNumStringOfFirstNode(sortTab, false, 0);
@@ -107,7 +107,7 @@ ToxTextGeneratorTest::EmptyStringIsReturnedAsNumStringIfToxSourcesIsEmpty()
class MockedToxTabStopTokenHandler : public ToxTabStopTokenHandler {
public:
virtual HandledTabStopToken
- HandleTabStopToken(const SwFormToken& aToken, const SwTxtNode& targetNode,
+ HandleTabStopToken(const SwFormToken& aToken, const SwTextNode& targetNode,
const SwRootFrm *currentLayout) const SAL_OVERRIDE {
(void)(aToken); (void)(targetNode); (void)(currentLayout); // avoid unused warnings.
return HandledTabStopToken();
@@ -128,7 +128,7 @@ public:
private:
SwChapterField
ObtainChapterField(SwChapterFieldType* chapterFieldType, const SwFormToken* chapterToken,
- const SwCntntFrm* contentFrame, const SwCntntNode *contentNode) const SAL_OVERRIDE {
+ const SwContentFrm* contentFrame, const SwContentNode *contentNode) const SAL_OVERRIDE {
// get rid of 'unused-parameters' warnings
(void)(chapterFieldType);(void)(chapterToken);(void)(contentFrame);(void)(contentNode);
return mChapterField;
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 6e7e3092942f..966a2aa23bbf 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -270,30 +270,30 @@ void SwDocTest::testUserPerceivedCharCount()
CPPUNIT_ASSERT_MESSAGE("Surrogate Pair should be counted as single character", nCount == 1);
}
-SwTxtNode* getModelToViewTestDocument(SwDoc *pDoc)
+SwTextNode* getModelToViewTestDocument(SwDoc *pDoc)
{
SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
SwPaM aPaM(aIdx);
- SwFmtFtn aFtn;
- aFtn.SetNumStr(OUString("foo"));
+ SwFormatFootnote aFootnote;
+ aFootnote.SetNumStr(OUString("foo"));
- pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("AAAAA BBBBB "));
- SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
sal_Int32 nPos = aPaM.GetPoint()->nContent.GetIndex();
- pTxtNode->InsertItem(aFtn, nPos, nPos);
+ pTextNode->InsertItem(aFootnote, nPos, nPos);
pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(" CCCCC "));
nPos = aPaM.GetPoint()->nContent.GetIndex();
- pTxtNode->InsertItem(aFtn, nPos, nPos);
+ pTextNode->InsertItem(aFootnote, nPos, nPos);
pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(" DDDDD"));
- CPPUNIT_ASSERT(pTxtNode->GetTxt().getLength() == (4*5) + 5 + 2);
+ CPPUNIT_ASSERT(pTextNode->GetText().getLength() == (4*5) + 5 + 2);
//set start of selection to first B
- aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(), 6);
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 6);
aPaM.SetMark();
//set end of selection to last C
- aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(), 14);
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 14);
//set character attribute hidden on range
SvxCharHiddenItem aHidden(true, RES_CHRATR_HIDDEN);
pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, aHidden );
@@ -305,24 +305,24 @@ SwTxtNode* getModelToViewTestDocument(SwDoc *pDoc)
CPPUNIT_ASSERT_MESSAGE("redlines should be visible", IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineMode()));
//set start of selection to last A
- aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(), 4);
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 4);
aPaM.SetMark();
//set end of selection to second last B
- aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(), 9);
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 9);
pDoc->getIDocumentContentOperations().DeleteAndJoin(aPaM); //redline-aware deletion api
aPaM.DeleteMark();
- return pTxtNode;
+ return pTextNode;
}
-SwTxtNode* getModelToViewTestDocument2(SwDoc *pDoc)
+SwTextNode* getModelToViewTestDocument2(SwDoc *pDoc)
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(pDoc);
SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
SwPaM aPaM(aIdx);
- pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("AAAAA"));
IDocumentMarkAccess* pMarksAccess = pDoc->getIDocumentMarkAccess();
sw::mark::IFieldmark *pFieldmark = dynamic_cast<sw::mark::IFieldmark*>(
@@ -333,28 +333,28 @@ SwTxtNode* getModelToViewTestDocument2(SwDoc *pDoc)
(*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_LISTENTRY] = uno::makeAny(vListEntries);
(*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_RESULT] = uno::makeAny(sal_Int32(0));
pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("CCCCC"));
- pTxtNode = aPaM.GetNode().GetTxtNode();
+ pTextNode = aPaM.GetNode().GetTextNode();
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(11),
- pTxtNode->GetTxt().getLength());
+ pTextNode->GetText().getLength());
- return pTxtNode;
+ return pTextNode;
}
void SwDocTest::testModelToViewHelperPassthrough()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode, ExpandMode::PassThrough);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::PassThrough);
OUString sViewText = aModelToViewHelper.getViewText();
- OUString sModelText = pTxtNode->GetTxt();
+ OUString sModelText = pTextNode->GetText();
CPPUNIT_ASSERT_EQUAL(sModelText, sViewText);
}
void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnote()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode, ExpandMode::ExpandFields | ExpandMode::ExpandFootnote);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::ExpandFields | ExpandMode::ExpandFootnote);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAAA BBBBB foo CCCCC foo DDDDD"), sViewText);
@@ -362,9 +362,9 @@ void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnote()
void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnoteReplaceMode()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode,
+ ModelToViewHelper aModelToViewHelper(*pTextNode,
ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
@@ -382,9 +382,9 @@ void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnoteReplaceMode()
void SwDocTest::testModelToViewHelperExpandFields()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode, ExpandMode::ExpandFields);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::ExpandFields);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAAA BBBBB CCCCC DDDDD"), sViewText);
@@ -392,9 +392,9 @@ void SwDocTest::testModelToViewHelperExpandFields()
void SwDocTest::testModelToViewHelperExpandFieldsReplaceMode()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode,
+ ModelToViewHelper aModelToViewHelper(*pTextNode,
ExpandMode::ExpandFields | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(OUString("AAAAA BBBBB CCCCC DDDDD"),
@@ -407,9 +407,9 @@ void SwDocTest::testModelToViewHelperExpandFieldsReplaceMode()
void SwDocTest::testModelToViewHelperExpandFieldsHideInvisible()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode, ExpandMode::HideInvisible);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::HideInvisible);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAAA CCCCC " + OUStringLiteral1<CH_TXTATR_BREAKWORD>() + " DDDDD"),
@@ -418,9 +418,9 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisible()
void SwDocTest::testModelToViewHelperExpandFieldsHideRedlined()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode, ExpandMode::HideDeletions);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::HideDeletions);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAABB " + OUStringLiteral1<CH_TXTATR_BREAKWORD>() + " CCCCC " + OUStringLiteral1<CH_TXTATR_BREAKWORD>() + " DDDDD"),
@@ -429,18 +429,18 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideRedlined()
void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleExpandFootnote()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode, ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::ExpandFootnote);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::ExpandFootnote);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(OUString("AAAAA CCCCC foo DDDDD"), sViewText);
}
void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleExpandFootnoteReplaceMode()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode,
+ ModelToViewHelper aModelToViewHelper(*pTextNode,
ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
@@ -456,9 +456,9 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleExpandFootnoteRepl
void SwDocTest::testModelToViewHelperExpandFieldsHideHideRedlinedExpandFootnote()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode, ExpandMode::ExpandFields | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::ExpandFields | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAABB foo CCCCC foo DDDDD"), sViewText);
@@ -466,9 +466,9 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideHideRedlinedExpandFootnote(
void SwDocTest::testModelToViewHelperExpandFieldsHideHideRedlinedExpandFootnoteReplaceMode()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode,
+ ModelToViewHelper aModelToViewHelper(*pTextNode,
ExpandMode::ExpandFields | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
@@ -486,9 +486,9 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideHideRedlinedExpandFootnoteR
void SwDocTest::testModelToViewHelperHideInvisibleHideRedlined()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode, ExpandMode::HideInvisible | ExpandMode::HideDeletions);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::HideInvisible | ExpandMode::HideDeletions);
OUString sViewText = aModelToViewHelper.getViewText();
OUStringBuffer aBuffer;
aBuffer.append("AAAACCCCC ");
@@ -499,18 +499,18 @@ void SwDocTest::testModelToViewHelperHideInvisibleHideRedlined()
void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleHideRedlinedExpandFootnote()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode, ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(OUString("AAAACCCCC foo DDDDD"), sViewText);
}
void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleHideRedlinedExpandFootnoteReplaceMode()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode,
+ ModelToViewHelper aModelToViewHelper(*pTextNode,
ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(sViewText,
@@ -525,18 +525,18 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleHideRedlinedExpand
void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnote2()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument2(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument2(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode, ExpandMode::ExpandFields | ExpandMode::ExpandFootnote);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::ExpandFields | ExpandMode::ExpandFootnote);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(OUString("AAAAABBBBBCCCCC"), sViewText);
}
void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnoteReplaceMode2()
{
- SwTxtNode* pTxtNode = getModelToViewTestDocument2(m_pDoc);
+ SwTextNode* pTextNode = getModelToViewTestDocument2(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTxtNode,
+ ModelToViewHelper aModelToViewHelper(*pTextNode,
ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
@@ -555,16 +555,16 @@ void SwDocTest::testSwScanner()
SwNodeIndex aIdx(m_pDoc->GetNodes().GetEndOfContent(), -1);
SwPaM aPaM(aIdx);
- SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
- CPPUNIT_ASSERT_MESSAGE("Has Text Node", pTxtNode);
+ CPPUNIT_ASSERT_MESSAGE("Has Text Node", pTextNode);
//See https://bugs.libreoffice.org/show_bug.cgi?id=40449
//See https://bugs.libreoffice.org/show_bug.cgi?id=39365
//Use a temporary OUString as the arg, as that's the trouble behind
//fdo#40449 and fdo#39365
{
- SwScanner aScanner(*pTxtNode,
+ SwScanner aScanner(*pTextNode,
OUString("Hello World"),
0, ModelToViewHelper(), i18n::WordType::DICTIONARY_WORD, 0,
RTL_CONSTASCII_LENGTH("Hello World"));
@@ -595,8 +595,8 @@ void SwDocTest::testSwScanner()
m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, aWestLangItem );
SwDocStat aDocStat;
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(IDEOGRAPHICFULLSTOP_D));
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(IDEOGRAPHICFULLSTOP_D));
CPPUNIT_ASSERT_MESSAGE("Should be 2", aDocStat.nChar == 2);
CPPUNIT_ASSERT_MESSAGE("Should be 2", aDocStat.nCharExcludingSpaces == 2);
@@ -621,7 +621,7 @@ void SwDocTest::testSwScanner()
0x0020, 0x0064, 0x006F, 0x0065, 0x0073, 0x0020, 0x0074, 0x0068,
0x0069, 0x0073, 0x0020, 0x0064, 0x006F, 0x003F, 0x0020, 0x0020
};
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(test,
SAL_N_ELEMENTS(test)));
@@ -631,8 +631,8 @@ void SwDocTest::testSwScanner()
m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, aWestLangItem );
SwDocStat aDocStat;
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(test));
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(test));
CPPUNIT_ASSERT_MESSAGE("58 words", aDocStat.nWord == 58);
CPPUNIT_ASSERT_MESSAGE("43 Asian characters and Korean syllables", aDocStat.nAsianWord == 43);
CPPUNIT_ASSERT_MESSAGE("105 non-whitespace chars", aDocStat.nCharExcludingSpaces == 105);
@@ -650,10 +650,10 @@ void SwDocTest::testSwScanner()
0x0065, 0x0065, 0x2019
};
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(aShouldBeThree, SAL_N_ELEMENTS(aShouldBeThree)));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(aShouldBeThree));
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(aShouldBeThree));
CPPUNIT_ASSERT_MESSAGE("Should be 3", aDocStat.nWord == 3);
const sal_Unicode aShouldBeFive[] = {
@@ -667,11 +667,11 @@ void SwDocTest::testSwScanner()
0x006C, 0x0065, 0x0072, 0x3000, 0x00BB
};
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(aShouldBeFive, SAL_N_ELEMENTS(aShouldBeFive)));
- pTxtNode = aPaM.GetNode().GetTxtNode();
+ pTextNode = aPaM.GetNode().GetTextNode();
aDocStat.Reset();
- pTxtNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(aShouldBeFive));
+ pTextNode->CountWords(aDocStat, 0, SAL_N_ELEMENTS(aShouldBeFive));
CPPUNIT_ASSERT_MESSAGE("Should be 5", aDocStat.nWord == 5);
}
@@ -679,47 +679,47 @@ void SwDocTest::testSwScanner()
{
SwDocStat aDocStat;
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Apple"));
- pTxtNode = aPaM.GetNode().GetTxtNode();
+ pTextNode = aPaM.GetNode().GetTextNode();
sal_Int32 nPos = aPaM.GetPoint()->nContent.GetIndex();
- SwFmtFtn aFtn;
- aFtn.SetNumStr(OUString("banana"));
- SwTxtAttr* pTA = pTxtNode->InsertItem(aFtn, nPos, nPos);
+ SwFormatFootnote aFootnote;
+ aFootnote.SetNumStr(OUString("banana"));
+ SwTextAttr* pTA = pTextNode->InsertItem(aFootnote, nPos, nPos);
CPPUNIT_ASSERT(pTA);
- CPPUNIT_ASSERT(pTxtNode->Len() == 6); //Apple + 0x02
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ CPPUNIT_ASSERT(pTextNode->Len() == 6); //Apple + 0x02
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 1);
CPPUNIT_ASSERT_MESSAGE("footnote should be expanded", aDocStat.nChar == 11);
const sal_Int32 nNextPos = aPaM.GetPoint()->nContent.GetIndex();
CPPUNIT_ASSERT(nNextPos == nPos+1);
- SwFmtRefMark aRef(OUString("refmark"));
- pTA = pTxtNode->InsertItem(aRef, nNextPos, nNextPos);
+ SwFormatRefMark aRef(OUString("refmark"));
+ pTA = pTextNode->InsertItem(aRef, nNextPos, nNextPos);
CPPUNIT_ASSERT(pTA);
aDocStat.Reset();
- pTxtNode->SetWordCountDirty(true);
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode->SetWordCountDirty(true);
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 1);
CPPUNIT_ASSERT_MESSAGE("refmark anchor should not be counted", aDocStat.nChar == 11);
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Apple"));
DateTime aDate(DateTime::SYSTEM);
SwPostItField aPostIt(
- static_cast<SwPostItFieldType*>(m_pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_POSTITFLD)), OUString("An Author"),
+ static_cast<SwPostItFieldType*>(m_pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_POSTITFLD)), OUString("An Author"),
OUString("Some Text"), OUString("Initials"), OUString("Name"), aDate );
- m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, SwFmtFld(aPostIt));
+ m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, SwFormatField(aPostIt));
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Apple"));
- pTxtNode = aPaM.GetNode().GetTxtNode();
+ pTextNode = aPaM.GetNode().GetTextNode();
aDocStat.Reset();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 1);
CPPUNIT_ASSERT_MESSAGE("postit anchor should effectively not exist", aDocStat.nChar == 10);
- CPPUNIT_ASSERT(pTxtNode->Len() == 11);
+ CPPUNIT_ASSERT(pTextNode->Len() == 11);
aDocStat.Reset();
}
@@ -729,10 +729,10 @@ void SwDocTest::testSwScanner()
SwDocStat aDocStat;
const char aString[] = "Lorem ipsum";
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(aString));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT_EQUAL(aDocStat.nWord, static_cast<sal_uLong>(2));
//turn on red-lining and show changes
@@ -742,17 +742,17 @@ void SwDocTest::testSwScanner()
//delete everything except the first word
aPaM.SetMark(); //set start of selection to current pos
- aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(), 5); //set end of selection to fifth char of current node
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 5); //set end of selection to fifth char of current node
m_pDoc->getIDocumentContentOperations().DeleteAndJoin(aPaM); //redline-aware deletion api
//"real underlying text should be the same"
- CPPUNIT_ASSERT_EQUAL(pTxtNode->GetTxt(), OUString(aString));
+ CPPUNIT_ASSERT_EQUAL(pTextNode->GetText(), OUString(aString));
aDocStat.Reset();
- pTxtNode->SetWordCountDirty(true);
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len()); //but word-counting the text should only count the non-deleted text
+ pTextNode->SetWordCountDirty(true);
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); //but word-counting the text should only count the non-deleted text
CPPUNIT_ASSERT_EQUAL(aDocStat.nWord, static_cast<sal_uLong>(1));
- pTxtNode->SetWordCountDirty(true);
+ pTextNode->SetWordCountDirty(true);
//keep red-lining on but hide changes
m_pDoc->getIDocumentRedlineAccess().SetRedlineMode(nsRedlineMode_t::REDLINE_ON);
@@ -760,28 +760,28 @@ void SwDocTest::testSwScanner()
CPPUNIT_ASSERT_MESSAGE("redlines should be invisible", !IDocumentRedlineAccess::IsShowChanges(m_pDoc->getIDocumentRedlineAccess().GetRedlineMode()));
aDocStat.Reset();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len()); //but word-counting the text should only count the non-deleted text
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); //but word-counting the text should only count the non-deleted text
CPPUNIT_ASSERT_EQUAL(aDocStat.nWord, static_cast<sal_uLong>(1));
- OUString sLorem = pTxtNode->GetTxt();
+ OUString sLorem = pTextNode->GetText();
CPPUNIT_ASSERT(sLorem == "Lorem");
- const SwRedlineTbl& rTbl = m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl();
+ const SwRedlineTable& rTable = m_pDoc->getIDocumentRedlineAccess().GetRedlineTable();
SwNodes& rNds = m_pDoc->GetNodes();
- CPPUNIT_ASSERT(rTbl.size() == 1);
+ CPPUNIT_ASSERT(rTable.size() == 1);
- SwNodeIndex* pNodeIdx = rTbl[0]->GetContentIdx();
+ SwNodeIndex* pNodeIdx = rTable[0]->GetContentIdx();
CPPUNIT_ASSERT(pNodeIdx);
- pTxtNode = rNds[ pNodeIdx->GetIndex() + 1 ]->GetTxtNode(); //first deleted txtnode
- CPPUNIT_ASSERT(pTxtNode);
+ pTextNode = rNds[ pNodeIdx->GetIndex() + 1 ]->GetTextNode(); //first deleted txtnode
+ CPPUNIT_ASSERT(pTextNode);
- OUString sIpsum = pTxtNode->GetTxt();
+ OUString sIpsum = pTextNode->GetText();
CPPUNIT_ASSERT(sIpsum == " ipsum");
aDocStat.Reset();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len()); //word-counting the text should only count the non-deleted text, and this whole chunk should be ignored
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); //word-counting the text should only count the non-deleted text, and this whole chunk should be ignored
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(0), aDocStat.nWord);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(0), aDocStat.nChar);
@@ -789,18 +789,18 @@ void SwDocTest::testSwScanner()
// redline *added* text though
m_pDoc->getIDocumentRedlineAccess().SetRedlineMode(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_SHOW_DELETE|nsRedlineMode_t::REDLINE_SHOW_INSERT);
aPaM.DeleteMark();
- aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(), 0);
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 0);
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "redline-new-text ");
aDocStat.Reset();
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->SetWordCountDirty(true);
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->SetWordCountDirty(true);
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(2), aDocStat.nWord);
//redline-new-text Lorem ipsum
//+++++++++++++++++ ------
//select start of original text and part of deleted text
aDocStat.Reset();
- pTxtNode->CountWords(aDocStat, 17, 25);
+ pTextNode->CountWords(aDocStat, 17, 25);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(5), aDocStat.nChar);
}
@@ -810,73 +810,73 @@ void SwDocTest::testSwScanner()
OUString sTemplate("ThisXis a test.");
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', ' '));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 4 &&
aDocStat.nCharExcludingSpaces == 12 &&
aDocStat.nChar == 15);
aDocStat.Reset();
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replaceAll(OUString('X'), OUString(" = ")));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 5 &&
aDocStat.nCharExcludingSpaces == 13 &&
aDocStat.nChar == 17);
aDocStat.Reset();
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replaceAll(OUString('X'), OUString(" _ ")));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 5 &&
aDocStat.nCharExcludingSpaces == 13 &&
aDocStat.nChar == 17);
aDocStat.Reset();
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replaceAll(OUString('X'), OUString(" -- ")));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 5 &&
aDocStat.nCharExcludingSpaces == 14 &&
aDocStat.nChar == 18);
aDocStat.Reset();
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', '_'));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 3 &&
aDocStat.nCharExcludingSpaces == 13 &&
aDocStat.nChar == 15);
aDocStat.Reset();
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', '-'));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 3 &&
aDocStat.nCharExcludingSpaces == 13 &&
aDocStat.nChar == 15);
aDocStat.Reset();
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2012));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 3 &&
aDocStat.nCharExcludingSpaces == 13 &&
aDocStat.nChar == 15);
aDocStat.Reset();
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2015));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 3 &&
aDocStat.nCharExcludingSpaces == 13 &&
aDocStat.nChar == 15);
@@ -884,19 +884,19 @@ void SwDocTest::testSwScanner()
//But default configuration should, msword-alike treak emdash
//and endash as word separators for word-counting
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2013));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 4 &&
aDocStat.nCharExcludingSpaces == 13 &&
aDocStat.nChar == 15);
aDocStat.Reset();
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2014));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 4 &&
aDocStat.nCharExcludingSpaces == 13 &&
aDocStat.nChar == 15);
@@ -904,10 +904,10 @@ void SwDocTest::testSwScanner()
const sal_Unicode aChunk[] = {' ', 0x2013, ' '};
OUString sChunk(aChunk, SAL_N_ELEMENTS(aChunk));
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replaceAll(OUString('X'), sChunk));
- pTxtNode = aPaM.GetNode().GetTxtNode();
- pTxtNode->CountWords(aDocStat, 0, pTxtNode->Len());
+ pTextNode = aPaM.GetNode().GetTextNode();
+ pTextNode->CountWords(aDocStat, 0, pTextNode->Len());
CPPUNIT_ASSERT(aDocStat.nWord == 4 &&
aDocStat.nCharExcludingSpaces == 13 &&
aDocStat.nChar == 17);
@@ -921,26 +921,26 @@ void SwDocTest::testMergePortionsDeleteNotSorted()
SwPaM aPaM(aIdx);
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString(" AABBCC"));
- SwCharFmt *const pCharFmt(m_pDoc->MakeCharFmt("foo", 0));
- SwFmtCharFmt const charFmt(pCharFmt);
+ SwCharFormat *const pCharFormat(m_pDoc->MakeCharFormat("foo", 0));
+ SwFormatCharFormat const charFormat(pCharFormat);
- SwFmtINetFmt const inetFmt("http://example.com", "");
+ SwFormatINetFormat const inetFormat("http://example.com", "");
IDocumentContentOperations & rIDCO(m_pDoc->getIDocumentContentOperations());
aPaM.SetMark();
aPaM.GetPoint()->nContent = 2;
aPaM.GetMark()->nContent = 4;
- rIDCO.InsertPoolItem(aPaM, charFmt);
+ rIDCO.InsertPoolItem(aPaM, charFormat);
aPaM.GetPoint()->nContent = 2;
aPaM.GetMark()->nContent = 5;
- rIDCO.InsertPoolItem(aPaM, inetFmt);
+ rIDCO.InsertPoolItem(aPaM, inetFormat);
aPaM.GetPoint()->nContent = 6;
aPaM.GetMark()->nContent = 8;
- rIDCO.InsertPoolItem(aPaM, charFmt);
+ rIDCO.InsertPoolItem(aPaM, charFormat);
aPaM.GetPoint()->nContent = 4;
aPaM.GetMark()->nContent = 6;
// this triggered an STL assert in SwpHints::MergePortions()
- rIDCO.InsertPoolItem(aPaM, charFmt);
+ rIDCO.InsertPoolItem(aPaM, charFormat);
}
//See https://bugs.libreoffice.org/show_bug.cgi?id=40599
@@ -952,34 +952,34 @@ void SwDocTest::testGraphicAnchorDeletion()
SwPaM aPaM(aIdx);
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 1"));
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("graphic anchor>><<graphic anchor"));
SwNodeIndex nPara2 = aPaM.GetPoint()->nNode;
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 3"));
aPaM.GetPoint()->nNode = nPara2;
- aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(), RTL_CONSTASCII_LENGTH("graphic anchor>>"));
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), RTL_CONSTASCII_LENGTH("graphic anchor>>"));
//Insert a graphic at X of >>X<< in paragraph 2
SfxItemSet aFlySet(m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1);
- SwFmtAnchor aAnchor(FLY_AS_CHAR);
+ SwFormatAnchor aAnchor(FLY_AS_CHAR);
aAnchor.SetAnchor(aPaM.GetPoint());
aFlySet.Put(aAnchor);
- SwFlyFrmFmt *pFrame = m_pDoc->getIDocumentContentOperations().Insert(aPaM, OUString(), OUString(), NULL, &aFlySet, NULL, NULL);
+ SwFlyFrameFormat *pFrame = m_pDoc->getIDocumentContentOperations().Insert(aPaM, OUString(), OUString(), NULL, &aFlySet, NULL, NULL);
CPPUNIT_ASSERT_MESSAGE("Expected frame", pFrame != NULL);
CPPUNIT_ASSERT_MESSAGE("Should be 1 graphic", m_pDoc->GetFlyCount(FLYCNTTYPE_GRF) == 1);
//Delete >X<
aPaM.GetPoint()->nNode = nPara2;
- aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(),
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(),
RTL_CONSTASCII_LENGTH("graphic anchor>><")+1);
aPaM.SetMark();
aPaM.GetPoint()->nNode = nPara2;
- aPaM.GetPoint()->nContent.Assign(aPaM.GetCntntNode(), RTL_CONSTASCII_LENGTH("graphic anchor>"));
+ aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), RTL_CONSTASCII_LENGTH("graphic anchor>"));
m_pDoc->getIDocumentContentOperations().DeleteRange(aPaM);
#ifdef DEBUG_AS_HTML
@@ -1143,7 +1143,7 @@ translitTest(SwDoc & rDoc, SwPaM & rPaM, sal_uInt32 const nType)
utl::TransliterationWrapper aTrans(
::comphelper::getProcessComponentContext(), nType);
rDoc.getIDocumentContentOperations().TransliterateText(rPaM, aTrans);
- return rPaM.GetTxt();
+ return rPaM.GetText();
}
void SwDocTest::testTransliterate()
@@ -1154,7 +1154,7 @@ void SwDocTest::testTransliterate()
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("foobar"));
aPaM.SetMark();
aPaM.GetPoint()->nContent = 0;
- CPPUNIT_ASSERT_EQUAL(OUString("foobar"), aPaM.GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("foobar"), aPaM.GetText());
CPPUNIT_ASSERT_EQUAL(OUString("FOOBAR"),
translitTest(*m_pDoc, aPaM,
@@ -1223,13 +1223,13 @@ void SwDocTest::testMarkMove()
aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex();
pMarksAccess->makeMark(aPaM, OUString("Para1"), IDocumentMarkAccess::MarkType::BOOKMARK);
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 2"));
aPaM.SetMark();
aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex();
pMarksAccess->makeMark(aPaM, OUString("Para2"), IDocumentMarkAccess::MarkType::BOOKMARK);
- m_pDoc->getIDocumentContentOperations().AppendTxtNode(*aPaM.GetPoint());
+ m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint());
m_pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("Paragraph 3"));
aPaM.SetMark();
aPaM.GetMark()->nContent -= aPaM.GetMark()->nContent.GetIndex();
@@ -1239,7 +1239,7 @@ void SwDocTest::testMarkMove()
// join paragraph 2 and 3 and check
{
SwNodeIndex aIdx(m_pDoc->GetNodes().GetEndOfContent(), -2);
- SwTxtNode& rParaNode2 = dynamic_cast<SwTxtNode&>(aIdx.GetNode());
+ SwTextNode& rParaNode2 = dynamic_cast<SwTextNode&>(aIdx.GetNode());
rParaNode2.JoinNext();
}
::sw::mark::IMark* pBM1 = pMarksAccess->findMark("Para1")->get();
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index 0126b711d4d3..b1abdec46fd8 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -164,9 +164,9 @@ void Test::testLinkedGraphicRT()
xComponent->dispose();
mxComponent = loadFromDesktop(aTempFile.GetURL(), "com.sun.star.text.TextDocument");
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
- CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), pTxtDoc);
- SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), pDoc);
SwNodes& aNodes = pDoc->GetNodes();
diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx
index 52a29e2fdb91..973b8304bda1 100644
--- a/sw/qa/extras/htmlimport/htmlimport.cxx
+++ b/sw/qa/extras/htmlimport/htmlimport.cxx
@@ -28,10 +28,10 @@ class HtmlImportTest : public SwModelTestBase
DECLARE_HTMLIMPORT_TEST(testPictureImport, "picture.html")
{
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
// The document contains two pictures stored as a link.
- sfx2::LinkManager& rLinkManager = pTxtDoc->GetDocShell()->GetDoc()->GetEditShell()->GetLinkManager();
+ sfx2::LinkManager& rLinkManager = pTextDoc->GetDocShell()->GetDoc()->GetEditShell()->GetLinkManager();
CPPUNIT_ASSERT_EQUAL(size_t(2), rLinkManager.GetLinks().size());
rLinkManager.Remove(0,2);
CPPUNIT_ASSERT_EQUAL(size_t(0), rLinkManager.GetLinks().size());
@@ -44,11 +44,11 @@ DECLARE_HTMLIMPORT_TEST(testPictureImport, "picture.html")
DECLARE_HTMLIMPORT_TEST(testInlinedImage, "inlined_image.html")
{
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
// The document contains only one embedded picture inlined in img's src attribute.
- SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc();
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
SwEditShell* pEditShell = pDoc->GetEditShell();
CPPUNIT_ASSERT(pEditShell);
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index fd9472624c6c..a3bda095bf37 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -304,9 +304,9 @@ private:
xmlTextWriterStartDocument(pXmlWriter, NULL, NULL, NULL);
// create the dump
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
SwRootFrm* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
pLayout->dumpAsXml(pXmlWriter);
@@ -327,9 +327,9 @@ protected:
void calcLayout()
{
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()->CalcLayout();
}
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx
index 2c9e164bea24..42d2385387a1 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -47,9 +47,9 @@ public:
{
if (mnCurOutputType == text::MailMergeType::SHELL)
{
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument*>(mxMMComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- pTxtDoc->GetDocShell()->DoClose();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxMMComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ pTextDoc->GetDocShell()->DoClose();
}
else
mxMMComponent->dispose();
@@ -235,9 +235,9 @@ protected:
int MMTest::documentStartPageNumber( int document ) const
{ // See SwMailMergeOutputPage::documentStartPageNumber() .
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- SwWrtShell* shell = pTxtDoc->GetDocShell()->GetWrtShell();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* shell = pTextDoc->GetDocShell()->GetWrtShell();
IDocumentMarkAccess* marks = shell->GetDoc()->getIDocumentMarkAccess();
// Unfortunately, the pages are marked using UNO bookmarks, which have internals names, so they cannot be referred to by their names.
// Assume that there are no other UNO bookmarks than the ones used by mail merge, and that they are in the sorted order.
@@ -266,9 +266,9 @@ DECLARE_SHELL_MAILMERGE_TEST(testMultiPageAnchoredDraws, "multiple-page-anchored
{
executeMailMerge();
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- sal_uInt16 nPhysPages = pTxtDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ sal_uInt16 nPhysPages = pTextDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum();
CPPUNIT_ASSERT_EQUAL(sal_uInt16(8), nPhysPages);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxMMComponent, uno::UNO_QUERY);
@@ -303,8 +303,8 @@ DECLARE_FILE_MAILMERGE_TEST(testMissingDefaultLineColor, "missing-default-line-c
uno::Reference<beans::XPropertySet> xPropertySet(xDraws->getByIndex(0), uno::UNO_QUERY);
// Lines do not have a line color.
CPPUNIT_ASSERT( !xPropertySet->getPropertySetInfo()->hasPropertyByName( "LineColor" ));
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
uno::Reference< lang::XMultiServiceFactory > xFact( mxComponent, uno::UNO_QUERY );
uno::Reference< beans::XPropertySet > xDefaults( xFact->createInstance( "com.sun.star.drawing.Defaults" ), uno::UNO_QUERY );
CPPUNIT_ASSERT( xDefaults.is());
@@ -369,9 +369,9 @@ DECLARE_SHELL_MAILMERGE_TEST(testPageBoundariesSimpleMailMerge, "simple-mail-mer
// SwMailMergeOutputPage::documentStartPageNumber() ).
executeMailMerge();
// Here getPages() works on the source document, so get pages of the resulting one.
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- CPPUNIT_ASSERT_EQUAL( sal_uInt16( 19 ), pTxtDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum()); // 10 pages, but each sub-document starts on odd page number
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ CPPUNIT_ASSERT_EQUAL( sal_uInt16( 19 ), pTextDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum()); // 10 pages, but each sub-document starts on odd page number
for( int doc = 0;
doc < 10;
++doc )
@@ -383,9 +383,9 @@ DECLARE_SHELL_MAILMERGE_TEST(testPageBoundariesSimpleMailMerge, "simple-mail-mer
DECLARE_SHELL_MAILMERGE_TEST(testPageBoundaries2Pages, "simple-mail-merge-2pages.odt", "10-testing-addresses.ods", "testing-addresses")
{
executeMailMerge();
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- CPPUNIT_ASSERT_EQUAL( sal_uInt16( 20 ), pTxtDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum()); // 20 pages, each sub-document starts on odd page number
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ CPPUNIT_ASSERT_EQUAL( sal_uInt16( 20 ), pTextDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum()); // 20 pages, each sub-document starts on odd page number
for( int doc = 0;
doc < 10;
++doc )
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 625905da206e..4ed43afa89b4 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -331,9 +331,9 @@ DECLARE_ODFIMPORT_TEST(testFdo56272, "fdo56272.odt")
CPPUNIT_ASSERT_EQUAL(sal_Int32(422), xShape->getPosition().Y); // Was -2371
}
-DECLARE_ODFIMPORT_TEST(testCalcFtnCntnt, "ooo32780-1.odt")
+DECLARE_ODFIMPORT_TEST(testCalcFootnoteContent, "ooo32780-1.odt")
{
- //this was a CalcFtnCntnt crash
+ //this was a CalcFootnoteContent crash
}
DECLARE_ODFIMPORT_TEST(testMoveSubTree, "ooo77837-1.odt")
@@ -431,36 +431,36 @@ DECLARE_ODFIMPORT_TEST(testTdf89802, "tdf89802.fodt")
DECLARE_ODFIMPORT_TEST(testFdo37606, "fdo37606.odt")
{
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- SwWrtShell* pWrtShell = pTxtDoc->GetDocShell()->GetWrtShell();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false);
{
pWrtShell->SelAll(); // Selects A1.
- SwTxtNode& rCellEnd = dynamic_cast<SwTxtNode&>(pShellCrsr->End()->nNode.GetNode());
+ SwTextNode& rCellEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode());
// fdo#72486 This was "Hello.", i.e. a single select-all selected the whole document, not just the cell only.
- CPPUNIT_ASSERT_EQUAL(OUString("A1"), rCellEnd.GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), rCellEnd.GetText());
pWrtShell->SelAll(); // Selects the whole table.
pWrtShell->SelAll(); // Selects the whole document.
- SwTxtNode& rStart = dynamic_cast<SwTxtNode&>(pShellCrsr->Start()->nNode.GetNode());
- CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetTxt());
+ SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCrsr->Start()->nNode.GetNode());
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText());
- SwTxtNode& rEnd = dynamic_cast<SwTxtNode&>(pShellCrsr->End()->nNode.GetNode());
+ SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode());
// This was "A1", i.e. Ctrl-A only selected the A1 cell of the table, not the whole document.
- CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText());
}
{
pWrtShell->SttEndDoc(false); // Go to the end of the doc.
pWrtShell->SelAll(); // And now that we're outside of the table, try Ctrl-A again.
- SwTxtNode& rStart = dynamic_cast<SwTxtNode&>(pShellCrsr->Start()->nNode.GetNode());
+ SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCrsr->Start()->nNode.GetNode());
// This was "Hello", i.e. Ctrl-A did not select the starting table.
- CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText());
- SwTxtNode& rEnd = dynamic_cast<SwTxtNode&>(pShellCrsr->End()->nNode.GetNode());
- CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetTxt());
+ SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText());
}
{
@@ -468,17 +468,17 @@ DECLARE_ODFIMPORT_TEST(testFdo37606, "fdo37606.odt")
// And make sure the table got deleted as well.
SwNodes& rNodes = pWrtShell->GetDoc()->GetNodes();
SwNodeIndex nNode(rNodes.GetEndOfExtras());
- SwCntntNode* pCntntNode = rNodes.GoNext(&nNode);
+ SwContentNode* pContentNode = rNodes.GoNext(&nNode);
// First content node was in a table -> table wasn't deleted.
- CPPUNIT_ASSERT(!pCntntNode->FindTableNode());
+ CPPUNIT_ASSERT(!pContentNode->FindTableNode());
}
}
DECLARE_ODFIMPORT_TEST(testFdo37606Copy, "fdo37606.odt")
{
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- SwWrtShell* pWrtShell = pTxtDoc->GetDocShell()->GetWrtShell();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
// Ctrl-A
pWrtShell->SelAll(); // Selects A1.
pWrtShell->SelAll(); // Selects the whole table.
@@ -506,46 +506,46 @@ DECLARE_ODFIMPORT_TEST(testFdo37606Copy, "fdo37606.odt")
DECLARE_ODFIMPORT_TEST(testFdo69862, "fdo69862.odt")
{
// The test doc is special in that it starts with a table and it also has a footnote.
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- SwWrtShell* pWrtShell = pTxtDoc->GetDocShell()->GetWrtShell();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false);
pWrtShell->SelAll(); // Selects A1.
pWrtShell->SelAll(); // Selects the whole table.
pWrtShell->SelAll(); // Selects the whole document.
- SwTxtNode& rStart = dynamic_cast<SwTxtNode&>(pShellCrsr->Start()->nNode.GetNode());
+ SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCrsr->Start()->nNode.GetNode());
// This was "Footnote.", as Ctrl-A also selected footnotes, but it should not.
- CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText());
- SwTxtNode& rEnd = dynamic_cast<SwTxtNode&>(pShellCrsr->End()->nNode.GetNode());
- CPPUNIT_ASSERT_EQUAL(OUString("H" "\x01" "ello."), rEnd.GetTxt());
+ SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode());
+ CPPUNIT_ASSERT_EQUAL(OUString("H" "\x01" "ello."), rEnd.GetText());
}
DECLARE_ODFIMPORT_TEST(testFdo69979, "fdo69979.odt")
{
// The test doc is special in that it starts with a table and it also has a header.
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- SwWrtShell* pWrtShell = pTxtDoc->GetDocShell()->GetWrtShell();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false);
pWrtShell->SelAll(); // Selects A1.
pWrtShell->SelAll(); // Selects the whole table.
pWrtShell->SelAll(); // Selects the whole document.
- SwTxtNode& rStart = dynamic_cast<SwTxtNode&>(pShellCrsr->Start()->nNode.GetNode());
+ SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCrsr->Start()->nNode.GetNode());
// This was "", as Ctrl-A also selected headers, but it should not.
- CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText());
- SwTxtNode& rEnd = dynamic_cast<SwTxtNode&>(pShellCrsr->End()->nNode.GetNode());
- CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetTxt());
+ SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText());
}
DECLARE_ODFIMPORT_TEST(testSpellmenuRedline, "spellmenu-redline.odt")
{
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- SwWrtShell* pWrtShell = pTxtDoc->GetDocShell()->GetWrtShell();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
OUString aParaText;
uno::Reference<linguistic2::XSpellAlternatives> xAlt;
SwSpellPopup aPopup(pWrtShell, xAlt, aParaText);
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 19c079ede5ef..2f45f74bd6d1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -79,7 +79,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo68418, "fdo68418.docx")
{
// The problem was that in 'MSWordExportBase::SectionProperties' function in 'wrt8sty.cxx'
// it checked if it 'IsPlausableSingleWordSection'.
- // The 'IsPlausableSingleWordSection' compared different aspects of 2 'SwFrmFmt' objects.
+ // The 'IsPlausableSingleWordSection' compared different aspects of 2 'SwFrameFormat' objects.
// One of the checks was 'do both formats have the same distance from the top and bottom ?'
// This check is correct if both have headers or both don't have headers.
// However - if one has a header, and the other one has an empty header (no header) - it is not correct to compare
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index a7f6078c6f7d..47589f6dafc0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -761,7 +761,7 @@ DECLARE_OOXMLEXPORT_TEST(testHeaderBorder, "header-border.docx")
}
}
-DECLARE_OOXMLEXPORT_TEST(testTblpprShape, "tblppr-shape.docx")
+DECLARE_OOXMLEXPORT_TEST(testTablepprShape, "tblppr-shape.docx")
{
// Unhandled exception due to unexpected w:tblpPr resulted in not importing page size, either.
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 2014bc870df4..66b844005f03 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1366,7 +1366,7 @@ DECLARE_OOXMLIMPORT_TEST(testTableWidth, "table_width.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(100), getProperty<sal_Int32>(xFrames->getByIndex(0), "FrameWidthPercent"));
}
-DECLARE_OOXMLIMPORT_TEST(testConditionalstylesTbllook, "conditionalstyles-tbllook.docx")
+DECLARE_OOXMLIMPORT_TEST(testConditionalstylesTablelook, "conditionalstyles-tbllook.docx")
{
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index b42f05cd3f56..da6fdb5235ec 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -125,7 +125,7 @@ void SwTiledRenderingTest::testPostKeyEvent()
pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0);
pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0);
// Did we manage to insert the character after the first one?
- CPPUNIT_ASSERT_EQUAL(OUString("Axaa bbb."), pShellCrsr->GetPoint()->nNode.GetNode().GetTxtNode()->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("Axaa bbb."), pShellCrsr->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
}
void SwTiledRenderingTest::testPostMouseEvent()
@@ -155,19 +155,19 @@ void SwTiledRenderingTest::testSetTextSelection()
pWrtShell->SelWrd();
SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false);
// Did we indeed manage to select the second word?
- CPPUNIT_ASSERT_EQUAL(OUString("bbb"), pShellCrsr->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("bbb"), pShellCrsr->GetText());
// Now use setTextSelection() to move the start of the selection 1000 twips left.
Point aStart = pShellCrsr->GetSttPos();
aStart.setX(aStart.getX() - 1000);
pXTextDocument->setTextSelection(LOK_SETTEXTSELECTION_START, aStart.getX(), aStart.getY());
// The new selection must include the first word, too -- but not the ending dot.
- CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb"), pShellCrsr->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb"), pShellCrsr->GetText());
// Next: test that LOK_SETTEXTSELECTION_RESET + LOK_SETTEXTSELECTION_END can be used to create a selection.
pXTextDocument->setTextSelection(LOK_SETTEXTSELECTION_RESET, aStart.getX(), aStart.getY());
pXTextDocument->setTextSelection(LOK_SETTEXTSELECTION_END, aStart.getX() + 1000, aStart.getY());
- CPPUNIT_ASSERT_EQUAL(OUString("Aaa b"), pShellCrsr->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("Aaa b"), pShellCrsr->GetText());
}
void SwTiledRenderingTest::testSetGraphicSelection()
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index e8ffdd78b976..43aeb6317661 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -143,18 +143,18 @@ SwDoc* SwUiWriterTest::createDoc(const char* pName)
pName = "empty.odt";
load(DATA_DIRECTORY, pName);
- SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
- CPPUNIT_ASSERT(pTxtDoc);
- return pTxtDoc->GetDocShell()->GetDoc();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ return pTextDoc->GetDocShell()->GetDoc();
}
//Replacement tests
static void lcl_selectCharacters(SwPaM& rPaM, sal_Int32 first, sal_Int32 end)
{
- rPaM.GetPoint()->nContent.Assign(rPaM.GetCntntNode(), first);
+ rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), first);
rPaM.SetMark();
- rPaM.GetPoint()->nContent.Assign(rPaM.GetCntntNode(), end);
+ rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), end);
}
static const OUString ORIGINAL_REPLACE_CONTENT("toto titi tutu");
@@ -171,15 +171,15 @@ void SwUiWriterTest::testReplaceForward()
pDoc->getIDocumentContentOperations().InsertString(aPaM, ORIGINAL_REPLACE_CONTENT);
- SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
lcl_selectCharacters(aPaM, 5, 9);
pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, OUString("toto"), false);
- CPPUNIT_ASSERT_EQUAL(EXPECTED_REPLACE_CONTENT, pTxtNode->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(EXPECTED_REPLACE_CONTENT, pTextNode->GetText());
rUndoManager.Undo();
- CPPUNIT_ASSERT_EQUAL(ORIGINAL_REPLACE_CONTENT, pTxtNode->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(ORIGINAL_REPLACE_CONTENT, pTextNode->GetText());
}
void SwUiWriterTest::testFdo75110()
@@ -220,16 +220,16 @@ void SwUiWriterTest::testReplaceBackward()
SwPaM aPaM(aIdx);
pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("toto titi tutu"));
- SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
lcl_selectCharacters(aPaM, 9, 5);
pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, OUString("toto"), false);
- CPPUNIT_ASSERT_EQUAL(EXPECTED_REPLACE_CONTENT, pTxtNode->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(EXPECTED_REPLACE_CONTENT, pTextNode->GetText());
rUndoManager.Undo();
- CPPUNIT_ASSERT_EQUAL(ORIGINAL_REPLACE_CONTENT, pTxtNode->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(ORIGINAL_REPLACE_CONTENT, pTextNode->GetText());
}
void SwUiWriterTest::testFdo69893()
@@ -241,9 +241,9 @@ void SwUiWriterTest::testFdo69893()
pWrtShell->SelAll(); // Selects the whole document.
SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false);
- SwTxtNode& rEnd = dynamic_cast<SwTxtNode&>(pShellCrsr->End()->nNode.GetNode());
+ SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode());
// Selection did not include the para after table, this was "B1".
- CPPUNIT_ASSERT_EQUAL(OUString("Para after table."), rEnd.GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("Para after table."), rEnd.GetText());
}
void SwUiWriterTest::testFdo70807()
@@ -292,8 +292,8 @@ void SwUiWriterTest::testImportRTF()
CPPUNIT_ASSERT_EQUAL(sal_uLong(0), aReader.Read(*pRTFReader));
sal_uLong nIndex = pWrtShell->GetCrsr()->GetNode().GetIndex();
- CPPUNIT_ASSERT_EQUAL(OUString("fooHello world!"), pDoc->GetNodes()[nIndex - 1]->GetTxtNode()->GetTxt());
- CPPUNIT_ASSERT_EQUAL(OUString("bar"), pDoc->GetNodes()[nIndex]->GetTxtNode()->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("fooHello world!"), pDoc->GetNodes()[nIndex - 1]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar"), pDoc->GetNodes()[nIndex]->GetTextNode()->GetText());
}
void SwUiWriterTest::testExportRTF()
@@ -339,13 +339,13 @@ void SwUiWriterTest::testFdo74981()
// create a document with an input field
SwDoc* pDoc = createDoc();
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
- SwInputField aField(static_cast<SwInputFieldType*>(pWrtShell->GetFldType(0, RES_INPUTFLD)), OUString("foo"), OUString("bar"), 0, 0);
+ SwInputField aField(static_cast<SwInputFieldType*>(pWrtShell->GetFieldType(0, RES_INPUTFLD)), OUString("foo"), OUString("bar"), 0, 0);
pWrtShell->Insert(aField);
// expect hints
SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
- SwTxtNode* pTxtNode = aIdx.GetNode().GetTxtNode();
- CPPUNIT_ASSERT(pTxtNode->HasHints());
+ SwTextNode* pTextNode = aIdx.GetNode().GetTextNode();
+ CPPUNIT_ASSERT(pTextNode->HasHints());
// go to the begin of the paragraph and split this node
pWrtShell->Left(CRSR_SKIP_CHARS, false, 100, false);
@@ -353,11 +353,11 @@ void SwUiWriterTest::testFdo74981()
// expect only the second paragraph to have hints
aIdx = SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1);
- pTxtNode = aIdx.GetNode().GetTxtNode();
- CPPUNIT_ASSERT(pTxtNode->HasHints());
+ pTextNode = aIdx.GetNode().GetTextNode();
+ CPPUNIT_ASSERT(pTextNode->HasHints());
--aIdx;
- pTxtNode = aIdx.GetNode().GetTxtNode();
- CPPUNIT_ASSERT(!pTxtNode->HasHints());
+ pTextNode = aIdx.GetNode().GetTextNode();
+ CPPUNIT_ASSERT(!pTextNode->HasHints());
}
void SwUiWriterTest::testShapeTextboxSelect()
@@ -368,14 +368,14 @@ void SwUiWriterTest::testShapeTextboxSelect()
SdrObject* pObject = pPage->GetObj(1);
SwContact* pTextBox = static_cast<SwContact*>(pObject->GetUserCall());
// First, make sure that pTextBox is a fly frame (textbox of a shape).
- CPPUNIT_ASSERT_EQUAL(RES_FLYFRMFMT, static_cast<RES_FMT>(pTextBox->GetFmt()->Which()));
+ CPPUNIT_ASSERT_EQUAL(RES_FLYFRMFMT, static_cast<RES_FMT>(pTextBox->GetFormat()->Which()));
// Then select it.
pWrtShell->SelectObj(Point(), 0, pObject);
const SdrMarkList& rMarkList = pWrtShell->GetDrawView()->GetMarkedObjectList();
SwDrawContact* pShape = static_cast<SwDrawContact*>(rMarkList.GetMark(0)->GetMarkedSdrObj()->GetUserCall());
// And finally make sure the shape got selected, not just the textbox itself.
- CPPUNIT_ASSERT_EQUAL(RES_DRAWFRMFMT, static_cast<RES_FMT>(pShape->GetFmt()->Which()));
+ CPPUNIT_ASSERT_EQUAL(RES_DRAWFRMFMT, static_cast<RES_FMT>(pShape->GetFormat()->Which()));
}
void SwUiWriterTest::testShapeTextboxDelete()
@@ -400,22 +400,22 @@ void SwUiWriterTest::testCp1000071()
SwDoc* pDoc = createDoc("cp1000071.odt");
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
- const SwRedlineTbl& rTbl = pDoc->getIDocumentRedlineAccess().GetRedlineTbl();
- CPPUNIT_ASSERT_EQUAL( size_t( 2 ), rTbl.size());
- sal_uLong redlineStart0NodeIndex = rTbl[ 0 ]->Start()->nNode.GetIndex();
- sal_Int32 redlineStart0Index = rTbl[ 0 ]->Start()->nContent.GetIndex();
- sal_uLong redlineEnd0NodeIndex = rTbl[ 0 ]->End()->nNode.GetIndex();
- sal_Int32 redlineEnd0Index = rTbl[ 0 ]->End()->nContent.GetIndex();
- sal_uLong redlineStart1NodeIndex = rTbl[ 1 ]->Start()->nNode.GetIndex();
- sal_Int32 redlineStart1Index = rTbl[ 1 ]->Start()->nContent.GetIndex();
- sal_uLong redlineEnd1NodeIndex = rTbl[ 1 ]->End()->nNode.GetIndex();
- sal_Int32 redlineEnd1Index = rTbl[ 1 ]->End()->nContent.GetIndex();
+ const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
+ CPPUNIT_ASSERT_EQUAL( size_t( 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();
+ sal_Int32 redlineEnd0Index = rTable[ 0 ]->End()->nContent.GetIndex();
+ sal_uLong redlineStart1NodeIndex = rTable[ 1 ]->Start()->nNode.GetIndex();
+ sal_Int32 redlineStart1Index = rTable[ 1 ]->Start()->nContent.GetIndex();
+ sal_uLong redlineEnd1NodeIndex = rTable[ 1 ]->End()->nNode.GetIndex();
+ sal_Int32 redlineEnd1Index = rTable[ 1 ]->End()->nContent.GetIndex();
// Change the document layout to be 2 columns, and then undo.
pWrtShell->SelAll();
SwSectionData section(CONTENT_SECTION, pWrtShell->GetUniqueSectionName());
SfxItemSet set( pDoc->GetDocShell()->GetPool(), RES_COL, RES_COL, 0 );
- SwFmtCol col;
+ SwFormatCol col;
col.Init( 2, 0, 10000 );
set.Put( col );
pWrtShell->InsertSection( section, &set );
@@ -423,15 +423,15 @@ void SwUiWriterTest::testCp1000071()
rUndoManager.Undo();
// Check that redlines are the same like at the beginning.
- CPPUNIT_ASSERT_EQUAL( size_t( 2 ), rTbl.size());
- CPPUNIT_ASSERT_EQUAL( redlineStart0NodeIndex, rTbl[ 0 ]->Start()->nNode.GetIndex());
- CPPUNIT_ASSERT_EQUAL( redlineStart0Index, rTbl[ 0 ]->Start()->nContent.GetIndex());
- CPPUNIT_ASSERT_EQUAL( redlineEnd0NodeIndex, rTbl[ 0 ]->End()->nNode.GetIndex());
- CPPUNIT_ASSERT_EQUAL( redlineEnd0Index, rTbl[ 0 ]->End()->nContent.GetIndex());
- CPPUNIT_ASSERT_EQUAL( redlineStart1NodeIndex, rTbl[ 1 ]->Start()->nNode.GetIndex());
- CPPUNIT_ASSERT_EQUAL( redlineStart1Index, rTbl[ 1 ]->Start()->nContent.GetIndex());
- CPPUNIT_ASSERT_EQUAL( redlineEnd1NodeIndex, rTbl[ 1 ]->End()->nNode.GetIndex());
- CPPUNIT_ASSERT_EQUAL( redlineEnd1Index, rTbl[ 1 ]->End()->nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL( size_t( 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());
+ CPPUNIT_ASSERT_EQUAL( redlineEnd0Index, rTable[ 0 ]->End()->nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL( redlineStart1NodeIndex, rTable[ 1 ]->Start()->nNode.GetIndex());
+ CPPUNIT_ASSERT_EQUAL( redlineStart1Index, rTable[ 1 ]->Start()->nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL( redlineEnd1NodeIndex, rTable[ 1 ]->End()->nNode.GetIndex());
+ CPPUNIT_ASSERT_EQUAL( redlineEnd1Index, rTable[ 1 ]->End()->nContent.GetIndex());
}
void SwUiWriterTest::testShapeTextboxVertadjust()
@@ -439,9 +439,9 @@ void SwUiWriterTest::testShapeTextboxVertadjust()
SwDoc* pDoc = createDoc("shape-textbox-vertadjust.odt");
SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
SdrObject* pObject = pPage->GetObj(1);
- SwFrmFmt* pFmt = static_cast<SwContact*>(pObject->GetUserCall())->GetFmt();
+ SwFrameFormat* pFormat = static_cast<SwContact*>(pObject->GetUserCall())->GetFormat();
// This was SDRTEXTVERTADJUST_TOP.
- CPPUNIT_ASSERT_EQUAL(SDRTEXTVERTADJUST_CENTER, pFmt->GetTextVertAdjust().GetValue());
+ CPPUNIT_ASSERT_EQUAL(SDRTEXTVERTADJUST_CENTER, pFormat->GetTextVertAdjust().GetValue());
}
void SwUiWriterTest::testShapeTextboxAutosize()
@@ -464,7 +464,7 @@ void SwUiWriterTest::testFdo82191()
{
SwDoc* pDoc = createDoc("fdo82191.odt");
SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
- std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
+ std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
// Make sure we have a single draw shape.
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), SwTextBoxHelper::getCount(pPage, aTextBoxes));
@@ -531,8 +531,8 @@ void SwUiWriterTest::testChineseConversionBlank()
// Then
- SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
- CPPUNIT_ASSERT_EQUAL(OUString(), pTxtNode->GetTxt());
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(OUString(), pTextNode->GetText());
}
@@ -557,8 +557,8 @@ void SwUiWriterTest::testChineseConversionNonChineseText()
// Then
- SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
- CPPUNIT_ASSERT_EQUAL(NON_CHINESE_CONTENT, pTxtNode->GetTxt());
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(NON_CHINESE_CONTENT, pTextNode->GetText());
}
@@ -583,8 +583,8 @@ void SwUiWriterTest::testChineseConversionTraditionalToSimplified()
// Then
- SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
- CPPUNIT_ASSERT_EQUAL(CHINESE_SIMPLIFIED_CONTENT, pTxtNode->GetTxt());
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(CHINESE_SIMPLIFIED_CONTENT, pTextNode->GetText());
}
@@ -609,8 +609,8 @@ void SwUiWriterTest::testChineseConversionSimplifiedToTraditional()
// Then
- SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
- CPPUNIT_ASSERT_EQUAL(CHINESE_TRADITIONAL_CONTENT, pTxtNode->GetTxt());
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(CHINESE_TRADITIONAL_CONTENT, pTextNode->GetText());
}
@@ -648,7 +648,7 @@ void SwUiWriterTest::testAutoCorr()
pWrtShell->Insert("tset");
pWrtShell->AutoCorrect(corr, cIns);
sal_uLong nIndex = pWrtShell->GetCrsr()->GetNode().GetIndex();
- CPPUNIT_ASSERT_EQUAL(OUString("Test "), static_cast<SwTxtNode*>(pDoc->GetNodes()[nIndex])->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("Test "), static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
//AutoCorrect with change style to bolt
pWrtShell->Insert("Bolt");
@@ -830,8 +830,8 @@ void SwUiWriterTest::testTdf68183()
SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
SwPaM aPaM(aIdx);
- SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode();
- CPPUNIT_ASSERT_EQUAL(false, pTxtNode->GetSwAttrSet().HasItem(RES_PARATR_RSID));
+ SwTextNode* pTextNode = aPaM.GetNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(false, pTextNode->GetSwAttrSet().HasItem(RES_PARATR_RSID));
// Then enable storing of RSID and make sure that the attribute is inserted.
SW_MOD()->GetModuleConfig()->SetStoreRsid(true);
@@ -839,7 +839,7 @@ void SwUiWriterTest::testTdf68183()
pWrtShell->DelToStartOfLine();
pWrtShell->Insert2("X");
- CPPUNIT_ASSERT_EQUAL(true, pTxtNode->GetSwAttrSet().HasItem(RES_PARATR_RSID));
+ CPPUNIT_ASSERT_EQUAL(true, pTextNode->GetSwAttrSet().HasItem(RES_PARATR_RSID));
}
void SwUiWriterTest::testCp1000115()
@@ -888,14 +888,14 @@ void SwUiWriterTest::testSearchWithTransliterate()
//transliteration option set so that at least one of the search strings is not found
sal_uLong case1 = pWrtShell->SearchPattern(SearchOpt,true,DOCPOS_START,DOCPOS_END,FND_IN_BODY,false);
SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(true);
- CPPUNIT_ASSERT_EQUAL(OUString(""),pShellCrsr->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString(""),pShellCrsr->GetText());
CPPUNIT_ASSERT_EQUAL(0,(int)case1);
SearchOpt.searchString = "paragraph";
SearchOpt.transliterateFlags = com::sun::star::i18n::TransliterationModulesExtra::IGNORE_KASHIDA_CTL;
//transliteration option set so that all search strings are found
sal_uLong case2 = pWrtShell->SearchPattern(SearchOpt,true,DOCPOS_START,DOCPOS_END,FND_IN_BODY,false);
pShellCrsr = pWrtShell->getShellCrsr(true);
- CPPUNIT_ASSERT_EQUAL(OUString("paragraph"),pShellCrsr->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("paragraph"),pShellCrsr->GetText());
CPPUNIT_ASSERT_EQUAL(1,(int)case2);
}
@@ -933,13 +933,13 @@ void SwUiWriterTest::testUndoCharAttribute()
pCrsr->Move(fnMoveBackward);
}
// Check that correct text was selected
- CPPUNIT_ASSERT_EQUAL(OUString("be bolded"), pCrsr->GetTxt());
+ CPPUNIT_ASSERT_EQUAL(OUString("be bolded"), pCrsr->GetText());
// Apply a "Bold" attribute to selection
SvxWeightItem aWeightItem(WEIGHT_BOLD, RES_CHRATR_WEIGHT);
rIDCO.InsertPoolItem(*pCrsr, aWeightItem);
SfxItemSet aSet( pDoc->GetAttrPool(), RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT);
// Adds selected text's attributes to aSet
- pCrsr->GetNode().GetTxtNode()->GetAttr(aSet, 10, 19);
+ pCrsr->GetNode().GetTextNode()->GetAttr(aSet, 10, 19);
SfxPoolItem const * aPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT);
SfxPoolItem& ampPoolItem = aWeightItem;
// Check that bold is active on the selection; checks if it's in aSet
@@ -948,7 +948,7 @@ void SwUiWriterTest::testUndoCharAttribute()
rUndoManager.Undo();
// Check that bold is no longer active
aSet.ClearItem(RES_CHRATR_WEIGHT);
- pCrsr->GetNode().GetTxtNode()->GetAttr(aSet, 10, 19);
+ pCrsr->GetNode().GetTextNode()->GetAttr(aSet, 10, 19);
aPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT);
CPPUNIT_ASSERT_EQUAL((*aPoolItem == ampPoolItem), false);
}
@@ -957,8 +957,8 @@ void SwUiWriterTest::testTdf86639()
{
SwDoc* pDoc = createDoc("tdf86639.rtf");
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
- SwTxtFmtColl* pColl = pDoc->FindTxtFmtCollByName("Heading");
- pWrtShell->SetTxtFmtColl(pColl);
+ SwTextFormatColl* pColl = pDoc->FindTextFormatCollByName("Heading");
+ pWrtShell->SetTextFormatColl(pColl);
OUString aExpected = pColl->GetAttrSet().GetFont().GetFamilyName();
// This was Calibri, should be Liberation Sans.
CPPUNIT_ASSERT_EQUAL(aExpected, getProperty<OUString>(getRun(getParagraph(1), 1), "CharFontName"));
@@ -970,7 +970,7 @@ void SwUiWriterTest::testTdf90883TableBoxGetCoordinates()
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
pWrtShell->Down(true);
SwSelBoxes aBoxes;
- ::GetTblSel( *pWrtShell, aBoxes );
+ ::GetTableSel( *pWrtShell, aBoxes );
CPPUNIT_ASSERT_EQUAL( 2, (int)aBoxes.size() );
Point pos ( aBoxes[0]->GetCoordinates() );
CPPUNIT_ASSERT_EQUAL( 1, (int)pos.X() );
diff --git a/sw/qa/python/check_table.py b/sw/qa/python/check_table.py
index 95db0b4281b4..f31ac913105b 100644
--- a/sw/qa/python/check_table.py
+++ b/sw/qa/python/check_table.py
@@ -246,7 +246,7 @@ class CheckTable(unittest.TestCase):
xAnchor = xTable.getAnchor()
# check all properties on the anchor - shouldn't crash despite
- # pointing to a non-SwTxtNode
+ # pointing to a non-SwTextNode
xPropsInfo = xAnchor.getPropertySetInfo()
for i in xPropsInfo.getProperties():
try: