summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-09-16 14:14:04 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-10-06 16:24:42 +0200
commitdcdff4c897e9a0f10f2422a907b33bea8f4edf6c (patch)
tree443bb8f05695bc531b00ecf202a7003463604025 /include
parentgtktiledviewer: use setView() before postKeyEvent() (diff)
downloadcore-dcdff4c897e9a0f10f2422a907b33bea8f4edf6c.tar.gz
core-dcdff4c897e9a0f10f2422a907b33bea8f4edf6c.zip
LOK: make getViews() be a member function of Document
Just to be consistent, as all other view-related member functions are there, too. No real impact, as only the unit test uses this so far, and it always works with a single document. Change-Id: I46f1ed8265ab95017986ab45c1b510e961192241 (cherry picked from commit a04b31c9facb08a8e38b79480b9a73bd2693cb9e)
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h5
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx18
-rw-r--r--include/sfx2/lokhelper.hxx5
3 files changed, 12 insertions, 16 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 18f4b3edc624..fc025aed5b15 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -54,9 +54,6 @@ struct _LibreOfficeKitClass
void (*registerCallback) (LibreOfficeKit* pThis,
LibreOfficeKitCallback pCallback,
void* pData);
-
- /// @see lok::Office::getViews().
- int (*getViews) (LibreOfficeKit* pThis);
#endif
};
@@ -174,6 +171,8 @@ struct _LibreOfficeKitDocumentClass
void (*setView) (LibreOfficeKitDocument* pThis, int nId);
/// @see lok::Document::getView().
int (*getView) (LibreOfficeKitDocument* pThis);
+ /// @see lok::Document::getViews().
+ int (*getViews) (LibreOfficeKitDocument* pThis);
#endif // LOK_USE_UNSTABLE_API
};
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index f5821b71191a..45ace9dfff04 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -294,6 +294,14 @@ public:
{
return mpDoc->pClass->getView(mpDoc);
}
+
+ /**
+ * Get number of views of this document.
+ */
+ inline int getViews()
+ {
+ return mpDoc->pClass->getViews(mpDoc);
+ }
#endif // LOK_USE_UNSTABLE_API
};
@@ -340,16 +348,6 @@ public:
{
return mpThis->pClass->getError(mpThis);
}
-
-#ifdef LOK_USE_UNSTABLE_API
- /**
- * Get number of total views.
- */
- inline int getViews()
- {
- return mpThis->pClass->getViews(mpThis);
- }
-#endif
};
/// Factory method to create a lok::Office instance.
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 50516227e992..99f2076eeea1 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -25,9 +25,8 @@ public:
static void setView(size_t nId);
/// Get the currently active view.
static size_t getView();
-
- /// Total number of view shells.
- static int getViews();
+ /// Get the number of views of the current object shell.
+ static size_t getViews();
};
#endif