diff options
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) |