summaryrefslogtreecommitdiffstats
path: root/sc/source
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-16 13:50:49 +0100
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-25 13:04:33 +0100
commit5da5882df48b4ef9cb9807798102453249cd1aef (patch)
tree4a08c43217e215a1fe6b90102ad7287070140e48 /sc/source
parentUse ITiledRenderable for LIBLOK. (diff)
downloadcore-5da5882df48b4ef9cb9807798102453249cd1aef.tar.gz
core-5da5882df48b4ef9cb9807798102453249cd1aef.zip
Add tiled rendering outline to Calc.
(No real implementation yet.) Change-Id: I67b84b554dbb29db449d8c190ef816645a8bff07
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/inc/gridwin.hxx5
-rw-r--r--sc/source/ui/unoobj/docuno.cxx23
-rw-r--r--sc/source/ui/view/gridwin4.cxx14
3 files changed, 42 insertions, 0 deletions
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index df03b88f525c..17b02f8d5a3a 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -321,6 +321,11 @@ public:
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
virtual void Tracking( const TrackingEvent& rTEvt ) SAL_OVERRIDE;
+ void PaintTile( VirtualDevice& rDevice,
+ int nOutputWidth, int nOutputHeight,
+ int nTilePosX, int nTilePosY,
+ long nTileWidth, long nTileHeight );
+
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE;
void FakeButtonUp();
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 16d50edfff07..57a80b552c34 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -96,6 +96,7 @@
#include "platforminfo.hxx"
#include "interpre.hxx"
#include "formulagroup.hxx"
+#include "gridwin.hxx"
#include <columnspanset.hxx>
using namespace com::sun::star;
@@ -446,6 +447,28 @@ void ScModelObj::RepaintRange( const ScRangeList& rRange )
pDocShell->PostPaint( rRange, PAINT_GRID );
}
+void ScModelObj::paintTile( VirtualDevice& rDevice,
+ int nOutputWidth, int nOutputHeight,
+ int nTilePosX, int nTilePosY,
+ long nTileWidth, long nTileHeight )
+{
+ // There seems to be no clear way of getting the grid window for this
+ // particular document, hence we need to hope we get the right window.
+ ScViewData* pViewData = ScDocShell::GetViewData();
+ ScGridWindow* pGridWindow = pViewData->GetActiveWin();
+
+ pGridWindow->PaintTile( rDevice, nOutputWidth, nOutputHeight,
+ nTilePosX, nTilePosY, nTileWidth, nTileHeight );
+}
+
+Size ScModelObj::getDocumentSize()
+{
+ // TODO: not sure what we want to do here, maybe just return the size for a certain
+ // default minimum number of cells, e.g. 100x100 and more if more cells have
+ // content?
+ return Size();
+}
+
uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType )
throw(uno::RuntimeException, std::exception)
{
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 24a6fb54ec07..fa697ee5fbdd 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -870,6 +870,20 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
rDoc.ClearFormulaContext();
}
+void ScGridWindow::PaintTile( VirtualDevice& rDevice,
+ int nOutputWidth, int nOutputHeight,
+ int nTilePosX, int nTilePosY,
+ long nTileWidth, long nTileHeight )
+{
+ (void) rDevice;
+ (void) nOutputWidth;
+ (void) nOutputHeight;
+ (void) nTilePosX;
+ (void) nTilePosY;
+ (void) nTileWidth;
+ (void) nTileHeight;
+}
+
void ScGridWindow::CheckNeedsRepaint()
{
// called at the end of painting, and from timer after background text width calculation