LibreOffice Module sc (master)  1
XclImpChangeTrack.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <XclImpChangeTrack.hxx>
21 #include <sot/storage.hxx>
22 #include <svl/zforlist.hxx>
23 #include <svl/sharedstringpool.hxx>
24 #include <sal/log.hxx>
25 #include <chgviset.hxx>
26 #include <formulacell.hxx>
27 #include <chgtrack.hxx>
28 #include <xihelper.hxx>
29 #include <xilink.hxx>
30 #include <externalrefmgr.hxx>
31 #include <document.hxx>
32 #include <documentimport.hxx>
33 #include <excdefs.hxx>
34 
35 
37  XclImpRoot( rRoot ),
38  aRecHeader(),
39  sOldUsername(),
40  nTabIdCount( 0 ),
41  bGlobExit( false ),
42  eNestedMode( nmBase )
43 {
44  // Verify that the User Names stream exists before going any further. Excel adds both
45  // "Revision Log" and "User Names" streams when Change Tracking is active but the Revision log
46  // remains if Change Tracking is turned off.
48  if( !xUserStrm.is() )
49  return;
50 
52  if( !xInStrm.is() )
53  return;
54 
55  xInStrm->Seek( STREAM_SEEK_TO_END );
56  sal_uInt64 const nStreamLen = xInStrm->Tell();
57  if( (xInStrm->GetErrorCode() == ERRCODE_NONE) && (nStreamLen != STREAM_SEEK_TO_END) )
58  {
60  pStrm.reset( new XclImpStream( *xInStrm, GetRoot() ) );
61  pStrm->CopyDecrypterFrom( rBookStrm );
62  pChangeTrack.reset(new ScChangeTrack( GetDoc() ));
63 
64  sOldUsername = pChangeTrack->GetUser();
65  pChangeTrack->SetUseFixDateTime( true );
66 
67  ReadRecords();
68  }
69 }
70 
72 {
73  pChangeTrack.reset();
74  pStrm.reset();
75 }
76 
78 {
79  if( !pAction ) return;
80  switch( aRecHeader.nAccept )
81  {
82  case EXC_CHTR_ACCEPT:
83  pChangeTrack->Accept( pAction );
84  break;
85  case EXC_CHTR_REJECT:
86  break;
87  }
88 }
89 
90 void XclImpChangeTrack::DoAcceptRejectAction( sal_uInt32 nFirst, sal_uInt32 nLast )
91 {
92  for( sal_uInt32 nIndex = nFirst; nIndex <= nLast; nIndex++ )
93  DoAcceptRejectAction( pChangeTrack->GetAction( nIndex ) );
94 }
95 
96 void XclImpChangeTrack::DoInsertRange( const ScRange& rRange, bool bEndOfList )
97 {
98  sal_uInt32 nFirst = pChangeTrack->GetActionMax() + 1;
99  pChangeTrack->AppendInsert(rRange, bEndOfList);
100  sal_uInt32 nLast = pChangeTrack->GetActionMax();
101  DoAcceptRejectAction( nFirst, nLast );
102 }
103 
105 {
106  sal_uLong nFirst, nLast;
107  pChangeTrack->AppendDeleteRange( rRange, &GetDoc() , nFirst, nLast );
108  DoAcceptRejectAction( nFirst, nLast );
109 }
110 
112 {
113  return static_cast<SCTAB>(GetTabInfo().GetCurrentIndex(
114  pStrm->ReaduInt16(), nTabIdCount ));
115 }
116 
118 {
119  sal_uInt16 nYear;
120  sal_uInt8 nMonth, nDay, nHour, nMin, nSec;
121 
122  nYear = pStrm->ReaduInt16();
123  nMonth = pStrm->ReaduInt8();
124  nDay = pStrm->ReaduInt8();
125  nHour = pStrm->ReaduInt8();
126  nMin = pStrm->ReaduInt8();
127  nSec = pStrm->ReaduInt8();
128 
129  rDateTime.SetYear( nYear );
130  rDateTime.SetMonth( nMonth );
131  rDateTime.SetDay( nDay );
132  rDateTime.SetHour( nHour );
133  rDateTime.SetMin( nMin );
134  rDateTime.SetSec( nSec );
135  rDateTime.SetNanoSec( 0 );
136 }
137 
138 bool XclImpChangeTrack::CheckRecord( sal_uInt16 nOpCode )
139 {
140  if( (nOpCode != EXC_CHTR_OP_UNKNOWN) && (aRecHeader.nOpCode != nOpCode) )
141  {
142  OSL_FAIL( "XclImpChangeTrack::CheckRecord - unknown action" );
143  return false;
144  }
145  return aRecHeader.nIndex != 0;
146 }
147 
149 {
150  if( LookAtuInt8() == 0x01 )
151  {
152  rExtInfo.mbExternal = false;
153  // internal ref - read tab num and return sc tab num (position in TABID list)
154  pStrm->Ignore( 3 );
155  rFirstTab = static_cast< SCTAB >( GetTabInfo().GetCurrentIndex( pStrm->ReaduInt16(), nTabIdCount ) );
156  sal_uInt8 nFillByte = pStrm->ReaduInt8();
157  rLastTab = (nFillByte == 0x00) ?
158  static_cast< SCTAB >( GetTabInfo().GetCurrentIndex( pStrm->ReaduInt16(), nTabIdCount ) ) : rFirstTab;
159  }
160  else
161  {
162  // external ref - read doc and tab name and find sc tab num
163  // - URL
164  OUString aEncUrl( pStrm->ReadUniString() );
165  OUString aUrl;
166  bool bSelf;
167  XclImpUrlHelper::DecodeUrl( aUrl, bSelf, GetRoot(), aEncUrl );
168  pStrm->Ignore( 1 );
169  // - sheet name, always separated from URL
170  OUString aTabName( pStrm->ReadUniString() );
171  pStrm->Ignore( 1 );
172 
173  rExtInfo.mbExternal = true;
175  pRefMgr->convertToAbsName(aUrl);
176  rExtInfo.mnFileId = pRefMgr->getExternalFileId(aUrl);
177  rExtInfo.maTabName = aTabName;
178  rFirstTab = rLastTab = 0;
179  }
180 }
181 
182 void XclImpChangeTrack::ReadFormula( std::unique_ptr<ScTokenArray>& rpTokenArray, const ScAddress& rPosition )
183 {
184  sal_uInt16 nFmlSize = pStrm->ReaduInt16();
185 
186  // create a memory stream and copy the formula to be able to read simultaneously
187  // the formula and the additional 3D tab ref data following the formula
188  // here we have to simulate an Excel record to be able to use an XclImpStream...
189  // 2do: remove the stream member from formula converter and add it as a parameter
190  // to the Convert() routine (to prevent the construction/destruction of the
191  // converter in each formula)
192  SvMemoryStream aMemStrm;
193  aMemStrm.WriteUInt16( 0x0001 ).WriteUInt16( nFmlSize );
194  size_t nRead = pStrm->CopyToStream( aMemStrm, nFmlSize );
195 
196  // survive reading invalid streams!
197  // if we can't read as many bytes as required just don't use them and
198  // assume that this part is broken
199  if(nRead != nFmlSize)
200  {
201  rpTokenArray = nullptr;
202  pStrm->Ignore(1);
203  return;
204  }
205 
206  XclImpStream aFmlaStrm( aMemStrm, GetRoot() );
207  aFmlaStrm.StartNextRecord();
208  XclImpChTrFmlConverter aFmlConv( GetRoot(), *this );
209 
210  // read the formula, 3D tab refs from extended data
211  std::unique_ptr<ScTokenArray> pArray;
212  aFmlConv.Reset( rPosition );
213  bool bOK = (aFmlConv.Convert( pArray, aFmlaStrm, nFmlSize, false ) == ConvErr::OK); // JEG : Check This
214  rpTokenArray = (bOK && pArray) ? std::move( pArray ) : nullptr;
215  pStrm->Ignore( 1 );
216 }
217 
219  ScCellValue& rCell, sal_uInt32& rFormat, sal_uInt16 nFlags, const ScAddress& rPosition )
220 {
221  rCell.clear();
222  rFormat = 0;
223  switch( nFlags & EXC_CHTR_TYPE_MASK )
224  {
225  case EXC_CHTR_TYPE_EMPTY:
226  break;
227  case EXC_CHTR_TYPE_RK:
228  {
229  double fValue = XclTools::GetDoubleFromRK( pStrm->ReadInt32() );
230  if( pStrm->IsValid() )
231  {
232  rCell.meType = CELLTYPE_VALUE;
233  rCell.mfValue = fValue;
234  }
235  }
236  break;
238  {
239  double fValue = pStrm->ReadDouble();
240  if( pStrm->IsValid() )
241  {
242  rCell.meType = CELLTYPE_VALUE;
243  rCell.mfValue = fValue;
244  }
245  }
246  break;
248  {
249  OUString sString = pStrm->ReadUniString();
250  if( pStrm->IsValid() )
251  {
252  rCell.meType = CELLTYPE_STRING;
253  rCell.mpString = new svl::SharedString(GetDoc().GetSharedStringPool().intern(sString));
254  }
255  }
256  break;
257  case EXC_CHTR_TYPE_BOOL:
258  {
259  double fValue = static_cast<double>(pStrm->ReaduInt16() != 0);
260  if( pStrm->IsValid() )
261  {
262  rCell.meType = CELLTYPE_VALUE;
263  rCell.mfValue = fValue;
264  rFormat = GetFormatter().GetStandardFormat( SvNumFormatType::LOGICAL, ScGlobal::eLnge );
265  }
266  }
267  break;
269  {
270  std::unique_ptr<ScTokenArray> pTokenArray;
271  ReadFormula( pTokenArray, rPosition );
272  if( pStrm->IsValid() && pTokenArray )
273  {
274  rCell.meType = CELLTYPE_FORMULA;
275  rCell.mpFormula = new ScFormulaCell(GetDoc(), rPosition, std::move(pTokenArray));
276  }
277  }
278  break;
279  default:
280  OSL_FAIL( "XclImpChangeTrack::ReadCell - unknown data type" );
281  }
282 }
283 
285 {
286  *pStrm >> aRecHeader;
288  return;
289 
290  if( (aRecHeader.nOpCode != EXC_CHTR_OP_INSROW) &&
291  (aRecHeader.nOpCode != EXC_CHTR_OP_INSCOL) &&
292  (aRecHeader.nOpCode != EXC_CHTR_OP_DELROW) &&
293  (aRecHeader.nOpCode != EXC_CHTR_OP_DELCOL) )
294  {
295  OSL_FAIL( "XclImpChangeTrack::ReadChTrInsert - unknown action" );
296  return;
297  }
298 
299  ScRange aRange;
300  aRange.aStart.SetTab( ReadTabNum() );
301  aRange.aEnd.SetTab( aRange.aStart.Tab() );
302  sal_uInt16 nFlags = pStrm->ReaduInt16();
303  bool bEndOfList = (nFlags & 0x0001); // row auto-inserted at the bottom.
304  Read2DRange( aRange );
305 
306  if( aRecHeader.nOpCode & EXC_CHTR_OP_COLFLAG )
307  aRange.aEnd.SetRow( GetDocImport().getDoc().MaxRow() );
308  else
309  aRange.aEnd.SetCol( GetDocImport().getDoc().MaxCol() );
310 
311  bool bValid = pStrm->IsValid();
312  if( FoundNestedMode() )
314 
315  if( bValid )
316  {
317  if( aRecHeader.nOpCode & EXC_CHTR_OP_DELFLAG )
318  DoDeleteRange( aRange );
319  else
320  DoInsertRange(aRange, bEndOfList);
321  }
322 }
323 
325 {
326  pStrm->DisableDecryption();
327  pStrm->Ignore( 32 );
328  OUString sUsername( pStrm->ReadUniString() );
329  if( !pStrm->IsValid() ) return;
330 
331  if( !sUsername.isEmpty() )
332  pChangeTrack->SetUser( sUsername );
333  pStrm->Seek( 148 );
334  if( !pStrm->IsValid() ) return;
335 
336  DateTime aDateTime( DateTime::EMPTY );
337  ReadDateTime( aDateTime );
338  if( pStrm->IsValid() )
339  pChangeTrack->SetFixDateTimeLocal( aDateTime );
340 }
341 
343 {
344  *pStrm >> aRecHeader;
345  if( !CheckRecord( EXC_CHTR_OP_CELL ) )
346  return;
347 
348  ScAddress aPosition;
349  SCTAB nTab = ReadTabNum();
350  aPosition.SetTab( nTab );
351  sal_uInt16 nValueType;
352  nValueType = pStrm->ReaduInt16();
353  sal_uInt16 nOldValueType = (nValueType >> 3) & EXC_CHTR_TYPE_MASK;
354  sal_uInt16 nNewValueType = nValueType & EXC_CHTR_TYPE_MASK;
355  pStrm->Ignore( 2 );
356  Read2DAddress( aPosition );
357  sal_uInt16 nOldSize;
358  nOldSize = pStrm->ReaduInt16();
359  SAL_WARN_IF( (nOldSize == 0) != (nOldValueType == EXC_CHTR_TYPE_EMPTY),
360  "sc.filter",
361  "XclImpChangeTrack::ReadChTrCellContent - old value mismatch" );
362  pStrm->Ignore( 4 );
363  switch( nValueType & EXC_CHTR_TYPE_FORMATMASK )
364  {
365  case 0x0000: break;
366  case 0x1100: pStrm->Ignore( 16 ); break;
367  case 0x1300: pStrm->Ignore( 8 ); break;
368  default: OSL_FAIL( "XclImpChangeTrack::ReadChTrCellContent - unknown format info" );
369  }
370 
371  ScCellValue aOldCell;
372  ScCellValue aNewCell;
373  sal_uInt32 nOldFormat;
374  sal_uInt32 nNewFormat;
375  ReadCell(aOldCell, nOldFormat, nOldValueType, aPosition);
376  ReadCell(aNewCell, nNewFormat, nNewValueType, aPosition);
377  if( !pStrm->IsValid() || (pStrm->GetRecLeft() > 0) )
378  {
379  OSL_FAIL( "XclImpChangeTrack::ReadChTrCellContent - bytes left, action ignored" );
380  aOldCell.clear();
381  aNewCell.clear();
382  }
383  else
384  {
385  ScChangeActionContent* pNewAction =
386  pChangeTrack->AppendContentOnTheFly(aPosition, aOldCell, aNewCell, nOldFormat, nNewFormat);
387  DoAcceptRejectAction( pNewAction );
388  }
389 }
390 
392 {
393  if( nTabIdCount == 0 ) // read only 1st time, otherwise calculated by <ReadChTrInsertTab()>
394  nTabIdCount = static_cast< sal_uInt16 >( pStrm->GetRecLeft() >> 1 );
395 }
396 
398 {
399  *pStrm >> aRecHeader;
400  if( !CheckRecord( EXC_CHTR_OP_MOVE ) )
401  return;
402 
403  ScRange aSourceRange;
404  ScRange aDestRange;
405  aDestRange.aStart.SetTab( ReadTabNum() );
406  aDestRange.aEnd.SetTab( aDestRange.aStart.Tab() );
407  Read2DRange( aSourceRange );
408  Read2DRange( aDestRange );
409  aSourceRange.aStart.SetTab( ReadTabNum() );
410  aSourceRange.aEnd.SetTab( aSourceRange.aStart.Tab() );
411 
412  bool bValid = pStrm->IsValid();
413  if( FoundNestedMode() )
415 
416  if( bValid )
417  {
418  pChangeTrack->AppendMove( aSourceRange, aDestRange, nullptr );
419  DoAcceptRejectAction( pChangeTrack->GetLast() );
420  }
421 }
422 
424 {
425  *pStrm >> aRecHeader;
427  {
428  SCTAB nTab = ReadTabNum();
429  if( pStrm->IsValid() )
430  {
431  nTabIdCount++;
432  DoInsertRange(ScRange(0, 0, nTab, GetDocImport().getDoc().MaxCol(), GetDocImport().getDoc().MaxRow(), nTab), false);
433  }
434  }
435 }
436 
438 {
439  OSL_ENSURE( eNestedMode == nmBase, "XclImpChangeTrack::InitNestedMode - unexpected nested mode" );
440  if( eNestedMode == nmBase )
442 }
443 
445 {
446  OSL_ENSURE( eNestedMode == nmFound, "XclImpChangeTrack::StartNestedMode - missing nested mode" );
447  if( eNestedMode == nmFound )
448  {
450  ReadRecords();
451  }
452 }
453 
455 {
456  OSL_ENSURE( eNestedMode != nmBase, "XclImpChangeTrack::EndNestedMode - missing nested mode" );
457  bool bReturn = (eNestedMode == nmNested);
459  return bReturn;
460 }
461 
463 {
464  bool bExitLoop = false;
465 
466  while( !bExitLoop && !bGlobExit && pStrm->StartNextRecord() )
467  {
468  switch( pStrm->GetRecId() )
469  {
470  case 0x000A: bGlobExit = true; break;
471  case 0x0137: ReadChTrInsert(); break;
472  case 0x0138: ReadChTrInfo(); break;
473  case 0x013B: ReadChTrCellContent(); break;
474  case 0x013D: ReadChTrTabId(); break;
475  case 0x0140: ReadChTrMoveRange(); break;
476  case 0x014D: ReadChTrInsertTab(); break;
477  case 0x014E:
478  case 0x0150: InitNestedMode(); break;
479  case 0x014F:
480  case 0x0151: bExitLoop = EndNestedMode(); break;
481  }
482  }
483 }
484 
486 {
487  if( pChangeTrack )
488  {
489  pChangeTrack->SetUser( sOldUsername );
490  pChangeTrack->SetUseFixDateTime( false );
491 
492  GetDoc().SetChangeTrack( std::move(pChangeTrack) );
493 
494  ScChangeViewSettings aSettings;
495  aSettings.SetShowChanges( true );
496  GetDoc().SetChangeViewSettings( aSettings );
497  }
498 }
499 
500 
502  XclImpRoot& rRoot, XclImpChangeTrack& rXclChTr ) :
503  ExcelToSc8( rRoot ),
504  rChangeTrack( rXclChTr ) {}
505 
507 {
508 }
509 
510 // virtual, called from ExcToSc8::Convert()
511 bool XclImpChTrFmlConverter::Read3DTabReference( sal_uInt16 /*nIxti*/, SCTAB& rFirstTab, SCTAB& rLastTab,
512  ExternalTabInfo& rExtInfo )
513 {
514  rChangeTrack.Read3DTabRefInfo( rFirstTab, rLastTab, rExtInfo );
515  return true;
516 }
517 
518 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool Read3DTabReference(sal_uInt16 nIxti, SCTAB &rFirstTab, SCTAB &rLastTab, ExternalTabInfo &rExtInfo) override
bool is() const
#define EXC_CHTR_REJECT
Definition: excdefs.hxx:91
ScDocumentImport & GetDocImport()
Definition: xiroot.cxx:292
sal_Int32 nIndex
CellType meType
Definition: cellvalue.hxx:38
ScAddress aStart
Definition: address.hxx:500
#define EXC_CHTR_TYPE_EMPTY
Definition: excdefs.hxx:81
SvStream & WriteUInt16(sal_uInt16 nUInt16)
#define EXC_CHTR_OP_DELFLAG
Definition: excdefs.hxx:67
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
Definition: documen2.cxx:1109
void SetSec(sal_uInt16 nNewSec)
sal_uIntPtr sal_uLong
#define STREAM_SEEK_TO_END
#define EXC_CHTR_OP_INSTAB
Definition: excdefs.hxx:73
virtual ~XclImpChTrFmlConverter() override
double mfValue
Definition: cellvalue.hxx:40
ScAddress aEnd
Definition: address.hxx:501
sal_uInt16 getExternalFileId(const OUString &rFile)
void DoAcceptRejectAction(ScChangeAction *pAction)
#define EXC_CHTR_OP_COLFLAG
Definition: excdefs.hxx:66
#define EXC_STREAM_REVLOG
Definition: excdefs.hxx:63
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
Definition: xlroot.cxx:276
SvNumberFormatter & GetFormatter() const
Returns the number formatter of the Calc document.
Definition: xlroot.cxx:313
const XclImpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
Definition: xiroot.hxx:132
Store arbitrary cell value of any kind.
Definition: cellvalue.hxx:36
void SetHour(sal_uInt16 nNewHour)
XclImpChangeTrack(const XclImpRoot &rRoot, const XclImpStream &rBookStrm)
#define EXC_CHTR_TYPE_DOUBLE
Definition: excdefs.hxx:83
void ReadCell(ScCellValue &rCell, sal_uInt32 &rFormat, sal_uInt16 nFlags, const ScAddress &rPosition)
ScFormulaCell * mpFormula
Definition: cellvalue.hxx:43
void convertToAbsName(OUString &rFile) const
Takes a flat file name, and convert it to an absolute URL path.
#define EXC_CHTR_TYPE_RK
Definition: excdefs.hxx:82
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
Definition: documen3.cxx:618
void SetYear(sal_Int16 nNewYear)
SCTAB Tab() const
Definition: address.hxx:271
bool StartNextRecord()
Sets stream pointer to the start of the next record content.
Definition: xistream.cxx:455
void SetRow(SCROW nRowP)
Definition: address.hxx:275
void SetCol(SCCOL nColP)
Definition: address.hxx:279
#define EXC_CHTR_TYPE_FORMATMASK
Definition: excdefs.hxx:80
void SetTab(SCTAB nTabP)
Definition: address.hxx:283
sal_uInt16 GetCurrentIndex(sal_uInt16 nCreatedId, sal_uInt16 nMaxTabId) const
Returns the current sheet index calculated from creation index.
Definition: xilink.cxx:262
#define EXC_CHTR_OP_DELROW
Definition: excdefs.hxx:70
XclImpTabInfo & GetTabInfo() const
Returns the buffer that contains the sheet creation order.
Definition: xiroot.cxx:178
static double GetDoubleFromRK(sal_Int32 nRKValue)
GUID of file moniker (HLINK record).
Definition: xltools.cxx:97
virtual ~XclImpChangeTrack() override
void SetDay(sal_uInt16 nNewDay)
XclImpChTrFmlConverter(XclImpRoot &rRoot, XclImpChangeTrack &rXclChTr)
enum XclImpChangeTrack::@3 eNestedMode
#define STREAM_SEEK_TO_BEGIN
#define EXC_CHTR_OP_CELL
Definition: excdefs.hxx:74
svl::SharedString * mpString
Definition: cellvalue.hxx:41
void DoDeleteRange(const ScRange &rRange)
void ReadFormula(std::unique_ptr< ScTokenArray > &rpTokenArray, const ScAddress &rPosition)
static SC_DLLPUBLIC LanguageType eLnge
Definition: global.hxx:548
#define EXC_CHTR_OP_DELCOL
Definition: excdefs.hxx:71
#define EXC_CHTR_TYPE_FORMULA
Definition: excdefs.hxx:86
XclImpChangeTrack & rChangeTrack
#define SAL_WARN_IF(condition, area, stream)
#define ERRCODE_NONE
#define EXC_STREAM_USERNAMES
Definition: excdefs.hxx:62
unsigned char sal_uInt8
SC_DLLPUBLIC void SetChangeTrack(std::unique_ptr< ScChangeTrack > pTrack)
only for import filter, deletes any existing ChangeTrack via EndChangeTracking() and takes ownership ...
Definition: documen2.cxx:272
sal_uInt32 GetStandardFormat(SvNumFormatType eType, LanguageType eLnge=LANGUAGE_DONTKNOW)
#define EXC_CHTR_OP_UNKNOWN
Definition: excdefs.hxx:76
tools::SvRef< SotStorageStream > xInStrm
#define EXC_CHTR_TYPE_STRING
Definition: excdefs.hxx:84
#define EXC_CHTR_OP_INSCOL
Definition: excdefs.hxx:69
#define EXC_CHTR_OP_INSROW
Definition: excdefs.hxx:68
void SetNanoSec(sal_uInt32 nNewNanoSec)
void Read2DRange(ScRange &rRange)
void SetMin(sal_uInt16 nNewMin)
virtual ConvErr Convert(std::unique_ptr< ScTokenArray > &rpTokArray, XclImpStream &rStrm, std::size_t nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT=FT_CellFormula) override
Definition: excform8.cxx:138
void clear() noexcept
Definition: cellvalue.cxx:273
#define EXC_CHTR_OP_MOVE
Definition: excdefs.hxx:72
#define EXC_CHTR_TYPE_MASK
Definition: excdefs.hxx:79
bool CheckRecord(sal_uInt16 nOpCode)
This class is used to import record oriented streams.
Definition: xistream.hxx:278
void Read3DTabRefInfo(SCTAB &rFirstTab, SCTAB &rLastTab, ExcelToSc8::ExternalTabInfo &rExtInfo)
void DoInsertRange(const ScRange &rRange, bool bEndOfList)
#define EXC_CHTR_ACCEPT
Definition: excdefs.hxx:90
tools::SvRef< SotStorageStream > OpenStream(tools::SvRef< SotStorage > const &xStrg, const OUString &rStrmName) const
Tries to open a new stream in the specified storage for reading or writing.
Definition: xlroot.cxx:264
void Read2DAddress(ScAddress &rAddress)
#define EXC_CHTR_TYPE_BOOL
Definition: excdefs.hxx:85
Access to global data from other classes.
Definition: xiroot.hxx:126
void ReadDateTime(DateTime &rDateTime)
std::unique_ptr< ScChangeTrack > pChangeTrack
void SetMonth(sal_uInt16 nNewMonth)
std::unique_ptr< XclImpStream > pStrm
sal_Int16 SCTAB
Definition: types.hxx:23
XclImpChTrRecHeader aRecHeader
static void DecodeUrl(OUString &rUrl, OUString &rTabName, bool &rbSameWb, const XclImpRoot &rRoot, const OUString &rEncodedUrl)
Decodes an encoded external document URL with optional sheet name.
Definition: xihelper.cxx:603
void SetShowChanges(bool bFlag)
Definition: chgviset.hxx:79