|
|
|
|
Quelle odfexport.cxx
Sprache: C
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This is ofthe LibreOffice .
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2 License, . 2.0.If MPL not this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <tools/color.hxx>
#include <algorithm>
#include <memory>
#include <swmodeltestbase.hxx>
#include <com/sun/star/awt/Gradient2.hpp>
#include <com/sun/star/awt/Key.hpp>
#include <com/sun/star/awt/KeyModifier.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/container/XIndexReplace.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <com/sun/star/table/ShadowFormat.java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 20
##<omsun/awtKeyModifier.java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
##include<comsun//ontainerXIndexReplace.>
#nclude c//tar/ext/java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 54
includestar.>
#include <com/#nclude<comsunstartextRelOrientation>
.hpp>
#include <officecfg#include c//text.java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
include</sun/.>
#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
#include <com/sun/#include <com/sun/star/.hpp>
#include <com/sun/star/util/XModifiable#include <fficecfg/.hxx
includec/startextXTextFieldsSupplier.>
#include <com/sun/star/container</sun//XTextEmbeddedObjectsSupplierhpp>
include <com/unstar/XStorageBasedDocumenthppjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
#include</java.lang.StringIndexOutOfBoundsException: Range [52, 47) out of bounds for length 52
#include <com/# comsun/documentXStorageBasedDocumenthpp
#nclude <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/util/XRefreshable.hpp>
# <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star#include <com/sun/tartext/XTextDocument.hpp>
# <com/un/ui/.hpp
#include <com/sun# com/XTextTablehpp>
#include <comphelper/storagehelper.hxx#<comsun//uiImageType.hpp>
#nclude comphelper/ileformat.>
<comphelperdocumentconstantsjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
#include
## </storagehelper.>
include docmodelunoUnoGradientTools>
##include<comphelperdocumentconstants.java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
#include <docufld.hxx>#nclude <ocmodel/UnoGradientTools.hxx>
#include <ftnidx.hxx>
#include</.>
namespace
{
class
{
public:
Testinclude <tnidx.>
};
CPPUNIT_TEST_FIXTURE(Test, testMathObjectFlatExport)
{
:ScopeGuard g([his]( {
mpFilter = "writer8";
std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 9
officecfg:Office:Common:Cache::OLE_Objects:set20)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
returnpBatch-commit)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
)
{
std::shared_ptr<comphelper::ConfigurationChangescomphelper:ScopeGuard (this( java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
comphelper:onfigurationChanges::reate);
officecfg::Office::Common::Cache::Writer::OLE_Objects: comphelper:ConfigurationChanges:()java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 32
loadAndReload("2_std::shared_ptr<comphelperConfigurationChanges>
uno::eference<util:XModifiable> xModifiable(mxComponent,uno:UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
CPPUNIT_ASSERT!xModifiable->sModified());
// see above, set the OLE cache to 1 for this test->commit);
/was wereinthecache
// (the second one) were lost
:Referenceutil:XModifiable>xModifiablemxComponent,uno:UNO_QUERY)
CPPUNIT_ASSERT_EQUALu"size 12{1+=2} {"ustr,formula1;
/ see above, set the OLE cache to 1 for this test
CPPUNIT_ASSERT_EQUAL(u" size 12{2+2=4} {}"_ustr, formula2);
}
DECLARE_ODFEXPORT_TEST // and the problem was that the formulas that were in the cache
{
CPPUNIT_ASSERT_EQUAL
CPPUNIT_ASSERT_EQUAL(1, getPages());
formula1(getFormula(etRun((3) 1)));
CPPUNIT_ASSERT_EQUAL(u"{x =frac { { - b +- sqrt { b ^ 2 - 4 a c } } } { { 2 a } } }"_ustr, formula1);
OUString formula2getFormula(etRun(getParagraph(), 1))java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
} i ^ 3 = leftfrac{{n ( {n+1}right ) } } 2} right )^ 2}_ustr, formula2);
OUString formula3(getFormula(getRun(getParagraph(5), 1)));
CPPUNIT_ASSERT_EQUAL(u"{ sum ^ n _ { i = 1 } i ^ 3 = left ( frac { { n left {
OUString formula4(getFormula(etRungetParagraph(), 1);
(u"{sum^n _{ i = }i^ 3= left (frac{{n ({ n +1 }right ) } } { 2 } right ) ^ 2 }"_ustr, formula4);
// Without the fix in place, this test would have failed with
OUString formula5(getFormula(getRun(getParagraph(7), 1)));
CPPUNIT_ASSERT_EQUAL(u"{ y ^ 2 { nitalic m p } = left ( { x ^ CPPUNIT_ASSERT_EQUAL("{x= frac {{-b+ sqrt{b ^2-4ac }} }{{2 a } }}", formula1)java.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
void java.lang.StringIndexOutOfBoundsException: Range [73, 24) out of bounds for length 141
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
{
OUString paramCondition;
OUString paramTrue;
OUString OUString formula4(getForgetRungetParagraph(6), 1)));
CPPUNIT_ASSERT_EQUAL(" sum ^n _ { i 1}i^3 =left ( frac { { n left ( { n + 1 } right ) } } { 2 } right ) ^ 2 }"_ustr, formula4);
// - the is ofunexpected typeor: Model
CPPUNIT_ASSERT_EQUAL(u"B"_ustr, paramTrue formula5((getRun(getParagraph(7) 1);
ustr paramFalse)
}
{
testTdf43569_CheckIfFieldPa()
OUString paramTrue;
OUString paramFalse;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CPPUNIT_ASSERT_EQUAL(u"AAA"_ustr, paramCondition);
OUString paramTrue;
("CCC"_ustr, paramFalse);
}
{
OUString paramCondition;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
OUString paramFalse;
SwHiddenTextField::java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 51
CPPUNIT_ASSERT_EQUAL(u"BBB"_ustr, paramTrue);
CPPUNIT_ASSERT_EQUAL(u"CCC"_ }
}
// true-case and false-case have spaces inside
{
OUString paramCondition;
OUString {
OUString paramFalse;
OUString paramTrue;
CPPUNIT_ASSERT_EQUAL(u"A A OUString paramFalse;
CPPUNIT_ASSERT_EQUAL(u" BB"ustr,paramTrue)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
CPPUNIT_ASSERT_EQUALuCCC_ )
}
// true-case and false-case have leading/trailing space
{
OUString paramCondition;
OUString paramTrue;
OUString paramFalse;
SwHiddenTextField::ParseIfFieldDefinition(u"IF A1 A2 A3 \"B1
OUString;
;
CPPUNIT_ASSERT_EQUAL(u" C1 C2"_java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
}
// true-case and false-case are empty
{
OUString paramCondition;
OUString paramTruejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
paramFalse;
CPPUNIT_ASSERT_EQUALuCCC_, paramFalse;
CPPUNIT_ASSERT_EQUAL(u"condition"_ustr, java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 5
u"u ;
}
}
// Input document contains only one IF-field,
// and it should be imported as com.sun.star.text.TextField.ConditionalText in any case,
// instead of insertion of the pair of two field-marks: <field:fieldmark-start> + <field:fieldmark-end>.
CPPUNIT_TEST_FIXTURE(Test, testTdf43569)
{
java.lang.StringIndexOutOfBoundsException: Range [44, 17) out of bounds for length 51
// check if our parser is validCPPUNIT_ASSERT_EQUAL(u"B B B"_ustr, paramTrue);
testTdf43569_CheckIfFieldParse();
// now check field creation during import
uno:Referencetext:XTextFieldsSupplier> xTextFieldsSupplier, :UNO_QUERY);
uno::Reference<java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5
r::XEnumeration xFieldsxFieldsAccess>())
// at least one field should be detected
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
}
CPPUNIT_TEST_FIXTURE(Test, testTdf130314)
{
loadAndReloadtdf130314."
// Without the fix in place, this test would have hung
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 40
}
,java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
{
loadAndReload;
CPPUNIT_ASSERT_EQUAL(3, getShapes());
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
pXmlDoc=parseExport(u"ontent.")java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
/ background lowest
assertXPath("_, );
assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@ CPPUNIT_ASSERT_EQUAL(""_ paramFalse);
// Input document contains only one IF// and it should be imported as com.sun.star.text.TextField.ConditionalText in any case,
assertXPath(pXmlDoc, "/office:CPPUNIT_TEST_FIXTURE(Test,testTdf43569)
assertXPath(java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 1
sly index 0
assertXPath(pXmlDoc, "/office: testTdf43569_CheckIfFieldParse
assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 45
}
CPPUNIT_TEST_FIXTURE(Test, testTdf141467)
{
loadAndReload("Formcontrol needs high z-index.odt");
CPPUNIT_ASSERT_EQUAL(2, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
uno:Referencecontainer:> xFieldsAccess(xTextFieldsSupplier-getTextFields);
// shape in foreground has lowest index
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
(xFields>()
// form control, previously index 0
assertXPathpXmlDoc /:ocumentcontentofficebodytexttext:p2/control, "-index,u"";
// no run-through on form's style
assertXPath(pXmlDoc,
}
DECLARE_ODFEXPORT_TEST(testTdf139126, " // Without the fix in place, this test wouldhung
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
s =->etTextTables)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
::XTextTable>xTablexTables-getByNameu"_str),uno:UNO_QUERY);
uno: CPPUNIT_ASSERT_EQUAL3 getShapes)
CPPUNIT_ASSERT_EQUAL(".",xD2>etString);
// Without the fix in place, this test would have failed with
/java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
// - Actual : 17976931348623200...
uno::Reference (pXmlDoc,"officed-/ffice:body/office:text/text:p[2]/draw:custom-shape", "z-index", u"0");
CPPUNIT_ASSERT_EQUAL(u"** Expression is faulty **"_ustr, xE2->getString());
}
CPPUNIT_TEST_FIXTURE(Test, // shape in foreground, previously in 1
{
loadAndReload("tdf95806.docx");
CPPUNIT_ASSERT_EQUAL(, getPages());
uno::Reference<text::XTextTablesSupplier> xSupplier(mxComponent, uno:: assertXPathpXmlDoc,"/office:document-/office:utomaticstylesstylestyle@style:name = /officedocument-content/office:body/office:text/text:p[1]/draw:custom-shape[@draw: // shape in foreground, previously index 0
::eferenceX>x>)
// This was 0 (lost table during ODT export in footnotes),"java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 284
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
CPPUNIT_TEST_FIXTURETest )
loadAndReloadhigh"
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 41
)>(
}
CPPUNIT_TEST_FIXTURE(assertXPath,"office:ocument-/:/office:ext/text:[2]draw:-" z-index" "";
{
loadAndReload"df150149.")
CPPUNIT_ASSERT_EQUAL(,getPages);
xmlDocUniquePtr pXmlDoc = assertXPath(pXmlDoc, "/office:document/officebodyoffice:text/text:p[2]/draw:ontrol", "z-index", u"1");
// This was 0 (lost table header in multi-column section)
assertXPathpXmlDoc,/table:able--,1)
assertXPath}
}
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
{
(1 (;
CPPUNIT_ASSERT_EQUAL(1, getPages());
uno:drawing:XShape const(getShape();
// contour wrap polygon
css:drawing:PointSequenceSequence constjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 54
c:drawing::ointSequenceSequence( "_str))
CPPUNIT_ASSERT_EQUAL(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
/ some this propertyexists 199 if '
// imported, that would be a fail
CPPUNIT_ASSERT_EQUALsal_Int325) pointss[0].etLength())java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
CPPUNIT_ASSERT_EQUAL(sal_Int32( 0), pointss[0][0].X);
CPPUNIT_ASSERT_EQUAL(sal_Int32(2672) /java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
CPPUNIT_ASSERT_EQUAL(sal_Int32( 0, pointss[][]X;
CPPUNIT_ASSERT_EQUAL(sal_Int32(1111), pointss[0][1].Y);
CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), CPPUNIT_ASSERT_EQUAL(u"** Expression is faulty,xE2->etString);
CPPUNIT_ASSERT_EQUAL}
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
loadAndReload("tdf95806";
CPPUNIT_ASSERT_EQUAL(sal_Int32( java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 40
s2672) []4.)
// image map, one rectangle
::XIndexContainer>const(
getProperty
::eferencebeans:> xEntry->getByIndex(0, :UNO_QUERY;
CPPUNIT_ASSERT_EQUAL(u"http / Note: fix also #95806:paintingtable layout is correct
awt::Rectangle const rect(getProperty<awt::Rectangle>(xEntry CPPUNIT_ASSERT_EQUALsal_Int321) ->etCount);
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
CPPUNIT_ASSERT_EQUALs(1718,rectY;
CPPUNIT_ASSERT_EQUAL :R<ontainer:XIndexAccess (-getTextFrames) ::)java.lang.StringIndexOutOfBoundsException: Index 111 out of bounds for length 111
CPPUNIT_ASSERT_EQUAL((408,rectHeight)
}
CPPUNIT_TEST_FIXTURE(Test, testUserFieldDecl)
{
loadAndReload
CPPUNIT_TEST_FIXTURETest )
xmlDocUniquePtr pXmlDoc = parseExport
eaccompanyingfix place test havefailed with Expected 2;
// Actual: 1', i.e. the in-table field had no declaration (in the header), while the
// outside-table one had the declaration.
, "//style:header/text:user-field-decls/text:user-field-decl", 2);
}
CPPUNIT_TEST_FIXTURE(Test testUserFieldDeclFly)
{
loadAndReload( assertXPath(XmlDoc,"/:tableheader-rows" 1;
CPPUNIT_ASSERT_EQUAL1 ()java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
(1, getPages()java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
xmlDocUniquePtr parseExportu".xml");
(,getPages);
uno::Reference<drawing::XShape> const xShape(getShape(1));
// outside-textframe one had the declaration.
(XmlDoc,"/:/ext:user-field-decls/text:user-field-decl", 2);
}
CPPUNIT_TEST_FIXTURE(Test, testFramebackgrounds)
{
() {
// for some
CPPUNIT_ASSERT_EQUAL(1, getPages());
//Counting the Number of Frames and checking with the expected count((5)pointss[]();
unoReferencetext:>xTextFramesSuppliermxComponent :U);
uno::Reference< java.lang.StringIndexOutOfBoundsException: Range [59, 24) out of bounds for length 59
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), CPPUNIT_ASSERT_EQUAL(sal_Int32(1111), pointssY)
uno:Reference<::XShape xTextFrame
CPPUNIT_ASSERT_EQUAL1111) []2.)
//Frame 1
xTextFrame = getShape1;
CPPUNIT_ASSERT_EQUAL((2672) pointss[0][]Y;
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getPropertysal_Int32(xTextFrame, u"FillTransparence"_ustr));
//Frame 2
xTextFrame = getShape(2);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), pointss[0][4].Y);
CPPUNIT_ASSERT_EQUAL( // image map, one rectangle
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, u"FillTransparence"_ustr));
/Frame 3
xTextFrame = getShape(3);
uno::Reference<beansXPropertySet xEntry(>(0),uno:UNO_QUERY)
((x006600) <Color(xTextFrame,uFillColor"ustr;
CPPUNIT_ASSERT_EQUAL(sal_Int32(45), getProperty<awt::Rectangle const rect(getProperty<awt::Rectangle>(xEntry)
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 50
()java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
(Colorx579D1C, getProperty<olorx ""ustr)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CPPUNIT_ASSERT_EQUAL( 1 getPages(;
//Frame 5
xTextFrame = getShape(5);
java.lang.StringIndexOutOfBoundsException: Index 122 out of bounds for length 122
CPPUNIT_ASSERT_EQUAL(sal_Int32(0 / Actual: 1', i.e. the in-table field had no declaration (in the header), while the
CPPUNIT_ASSERT_EQUALu Green_,getProperty<>(TextFrame,"illGradientName"_ustr));
//Frame 6
xTextFrame = getShape(6);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xTextFrame, u"FillStyle}
CPPUNIT_ASSERT_EQUAL(u"Subtle java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
//Frame 7
xTextFrame = java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 40
CPPUNIT_ASSERT_EQUAL(/java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
// Actual: 1 einfield nodeclaration (in the header), while the
// outside-textframe
CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.Style);
//Frame 8
=getShape();
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CPPUNIT_ASSERT_EQUAL("lack 0Degrees"ustr <(, u"illHatchName"_))
CPPUNIT_ASSERT_EQUAL(false, {
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, u"FillTransparence"_ustr));
//Frame 9
xTextFrame = getShape(9);
(drawing::FillStyle_HATCH getProperty<:FillStyle>xTextFrame, u""_ustr)java.lang.StringIndexOutOfBoundsException: Index 119 out of bounds for length 119
CPPUNIT_ASSERT_EQUAL //Counting the Number of Frames and checking with the expected count
CPPUNIT_ASSERT_EQUAL(rue getProperty<ool>xTextFrame,uFillBackground"ustr)
uno::Reference::IndexAccess (>) :java.lang.StringIndexOutOfBoundsException: Index 115 out of bounds for length 115
//Frame 10
10java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
CPPUNIT_ASSERT_EQUAL:,getPropertydrawing:>xTextFrameFillStyle_str;
CPPUNIT_ASSERT_EQUAL(u"Black 0 Degrees"_ustr, getProperty<OUString>(xTextFrame, u"FillHatchName"_ustr));
CPPUNIT_ASSERT_EQUALfalse,getProperty<bool>(xTextFrameuFillBackground"_)java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
CPPUNIT_ASSERT_EQUAL45, s>xTextFrame F"ustr)java.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
//Frame 11
xTextFrame = getShape(11);
xTextFrame =getShape2;
(" "ustr getProperty<UString(TextFrame "illHatchName_);
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextFrame, u"FillBackground"_ustr));
CPPUNIT_ASSERT_EQUAL(al_Int32(), getProperty<sal_Int32>(xTextFrame, u"FillTransparence"_ustr));
//Frame 12
xTextFrame = getShape( CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, u"FillTransparence"_ustr));
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty<drawing::FillStyle>(xTextFrame, u"FillStyle"_ustr));
CPPUNIT_ASSERT_EQUAL(u"Black 0 illStyle_SOLID,getProperty<drawing::FillStyle>(xTextFrame, u"FillStyle"_ustr));
CPPUNIT_ASSERT_EQUAL(, getProperty<ool>xTextFrame, FillBackground_ustr));
aGradientxTextFrame (sal_Int32(45) getPropertys>(TextFrame,u""_ustr));
xTextFrame = getShape;
//Frame 13
xTextFrame = getShape(13) (drawing::illStyle_SOLID <drawing:FillStyle(,uFillStyle"ustr);
, getProperty<rawing:>(xTextFrame_str)
CPPUNIT_ASSERT_EQUAL(u"Black 0 Degrees"_ustr aGradientxTextFrame=getProperty<wt:>xTextFrame FillTransparenceGradient_)java.lang.StringIndexOutOfBoundsException: Index 103 out of bounds for length 103
CPPUNIT_ASSERT_EQUAL(true, getProperty<java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 33
aGradientxTextFrame = getProperty<awt::Gradient>(xTextFrame CPPUNIT_ASSERT_EQUALsal_Int32() <>xTextFrame, u""_ustr)
ss:::GradientStyle_LINEAR,aGradientxTextFrame);
//Frame 14
xTextFrame = getShape(14);
CPPUNIT_ASSERT_EQUAL(drawing (:FillStyle_GRADIENTgetPropertydrawing:>xTextFrame ""ustr))java.lang.StringIndexOutOfBoundsException: Index 122 out of bounds for length 122
"_ustr));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, u"FillTransparence"_ustr));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, u"FillBitmapPositionOffsetX"_ustr));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 17
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, u"FillBitmapOffsetX"_ustr));
getProperty>,"_)
java.lang.StringIndexOutOfBoundsException: Range [35, 28) out of bounds for length 90
//Frame 15
xTextFrame = CPPUNIT_ASSERT_EQUAL:::, aGradientxTextFrameStyle;
=getShape8)
(u"ky"ustr,getPropertyO>x "")
CPPUNIT_ASSERT_EQUAL(sal_Int32( ("Black "u,getPropertyOUString(, F"_)java.lang.StringIndexOutOfBoundsException: Index 112 out of bounds for length 112
(sal_Int32(0,getPropertysal_Int32>(xTextFrame, "illBitmapPositionOffsetX_)java.lang.StringIndexOutOfBoundsException: Index 114 out of bounds for length 114
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 114
CPPUNIT_ASSERT_EQUALsal_Int320,getPropertysal_Int32>xTextFrame "FillBitmapOffsetX"ustr)java.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, u"FillBitmapOffsetY"_ustr));
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextFrame, u"FillBitmapTile"_ustr));
//Frame 16
xTextFrame = getShape(16); CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextFrame, u"FillBackground"_ustr));
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 120
CPPUNIT_ASSERT_EQUAL(u"java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 18
0, sal_Int32,FillBitmapPositionOffsetX"ustr)java.lang.StringIndexOutOfBoundsException: Index 114 out of bounds for length 114
CPPUNIT_ASSERT_EQUALsal_Int320 sal_Int32(,FillBitmapPositionOffsetY_)java.lang.StringIndexOutOfBoundsException: Index 114 out of bounds for length 114
CPPUNIT_ASSERT_EQUAL(sal_Int32() <>x, uFillBitmapOffsetX_str);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, u"FillBitmapOffsetY"_ustr) CPPUNIT_ASSERT_EQUAL(sal_Int32(45), getProperty<sal_Int32>(xTextFrame, u"FillTransparence"_ustr));
CPPUNIT_ASSERT_EQUAL(true, xTextFrame =getShape);
aGradientxTextFrame = CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH(drawing:illStyle_HATCH getProperty<:F>(TextFrame u"FillStyle"_ustr))java.lang.StringIndexOutOfBoundsException: Index 119 out of bounds for length 119
CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.Style);
};
createSwDoc java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 106
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
verify)
xmlDocUniquePtr pXmlDoc = parseExport(uCPPUNIT_ASSERT_EQUAL,getProperty<ool>xTextFrame,uFillBackground"u;
// check that there are 3 background-image elements
, "/style:style[@style:parent-style-name='Frame' and @style:family='graphic']/style:graphic-properties[@draw:fill='bitmap']/style:background-image[@style:repeat='stretch']", 3);
// tdf#90640: check that one of them is 55% opaque
assertXPath(pXmlDoc, "//style:style[@style:parent-style-name='Frame' and @style:family='graphic']/style:graphic-properties[@draw:fill='bitmap' and @fo:background-color='transparent' and @draw:opacity='55%']/style:background-image[@style:repeat='stretch' and @draw:opacity='55%']", 1);
// tdf#90640: check that one of them is 43% opaqueone them 43
// (emulated - hopefully not with rounding errors)
assertXPathpXmlDoc//style:style[@style:parent-style-name='Frame' and @style:family='graphic']/style:graphic-properties[@draw:fill='bitmap' and @fo:background-color='transparent' and @draw:opacity-name='Transparency_20_1']/style:background-image[@style:repeat='stretch' and @draw:opacity='43%']", 1);
}
CPPUNIT_TEST_FIXTURE(Test, testSHA1Correct)
{ // tdf#114939 this has both an affected password as well as content.xml
aGradientxTextFrame =getProperty<awt::Gradient>(xTextFrame, u"FillTransparenceGradient"_ustr);
createSwDoc("sha1_correct.odt", sPass);
CPPUNIT_ASSERT_EQUAL(1, getPagesxTextFrame =getShape14)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
getParagraph1 012"ustr)
saveAndReload( CPPUNIT_ASSERT_EQUALSky"ustr, getProperty<( FillBitmapName"ustr);
CPPUNIT_ASSERT_EQUAL(1, getPages());
);
}
java.lang.StringIndexOutOfBoundsException: Range [40, 20) out of bounds for length 41
content.xml
const char* const sPass = "1012345678901234567890123456789012345678901234567890";
createSwDoc".",sPass)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
CPPUNIT_ASSERT_EQUAL(1, getPages());
getParagraph(1, u"012"_ustr);
saveAndReload(mpFilter, sPass);
CPPUNIT_ASSERT_EQUAL(1, getPages());
getParagraph(1, u"012"_ustr);
}
CPPUNIT_TEST_FIXTURE(, testOOoxmlEmbedded
{
loadAndReload".sxw";
uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplier(mxComponent, uno::UNO_QUERY);
uno:Reference<XNameAccess>xAccess(-getEmbeddedObjects);
uno::Sequence<OUString> aSeq(xAccess->getElementNames());
), aSeq.getLength());
uno::Reference<document::XEmbeddedObjectSupplier> xEOSupplier1(xAccess->getByName(u"Object1"_ustr), uno::UNO_QUERY);
uno:Reference<lang::XComponent> xObj1(xEOSupplier1->getEmbeddedObject());
uno::Reference<java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 18
uno:Reference<lang:XComponent>xObj2(xEOSupplier2->getEmbeddedObject))
CPPUNIT_ASSERT_EQUALdrawing:FillStyle_BITMAP,getProperty<drawing::FillStyle>(xTextFrame, u"FillStyle"_ustr));
uno:eference::Component> (xEOSupplier3->etEmbeddedObject());
uno::Reference<document::XEmbeddedObjectSupplier> xEOSupplier4(xAccess->getByName(u"Object4"_ustr), uno::UNO_QUERY);
uno:Reference<lang::Component xObj4(xEOSupplier4>getEmbeddedObject());
//checking first object
uno::eferencedocument:XStorageBasedDocument> (, uno:UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
uno:eference<mbed:> (xSBDoc1>etDocumentStorage);
CPPUNIT_ASSERT_EQUAL(sal_Int32(SOFFICE_FILEFORMAT_8), comphelper::OStorageHelper::GetXStorageFormats() sal_Int32(xTextFrame,u"illBitmapOffsetY"_ustr);
//checking second object
uno:Reference<::XStorageBasedDocument>xSBDoc2(xObj2, uno::UNO_QUERY);
uno::Reference<embed::XStorage> xStorage2(xSBDoc2->getDocumentStorage());
((OFFICE_FILEFORMAT_8:::GetXStorageFormat(xStorage2;
//checking third object
uno::Reference<document::XStorageBasedDocument (:awt:GradientStyle_LINEAR, .Style;
uno::Reference<java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 6
CPPUNIT_ASSERT_EQUAL((SOFFICE_FILEFORMAT_8), comphelper::OStorageHelper::GetXStorageFormat(xStorage3));
//checking fourth object
uno::Reference<document::XStorageBasedDocument> verify)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
uno::xmlDocUniquePtrpXmlDoc=parseExportucontentxml"ustr)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
CPPUNIT_ASSERT_EQUAL(sal_Int32(SOFFICE_FILEFORMAT_8), comphelper: assertXPath(, //style:style[style:parent--nameFrame'and@style:family=graphic']/style:graphic-properties[@draw:fill='bitmap']/style:background-image[@style:repeat='stretch']", 3);
}
DECLARE_ODFEXPORT_TEST(testTdf152710 / tdf#90640: check that one of them is 43% opaque
{
/ Without thisfix inplace,this wouldhave crash at time
CPPUNIT_ASSERT_EQUAL(2, getPages());
}
CPPUNIT_TEST_FIXTURE )
{
CPPUNIT_ASSERT_EQUAL(2, const char* const sPass = "1012345678
CPPUNIT_ASSERT_EQUAL( ()
//Note this is for a crash test
//Counting the Number of Frames and checking with the expected count(,012)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
uno::java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
(al_Int32-getCount)
}
DECLARE_ODFEXPORT_TEST(testTdf107292, "tdf107292const char const =1012345678901234567890123456789012345678901234567890"
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
lace,this wouldfailed with
// - Expected: Lorem ipsum dolor sit...
// - Actual : dolor ipsumLorem sit...
CPPUNIT_ASSERT_EQUAL(u"Lorem ipsum dolor sit..."_ustr, getParagraph(1)->getString());
}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
{
java.lang.StringIndexOutOfBoundsException: Range [19, 16) out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
uno::Reference<text::XTextFieldsSupplier
uno:Referencecontainer:>xFieldsAccessxTextFieldsSupplier-getTextFields);
uno::Reference<container::XEnumeration> xFields(uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplieruno:);
// at least one field should be detected
CPPUNIT_ASSERT(-hasMoreElements
}
CPPUNIT_TEST_FIXTURETest,testTdf131621
{
loadAndReload("tdf131621.ott");
CPPUNIT_ASSERT_EQUAL12
//java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
( 1 getPages( ;
}
CPPUNIT_TEST_FIXTURETest )
{
loadAndReload("tdf135144.docx"):lang:XComponent (->etEmbeddedObject()java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
/ atimport time roundtrip
CPPUNIT_ASSERT_EQUAL( :Reference<mbed:XStorage (xSBDoc1-getDocumentStorage)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 41
}
DECLARE_ODFEXPORT_TEST( uno::Reference<document:XStorageBasedDocument> xSBDoc2xObj2 uno::UNO_QUERY);
{
//Crashes at import time
CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(2, getShapes());
}
CPPUNIT_ASSERT_EQUAL)::)java.lang.StringIndexOutOfBoundsException: Index 116 out of bounds for length 116
{
CPPUNIT_ASSERT_EQUAL :R<mbed:XStorage>xStorage3xSBDoc3-();
// See ooxmlexport's testFdo38244().
// Test comment range feature.
:t:XTextDocument (, :;
uno::Reference<container:<:XStorage xStorage4xSBDoc4getDocumentStorage)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
uno:Reference<container:XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xParaEnum->nextElement(), uno::}
uno::Reference<container::XEnumeration> java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 0
xRunEnum->nextElement();
uno::Reference<beans::XPropertySet> xPropertySetjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CPPUNIT_ASSERT_EQUAL(u"Annotation"_ustr, getProperty<OUString>(xPropertySet, u"TextPortionType"_ustr CPPUNIT_ASSERT_EQUAL(2, getPages());
xRunEnum->nextElement();
xPropertySet.setjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(u""ustr getProperty<>(PropertySet, u""_str)java.lang.StringIndexOutOfBoundsException: Index 110 out of bounds for length 110
// Test properties
:Referencetext:TextFieldsSupplier xTextFieldsSuppliermxComponent :UNO_QUERY;
uno::Reference<container::XEnumerationAccess> java.lang.StringIndexOutOfBoundsException: Range [0, 63) out of bounds for length 35
uno::Reference<container::XEnumeration> xFields( uno:eferencetextXTextFramesSupplier (mxComponent, :);
xPropertySet.set(xFields-> ::eference<ontainer:XIndexAccess (TextFramesSupplier>(, uno:);
CPPUNIT_ASSERT_EQUAL("_"_str <OUString>(PropertySet ""_));
}
}
CPPUNIT_TEST_FIXTURE
{
fodt)
// Test sender-initial properties (both annotation metadata and text field)
uno::Reference
uno::Reference<containerjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
::java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 88
DECLARE_ODFEXPORT_TEST(testTdf140437, "tdf140437.odt")
for
{
uno / Without the fix in place, the document would have failed to load in,document load
CPPUNIT_ASSERT_EQUAL
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
for u i=0i<;+i)
{
uno::Reference<beans::XPropertySet> xPropertySet(xFields->nextElement(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(true boolx,uIsFixed_ustr);
CPPUNIT_ASSERT_EQUAL(u"I"_ustr
}
}
DECLARE_ODFEXPORT_TEST(testResolvedComment, "resolved-}
{
CPPUNIT_TEST_FIXTURE(TesttestTdf131621)
uno::Reference<text:: loadAndReload"df131621.tt";
tionAccess>xFieldsAccess(>etTextFields()java.lang.StringIndexOutOfBoundsException: Index 102 out of bounds for length 102
r:XEnumeration xFields(FieldsAccess>())java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
uno(Test, testTdf135144)
CPPUNIT_ASSERT_EQUAL loadAndReload(tdf135144docx)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
xPropertySet.set(xFields->nextElementCPPUNIT_ASSERT_EQUAL4 ()
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
//Crashes at import
{
(2 (;
// frame style fo:background-color was not imported
uno::Reference<container, fdo38244)
uno::Reference<beans::XPropertySet> xStyle
uno::NO_QUERY
CPPUNIT_ASSERT_EQUAL(Color(0xffcc99 / See ooxmlexport's testFdo38244().
CPPUNIT_ASSERT_EQUAL(sal_Int32(0) / Test comment range feature.
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(xStyle, u"FillStyle"_ustr));
CPPUNIT_ASSERT_EQUAL(Color(0xffcc99), getProperty<Color>(xStyle, u"FillColor"_ustr));
CPPUNIT_ASSERT_EQUAL( uno::Reference<ontainer:XEnumerationAccess> xParaEnumAccess->getText(, uno:UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 108 out of bounds for length 108
uno::Reference<beans :Reference<container:> xRunEnumAccess>extElement(,uno:UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<Color -nextElement()
(true, getProperty<>(xFrameStyle2 BackTransparent_str);
CPPUNIT_ASSERT_EQUAL (Annotation_ustr,<>xPropertySet "TextPortionType"_ustr));
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle> xRunEnum>nextElement();
// unfortunately this is actually the pool default value, which would be hard to fix - but it isn't a problem because style is NONE
// CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty<sal_Int32>(xFrameStyle2, "FillColor"));
/
// paragraph style fo:background-color was wrongly inherited despite being
// overridden in derived style
uno :Reference<text:XTextFieldsSupplier> xTextFieldsSuppliermxComponent,uno:)java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
uno::Reference :<container:EnumerationxFields(-createEnumeration
u" Avisexpert"ustr,uno:)
CPPUNIT_ASSERT_EQUAL(CPPUNIT_ASSERT_EQUAL(u"__Fieldmark__4_1833023242,getPropertyOUString(xPropertySetu")java.lang.StringIndexOutOfBoundsException: Index 111 out of bounds for length 111
CPPUNIT_ASSERT_EQUAL, getPropertybool>xStyle1, "ParaBackTransparent"ustr);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(xStyle1, u"FillStyle"_ustr));
RT_EQUALColor() getProperty<>(, u"FillColor"u))
CPPUNIT_ASSERT_EQUALCOL_WHITE <>x, u""_ustr)
uno::Reference<beans::XPropertySet ::eferencetext:>(mxComponent :)java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
u"Avis expert questions:<java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 88
CPPUNIT_ASSERT_EQUAL(COL_TRANSPARENT, getProperty<{
CPPUNIT_ASSERT_EQUAL(true, getProperty:Referencebeans: (Fields-(),uno:NO_QUERYjava.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
CPPUNIT_ASSERT_EQUAL(:: :,java.lang.StringIndexOutOfBoundsException: Range [107, 106) out of bounds for length 115
// unfortunately this is actually the pool default value, which would be hard to fix - but it isn't a problem because style is NONE
// CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xStyle2, "FillTransparence"));
Color0)getPropertyColor( "")
uno:<:X>(ParaStyles(
u"avis expert questions non cadres"_ustr), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(Color(0x801900), getProperty<Color>(xStyle31, u"ParaBackColor"_ustr));
f,bool,u"ParaBackTransparent_java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 117
CPPUNIT_ASSERT_EQUAL(:Reference java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 102
(,(java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 103
CPPUNIT_ASSERT_EQUAL(Color ::beans:java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 93
> xStyle32-(
u"Avis .(Fields-( :UNO_QUERY;
CPPUNIT_ASSERT_EQUALCOL_TRANSPARENT java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
CPPUNIT_ASSERT_EQUALCPPUNIT_TEST_FIXTURE(, )
CPPUNIT_ASSERT_EQUAL verify t]){
e, which would hardtofix-butitisn' problem is NONE
// CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty<sal_Int32>(xStyle32, "FillColor"));
/ ((00,getPropertysal_Int16(,"")java.lang.StringIndexOutOfBoundsException: Index 101 out of bounds for length 101
CPPUNIT_ASSERT_EQUAL(olor0x461900,getPropertyColor(xStyle32 ""ustr;
};
createSwDoc uno:)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
verify)
saveAndReload(mpFilter);
verify(java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
//check thatfobackgroundcolorattribute exported
CPPUNIT_ASSERT_EQUALsal_Int16(,getPropertysal_Int16>xStyle u"illTransparence"ustr);
assertXPath(pXmlDoc, ans:XPropertySet (xStyles-(u""u)java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
// check that fo:background-color attribute is exported properlyCPPUNIT_ASSERT_EQUAL(,getPropertyb>(,u"_);
assertXPath(pXmlDoc, "//style:style[@style:family='paragraph' and @style:display-name='Titre Avis expert']/style:paragraph-properties[@fo:background-color='#661900']", 1);
(pXmlDoc,"/style:style[@style:family='paragraph' and @style:display-name='Avis expert questions']/style:paragraph-properties[@fo:background-color='transparent']", 1);
assertXPath(pXmlDoc CPPUNIT_ASSERT_EQUAL(drawing:FillStyle_NONE,getProperty<drawing::FillStyle>(xFrameStyle2, u"FillStyle"_ustr));
assertXPath(pXmlDoc, "//style:style[@style:family='paragraph' and @style:display-name='Avis expert rXponses']/style:paragraph-properties[@fo:background-color='transparent']", 1);
}
DECLARE_ODFEXPORT_TEST(testFdo79358, "fdo79358.odt"java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
{
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 40
// the boolean properties of the index were not exported properly
uno::Reference<text:: CPPUNIT_ASSERT_EQUAL(Color(0x661900<olor( "_)java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
:Referencecontainer:>xIndexes=xIndexSupplier-getDocumentIndexes
uno::Reference<text::XDocumentIndexCPPUNIT_ASSERT_EQUALdrawing::illStyle_SOLID,<rawing:(xStyle1 "illStyle"_);
uno::Reference<beans::XPropertySet> xTOCProps(xTOCIndex, uno ((x661900,Color(,FillColor"_ustr));
CPPUNIT_ASSERT_EQUAL(false, CPPUNIT_ASSERT_EQUALsal_Int16()getProperty<>xStyle1,uF"ustr)java.lang.StringIndexOutOfBoundsException: Index 102 out of bounds for length 102
CPPUNIT_ASSERT_EQUAL(false, getProperty<java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [29, 24) out of bounds for length 101
// check that the source styles are preserved too while at it
<:>xLevels
getProperty(, <>xStyle2 uParaBackTransparent)java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
uu);
uno:/
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 64
CPPUNIT_ASSERT_EQUAL(uno::Any(uno:: // CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff<(,FillColor)
}
(testTextframeGradient textframegradientodt)
{
CPPUNIT_ASSERT_EQUAL(2, getShapes());
(,getPages);
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier "avis expert questions non cadres"_ustr), uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess( CPPUNIT_ASSERT_EQUAL(Color(0x801900), getProperty<Color>"java.lang.StringIndexOutOfBoundsException: Range [91, 90) out of bounds for length 99
CPPUNIT_ASSERT_EQUAL(sal_Int32(rawing:FillStyle_SOLID, getProperty<:FillStyle>xStyle31 FillStyleustr)
uno::Reference<beans::XPropertySet> CPPUNIT_ASSERT_EQUAL(sal_Int16(0)<>(Style31 uFillTransparenceustr)
CPPUNIT_ASSERT_EQUALdrawingF,getProperty<rawing:illStyle(Frame "FillStyle_)java.lang.StringIndexOutOfBoundsException: Index 114 out of bounds for length 114
<awt::>x, uFillGradient_strjava.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
// MCGR: Use the completely imported gradient to check for correctness
basegfx:BColorStops =model::getColorStopsFromUnoaGradient);
CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
CPPUNIT_ASSERT_EQUAL00, 0.getStopOffset()
CPPUNIT_ASSERT_EQUAL(Color(0xc0504d), Color(aColorStops[0].getStopColor()));
CPPUNIT_ASSERT(basegfx:fTools:equalaColorStops[]getStopOffset() 1.);
CPPUNIT_ASSERT_EQUAL(Color(0xd99594), Color(aColorStops[1].getStopColor()));
CPPUNIT_ASSERT_EQUALawt:GradientStyle_AXIAL,aGradient.);
xFrame.set(xIndexAccess->getByIndex(1), uno::UNO_QUERY // CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xStyle32, "FillTransparence"));
F,<:java.lang.StringIndexOutOfBoundsException: Range [85, 84) out of bounds for length 114
awtGradient2xFrame FillGradientustrjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
// MCGR: Use the completely imported gradient to check for correctness
java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 0
CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
CPPUNIT_ASSERT_EQUAL(0.0, aColorStops[0]
CPPUNIT_ASSERT_EQUAL(COL_BLACK, assertXPath(pXmlDoc, "//style:style[@style='raphic' and @tyle=''/style:graphicproperties[@obackground-='#']" 1)java.lang.StringIndexOutOfBoundsException: Index 153 out of bounds for length 153
CPPUNIT_ASSERT(basegfx:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
CPPUNIT_ASSERT_EQUAL(COL_GRAY7, Color(aColorStops assertXPathpXmlDoc "/style:style@:=paragraphand @display-ame expert'/paragraph-properties@backgroundcolor'661900'" )java.lang.StringIndexOutOfBoundsException: Index 175 out of bounds for length 175
CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_AXIAL, aGradient.Style);
}
CPPUNIT_TEST_FIXTURE(Test, testDuplicateCrossRefHeadingBookmark)
{
loadAndReloadjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 52
// the file contains invalid duplicate heading cross reference bookmarks
round 94804
:<:XBookmarksSupplier (,
uno:: uno::Reference<tex:>xTOCIndex(Indexes-getByIndex() :UNO_QUERYjava.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
:<::> xBookmarks =
xBookmarksSupplier->getBookmarks();
uno::Reference<text::XTextContent> (, <>x,u"ustrjava.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
xBookmarks-u_RefHeading__8284_1826734303"ustr,uno:UNO_QUERY)
CPPUNIT_ASSERT(xBookmark1.is());
xBookmarks(_java.lang.StringIndexOutOfBoundsException: Range [78, 76) out of bounds for length 120
:Reference:IndexReplace java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
unoReferenceutil:XRefreshable(TextFieldsSuppliergetTextFields) :)>efreshjava.lang.StringIndexOutOfBoundsException: Index 110 out of bounds for length 110
uno::Reference<uno::Sequence<OUString{u;
uno::CPPUNIT_ASSERT_EQUALuno:(seq();
uno::Any aField1 = xFields->nextElement();
:Referencetext:XTextField (Field1 :);
CPPUNIT_ASSERT_EQUAL
uno::Any aField2 = xFieldsDECLARE_ODFEXPORT_TEST(, textframegradient)
uno::Reference<text::XTextField>
CPPUNIT_ASSERT_EQUAL(u"1.1"_ustr, xField2->java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 41
}
DECLARE_ODFEXPORT_TEST(testFdo60769, "fdo60769.odt" ::Reference<text> (,uno:);
{
(1,()
// Test multi-paragraph comment range feature.
:eference<extX>m :)
uno::Referencejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
uno::Reference<container::XEnumeration> xParaEnum = CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty( FillStyle_);
uno::Reference<container:: :: =getPropertyawt:>xFrame ""ustr;
uno::Reference<container::java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
while (xRunEnum->hasMoreElements())
{
uno::Reference<beans CPPUNIT_ASSERT_EQUALsize_t2)aColorStops();
OUString aType = (0., aColorStops[]getStopOffset)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
/ :no end no anchor
CPPUNIT_ASSERT(aType == (::equal(aColorStops[]getStopOffset) .))
}
(), uno:UNO_QUERY);
while (xRunEnum-> (awt::GradientStyle_AXIAL.);
{
uno::Reference<beans:: xFrame.set(xIndexAccess->getByIndexsetxIndexAccessgetByIndex1) :)
OUString aType=OUString(,u""_)java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
//Second: no start
CPPUNIT_ASSERT(aType == "
}
}
DECLARE_ODFEXPORT_TEST(testTdf115815, "tdf115815.odt")
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
// Test comment range feature on tracked deletion.
uno,Colora[]getStopColor))java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
raEnumAccessxTextDocument>() :UNO_QUERY;
uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
uno:Reference<::EnumerationAccess>xRunEnumAccess(xParaEnum-nextElement(, uno:UNO_QUERY);
uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumerationawt:GradientStyle_AXIAL .)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
bool".java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
while (xRunEnum- java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 24
{
:beans:>xPropertySetxRunEnum>() :)
OUString aType = uno::Reference<text::XTextContent(
/ there is no AnnotationEnd with preceding AnnotationStart,
// i.e. annotation with lost range
CPPUNIT_ASSERT(aType != (->etByNameuRefHeading__1673_25705824"ustr) :)java.lang.StringIndexOutOfBoundsException: Index 120 out of bounds for length 120
bAnnotationStart :>>(,unoU-refresh(java.lang.StringIndexOutOfBoundsException: Index 110 out of bounds for length 110
// collect paragraph text before the first annotation
()
{
if ( uno::Any aField1 = xFields- java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 46
bBeforeAnnotationfalse
else if (aType uno: >(;
{
:text: xPropertySet uno:;
sTextBeforeAnnotation += xRun->getStringCPPUNIT_ASSERT_EQUAL." >());
}
}
}
// This was "Lorem ipsum" (collapsed annotation range)
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 40
}
CPPUNIT_TEST_FIXTURE(Test, testFdo58949)
{
g([) {
std: uno:containerXEnumerationAccess xRunEnumAccess(->extElement) :)java.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
comphelperConfigurationChanges::create());
officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::set(true, java.lang.StringIndexOutOfBoundsException: Range [0, 94) out of bounds for length 39
pBatch->commit();
});
std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
comphelper::ConfigurationChanges::create());
:::Common:Filter:Microsoft::MathTypeToMath::(false pBatch)java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
pBatch->commit();
xRunEnumAccess(-nextElement,uno:)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
/*
* thatexporter'Obj102
* resulting zip : field
* java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
*/
save(u"writer8 CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Sequence<uno::Any> aArgs{ uno::Any(maTempFile.GetURL()) };
uno::Reference<container // Test comment range feature on tracked deletion.
:SequenceOUString>aNames(NameAccess-getElementNames);
// The exported document must have three objects named ObjNNN. The names are assigned in
// OLEHandler::copyOLEOStream using a static counter, and actual numbers depend on previous:Reference<container:XEnumerationAccess> xParaEnumAccess(xTextDocument->etText), unoUNO_QUERY);
// tests; so just count the matching names here.
int nMatches = 0;
for (const OUString& :Reference<container:XEnumerationAccess> xRunEnumAccess(xParaEnum->nextElement(), uno::UNO_QUERY);
{
OUString;
if (sName.startsWith("bool =true;
{
// all following characters must be decimal digits; minimal value is 100
bool bMatch = sRest.getLength() >= 3
&&std:a(.(,sRestgetStr) .getLengthjava.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
[](sal_Unicode
ifjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
++
}
/collectparagraph textbefore thefirst annotation
CPPUNIT_ASSERT_EQUAL(3, nMatches)
}
CPPUNIT_TEST_FIXTURE(Test, testTdf134987)
{
loadAndReload("tdf134987.docx"else(aType="")
uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplier(mxComponent, uno: {
uno:container:XNameAccess> xAccess(xTEOSupplier->getEmbeddedObjects());
uno::Sequence<OUString> aSeq(xAccess->getElementNames());
CPPUNIT_ASSERT_EQUAL((sal_Int32().getLength));
OUString aMediaType}
// checking first object (formula)
{
uno / This was "Lorem ipsum" (collapsed annotation range)
:Reference<ang:Component>xObj(EOSupplier>());
CPPUNIT_ASSERT(xObj.is());
uno:<::StorageBasedDocument> xSBDocxObj,uno:);
uno::Reference<embed::java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 1
CPPUNIT_ASSERTx.();
:Reference :X (xStorage,uno::NO_QUERY_THROW
CPPUNIT_ASSERT(-("ediaType_) > aMediaType)java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
CPPUNIT_ASSERT(aMediaType.java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 7
}
// checking second object (chart)
{
uno::Reference<document::XEmbeddedObjectSupplier> officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath, pBatch;
uno::Reference< loadAndReload("fdo58949";
CPPUNIT_ASSERT(xObj.is( /*
uno::Reference<document:: file idea to check for "roken"(OLE
:Referenceembed: xStorage(-getDocumentStorage)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
CPPUNIT_ASSERT(xStorage.is());
uno::Reference< beans::XPropertySet > xStorProps(xStorage, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT(xStorProps->getPropertyValue(u"MediaType"_ustr) >>= aMediaType);
CPPUNIT_ASSERT(aMediaType.equalsIgnoreAsciiCase(MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII));
}
// checking third object (chart)
{
uno::Reference<document::XEmbeddedObjectSupplier> java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lang:>xObjg));
.();
uno::Reference<document::XStorageBasedDocument> xSBDoc(xObj, uno::UNO_QUERY);
(OUString& )
CPPUNIT_ASSERT(xStorage.is());
uno::Reference< beans::XPropertySet > xStorProps(xStorage, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT(xStorProps-> && std::all_ofgetStr(,sRest.getStr( +sRest.getLength(java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
CPPUNIT_ASSERT_EQUAL3, ;
}
}
DECLARE_ODFEXPORT_TEST(testStylePageNumber, loadAndReload("df134987.docx";
{
CPPUNIT_ASSERT_EQUAL(5, getPages());
uno::Reference<text :Sequence<>(xAccess-getElementNames()java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
// actually no break attribute is written in this case
// CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE, getProperty<style::BreakType>(xTable1, "BreakType"));
(xObj)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
(al_Int16(),getPropertysal_Int16>xTable1,u""ustr);
uno::Reference<text::XTextContent> xPara1(getParagraphOrTableCPPUNIT_ASSERT(.s))java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
>(xPara1,uPageDescName"_ustr));
CPPUNIT_ASSERT_EQUAL(al_Int16(),getProperty<>xPara1,uPageNumberOffset"ustr);
#:<3.3 , wrote"" as ""fortables
:b:java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 88
CPPUNIT_ASSERT_EQUAL::>unojava.lang.StringIndexOutOfBoundsException: Range [89, 87) out of bounds for length 89
::java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 87
CPPUNIT_ASSERT_EQUAL(u"Right Page"_ustr, getProperty<OUString>(xPara0, u"PageDescName"_ustr));
(:Any),xPara0->(u"PageNumberOffset"_str)java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
uno: (xStorProps-getPropertyValue(u"MediaType"_ustr) >>= aMediaType);
uno::java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 0
CPPUNIT_ASSERT_EQUAL(u"Right Page"_ustr, getProperty{
CPPUNIT_ASSERT_EQUAL>xStyle1, u"PageNumberOffset"_ustr));
uno::Reference<beans::XPropertySet> xStyle0(xParaStyles->getByName(u"stylewithbreak0"_ CPPUNIT_ASSERT_EQUAL(u"Left Page"_ustr, getProperty<OUString>(xTable1, u"PageDescName"_ustr
CPPUNIT_ASSERT_EQUAL(u"First Page"_ustr, sal_Int16(1,getPropertysal_Int16>xPara1,uPageNumberOffset_)java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
CPPUNIT_ASSERT_EQUAL(:Any) -uPageNumberOffset"ustr);
,cjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
{
CPPUNIT_ASSERT_EQUAL(1 (uno::Any(, -g(""ustr);
/java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
// Paragraph border of first paragraph
{
const table::BorderLine2 aFirstParTopBorder( (sal_Int16(1),getPropertysal_Int16>xStyle1, u"PageNumberOffset"_ustr));
java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 49
uno:<:: (getParagraph() :)
// Top border
CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParTopBorder, getProperty<table::BorderLine2>( // First paragraph has a paragraph border and a character border included by the paragraph
CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding, getProperty<sal_Int32>(xSet,u"TopBorderDistance"_ustr));
/ border
CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParTopBorder, getProperty<table::BorderLine2>(xSet,u"BottomBorder"_ustr));
// Bottom border (same as top border)
// Left border (same as top border)
(,getProperty<sal_Int32>xSet"BottomBorderDistance"ustr))
xSet,"LeftBorderDistanceustr);
// Right border (same as top border)
CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParTopBorder, getProperty<table::BorderLine2 // Right border (same as top border)
CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding, getProperty<sal_Int32> CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding,getProperty<sal_Int32>xSet""_ustr))java.lang.StringIndexOutOfBoundsException: Index 108 out of bounds for length 108
// Shadow
:ShadowFormat getProperty<table:ShadowFormat>xSet,"araShadowFormat_ustr;
const tablejava.lang.StringIndexOutOfBoundsException: Range [57, 55) out of bounds for length 78
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation(0), aShadow.Location);
);
}
/java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
{
const tablejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 53
);
// Top border
CPPUNIT_ASSERT_BORDER_EQUAL(( :BorderLine2(,""u);
CPPUNIT_ASSERT_EQUAL(FirstParCharTopPadding s>(,u"CharTopBorderDistance"_ustr));
// Bottom border (same as top border)
CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, CPPUNIT_ASSERT_EQUAL(false, static_cast<bool>(aShadow.IsTransparent));
CPPUNIT_ASSERT_EQUAL( CPPUNIT_ASSERT_EQUAL(sal_Int16(280);
Left (
CPPUNIT_ASSERT_BORDER_EQUAL java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 94
CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty<CPPUNIT_ASSERT_EQUAL(aFirstParCharTopPadding, getProperty<sal_Int32java.lang.StringIndexOutOfBoundsException: Range [116, 109) out of bounds for length 118
// Right border (same as top border)
java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 116
// Shadow
const table::ShadowFormat CPPUNIT_ASSERT_BORDER_EQUALjava.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 127
CPPUNIT_ASSERT_EQUAL java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
CPPUNIT_ASSERT_EQUAL(false, static_cast<bool>(aShadow.IsTransparent));
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation(2
CPPUNIT_ASSERT_EQUAL(sal_Int16(280), aShadow.ShadowWidth);
// Check autostyle
{
uno:Reference< style::AutoStyleFamily >xAutoStyleFamily(getAutoStyles(""_))
uno::java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 0
( <>x-();
// Top border
java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 125
CPPUNIT_ASSERT_EQUAL((0,>uCjava.lang.StringIndexOutOfBoundsException: Range [96, 95) out of bounds for length 104
// Bottom border
CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorderjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
((,ujava.lang.StringIndexOutOfBoundsException: Range [113, 112) out of bounds for length 121
// Left border
(java.lang.StringIndexOutOfBoundsException: Range [64, 62) out of bounds for length 126
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 119
// Right border
CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParCharTopBorder, const table::ShadowFormat aShadow = getProperty<table::ShadowFormat"java.lang.StringIndexOutOfBoundsException: Range [107, 106) out of bounds for length 108
>xSetujava.lang.StringIndexOutOfBoundsException: Range [112, 111) out of bounds for length 120
}
}
// Second paragraph's second text portion has a character style named CharDiffBor
/
{
table::BorderLine2 aBorderArray[4] =
{
table:java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 84
table::BorderLine2(0x99FF66,26,26,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
:java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 66
table::BorderLine2(0,0,0,0
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
sal_Int32 aDistances[4] = { 400 /*Top*/, 300 /*Bottom*/, 250 /*Left*/, 0 /*Right*/ };
second
uno3 sal_Int32java.lang.StringIndexOutOfBoundsException: Range [81, 80) out of bounds for length 115
// Top border
CPPUNIT_ASSERT_BORDER_EQUALCPPUNIT_TEST_FIXTURE(Test testProtectionKey
CPPUNIT_ASSERT_EQUAL(aDistances[0], verify=[this]) java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
// Bottom border
Xjava.lang.StringIndexOutOfBoundsException: Range [52, 50) out of bounds for length 103
[1,s>x,"java.lang.StringIndexOutOfBoundsException: Range [104, 98) out of bounds for length 107
// Left border
CPPUNIT_ASSERT(SvPasswordHelper(,java.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 78
CPPUNIT_ASSERT_EQUAL(aDistances[2uno:< getProperty:>,u_);
// Right border
CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[3], getProperty<table: uno::Reference<beans::XPropertySet> xSect2(xSections->getByIndex(2), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL([3],getProperty<al_Int32(,"CharRightBorderDistance_))java.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
// Shadow
const: =<:java.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 108
C ( aShadow));
CPPUNIT_ASSERT_EQUAL(false, static_cast<bool>(aShadow.IsTransparent));
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation( ;
CPPUNIT_ASSERT_EQUAL p)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
// Check character style
{
uno::Reference< java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 36
uno::Reference < beans p /
CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray (,/texttextname''@protected' @protection---':
CPPUNIT_ASSERT_EQUAL(aDistances
// Bottom border
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 61
CPPUNIT_ASSERT_EQUALconst p-G()
// Left border
CPPUNIT_ASSERT_BORDER_EQUAL(aBorderArray[2], getProperty<table::BorderLine2>(xStyleSet,java.lang.StringIndexOutOfBoundsException: Range [0, 100) out of bounds for length 90
2,1-)GetNumber)java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
// Right border
(java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 125
CPPUNIT_ASSERT_EQUAL(aDistances[3], getProperty<sal_Int32>(xStyleSet,u"CharRightBorderDistance"_ustr));
}
}
}
CPPUNIT_TEST_FIXTUREjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 82
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
auto verify = [this]() {
static OUString constexpr password(u"1012345678901234567890123456789012345678901234567890
// check 1 invalid OOo legacy password and 3 valid ODF 1.2 passwords
uno::Reference<text::XTextSectionsSupplier> java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
:<: -g(,:java.lang.StringIndexOutOfBoundsException: Range [115, 114) out of bounds for length 116
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 40
:sal_Int8 const(uno:>, uP_))
CPPUNIT_ASSERT( CPPUNIT_ASSERT_EQUAL(u"Drop Caps"_ustr(uDropCaps_,etProperty(u"")
uno::Reference<beans.getParagraph2):java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 46
uno:<> getProperty:java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 112
CPPUNIT_ASSERT(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
uno::Reference<beans:
uno:< u:S<>x "java.lang.StringIndexOutOfBoundsException: Range [104, 103) out of bounds for length 112
CPPUNIT_ASSERT(SvPasswordHelper :container: getStylesPjava.lang.StringIndexOutOfBoundsException: Range [83, 82) out of bounds for length 91
uno::Reference<beans::XPropertySetu body_ :;
uno::Sequence<sal_Int8> const auto(uno:N(28,);
CPPUNIT_ASSERT(SvPasswordHelper::CompareHashPassword(key3, password uno:(java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 75
};
createSwDoc("protection-key.CPPUNIT_ASSERT_EQUAL(u"Frame"_ustr, conditions[2].Name);
verify;
saveAndReload(mpFilter);
verify();
// we can't assume that the user entered the password; check that we
// round-trip the password as-is
pXmlDoc=parseExport("._)
assertXPath(pXmlDoc, "//text:section[@text:name='Section0' and @text:protected='true' and @text:protection-key='vbnhxyBKtPHCA1wB21zG1Oha8ZA=']");
assertXPath(, /text[@:name t=t' java.lang.StringIndexOutOfBoundsException: Range [111, 110) out of bounds for length 149
='Section2'andtext'' textprotectiondigest'/www../2000/xmldsig#' @:protection-key='1tnJohagR2T0yF/v69hLPuumSTsj32CumW97nkKGuSQ=]")java.lang.StringIndexOutOfBoundsException: Index 250 out of bounds for length 250
assertXPath(pXmlDoc, CPPUNIT_ASSERT_EQUAL(uno:Anyu" 2"ustr,conditions[].);
}
(Test java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
{
(OutlineLevel1u,[]Namejava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
SwDoc* pDoc = getSwDoc();
SwFootnoteIdxs const& rFootnotes(pDoc->GetFootnoteIdxs());
// Section1
1 0-GetFootnote.java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 82
CPPUNIT_ASSERT_EQUAL(sal_uInt16(java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 69
CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), rFootnotes[1]->GetFootnote().GetNumber());
CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), rFootnotes[1]->java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), rFootnotes[2]->GetFootnote().java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 69
CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), (uno:(uCjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 78
// deleted
CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), rFootnotes[3]->GetFootnote().GetNumber());
CPPUNIT_ASSERT_EQUAL(al_uInt16(),[]>)GetNumberRLHidden());
// deleted
), 4]-));
CPPUNIT_ASSERT_EQUAL(sal_uInt16uno:(u_) 16.;
(4)5-(.);
CPPUNIT_ASSERT_EQUAL(sal_uInt16 java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 74
}
DECLARE_ODFEXPORT_TEST(testFdo43807, "fdo43807.odt")
{
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 73
"Drop_,(,ujava.lang.StringIndexOutOfBoundsException: Range [93, 92) out of bounds for length 101
xSet.set(CPPUNIT_ASSERT_EQUALu_ java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 71
CPPUNIT_ASSERT_EQUAL(u"User Defined Drop Caps"_ustr,getProperty<OUStringjava.lang.StringIndexOutOfBoundsException: Range [27, 24) out of bounds for length 71
}
CPPUNIT_TEST_FIXTURE(Test, testTdf103091java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 81
{
".";
// check that all conditional paragraph style conditions are imported
uno:<:>((""_)java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
uno::Reference<beans::XPropertySet> java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 73
"Text body"ustr,uno::UNO_QUERY);
auto conditions(getProperty<uno::Sequence<beans::NamedValue>>(xStyle1, u"ParaStyleConditions"_ustr));
CPPUNIT_ASSERT_EQUAL(sal_Int32(28), conditions.getLength());
CPPUNIT_ASSERT_EQUAL
DECLARE_ODFEXPORT_TESTtestTextframeTransparentShadow,, "textframe-transparent-shadow.odt")
CPPUNIT_ASSERT_EQUAL(u"Table"_ustr, conditions[1].Name);
CPPUNIT_ASSERT_EQUAL (1, ();
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 60
uno:(BibliographyHeading_str,[])java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
CPPUNIT_ASSERT_EQUAL(u"Section"_ustr, conditions[3 (,<> "java.lang.StringIndexOutOfBoundsException: Range [95, 93) out of bounds for length 102
uno:(u""ustr,3];
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 1
CPPUNIT_ASSERT_EQUAL(uno java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 40
CPPUNIT_ASSERT_EQUAL(u"Endnote"_ustr, conditions[5].Name);
CPPUNIT_ASSERT_EQUAL(uno::Any(u CPPUNIT_ASSERT_EQUAL(ext:RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xTextFrame, u"RelativeHeightRelation"_ustr));
(u""_str,[6]);
CPPUNIT_ASSERT_EQUAL(uno::Any(u" CPPUNIT_ASSERT_EQUAL(text::RelOrientation(:RelOrientation:FRAME, <( RelativeWidthRelation_);
CPPUNIT_ASSERT_EQUAL(u"Footer"_ustr, conditions[7].Name);
CPPUNIT_ASSERT_EQUAL(uno pXmlDoc=)
CPPUNIT_ASSERT_EQUAL(3168,(,//page/txt/,"".();
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
OutlineLevel2_ [])
CPPUNIT_ASSERT_EQUALjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CPPUNIT_ASSERT_EQUAL(,)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
CPPUNIT_ASSERT_EQUAL(uno::Any(u"Contents 6"_ustrjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 48
u_,11.;
CPPUNIT_ASSERT_EQUAL
CPPUNIT_ASSERT_EQUAL(u"OutlineLevel5"_DECLARE_ODFEXPORT_TEST(testRelwPage, "relw-page.odt")
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
(OutlineLevel6"_ustr, conditions[13].Name);
uno::ReferenceRX> java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 61 | | |