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
7256a10f
Kaydet (Commit)
7256a10f
authored
Agu 12, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Write test for importing images from xls.
Change-Id: I84a996d20ed7ce5f9ffa48644616e59186458243
üst
78131b6b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
file-with-png-image.xls
sc/qa/unit/data/xls/file-with-png-image.xls
+0
-0
subsequent_filters-test.cxx
sc/qa/unit/subsequent_filters-test.cxx
+27
-0
No files found.
sc/qa/unit/data/xls/file-with-png-image.xls
0 → 100755
Dosyayı görüntüle @
7256a10f
File added
sc/qa/unit/subsequent_filters-test.cxx
Dosyayı görüntüle @
7256a10f
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#include <sfx2/docfile.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/sfxmodelfactory.hxx>
#include <sfx2/sfxmodelfactory.hxx>
#include <svl/stritem.hxx>
#include <svl/stritem.hxx>
#include <svx/svdograf.hxx>
#include "drwlayer.hxx"
#include "drwlayer.hxx"
#include <svx/svdpage.hxx>
#include <svx/svdpage.hxx>
...
@@ -177,6 +178,7 @@ public:
...
@@ -177,6 +178,7 @@ public:
void
testHybridSharedStringODS
();
void
testHybridSharedStringODS
();
void
testCopyMergedNumberFormats
();
void
testCopyMergedNumberFormats
();
void
testVBAUserFunctionXLSM
();
void
testVBAUserFunctionXLSM
();
void
testEmbeddedImageXLS
();
CPPUNIT_TEST_SUITE
(
ScFiltersTest
);
CPPUNIT_TEST_SUITE
(
ScFiltersTest
);
CPPUNIT_TEST
(
testBasicCellContentODS
);
CPPUNIT_TEST
(
testBasicCellContentODS
);
...
@@ -257,6 +259,7 @@ public:
...
@@ -257,6 +259,7 @@ public:
CPPUNIT_TEST
(
testHybridSharedStringODS
);
CPPUNIT_TEST
(
testHybridSharedStringODS
);
CPPUNIT_TEST
(
testCopyMergedNumberFormats
);
CPPUNIT_TEST
(
testCopyMergedNumberFormats
);
CPPUNIT_TEST
(
testVBAUserFunctionXLSM
);
CPPUNIT_TEST
(
testVBAUserFunctionXLSM
);
CPPUNIT_TEST
(
testEmbeddedImageXLS
);
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
private
:
private
:
...
@@ -2624,6 +2627,30 @@ void ScFiltersTest::testVBAUserFunctionXLSM()
...
@@ -2624,6 +2627,30 @@ void ScFiltersTest::testVBAUserFunctionXLSM()
xDocSh
->
DoClose
();
xDocSh
->
DoClose
();
}
}
void
ScFiltersTest
::
testEmbeddedImageXLS
()
{
// The document has one embedded image on the first sheet. Make sure it's
// imported properly.
ScDocShellRef
xDocSh
=
loadDoc
(
"file-with-png-image."
,
XLS
);
CPPUNIT_ASSERT
(
xDocSh
.
Is
());
ScDocument
&
rDoc
=
xDocSh
->
GetDocument
();
ScDrawLayer
*
pDL
=
rDoc
.
GetDrawLayer
();
CPPUNIT_ASSERT
(
pDL
);
const
SdrPage
*
pPage
=
pDL
->
GetPage
(
0
);
CPPUNIT_ASSERT
(
pPage
);
const
SdrObject
*
pObj
=
pPage
->
GetObj
(
0
);
CPPUNIT_ASSERT
(
pObj
);
const
SdrGrafObj
*
pImageObj
=
dynamic_cast
<
const
SdrGrafObj
*>
(
pObj
);
CPPUNIT_ASSERT
(
pImageObj
);
const
Graphic
&
rGrf
=
pImageObj
->
GetGraphic
();
BitmapEx
aBMP
=
rGrf
.
GetBitmapEx
();
CPPUNIT_ASSERT_MESSAGE
(
"Bitmap content should not be empty if the image has been properly imported."
,
!
aBMP
.
IsEmpty
());
xDocSh
->
DoClose
();
}
ScFiltersTest
::
ScFiltersTest
()
ScFiltersTest
::
ScFiltersTest
()
:
ScBootstrapFixture
(
"/sc/qa/unit/data"
)
:
ScBootstrapFixture
(
"/sc/qa/unit/data"
)
{
{
...
...
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