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
10bdf6aa
Kaydet (Commit)
10bdf6aa
authored
May 23, 2012
tarafından
Luboš Luňák
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
testcase for proper .docx ZOrder import
Change-Id: I0f025114af5f79f5bd04637ffdf864cef75eb821
üst
9365a325
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
n747461.docx
sw/qa/extras/ooxmltok/data/n747461.docx
+0
-0
ooxmltok.cxx
sw/qa/extras/ooxmltok/ooxmltok.cxx
+36
-0
No files found.
sw/qa/extras/ooxmltok/data/n747461.docx
0 → 100644
Dosyayı görüntüle @
10bdf6aa
File added
sw/qa/extras/ooxmltok/ooxmltok.cxx
Dosyayı görüntüle @
10bdf6aa
...
...
@@ -58,6 +58,7 @@ public:
void
testN751077
();
void
testN705956_1
();
void
testN705956_2
();
void
testN747461
();
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
...
...
@@ -70,6 +71,7 @@ public:
CPPUNIT_TEST
(
testN751077
);
CPPUNIT_TEST
(
testN705956_1
);
CPPUNIT_TEST
(
testN705956_2
);
CPPUNIT_TEST
(
testN747461
);
#endif
CPPUNIT_TEST_SUITE_END
();
...
...
@@ -285,6 +287,40 @@ xray image.FillColor
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0xc0504d
),
fillColor
);
}
void
Test
::
testN747461
()
{
load
(
"n747461.docx"
);
/*
The document contains 3 images (Red, Black, Green, in this order), with explicit
w:relativeHeight (300, 0, 225763766). Check that they are in the right ZOrder
after they are loaded.
*/
uno
::
Reference
<
text
::
XTextDocument
>
textDocument
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
drawing
::
XDrawPageSupplier
>
drawPageSupplier
(
textDocument
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
drawing
::
XDrawPage
>
drawPage
=
drawPageSupplier
->
getDrawPage
();
uno
::
Reference
<
drawing
::
XShape
>
image1
,
image2
,
image3
;
drawPage
->
getByIndex
(
0
)
>>=
image1
;
drawPage
->
getByIndex
(
1
)
>>=
image2
;
drawPage
->
getByIndex
(
2
)
>>=
image3
;
sal_Int32
zOrder1
,
zOrder2
,
zOrder3
;
OUString
descr1
,
descr2
,
descr3
;
uno
::
Reference
<
beans
::
XPropertySet
>
imageProperties1
(
image1
,
uno
::
UNO_QUERY
);
imageProperties1
->
getPropertyValue
(
"ZOrder"
)
>>=
zOrder1
;
imageProperties1
->
getPropertyValue
(
"Description"
)
>>=
descr1
;
uno
::
Reference
<
beans
::
XPropertySet
>
imageProperties2
(
image2
,
uno
::
UNO_QUERY
);
imageProperties2
->
getPropertyValue
(
"ZOrder"
)
>>=
zOrder2
;
imageProperties2
->
getPropertyValue
(
"Description"
)
>>=
descr2
;
uno
::
Reference
<
beans
::
XPropertySet
>
imageProperties3
(
image3
,
uno
::
UNO_QUERY
);
imageProperties3
->
getPropertyValue
(
"ZOrder"
)
>>=
zOrder3
;
imageProperties3
->
getPropertyValue
(
"Description"
)
>>=
descr3
;
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0
),
zOrder1
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
1
),
zOrder2
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
2
),
zOrder3
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Black"
),
descr1
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Red"
),
descr2
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Green"
),
descr3
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
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