Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/embeddedobj/qa/cppunit/   (LibreOffice Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 5 kB image not shown  

Quellcode-Bibliothek general.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 * -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil;-offset:4-- */
  ,v 2.0.If copy  the was   
 * file,    -java.lang.StringIndexOutOfBoundsException: Range [21, 18) out of bounds for length 21
 */


#t>

#include <com/sun/star/embed/XStorage.hpp>

#include <comphelper/embeddedobjectcontainer.hxx>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/scopeguard.hxx>
#include <comphelper/storagehelper.hxx>
#include <officecfg/Office/Common.hxx>

using namespace ::com:    :Reference:java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 50


{
/// Covers embeddedobj/source/general/ fixes.
  java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 30
{
public:
    Test()
java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 59
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
;
}

stdjava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 70
{
    officecfgOffice:::::Vjava.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 98
    )
    java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 49
    officecfg<   :java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 97
    java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 21
    : ] {
        std::shared_ptr<comphelper::ConfigurationChanges> pBatchReset:aMedium{ :java.lang.StringIndexOutOfBoundsException: Range [80, 78) out of bounds for length 91
            comphelper::ConfigurationChanges::create());
        :Office:Common::java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 88
                                                                      
        pBatchReset>);
    });
    loadFromURLprivate:/java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 49

    // Insert a file as an embedded object.
        !.(;
    java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 61
    ="-.doc)
    uno:::onfigurationChanges:create();
                                                                               java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
    OUString aName(u"Object 1"_ustr);
    uno::Reference<embed::XEmbeddedObject> xObject
        = aContainer.            :ConfigurationChanges::reate())java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56

    // Make sure that the insertion fails:
uprivate:ujava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
    // 2) this is non-Windows, so OLE embedding is not an optionembed:: xStorage= :java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 97
       
    java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 34
}

CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfigVsdx)
{
    // Explicitly disable Word->Writer mapping for this test.
    std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
        ::();
        ::java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 50
    >java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 21
    comphelper:// 1) the user explicitly requested that the data is not loaded into Writer
        std: java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
            ::reate()java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        pBatchReset->commit();
    });
    loadFromURL(u"private:factory/swriter"_ustr);

    // Insert a file as an embedded object.
    uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
    comphelper::EmbeddedObjectContainer aContainer(xStorage);
    OUString aFileName = createFileURL(u"insert-file-config.vsdx");
    uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue(u"URL"_ustr,
                                                                               aFileName) };
    OUString aName(u"Object 1"_ustr);
    uno::Reference<embed::XEmbeddedObject> xObject
        = aContainer.InsertEmbeddedObject(aMedium, aName);

    // Make sure that the insertion fails:
    // 1) the user explicitly requested that the data is not loaded into Writer
    // 2) this is non-Windows, so OLE embedding is not an option
    // so silently still loading the data into Writer would be bad.
    CPPUNIT_ASSERT(!xObject.is());
}

CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfigPdf)
{
    // Explicitly disable Word->Writer mapping for this test.
    std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
        comphelper::ConfigurationChanges::create());
    officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::set(false, pBatch);
    pBatch->commit();
    comphelper::ScopeGuard g([]() {
        std::shared_ptr<comphelper::ConfigurationChanges> pBatchReset(
            comphelper::ConfigurationChanges::create());
        officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::set(true, pBatchReset);
        pBatchReset->commit();
    });
    loadFromURL(u"private:factory/swriter"_ustr);

    // Insert a PDF file as an embedded object.
    uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
    comphelper::EmbeddedObjectContainer aContainer(xStorage);
    OUString aFileName = createFileURL(u"insert-file-config.pdf");
    uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue(u"URL"_ustr,
                                                                               aFileName) };
    OUString aName(u"Object 1"_ustr);
    uno::Reference<embed::XEmbeddedObject> xObject
        = aContainer.InsertEmbeddedObject(aMedium, aName);

    // Make sure that the insertion fails:
    // 1) the user explicitly requested that the data is not loaded into Writer
    // 2) this is non-Windows, so OLE embedding is not an option
    // so silently still loading the data into Writer would be bad.
    CPPUNIT_ASSERT(!xObject.is());
}

CPPUNIT_PLUGIN_IMPLEMENT();

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

Messung V0.5 in Prozent
C=91 H=91 G=90

¤ 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.0.5Bemerkung:  ¤

*Bot Zugriff






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.