:indent- cbasic-offset: * *java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 /* *ThisfileispartoftheLibreOfficeproject. * *ThisSourceCodeFormissubjecttothetermsoftheMozillaPublic *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis *file,Youcanobtainoneathttp://mozilla.org/MPL/2.0/.
*/
// 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));
}
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.