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
a212fc2c
Kaydet (Commit)
a212fc2c
authored
Mar 16, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add SwXTextDocument::postMouseEvent() testcase.
Change-Id: I8cb072b81e005e435577b617204e02fa94ff9f88
üst
2f31ac76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
dummy.fodt
sw/qa/extras/tiledrendering/data/dummy.fodt
+0
-0
tiledrendering.cxx
sw/qa/extras/tiledrendering/tiledrendering.cxx
+20
-1
No files found.
sw/qa/extras/tiledrendering/data/
set-text-selection
.fodt
→
sw/qa/extras/tiledrendering/data/
dummy
.fodt
Dosyayı görüntüle @
a212fc2c
File moved
sw/qa/extras/tiledrendering/tiledrendering.cxx
Dosyayı görüntüle @
a212fc2c
...
@@ -22,11 +22,13 @@ class SwTiledRenderingTest : public SwModelTestBase
...
@@ -22,11 +22,13 @@ class SwTiledRenderingTest : public SwModelTestBase
{
{
public
:
public
:
void
testPostMouseEvent
();
void
testSetTextSelection
();
void
testSetTextSelection
();
void
testSetGraphicSelection
();
void
testSetGraphicSelection
();
void
testResetSelection
();
void
testResetSelection
();
CPPUNIT_TEST_SUITE
(
SwTiledRenderingTest
);
CPPUNIT_TEST_SUITE
(
SwTiledRenderingTest
);
CPPUNIT_TEST
(
testPostMouseEvent
);
CPPUNIT_TEST
(
testSetTextSelection
);
CPPUNIT_TEST
(
testSetTextSelection
);
CPPUNIT_TEST
(
testSetGraphicSelection
);
CPPUNIT_TEST
(
testSetGraphicSelection
);
CPPUNIT_TEST
(
testResetSelection
);
CPPUNIT_TEST
(
testResetSelection
);
...
@@ -46,9 +48,26 @@ SwXTextDocument* SwTiledRenderingTest::createDoc(const char* pName)
...
@@ -46,9 +48,26 @@ SwXTextDocument* SwTiledRenderingTest::createDoc(const char* pName)
return
pTextDocument
;
return
pTextDocument
;
}
}
void
SwTiledRenderingTest
::
testPostMouseEvent
()
{
SwXTextDocument
*
pXTextDocument
=
createDoc
(
"dummy.fodt"
);
SwWrtShell
*
pWrtShell
=
pXTextDocument
->
GetDocShell
()
->
GetWrtShell
();
pWrtShell
->
Right
(
CRSR_SKIP_CHARS
,
/*bSelect=*/
false
,
1
,
/*bBasicCall=*/
false
);
SwShellCrsr
*
pShellCrsr
=
pWrtShell
->
getShellCrsr
(
false
);
// Did we manage to go after the first character?
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_Int32
>
(
1
),
pShellCrsr
->
GetPoint
()
->
nContent
.
GetIndex
());
Point
aStart
=
pShellCrsr
->
GetSttPos
();
aStart
.
setX
(
aStart
.
getX
()
-
1000
);
pXTextDocument
->
postMouseEvent
(
LOK_MOUSEEVENT_MOUSEBUTTONDOWN
,
aStart
.
getX
(),
aStart
.
getY
(),
1
);
pXTextDocument
->
postMouseEvent
(
LOK_MOUSEEVENT_MOUSEBUTTONUP
,
aStart
.
getX
(),
aStart
.
getY
(),
1
);
// The new cursor position must be before the first word.
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_Int32
>
(
0
),
pShellCrsr
->
GetPoint
()
->
nContent
.
GetIndex
());
}
void
SwTiledRenderingTest
::
testSetTextSelection
()
void
SwTiledRenderingTest
::
testSetTextSelection
()
{
{
SwXTextDocument
*
pXTextDocument
=
createDoc
(
"
set-text-selection
.fodt"
);
SwXTextDocument
*
pXTextDocument
=
createDoc
(
"
dummy
.fodt"
);
SwWrtShell
*
pWrtShell
=
pXTextDocument
->
GetDocShell
()
->
GetWrtShell
();
SwWrtShell
*
pWrtShell
=
pXTextDocument
->
GetDocShell
()
->
GetWrtShell
();
// Move the cursor into the second word.
// Move the cursor into the second word.
pWrtShell
->
Right
(
CRSR_SKIP_CHARS
,
/*bSelect=*/
false
,
5
,
/*bBasicCall=*/
false
);
pWrtShell
->
Right
(
CRSR_SKIP_CHARS
,
/*bSelect=*/
false
,
5
,
/*bBasicCall=*/
false
);
...
...
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