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
d2e09c28
Kaydet (Commit)
d2e09c28
authored
May 18, 2012
tarafından
Luboš Luňák
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
testcase for bnc#751077
Change-Id: Iee60b1d41f04f4a583c7392335068ca75668f42c
üst
f73e75e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
n751077.docx
sw/qa/extras/ooxmltok/data/n751077.docx
+0
-0
ooxmltok.cxx
sw/qa/extras/ooxmltok/ooxmltok.cxx
+32
-0
No files found.
sw/qa/extras/ooxmltok/data/n751077.docx
0 → 100644
Dosyayı görüntüle @
d2e09c28
File added
sw/qa/extras/ooxmltok/ooxmltok.cxx
Dosyayı görüntüle @
d2e09c28
...
...
@@ -54,6 +54,7 @@ public:
void
testN750935
();
void
testN757890
();
void
testFdo49940
();
void
testN751077
();
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
...
...
@@ -63,6 +64,7 @@ public:
CPPUNIT_TEST
(
testN750935
);
CPPUNIT_TEST
(
testN757890
);
CPPUNIT_TEST
(
testFdo49940
);
CPPUNIT_TEST
(
testN751077
);
#endif
CPPUNIT_TEST_SUITE_END
();
...
...
@@ -206,6 +208,36 @@ void Test::testFdo49940()
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"First Page"
),
aValue
);
}
void
Test
::
testN751077
()
{
load
(
"n751077.docx"
);
/*
enum = ThisComponent.Text.createEnumeration
enum.NextElement
para = enum.NextElement
xray para.String
xray para.PageStyleName
*/
uno
::
Reference
<
text
::
XTextDocument
>
textDocument
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumerationAccess
>
paraEnumAccess
(
textDocument
->
getText
(),
uno
::
UNO_QUERY
);
// list of paragraphs
uno
::
Reference
<
container
::
XEnumeration
>
paraEnum
=
paraEnumAccess
->
createEnumeration
();
// go to 1st paragraph
(
void
)
paraEnum
->
nextElement
();
// get the 2nd paragraph
uno
::
Reference
<
uno
::
XInterface
>
paragraph
(
paraEnum
->
nextElement
(),
uno
::
UNO_QUERY
);
OUString
value
;
// text of the paragraph
uno
::
Reference
<
text
::
XTextRange
>
text
(
paragraph
,
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"TEXT1"
),
text
->
getString
());
// we want to test the paragraph is on the first page (it was put onto another page without the fix),
// use a small trick and instead of checking the page layout, check the page style
uno
::
Reference
<
beans
::
XPropertySet
>
paragraphProperties
(
paragraph
,
uno
::
UNO_QUERY
);
paragraphProperties
->
getPropertyValue
(
"PageStyleName"
)
>>=
value
;
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"First Page"
),
value
);
}
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