diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-16 10:15:31 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-16 12:36:28 +0200 |
commit | dc00592b4e48a111efc6ff78bdbf7af998e58e22 (patch) | |
tree | 8ed83a15626e4f79db23da9d584f478dfe3f604f /desktop | |
parent | ef7abe81df10cb8a8c04afbb1fbe700f94e73f04 (diff) |
lok::Document: rename getViews() to getViewsCount()
As this only returns the number of views, not the actual views. Since
it's a rename, it's just an API (but not an ABI) change.
Change-Id: Ib4f0ea56a90e5ae9c80ee1781aa2f29aff4259e7
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 6 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 28d78bc09a90..8f3807ee79d5 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -310,11 +310,11 @@ void DesktopLOKTest::testGetFonts() void DesktopLOKTest::testCreateView() { LibLODocument_Impl* pDocument = loadDoc("blank_text.odt"); - CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViews(pDocument)); + CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViewsCount(pDocument)); int nId0 = pDocument->m_pDocumentClass->getView(pDocument); int nId1 = pDocument->m_pDocumentClass->createView(pDocument); - CPPUNIT_ASSERT_EQUAL(2, pDocument->m_pDocumentClass->getViews(pDocument)); + CPPUNIT_ASSERT_EQUAL(2, pDocument->m_pDocumentClass->getViewsCount(pDocument)); // Make sure the created view is the active one, then switch to the old // one. @@ -323,7 +323,7 @@ void DesktopLOKTest::testCreateView() CPPUNIT_ASSERT_EQUAL(nId0, pDocument->m_pDocumentClass->getView(pDocument)); pDocument->m_pDocumentClass->destroyView(pDocument, nId1); - CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViews(pDocument)); + CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViewsCount(pDocument)); } void DesktopLOKTest::testGetPartPageRectangles() diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index affc0197799d..967d73073e07 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -437,7 +437,7 @@ static int doc_createView(LibreOfficeKitDocument* pThis); static void doc_destroyView(LibreOfficeKitDocument* pThis, int nId); static void doc_setView(LibreOfficeKitDocument* pThis, int nId); static int doc_getView(LibreOfficeKitDocument* pThis); -static int doc_getViews(LibreOfficeKitDocument* pThis); +static int doc_getViewsCount(LibreOfficeKitDocument* pThis); static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis, const char *pFontName, int* pFontWidth, @@ -484,7 +484,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone m_pDocumentClass->destroyView = doc_destroyView; m_pDocumentClass->setView = doc_setView; m_pDocumentClass->getView = doc_getView; - m_pDocumentClass->getViews = doc_getViews; + m_pDocumentClass->getViewsCount = doc_getViewsCount; m_pDocumentClass->renderFont = doc_renderFont; m_pDocumentClass->getPartHash = doc_getPartHash; @@ -2306,11 +2306,11 @@ static int doc_getView(LibreOfficeKitDocument* /*pThis*/) return SfxLokHelper::getView(); } -static int doc_getViews(LibreOfficeKitDocument* /*pThis*/) +static int doc_getViewsCount(LibreOfficeKitDocument* /*pThis*/) { SolarMutexGuard aGuard; - return SfxLokHelper::getViews(); + return SfxLokHelper::getViewsCount(); } unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/, |