Commit Graph

28 Commits

Author SHA1 Message Date
ec7ab6356b LOK: remove code from assert that must be compiled when not in debug mode.
Change-Id: Ibc02247ad4f1099fa31acdcef38dd5b1e95523f2
2014-08-14 20:46:49 -04:00
5909d640dc LOK: add document loading failure test.
We don't really have any way of telling the client that the file didn't
exist yet though, so not very useful so far.

Change-Id: I1db386781b88b345f3e9cb4f37838ca1d95f92f9
2014-07-31 12:31:46 +02:00
5beec739f0 LOK: add test for getDocumentType.
Change-Id: I264567f73dae9ecd061e09c4413857f793fcac48
2014-07-31 12:31:40 +02:00
cc7f66dd53 LOK: add slide name retrieval test.
Change-Id: I6d2bc4dfa634223da662af6f7c9a91f06cfe7534
2014-07-31 12:31:38 +02:00
e780c96e8d Use one test instance to run all LOK tests.
Recreating Office instances after destruction (when still
within the same process) currently fails, hence we need
to do all tests at once for now.

Change-Id: Ic7652c909e1cd970fe1ee76995e61fb6aae8f96c
2014-07-31 12:31:37 +02:00
d6fd97b4c9 Make common paths member variables.
We'll need these for other tests too.

Change-Id: Ia99c2e60f5e5bb24a83875a9dcf85a6b4f54beb4
2014-07-31 12:31:36 +02:00
62da1a8341 GtkComboBoxText requires gtk >= 2.24 (again).
Broken in 77d083130948fa35f9f404656b8c170060e78043.
2014-07-31 11:36:23 +02:00
77d0831309 LokDocView: Update part selector when mode changes.
Change-Id: Ice754a46d07ce2714257c30e1aef27193b614cd3
2014-07-30 12:44:05 +02:00
df438e6ea2 LokDocView: set current item for part selector.
Change-Id: Idbb3d63803bd60a182a9b8e26620d11b2d643cb6
2014-07-30 12:44:05 +02:00
ba520b9dbb gtktiledviewer: add part mode selector.
Change-Id: Ia1e78df1d833f9b0fbda0b78136590c9c960fa27
2014-07-30 12:44:04 +02:00
36e5f73637 gtktiledviewer: show part names in selector.
Change-Id: I02ae5b729f96e36b3f226218b32495907cb63cf3
2014-07-30 12:44:02 +02:00
9e7bdb422d Kill the libreofficekit static library / shim.c.
It looks like the cleanest method of getting lok_init into
a LibreOfficeKitInit.h header (in a c89 compatible way) is to
have it as a static function.

(inline is only available in C99 or later -- this is actually
 available on Linux which is the only place that we can actually
 use lok_init anyways currently, however given we have to keep
 c89 for the C code (for MSVC) compatibility, selectively enabling
 c99 would likely be more messy.)

Change-Id: I0493e7a68ed5397479220bb6ba8c3db870b6dd32
2014-07-29 07:11:20 +02:00
0f21977d1d Use CPPUNIT_ASSERT instead of assert.
Change-Id: I24e7934002ebdde208db74ae3308b26875a3155b
2014-07-28 16:38:17 +02:00
0bed662171 gtktiledviewer: make sure we clean up the office instance.
Change-Id: I12c3e9df8b8fcf8dcd6fb5fa781c2f7c10ab0a0c
2014-07-26 15:57:07 +02:00
bfad9f5b7b libreofficekit_tilederendering: test all 4 tiles.
The use of VisPortChgd ensures that the tiles all render as
expected, i.e. that the pixels match 1:1 irrespective of actual tile
size (for identical zoom factors and document areas).

Change-Id: Ib1e1df4f8257546c2f7993a8160c309a52037d8b
2014-07-26 15:42:04 +02:00
0532c5a897 cid#1226493 Uninitialized scalar variable
Change-Id: I80cd8adccad492c7e4b71e6204c0059bfc003b83
2014-07-18 14:24:20 +02:00
8ab7cbe751 libreofficekit_tiledrendering test: force lock file removal
If the lock file still exists when running this test, LOK will fail
resulting in "documentLoad failed: unknown load failure"
(the actual error is that the lock file dialog cannot be confirmed
 by the user in headless mode, resulting in loading failure, however
 this is then hidden by multiple layers of exception redirection
 in sfx2).

Change-Id: I025ea6187c3d17805f25ab6f756eae9646f2c7c8
2014-07-17 20:39:10 +02:00
74eb70f957 Add png dumping to LOK tiled rendering test.
This allows for easier visual comparisons (i.e. currently the test
would be failing for some tiles).

Change-Id: I5b174375b57ffe0edd2700fdec411a83669e4a34
2014-07-17 20:39:09 +02:00
a95934d8db Fix some CppunitTest_libreofficekit_tiledrendering related problems
Change-Id: Icdcde0af1b3d5744ef2842e4b4d2b85a094ac686
2014-07-17 10:36:28 +02:00
44e19aa6c6 LOK tiled rendering test: add some debug output.
Change-Id: I0da29204809b6a1de42d5f0fc37705497a060493
2014-07-14 13:14:59 +02:00
64c77ac7c5 GtkComboBoxText requires gtk >= 2.24.
Seeing as this is only a test program, probably easiest just to disable
this for gtk < 2.24, and rely on devs wanting to use it isntalling a new
enough gtk version.
2014-07-12 05:46:50 +02:00
a5fe08855b Add LOK tiled rendering divided-tile unit test.
I.e. we render the same area as one larger tile, and then
as 4 sub-tiles (which, when put together, should be identical
to the larger tile). However currently only the top-left sub-tile
actually matches the larger tile, so we have to disable the test
for the remaining sub-tiles.

Change-Id: If1130022b43898e20fefff3e9f592102da3e413a
2014-07-12 05:19:14 +02:00
855eb54ffe Add part selector to gtktiledviewer.
Change-Id: I569c8f0ebf4476c0a247cde15a263d1db956a14b
2014-07-12 05:19:14 +02:00
312883ad75 gtktiledviewer: allow selecting between normal and quad-tile view.
Change-Id: I85b22b93fe4ce2ffb62df8766ceea7a1bd8961ee
2014-07-12 05:19:13 +02:00
d5b2c19080 Quad Docview: only rerender on zoom if we have a document open.
Same as
"LOK DocView: only rerender on zoom if we have a document open."
but for our quad-tiled test widget.

Change-Id: I6c1b946cc9d576d1dcc4687048339d9f0b3e6eff
2014-07-12 05:19:12 +02:00
a864ab2ef1 Implement a (qa-only) quad-tiled viewer.
I.e. we subdivide the document into 4 tiles: one at 100% scaling,
one at 200%, one at 50%, one at 25% -- these are then post-scaled
in gdk) and assembled to show as one document again.

This is specifically a test only widget, primarily to be able to quickly
spot any tile positioning/border-transition issues.

We could theoretically make this widget inherit from the original widget,
however that would mean having to introduce virtual methods etc., which
is not something that we'd want in production -- in the longer run
that widget will hopefully be extended to have proper tile composition etc.,
which would then break this widget too if it were inheriting from there.

Change-Id: Ib880a1614f89724135e753013cf91aec25973e39
2014-07-12 05:19:12 +02:00
4171e2fdb2 Add zoom controls to gtktiledviewer.
Change-Id: I33ae83a97be254a3d3716bd9ae05f089845fd536
2014-06-25 13:04:33 +01:00
0cea87d60c Move gtktiledviewer into libreofficekit.
desktop is no longer the right place for it now that
libreofficekit has its own directory.

Change-Id: I207f1d642e7e35c460ff85bb57aa142cb98023c8
2014-06-25 13:04:32 +01:00