Makefile.fetch | 4 Repository.mk | 6 RepositoryExternal.mk | 105 avmedia/Library_avmedia.mk | 23 avmedia/Library_avmediaogl.mk | 45 avmedia/Module_avmedia.mk | 5 avmedia/source/framework/collada_headers.hxx | 29 avmedia/source/framework/modeltools.cxx | 326 - avmedia/source/inc/mediamisc.hxx | 4 avmedia/source/opengl/avmediaogl.component | 15 avmedia/source/opengl/oglframegrabber.cxx | 69 avmedia/source/opengl/oglframegrabber.hxx | 48 avmedia/source/opengl/oglmanager.cxx | 59 avmedia/source/opengl/oglmanager.hxx | 43 avmedia/source/opengl/oglplayer.cxx | 369 - avmedia/source/opengl/oglplayer.hxx | 82 avmedia/source/opengl/ogluno.cxx | 45 avmedia/source/opengl/oglwindow.cxx | 371 - avmedia/source/opengl/oglwindow.hxx | 82 avmedia/source/viewer/mediawindow_impl.cxx | 24 config_host.mk.in | 11 config_host/config_features.h.in | 10 configure.ac | 137 distro-configs/LibreOfficeFlatpak.conf | 1 distro-configs/LibreOfficeOssFuzz.conf | 2 download.lst | 6 external/Module_external.mk | 3 external/collada2gltf/GitSHA1.cpp | 2 external/collada2gltf/Makefile | 14 external/collada2gltf/Module_collada2gltf.mk | 17 external/collada2gltf/README | 4 external/collada2gltf/StaticLibrary_collada2gltf.mk | 104 external/collada2gltf/UnpackedTarball_collada2gltf.mk | 26 external/collada2gltf/patches/collada2gltf.add-glsl-version.patch.1 | 13 external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1 | 25 external/collada2gltf/patches/collada2gltf.fix-memory-leak2.patch.1 | 18 external/collada2gltf/patches/collada2gltf.new-delete-mismatch.patch.1 | 12 external/collada2gltf/patches/drop_tr1_support.patch.1 | 403 - external/collada2gltf/patches/shader_compatibility.patch.1 | 14 external/collada2gltf/patches/wrong_uri_usage.patch.1 | 78 external/libgltf/ExternalProject_libgltf.mk | 79 external/libgltf/Makefile | 14 external/libgltf/Module_libgltf.mk | 17 external/libgltf/README | 1 external/libgltf/UnpackedTarball_libgltf.mk | 26 external/libgltf/libgltf-add-a-vao.1 | 49 external/libgltf/libgltf-disable-non-core.1 | 28 external/libgltf/libgltf-msvc-disable-sse2.patch.1 | 10 external/libgltf/libgltf-msvc-x64.patch.1 | 107 external/libgltf/libgltf-quads-to-triangles.1 | 69 external/opencollada/Makefile | 14 external/opencollada/Module_opencollada.mk | 17 external/opencollada/README | 5 external/opencollada/StaticLibrary_opencollada_parser.mk | 273 - external/opencollada/UnpackedTarball_opencollada.mk | 22 external/opencollada/patches/0001-Revert-fix-for-malformed-FBX-COLLADA-id.patch.1 | 51 external/opencollada/patches/0002-Expose-sid-for-textures-in-extras.patch.1 | 66 external/opencollada/patches/libc++.patch.0 | 21 external/opencollada/patches/opencollada.clang.patch.0 | 22 external/opencollada/patches/opencollada.libxml.patch.0 | 12 include/avmedia/modeltools.hxx | 35 include/sfx2/sfxsids.hrc | 2 postprocess/Rdb_services.mk | 3 readlicense_oo/license/LICENSE | 48 readlicense_oo/license/LICENSE.fodt | 2231 ++++------ readlicense_oo/license/LICENSE.html | 2 sd/qa/unit/export-tests.cxx | 17 sd/sdi/_drvwsh.sdi | 5 sd/source/ui/func/fuinsert.cxx | 77 sd/source/ui/inc/fuinsert.hxx | 18 sd/source/ui/view/drviews2.cxx | 10 sd/source/ui/view/drviews7.cxx | 8 sd/source/ui/view/sdview4.cxx | 23 sfx2/sdi/sfx.sdi | 17 slideshow/source/engine/shapes/viewmediashape.cxx | 22 solenv/flatpak-manifest.in | 18 svx/source/svdraw/svdomedia.cxx | 87 xmloff/source/draw/shapeexport.cxx | 141 xmloff/source/draw/ximpshap.cxx | 6 xmloff/source/draw/ximpshap.hxx | 2 80 files changed, 1117 insertions(+), 5212 deletions(-)
New commits: commit 08a43cc97ccf88faa9d3a04afc3aacd2c885a2d1 Author: Thorsten Behrens <thorsten.behr...@cib.de> Date: Sat Oct 28 02:28:18 2017 +0200 related: tdf#103884 remove gltf/collada feature Change-Id: Icd26ad96c0337844ef1463dabfbe791caa00dd2d Reviewed-on: https://gerrit.libreoffice.org/43972 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/Makefile.fetch b/Makefile.fetch index 79afddc3058b..17780cb2fd4c 100644 --- a/Makefile.fetch +++ b/Makefile.fetch @@ -114,7 +114,6 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S $(call fetch_Optional,CLUCENE,CLUCENE_TARBALL) \ $(call fetch_Optional,LIBCMIS,LIBCMIS_TARBALL) \ $(call fetch_Optional,COINMP,COINMP_TARBALL) \ - $(call fetch_Optional,COLLADA2GLTF,COLLADA2GLTF_TARBALL) \ $(call fetch_Optional,CPPUNIT,CPPUNIT_TARBALL) \ $(call fetch_Optional,CT2N,CT2N_TARBALL) \ $(call fetch_Optional,CURL,CURL_TARBALL) \ @@ -187,7 +186,6 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S $(call fetch_Optional,NSS,NSS_TARBALL) \ $(call fetch_Optional_pack,NUMBERTEXT_EXTENSION_PACK) \ $(call fetch_Optional,ODFGEN,ODFGEN_TARBALL) \ - $(call fetch_Optional,OPENCOLLADA,OPENCOLLADA_TARBALL) \ $(call fetch_Optional,OPENLDAP,OPENLDAP_TARBALL) \ $(call fetch_Optional,OPENSSL,OPENSSL_TARBALL) \ $(call fetch_Optional,ORCUS,ORCUS_TARBALL) \ @@ -220,8 +218,6 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S $(call fetch_Optional,ODFVALIDATOR,ODFVALIDATOR_JAR) \ $(call fetch_Optional,OFFICEOTRON,OFFICEOTRON_JAR) \ ,$(call fetch_Download_item,https://dev-www.libreoffice.org/extern,$(item))) - $(if $(call fetch_Optional,LIBGLTF,LIBGLTF_TARBALL) \ - , $(call fetch_Download_item,https://dev-www.libreoffice.org/src/libgltf,$(call fetch_Optional,LIBGLTF,LIBGLTF_TARBALL))) @mkdir -p $(dir $@) && touch $@ @mkdir -p $(dir $@)/Executable diff --git a/Repository.mk b/Repository.mk index 09c9ea20d0e6..96cddc13b97d 100644 --- a/Repository.mk +++ b/Repository.mk @@ -634,12 +634,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ ) \ )) -ifeq ($(ENABLE_GLTF),TRUE) -$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ - avmediaogl \ -)) -endif - ifeq ($(OS),WNT) $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,activexbinarytable, \ regactivex \ diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 282dc53f6ced..026ab1879cf2 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -3479,111 +3479,6 @@ endif endif -ifeq ($(ENABLE_GLTF),TRUE) - -ifneq ($(SYSTEM_LIBGLTF),TRUE) - -define gb_LinkTarget__use_libgltf -$(call gb_LinkTarget_set_include,$(1),\ - -I$(call gb_UnpackedTarball_get_dir,libgltf)/inc \ - $$(INCLUDE) \ -) - -ifeq ($(COM),MSC) -$(call gb_LinkTarget_add_libs,$(1),\ - $(call gb_UnpackedTarball_get_dir,libgltf)/build/win32/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug/libgltf.lib,Release/libgltf.lib) \ -) -else -$(call gb_LinkTarget_add_libs,$(1),\ - $(call gb_UnpackedTarball_get_dir,libgltf)/src/.libs/libgltf-0.1$(gb_StaticLibrary_PLAINEXT) \ -) -endif - -$(call gb_LinkTarget_use_external_project,$(1),libgltf) - -endef - -else # SYSTEM_LIBGLTF - -define gb_LinkTarget__use_libgltf -$(call gb_LinkTarget_set_include,$(1),\ - $$(INCLUDE) \ - $(LIBGLTF_CFLAGS) \ -) -$(call gb_LinkTarget_add_libs,$(1),$(LIBGLTF_LIBS)) - -endef - -endif # SYSTEM_LIBGLTF - -ifeq ($(ENABLE_COLLADA),TRUE) - -ifeq ($(SYSTEM_OPENCOLLADA),TRUE) - -define gb_LinkTarget__use_opencollada_parser -$(call gb_LinkTarget_set_include,$(1),\ - $$(INCLUDE) \ - $(OPENCOLLADA_CFLAGS) \ -) - -$(call gb_LinkTarget_add_libs,$(1),$(OPENCOLLADA_LIBS)) - -endef - -else # !SYSTEM_OPENCOLLADA - -define gb_LinkTarget__use_opencollada_parser -$(call gb_LinkTarget_set_include,$(1),\ - -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \ - -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADAFramework/include \ - -I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADASaxFrameworkLoader/include \ - -I$(call gb_UnpackedTarball_get_dir,opencollada)/GeneratedSaxParser/include \ - $$(INCLUDE) \ -) - -$(call gb_LinkTarget_use_static_libraries,$(1),\ - opencollada_parser \ -) -endef - -endif # SYSTEM_OPENCOLLADA - -ifeq ($(SYSTEM_COLLADA2GLTF),TRUE) - -define gb_LinkTarget__use_collada2gltf -$(call gb_LinkTarget_set_include,$(1),\ - $$(INCLUDE) \ - $(COLLADA2GLTF_CFLAGS) \ -) - -$(call gb_LinkTarget_add_libs,$(1),$(COLLADA2GLTF_LIBS)) - -endef - -else # !SYSTEM_COLLADA2GLTF - -define gb_LinkTarget__use_collada2gltf -$(call gb_LinkTarget_set_include,$(1),\ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson/ \ - $$(INCLUDE) \ -) - -$(call gb_LinkTarget_use_static_libraries,$(1),\ - collada2gltf \ -) -endef - -endif # SYSTEM_COLLADA2GLTF - -endif # ENABLE_COLLADA - -endif # ENABLE_GLTF - define gb_LinkTarget__use_dconf $(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS)) $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS)) diff --git a/avmedia/Library_avmedia.mk b/avmedia/Library_avmedia.mk index 3f32ce786145..ff206228a0c5 100644 --- a/avmedia/Library_avmedia.mk +++ b/avmedia/Library_avmedia.mk @@ -60,29 +60,6 @@ $(eval $(call gb_Library_use_libraries,avmedia,\ vcl \ )) -ifeq ($(ENABLE_GLTF),TRUE) -$(eval $(call gb_Library_add_exception_objects,avmedia,\ - avmedia/source/framework/modeltools \ -)) -endif - -ifeq ($(ENABLE_COLLADA),TRUE) - -ifeq ($(OS),LINUX) -$(eval $(call gb_Library_add_libs,avmedia,\ - -lrt \ -)) -endif - -$(eval $(call gb_Library_use_externals,avmedia,\ - collada2gltf \ - libxml2 \ - opencollada_parser \ - libpng \ -)) - -endif - $(eval $(call gb_Library_add_exception_objects,avmedia,\ avmedia/source/framework/mediacontrol \ avmedia/source/framework/MediaControlBase \ diff --git a/avmedia/Library_avmediaogl.mk b/avmedia/Library_avmediaogl.mk deleted file mode 100644 index eae3efab1e64..000000000000 --- a/avmedia/Library_avmediaogl.mk +++ /dev/null @@ -1,45 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# 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/. -# - -$(eval $(call gb_Library_Library,avmediaogl)) - -$(eval $(call gb_Library_set_componentfile,avmediaogl,avmedia/source/opengl/avmediaogl)) - -$(eval $(call gb_Library_use_sdk_api,avmediaogl)) - -$(eval $(call gb_Library_use_externals,avmediaogl, \ - boost_headers \ - libgltf \ - epoxy \ - glm_headers \ -)) - -$(eval $(call gb_Library_use_libraries,avmediaogl,\ - comphelper \ - cppu \ - cppuhelper \ - sal \ - salhelper \ - tl \ - vcl \ -)) - -$(eval $(call gb_Library_set_include,avmediaogl,\ - $$(INCLUDE) \ -)) - -$(eval $(call gb_Library_add_exception_objects,avmediaogl,\ - avmedia/source/opengl/oglframegrabber \ - avmedia/source/opengl/oglmanager \ - avmedia/source/opengl/oglplayer \ - avmedia/source/opengl/ogluno \ - avmedia/source/opengl/oglwindow \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/avmedia/Module_avmedia.mk b/avmedia/Module_avmedia.mk index 8e1bd011d5e8..20d2dcfec843 100644 --- a/avmedia/Module_avmedia.mk +++ b/avmedia/Module_avmedia.mk @@ -58,11 +58,6 @@ $(eval $(call gb_Module_add_targets,avmedia,\ )) endif -ifeq ($(ENABLE_GLTF),TRUE) -$(eval $(call gb_Module_add_targets,avmedia,\ - Library_avmediaogl \ -)) -endif endif # vim: set noet sw=4 ts=4: diff --git a/avmedia/source/framework/collada_headers.hxx b/avmedia/source/framework/collada_headers.hxx deleted file mode 100644 index 6ef8238124a1..000000000000 --- a/avmedia/source/framework/collada_headers.hxx +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- 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/. - */ - -#ifndef INCLUDED_AVMEDIA_SOURCE_FRAMEWORK_COLLADA_HEADERS_HXX -#define INCLUDED_AVMEDIA_SOURCE_FRAMEWORK_COLLADA_HEADERS_HXX - -#include <sal/config.h> - -#if defined __GNUC__ || defined __clang__ -#pragma GCC system_header -#elif defined _MSC_VER -#pragma warning(push, 1) -#endif - -#include <COLLADA2GLTFWriter.h> - -#if defined _MSC_VER -#pragma warning(pop) -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx deleted file mode 100644 index 76d947954a3c..000000000000 --- a/avmedia/source/framework/modeltools.cxx +++ /dev/null @@ -1,326 +0,0 @@ -/* -*- 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/. - */ - -#include <avmedia/modeltools.hxx> -#include <avmedia/mediaitem.hxx> -#include <mediamisc.hxx> - -#include <com/sun/star/embed/ElementModes.hpp> -#include <com/sun/star/embed/XTransactedObject.hpp> -#include <com/sun/star/document/XStorageBasedDocument.hpp> -#include <com/sun/star/embed/XStorage.hpp> -#include <com/sun/star/packages/zip/ZipFileAccess.hpp> -#include <osl/file.hxx> -#include <comphelper/processfactory.hxx> -#include <tools/urlobj.hxx> -#include <ucbhelper/content.hxx> -#include <unotools/tempfile.hxx> -#include <unotools/ucbstreamhelper.hxx> - -#include <boost/property_tree/ptree.hpp> -#include <boost/property_tree/json_parser.hpp> -#include <boost/optional.hpp> -#include <boost/exception/diagnostic_information.hpp> - -#include <config_features.h> - -#if HAVE_FEATURE_COLLADA -#include "collada_headers.hxx" -#include <GLTFAsset.h> -#endif - -#include <string> -#include <vector> - -using namespace ::com::sun::star; -using namespace boost::property_tree; - -namespace avmedia { - -#if HAVE_FEATURE_COLLADA - -static void lcl_UnzipKmz(const OUString& rSourceURL, const OUString& rOutputFolderURL, OUString& o_rDaeFileURL) -{ - o_rDaeFileURL.clear(); - uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = - packages::zip::ZipFileAccess::createWithURL(comphelper::getProcessComponentContext(), rSourceURL); - uno::Sequence< OUString > aNames = xNameAccess->getElementNames(); - for( sal_Int32 i = 0; i < aNames.getLength(); ++i ) - { - const OUString sCopy = rOutputFolderURL + "/" + aNames[i]; - if( aNames[i].endsWithIgnoreAsciiCase(".dae") ) - o_rDaeFileURL = sCopy; - - uno::Reference<io::XInputStream> xInputStream(xNameAccess->getByName(aNames[i]), uno::UNO_QUERY); - - ::ucbhelper::Content aCopyContent(sCopy, - uno::Reference<ucb::XCommandEnvironment>(), - comphelper::getProcessComponentContext()); - - aCopyContent.writeStream(xInputStream, true); - } -} - - -bool KmzDae2Gltf(const OUString& rSourceURL, OUString& o_rOutput) -{ - o_rOutput.clear(); - const bool bIsDAE = rSourceURL.endsWithIgnoreAsciiCase(".dae"); - const bool bIsKMZ = rSourceURL.endsWithIgnoreAsciiCase(".kmz"); - if( !bIsDAE && !bIsKMZ ) - { - SAL_WARN("avmedia.opengl", "KmzDae2Gltf converter got a file with wrong extension " << rSourceURL); - return false; - } - - // Create a temporary folder for conversion - OUString sOutput; - osl::FileBase::getFileURLFromSystemPath(::utl::TempFile::CreateTempName(), sOutput); - // remove .tmp extension - sOutput = sOutput.copy(0, sOutput.getLength()-4); - - std::shared_ptr <GLTF::GLTFAsset> asset(new GLTF::GLTFAsset()); - asset->setBundleOutputPath(OUStringToOString( sOutput, RTL_TEXTENCODING_UTF8 ).getStr()); - - // If *.dae file is not in the local file system, then copy it to a temp folder for the conversion - OUString sInput = rSourceURL; - const INetURLObject aSourceURLObj(rSourceURL); - if( aSourceURLObj.GetProtocol() != INetProtocol::File ) - { - try - { - ::ucbhelper::Content aSourceContent(rSourceURL, - uno::Reference<ucb::XCommandEnvironment>(), - comphelper::getProcessComponentContext()); - - const OUString sTarget = sOutput + "/" + GetFilename(rSourceURL); - ::ucbhelper::Content aTempContent(sTarget, - uno::Reference<ucb::XCommandEnvironment>(), - comphelper::getProcessComponentContext()); - - aTempContent.writeStream(aSourceContent.openStream(), true); - sInput = sTarget; - } - catch (const uno::Exception&) - { - SAL_WARN("avmedia.opengl", "Exception while trying to copy source file to the temp folder for conversion: " << sInput); - return false; - } - } - - asset->setInputFilePath(OUStringToOString( sInput, RTL_TEXTENCODING_UTF8 ).getStr()); - - if (bIsKMZ) - { - OUString sDaeFilePath; - lcl_UnzipKmz(sInput, sOutput, sDaeFilePath); - if ( sDaeFilePath.isEmpty() ) - { - SAL_WARN("avmedia.opengl", "Cannot find the file in kmz: " << rSourceURL); - return false; - } - - asset->setInputFilePath(OUStringToOString( sDaeFilePath, RTL_TEXTENCODING_UTF8 ).getStr()); - } - - GLTF::COLLADA2GLTFWriter writer(asset); - writer.write(); - // Path to the .json file created by COLLADA2GLTFWriter - o_rOutput = sOutput + "/" + GetFilename(sOutput) + ".json"; - return true; -} -#endif // HAVE_FEATURE_COLLADA - - -static void lcl_EmbedExternals(const OUString& rSourceURL, const uno::Reference<embed::XStorage>& xSubStorage, ::ucbhelper::Content& rContent) -{ - // Create a temp file with which json parser can work. - OUString sTempFileURL; - const ::osl::FileBase::RC aErr = - ::osl::FileBase::createTempFile(nullptr, nullptr, &sTempFileURL); - if (aErr != ::osl::FileBase::E_None) - { - SAL_WARN("avmedia.opengl", "Cannot create temp file"); - return; - } - try - { - // Write json content to the temp file - ::ucbhelper::Content aTempContent(sTempFileURL, - uno::Reference<ucb::XCommandEnvironment>(), - comphelper::getProcessComponentContext()); - aTempContent.writeStream(rContent.openStream(), true); - } - catch (uno::Exception const& e) - { - SAL_WARN("avmedia.opengl", e); - return; - } - - // Convert URL to a file path for loading - const INetURLObject aURLObj(sTempFileURL); - std::string sUrl = OUStringToOString( aURLObj.getFSysPath(FSysStyle::Detect), RTL_TEXTENCODING_UTF8 ).getStr(); - - // Parse json, read externals' URI and modify this relative URI's so they remain valid in the new context. - std::vector<std::string> vExternals; - ptree aTree; - try - { - json_parser::read_json( sUrl, aTree ); - - // Buffers for geometry and animations - for( ptree::value_type &rVal : aTree.get_child("buffers") ) - { - const std::string sBufferUri(rVal.second.get<std::string>("path")); - vExternals.push_back(sBufferUri); - // Change path: make it contain only a file name - aTree.put("buffers." + rVal.first + ".path.",sBufferUri.substr(sBufferUri.find_last_of('/')+1)); - } - // Images for textures - boost::optional< ptree& > aImages = aTree.get_child_optional("images"); - if( aImages ) - { - for( ptree::value_type &rVal : aImages.get() ) - { - const std::string sImageUri(rVal.second.get<std::string>("path")); - if( !sImageUri.empty() ) - { - vExternals.push_back(sImageUri); - // Change path: make it contain only a file name - aTree.put("images." + rVal.first + ".path.",sImageUri.substr(sImageUri.find_last_of('/')+1)); - } - } - } - // Shaders (contains names only) - for( ptree::value_type &rVal : aTree.get_child("programs") ) - { - vExternals.push_back(rVal.second.get<std::string>("fragmentShader") + ".glsl"); - vExternals.push_back(rVal.second.get<std::string>("vertexShader") + ".glsl"); - } - - // Write out modified json - json_parser::write_json( sUrl, aTree ); - } - catch ( boost::exception const& e ) - { - SAL_WARN("avmedia.opengl", "Exception while parsing *.json file " << boost::diagnostic_information(e)); - return; - } - - // Reload json with modified path to external resources - rContent = ::ucbhelper::Content(sTempFileURL, - uno::Reference<ucb::XCommandEnvironment>(), - comphelper::getProcessComponentContext()); - - // Store all external files next to the json file - for( std::vector<std::string>::iterator aCIter = vExternals.begin(); aCIter != vExternals.end(); ++aCIter ) - { - const OUString sAbsURL = INetURLObject::GetAbsURL(rSourceURL,OUString::createFromAscii(aCIter->c_str())); - - ::ucbhelper::Content aContent(sAbsURL, - uno::Reference<ucb::XCommandEnvironment>(), - comphelper::getProcessComponentContext()); - - uno::Reference<io::XStream> const xStream( - CreateStream(xSubStorage, GetFilename(sAbsURL)), uno::UNO_SET_THROW); - uno::Reference<io::XOutputStream> const xOutStream( - xStream->getOutputStream(), uno::UNO_SET_THROW); - - if (!aContent.openStream(xOutStream)) - { - SAL_WARN("avmedia.opengl", "openStream to storage failed"); - return; - } - } -} - - -bool Embed3DModel( const uno::Reference<frame::XModel>& xModel, - const OUString& rSourceURL, OUString& o_rEmbeddedURL) -{ - OUString sSource = rSourceURL; - -#if HAVE_FEATURE_COLLADA - if( !rSourceURL.endsWithIgnoreAsciiCase(".json") ) - KmzDae2Gltf(rSourceURL, sSource); -#endif - - try - { - ::ucbhelper::Content aSourceContent(sSource, - uno::Reference<ucb::XCommandEnvironment>(), - comphelper::getProcessComponentContext()); - - // Base storage - uno::Reference<document::XStorageBasedDocument> const xSBD(xModel, - uno::UNO_QUERY_THROW); - uno::Reference<embed::XStorage> const xStorage( - xSBD->getDocumentStorage(), uno::UNO_QUERY_THROW); - - // Model storage - const OUString sModel("Models"); - uno::Reference<embed::XStorage> const xModelStorage( - xStorage->openStorageElement(sModel, embed::ElementModes::WRITE)); - - // Own storage of the corresponding model - const OUString sFilename(GetFilename(sSource)); - const OUString sGLTFDir(sFilename.copy(0,sFilename.lastIndexOf('.'))); - uno::Reference<embed::XStorage> const xSubStorage( - xModelStorage->openStorageElement(sGLTFDir, embed::ElementModes::WRITE)); - - // Embed external resources - lcl_EmbedExternals(sSource, xSubStorage, aSourceContent); - - // Save model file (.json) - uno::Reference<io::XStream> const xStream( - CreateStream(xSubStorage, sFilename), uno::UNO_SET_THROW); - uno::Reference<io::XOutputStream> const xOutStream( - xStream->getOutputStream(), uno::UNO_SET_THROW); - - if (!aSourceContent.openStream(xOutStream)) - { - SAL_WARN("avmedia.opengl", "openStream to storage failed"); - return false; - } - - const uno::Reference<embed::XTransactedObject> xSubTransaction(xSubStorage, uno::UNO_QUERY); - if (xSubTransaction.is()) - { - xSubTransaction->commit(); - } - const uno::Reference<embed::XTransactedObject> xModelTransaction(xModelStorage, uno::UNO_QUERY); - if (xModelTransaction.is()) - { - xModelTransaction->commit(); - } - const uno::Reference<embed::XTransactedObject> xTransaction(xStorage, uno::UNO_QUERY); - if (xTransaction.is()) - { - xTransaction->commit(); - } - - o_rEmbeddedURL = "vnd.sun.star.Package:" + sModel + "/" + sGLTFDir + "/" + sFilename; - return true; - } - catch (uno::Exception const&) - { - SAL_WARN("avmedia.opengl", "Exception while trying to embed model"); - } - return false; -} - - -bool IsModel(const OUString& rMimeType) -{ - return rMimeType == AVMEDIA_MIMETYPE_JSON; -} - -} // namespace avmedia - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx index cdb640aa1575..46d513fa4817 100644 --- a/avmedia/source/inc/mediamisc.hxx +++ b/avmedia/source/inc/mediamisc.hxx @@ -41,10 +41,6 @@ // Mime types #define AVMEDIA_MIMETYPE_COMMON "application/vnd.sun.star.media" -#if HAVE_FEATURE_GLTF -#define AVMEDIA_MIMETYPE_JSON "model/vnd.gltf+json" -#endif - namespace avmedia { const std::locale& GetResLocale(); diff --git a/avmedia/source/opengl/avmediaogl.component b/avmedia/source/opengl/avmediaogl.component deleted file mode 100644 index f3cd138ea1d0..000000000000 --- a/avmedia/source/opengl/avmediaogl.component +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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/. - * ---> -<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" - prefix="avmediaogl" xmlns="http://openoffice.org/2010/uno-components"> - <implementation name="com.sun.star.comp.avmedia.Manager_OpenGL"> - <service name="com.sun.star.media.Manager_OpenGL"/> - </implementation> -</component> diff --git a/avmedia/source/opengl/oglframegrabber.cxx b/avmedia/source/opengl/oglframegrabber.cxx deleted file mode 100644 index 52fa7a4da83a..000000000000 --- a/avmedia/source/opengl/oglframegrabber.cxx +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- 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/. - */ - -#include "oglframegrabber.hxx" - -#include <cppuhelper/supportsservice.hxx> -#include <vcl/bitmapex.hxx> -#include <vcl/graph.hxx> -#include <vcl/salbtype.hxx> -#include <vcl/bitmapaccess.hxx> - -#include <vcl/opengl/OpenGLHelper.hxx> - -#include <memory> - -using namespace com::sun::star; -using namespace libgltf; - -namespace avmedia { namespace ogl { - -OGLFrameGrabber::OGLFrameGrabber( glTFHandle& rHandle ) - : FrameGrabber_BASE() - , m_rHandle( rHandle ) -{ -} - -OGLFrameGrabber::~OGLFrameGrabber() -{ -} - -uno::Reference< css::graphic::XGraphic > SAL_CALL OGLFrameGrabber::grabFrame( double /*fMediaTime*/ ) -{ - std::unique_ptr<sal_uInt8[]> pBuffer(new sal_uInt8[m_rHandle.viewport.width * m_rHandle.viewport.height * 4]); - glTFHandle* pHandle = &m_rHandle; - int nRet = gltf_renderer_get_bitmap(&pHandle, 1, reinterpret_cast<char*>(pBuffer.get()), GL_BGRA); - if( nRet != 0 ) - { - SAL_WARN("avmedia.opengl", "Error occurred while rendering to bitmap! Error code: " << nRet); - return uno::Reference< css::graphic::XGraphic >(); - } - BitmapEx aBitmap = OpenGLHelper::ConvertBGRABufferToBitmapEx(pBuffer.get(), m_rHandle.viewport.width, m_rHandle.viewport.height); - return Graphic( aBitmap ).GetXGraphic(); -} - -OUString SAL_CALL OGLFrameGrabber::getImplementationName() -{ - return OUString("com.sun.star.comp.avmedia.FrameGrabber_OpenGL"); -} - -sal_Bool SAL_CALL OGLFrameGrabber::supportsService( const OUString& rServiceName ) -{ - return cppu::supportsService(this, rServiceName); -} - -uno::Sequence< OUString > SAL_CALL OGLFrameGrabber::getSupportedServiceNames() -{ - return { "com.sun.star.media.FrameGrabber_OpenGL" }; -} - -} // namespace ogl -} // namespace avmedia - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/opengl/oglframegrabber.hxx b/avmedia/source/opengl/oglframegrabber.hxx deleted file mode 100644 index fd2c52865d48..000000000000 --- a/avmedia/source/opengl/oglframegrabber.hxx +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- 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/. - */ - -#ifndef INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLFRAMEGRABBER_HXX -#define INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLFRAMEGRABBER_HXX - -#include <cppuhelper/implbase.hxx> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/media/XFrameGrabber.hpp> - -#include <libgltf.h> - -namespace avmedia { namespace ogl { - -typedef ::cppu::WeakImplHelper< css::media::XFrameGrabber, - css::lang::XServiceInfo > FrameGrabber_BASE; - -class OGLFrameGrabber : public FrameGrabber_BASE -{ -public: - - explicit OGLFrameGrabber( libgltf::glTFHandle& rHandle ); - virtual ~OGLFrameGrabber() override; - - // XFrameGrabber - virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL grabFrame( double fMediaTime ) override; - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; - -private: - libgltf::glTFHandle& m_rHandle; -}; - -} // namespace ogl -} // namespace avmedia - -#endif // INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLFRAMEGRABBER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/opengl/oglmanager.cxx b/avmedia/source/opengl/oglmanager.cxx deleted file mode 100644 index 0f7cfddc77d4..000000000000 --- a/avmedia/source/opengl/oglmanager.cxx +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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/. - */ - -#include "oglmanager.hxx" -#include "oglframegrabber.hxx" -#include "oglplayer.hxx" - -#include <cppuhelper/supportsservice.hxx> - -using namespace com::sun::star; - -namespace avmedia { namespace ogl { - -OGLManager::OGLManager() -{ -} - -OGLManager::~OGLManager() -{ -} - -uno::Reference< media::XPlayer > SAL_CALL OGLManager::createPlayer( const OUString& rURL ) -{ - OGLPlayer* pPlayer( new OGLPlayer() ); - if( pPlayer->create(rURL) ) - return uno::Reference< media::XPlayer >(pPlayer); - else - { - delete pPlayer; - SAL_WARN("avmedia.opengl", "Can't create player for OpenGL model: " + rURL); - return uno::Reference< media::XPlayer >(); - } -} - -OUString SAL_CALL OGLManager::getImplementationName() -{ - return OUString("com.sun.star.comp.avmedia.Manager_OpenGL"); -} - -sal_Bool SAL_CALL OGLManager::supportsService( const OUString& rServiceName ) -{ - return cppu::supportsService(this, rServiceName); -} - -uno::Sequence< OUString > SAL_CALL OGLManager::getSupportedServiceNames() -{ - return { "com.sun.star.media.Manager_OpenGL" }; -} - -} // namespace ogl -} // namespace avmedia - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/opengl/oglmanager.hxx b/avmedia/source/opengl/oglmanager.hxx deleted file mode 100644 index 945139f2313a..000000000000 --- a/avmedia/source/opengl/oglmanager.hxx +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- 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/. - */ - -#ifndef INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLMANAGER_HXX -#define INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLMANAGER_HXX - -#include <cppuhelper/implbase.hxx> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/media/XManager.hpp> - -namespace avmedia { namespace ogl { - -class OGLManager : public ::cppu::WeakImplHelper< css::media::XManager, css::lang::XServiceInfo > -{ -public: - - explicit OGLManager(); - virtual ~OGLManager() override; - - // XManager - virtual css::uno::Reference< css::media::XPlayer > SAL_CALL createPlayer( const OUString& rURL ) override; - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; -private: - -}; - -} // namespace ogl -} // namespace avmedia - -#endif // INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLMANAGER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx deleted file mode 100644 index b691680f15e6..000000000000 --- a/avmedia/source/opengl/oglplayer.cxx +++ /dev/null @@ -1,369 +0,0 @@ -/* -*- 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/. - */ - -#include "oglplayer.hxx" -#include "oglframegrabber.hxx" -#include "oglwindow.hxx" - -#include <cppuhelper/supportsservice.hxx> -#include <tools/stream.hxx> -#include <vcl/graph.hxx> -#include <vcl/graphicfilter.hxx> -#include <tools/urlobj.hxx> -#include <vcl/opengl/OpenGLHelper.hxx> - -#include <cassert> - -using namespace com::sun::star; -using namespace libgltf; - -namespace avmedia { namespace ogl { - -OGLPlayer::OGLPlayer() - : Player_BASE(m_aMutex) - , m_pHandle(nullptr) - , m_xContext(OpenGLContext::Create()) - , m_pOGLWindow(nullptr) - , m_bIsRendering(false) -{ -} - -OGLPlayer::~OGLPlayer() -{ - osl::MutexGuard aGuard(m_aMutex); - if( m_pHandle ) - { - m_xContext->makeCurrent(); - gltf_renderer_release(m_pHandle); - m_xContext->dispose(); - } - releaseInputFiles(); -} - -static bool lcl_LoadFile( glTFFile* io_pFile, const OUString& rURL) -{ - SvFileStream aStream( rURL, StreamMode::READ ); - if( !aStream.IsOpen() ) - return false; - - const sal_Int64 nBytes = aStream.remainingSize(); - char* pBuffer = new char[nBytes]; - aStream.ReadBytes(pBuffer, nBytes); - aStream.Close(); - - io_pFile->buffer = pBuffer; - io_pFile->size = nBytes; - - return true; -} - -bool OGLPlayer::create( const OUString& rURL ) -{ - osl::MutexGuard aGuard(m_aMutex); - - m_sURL = rURL; - - // Convert URL to a system path - const INetURLObject aURLObj(m_sURL); - const std::string sFilePath = OUStringToOString( aURLObj.getFSysPath(FSysStyle::Detect), RTL_TEXTENCODING_UTF8 ).getStr(); - - // Load *.json file and init renderer - m_pHandle = gltf_renderer_init(sFilePath, m_vInputFiles); - - if( !m_pHandle ) - { - SAL_WARN("avmedia.opengl", "gltf_renderer_init returned an invalid glTFHandle"); - return false; - } - - // Load external resources - for(glTFFile & rFile : m_vInputFiles) - { - if( !rFile.filename.empty() ) - { - const OUString sFilesURL = - INetURLObject::GetAbsURL(m_sURL,OStringToOUString(OString(rFile.filename.c_str()),RTL_TEXTENCODING_UTF8)); - if( rFile.type == GLTF_IMAGE ) - { - // Load images as bitmaps - GraphicFilter aFilter; - Graphic aGraphic; - if( aFilter.ImportGraphic(aGraphic, INetURLObject(sFilesURL)) != ERRCODE_NONE ) - { - rFile.buffer = nullptr; - rFile.imagewidth = 0; - rFile.imageheight = 0; - SAL_WARN("avmedia.opengl", "Can't load texture file: " + sFilesURL); - return false; - } - BitmapEx aBitmapEx = aGraphic.GetBitmapEx(); - rFile.buffer = new char[4 * aBitmapEx.GetSizePixel().Width() * aBitmapEx.GetSizePixel().Height()]; - OpenGLHelper::ConvertBitmapExToRGBATextureBuffer(aBitmapEx, reinterpret_cast<sal_uInt8*>(rFile.buffer), true); - rFile.imagewidth = aBitmapEx.GetSizePixel().Width(); - rFile.imageheight = aBitmapEx.GetSizePixel().Height(); - } - else if( rFile.type == GLTF_BINARY || rFile.type == GLTF_GLSL ) - { - if( !lcl_LoadFile(&rFile, sFilesURL) ) - { - rFile.buffer = nullptr; - rFile.size = 0; - SAL_WARN("avmedia.opengl", "Can't load glTF file: " + sFilesURL); - return false; - } - } - } - } - - // Set timer - m_aTimer.SetTimeout(8); // is 125fps enough for anyone ? - m_aTimer.SetPriority(TaskPriority::HIGH_IDLE); - m_aTimer.SetInvokeHandler(LINK(this,OGLPlayer,TimerHandler)); - - return true; -} - -void OGLPlayer::releaseInputFiles() -{ - for (size_t i = 0; i < m_vInputFiles.size() && m_vInputFiles[i].buffer; ++i) - { - delete [] m_vInputFiles[i].buffer; - m_vInputFiles[i].buffer = nullptr; - } - m_vInputFiles.clear(); -} - -void SAL_CALL OGLPlayer::start() -{ - osl::MutexGuard aGuard(m_aMutex); - assert(m_pHandle); - - if(!m_pOGLWindow) - return; - - gltf_animation_resume(m_pHandle); - m_aTimer.Start(); - m_bIsRendering = true; -} - -void SAL_CALL OGLPlayer::stop() -{ - osl::MutexGuard aGuard(m_aMutex); - assert(m_pHandle); - m_aTimer.Stop(); - gltf_animation_stop(m_pHandle); - m_bIsRendering = false; -} - -sal_Bool SAL_CALL OGLPlayer::isPlaying() -{ - osl::MutexGuard aGuard(m_aMutex); - assert(m_pHandle); - // Here isPlaying means model is rendered in the window and - // able to interact with the user (e.g. moving camera) - if( getDuration() > 0.0 ) - return gltf_animation_is_playing(m_pHandle); - else - return m_bIsRendering; -} - -double SAL_CALL OGLPlayer::getDuration() -{ - osl::MutexGuard aGuard(m_aMutex); - assert(m_pHandle); - return gltf_animation_get_duration(m_pHandle); -} - -void SAL_CALL OGLPlayer::setMediaTime( double fTime ) -{ - osl::MutexGuard aGuard(m_aMutex); - assert(m_pHandle); - gltf_animation_set_time(m_pHandle, fTime); -} - -double SAL_CALL OGLPlayer::getMediaTime() -{ - osl::MutexGuard aGuard(m_aMutex); - assert(m_pHandle); - return gltf_animation_get_time(m_pHandle); -} - -void SAL_CALL OGLPlayer::setPlaybackLoop( sal_Bool bSet ) -{ - osl::MutexGuard aGuard(m_aMutex); - assert(m_pHandle); - gltf_animation_set_looping(m_pHandle, bSet); -} - -sal_Bool SAL_CALL OGLPlayer::isPlaybackLoop() -{ - osl::MutexGuard aGuard(m_aMutex); - assert(m_pHandle); - return gltf_animation_get_looping(m_pHandle); -} - -void SAL_CALL OGLPlayer::setVolumeDB( sal_Int16 /*nVolumDB*/ ) -{ - // OpenGL models have no sound. -} - -sal_Int16 SAL_CALL OGLPlayer::getVolumeDB() -{ - // OpenGL models have no sound. - return 0; -} - -void SAL_CALL OGLPlayer::setMute( sal_Bool /*bSet*/ ) -{ - // OpenGL models have no sound. -} - -sal_Bool SAL_CALL OGLPlayer::isMute() -{ - // OpenGL models have no sound. - return false; -} - -awt::Size SAL_CALL OGLPlayer::getPreferredPlayerWindowSize() -{ - return awt::Size( 480, 360 ); -} - -static bool lcl_CheckOpenGLRequirements() -{ - return OpenGLHelper::getGLVersion() >= 3.0; -} - -uno::Reference< media::XPlayerWindow > SAL_CALL OGLPlayer::createPlayerWindow( const uno::Sequence< uno::Any >& rArguments ) -{ - osl::MutexGuard aGuard( m_aMutex ); - - assert( rArguments.getLength() >= 3 ); - assert(m_pHandle); - - sal_IntPtr pIntPtr = 0; - rArguments[ 2 ] >>= pIntPtr; - SystemChildWindow *pChildWindow = reinterpret_cast< SystemChildWindow* >( pIntPtr ); - - if( !pChildWindow ) - { - SAL_WARN("avmedia.opengl", "Failed to get the SystemChildWindow for rendering!"); - return uno::Reference< media::XPlayerWindow >(); - } - assert(pChildWindow->GetParent()); - - if( !m_xContext->init(pChildWindow) ) - { - SAL_WARN("avmedia.opengl", "Context initialization failed"); - return uno::Reference< media::XPlayerWindow >(); - } - - if( !m_xContext->supportMultiSampling() ) - { - SAL_WARN("avmedia.opengl", "Context does not support multisampling!"); - return uno::Reference< media::XPlayerWindow >(); - } - - if( !lcl_CheckOpenGLRequirements() ) - { - SAL_WARN("avmedia.opengl", "Your platform does not have the minimal OpenGL requiremenets!"); - return uno::Reference< media::XPlayerWindow >(); - } - - Size aSize = pChildWindow->GetSizePixel(); - m_xContext->setWinSize(aSize); - m_pHandle->viewport.x = 0; - m_pHandle->viewport.y = 0; - m_pHandle->viewport.width = aSize.Width(); - m_pHandle->viewport.height = aSize.Height(); - - // TODO: Use the error codes to print a readable error message - int nRet = gltf_renderer_set_content(m_pHandle, m_vInputFiles); - releaseInputFiles(); - if( nRet != 0 ) - { - SAL_WARN("avmedia.opengl", "Error occurred while setting up the scene! Error code: " << nRet); - return uno::Reference< media::XPlayerWindow >(); - } - // The background color is white by default, but we need to separate the - // OpenGL window from the main window so set background color to grey - glClearColor(0.5f, 0.5f, 0.5f, 0.5f); - m_pOGLWindow = new OGLWindow(*m_pHandle, m_xContext, *pChildWindow->GetParent()); - return uno::Reference< media::XPlayerWindow >( m_pOGLWindow ); -} - -uno::Reference< media::XFrameGrabber > SAL_CALL OGLPlayer::createFrameGrabber() -{ - osl::MutexGuard aGuard(m_aMutex); - assert(m_pHandle); - - if( !m_xContext->init() ) - { - SAL_WARN("avmedia.opengl", "Offscreen context initialization failed"); - return uno::Reference< media::XFrameGrabber >(); - } - - if( !m_xContext->supportMultiSampling() ) - { - SAL_WARN("avmedia.opengl", "Context does not support multisampling!"); - return uno::Reference< media::XFrameGrabber >(); - } - - if( !lcl_CheckOpenGLRequirements() ) - { - SAL_WARN("avmedia.opengl", "Your platform does not have the minimal OpenGL requiremenets!"); - return uno::Reference< media::XFrameGrabber >(); - } - - m_pHandle->viewport.x = 0; - m_pHandle->viewport.y = 0; - m_pHandle->viewport.width = getPreferredPlayerWindowSize().Width; - m_pHandle->viewport.height = getPreferredPlayerWindowSize().Height; - - int nRet = gltf_renderer_set_content(m_pHandle, m_vInputFiles); - releaseInputFiles(); - if( nRet != 0 ) - { - SAL_WARN("avmedia.opengl", "Error occurred while setting up the scene! Error code: " << nRet); - return uno::Reference< media::XFrameGrabber >(); - } - glClearColor(0.5f, 0.5f, 0.5f, 0.5f); - OGLFrameGrabber *pFrameGrabber = new OGLFrameGrabber( *m_pHandle ); - return uno::Reference< media::XFrameGrabber >( pFrameGrabber ); -} - -OUString SAL_CALL OGLPlayer::getImplementationName() -{ - return OUString("com.sun.star.comp.avmedia.Player_OpenGL"); -} - -sal_Bool SAL_CALL OGLPlayer::supportsService( const OUString& rServiceName ) -{ - return cppu::supportsService(this, rServiceName); -} - -uno::Sequence< OUString > SAL_CALL OGLPlayer::getSupportedServiceNames() -{ - return { "com.sun.star.media.Player_OpenGL" }; -} - -IMPL_LINK(OGLPlayer,TimerHandler,Timer*,pTimer,void) -{ - if (pTimer == &m_aTimer) - { - osl::MutexGuard aGuard(m_aMutex); - assert(m_pOGLWindow); - m_pOGLWindow->update(); - } -} - -} // namespace ogl -} // namespace avmedia - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/opengl/oglplayer.hxx b/avmedia/source/opengl/oglplayer.hxx deleted file mode 100644 index a74aae4707f9..000000000000 --- a/avmedia/source/opengl/oglplayer.hxx +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- 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/. - */ - -#ifndef INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLPLAYER_HXX -#define INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLPLAYER_HXX - -#include <cppuhelper/compbase.hxx> -#include <cppuhelper/basemutex.hxx> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/media/XPlayer.hpp> - -#include <libgltf.h> - -#include <vcl/opengl/OpenGLContext.hxx> -#include <vcl/timer.hxx> - -#include <vector> - -namespace avmedia { namespace ogl { - -class OGLWindow; - -typedef ::cppu::WeakComponentImplHelper< css::media::XPlayer, css::lang::XServiceInfo > Player_BASE; - -class OGLPlayer : public cppu::BaseMutex, - public Player_BASE -{ -public: - - OGLPlayer(); - virtual ~OGLPlayer() override; - - bool create( const OUString& rURL ); - void releaseInputFiles(); - - // XPlayer - virtual void SAL_CALL start() override; - virtual void SAL_CALL stop() override; - virtual sal_Bool SAL_CALL isPlaying() override; - virtual double SAL_CALL getDuration() override; - virtual void SAL_CALL setMediaTime( double fTime ) override; - virtual double SAL_CALL getMediaTime() override; - virtual void SAL_CALL setPlaybackLoop( sal_Bool bSet ) override; - virtual sal_Bool SAL_CALL isPlaybackLoop() override; - virtual void SAL_CALL setVolumeDB( sal_Int16 nVolumeDB ) override; - virtual sal_Int16 SAL_CALL getVolumeDB() override; - virtual void SAL_CALL setMute( sal_Bool bSet ) override; - virtual sal_Bool SAL_CALL isMute() override; - virtual css::awt::Size SAL_CALL getPreferredPlayerWindowSize() override; - virtual css::uno::Reference< css::media::XPlayerWindow > SAL_CALL createPlayerWindow( const css::uno::Sequence< css::uno::Any >& rArguments ) override; - virtual css::uno::Reference< css::media::XFrameGrabber > SAL_CALL createFrameGrabber() override; - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; - -private: - DECL_LINK( TimerHandler, Timer*, void ); - - OUString m_sURL; - - libgltf::glTFHandle* m_pHandle; - std::vector<libgltf::glTFFile> m_vInputFiles; - - rtl::Reference<OpenGLContext> m_xContext; - AutoTimer m_aTimer; - OGLWindow* m_pOGLWindow; - bool m_bIsRendering; -}; - -} // namespace ogl -} // namespace avmedia - -#endif // INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLPLAYER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/opengl/ogluno.cxx b/avmedia/source/opengl/ogluno.cxx deleted file mode 100644 index c8add21c1bec..000000000000 --- a/avmedia/source/opengl/ogluno.cxx +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- 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/. - */ - -#include "oglmanager.hxx" - -#include <cppuhelper/factory.hxx> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/lang/XSingleServiceFactory.hpp> - -using namespace ::com::sun::star; - -static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno::Reference< lang::XMultiServiceFactory >& /*rxFact*/ ) -{ - return uno::Reference< uno::XInterface >( *new ::avmedia::ogl::OGLManager ); -} - -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaogl_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* ) -{ - uno::Reference< lang::XSingleServiceFactory > xFactory; - void* pRet = nullptr; - - if( rtl_str_compare( pImplName, "com.sun.star.comp.avmedia.Manager_OpenGL" ) == 0 ) - { - xFactory.set( ::cppu::createSingleFactory( - static_cast< lang::XMultiServiceFactory* >( pServiceManager ), - "com.sun.star.comp.avmedia.Manager_OpenGL", - create_MediaPlayer, uno::Sequence< OUString >{ "com.sun.star.media.Manager_OpenGL" } ) ); - } - - if( xFactory.is() ) - { - xFactory->acquire(); - pRet = xFactory.get(); - } - - return pRet; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/opengl/oglwindow.cxx b/avmedia/source/opengl/oglwindow.cxx deleted file mode 100644 index ae550ff37f84..000000000000 --- a/avmedia/source/opengl/oglwindow.cxx +++ /dev/null @@ -1,371 +0,0 @@ -/* -*- 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/. - */ - -#include "oglwindow.hxx" -#include <cppuhelper/supportsservice.hxx> - -using namespace com::sun::star; -using namespace libgltf; - -namespace avmedia { namespace ogl { - -OGLWindow::OGLWindow( glTFHandle& rHandle, const rtl::Reference<OpenGLContext> &rContext, vcl::Window& rEventHandlerParent ) - : m_rHandle( rHandle ) - , m_xContext( rContext ) - , m_rEventHandler( rEventHandlerParent ) - , m_bVisible ( false ) - , m_aLastMousePos(Point(0,0)) - , m_bIsOrbitMode( false ) -{ -} - -OGLWindow::~OGLWindow() -{ - dispose(); -} - -void SAL_CALL OGLWindow::update() -{ - m_xContext->makeCurrent(); - int nRet = gltf_prepare_renderer(&m_rHandle); - if( nRet != 0 ) - { - SAL_WARN("avmedia.opengl", "Error occurred while preparing for rendering! Error code: " << nRet); - return; - } - gltf_renderer(&m_rHandle); - gltf_complete_renderer(&m_rHandle); - m_xContext->swapBuffers(); -} - -sal_Bool SAL_CALL OGLWindow::setZoomLevel( css::media::ZoomLevel /*eZoomLevel*/ ) -{ - return false; -} - -css::media::ZoomLevel SAL_CALL OGLWindow::getZoomLevel() -{ - return media::ZoomLevel_ORIGINAL; -} - -void SAL_CALL OGLWindow::setPointerType( sal_Int32 ) -{ -} - -OUString SAL_CALL OGLWindow::getImplementationName() -{ - return OUString("com.sun.star.comp.avmedia.Window_OpenGL"); -} - -sal_Bool SAL_CALL OGLWindow::supportsService( const OUString& rServiceName ) -{ - return cppu::supportsService(this, rServiceName); -} - -uno::Sequence< OUString > SAL_CALL OGLWindow::getSupportedServiceNames() -{ - return { "com.sun.star.media.Window_OpenGL" }; -} - -void SAL_CALL OGLWindow::dispose() -{ - assert(m_rEventHandler.GetParent()); - m_rEventHandler.GetParent()->RemoveEventListener( LINK(this, OGLWindow, FocusGrabber)); - m_rEventHandler.RemoveEventListener( LINK(this, OGLWindow, CameraHandler)); -} - -void SAL_CALL OGLWindow::addEventListener( const uno::Reference< lang::XEventListener >& ) -{ -} - -void SAL_CALL OGLWindow::removeEventListener( const uno::Reference< lang::XEventListener >& ) -{ -} - -void SAL_CALL OGLWindow::setPosSize( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 /*nFlags*/ ) -{ - if( m_rHandle.viewport.x != nX || m_rHandle.viewport.x != nY || - m_rHandle.viewport.width != nWidth || m_rHandle.viewport.height != nHeight ) - { - m_xContext->setWinSize(Size(nWidth,nHeight)); - m_rHandle.viewport.x = nX; - m_rHandle.viewport.y = nY; - m_rHandle.viewport.width = nWidth; - m_rHandle.viewport.height = nHeight; - } -} - -awt::Rectangle SAL_CALL OGLWindow::getPosSize() -{ - return awt::Rectangle(m_rHandle.viewport.x, m_rHandle.viewport.y, - m_rHandle.viewport.width, m_rHandle.viewport.height); -} - -void SAL_CALL OGLWindow::setVisible( sal_Bool bSet ) -{ - assert(m_rEventHandler.GetParent()); - if( bSet && !m_bVisible ) - { - m_rEventHandler.GetParent()->AddEventListener( LINK(this, OGLWindow, FocusGrabber)); - m_rEventHandler.AddEventListener( LINK(this, OGLWindow, CameraHandler)); - m_rEventHandler.GrabFocus(); - } - else if( !bSet ) - { - m_rEventHandler.GetParent()->RemoveEventListener( LINK(this, OGLWindow, FocusGrabber)); - m_rEventHandler.RemoveEventListener( LINK(this, OGLWindow, CameraHandler)); - } - m_bVisible = bSet; -} - -void SAL_CALL OGLWindow::setEnable( sal_Bool ) -{ -} - -void SAL_CALL OGLWindow::setFocus() -{ -} - -void SAL_CALL OGLWindow::addWindowListener( const uno::Reference< awt::XWindowListener >& ) -{ -} - -void SAL_CALL OGLWindow::removeWindowListener( const uno::Reference< awt::XWindowListener >& ) -{ -} - -void SAL_CALL OGLWindow::addFocusListener( const uno::Reference< awt::XFocusListener >& ) -{ -} - -void SAL_CALL OGLWindow::removeFocusListener( const uno::Reference< awt::XFocusListener >& ) -{ -} - -void SAL_CALL OGLWindow::addKeyListener( const uno::Reference< awt::XKeyListener >& ) -{ -} - -void SAL_CALL OGLWindow::removeKeyListener( const uno::Reference< awt::XKeyListener >& ) -{ -} - -void SAL_CALL OGLWindow::addMouseListener( const uno::Reference< awt::XMouseListener >& ) -{ -} - -void SAL_CALL OGLWindow::removeMouseListener( const uno::Reference< awt::XMouseListener >& ) -{ -} - -void SAL_CALL OGLWindow::addMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& ) -{ -} - -void SAL_CALL OGLWindow::removeMouseMotionListener( const uno::Reference< awt::XMouseMotionListener >& ) -{ -} - -void SAL_CALL OGLWindow::addPaintListener( const uno::Reference< awt::XPaintListener >& ) -{ -} - -void SAL_CALL OGLWindow::removePaintListener( const uno::Reference< awt::XPaintListener >& ) -{ -} - -IMPL_LINK(OGLWindow, FocusGrabber, VclWindowEvent&, rEvent, void) -{ - if( rEvent.GetId() == VclEventId::WindowMouseMove ) - { - MouseEvent* pMouseEvt = static_cast<MouseEvent*>(rEvent.GetData()); - if(pMouseEvt) - { - const Point& rMousePos = pMouseEvt->GetPosPixel(); - const tools::Rectangle aWinRect(m_rEventHandler.GetPosPixel(),m_rEventHandler.GetSizePixel()); - // Grab focus to the OpenGL window when mouse pointer is over it - if( aWinRect.IsInside(rMousePos) ) - { - if ( !m_rEventHandler.HasFocus() ) - { - m_rEventHandler.GrabFocus(); - } - } - // Move focus to the document when mouse is not over the OpenGL window - else if ( m_rEventHandler.HasFocus() ) - { - m_rEventHandler.GrabFocusToDocument(); - } - } - } -} - -IMPL_LINK(OGLWindow, CameraHandler, VclWindowEvent&, rEvent, void) -{ - if( rEvent.GetId() == VclEventId::WindowKeyInput ) - { - KeyEvent* pKeyEvt = static_cast<KeyEvent*>(rEvent.GetData()); - if(pKeyEvt) - { - const sal_uInt16 nCode = pKeyEvt->GetKeyCode().GetCode(); - if (nCode == KEY_Q || nCode == KEY_E || - nCode == KEY_A || nCode == KEY_D || - nCode == KEY_W || nCode == KEY_S ) - { - // Calculate movement - glm::vec3 vMoveBy; - { - glm::vec3 vEye; - glm::vec3 vView; - glm::vec3 vUp; - gltf_get_camera_pos(&m_rHandle, &vEye,&vView,&vUp); - float fModelSize =(float)gltf_get_model_size(&m_rHandle); - - glm::vec3 vMove = vView-vEye; - vMove = glm::normalize(vMove); - vMove *= 25.0f; - glm::vec3 vStrafe = glm::cross(vMove, vUp); - vStrafe = glm::normalize(vStrafe); - vStrafe *= 25.0f; - glm::vec3 vMup = vUp * 25.0f; - - if( !m_bIsOrbitMode ) - { - if(nCode == KEY_E)vMoveBy += vMup*(0.0005f*fModelSize); - if(nCode == KEY_Q)vMoveBy -= vMup*(0.0005f*fModelSize); - if(nCode == KEY_W)vMoveBy += vMove*(0.0005f*fModelSize); - if(nCode == KEY_S)vMoveBy -= vMove*(0.0005f*fModelSize); - if(nCode == KEY_A)vMoveBy -= vStrafe*(0.0005f*fModelSize); - if(nCode == KEY_D)vMoveBy += vStrafe*(0.0005f*fModelSize); - } - else - { - bool bZoomIn = false; - bool bZoomOut = false; - if(nCode == KEY_E) - { - vMoveBy += vMove*(0.0005f*fModelSize); - bZoomIn = true; - } - if(nCode == KEY_Q) - { - vMoveBy -= vMove*(0.0005f*fModelSize); - bZoomOut = true; - } - - // Limit zooming in orbit mode - float fCameraDistFromModelGlobe = glm::length(vEye + vMoveBy - vView) - fModelSize / 2.0f; - if ((fCameraDistFromModelGlobe < 0.5 * fModelSize && bZoomIn ) || - (fCameraDistFromModelGlobe > 2 * fModelSize && bZoomOut )) - { - vMoveBy = glm::vec3(0.0); - } - } - } - gltf_renderer_move_camera(&m_rHandle, vMoveBy.x, vMoveBy.y, vMoveBy.z, 0.0001); - - if( m_bIsOrbitMode ) - { - long nDeltaX = 0; - long nDeltaY = 0; - if (nCode == KEY_W) - { - nDeltaY -= 1; - } - if (nCode == KEY_S) - { - nDeltaY += 1; - } - if (nCode == KEY_A) - { - nDeltaX -= 1; - } - if (nCode == KEY_D) - { - nDeltaX += 1; - } - float fSensitivity = 50.0; - gltf_renderer_rotate_model(&m_rHandle, nDeltaX*fSensitivity, nDeltaY*fSensitivity, 0.0); - } - } - else if(nCode == KEY_M) - { - if(m_bIsOrbitMode) - { - gltf_orbit_mode_stop(&m_rHandle); - m_bIsOrbitMode = false; - } - else - { - gltf_orbit_mode_start(&m_rHandle); - m_bIsOrbitMode = true; - } - } - else if(nCode == KEY_F) - { - gltf_render_FPS_enable(&m_rHandle); - } - } - } - else if( rEvent.GetId() == VclEventId::WindowMouseButtonDown ) - { - MouseEvent* pMouseEvt = static_cast<MouseEvent*>(rEvent.GetData()); - if(pMouseEvt && pMouseEvt->IsLeft() && pMouseEvt->GetClicks() == 1) - { - m_aLastMousePos = pMouseEvt->GetPosPixel(); - } - } - else if( rEvent.GetId() == VclEventId::WindowMouseMove ) - { - if ( !m_rEventHandler.HasFocus() ) - { - m_rEventHandler.GrabFocus(); - } - MouseEvent* pMouseEvt = static_cast<MouseEvent*>(rEvent.GetData()); - if(pMouseEvt && pMouseEvt->IsLeft() && m_aLastMousePos != Point(0,0)) - { - const Point& aCurPos = pMouseEvt->GetPosPixel(); - float fSensitivity = std::min(m_rHandle.viewport.width, m_rHandle.viewport.height); - if (fSensitivity == 0.0) - fSensitivity = 1.0; - else - fSensitivity = 540.0 / fSensitivity; - - - long nDeltaX = m_aLastMousePos.X()-aCurPos.X(); - long nDeltaY = m_aLastMousePos.Y()-aCurPos.Y(); - if( m_bIsOrbitMode ) - { - fSensitivity *= 5; - gltf_renderer_rotate_model(&m_rHandle, (float)nDeltaX*fSensitivity, (float)nDeltaY*fSensitivity, 0.0); - } - else - { - // Filter out too small deltas to avoid rewrite rotation parameter with 0 - // before rotation is done - if( nDeltaX != 0 || nDeltaY != 0 ) - gltf_renderer_rotate_camera(&m_rHandle, (float)nDeltaX*fSensitivity, (float)nDeltaY*fSensitivity, 0.0); - } - m_aLastMousePos = aCurPos; - } - } - else if( rEvent.GetId() == VclEventId::WindowMouseButtonUp ) - { - MouseEvent* pMouseEvt = static_cast<MouseEvent*>(rEvent.GetData()); - if(pMouseEvt && pMouseEvt->IsLeft() && pMouseEvt->GetClicks() == 1) - { - m_aLastMousePos = Point(0,0); - } - } -} - -} // namespace ogl -} // namespace avmedia - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/opengl/oglwindow.hxx b/avmedia/source/opengl/oglwindow.hxx deleted file mode 100644 index 5bb405979e37..000000000000 --- a/avmedia/source/opengl/oglwindow.hxx +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- 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/. - */ - -#ifndef INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLWINDOW_HXX -#define INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLWINDOW_HXX - -#include "oglplayer.hxx" - -#include <cppuhelper/implbase.hxx> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/media/XPlayerWindow.hpp> -#include <com/sun/star/media/ZoomLevel.hpp> - -#include <libgltf.h> - -#include <vcl/opengl/OpenGLContext.hxx> -#include <vcl/syschild.hxx> - -namespace avmedia { namespace ogl { - -class OGLWindow : public ::cppu::WeakImplHelper< css::media::XPlayerWindow, css::lang::XServiceInfo > -{ -public: - OGLWindow( libgltf::glTFHandle& rHandle, const rtl::Reference<OpenGLContext> & rContext, vcl::Window& rEventHandlerParent ); - virtual ~OGLWindow() override; - - virtual void SAL_CALL update() override; - virtual sal_Bool SAL_CALL setZoomLevel( css::media::ZoomLevel ZoomLevel ) override; - virtual css::media::ZoomLevel SAL_CALL getZoomLevel() override; - virtual void SAL_CALL setPointerType( sal_Int32 SystemPointerType ) override; - - virtual OUString SAL_CALL getImplementationName() override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; - - virtual void SAL_CALL dispose() final override; - virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override; - virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override; - - virtual void SAL_CALL setPosSize( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nFlags ) override; - virtual css::awt::Rectangle SAL_CALL getPosSize() override; - virtual void SAL_CALL setVisible( sal_Bool Visible ) override; - virtual void SAL_CALL setEnable( sal_Bool Enable ) override; - virtual void SAL_CALL setFocus() override; - virtual void SAL_CALL addWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override; - virtual void SAL_CALL removeWindowListener( const css::uno::Reference< css::awt::XWindowListener >& xListener ) override; - virtual void SAL_CALL addFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override; - virtual void SAL_CALL removeFocusListener( const css::uno::Reference< css::awt::XFocusListener >& xListener ) override; - virtual void SAL_CALL addKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override; - virtual void SAL_CALL removeKeyListener( const css::uno::Reference< css::awt::XKeyListener >& xListener ) override; - virtual void SAL_CALL addMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override; - virtual void SAL_CALL removeMouseListener( const css::uno::Reference< css::awt::XMouseListener >& xListener ) override; - virtual void SAL_CALL addMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override; - virtual void SAL_CALL removeMouseMotionListener( const css::uno::Reference< css::awt::XMouseMotionListener >& xListener ) override; - virtual void SAL_CALL addPaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override; - virtual void SAL_CALL removePaintListener( const css::uno::Reference< css::awt::XPaintListener >& xListener ) override; - -private: - DECL_LINK( FocusGrabber, VclWindowEvent&, void ); - DECL_LINK( CameraHandler, VclWindowEvent&, void ); - - libgltf::glTFHandle& m_rHandle; - rtl::Reference<OpenGLContext> m_xContext; - vcl::Window& m_rEventHandler; - - bool m_bVisible; - Point m_aLastMousePos; - bool m_bIsOrbitMode; -}; - -} // namespace ogl -} // namespace avmedia - -#endif // INCLUDED_AVMEDIA_SOURCE_OPENGL_OGLWINDOW_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index 004d56f1f7d6..f5d77615fb1e 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -69,13 +69,6 @@ MediaChildWindow::MediaChildWindow(vcl::Window* pParent) { } -#if HAVE_FEATURE_GLTF -MediaChildWindow::MediaChildWindow(vcl::Window* pParent, SystemWindowData* pData) - : SystemChildWindow(pParent, WB_CLIPCHILDREN, pData) -{ -} -#endif - void MediaChildWindow::MouseMove( const MouseEvent& rMEvt ) { const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ), @@ -223,14 +216,6 @@ uno::Reference<media::XPlayer> MediaWindowImpl::createPlayer(const OUString& rUR xPlayer = createPlayer(rURL, aServiceName, xContext); } } -#if HAVE_FEATURE_GLTF -#if HAVE_FEATURE_OPENGL - else if ( *pMimeType == AVMEDIA_MIMETYPE_JSON ) - { - xPlayer = createPlayer(rURL, AVMEDIA_OPENGL_MANAGER_SERVICE_NAME, xContext); - } -#endif -#endif return xPlayer; } @@ -442,15 +427,6 @@ void MediaWindowImpl::onURLChanged() mpChildWindow.disposeAndClear(); mpChildWindow.reset(VclPtr<MediaChildWindow>::Create(this)); } -#if HAVE_FEATURE_GLTF - else if (m_sMimeType == AVMEDIA_MIMETYPE_JSON) - { - SystemWindowData aWinData = OpenGLContext::Create()->generateWinData(this, false); - mpChildWindow.disposeAndClear(); - mpChildWindow.reset(VclPtr<MediaChildWindow>::Create(this,&aWinData)); - mbEventTransparent = false; - } -#endif if (!mpChildWindow) return; mpChildWindow->SetHelpId(HID_AVMEDIA_PLAYERWINDOW); diff --git a/config_host.mk.in b/config_host.mk.in index f602bbc0802d..13cef74e5216 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -65,8 +65,6 @@ export CLUCENE_CFLAGS=$(gb_SPACE)@CLUCENE_CFLAGS@ export CLUCENE_LIBS=$(gb_SPACE)@CLUCENE_LIBS@ export LIBCMIS_CFLAGS=$(gb_SPACE)@LIBCMIS_CFLAGS@ export LIBCMIS_LIBS=$(gb_SPACE)@LIBCMIS_LIBS@ -export COLLADA2GLTF_CFLAGS=$(gb_SPACE)@COLLADA2GLTF_CFLAGS@ -export COLLADA2GLTF_LIBS=$(gb_SPACE)@COLLADA2GLTF_LIBS@ export COM=@COM@ export COMMONS_LOGGING_JAR=@COMMONS_LOGGING_JAR@ export COMMONS_LOGGING_VERSION=@COMMONS_LOGGING_VERSION@ @@ -116,7 +114,6 @@ export ENABLE_COINMP=@ENABLE_COINMP@ export SYSTEM_COINMP=@SYSTEM_COINMP@ export COINMP_CFLAGS=@COINMP_CFLAGS@ export COINMP_LIBS=@COINMP_LIBS@ -export ENABLE_COLLADA=@ENABLE_COLLADA@ export ENABLE_CUPS=@ENABLE_CUPS@ export ENABLE_CURL=@ENABLE_CURL@ export ENABLE_FUZZERS=@ENABLE_FUZZERS@ @@ -130,10 +127,6 @@ export ENABLE_EVOAB2=@ENABLE_EVOAB2@ export ENABLE_FIREBIRD_SDBC=@ENABLE_FIREBIRD_SDBC@ export ENABLE_FORMULA_LOGGER=@ENABLE_FORMULA_LOGGER@ export ENABLE_GIO=@ENABLE_GIO@ -export ENABLE_GLTF=@ENABLE_GLTF@ -export SYSTEM_LIBGLTF=@SYSTEM_LIBGLTF@ -export LIBGLTF_CFLAGS=@LIBGLTF_CFLAGS@ -export LIBGLTF_LIBS=@LIBGLTF_LIBS@ export ENABLE_GSTREAMER_0_10=@ENABLE_GSTREAMER_0_10@ export ENABLE_GSTREAMER_1_0=@ENABLE_GSTREAMER_1_0@ export ENABLE_GTK3=@ENABLE_GTK3@ @@ -419,8 +412,6 @@ export OFFICEOTRON=@OFFICEOTRON@ export BFFVALIDATOR=@BFFVALIDATOR@ export OOO_JUNIT_JAR=@OOO_JUNIT_JAR@ export OOO_VENDOR=@OOO_VENDOR@ -export OPENCOLLADA_CFLAGS=$(gb_SPACE)@OPENCOLLADA_CFLAGS@ -export OPENCOLLADA_LIBS=$(gb_SPACE)@OPENCOLLADA_LIBS@ export OPENSSL_CFLAGS=$(gb_SPACE)@OPENSSL_CFLAGS@ export OPENSSL_LIBS=$(gb_SPACE)@OPENSSL_LIBS@ export ORCUS_CFLAGS=$(gb_SPACE)@ORCUS_CFLAGS@ @@ -501,7 +492,6 @@ export SYSTEM_BSH=@SYSTEM_BSH@ export SYSTEM_BZIP2=@SYSTEM_BZIP2@ export SYSTEM_CAIRO=@SYSTEM_CAIRO@ export SYSTEM_CLUCENE=@SYSTEM_CLUCENE@ -export SYSTEM_COLLADA2GLTF=@SYSTEM_COLLADA2GLTF@ export SYSTEM_CPPUNIT=@SYSTEM_CPPUNIT@ export SYSTEM_CURL=@SYSTEM_CURL@ export SYSTEM_DICTS=@SYSTEM_DICTS@ @@ -552,7 +542,6 @@ export SYSTEM_NEON=@SYSTEM_NEON@ export SYSTEM_NSS=@SYSTEM_NSS@ export SYSTEM_ODBC_HEADERS=@SYSTEM_ODBC_HEADERS@ export SYSTEM_ODFGEN=@SYSTEM_ODFGEN@ -export SYSTEM_OPENCOLLADA=@SYSTEM_OPENCOLLADA@ export SYSTEM_OPENLDAP=@SYSTEM_OPENLDAP@ export SYSTEM_OPENSSL=@SYSTEM_OPENSSL@ export SYSTEM_PAGEMAKER=@SYSTEM_PAGEMAKER@ diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in index 9c8dff7a603b..75845dcf3286 100644 --- a/config_host/config_features.h.in +++ b/config_host/config_features.h.in @@ -145,16 +145,6 @@ #define HAVE_BFFVALIDATOR 0 /* - * Whether we have glTF support. - */ -#define HAVE_FEATURE_GLTF 0 - -/* - * Whether we have COLLADA support. - */ -#define HAVE_FEATURE_COLLADA 0 - -/* * Whether we support breakpad as crash reporting lib. */ #define HAVE_FEATURE_BREAKPAD 0 diff --git a/configure.ac b/configure.ac index 309ccb06b36c..5535fa48bce5 100644 --- a/configure.ac +++ b/configure.ac @@ -1390,14 +1390,6 @@ AC_ARG_ENABLE(library-bin-tar, for the next time.]), ) -libo_FUZZ_ARG_ENABLE(gltf, - AS_HELP_STRING([--disable-gltf], - [Determines whether to build libraries related to glTF 3D model rendering.])) - -libo_FUZZ_ARG_ENABLE(collada, - AS_HELP_STRING([--disable-collada], - [Disable collada support (Rendering 3D models stored in *.dae and *.kmz format).])) - AC_ARG_ENABLE(dconf, AS_HELP_STRING([--disable-dconf], [Disable the dconf configuration backend (enabled by default where @@ -1580,11 +1572,6 @@ AC_ARG_WITH(system-jpeg, [Use jpeg already on system.]),, [with_system_jpeg="$with_system_libs"]) -AC_ARG_WITH(system-libgltf, - AS_HELP_STRING([--with-system-libgltf], - [Use libgltf already on system.]),, - [with_system_libgltf="$with_system_libs"]) - AC_ARG_WITH(system-clucene, AS_HELP_STRING([--with-system-clucene], [Use clucene already on system.]),, @@ -1610,16 +1597,6 @@ AC_ARG_WITH(system-ucpp, [Use ucpp already on system.]),, []) -AC_ARG_WITH(system-opencollada, - AS_HELP_STRING([--with-system-opencollada], - [Use openCOLLADA already on system.]),, - [with_system_opencollada=no]) - -AC_ARG_WITH(system-collada2gltf, - AS_HELP_STRING([--with-system-collada2gltf], - [Use collada2gltf already on system.]),, - [with_system_collada2gltf=no]) - AC_ARG_WITH(system-openldap, AS_HELP_STRING([--with-system-openldap], [Use the OpenLDAP LDAP SDK already on system.]),, @@ -3746,11 +3723,6 @@ if test -n "$enable_dbgutil" -a "$enable_dbgutil" != "no"; then else with_system_libcmis=no fi - if test "$with_system_libgltf" = "yes"; then - AC_MSG_ERROR([--with-system-libgltf conflicts with --enable-dbgutil]) - else - with_system_libgltf=no - fi if test "$with_system_hunspell" = "yes"; then AC_MSG_ERROR([--with-system-hunspell conflicts with --enable-dbgutil]) else @@ -10043,112 +10015,9 @@ if test $_os != iOS -a $_os != Android; then AC_DEFINE(HAVE_FEATURE_OPENCL) fi -dnl =================================================================== -dnl Check whether to enable glTF support -dnl =================================================================== -AC_MSG_CHECKING([whether to enable glTF support]) -ENABLE_GLTF= -if test "x$enable_gltf" != "xno" -a $_os != iOS -a $_os != Android -a "$ENABLE_HEADLESS" = ""; then - ENABLE_GLTF=TRUE - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_FEATURE_GLTF,1) - if test "$with_system_libgltf" = "yes"; then - SYSTEM_LIBGLTF=TRUE - PKG_CHECK_MODULES( LIBGLTF, [libgltf-0.1 >= 0.1.0] ) - FilterLibs "${LIBGLTF_LIBS}" - LIBGLTF_LIBS="${filteredlibs}" - else - BUILD_TYPE="$BUILD_TYPE LIBGLTF" - fi -else - AC_MSG_RESULT([no]) -fi -AC_SUBST(ENABLE_GLTF) -AC_SUBST(SYSTEM_LIBGLTF) -AC_SUBST(LIBGLTF_CFLAGS) -AC_SUBST(LIBGLTF_LIBS) - -dnl =================================================================== -dnl Check whether to enable COLLADA support -dnl =================================================================== -AC_MSG_CHECKING([whether to enable COLLADA support]) -ENABLE_COLLADA= -if test "$enable_collada" != "no" -a "$ENABLE_GLTF" = "TRUE"; then - AC_MSG_RESULT([yes]) - ENABLE_COLLADA=TRUE - AC_DEFINE(HAVE_FEATURE_COLLADA,1) - - AC_MSG_CHECKING([which OPENCOLLADA to use]) - if test "$with_system_opencollada" = "yes"; then - AC_MSG_RESULT([external]) - SYSTEM_OPENCOLLADA=TRUE - AS_IF([test -n "$OPENCOLLADA_CFLAGS"],[],[AC_MSG_ERROR([export OPENCOLLADA_CFLAGS])]) - AS_IF([test -n "$OPENCOLLADA_LIBS"],[],[AC_MSG_ERROR([export OPENCOLLADA_LIBS])]) - AC_LANG_PUSH([C++]) - save_CXXFLAGS=$CXXFLAGS - save_CPPFLAGS=$CPPFLAGS - CXXFLAGS="$CXXFLAGS $OPENCOLLADA_CFLAGS" - CPPFLAGS="$CPPFLAGS $OPENCOLLADA_CFLAGS" - AC_CHECK_HEADERS( - COLLADABU.h \ - COLLADAFW.h \ - COLLADASaxFWLLoader.h \ - GeneratedSaxParser.h, - [], - [AC_MSG_ERROR([openCOLLADA headers not found. Install openCOLLADA])], - []) - CXXFLAGS=$save_CXXFLAGS - CPPFLAGS=$save_CPPFLAGS - AC_LANG_POP([C++]) - OPENCOLLADA_CFLAGS=$(printf '%s' "$OPENCOLLADA_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g") - FilterLibs "${OPENCOLLADA_LIBS}" - OPENCOLLADA_LIBS="${filteredlibs}" - else - AC_MSG_RESULT([internal]) - BUILD_TYPE="$BUILD_TYPE OPENCOLLADA" - fi - - AC_MSG_CHECKING([which collada2gltf to use]) - if test "$with_system_collada2gltf" = "yes"; then - if test "$with_system_opencollada" = "no"; then - AC_MSG_ERROR([the combination of system collada2gltf and internal openCOLLADA is not allowed]) - fi - AC_MSG_RESULT([external]) - SYSTEM_COLLADA2GLTF=TRUE - AS_IF([test -n "$COLLADA2GLTF_CFLAGS"],[],[AC_MSG_ERROR([export COLLADA2GLTF_CFLAGS])]) - AS_IF([test -n "$COLLADA2GLTF_LIBS"],[],[AC_MSG_ERROR([export COLLADA2GLTF_LIBS])]) - AC_LANG_PUSH([C++]) - save_CXXFLAGS=$CXXFLAGS - save_CPPFLAGS=$CPPFLAGS - CXXFLAGS="$CXXFLAGS $COLLADA2GLTF_CFLAGS $OPENCOLLADA_CFLAGS $CXXFLAGS_CXX11" - CPPFLAGS="$CPPFLAGS $COLLADA2GLTF_CFLAGS $OPENCOLLADA_CFLAGS $CXXFLAGS_CXX11" - AC_CHECK_HEADERS( - GLTF.h \ - encodingHelpers.h, - [], - [AC_MSG_ERROR([collada2gltf headers not found. Install collada2gltf])], - []) - CXXFLAGS=$save_CXXFLAGS - CPPFLAGS=$save_CPPFLAGS - AC_LANG_POP([C++]) - COLLADA2GLTF_CFLAGS=$(printf '%s' "$COLLADA2GLTF_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g") - FilterLibs "${COLLADA2GLTF_LIBS}" - COLLADA2GLTF_LIBS="${filteredlibs}" - else - AC_MSG_RESULT([internal]) - BUILD_TYPE="$BUILD_TYPE COLLADA2GLTF" - fi -else - AC_MSG_RESULT([no]) -fi -AC_SUBST(ENABLE_COLLADA) -AC_SUBST([OPENCOLLADA_CFLAGS]) -AC_SUBST([OPENCOLLADA_LIBS]) -AC_SUBST([SYSTEM_OPENCOLLADA]) - -AC_SUBST([COLLADA2GLTF_CFLAGS]) -AC_SUBST([COLLADA2GLTF_LIBS]) -AC_SUBST([SYSTEM_COLLADA2GLTF]) +dnl ================================================= +dnl Check whether to build with dconf support. +dnl ================================================= if test "$enable_dconf" != no; then PKG_CHECK_MODULES([DCONF], [dconf >= 0.15.2], [], [ diff --git a/distro-configs/LibreOfficeFlatpak.conf b/distro-configs/LibreOfficeFlatpak.conf index e046ce648deb..99cce2765702 100644 --- a/distro-configs/LibreOfficeFlatpak.conf +++ b/distro-configs/LibreOfficeFlatpak.conf @@ -21,7 +21,6 @@ --without-system-libetonyek --without-system-libexttextcat --without-system-libfreehand ---without-system-libgltf --without-system-liblangtag --without-system-libmspub --without-system-libmwaw diff --git a/distro-configs/LibreOfficeOssFuzz.conf b/distro-configs/LibreOfficeOssFuzz.conf index 11468f186337..a35bcd62d892 100644 --- a/distro-configs/LibreOfficeOssFuzz.conf +++ b/distro-configs/LibreOfficeOssFuzz.conf @@ -11,10 +11,8 @@ --disable-firebird-sdbc --disable-coinmp --disable-lpsolve ---disable-gltf --disable-gio --disable-dconf ---disable-collada --disable-dbus --disable-cups --disable-odk diff --git a/download.lst b/download.lst index 20d1cb4be7a7..095ea5ef32a7 100644 --- a/download.lst +++ b/download.lst @@ -24,8 +24,6 @@ export LIBCMIS_SHA256SUM := 6acbdf22ecdbaba37728729b75bfc085ee5a4b49a6024757cfb8 export LIBCMIS_TARBALL := libcmis-0.5.1.tar.gz export COINMP_SHA256SUM := 86c798780b9e1f5921fe4efe651a93cb420623b45aa1fdff57af8c37f116113f export COINMP_TARBALL := CoinMP-1.7.6.tgz -export COLLADA2GLTF_SHA256SUM := b0adb8e71aef80751b999c9c055e419a625c4a05184e407aef2aee28752ad8cb -export COLLADA2GLTF_TARBALL := 4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2 export CPPUNIT_SHA256SUM := 3d569869d27b48860210c758c4f313082103a5e58219a7669b52bfd29d674780 export CPPUNIT_TARBALL := cppunit-1.14.0.tar.gz export CT2N_SHA256SUM := 71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3 @@ -133,8 +131,6 @@ export LIBEOT_SHA256SUM := cf5091fa8e7dcdbe667335eb90a2cfdd0a3fe8f8c7c8d1ece44d9 export LIBEOT_TARBALL := libeot-0.01.tar.bz2 export LIBEXTTEXTCAT_SHA256SUM := 13fdbc9d4c489a4d0519e51933a1aa21fe3fb9eb7da191b87f7a63e82797dac8 export LIBEXTTEXTCAT_TARBALL := libexttextcat-3.4.5.tar.xz -export LIBGLTF_SHA256SUM := 119e730fbf002dd0eaafa4930167267d7d910aa17f29979ca9ca8b66625fd2da -export LIBGLTF_TARBALL := libgltf-0.1.0.tar.gz export LIBGPGERROR_SHA256SUM := 4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2 export LIBGPGERROR_TARBALL := libgpg-error-1.27.tar.bz2 export LIBLANGTAG_SHA256SUM := d6242790324f1432fb0a6fae71b6851f520b2c5a87675497cf8ea14c2924d52e @@ -176,8 +172,6 @@ export ODFVALIDATOR_SHA256SUM := aa8896eef3adbd6b54d4ec1817c1bc3871cce99120faf26 export ODFVALIDATOR_JAR := odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies+ODFTOOLKIT-460+ODFTOOLKIT-461.jar export OFFICEOTRON_SHA256SUM := f2443f27561af52324eee03a1892d9f569adc8db9e7bca55614898bc2a13a770 export OFFICEOTRON_JAR := 8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar -export OPENCOLLADA_SHA256SUM := 8f25d429237cde289a448c82a0a830791354ccce5ee40d77535642e46367d6c4 -export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2 export OPENLDAP_SHA256SUM := d7de6bf3c67009c95525dde3a0212cc110d0a70b92af2af8e3ee800e81b88400 export OPENLDAP_TARBALL := openldap-2.4.44.tgz export OPENSSL_SHA256SUM := 6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0 diff --git a/external/Module_external.mk b/external/Module_external.mk index 590e216b3c2b..8f87fe70a5b3 100644 --- a/external/Module_external.mk +++ b/external/Module_external.mk @@ -28,7 +28,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,CLUCENE,clucene) \ $(call gb_Helper_optional,LIBCMIS,libcmis) \ $(call gb_Helper_optional,COINMP,coinmp) \ - $(call gb_Helper_optional,COLLADA2GLTF,collada2gltf) \ $(call gb_Helper_optional,CPPUNIT,cppunit) \ $(call gb_Helper_optional,CT2N,ct2n) \ $(call gb_Helper_optional,CURL,curl) \ @@ -58,7 +57,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,LIBATOMIC_OPS,libatomic_ops) \ $(call gb_Helper_optional,LIBEOT,libeot) \ $(call gb_Helper_optional,LIBEXTTEXTCAT,libexttextcat) \ - $(call gb_Helper_optional,LIBGLTF,libgltf) \ $(call gb_Helper_optional,LIBGPGERROR,libgpg-error) \ $(call gb_Helper_optional,LIBLANGTAG,liblangtag) \ $(call gb_Helper_optional,LIBPNG,libpng) \ @@ -78,7 +76,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,NEON,neon) \ $(call gb_Helper_optional,NSS,nss) \ $(call gb_Helper_optional,ODFGEN,libodfgen) \ - $(call gb_Helper_optional,OPENCOLLADA,opencollada) \ $(call gb_Helper_optional,OPENLDAP,openldap) \ $(call gb_Helper_optional,OPENSSL,openssl) \ $(call gb_Helper_optional,ORCUS,liborcus) \ diff --git a/external/collada2gltf/GitSHA1.cpp b/external/collada2gltf/GitSHA1.cpp deleted file mode 100644 index af4286061349..000000000000 --- a/external/collada2gltf/GitSHA1.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#define GIT_SHA1 "cb1d97788a38d2928afb4622f6a25d012f0f8a54" -char g_GIT_SHA1[] = GIT_SHA1; diff --git a/external/collada2gltf/Makefile b/external/collada2gltf/Makefile deleted file mode 100644 index 569ad8a0ba7a..000000000000 --- a/external/collada2gltf/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# 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/. -# - -module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) - -include $(module_directory)/../../solenv/gbuild/partial_build.mk - -# vim: set noet sw=4 ts=4: diff --git a/external/collada2gltf/Module_collada2gltf.mk b/external/collada2gltf/Module_collada2gltf.mk deleted file mode 100644 index 789a8cb64530..000000000000 --- a/external/collada2gltf/Module_collada2gltf.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# 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/. -# - -$(eval $(call gb_Module_Module,collada2gltf)) - -$(eval $(call gb_Module_add_targets,collada2gltf,\ - StaticLibrary_collada2gltf \ - UnpackedTarball_collada2gltf \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/external/collada2gltf/README b/external/collada2gltf/README deleted file mode 100644 index 15060554b103..000000000000 --- a/external/collada2gltf/README +++ /dev/null @@ -1,4 +0,0 @@ -An open-source converter produces glTF assets from COLLADA using OpenCOLLADA. - -From: -[https://github.com/amd/glTF/tree/master/converter/COLLADA2GLTF]. diff --git a/external/collada2gltf/StaticLibrary_collada2gltf.mk b/external/collada2gltf/StaticLibrary_collada2gltf.mk deleted file mode 100644 index 03039976ea9d..000000000000 --- a/external/collada2gltf/StaticLibrary_collada2gltf.mk +++ /dev/null @@ -1,104 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# 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/. -# - -$(eval $(call gb_StaticLibrary_StaticLibrary,collada2gltf)) - -$(eval $(call gb_StaticLibrary_use_unpacked,collada2gltf,collada2gltf)) - -$(eval $(call gb_StaticLibrary_use_externals,collada2gltf, \ - opencollada_parser \ - libpng \ -)) - -$(eval $(call gb_StaticLibrary_set_warnings_not_errors,collada2gltf)) - -$(eval $(call gb_StaticLibrary_add_defs,collada2gltf,\ - -DUSE_OPEN3DGC \ -)) - -# collada2gltf has a lot of warnings, suppress them. -$(eval $(call gb_StaticLibrary_add_cxxflags,collada2gltf,\ - -w \ -)) -ifeq ($(COM),MSC) -$(eval $(call gb_StaticLibrary_add_defs,collada2gltf,\ - -D_CRT_SECURE_NO_WARNINGS \ - -EHsc \ -)) - -endif - -$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,collada2gltf,cpp)) - -$(eval $(call gb_StaticLibrary_set_include,collada2gltf,\ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf) \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/assetModifiers \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/convert \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/json/include/rapidjson \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/extensions/o3dgc-compression \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/GLTF \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/helpers \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/JSON \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/profiles/webgl-1.0 \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/shaders \ - $$(INCLUDE) \ -)) - -$(eval $(call gb_StaticLibrary_add_generated_exception_objects,collada2gltf,\ - UnpackedTarball/collada2gltf/COLLADA2GLTFWriter \ - UnpackedTarball/collada2gltf/GitSHA1 \ - UnpackedTarball/collada2gltf/GLTFOpenCOLLADAUtils \ - UnpackedTarball/collada2gltf/assetModifiers/GLTFFlipUVModifier \ - UnpackedTarball/collada2gltf/convert/meshConverter \ - UnpackedTarball/collada2gltf/convert/animationConverter \ - UnpackedTarball/collada2gltf/extensions/o3dgc-compression/GLTF-Open3DGC \ - UnpackedTarball/collada2gltf/GLTF/GLTFAccessor \ - UnpackedTarball/collada2gltf/GLTF/GLTFAccessorCache \ - UnpackedTarball/collada2gltf/GLTF/GLTFAsset \ - UnpackedTarball/collada2gltf/GLTF/GLTFAnimation \ - UnpackedTarball/collada2gltf/GLTF/GLTFBuffer \ - UnpackedTarball/collada2gltf/GLTF/GLTFConfig \ - UnpackedTarball/collada2gltf/GLTF/GLTFEffect \ - UnpackedTarball/collada2gltf/GLTF/GLTFExtraDataHandler \ - UnpackedTarball/collada2gltf/GLTF/GLTFInputStream \ - UnpackedTarball/collada2gltf/GLTF/GLTFMesh \ - UnpackedTarball/collada2gltf/GLTF/GLTFOutputStream \ - UnpackedTarball/collada2gltf/GLTF/GLTFPrimitive \ - UnpackedTarball/collada2gltf/GLTF/GLTFProfile \ - UnpackedTarball/collada2gltf/GLTF/GLTFSkin \ - UnpackedTarball/collada2gltf/GLTF/GLTFUtils \ - UnpackedTarball/collada2gltf/GLTF/GLTFWriter \ - UnpackedTarball/collada2gltf/helpers/geometryHelpers \ - UnpackedTarball/collada2gltf/helpers/mathHelpers \ - UnpackedTarball/collada2gltf/JSON/JSONArray \ - UnpackedTarball/collada2gltf/JSON/JSONNumber \ - UnpackedTarball/collada2gltf/JSON/JSONObject \ - UnpackedTarball/collada2gltf/JSON/JSONString \ - UnpackedTarball/collada2gltf/JSON/JSONValue \ - UnpackedTarball/collada2gltf/profiles/webgl-1.0/GLTFWebGL_1_0_Profile \ - UnpackedTarball/collada2gltf/shaders/commonProfileShaders \ -)) - -# o3dgc external library compiled from collada2gltf -$(eval $(call gb_StaticLibrary_set_include,collada2gltf,\ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/o3dgc/src/o3dgc_common_lib/inc \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/o3dgc/src/o3dgc_decode_lib/inc \ - -I$(call gb_UnpackedTarball_get_dir,collada2gltf)/dependencies/o3dgc/src/o3dgc_encode_lib/inc \ - $$(INCLUDE) \ -)) - -$(eval $(call gb_StaticLibrary_add_generated_exception_objects,collada2gltf,\ - UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/src/o3dgcArithmeticCodec \ - UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/src/o3dgcTools \ - UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/src/o3dgcTriangleFans \ - UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_decode_lib/src/o3dgcDynamicVectorDecoder \ - UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_encode_lib/src/o3dgcDynamicVectorEncoder \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/external/collada2gltf/UnpackedTarball_collada2gltf.mk b/external/collada2gltf/UnpackedTarball_collada2gltf.mk deleted file mode 100644 index e01ca53d287b..000000000000 --- a/external/collada2gltf/UnpackedTarball_collada2gltf.mk +++ /dev/null @@ -1,26 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# 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/. -# - -$(eval $(call gb_UnpackedTarball_UnpackedTarball,collada2gltf)) - -$(eval $(call gb_UnpackedTarball_set_tarball,collada2gltf,$(COLLADA2GLTF_TARBALL))) - -$(eval $(call gb_UnpackedTarball_add_file,collada2gltf,.,external/collada2gltf/GitSHA1.cpp)) - -$(eval $(call gb_UnpackedTarball_add_patches,collada2gltf,\ - external/collada2gltf/patches/wrong_uri_usage.patch.1 \ - external/collada2gltf/patches/collada2gltf.new-delete-mismatch.patch.1 \ - external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1 \ - external/collada2gltf/patches/collada2gltf.fix-memory-leak2.patch.1 \ - external/collada2gltf/patches/shader_compatibility.patch.1 \ - external/collada2gltf/patches/drop_tr1_support.patch.1 \ - external/collada2gltf/patches/collada2gltf.add-glsl-version.patch.1 \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/external/collada2gltf/patches/collada2gltf.add-glsl-version.patch.1 b/external/collada2gltf/patches/collada2gltf.add-glsl-version.patch.1 deleted file mode 100644 index 5da297836064..000000000000 --- a/external/collada2gltf/patches/collada2gltf.add-glsl-version.patch.1 +++ /dev/null @@ -1,13 +0,0 @@ -diff -ur collada2gltf.org/shaders/commonProfileShaders.cpp collada2gltf/shaders/commonProfileShaders.cpp ---- collada2gltf.org/shaders/commonProfileShaders.cpp 2014-11-26 22:05:07.445842977 +0100 -+++ collada2gltf/shaders/commonProfileShaders.cpp 2014-11-26 22:07:24.313844588 +0100 -@@ -367,7 +367,8 @@ - public: - - GLSLShader(shared_ptr <GLTFProfile> profile) { -- this->_declarations = "#ifdef GL_ES_VERSION_2_0\n"; -+ this->_declarations = "#version 130\n"; -+ this->_declarations += "#ifdef GL_ES_VERSION_2_0\n"; - this->_declarations += "precision highp float;\n"; - this->_declarations += "#endif\n"; - this->_body = "void main(void) {\n"; diff --git a/external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1 b/external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1 deleted file mode 100644 index a1fbee874263..000000000000 --- a/external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1 +++ /dev/null @@ -1,25 +0,0 @@ -diff -ur collada2gltf.org/shaders/commonProfileShaders.cpp collada2gltf/shaders/commonProfileShaders.cpp ---- collada2gltf.org/shaders/commonProfileShaders.cpp 2014-07-06 04:20:31.152197885 +0200 -+++ collada2gltf/shaders/commonProfileShaders.cpp 2014-07-06 04:27:21.681181083 +0200 -@@ -495,6 +495,10 @@ - this->_profile = profile; - this->_instanceProgram = new GLSLProgram(profile); - } -+ -+ ~Pass() { -+ delete _instanceProgram; -+ } - - GLSLProgram* instanceProgram() { - return this->_instanceProgram; -@@ -1188,6 +1192,10 @@ - fragmentShader->appendCode("}\n"); - - } -+ -+ ~Technique() { -+ delete _pass; -+ } - - shared_ptr <GLTF::JSONObject> parameters() { - return _parameters; diff --git a/external/collada2gltf/patches/collada2gltf.fix-memory-leak2.patch.1 b/external/collada2gltf/patches/collada2gltf.fix-memory-leak2.patch.1 deleted file mode 100644 index 81b4db86f016..000000000000 --- a/external/collada2gltf/patches/collada2gltf.fix-memory-leak2.patch.1 +++ /dev/null @@ -1,18 +0,0 @@ -diff -ur collada2gltf.org/COLLADA2GLTFWriter.cpp collada2gltf/COLLADA2GLTFWriter.cpp ---- collada2gltf.org/COLLADA2GLTFWriter.cpp 2014-07-06 06:42:01.305850400 +0200 -+++ collada2gltf/COLLADA2GLTFWriter.cpp 2014-07-06 06:45:57.000840753 +0200 -@@ -75,10 +75,13 @@ - - COLLADAFW::Root root(&this->_loader, this); - this->_loader.registerExtraDataCallbackHandler(this->_extraDataHandler); -- if (!root.loadDocument(asset->getInputFilePath())) -+ if (!root.loadDocument(asset->getInputFilePath())) { -+ delete _extraDataHandler; - return false; -+ } - - asset->write(); -+ delete _extraDataHandler; - - return true; - } diff --git a/external/collada2gltf/patches/collada2gltf.new-delete-mismatch.patch.1 b/external/collada2gltf/patches/collada2gltf.new-delete-mismatch.patch.1 deleted file mode 100644 index dd1344bc077b..000000000000 --- a/external/collada2gltf/patches/collada2gltf.new-delete-mismatch.patch.1 +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur collada2gltf.org/GLTF/GLTFAccessorCache.cpp collada2gltf/GLTF/GLTFAccessorCache.cpp ---- collada2gltf.org/GLTF/GLTFAccessorCache.cpp 2014-07-06 02:10:04.803518202 +0200 -+++ collada2gltf/GLTF/GLTFAccessorCache.cpp 2014-07-06 02:10:58.623515999 +0200 -@@ -22,7 +22,7 @@ - } - - GLTFAccessorCache::~GLTFAccessorCache() { -- delete this->m_pData; -+ delete[] this->m_pData; - } - - bool GLTFAccessorCache::operator<(const GLTFAccessorCache& rhs) const { diff --git a/external/collada2gltf/patches/drop_tr1_support.patch.1 b/external/collada2gltf/patches/drop_tr1_support.patch.1 deleted file mode 100644 index 0d15897b9d60..000000000000 --- a/external/collada2gltf/patches/drop_tr1_support.patch.1 +++ /dev/null @@ -1,403 +0,0 @@ -diff -urN -U 4 COLLADA2GLTF/assetModifiers/GLTFFlipUVModifier.cpp COLLADA2GLTF_/assetModifiers/GLTFFlipUVModifier.cpp ---- COLLADA2GLTF/assetModifiers/GLTFFlipUVModifier.cpp 2014-05-25 11:30:45.116840301 +0200 -+++ COLLADA2GLTF_/assetModifiers/GLTFFlipUVModifier.cpp 2014-09-29 14:35:52.315612818 +0200 -@@ -25,9 +25,6 @@ - #include "GLTFFlipUVModifier.h" - - using namespace rapidjson; --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - - namespace GLTF -diff -urN -U 4 COLLADA2GLTF/COLLADA2GLTFWriter.cpp COLLADA2GLTF_/COLLADA2GLTFWriter.cpp ---- COLLADA2GLTF/COLLADA2GLTFWriter.cpp 2014-05-25 11:30:45.111840284 +0200 -+++ COLLADA2GLTF_/COLLADA2GLTFWriter.cpp 2014-09-29 14:35:52.299612815 +0200 -@@ -35,9 +35,6 @@ - #include <algorithm> - - --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - using namespace COLLADAFW; - using namespace COLLADABU; -diff -urN -U 4 COLLADA2GLTF/convert/animationConverter.cpp COLLADA2GLTF_/convert/animationConverter.cpp ---- COLLADA2GLTF/convert/animationConverter.cpp 2014-05-25 11:30:45.116840301 +0200 -+++ COLLADA2GLTF_/convert/animationConverter.cpp 2014-09-29 14:35:52.315612818 +0200 -@@ -9,9 +9,6 @@ - #include "GLTF-Open3DGC.h" - - using namespace rapidjson; --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - - namespace GLTF -diff -urN -U 4 COLLADA2GLTF/convert/meshConverter.cpp COLLADA2GLTF_/convert/meshConverter.cpp ---- COLLADA2GLTF/convert/meshConverter.cpp 2014-05-25 11:30:45.117840304 +0200 -+++ COLLADA2GLTF_/convert/meshConverter.cpp 2014-09-29 14:35:52.311612817 +0200 -@@ -23,9 +23,6 @@ - //--- X3DGC - - using namespace rapidjson; --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - - -diff -urN -U 4 COLLADA2GLTF/extensions/o3dgc-compression/GLTF-Open3DGC.cpp COLLADA2GLTF_/extensions/o3dgc-compression/GLTF-Open3DGC.cpp ---- COLLADA2GLTF/extensions/o3dgc-compression/GLTF-Open3DGC.cpp 2014-05-25 11:30:45.143840389 +0200 -+++ COLLADA2GLTF_/extensions/o3dgc-compression/GLTF-Open3DGC.cpp 2014-09-29 14:35:52.299612815 +0200 -@@ -40,9 +40,6 @@ - - using namespace o3dgc; - using namespace rapidjson; --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - - namespace GLTF -diff -urN -U 4 COLLADA2GLTF/GLTF/GLTFAccessor.cpp COLLADA2GLTF_/GLTF/GLTFAccessor.cpp ---- COLLADA2GLTF/GLTF/GLTFAccessor.cpp 2014-05-25 11:30:45.111840284 +0200 -+++ COLLADA2GLTF_/GLTF/GLTFAccessor.cpp 2014-09-29 14:35:52.307612816 +0200 -@@ -27,9 +27,6 @@ - #include "GLTF.h" - - using namespace rapidjson; --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - - namespace GLTF -diff -urN -U 4 COLLADA2GLTF/GLTF/GLTFAnimation.cpp COLLADA2GLTF_/GLTF/GLTFAnimation.cpp ---- COLLADA2GLTF/GLTF/GLTFAnimation.cpp 2014-05-25 11:30:45.112840287 +0200 -+++ COLLADA2GLTF_/GLTF/GLTFAnimation.cpp 2014-09-29 14:35:52.311612817 +0200 -@@ -28,9 +28,6 @@ - - using namespace rapidjson; - using namespace rapidjson; --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - - namespace GLTF -diff -urN -U 4 COLLADA2GLTF/GLTF/GLTFAsset.cpp COLLADA2GLTF_/GLTF/GLTFAsset.cpp ---- COLLADA2GLTF/GLTF/GLTFAsset.cpp 2014-05-25 11:30:45.112840287 +0200 -+++ COLLADA2GLTF_/GLTF/GLTFAsset.cpp 2014-09-29 14:35:52.307612816 +0200 -@@ -7,9 +7,6 @@ - #include "geometryHelpers.h" - #include "../shaders/commonProfileShaders.h" - --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - - namespace GLTF -diff -urN -U 4 COLLADA2GLTF/GLTF/GLTFBuffer.cpp COLLADA2GLTF_/GLTF/GLTFBuffer.cpp ---- COLLADA2GLTF/GLTF/GLTFBuffer.cpp 2014-05-25 11:30:45.112840287 +0200 -+++ COLLADA2GLTF_/GLTF/GLTFBuffer.cpp 2014-09-29 14:35:52.303612815 +0200 -@@ -29,9 +29,6 @@ - - using namespace rapidjson; - using namespace rapidjson; --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - - namespace GLTF -diff -urN -U 4 COLLADA2GLTF/GLTF/GLTFConfig.cpp COLLADA2GLTF_/GLTF/GLTFConfig.cpp ---- COLLADA2GLTF/GLTF/GLTFConfig.cpp 2014-05-25 11:30:45.112840287 +0200 -+++ COLLADA2GLTF_/GLTF/GLTFConfig.cpp 2014-09-29 14:35:52.303612815 +0200 -@@ -24,9 +24,6 @@ - #include "GLTF.h" - - using namespace rapidjson; --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - - namespace GLTF -diff -urN -U 4 COLLADA2GLTF/GLTF/GLTFEffect.cpp COLLADA2GLTF_/GLTF/GLTFEffect.cpp ---- COLLADA2GLTF/GLTF/GLTFEffect.cpp 2014-05-25 11:30:45.113840291 +0200 -+++ COLLADA2GLTF_/GLTF/GLTFEffect.cpp 2014-09-29 14:35:52.307612816 +0200 -@@ -28,9 +28,6 @@ - #include "../shaders/commonProfileShaders.h" - - using namespace rapidjson; --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - - namespace GLTF -diff -urN -U 4 COLLADA2GLTF/GLTF/GLTFExtraDataHandler.cpp COLLADA2GLTF_/GLTF/GLTFExtraDataHandler.cpp ---- COLLADA2GLTF/GLTF/GLTFExtraDataHandler.cpp 2014-05-25 11:30:45.113840291 +0200 -+++ COLLADA2GLTF_/GLTF/GLTFExtraDataHandler.cpp 2014-09-29 14:35:52.299612815 +0200 -@@ -8,12 +8,9 @@ - - #include <vector> //FIXME: this should be included by OpenCOLLADA. - #include "../GLTFOpenCOLLADA.h" --#include "GLTFExtraDataHandler.h" - #include "GLTF.h" -+#include "GLTFExtraDataHandler.h" - --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - - namespace GLTF -diff -urN -U 4 COLLADA2GLTF/GLTF/GLTFExtraDataHandler.h COLLADA2GLTF_/GLTF/GLTFExtraDataHandler.h ---- COLLADA2GLTF/GLTF/GLTFExtraDataHandler.h 2014-05-25 11:30:45.113840291 +0200 -+++ COLLADA2GLTF_/GLTF/GLTFExtraDataHandler.h 2014-09-29 14:37:50.127630964 +0200 -@@ -6,14 +6,6 @@ - - #include "COLLADASaxFWLIExtraDataCallbackHandler.h" - --#if (defined(WIN32) || defined(_LIBCPP_VERSION) || __cplusplus > 199711L) --#include <memory> --#include <unordered_map> --#else --#include <tr1/memory> --#include <tr1/unordered_map> --#endif -- - namespace GLTF - { - class JSONObject; -diff -urN -U 4 COLLADA2GLTF/GLTF/GLTFExtras.cpp COLLADA2GLTF_/GLTF/GLTFExtras.cpp ---- COLLADA2GLTF/GLTF/GLTFExtras.cpp 2014-05-25 11:30:45.113840291 +0200 -+++ COLLADA2GLTF_/GLTF/GLTFExtras.cpp 2014-09-29 14:35:52.303612815 +0200 -@@ -24,9 +24,6 @@ - #include "GLTF.h" - - using namespace rapidjson; --#if __cplusplus <= 199711L --using namespace std::tr1; --#endif - using namespace std; - - namespace GLTF -diff -urN -U 4 COLLADA2GLTF/GLTF/GLTF.h COLLADA2GLTF_/GLTF/GLTF.h ---- COLLADA2GLTF/GLTF/GLTF.h 2014-05-25 11:30:45.111840284 +0200 -+++ COLLADA2GLTF_/GLTF/GLTF.h 2014-09-29 14:37:33.531629524 +0200 -@@ -42,13 +42,8 @@ - #include <cstddef> - #include <cstdint> - --#if (defined(WIN32) || defined(_LIBCPP_VERSION) || __cplusplus > 199711L) - #include <memory> - #include <unordered_map> --#else --#include <tr1/memory> --#include <tr1/unordered_map> --#endif - - // RapidJSON headers - #include "prettywriter.h" -diff -urN -U 4 COLLADA2GLTF/GLTF/GLTFInputStream.cpp COLLADA2GLTF_/GLTF/GLTFInputStream.cpp ---- COLLADA2GLTF/GLTF/GLTFInputStream.cpp 2014-05-25 11:30:45.113840291 +0200 -+++ COLLADA2GLTF_/GLTF/GLTFInputStream.cpp 2014-09-29 14:35:52.299612815 +0200 -@@ -23,9 +23,6 @@ - - #include "GLTF.h" - --#if __cplusplus <= 199711L ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits