[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/source
Jan Holesovsky
kendy at collabora.com
Fri Apr 7 11:18:57 UTC 2017
sw/source/uibase/uiview/viewprt.cxx | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
New commits:
commit ca5cca4fbee80f5056291e6e8d7517ea26c0fa8e
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Apr 7 12:49:26 2017 +0200
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
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 5a0ff3d15fbd..76d87b45ad0e 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -250,14 +250,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
More information about the Libreoffice-commits
mailing list