Index: sw/source/filter/ww8/ww8par2.cxx =================================================================== RCS file: /cvs/sw/sw/source/filter/ww8/ww8par2.cxx,v retrieving revision 1.145 diff -u -r1.145 ww8par2.cxx --- sw/source/filter/ww8/ww8par2.cxx 11 Jul 2008 14:18:42 -0000 1.145 +++ sw/source/filter/ww8/ww8par2.cxx 18 Nov 2008 16:23:57 -0000 @@ -204,6 +204,8 @@ short nConvertedLeft; short nMaxRight; short nSwWidth; + short nPreferredWidth; + short nOrgDxaLeft; bool bOk; bool bClaimLineFmt; @@ -1628,7 +1630,7 @@ { sprmNil, - sprmTTextFlow, sprmTFCantSplit, sprmTFCantSplit90,sprmTJc, sprmTFBiDi, sprmTDefTable, + sprmTTableWidth,sprmTTextFlow, sprmTFCantSplit, sprmTFCantSplit90,sprmTJc, sprmTFBiDi, sprmTDefTable, sprmTDyaRowHeight, sprmTDefTableShd, sprmTDxaLeft, sprmTSetBrc, sprmTDxaCol, sprmTInsert, sprmTDelete, sprmTTableHeader, sprmTDxaGapHalf, sprmTTableBorders, @@ -1643,6 +1645,8 @@ case ww::eWW8: switch (nId) { + case 0xF614: + return sprmTTableWidth; case 0x7629: return sprmTTextFlow; case 0x3403: @@ -1762,6 +1766,8 @@ nConvertedLeft(0), nMaxRight(0), nSwWidth(0), + nPreferredWidth(0), + nOrgDxaLeft(0), bOk(true), bClaimLineFmt(false), eOri(text::HoriOrientation::NONE), @@ -1828,6 +1834,15 @@ wwTableSprm eSprm = GetTableSprm(nId, pIo->GetFib().GetFIBVersion()); switch (eSprm) { + case sprmTTableWidth: + { + const BYTE b0 = pParams[0]; + const BYTE b1 = pParams[1]; + const BYTE b2 = pParams[2]; + if (b0 == 3) // Twips + nPreferredWidth = b2 * 0x100 + b1; + } + break; case sprmTTextFlow: pNewBand->ProcessDirection(pParams); break; @@ -1881,6 +1896,7 @@ // shift the whole table to that margin (see below) { short nDxaNew = (INT16)SVBT16ToShort( pParams ); + nOrgDxaLeft = nDxaNew; if( nDxaNew < nTabeDxaNew ) nTabeDxaNew = nDxaNew; } @@ -2326,7 +2342,7 @@ } } */ - if (nMinLeft && (text::HoriOrientation::LEFT == eOri)) + if (nMinLeft && ((!bIsBiDi && text::HoriOrientation::LEFT == eOri) || (bIsBiDi && text::HoriOrientation::RIGHT == eOri))) eOri = text::HoriOrientation::LEFT_AND_WIDTH; // absolutely positioned nDefaultSwCols = nMinCols; // da Zellen einfuegen billiger ist als Mergen @@ -2491,7 +2507,8 @@ //inside the frame, in word the dialog involved greys out the //ability to set the margin. SvxLRSpaceItem aL( RES_LR_SPACE ); - aL.SetLeft( GetMinLeft() ); + // set right to original DxaLeft (i28656) + aL.SetLeft( !bIsBiDi ? GetMinLeft() : pIo->maSectionManager.GetTextAreaWidth() - nPreferredWidth - nOrgDxaLeft); aItemSet.Put(aL); } } Index: sw/source/filter/ww8/ww8par6.cxx =================================================================== RCS file: /cvs/sw/sw/source/filter/ww8/ww8par6.cxx,v retrieving revision 1.188 diff -u -r1.188 ww8par6.cxx --- sw/source/filter/ww8/ww8par6.cxx 16 Jul 2008 20:11:56 -0000 1.188 +++ sw/source/filter/ww8/ww8par6.cxx 18 Nov 2008 16:24:00 -0000 @@ -6002,7 +6002,8 @@ //recorded as 3 byte; {0xCA78, &SwWW8ImplReader::Read_DoubleLine_Rotate}, {0x6649, 0}, //undocumented - {0xF614, 0}, //undocumented + {0xF614, 0}, //"sprmTTableWidth" + //recorded as 3 bytes; {0xD612, 0}, //undocumented {0xD613, 0}, //undocumented {0xD61A, 0}, //undocumented