Bug 87052 - EDITING: DOCX: Heading numbers incorrectly computed
Summary: EDITING: DOCX: Heading numbers incorrectly computed
Status: CLOSED DUPLICATE of bug 76817
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.1.1 rc
Hardware: Other All
: high major
Assignee: Not Assigned
URL:
Whiteboard: interoperability
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: Bullet-Number-Outline-Lists
  Show dependency treegraph
 
Reported: 2014-12-06 16:28 UTC by David A. Wheeler
Modified: 2020-10-01 06:01 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
A docx template with automatically-numbered headings (24.73 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-12-06 16:28 UTC, David A. Wheeler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David A. Wheeler 2014-12-06 16:28:37 UTC
Created attachment 110511 [details]
A docx template with automatically-numbered headings

Automatically-calculated heading numbers do not work properly on imported .docx files:
1. Load into LibreOffice 4.3.4.1 (release) the attached short .docx file, which has automatically-numbered headings (Heading 1, etc.).
2. Move cursor AFTER the second Heading 1 (numbered 2), to text "Add new paragraph types if needed.".
3. Set its paragraph type to "Heading 1".

Expected result:
The new "Heading 1" should display a calculated section number of "3", since there was a "Heading 1" numbered "2" earlier.

Actual result:
LibreOffice displays a calculated section number of "2", duplicating the section number "2" earlier.  Oops.

The automatically-calculated heading numbers were created using the process described here, so this probably happens often:
http://shaunakelly.com/word/numbering/numbering20072010.html
Comment 1 Buovjaga 2014-12-16 14:19:43 UTC
Reproduced -> NEW.
Lowering severity per https://wiki.documentfoundation.org/images/0/06/Prioritizing_Bugs_Flowchart.jpg

Win 7 64-bit Version: 4.5.0.0.alpha0+
Build ID: 170616e9f2d30c1302bbb5a7a4b588bc05cd5cc9
TinderBox: Win-x86@39, Branch:master, Time: 2014-12-12_01:58:46
Comment 2 Buovjaga 2015-01-12 16:04:40 UTC
This works ok in 3.5.0.
Not ok in 4.5 on Ubuntu.

Ubuntu 14.10 64-bit
LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735

Version: 4.5.0.0.alpha0+
Build ID: 0748a5f8298e2ea817e131234f5e99300ed7f9f7
TinderBox: Win-x86@39, Branch:master, Time: 2015-01-08_08:03:53
Comment 3 Michael Weghorn 2015-01-31 01:17:54 UTC
bibisect result:

There are only 'skip'ped commits left to test.
The first bad commit could be any of: 2cbda3450c2d4619d130f63d492ee220728d8bc9 a86be5aa96c8f5f5d96afb0461cff8402f88ce89
We cannot bisect more!

------

$ git bisect log
# bad: [4a3091e95fa263d3e2dd81e56e83996f0bb12287] source-hash-2b5b04e1e62914bf0902dfd7943cdc44499c47a6
# good: [812c4a492375ac47b3557fbb32f5637fc89d60d9] source-hash-dea4a3b9d7182700abeb4dc756a24a9e8dea8474
git bisect start 'latest' 'oldest'
# good: [5d0dfb8e62ae61a240f8313c594d4560e7c8e048] source-hash-0c6cd530de13f80795881f61064f1bf1dcc4ea81
git bisect good 5d0dfb8e62ae61a240f8313c594d4560e7c8e048
# bad: [7dfacd0b8bd828331d74c0f79de6e8924bc4e6a5] source-hash-f93ce4f7eb90093d0ea3115d0a1c614612676dbd
git bisect bad 7dfacd0b8bd828331d74c0f79de6e8924bc4e6a5
# bad: [1a63057f6378db7c6b8af1171b7b140f7583f246] source-hash-59f84b4a2c082382767f12e0c7a06a3f0b52e721
git bisect bad 1a63057f6378db7c6b8af1171b7b140f7583f246
# bad: [3787e4f82e47eaf4fa454afdca671272e50f875b] source-hash-0e09134a4a4cbb0639fc586c560c6fb2765487be
git bisect bad 3787e4f82e47eaf4fa454afdca671272e50f875b
# good: [5b2c61f6b34f03146c2d03da03a7b7f546ce56b8] source-hash-abf842e4b125b9f863ea4c2af17ad6ac7d82b15e
git bisect good 5b2c61f6b34f03146c2d03da03a7b7f546ce56b8
# bad: [c42f09491446a9544fdb0dd0ebb600cb4f99258b] source-hash-5deaac4ff9956c80ad16dc14c9085d91b5eb0aba
git bisect bad c42f09491446a9544fdb0dd0ebb600cb4f99258b
# good: [f07bf31b22e5ff9aa1d98f1e4d0638524c177e2a] source-hash-9835fa87ac6ffe43bd9cc85839b2fea1fca2fcad
git bisect good f07bf31b22e5ff9aa1d98f1e4d0638524c177e2a
# bad: [a86be5aa96c8f5f5d96afb0461cff8402f88ce89] source-hash-e8e22fcefd569bdf6c3fbe67bb64206e67c3e6b7
git bisect bad a86be5aa96c8f5f5d96afb0461cff8402f88ce89
# skip: [2cbda3450c2d4619d130f63d492ee220728d8bc9] source-hash-ea93714e9427e6802e843c4585871aeef0a5e28d
git bisect skip 2cbda3450c2d4619d130f63d492ee220728d8bc9
# only skipped commits left to test
# possible first bad commit: [a86be5aa96c8f5f5d96afb0461cff8402f88ce89] source-hash-e8e22fcefd569bdf6c3fbe67bb64206e67c3e6b7
# possible first bad commit: [2cbda3450c2d4619d130f63d492ee220728d8bc9] source-hash-ea93714e9427e6802e843c4585871aeef0a5e28d


The skipped commit failed with the following message:
terminate called after throwing an instance of 'com::sun::star::uno::DeploymentException'
Comment 4 Matthew Francis 2015-02-02 02:58:15 UTC
The behaviour appears to have changed as of the below commit.

Adding Cc: to vinaya.mandke@synerzip.com; Could you possibly take a look at this? Thanks


commit e49d2b31fb2020d065b4ad940d1031d07b10f32b
Author: Vinaya Mandke <vinaya.mandke@synerzip.com>
Date:   Fri Jun 6 14:12:48 2014 +0530

    fdo#78939 [DOCX] Hang while opening due to incorrect modification of Style
    
    http://opengrok.libreoffice.org/xref/core/sw/source/core/unocore/unosett.cxx#1884
    Modifies the refernced style of the numbering rule to use the current numbering rule.
    Actually the refernced style is not supposed to be modified.
    As the numbering level formatonly uses that properties particular style,
    which may or may not be a numbering style
    
    For this Particular document the numbering format refers the "Default Style" (Normal).
    Almost all of the styles in style.xml are based on it. Normal was modified,
    and as a result the whole document was bulletized; Which caused the hang while opening
    
    Removed the addition of style as a PARA_STYLE, as the properties of the
    refernced style are already added in ListLevel::AddParaProperties
    
    Conflicts:
    	sw/qa/extras/ooxmlimport/ooxmlimport.cxx
    
    Reviewed on:
    	https://gerrit.libreoffice.org/9668
    
    Change-Id: I8cc143805a38613908d2e2cb4827882d4cf40a78
Comment 5 Robinson Tryon (qubit) 2015-12-13 11:10:58 UTC Comment hidden (no-value, obsolete)
Comment 6 Timur 2016-08-17 12:02:12 UTC
Bug 95377 same regression commit.
Comment 7 Xisco Faulí 2016-09-24 14:54:26 UTC
*** Bug 95377 has been marked as a duplicate of this bug. ***
Comment 8 Cor Nouws 2016-09-25 19:40:35 UTC
I think Vinaya Mandke is no longer active..
Comment 9 Xisco Faulí 2017-10-04 11:24:46 UTC
Problem computing numbering still reproducible in

Version: 6.0.0.0.alpha0+
Build ID: 6e3e4cd38b56d432c48cd7217885974e3f0519fd
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 10 Justin L 2018-01-12 16:04:48 UTC

*** This bug has been marked as a duplicate of bug 76817 ***
Comment 11 ellenwar 2020-10-01 05:57:38 UTC Comment hidden (spam)