From dd032c3f3b6d6d3142b86860b02efd47c27504cc Mon Sep 17 00:00:00 2001 From: Andrzej Hunt Date: Tue, 29 Jul 2014 13:28:49 +0200 Subject: ITiledRenderable: provide default implementations for some methods. Writer doesn't understand the concept of parts at the moment, it makes most sense to keep these dummy implementations central. Change-Id: Iafbd89864b753ba2bed28a05b0f59df85f364feb --- include/vcl/ITiledRenderable.hxx | 15 ++++++++++++--- sw/inc/unotxdoc.hxx | 3 --- sw/source/uibase/uno/unotxdoc.cxx | 15 --------------- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx index a872713c7a7f..a57053ecac7f 100644 --- a/include/vcl/ITiledRenderable.hxx +++ b/include/vcl/ITiledRenderable.hxx @@ -47,18 +47,27 @@ public: * Set the document "part", i.e. slide for a slideshow, and * tab for a spreadsheet. */ - virtual void setPart( int nPart ) = 0; + virtual void setPart( int nPart ) + { + (void) nPart; + } /** * Get the number of parts -- see setPart for further details. */ - virtual int getParts() = 0; + virtual int getParts() + { + return 1; + } /** * Get the currently displayed/selected part -- see setPart for further * details. */ - virtual int getPart() = 0; + virtual int getPart() + { + return 0; + } /** * Get the name of the currently displayed part, i.e. sheet in a spreadsheet diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 131807135dcb..a48a8f34bab5 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -439,9 +439,6 @@ public: long nTileWidth, long nTileHeight ) SAL_OVERRIDE; virtual Size getDocumentSize() SAL_OVERRIDE; - virtual void setPart( int nPart ) SAL_OVERRIDE; - virtual int getPart() SAL_OVERRIDE; - virtual int getParts() SAL_OVERRIDE; void Invalidate(); void Reactivate(SwDocShell* pNewDocShell); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 8208814844da..1dc5f54656d8 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3139,21 +3139,6 @@ Size SwXTextDocument::getDocumentSize() return pViewShell->GetDocSize(); } -void SwXTextDocument::setPart( int /*nPart*/ ) -{ -} - -int SwXTextDocument::getPart() -{ - return 0; -} - -int SwXTextDocument::getParts() -{ - // For now we treat the document as one large piece. - return 1; -} - void * SAL_CALL SwXTextDocument::operator new( size_t t) throw() { return SwXTextDocumentBaseClass::operator new(t); -- cgit v1.2.3