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
dc4efebc
Kaydet (Commit)
dc4efebc
authored
Kas 17, 2016
tarafından
Marco Cecchetti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
LOK - Calc: unit test for invalidation on copy/paste to the doc bottom
Change-Id: I92b6a3f1c3b3c6c260b25b046bd19b249be0db0b
üst
d922d72d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
tiledrendering.cxx
sc/qa/unit/tiledrendering/tiledrendering.cxx
+44
-0
No files found.
sc/qa/unit/tiledrendering/tiledrendering.cxx
Dosyayı görüntüle @
dc4efebc
...
...
@@ -67,6 +67,7 @@ public:
void
testGraphicInvalidate
();
void
testAutoSum
();
void
testHideColRow
();
void
testInvalidateOnCopyPasteCells
();
CPPUNIT_TEST_SUITE
(
ScTiledRenderingTest
);
CPPUNIT_TEST
(
testRowColumnSelections
);
...
...
@@ -85,6 +86,7 @@ public:
CPPUNIT_TEST
(
testGraphicInvalidate
);
CPPUNIT_TEST
(
testAutoSum
);
CPPUNIT_TEST
(
testHideColRow
);
CPPUNIT_TEST
(
testInvalidateOnCopyPasteCells
);
CPPUNIT_TEST_SUITE_END
();
private
:
...
...
@@ -914,6 +916,48 @@ void ScTiledRenderingTest::testHideColRow()
mxComponent
.
clear
();
comphelper
::
LibreOfficeKit
::
setActive
(
false
);
}
void
ScTiledRenderingTest
::
testInvalidateOnCopyPasteCells
()
{
// Load a document
comphelper
::
LibreOfficeKit
::
setActive
();
ScModelObj
*
pModelObj
=
createDoc
(
"small.ods"
);
CPPUNIT_ASSERT
(
pModelObj
);
// view
ViewCallback
aView
;
SfxViewShell
::
Current
()
->
registerLibreOfficeKitViewCallback
(
&
ViewCallback
::
callback
,
&
aView
);
aView
.
m_bInvalidateTiles
=
false
;
uno
::
Sequence
<
beans
::
PropertyValue
>
aArgs
;
// select and copy cells
pModelObj
->
postKeyEvent
(
LOK_KEYEVENT_KEYINPUT
,
0
,
KEY_HOME
|
KEY_MOD1
);
pModelObj
->
postKeyEvent
(
LOK_KEYEVENT_KEYUP
,
0
,
KEY_HOME
|
KEY_MOD1
);
pModelObj
->
postKeyEvent
(
LOK_KEYEVENT_KEYINPUT
,
0
,
KEY_DOWN
|
KEY_SHIFT
);
pModelObj
->
postKeyEvent
(
LOK_KEYEVENT_KEYUP
,
0
,
KEY_DOWN
|
KEY_SHIFT
);
pModelObj
->
postKeyEvent
(
LOK_KEYEVENT_KEYINPUT
,
0
,
KEY_RIGHT
|
KEY_SHIFT
);
pModelObj
->
postKeyEvent
(
LOK_KEYEVENT_KEYUP
,
0
,
KEY_RIGHT
|
KEY_SHIFT
);
Scheduler
::
ProcessEventsToIdle
();
comphelper
::
dispatchCommand
(
".uno:Copy"
,
aArgs
);
// move to destination cell
pModelObj
->
postKeyEvent
(
LOK_KEYEVENT_KEYINPUT
,
0
,
KEY_DOWN
);
pModelObj
->
postKeyEvent
(
LOK_KEYEVENT_KEYUP
,
0
,
KEY_DOWN
);
pModelObj
->
postKeyEvent
(
LOK_KEYEVENT_KEYINPUT
,
0
,
KEY_DOWN
|
KEY_MOD1
);
pModelObj
->
postKeyEvent
(
LOK_KEYEVENT_KEYUP
,
0
,
KEY_DOWN
|
KEY_MOD1
);
pModelObj
->
postKeyEvent
(
LOK_KEYEVENT_KEYINPUT
,
0
,
KEY_UP
);
pModelObj
->
postKeyEvent
(
LOK_KEYEVENT_KEYUP
,
0
,
KEY_UP
);
Scheduler
::
ProcessEventsToIdle
();
// paste cells
aView
.
m_bInvalidateTiles
=
false
;
comphelper
::
dispatchCommand
(
".uno:Paste"
,
aArgs
);
Scheduler
::
ProcessEventsToIdle
();
CPPUNIT_ASSERT
(
aView
.
m_bInvalidateTiles
);
mxComponent
->
dispose
();
mxComponent
.
clear
();
comphelper
::
LibreOfficeKit
::
setActive
(
false
);
}
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
ScTiledRenderingTest
);
...
...
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