diff options
-rw-r--r-- | sc/inc/docuno.hxx | 13 | ||||
-rw-r--r-- | sc/source/ui/inc/gridwin.hxx | 5 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 23 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 14 |
4 files changed, 55 insertions, 0 deletions
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx index 9e2f53c419bd..27575fe66a2c 100644 --- a/sc/inc/docuno.hxx +++ b/sc/inc/docuno.hxx @@ -54,6 +54,7 @@ #include <cppuhelper/implbase5.hxx> #include <cppuhelper/interfacecontainer.h> #include <svl/itemprop.hxx> +#include <vcl/ITiledRenderable.hxx> #include "drwlayer.hxx" class ScDocShell; @@ -69,6 +70,7 @@ class ScPrintUIOptions; class ScSheetSaveData; class SC_DLLPUBLIC ScModelObj : public SfxBaseModel, + public ::vcl::ITiledRenderable, public com::sun::star::sheet::XSpreadsheetDocument, public com::sun::star::document::XActionLockable, public com::sun::star::sheet::XCalculatable, @@ -350,6 +352,17 @@ public: virtual com::sun::star::uno::Sequence< com::sun::star::sheet::opencl::OpenCLPlatform > SAL_CALL getOpenCLPlatforms() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + + // ITiledRenderable + virtual void paintTile( VirtualDevice& rDevice, + int nOutputWidth, + int nOutputHeight, + int nTilePosX, + int nTilePosY, + long nTileWidth, + long nTileHeight ) SAL_OVERRIDE; + virtual Size getDocumentSize() SAL_OVERRIDE; }; class ScDrawPagesObj : public cppu::WeakImplHelper2< 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 |