[Libreoffice-commits] core.git: sw/source
Jan Holesovsky
kendy at collabora.com
Fri Apr 7 14:56:18 UTC 2017
sw/source/uibase/uiview/viewprt.cxx | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
New commits:
commit eff08429ea22fc6f09e6364aa51ba4f484889cb9
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
Reviewed-on: https://gerrit.libreoffice.org/36259
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jenkins <ci at libreoffice.org>
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
More information about the Libreoffice-commits
mailing list