Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 518664 | Differences between
and this patch

Collapse All | Expand All

(-)a/RepositoryExternal.mk (-1 / +5 lines)
Lines 3324-3329 endef Link Here
3324
3324
3325
endif # SYSTEN_LIBGLTF
3325
endif # SYSTEN_LIBGLTF
3326
3326
3327
ifeq ($(ENABLE_COLLADA),TRUE)
3328
3327
define gb_LinkTarget__use_opencollada_parser
3329
define gb_LinkTarget__use_opencollada_parser
3328
$(call gb_LinkTarget_set_include,$(1),\
3330
$(call gb_LinkTarget_set_include,$(1),\
3329
	-I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
3331
	-I$(call gb_UnpackedTarball_get_dir,opencollada)/COLLADABaseUtils/include \
Lines 3354-3360 $(call gb_LinkTarget_use_static_libraries,$(1),\ Link Here
3354
)
3356
)
3355
endef
3357
endef
3356
3358
3357
endif
3359
endif # ENABLE_COLLADA
3360
3361
endif # ENABLE_GLTF
3358
3362
3359
### Jars ############################################################
3363
### Jars ############################################################
3360
3364
(-)a/avmedia/Library_avmedia.mk (-4 / +1 lines)
Lines 52-58 $(eval $(call gb_Library_add_exception_objects,avmedia,\ Link Here
52
))
52
))
53
endif
53
endif
54
54
55
ifneq (,$(filter COLLADA2GLTF,$(BUILD_TYPE)))
55
ifeq ($(ENABLE_COLLADA),TRUE)
56
$(eval $(call gb_Library_set_warnings_not_errors,avmedia))
56
$(eval $(call gb_Library_set_warnings_not_errors,avmedia))
57
57
58
ifeq ($(OS),LINUX)
58
ifeq ($(OS),LINUX)
Lines 68-76 $(eval $(call gb_Library_use_externals,avmedia,\ Link Here
68
	png \
68
	png \
69
))
69
))
70
70
71
$(eval $(call gb_Library_add_defs,avmedia,\
72
	-DENABLE_COLLADA2GLTF \
73
))
74
endif
71
endif
75
72
76
$(eval $(call gb_Library_add_exception_objects,avmedia,\
73
$(eval $(call gb_Library_add_exception_objects,avmedia,\
(-)a/avmedia/source/framework/modeltools.cxx (-3 / +6 lines)
Lines 29-35 Link Here
29
#include <boost/foreach.hpp>
29
#include <boost/foreach.hpp>
30
#include <boost/optional.hpp>
30
#include <boost/optional.hpp>
31
31
32
#ifdef ENABLE_COLLADA2GLTF
32
#include <config_features.h>
33
34
#if HAVE_FEATURE_COLLADA
33
#include <COLLADA2GLTFWriter.h>
35
#include <COLLADA2GLTFWriter.h>
34
#include <GLTFAsset.h>
36
#include <GLTFAsset.h>
35
#endif
37
#endif
Lines 42-48 using namespace boost::property_tree; Link Here
42
44
43
namespace avmedia {
45
namespace avmedia {
44
46
45
#ifdef ENABLE_COLLADA2GLTF
47
#if HAVE_FEATURE_COLLADA
46
48
47
static void lcl_UnzipKmz(const OUString& rSourceURL, const OUString& rOutputFolderURL, OUString& o_rDaeFileURL)
49
static void lcl_UnzipKmz(const OUString& rSourceURL, const OUString& rOutputFolderURL, OUString& o_rDaeFileURL)
48
{
50
{
Lines 242-248 bool Embed3DModel( const uno::Reference<frame::XModel>& xModel, Link Here
242
        const OUString& rSourceURL, OUString& o_rEmbeddedURL)
244
        const OUString& rSourceURL, OUString& o_rEmbeddedURL)
243
{
245
{
244
    OUString sSource = rSourceURL;
246
    OUString sSource = rSourceURL;
245
#ifdef ENABLE_COLLADA2GLTF
247
248
#if HAVE_FEATURE_COLLADA
246
    if( !rSourceURL.endsWithIgnoreAsciiCase(".json") )
249
    if( !rSourceURL.endsWithIgnoreAsciiCase(".json") )
247
        KmzDae2Gltf(rSourceURL, sSource);
250
        KmzDae2Gltf(rSourceURL, sSource);
248
#endif
251
#endif
(-)a/config_host.mk.in (+1 lines)
Lines 109-114 export ENABLE_CAIRO_CANVAS=@ENABLE_CAIRO_CANVAS@ Link Here
109
export ENABLE_CHART_TESTS=@ENABLE_CHART_TESTS@
109
export ENABLE_CHART_TESTS=@ENABLE_CHART_TESTS@
110
export ENABLE_CMIS=@ENABLE_CMIS@
110
export ENABLE_CMIS=@ENABLE_CMIS@
111
export ENABLE_COINMP=@ENABLE_COINMP@
111
export ENABLE_COINMP=@ENABLE_COINMP@
112
export ENABLE_COLLADA=@ENABLE_COLLADA@
112
export ENABLE_CRASHDUMP=@ENABLE_CRASHDUMP@
113
export ENABLE_CRASHDUMP=@ENABLE_CRASHDUMP@
113
export ENABLE_CUPS=@ENABLE_CUPS@
114
export ENABLE_CUPS=@ENABLE_CUPS@
114
export ENABLE_CURL=@ENABLE_CURL@
115
export ENABLE_CURL=@ENABLE_CURL@
(-)a/config_host/config_features.h.in (+5 lines)
Lines 142-145 Link Here
142
 */
142
 */
143
#define HAVE_FEATURE_GLTF 0
143
#define HAVE_FEATURE_GLTF 0
144
144
145
/*
146
 * Whether we have COLLADA support.
147
 */
148
#define HAVE_FEATURE_COLLADA 0
149
145
#endif
150
#endif
(-)a/configure.ac (-4 / +19 lines)
Lines 1395-1400 AC_ARG_ENABLE(gltf, Link Here
1395
    AS_HELP_STRING([--disable-gltf],
1395
    AS_HELP_STRING([--disable-gltf],
1396
        [Determines whether to build libraries related to glTF 3D model rendering.]))
1396
        [Determines whether to build libraries related to glTF 3D model rendering.]))
1397
1397
1398
AC_ARG_ENABLE(collada,
1399
    AS_HELP_STRING([--disable-collada],
1400
        [Disable collada support (Rendering 3D models stored in *.dae and *.kmz format).]))
1401
1398
dnl ===================================================================
1402
dnl ===================================================================
1399
dnl Optional Packages (--with/without-)
1403
dnl Optional Packages (--with/without-)
1400
dnl ===================================================================
1404
dnl ===================================================================
Lines 10572-10581 if test "x$enable_gltf" != "xno" -a $_os != Darwin -a $_os != iOS -a $_os != And Link Here
10572
    else
10576
    else
10573
    	BUILD_TYPE="$BUILD_TYPE LIBGLTF"
10577
    	BUILD_TYPE="$BUILD_TYPE LIBGLTF"
10574
    fi
10578
    fi
10575
    # otherwise build fails in collada2gltf external because of std::shared_ptr
10576
    if test "$have_std_shared_ptr" = "yes"; then
10577
        BUILD_TYPE="$BUILD_TYPE COLLADA2GLTF"
10578
    fi
10579
else
10579
else
10580
    AC_MSG_RESULT([no])
10580
    AC_MSG_RESULT([no])
10581
fi
10581
fi
Lines 10584-10589 AC_SUBST(SYSTEM_LIBGLTF) Link Here
10584
AC_SUBST(LIBGLTF_CFLAGS)
10584
AC_SUBST(LIBGLTF_CFLAGS)
10585
AC_SUBST(LIBGLTF_LIBS)
10585
AC_SUBST(LIBGLTF_LIBS)
10586
10586
10587
dnl ===================================================================
10588
dnl Check whether to enable COLLADA support
10589
dnl ===================================================================
10590
AC_MSG_CHECKING([whether to enable COLLADA support])
10591
ENABLE_COLLADA=
10592
if test "$enable_collada" != "no" -a "$ENABLE_GLTF" = "TRUE" -a "$have_std_shared_ptr" = "yes"; then
10593
    AC_MSG_RESULT([yes])
10594
    ENABLE_COLLADA=TRUE
10595
    AC_DEFINE(HAVE_FEATURE_COLLADA,1)
10596
    BUILD_TYPE="$BUILD_TYPE COLLADA2GLTF"
10597
else
10598
    AC_MSG_RESULT([no])
10599
fi
10600
AC_SUBST(ENABLE_COLLADA)
10601
10587
# pdf import?
10602
# pdf import?
10588
AC_MSG_CHECKING([whether to build the PDF import feature])
10603
AC_MSG_CHECKING([whether to build the PDF import feature])
10589
ENABLE_PDFIMPORT=
10604
ENABLE_PDFIMPORT=
(-)a/include/avmedia/modeltools.hxx (+4 lines)
Lines 11-19 Link Here
11
#include <com/sun/star/frame/XModel.hpp>
11
#include <com/sun/star/frame/XModel.hpp>
12
#include <avmedia/avmediadllapi.h>
12
#include <avmedia/avmediadllapi.h>
13
13
14
#include <config_features.h>
15
14
namespace avmedia {
16
namespace avmedia {
15
17
18
#if HAVE_FEATURE_COLLADA
16
bool KmzDae2Gltf(const OUString& rSourceURL, OUString& o_rOutput);
19
bool KmzDae2Gltf(const OUString& rSourceURL, OUString& o_rOutput);
20
#endif
17
21
18
bool AVMEDIA_DLLPUBLIC Embed3DModel(
22
bool AVMEDIA_DLLPUBLIC Embed3DModel(
19
    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& xModel,
23
    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& xModel,
(-)a/sd/source/ui/func/fuinsert.cxx (-1 / +9 lines)
Lines 789-798 void FuInsert3DModel::DoExecute( SfxRequest& ) Link Here
789
    sfx2::FileDialogHelper aDlg( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
789
    sfx2::FileDialogHelper aDlg( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
790
790
791
    aDlg.SetTitle( "Insert 3D Model" );
791
    aDlg.SetTitle( "Insert 3D Model" );
792
793
#if HAVE_FEATURE_COLLADA
792
    aDlg.AddFilter( "All supported formats", "*.json;*.dae;*.kmz"  );
794
    aDlg.AddFilter( "All supported formats", "*.json;*.dae;*.kmz"  );
795
#else
796
    aDlg.AddFilter( "All supported formats", "*.json"  );
797
#endif
798
793
    aDlg.AddFilter( "JSON - GL Transmission Format", "*.json" );
799
    aDlg.AddFilter( "JSON - GL Transmission Format", "*.json" );
800
801
#if HAVE_FEATURE_COLLADA
794
    aDlg.AddFilter( "DAE - COLLADA", "*.dae" );
802
    aDlg.AddFilter( "DAE - COLLADA", "*.dae" );
795
    aDlg.AddFilter( "KMZ - Keyhole Markup language Zipped", "*.kmz"  );
803
    aDlg.AddFilter( "KMZ - Keyhole Markup language Zipped", "*.kmz"  );
804
#endif
796
805
797
    OUString sURL;
806
    OUString sURL;
798
    if( aDlg.Execute() == ERRCODE_NONE )
807
    if( aDlg.Execute() == ERRCODE_NONE )
799
- 

Return to bug 518664