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
0f330ea2
Kaydet (Commit)
0f330ea2
authored
Nis 02, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
RtfModelTest: introduce common getPages() method
üst
7b58fc3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
rtftok.cxx
sw/qa/extras/rtftok/rtftok.cxx
+13
-10
No files found.
sw/qa/extras/rtftok/rtftok.cxx
Dosyayı görüntüle @
0f330ea2
...
...
@@ -103,6 +103,8 @@ private:
void
load
(
const
OUString
&
rURL
);
/// Get the length of the whole document.
int
getLength
();
/// Get page count.
int
getPages
();
uno
::
Reference
<
lang
::
XComponent
>
mxComponent
;
};
...
...
@@ -130,6 +132,15 @@ int RtfModelTest::getLength()
return
aBuf
.
getLength
();
}
int
RtfModelTest
::
getPages
()
{
uno
::
Reference
<
frame
::
XModel
>
xModel
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XTextViewCursorSupplier
>
xTextViewCursorSupplier
(
xModel
->
getCurrentController
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XPageCursor
>
xCursor
(
xTextViewCursorSupplier
->
getViewCursor
(),
uno
::
UNO_QUERY
);
xCursor
->
jumpToLastPage
();
return
xCursor
->
getPage
();
}
void
RtfModelTest
::
setUp
()
{
test
::
BootstrapFixture
::
setUp
();
...
...
@@ -382,11 +393,7 @@ void RtfModelTest::testFdo43965()
CPPUNIT_ASSERT_EQUAL
(
sal_uInt32
(
26
),
aBorder
.
LineWidth
);
// Finally, make sure that we have two pages
uno
::
Reference
<
frame
::
XModel
>
xModel
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XTextViewCursorSupplier
>
xTextViewCursorSupplier
(
xModel
->
getCurrentController
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XPageCursor
>
xCursor
(
xTextViewCursorSupplier
->
getViewCursor
(),
uno
::
UNO_QUERY
);
xCursor
->
jumpToLastPage
();
CPPUNIT_ASSERT_EQUAL
(
sal_Int16
(
2
),
xCursor
->
getPage
());
CPPUNIT_ASSERT_EQUAL
(
2
,
getPages
());
}
void
RtfModelTest
::
testN751020
()
...
...
@@ -476,11 +483,7 @@ void RtfModelTest::testFdo45394()
void
RtfModelTest
::
testFdo48104
()
{
load
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"fdo48104.rtf"
)));
uno
::
Reference
<
frame
::
XModel
>
xModel
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XTextViewCursorSupplier
>
xTextViewCursorSupplier
(
xModel
->
getCurrentController
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XPageCursor
>
xCursor
(
xTextViewCursorSupplier
->
getViewCursor
(),
uno
::
UNO_QUERY
);
xCursor
->
jumpToLastPage
();
CPPUNIT_ASSERT_EQUAL
(
sal_Int16
(
2
),
xCursor
->
getPage
());
CPPUNIT_ASSERT_EQUAL
(
2
,
getPages
());
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
RtfModelTest
);
...
...
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