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
8931c8f3
Kaydet (Commit)
8931c8f3
authored
May 29, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bnc#817956 v:textpath VML import testcase
Change-Id: I4c4c3a84e8d9d048262e6570a8bed0106e8d184f
üst
f2720b87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
watermark.docx
sw/qa/extras/ooxmlimport/data/watermark.docx
+0
-0
ooxmlimport.cxx
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+26
-0
No files found.
sw/qa/extras/ooxmlimport/data/watermark.docx
0 → 100755
Dosyayı görüntüle @
8931c8f3
File added
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
Dosyayı görüntüle @
8931c8f3
...
...
@@ -114,6 +114,7 @@ public:
void
testN779630
();
void
testIndentation
();
void
testPageBackground
();
void
testWatermark
();
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
...
...
@@ -196,6 +197,7 @@ void Test::run()
{
"n779630.docx"
,
&
Test
::
testN779630
},
{
"indentation.docx"
,
&
Test
::
testIndentation
},
{
"page-background.docx"
,
&
Test
::
testPageBackground
},
{
"watermark.docx"
,
&
Test
::
testWatermark
},
};
header
();
for
(
unsigned
int
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aMethods
);
++
i
)
...
...
@@ -1392,6 +1394,30 @@ void Test::testPageBackground()
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0x92D050
),
getProperty
<
sal_Int32
>
(
xPageStyle
,
"BackColor"
));
}
void
Test
::
testWatermark
()
{
uno
::
Reference
<
drawing
::
XDrawPageSupplier
>
xDrawPageSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xDraws
(
xDrawPageSupplier
->
getDrawPage
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XTextRange
>
xShape
(
xDraws
->
getByIndex
(
0
),
uno
::
UNO_QUERY
);
// 1st problem: last character was missing
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"SAMPLE"
),
xShape
->
getString
());
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xShape
,
uno
::
UNO_QUERY
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aProps
=
getProperty
<
uno
::
Sequence
<
beans
::
PropertyValue
>
>
(
xShape
,
"CustomShapeGeometry"
);
bool
bFound
=
false
;
for
(
int
i
=
0
;
i
<
aProps
.
getLength
();
++
i
)
if
(
aProps
[
i
].
Name
==
"TextPath"
)
bFound
=
true
;
// 2nd problem: v:textpath wasn't imported
CPPUNIT_ASSERT_EQUAL
(
true
,
bFound
);
// 3rd problem: rotation angle was 315, not 45.
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
45
*
100
),
getProperty
<
sal_Int32
>
(
xShape
,
"RotateAngle"
));
// 4th problem: mso-position-vertical-relative:margin was ignored, VertOrientRelation was text::RelOrientation::FRAME.
CPPUNIT_ASSERT_EQUAL
(
text
::
RelOrientation
::
PAGE_PRINT_AREA
,
getProperty
<
sal_Int16
>
(
xShape
,
"VertOrientRelation"
));
}
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