1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_sc.hxx"
33 //------------------------------------------------------------------------
35 #include "scitems.hxx"
36 #include <editeng/eeitem.hxx>
39 #include <editeng/adjitem.hxx>
40 #include <editeng/editobj.hxx>
41 #include <editeng/editview.hxx>
42 #include <editeng/escpitem.hxx>
43 #include <editeng/langitem.hxx>
44 #include <svx/svdograf.hxx>
45 #include <svx/svdpage.hxx>
46 #include <editeng/scripttypeitem.hxx>
47 #include <svtools/htmlcfg.hxx>
48 #include <sfx2/sfxhtml.hxx>
49 #include <svtools/parhtml.hxx>
50 #include <svl/zforlist.hxx>
51 #include <vcl/virdev.hxx>
52 #include <vcl/svapp.hxx>
53 #include <unotools/syslocale.hxx>
54 #include <unotools/charclass.hxx>
56 #include "eeimport.hxx"
58 #include "document.hxx"
59 #include "editutil.hxx"
60 #include "stlsheet.hxx"
61 #include "docpool.hxx"
63 #include "patattr.hxx"
65 #include "eeparser.hxx"
66 #include "drwlayer.hxx"
67 #include "rangenam.hxx"
68 #include "progress.hxx"
70 #include "globstr.hrc"
73 extern void ScLimitSizeOnDrawPage( Size
& rSize
, Point
& rPos
, const Size
& rPage
);
75 //------------------------------------------------------------------------
77 ScEEImport::ScEEImport( ScDocument
* pDocP
, const ScRange
& rRange
) :
81 mpRowHeights( new Table
)
83 const ScPatternAttr
* pPattern
= mpDoc
->GetPattern(
84 maRange
.aStart
.Col(), maRange
.aStart
.Row(), maRange
.aStart
.Tab() );
85 mpEngine
= new ScTabEditEngine( *pPattern
, mpDoc
->GetEditPool() );
86 mpEngine
->SetUpdateMode( FALSE
);
87 mpEngine
->EnableUndo( FALSE
);
91 ScEEImport::~ScEEImport()
93 // Reihenfolge wichtig, sonst knallt's irgendwann irgendwo in irgendeinem Dtor!
94 // Ist gewaehrleistet, da ScEEImport Basisklasse ist
95 delete mpEngine
; // nach Parser!
100 ULONG
ScEEImport::Read( SvStream
& rStream
, const String
& rBaseURL
)
102 ULONG nErr
= mpParser
->Read( rStream
, rBaseURL
);
106 mpParser
->GetDimensions( nEndCol
, nEndRow
);
109 nEndCol
+= maRange
.aStart
.Col() - 1;
110 if ( nEndCol
> MAXCOL
)
114 nEndCol
= maRange
.aStart
.Col();
117 nEndRow
+= maRange
.aStart
.Row() - 1;
118 if ( nEndRow
> MAXROW
)
122 nEndRow
= maRange
.aStart
.Row();
123 maRange
.aEnd
.Set( nEndCol
, nEndRow
, maRange
.aStart
.Tab() );
129 void ScEEImport::WriteToDocument( BOOL bSizeColsRows
, double nOutputFactor
, SvNumberFormatter
* pFormatter
, bool bConvertDate
)
131 ScProgress
* pProgress
= new ScProgress( mpDoc
->GetDocumentShell(),
132 ScGlobal::GetRscString( STR_LOAD_DOC
), mpParser
->Count() );
135 SCCOL nStartCol
, nEndCol
;
136 SCROW nStartRow
, nEndRow
;
138 SCROW nOverlapRowMax
, nLastMergedRow
;
140 nStartCol
= maRange
.aStart
.Col();
141 nStartRow
= maRange
.aStart
.Row();
142 nTab
= maRange
.aStart
.Tab();
143 nEndCol
= maRange
.aEnd
.Col();
144 nEndRow
= maRange
.aEnd
.Row();
147 nLastMergedRow
= SCROW_MAX
;
148 BOOL bHasGraphics
= FALSE
;
151 pFormatter
= mpDoc
->GetFormatTable();
152 bool bNumbersEnglishUS
= false;
153 if (pFormatter
->GetLanguage() == LANGUAGE_SYSTEM
)
155 // Automatic language option selected. Check for the global 'use US English' option.
157 bNumbersEnglishUS
= aOpt
.IsNumbersEnglishUS();
159 ScDocumentPool
* pDocPool
= mpDoc
->GetPool();
160 ScRangeName
* pRangeNames
= mpDoc
->GetRangeName();
161 for ( pE
= mpParser
->First(); pE
; pE
= mpParser
->Next() )
163 SCROW nRow
= nStartRow
+ pE
->nRow
;
164 if ( nRow
!= nLastMergedRow
)
166 SCCOL nCol
= nStartCol
+ pE
->nCol
+ nMergeColAdd
;
167 // RowMerge feststellen, pures ColMerge und ColMerge der ersten
168 // MergeRow bereits beim parsen
169 if ( nRow
<= nOverlapRowMax
)
171 while ( nCol
<= MAXCOL
&& mpDoc
->HasAttrib( nCol
, nRow
, nTab
,
172 nCol
, nRow
, nTab
, HASATTR_OVERLAPPED
) )
177 nLastMergedRow
= nRow
;
179 // fuer zweiten Durchlauf eintragen
182 if ( ValidCol(nCol
) && ValidRow(nRow
) )
184 SfxItemSet aSet
= mpEngine
->GetAttribs( pE
->aSel
);
185 // Default raus, wir setzen selber links/rechts je nachdem ob Text
186 // oder Zahl; EditView.GetAttribs liefert immer kompletten Set
187 // mit Defaults aufgefuellt
188 const SfxPoolItem
& rItem
= aSet
.Get( EE_PARA_JUST
);
189 if ( ((const SvxAdjustItem
&)rItem
).GetAdjust() == SVX_ADJUST_LEFT
)
190 aSet
.ClearItem( EE_PARA_JUST
);
192 // Testen, ob einfacher String ohne gemischte Attribute
193 BOOL bSimple
= ( pE
->aSel
.nStartPara
== pE
->aSel
.nEndPara
);
194 for (USHORT nId
= EE_CHAR_START
; nId
<= EE_CHAR_END
&& bSimple
; nId
++)
196 const SfxPoolItem
* pItem
= 0;
197 SfxItemState eState
= aSet
.GetItemState( nId
, TRUE
, &pItem
);
198 if (eState
== SFX_ITEM_DONTCARE
)
200 else if (eState
== SFX_ITEM_SET
)
202 if ( nId
== EE_CHAR_ESCAPEMENT
) // Hoch-/Tiefstellen immer ueber EE
204 if ( (SvxEscapement
)((const SvxEscapementItem
*)pItem
)->GetEnumValue()
205 != SVX_ESCAPEMENT_OFF
)
211 { // Feldbefehle enthalten?
212 SfxItemState eFieldState
= aSet
.GetItemState( EE_FEATURE_FIELD
, FALSE
);
213 if ( eFieldState
== SFX_ITEM_DONTCARE
|| eFieldState
== SFX_ITEM_SET
)
218 String aValStr
, aNumStr
;
220 sal_uInt32 nNumForm
= 0;
221 LanguageType eNumLang
= LANGUAGE_NONE
;
223 { // SDNUM muss sein wenn SDVAL
224 aNumStr
= *pE
->pNumStr
;
226 aValStr
= *pE
->pValStr
;
227 fVal
= SfxHTMLParser::GetTableDataOptionsValNum(
228 nNumForm
, eNumLang
, aValStr
, aNumStr
, *pFormatter
);
232 ScPatternAttr
aAttr( pDocPool
);
233 aAttr
.GetFromEditItemSet( &aSet
);
234 SfxItemSet
& rSet
= aAttr
.GetItemSet();
237 rSet
.Put( SfxUInt32Item( ATTR_VALUE_FORMAT
, nNumForm
) );
238 rSet
.Put( SvxLanguageItem( eNumLang
, ATTR_LANGUAGE_FORMAT
) );
240 const SfxItemSet
& rESet
= pE
->aItemSet
;
243 const SfxPoolItem
* pItem
;
244 if ( rESet
.GetItemState( ATTR_BACKGROUND
, FALSE
, &pItem
) == SFX_ITEM_SET
)
246 if ( rESet
.GetItemState( ATTR_BORDER
, FALSE
, &pItem
) == SFX_ITEM_SET
)
248 if ( rESet
.GetItemState( ATTR_SHADOW
, FALSE
, &pItem
) == SFX_ITEM_SET
)
251 if ( rESet
.GetItemState( ATTR_HOR_JUSTIFY
, FALSE
, &pItem
) == SFX_ITEM_SET
)
253 if ( rESet
.GetItemState( ATTR_VER_JUSTIFY
, FALSE
, &pItem
) == SFX_ITEM_SET
)
255 if ( rESet
.GetItemState( ATTR_LINEBREAK
, FALSE
, &pItem
) == SFX_ITEM_SET
)
257 if ( rESet
.GetItemState( ATTR_FONT_COLOR
, FALSE
, &pItem
) == SFX_ITEM_SET
)
259 if ( rESet
.GetItemState( ATTR_FONT_UNDERLINE
, FALSE
, &pItem
) == SFX_ITEM_SET
)
261 // HTML LATIN/CJK/CTL script type dependent
262 const SfxPoolItem
* pFont
;
263 if ( rESet
.GetItemState( ATTR_FONT
, FALSE
, &pFont
) != SFX_ITEM_SET
)
265 const SfxPoolItem
* pHeight
;
266 if ( rESet
.GetItemState( ATTR_FONT_HEIGHT
, FALSE
, &pHeight
) != SFX_ITEM_SET
)
268 const SfxPoolItem
* pWeight
;
269 if ( rESet
.GetItemState( ATTR_FONT_WEIGHT
, FALSE
, &pWeight
) != SFX_ITEM_SET
)
271 const SfxPoolItem
* pPosture
;
272 if ( rESet
.GetItemState( ATTR_FONT_POSTURE
, FALSE
, &pPosture
) != SFX_ITEM_SET
)
274 if ( pFont
|| pHeight
|| pWeight
|| pPosture
)
276 String
aStr( mpEngine
->GetText( pE
->aSel
) );
277 BYTE nScriptType
= mpDoc
->GetStringScriptType( aStr
);
278 const BYTE nScripts
[3] = { SCRIPTTYPE_LATIN
,
279 SCRIPTTYPE_ASIAN
, SCRIPTTYPE_COMPLEX
};
280 for ( BYTE i
=0; i
<3; ++i
)
282 if ( nScriptType
& nScripts
[i
] )
285 rSet
.Put( *pFont
, ScGlobal::GetScriptedWhichID(
286 nScripts
[i
], ATTR_FONT
));
288 rSet
.Put( *pHeight
, ScGlobal::GetScriptedWhichID(
289 nScripts
[i
], ATTR_FONT_HEIGHT
));
291 rSet
.Put( *pWeight
, ScGlobal::GetScriptedWhichID(
292 nScripts
[i
], ATTR_FONT_WEIGHT
));
294 rSet
.Put( *pPosture
, ScGlobal::GetScriptedWhichID(
295 nScripts
[i
], ATTR_FONT_POSTURE
));
300 if ( pE
->nColOverlap
> 1 || pE
->nRowOverlap
> 1 )
301 { // merged cells, mit SfxItemSet Put schneller als mit
302 // nachtraeglichem ScDocument DoMerge
303 ScMergeAttr
aMerge( pE
->nColOverlap
, pE
->nRowOverlap
);
306 if ( pE
->nColOverlap
> 1 )
307 mpDoc
->ApplyFlagsTab( nCol
+1, nRow
,
308 nCol
+ pE
->nColOverlap
- 1, nRow
, nTab
,
310 if ( pE
->nRowOverlap
> 1 )
312 nRO
= nRow
+ pE
->nRowOverlap
- 1;
313 mpDoc
->ApplyFlagsTab( nCol
, nRow
+1,
316 if ( nRO
> nOverlapRowMax
)
317 nOverlapRowMax
= nRO
;
319 if ( pE
->nColOverlap
> 1 && pE
->nRowOverlap
> 1 )
320 mpDoc
->ApplyFlagsTab( nCol
+1, nRow
+1,
321 nCol
+ pE
->nColOverlap
- 1, nRO
, nTab
,
322 SC_MF_HOR
| SC_MF_VER
);
324 const ScStyleSheet
* pStyleSheet
=
325 mpDoc
->GetPattern( nCol
, nRow
, nTab
)->GetStyleSheet();
326 aAttr
.SetStyleSheet( (ScStyleSheet
*)pStyleSheet
);
327 mpDoc
->SetPattern( nCol
, nRow
, nTab
, aAttr
, TRUE
);
333 mpDoc
->SetValue( nCol
, nRow
, nTab
, fVal
);
334 else if ( !pE
->aSel
.HasRange() )
336 // maybe ALT text of IMG or similar
337 mpDoc
->SetString( nCol
, nRow
, nTab
, pE
->aAltText
, pFormatter
);
338 // wenn SelRange komplett leer kann nachfolgender Text im gleichen Absatz liegen!
343 if( pE
->bEntirePara
)
345 aStr
= mpEngine
->GetText( pE
->aSel
.nStartPara
);
349 aStr
= mpEngine
->GetText( pE
->aSel
);
350 aStr
.EraseLeadingAndTrailingChars();
353 // TODO: RTF import should follow the language tag,
354 // currently this follows the HTML options for both, HTML
356 bool bEnUsRecognized
= false;
357 if (bNumbersEnglishUS
)
359 pFormatter
->ChangeIntl( LANGUAGE_ENGLISH_US
);
360 sal_uInt32 nIndex
= pFormatter
->GetStandardIndex( LANGUAGE_ENGLISH_US
);
362 if (pFormatter
->IsNumberFormat( aStr
, nIndex
, fEnVal
))
364 bEnUsRecognized
= true;
365 sal_uInt32 nNewIndex
=
366 pFormatter
->GetFormatForLanguageIfBuiltIn(
367 nIndex
, LANGUAGE_SYSTEM
);
368 DBG_ASSERT( nNewIndex
!= nIndex
, "ScEEImport::WriteToDocument: NumbersEnglishUS not a built-in format?");
369 pFormatter
->GetInputLineString( fEnVal
, nNewIndex
, aStr
);
371 pFormatter
->ChangeIntl( LANGUAGE_SYSTEM
);
374 // #105460#, #i4180# String cells can't contain tabs or linebreaks
375 // -> replace with spaces
376 aStr
.SearchAndReplaceAll( (sal_Unicode
)'\t', (sal_Unicode
)' ' );
377 aStr
.SearchAndReplaceAll( (sal_Unicode
)'\n', (sal_Unicode
)' ' );
379 if (bNumbersEnglishUS
&& !bEnUsRecognized
)
380 mpDoc
->PutCell( nCol
, nRow
, nTab
, new ScStringCell( aStr
));
382 mpDoc
->SetString( nCol
, nRow
, nTab
, aStr
, pFormatter
, bConvertDate
);
387 EditTextObject
* pObject
= mpEngine
->CreateTextObject( pE
->aSel
);
388 mpDoc
->PutCell( nCol
, nRow
, nTab
, new ScEditCell( pObject
,
389 mpDoc
, mpEngine
->GetEditTextObjectPool() ) );
392 if ( pE
->pImageList
)
393 bHasGraphics
|= GraphicSize( nCol
, nRow
, nTab
, pE
);
395 { // Anchor Name => RangeName
397 if ( !pRangeNames
->SearchName( *pE
->pName
, nIndex
) )
399 ScRangeData
* pData
= new ScRangeData( mpDoc
, *pE
->pName
,
400 ScAddress( nCol
, nRow
, nTab
) );
401 pRangeNames
->Insert( pData
);
405 pProgress
->SetStateOnPercent( ++nProgress
);
410 Table
* pColWidths
= mpParser
->GetColWidths();
411 if ( pColWidths
->Count() )
414 pProgress
->SetState( nProgress
, nEndCol
- nStartCol
+ 1 );
415 for ( SCCOL nCol
= nStartCol
; nCol
<= nEndCol
; nCol
++ )
417 USHORT nWidth
= (USHORT
)(ULONG
) pColWidths
->Get( nCol
);
419 mpDoc
->SetColWidth( nCol
, nTab
, nWidth
);
420 pProgress
->SetState( ++nProgress
);
423 DELETEZ( pProgress
); // SetOptimalHeight hat seinen eigenen ProgressBar
424 // Zeilenhoehen anpassen, Basis 100% Zoom
425 Fraction
aZoom( 1, 1 );
426 double nPPTX
= ScGlobal::nScreenPPTX
* (double) aZoom
427 / nOutputFactor
; // Faktor ist Drucker zu Bildschirm
428 double nPPTY
= ScGlobal::nScreenPPTY
* (double) aZoom
;
429 VirtualDevice aVirtDev
;
430 mpDoc
->SetOptimalHeight( 0, nEndRow
, 0,
431 static_cast< USHORT
>( ScGlobal::nLastRowHeightExtra
), &aVirtDev
,
432 nPPTX
, nPPTY
, aZoom
, aZoom
, FALSE
);
433 if ( mpRowHeights
->Count() )
435 for ( SCROW nRow
= nStartRow
; nRow
<= nEndRow
; nRow
++ )
437 USHORT nHeight
= (USHORT
)(ULONG
) mpRowHeights
->Get( nRow
);
438 if ( nHeight
> mpDoc
->GetRowHeight( nRow
, nTab
) )
439 mpDoc
->SetRowHeight( nRow
, nTab
, nHeight
);
444 { // Grafiken einfuegen
445 for ( pE
= mpParser
->First(); pE
; pE
= mpParser
->Next() )
447 if ( pE
->pImageList
)
449 SCCOL nCol
= pE
->nCol
;
450 SCROW nRow
= pE
->nRow
;
451 if ( ValidCol(nCol
) && ValidRow(nRow
) )
452 InsertGraphic( nCol
, nRow
, nTab
, pE
);
461 BOOL
ScEEImport::GraphicSize( SCCOL nCol
, SCROW nRow
, SCTAB
/*nTab*/,
464 ScHTMLImageList
* pIL
= pE
->pImageList
;
465 if ( !pIL
|| !pIL
->Count() )
467 BOOL bHasGraphics
= FALSE
;
468 OutputDevice
* pDefaultDev
= Application::GetDefaultDevice();
469 long nWidth
, nHeight
;
470 nWidth
= nHeight
= 0;
471 sal_Char nDir
= nHorizontal
;
472 for ( ScHTMLImage
* pI
= pIL
->First(); pI
; pI
= pIL
->Next() )
476 Size aSizePix
= pI
->aSize
;
477 aSizePix
.Width() += 2 * pI
->aSpace
.X();
478 aSizePix
.Height() += 2 * pI
->aSpace
.Y();
479 Size aLogicSize
= pDefaultDev
->PixelToLogic( aSizePix
, MapMode( MAP_TWIP
) );
480 if ( nDir
& nHorizontal
)
481 nWidth
+= aLogicSize
.Width();
482 else if ( nWidth
< aLogicSize
.Width() )
483 nWidth
= aLogicSize
.Width();
484 if ( nDir
& nVertical
)
485 nHeight
+= aLogicSize
.Height();
486 else if ( nHeight
< aLogicSize
.Height() )
487 nHeight
= aLogicSize
.Height();
491 Table
* pColWidths
= mpParser
->GetColWidths();
492 long nThisWidth
= (long) pColWidths
->Get( nCol
);
493 long nColWidths
= nThisWidth
;
494 SCCOL nColSpanCol
= nCol
+ pE
->nColOverlap
;
495 for ( SCCOL nC
= nCol
+ 1; nC
< nColSpanCol
; nC
++ )
497 nColWidths
+= (long) pColWidths
->Get( nC
);
499 if ( nWidth
> nColWidths
)
500 { // Differenz nur in der ersten Spalte eintragen
502 pColWidths
->Replace( nCol
, (void*)(nWidth
- nColWidths
+ nThisWidth
) );
504 pColWidths
->Insert( nCol
, (void*)(nWidth
- nColWidths
) );
506 // Zeilenhoehen, Differenz auf alle betroffenen Zeilen verteilen
507 SCROW nRowSpan
= pE
->nRowOverlap
;
510 nHeight
= 1; // fuer eindeutigen Vergleich
511 for ( SCROW nR
= nRow
; nR
< nRow
+ nRowSpan
; nR
++ )
513 long nRowHeight
= (long) mpRowHeights
->Get( nR
);
514 if ( nHeight
> nRowHeight
)
517 mpRowHeights
->Replace( nR
, (void*)nHeight
);
519 mpRowHeights
->Insert( nR
, (void*)nHeight
);
526 void ScEEImport::InsertGraphic( SCCOL nCol
, SCROW nRow
, SCTAB nTab
,
529 ScHTMLImageList
* pIL
= pE
->pImageList
;
530 if ( !pIL
|| !pIL
->Count() )
532 ScDrawLayer
* pModel
= mpDoc
->GetDrawLayer();
535 mpDoc
->InitDrawLayer();
536 pModel
= mpDoc
->GetDrawLayer();
538 SdrPage
* pPage
= pModel
->GetPage( static_cast<sal_uInt16
>(nTab
) );
539 OutputDevice
* pDefaultDev
= Application::GetDefaultDevice();
541 Point
aCellInsertPos(
542 (long)((double) mpDoc
->GetColOffset( nCol
, nTab
) * HMM_PER_TWIPS
),
543 (long)((double) mpDoc
->GetRowOffset( nRow
, nTab
) * HMM_PER_TWIPS
) );
545 Point
aInsertPos( aCellInsertPos
);
548 sal_Char nDir
= nHorizontal
;
549 for ( ScHTMLImage
* pI
= pIL
->First(); pI
; pI
= pIL
->Next() )
551 if ( nDir
& nHorizontal
)
553 aInsertPos
.X() += aLogicSize
.Width();
554 aInsertPos
.X() += aSpace
.X();
555 aInsertPos
.Y() = aCellInsertPos
.Y();
559 aInsertPos
.X() = aCellInsertPos
.X();
560 aInsertPos
.Y() += aLogicSize
.Height();
561 aInsertPos
.Y() += aSpace
.Y();
563 // Offset des Spacings drauf
564 aSpace
= pDefaultDev
->PixelToLogic( pI
->aSpace
, MapMode( MAP_100TH_MM
) );
565 aInsertPos
+= aSpace
;
567 Size aSizePix
= pI
->aSize
;
568 aLogicSize
= pDefaultDev
->PixelToLogic( aSizePix
, MapMode( MAP_100TH_MM
) );
570 ::ScLimitSizeOnDrawPage( aLogicSize
, aInsertPos
, pPage
->GetSize() );
574 Rectangle
aRect ( aInsertPos
, aLogicSize
);
575 SdrGrafObj
* pObj
= new SdrGrafObj( *pI
->pGraphic
, aRect
);
576 // #118522# calling SetGraphicLink here doesn't work
577 pObj
->SetName( pI
->aURL
);
579 pPage
->InsertObject( pObj
);
581 // #118522# SetGraphicLink has to be used after inserting the object,
582 // otherwise an empty graphic is swapped in and the contact stuff crashes.
584 pObj
->SetGraphicLink( pI
->aURL
, pI
->aFilterName
);
586 pObj
->SetLogicRect( aRect
); // erst nach InsertObject !!!
593 ScEEParser::ScEEParser( EditEngine
* pEditP
) :
595 pPool( EditEngine::CreatePool() ),
596 pDocPool( new ScDocumentPool
),
597 pList( new ScEEParseList
),
598 pColWidths( new Table
),
605 // pPool wird spaeter bei RTFIMP_START dem SvxRTFParser untergejubelt
606 pPool
->SetSecondaryPool( pDocPool
);
607 pPool
->FreezeIdRanges();
612 ScEEParser::~ScEEParser()
616 for ( ScEEParseEntry
* pE
= pList
->First(); pE
; pE
= pList
->Next() )
620 // Pool erst loeschen nachdem die Listen geloescht wurden
621 pPool
->SetSecondaryPool( NULL
);
622 SfxItemPool::Free(pDocPool
);
623 SfxItemPool::Free(pPool
);
627 void ScEEParser::NewActEntry( ScEEParseEntry
* pE
)
628 { // neuer freifliegender pActEntry
629 pActEntry
= new ScEEParseEntry( pPool
);
630 pActEntry
->aSel
.nStartPara
= (pE
? pE
->aSel
.nEndPara
+ 1 : 0);
631 pActEntry
->aSel
.nStartPos
= 0;