|
|
|
|
Quelle odfexport.cxx
Sprache: C
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Thisfile part theproject.
*
* This Source Code Form is subject to the terms of the Mozilla Public
*v 20 acopyofthe MPL was distributedwith
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <tools/java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 3
#include <algorithm>
#include <memory>
#include <swmodeltestbase.hxx>
#include <com/sun/star/awt/Gradient2.hpp>
#include <com/sun/star/awt/Key.hpp>
include c//starawt/KeyModifierhpp>
#include <com/sun/star/beans/NamedValue.hpp>
com/star/ontainer/hpp>
#include <com#<omsun//ext/DocumentIndex.hpp>
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <com/sun/star/table#include <com/sun/star/text/XTextSectionsSupplier.hpp>
#include <com/sun/star#include <com/sun/star/text/XTextTablesSupplierhpp>
i com////RelOrientation.hpp
#include <com/sun/star/text/#include <com/sun/star/graphic/XGraphic
include<om/unstar//XTextSectionsSupplierhpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
#include <# com/star/documentXEmbeddedObjectSupplierhppjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
/graphicXGraphicjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
# o/OfficeCommonhxx>
#include <com/sun# <omsun//text/XTextFieldsSupplierhpp>
#include com/star/text.hpp>
#include <#</un//documentXStorageBasedDocument.>
#include <com/sun/star/util/XModifiable.hpp>
# com/sun/star/ext/XTextFieldsSupplier.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
include</sunstar//.>
#include <com/sunjava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 46
#include comjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 43
comsun//
#include <include<//starXUIConfigurationManagerSupplier>
include</sun/startext/.hppjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
#include <//tar/.hpp
#include <i</ileformath
##include/.hxx>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
include <omphelperstoragehelperhxx>
#<//.hxx>
#</documentconstantshxx>
#include <svl/PasswordHelper.hxx>
java.lang.NullPointerException
included/unojava.lang.StringIndexOutOfBoundsException: Range [43, 39) out of bounds for length 44
vclimagehxxjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
# <tnidxhxxjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
#comphelper:((java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
namespace
{
class Test::Common::Writer::(, pBatch;
{
public:
Test() : -(;
};
CPPUNIT_TEST_FIXTURE};
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
:g[]){
mpFilter = "writer8";
::onfigurationChangesc()java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
:::reate);
officecfg::Office::Common::Cache::Writer::OLE_Objects::set(20, pBatch);
returnpBatch->commit();
});
mpFilter = "OpenDocument Text Flat XML"; // doesn't happen with ODF package
::ConfigurationChangespBatch(
comphelper::ConfigurationChanges::create()::,:;
officecfg(>);
pBatch(;
loadAndReload("2_MathType3. / and the problem was thattheformulas that the cache
uno:<:>( ::)
CPPUNIT_ASSERT(u"121+2 }_,)
/java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
// and the problem was that the formulas that were in the cache
// (the second one) were lost
OUStringggetParagraph,1);
java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 107
OUString formula2(getFormula( ((4, );
CPPUNIT_ASSERT_EQUAL(u" size 12{2+2=4} {}"_ CPPUNIT_ASSERT_EQUAL(u"{ sum csup n csub { i = 1 ( left { ){ "ustr ;
}
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 141
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
g(6,))
CPPUNIT_ASSERT_EQUAL 1 left + java.lang.StringIndexOutOfBoundsException: Range [98, 97) out of bounds for length 141
OUString formula1(getFormula(// - the property is of unexpected type or void: Modeljava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 62
u{ - } }}"ustr ;
OUString formula2(getFormula(getRun(getParagraph(4), 1)));
OUString formula3(getFormula(java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
CPPUNIT_ASSERT_EQUAL(u"{ sum ^ n _ { i = 1 } i ^ 3 = left ( frac { { n left ( { n + 1 } right ) } } { 2
mula((java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 62
u" sum = java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 141
// Without the fix in place, this test would have failed with
propertyisof voidjava.lang.StringIndexOutOfBoundsException: Range [58, 59) out of bounds for length 58
OUString(etFormula7,))
CPPUNIT_ASSERT_EQUAL(u"{ y ^ 2,)
}
voidrsejava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
{
{
OUString java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
OUString CPPUNIT_ASSERT_EQUALuCCC java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 54
SwHiddenTextField::java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 28
CPPUNIT_ASSERT_EQUAL(u"A"_ustr, paramCondition);
CPPUNIT_ASSERT_EQUAL(u"B"_ustr, paramTrue);
CPPUNIT_ASSERT_EQUAL(u"C"_ustr, paramFalse);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 27
OUString
SwHiddenTextFieldCPPUNIT_ASSERT_EQUAL" _ ;
CPPUNIT_ASSERT_EQUAL(u"AAA (u" "ustr,paramFalse;
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
}
{
OUString
paramTrue
OUStringparamFalsejava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
SwHiddenTextField::ParseIfFieldDefinition(u" IF AAA \"java.lang.StringIndexOutOfBoundsException: Range [0, 66) out of bounds for length 5
;
CPPUNIT_ASSERT_EQUAL(u"BBB"_ustrOUString;
("CCC"_str )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
}
// true-case and false-case have spaces inside
{
OUString paramCondition;
CPPUNIT_ASSERT_EQUAL("_str,paramFalse)
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 1
// and it should be imported as com.sun.star.text// instead of insertion of the pair of two field-marks: <field:fieldmark-start> + <field:fieldmark-end>.
loadAndReload("tdf43569_conditionalfield.doc");
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 55
:<: (mxComponentuno:NO_QUERYjava.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
}
// true-case and false-case have leading/trailing space
{
OUString paramCondition;
OUString uno::Reference<containe>(-createEnumeration;
OUString paramFalse;
SwHiddenTextField::java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 1
loadAndReload("docx);
CPPUNIT_ASSERT_EQUAL(u"B1 B2 "_ CPPUNIT_ASSERT_EQUAL(2, getPages());
CPPUNIT_ASSERT_EQUAL(u" C1 C2"_ustr, paramFalse);
}
CPPUNIT_TEST_FIXTURE(Test testTdf133487)
{
OUString paramCondition;
OUString ("MadeByLO7.odt")java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
OUString paramFalse;
SwHiddenTextField::ParseIfFieldDefinition(u"IF condition \"xmlDocUniquePtr "ontentxml"ustr;
CPPUNIT_ASSERT_EQUAL / shape in has index
CPPUNIT_ASSERT_EQUALu"ustr paramTruejava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
u"_str,;
}
}
// 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 java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
{
loadAndReload("tdf43569_conditionalfield.doc");
// check if our parser is valid0
();
// now check field creation during import
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 41
:<:XEnumerationAccessxFieldsAccess(-()
uno // shape in foreground has lowest index
// at least one field should be detected
CPPUNIT_ASSERT-hasMoreElements(;
}
CPPUNIT_TEST_FIXTURE(,"office:-content/:/office:/[]draw:" z" u1)java.lang.StringIndexOutOfBoundsException: Index 117 out of bounds for length 117
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
have hung
CPPUNIT_ASSERT_EQUAL(2, getPages());java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
CPPUNIT_TEST_FIXTURE(Test, testTdf133487>xTables=xSupplier>etTextTables(;
{
loadAndReload(" uno::Reference<text (-("Table1_str :UNO_QUERY
(, ();
CPPUNIT_ASSERT_EQUAL(1, u40"ustr xD2-getString()java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
xmlDocUniquePtr pXmlDoc = parseExport(u / - Expected: ** Expression is faulty **
// shape in background has lowest index
assertXPath /office:ocument-ontent/java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 122
assertXPath(pXmlDoc java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 79
dexjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
(1java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 40
( content:-/:[:java.lang.StringIndexOutOfBoundsException: Range [118, 117) out of bounds for length 284
assertXPath(pXmlDoc, "/office:document-content/office:body/office:text/text:p[3]/draw:custom-shape"unoR<container::IndexAccess xTables(Supplier->getTextTables(), uno::UNO_QUERY;
assertXPath(pXmlDoc "office:document-content/office:automatic-styles/style:style[@style:name = /office:document-content/office:body/office:text/text:p[3]/draw:custom-shape[@draw:z-index = '1']/attribute::draw:style-name]/style:graphic-properties", "run-through", // Note: fix also tdf#95806: painting table layout is correct
}
(,testTdf141467
{
("Formcontrol needs high z-index.odt";
CPPUNIT_ASSERT_EQUAL(2, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc CPPUNIT_ASSERT_EQUAL(sal_Int32(1, xIndexAccess-getCount));
// shape in foreground has lowest index
(pXmlDoc /documentcontentofficebodytextp2/custom-hape,""u0";
assertXPath (tfodt)
// form control, previously index 01 ()
-content:/p]:java.lang.StringIndexOutOfBoundsException: Range [99, 97) out of bounds for length 117
// no run-through on form's style
(pXmlDoc "/theaderrows" 1;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
DECLARE_ODFEXPORT_TEST(testTdf139126, "tdf139126.odt")
{
CPPUNIT_ASSERT_EQUAL,getShapes()java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
uno::Referenceuno:Reference<:XShape> xShape1)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
css:drawing: pointss(
uno::Reference<text::XTextTable> xTable(xTables->getByName( getProperty<ss::P>xShape,uContourPolyPolygon"ustr)
uno::Reference<text::XTextRange> / for reasonthis exists with 199pointsifitwasnt
(().);
// Without the fix in place, this test would have failed with
// - Expected: ** Expression is faulty **
/ - Actual : 17976931348623200...
uno::Reference ) 01.)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
**"_ustr -g()java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
}
CPPUNIT_TEST_FIXTURE(Test, testTdf125877)
{
.docx)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier CPPUNIT_ASSERT_EQUAL(al_Int32(2672, pointss0]4]Y;
uno::Reference< uno::Reference<container> xImageMap
// This was 0 (lost table during ODT export in footnotes)unoR<:XPropertySet>const(xImageMap(0) uno:)
/ fixtdf: java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 65
((1),xTables>etCount()java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
// floating table: there is a frame now
uno::Reference<text::XTextFramesSupplier(al_Int321718) .);
uno:eferencecontainer:>xIndexAccessxTextFramesSupplier>(, unounoUNO_QUERY;
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess-> (sal_Int32 408) .)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
(,testTdf150149java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
{
loadAndReload in ,this would ':
assertXPath(pXmlDoc
xmlDocUniquePtr
// This was 0 (lost table header in multi-column section),
p,/table-rows,1)
assertXPath(pXmlDoc(,getShapes);
}
DECLARE_ODFEXPORT_TEST(testTdf103567, CPPUNIT_ASSERT_EQUAL1,);
{
CPPUNIT_ASSERT_EQUAL pXmlDoc=(styles_ustr
CPPUNIT_ASSERT_EQUAL1 ();
java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
// contour wrap polygon
css::drawing::PointSequenceSequenceassertXPathp /style:eader/java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 89
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
auto verify = [this]
// for some reason this property exists with 199 points if it wasn't
// imported, that would be a fail
CPPUNIT_ASSERT_EQUALsal_Int325) []getLength);
CPPUNIT_ASSERT_EQUAL(sal_Int32 ::<:XTextFramesSupplier (,uno:NO_QUERY
CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), pointss[0][0].Y);
CPPUNIT_ASSERT_EQUAL(sal_Int32( 0), pointss[0][1].X);
[0][1].)
CPPUNIT_ASSERT_EQUAL(sal_Int32( uno:Referencedrawing:>;
CPPUNIT_ASSERT_EQUAL(sal_Int32(1111) pointss0[].)
CPPUNIT_ASSERT_EQUAL(sal_Int32(2672), = ()
sal_Int32,0[])
CPPUNIT_ASSERT_EQUAL( <>java.lang.StringIndexOutOfBoundsException: Range [78, 76) out of bounds for length 105
java.lang.StringIndexOutOfBoundsException: Range [34, 24) out of bounds for length 59
/
uno: java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 105
getProperty<uno::Reference/Frame java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
::>const(xImageMapgetByIndex0,:)
CPPUNIT_ASSERT_EQUALColor0006600,getPropertyColor>xTextFrame "_))java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
, u"Boundary"_ustr);
CPPUNIT_ASSERT_EQUAL(sal_Int32( 726), rect.X);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1718), rect.Y);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1347), rect.Width);
CPPUNIT_ASSERT_EQUAL(sal_Int32( 408), rect.Height xTextFrame =getShape(4;
}
CPPUNIT_ASSERT_EQUAL(0), getPropertyC>(TextFrame,,uFillColor_);
{
loadAndReload("user-field-decl.odt");
CPPUNIT_ASSERT_EQUAL(, getPages()
xmlDocUniquePtr pXmlDoc java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xTextFrame, u"FillStyle"_ustr));
/java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
// outside-table one had the declaration.
assertXPath(pXmlDoc, "//style:header/text:user-field-decls/text:user-field-decl", 2);("SubtleTango"ustr <UStringx u"java.lang.StringIndexOutOfBoundsException: Range [110, 109) out of bounds for length 118
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CPPUNIT_TEST_FIXTURE(Test, testUserFieldDeclFly)
{
loadAndReload("user-field-decl-fly.odt");
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 17
CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport(u"styles.xml"_ustr);
/ Without the accompanying fix in place, this test would have failed with 'Expected: 2;
', i.e. the in-textframe had no java.lang.StringIndexOutOfBoundsException: Range [67, 65) out of bounds for length 92
one had the declaration.
xTextFrame 8;
}
CPPUNIT_TEST_FIXTURE(Test, CPPUNIT_ASSERT_EQUALuB 0 _,getPropertyOUString>xTextFrame uFillHatchName_str)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
auto verify = [java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 17
CPPUNIT_ASSERT_EQUAL,getPropertydrawing:(,uFillStyle_);
CPPUNIT_ASSERT_EQUAL(1, getPages());
//Counting the Number of Frames and checking with the expected count
uno t,<ool>xTextFrame "_))
<containerX>xIndexAccessxTextFramesSupplier->etTextFrames(, uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), xIndexAccess->getCount());
uno::Reference<drawing::XShape> xTextFrame;
awt::Gradient aGradientxTextFramexTextFrame =getShape(10);
//Frame 1
xTextFrame (drawing:FillStyle_HATCH, <:FillStyle(, u"FillStyle"u))java.lang.StringIndexOutOfBoundsException: Index 119 out of bounds for length 119
CPPUNIT_ASSERT_EQUAL (,(xTextFrame, ""ustr);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, u"FillTransparence"_ustr CPPUNIT_ASSERT_EQUAL(sal_Int32(45) getProperty<al_Int32(,u"illTransparence"_);
//Frame 2
()
CPPUNIT_ASSERT_EQUALuBlack0Degrees_,O>x, u""ustr)java.lang.StringIndexOutOfBoundsException: Index 112 out of bounds for length 112
CPPUNIT_ASSERT_EQUAL(Color ((5,
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 105
java.lang.StringIndexOutOfBoundsException: Range [36, 28) out of bounds for length 119
xTextFrame = getShape(3);
drawingFillStylexTextFrame java.lang.StringIndexOutOfBoundsException: Range [111, 110) out of bounds for length 119
falseb>u"");
CPPUNIT_ASSERT_EQUALsal_Int3245)<al_Int32x,FillTransparence));
//Frame 4
(4)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
CPPUNIT_ASSERT_EQUAL:,getPropertydrawing:>xTextFrame "_str)
CPPUNIT_ASSERT_EQUAL(Color(0CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH<:FillStylexTextFrame, u"FillStyle"u))
<:Gradient(,u""ustr;
CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.Style);
//Frame 5
xTextFrame = getShape(5);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, getProperty<drawing::FillStyle>(xTextFrame, u"FillStyle"_ustr));
(0,getPropertysal_Int32( u"illTransparence"_);
CPPUNIT_ASSERT_EQUAL( CPPUNIT_ASSERT_EQUAL(cawt: .Style;
//Frame 6
xTextFrame = getShape(6);
CPPUNIT_ASSERT_EQUALdrawing:, <:FillStyle(,uFillStyle_));
CPPUNIT_ASSERT_EQUAL(u"Subtle Tango Green"_ustr, getProperty<OUString>(CPPUNIT_ASSERT_EQUAL(u"Sky"_ustr, getProperty<OUString>(xTextFrame, u"FillBitmapName
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 114
//Frame 7
xTextFramejava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 106
CPPUNIT_ASSERT_EQUAL(drawing::CPPUNIT_ASSERT_EQUAL(sal_Int32(0),<sal_Int32(xTextFrame u"FillBitmapOffsetY"ustr);
CPPUNIT_ASSERT_EQUAL CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextFrame, u"FillBitmapTile"_ustr));
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
(css:awtGradientStyle_LINEAR aGradientxTextFrame.Style)
//Frame 8
xTextFrame (8;
CPPUNIT_ASSERT_EQUAL""ustr <UString(TextFrame,u"illBitmapName"ustr);
CPPUNIT_ASSERT_EQUALuBlack0Degrees_str,<>xTextFrame, u"illHatchNameustr);
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xTextFrame, u"FillBackground"_ustr)CPPUNIT_ASSERT_EQUAL) <>(xTextFrameu"illBitmapPositionOffsetX"ustr);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, u"FillBitmapPositionOffsetY"_ustr));
//Frame 9
(() <(,uFillBitmapOffsetX_);
CPPUNIT_ASSERT_EQUAL(drawingjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 106
CPPUNIT_ASSERT_EQUAL(u
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 90
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, u"FillTransparence" CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xTextFrame, u"FillStyle"_ustr));
//Frame 10
xTextFrame = getShape(10);
CPPUNIT_ASSERT_EQUAL( CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame,u"_);
CPPUNIT_ASSERT_EQUAL(u" ((0),getProperty<>xTextFrame,u""ustr);
CPPUNIT_ASSERT_EQUAL(false, getProperty CPPUNIT_ASSERT_EQUAL(,getPropertysal_Int32(TextFrame ""u))
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 106
//Frame 11
=(11java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
CPPUNIT_ASSERT_EQUAL:F,getPropertydrawing:illStylex, FillStyle);
CPPUNIT_ASSERT_EQUAL(u"Black 0 Degrees"_ustr, getProperty<OUString>(xTextFrame, u"java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 88
CPPUNIT_ASSERT_EQUAL(true
CPPUNIT_ASSERT_EQUAL(sal_Int32(45), getProperty<sal_Int32>(xTextFrame, u"FillTransparence"_ustr));
//Frame 12
xTextFrame verify();
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCHsaveAndReloadmpFilter;
CPPUNIT_ASSERT_EQUAL(u"Black ()java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
(false <> "_str));
assertXPath(pXmlDoc/
CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 54
//Frame 13
xTextFrame = getShape(13);
// tdf#90640: check that one of is43%opaque
CPPUNIT_ASSERT_EQUAL
CPPUNIT_ASSERT_EQUAL(true(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-name='Transparency_20_1']/style:background-image[@style:repeat='stretch' and @draw:opacity='43%']", 1);
java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 103
CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.java.lang.StringIndexOutOfBoundsException: Range [0, 86) out of bounds for length 43
//Frame 14
(14;
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xTextFrame, u"FillStyle" getParagraph(,u"012_)
(u"Sky_, getProperty<OUString>xTextFrame,u"FillBitmapName_);
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
CPPUNIT_ASSERT_EQUAL( getParagraph(1, u"012"_ustr
CPPUNIT_ASSERT_EQUAL(CPPUNIT_TEST_FIXTURE(Test, testSHA1Wrong)
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<{ // tdf#114939 this has both an affected password as well as
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xTextFrame, u" (sha1_wrongodt ;
CPPUNIT_ASSERT_EQUAL(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
//Frame 15
xTextFrame = getShape(15);
CPPUNIT_ASSERT_EQUAL(drawing::java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
CPPUNIT_ASSERT_EQUAL(sal_Int32java.lang.StringIndexOutOfBoundsException: Range [18, 16) out of bounds for length 33
CPPUNIT_ASSERT_EQUAL(sal_Int32CPPUNIT_TEST_FIXTURETest)
CPPUNIT_ASSERT_EQUAL (oooxml_embedded)
:container::XNameAccess xAccessxTEOSupplier>()java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
CPPUNIT_ASSERT_EQUAL( CPPUNIT_ASSERT_EQUAL(sal_Int32(4java.lang.StringIndexOutOfBoundsException: Range [55, 53) out of bounds for length 57
:java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 78
//Frame 16
xTextFrame l:: xEOSupplier2(;
(:FillStyle_BITMAP,java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 120
CPPUNIT_ASSERT_EQUAL(u"Sky ::<lang:>xObj3(gjava.lang.StringIndexOutOfBoundsException: Range [76, 74) out of bounds for length 78
CPPUNIT_ASSERT_EQUAL(sal_Int32( ::>xObj4-getEmbeddedObject;
CPPUNIT_ASSERT_EQUAL(sal_Int32(0 :R<:XStorageBasedDocument xSBDoc1xObj1:;
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32 :Re:XStoragexStorage1-g()java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
CPPUNIT_ASSERT_EQUAL(al_Int320,getProperty<>(xTextFrame F"_ustr)java.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
CPPUNIT_ASSERT_EQUAL:Referencedocument:XStorageBasedDocument java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 83
aGradientxTextFrame CPPUNIT_ASSERT_EQUALsal_Int32(), comphelperOStorageHelper:etXStorageFormat))java.lang.StringIndexOutOfBoundsException: Index 116 out of bounds for length 116
CPPUNIT_ASSERT_EQUALcss::GradientStyle_LINEAR, aGradientxTextFrame)java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
};
createSwDoc("framebackgrounds.odt")sal_Int32java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 116
(;
saveAndReload(mpFilter);
verify();
("."ustr;
// check that there are 3 background-image elements
pXmlDoc"@:style-' stylefamily'java.lang.StringIndexOutOfBoundsException: Range [102, 99) out of bounds for length 201
// tdf#90640: check that one of them is 55% opaque
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/
// (emulated - hopefully not with rounding errors)
/ in test import
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 40
(Test,testSHA1Correct)
{ // tdf#114939 this has both an affected password as well as content.xml
901234567890123456789012345678901234567890";
createSwDoc(,getPages);
CPPUNIT_ASSERT_EQUAL(1, getPages());
getParagraph1, u""_ustr;
saveAndReload(mpFilter, sPass);
CPPUNIT_ASSERT_EQUAL(1, getPages());
getParagraph(1, u"012"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test CPPUNIT_ASSERT_EQUALsal_Int32(1), xIndexAccess>();
{ // tdf#114939 this has both an affected password as well as content.xml
const*constsPass ="1012345678901234567890123456789012345678901234567890;
createSwDoc("sha1_wrong// tracked deletions at the same position were loaded in reverse order
CPPUNIT_ASSERT_EQUAL(1, , test have java.lang.StringIndexOutOfBoundsException: Range [66, 61) out of bounds for length 66
getParagraph(1, u"012"_ustrjava.lang.StringIndexOutOfBoundsException: Range [72, 24) out of bounds for length 89
saveAndReload(mpFilter, sPass);
CPPUNIT_ASSERT_EQUAL
getParagraph(1, u"012"_ustr);
}
CPPUNIT_TEST_FIXTURE(Test, java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
{
uno:<:XEnumerationAccess (xTextFieldsSupplier-()java.lang.StringIndexOutOfBoundsException: Index 102 out of bounds for length 102
(mxComponent, ::NO_QUERY;
uno::Reference<java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0
uno: xFields>());
CPPUNIT_ASSERT_EQUAL
uno::(,)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
uno::Reference<document (12, getShapes());
uno::Reference<lang Crash test, Check number of pages
uno::Reference< CPPUNIT_ASSERT_EQUAL,getPages()java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
uno(,testTdf135144
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
uno:Reference<:>xObj4xEOSupplier4>etEmbeddedObject);
//checking first object
uno /Crashes import after
uno:embed:>xStorage1-();
CPPUNIT_ASSERT_EQUAL(sal_Int32(SOFFICE_FILEFORMAT_8), comphelper CPPUNIT_ASSERT_EQUAL(4, getShapes());
//checking second object
:(,:java.lang.StringIndexOutOfBoundsException: Range [82, 81) out of bounds for length 83
unojava.lang.StringIndexOutOfBoundsException: Range [28, 24) out of bounds for length 41
(sal_Int32(SOFFICE_FILEFORMAT_8) comphelper:OStorageHelper:GetXStorageFormat((xStorage2));
//checking third object
uno::Reference<document::XStorageBasedDocument> xSBDoc3(xObj3, uno::UNO_QUERY{
uno:eferenceembed:XStorage (>getDocumentStorage)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
CPPUNIT_ASSERT_EQUAL(sal_Int32java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
//checking fourth object
uno::Reference<document::XStorageBasedDocument> xSBDoc4(xObj4, uno::UNO_QUERY uno:Reference<ext:>xTextDocumentmxComponent, uno:UNO_QUERY);
uno:Reference<mbed:>(->getDocumentStorage();
CPPUNIT_ASSERT_EQUAL(sal_Int32(SOFFICE_FILEFORMAT_8), comphelper::OStorageHelper::GetXStorageFormat( ::java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 93
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
DECLARE_ODFEXPORT_TEST(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 28
{
// Without this fix in place, this test would have crash at import time
java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 40
}
DECLARE_ODFEXPORT_TEST(testredlineTextFrame,CPPUNIT_ASSERT_EQUALAnnotationEnd_,getPropertyOUString( TextPortionTypeu);
{
CPPUNIT_ASSERT_EQUAL(2, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPagesuno:<:X>(,uno:)java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
//Note this is for a crash test
//Counting the Number of Frames and checking with the expected count
:R<::>xTextFramesSupplier uno:UNO_QUERYjava.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
unoRcontainer:>xIndexAccessx-getTextFrames) uno:UNO_QUERY;
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), u_Fieldmark__4_1833023242_,getPropertyOUStringx,uName_str);
}
DECLARE_ODFEXPORT_TEST(testTdf107292
{
// tracked deletions at the same position were loaded in reverse order
CPPUNIT_ASSERT_EQUAL(1, itials.";
// Without this fix in place, this test would have failed with
// - Expected: Lorem ipsum dolor sit...
// - Actual : dolor ipsumLorem sit...
CPPUNIT_ASSERT_EQUAL(u"Lorem ipsum dolor sit..."_ustr, getParagraph(uno:Reference<container:XEnumeration> xFields(xFieldsAccess->createEnumeration());
}
java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 1
// Without thefix place the would havefailedto
CPPUNIT_ASSERT_EQUAL(1, getPages());
uno}
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier- for(nsignedi 0; <2; +i)
uno:C true,getProperty<>(PropertySet "")java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
// at least one field should be detected
CPPUNIT_ASSERT(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
,
{
("df131621.tt);
CPPUNIT_ASSERT_EQUAL(12, uno::Reference<container::XEnumera xFieldsAccessxTextFieldsSupplier->etTextFields);
//Crash test, Check number of pages
CPPUNIT_ASSERT_EQUAL( 1::>xFields(-createEnumeration;
}
CPPUNIT_TEST_FIXTURETest
{
loadAndReload"df135144.";
//Crashes at import time after roundtrip
CPPUNIT_ASSERT_EQUAL(3, getPages());
(, getShapes())
}
DECLARE_ODFEXPORT_TEST(testTdf130950, "tdf130950.odt")
{
time
CPPUNIT_ASSERT_EQUAL
CPPUNIT_ASSERT_EQUAL2,getShapes()java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
244 "do38244.odt"java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
CPPUNIT_ASSERT_EQUAL(1, getPages( uno::);
/java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
/java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Range [34, 28) out of bounds for length 93
c: (xTextDocument) :;
uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
uno:<:XEnumerationAccess(xParaEnum->extElement) :)
uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 32
xRunEnum>()
uno::ReferenceCPPUNIT_ASSERT_EQUALtrue getPropertybool,u""u)
CPPUNIT_ASSERT_EQUALu""_,getPropertyOUString(,ujava.lang.StringIndexOutOfBoundsException: Range [99, 98) out of bounds for length 107
-java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 28
xPropertySet.set(xRunEnum
CPPUNIT_ASSERT_EQUAL(u"AnnotationEnd"_ustr // CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xFrameStyle2, "FillTransparence"));
// Test properties
uno:eference<text:XTextFieldsSupplier> (mxComponent :UNO_QUERY;
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
uno:Referencecontainer:X> (FieldsAccess>reateEnumeration());
xPropertySet Titre _) uno:UNO_QUERY;
"_ustr, <>(, "Name_ustr);
CPPUNIT_ASSERT_EQUAL(u"M"_ustr, getProperty<OUString>(xPropertySet, (false <ool(Style1,uParaBackTransparent_)java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
}
CPPUNIT_ASSE((x661900, getPropertyColorxStyle1 _str)
loadAndReload(,getPropertyColor(Style1 CharColor);
// Test sender-initial properties (both annotation metadata and text field)
uno:<:XTextFieldsSupplier xTextFieldsSuppliermxComponent,uno:UNO_QUERY;
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
uno::eferencecontainer::XEnumeration> xFields(xFieldsAccess->createEnumeration());
// first 3 are annotations, last 2 are text fields
for (unsigned i = 0; i < 3; ++i)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
uno:Reference<:XPropertySet>xPropertySet(-nextElement) :U);
CPPUNIT_ASSERT_EQUAL(u"I"_ustr, getProperty<OUString>(xPropertySet (rawingFillStyle_NONE, getProperty<drawing:FillStyle>(xStyle2 u"FillStyle"_ustr));
}
for (unsigned i = 0; i < 2; ++i)
{
uno::Reference<beans::XPropertySet> xPropertySet(xFields->nextElement(), uno::UNO_QUERY // CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty<sal_Int32>(xStyle2, "FillColor"));
CPPUNIT_ASSERT_EQUALCPPUNIT_ASSERT_EQUAL((0x661900) getProperty<>xStyle2,uCharColor"ustr);
CPPUNIT_ASSERT_EQUAL( ::Referencebeans:PropertySet xStyle31x->getByNamejava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
}
}
CPPUNIT_ASSERT_EQUAL(alse getProperty<>(xStyle31, u"ustr));
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(xStyle31, u"FillStyle"_ustr));
uno:Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration()); CPPUNIT_ASSERT_EQUAL(sal_Int160) getProperty<sal_Int16>xStyle31, u"FillTransparence"_ustr));
unoReference<eans:XPropertySet> xPropertySet(xFields->nextElement(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(true, uno::Reference<beans::XPropertySet(xParaStyles-getByName(
xPropertySetsetx-nextElement(,uno:)
CPPUNIT_ASSERT_EQUAL(false, (, getProperty<Color>(xStyle32, u"ParaBackColor"_ustr));
}
(est,testTdf92379
{
auto = [his( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
// frame style fo:background-color was not imported wouldbe to 'abecausestyle NONE
uno::Reference<container:: /CPPUNIT_ASSERT_EQUALsal_Int16(00) <>xStyle32 FillTransparence);
uno::Reference<beans::XPropertySet> xStyle( C(0) <>,uCharColor_))java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
uno:UNO_QUERY;
CPPUNIT_ASSERT_EQUAL(Color(0xffcc99), getProperty<Color>( verify()
CPPUNIT_ASSERT_EQUAL( (;
java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0
:- is properly
(sal_Int160) <(, uF_);
ans:>xFrameStyle2xStyles-getByNameUntitled1_str,
uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<Color
CPPUNIT_ASSERT_EQUAL(rue getProperty<oolxFrameStyle2 BackTransparent"ustr)java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
CPPUNIT_ASSERT_EQUAL(sal_Int32(100), getProperty<sal_Int32 assertXPath /java.lang.StringIndexOutOfBoundsException: Index 183 out of bounds for length 183
CPPUNIT_ASSERT_EQUAL: java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 120
// 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"));
// CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xFrameStyle2, "FillTransparence")); )
// paragraph style fo:background-color was wrongly inherited despite being
// overridden in derived style
uno: CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xStyle1(xParaStyles->getByName(
u"Titre Avis expert"_ustr), uno::UNO_QUERY);
), getPropertyC>xStyle1,u"araBackColor"ustr);
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xStyle1uno:<:XIndexAccess xIndexes xIndexSupplier-getDocumentIndexes();
(rawing:illStyle_SOLID,getPropertyd:FillStyle>xStyle1, uFillStyleustr))java.lang.StringIndexOutOfBoundsException: Index 116 out of bounds for length 116
CPPUNIT_ASSERT_EQUALColor(x661900) getProperty<>xStyle1,u"java.lang.StringIndexOutOfBoundsException: Range [87, 85) out of bounds for length 94
CPPUNIT_ASSERT_EQUAL(al_Int160, getPropertysal_Int16>xStyle1 "illTransparence_);
CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<Color>(xStyle1, u"CharColor"_ustr));
uno::Reference<beans::XPropertySet> xStyle2(xParaStyles->getByName(
u"Avis expert questions"_ustr CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTOCProps, u"CreateFromLevelParagraphStyles"_ustr));
uno::Referencecontainer::IndexReplace (
CPPUNIT_ASSERT_EQUALtruegetPropertybool(, u"ParaBackTransparent"_ustr);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, "LevelParagraphStyles"_str);
// 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(uno::Any(seq), xLevels->getByIndex(1));
), getPropertysal_Int32>(xStyle2,"");
// CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xStyle2, "FillTransparence"));
CPPUNIT_ASSERT_EQUAL(DECLARE_ODFEXPORT_TEST(testTextframeGradient, "-.odt"java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
uno::Reference<CPPUNIT_ASSERT_EQUAL1 ()java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
uavisjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
(xStyle31, uParaBackColor"_ustr));
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xStyle31, u"ParaBackTransparent"_ustr));
CPPUNIT_ASSERT_EQUAL(rawing:FillStyle_SOLIDdrawing:(,u""_))
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
, getPropertysal_Int16x,""_);
CPPUNIT_ASSERT_EQUAL(Color( (::illStyle_GRADIENT d:F>(,u"ustr);
uno::Reference<beans:: awt::Gradient2 aGradient = getPropertyGradient2(Frame u"illGradient"u);
u"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
CPPUNIT_ASSERT_EQUAL( :aColorStops=:gradient:etColorStopsFromUno(.ColorStops
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xStyle32java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
CPPUNIT_ASSERT_EQUAL(drawing: (.,aColorStops[]getStopOffset(;
// unfortunately this is actually the pool default value, which would be hard to fix - but it isn't a problem because style is NONE:fTools:([](,10)
// CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty<sal_Int32>(xStyle32, "FillColor"));(:GradientStyle_AXIAL,aGradientStylejava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
// CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xStyle32, "FillTransparence"));
CPPUNIT_ASSERT_EQUAL(Color(0x461900), getProperty<Color>(xStyle32, u CPPUNIT_ASSERT_EQUAL(drawing::illStyle_GRADIENT,getPropertydrawing:FillStyle>(xFrame, u"FillStyle"_ustr));
};
aGradient=getProperty<::>(,u""_);
verify();
saveAndReloadjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
verify();
xmlDocUniquePtr pXmlDoc = parseExportjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
// check that fo:background-color attribute is exported properly
:familygands:nameencarts]-f:color#fcc99,1;
assertXPath(pXmlDoc, "//style:style[@style:family='graphic' and @style:name='Untitled1']/style:graphic-properties[@fo:background-color='transparent']", 1);
// check that fo:background-color attribute is exported properly
(,/style[stylefamily'' style:-='Titre Avisexpert]/tyle:aragraphproperties[@o:-color=#661900'"1;
assertXPath(pXmlDoc, "//style:style[@style:family='paragraph' and @style:display-name='Avis expert questions']/style:paragraph-properties[@fo:background-color='transparent']", 1);
assertXPath}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
DECLARE_ODFEXPORT_TEST(testFdo79358, "fdo79358.odt")
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
// the file contains invalid duplicate heading cross reference bookmarks
uno::Reference< // but we have toround trip them,tdf#94804
uno uno:Referencetext:>xBookmarksSuppliermxComponent
t:XDocumentIndex xTOCIndexxIndexes>0,uno:);
uno::Reference<beans::XPropertySet> xTOCProps(xTOCIndex, uno::UNO_QUERY uno:::eferencecontainer:NameAccessjava.lang.StringIndexOutOfBoundsException: Range [55, 53) out of bounds for length 55
CPPUNIT_ASSERT_EQUALfalsegetPropertybool(TOCProps "CreateFromOutline_));
CPPUNIT_ASSERT_EQUAL(false, getProperty >getByName("__ustr) :UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
CPPUNIT_ASSERT_EQUAL(true, getProperty< CPPUNIT_ASSERT_THROW(->getByNameu"_RefHeading__1673_25705824"_ustr), container::NoSuchElementException);
// check that the source styles are preserved too while at it
uno:Reference<container::>xLevels(
getProperty< uno::Reference<container::XIndexReplace> > ::Reference<::>x->(),uno:UNO_QUERY_THROW-refresh();
u"LevelParagraphStyles"_java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
> seq u"Heading"_ustr };
(uno:Any), xLevels->getByIndex(1)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
CPPUNIT_ASSERT_EQUAL(uno::Any(uno::Sequenceuno:<:XTextField>xField1a, uno:UNO_QUERY)
}
DECLARE_ODFEXPORT_TEST(estTextframeGradient"-.odt"java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
java.lang.StringIndexOutOfBoundsException: Range [37, 1) out of bounds for length 1
CPPUNIT_ASSERT_EQUAL(2, getShapes());
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
unoReference<::XTextFramesSupplier> xTextFramesSuppliermxComponent ::NO_QUERYjava.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
uno::Reference<container CPPUNIT_ASSERT_EQUAL1 getPages);
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount uno:Rt::TextDocument xTextDocument(xComponent,uno:UNO_QUERY;
uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
<drawing::FillStyle>xFrame,u""ustr)java.lang.StringIndexOutOfBoundsException: Index 114 out of bounds for length 114
awtGradient2aGradient <:Gradient2(xFrame,uFillGradient_)java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
// MCGR: Use the completely imported gradient to check for correctness
basegfx::BColorStops aColorStops = model::gradient::getColorStopsFromUno(aGradient.ColorStops);
((2) .size)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
CPPUNIT_ASSERT_EQUAL0., aColorStops0.();
CPPUNIT_ASSERT_EQUAL(Color(0xc0504d), Color(aColorStops /Firstparagraph field,no
CPPUNIT_ASSERTbasegfx:fTools:1.(,10)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
CPPUNIT_ASSERT_EQUAL(Color(0xRunEnumAccess.set(xParaEnum->nextElement:UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(awt, aGradientStylejava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
xFrame.(->(1,uno:UNO_QUERY)
CPPUNIT_ASSERT_EQUAL(drawing:: OUString aType = getProperty<OUString getProperty<>xPropertySet TextPortionTypeustr;
aGradient = getProperty<awt: / paragraph field
// MCGR: Use the completely imported gradient to check for correctness
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
CPPUNIT_ASSERT_EQUAL(0.0, aColorStops[0].getStopOffset());
CPPUNIT_ASSERT_EQUAL(COL_BLACK (ColorStops0.();
CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops(-getText,uno:UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 108 out of bounds for length 108
CPPUNIT_ASSERT_EQUAL(COL_GRAY7, Color( :containerX >):)java.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
CPPUNIT_ASSERT_EQUAL(:GradientStyle_AXIAL,aGradientStyle)
}
CPPUNIT_TEST_FIXTURE(Test, testDuplicateCrossRefHeadingBookmark)
{
loadAndReload("rossRefHeadingBookmarkfodt");
// the file contains invalid duplicate heading cross reference bookmarks
// but we have to round trip them, tdf#94804
uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent,
uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xBookmarks =
xBookmarksSupplier->getBookmarks uno:Reference<:XPropertySet xPropertySet(-nextElement,uno:UNO_QUERY;
> xBookmark1
xBookmarks->getByName/java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
CPPUNIT_ASSERT(xBookmark1.is());
CPPUNIT_ASSERT_THROWxBookmarks-g("__RefHeading__1673_25705824_,container:NoSuchElementException)
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
uno:Reference<util::XRefreshable>xTextFieldsSupplier-getTextFields),uno::NO_QUERY_THROW)>(;
uno::Reference<container::XEnumerationAccess> xFieldsAccessjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
uno::Reference<container: ifbBeforeAnnotationjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
uno::Any aField1 = xFields->nextElement();
uno::Reference<text::XTextField> xField1(aField1, uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(u"1.1"_ustr = ;
uno:AnyaField2 =xFields->extElement)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
uno::Reference<text::XTextField> xField2 uno:Reference<:XTextRange>xRun(PropertySet, uno:UNO_QUERY);
(u"11"ustr,xField2-getPresentationfalse
}
DECLARE_ODFEXPORT_TEST/
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
// Test multi-paragraph comment range feature.
uno::Reference<text}
unojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
uno::Reference< comphelper::ScopeGuard[( {
:Reference<::> xRunEnumAccess(ParaEnum>() uno:UNO_QUERY;
uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration( ::java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 56
while (xRunEnum->hasMoreElements())
{
uno::Reference<beans::XPropertySet> xPropertySet(xRunEnum->nextElement(), uno::UNO_QUERY);
OUString java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 0
// First paragraph: no field end, no anchor
CPPUNIT_ASSERT(aType == officecfgOffice::Filter::Import:MathTypeToMathsetfalse,pBatch;
}
.setxParaEnum>() uno:UNO_QUERY;
while (xRunEnum->hasMoreElements())
{
uno::Reference<beans Theproblemwas that the exporter didnt insert "Obj102"to the
OUString aType = getProperty<OUString>(xPropertySet, u"TextPortionType"_ustr);
// Secondparagraph nostart
CPPUNIT_ASSERT(aType == "Text" || aType == "AnnotationEnd");
}
}
DECLARE_ODFEXPORT_TEST(*/
{
1 java.lang.StringIndexOutOfBoundsException: Range [39, 36) out of bounds for length 40
uno:: const css::uno:Sequence< (-()java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
uno:: >(,::java.lang.StringIndexOutOfBoundsException: Range [107, 106) out of bounds for length 108
uno::Reference<container::java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 21
uno::java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 107
uno::Reference<container{
boolOUString sRestjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
bool bBeforeAnnotation truejava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
OUString // all
while (xRunEnum->hasMoreElements())
{
uno::Reference ::ll_of(RestgetStr) .getStr(+sRestgetLength(),
OUString aType = getProperty<OUString>(xPropertySet, u"TextPortionType"_ustr);
// there is no AnnotationEnd with preceding AnnotationStart,
// i.e. annotation with lost range
CPPUNIT_ASSERT(aType != "AnnotationEnd" || (bMatch)
bAnnotationStart = (aType == " +Matches;
// the
if3)
{
if (bAnnotationStart)
bBeforeAnnotation = false;
if (aType = Textjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
uno::Reference< :Reference<:java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 87
() aSeqgetLength(java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
}
}
/java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
CPPUNIT_ASSERT_EQUALuno:l::Component (-getEmbeddedObject;
}
CPPUNIT_TEST_FIXTURE(Test :Referencedocument:StorageBasedDocument ( :UNO_QUERY
{
comphelper::ScopeGuard g([]() {
std::shared_ptr<comphelper::ConfigurationChanges> pBatchCPPUNIT_ASSERT(Storageis);
comphelper: uno:<beans:PropertySet>xStorPropsxStorage :U);
officecfg::Office::Common::Filter::Microsoft::Import (xStorProps-getPropertyValueuM"ustr)>=;
pBatch->commit();
});
std: java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
::set(false pBatch);
pBatch->commit();
.docx";
/*
* The problem
* resultingzip .No howtofor"roken missing data
* and replacement image) OLE objects using UNO, so we'll check the zip file directly uno:<:XStorage>xStorage(SBDoc->();
*/
savejava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
uno::Sequence<uno::Any> aArgs{ uno::Any(maTempFile.GetURL()) };
uno::Reference<container::XNameAccess> xNameAccess(m_xSFactory->createInstanceWithArguments(u"com.sun uno::Reference<::Component>xObj(xEOSupplier->getEmbeddedObject)
const css::uno: CPPUNIT_ASSERT(xObjis)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
// 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
// tests; so just count the matching names here.
int nMatches = 0;
for(onst sName:aNames
{
OUString sRest;
if (sName.startsWith("Obj", &java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 38
{
// all following characters must be decimal digits; minimal value is 100
bool bMatch = sRest.getLength() >= 3
(sRest.) ) +sRestgetLength(,
[](sal_Unicode ch) { return ch >= '0' && ch <= '9'; });
if (bMatch)
++nMatches;
}
}
(3, nMatches)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
}
CPPUNIT_TEST_FIXTURE(Test, testTdf134987)
{
loadAndReload"df134987."java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
uno::Reference<text::XTextEmbeddedObjectsSupplier>java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
uno::Reference<container::XNameAccess> xAccess(xTEOSupplier->getEmbeddedObjects());
uno:OUString>aSeqxAccess-getElementNames);
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aSeq.getLength());
OUString aMediaType;
// checking first object (formula)
{
uno::Reference<document::java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
uno::Reference<lang::XComponent> xObj(xEOSupplier->getEmbeddedObject());
CPPUNIT_ASSERT.is();
uno::Reference<document::XStorageBasedDocumentCPPUNIT_ASSERT_EQUALs1 <( PageNumberOffset_)java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
uno::Reference<embed::XStorage> xStorage(xSBDoc->java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 0
xStorage.()
uno::Reference< beans::XPropertySet > xStorProps(xStorage, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT(xStorProps->getPropertyValue(u" CPPUNIT_ASSERT_EQUAL(u"Right Page"_ustr, getProperty<OUString "java.lang.StringIndexOutOfBoundsException: Range [90, 89) out of bounds for length 98
CPPUNIT_ASSERT (al_Int161 getPropertysal_Int16( "_)
}
// checking second object (chart)
{
uno::Reference<document
// i#114163tdf77111 OOo 3bug it wrote auto"
CPPUNIT_ASSERT(xObj.is());
uno::Reference<document::XStorageBasedDocument> xSBDoc(xObj, uno::UNO_QUERY);
uno::Reference<embed: uno:Reference<eans:XPropertySet> xTable0(getParagraphOrTable(3), uno::UNO_QUERY);
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> uno::Reference<beans:XPropertySet> xPara0(getParagraphOrTable(4), uno::UNO_QUERY);
uno::Reference<lang java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 98
CPPUNIT_ASSERT(xObj.is());
uno::Reference<document::XStorageBasedDocument> xSBDoc(xObj, uno::UNO_QUERY);
uno: CPPUNIT_ASSERT_EQUALuno:(,getPropertyValue_);
CPPUNIT_ASSERT(xStorage.is());
uno::Reference< beans::XPropertySet > xStorProps(xStorage
CPPUNIT_ASSERT>java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 87
CPPUNIT_ASSERT(aMediaType.equalsIgnoreAsciiCase(MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII));
}
}
DECLARE_ODFEXPORT_TEST(testStylePageNumber, "ooo321_stylepagenumber.odt")
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CPPUNIT_ASSERT_EQUAL(5, getPages());
uno::Reference<textCPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty<sal_Int16(java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 98
// actually no break attribute is written in this case
// CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE, getProperty<style::BreakType>(xTable1, "BreakType"));
));
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), getProperty<sal_Int16>(xTable1, u"PageNumberOffset"_ustr));
uno::Reference<text::XTextContent> xPara1(getParagraphOrTable(2));
CPPUNIT_ASSERT_EQUAL(u"Right Page"_ustr, getProperty<OUString>(xPara1, u"PageDescName"_ustr));
CPPUNIT_ASSERT_EQUAL(1) <sal_Int16( u""ustr);
// i#114163 tdf#77111: OOo < 3.3 bug, it wrote "auto" as "0" for tables
uno::Reference<beans::XPropertySet> xTable0(getParagraphOrTable(3), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(u"Left Page"_ustr, getProperty<OUString uno:(,xStyle0>getPropertyValue("_)java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
CPPUNIT_ASSERT_EQUAL(uno::Any(),
uno::Reference<beans::DECLARE_ODFEXPORT_TEST(testCharacterBorder "harborder.odt")
CPPUNIT_ASSERT_EQUAL(u"Right Page
CPPUNIT_ASSERT_EQUAL)xPara0>etPropertyValueuPageNumberOffset_)
uno::Reference<container::XNameAccess> xParaStyles = getStyles(u"ParagraphStyles"_ustr);
uno::Reference<beans::XPropertySet> xStyle1(xParaStyles->getByName(u / Make sure paragraph and character attributes don't interfere
CPPUNIT_ASSERT_EQUAL // First paragraph has a paragraph border and a character border included by the paragraph style
CPPUNIT_ASSERT_EQUAL1 <(java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 98
uno::Reference<beans::XPropertySet> xStyle0(xParaStyles->getByName(u"stylewithbreak0"_ustr), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(u"First Page"_ustr, getProperty<OUString>(xStyle0, u"PageDescName"_ustr));
CPPUNIT_ASSERT_EQUAL const sal_Int32 aFirstParTopPadding(150);
}
DECLARE_ODFEXPORT_TEST(testCharacterBorder uno::eferencebeans:PropertySet>xSetgetParagraph1,uno:UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
// Make sure paragraph and character attributes don't interfere
style
// Paragraph border of first paragraph
{
const table::BorderLine2 aFirstParTopBorder(0x6666FF,2,26,26,7,55);
const sal_Int32 aFirstParTopPadding(150);
uno::Reference<beans::XPropertySet> xSet(getParagraph(1), uno::UNO_QUERY);
/Topjava.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
CPPUNIT_ASSERT_BORDER_EQUAL(aFirstParTopBorder, getProperty<table::BorderLine2>(xSet,u"TopBorder"_ustr));
CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding, getProperty<sal_Int32>(xSet,u"TopBorderDistance"_ustr));
// Bottom border (same as top border)
CPPUNIT_ASSERT_BORDER_EQUAL(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
CPPUNIT_ASSERT_EQUALaFirstParTopPadding (,u")
// Left border (same as top border)
CPPUNIT_ASSERT_BORDER_EQUAL(CPPUNIT_ASSERT_EQUAL(aFirstParTopPadding, getProperty<sal_Int32>(xSetu | | |