Kaydet (Commit) 9ee69cbd authored tarafından Zolnai Tamás's avatar Zolnai Tamás

glTF export: Use plural folder names

Change-Id: If17628395ede512c00b666efc5511d9711edfb5a
üst 7eceffef
......@@ -260,7 +260,7 @@ bool Embed3DModel( const uno::Reference<frame::XModel>& xModel,
xSBD->getDocumentStorage(), uno::UNO_QUERY_THROW);
// Model storage
const OUString sModel("Model");
const OUString sModel("Models");
uno::Reference<embed::XStorage> const xModelStorage(
xStorage->openStorageElement(sModel, embed::ElementModes::WRITE));
......
......@@ -727,7 +727,7 @@ void SdFiltersTest::testMediaEmbedding()
// First object is a glTF model
SdrMediaObj *pModelObj = dynamic_cast<SdrMediaObj*>( pPage->GetObj( 2 ));
CPPUNIT_ASSERT_MESSAGE( "missing model", pModelObj != NULL);
CPPUNIT_ASSERT_EQUAL( OUString( "vnd.sun.star.Package:Model/jeep/jeep.json" ), pModelObj->getMediaProperties().getURL());
CPPUNIT_ASSERT_EQUAL( OUString( "vnd.sun.star.Package:Models/jeep/jeep.json" ), pModelObj->getMediaProperties().getURL());
CPPUNIT_ASSERT_EQUAL( OUString( "model/vnd.gltf+json" ), pModelObj->getMediaProperties().getMimeType());
// Check the case when experimental mode is disabled
......@@ -743,7 +743,7 @@ void SdFiltersTest::testMediaEmbedding()
// If glTF is not supported, then the fallback image is imported
SdrGrafObj *pGrafic = dynamic_cast<SdrGrafObj*>( pPage->GetObj( 2 ));
CPPUNIT_ASSERT_MESSAGE( "Could not load glTF fallback image", pGrafic != NULL);
CPPUNIT_ASSERT_EQUAL( OUString( "vnd.sun.star.Package:Model/Fallback/jeep.png" ), pGrafic->GetGrafStreamURL());
CPPUNIT_ASSERT_EQUAL( OUString( "vnd.sun.star.Package:Models/Fallbacks/jeep.png" ), pGrafic->GetGrafStreamURL());
// Second object is a sound
SdrMediaObj *pMediaObj = dynamic_cast<SdrMediaObj*>( pPage->GetObj( 3 ));
......
......@@ -3206,7 +3206,7 @@ static void lcl_StoreJsonExternalsAndFallback(
{
// Fallback storage
const uno::Reference<embed::XStorage> xFallbackTarget(
xModelsTarget->openStorageElement(OUString("Fallback"), embed::ElementModes::WRITE));
xModelsTarget->openStorageElement(OUString("Fallbacks"), embed::ElementModes::WRITE));
uno::Reference< io::XStream > xPictureStream(
xFallbackTarget->openStreamElement( sModelName + ".png", embed::ElementModes::WRITE ), uno::UNO_QUERY_THROW );
......@@ -3225,7 +3225,7 @@ static void lcl_StoreJsonExternalsAndFallback(
xFallbackTransaction->commit();
}
const OUString sFallbackURL( sUrlPath.copy(0,sUrlPath.lastIndexOf("/")) + "/Fallback/" + sModelName + ".png");
const OUString sFallbackURL( sUrlPath.copy(0,sUrlPath.lastIndexOf("/")) + "/Fallbacks/" + sModelName + ".png");
rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sFallbackURL );
rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment