Render tiles from calc.

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
Calc: Add tiled rendering device to the paint view.

This prevents the previous warnings of
SdrPageView::DrawLayer: Creating temporary SdrPageWindow (ObjectContact), \
this should never be needed

Change-Id: I76cb7c9ed4d45bfcbd297f697314309b4e036f80
Allow overriding of device for Paint, and use that for Tiles.

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
Implement data area size retrieval.

Cell dimensions appear to be in TWIPs (but the drawing layer is in 100th mm).
Take into account drawing layer for data area size.

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
Ensure we actually render all cells in the selected area.

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
Fillinfo: don't scale data unnecessarily.

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.

Change-Id: I0a725fd5c030f3c089c2bbd25947088c321eb2d4
aScrSize should be mutable.

Change-Id: I7376ea17aa4f66c9d9085757b84fb69dd0ad71cb
Allow overriding limits for SetZoom for Tiled Rendering.

Change-Id: Ic656012921408ce5c8dc691933a71a9e0ac78e5d
ScViewData::GetActiveWin can be const.

We need to reuse this in other const methods, so lets make it const
too.

Change-Id: I6d96fa2370081d515f8629998d8a1e218bec643a
Make nPrtToScreenFactor and GetOutputFactor fractions.

These are then used for our output MapMode which required
Fractions too.

Change-Id: Icbfd9f808a6efe297096c94dc4043cef88c0ba0b
ScOutputData needs ScViewData for scaling.

Change-Id: I14cd3e835ba8233478514d5f6832737aa2c99bf9
Use MapMode instead of nPPTX/nPPTY.

This is far from complete: we need to replace all uses of
nPPTX/nPPTY for things to work correctly.

Change-Id: I7c8aca62c537d8770903f4a6ae0a164479af3fc1
Implement some Logic/Pixel conversion functions for ScViewData.

Change-Id: I54c99d19852be9825f3dbe80fcbfcfa13a79c835
Use viewdata scaling for vertical grid lines.

Horizontal lines / the rest of ScOutputData still need converting,
but at least this shows we're on the right track.

Change-Id: I4a7702d9983dd07674808319b3c613d4350ac25e
Add Point and Size versions of convertMm100ToTwip/TwipToMm100.

There seem to be quite a few cases where the individual components
are being converted, this way we can just conver the entire
object as one.

Change-Id: I0043b6f40520d7497e6edc185187706b255f2354
Use MapMode instead of PPT for ScEditUtil::GetEditArea

Change-Id: I3fbc33da3f32723e37c5004f7883fa6ab4107921
Use GetScrPos so that col/row-headers match the grid.

Without this we can still get single pixel errors which can sum
up over multiple columns/row.

Change-Id: Id428dafab1ca771c123c84d815261263a7d33fed
Don't use PPT values for row/column size changes either.

Change-Id: I70186485c20280ab26587b0b42e48f3ecb483323
Conversions should be const.

Change-Id: I98c68ce809d889c5d7b479a59859e633eb4309d9