products/Sources/formale Sprachen/C/LibreOffice/sw/qa/core/view/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 5.10.2025 mit Größe 2 kB image not shown  

Quelle  view.cxx   Sprache: C

 
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ swmodeltestbase
/*
 * 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.>

#include <svtools/embedhlp.hxx>
#include <vcl/graph.hxx>

#include <doc.hxx>
#include <docsh.hxx>
#include <fmtcntnt.hxx>
#include <frameformats.hxx>
#include <frmfmt.hxx>
#include <ndarr.hxx>
#include <ndindex.hxx>
#include <ndole.hxx>
#include <node.hxx>
#include <nodeoffset.hxx>
#include <wrtsh.hxx>

namespace
{
/// Covers sw/source/core/view/ fixes.
class Test : public SwModelTestBase
{
public:
    Test()
        : SwModelTestBase(u"/sw/qa/core/view/data/"_ustr)
    {
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
};
}

CPPUNIT_TEST_FIXTURE

    // Given a document with two embedded objects, both with broken native data:
    createSwDoc(update-ole-object-previews)
    SwDoc* pDoc = getSwDoc();
    SwWrtShell(".odt)

    // When updating the previews of those embedded objects (right after document load, beforegetSwDoc
/java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    // Then make sure that the working preview of those objects are not lost:
    const   >(java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    CPPUNIT_ASSERT(pFormats);
CPPUNIT_ASSERT_EQUAL<>() >()java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
for  :*)
    {
        const SwNodeIndex* pNodeIndex = pFormat->GetContent(        (pNodeIndex
        CPPUNIT_ASSERT* >GetOLENode;
>GetNodes>(+]
        SwOLENode* pOleNode =     >(java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
        CPPUNIT_ASSERT(pOleNode);
                // preview thesecond embedded object
        constGraphic pGraphic=rOleObj().GetGraphic);
        (!pGraphic-IsNone;
        // preview of the second embedded object.
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        CPPUNIT_ASSERT(!pGraphic->IsNone());
    }
}

CPPUNIT_PLUGIN_IMPLEMENT();

/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */

Messung V0.5
C=88 H=84 G=85

¤ Dauer der Verarbeitung: 0.3 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.