Kaydet (Commit) 5da5882d authored tarafından Andrzej Hunt's avatar Andrzej Hunt

Add tiled rendering outline to Calc.

(No real implementation yet.)

Change-Id: I67b84b554dbb29db449d8c190ef816645a8bff07
üst cd96b049
......@@ -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<
......
......@@ -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();
......
......@@ -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)
{
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment