summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-08 15:23:06 +0200
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-12 05:19:13 +0200
commit4d15212ef8de89a71387c00bdeb7d9a41409e467 (patch)
tree8607981865d3044ba662698cb615f8a04217da69 /include
parent312883ad755e76cee95735f9faca4a8354b068fd (diff)
Add get/setPart to ITiledRenderable, and implement for sw/sc.
Change-Id: Iec3d6374f029149cadf8fb9c9b16fec90146c31e
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h3
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx11
-rw-r--r--include/vcl/ITiledRenderable.hxx16
3 files changed, 26 insertions, 4 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index ba4319f70a3d..675eabc5ae5e 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -77,8 +77,9 @@ struct _LibreOfficeKitDocumentClass
// Part refers to either indivual sheets in a Spreadsheet, or slides
// in a Slideshow, and has no relevance for wrtier documents.
- int (*getNumberOfParts) (LibreOfficeKitDocument* pThis);
+ int (*getParts) (LibreOfficeKitDocument* pThis);
+ int (*getPart) (LibreOfficeKitDocument* pThis);
void (*setPart) (LibreOfficeKitDocument* pThis,
int nPart);
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 427ea833c5a9..32faf26e6291 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -49,9 +49,14 @@ public:
return mpDoc->pClass->getDocumentType(mpDoc);
}
- inline int getNumberOfParts()
+ inline int getParts()
{
- return mpDoc->pClass->getNumberOfParts(mpDoc);
+ return mpDoc->pClass->getParts(mpDoc);
+ }
+
+ inline int getPart()
+ {
+ return mpDoc->pClass->getPart(mpDoc);
}
inline void setPart(int nPart)
@@ -75,7 +80,7 @@ public:
inline void getDocumentSize(long* pWidth, long* pHeight)
{
- mpDoc->getDocumentSize(mpDoc, pWidth, pHeight);
+ mpDoc->pClass->getDocumentSize(mpDoc, pWidth, pHeight);
}
#endif // LOK_USE_UNSTABLE_API
};
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index e9cea10af371..55e1b39411f9 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -41,6 +41,22 @@ public:
*/
virtual Size getDocumentSize() = 0;
+ /**
+ * Set the document "part", i.e. slide for a slideshow, and
+ * tab for a spreadsheet.
+ */
+ virtual void setPart( int nPart ) = 0;
+
+ /**
+ * Get the number of parts -- see setPart for further details.
+ */
+ virtual int getParts() = 0;
+
+ /**
+ * Get the currently displayed/selected part -- see setPart for further
+ * details.
+ */
+ virtual int getPart() = 0;
};
} // namespace vcl