summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-29 13:28:49 +0200
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-30 12:44:03 +0200
commitdd032c3f3b6d6d3142b86860b02efd47c27504cc (patch)
tree5cba9555006ba3596aae3ca5b1465f0dbb65daeb
parentImpress: Implement getPartName. (diff)
downloadcore-dd032c3f3b6d6d3142b86860b02efd47c27504cc.tar.gz
core-dd032c3f3b6d6d3142b86860b02efd47c27504cc.zip
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
-rw-r--r--include/vcl/ITiledRenderable.hxx15
-rw-r--r--sw/inc/unotxdoc.hxx3
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx15
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);