Apache OpenOffice (AOO) Bugzilla – Issue 119548
[From Symphony]paragraph>pagination>Window/Orphan control setting lost after save the .doc file by aoo 3.4
Last modified: 2012-12-26 08:21:06 UTC
Created attachment 77756 [details] parapagination 1. open the ParaPagination0010.doc file by aoo 3.4 2. save as ParaPagination0010_save.doc 3. open ParaPagination0010_save.doc in MS word 2003 4. right-click in the first paragraph and select Paragraph 5. in Line and Page Breaks tab, the checkbox "Window/Orphan control" should be checked but it's not.
I am checking the issue
The root cause is the Window control&Orphan not added to style by default value. Actually there is a code line to do it(in void WW8RStyle::Set1StyleDefaults()): ....... if( pIo->pWDop->fWidowControl && !bWidowsChanged ) // Widows ? { pIo->pAktColl->SetFmtAttr( SvxWidowsItem( 2, RES_PARATR_WIDOWS ) ); pIo->pAktColl->SetFmtAttr( SvxOrphansItem( 2, RES_PARATR_ORPHANS ) ); } ....... The logic is not run by wrong condition pIo->pWDop->fWidowControl. The value is init in WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize) ...... fFacingPages = 0 != ( a16Bit & 0x0001 ) ; fWidowControl = 0 != ( a16Bit & 0x0002 ) ; fPMHMainDoc = 0 != ( a16Bit & 0x0004 ) ; ...... But the value is not meaningful, in doc specification is should be ignored and MUST not used.
As the root cause analysis, the solution will be straightforward. Just comment the wrong condition. More detail pls check the patch.
Created attachment 78886 [details] patch for the issue
I am volunteering to review this patch. The bit which is between fFacingPages and fPMHMainDoc is unused bit and MUST be ignored regarding MS WORD Binary File Format specification, thus it should not be the flag of fWidowControl. The patch make sense and is OK for me.
"leidb" committed SVN revision 1371576 into trunk: #119548# fix Window/Orphan control setting lost when save .doc file Reported ...
Comment on attachment 78886 [details] patch for the issue review done by zjchen
marking as FIXED as patch has been applied.
verified on the AOO3.5_R1374181