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
abc28ffc
Kaydet (Commit)
abc28ffc
authored
Tem 15, 2014
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#76803: Unit test so that this never regresses.
Change-Id: Id0b883b7d7b902c1f8e41bcf39220ef74b3488bf
üst
003434f1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
CppunitTest_sw_ooxmlimport.mk
sw/CppunitTest_sw_ooxmlimport.mk
+1
-0
fdo76803.docx
sw/qa/extras/ooxmlimport/data/fdo76803.docx
+0
-0
ooxmlimport.cxx
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+31
-0
No files found.
sw/CppunitTest_sw_ooxmlimport.mk
Dosyayı görüntüle @
abc28ffc
...
...
@@ -16,6 +16,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sw_ooxmlimport, \
))
$(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlimport, \
basegfx \
comphelper \
cppu \
cppuhelper \
...
...
sw/qa/extras/ooxmlimport/data/fdo76803.docx
0 → 100644
Dosyayı görüntüle @
abc28ffc
File added
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
Dosyayı görüntüle @
abc28ffc
...
...
@@ -12,6 +12,7 @@
#if !defined(WNT)
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <com/sun/star/awt/XBitmap.hpp>
#include <com/sun/star/awt/FontUnderline.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
...
...
@@ -19,6 +20,7 @@
#include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
...
...
@@ -2245,6 +2247,35 @@ DECLARE_OOXMLIMPORT_TEST(testFdo80555, "fdo80555.docx")
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
245
),
xShape
->
getPosition
().
Y
);
}
DECLARE_OOXMLIMPORT_TEST
(
testFdo76803
,
"fdo76803.docx"
)
{
// The ContourPolyPolygon was wrong
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
getShape
(
1
),
uno
::
UNO_QUERY
);
drawing
::
PointSequenceSequence
rContour
=
getProperty
<
drawing
::
PointSequenceSequence
>
(
xPropertySet
,
"ContourPolyPolygon"
);
basegfx
::
B2DPolyPolygon
aPolyPolygon
(
basegfx
::
tools
::
UnoPointSequenceSequenceToB2DPolyPolygon
(
rContour
));
// We've got exactly one polygon inside
CPPUNIT_ASSERT_EQUAL
(
sal_uInt32
(
1
),
aPolyPolygon
.
count
());
// Now check it deeply
basegfx
::
B2DPolygon
aPolygon
(
aPolyPolygon
.
getB2DPolygon
(
0
));
CPPUNIT_ASSERT_EQUAL
(
sal_uInt32
(
4
),
aPolygon
.
count
());
CPPUNIT_ASSERT_EQUAL
(
double
(
-
163
),
aPolygon
.
getB2DPoint
(
0
).
getX
());
CPPUNIT_ASSERT_EQUAL
(
double
(
0
),
aPolygon
.
getB2DPoint
(
0
).
getY
());
CPPUNIT_ASSERT_EQUAL
(
double
(
-
163
),
aPolygon
.
getB2DPoint
(
1
).
getX
());
CPPUNIT_ASSERT_EQUAL
(
double
(
3661
),
aPolygon
.
getB2DPoint
(
1
).
getY
());
CPPUNIT_ASSERT_EQUAL
(
double
(
16988
),
aPolygon
.
getB2DPoint
(
2
).
getX
());
CPPUNIT_ASSERT_EQUAL
(
double
(
3661
),
aPolygon
.
getB2DPoint
(
2
).
getY
());
CPPUNIT_ASSERT_EQUAL
(
double
(
16988
),
aPolygon
.
getB2DPoint
(
3
).
getX
());
CPPUNIT_ASSERT_EQUAL
(
double
(
0
),
aPolygon
.
getB2DPoint
(
3
).
getY
());
}
#endif
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
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