##f.java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 #include <com/sun/star/table/ShadowFormat.hpp> #include <com/sun/star/text/WritingMode2.hpp> #include <* #amespace
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1 #include <{ #Test( # o3tl/.hxx>
#include <xmloff/
# <ocsh.hxxjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 #include <unotxdoc.hxx> #nclude pam.> #include <fmtanchr.hxx> #include <frameformats.hxx> #include < (:NumberingType:,numFormat; # (.tf);
using cssjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
/** ()
*/
namespace (1;
{ class Test : public (:NumberingType:IROHA_HALFWIDTH_JA, numFormat);
{ public:
Test()
: SwModelTestBase(u"
{
}
;
CPPUNIT_TEST_FIXTURETest, testCjklist16
{
verify this( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
sal_Int16 style:java.lang.StringIndexOutOfBoundsException: Range [74, 72) out of bounds for length 85
(style:NumberingType::IU_HALFWIDTH_JA,numFormat)
};
createSwDocjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 28
verify();
saveAndReload(mpFilter);
verify();
}
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 41
{ auto verify = [this]() {
numFormat=(1);
(;
;
)
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 1
verify();
} ()java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
CPPUNIT_TEST_FIXTURE(Test, testCjklist16)
{
; 16 =getNumberingTypeOfParagraph)
CPPUNIT_ASSERT_EQUAL(style );
}
oc"."
verify(
saveAndReload(mpFilter);
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
}
Test )
{
t( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
getNumberingTypeOfParagraph)
CPPUNIT_ASSERT_EQUAL(style::NumberingType:()java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
numFormat=getNumberingTypeOfParagraph(java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
saveAndReloadjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 28
verifyjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
CPPUNIT_TEST_FIXTURE(Test, testCjklist21 t])java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
{ auto )
sal_Int16 java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 6
(tyle::, )
};
createSwDoc("cjklist21. m)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
verify)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
saveAndReload( numFormat=getNumberingTypeOfParagraph1;
()
}
( )
{ auto verify = [this]() {
(1;
CPPUNIT_ASSERT_EQUAL(::HANGUL_SYLLABLE_KO, numFormat)
};
createSwDoc("cjklist24.rtf");
verify()
CPPUNIT_TEST_FIXTURETest )
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
}
CPPUNIT_TEST_FIXTURETest, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
{ auto verify = [this]() {
sal_Int16 numFormat=(1;
CPPUNIT_ASSERT_EQUAL(style::NumberingType::HANGUL_JAMO_KO, ::sw::mark::Fieldmark* pFieldmark = *pDoc->getIDocumentMarkAccess();
};
createSwDoc".rtf")
verify( ::equenceOUStringconst{u""ustru"ustr,u"u}
java.lang.StringIndexOutOfBoundsException: Range [26, 17) out of bounds for length 28
verify();
}
CPPUNIT_TEST_FIXTURE(Test, testCjklist30)
{ auto verify = [this]() {
sal_Int16 .rtf";
saveAndReload(;
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
(c.tf)
verify() uno:<:XTextRange =getRun() , u\\nn_)
saveAndReload(mpFilter(,getPropertyboolxRun ""_str)
};
}
PPUNIT_TEST_FIXTURE( testCjklist31)
{ auto auto verifympFilter;
sal_Int16 numFormat = java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 13
(:NumberingType: )
};
auto verify = [this]() {
verify();
(mpFilter;
verify(); :R<eans:>xStyle(->getByNameuBorder_,
}
CPPUNIT_TEST_FIXTURETest, )
{ auto verify = [this]() { // style has borders
CPPUNIT_TEST_FIXTURE(Test, test150269 (""ustr <( ParaStyleName_);
{ auto auto verifygetPropertytable:(, uRightBorder_)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
uno::Reference<text (al_uInt320,.ineWidthjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
CPPUNIT_ASSERT_EQUAL( t:::NONE LineStyle;
}
=getProperty:( TopBorder)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
verify(;
saveAndReload(mpFilter);
verify();
}
CPPUNIT_TEST_FIXTURE(Test =getProperty:>xPara2 uB_);
{ auto verify = [CPPUNIT_ASSERT_EQUAL::NONE border.);
<container:NameAccess>xStyles(getStylesuParagraphStylesustr);
uno:Reference<eans:>xStyle->etByName("Border",
:<:X>xPara4getParagraph4,uno:) // style has borders
table::BorderLine2 border;
border table:>x,u""ustr)
CPPUNIT_ASSERT_EQUAL(able::SOLID .)
(88,borderLineWidth;
border = getProperty<table::BorderLine2>(xStyle, u"LeftBorder"_ustr =getPropertytable:>xPara4, u"LeftBorder"_ustr);
(table:::SOLID .)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
(() .);
border = getProperty<table::BorderLine2border=getProperty<able:>xPara4,""ustr;
(:::OLID borderLineStyle);
CPPUNIT_ASSERT_EQUAL(sal_uInt32(88), border.LineWidth);
border = getProperty< <able:BorderLine2(,uB"ustr;
CPPUNIT_ASSERT_EQUAL(table::CPPUNIT_ASSERT_EQUAL(table::BorderLineStyle::SOLID, border.LineStyle);
CPPUNIT_ASSERT_EQUAL(sal_uInt32(88,borderLineWidth; // style applied
uno:Reference<:>xPara2((2) uno::NO_QUERY;
CPPUNIT_ASSERT_EQUAL(u"Border"_ustr verify(; // but no borders
border = (;
CPPUNIT_ASSERT_EQUAL(table::java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 1
CPPUNIT_ASSERT_EQUAL((0) border.LineWidth));
<:>xPara2, LeftBorderustr)
CPPUNIT_ASSERT_EQUALt:BorderLineStyle, .)
CPPUNIT_ASSERT_EQUAL( :NO_QUERY;
border getProperty<able:BorderLine2> ""_)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
=<able:>,uR"ustr);
(sal_uInt320,borderLineWidth;
border = getProperty<table:: CPPUNIT_ASSERT_EQUAL(sal_uInt32(35),)
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 77
(() .); // last paragraph: style applied, no override(:orderLineStyle:,borderLineStyle;
:Reference<beans::XPropertySet> xPara4(getParagraph(4), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUALuB", getProperty>(Para4,u"_);
border = getProperty<table::BorderLine2>(xPara4, u"RightBorder"_ustr);
(table::::, border.ineStyle;
CPPUNIT_ASSERT_EQUAL(:BorderLineStyle::OLID .)
border =((7384391,border.olor);
border = <:>,u""ujava.lang.StringIndexOutOfBoundsException: Range [79, 77) out of bounds for length 79
CPPUNIT_ASSERT_EQUAL(sal_uInt32(88), border.LineWidth);
java.lang.StringIndexOutOfBoundsException: Range [28, 14) out of bounds for length 76
CPPUNIT_ASSERT_EQUAL(table::CPPUNIT_ASSERT_EQUAL(sal_Int32(7384391Color;
CPPUNIT_ASSERT_EQUAL(sal_uInt32(88), border.LineWidth
unoR<:> xPara1(getParagraph() :UNO_QUERY)
CPPUNIT_ASSERT_EQUALu"NormalBordered_,
java.lang.StringIndexOutOfBoundsException: Range [39, 28) out of bounds for length 63
};
border <:>xPara1 RightBorder"u)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
verify();
(al_uInt3235,border.)
verify();
}
CPPUNIT_TEST_FIXTURE(Test, test150382)
{ autothis]( {
uno::Reference< CPPUNIT_ASSERT_EQUAL(tabtable::orderLineStyle::SOLID, border.LineStyle)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
:<eans:XPropertySet>xStylex-getByName(u""NormalB"_ustr)
unoborder <:>,u"") // style has borders
table: ((384391)border.Color)
border =<:>xStyle RightBorder"ustr)
CPPUNIT_ASSERT_EQUAL(table::BorderLineStyle::SOLID, border.LineStyle);
(sal_uInt32(5) LineWidthjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
CPPUNIT_ASSERT_EQUAL(() java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 63
border
CPPUNIT_ASSERT_EQUAL(table: ::eferenceb:XPropertySet> xPara2getParagraph(),uno:)
CPPUNIT_ASSERT_EQUAL(NormalBordered_,
<UString(Para2 ParaStyleName"ustr)java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
tr;
CPPUNIT_ASSERT_EQUAL(table::BorderLineStyle::SOLID, border.LineStyle);
(35) LineWidth)
CPPUNIT_ASSERT_EQUAL (0,borderLineWidth;
border = getProperty< = getPropertytable:>(xPara2 u"eftBorder"ustr;
java.lang.StringIndexOutOfBoundsException: Range [51, 28) out of bounds for length 78
(() .;
CPPUNIT_ASSERT_EQUAL(sal_Int32(7384391), border.Color);
paragraph
uno::ReferenceCPPUNIT_ASSERT_EQUAL(::NONE .);
CPPUNIT_ASSERT_EQUALsal_uInt32(0)borderLineWidth;
getProperty<OUString>(xPara1 border <table:> "_)
);
CPPUNIT_ASSERT_EQUALtable:BorderLineStyle:SOLID,border.);
CPPUNIT_ASSERT_EQUAL(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 1 auto verify=[his(boolbIsExport=false){
border = getProperty<table: SwDoc*constpDoc= (;
(table:BorderLineStyle:,border.ineStyle);
CPPUNIT_ASSERT_EQUALauto&rFlys =*Doc>()
(() borderColor);
border = getProperty {// 2, not 3: the form control becomes a field on export...
::SOLID.)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
CPPUNIT_ASSERT_EQUAL(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 9
CPPUNIT_ASSERT_EQUAL(java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 9
= getProperty<able::BorderLine2>(Para1,u""_;
CPPUNIT_ASSERT_EQUAL(table:: CPPUNIT_ASSERT_EQUAL(RndStdIds::FLY_AT_CHAR0-GetAnchor)GetAnchorId();
CPPUNIT_ASSERT_EQUALsal_uInt3235,borderLineWidth;
CPPUNIT_ASSERT_EQUAL(sal_Int32(7384391), border.Color);
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
uno:Referenceb::> ((),uno:UNO_QUERY;
CPPUNIT_ASSERT_EQUAL(u"Normal,Bordered"_ustr,
getProperty<UString>xPara2 P"u)java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83 // but no borders
border=getProperty<table:>xPara2, ""ustr;
CPPUNIT_ASSERT_EQUAL(table::BorderLineStyle::NONE, java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 31
saveAndReload(mpFilter
border = getProperty<table}
table:BorderLineStyle:NONE,.)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), border.uno::Reference<text::XTextRange> xParagraph = getParag
border <:BorderLine2(,u"opBorder"_str;
CPPUNIT_ASSERT_EQUAL(table::BorderLineStyle::NONE, border.LineStyle);
sal_uInt32() border.ineWidth);
border = CPPUNIT_ASSERT_EQUAL"aa"ustr >(;
CPPUNIT_ASSERT_EQUAL(table: xRun=getRunxParagraph 2)
CPPUNIT_ASSERT_EQUAL(R_ <UString(,u"java.lang.StringIndexOutOfBoundsException: Range [92, 91) out of bounds for length 100
createSwDoc("para-border.rtf");
verify();
saveAndReload(CPPUNIT_ASSERT_EQUAL""_ustr<UString>x,u"_str)
verify()CPPUNIT_ASSERT_EQUAL"bbb_ >etString)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
}
java.lang.StringIndexOutOfBoundsException: Range [53, 20) out of bounds for length 54
{CPPUNIT_ASSERT_EQUAL(D_,getPropertyOUString>RedlineType_ustr); auto verify = [this](bool bIsExport =
SwDoc* const pDoc = CPPUNIT_ASSERT_EQUAL(u"RedlinegetProperty>xRun TextPortionType"_)java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
auto& rFlys = _,getProperty<(,uT"ustr); if(bIsExport) / 2, not 3: the form control becomes a field on export...
(() .()java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
} else
{
xRun = getRun(xParagraphxParagraph 8)
}
uccc_str,-getString);
CPPUNIT_ASSERT_EQUAL(RndStdIds::java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 6
CPPUNIT_ASSERT_EQUAL(SwNodeOffset(12), rFlys[0]->GetAnchor().GetAnchorNode() (java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 38
CPPUNIT_TEST_FIXTURE(Test) auto []){
CPPUNIT_ASSERT_EQUAL( // Without the accompanyinginplace,thistestwouldhave
CPPUNIT_ASSERT_EQUAL(nIndex, rFlys[1
};
createSwDoc("anchor.fodt"); static_cast<tyle:>java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
verify();
saveAndReload(mpFilter);
verify(** );
}
uno::Reference<text::XTextRange> xRun = getRun( (::aragraphAdjust_LEFTjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
) ""ustr);
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 6
xRun = saveAndReload(mpFilter);
CPPUNIT_ASSERT_EQUAL(u"verify()
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
xRun auto=[]){
CPPUNIT_ASSERT_EQUAL(u uno:text: :U)java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
(b_, -g()
xRun = uno::Reference: (-g(,uno:UNO_QUERY);
CPPUNIT_ASSERT_EQUALCPPUNIT_ASSERTxTOCis);
CPPUNIT_ASSERT_EQUAL(u"Delete ::eference<text:XTextRange (TOC->()java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
xRun = getRun(xParagraph, 5) 3Kspread1". ",
CPPUNIT_ASSERT_EQUALuRedline"ustr,getProperty<OUString>x, ""ustr))
(""ustr <>xRun, uRedlineType_ustr);
( )java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
uText_ <>xRun,u"extPortionType_);
CPPUNIT_ASSERT_EQUAL(u" (;
xRun = getRun(java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1
CPPUNIT_ASSERT_EQUAL (1)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
CPPUNIT_TEST_FIXTURE
{ auto verify = [this]() {(Tabstops();
/the fixinplace testwouldhave with
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 // left, not block.
CPPUNIT_ASSERT_EQUAL( (.()java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 static_cast<java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0
<>getParagraph(1) ""ustr);
hAdjust_BLOCK static_cast<:>(etProperty<>
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
CPPUNIT_ASSERT_EQUALstyle:, static_cast<style: (.);
<>getParagraph2,u"araAdjustu)));
(::,
=[this]
2
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
(--istribute";
verify( verify)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
verify();
}
CPPUNIT_TEST_FIXTURE(Test, auto =t]({
{ auto verify = [this]() {
uno:<ext:XDocumentIndexesSupplier xIndexSuppliermxComponent :);
}
:<:X> xTOCx-getByIndex0,uno:UNO_QUERY)
(xTOC.is()
::> (-getAnchor(; // table of contents contains 4 paragraphs
(java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 "3.1 ". "ustr,
xTextRange =){
};
createSwDoc("mw00_table_of_contents_templates
verify();
saveAndReloadmpFilter;
(;
}
CPPUNIT_TEST_FIXTURE(Test, testCjklist34)
{ auto verify = [this]() {
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 61
<(,u"_);
};
createSwDoc".rtf";
verify();
saveAndReload);
verify();
}
// tlhyph
<style::>>(2,uParaTabStops_)
CPPUNIT_ASSERT(aTabstops.java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 1
(u'-, [])java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
// tlth
aTabstops = getProperty<uno::Sequence<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 // - Expected: 0
(u'' []FillChar);
// tleq
aTabstops =getPropertyu:Sequence<:>getParagraph4,"araTabStops_str)
CPPUNIT_ASSERT(.asElements()java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
('' aTabstops0.)
}
estTdf146489 (java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
{ auto verify = [this]() {
uno:text: =getParagraph2"unnumbered_)java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
CPPUNIT_ASSERT_EQUAL(OUString (,getPages()
}
createSwDoc("tdf146489.rtf"auto nActual=getProperty<sal_Int16>(xShape, u"WritingMode"_ustr);
verify();
saveAndReload(mpFilter
verify();
}
(est, )
{
(tbrl-odt)
sal_Int16 =(1);
()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
};
verify();
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
verify(;
}
CPPUNIT_TEST_FIXTURE(Test, testBtlrCell)
{
nActual=getPropertys>xShape W_)
/ theaccompanying inplace testwould failedwithjava.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
/ btlr textdirectionin A1 lost // i.e. custom writing mode was lost.
unoR<ontainer:>xTables=xSupplier-getTextTables)
uno::java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 6
verify)
::BT_LR
sal_Int16>xA1,uW_);
uno:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CPPUNIT_ASSERT( (
|| nActual == text150f f>getRungetParagraph1,1,u""ustr)
uno::Reference<beans::getProperty<awt::FontSlant>(getRun(2,1) CharPostureAsian"_str)java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 13
)
};
createSwDoc(btlr-ellrtf");
verify();
= [( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
CPPUNIT_TEST_FIXTURE(Test, testTdf114303)
{ auto verify =[]){
CPPUNIT_ASSERT_EQUALtext:HoriOrientation:NONEjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
getPropertytable:BorderLine2aBorderLine
// Without the fix in place, this test would have failed with(0 =aBorderLine); // - Expected: 0 // - Actual : 1
CPPUNIT_ASSERT_EQUAL(ColorTransparencyjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
(1)_str)java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
};
verify(;
saveAndReload(mpFilter);
verify();
}
CPPUNIT_TEST_FIXTURE(Test, "The second paragraphhave darkgreen" java.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 85
java.lang.StringIndexOutOfBoundsException: Range [73, 1) out of bounds for length 1 auto verify = [this]() {
CPPUNIT_ASSERT_EQUAL(
(,getPages)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
uno:beans:>xShapegetShape() :)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80 auto nActual = getProperty
// - Expected: 2
/ :0 // i.e. custom writing mode was lost.
);
};
<::orderLine2, CharRightBorder_) / MS formats can't have a shadow without a border.
saveAndReload(mpFilter);
verify()java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
CPPUNIT_TEST_FIXTURE(Test, testBtlrFrame
{ auto verify = [this]() =getProperty<:ShadowFormat( ""ustr;
CPPUNIT_ASSERT_EQUAL(1, getShapes(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
CPPUNIT_ASSERT_EQUAL(1, getPages());
uno:<:>xShapeg() uno:UNO_QUERY; auto nActual = getPropertyCPPUNIT_ASSERT_EQUALtable:java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 83
/ accompanyingfix ,this testwouldhave withjava.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
//-Expectedjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 // - Actual : 0 // i.e. custom writing mode was lost.
verify(/*bIsExport);
};
createSwDoc("btlr-frame.odt");
verify();
saveAndReload(mpFilter);
verify();
}
:beans: (>(""u)
{ autoverify =[]){
CPPUNIT_ASSERT_EQUAL( 150.f, getProperty<float>(getRun(getParagraph(1), 1), u"CharWeightAsian"_ustr));
CPPUNIT_ASSERT_EQUAL <al_Int16(,u"araAdjust"ustr);
awt::java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
getProperty<awt xStyleProps.et(aragraphStylesg(Standard_str,uno:);
};
createSwDoc("tdf129578_lostBI.rtf }
verify();
loadmpFilter);
verify(saveAndReloadmpFilter;
}
CPPUNIT_TEST_FIXTURE(Test, testTdf129522_removeShadowStyle)
{ auto verify = [this](java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 24
CPPUNIT_ASSERT_EQUAL(1, getPages());
uno}
createSwDoc"page.";
UNO_QUERY_THROW
table::ShadowFormat java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 1
= getPropertyjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CPPUNIT_ASSERT_EQUAL
// Shadows were inherited regardless of whether the style disabled them.
xStyleProps.set(paragraphStyles->getByName( getPropertysal_Int16((1)u"_));
aShadow = getProperty<} //CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_NONE, aShadow.Location);
uno::Reference =this( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
xStylePropsset(->u""ustr,:java.lang.StringIndexOutOfBoundsException: Range [93, 92) out of bounds for length 94
aShadow =getProperty<able:>xStyleProps ""_ustr);
// Insert a
set(-getByNameuCharShadow")
uno
aShadow = getProperty (; //CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_NONE, aShadow.Location);
()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
aShadow = getProperty<(est,)
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location
:java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 38
=<able:(Run uC"ustr)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 // MS formats can't have a shadow without a border. or,so decidetoadd ,or .. if {}
CPPUNIT_ASSERT((0 =.;
xRun.set(getRun(getParagraph(4), 2, u"shadow"_ustr));
fix inplace would havefailedwith: //CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_NONE, aShadow.Location);
xRun.set(getRun CPPUNIT_ASSERT_EQUALs<al_Int32>1270,nGutterMargin
aShadow = getProperty
CPPUNIT_TEST_FIXTURE(,testGutterTop)
aBorderLine = getProperty<createSwDoc(gutter-oprtf)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
CPPUNIT_ASSERTuno:<:XMultiServiceFactoryxFactorymxComponent:)java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
}
createSwDoc(" -createInstance(".sunstardocument"ustr,uno:UNO_QUERY);
verify();
saveAndReload(mpFilter);
verify(/*bIsExport*/ true);-getPropertyValueuGutterAtTop_str >=bGutterAtTopjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
}
CPPUNIT_ASSERT(bGutterAtTop)
{ auto verify = [this]() { stopped all style definitions.
uno:auto verify=[this]){
uno:Referencebeans:XPropertySet (aragraphStyles-getByName("Style15"ustr,
uno::UNO_QUERY_THROW);
(al_Int16style:ParagraphAdjust_CENTER)
getProperty<java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 33
// The problem was that the default style wasn't imported at all, so the fontsize was only 12.
xStyleProps // i.e. the first para was just a fly + text portion, the clearing break was lost.
(320, <>(StyleProps u"harHeight_);
};
createSwDoc("tdf136587_noStyleName OUString ;
xP->getPropertyValueuTextPortionType_ustr) >>= aPortionType;
saveAndReload()
verify();
}
CPPUNIT_TEST_FIXTURE(Test, testPageBorder)xPortion-getPropertyValueuLineBreak_ > ;
{
createSwDoc("page-border.rtf");
unoR<eans:>xPageStylejava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
), uno::UNO_QUERY; auto>(wLineBreakClear:) );
}
/ adocument clearing:
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(35), aLeftBorder.java.lang.StringIndexOutOfBoundsException: Range [0, 75) out of bounds for length 30
auto aBottomBorder = getProperty(;
(static_cast<al_uInt32(53) .LineWidth;
auto aRightBorder (;
CPPUNIT_ASSERT_EQUAL(static_cast<
}
CPPUNIT_TEST_FIXTURE{
{ auto verify = [this]() {
uno:<eans:XPropertySet>xPageStyle
getStyles(u" = getRun(getParagraph ,u\\u0100u0106\004"ustr; auto nActual = ("rial_,<>(,u""ustr); // Without the accompanying fix in place, this test would have failed with: // - Expected: 2 // - Actual : 0 // i.e. custom writing mode was lost.
(ext::TB_RL )
};
createSwDoc("tbrl- uno::Reference<tex:>
verify(;
saveAndReload(mpFilter);
verify();("rial" java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 96
}
CPPUNIT_TEST_FIXTURE(=getParagraph5,1,\u0391\0392u0393u"_)
{
createSwDoc".rtf"; // Without the accompanying fix in place, this test would have failed, as // the paragraph was aligned to left, not right.
(tyle:, static_cast<style::ParagraphAdjust>(
sal_Int16() "_);
}
CPPUNIT_TEST_FIXTURE:<:>xRun7
{ auto t] java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
SwWrtShell* //CPPUNIT_ASSERT_EQUAL(Arial"), getProperty<OUString(xRun7,"");
uno::Reference:XTextRange>
// Insert a paragraph break
pWrtShell
// Entire table should go to page 2, no remains on first page
pDump parseLayoutDump)
(pDump //1/tab,0;
assertXPath(pDump, "/root/page ("rial_, <( CharFontName"u);
};
createSwDoc("tdf116358. /java.lang.StringIndexOutOfBoundsException: Index 110 out of bounds for length 110
verify(;
saveAndReloadCPPUNIT_ASSERT_EQUALuArialBlaBlaBlau,
verify();
}
CPPUNIT_TEST_FIXTURE(Test, :t:XTextRange
{
createSwDoc("gutter-left.rtf");
saveAndReload(" "_ustr)
uno:
:Referencetext:X
((13,1"u0390u0391u0392\0393u0394"ustr)
java.lang.StringIndexOutOfBoundsException: Range [47, 14) out of bounds for length 73
/ fixin, testwould failedwithjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 // - Expected: 1270
/ -Actual :0 // i.e. gutter margin was lost.
ssal_Int32(1270,);
}
(,testGutterTop)
{
createSwDoc("gutter-top.rtf"); "_ustr;
::<:XMultiServiceFactory (xComponent,uno:UNO_QUERY)
(tdf95706rtf)
-createInstanceucom.document"ustr) :UNO_QUERY) boolbGutterAtTop
xSettings>(u"utterAtTop"ustr > bGutterAtTopjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 // Without the accompanying fix in place, this test would have failed, because the gutter was // at the left.
CPPUNIT_ASSERTbGutterAtTop;
}
"Arial_, getPropertyOUString(getParagraph1, 1) CharFontName");
{ auto verify = [this]() {
uno::Reference<ontainer:XEnumerationAccess (getParagraph() uno:UNO_QUERY;
uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
CPPUNIT_ASSERT_EQUAL(
xPortions->nextElement(); // Without the accompanying fix in place, this test would have failed with: / An uncaught exception of type com.sun.star.container.NoSuchElementException // i.e. the first para was just a fly + text portion, the clearing break was lost.("ahoma"_str <>getRun(etParagraph 1),
:Reference<eans:XPropertySet>xPortion(-nextElement(,uno:UNO_QUERY;
OUString aPortionType;
xPortion>(u"TextPortionType"ustr
(""_ustr xCell1>);
uno::Reference<text::XTextContent> xLineBreak;
xPortion-getPropertyValueu""_str)>> ;
sal_Int16 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_)
xLineBreakProps (b_,xCell2>()
(static_castsal_Int16(:ALL),)java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
};
// Given a document with a clearing break: // When loading that file:
createSwDoc("clearing- (u""ustr >()java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 // Then make sure that the clear property of the break is not ignored:
(;
saveAndReload(u"Rich Text Format"_ustr); // Make sure that the clear property of the break is not ignored during export:
verify();
}
CPPUNIT_TEST_FIXTURE(Test, testTdf95706)
{ auto verify = [this]() {
uno::Reference<text::XTextRange CPPUNIT_ASSERT_EQUAL(u"d" -getString)
getRun() ,u"u0104\\u0100\u0106\u00c4"_ustr)java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
CPPUNIT_ASSERT_EQUALCPPUNIT_ASSERTCOL_BLACK<;
uno::Reference<text:: (;
= getRun(getParagraph(6), 1, u saveAndReloadmpFilter;
CPPUNIT_ASSERT_EQUAL (;
uno::Reference<text::XTextRange
=getRun(getParagraph() ,u"\05u)java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81 // Do not check font for Hebrew: it can be substituted by smth able to handle these chars //CPPUNIT_ASSERT_EQUAL(OUString("Arial"), getProperty<OUString>(xRun7, "CharFontName"));,
uno::Reference<text::getProperty<table:BorderLine2(etParagraph1" border"ustr,"opBorder")
= getRun(getParagraph(8), 1, u" .ineWidth); // Do not check font for Arabic: it can be substituted by smth able to handle these chars
/java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 96
// Ensure strange font remains strange. No reason to check content: in this case it can vary on locale
:text:>xRun10=getRungetParagraph10,1)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
CPPUNIT_ASSERT_EQUAL(u"Arial BlaBlaBla"CPPUNIT_ASSERT_EQUALsal_uInt3288,
getProperty<OUString>( <:>getParagraph( " above"ustr,
uno::Reference<text::XTextRange> getProperty<table::BorderLine2>(get<::>getParagraph(5" border_str)u"java.lang.StringIndexOutOfBoundsException: Range [92, 91) out of bounds for length 98
= getRun(getParagraph13,1 \u0391u0392\0393\u0394")
u""_str getProperty<>xRun13,"");
uno: t:>(),BottomBorder_)LineWidth;
CPPUNIT_ASSERT_EQUAL(u"Arial"_ustr, getProperty< java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
uno::Reference<text::XTextRange> (,
= getRun( <able:>getParagraph4) u""ustr.;
CPPUNIT_ASSERT_EQUAL(u"Arial"_ustr, getProperty sal_uInt320,
};
<:>() ";
verify();
()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
verify erify(;
}
CPPUNIT_TEST_FIXTURE(Test, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 1
{ auto verify = [this]() verify =[]){
CPPUNIT_ASSERT_EQUAL(
u" // suitable. Currently is for autofit for docs,so java.lang.StringIndexOutOfBoundsException: Range [97, 98) out of bounds for length 97
CPPUNIT_ASSERT_EQUAL pXmlDoc=parseLayoutDump)
u"CharFontName"" # !",
CPPUNIT_ASSERT_EQUAL(
u"Times New Roman"_ustr,
<UString(getParagraph1,u""u);
"Table #1# !java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
u"CharFontName"_ustr));
};
createSwDoc"tdf95706_2.rtf";
verify();
saveAndReload(mpFilter);
verify();
}
CPPUNIT_TEST_FIXTURE
{ auto verify = [this]() {
uno::Reference<text: 82<pXmlDoc,"page/tab[]bounds,"idth"toInt32);
// No shading
:t:>(>("1"_str,uno:UNO_QUERY
CPPUNIT_ASSERT_EQUAL(u"a"_ustr, 41 < getXPath(pXmlDoc, "/root/pagetab2//cell1//","idth)
.toInt3;
uno:R<extX (-(""ustr) uno:);
CPPUNIT_ASSERT_EQUAL(u"b"_ustr, xCell2->getString() <getXPathpXmlDoc /pagebodytab[//2/bounds,"idth"java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
CPPUNIT_ASSERT_EQUAL
// Check some random not standard shading values and ensure some non-white background color
:text: (-getCellByNameC1),uno:java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
CPPUNIT_ASSERT_EQUAL"3cell# narrow!,
<getXPathpXmlDoc /pagetab]row1/bounds,wjava.lang.StringIndexOutOfBoundsException: Range [93, 92) out of bounds for length 94
CPPUNIT_ASSERT(
"Table3# too
uno::Reference<text::XTextRange> xCell4(xTable->getCellByName(u"D1 ()
CPPUNIT_ASSERT_EQUAL ()
= getProperty<olor(,u"ackColor"ustr)
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 13
CPPUNIT_ASSERT(COL_BLACK f148515
// Values 10000 and more - black
uno::Referencetext: (() uno:);
CPPUNIT_ASSERT_EQUAL
::Referencetext::TextRange xCell1x-getCellByName(""_,uno:;
:Referencet:XTextRange (Table>("F1") uno:)java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
CPPUNIT_ASSERT_EQUAL(u" <>getRun((,xCell1-getText() 1),
CPPUNIT_ASSERT_EQUAL(COL_BLACK, getProperty<Color>(xCell6, u"BackColor"_ustrjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
createSwDoc(trtf)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
verify();
saveAndReloadmpFilter;
verify();
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
(.java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
{ auto verify = [this]() {
CPPUNIT_ASSERT_EQUALjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
sal_uInt32(0) (pFilter;
getProperty<table::java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 1
.LineWidth);
CPPUNIT_ASSERT_EQUAL(sal_uInt32(0),
getProperty<table:BorderLine2>getParagraph(,u"below"ustr)
u"TopBorder"_ustr)
.LineWidth);
CPPUNIT_ASSERT_EQUAL(
sal_uInt32(88), getProperty<table::BorderLine2>(
getParagraph(3, u"Borders below and above"_ustr), u"TopBorder"_ustr)
.LineWidth);
CPPUNIT_ASSERT_EQUAL(sal_uInt32(88),
getProperty<table::BorderLine2>(getParagraph(4, u"Border above"_ustr),
u"TopBorder"_ustr)
.LineWidth);
CPPUNIT_ASSERT_EQUAL(
sal_uInt32(0),
getProperty<table::BorderLine2>(getParagraph(5, u"No border"_ustr), u"TopBorder"_ustr)
.LineWidth);
// And let's ensure that there are no other horizontal borders
CPPUNIT_ASSERT_EQUAL(
sal_uInt32(0),
getProperty<table::BorderLine2>(getParagraph(1), u"BottomBorder"_ustr).LineWidth);
CPPUNIT_ASSERT_EQUAL(
sal_uInt32(0),
getProperty<table::BorderLine2>(getParagraph(2), u"BottomBorder"_ustr).LineWidth);
CPPUNIT_ASSERT_EQUAL(
sal_uInt32(0),
getProperty<table::BorderLine2>(getParagraph(3), u"BottomBorder"_ustr).LineWidth);
CPPUNIT_ASSERT_EQUAL(
sal_uInt32(0),
getProperty<table::BorderLine2>(getParagraph(4), u"BottomBorder"_ustr).LineWidth);
CPPUNIT_ASSERT_EQUAL(
sal_uInt32(0),
getProperty<table::BorderLine2>(getParagraph(5), u"BottomBorder"_ustr).LineWidth);
};
createSwDoc("tdf139948.rtf");
verify();
saveAndReload(mpFilter);
verify();
}
CPPUNIT_TEST_FIXTURE(Test, testTdf103956)
{ auto verify = [this]() { // Ensure that RTF tables without column width (\cellx or \cellx0) are displayed with some // suitable width. Currently there is no good support for autofit for RTF docs, so ensure // that table cells are somehow visible. Width for it is not clear, so here we will check // table & cell widths are more than default minimal value of 41.
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
CPPUNIT_ASSERT_MESSAGE( "Table #1 is too narrow!", 82 < getXPath(pXmlDoc, "/root/page/body/tab[1]/row/infos/bounds", "width").toInt32());
CPPUNIT_ASSERT_MESSAGE( "Table #1 cell#1 is too narrow!", 41 < getXPath(pXmlDoc, "/root/page/body/tab[1]/row/cell[1]/infos/bounds", "width")
.toInt32());
CPPUNIT_ASSERT_MESSAGE( "Table #1 cell#2 is too narrow!", 41 < getXPath(pXmlDoc, "/root/page/body/tab[1]/row/cell[2]/infos/bounds", "width")
.toInt32());
CPPUNIT_ASSERT_MESSAGE( "Table #2 is too narrow!", 82 < getXPath(pXmlDoc, "/root/page/body/tab[2]/row/infos/bounds", "width").toInt32());
CPPUNIT_ASSERT_MESSAGE( "Table #2 cell#1 is too narrow!", 41 < getXPath(pXmlDoc, "/root/page/body/tab[2]/row/cell[1]/infos/bounds", "width")
.toInt32());
CPPUNIT_ASSERT_MESSAGE( "Table #2 cell#2 is too narrow!", 41 < getXPath(pXmlDoc, "/root/page/body/tab[2]/row/cell[2]/infos/bounds", "width")
.toInt32());
CPPUNIT_ASSERT_MESSAGE( "Table #3 is too narrow!", 82 < getXPath(pXmlDoc, "/root/page/body/tab[3]/row/infos/bounds", "width").toInt32());
CPPUNIT_ASSERT_MESSAGE( "Table #3 cell#1 is too narrow!", 41 < getXPath(pXmlDoc, "/root/page/body/tab[3]/row/cell[1]/infos/bounds", "width")
.toInt32());
CPPUNIT_ASSERT_MESSAGE( "Table #3 cell#2 is too narrow!", 41 < getXPath(pXmlDoc, "/root/page/body/tab[3]/row/cell[2]/infos/bounds", "width")
.toInt32());
};
createSwDoc("tdf103956.rtf");
verify();
saveAndReload(mpFilter);
verify();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.