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

(-)source/filter/inc/imp_op.hxx (-3 / +21 lines)
Lines 96-101 Link Here
96
#include "excdefs.hxx"
96
#include "excdefs.hxx"
97
#endif
97
#endif
98
98
99
99
class SfxItemSet;
100
class SfxItemSet;
100
class SvStream;
101
class SvStream;
101
102
Lines 152-159 Link Here
152
							~ExcelChartData();
153
							~ExcelChartData();
153
};
154
};
154
155
156
class OutlineDataBuffer
157
{
158
private:
159
    OutlineBuffer*                      pColOutlineBuff;	
160
    OutlineBuffer*                      pRowOutlineBuff;	
161
    ColRowSettings*                     pColRowBuff;        
162
    UINT16 nTab;
155
163
156
164
public:
165
    OutlineDataBuffer(RootData& rRootData, UINT16 nTab);
166
    
167
    inline ColRowSettings* GetColRowBuff() const { return pColRowBuff ; } 
168
    inline OutlineBuffer* GetColOutline()  const { return pColOutlineBuff; }
169
    inline OutlineBuffer* GetRowOutline()  const { return pRowOutlineBuff; }
170
    void Apply(ScDocument* pD);
171
};
157
172
158
class ImportExcel : private XclImpRootData, public ImportTyp, public XclImpRoot
173
class ImportExcel : private XclImpRootData, public ImportTyp, public XclImpRoot
159
{
174
{
Lines 178-187 Link Here
178
193
179
	SfxItemSet*				pStyleSheetItemSet;	// aktuelle Seitenvorlage
194
	SfxItemSet*				pStyleSheetItemSet;	// aktuelle Seitenvorlage
180
195
181
	OutlineBuffer			aColOutlineBuff;	// temporaere Puffer fuer Outline-
196
    OutlineBuffer*			pColOutlineBuff;	
182
	OutlineBuffer			aRowOutlineBuff;	//  Angabe
197
    OutlineBuffer*			pRowOutlineBuff;
183
    ColRowSettings*         pColRowBuff;        // Col/Row-Einstellungen 1 Tabelle
198
    ColRowSettings*         pColRowBuff;        // Col/Row-Einstellungen 1 Tabelle
184
199
200
    typedef ScfDelList< OutlineDataBuffer >        OutlineListBuffer;
201
    OutlineListBuffer*      pOutlineListBuffer;
202
    
185
	UINT16					nIxfeIndex;			// merkt sich Angabe im IXFE-Record
203
	UINT16					nIxfeIndex;			// merkt sich Angabe im IXFE-Record
186
	UINT16					nLastXF;			// letzter XF in Formula-Record
204
	UINT16					nLastXF;			// letzter XF in Formula-Record
187
	UINT16					nBdshtTab;			// Counter fuer Boundsheet
205
	UINT16					nBdshtTab;			// Counter fuer Boundsheet
(-)source/filter/excel/read.cxx (-5 lines)
Lines 817-823 Link Here
817
						{
817
						{
818
							case Biff5:
818
							case Biff5:
819
								eAkt = Z_Biff5Pre;	// Shrfmla Prefetch, Row-Prefetch
819
								eAkt = Z_Biff5Pre;	// Shrfmla Prefetch, Row-Prefetch
820
                                pColRowBuff->Reset();
821
                                nBofLevel = 0;
820
                                nBofLevel = 0;
822
821
823
                                aIn.StoreGlobalPosition(); // und Position merken
822
                                aIn.StoreGlobalPosition(); // und Position merken
Lines 857-863 Link Here
857
                        case 0x0A:                          // EOF          [ 2345]
856
                        case 0x0A:                          // EOF          [ 2345]
858
                            eAkt = Z_Biff5I;
857
                            eAkt = Z_Biff5I;
859
                            aIn.SeekGlobalPosition(); // und zurueck an alte Position
858
                            aIn.SeekGlobalPosition(); // und zurueck an alte Position
860
                            pColRowBuff->Apply( GetScTab() );
861
                            break;
859
                            break;
862
                        case 0x12:  Protect(); break;       // SHEET PROTECTION
860
                        case 0x12:  Protect(); break;       // SHEET PROTECTION
863
                        case 0x1A:  Verticalpagebreaks(); break;
861
                        case 0x1A:  Verticalpagebreaks(); break;
Lines 1362-1370 Link Here
1362
							case Biff8:
1360
							case Biff8:
1363
                            case Biff8M4:
1361
                            case Biff8M4:
1364
								eAkt = Z_Biff8Pre;	// Shrfmla Prefetch, Row-Prefetch
1362
								eAkt = Z_Biff8Pre;	// Shrfmla Prefetch, Row-Prefetch
1365
                                pColRowBuff->Reset();
1366
                                nBofLevel = 0;
1363
                                nBofLevel = 0;
1367
1368
                                aIn.StoreGlobalPosition();
1364
                                aIn.StoreGlobalPosition();
1369
								break;
1365
								break;
1370
							case Biff8C:
1366
							case Biff8C:
Lines 1404-1410 Link Here
1404
                        case 0x0A:                          // EOF          [ 2345   ]
1400
                        case 0x0A:                          // EOF          [ 2345   ]
1405
                            eAkt = Z_Biff8I;
1401
                            eAkt = Z_Biff8I;
1406
                            aIn.SeekGlobalPosition();         // und zurueck an alte Position
1402
                            aIn.SeekGlobalPosition();         // und zurueck an alte Position
1407
                            pColRowBuff->Apply( GetScTab() );
1408
                            break;
1403
                            break;
1409
                        case 0x12:  Protect(); break;
1404
                        case 0x12:  Protect(); break;
1410
                        case 0x1A:  Verticalpagebreaks(); break;
1405
                        case 0x1A:  Verticalpagebreaks(); break;
(-)source/filter/excel/impop.cxx (-25 / +47 lines)
Lines 186-194 Link Here
186
    XclImpRoot( static_cast< XclImpRootData& >( *this ) ),
186
    XclImpRoot( static_cast< XclImpRootData& >( *this ) ),
187
    maStrm( rSvStrm, *this ),
187
    maStrm( rSvStrm, *this ),
188
    aIn( maStrm ),
188
    aIn( maStrm ),
189
	aColOutlineBuff( MAXCOL + 1 ),
189
	bFitToPage( sal_False ),
190
    aRowOutlineBuff( MAXROW + 1 ),
191
    bFitToPage( sal_False ),
192
    bHasHeader( sal_False ),
190
    bHasHeader( sal_False ),
193
    bHasFooter( sal_False )
191
    bHasFooter( sal_False )
194
{
192
{
Lines 224-233 Link Here
224
    pExtNameBuff = new NameBuffer( pExcRoot );          //#94039# prevent empty rootdata
222
    pExtNameBuff = new NameBuffer( pExcRoot );          //#94039# prevent empty rootdata
225
    pExtNameBuff->SetBase( 1 );
223
    pExtNameBuff->SetBase( 1 );
226
224
227
    pColRowBuff = new ColRowSettings( *pExcRoot );      //#94039# prevent empty rootdata
225
    pOutlineListBuffer = new OutlineListBuffer( );
228
    pColRowBuff->SetDefWidth( STD_COL_WIDTH );
226
    
229
    pColRowBuff->SetDefHeight( ( UINT16 ) STD_ROW_HEIGHT );
230
231
	// ab Biff8
227
	// ab Biff8
232
	pExcRoot->nCondRangeCnt = ( UINT32 ) -1;	// GetCondFormStyleName() starts with increment!
228
	pExcRoot->nCondRangeCnt = ( UINT32 ) -1;	// GetCondFormStyleName() starts with increment!
233
229
Lines 270-276 Link Here
270
    GetDoc().SetSrcCharSet( GetCharSet() );
266
    GetDoc().SetSrcCharSet( GetCharSet() );
271
267
272
    delete pExtNameBuff;
268
    delete pExtNameBuff;
273
    delete pColRowBuff;
269
270
    delete pOutlineListBuffer;
274
271
275
	delete pFormConv;
272
	delete pFormConv;
276
}
273
}
Lines 485-491 Link Here
485
			aIn.Ignore( 2 );	// reserved
482
			aIn.Ignore( 2 );	// reserved
486
			aIn >> nGrbit;
483
			aIn >> nGrbit;
487
484
488
			aRowOutlineBuff.SetLevel( nRow, EXC_ROW_GETLEVEL( nGrbit ),
485
			pRowOutlineBuff->SetLevel( nRow, EXC_ROW_GETLEVEL( nGrbit ),
489
				TRUEBOOL( nGrbit & EXC_ROW_COLLAPSED ), TRUEBOOL( nGrbit & EXC_ROW_ZEROHEIGHT ) );
486
				TRUEBOOL( nGrbit & EXC_ROW_COLLAPSED ), TRUEBOOL( nGrbit & EXC_ROW_ZEROHEIGHT ) );
490
487
491
            pColRowBuff->SetRowSettings( nRow, nRowHeight, nGrbit );
488
            pColRowBuff->SetRowSettings( nRow, nRowHeight, nGrbit );
Lines 1039-1045 Link Here
1039
	if( nColLast > MAXCOL )
1036
	if( nColLast > MAXCOL )
1040
		nColLast = MAXCOL;
1037
		nColLast = MAXCOL;
1041
1038
1042
	aColOutlineBuff.SetLevelRange( nColFirst, nColLast, EXC_COL_GETLEVEL( nOpt ),
1039
	pColOutlineBuff->SetLevelRange( nColFirst, nColLast, EXC_COL_GETLEVEL( nOpt ),
1043
		TRUEBOOL( nOpt & EXC_COL_COLLAPSED ), TRUEBOOL( nOpt & EXC_COL_HIDDEN ) );
1040
		TRUEBOOL( nOpt & EXC_COL_COLLAPSED ), TRUEBOOL( nOpt & EXC_COL_HIDDEN ) );
1044
1041
1045
	if( nOpt & EXC_COL_HIDDEN )	// Cols hidden?
1042
	if( nOpt & EXC_COL_HIDDEN )	// Cols hidden?
Lines 1078-1085 Link Here
1078
	UINT16 nFlags;
1075
	UINT16 nFlags;
1079
	aIn >> nFlags;
1076
	aIn >> nFlags;
1080
1077
1081
    aRowOutlineBuff.SetButtonMode( HasFlag( nFlags, EXC_WSBOOL_ROWBELOW ) );
1078
    pRowOutlineBuff->SetButtonMode( HasFlag( nFlags, EXC_WSBOOL_ROWBELOW ) );
1082
    aColOutlineBuff.SetButtonMode( HasFlag( nFlags, EXC_WSBOOL_COLBELOW ) );
1079
    pColOutlineBuff->SetButtonMode( HasFlag( nFlags, EXC_WSBOOL_COLBELOW ) );
1083
1080
1084
    bFitToPage = HasFlag( nFlags, EXC_WSBOOL_FITTOPAGE );
1081
    bFitToPage = HasFlag( nFlags, EXC_WSBOOL_FITTOPAGE );
1085
}
1082
}
Lines 1631-1637 Link Here
1631
1628
1632
		aIn >> nGrbit >> nXF;
1629
		aIn >> nGrbit >> nXF;
1633
1630
1634
		aRowOutlineBuff.SetLevel( nRow, EXC_ROW_GETLEVEL( nGrbit ),
1631
		pRowOutlineBuff->SetLevel( nRow, EXC_ROW_GETLEVEL( nGrbit ),
1635
			TRUEBOOL( nGrbit & EXC_ROW_COLLAPSED ), TRUEBOOL( nGrbit & EXC_ROW_ZEROHEIGHT ) );
1632
			TRUEBOOL( nGrbit & EXC_ROW_COLLAPSED ), TRUEBOOL( nGrbit & EXC_ROW_ZEROHEIGHT ) );
1636
1633
1637
        pColRowBuff->SetRowSettings( nRow, nRowHeight, nGrbit );
1634
        pColRowBuff->SetRowSettings( nRow, nRowHeight, nGrbit );
Lines 1962-1983 Link Here
1962
1959
1963
void ImportExcel::ResetBof( void )
1960
void ImportExcel::ResetBof( void )
1964
{	// setzt alle Einstellungen fuer neuen Tabellenbeginn zurueck
1961
{	// setzt alle Einstellungen fuer neuen Tabellenbeginn zurueck
1965
    pColRowBuff->Reset();
1962
1963
    // no need anymore as the creation of pColRowBuff is now in NeueTabelle() #i11776
1964
    //pColRowBuff->Reset();
1966
}
1965
}
1967
1966
1968
1967
1969
void ImportExcel::EndSheet( void )
1968
void ImportExcel::EndSheet( void )
1970
{	// mach 'Gemarmel' am Ende eines Sheets
1969
{
1971
    aColOutlineBuff.SetOutlineArray( pD->GetOutlineTable( GetScTab(), TRUE )->GetColArray() );
1972
	aColOutlineBuff.MakeScOutline();
1973
	aColOutlineBuff.Reset();
1974
1975
    aRowOutlineBuff.SetOutlineArray( pD->GetOutlineTable( GetScTab(), TRUE )->GetRowArray() );
1976
	aRowOutlineBuff.MakeScOutline();
1977
	aRowOutlineBuff.Reset();
1978
1979
    pColRowBuff->Apply( GetScTab() );
1980
1981
    GetXFIndexBuffer().Apply();
1970
    GetXFIndexBuffer().Apply();
1982
1971
1983
	pExcRoot->pExtSheetBuff->Reset();
1972
	pExcRoot->pExtSheetBuff->Reset();
Lines 2021-2026 Link Here
2021
    bFitToPage = sal_False;
2010
    bFitToPage = sal_False;
2022
    bHasHeader = sal_False;
2011
    bHasHeader = sal_False;
2023
    bHasFooter = sal_False;
2012
    bHasFooter = sal_False;
2013
2014
    pOutlineListBuffer->Append(new OutlineDataBuffer(*pExcRoot, nTab ));          //#94039# prevent empty rootdata
2015
2016
    pColRowBuff = pOutlineListBuffer->Last()->GetColRowBuff();
2017
    pColOutlineBuff = pOutlineListBuffer->Last()->GetColOutline();
2018
    pRowOutlineBuff = pOutlineListBuffer->Last()->GetRowOutline();
2024
}
2019
}
2025
2020
2026
2021
Lines 2183-2188 Link Here
2183
2178
2184
void ImportExcel::PostDocLoad( void )
2179
void ImportExcel::PostDocLoad( void )
2185
{
2180
{
2181
2182
    // Apply any Outlines for each sheet
2183
    for(OutlineDataBuffer* pBuffer = pOutlineListBuffer->First(); pBuffer; pBuffer = pOutlineListBuffer->Next() )
2184
        pBuffer->Apply(pD);
2185
2186
2186
    // visible area if embedded OLE
2187
    // visible area if embedded OLE
2187
    ScModelObj* pDocObj = GetDocModelObj();
2188
    ScModelObj* pDocObj = GetDocModelObj();
2188
    if( pDocObj )
2189
    if( pDocObj )
Lines 2341-2343 Link Here
2341
    }
2342
    }
2342
}
2343
}
2343
2344
2345
OutlineDataBuffer::OutlineDataBuffer(RootData& rRootData, UINT16 nTabNo) :
2346
    nTab (nTabNo)
2347
{
2348
    pColOutlineBuff = new OutlineBuffer (MAXCOL + 1);
2349
    pRowOutlineBuff = new OutlineBuffer (MAXROW + 1);
2350
    pColRowBuff = new ColRowSettings( rRootData );      
2351
2352
    pColRowBuff->SetDefWidth( STD_COL_WIDTH );
2353
    pColRowBuff->SetDefHeight( ( UINT16 ) STD_ROW_HEIGHT );
2354
}
2355
2356
void OutlineDataBuffer::Apply(ScDocument* pD)
2357
{
2358
    pColOutlineBuff->SetOutlineArray( pD->GetOutlineTable( nTab, TRUE )->GetColArray() );
2359
    pColOutlineBuff->MakeScOutline();
2360
2361
    pRowOutlineBuff->SetOutlineArray( pD->GetOutlineTable( nTab, TRUE )->GetRowArray() );
2362
    pRowOutlineBuff->MakeScOutline();
2363
2364
    pColRowBuff->Apply(nTab);
2365
}

Return to issue 11776