Bug 316412

Summary: Roundtrip of headers in text documents broken
Product: [Applications] calligracommon Reporter: T Zachmann <t.zachmann>
Component: generalAssignee: Calligra Bugs <calligra-bugs-null>
Status: RESOLVED FIXED    
Severity: critical    
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Document showing the problem

Description T Zachmann 2013-03-09 12:29:40 UTC
The headers/footers are not showing up after saving, loading. 

The problem is that saving saves the stylename of the page style is changed on saving as there is already a style with the same name. As the stylename is expected to be "standard" and it is no longer that it fails on loading. Also loading on LO does not work.

Reproducible: Always

Steps to Reproduce:
1. Load the document
2. Save the document
3. Reload the document
Actual Results:  
Headers are lost.

Expected Results:  
Headers should not be lost.
Comment 1 T Zachmann 2013-03-09 12:30:55 UTC
Created attachment 77888 [details]
Document showing the problem
Comment 2 T Zachmann 2013-03-09 17:33:45 UTC
Git commit b92d17adc364169dde05440c209a217c35dadf26 by Thorsten Zachmann.
Committed on 09/03/2013 at 18:27.
Pushed by zachmann into branch 'master'.

Allow noneunique style names with different family

If a style has a different family allow it to have the same name as a differnt
style. This allows to have a page style named standard and also a paragraph style
with this name.
This fixes roundtrip saving of header/footers in words.

REVIEW: 109370

M  +1    -1    filters/libmso/ODrawToOdf.cpp
M  +1    -1    filters/libmsooxml/MsooXmlUtils.cpp
M  +5    -4    filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp
M  +4    -5    filters/words/docx/DocxXmlDocumentReader.cpp
M  +1    -0    filters/words/docx/DocxXmlDocumentReader.h
M  +1    -1    filters/words/msword-odf/paragraph.cpp
M  +1    -1    filters/words/msword-odf/tablehandler.cpp
M  +2    -2    filters/words/msword-odf/texthandler.cpp
M  +1    -1    libs/koreport/renderer/odtframe/KoOdtFrameReportDocument.cpp
M  +1    -1    libs/kotext/styles/KoStyleManager.cpp
M  +2    -1    libs/odf/KoGenStyle.cpp
M  +43   -48   libs/odf/KoGenStyles.cpp
M  +5    -13   libs/odf/KoGenStyles.h
M  +4    -17   libs/odf/tests/TestKoGenStyles.cpp

http://commits.kde.org/calligra/b92d17adc364169dde05440c209a217c35dadf26