View | Details | Raw Unified | Return to issue 119587
Collapse All | Expand All

(-)sw/source/filter/ww8/ww8par.cxx (-4 / +22 lines)
Lines 2099-2110 Link Here
2099
2099
2100
    WW8_TablePos *pTabPos=0;
2100
    WW8_TablePos *pTabPos=0;
2101
    WW8_TablePos aTabPos;
2101
    WW8_TablePos aTabPos;
2102
	WW8PLCFx_Cp_FKP* pPap = 0;
2103
	bool bTableHasPositionInfo = false;
2104
    
2102
    if (nCellLevel && !bVer67)
2105
    if (nCellLevel && !bVer67)
2103
    {
2106
    {
2104
        WW8PLCFxSave1 aSave;
2107
        WW8PLCFxSave1 aSave;
2105
        pPlcxMan->GetPap()->Save( aSave );
2108
        pPlcxMan->GetPap()->Save( aSave );
2106
        rbReSync = true;
2109
        rbReSync = true;
2107
        WW8PLCFx_Cp_FKP* pPap = pPlcxMan->GetPapPLCF();
2110
        pPap = pPlcxMan->GetPapPLCF();
2108
        WW8_CP nMyStartCp=nStartCp;
2111
        WW8_CP nMyStartCp=nStartCp;
2109
2112
2110
        if (const sal_uInt8 *pLevel = pPlcxMan->HasParaSprm(0x6649))
2113
        if (const sal_uInt8 *pLevel = pPlcxMan->HasParaSprm(0x6649))
Lines 2116-2130 Link Here
2116
        if (!bHasRowEnd)
2119
        if (!bHasRowEnd)
2117
            nCellLevel = static_cast< sal_uInt8 >(nInTable);
2120
            nCellLevel = static_cast< sal_uInt8 >(nInTable);
2118
2121
2119
        if (bHasRowEnd && ParseTabPos(&aTabPos,pPap))
2122
		sal_uLong idstart = rDoc.GetNodes().GetEndOfContent().StartOfSectionIndex(); // get the node index
2120
            pTabPos = &aTabPos;
2123
		sal_uLong idcur = 0;
2124
		if ( pPaM && pPaM->GetPoint() )
2125
			idcur = pPaM->GetPoint()->nNode.GetIndex();
2126
	
2127
		// Memory first table postion info
2128
		if ( !pFirstTablePap && idstart + 1 == idcur )
2129
			pFirstTablePap = pPap;
2121
2130
2131
		if ( bHasRowEnd  && ParseTabPos(&aTabPos,pPap) )
2132
		{
2133
			// If table front don't have some content and it is doc first table, ignore table text wrapping property
2134
			bTableHasPositionInfo = true;
2135
			if ( pFirstTablePap != pPap )
2136
				pTabPos = &aTabPos;
2137
		}
2138
2122
        pPlcxMan->GetPap()->Restore( aSave );
2139
        pPlcxMan->GetPap()->Restore( aSave );
2123
    }
2140
    }
2124
2141
2142
2125
//  then look if we are in an Apo
2143
//  then look if we are in an Apo
2126
2144
2127
    ApoTestResults aApo = TestApo(nCellLevel, bTableRowEnd, pTabPos);
2145
    ApoTestResults aApo = TestApo(nCellLevel, bTableRowEnd, pTabPos, !(pFirstTablePap == pPap && bTableHasPositionInfo));
2128
2146
2129
    //look to see if we are in a Table, but Table in foot/end note not allowed
2147
    //look to see if we are in a Table, but Table in foot/end note not allowed
2130
    bool bStartTab = (nInTable < nCellLevel) && !bFtnEdn;
2148
    bool bStartTab = (nInTable < nCellLevel) && !bFtnEdn;
(-)sw/source/filter/ww8/ww8par.hxx (-2 / +2 lines)
Lines 1231-1238 Link Here
1231
    bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos);
1231
    bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos);
1232
    void StopApo();
1232
    void StopApo();
1233
    bool TestSameApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos);
1233
    bool TestSameApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos);
1234
    ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd,
1234
    ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd, const WW8_TablePos *pTabPos,
1235
        const WW8_TablePos *pTabPos);
1235
        bool bReadTablePos = true);
1236
1236
1237
    void EndSpecial();
1237
    void EndSpecial();
1238
    bool ProcessSpecial(bool &rbReSync, WW8_CP nStartCp);
1238
    bool ProcessSpecial(bool &rbReSync, WW8_CP nStartCp);
(-)sw/source/filter/ww8/ww8par2.cxx (-3 / +7 lines)
Lines 528-534 Link Here
528
}
528
}
529
529
530
ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
530
ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
531
    const WW8_TablePos *pTabPos)
531
        const WW8_TablePos *pTabPos, bool bReadTablePos)
532
{
532
{
533
    const WW8_TablePos *pTopLevelTable = nCellLevel <= 1 ? pTabPos : 0;
533
    const WW8_TablePos *pTopLevelTable = nCellLevel <= 1 ? pTabPos : 0;
534
    ApoTestResults aRet;
534
    ApoTestResults aRet;
Lines 556-564 Link Here
556
    If we are already a table in a frame then we must grab the para properties
556
    If we are already a table in a frame then we must grab the para properties
557
    to see if we are still in that frame.
557
    to see if we are still in that frame.
558
    */
558
    */
559
    // If table front don't have some content and it is doc first table, ignore table text wrapping property
560
	if ( bReadTablePos )
561
	{
562
		aRet.mpSprm37 = pPlcxMan->HasParaSprm( bVer67 ? 37 : 0x2423 );
563
		aRet.mpSprm29 = pPlcxMan->HasParaSprm( bVer67 ? 29 : 0x261B );
564
	}
559
565
560
    aRet.mpSprm37 = pPlcxMan->HasParaSprm( bVer67 ? 37 : 0x2423 );
561
    aRet.mpSprm29 = pPlcxMan->HasParaSprm( bVer67 ? 29 : 0x261B );
562
566
563
    // Is there some frame data here
567
    // Is there some frame data here
564
    bool bNowApo = aRet.HasFrame() || pTopLevelTable;
568
    bool bNowApo = aRet.HasFrame() || pTopLevelTable;

Return to issue 119587