diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-06-11 12:37:15 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-06-12 21:43:36 +0200 |
commit | e8fcf1153fd93b4f8155da0d571935125367a59b (patch) | |
tree | fcecc233812c2d29bc3e449fced4aa32c5ee281f | |
parent | 653bac184f579524bc25a9f40281763a736ae6fd (diff) |
Change glTF mime type: {application -> model}/vnd.gltf+json
There is no an accepted mime type for glTF models yet, so
follow collada's mime type: model/vnd.collada+xml.
Change-Id: I1e23a95dbb0caea781dade819f8e08235cb5c1dc
-rw-r--r-- | avmedia/source/inc/mediamisc.hxx | 2 | ||||
-rw-r--r-- | sd/qa/unit/data/media_embedding.odp | bin | 4068424 -> 4068415 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/sdview4.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 2 |
6 files changed, 6 insertions, 5 deletions
diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx index 06e40665cc76..3a9fa0cd1ddb 100644 --- a/avmedia/source/inc/mediamisc.hxx +++ b/avmedia/source/inc/mediamisc.hxx @@ -46,7 +46,7 @@ class ResMgr; #define AVMEDIA_MIMETYPE_COMMON "application/vnd.sun.star.media" #if HAVE_FEATURE_GLTF -#define AVMEDIA_MIMETYPE_JSON "application/vnd.gltf+json" +#define AVMEDIA_MIMETYPE_JSON "model/vnd.gltf+json" #endif diff --git a/sd/qa/unit/data/media_embedding.odp b/sd/qa/unit/data/media_embedding.odp Binary files differindex e70300edba59..b27bbaef8cb4 100644 --- a/sd/qa/unit/data/media_embedding.odp +++ b/sd/qa/unit/data/media_embedding.odp diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index f4ebef2393c3..b6a6c8cb15e4 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -713,6 +713,7 @@ void SdFiltersTest::testMediaEmbedding() { SvtMiscOptions().SetExperimentalMode(true); ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/media_embedding.odp")); + xDocShRef = saveAndReload( xDocShRef, ODP ); SdDrawDocument *pDoc = xDocShRef->GetDoc(); CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); @@ -724,7 +725,7 @@ void SdFiltersTest::testMediaEmbedding() 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( "application/vnd.gltf+json" ), pModelObj->getMediaProperties().getMimeType()); + CPPUNIT_ASSERT_EQUAL( OUString( "model/vnd.gltf+json" ), pModelObj->getMediaProperties().getMimeType()); // Check the case when experimental mode is disabled xDocShRef->DoClose(); diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index e698e6457996..7b64cc8af556 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -310,7 +310,7 @@ SdrMediaObj* View::Insert3DModelURL( if (!bRet) { return 0; } } - SdrMediaObj* pRetObject = InsertMediaObj( sRealURL, "application/vnd.gltf+json", rAction, rPos, rSize ); + SdrMediaObj* pRetObject = InsertMediaObj( sRealURL, "model/vnd.gltf+json", rAction, rPos, rSize ); avmedia::MediaItem aItem = pRetObject->getMediaProperties(); aItem.setLoop(true); pRetObject->setMediaProperties(aItem); diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 0597ada5694c..acccb67a0e93 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -3275,7 +3275,7 @@ void XMLShapeExport::ImpExportMediaShape( OUString const persistentURL = lcl_StoreMediaAndGetURL(GetExport(), xPropSet, aMediaURL, sMimeType); #if HAVE_FEATURE_GLTF - if( sMimeType == "application/vnd.gltf+json" ) + if( sMimeType == "model/vnd.gltf+json" ) lcl_StoreJsonExternalsAndFallback(GetExport(), xPropSet, aMediaURL); #endif diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 3973c0f014a4..d1caa4e08496 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -3082,7 +3082,7 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen if( xAttrList->getValueByIndex( n ).equalsAscii( "application/vnd.sun.star.media" ) ) mbMedia = true; #if HAVE_FEATURE_GLTF - if( xAttrList->getValueByIndex( n ).equalsAscii( "application/vnd.gltf+json" ) && SvtMiscOptions().IsExperimentalMode() ) + if( xAttrList->getValueByIndex( n ).equalsAscii( "model/vnd.gltf+json" ) && SvtMiscOptions().IsExperimentalMode() ) mbMedia = true; #endif // leave this loop |