testcase for 133f4d750a
Change-Id: Ibdb06d50ca79b2882ad7bd984e30beb09e7c7b95
This commit is contained in:
29
sw/qa/extras/rtfimport/data/fdo42109.rtf
Normal file
29
sw/qa/extras/rtfimport/data/fdo42109.rtf
Normal file
@@ -0,0 +1,29 @@
|
||||
{\rtf1
|
||||
\ltrrow\trowd \irow0\irowband0\lastrow \ltrrow\ts15\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10\brdrcf17 \trbrdrl\brdrs\brdrw10\brdrcf17 \trbrdrb\brdrs\brdrw10\brdrcf17 \trbrdrr\brdrs\brdrw10\brdrcf17 \trbrdrh\brdrs\brdrw10\brdrcf17
|
||||
\trbrdrv\brdrs\brdrw10\brdrcf17 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid15622382\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10\brdrcf17
|
||||
\clbrdrl\brdrs\brdrw10\brdrcf17 \clbrdrb\brdrs\brdrw10\brdrcf17 \clbrdrr\brdrs\brdrw10\brdrcf17 \cltxlrtb\clftsWidth3\clwWidth4811\clshdrawnil \cellx4703\clvertalt\clbrdrt\brdrs\brdrw10\brdrcf17 \clbrdrl\brdrs\brdrw10\brdrcf17 \clbrdrb
|
||||
\brdrs\brdrw10\brdrcf17 \clbrdrr\brdrs\brdrw10\brdrcf17 \cltxlrtb\clftsWidth3\clwWidth4811\clshdrawnil \cellx9514\pard\plain \ltrpar\ql \li0\ri0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\yts15 \rtlch\fcs1
|
||||
\af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
|
||||
{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid15622382 \cell }
|
||||
{\field
|
||||
{\*\fldinst
|
||||
{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid15622382 PAGE \\* MERGEFORMAT }
|
||||
}
|
||||
{\fldrslt
|
||||
{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid15622382 1}
|
||||
}
|
||||
}
|
||||
\sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sectrsid418597\sftnbj
|
||||
{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid15622382 \cell }
|
||||
\pard\plain \ltrpar
|
||||
\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
|
||||
{\rtlch\fcs1 \af31507 \ltrch\fcs0
|
||||
\insrsid15622382 \trowd \irow0\irowband0\lastrow \ltrrow\ts15\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10\brdrcf17 \trbrdrl\brdrs\brdrw10\brdrcf17 \trbrdrb\brdrs\brdrw10\brdrcf17 \trbrdrr\brdrs\brdrw10\brdrcf17 \trbrdrh\brdrs\brdrw10\brdrcf17 \trbrdrv
|
||||
\brdrs\brdrw10\brdrcf17 \trftsWidth1\trftsWidthB3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid15622382\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10\brdrcf17 \clbrdrl
|
||||
\brdrs\brdrw10\brdrcf17 \clbrdrb\brdrs\brdrw10\brdrcf17 \clbrdrr\brdrs\brdrw10\brdrcf17 \cltxlrtb\clftsWidth3\clwWidth4811\clshdrawnil \cellx4703\clvertalt\clbrdrt\brdrs\brdrw10\brdrcf17 \clbrdrl\brdrs\brdrw10\brdrcf17 \clbrdrb\brdrs\brdrw10\brdrcf17
|
||||
\clbrdrr\brdrs\brdrw10\brdrcf17 \cltxlrtb\clftsWidth3\clwWidth4811\clshdrawnil \cellx9514\row }
|
||||
\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
|
||||
{\rtlch\fcs1 \af31507 \ltrch\fcs0
|
||||
\insrsid418597
|
||||
\par }
|
||||
}
|
@@ -133,6 +133,7 @@ public:
|
||||
void testFdo51916();
|
||||
void testFdo61193();
|
||||
void testFdo63023();
|
||||
void testFdo42109();
|
||||
|
||||
CPPUNIT_TEST_SUITE(Test);
|
||||
#if !defined(MACOSX) && !defined(WNT)
|
||||
@@ -257,6 +258,7 @@ void Test::run()
|
||||
{"fdo51916.rtf", &Test::testFdo51916},
|
||||
{"hello.rtf", &Test::testFdo61193},
|
||||
{"fdo63023.rtf", &Test::testFdo63023},
|
||||
{"fdo42109.rtf", &Test::testFdo42109},
|
||||
};
|
||||
header();
|
||||
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
|
||||
@@ -1223,6 +1225,16 @@ void Test::testFdo63023()
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xFFFF99), getProperty<sal_Int32>(getRun(getParagraphOfText(1, xHeaderText), 1), "CharBackColor"));
|
||||
}
|
||||
|
||||
void Test::testFdo42109()
|
||||
{
|
||||
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
|
||||
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("B1"), uno::UNO_QUERY);
|
||||
// Make sure the page number is imported as a field in the B1 cell.
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("TextField"), getProperty<OUString>(getRun(getParagraphOfText(1, xCell->getText()), 1), "TextPortionType"));
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
|
||||
|
||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||
|
Reference in New Issue
Block a user