summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx11
-rw-r--r--desktop/source/lib/init.cxx16
2 files changed, 14 insertions, 13 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 3fd66343a424..d341c76247cd 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -295,16 +295,17 @@ void DesktopLOKTest::testCreateView()
LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViews(pDocument));
- int nId = pDocument->m_pDocumentClass->createView(pDocument);
+ std::uintptr_t nId0 = pDocument->m_pDocumentClass->getView(pDocument);
+ std::uintptr_t nId1 = pDocument->m_pDocumentClass->createView(pDocument);
CPPUNIT_ASSERT_EQUAL(2, pDocument->m_pDocumentClass->getViews(pDocument));
// Make sure the created view is the active one, then switch to the old
// one.
- CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getView(pDocument));
- pDocument->m_pDocumentClass->setView(pDocument, 0);
- CPPUNIT_ASSERT_EQUAL(0, pDocument->m_pDocumentClass->getView(pDocument));
+ CPPUNIT_ASSERT_EQUAL(nId1, pDocument->m_pDocumentClass->getView(pDocument));
+ pDocument->m_pDocumentClass->setView(pDocument, nId0);
+ CPPUNIT_ASSERT_EQUAL(nId0, pDocument->m_pDocumentClass->getView(pDocument));
- pDocument->m_pDocumentClass->destroyView(pDocument, nId);
+ pDocument->m_pDocumentClass->destroyView(pDocument, nId1);
CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViews(pDocument));
}
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a0aebeed4fe7..c0477a5c34ba 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -364,10 +364,10 @@ static void doc_setClientZoom(LibreOfficeKitDocument* pThis,
int nTileTwipWidth,
int nTileTwipHeight);
static void doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, int nY, int nWidth, int nHeight);
-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 uintptr_t doc_createView(LibreOfficeKitDocument* pThis);
+static void doc_destroyView(LibreOfficeKitDocument* pThis, uintptr_t nId);
+static void doc_setView(LibreOfficeKitDocument* pThis, uintptr_t nId);
+static uintptr_t doc_getView(LibreOfficeKitDocument* pThis);
static int doc_getViews(LibreOfficeKitDocument* pThis);
static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis,
const char *pFontName,
@@ -1850,28 +1850,28 @@ static void doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, int
pDoc->setClientVisibleArea(aRectangle);
}
-static int doc_createView(LibreOfficeKitDocument* /*pThis*/)
+static uintptr_t doc_createView(LibreOfficeKitDocument* /*pThis*/)
{
SolarMutexGuard aGuard;
return SfxLokHelper::createView();
}
-static void doc_destroyView(LibreOfficeKitDocument* /*pThis*/, int nId)
+static void doc_destroyView(LibreOfficeKitDocument* /*pThis*/, uintptr_t nId)
{
SolarMutexGuard aGuard;
SfxLokHelper::destroyView(nId);
}
-static void doc_setView(LibreOfficeKitDocument* /*pThis*/, int nId)
+static void doc_setView(LibreOfficeKitDocument* /*pThis*/, uintptr_t nId)
{
SolarMutexGuard aGuard;
SfxLokHelper::setView(nId);
}
-static int doc_getView(LibreOfficeKitDocument* /*pThis*/)
+static uintptr_t doc_getView(LibreOfficeKitDocument* /*pThis*/)
{
SolarMutexGuard aGuard;