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.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 87
            getStyles(u"uno:<beans:XPropertySet>xHeading2(
        <boolxHeading1 ");
        uno::Reference<beans::XPropertySet>         CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>uIsAutoUpdateu))java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
                (;
        CPPUNIT_ASSERT_EQUALf,getProperty<ool(xHeading2, uIsAutoUpdate_ustr);
    };
   createSwDoc(sautoupd.)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    verify();
    saveAndReloadmpFilter
    erify()java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}

, testHyphauto)
{
    auto verify createSwDoc(hyphautortf)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
        CPPUNIT_ASSERT_EQUAL
    };
    createSwDoc(CPPUNIT_TEST_FIXTURE(,testHyphparjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    verify();
     /java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testHyphpar)
{
    auto    (hyphpar.";
        // Hyphenation was enabled for all 3 paragraphs, but it should be disabled for the 2nd one.    verify)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
        (false <ool>getParagraph2,"ParaIsHyphenation"_str)
    };
    createSwDoc("hyphpar.rtf");
    verify();
    saveAndReload(mpFilter);
              getProperty<drawing:FillStyle(getParagraph1) "FillStyle"ustr)java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
}

CPPUNIT_TEST_FIXTURE(Test,testTdf108955
{
    auto verify = [this]() {
        CPPUNIT_ASSERT_EQUAL(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 6
                             verify)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
        
        CPPUNIT_ASSERT_EQUAL(Color(0xffff99),
                            <Color(getParagraph() u"illColor"ustr;
    };
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
    verify();
    saveAndReload(pFilter);
    verify();
}

      uno:Reference<::IndexAccess> xTablesxTextTablesSupplier-getTextTables)java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
{
    auto verify = [this]() {
       :Reference<:XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno:UNO_QUERY)
        uno::eference<ontainer:XIndexAccess xTables(xTextTablesSupplier-getTextTables(),
                                                        uno::UNO_QUERY);
        uno::CPPUNIT_ASSERT_EQUALstatic_cast<al_Int32()java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
        uno::Reference<table::XTableRows> xTableRowsjava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 90
        // This was 2, i.e. the second table had 3 cols, now 2 as expected.
        .)
                             java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 6
                    (0,Tjava.lang.StringIndexOutOfBoundsException: Range [84, 83) out of bounds for length 90
());
    };
    createSwDoc("java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 1
    
        unoReferencebeans:>xRungetRungetParagraph),2,::NO_QUERY
        xRun->set("HyperLinkURL_, uno:Any(OUString()
}

CPPUNIT_TEST_FIXTURE(Test, testHyperlinkWithoutURL)
{
     aStreammaTempFile.GetURL) StreamMode:EADjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
        OString aData(static_cast<const char*>(aMemoryStream.GetData()), aMemoryStream.GetSize());
    uno:Reference::PropertySet> (getRun(etParagraph1) 2,unoUNO_QUERY;
    xRun->setPropertyValue(u"HyperLinkURL"_ustr, uno::AnyCPPUNIT_ASSERT_EQUAL(static_cast>-) aDataindexOf"HYPERLINK")
CPPUNIT_TEST_FIXTURE(,testTdf92521
    SvMemoryStream aMemoryStream;java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    SvFileStream aStream(maTempFile    // But there wasn't, so this was 1.
    aStreamReadStream(aMemoryStream;
    OString aData(static_cast<const char*>(aMemoryStream}
e. weexported  hyperlink withanempty URL.
    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1), aData.indexOf("HYPERLINK"));
}

        // Without
{
    loadAndReload("tdf92521.odt"       
    // There should be a page break that's in the middle of the document: right after the table.  getPropertyuno:<::PropertySet>(getParagraph1,
    // But there wasn't, so this was 1.
    CPPUNIT_ASSERT_EQUAL(2, getPages());
}

CPPUNIT_TEST_FIXTURE(Test, testTdf114309)
{             getPropertyuno:Referencetext:TextColumns>(, u"TextColumns"ustr);
    auto verify = [this]        CPPUNIT_ASSERT_EQUALsal_Int16(2) xTextColumns>getColumnCount);
/ Withoutthefix inplace thistest  havefailed with
        // - the property is of unexpected type or void: TextSection
autoxTextSection =getPropertyuno:Reference<:XPropertySet>(getParagraph(1,
                                                                             
                 java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 93
=uno:eferencetextX>(TextSection ""ustr;
        CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
    };
    createSwDoc("tdf114309.rtf");
    verify();
    saveAndReload(mpFilter);
    verify(;
}

        // This was 0 separator line was not 
{
    auto verify = [this]() {
autoxTextSection = <no:Referencebeans:XPropertySet>getParagraph(),
                                                                             
        auto xTextColumns
            = getProperty    createSwDoc"df94043.rtf")
        // This was 0, the separator line was not visible due to 0 width.);
       CPPUNIT_ASSERT_EQUALstatic_castsal_Int32>2,
          ( _);

        auto verify = )
}
");
    verifyuno:eference<ontainer (-createEnumeration)java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
    saveAndReload(mpFilter);
verify(;
}

CPPUNIT_TEST_FIXTURE(Test, testTdf94377)
{
            
        uno::Reference<// 2) direct formatting  were  exported  thiswas12( document default.
        uno            f <float>getRun(getParagraphOfText1, , u"Asdf10"ustr) 1),
            xTextFieldsSupplier->getTextFields());
        uno::Reference<            12.f, getProperty>getRungetParagraphOfText2,xText asdf12_ustr) 1)java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
        auto xText  getPropertyuno:Reference<text:XText>xPropertySet,u"java.lang.StringIndexOutOfBoundsException: Range [89, 87) out of bounds for length 95
        // This failed, as:
       // 1) multiple paragraphs were not exported, so the text was "Asdf10asdf12".
        // 2) direct formatting of runs were not exported, so this was 12 (the document default).
        CPPUNIT_ASSERT_EQUAL(
            10.   auto   [his){
                                     u"CharHeight"        nIndex0;
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
xt(2 ,"u),)java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
ujava.lang.StringIndexOutOfBoundsException: Range [51, 49) out of bounds for length 58
    ;
                /was,3 paragraphofToC itsbottom paragraphmargin.
    verify)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
saveAndReloadm;
    verify();
}

CPPUNIT_TEST_FIXTURE".";
{
    auto verify = [this]() {
        bool bFoundsaveAndReload);
        int nIndex = 0;
         (bFound)
        {
            uno::Reference<text:java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
              that\ java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 56
nue

=;
            // This was 0, 3rd paragraph of ToC lost its bottom paragraph margin.
            java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 13
                                 java.lang.StringIndexOutOfBoundsException: Range [25, 20) out of bounds for length 40
        }
    };
    createSwDoc( java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 28
    (;
    saveAndReload(mpFilter);
    verify();uno:eference<:XDocumentPropertiesSupplier xDocumentPropertiesSupplier
}

CPPUNIT_TEST_FIXTURE(Test, testPageBackgrounduno:Referencedocument:> xDocumentProperties
{
    auto verify = [this]() {
                uno::Reference<beans::XPropertyContainer> xUserDefinedProperties<:XPropertyContainer>xUserDefinedProperties
        :Reference<beans:XPropertySet xPageStyle(
            getStyles(u"PageStyles"_ustr)->getByName/ Thisresulted in  beans:UnknownPropertyException
        CPPUNIT_ASSERT_EQUAL(Color(0x92D050),                              getPropertyOUString(, "Company"_str);
    sam)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
createSwDocpbackground";
    verify();
    saveAndReload      =this( 
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf96175)
{
    auto verify = [this]() {
        // The problem that a user defined property named "Company" was lost on export._strjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
uno:Reference:XDocumentPropertiesSupplierxDocumentPropertiesSupplierjava.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
                        mxComponent, uno::java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 6
uno:eferencedocument:XDocumentProperties>xDocumentProperties
            = xDocumentPropertiesSupplier->getDocumentPropertiessaveAndReload)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        CPPUNIT_TEST_FIXTURE(est,testCustomDocProps
            = java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 28
        / Custom document properties were not improved, this resulted in a beans::UnknownPropertyException.
        (""ustr,
                            getProperty<>xUserDefinedProperties "Company_ustr))java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
    }
    createSwDoc("           xDocumentPropertiesSupplier-getDocumentProperties();
    verify();
        :Reference<eans:XPropertyContainerxUserDefinedProperties
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testRedlineCPPUNIT_ASSERT_EQUAL(
{
    verify  [this( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        CPPUNIT_ASSERT_EQUAL                xUserDefinedProperties,
            u"Rebecca Lopez"_ustr,
            getProperty<OUString        CPPUNIT_ASSERT_EQUALjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
        CPPUNIT_ASSERT_EQUAL(
            u"Dorothy Jones"_ustr,
getParagraph2,2) "edlineAuthor"_str);
    };
    createSwDoc("redline.rtf");
    verify();
    saveAndReload(mpFilter        CPPUNIT_ASSERT_EQUAL(42.,getProperty<>(xUserDefinedProperties ""ustr)
        
}

CPPUNIT_TEST_FIXTURE(Test, testCustomDocProps)
{
    auto verify = [this]() {
        // Custom document properties were not improved, this resulted in a beans::UnknownPropertyException.
                :DateTimeaDate getProperty<til:DateTime>xUserDefinedProperties, "d_)java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
            mxComponent, uno::UNO_QUERY);
        uno::<::XDocumentProperties>
            = xDocumentPropertiesSupplierCPPUNIT_ASSERT_EQUAL>30 )
        uno:(3,(java.lang.StringIndexOutOfBoundsException: Range [78, 77) out of bounds for length 92
             (;
        saveAndReload;
            u"2016-03-08T10:55:18,531376147"_ustr,
            getPropertyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                xUserDefinedProperties,
                u"urn:bails:IntellectualProperty        ::Referencecontainer:XNameAccess>  =getStyles(u""ustr)java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
        CPPUNIT_ASSERT_EQUAL(unoR<:XTextViewCursorSupplier xTextViewCursorSupplier
            -getCurrentController) :UNO_QUERY;
                             ,
                              ":bailsIntellectualProperty:Authorization:topValidity"ustr)java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
        // Test roundtrip of numbers. This failed as getProperty() did not find "n".->jumpToLastPage(
CPPUNIT_ASSERT_EQUAL(.,getPropertydoublexUserDefinedProperties,u"_str);
        // Test boolean "yes".
        CPPUNIT_ASSERT(getProperty<            :NumberingType:CHARS_UPPER_LETTER_N
           "no".
                // The second s restart this0

/java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
        util::                             <sal_Int32(getParagraph2,u"ageNumberOffset");
        CPPUNIT_ASSERT_EQUAL(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 32
        CPPUNIT_ASSERT_EQUAL(:narrowing<al_uInt16>1,.)
SSERT_EQUALo3tl:narrowing<al_uInt16>30, aDateDay;

        // Test real number.
        CPPUNIT_ASSERT_EQUAL(.14 getProperty<double>xUserDefinedProperties,u""ustr;
    };
    createSwDoc("custom-java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 1
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE uno:: ,:;
{
   auto  ]){
unoR<ontainer: =(P"ustr)
        uno::        :Reference<text:XPageCursor xCursorxTextViewCursorSupplier>getViewCursor(,
        uno::Reference<                                                  uno:UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
            xModel>getCurrentController) uno::UNO_QUERY);
        uno::Reference<text::        // The second page's numbering typewas style:NumberingType:RABIC.
                                                  uno            style:NumberingType:CHARS_LOWER_LETTER_N
xCursor-jumpToLastPage)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
OUStringpageStyleName=getPropertyOUString>xCursor, u"ageStyleName"_java.lang.StringIndexOutOfBoundsException: Range [86, 85) out of bounds for length 87
        // The second page's numbering type: this was style::NumberingType::ARABIC.
        CPPUNIT_ASSERT_EQUAL(
            style::NumberingType::CHARS_UPPER_LETTER_N
            getProperty<sal_Int16CPPUNIT_TEST_FIXTURE(est testPgnucrm
        // The second page's restart value: this was 0.auto   [this]){
        CPPUNIT_ASSERT_EQUAL(sal_Int32()java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
getProperty<>ustr)
    };
    createSwDoc("tdf65642.rtf");
    verify();
    saveAndReload(mpFilter);
    verify(xModel>) :;
}

java.lang.StringIndexOutOfBoundsException: Range [25, 20) out of bounds for length 40
{
    auto verify = [this]() {
        :Reference::NameAccess =getStylesu""_str)
        uno::Reference        CPPUNIT_ASSERT_EQUAL
       :Reference<ext:XTextViewCursorSupplierxTextViewCursorSupplier
xModel->etCurrentController) uno:UNO_QUERY;
        uno::Reference}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
                                                   verify);
        xCursor->jumpToLastPage();
        OUString
        CPPUNIT_TEST_FIXTURETest testPgnlcrm)
        CPPUNIT_ASSERT_EQUAL(
            style::NumberingType::java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 1
            getProperty<uno:eferencecontainer:NameAccess xPageStyles=getStyles("PageStyles"_ustr);
    };
    createSwDoc(rtf);
    verify();
   (pFilter;
    verify();
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 87
{
    auto
        uno::Reference<container::
:frame::Model (mxComponent :UNO_QUERYjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
 xTextViewCursorSupplier(
            xModel->getCurrentController(), uno::java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 6
        uno::Referenceverify()
                                                  unosaveAndReloadmpFilter;
        java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 0
        OUString pageStyleName = {
/java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
        CPPUNIT_ASSERT_EQUAL(
            style::        uno::Reference<container>xPageStyles=getStyles(""ustr;
            getProperty<sal_Int16>(uno::Reference<text::XTextViewCursorSupplier(
    };
    createSwDoc("pgnucrm.rtf");
    verify();
    saveAndReload(pFilter;
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testPgnlcrm)
{
    auto verify = [this]() {
        uno::Reference<container::XNameAccess>        xCursor>jumpToLastPage(;
       uno:Reference<::Model>xModel(mxComponent,uno:UNO_QUERY);
        uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(
            xModel->getCurrentController(), uno::UNO_QUERY);
        uno:java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 41
uno::NO_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
            style::NumberingType::ROMAN_LOWER,
            getProperty<sal_Int16>(PageStyles>getByName(ageStyleName, "umberingType"_str)
    };
    createSwDoc("java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 6
    verify();
    saveAndReload(mpFilter;
    verify();
}

CPPUNIT_TEST_FIXTURE(Testjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
    auto verify = [this     verify= [his]) {
<container:XNameAccess xPageStyles=getStyles(""ustr;
                :Reference<ext:XTextContent xBookmark(
       uno:Reference<text::XTextViewCursorSupplierxTextViewCursorSupplier
             // This was empty, bookmark in table wasn't imported correctly.
uno:Reference<:XPageCursor>xCursorxTextViewCursorSupplier-getViewCursor)java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
    createSwDoc"tdf98806.";
        xCursor->jumpToLastPage();
        OUString pageStyleName(;
        // The second page's numbering type: this was style::NumberingType::ROMAN_LOWER.mpFilter)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        CPPUNIT_ASSERT_EQUAL(
style:umberingType:ARABIC,
            getProperty<sal_Int16>(java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 1

        / 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(2, u"    SvStream*pStream=maTempFile.(StreamMode:READ);
        CPPUNIT_ASSERT_EQUAL(, java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 49
       }
    createSwDoc("pgndec.rtf");
    verify(;
    saveAndReload(mpFilter (Index! 1)
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf98806)
{
    auto verify = [this]() {
        uno::Reference<text::            CPPUNIT_ASSERT(sRemaining(\hich) ! -;
        uno::java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
            xBookmarksSupplierCPPUNIT_TEST_FIXTURETest,testTdf103925)
        // This was empty, bookmark in table wasn't imported correctly.
CPPUNIT_ASSERT_EQUAL(u"_ustr,xBookmark->etAnchor)>());
    };
    createSwDoc("tdf98806.rtf");
    verify();
    saveAndReloadCPPUNIT_ASSERT_EQUAL(alse,
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf61901)
{
    createSwDoc(tdf61901.rtf)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    (mpFilter)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
    // Test the file directly, as current RTF import gives the correct font name with and without the fix.
empFileGetStreamStreamMode:READ;
    OString sLine;java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    while :>2 :java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
    {
        sal_Int32        :t:  getParagraphOfText,xCell>getText()java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
        if (nIndex != 
        {
/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
            OString sRemaining = sLine.copy(nIndex)                             <>xParagraph,"ParaLeftMargin");
            CPPUNIT_ASSERT(sRemaining.indexOf("\\hich}
        }
    }
}

(,testTdf103925)
{
    auto verify = [this]()java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        // This was true, \animtext0 resulted in setting the blinking font effect.
        CPPUNIT_ASSERT_EQUAL(false,
                     <bool(((1,1,uCharFlash_str;
    };
    createSwDoc(tdf103925.tf)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    verify);
                -getPropertyValue(u"_),uno:UNO_QUERY)
);
}

        for :PropertyValue &prop :aProps)
{
        verify = [this]( {
        uno::return
        uno::java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 9
        uno::Reference<text::XTextRange;
        // This was 2103, implicit 0 as direct formatting was ignored on the
        // paragraph (and the style had this larger value).(tdf104085rtf)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
        CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),    (;
                             java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
    };
    createSwDoc("tdf104228.rtf");
    verify)
    saveAndReload(uno::Reference<text (-getCellByNameu"") :;
    verify(;
}

        // This
{
 verify ( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        uno::Reference<text::XTextRangegetProperty>(,u""ustr)
  :ReferencebeansXPropertySet>(xPara uno:UNO_QUERY;
        uno::Reference<containercreateSwDoc"rtf";
            properties->getPropertyValue(    );
        uno::Sequence<beans::java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 13
        xLevels(,testLeveljcCenterjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
        for (beans::PropertyValue const&        / Tests that \leveljc1 is mapped to Adjust=Center for a numbering rule.
        {
ifp. ="BulletCharjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
                return;
        }
        CPPUNIT_FAIL("no BulletCharuno:Sequence<:PropertyValue aProps;
    ;
            for : &prop:java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
    verify();
    saveAndReload(mpFilter);
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 13
}

CPPUNIT_TEST_FIXTURE(Test, testTdf113550)
{
    auto verifyreturnjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
        uno::ReferenceCPPUNIT_FAIL(noAdjust property";
        uno    ;
uno:<:X>xParagraph=getParagraphOfText1, xCell>()java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
        // This was 2501, 0 as direct formatting was ignored on the paragraph (and)
        // the style had this larger value).
        CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
                             getProperty{
    };
"tdf113550";
    verify();
    saveAndReload(       
    verify();


Test java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
{
    auto verify     (hyperlinktargetrtfjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
        // Tests that \leveljc1 is mapped to Adjust=Center for a numbering rule.;
        uno::Reference<}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        uno::Reference<java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 1
                // This failed
        uno    // original bugdoc resulting in 2 pages instead of 1.
        xLevels>(0 > ;
        for (beans::PropertyValue const& prop    :<:>(
java.lang.StringIndexOutOfBoundsException: Range [56, 9) out of bounds for length 9
if(rop. =Adjust)
            {
                sal_Int16 nValue = 0;
                CPPUNIT_ASSERT(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
                CPPUNIT_ASSERT_EQUAL(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
;
            }
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
        CPPUNIT_FAIL("no Adjust property");

    createSwDoc("        uno::Reference:>xTableRows  -g();
    verify()
    saveAndReload(            xTableRows-1) TableColumnSeparators"_)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    verify();
}

(java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 86
{
]()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        // This was empty, hyperlink target was lost on import.saveAndReloadmpFilter)
        CPPUNIT_ASSERT_EQUAL
                                                                   java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    };
    createSwDoc("hyperlink-target.rtf");
   verify(;
    saveAndReload(mpFilter);
     uno::UNO_QUERY)
}

Test testTdf107620)
{
    loadAndReload("tdf107620.docx");        uno:Reference<table::XTableRows xTableRows =xTable-getRows(
    // This failed, RTF export didn't write the \htmautsp compat flag, the
    // original bugdoc resulting in 2 pages instead of 1.
    :Reference<lang::MultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
    uno::Reference<beans::XPropertySet> xSettings(
        xFactory->createInstance(u"com.sun.star        CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), aSeparators.getLength());
    bool bAddParaTableSpacing = true;
   xSettings-getPropertyValue(u"AddParaTableSpacing"_ustr) >>= bAddParaTableSpacing;
    CPPUNIT_ASSERT(bAddParaTableSpacing);
}

CPPUNIT_TEST_FIXTURE(Test,
{
    auto verify = [this]() {
        uno::Reference<text:java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        uno::Reference<container:{
                                                        [this]( java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        uno::Reference<text::XTextTable> getPropertysal_Int32>getParagraph1,uParaTopMargin"ustr);
        uno::Reference<table::XTableRows> xTableRows = xTable->getRows();
        auto   getPropertyu::Sequence<:TableColumnSeparator>(
            xTableRows->getByIndex(1), u"                             getProperty<sal_Int32(getParagraph(1, uParaBottomMargin"ustr)java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
       /Firsttable'  row had 9 cells (so   8 separators)
        CPPUNIT_ASSERT_EQUAL        CPPUNIT_ASSERT_EQUALsal_Int32(onvertTwipToMm100(),
        // This was 3174, i.e. last cell was wider than expected, while others were
        // narrower.
        CPPUNIT_ASSERT_GREATER<>4500) aSeparators7.Position;
    };
createSwDoc(tdf104937rtf);
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf112507)
{
    auto verify = [this]() {
        uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
        uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
                                                        uno::UNO_QUERY);
        uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
        uno::Reference<table::XTableRows> xTableRows = xTable->getRows();
        auto aSeparators = getProperty<uno::Sequence<text::TableColumnSeparator>>(
            xTableRows->getByIndex(1), u"TableColumnSeparators"_ustr);
        // First table's second row had 3 cells (so 2 separators).
        CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), aSeparators.getLength());
        // This was 3333, i.e. the B2 cell was too narrow and the text needed 2 lines.
        CPPUNIT_ASSERT_GREATEREQUAL(5000, aSeparators[1].Position - aSeparators[0].Position);
    };
    createSwDoc("tdf112507.rtf");
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf107480)
{
    auto verify = [this]{
        // These were 176 (100 twips), as \htmautsp was parsed too late.
        (sal_Int32()
                             getProperty        ("WatermarkRTF_,xShape()
        (sal_Int32convertTwipToMm100280)
                             <(() u"ParaBottomMargin_str)java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
                /Check transparency
                             getProperty<sal_Int32>(2), u""_ustr);
                                  <sal_Int16>xShape,uFillTransparence"_ustr));
                             getProperty<sal_Int32>(getParagraph(2), u"ParaBottomMargin"_ustr));
    };CPPUNIT_ASSERT(xPropertySet>("java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 87
    createSwDoc("tdf107480.rtf");
    verify();
    saveAndReload(mpFilter);
    (;
}

CPPUNIT_TEST_FIXTURET, )
 };
     verify=this]() {
        uno::Reference<text::XTextRange>verify(;
        CPPUNIT_ASSERT_EQUAL(u saveAndReload(pFilter;

        uno::java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        OUString aFont;
        float  =[his( {

// Check transparency
        CPPUNIT_ASSERT_EQUAL(        
getProperty>xShape,FillTransparence"ustr);

        // Check font family
        CPPUNIT_ASSERTxPropertySet>getPropertyValueuCharFontName_)>=aFontjava.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
"_ustr, )java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58

        // Check font size
        CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u                             <:reakType>(() "ustr)java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
        CPPUNIT_ASSERT_EQUAL(float(66),     ();
    };
    createSwDocjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    verify();
    saveAndReload(mpFilter     verify = [this]() {
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf153194Compat)
{
    auto verify = [this]() {
        CPPUNIT_ASSERT_EQUAL(2, getPages());
        // no \spltpgpar => paragraph 2 on page 1
        e_NONE,
                             getProperty<style::BreakType>(getParagraph(1), u"BreakType" // \spltpgpar => paragraph 2 on page 2
        CPPUNIT_ASSERT_EQUAL                             getPropertystyle:(( uB"_)java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
                             <:>(etParagraph2,u""ustr)java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
        CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE,:(() ""ustr)java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
                            java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 96
    };
    createSwDoc("page-break-emptyparas.java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 28
    }
    saveAndReload(mpFilter);
    verify(;
}

CPPUNIT_TEST_FIXTURE(Test, testTdf153194New)
{
    auto verify = [this]() {
        CPPUNIT_ASSERT_EQUAL(2, getPages());
        // \spltpgpar => paragraph 2 on page 2
        CPPUNIT_ASSERT_EQUAL(style::                                        :UNO_QUERY)
                             getProperty<style::BreakType>    }
        CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE,
                             java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 28
        CPPUNIT_ASSERT_EQUAL(style::java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 41
                             getProperty<style::java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 28
    };
    createSwDoc("page-break-emptyparas-spltpgpar.rtf");
verify)
    saveAndReload        // Style information was reset, which caused character height to be 22.
    verify();
}

CPPUNIT_TEST_FIXTURE u"CharHeight"_str)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
{
    auto verify = [this]() {
        )
        uno::Reference<java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        uno::Reference<container
                                              );
        CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount         xRules  <:<container:XIndexAccess>(
    }
    createSwDoc        ::equenceAsHashMapaRule->etByIndex0
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf109790)
{
    auto         <java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 58
        uno::java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 6
        uno    )
        // Style information was reset, which caused character height to be 22.
        CPPUNIT_ASSERT_EQUAL(10.f,
                             getProperty<java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 41
                                                u"         failed,contextual in 4hparagraph was lost.
    };
    createSwDoc    ;
verify)
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTUREjava.lang.StringIndexOutOfBoundsException: Range [25, 20) out of bounds for length 41
{
    auto verify = [thisX> (
        // This was 0, \fi in a list level definition was not imported.

            getStylesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        comphelper::         ( in order, thanks  SwModifyAdd
CPPUNIT_ASSERT_EQUAL<>-)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
                             java.lang.StringIndexOutOfBoundsException: Range [75, 73) out of bounds for length 78
    }
    createSwDoc("tdf112211             u"11  12 1true 7 _java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
    verify();
java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 28
    verify();
}           u"! "ustr "  "_str uf value "ustr },

CPPUNIT_TEST_FIXTURE(Test, testTdf113202)
{
    auto verify = [this]() {
 spacing in 4th paragraph was lost.
        CPPUNIT_ASSERT(getProperty<bool>(getParagraph sValue;
    };
    createSwDoc("tdf113202        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
     (.();
    saveAndReload(CPPUNIT_ASSERT-getPropertyValueuCondition_)>=sValue
    (;
}

CPPUNIT_ASSERT_EQUALaValues1] sValue)
{
    auto verify = [this]() {
        uno::Reference(2 
        uno::Reference<containerjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            -g());
        uno::Reference<java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 6

        // As usual, fields given by FieldsAccess are not in same order as in the document
        // (mostly in reverse order, thanks to SwModify::Add)
       :vectorstdvectorOUString  ={
            { u"1 FORMULA 2"_ustr, u"true value 1"_ustr,
              u" 1"_str} // #1, condition should be 1 = 2
            { u""_ustr, u" uno::<text:XTextTablesSupplier>xTextTablesSuppliermxComponent :UNO_QUERY);
            { "11FORMULA1     8fal_str,use_java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
              u"value 8"_ustr }, // #8, nonsense in field params
            { u"1 1 FORMULA 1 2 1 true value 7 false"CPPUNIT_ASSERT_DOUBLES_EQUAL
              u"7"_ustr }, // #7, another parse error
            { u"1 < 2"_ustr            10;
            { u"1 > 2"_ustr,sal_Int322182 sal_Int32(-() LeftMarginustr,
            { u"1 <> 2"_ustr, u"java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 6
            { u"    java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 13
 FORMULA"_str,utrue  2_,
              u"false value 2"_ustr }, // #2, condition expected 1 == 2
       };
        uno:Reference<eans:XPropertySet>xPropertySet;
        OUString sValue;

forconst auto& aValues:aExpectedValues)
        {
            xPropertySet.set(xFields->nextElement{
CPPUNIT_ASSERT(xPropertySet.is());
            CPPUNIT_ASSERT(xPropertySet->getPropertyValue(u            uno:Referencebeans::XPropertySet> properties(Para,uno:UNO_QUERY);
            uno::Reference:>xLevels(
            CPPUNIT_ASSERT(                properties->getPropertyValue"NumberingRules"_ustr) unoUNO_QUERY);
            CPPUNIT_ASSERT_EQUAL(aValues[1]            CPPUNIT_ASSERTxLevelsis));
            java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 9
            saveAndReload(mpFilter);
        }

        // No more fields
        CPPUNIT_ASSERT()
    };
    createSwDoc("tdf156030.rtf");
    verify();
    saveAndReload(mpFilter);
    verify();
}

CPPUNIT_TEST_FIXTURE(Test, testTdf153195)
{
    auto verify = [this]() {
        uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
        uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(),
                                                        uno::UNO_QUERY);

        // Table margin test (cannot be set to exact value, it jumps between -1991 and -1983)
        CPPUNIT_ASSERT_DOUBLES_EQUAL(
            sal_Int32(-2182), getProperty<sal_Int32>(xTables->getByIndex(0), u"LeftMargin"_ustr),
            10);
        CPPUNIT_ASSERT_DOUBLES_EQUAL(
            sal_Int32(-2182), getProperty<sal_Int32>(xTables->getByIndex(1), u"LeftMargin"_ustr),
            10);
    };
    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.16 Sekunden  ¤

*© 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

letze Version des Elbe Quellennavigators


Jenseits des Üblichen ....

Besucher

Besucher

Statistik
#Sources=1127926
#Domains=2039723