diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-07-19 10:02:08 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-07-19 08:31:50 +0000 |
commit | 299b9377469473abd8f58ba7f1054794491bdc56 (patch) | |
tree | 1b5ba8d483552f1dce3ffb8b84f28fa9f9aba8c3 /sw/source/uibase/uno/unotxdoc.cxx | |
parent | ae30c85f61557bad0ce3ddf2fc80c710d9e31f69 (diff) |
sfx2 lok: expose part number in SfxLokHelper::notifyOtherViews()
This way a client can decide if the view cursor it gets is relevant (the
views show the same part) or not.
Change-Id: I7b274b28f0c4f0509df5071831acf50512eff640
Reviewed-on: https://gerrit.libreoffice.org/27311
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/source/uibase/uno/unotxdoc.cxx')
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index a4290b8c94a3..2aab84f0eec9 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3230,15 +3230,11 @@ int SwXTextDocument::getPart() { SolarMutexGuard aGuard; - SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); - if (!pWrtShell) + SwView* pView = pDocShell->GetView(); + if (!pView) return 0; - sal_uInt16 nPage, nLogPage; - OUString sDisplay; - pWrtShell->GetPageNumber(-1, pWrtShell->IsCursorVisible(), nPage, nLogPage, sDisplay); - - return nPage - 1; + return pView->getPart(); } OUString SwXTextDocument::getPartName(int nPart) |