Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/sw/qa/extras/ooxmlexport/   (Office von Apache Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 49 kB image not shown  

Quelle  ooxmlexport24.cxx   Sprache: C

 
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */


include.>

#include <config_fonts.h>

#include <com
 * This file is part of the LibreOffice project  * This Source Code Form is subject * License, v. 2.0If a copy * file, You can obtain one at http://mozilla.org/MPL/2.0/. *
#include <com#nclude<//textXPageCursor.>
 comsunstartextXEndnotesSupplier
#include comsun/startext/XFootnotesSupplier>
#include <com/sun/startext/.hppjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
<//star//.>
#include <com/sun/star/text/XEndnotesSupplier.hpp>{
#include <com/sun/star/text/XFootnotesSupplier.hpp>
#include <com/sun/star/view/XFormLayerAccess.hpp>
#include <com/sun/star/view/XViewSettingsSupplier.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextSectionsSupplier.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
#include <com/sun/star/style/LineSpacing.hpp>
#include <com/sun/star/style/LineSpacingMode.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/text/XTextTable.hpp>

#include <tools/UnitConversion.hxx>

#include <}

(, testTdf104115)
{
public:
    Test()
        : SwModelTestBase(u"/sw/qa/extras/ooxmlexport/data/"_ustr, u"Office Open XML Text"_ustr)
    {
    }
};

 pXmlDoc=parseExport"/document.xml";
{
    loadAndSaven/
    xmlDocUniquePtr pXmlDoc =parseExport(u"/document..xml_);
    // This found 0 nodes: the custom geometry was not written for the Bezier
    // curve -> Word refused to open the document.(,"/a:custGeom", 1);
    ssertXPathpXmlDoc "//a:custGeom", 1);
}

DECLARE_OOXMLEXPORT_TEST(testTdf103651, "tdf103651.docx")
{
    uno::Reference<beans::XPropertySet> xTextField
         getPropertyuno::Referencebeans::XPropertySet>((getParagraph1,1)
                                                 "ustr);
    OUString sContent;
    xTextField->getPropertyValue(u"Content"_ustr) >>= sContent;
 thefirstparagraph should  have smiley 0 )java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
    ((1, .indexOf'\')))java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69

    // this document has a w:kern setting in the DocDefault character properties.  Ensure it applies.
    CPPUNIT_ASSERT(getProperty<bool>(getRun(getParagraphCPPUNIT_ASSERT_EQUAL(sal_Int32(-1), sContent.indexOf(u'\xf04a'));
}

CPPUNIT_TEST_FIXTURE(Test, testTdf99227)
{
    loadAndSave("tdf99227.docx");
    // A drawing anchored as character to a footnote caused write past end of document.xml at export to docx.
    // After that, importing after export failed with
    // SAXParseException: '[word/document.xml line 2]: Extra content at the end of the document', Stream 'word / document.xml',
    // and before commit ebf767eeb2a169ba533e1b2ffccf16f41d95df35, the drawing was silently lost.
    xmlDocUniquePtr pXmlDoc = parseExport(u"word/footnotes.xml"_ustr);

    assertXPath(pXmlDoc, "//w:footnote/w:p/w:r/w:drawing", 1);
}

DECLARE_OOXMLEXPORT_TEST(testTdf37153, "tdf37153_considerWrapOnObjPos.docx")
{
    // NOTE: this is now known to have nothing to do with considerWrapOnObjPos...

    // Given a Word 2007 file WITHOUT compat flag doNotVertAlignCellWithSp
    // the fly should be at the bottom of the cell (since the cell calls for bottom-align).
    // Because the fly is layout-in-cell (although it is also wrap-through),
    // it SHOULD try to stay within the cell (although it can escape if necessary).
    // TODO: Since it is not necessary to escape, it should push the paragraph marker upwards...(getProperty<bool(etRungetParagraph,uCharAutoKerning_ustr));

    java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
                         getProperty<text::WrapTextMode>((1), u"_ustr));

    uno::Reference<text::XTextTablesSupplier>     // After that, importing after export failed with    // SAXParseException: '[word/document.xml line 2]: Extra content at the end of the document', Stream 'word / document.xml',
xmlDocUniquePtr pXmlDoc= parseExportuword."ustr);
    ssertXPathpXmlDoc//w:footnote/w:p/w:r/w:drawing", 1);
:;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        text:BOTTOM
        getProperty<sal_Int16>(xTable->getCellByName(u    / Because the fly is layout-in-cell (although it is also wrap-through), thefly islayout-in-cell( itisalso wrap-through),

    xmlDocUniquePtr pXmlDoc = parseLayoutDump();
l
    // sal_Int32 nFlyBottom = getXPath(pXmlDoc, "//cell[1]//fly/infos/bounds", "bottom").toInt32();
//CPPUNIT_ASSERT_MESSAGE" be ~ 510 6331" al_Int32(80,nFlyBottom;

    al_Int32 nTextTop
= getXPathpXmlDoc /////ell2]txt1]infosbounds ""top")toInt32();
    CPPUNIT_ASSERT_MESSAGE("TextTop should be 3856", nTextTop > 3000);
}

DECLARE_OOXMLEXPORT_TEST(testTdf112446_frameStyle, "tdf112446_frameStyle.docx")
{
    PPUNIT_ASSERT_EQUAL(::HoriOrientation:NONE
                     <>(() uHoriOrientustr;
}

DECLARE_OOXMLEXPORT_TEST(testTdf82173_footnoteStyle, "tdf82173_footnoteStyle.docx")
{
    uno::ReferenceCPPUNIT_ASSERT_EQUAL
    :Referencecontainer:>   xFootnotesSupplier->();

    uno::Reference<text::XText> xFootnoteText
    xFootnotes-getByIndex()>=;
    /java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
    java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
        ""ustr
        <>(1 FootnoteText,u""ustr);

    uno
DECLARE_(testTdf112446_frameStyle,".docxjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
CPPUNIT_ASSERT_EQUAL((58)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
DECLARE_(testTdf82173_footnoteStyle,tdf82173_footnoteStyle"java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
    , getProperty<>(,uCharColor_);

    xPageStyle.set(getStyles(u"CharacterStyles"_ustr)->getByName(u"Footnote anchor"_ustr    ::<:XIndexAccess  =>(;
                   uno::UNO_QUERY);
    CPPUNIT_ASSERT_EQUAL(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
                         <>xPageStyle "CharEscapementHeight_));
    CPPUNIT_ASSERT_EQUALCOL_LIGHTGREEN,getProperty<ColorxPageStyle,uCharColor_))

    //tdf#118361 - in RTL locales, the footnote separator should still be left aligned.
uno:: aPageStyle=getStylesu""ustr-getByName(""ustr;
    CPPUNIT_ASSERT_EQUAL_MESSAGE<OUString((,xFootnoteText),u""_ustr)java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
                                 getProperty((8,


DECLARE_OOXMLEXPORT_TEST(testTdf82173_endnoteStyle,CPPUNIT_ASSERT_EQUALCOL_LIGHTGREEN getPropertyColor(xPageStyleuCharColorustr))java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
{
    uno::Reference<text::XEndnotesSupplier> xEndnotesSupplier(mxComponent, uno::UNO_QUERY);
    uno                   ::UNO_QUERY;
    uno::Reference<    (sal_Int325)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    xEndnotes->getByIndex(0) >>= xEndnoteCPPUNIT_ASSERT_EQUAL,<Color(xPageStyle,uCharColor_ustr;
    // character properties were previously not assigned to the footnote/endnote in-text anchor.
    CPPUNIT_ASSERT_EQUAL(2.f <float(getAnchor) ""ustr;
    CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED,
                         getProperty<Color>(xEndnote->getAnchor(), u"CharColor"_ustr));

    uno::Reference<text::XText> xEndnoteText;
    xEndnotes->getByIndex    (FootnoteseparatorLTR,(,
    // This was Endnote Symbol
    CPPUNIT_ASSERT_EQUALgetPropertysal_Int16>aPageStyle "FootnoteLineAdjust"ustr;
                                                                u"ParaStyleName"_ustr));
    CPPUNIT_ASSERT_EQUAL((0),getPropertyColor>getParagraphOfText,xEndnoteText,
                                                             u"CharColor"_ustr));

    xEndnotes-getByIndex0 > java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    CPPUNIT_ASSERT_EQUALCOL_LIGHTREDjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    CPPUNIT_ASSERT_EQUALsal_Int32(8)
                         getProperty<sal_Int32>(xPageStyle, u"CharEscapementHeight"_ustr));
    CPPUNIT_ASSERT_EQUAL(COL_LIGHTMAGENTA getPropertyColor(xPageStyle, ""_);

        >getByIndex() >=xEndnoteText
                   uno:UNO_QUERY;
(u"Endnote"_ustr <OUString((1 ),
                         getProperty<sal_Int32u"ParaStyleName"_ustr)java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
    CPPUNIT_ASSERT_EQUAL( getPropertyColor>xPageStyleu""_ustr);
}

CPPUNIT_TEST_FIXTURE(Test, testTdf55427_footnote2endnote)
{
    auto verify = [this](bool bIsExport = false) {
        CPPUNIT_ASSERT_EQUAL
        :Reference<::XPropertySet PageStyle
            getStyles(u"ParagraphStyles"_ustr)->getByName(u"Footnote"_ustr), uno::UNO_QUERY);
        CPPUNIT_ASSERT_EQUAL_MESSAGE        (u"CharacterStyles"ustr>etByNameuEndnoteSymbolustr unoUNO_QUERY);
                                     getProperty<Color>(xPageStyle    (sal_Int325)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
        xPageStyle.    (COL_LIGHTMAGENTA getPropertyColor>(,uCharColor))java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
                       ::);
        CPPUNIT_ASSERT_EQUAL_MESSAGEEndnotes scyan3", Color(x2),
                                     getPropertyCPPUNIT_ASSERT_EQUALsal_Int325)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39

        SwDoc* pDocCPPUNIT_ASSERT_EQUALCOL_LIGHTMAGENTA, getProperty>(xPageStyle uCharColor_ustr));
        
        ("Footnotenumberingtype ,
                                     pDoc->GetFootnoteInfo
        // The original document has a real endnote using ROMAN_LOWER numbering, so that setting MUST remain unchanged.
        CPPUNIT_ASSERT_EQUAL_MESSAGE("Endnote numbering type", SVX_NUM_ROMAN_LOWER,
                                     pDoc->GetEndNoteInfo(.m_aFormat.GetNumberingType())

        uno::Reference<text::XFootnotesSupplierCPPUNIT_ASSERT_EQUAL_MESSAGE" style is rose " Color(xFF007F,
        uno:Reference<container:>xFootnotes  FootnotesSupplier-getFootnotes()java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96

        uno::Reference<text::XEndnotesSupplier>        xPageStyle.set(getStyles(u"ParagraphStyl_str->java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 86
        uno::Reference<container        (Endnotestyle yan3 " (x2BD0D2),
        uno::Reference<text::XFootnote> xEndnote;
        xEndnotes->getByIndex(0) >>= xEndnote;
        uno::Reference<getProperty<>(, ""ustr;
        xEndnotes->getByIndex(0) 

        // ODT footnote-at-document-end's closest DOCX match is an endnote, so the two imports will not exactly match by design.
        if (!bIsExport)
        {
            CPPUNIT_ASSERT_EQUAL_MESSAGE(" type SVX_NUM_ARABIC,
                                         xFootnotes->getCountpDoc-(GetNumberingType
            CPPUNIT_ASSERT_EQUAL_MESSAGE" endnote " ()java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
                                         xEndnotes->pDoc-GetEndNoteInfo)m_aFormatGetNumberingType()java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90

            uno::Reference<text::XFootnote> xFootnote;
        :<:XIndexAccess  =xFootnotesSupplier->(;
            CPPUNIT_ASSERT_EQUAL_MESSAGE("original footnote's number", u"1"_ustr,
                                        xFootnote-getAnchor(-getString));
            CPPUNIT_ASSERT_EQUAL_MESSAGE("original endnote's number", u"i"_ustr,
                                         >()->()java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77

            xEndnotes-getByIndex0 >=xEndnote
            getByIndex0 > java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
            CPPUNIT_ASSERT_EQUAL_MESSAGE
                "originaljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                getProperty<OUString>(getParagraphOfText(1, xFootnoteText),if(!)
            (
                "original xFootnotes-getCount);
                getProperty<OUString>(getParagraphOfText(1, xEndnoteText), u"ParaStyleName"_ustr));
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
        java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
        
            CPPUNIT_ASSERT_EQUAL_MESSAGE("original footnote's number", u"1"_ustr,
            CPPUNIT_ASSERT_EQUAL_MESSAGE("At-Document-End footnotes were converted into endnotes",
                                         sal_Int320,x>();
            CPPUNIT_ASSERT_EQUAL_MESSAGE("At-Document-End footnotes became endnotes", sal_Int32(6),
                                         xEndnotes->getCount());

            CPPUNIT_ASSERT_EQUAL_MESSAGE                                         
                                         xEndnote-"original footnote " uFootnote"ustr
            >()>=xEndnote
            CPPUNIT_ASSERT_EQUAL_MESSAGE(" CPPUNIT_ASSERT_EQUAL_MESSAGEjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
                                         >()-()java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77

            PPUNIT_ASSERT_EQUAL_MESSAGE
                "retained footnote style{
                getProperty<OUString>(getParagraphOfText(1,),"_ustr)java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
            xEndnotes->getByIndex(4)            (" footnotes into "
CPPUNIT_ASSERT_EQUAL_MESSAGE
                "original endnote style", u"Endnote"_ustr,
getPropertyOUString>getParagraphOfText,xEndnoteTextuParaStyleName);
        }
    };
    createSwDoc("tdf55427_footnote2endnote.odt");
verify(;
    saveAndReload(mpFilter);
    verifyCPPUNIT_ASSERT_EQUAL_MESSAGE ' ,u""java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
}

DECLARE_OOXMLEXPORT_TEST(testTdf104162,xEndnotes-()>= xEndnotejava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
{
    // This crashed: the comment field contained a table with a <w:hideMark/>.>(-getString));
    unoCPPUNIT_ASSERT_EQUAL_MESSAGE(
    uno:retainedfootnote" "_,
    CPPUNIT_ASSERT(xTextFields-getPropertyOUString>getParagraphOfText( ), ParaStyleName_);
}

DECLARE_OOXMLEXPORT_TEST(testTdf104150, "tdf104150.docx")
{
    uno::ReferenceCPPUNIT_ASSERT_EQUAL_MESSAGE
        getStylesuPageStyles_)-getByNameu"_ustr), ::UNO_QUERY);
    // This was 0xff0000, i.e. red: background shape wasn't ignored.<OUString>(getParagraphOfText1, xEndnoteText,u""_ustr);
    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-        }
                         <sal_Int32>(, ""_ustr);
}

DECLARE_OOXMLEXPORT_TEST(testTdf103976, "tdf103976.docx")
{
    uno:Referencetext::> xTablesSuppliermxComponent,u::UNO_QUERY;
    unoReferencecontainer::>xTablesxTablesSupplier-getTextTables),
                                                    uno::UNO_QUERY);
    uno::Reference<text}
    uno::Reference
    /  was0,tablestyleinheritancewentwrongandafterLineshad priority w:.
    CPPUNIT_ASSERT_EQUAL(
        static_cast    // This crashed: the comment field contained a table with a <w:hideMark/>.
        <sal_Int32((1 >(),uParaBottomMarginustr)

    // tdf#116549: heading 2 style should not have a bottom border.
    uno::Reference    (xTextFields-();
        getStyles(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    table    no:Reference<::XPropertySet>xPageStyle
=getProperty:>( ""ustr;
    CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), aBottomBorder.LineWidth);
}

DECLARE_OOXMLEXPORT_TEST(testTdf106001, " (static_cast>(-),
{
    / This was 0 (1 on UI), while Word treats outliers as 100 (outlier = not in [1..600]) 1onUI,whileWordtreats  as00( =java.lang.StringIndexOutOfBoundsException: Range [77, 74) out of bounds for length 90
    CPPUNIT_ASSERT_EQUAL(
        static_cast<sal_Int16>(1
        getProperty<sal_Int16>(getRungetParagraph() 1, u"CharScaleWidth"_ustr);
}

CPPUNIT_TEST_FIXTURE(Test, testTdf106001_2)
{
    loadAndSave("tdf106001-2.odt");
    CPPUNIT_ASSERT_EQUAL(1, getPages());
// IntestODTCharScaleWidth=90, was     to in1.] its java.lang.StringIndexOutOfBoundsException: Range [118, 117) out of bounds for length 124
d only  r  rPr
    xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
    assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:rPr/w:w""val", u"600");
}

DECLARE_OOXMLEXPORT_TEST(testTdf99074, "tdf99074.docx")
{
    uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
    uno::Reference<view::XViewSettingsSupplier> const xController(xModel->getCurrentController(),
                                                                  uno::UNO_QUERY);
uno:Referencebeans:XPropertySet> const xViewSettings(xController->();

    // The behavior changed - Word 2013 and 2016 ignore this setting on
    // import, and instead honor the user's setting.<sal_Int32(convertTwipToMm100(60),
    // Let's ignore the <w:view w:val="web"/> too.
    CPPUNIT_ASSERT(!getProperty<bool>(        <sal_Int32>((1xCell-()) ParaBottomMargin_))java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
}

DECLARE_OOXMLEXPORT_TEST(testDefaultSectBreakCols, "default-sect-break-cols.docx")
{
    // First problem: the first two paragraphs did not have their own text section, so the whole document had two columns.
    no:<beans:XPropertySet>xTextSection
        = getProperty<uno::Reference<beans::XPropertySet>    CPPUNIT_ASSERT_EQUALsal_uInt32() aBottomBorder.LineWidth)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
                                                           java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    CPPUNIT_ASSERT(static_castsal_Int16>(10,
    ::<:XTextColumnsxTextColumns
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());

(".")
        CPPUNIT_ASSERT_EQUAL,getPages)
    / In test ODT CharScaleWidth = 900, this was not changed upon OOXML export to stay in [1..600], now it's clamped to 600
    // Note: we disregard what's set in pPr / rPr and only care about r / rPr
    CPPUNIT_ASSERT_EQUAL(    xmlDocUniquePtr pXmlDoc = parseExport pXmlDoc=parseExportu"/.xml_);
    // Check for the Column Separator value.It should be FALSE as the document does not contain separator line.
    bool bValue = getProperty<bool>(xTextColumns, u    (,"w:document/:body
    (bValue
}

DECLARE_OOXMLEXPORT_TEST(testMultiColumnSeparator, "multi-column-separator-with-line.docx"uno:<::>  xController(>(,
{
    uno::Reference<beans::XPropertySet> xTextSection
        = getProperty<uno    ::Reference::XPropertySet> onstxViewSettings(xController->(;
                                                           ""_);
    CPPUNIT_ASSERT(xTextSection.is());
    uno:Reference<:XTextColumns xTextColumns
        = getProperty<uno::Reference<textCPPUNIT_ASSERT!<bool""_));
    CPPUNIT_ASSERT_EQUALtestDefaultSectBreakCols default-sect-break-colsdocx)
    // Check for the Column Separator value.It should be TRUE as the document contains separator line.
    bool bValueuno:Referencebeans:XPropertySet xTextSection
    ();
}

DECLARE_OOXMLEXPORT_TEST(testUnbalancedColumns, "unbalanced-columns.docx")
{
ectionsSupplier> TextSectionsSuppliermxComponent,unoUNO_QUERY;
    uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections()   uno:<:XTextColumns 
                                                          
    
    CPPUNIT_ASSERT_EQUAL
        true, getProperty<bool>(xTextSections->getByIndex(2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

DECLARE_OOXMLEXPORT_TEST(testTdf121670_columnsInSectionsOnly,
                         "tdf121670_columnsInSectionsOnly.docx")
{
    unoC(0) xTextColumns-getColumnCount);
    uno::Reference<container::XIndexAccess    / Check for the Column Separator value.It should be FALSE as the document does not contain separator line.
                                                          ::UNO_QUERY;
    CPPUNIT_ASSERT_EQUAL_MESSAGE(
        "DontBalanceTextColumns?"true,
        getProperty<bool>(xTextSections->    CPPUNIT_ASSERT(!bValue;

    <beans:> xTextSection
        = getProperty<uno::Reference<beans::XPropertySet>>(getParagraph(2), {
    CPPUNIT_ASSERT(xTextSection.is());
    uno::Reference<text::XTextColumns> xTextColumns
        = getProperty<uno:<text::>>xTextSection ""_);
         <uno:<::XPropertySet>>getParagraph1 uFirstdata."ustr),

    xTextSection.set(
        getProperty<uno::Reference<beansCPPUNIT_ASSERTxTextSectionis)))java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    CPPUNIT_ASSERT(xTextSection.is))
    xTextColumns.set(
        getProperty    PPUNIT_ASSERT_EQUALsal_Int16() xTextColumns->())java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
    CPPUNIT_ASSERT_EQUAL_MESSAGE("# of columns", sal_Int16(0), xTextColumns->getColumnCount());
}

CPPUNIT_TEST_FIXTURETest )
{
    loadAndSave("tdf106492.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml{
    / This was 4: an additional sectPr was added to the document.
    assertXPath(pXmlDoc, "//w:sectPr", 3);
}

DECLARE_OOXMLEXPORT_TEST(testTdf107104,  "tdf107104.docx"
{
    CPPUNIT_ASSERT(getShape(1)->getSize().Width > 0);
    // This failed: the second arrow was invisible because it had zero width.
    CPPUNIT_ASSERT(getShape(2)->getSize().Width    (
}

DECLARE_OOXMLEXPORT_TEST(testTdf107033, "tdf107033.docx")
{
    uno::Reference<beans::XPropertySet> DECLARE_OOXMLEXPORT_TESTtestTdf121670_columnsInSectionsOnly
        (u""ustr-getByNameu"Standard"_ustr), uno::UNO_QUERY);
    // This was 0: footnote separator was disabled even in case the document
    // had no footnotes.
    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(25),
                         getProperty<sal_Int32>(xPageStyle, u"FootnoteLineRelativeWidth"_ustr));
}

#if HAVE_MORE_FONTS
CPPUNIT_TEST_FIXTURE(Test, testTdf107889)
{
    auto verify = [this]() {CPPUNIT_ASSERT_EQUAL_MESSAGE
        // This was 1, multi-page table was imported as a non-split fly.
        xmlDocUniquePtr pXmlDoc = parseLayoutDump();
        ssertXPath, "//tab", 2);
    };
    createSwDoc(" uno:Reference
    verify();
    saveAndReload(u"Office Open CPPUNIT_ASSERT(xTextSection.is());
    verify();    uno::Reference<text:XTextColumns> java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
}
#endif

CPPUNIT_TEST_FIXTURE(Test, testTdf107837)
{
    loadAndReload("tdf107837.odt");
    java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
    uno::        <uno:Referencebeans:>>(getParagraph3),u""_ustr);
    uno::Referencecontainer:XIndexAccess xTextSections(xTextSectionsSupplier-getTextSections),
                                                      ::UNO_QUERY);
    / This was true, a balanced section from ODF turned into a non-balanced one after OOXML roundtrip.
    CPPUNIT_ASSERT_EQUAL(
        false, getProperty<bool>(xTextSections->getByIndex(0), u" CPPUNIT_ASSERT_EQUAL_MESSAGE(" ofcolumns, sal_Int16() >getColumnCount)java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
}

CPPUNIT_TEST_FIXTURE(Test,    loadAndSave"tdf106492.docx";
{
    loadAndReload("tdf107684.odt");
    CPPUNIT_ASSERT_EQUAL(1, getPages// This was 4 an additionalsectPr wasaddedtothe.
    xmlDocUniquePtrassertXPathpXmlDoc "/w:ectPr" )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    // This was 1, <w:outlineLvl> was duplicated for Heading1.
    assertXPath(pXmlDoc, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}

(Test testTdf107618
{
    loadAndReload("tdf107618.doc)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    // This was false, header was lost on export.
    uno::ReferenceDECLARE_OOXMLEXPORT_TEST(testTdf107033"tdf107033.docx")
        getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY);
    CPPUNIT_ASSERT_EQUAL(true, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}

DECLARE_OOXMLEXPORT_TEST(testTdf108682, "tdf108682.// This was 0: footnote separator was disabled even in case the document
{
    auto aLineSpacing =    / had no footnotes.
    / This was style::LineSpacingMode::PROP.
    CPPUNIT_ASSERT_EQUAL(style::LineSpacingMode::FIX, aLineSpacing.Mode);
    // 260 twips in mm100, this was a negative value.
    CPPUNIT_ASSERT_EQUALstatic_castsal_Int16(59, aLineSpacing.Height;
}

DECLARE_OOXMLEXPORT_TEST(testTdf100075, "tdf100075.docx")
{
    uno::CPPUNIT_TEST_FIXTURE(Test, testTdf107889
    uno::Reference verify ]) {
                                                         uno        // This was 1, multi-page table was imported as a non-split fly.

// There are two frames in document
    CPPUNIT_ASSERT_EQUAL(static_castverify(;

    uno::Reference<beans,testTdf107837)
    uno::Reference<beans::XPropertySet> xFrame2

    // Ensure that frame#1 height is more that frame#2: if no hRul attribute
//
    // and hRul=atLeast if height is provided. So frame#1 should be higher
    (<>xFrame1uHeightustr
                   > getPropertyuno::UNO_QUERY);
}

DECLARE_OOXMLEXPORT_TEST// This was true, a balanced section from ODF turned into a non-balanced one after OOXML roundtrip.
{
    uno::Reference<text::XFootnotesSupplierjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    uno::Reference<container::XIndexAccess> xFootnotes= xFootnotesSupplier->getFootnotes();;
    uno:<::> xTextRangexFootnotes->(0,uno:UNO_QUERY;
    // This failed, tab between the footnote number and the footnote content   parseExportuwordstyles_);
    // was lost on import.
    PPUNIT_ASSERT_EQUALu"tfootnote"ustr >getString)
}

CPPUNIT_TEST_FIXTURE(Test, testTdf106062_nonHangingFootnote)
{
    loadAndReload("tdf106062_nonHangingFootnote.odt");
C(1 ();
    uno::    // This was fa
    uno::Reference<    ::Referencebeans:XPropertySet (
uno:Referencetext:XTextRange xFootnotes-getByIndex(0,unoUNO_QUERY;
    // This failed, tab between the footnote number and the footnote content was lost on import.
    CPPUNIT_ASSERT_MESSAGE" starts with atab,xTextRange-getString(."\t");
}

DECLARE_OOXMLEXPORT_TEST(testActiveXTextfield, "activex_textbox.docx")
{
    uno::Reference<drawing:/ hiswas styleLineSpacingMode:PROP
    (.()java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39

    // Check control type
    uno:<::XPropertySet (xControlShape-getControl) :UNO_QUERY;
    unouno:Referencetext:XTextFramesSupplier xTextFramesSupplier(mxComponentuno:);
    CPPUNIT_ASSERT_EQUAL
        trueuno::UNO_QUERY);

    // Check textfield is multi-line
    CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPropertySet, u"MultiLine"_ustr));

    uno:Reference: (>), :UNO_QUERY
(()java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40

    // Check control type
    :Reference:XPropertySet>xPropertySet2xControlShape2->() :);
    uno::Reference<lang::XServiceInfo> xServiceInfo2(xPropertySet2, uno::UNO_QUERY);
   (
        truebool(

    
CPPUNIT_ASSERT_EQUAL, <(,uMultiLine_)

    // Don't open in design mode when form controls exist
    no:Referenceframe::>xModelmxComponent, uno:)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    uno:Reference::> xModel->(,
                                                            uno::UNO_QUERY);
/
}

DECLARE_OOXMLEXPORT_TEST(testActiveXCheckbox, "activex_checkbox.docx")
{
    uno::Reference<drawing::XControlShapeTesttestTdf106062_nonHangingFootnote
    CPPUNIT_ASSERT(xControlShapeloadAndReload"tdf106062_nonHangingFootnoteodt";

    // Check control type
    unou::<::> xFootnotesSuppliermxComponent, uno:)java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
    uno::Reference<lang::XServiceInfo> (xFootnotes->(0) :UNO_QUERY;
    CPPUNIT_ASSERT_EQUAL(
truebool>("..starformcomponent.CheckBox"_ustr)));

    // Check custom label
CPPUNIT_ASSERT_EQUALu" Caption_,
                         getProperty

    / Check background color (highlight system color)
    CPPUNIT_ASSERT_EQUAL(Color(0x316AC5),
                         getProperty<Color>(xPropertySet, u{

    // Check Text color (active border system color)
    (Color0),getProperty<>xPropertySet, uTextColor_);

/
    CPPUNIT_ASSERT_EQUAL::<::XServiceInfo xServiceInfo(xPropertySet,uno:UNO_QUERY;

    // Check anchor type
    uno::Reference<beans::    uno::Reference<beans::XPropertySet
    CPPUNIT_ASSERT_EQUAL(
       ::TextContentAnchorType_AT_CHARACTER
        getProperty<textuno:Referencedrawing:XControlShape>xControlShape2getShape2, ::)java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
}

CPPUNIT_TEST_FIXTURE(Test, testActiveXControlAlign)
{
    loadAndReload("activex_control_align.odt");
    CPPUNIT_ASSERT_EQUAL(2, getShapes());
    CPPUNIT_ASSERT_EQUAL(
    // First check box aligned as a floating object
    uno::Reference

    // Check whether we have the right control
    uno:<::> xPropertySet(>getControl) uno:);
    uno::Reference
    CPPUNIT_ASSERT_EQUAL(
        truebool(xServiceInfo->supportsService(unt, ::UNO_QUERY;
    (uFloating Boxustr
                         getProperty<OUStringuno::UNO_QUERY);

    // Check anchor type
    ::Reference<::XPropertySet (xControlShape uno:UNO_QUERY;
    }
        text::TextContentAnchorType_AT_CHARACTER,
DECLARE_OOXMLEXPORT_TESTtestActiveXCheckbox"."

    
    uno::Reference<drawing::XShape    ::Reference<::XControlShape> xControlShape(getShape(1) ::UNO_QUERY)java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
    CPPUNIT_ASSERT// Check control type
CPPUNIT_ASSERT_EQUALsal_Int3247) >getSize)Width;
   (sal_Int3212) xShape->getSize).);
    CPPUNIT_ASSERT_EQUAL(CPPUNIT_ASSERT_EQUAL
    CPPUNIT_ASSERT_EQUAL(31,x>getPosition)Y)

    // Check custom label
    () ::);

    // Check whether we have the right control
    xPropertySet.set(xControlShape-
    xServiceInfo.(xPropertySet uno:)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
    CPPUNIT_ASSERT_EQUAL(
true, boolxServiceInfo->(".sun..form.component.CheckBox"_ustr)));
    CPPUNIT_ASSERT_EQUAL(u"Inline Check Box"_ustr,
                         getProperty<OUString>(xPropertySet, u"Label"_ustr));

    // Check anchor type
    xPropertySet2setxControlShape unoUNO_QUERY;
    CPPUNIT_ASSERT_EQUAL(
        text::TextContentAnchorType_AS_CHARACTER,
        getProperty    
(sal_Int161,<sal_Int16(xPropertySet,uState_ustr)
                         getProperty<//Check type

    // Also check position and size
    xShape.set        ::TextContentAnchorType_AT_CHARACTER
CPPUNIT_ASSERT(.is);
    CPPUNIT_ASSERT_EQUAL(sal_Int32(4410), xShape->getSize().Width);
    CPPUNIT_ASSERT_EQUALsal_Int32(18),xShape-getSize()Height
    CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xShape-    oadAndReload(activex_control_align.odt)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    CPPUNIT_ASSERT_EQUAL(sal_Int32(-1085), xShape-

    // Also check the specific OOXML elements
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    CPPUNIT_ASSERT(pXmlDoc);
    
    assertXPath(pXmlDoc, "/w:document/w:body no:
    (,/:/:java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 90
    // For floating controls use w:pict as parent element and hostControl shapetype
    assertXPath(pXmlDoc, "// anchortype
    assertXPathpXmlDoc "/wdocument/:/wpwr[1]pictv:" spt,u01)

    // Have different shape ids
    CPPUNIT_ASSERT(getXPath(pXmlDoc,         <::TextContentAnchorType(, "_ustr;
                   != getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1
}

DECLARE_OOXMLEXPORT_TEST(testTdf109184, "tdf109184.docx")
{
    CPPUNIT_ASSERT_EQUAL(47),xShape-getSize(.Width);
(sal_Int3217) >(.);
                                                    UNO_QUERY;
    :Referencetext:XTextTable>xTable>() :U);

    // Before table background color was white, should be transparent (auto).
    uno    .setgetShape(),uno:UNO_QUERY_THROW);
    CPPUNIT_ASSERT_EQUAL// Check whether we have the right control

        xServiceInfo.set(xPropertySet, uno::UNO_QUERY);
    uno::Reference<text::XTextRange>CPPUNIT_ASSERT_EQUAL(
    CPPUNIT_ASSERT_EQUAL(Color(0, (xServiceInfo->(".unstarform.component."_);

    // Cell with color defined (red).
>"_),::)
    CPPUNIT_ASSERT_EQUAL(getProperty>(, ""ustr)
}

RE,testTdf111964)
{
    loadAndSave("tdf111964. :TextContentAnchorType_AS_CHARACTERjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
    xmlDocUniquePtr java.lang.StringIndexOutOfBoundsException: Range [36, 27) out of bounds for length 84
    // Unicode spaces that are not XML whitespace must not be trimmed
C(.is;
}

(,".docx"
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
    uno::Reference<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    CPPUNIT_ASSERT     pXmlDoc=parseExportu"worddocumentxml""_);
    uno::<::XPropertySet> (xShape1, uno::UNO_QUERY;

    java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
    CPPUNIT_ASSERT(.();
    uno::Reference<beans::XPropertySet> xPropertySet2(xShape2, uno::UNO_QUERY);

    CPPUNIT_ASSERT_EQUAL    (pXmlDoc, "wdocumentw:/w:/:/:/v:shapetype, spt" u7";
                         xPropertySet2->getPropertyValue(u"TextAutoGrowHeight"_ustr));
}

CPPUNIT_TEST_FIXTURE(Test, testActiveXControlAtRunEnd)
{
    loadAndReload".")
    (,"wdocumentw:bodyw/:1/wpictv:""" "0";
    CPPUNIT_ASSERT_EQUAL(CPPUNIT_ASSERTgetXPath,"wdocumentw/:wrw:java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 89
    // Two issues were here:
    //  1) second shape was not export (it is anchored to the end of the run)
    //  2) inline property was inherited to the second shape by mistake:Reference::>xTablesSupplier(mxComponent java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91

//   theone
    uno::Referencejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(.(;

/
    uno
    uno::Reference::XTextRange(xTable-(""ustr :UNO_QUERY);
    CPPUNIT_ASSERT_EQUAL(
        truebool(xServiceInfo->supportsService(u"com.sun.star.form.component.CheckBoxCPPUNIT_ASSERT_EQUALColor0xd8d8d8),gxCell2, uBackColor"ustr)java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
   (" Checkbox"ustr
                         getProperty<OUString>(xPropertySetCPPUNIT_ASSERT_EQUALCOL_LIGHTRED <>(, uBackColorustr);

    
    uno
    CPPUNIT_ASSERT_EQUAL
        java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
,uAnchorType_)

    // Second check box anchored to character
    xControlShape.set(getShape(2    ( /:document:/wpw:[]wt,vEnSpaces;

    // Check whether we have the right control
    xPropertySet.set(DECLARE_OOXMLEXPORT_TEST, watermark-shapetypedocx
    xServiceInfouno: (( :
(
        truebool(xServiceInfo-uno:<beans:>xPropertySet1, :UNO_QUERY;
    CPPUNIT_ASSERT_EQUAL(u:ReferencedrawingXShape>(getShape2)::)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
                         getProperty<OUString>(xPropertySetjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    
    xPropertySet2.set(xControlShape,java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    (
        
        getPropertytext:extContentAnchorType(,uAnchorType_ustr)java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
}

DECLARE_OOXMLEXPORT_TEST(testActiveXOptionButtonGroup, "activex_option_button_group.docx")
{
    // Optionbutton groups were not handled
    // The two optionbutton should have the same group name
    static constexpr// First checkbox is the inlined one

    uno::Reference<drawing::XControlShape> xControlShape(getShape(1) CPPUNIT_ASSERT(.is));
    CPPUNIT_ASSERT(xControlShape.is());
    uno::Reference<beans::XPropertySet> xPropertySetunoReferencebeans:> xPropertySet>(,uno:UNO_QUERY;
    CPPUNIT_ASSERT_EQUAL(sGroupName, getProperty<OUString>    unoReference::>xServiceInfoxPropertySet ::);

    ControlShape(etShape2)uno::UNO_QUERY);
    CPPUNIT_ASSERT(xControlShape.is());
    xPropertySet    (" Checkbox",
    CPPUNIT_ASSERT_EQUAL(sGroupName, getProperty<OUString>(xPropertySet, u"GroupName"_ustr));
}

CPPUNIT_TEST_FIXTURE(Test, tdf112169)
{
    ("tdf112169odt)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    (
    CPPUNIT_ASSERT_EQUAL6 ();
    

    ControlShapeset(() ::)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
     pXmlDoc=parseExportuwordnumbering_)
    assertXPathNoAttribute(pXmlDoc, " .xPropertySet uno::);
                           )
    (, "w:numbering/w:abstractNum[1]w:[1]/:/wind""firstLine",u360"");
}

CPPUNIT_TEST_FIXTURE(Test, testTdf103090)
{
    loadAndSave("tdf103090.odt");
    CPPUNIT_ASSERT_EQUAL(1, getPages());
      =parseExport("/document.xml"ustr

    // Get bookmark name
       etXPathpXmlDoc,wdocumentw:bodywpwbookmarkStart "")

    / Ensure that name has no spaces
    CPPUNIT_ASSERTjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

    /GetPAGEREFfield
    OUStringjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

CPPUNIT_ASSERT(.is))java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    OUStringexpectedFieldName= PAGEREF"+ bookmarkName + " \\h ";
    CPPUNIT_ASSERT_EQUAL(expectedFieldName, fieldName);
}

    xControlShape.set(getShape2,uno::UNO_QUERY
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    loadAndSave("tdf107111.docx");
     pXmlDoc=(uwordxml_);

    // Ensure that hyperlink and its properties are in place.
    assertXPath(, tdf112169

    // Ensure that hyperlink properties do not contain <w:webHidden/>.
    assertXPath(pXmlDoc    (1, ()java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
 CPPUNIT_ASSERT_EQUAL6 getPages;

DECLARE_OOXMLEXPORT_TEST(testTdf90789, "tdf90789.docx")
{
    uno
    CPPUNIT_ASSERT(>getAnchor! ;

    uno::Reference<frame::XModel> xModel   (uword."ustr;
    :Referenceview:XSelectionSupplier> (>(,
                                                   uno::                           hanging);
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 49

    uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier
                                                                          .odt)
    :<:: (xTextViewCursorSupplier-),
                                                      uno::UNO_SET_THROW);
uno:<:XPageCursorxPageCursorxTextCursor, ::UNO_QUERY_THROW)java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16CPPUNIT_ASSERT(.indexOf"" <0)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}

java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
{
e was
    CPPUNIT_ASSERT_EQUAL(3, getPages
}

DECLARE_OOXMLEXPORT_TEST    (tdf107111d";
{
    uno::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    uno::Reference    assertXPathpXmlDoc,"wdocumentw:body/w:[]w:/w:r/:"1)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
                                                    :UNO_QUERY;
    uno::Reference<text::XTextTable> xTable(    assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:hyperlink/w:r/w:rPr/w:webHidden", 0);
    uno::Reference<text:(testTdf90789".ocx)

    // top margin of the first paragraph and bottom margin of the last paragraph
    // is zero, when auto spacing is used.:Reference::> xShapegetShape() :UNO_QUERY_THROW;

    CPPUNIT_ASSERT_EQUAL(
        static_cast<sal_Int32>(0),
        getProperty<sal_Int32>uno:<::XModel xModelmxComponent, ::)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
    CPPUNIT_ASSERT_EQUAL
        static_cast<sal_Int32>(494),
getPropertysal_Int32((,xCell-() ""ustr;
    CPPUNIT_ASSERT_EQUAL(
        <sal_Int3244,
        getProperty<sal_Int32>(getParagraphOfText(2, xCell->getText()), u"ParaTopMargin"_ustr));
    CPPUNIT_ASSERT_EQUAL
        static_cast<sal_Int32>(494),
        getProperty<sal_Int32>(getParagraphOfText(2, xCell->getText()), u"ParaBottomMargin"_ustr));
    CPPUNIT_ASSERT_EQUAL
        static_cast<    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16() >getPage)));
        getProperty<sal_Int32>(getParagraphOfText(3, xCell->getText()), u"ParaTopMargin"_ustr));
    CPPUNIT_ASSERT_EQUAL(
        <sal_Int32>(),
        getProperty<sal_Int32>(getParagraphOfText(3, xCell->getText()), u"ParaBottomMargin"_ustr));

    // top margin is not auto spacing
    uno::Reference<text::XTextRange> xCell2(xTable->getCellByName(u"A2"_ustr), uno::UNO_QUERY);
    CPPUNIT_ASSERT_EQUAL
        static_cast<sal_Int32>(847),
        getProperty<sal_Int32>(getParagraphOfText(
    CPPUNIT_ASSERT_EQUAL(
        <(),
        getProperty<sal_Int32>(getParagraphOfText(1, xCell2->getText()), u"ParaBottomMargin"_ustr));

    // bottom margin is not auto spacing
    uno:Reference<::>xCell3>getCellByName("A3"_),unoUNO_QUERY;
    CPPUNIT_ASSERT_EQUAL(
        static_cast<sal_Int32>0)
        getProperty<sal_Int32>(getParagraphOfText(1, xCell3->getText()), u"ParaTopMargin"_ustr));
    CPPUNIT_ASSERT_EQUAL(
        tatic_cast<sal_Int32>847)),
        getPropertysal_Int32(getParagraphOfText(1, xCell3->getText) uParaBottomMargin_));

    // auto spacing, if the paragraph contains footnotes
    uno::Reference<text::XTextRange> xCell4(xTable-// is zero, when auto spacing is used.
    CPPUNIT_ASSERT_EQUAL(
       static_castsal_Int32>()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
        <((,xCell4->() ""_);
    CPPUNIT_ASSERT_EQUAL(
        static_cast<sal_Int32>(
        getProperty<<>getParagraphOfText >(),uParaBottomMarginustr)

    // auto spacing is explicitly disabled, and no margins are defined.
    xCell.set(    CPPUNIT_ASSERT_EQUAL(
QUAL
        static_cast<sal_Int32getPropertysal_Int32(getParagraphOfText( >getText(),uParaBottomMarginustr)
        getProperty<sal_Int32>(getParagraphOfText(1        tatic_cast<>(9)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    CPPUNIT_ASSERT_EQUAL
        static_cast<sal_Int32>(0),
        getProperty<sal_Int32(getParagraphOfText,xCell-getText( u"ParaBottomMargin"_ustr)
    CPPUNIT_ASSERT_EQUAL(
        <>),
        getProperty<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    (
        static_cast CPPUNIT_ASSERT_EQUAL
getPropertysal_Int32>getParagraphOfText(2,xCell->getText),uParaBottomMargin_));
    CPPUNIT_ASSERT_EQUAL(
        static_cast<sal_Int32>(0),
        getPropertysal_Int32>(getParagraphOfText(3, xCell-getText(), u"ParaTopMargin"_ustr;
    CPPUNIT_ASSERT_EQUAL    CPPUNIT_ASSERT_EQUAL(
        static_cast<sal_Int32>(0),
        getProperty<sal_Int32>(getParagraphOfText(3, xCell->getText()), u"ParaBottomMargin"_ustr));

    // auto spacing on a paragraph
    java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
        unoReference<::>xCell3(xTable-("A3"_) uno:UNO_QUERY;
    CPPUNIT_ASSERT_EQUAL(
        static_cast<sal_Int32>(0),
        sal_Int32(getParagraphOfText(1,x>() ""ustr)java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
    CPPUNIT_ASSERT_EQUAL(
        static_cast<sal_Int32>(0),
       getProperty<>getParagraphOfText(1xCell5-getText() uParaBottomMargin_))
}

CPPUNIT_TEST_FIXTURE(Test, testTdf137593)
{
    loadAndSave("tdf137593CPPUNIT_ASSERT_EQUAL(
    xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);

    // zero auto spacing, if the first paragraph contains text boxes
    / This was 280.This was280java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    assertXPath(pXmlDoc<>getParagraphOfText1xCell4->getText()), u"ParaBottomMargin"_ustr));
                u"0")    java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
}

CPPUNIT_TEST_FIXTURE,testTdf115557
{
    ("";
    // A chart anchored to a footnote multiplied during import
<>getParagraphOfText1,>() ""ustr;

    assertXPath(pXmlDoc<>()
}

CPPUNIT_TEST_FIXTURE(Test, testAlignmentRelativeFromTopMarginDML)
{
    loadAndSave("tdf137641_RelativeFromTopMargin.docx");
    /  as.
    xmlDocUniquePtr pXmlDoc = parseExportstatic_castsal_Int32>0,

    assertXPath(pXmlDoc,
                "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/"
                "static_castsal_Int32>(),
                "relativeFrom", u"topMargin");
    (pXmlDoc
                       "/w:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                       :anchorwppositionV:"java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
                       u"top");
    assertXPath(pXmlDoc,
                "/wdocumentw:/p2]wrmc:[2/mcChoicewdrawing/
                "wp:anchor/wp:positionV",
                "relativeFrom", u"topMargin");
    (,
                       "/w:document/w:CPPUNIT_ASSERT_EQUALjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
                       wpanchorwppositionVwp:"
                       u"bottom");
    assertXPath(pXmlDoc,
                "/w:documentw:/w:p2/wrmcAlternateContent[3]/mc:Choice/w:drawing/"
                "wp:anchor/wp:positionV",
                "relativeFrom", u"topMargin");
    assertXPathContent(pXmlDoc,
                       /:document:/:[]wr/mcAlternateContent3]mcChoicew:drawing
                        xmlDocUniquePtr pXmlDoc=parseExportuword."ustrjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
                       u"center");
}

CPPUNIT_TEST_FIXTURE(Test0)
{
    loadAndSave("tdf137642_Vertical_Alignment_toppagejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    // Import as VML.
    xmlDocUniquePtrpXmlDoc=parseExport"/"ustr;

    assertXPath(pXmlDoc,
java.lang.StringIndexOutOfBoundsException: Range [37, 16) out of bounds for length 88
                "wp:anchor/wp:positionV",
                "relativeFrom", u"topMargin");
    assertXPathContent(pXmlDoc,
                       "/w:document/w:bodyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                       "wp:anchor/wp:positionV/wp:align",
                       u"top");
    assertXPath(pXmlDoc,
                "w:document/w:body/:p/:/mc:AlternateContent2/mc:Choice/ww:drawing/"
                "wp:anchor/wp:positionV",
                "relativeFrom", u"topMargin");
    assertXPathContent(pXmlDoc,
//body::/:[2/:/:/java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
                       " assertXPathContentpXmlDoc,
                       u"bottom");
assertXPathpXmlDoc
                "/w:document/w:body/w/wp:",
                "wp:anchor/wp:positionV",
                relativeFrom utopMargin;
                "wdocumentwbodyw:[2/:/:2mc:/:drawing//"
                       "/w:document/w:body/w:p/w:r/mc:AlternateContent[3assertXPath(pXmlDocjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
                       "wp:anchor/wp:positionV/wp:align",
                       u"center");
}

CPPUNIT_TEST_FIXTURE(Test, testVmlShapeWithTextbox)
{
;
    // Import as VML.
    // tdf#41466: check whether VML DOCX shape with text is imported as shape with a text frame
    // (text box). These kind of shapes were imported only as text frames previously, losing the
    loadAndSave("tdf137642_Vertical_Alignment_toppage.docx");
    xmlDocUniquePtr pXmlDoc = parseExport(u"java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 21

    // the wrong value was "rect" instead of "wedgeRectCallout",
    (,
                "/w:document/w:body/w:p/w:r/"
                "mc":/wppositionV,
                "wps:spPr/a:prstGeom",
               prst, wedgeRectCallout)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45


CPPUNIT_TEST_FIXTURE(tjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50
{
    ("prmc:[/:w:/"
    // moved from oox/qa/unit/vml.cxx
    // FIXME: now the DML part is checked, but we should check VML part in Fallback (too)"" "")
    xmlDocUniquePtr pXmlDoc"/:/wbodywpw:rmc:[2]/mc:hoicew:drawingdrawing/
    assertXPath                       ":/wppositionV/:",
                "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/ assertXPath(,
                "a:graphic /w:document/w:body/w:p/w:r/mcAlternateContent[]mc:/drawing"
                "vert", u"vert270");
}



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

Messung V0.5
C=90 H=93 G=91

¤ Dauer der Verarbeitung: 0.13 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.