diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-29 08:50:34 +0200 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-30 12:44:01 +0200 |
commit | 6548361109deeb3be2e2c65b27eca04e59fa1f6f (patch) | |
tree | 2e5dcdd61ec9ca11dc692ee0f1a8ff1cdaa522ca /include | |
parent | 5fe0711dbe8568f6ec5fe7c2edeb122519ac68a7 (diff) |
LOK: Add getPartName.
By default (i.e. for writer) we can just return an empty string,
and we only actually need to implement ITiledRenderable's
getPartName for components that actually support it (i.e. calc/impress).
Change-Id: I8b381e5d7a8000638b02f763b4bea8ef0226f8e0
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 3 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 5 | ||||
-rw-r--r-- | include/vcl/ITiledRenderable.hxx | 10 |
3 files changed, 18 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 9fb5ace2cb3c..c90a94732569 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -83,6 +83,9 @@ struct _LibreOfficeKitDocumentClass void (*setPart) (LibreOfficeKitDocument* pThis, int nPart); + char* (*getPartName) (LibreOfficeKitDocument* pThis, + int nPart); + // Get a pointer to a raw array, of size 3*nCanvasWidth*nCanvasHeight // Basebmp's bitmap device seems to round the width up if needed // for its internal buffer, i.e. the rowstride for the buffer may be larger diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 32faf26e6291..f61a4b824a2d 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -64,6 +64,11 @@ public: mpDoc->pClass->setPart(mpDoc, nPart); } + inline char* getPartName(int nPart) + { + return mpDoc->pClass->getPartName(mpDoc, nPart); + } + inline void paintTile( unsigned char* pBuffer, const int nCanvasWidth, diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx index 55e1b39411f9..ca6ee2573ea8 100644 --- a/include/vcl/ITiledRenderable.hxx +++ b/include/vcl/ITiledRenderable.hxx @@ -57,6 +57,16 @@ public: * details. */ virtual int getPart() = 0; + + /** + * Get the name of the currently displayed part, i.e. sheet in a spreadsheet + * or slide in a presentation. + */ + virtual OUString getPartName(int nPart) + { + (void) nPart; + return ""; + } }; } // namespace vcl |