summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/viewprt.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-04-07 12:49:26 +0200
committerJan Holesovsky <kendy@collabora.com>2017-04-07 14:55:51 +0000
commiteff08429ea22fc6f09e6364aa51ba4f484889cb9 (patch)
tree0b186b227f8f330b8868062f6d4b0a2ab9f51e24 /sw/source/uibase/uiview/viewprt.cxx
parent0c55972d747511dbc711f3c9cbb4db5d8c5dc2ff (diff)
lok: Make getPart() always return 0 in Writer.
Until now, the getPart() in writer was mis-used to return the current page number. This breaks assumptions about parts on many places, like that that invalidates in one part should not affect invalidates in the other part, and similar. We have been special casing that on many places for Writer, but we should fix the API instead (finally) - should we need the current page number, we should introduce a new call for that, the current situation is just confusing. For now I kept the rest of the part-related calls untouched in Writer, as they are less harmful. Change-Id: I1c996cbc8a3c33778e68e5f9c20f62d57289b5c7 Reviewed-on: https://gerrit.libreoffice.org/36259 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/source/uibase/uiview/viewprt.cxx')
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index ae34128a3ef6..fff7ffbacf6d 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -249,14 +249,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
int SwView::getPart() const
{
- if (m_bInDtor || !m_pWrtShell)
- return 0;
-
- sal_uInt16 nPage, nLogPage;
- OUString sDisplay;
- m_pWrtShell->GetPageNumber(-1, m_pWrtShell->IsCursorVisible(), nPage, nLogPage, sDisplay);
-
- return nPage - 1;
+ return 0;
}
void SwView::dumpAsXml(xmlTextWriterPtr pWriter) const