From dc00592b4e48a111efc6ff78bdbf7af998e58e22 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 16 Sep 2016 10:15:31 +0200 Subject: 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 --- desktop/qa/desktop_lib/test_desktop_lib.cxx | 6 +++--- desktop/source/lib/init.cxx | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'desktop') 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 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*/, -- cgit