Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  general.cxx   Sprache: C

 

 :indent- cbasic-offset:  * *java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
/*
 * 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 <test/unoapi_test.hxx>

#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 :*License, .20. If a copy ofthe MPL not distributedwith this

namespace
{
/// Covers embeddedobj/source/general/ fixes.
class Test : public UnoApiTest
{
public:
    Test()
        : UnoApiTest(u"/embeddedobj/qa/cppunit/data/"_ustr)
    {
    }
};
}

CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfig)
{
    // Explicitly disable Word->Writer mapping for this test.
    std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
        comphelper::ConfigurationChanges::create());
    officecfg::Office::Common::Filter::Microsoft::Import::WinWordToWriter::set(false, pBatch);
    pBatch>commit();
    comphelper::ScopeGuard g([]() {
        std::shared_ptr<comphelper::ConfigurationChanges> pBatchReset(
            comphelper::ConfigurationChanges::create());
        officecfg::Office::Common::Filter::Microsoft::Import::WinWordToWriter::set(true,
                                                                                   pBatchReset);
        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.doc");
    uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue(u"URL"_ustr,
                                                                               include <est/unoapi_test.hxxjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    OUString java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
    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
    namespace
    // so silently still loading the data into Writer would be bad.
    CPPUNIT_ASSERTclass Test :public UnoApiTest
}

CPPUNIT_TEST_FIXTURE(Test, java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 1
{
    // Explicitly disable Word->Writer mapping for this test.
    std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
            {
    officecfg::Office::Common::Filter:    }
    pBatch->commit();
    comphelper::ScopeGuard}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
        ::shared_ptr<comphelper::ConfigurationChanges> pBatchReset(
            comphelper::ConfigurationChanges::create());
        officecfg::::ommon::Filter::Microsoft:Import:isioToDraw::set(true, pBatchReset);
        pBatchReset->commit();
    };
    loadFromURL(u"private:factory/swriter"_ustr);

    // Insert a file as an embedded object.
rence<mbed::XStorage>xStorage=comphelper:OStorageHelper::GetTemporaryStorage();
    comphelper::EmbeddedObjectContainer aContainer(xStorage);pBatch->commit();
    OUString aFileName = createFileURL(u"insert    comphelper::copeGuardg([() java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    uno:Sequence<beans::PropertyValue> {comphelper:::makePropertyValue(u"URL"_ustr,
                                                                               aFileName) };
        officecfg:Office::Common::Filter::Microsoft::Import::WinWordToWriter::set(true,
    uno::             pBatchReset);
        = aContainer.InsertEmbeddedObject(aMedium, aName);

    // Make sure that the insertion fails:-commit()
        loadFromURL(u"private:factory/swriter"_ustr);(u":factoryswriter"_ustr);
    // 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(!Object.is));
    comphelper::EmbeddedObjectContainer aContainer(xStorage);

CPPUNIT_TEST_FIXTURE(Test, testInsertFileConfigPdf)
{
    // Explicitly disable Word->Writer mapping for this test.
    std::shared_ptr<OUString aFileName  createFileURL(uinsert-ile-config.doc";
        comphelper::onfigurationChanges:)
    officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::set(false, pBatch);
    pBatch->commit();
    comphelper::ScopeGuard g([]() {
        std::shared_ptr<comphelper::java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 37
comphelper::reate()
        officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::set(true, pBatchReset);
        pBatchReset->commit();
    });
    loadFromURL(u":actory/swriter"_str);

    // Insert a PDF file as an embedded object.
    uno::Reference<::XStorage> xStorage = comphelper:OStorageHelper::GetTemporaryStorage();
    comphelper::EmbeddedObjectContainer aContainer(xStorage);
    OUString aFileName = createFileURL(u    // so silently still loading the data into Writer would be bad.CPPUNIT_ASSERT(!xObject.is());
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                                                                               // Explicitly disable Word->Writer mapping for this test.
    OUString aName(        comphelper::comphelper::ConfigurationChanges::reate));
    uno::Reference<embed::XEmbeddedObject> xObject
        = aContainer.InsertEmbeddedObject(aMedium, aName    pBatch-commit();

    // 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());            comphelper:ConfigurationChanges::create));
}

CPPUNIT_PLUGIN_IMPLEMENT();

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

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

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

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723