/* -*- 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/.
*/
// 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());
}
// 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());
}
// 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());
}
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 ist noch experimentell.