summaryrefslogtreecommitdiff
path: root/desktop/source/lib/init.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/lib/init.cxx')
-rw-r--r--desktop/source/lib/init.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 568363fea289..2e5f9380fa44 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1207,9 +1207,8 @@ VclPtr<Window> getSidebarWindow()
} // anonymous namespace
-LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XComponent> &xComponent, int nDocumentId)
+LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XComponent> &xComponent)
: mxComponent(xComponent)
- , mnDocumentId(nDocumentId)
{
if (!(m_pDocumentClass = gDocumentClass.lock()))
{
@@ -2151,8 +2150,6 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
SolarMutexGuard aGuard;
- static int nDocumentIdCounter = 0;
-
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
pLib->maLastExceptionMsg.clear();
@@ -2249,10 +2246,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
return nullptr;
}
- LibLODocument_Impl* pDocument = new LibLODocument_Impl(xComponent, nDocumentIdCounter++);
-
- // Do we know that after loading the document, its initial view is the "current" view?
- SfxLokHelper::setDocumentIdOfView(pDocument->mnDocumentId);
+ LibLODocument_Impl* pDocument = new LibLODocument_Impl(xComponent);
if (pLib->mpCallback)
{
int nState = doc_getSignatureState(pDocument);
@@ -3143,9 +3137,7 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis,
{
// tile painting always needs a SfxViewShell::Current(), but actually
// it does not really matter which one - all of them should paint the
- // same thing. It's important to get a view for the correct document,
- // though.
- // doc_getViewsCount() returns the count of views for the document in the current view.
+ // same thing.
int viewCount = doc_getViewsCount(pThis);
if (viewCount == 0)
return;