Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
653bac18
Kaydet (Commit)
653bac18
authored
Haz 10, 2014
tarafından
Zolnai Tamás
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make glTF support an experimental feature
Change-Id: I75e69ba1acafbab8362536f02f4d39a8fc2deed1
üst
fe701018
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
8 deletions
+33
-8
import-tests.cxx
sd/qa/unit/import-tests.cxx
+14
-4
drviews2.cxx
sd/source/ui/view/drviews2.cxx
+5
-0
drviews7.cxx
sd/source/ui/view/drviews7.cxx
+9
-2
CppunitTest_xmloff_uxmloff.mk
xmloff/CppunitTest_xmloff_uxmloff.mk
+1
-0
Library_xo.mk
xmloff/Library_xo.mk
+1
-0
ximpshap.cxx
xmloff/source/draw/ximpshap.cxx
+3
-2
No files found.
sd/qa/unit/import-tests.cxx
Dosyayı görüntüle @
653bac18
...
...
@@ -30,6 +30,7 @@
#include <svx/svdomedia.hxx>
#include <svx/svdoole2.hxx>
#include <svx/xflclit.hxx>
#include <svtools/miscopt.hxx>
#include <animations/animationnodehelper.hxx>
#include <com/sun/star/drawing/XDrawPage.hpp>
...
...
@@ -710,8 +711,8 @@ void SdFiltersTest::testFdo71961()
void
SdFiltersTest
::
testMediaEmbedding
()
{
SvtMiscOptions
().
SetExperimentalMode
(
true
);
::
sd
::
DrawDocShellRef
xDocShRef
=
loadURL
(
getURLFromSrc
(
"/sd/qa/unit/data/media_embedding.odp"
));
xDocShRef
=
saveAndReload
(
xDocShRef
,
ODP
);
SdDrawDocument
*
pDoc
=
xDocShRef
->
GetDoc
();
CPPUNIT_ASSERT_MESSAGE
(
"no document"
,
pDoc
!=
NULL
);
...
...
@@ -724,12 +725,21 @@ void SdFiltersTest::testMediaEmbedding()
CPPUNIT_ASSERT_MESSAGE
(
"missing model"
,
pModelObj
!=
NULL
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"vnd.sun.star.Package:Model/jeep/jeep.json"
),
pModelObj
->
getMediaProperties
().
getURL
());
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"application/vnd.gltf+json"
),
pModelObj
->
getMediaProperties
().
getMimeType
());
#else
// Check the case when experimental mode is disabled
xDocShRef
->
DoClose
();
SvtMiscOptions
().
SetExperimentalMode
(
false
);
xDocShRef
=
loadURL
(
getURLFromSrc
(
"/sd/qa/unit/data/media_embedding.odp"
));
pDoc
=
xDocShRef
->
GetDoc
();
CPPUNIT_ASSERT_MESSAGE
(
"no document"
,
pDoc
!=
NULL
);
pPage
=
pDoc
->
GetPage
(
1
);
CPPUNIT_ASSERT_MESSAGE
(
"no page"
,
pPage
!=
NULL
);
#endif
// If glTF is not supported, then the fallback image is imported
SdrGrafObj
*
pGrafic
=
dynamic_cast
<
SdrGrafObj
*>
(
pPage
->
GetObj
(
2
));
CPPUNIT_ASSERT_MESSAGE
(
"Could not load glTF fallback image"
,
pGrafic
!=
NULL
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"vnd.sun.star.Package:Pictures/jeep.png"
),
pGrafic
->
GetGrafStreamURL
());
#endif
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"vnd.sun.star.Package:Model/Fallback/jeep.png"
),
pGrafic
->
GetGrafStreamURL
());
// Second object is a sound
SdrMediaObj
*
pMediaObj
=
dynamic_cast
<
SdrMediaObj
*>
(
pPage
->
GetObj
(
3
));
...
...
sd/source/ui/view/drviews2.cxx
Dosyayı görüntüle @
653bac18
...
...
@@ -79,6 +79,8 @@
#include <svx/xlnstwit.hxx>
#include <svx/xlnwtit.hxx>
#include <svtools/miscopt.hxx>
#include <tools/diagnose_ex.h>
#include <unotools/useroptions.hxx>
...
...
@@ -1169,6 +1171,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
#if HAVE_FEATURE_GLTF
case
SID_INSERT_3DMODEL
:
{
if
(
!
SvtMiscOptions
().
IsExperimentalMode
()
)
break
;
SetCurrentFunction
(
FuInsert3DModel
::
Create
(
this
,
GetActiveWindow
(),
mpDrawView
,
GetDoc
(),
rReq
)
);
Cancel
();
...
...
sd/source/ui/view/drviews7.cxx
Dosyayı görüntüle @
653bac18
...
...
@@ -43,6 +43,8 @@
#include <svx/extrusionbar.hxx>
#include <svx/fontworkbar.hxx>
#include <svtools/miscopt.hxx>
// #UndoRedo#
#include <svl/slstitm.hxx>
#include <sfx2/app.hxx>
...
...
@@ -1660,13 +1662,18 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
}
bool
bDisableInsert3DModel
=
false
;
#if !HAVE_FEATURE_GLTF
if
(
SFX_ITEM_AVAILABLE
==
rSet
.
GetItemState
(
SID_INSERT_3DMODEL
))
bDisableInsert3DModel
=
true
;
#else
bDisableInsert3DModel
=
!
SvtMiscOptions
().
IsExperimentalMode
();
#endif
if
(
bDisableInsert3DModel
&&
SFX_ITEM_AVAILABLE
==
rSet
.
GetItemState
(
SID_INSERT_3DMODEL
))
{
rSet
.
DisableItem
(
SID_INSERT_3DMODEL
);
rSet
.
Put
(
SfxVisibilityItem
(
SID_INSERT_3DMODEL
,
false
));
}
#endif
GetModeSwitchingMenuState
(
rSet
);
}
...
...
xmloff/CppunitTest_xmloff_uxmloff.mk
Dosyayı görüntüle @
653bac18
...
...
@@ -45,6 +45,7 @@ $(eval $(call gb_CppunitTest_use_libraries,xmloff_uxmloff, \
salhelper \
sax \
svl \
svt \
test \
tl \
utl \
...
...
xmloff/Library_xo.mk
Dosyayı görüntüle @
653bac18
...
...
@@ -50,6 +50,7 @@ $(eval $(call gb_Library_use_libraries,xo,\
salhelper \
sax \
svl \
svt \
tl \
utl \
vcl \
...
...
xmloff/source/draw/ximpshap.cxx
Dosyayı görüntüle @
653bac18
...
...
@@ -81,6 +81,7 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <svtools/miscopt.hxx>
#include <config_features.h>
...
...
@@ -3081,7 +3082,7 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen
if
(
xAttrList
->
getValueByIndex
(
n
).
equalsAscii
(
"application/vnd.sun.star.media"
)
)
mbMedia
=
true
;
#if HAVE_FEATURE_GLTF
if
(
xAttrList
->
getValueByIndex
(
n
).
equalsAscii
(
"application/vnd.gltf+json"
)
)
if
(
xAttrList
->
getValueByIndex
(
n
).
equalsAscii
(
"application/vnd.gltf+json"
)
&&
SvtMiscOptions
().
IsExperimentalMode
()
)
mbMedia
=
true
;
#endif
// leave this loop
...
...
@@ -3603,7 +3604,7 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref
// For glTF models the fallback image is placed before the real shape.
// So we need to remove the fallback image after real shape is detected.
else
if
(
mxImplContext
.
Is
()
&&
IsXMLToken
(
mxImplContext
->
GetLocalName
(),
XML_IMAGE
)
&&
IsXMLToken
(
rLocalName
,
XML_PLUGIN
)
)
IsXMLToken
(
rLocalName
,
XML_PLUGIN
)
&&
SvtMiscOptions
().
IsExperimentalMode
()
)
{
SvXMLShapeContext
*
pShapeContext
=
GetImport
().
GetShapeImport
()
->
CreateFrameChildContext
(
GetImport
(),
nPrefix
,
rLocalName
,
xAttrList
,
mxShapes
,
mxAttrList
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment