summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-07-21DON'T USE: ignore unknown args instead of failure.feature/calctiledrendering4Andrzej Hunt1-1/+1
The --protector flag ends up here in unit tests, which causes things to fail -- either we need to make --protector known, or filter it out before hand -- whereby I suspect filtering it out would be difficult to do in a reliable fashion. Change-Id: Iab47a6e24723604df75def2b963e82ba6479318e
2014-07-21gtktiledviewer: make sure we clean up the office instance.Andrzej Hunt1-0/+4
Change-Id: I12c3e9df8b8fcf8dcd6fb5fa781c2f7c10ab0a0c
2014-07-21Use gb_CppunitTest_use_confpreinit for LOK tiled rendering.Andrzej Hunt1-1/+2
Now that we use the event loop for LOK we need to make sure that it is able to run successfully first time, as unit tests start with a completely clean config. Change-Id: If9ddcb75fe8286381d71ecdc76ac7eb3697960d0
2014-07-21Add gb_CppunitTest_use_confpreinit:Andrzej Hunt1-0/+8
For unit tests that use the VCL event loop we can use this to avoid the otherwise required restart. Change-Id: I48265d7e7188a4efaa6f87432c762320331c0c78
2014-07-21Implement lokconf_init.Andrzej Hunt4-0/+85
This is a simple executable which can be used to ensure there is a pe-pared configuration for unit-tests to avoid the usually required re-start on the first run. Change-Id: I49b706e8daa93bc34db508a24615b63b9babddba
2014-07-18Fail LOK initialisation if restart is required.Andrzej Hunt1-0/+9
Change-Id: Ia13a3523666147f002b5a5177fd6962d55556f56
2014-07-18Add OfficeIPCThread::IsEnabled.Andrzej Hunt2-0/+6
This lets us easily check whether Desktop::Main has shut down, i.e. which happens on the first restart-requiring initialisation. Change-Id: I7fe5699a4bf59e2c3b891ac73abd9b147773d22e
2014-07-18Use OfficeIPCThread::WaitForReady rather than sleeping.Andrzej Hunt1-13/+20
This way we actually continue when we're ready to, rather than dumbly hoping we wait for long enough. This isn't entirely unproblematic though -- if we have no config pre-prepared (i.e. first-run), then we just end up hanging on this since soffice_main exits without doing anything to the OfficeIPCThread. (Which is especially problematic for unit tests which specifically run on an empty config.) Change-Id: I064fb500a224cfe37a0d3ba24b6154ffd72a71a3
2014-07-18Bin outdated / incorrect comment.Andrzej Hunt1-4/+1
Change-Id: I7b8f97377b9606a2228f172f772d8051a64703d2
2014-07-18Add OfficeIPCThread::WaitForReady.Andrzej Hunt2-0/+15
For LibreOfficeKit we need to start up the event loop, and can't continue initialisation until all the related (VCL etc.) setup is complete -- the OfficeIPCThread is also enabled as one of the last items, and can be used to indicate whether or not we can start actually working with VCL. Change-Id: I0450b65584ddf6e8d02ce0c6e66e06f47841d1b7
2014-07-17libreofficekit_tiledrendering test: force lock file removalAndrzej Hunt1-0/+8
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-17Fix some CppunitTest_libreofficekit_tiledrendering related problemsMatúš Kukan2-2/+3
Change-Id: Icdcde0af1b3d5744ef2842e4b4d2b85a094ac686
2014-07-17LibreOfficeKit: Check for libmerged too.Jan Holesovsky1-12/+27
And avoid some strcat's when at it. Change-Id: I0c70ee2a1abf0c9e2914f756b06bedc3a16df19b
2014-07-17DO NOT MERGE YET: hack soffice_main into LOK.Andrzej Hunt4-14/+50
Change-Id: I86e13192ddb5904afabca38d3a201f17f145de09
2014-07-15Render slides by default.Andrzej Hunt1-2/+7
We should probably introduce an API to allow selecting notes instead, however the default mode is to open whichever view we had open last for a given document -- whereas for nowwe probably always want to render the slides. Change-Id: I26540613d1a510f23e5abfc8fee2ad743c180f34
2014-07-15Allow setting DrawViewShell PageKind directly.Andrzej Hunt1-1/+1
Currently the only way to change the PageKind is via the UI controls (i.e. via ExecCtrl) -- however for tiled rendering we want to select the PageKind directly. Change-Id: I3a3fa8f8cefaa0e0212832aef4026433fc596263
2014-07-14LOK tiled rendering test: add some debug output.Andrzej Hunt1-0/+8
Change-Id: I0da29204809b6a1de42d5f0fc37705497a060493
2014-07-12GtkComboBoxText requires gtk >= 2.24.Andrzej Hunt1-0/+9
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-11More pixel->document coordinate scaling.Andrzej Hunt1-0/+1
Change-Id: Iea3877c024d66fa6b80d447c749246148f2dc11d
2014-07-11Add png dumping to LOK tiled rendering test.Andrzej Hunt2-1/+27
This allows for easier visual comparisons (i.e. currently the test would be failing for some tiles). Change-Id: I5b174375b57ffe0edd2700fdec411a83669e4a34
2014-07-11DON'T MERGE: the viewport doesn't get set otherwise?Andrzej Hunt1-0/+2
When writing the tiled rendering test, asserts were firing because the redraw area wasn't set on the page -- however I don't understand things well enought yet to know whether or not this is the correct solution.. (Especially as this happened only for certain tile configurations.) Change-Id: I187d639b00d0748e7cc9fd6cc33d555f02f9a081
2014-07-11Iterate from origin to tile area to ensure correct positioning.Andrzej Hunt1-2/+18
Change-Id: I29e881f9e67b84e208a198d2aad06db382d14698
2014-07-11Use logic units for visible-cells determination.Andrzej Hunt1-15/+13
This eliminates a bunch of LogicToPixel conversions, and also means that tiles starting other than the origin are correctly processed (as LogicToPixel run on a rectangle will also move that rectangle depending on the origin set in the output device). Change-Id: I42903fe23ad5f6baa1d5276d5dcc7ee038bd27cf
2014-07-11Scale the origin for the Draw Layer (Calc Tiled Rendering).Andrzej Hunt1-0/+2
Since we're changing units, we also need to scale the origin by the correct amount. Change-Id: Ie0563376e8fa56f20c30da4fe3cc50546f18e84f
2014-07-11Use OutputDevice scaling for column-/rowbars too.Andrzej Hunt3-27/+74
This means we now match the new gridwindow dimensions. There are however some issues around selection/painting now, which are presumably related to some parts of the code still assuming pixel rather than logical dimensions. Change-Id: I15c2bc7210f26cededd63bc89dbd782e6e4c03b8
2014-07-11Ensure we actually render all cells in the selected area.Andrzej Hunt1-0/+4
Only cells within maVisibleRange are rendered, even if we request a larger area (and maVisibleRange is otherwise not updated for tiled rendering). Hence we should explicitly set it here. Change-Id: I399be9df1f266a2b3d32a95483960b21f561c6b3
2014-07-11Take into account drawing layer for data area size.Andrzej Hunt1-2/+18
The drawing layer could potentially have items that are outwith the data area, but we probably want to have them included for tiled rendering. Change-Id: I958c4fa29491cdb0fd80392dfcfa033306f2b76c
2014-07-11Use output device mapping for draw layer too.Andrzej Hunt1-1/+2
Otherwise draw layer items don't get scaled at all for tiled rendering. Change-Id: If65d460a83fb29b8eda692cb7c1f2bd9f7283e62
2014-07-11Set correct scaling for normal painting.Andrzej Hunt1-0/+5
As we no longer read the scaling from the viewdata, we should instead set it on the output device when doing normal rendering. However the grid still doesn't exactly match the external axes yet, there are probably more rounding errors wherever they are painted. Change-Id: I25b1bd9b344115578fe892aa94fbf753a3c10c81
2014-07-11Use output device scaling to determine cells in draw-area.Andrzej Hunt1-9/+10
Change-Id: Idf4e6ccb72090a55b6a9234cafae21821e3df0b0
2014-07-11Don't scale grid and cell dimensions multiple times.Andrzej Hunt2-17/+12
Previously we had multiple layers of scaling, with rounding errors propagating, leading to up to 5% differences in expected and rendered sheet widths -- for tiled rendering dimensions have to scale accurately as we may paint the same tile at multiple zoom levels, by eliminating multiple scaling and letting the output device instead deal with the scaling once we can eliminate these errors. (However currently rendering of text/images isn't quite right.) Change-Id: I0a725fd5c030f3c089c2bbd25947088c321eb2d4
2014-07-11Implement data area size retrieval.Andrzej Hunt3-4/+49
Cell dimensions appear to be in TWIPs (but the drawing layer is in 100th mm).
2014-07-11Allow overriding of device for Paint, and use that for Tiles.Andrzej Hunt2-7/+14
Paint handles figuring out which cells are within the visible area for us etc. Gridwin being a Window which paints to itself is a bit of a pain, since we now need to be able to reroute painting calls to alternative output devices, however these changes seem to be sufficient to at least get the cells in the desired tile rendered. Change-Id: I7bd1434c97acc6e9ef6e1e63cbcf039b987c88e4
2014-07-11Calc: Add tiled rendering device to the paint view.Andrzej Hunt1-0/+13
This prevents the previous warnings of SdrPageView::DrawLayer: Creating temporary SdrPageWindow (ObjectContact), \ this should never be needed Change-Id: I76cb7c9ed4d45bfcbd297f697314309b4e036f80
2014-07-11Render tiles from calc.Andrzej Hunt3-14/+32
Currently the document size and number of cells to be rendered is hardcoded, this will need some more work to select the correct cells for a given tile (i.e. cells from location). Also, there isn't really a "size" for a calc sheet, so presumably we'd need to instead return the area containing cells that aren't empty, whilst still being able to render larger tiles? (And in any case the client will need to be aware of this and provide an appropriate interface, i.e. the current LO UI simply extends the sheet ad-infinitum.) We also currently get some warnings most likely related to the way we push our OutputDevice into the rendering methods: SdrPageView::DrawLayer: Creating temporary SdrPageWindow (ObjectContact), \ this should never be needed Change-Id: Ia9d64d7de6c22d5b401350f88497a7ec106f1973
2014-07-11Impress: implement tiled rendering.Andrzej Hunt1-10/+56
However we cannot as of yet select between rendering just the slide, just the notes, or both combined -- this simply defaults to whatever mode the document was last opened in for now. Change-Id: Ia8ec0280aab75a36e430aa04c47cee4fea2db974
2014-07-11LOK: use solar mutex for setPart.Andrzej Hunt1-1/+5
Needed e.g. for changing slides in impress. Change-Id: I2f5de40d4efbacde910e27225768979a98ff1c0a
2014-07-11LOK: some logging for tiled rendering.Andrzej Hunt1-0/+3
Change-Id: I5779eec97507b1996cda89174a6e6c55cdd57baf
2014-07-11Add LOK and tiledrendering log areas.Andrzej Hunt1-0/+5
Change-Id: I885acc9b4a52835fa256c2ecd1b8da917b4f7ba7
2014-07-11Add LOK tiled rendering divided-tile unit test.Andrzej Hunt3-0/+171
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-11Add Tiled Rendering outline to sd.Andrzej Hunt2-1/+52
Change-Id: I810d827f330690f8071b662b9ddd05cc41655a71
2014-07-11Add part selector to gtktiledviewer.Andrzej Hunt1-0/+33
Change-Id: I569c8f0ebf4476c0a247cde15a263d1db956a14b
2014-07-11LOK DocView: implement part selection.Andrzej Hunt2-1/+23
Change-Id: I2e16ca9d2d5fcd25b0435f1b9b0fbcb52b92e012
2014-07-11Add get/setPart to ITiledRenderable, and implement for sw/sc.Andrzej Hunt8-12/+104
Change-Id: Iec3d6374f029149cadf8fb9c9b16fec90146c31e
2014-07-11gtktiledviewer: allow selecting between normal and quad-tile view.Andrzej Hunt1-5/+66
Change-Id: I85b22b93fe4ce2ffb62df8766ceea7a1bd8961ee
2014-07-11Quad Docview: only rerender on zoom if we have a document open.Andrzej Hunt1-1/+4
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-11LOK DocView: only rerender on zoom if we have a document open.Andrzej Hunt1-1/+5
Otherwise we would segfault, and it's perfectly valid to set a zoom level _before_ opening a document (as that would e.g. save the document first being rendered on opening if the client wants to immediately render at a non-standard zoom level). Change-Id: Ide261b09f4aab8dc3b552f6c3bf55f78ffd7870c
2014-07-11Implement a (qa-only) quad-tiled viewer.Andrzej Hunt3-0/+323
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-11fdo#81058: Revert "Fix: EE_CHAR_COLOR to EE_CHAR_BKGCOLOR"Matúš Kukan1-1/+1
Obviously, it's not safe to touch editeng :-/ This reverts commit f2d6eb4d96918de9b29a96749506b83b0e59293f.
2014-07-11convert GlobalImageList to SimpleReferenceObjectNoel Grandin3-32/+7
instead of hand-rolling it's own reference counting Change-Id: Ie90cdce49b9dab68f1bdf487b0f308e03464f893