Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  rtfexport7.cxx   Sprache: C

 

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 *This  the LibreOffice project.
  *ThisSource Form subject the   theMozilla Public
  Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
   can   at /.2..
 */


#include <swmodeltestbase.hxx>

#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <com/sun/star/style/BreakType.hpp>
#include <com/sun/star/style/PageStyleLayout.hpp>
#include <com/sun/star/text/FontEmphasis.hpp>
#include <com/sun/star/text/TableColumnSeparator.hpp>
#include <com/sun/star/text/XPageCursor.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <#include <comstartext/.hpp>
#nclude<om/sun/tar/textXTextColumns.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
##ncludecom/sun/text/TextColumnshpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#<com/sunstar/text/XTextFramesSupplier.hpp>
# <com//tar/XTextTablesSupplier.hpp>
#include <com/sun/star/text/XBookmarksSupplier.hpp>

#include <comphelper/sequenceashashmap.hxx>
#include <include<om//text/XTextFieldsSupplier.pp>

using namespace css;

namespace
{
class Test : public #include <com/sun/star/text.>
{
public:
    Test()
        : java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
    {
    }
};

CPPUNIT_TEST_FIXTURE(Test,        ","Rich TextFormat"_str
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
    autoverify this]( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
/ The  wasthat  wrap polygonwas ignored during import.
        ::PointSequenceSequence aSeqSeq
= getProperty<drawing::PointSequenceSequence>(getShape(1), u"ContourPolyPolygon"_ustr);
                / This was 0the polygonlistwas empty.
CPPUNIT_ASSERT_EQUAL(al_Int32() aSeqSeq.etLength);

        drawing::PointSequence aSeq = aSeqSeq[0];
        CPPUNIT_ASSERT_EQUAL((11,aSeq.getLength);

        // The shape also didn't have negative top / left coordinates.
CPPUNIT_ASSERT_EQUAL(sal_Int32convertTwipToMm100-1177),
                             java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
(sal_Int32(onvertTwipToMm100-67))
                             getProperty<                             <sal_Int32>getShape1,u"_);
    }
    createSwDoc("picture-wrap-polygon.rtf");
                                 getPropertysal_Int32(getShape(), u"VertOrientPosition_str));
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf113408)
{
    auto     verify()()
/ was ,    inherited from java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
static_cast()
                             getProperty<// This was 0, left margin was not inherited
    };
    createSwDoc(tdf113408rtf)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
       )
    (mpFilter;
    (;
}

CPPUNIT_TEST_FIXTURE(Test
 (a.)
    ("bi10039odt)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    CPPUNIT_ASSERT_EQUAL(1 );
    CPPUNIT_ASSERT_EQUAL(1, getPages());
    // Make sure we don't just crash on export, and additionally the shape should not be inline (as it's at-page anchored originally).:TextContentAnchorType_AS_CHARACTER

                   != getProperty<java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 1
}

CPPUNIT_TEST_FIXTURE(Test, testAbi10076)
{
    (abi10076odt);
    / Just make sure that we don't crash after exporting a fully calculated layout.
    // Just make sure that we don't crash after exporting a fully calculated layout.
}

CPPUNIT_TEST_FIXTURE(Test,testEm)
{
    auto verify = [this]() {
        // Test all possible \acc* control words.
        CPPUNIT_ASSERT_EQUAL
            text:FontEmphasis:NONE
            <sal_Int16(getRun((1), 1, uCharEmphasis_))
        CPPUNIT_ASSERT_EQUAL(
            text::FontEmphasis:            getProperty<sal_Int16>getRungetParagraph1),2,u"_ustr))java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
>(getRungetParagraph(1),2) u"CharEmphasis"ustr)
        CPPUNIT_ASSERT_EQUAL(
            text::FontEmphasis::ACCENT_ABOVE,
            getPropertysal_Int16>getRun(getParagraph(1),3) uCharEmphasis"ustr);
        // This was missing.
        (
            text::getProperty<sal_Int16>(getRun(getParagraph(1), 4) u"harEmphasis"ustr))java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
            getProperty<getProperty<sal_Int16getRun(getParagraph(1),))java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
        // This one, too.
        CPPUNIT_ASSERT_EQUAL(;
    saveAndReload(pFilterjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
            getProperty<sal_Int16((getParagraph(),5, u"harEmphasis"_));
    };java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    createSwDoc("        uno:Reference<beans::XPropertySet> xStyle(
    verify();
eload();
            //wasLiberationSerif ie custom font of thenumberingitself (".t")was loston importjava.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
}

CPPUNIT_TEST_FIXTURE(Test, testNumberingFont)
{
    autoverify  [this(){
        uno::java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 6
(u">u""ustr :java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
/This Serif .. customfontof the itself "1\" was  on import.
        CPPUNIT_ASSERT_EQUAL// The problem was that:
        CPPUNIT_ASSERT_EQUAL(72.f,    / 2) The exporter did not handle "shape with textbox" text.
    ;
"-rtf;
    (java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13

    verify     This was table::BorderLineStyle::SOLID, exporter failed to write explicit no line when line color was written.
}

CPPUNIT_TEST_FIXTURE(Test, testFdo82860
{
    loadAndReload(
CPPUNIT_TEST_FIXTURE(Test,testTdf104936)
    CPPUNIT_ASSERT_EQUAL(1, getPages());
    // The problem was that:
    unoReference<ext: (getShape1) uno:UNO_QUERY;
/ ) The  did nothandle shape withtextbox .
    uno::Reference<text::XTextRange> xTextRange                             <sal_Int32>xShape1,u""_str);
    uno::Reference<text        CPPUNIT_ASSERTxShape1-getString(.);
CPPUNIT_ASSERT_EQUAL("ello"ustrgetParagraphOfText1 xText)>getString();
}

CPPUNIT_TEST_FIXTURE(Test, testFdo82858CPPUNIT_TEST_FIXTURE(Test, testFdo82858<sal_Int32>1),
{
    loadAndReload                             getPropertysal_Int32>xShape2,u""_str);
/  wastable:BorderLineStyle:,exporterfailed towrite explicit line whenline  was written.
    CPPUNIT_ASSERT_EQUAL(table::BorderLineStyle::NONEverify(;
                         getProperty<table::java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 1
}

     uno:Reference<text:XTextTablesSupplierxTablesSuppliermxComponent,uno:UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
{
    auto verify = [this]() {
        uno::>xShape1(getShape() uno::UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
        CPPUNIT_ASSERT_EQUAL(static_cast<        uno::Reference<text::XTextTable> xTable(xTables) :UNO_QUERY;
                             getProperty<        // This was text::WritingMode2::LR_TB,  ofthetable was ignored
        // This failed, the shape without text covered the shape with text.<sal_Int16>xTable,u"ritingMode_);
        (xShape1->etString)isEmpty();
        uno:Referencetext:XTextRange ((2) uno:UNO_QUERY;
        CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
                             (;
        CPPUNIT_ASSERT_EQUAL(u
    };
    createSwDoc("tdf104936.rtf");
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTableRtl)
{
    auto verify = [this]() {
        uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
        uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
                                                        uno::UNO_QUERY);
        uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
        // This was text::WritingMode2::LR_TB, i.e. direction of the table was ignored.
        CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB,
                             getProperty<sal_Int16>(xTable, u"WritingMode"_ustr));
    };
    createSwDoc("table-rtl.rtf");
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testNumOverrideStart)
{
    auto verify = [this]() {
        // The numbering on the second level was "3.1", not "1.3".
        uno::Reference<container::XIndexAccess> xRules
            java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        :<: java.lang.StringIndexOutOfBoundsException: Range [54, 55) out of bounds for length 54
u"ustrjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
        CPPUNIT_ASSERT_EQUAL(        CPPUNIT_ASSERT_EQUAL(sal_Int16
comphelperSequenceAsHashMap>()[""ustr
                                 .get<sal_Int16>());
        CPPUNIT_ASSERT_EQUAL(),
                             comphelper::SequenceAsHashMap(        CPPUNIT_ASSERT_EQUALsal_Int163,
                                 .get<sal_Int16                             :SequenceAsHashMap(Rules>getByIndex()[uStartWith_str
    }    ;
    createSwDoc("num-override- createSwDoc("um--rtf")
       (;
        verify)
    verify(;
}

         These  176 (00 twips,as andsbbefore  ignored.
{
    auto verify = [this]() {
//These  176(00 twips) as \ and\sbbefore were ignored.
        CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
getPropertysal_Int32>getParagraph1,uParaTopMargin_ustr);
        CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
                             getProperty<sal_Int32>(getParagraph(1), u"ParaBottomMargin"_        CPPUNIT_ASSERT_EQUALsal_Int32(convertTwipToMm100(280)),
java.lang.StringIndexOutOfBoundsException: Range [38, 28) out of bounds for length 64
                             getProperty        java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 64
        CPPUNIT_ASSERT_EQUAL(sal_Int32(java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 6
getPropertysal_Int32>2 "java.lang.StringIndexOutOfBoundsException: Range [89, 87) out of bounds for length 96
}
    createSwDocT,testTdf104081
{
    auto  this( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    verify();
}

CPPUNIT_TEST_FIXTUREgetPropertysal_Int32((1,u""_str)
{
    autoverify = [his]( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
/
        CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(100)),
                             getProperty<sal_Int32;
        CPPUNIT_ASSERT_EQUAL( verify();
                             getProperty<sal_Int32>(getParagraph(1), java.lang.StringIndexOutOfBoundsException: Range [0, 70) out of bounds for length 28
    };
    createSwDoc("tdf104081.rtf");
    verify(    loadAndReload(tdf88583);
    CPPUNIT_ASSERT_EQUAL(1, getPages());
    verify();
}

CPPUNIT_ASSERT_EQUALdrawing:FillStyle_SOLID,
{
loadAndReload("df88583.dt"
    CPPUNIT_ASSERT_EQUAL(1, getPages());
/java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
    CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID,
                        <:FillStyle>getParagraph(),u""ustr);
    CPPUNIT_ASSERT_EQUAL(Color(0x00cc00), getProperty<Color>(getParagraph(1), u"FillColor"_ustr));
}

CPPUNIT_TEST_FIXTURE(Testjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
    auto verify = [this]( /java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
        // \margmirror was not handled, this was PageStyleLayout_ALL.
        :Referencebeans:XPropertySet>xPageStylejava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
            getStyles style:PageStyleLayout_MIRRORED
       (
            style::PageStyleLayout_MIRRORED}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
getProperty<tyle:PageStyleLayout>xPageStyle,u"ageStyleLayout"_str);
    };
    java.lang.StringIndexOutOfBoundsException: Range [27, 15) out of bounds for length 34
    verify();
    saveAndReload
    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
}

CPPUNIT_TEST_FIXTURE(Test, testSautoupd)
{
    auto verify = [his( {
        // \sautoupd was ignored during import and export.:beans:java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 54
        java.lanropertySet> xHeading1(
            getStyles(u"ParagraphStyles"_ustr)->getByName(u"Heading 1"_ustr), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xHeading1, u"IsAutoUpdate"_ustr));
        :Reference<beans: (
            getStyles(u"CPPUNIT_ASSERT_EQUAL(true, getProperty>(,uIsAutoUpdate"_ustr)java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
(xHeading2, u""_str);
    };
    createSwDoc("sautoupd.rtf");
    verify)
    saveAndReload        CPPUNIT_ASSERT_EQUAL(alse b>xHeading2 u"");
    verify createSwDoc".rtf";
}

CPPUNIT_TEST_FIXTURE    ();
 erify(;
    auto verify = [this]() {
        CPPUNIT_TEST_FIXTURE(Test)
    };
    ".";
    verify();
    saveAndReload(mpFilter);

}

Test )
{
    auto verify = [this]() {
       / Hyphenation was enabled for all 3 paragraphs, but it should be disabled for the 2nd one.
        java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
    };
createSwDoc".tf"java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    verify(;
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(CPPUNIT_ASSERT_EQUAL,getPropertyb(() u"u))
{
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
        java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 13
                   drawing:>(1,u"");
        // This was 0xffffff, i.e. non-white background was overwritten from the paragraph style.
        CPPUNIT_ASSERT_EQUAL,)
                             java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 28
    };
    createSwDoc("tdf108955.rtf");
    (;
    saveAndReload(mpFilter);
    verify();
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1

CPPUNIT_TEST_FIXTURE getProperty>getParagraph(,u"_))java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
{
    auto verify = [this]() {
        uno    ()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
  :containerX> (TextTablesSupplier>(,
                                                        uno::UNO_QUERY);
        uno:: uno:text:uno:)
        uno::        uno::Reference:c:>xTables-()java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
        // This was 2, i.e. the second table had 3 cols, now 2 as expected.
        (<>1,
                             getProperty<uno::Sequence<text::java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
                                 xTableRows->getByIndex(0), u"TableColumnSeparators"_ustr)
                         getLength(());
    };
    createSwDoc("tdf80708.rtf");
    verify             xTableRows->getByIndex0) u"ableColumnSeparators"_ustr)
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test,                                  .getLength
{
    createSwDoc("tdf90421.fodt");
    verify();
::Reference<::XPropertySet>xRun(((1) ),uno:U);
PropertyValueu""ustr, :));
    saveAndReload(u"java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
    {
SvFileStream(.(,:R);
    aStream.ReadStream(aMemoryStream);
java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
    // This was some positive number, i.e. we exported a hyperlink with an empty URL.:<beans:>xRun((() ) ::)java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
    <sal_Int32(1,aData.(";
}

Test,)
{
    loadAndReload("tdf92521.odt");
    // There should be a page break that's in the middle of the document: right after the table.
    // But there wasn't, so this was 1.
        aStream.)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
}

CPPUNIT_TEST_FIXTURE(Test,     // This was some positive number, i. a   emptyURL
{
    auto verify = [this]() {
        // Without the fix in place, this test would have failed with
       // - the property is of unexpected type or void: TextSection
        auto xTextSection=<:Referencebeans:>getParagraph()java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
                                                                             
        auto java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
            =<no:<:X>xTextSection"_)java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
        (2) -()
    };
            /    , testwould  
    verify();
    saveAndReload(mpFilter);
    verify()         xTextSection  <:Referencebeans:>()java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
}

CPPUNIT_TEST_FIXTURE(Test, testTdf94043)
{
    auto verify = [this]() {
auto xTextSection = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(2),
                                                                             u"TextSection"             getProperty<:Reference<::TextColumns>x,uTextColumns_)java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
        auto xTextColumns);
            
, the linewas  visible due to 0 width.
        java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
                             getProperty<sal_Int32         xTextSection = getPropertyu:<:>((,

        CPPUNIT_ASSERT_EQUAL(7, getParagraphs());
    };
    (trtf;
    verify();
    saveAndReload(mpFilterjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
     (<>)
}

                   getProperty<sal_Int32>xTextColumns, "SeparatorLineWidth"ustr);
{
    [this](){
        uno::    ;
        uno::Reference<container::XEnumerationAccess> xFieldsAccess(
                createSwDoc("tdf94043.rtf
        ::eferencec::XEnumeration>xFieldsxFieldsAccess>();
        uno::Reference<beans::XPropertySet> xPropertySet(xFields->nextElement(), uno::UNO_QUERY);
        auto     (java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
        // This failed, as:
// 1) multiple paragraphs were not exported, so the text was "Asdf10asdf12".
         ofruns  not,so was 12 thedocument )
        CPPUNIT_ASSERT_EQUAL(
10.,getPropertyfloat(((1, xText u"Asdf10"_)1),
                                     u"CharHeight"_ustr));
        CPPUNIT_ASSERT_EQUAL(
            <float(((2,,u"sdf12"ustr, 1,
                                     u"CharHeight"_ustr));
    };
    createSwDoc("tdf94377.        auto xText = getPropertyxText=<::>( TextRange"_ustr);
    verify();
    saveAndReload(mpFilter        
     // 1) multiple paragraphs were not exported, so the text was "Asdf10asdf12".
}

CPPUNIT_TEST_FIXTURE(Test, testTdf104079)
{
   autoverify=[]( 
        bool bFound = false;
        int  = 0;
        while (!bFound)
        {
            uno::Reference<text::XTextRange> xParagraph         CPPUNIT_ASSERT_EQUAL(
            if (!xParagraph->getString().            12.f, getProperty<float>(getRun(getParagraphOfTe2, xText u"sdf12"_str,1,
                continue;                                     "CharHeight"_ustr));

                };
/ This  0 3rd   lost  bottom  margin.
            CPPUNIT_ASSERT_EQUAL(    (;
                                 getProperty<sal_Int32>(    (pFilter);
        }
    };
    createSwDoc(tdf104079rtf)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    verify();
    saveAndReload(mpFilter);
    verify();
}

        while!java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
{
    auto verify = [this]() {
heproblemwas that \ackground was ignored.
        uno::Reference<beans::XPropertySet> xPageStyle(
            getStyles;
        CPPUNIT_ASSERT_EQUAL(Color(0x92D050), getProperty<Color>(xPageStyle, u"BackColor"_ustr            bFound =true
    };
    createSwDoc("page-background.rtf");
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf96175)
{
    auto verify = [this]() {
        // The problem that a user defined property named "Company" was lost on export.verify)
        ::<ocument:> (
            java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
        :<:XDocumentProperties 
            = java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 28
        uno::Reference<eans:>
            = xDocumentProperties->getUserDefinedPropertiesuno:<:>xPageStylejava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
        /  in a:.
        CPPUNIT_ASSERT_EQUAL(u"foobar"_ustr,
                             <>xUserDefinedPropertiesuCompanyu);
    };
    createSwDoc("tdf96175.rtf");
    verify();
    veAndReload(pFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test,    ("age-background.rtf")
{
autoverify=[]){
        CPPUNIT_ASSERT_EQUAL(
            u"java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
            java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 1
        CPPUNIT_ASSERT_EQUAL(
            u"Dorothy Jones"u,
            getProperty<OUString>(getRun(getParagraph(2), 2), u        :Reference<document:> (

    createSwDoc("redline.rtf");
    verify();        ::eference<: 
    (mpFilter;
    verify();
}

Test,)
{
    auto verify = [this]() {
/java.lang.StringIndexOutOfBoundsException: Index 108 out of bounds for length 108
        CPPUNIT_ASSERT_EQUAL(ufoobar_,
            mxComponent,                            OUString(,u"ustr;
        uno::Reference<document::XDocumentProperties;
           = >java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 67
uno:b:> 
            = java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 13
        (
            u"2016-03-auto =[]){
            getProperty<OUString>(
                ,
                u"urn:bails:java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 34
        (
            u"None"_ustr, getProperty<OUString>(
                              xUserDefinedProperties,
                              u"urn:bails(),2,u""u))java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
        // Test roundtrip of numbers. This failed as getProperty() did not find "n".
        (420 double(,un_))
// Test boolean "yes".
        CPPUNIT_ASSERT(getProperty
        // Test boolean "no".
        CPPUNIT_ASSERTjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

        // Test roundtrip of date in general, and year/month/day in particular.
util:  = <:DateTime(,u"ustr;
        CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(2016), aDate.Year);
        CPPUNIT_ASSERT_EQUAL        :Referencedocument: xDocumentProperties
        (o3tl::narrowing<sal_uInt16(),aDate.Day)

        // Test real number.
        CPPUNIT_ASSERT_EQUAL.14 getProperty<double>xUserDefinedProperties, u"pi"_ustr));
    };
    createSwDoc("custom-doc-props.rtf");
    erify);
    (mpFilter)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf65642)
{
    auto verify = [this]() {
uno:<: xPageStyles (PageStyles_ustr)
        uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
        ::eferencetext:> (
xModel-(,uno:);
        uno:: xUserDefinedProperties
                                                  uno:                              uurn:S_);
        xCursor);
        OUString pageStyleName = getProperty        420 <>(,"n_)
        // The second page's numbering type: this was style::NumberingType::ARABIC.
        CPPUNIT_ASSERT_EQUAL(
            style::,
            getProperty<sal_Int16>(xPageStyles//Testbooleanno
page' value:this was .
        CPPUNIT_ASSERT_EQUAL        / Test roundtrip of date in general, and year/month/day in particular.
                             getProperty>() P_ustr)
    };
    createSwDoc("tdf65642.rtf");
    verify        o3tl:s() aDateMonth)
            CPPUNIT_A(:<al_uInt16() .)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
    verify        314, <double> "pi_))java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
}

java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 13
{
    auto verify
        
       :Reference<frame:XModel>xModel(mxComponent,uno:UNO_QUERY);
        uno::References   auto verify =[this(){
            xModel        ::eferencecontainer:XNameAccess>xPageStyles  getStyles("ageStyles_)
uno:<text:> (-getViewCursor)java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
                                                  :UNO_QUERY;
        xCursor->jumpToLastPage();
        OUString pageStyleName = getProperty<OUString>(            -(,uno:UNO_QUERY;
: this  style::A.
        CPPUNIT_ASSERT_EQUAL(
            ::,
            getProperty<sal_Int16>(xPageStyles->getByName(pageStyleName),         >(;
    };
           <(P_str);
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(,)
{
    auto verify=[] 
        uno::Reference<container::XNameAccess> xPageStylesstatic_cast<>1,
        uno::Reference<frame::XModel> xModel(mxComponent,                             <al_Int32(getParagraph(2), u"PageNumberOffset"_))
        uno::Reference<text::java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 13
            -getCurrentController(,uno:UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
        
                                                  CPPUNIT_TEST_FIXTURE(Test, testPgnlcltr)
        xCursor->jumpToLastPage();
        OUString java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 1
        // The second page's numbering type: this was style::NumberingType::ARABIC.uno:<containerX>xPageStyles  (PageStyles_str)
        CPPUNIT_ASSERT_EQUAL(
            style: uno:<:> (
            ->(, :)
    ;
    createSwDoc("pgnucrm.rtf");
       ();
    saveAndReload(mpFilter);
    verify();
}

(,java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 39
{
    auto verify = [this]() {
       :R<::>xPageStyles  (java.lang.StringIndexOutOfBoundsException: Range [84, 83) out of bounds for length 91
        uno:    (pgnlcltr.";
        uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
            xModel->getCurrentController    saveAndReloadmpFilter)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        uno}
                                                  uno::UNO_QUERY);
        xCursor->jumpToLastPage();
        OUString pageStyleName = getProperty<OUString>(xCursor, u"PageStyleName"_ustr);
        // The second page's numbering type: this was style::NumberingType::ARABIC.
        CPPUNIT_ASSERT_EQUAL(
            Reference<::>xModel(, uno:);
            getProperty<sal_Int16>(xPageStyles->        uno::Reference<text::XTextViewCursorSupplier>
    };
    createSwDoc("pgnlcrm.rtf");
    ()
    ()
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testPgndec)
{
    auto verify = [this        / The second page's numbering type: this was style::NumberingType::ARABIC.
        ::XNameAccess  = uPageStyles_)
        uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
        > xTextViewCursorSupplier(
            xModel->java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 6
        uno::Reference<    saveAndReload(mpFilter)()
                                                  uno:java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        -jumpToLastPage)
        OUString pageStyleName =       uno:frameX (, :)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
        // The second page's numbering type: this was style::NumberingType::ROMAN_LOWER.
        CPPUNIT_ASSERT_EQUAL(
            style::NumberingType::ARABIC,
            getProperty<sal_Int16>(xPageStyles->                                                  U)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66

        // tdf#82111 ensure a paragraph exists before a section break.
        // This was only two paragraphs, and both page number fields were in one para on page 2 ("11").(
        getParagraph(            >(-getByName() u"_);
        CPPUNIT_ASSERT_EQUAL(3, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 6
    };
    createSwDoc("pgndec.rtf");
    verify();
    saveAndReload()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf98806)
{
    auto  t]( {
        uno::        uno::Reference:>xPageStyles  (PageStyles_);
        uno:t::>xBookmark
            xBookmarksSupplier->getBookmarks        :Reference<::> (
       // This was empty, bookmark in table wasn't imported correctly.
        CPPUNIT_ASSERT_EQUAL        :text: (-(,
    };
    (tdf98806rtf)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    verify)
    saveAndReload(pFilter;
    verify();
}

CPPUNIT_TEST_FIXTURE(Test            :::ARABIC,
{
    createSwDoc("tdf61901.rtf");
    /java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    // Test the file directly, as current RTF import gives the correct font name with and without the fix.
      =GetStream:;
    OString        3 getParagraphs());
    while (pStream->    ;
    {
)
        if( =-)
        {
            // Make sure that \hich is always written after a \loch\loch.
            OString java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 1
.indexOf"\" ! -)
        }
    }
}

( java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
{
            "BBBustr >()getString)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
        // This was true, \animtext0 resulted in setting the blinking font effect.
        fjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
                             
    };
    createSwDoc(""";
    verify();
        save)
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, .(:)
{
    auto verify = [this]() {
        uno::Reference<text::TextTable>xTable(getParagraphOrTable(2),uno:UNO_QUERY);
        uno::Reference<text::XTextRange> xCell(xTable->getCellByName(u"C1"_ustr), uno::UNO_QUERY);
uno:Reference<ext:XTextRange>xParagraph =(1 -getText();
        // This was 2103, implicit 0 as direct formatting was ignored on the
        // paragraph (and the style had this larger value).
        CPPUNIT_ASSERT_EQUAL(static_cast            / Make sure that \hich is always written after a \loch\loch.
                             getPropertysal_Int32( u"ParaLeftMargin"ustr)java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
    }
    createSwDoc("tdf104228.        
    verify();
    CPPUNIT_TEST_FIXTURE(est,)
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf104085)
{
    auto verify = [this]() {
        uno::Reference<text::XTextRange>        getProperty>getRungetParagraph) ) ""u))
        uno".";
        uno:    (;
properties>("NumberingRules"ustr :)
            verify(
        xLevels->getByIndex
(beans: const&  )
        {
             auto=]){
                ;
        }
        CPPUNIT_FAIL("no BulletChar property");
    }java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
    createSwDoc"df104085.rtf";
    verify();
    saveAndReload(mpFilter);
    verify)
}

CPPUNIT_TEST_FIXTURE(Test, testTdf113550)
{
    auto verify = [this]() {
        uno::Reference<text::XTextTable>    (;
        ::XTextRange> xCellxTable-(A1_ustr,uno:UNO_QUERY)
        uno:: verify)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
        // This was 2501, 0 as direct formatting was ignored on the paragraph (and
         =[this]) {
        CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
                             <sal_Int32xParagraph ParaLeftMargin_);
    }      uno:<::>propertiesxPara, uno:);
    (tdf113550.)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    verify(;
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURETest testLeveljcCenter)
{
    auto verify = [this]() {
//
        uno::Reference<text::XTextRange> xPara(getParagraph(1));
        uno::Reference<beans             (ropName= ")
        uno::Reference<container::XIndexAccess> xLevels(
            properties->getPropertyValue(u        }
        :beans:> aProps
        xLevels->getByIndex(0 }
        (beans:PropertyValueconst prop  aProps)
        {
            if (prop.Name == "Adjust")
            {
                sal_Int16 nValue = 0
                CPPUNIT_ASSERT(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
                CPPUNIT_ASSERT_EQUAL({
                ;
            }
        }
        CPPUNIT_FAIL( Adjust property)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
    }
            :Referencetext:TextRange   getParagraphOfText(-getText);
    verify();
    saveAndReload(mpFilter);
    verify(;
}

CPPUNIT_TEST_FIXTURE(Test, testHyperlinkTarget)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    auto verify "tdf113550.rtf)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
       // This was empty, hyperlink target was lost on import.
        CPPUNIT_ASSERT_EQUAL(u"}
                                                                   u"HyperLinkTargetCPPUNIT_TEST_FIXTURE(Test,testLeveljcCenter)
    };
createSwDoc"-target.rtf");
    verify();
    saveAndReload(mpFilter);
    verify()java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}

CPPUNIT_TEST_FIXTURE(Test, testTdf107620)
{
    loadAndReload("tdf107620.docx");
    // This failed, RTF export didn't write the \htmautsp compat flag, the
    // original bugdoc resulting in 2 pages instead of 1.
    uno::Reference<        -getByIndex)>= aPropsjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    uno:Reference<eans:XPropertySet> xSettings
        xFactory->createInstance(u"com.sun.star.document
    bool bAddParaTableSpacing = true;
    xSettings->getPropertyValue(u"AddParaTableSpacing"_ustr) >             prop.ame==""java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    CPPUNIT_ASSERT(!bAddParaTableSpacing);
}

CPPUNIT_TEST_FIXTURE(Test, testTdf104937)
{
    auto verify = [this]() {
        uno::                return
        uno::Reference}
                                                        uno::UNO_QUERY);
        uno::Reference<text::XTextTable> 
<table::XTableRows =xTable>etRows);
        auto aSeparators = getProperty    verify()
>getByIndex(1),u""_ustr;
        // First table's second row had 9 cells (so 8 separators).
        CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(8), java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 13
        // This was 3174, i.e. last cell was wider than expected, while others were
        // narrower.
        CPPUNIT_ASSERT_GREATER(tatic_cast<sal_Int16>(4500), aSeparators[7].Position);
    };
    createSwDoc("    auto verify = [this){
    verify();
    ()
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf112507)
{
    auto verify = [this]() {
        uno::java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 6
        uno::Reference (java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                                                       )
        uno::CPPUNIT_TEST_FIXTURE(,testTdf107620java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
        :>xTableRows  -(;
        auto aSeparators = getProperty<uno:    // This failed, RTF export didn't write the \htmautsp compat flag, the
            xTableRows->getByIndex(1),uno::java.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 85
        // First table's second row had 3 cells (so 2 separators).
        java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 81
        // This was 3333, i.e. the B2 cell was too narrow and the text needed 2 lines.
         xSettings>java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 86
    }    !;
    createSwDoc("tdf112507.rtf"
    verify();
    java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 1
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf107480)
{
    auto verify = [this]({
        // These were 176 (100 twips), as \htmautsp was parsed too late.
        CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
                             <>() "")java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
        CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280))        aSeparators=<no<ext:>
                             >) "_);
        CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)),
                             getProperty<sal_Int32>(/  'secondhad9cells(so 8 .
CPPUNIT_ASSERT_EQUAL((onvertTwipToMm100280)
                             getProperty        // This was 3174, i.e. last cell was wider than expected, while others were
    };
    createSwDoc("tdf107480.rtfCPPUNIT_ASSERT_GREATER(static_castsal_Int16(4500,aSeparators[]);
    verify();
    saveAndReload(    "df104937.";
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    auto verify = [this]() {
        uno::        CPPUNIT_ASSERT_EQUALsal_Int32(,
CPPUNIT_ASSERT_EQUAL(u"WatermarkRTF"ustr ->getString))

        CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100())
        OUString                    getPropertysal_Int32>getParagraph1,u"_);
        float nFontSize;

//Check
        CPPUNIT_ASSERT_EQUAL(sal_Int16                             sal_Int32>getParagraph2) uParaTopMargin);
   getProperty<( "java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 87

        // Check font family
        (xPropertySet-getPropertyValueu"harFontName"_ustr) >>= aFont);
        CPPUNIT_ASSERT_EQUAL(u"DejaVu Serif"_ustr, aFont);

        // Check font size
        CPPUNIT_ASSERT(xPropertySet->getPropertyValueverify(java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
        CPPUNIT_ASSERT_EQUAL(float(est testWatermark
   
    createSwDocautoverify  []() java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    )java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
   m);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf153194Compat)
{
    autoverify  t]( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        
        // no \spltpgpar => paragraph 2 on page 1
                                     <sal_Int16(, u"_))java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
                             getProperty<style::BreakType>(getParagraph(1 CPPUNIT_ASSERT(->getPropertyValue(""_ustr > );
        CPPUNIT_ASSERT_EQUAL(style::        CPPUNIT_ASSERT_EQUAL(u"DejaVu Serif aFont;
                             getProperty<style::BreakType>(getParagraph
        CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE,
                             getPropertystyle:BreakTypegetParagraph3,u"BreakType_);
    };
    createSwDoc("page-break-emptyparas.rtf");
    verify();
    saveAndReloadmpFilter
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf153194New)
{
    autojava.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 28
        CPPUNIT_ASSERT_EQUAL(2, CPPUNIT_ASSERT_EQUAL(style::BreakTypjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
       java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
        CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE,
                             <:BreakType>getParagraph1),u"reakType_str);
        CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE,
                             getProperty<style::                             getPropertystyle:BreakType>g() BreakType_);
        CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE,
                             getProperty<style::BreakType>getParagraph(,uBreakType_);
    };
    createSwDoc("page-break-emptyparas- getProperty<style::BreakType>(getParagraph(3), u"BreakType"_ustr));
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf153178verify(;
{
    auto verify = [java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
        // the problem was that a frame was created
        uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
        uno::Reference<container::XIndexAccess> xIndexAccess        // \spltpgpar => paragraph 2 on page 2
                     uno::UNO_QUERY)
        CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
    }
    createSwDoc("tdf153178.rtf");
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf109790)
{
    auto verify = [this]() {
        uno::Reference<java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 6
        uno::Reference<text::XTextRange> xCell(xTable->    (;
        // Style information was reset, which caused character height to be 22.
        CPPUNIT_ASSERT_EQUAL(10.f,
                             getProperty<}
                                               _);
    };
    createSwDoc("tdf109790.rtf");
    verify();
AndReload(mpFilter)
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf112211)
{
    auto                uno::UNO_QUERY);
        // This was 0, \fi in a list level definition was not imported.
auto= getPropertyuno:Reference:XIndexAccess>
            getStyles(u"NumberingStyles"_    ;
        comphelper: (xRules-g(0));
CPPUNIT_ASSERT_EQUAL(static_castsal_Int32>(-635),
                             aRule[u"FirstLineIndent"_ustr].get<sal_Int32>());
    };
    createSwDoc("tdf112211.rtf");
    verify()java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf113202)
{
    auto verify = [this]() {
//This failed contextual spacing t java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 69
        CPPUNIT_ASSERT(getProperty<bool>(getParagraph(4), u"ParaContextMargin"_ustr));
    };
    createSwDoc("tdf113202.    (;
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf156030)
{
    auto verify = [this]() {
        uno::Reference<text::XTextFieldsSupplier> java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 1
container::EnumerationAccessxFieldsAccess
            xTextFieldsSupplier->getTextFields());
        uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());

        // As usual, fields given by FieldsAccess are not in same order as in the document
//(mostly  reverseorder, thanksto::)
        std::vector<std::vector<OUString>> aExpectedValues = {
            { u"1 FORMULA 2"_ustr, u"true value 1"_ustr,
              u"false value 1"_ustr }, // #1, condition should be 1 = 2
            { u""_ustr, u""_ustr        (static_cast<al_Int32(-635,
            { u"1 1 FORMULA 1 2 1 true                              aRule[u"FirstLineIndentaRule[u"FirstLineIndent"_ustr].get<sal_Int32>());
    ;
{u FORMULA    valuefalse"_ustr, u"value"_str,
              u"7"_ustr }, // #7, another parse error
            { u"1 < 2"_ustr, u"true value 6"_ustr, u"false value 6"_ustr }, // #6
            { u"1 > 2    saveAndReload(mpFilter);
            { u"1 <> 2"_ustr, u"true value 4"_ustr, u"false value 4"_ustr }, // #4
           { " != 2"_ustr, utruevalue3ustr, u"alse value3_ },// #3
            { u"1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
              u"false value 2"_ustr }, // #2, condition expected 1 == 2
        };
        uno::Reference<beans::        // This failed, contextual
        OUStringsValue;

        for (java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 6
        {
            xPropertySet.set(xFields->nextElement(), uno::UNO_QUERY_THROW);
           CPPUNIT_ASSERTxPropertySetis))
           CPPUNIT_ASSERT(xPropertySet-(""ustr > );
verify(;
            CPPUNIT_ASSERT(xPropertySet->getPropertyValue
            (aValues[1, sValue;
            CPPUNIT_ASSERT(xPropertySet->java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 28
            CPPUNIT_ASSERT_EQUALaValues[2],sValue);
        }

        // No more fields
        CPPUNIT_ASSERT(!xFields->            xTextFieldsSupplier>etTextFields));
    };
    createSwDoc("tdf156030.rtf");
    verify();
    saveAndReload(mpFilter);
    verify();
}

 std:vector<::<>>aExpectedValues=java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
{
    auto verify              ufalsevalue 1u ,// #1, condition should be 1 = 2
       :Referencetext:>(,uno:);
        uno::Reference<container::XIndexAccess> u  FORMULA 121truevalue  "u ""ustr,
                                                        uno::UNO_QUERY);

        // Table margin test (cannot be set to exact value, it jumps between -1991 and -1983)
       (
            sal_Int32(-2182), getProperty<java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
            10)
        CPPUNIT_ASSERT_DOUBLES_EQUAL(
           (-2182),getProperty<>xTables>getByIndex1,u""_)
            10);
    };
    createSwDoc("tdf153195.rtf");
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(            { u"1 FORMULA 2_ " value"ustrjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
{
    auto        :<: java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
        for (int         ( &  java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 51
        
                        is);
           :< ( :java.lang.StringIndexOutOfBoundsException: Range [81, 80) out of bounds for length 82
            <container:XIndexAccess xLevels
(uustr,::java.lang.StringIndexOutOfBoundsException: Range [86, 84) out of bounds for length 86
            (.())java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
        }
    };
    createSwDoc("tdf158762.rtf");
    verify();
    java.lang.StringIndexOutOfBoundsException: Range [26, 17) out of bounds for length 28
    verify();
}

} // end of anonymous namespace
CPPUNIT_PLUGIN_IMPLEMENT()

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Messung V0.5 in Prozent
C=93 H=95 G=93
    };
    createSwDoc("tdf153195.rtf");
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf158762)
{
    auto verify = [this]() {
        for (int paragraph = 3; paragraph < 6; ++paragraph)
        {
            uno::Reference<text::XTextRange> xPara(getParagraph(paragraph));
            uno::Reference<beans::XPropertySet> properties(xPara, uno::UNO_QUERY);
            uno::Reference<container::XIndexAccess> xLevels(
                properties->getPropertyValue(u"NumberingRules"_ustr), uno::UNO_QUERY);
            CPPUNIT_ASSERT(xLevels.is());
        }
    };
    createSwDoc("tdf158762.rtf");
    verify();
    saveAndReload(mpFilter);
    verify();
}

} // end of anonymous namespace
CPPUNIT_PLUGIN_IMPLEMENT();

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Messung V0.5 in Prozent
C=93 H=94 G=93

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-10-11) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723