summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-04-03 14:28:56 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-04-05 14:58:50 +0000
commit137ad218db262fb3531215adbc88b7093b4999c7 (patch)
tree1777e3c6f9f23e5e965b0150d9532112318fb2c9 /include
parent7bb46f684ca939fbbbe67bdb1e427e37eec430a7 (diff)
tdf#106237 sw: do some basic sanity checking on layout-cache
The bugdoc, with claimed generator AOO4.1.1 on Windows, contains a bogus layout-cache: debug:26706:1: nType P nIndex 29 2147483647 debug:26706:1: nType P nIndex 66 2147483647 debug:26706:1: nType P nIndex 105 2147483647 debug:26706:1: nType P nIndex 142 2147483647 debug:26706:1: nType P nIndex 178 2147483647 debug:26706:1: nType P nIndex 205 2147483647 debug:26706:1: nType P nIndex 229 2147483647 debug:26706:1: nType T nIndex 314 65535 Due to a loop-control this causes incorrect pagination if CalcLayout() is called only once. It should look like this: debug:26765:1: nType T nIndex 382 65535 debug:26765:1: nType T nIndex 790 65535 In this case we can easily detect that the indexes and types in the layout-cache are bogus by checking against the node types, so do that in SwLayHelper::SwLayHelper(). (cherry picked from commit 8a5374f2fdbd1e15c107133f55930cbc431edbd5) sw: [loplugin:sallogareas] (cherry picked from commit 282b3e8c4d45aacae57e3542b872cdbfebcc7195) loplugin:loopvartoosmall (cherry picked from commit dbaab58c1442e7f62ef0732376fe5a49840e9fd6) Change-Id: I7091af49a8c29bf0a11ceff0be9ba84b1f710fdb Reviewed-on: https://gerrit.libreoffice.org/36046 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/sal/log-areas.dox1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index c5cdc3c188db..2ce662a6cca5 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -464,6 +464,7 @@ certain functionality.
@li @c sw
@li @c sw.a11y - accessibility
@li @c sw.core - Writer core
+@li @c sw.layout - Writer core view: document layout
@li @c sw.createcopy
@li @c sw.doc
@li @c sw.docappend