LCOV - code coverage report
Current view: top level - sc/inc - document.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 124 145 85.5 %
Date: 2012-08-25 Functions: 91 105 86.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 18 30 60.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef SC_DOCUMENT_HXX
      30                 :            : #define SC_DOCUMENT_HXX
      31                 :            : 
      32                 :            : 
      33                 :            : #include <vcl/prntypes.hxx>
      34                 :            : #include <vcl/timer.hxx>
      35                 :            : #include <com/sun/star/uno/Reference.hxx>
      36                 :            : #include <rtl/ref.hxx>
      37                 :            : #include "scdllapi.h"
      38                 :            : #include "rangelst.hxx"
      39                 :            : #include "rangenam.hxx"
      40                 :            : #include "brdcst.hxx"
      41                 :            : #include "tabopparams.hxx"
      42                 :            : #include "sortparam.hxx"
      43                 :            : #include "types.hxx"
      44                 :            : #include "formula/grammar.hxx"
      45                 :            : #include <com/sun/star/chart2/XChartDocument.hpp>
      46                 :            : #include "scdllapi.h"
      47                 :            : #include "typedstrdata.hxx"
      48                 :            : #include "compressedarray.hxx"
      49                 :            : #include <tools/fract.hxx>
      50                 :            : #include <tools/gen.hxx>
      51                 :            : 
      52                 :            : #include <memory>
      53                 :            : #include <map>
      54                 :            : #include <set>
      55                 :            : #include <vector>
      56                 :            : #include <boost/ptr_container/ptr_vector.hpp>
      57                 :            : #include <boost/scoped_ptr.hpp>
      58                 :            : 
      59                 :            : namespace editeng { class SvxBorderLine; }
      60                 :            : 
      61                 :            : class KeyEvent;
      62                 :            : class OutputDevice;
      63                 :            : class SdrObject;
      64                 :            : class SfxBroadcaster;
      65                 :            : class SfxListener;
      66                 :            : class SfxHint;
      67                 :            : class SfxItemSet;
      68                 :            : class SfxObjectShell;
      69                 :            : class SfxBindings;
      70                 :            : class SfxPoolItem;
      71                 :            : class SfxItemPool;
      72                 :            : class SfxPrinter;
      73                 :            : class SfxStyleSheetBase;
      74                 :            : class SvMemoryStream;
      75                 :            : class SvNumberFormatter;
      76                 :            : class SvxBoxInfoItem;
      77                 :            : class SvxBoxItem;
      78                 :            : class SvxForbiddenCharactersTable;
      79                 :            : namespace sfx2 {
      80                 :            :     class LinkManager;
      81                 :            :     }
      82                 :            : class SvxSearchItem;
      83                 :            : class Window;
      84                 :            : class XColorList;
      85                 :            : 
      86                 :            : struct ScAttrEntry;
      87                 :            : class ScAutoFormatData;
      88                 :            : class ScBaseCell;
      89                 :            : class ScBroadcastAreaSlotMachine;
      90                 :            : class ScChangeViewSettings;
      91                 :            : class ScChartCollection;
      92                 :            : class ScChartListenerCollection;
      93                 :            : class ScConditionalFormat;
      94                 :            : class ScConditionalFormatList;
      95                 :            : class ScDBCollection;
      96                 :            : class ScDBData;
      97                 :            : class ScDetOpData;
      98                 :            : class ScDetOpList;
      99                 :            : class ScDocOptions;
     100                 :            : class ScDocProtection;
     101                 :            : class ScDocumentPool;
     102                 :            : class ScDrawLayer;
     103                 :            : class ScExtDocOptions;
     104                 :            : class ScExternalRefManager;
     105                 :            : class ScFormulaCell;
     106                 :            : class ScMacroManager;
     107                 :            : class ScMarkData;
     108                 :            : class ScOutlineTable;
     109                 :            : class ScPatternAttr;
     110                 :            : class ScPrintRangeSaver;
     111                 :            : class ScRangeData;
     112                 :            : class ScRangeName;
     113                 :            : class ScStyleSheet;
     114                 :            : class ScStyleSheetPool;
     115                 :            : class ScTable;
     116                 :            : class ScTableProtection;
     117                 :            : class ScTokenArray;
     118                 :            : class ScValidationData;
     119                 :            : class ScValidationDataList;
     120                 :            : class ScViewOptions;
     121                 :            : class ScChangeTrack;
     122                 :            : class ScEditEngineDefaulter;
     123                 :            : class ScFieldEditEngine;
     124                 :            : class ScNoteEditEngine;
     125                 :            : struct ScConsolidateParam;
     126                 :            : class ScDPObject;
     127                 :            : class ScDPCollection;
     128                 :            : class ScMatrix;
     129                 :            : class ScScriptTypeData;
     130                 :            : class ScPoolHelper;
     131                 :            : struct ScSortParam;
     132                 :            : class ScRefreshTimerControl;
     133                 :            : class ScUnoListenerCalls;
     134                 :            : class ScUnoRefList;
     135                 :            : class ScRecursionHelper;
     136                 :            : struct RowInfo;
     137                 :            : struct ScTableInfo;
     138                 :            : struct ScTabOpParam;
     139                 :            : class VirtualDevice;
     140                 :            : class ScAutoNameCache;
     141                 :            : class ScTemporaryChartLock;
     142                 :            : class ScLookupCache;
     143                 :            : struct ScLookupCacheMapImpl;
     144                 :            : class SfxUndoManager;
     145                 :            : class ScFormulaParserPool;
     146                 :            : struct ScClipParam;
     147                 :            : class ScRowBreakIterator;
     148                 :            : struct ScSetStringParam;
     149                 :            : class ScDocRowHeightUpdater;
     150                 :            : struct ScColWidthParam;
     151                 :            : struct ScCopyBlockFromClipParams;
     152                 :            : class ScSheetEvents;
     153                 :            : class ScProgress;
     154                 :            : class SvtListener;
     155                 :            : class ScNotes;
     156                 :            : class ScEditDataArray;
     157                 :            : 
     158                 :            : namespace com { namespace sun { namespace star {
     159                 :            :     namespace lang {
     160                 :            :         class XMultiServiceFactory;
     161                 :            :         struct EventObject;
     162                 :            :     }
     163                 :            :     namespace i18n {
     164                 :            :         class XBreakIterator;
     165                 :            :     }
     166                 :            :     namespace util {
     167                 :            :         class XModifyListener;
     168                 :            :     }
     169                 :            :     namespace embed {
     170                 :            :         class XEmbeddedObject;
     171                 :            :     }
     172                 :            :     namespace script { namespace vba {
     173                 :            :         class XVBAEventProcessor;
     174                 :            :     } }
     175                 :            :     namespace sheet {
     176                 :            :         struct TablePageBreakData;
     177                 :            :     }
     178                 :            : } } }
     179                 :            : 
     180                 :            : #include <svl/zforlist.hxx>
     181                 :            : 
     182                 :            : #define SC_DOC_NEW          0xFFFF
     183                 :            : 
     184                 :            : #define SC_MACROCALL_ALLOWED        0
     185                 :            : #define SC_MACROCALL_NOTALLOWED     1
     186                 :            : #define SC_MACROCALL_ASK            2
     187                 :            : 
     188                 :            : #define SC_ASIANCOMPRESSION_INVALID     0xff
     189                 :            : #define SC_ASIANKERNING_INVALID         0xff
     190                 :            : 
     191                 :            : enum ScDocumentMode
     192                 :            :     {
     193                 :            :         SCDOCMODE_DOCUMENT,
     194                 :            :         SCDOCMODE_CLIP,
     195                 :            :         SCDOCMODE_UNDO
     196                 :            :     };
     197                 :            : 
     198                 :            : 
     199                 :          0 : struct ScDocStat
     200                 :            : {
     201                 :            :     rtl::OUString  aDocName;
     202                 :            :     SCTAB   nTableCount;
     203                 :            :     sal_uLong   nCellCount;
     204                 :            :     sal_uInt16  nPageCount;
     205                 :            : };
     206                 :            : 
     207                 :            : // DDE link modes
     208                 :            : const sal_uInt8 SC_DDE_DEFAULT       = 0;
     209                 :            : const sal_uInt8 SC_DDE_ENGLISH       = 1;
     210                 :            : const sal_uInt8 SC_DDE_TEXT          = 2;
     211                 :            : const sal_uInt8 SC_DDE_IGNOREMODE    = 255;       /// For usage in FindDdeLink() only!
     212                 :            : 
     213                 :            : class ScDocument
     214                 :            : {
     215                 :            : friend class ScDocumentIterator;
     216                 :            : friend class ScValueIterator;
     217                 :            : friend class ScHorizontalValueIterator;
     218                 :            : friend class ScDBQueryDataIterator;
     219                 :            : friend class ScCellIterator;
     220                 :            : friend class ScQueryCellIterator;
     221                 :            : friend class ScHorizontalCellIterator;
     222                 :            : friend class ScHorizontalAttrIterator;
     223                 :            : friend class ScDocAttrIterator;
     224                 :            : friend class ScAttrRectIterator;
     225                 :            : friend class ScDocShell;
     226                 :            : friend class ScDocRowHeightUpdater;
     227                 :            : 
     228                 :            :     typedef ::std::vector<ScTable*> TableContainer;
     229                 :            : private:
     230                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager;
     231                 :            : 
     232                 :            :     rtl::Reference<ScPoolHelper> xPoolHelper;
     233                 :            : 
     234                 :            :     SfxUndoManager*     mpUndoManager;
     235                 :            :     ScFieldEditEngine*  pEditEngine;                    // uses pEditPool from xPoolHelper
     236                 :            :     ScNoteEditEngine*   pNoteEngine;                    // uses pEditPool from xPoolHelper
     237                 :            :     SfxObjectShell*     pShell;
     238                 :            :     SfxPrinter*         pPrinter;
     239                 :            :     VirtualDevice*      pVirtualDevice_100th_mm;
     240                 :            :     ScDrawLayer*        pDrawLayer;                     // SdrModel
     241                 :            :     rtl::Reference<XColorList> pColorList;
     242                 :            :     ScValidationDataList* pValidationList;              // validity
     243                 :            :     SvNumberFormatterIndexTable*    pFormatExchangeList;    // for application of number formats
     244                 :            :     TableContainer maTabs;
     245                 :            :     std::vector<rtl::OUString> maTabNames;               // for undo document, we need the information tab name <-> index
     246                 :            :     mutable ScRangeName* pRangeName;
     247                 :            :     ScDBCollection*     pDBCollection;
     248                 :            :     ScDPCollection*     pDPCollection;
     249                 :            :     ScChartCollection*  pChartCollection;
     250                 :            :     std::auto_ptr< ScTemporaryChartLock > apTemporaryChartLock;
     251                 :            :     ScPatternAttr*      pSelectionAttr;                 // Attributes of a block
     252                 :            :     mutable sfx2::LinkManager*      pLinkManager;
     253                 :            :     ScFormulaCell*      pFormulaTree;                   // formula tree (start)
     254                 :            :     ScFormulaCell*      pEOFormulaTree;                 // formula tree (end), last cell
     255                 :            :     ScFormulaCell*      pFormulaTrack;                  // BroadcastTrack (start)
     256                 :            :     ScFormulaCell*      pEOFormulaTrack;                // BrodcastTrack (end), last cell
     257                 :            :     ScBroadcastAreaSlotMachine* pBASM;                  // BroadcastAreas
     258                 :            :     ScChartListenerCollection* pChartListenerCollection;
     259                 :            :     SvMemoryStream*     pClipData;
     260                 :            :     ScDetOpList*        pDetOpList;
     261                 :            :     ScChangeTrack*      pChangeTrack;
     262                 :            :     SfxBroadcaster*     pUnoBroadcaster;
     263                 :            :     ScUnoListenerCalls* pUnoListenerCalls;
     264                 :            :     ScUnoRefList*       pUnoRefUndoList;
     265                 :            :     ScChangeViewSettings* pChangeViewSettings;
     266                 :            :     ScScriptTypeData*   pScriptTypeData;
     267                 :            :     ScRefreshTimerControl* pRefreshTimerControl;
     268                 :            :     rtl::Reference<SvxForbiddenCharactersTable> xForbiddenCharacters;
     269                 :            : 
     270                 :            :     ScFieldEditEngine*  pCacheFieldEditEngine;
     271                 :            : 
     272                 :            :     ::std::auto_ptr<ScDocProtection> pDocProtection;
     273                 :            :     ::std::auto_ptr<ScClipParam>     mpClipParam;
     274                 :            : 
     275                 :            :     ::std::auto_ptr<ScExternalRefManager> pExternalRefMgr;
     276                 :            :     ::std::auto_ptr<ScMacroManager> mpMacroMgr;
     277                 :            : 
     278                 :            : 
     279                 :            :     // mutable for lazy construction
     280                 :            :     mutable ::std::auto_ptr< ScFormulaParserPool >
     281                 :            :                         mxFormulaParserPool;            /// Pool for all external formula parsers used by this document.
     282                 :            : 
     283                 :            :     rtl::OUString       aDocName;                       // optional: name of document
     284                 :            :     rtl::OUString       aDocCodeName;                       // optional: name of document (twice?)
     285                 :            :     rtl::OUString       maFileURL;      // file URL for copy & paste
     286                 :            :     ScRangePairListRef  xColNameRanges;
     287                 :            :     ScRangePairListRef  xRowNameRanges;
     288                 :            : 
     289                 :            :     ScViewOptions*      pViewOptions;                   // view options
     290                 :            :     ScDocOptions*       pDocOptions;                    // document options
     291                 :            :     ScExtDocOptions*    pExtDocOptions;                 // for import etc.
     292                 :            :     ScConsolidateParam* pConsolidateDlgData;
     293                 :            : 
     294                 :            :     ScRecursionHelper*  pRecursionHelper;               // information for recursive and iterative cell formulas
     295                 :            : 
     296                 :            :     ScAutoNameCache*    pAutoNameCache;                 // for automatic name lookup during CompileXML
     297                 :            : 
     298                 :            :     ScLookupCacheMapImpl* pLookupCacheMapImpl;          // cache for lookups like VLOOKUP and MATCH
     299                 :            : 
     300                 :            :     sal_Int64           nUnoObjectId;                   // counted up for UNO objects
     301                 :            : 
     302                 :            :     sal_uInt32          nRangeOverflowType;             // used in (xml) loading for overflow warnings
     303                 :            : 
     304                 :            :     ScRange             aEmbedRange;
     305                 :            :     ScAddress           aCurTextWidthCalcPos;
     306                 :            :     ScAddress           aOnlineSpellPos;                // within whole document
     307                 :            :     ScRange             aVisSpellRange;
     308                 :            :     ScAddress           aVisSpellPos;                   // within aVisSpellRange (see nVisSpellState)
     309                 :            : 
     310                 :            :     Timer               aTrackTimer;
     311                 :            : 
     312                 :            :     com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor >
     313                 :            :                         mxVbaEvents;
     314                 :            : 
     315                 :            : public:
     316                 :            :     boost::ptr_vector< ScInterpreterTableOpParams > aTableOpList; // list of ScInterpreterTableOpParams currently in use
     317                 :            :     ScInterpreterTableOpParams  aLastTableOpParams;     // remember last params
     318                 :            : private:
     319                 :            : 
     320                 :            :     LanguageType        eLanguage;                      // default language
     321                 :            :     LanguageType        eCjkLanguage;                   // default language for asian text
     322                 :            :     LanguageType        eCtlLanguage;                   // default language for complex text
     323                 :            :     CharSet             eSrcSet;                        // during reading: source character set
     324                 :            : 
     325                 :            :     /** The compiler grammar used in document storage. GRAM_PODF for ODF 1.1
     326                 :            :         documents, GRAM_ODFF for ODF 1.2 documents. */
     327                 :            :     formula::FormulaGrammar::Grammar  eStorageGrammar;
     328                 :            : 
     329                 :            :     /** The compiler grammar used in ODF import after brackets had been
     330                 :            :         stripped (which they shouldn't, but until that's fixed) by the XML
     331                 :            :         importer. */
     332                 :            :     formula::FormulaGrammar::Grammar  eXmlImportGrammar;
     333                 :            : 
     334                 :            :     sal_uLong               nFormulaCodeInTree;             // FormelRPN im Formelbaum
     335                 :            :     sal_uLong               nXMLImportedFormulaCount;        // progress count during XML import
     336                 :            :     sal_uInt16              nInterpretLevel;                // >0 if in interpreter
     337                 :            :     sal_uInt16              nMacroInterpretLevel;           // >0 if macro in interpreter
     338                 :            :     sal_uInt16              nInterpreterTableOpLevel;       // >0 if in interpreter TableOp
     339                 :            :     SCTAB               nMaxTableNumber;
     340                 :            :     sal_uInt16              nSrcVer;                        // file version (load/save)
     341                 :            :     SCROW               nSrcMaxRow;                     // number of lines to load/save
     342                 :            :     sal_uInt16              nFormulaTrackCount;
     343                 :            :     bool                bHardRecalcState;               // false: soft, true: hard
     344                 :            :     SCTAB               nVisibleTab;                    // for OLE etc.
     345                 :            : 
     346                 :            :     ScLkUpdMode         eLinkMode;
     347                 :            : 
     348                 :            :     bool                bAutoCalc;                      // calculate automatically
     349                 :            :     bool                bAutoCalcShellDisabled;         // in/from/for ScDocShell disabled
     350                 :            :     // are there ForcedFormulas which have to be calculated
     351                 :            :     // in interaction with ScDocShell SetDocumentModified,
     352                 :            :     // AutoCalcShellDisabled and TrackFormulas
     353                 :            :     bool                bForcedFormulaPending;
     354                 :            :     bool                bCalculatingFormulaTree;
     355                 :            :     bool                bIsClip;
     356                 :            :     bool                bIsUndo;
     357                 :            :     bool                bIsVisible;                     // set from view ctor
     358                 :            : 
     359                 :            :     bool                bIsEmbedded;                    // display/adjust Embedded area?
     360                 :            : 
     361                 :            :     // no SetDirty for ScFormulaCell::CompileTokenArray but at the end of
     362                 :            :     // ScDocument::CompileAll[WithFormats], CopyScenario, CopyBlockFromClip
     363                 :            :     bool                bNoSetDirty;
     364                 :            :     // no broadcast, construct no listener during insert from a different
     365                 :            :     // Doc (per filter or the like ), not until CompileAll / CalcAfterLoad
     366                 :            :     bool                bInsertingFromOtherDoc;
     367                 :            :     bool                bLoadingMedium;
     368                 :            :     bool                bImportingXML;      // special handling of formula text
     369                 :            :     bool                bXMLFromWrapper;    // distinguish ScXMLImportWrapper from external component
     370                 :            :     bool                bCalcingAfterLoad;              // in CalcAfterLoad TRUE
     371                 :            :     // don't construct/destruct listeners temporarily
     372                 :            :     bool                bNoListening;
     373                 :            :     bool                bIdleDisabled;
     374                 :            :     bool                bInLinkUpdate;                  // TableLink or AreaLink
     375                 :            :     bool                bChartListenerCollectionNeedsUpdate;
     376                 :            :     // are/were there RC_FORCED formula cells in the document (if set once to TRUE then set forever)
     377                 :            :     bool                bHasForcedFormulas;
     378                 :            :     // is the Doc being destroyed? (no Notify-Tracking etc. needed anymore)
     379                 :            :     bool                bInDtorClear;
     380                 :            :     // expand reference if insert column/row takes place at the border
     381                 :            :     // of a reference
     382                 :            :     // is fetched in each UpdateReference from InputOptions,
     383                 :            :     // assigned, and restored at the end of UpdateReference
     384                 :            :     bool                bExpandRefs;
     385                 :            :     // for detective update, is set for each change of a formula
     386                 :            :     bool                bDetectiveDirty;
     387                 :            : 
     388                 :            :     sal_uInt8               nMacroCallMode;     // Macros per warning dialog disabled?
     389                 :            :     bool                bHasMacroFunc;      // valid only after loading
     390                 :            : 
     391                 :            :     sal_uInt8               nVisSpellState;
     392                 :            : 
     393                 :            :     sal_uInt8               nAsianCompression;
     394                 :            :     sal_uInt8               nAsianKerning;
     395                 :            :     bool                bSetDrawDefaults;
     396                 :            : 
     397                 :            :     bool                bPastingDrawFromOtherDoc;
     398                 :            : 
     399                 :            :     sal_uInt8                nInDdeLinkUpdate;   // originating DDE links (stacked bool)
     400                 :            : 
     401                 :            :     bool                bInUnoBroadcast;
     402                 :            :     bool                bInUnoListenerCall;
     403                 :            :     formula::FormulaGrammar::Grammar  eGrammar;
     404                 :            : 
     405                 :            :     mutable bool        bStyleSheetUsageInvalid;
     406                 :            : 
     407                 :            :     bool                mbUndoEnabled;
     408                 :            :     bool                mbAdjustHeightEnabled;
     409                 :            :     bool                mbExecuteLinkEnabled;
     410                 :            :     bool                mbChangeReadOnlyEnabled;    // allow changes in read-only document (for API import filters)
     411                 :            :     bool                mbStreamValidLocked;
     412                 :            : 
     413                 :            :     sal_Int16           mnNamedRangesLockCount;
     414                 :            : 
     415                 :            :     ::std::set<ScFormulaCell*> maSubTotalCells;
     416                 :            : 
     417                 :            :     // quick and ugly hack to fix the ScEditableTester problem in ucalc
     418                 :            :     // write a clean fix for this as soon as possible
     419                 :            :     bool                mbIsInTest;
     420                 :            : 
     421                 :            : public:
     422                 :            :     SC_DLLPUBLIC sal_uLong          GetCellCount() const;       // all cells
     423                 :            :     SCSIZE          GetCellCount(SCTAB nTab, SCCOL nCol) const;
     424                 :            :     sal_uLong           GetCodeCount() const;       // RPN-Code in formulas
     425                 :            :     DECL_LINK( GetUserDefinedColor, sal_uInt16 * );
     426                 :            :                                                                 // number formatter
     427                 :            : 
     428                 :            : public:
     429                 :            :     SC_DLLPUBLIC                ScDocument( ScDocumentMode eMode = SCDOCMODE_DOCUMENT,
     430                 :            :                                 SfxObjectShell* pDocShell = NULL );
     431                 :            :     SC_DLLPUBLIC                ~ScDocument();
     432                 :            : 
     433                 :            :     inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
     434                 :        529 :                     GetServiceManager() const { return xServiceManager; }
     435                 :            : 
     436                 :            :     SC_DLLPUBLIC const rtl::OUString&  GetName() const { return aDocName; }
     437                 :        954 :     void            SetName( const rtl::OUString& r ) { aDocName = r; }
     438                 :         86 :     const rtl::OUString&   GetCodeName() const { return aDocCodeName; }
     439                 :         41 :     void                SetCodeName( const rtl::OUString& r ) { aDocCodeName = r; }
     440                 :         11 :     const rtl::OUString& GetFileURL() const { return maFileURL; }
     441                 :            : 
     442                 :            :     void            GetDocStat( ScDocStat& rDocStat );
     443                 :            : 
     444                 :            :     SC_DLLPUBLIC void  InitDrawLayer( SfxObjectShell* pDocShell = NULL );
     445                 :            :     rtl::Reference<XColorList>          GetColorList();
     446                 :            : 
     447                 :            :     SC_DLLPUBLIC sfx2::LinkManager*     GetLinkManager() const;
     448                 :            : 
     449                 :            :     SC_DLLPUBLIC const ScDocOptions&        GetDocOptions() const;
     450                 :            :     SC_DLLPUBLIC void                   SetDocOptions( const ScDocOptions& rOpt );
     451                 :            :     SC_DLLPUBLIC const ScViewOptions&   GetViewOptions() const;
     452                 :            :     SC_DLLPUBLIC void                   SetViewOptions( const ScViewOptions& rOpt );
     453                 :            :     void                    SetPrintOptions();
     454                 :            : 
     455                 :        284 :     ScExtDocOptions*        GetExtDocOptions()  { return pExtDocOptions; }
     456                 :            :     SC_DLLPUBLIC void                   SetExtDocOptions( ScExtDocOptions* pNewOptions );
     457                 :            : 
     458                 :            :     SC_DLLPUBLIC void       GetLanguage( LanguageType& rLatin, LanguageType& rCjk, LanguageType& rCtl ) const;
     459                 :            :     void                    SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageType eCtl );
     460                 :            : 
     461                 :            :     void                    SetDrawDefaults();
     462                 :            : 
     463                 :            :     void                        SetConsolidateDlgData( const ScConsolidateParam* pData );
     464                 :          4 :     const ScConsolidateParam*   GetConsolidateDlgData() const { return pConsolidateDlgData; }
     465                 :            : 
     466                 :            :     void            Clear( bool bFromDestructor = false );
     467                 :            : 
     468                 :            :     ScFieldEditEngine*  CreateFieldEditEngine();
     469                 :            :     void                DisposeFieldEditEngine(ScFieldEditEngine*& rpEditEngine);
     470                 :            : 
     471                 :            :     /**
     472                 :            :      * Get all range names that are local to each table.  It only returns
     473                 :            :      * non-empty range name set.
     474                 :            :      */
     475                 :            :     SC_DLLPUBLIC void GetAllTabRangeNames(ScRangeName::TabNameCopyMap& rRangeNames) const;
     476                 :            :     SC_DLLPUBLIC void SetAllRangeNames( const boost::ptr_map<rtl::OUString, ScRangeName>& rRangeMap);
     477                 :            :     SC_DLLPUBLIC void GetTabRangeNameMap(std::map<rtl::OUString, ScRangeName*>& rRangeName);
     478                 :            :     SC_DLLPUBLIC void GetRangeNameMap(std::map<rtl::OUString, ScRangeName*>& rRangeName);
     479                 :            :     SC_DLLPUBLIC ScRangeName* GetRangeName(SCTAB nTab) const;
     480                 :            :     SC_DLLPUBLIC ScRangeName* GetRangeName() const;
     481                 :            :     void SetRangeName(SCTAB nTab, ScRangeName* pNew);
     482                 :            :     void SetRangeName( ScRangeName* pNewRangeName );
     483                 :          0 :     SCTAB           GetMaxTableNumber() { return static_cast<SCTAB>(maTabs.size()) - 1; }
     484                 :            :     void            SetMaxTableNumber(SCTAB nNumber) { nMaxTableNumber = nNumber; }
     485                 :            : 
     486                 :         95 :     ScRangePairList*    GetColNameRanges() { return &xColNameRanges; }
     487                 :         70 :     ScRangePairList*    GetRowNameRanges() { return &xRowNameRanges; }
     488                 :          7 :     ScRangePairListRef& GetColNameRangesRef() { return xColNameRanges; }
     489                 :          0 :     ScRangePairListRef& GetRowNameRangesRef() { return xRowNameRanges; }
     490                 :            : 
     491                 :            :     SC_DLLPUBLIC ScDBCollection*    GetDBCollection() const;
     492                 :            :     void            SetDBCollection( ScDBCollection* pNewDBCollection,
     493                 :            :                                         bool bRemoveAutoFilter = false );
     494                 :            :     const ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bStartOnly = false) const;
     495                 :            :     ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bStartOnly = false);
     496                 :            :     const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
     497                 :            :     ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
     498                 :            : 
     499                 :            :     SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, rtl::OUString* pName=NULL ) const;
     500                 :            : 
     501                 :            :     SC_DLLPUBLIC ScDPCollection*        GetDPCollection();
     502                 :            :     ScDPObject*         GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
     503                 :            :     ScDPObject*         GetDPAtBlock( const ScRange& rBlock ) const;
     504                 :            : 
     505                 :            :     SC_DLLPUBLIC ScChartCollection* GetChartCollection() const;
     506                 :            : 
     507                 :            :     void                StopTemporaryChartLock();
     508                 :            : 
     509                 :            :     void            EnsureGraphicNames();
     510                 :            : 
     511                 :            :     SdrObject*      GetObjectAtPoint( SCTAB nTab, const Point& rPos );
     512                 :            :     bool            HasChartAtPoint( SCTAB nTab, const Point& rPos, rtl::OUString& rName );
     513                 :            : 
     514                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > GetChartByName( const rtl::OUString& rChartName );
     515                 :            :     SC_DLLPUBLIC void            GetChartRanges( const rtl::OUString& rChartName, ::std::vector< ScRangeList >& rRanges, ScDocument* pSheetNameDoc );
     516                 :            :     void            SetChartRanges( const rtl::OUString& rChartName, const ::std::vector< ScRangeList >& rRanges );
     517                 :            : 
     518                 :            :     void            UpdateChartArea( const rtl::OUString& rChartName, const ScRange& rNewArea,
     519                 :            :                                         bool bColHeaders, bool bRowHeaders, bool bAdd );
     520                 :            :     void            UpdateChartArea( const rtl::OUString& rChartName,
     521                 :            :                                     const ScRangeListRef& rNewList,
     522                 :            :                                     bool bColHeaders, bool bRowHeaders, bool bAdd );
     523                 :            :     void            GetOldChartParameters( const rtl::OUString& rName,
     524                 :            :                                     ScRangeList& rRanges, bool& rColHeaders, bool& rRowHeaders );
     525                 :            :     ::com::sun::star::uno::Reference<
     526                 :            :             ::com::sun::star::embed::XEmbeddedObject >
     527                 :            :                     FindOleObjectByName( const rtl::OUString& rName );
     528                 :            : 
     529                 :            :     SC_DLLPUBLIC void           MakeTable( SCTAB nTab,bool _bNeedsNameCheck = true );
     530                 :            : 
     531                 :       1390 :     SCTAB           GetVisibleTab() const       { return nVisibleTab; }
     532                 :        139 :     SC_DLLPUBLIC void           SetVisibleTab(SCTAB nTab)   { nVisibleTab = nTab; }
     533                 :            : 
     534                 :            :     SC_DLLPUBLIC bool HasTable( SCTAB nTab ) const;
     535                 :            :     SC_DLLPUBLIC bool GetName( SCTAB nTab, rtl::OUString& rName ) const;
     536                 :            :     SC_DLLPUBLIC bool GetCodeName( SCTAB nTab, rtl::OUString& rName ) const;
     537                 :            :     SC_DLLPUBLIC bool SetCodeName( SCTAB nTab, const rtl::OUString& rName );
     538                 :            :     SC_DLLPUBLIC bool GetTable( const rtl::OUString& rName, SCTAB& rTab ) const;
     539                 :            :     rtl::OUString   GetCopyTabName(SCTAB nTab) const;
     540                 :            : 
     541                 :            :     SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, ScDBData* pDBData);
     542                 :            :     SC_DLLPUBLIC ScDBData* GetAnonymousDBData(SCTAB nTab);
     543                 :            : 
     544                 :     618251 :     SC_DLLPUBLIC inline SCTAB   GetTableCount() const { return static_cast<SCTAB>(maTabs.size()); }
     545                 :         14 :     SvNumberFormatterIndexTable* GetFormatExchangeList() const { return pFormatExchangeList; }
     546                 :            : 
     547                 :            :     SC_DLLPUBLIC ScDocProtection* GetDocProtection() const;
     548                 :            :     SC_DLLPUBLIC void           SetDocProtection(const ScDocProtection* pProtect);
     549                 :            :     SC_DLLPUBLIC bool           IsDocProtected() const;
     550                 :            :     bool            IsDocEditable() const;
     551                 :            :     SC_DLLPUBLIC bool           IsTabProtected( SCTAB nTab ) const;
     552                 :            :     SC_DLLPUBLIC    ScTableProtection* GetTabProtection( SCTAB nTab ) const;
     553                 :            :     SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection* pProtect);
     554                 :            :     void            CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest);
     555                 :            : 
     556                 :            :     void            LockTable(SCTAB nTab);
     557                 :            :     void            UnlockTable(SCTAB nTab);
     558                 :            : 
     559                 :            :     bool            IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
     560                 :            :                                         SCCOL nEndCol, SCROW nEndRow,
     561                 :            :                                         bool* pOnlyNotBecauseOfMatrix = NULL ) const;
     562                 :            :     bool            IsSelectionEditable( const ScMarkData& rMark,
     563                 :            :                                         bool* pOnlyNotBecauseOfMatrix = NULL ) const;
     564                 :            :     bool            HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
     565                 :            :                                             SCCOL nEndCol, SCROW nEndRow,
     566                 :            :                                             const ScMarkData& rMark ) const;
     567                 :            :     bool            HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTAB ) const;
     568                 :            : 
     569                 :            :     bool            GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix );
     570                 :            : 
     571                 :            :     bool            IsEmbedded() const;
     572                 :            :     void            GetEmbedded( ScRange& rRange ) const;
     573                 :            :     void            SetEmbedded( const ScRange& rRange );
     574                 :            :     void            ResetEmbedded();
     575                 :            :     Rectangle       GetEmbeddedRect() const;                        // 1/100 mm
     576                 :            :     void            SetEmbedded( const Rectangle& rRect );          // from VisArea (1/100 mm)
     577                 :            :     void            SnapVisArea( Rectangle& rRect ) const;          // 1/100 mm
     578                 :            : 
     579                 :            :     static SC_DLLPUBLIC bool ValidTabName( const rtl::OUString& rName );
     580                 :            : 
     581                 :            :     SC_DLLPUBLIC bool           ValidNewTabName( const rtl::OUString& rName ) const;
     582                 :            :     SC_DLLPUBLIC void           CreateValidTabName(rtl::OUString& rName) const;
     583                 :            :     SC_DLLPUBLIC void           CreateValidTabNames(std::vector<rtl::OUString>& aNames, SCTAB nCount) const;
     584                 :            : 
     585                 :            :     void AppendTabOnLoad(const rtl::OUString& rName);
     586                 :            :     void SetTabNameOnLoad(SCTAB nTab, const rtl::OUString& rName);
     587                 :            : 
     588                 :            :     SC_DLLPUBLIC bool           InsertTab( SCTAB nPos, const rtl::OUString& rName,
     589                 :            :                                         bool bExternalDocument = false );
     590                 :            :     SC_DLLPUBLIC bool           InsertTabs( SCTAB nPos, const std::vector<rtl::OUString>& rNames,
     591                 :            :                                 bool bExternalDocument = false, bool bNamesValid = false );
     592                 :            :     SC_DLLPUBLIC bool           DeleteTabs( SCTAB nTab, SCTAB nSheets, ScDocument* pRefUndoDoc = NULL );
     593                 :            :     SC_DLLPUBLIC bool           DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc = NULL );
     594                 :            :     SC_DLLPUBLIC bool           RenameTab( SCTAB nTab, const rtl::OUString& rName,
     595                 :            :                                 bool bUpdateRef = true,
     596                 :            :                                 bool bExternalDocument = false );
     597                 :            :     bool                        MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = NULL );
     598                 :            :     bool                        CopyTab( SCTAB nOldPos, SCTAB nNewPos,
     599                 :            :                                 const ScMarkData* pOnlyMarked = NULL );
     600                 :            :     SC_DLLPUBLIC sal_uLong          TransferTab(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos,
     601                 :            :                                     bool bInsertNew = true,
     602                 :            :                                     bool bResultsOnly = false );
     603                 :            :     SC_DLLPUBLIC void           TransferDrawPage(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos);
     604                 :            :     SC_DLLPUBLIC void           SetVisible( SCTAB nTab, bool bVisible );
     605                 :            :     SC_DLLPUBLIC bool           IsVisible( SCTAB nTab ) const;
     606                 :            :     bool            IsStreamValid( SCTAB nTab ) const;
     607                 :            :     void            SetStreamValid( SCTAB nTab, bool bSet, bool bIgnoreLock = false );
     608                 :            :     void            LockStreamValid( bool bLock );
     609                 :        340 :     bool            IsStreamValidLocked() const                         { return mbStreamValidLocked; }
     610                 :            :     bool            IsPendingRowHeights( SCTAB nTab ) const;
     611                 :            :     void            SetPendingRowHeights( SCTAB nTab, bool bSet );
     612                 :            :     SC_DLLPUBLIC void           SetLayoutRTL( SCTAB nTab, bool bRTL );
     613                 :            :     SC_DLLPUBLIC bool           IsLayoutRTL( SCTAB nTab ) const;
     614                 :            :     bool            IsNegativePage( SCTAB nTab ) const;
     615                 :            :     SC_DLLPUBLIC void           SetScenario( SCTAB nTab, bool bFlag );
     616                 :            :     SC_DLLPUBLIC bool           IsScenario( SCTAB nTab ) const;
     617                 :            :     SC_DLLPUBLIC void GetScenarioData( SCTAB nTab, rtl::OUString& rComment,
     618                 :            :                                        Color& rColor, sal_uInt16& rFlags ) const;
     619                 :            :     SC_DLLPUBLIC void           SetScenarioData( SCTAB nTab, const rtl::OUString& rComment,
     620                 :            :                                         const Color& rColor, sal_uInt16 nFlags );
     621                 :            :     SC_DLLPUBLIC Color GetTabBgColor( SCTAB nTab ) const;
     622                 :            :     SC_DLLPUBLIC void SetTabBgColor( SCTAB nTab, const Color& rColor );
     623                 :            :     SC_DLLPUBLIC bool IsDefaultTabBgColor( SCTAB nTab ) const;
     624                 :            :     void            GetScenarioFlags( SCTAB nTab, sal_uInt16& rFlags ) const;
     625                 :            :     SC_DLLPUBLIC bool           IsActiveScenario( SCTAB nTab ) const;
     626                 :            :     SC_DLLPUBLIC void           SetActiveScenario( SCTAB nTab, bool bActive );      // only for Undo etc.
     627                 :            :     SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const;
     628                 :            :     SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const;
     629                 :            :     void            SetGrammar( formula::FormulaGrammar::Grammar eGram );
     630                 :            :     SC_DLLPUBLIC sal_uInt8          GetLinkMode( SCTAB nTab ) const;
     631                 :            :     bool            IsLinked( SCTAB nTab ) const;
     632                 :            :     SC_DLLPUBLIC const rtl::OUString  GetLinkDoc( SCTAB nTab ) const;
     633                 :            :     const rtl::OUString   GetLinkFlt( SCTAB nTab ) const;
     634                 :            :     const rtl::OUString   GetLinkOpt( SCTAB nTab ) const;
     635                 :            :     SC_DLLPUBLIC const rtl::OUString  GetLinkTab( SCTAB nTab ) const;
     636                 :            :     sal_uLong       GetLinkRefreshDelay( SCTAB nTab ) const;
     637                 :            :     void            SetLink( SCTAB nTab, sal_uInt8 nMode, const rtl::OUString& rDoc,
     638                 :            :                             const rtl::OUString& rFilter, const rtl::OUString& rOptions,
     639                 :            :                             const rtl::OUString& rTabName, sal_uLong nRefreshDelay );
     640                 :            :     bool            HasLink( const rtl::OUString& rDoc,
     641                 :            :                             const rtl::OUString& rFilter, const rtl::OUString& rOptions ) const;
     642                 :            :     SC_DLLPUBLIC bool           LinkExternalTab( SCTAB& nTab, const rtl::OUString& aDocTab,
     643                 :            :                                     const rtl::OUString& aFileName,
     644                 :            :                                     const rtl::OUString& aTabName );
     645                 :            : 
     646                 :       3855 :     bool            HasExternalRefManager() const { return pExternalRefMgr.get(); }
     647                 :            :     SC_DLLPUBLIC ScExternalRefManager* GetExternalRefManager() const;
     648                 :            :     bool            IsInExternalReferenceMarking() const;
     649                 :            :     void            MarkUsedExternalReferences();
     650                 :            :     bool            MarkUsedExternalReferences( ScTokenArray & rArr );
     651                 :            : 
     652                 :            :     /** Returns the pool containing external formula parsers. Creates the pool
     653                 :            :         on first call. */
     654                 :            :     ScFormulaParserPool& GetFormulaParserPool() const;
     655                 :            : 
     656                 :            :     bool            HasDdeLinks() const;
     657                 :            :     bool            HasAreaLinks() const;
     658                 :            :     void            UpdateExternalRefLinks(Window* pWin);
     659                 :            :     void            UpdateDdeLinks(Window* pWin);
     660                 :            :     void            UpdateAreaLinks();
     661                 :            : 
     662                 :            :                     // originating DDE links
     663         [ +  - ]:          5 :     void            IncInDdeLinkUpdate() { if ( nInDdeLinkUpdate < 255 ) ++nInDdeLinkUpdate; }
     664         [ +  - ]:          5 :     void            DecInDdeLinkUpdate() { if ( nInDdeLinkUpdate ) --nInDdeLinkUpdate; }
     665                 :       4573 :     bool            IsInDdeLinkUpdate() const   { return nInDdeLinkUpdate != 0; }
     666                 :            : 
     667                 :            :     SC_DLLPUBLIC void           CopyDdeLinks( ScDocument* pDestDoc ) const;
     668                 :            :     void            DisconnectDdeLinks();
     669                 :            : 
     670                 :            :                     // for StarOne Api:
     671                 :            :     sal_uInt16          GetDdeLinkCount() const;
     672                 :            :     bool            UpdateDdeLink( const rtl::OUString& rAppl, const rtl::OUString& rTopic, const rtl::OUString& rItem );
     673                 :            : 
     674                 :            :     /** Tries to find a DDE link with the specified connection data.
     675                 :            :         @param rnDdePos  (out-param) Returns the index of the DDE link (does not include other links from link manager).
     676                 :            :         @return  true = DDE link found, rnDdePos valid. */
     677                 :            :     SC_DLLPUBLIC bool            FindDdeLink( const rtl::OUString& rAppl, const rtl::OUString& rTopic, const rtl::OUString& rItem, sal_uInt8 nMode, sal_uInt16& rnDdePos );
     678                 :            : 
     679                 :            :     /** Returns the connection data of the specified DDE link.
     680                 :            :         @param nDdePos  Index of the DDE link (does not include other links from link manager).
     681                 :            :         @param rAppl  (out-param) The application name.
     682                 :            :         @param rTopic  (out-param) The DDE topic.
     683                 :            :         @param rItem  (out-param) The DDE item.
     684                 :            :         @return  true = DDE link found, out-parameters valid. */
     685                 :            :     bool            GetDdeLinkData( sal_uInt16 nDdePos, rtl::OUString& rAppl, rtl::OUString& rTopic, rtl::OUString& rItem ) const;
     686                 :            :     /** Returns the link mode of the specified DDE link.
     687                 :            :         @param nDdePos  Index of the DDE link (does not include other links from link manager).
     688                 :            :         @param rnMode  (out-param) The link mode of the specified DDE link.
     689                 :            :         @return  true = DDE link found, rnMode valid. */
     690                 :            :     bool            GetDdeLinkMode( sal_uInt16 nDdePos, sal_uInt8& rnMode ) const;
     691                 :            :     /** Returns the result matrix of the specified DDE link.
     692                 :            :         @param nDdePos  Index of the DDE link (does not include other links from link manager).
     693                 :            :         @return  The result matrix, if the DDE link has been found, 0 otherwise. */
     694                 :            :     SC_DLLPUBLIC const ScMatrix* GetDdeLinkResultMatrix( sal_uInt16 nDdePos ) const;
     695                 :            : 
     696                 :            :     /** Tries to find a DDE link or creates a new, if not extant.
     697                 :            :         @param pResults  If not 0, sets the matrix as as DDE link result matrix (also for existing links).
     698                 :            :         @return  true = DDE link found; false = Unpredictable error occurred, no DDE link created. */
     699                 :            :     SC_DLLPUBLIC bool            CreateDdeLink( const rtl::OUString& rAppl, const rtl::OUString& rTopic, const rtl::OUString& rItem, sal_uInt8 nMode, ScMatrixRef pResults );
     700                 :            :     /** Sets a result matrix for the specified DDE link.
     701                 :            :         @param nDdePos  Index of the DDE link (does not include other links from link manager).
     702                 :            :         @param pResults  The array containing all results of the DDE link (intrusive-ref-counted, do not delete).
     703                 :            :         @return  true = DDE link found and matrix set. */
     704                 :            :     bool            SetDdeLinkResultMatrix( sal_uInt16 nDdePos, ScMatrixRef pResults );
     705                 :            : 
     706                 :            : 
     707                 :            :     SfxBindings*    GetViewBindings();
     708                 :       9087 :     SfxObjectShell* GetDocumentShell() const    { return pShell; }
     709                 :            :     SC_DLLPUBLIC ScDrawLayer* GetDrawLayer();
     710                 :            :     SfxBroadcaster* GetDrawBroadcaster();       // to avoid header
     711                 :            :     void            BeginDrawUndo();
     712                 :            : 
     713                 :            :     void            BeginUnoRefUndo();
     714                 :       3015 :     bool            HasUnoRefUndo() const       { return ( pUnoRefUndoList != NULL ); }
     715                 :            :     ScUnoRefList*   EndUnoRefUndo();            // must be deleted by caller!
     716                 :            :     sal_Int64       GetNewUnoId();
     717                 :            :     void            AddUnoRefChange( sal_Int64 nId, const ScRangeList& rOldRanges );
     718                 :            : 
     719                 :            :     bool IsChart( const SdrObject* pObject );
     720                 :            : 
     721                 :            :     SC_DLLPUBLIC void           UpdateAllCharts();
     722                 :            :     void            UpdateChartRef( UpdateRefMode eUpdateRefMode,
     723                 :            :                                     SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
     724                 :            :                                     SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
     725                 :            :                                     SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
     726                 :            :                     //! only assigns the new RangeList, no ChartListener or the like
     727                 :            :     void            SetChartRangeList( const rtl::OUString& rChartName,
     728                 :            :                         const ScRangeListRef& rNewRangeListRef );
     729                 :            : 
     730                 :            :     void            StartAnimations( SCTAB nTab, Window* pWin );
     731                 :            : 
     732                 :            :     bool            HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ) const;
     733                 :            :     bool            HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect ) const;
     734                 :            : 
     735                 :            :     const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const;
     736                 :            :     void            SetSheetEvents( SCTAB nTab, const ScSheetEvents* pNew );
     737                 :            :     bool            HasSheetEventScript( SCTAB nTab, sal_Int32 nEvent, bool bWithVbaEvents = false ) const;
     738                 :            :     bool            HasAnySheetEventScript( sal_Int32 nEvent, bool bWithVbaEvents = false ) const;  // on any sheet
     739                 :            : 
     740                 :            :     bool            HasAnyCalcNotification() const;
     741                 :            :     bool            HasCalcNotification( SCTAB nTab ) const;
     742                 :            :     void            SetCalcNotification( SCTAB nTab );
     743                 :            :     void            ResetCalcNotifications();
     744                 :            : 
     745                 :            :     SC_DLLPUBLIC ScOutlineTable*    GetOutlineTable( SCTAB nTab, bool bCreate = false );
     746                 :            :     bool            SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline );
     747                 :            : 
     748                 :            :     void            DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
     749                 :            :                                     SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
     750                 :            : 
     751                 :            :     bool            DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
     752                 :            :     void            RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
     753                 :            :     bool            TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam );
     754                 :            :     bool            HasSubTotalCells( const ScRange& rRange );
     755                 :            : 
     756                 :            :     SC_DLLPUBLIC void           PutCell( const ScAddress&, ScBaseCell* pCell, bool bForceTab = false );
     757                 :            :     SC_DLLPUBLIC void           PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell,
     758                 :            :                             bool bForceTab = false );
     759                 :            :     SC_DLLPUBLIC void           PutCell(SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell,
     760                 :            :                             sal_uLong nFormatIndex, bool bForceTab = false);
     761                 :            :                     //  return TRUE = number format is set
     762                 :            :     SC_DLLPUBLIC bool           SetString(
     763                 :            :         SCCOL nCol, SCROW nRow, SCTAB nTab, const rtl::OUString& rString,
     764                 :            :         ScSetStringParam* pParam = NULL );
     765                 :            :     SC_DLLPUBLIC void           SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal );
     766                 :            :     void            SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const sal_uInt16 nError);
     767                 :            : 
     768                 :            :     SC_DLLPUBLIC void           InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
     769                 :            :                                         SCCOL nCol2, SCROW nRow2,
     770                 :            :                                         const ScMarkData& rMark,
     771                 :            :                                         const rtl::OUString& rFormula,
     772                 :            :                                         const ScTokenArray* p = NULL,
     773                 :            :                                         const formula::FormulaGrammar::Grammar = formula::FormulaGrammar::GRAM_DEFAULT );
     774                 :            :     SC_DLLPUBLIC void           InsertTableOp(const ScTabOpParam& rParam,   // multi-operation
     775                 :            :                                   SCCOL nCol1, SCROW nRow1,
     776                 :            :                                   SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark);
     777                 :            : 
     778                 :            :     SC_DLLPUBLIC void           GetString( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rString );
     779                 :            :     SC_DLLPUBLIC void           GetString( SCCOL nCol, SCROW nRow, SCTAB nTab, rtl::OUString& rString );
     780         [ +  - ]:       3191 :     SC_DLLPUBLIC rtl::OUString  GetString( SCCOL nCol, SCROW nRow, SCTAB nTab) { rtl::OUString aString; GetString(nCol, nRow, nTab, aString); return aString;}
     781                 :            :     SC_DLLPUBLIC void           GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rString );
     782                 :            :     SC_DLLPUBLIC void           GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, rtl::OUString& rString );
     783                 :            :     sal_uInt16                  GetStringForFormula( const ScAddress& rPos, rtl::OUString& rString );
     784                 :            :     SC_DLLPUBLIC double         GetValue( const ScAddress& );
     785         [ +  - ]:        396 :     SC_DLLPUBLIC double         GetValue( const SCCOL nCol, SCROW nRow, SCTAB nTab) { ScAddress aAdr(nCol, nRow, nTab); return GetValue(aAdr);}
     786                 :            :     SC_DLLPUBLIC void           GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, double& rValue );
     787                 :            :     SC_DLLPUBLIC double         RoundValueAsShown( double fVal, sal_uLong nFormat );
     788                 :            :     SC_DLLPUBLIC void           GetNumberFormat( SCCOL nCol, SCROW nRow, SCTAB nTab,
     789                 :            :                                      sal_uInt32& rFormat ) const;
     790                 :            :     sal_uInt32      GetNumberFormat( const ScRange& rRange ) const;
     791                 :            :     SC_DLLPUBLIC sal_uInt32     GetNumberFormat( const ScAddress& ) const;
     792                 :            :                     /** If no number format attribute is set and the cell
     793                 :            :                         pointer passed is of type formula cell, the calculated
     794                 :            :                         number format of the formula cell is returned. pCell
     795                 :            :                         may be NULL. */
     796                 :            :     SC_DLLPUBLIC void           GetNumberFormatInfo( short& nType, sal_uLong& nIndex,
     797                 :            :                         const ScAddress& rPos, const ScBaseCell* pCell ) const;
     798                 :            :     void            GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rFormula ) const;
     799                 :            :     SC_DLLPUBLIC void           GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, rtl::OUString& rFormula ) const;
     800                 :            :     SC_DLLPUBLIC void           GetCellType( SCCOL nCol, SCROW nRow, SCTAB nTab, CellType& rCellType ) const;
     801                 :            :     SC_DLLPUBLIC CellType       GetCellType( const ScAddress& rPos ) const;
     802                 :            :     SC_DLLPUBLIC void           GetCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*& rpCell ) const;
     803                 :            :     SC_DLLPUBLIC ScBaseCell*        GetCell( const ScAddress& rPos ) const;
     804                 :            : 
     805                 :            :     SC_DLLPUBLIC bool           HasData( SCCOL nCol, SCROW nRow, SCTAB nTab );
     806                 :            :     SC_DLLPUBLIC bool           HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
     807                 :            :     SC_DLLPUBLIC bool           HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
     808                 :            :     bool            HasStringCells( const ScRange& rRange ) const;
     809                 :            : 
     810                 :            :     /** Returns true, if there is any data to create a selection list for rPos. */
     811                 :            :     bool            HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
     812                 :            : 
     813                 :            :     /** Returns a table notes container. */
     814                 :            :     SC_DLLPUBLIC ScNotes*       GetNotes(SCTAB nTab);
     815                 :            : 
     816                 :            :     /** Creates the captions of all uninitialized cell notes in the specified sheet.
     817                 :            :         @param bForced  True = always create all captions, false = skip when Undo is disabled. */
     818                 :            :     void            InitializeNoteCaptions( SCTAB nTab, bool bForced = false );
     819                 :            : 
     820                 :            :     void            SetDrawPageSize(SCTAB nTab);
     821                 :            : 
     822                 :            :     bool            ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
     823                 :            :                                 SCCOL& rEndCol, SCROW& rEndRow, const ScMarkData& rMark,
     824                 :            :                                 bool bRefresh = false );
     825                 :            :     SC_DLLPUBLIC bool            ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
     826                 :            :                                 SCCOL& rEndCol, SCROW& rEndRow, SCTAB nTab,
     827                 :            :                                 bool bRefresh = false );
     828                 :            :     bool            ExtendMerge( ScRange& rRange, bool bRefresh = false );
     829                 :            :     bool            ExtendTotalMerge( ScRange& rRange ) const;
     830                 :            :     SC_DLLPUBLIC bool           ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
     831                 :            :                                 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const;
     832                 :            :     SC_DLLPUBLIC bool           ExtendOverlapped( ScRange& rRange ) const;
     833                 :            : 
     834                 :            :     bool            RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
     835                 :            :                                 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
     836                 :            : 
     837                 :            :     SC_DLLPUBLIC void           DoMergeContents( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
     838                 :            :                                     SCCOL nEndCol, SCROW nEndRow );
     839                 :            :                     //  without checking:
     840                 :            :     SC_DLLPUBLIC void           DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
     841                 :            :                                     SCCOL nEndCol, SCROW nEndRow, bool bDeleteCaptions = true );
     842                 :            :     void            RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab );
     843                 :            : 
     844                 :            :     bool            IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
     845                 :            :                                                 SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes = false ) const;
     846                 :            :     bool            IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
     847                 :            :                                                 SCCOL nEndCol, SCROW nEndRow,
     848                 :            :                                                 bool bLeftIsEmpty = false,
     849                 :            :                                                 ScRange* pLastRange = NULL,
     850                 :            :                                                 Rectangle* pLastMM = NULL ) const;
     851                 :            : 
     852                 :            :     void            SkipOverlapped( SCCOL& rCol, SCROW& rRow, SCTAB nTab ) const;
     853                 :            :     bool            IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
     854                 :            :     bool            IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
     855                 :            : 
     856                 :            :     SC_DLLPUBLIC bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
     857                 :            :                                  SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt16 nMask ) const;
     858                 :            :     SC_DLLPUBLIC bool HasAttrib( const ScRange& rRange, sal_uInt16 nMask ) const;
     859                 :            : 
     860                 :            :     SC_DLLPUBLIC void GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
     861                 :            :                                     const ::editeng::SvxBorderLine** ppLeft,
     862                 :            :                                     const ::editeng::SvxBorderLine** ppTop,
     863                 :            :                                     const ::editeng::SvxBorderLine** ppRight,
     864                 :            :                                     const ::editeng::SvxBorderLine** ppBottom ) const;
     865                 :            : 
     866                 :            :     void            ResetChanged( const ScRange& rRange );
     867                 :            : 
     868                 :            :     void            SetDirty();
     869                 :            :     void            SetDirty( const ScRange& );
     870                 :            :     void            SetTableOpDirty( const ScRange& );  // for Interpreter TableOp
     871                 :            :     void            InterpretDirtyCells( const ScRangeList& rRanges );
     872                 :            :     void            CalcAll();
     873                 :            :     SC_DLLPUBLIC void           CalcAfterLoad();
     874                 :            :     void            CompileAll();
     875                 :            :     void            CompileXML();
     876                 :            : 
     877                 :         18 :     ScAutoNameCache* GetAutoNameCache()     { return pAutoNameCache; }
     878                 :            :     SC_DLLPUBLIC  void             SetAutoNameCache(  ScAutoNameCache* pCache );
     879                 :            : 
     880                 :            :                     /** Creates a ScLookupCache cache for the range if it
     881                 :            :                         doesn't already exist. */
     882                 :            :     ScLookupCache & GetLookupCache( const ScRange & rRange );
     883                 :            :                     /** Only ScLookupCache ctor uses AddLookupCache(), do not
     884                 :            :                         use elsewhere! */
     885                 :            :     void            AddLookupCache( ScLookupCache & rCache );
     886                 :            :                     /** Only ScLookupCache dtor uses RemoveLookupCache(), do
     887                 :            :                         not use elsewhere! */
     888                 :            :     void            RemoveLookupCache( ScLookupCache & rCache );
     889                 :            :                     /** Zap all caches. */
     890                 :            :     void            ClearLookupCaches();
     891                 :            : 
     892                 :            :                     // calculate automatically
     893                 :            :     void            SetAutoCalc( bool bNewAutoCalc );
     894                 :    1066394 :     bool            GetAutoCalc() const { return bAutoCalc; }
     895                 :            :                     // calculate automatically in/from/for ScDocShell disabled
     896                 :      42220 :     void            SetAutoCalcShellDisabled( bool bNew ) { bAutoCalcShellDisabled = bNew; }
     897                 :      29033 :     bool            IsAutoCalcShellDisabled() const { return bAutoCalcShellDisabled; }
     898                 :            :                     // ForcedFormulas are to be calculated
     899                 :        124 :     void            SetForcedFormulaPending( bool bNew ) { bForcedFormulaPending = bNew; }
     900                 :       3985 :     bool            IsForcedFormulaPending() const { return bForcedFormulaPending; }
     901                 :            :                     // if CalcFormulaTree() is currently running
     902                 :        124 :     bool            IsCalculatingFormulaTree() { return bCalculatingFormulaTree; }
     903                 :            : 
     904                 :            :     sal_uInt16          GetErrCode( const ScAddress& ) const;
     905                 :            : 
     906                 :            :                     /** Shrink a range to only include data area.
     907                 :            : 
     908                 :            :                         This is not the actually used area within the
     909                 :            :                         selection, but the bounds of the sheet's data area
     910                 :            :                         instead.
     911                 :            : 
     912                 :            :                         @returns TRUE if the area passed intersected the data
     913                 :            :                                  area, FALSE if not, in which case the values
     914                 :            :                                  obtained may be out of bounds, not in order or
     915                 :            :                                  unmodified. TRUE does not mean that there
     916                 :            :                                  actually is any data within the selection.
     917                 :            :                      */
     918                 :            :     bool            ShrinkToDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const;
     919                 :            : 
     920                 :            :                     /** Shrink a range to only include used data area.
     921                 :            : 
     922                 :            :                         @param o_bShrunk
     923                 :            :                                Out parameter, true if area was shrunk, false if not.
     924                 :            : 
     925                 :            :                         @returns true if there is any data, false if not.
     926                 :            :                      */
     927                 :            :     bool            ShrinkToUsedDataArea( bool& o_bShrunk,
     928                 :            :                                           SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
     929                 :            :                                           SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly ) const;
     930                 :            : 
     931                 :            :     SC_DLLPUBLIC void           GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
     932                 :            :                                     SCCOL& rEndCol, SCROW& rEndRow, bool bIncludeOld, bool bOnlyDown ) const;
     933                 :            :     SC_DLLPUBLIC bool           GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
     934                 :            :     SC_DLLPUBLIC bool           GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
     935                 :            :     SC_DLLPUBLIC bool           GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
     936                 :            :                                     bool bNotes = true ) const;
     937                 :            :     SC_DLLPUBLIC bool           GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
     938                 :            :                                         SCCOL& rEndCol, bool bNotes = true ) const;
     939                 :            :     SC_DLLPUBLIC bool           GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
     940                 :            :                                         SCROW& rEndRow, bool bNotes = true ) const;
     941                 :            :     void            InvalidateTableArea();
     942                 :            : 
     943                 :            : 
     944                 :            :     SC_DLLPUBLIC bool           GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const;
     945                 :            : 
     946                 :            :     /**
     947                 :            :      * Find the maximum column position that contains printable data for the
     948                 :            :      * specified row range.  The final column position must be equal or less
     949                 :            :      * than the initial value of rEndCol.
     950                 :            :      */
     951                 :            :     void            ExtendPrintArea( OutputDevice* pDev, SCTAB nTab,
     952                 :            :                                     SCCOL nStartCol, SCROW nStartRow,
     953                 :            :                                     SCCOL& rEndCol, SCROW nEndRow ) const;
     954                 :            :     SC_DLLPUBLIC SCSIZE         GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
     955                 :            :                                             SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
     956                 :            :                                             ScDirection eDir );
     957                 :            : 
     958                 :            :     SC_DLLPUBLIC void           FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const;
     959                 :            :     SC_DLLPUBLIC void           GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY,
     960                 :            :                                 bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const;
     961                 :            : 
     962                 :            :     bool            GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
     963                 :            :                                         const ScMarkData& rMark );
     964                 :            : 
     965                 :            :     void            LimitChartArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
     966                 :            :                                                     SCCOL& rEndCol, SCROW& rEndRow );
     967                 :            :     void            LimitChartIfAll( ScRangeListRef& rRangeList );
     968                 :            : 
     969                 :            :     bool            InsertRow( SCCOL nStartCol, SCTAB nStartTab,
     970                 :            :                                SCCOL nEndCol,   SCTAB nEndTab,
     971                 :            :                                SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = NULL,
     972                 :            :                                const ScMarkData* pTabMark = NULL );
     973                 :            :     SC_DLLPUBLIC bool           InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL );
     974                 :            :     void            DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
     975                 :            :                                SCCOL nEndCol,   SCTAB nEndTab,
     976                 :            :                                SCROW nStartRow, SCSIZE nSize,
     977                 :            :                                ScDocument* pRefUndoDoc = NULL, bool* pUndoOutline = NULL,
     978                 :            :                                const ScMarkData* pTabMark = NULL );
     979                 :            :     SC_DLLPUBLIC void   DeleteRow( const ScRange& rRange,
     980                 :            :                                ScDocument* pRefUndoDoc = NULL, bool* pUndoOutline = NULL );
     981                 :            :     bool            InsertCol( SCROW nStartRow, SCTAB nStartTab,
     982                 :            :                                SCROW nEndRow,   SCTAB nEndTab,
     983                 :            :                                SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = NULL,
     984                 :            :                                const ScMarkData* pTabMark = NULL );
     985                 :            :     SC_DLLPUBLIC bool           InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL );
     986                 :            :     void            DeleteCol( SCROW nStartRow, SCTAB nStartTab,
     987                 :            :                                SCROW nEndRow, SCTAB nEndTab,
     988                 :            :                                SCCOL nStartCol, SCSIZE nSize,
     989                 :            :                                ScDocument* pRefUndoDoc = NULL, bool* pUndoOutline = NULL,
     990                 :            :                                const ScMarkData* pTabMark = NULL );
     991                 :            :     void            DeleteCol( const ScRange& rRange,
     992                 :            :                                ScDocument* pRefUndoDoc = NULL, bool* pUndoOutline = NULL );
     993                 :            : 
     994                 :            :     bool            CanInsertRow( const ScRange& rRange ) const;
     995                 :            :     bool            CanInsertCol( const ScRange& rRange ) const;
     996                 :            : 
     997                 :            :     void            FitBlock( const ScRange& rOld, const ScRange& rNew, bool bClear = true );
     998                 :            :     bool            CanFitBlock( const ScRange& rOld, const ScRange& rNew );
     999                 :            : 
    1000 [ +  + ][ +  + ]:      59383 :     bool            IsClipOrUndo() const                        { return bIsClip || bIsUndo; }
    1001                 :        139 :     bool            IsUndo() const                              { return bIsUndo; }
    1002                 :        438 :     bool            IsClipboard() const                         { return bIsClip; }
    1003                 :      13782 :     bool            IsUndoEnabled() const                       { return mbUndoEnabled; }
    1004                 :            :     void            EnableUndo( bool bVal );
    1005                 :            : 
    1006                 :       5085 :     bool            IsAdjustHeightEnabled() const               { return mbAdjustHeightEnabled; }
    1007                 :        518 :     void            EnableAdjustHeight( bool bVal )             { mbAdjustHeightEnabled = bVal; }
    1008                 :         28 :     bool            IsExecuteLinkEnabled() const                { return mbExecuteLinkEnabled; }
    1009                 :        240 :     void            EnableExecuteLink( bool bVal )              { mbExecuteLinkEnabled = bVal; }
    1010                 :        958 :     bool            IsChangeReadOnlyEnabled() const             { return mbChangeReadOnlyEnabled; }
    1011                 :         52 :     void            EnableChangeReadOnly( bool bVal )           { mbChangeReadOnlyEnabled = bVal; }
    1012                 :         87 :     SC_DLLPUBLIC sal_Int16       GetNamedRangesLockCount() const             { return mnNamedRangesLockCount; }
    1013                 :         48 :     void            SetNamedRangesLockCount( sal_Int16 nCount ) { mnNamedRangesLockCount = nCount; }
    1014                 :            :     SC_DLLPUBLIC void           ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
    1015                 :            :     SC_DLLPUBLIC void           ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
    1016                 :            :     void            SetCutMode( bool bCut );
    1017                 :            :     SC_DLLPUBLIC bool           IsCutMode();
    1018                 :            :     void            SetClipArea( const ScRange& rArea, bool bCut = false );
    1019                 :            : 
    1020                 :       1936 :     SC_DLLPUBLIC bool           IsDocVisible() const                        { return bIsVisible; }
    1021                 :            :     void            SetDocVisible( bool bSet );
    1022                 :            : 
    1023                 :            :     bool            HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = NULL );
    1024                 :            : 
    1025                 :            :     void            DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
    1026                 :            :                                         const ScMarkData& rMark );
    1027                 :            :     void            DeleteObjectsInSelection( const ScMarkData& rMark );
    1028                 :            : 
    1029                 :            :     void            DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
    1030                 :            :                             const ScMarkData& rMark, sal_uInt16 nDelFlag);
    1031                 :            :     void            DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
    1032                 :            :                                 SCTAB nTab, sal_uInt16 nDelFlag);
    1033                 :            :     void            DeleteAreaTab(const ScRange& rRange, sal_uInt16 nDelFlag);
    1034                 :            : 
    1035                 :            :     void            CopyToClip(const ScClipParam& rClipParam, ScDocument* pClipDoc,
    1036                 :            :                                const ScMarkData* pMarks = NULL, bool bAllTabs = false, bool bKeepScenarioFlags = false,
    1037                 :            :                                bool bIncludeObjects = false, bool bCloneNoteCaptions = true, bool bUseRangeForVBA = false );
    1038                 :            : 
    1039                 :            :     void            CopyTabToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
    1040                 :            :                                 SCTAB nTab, ScDocument* pClipDoc = NULL);
    1041                 :            :     void            CopyBlockFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
    1042                 :            :                                     const ScMarkData& rMark, SCsCOL nDx, SCsROW nDy,
    1043                 :            :                                     const ScCopyBlockFromClipParams* pCBFCP );
    1044                 :            :     void            CopyNonFilteredFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
    1045                 :            :                                     const ScMarkData& rMark, SCsCOL nDx, SCsROW nDy,
    1046                 :            :                                     const ScCopyBlockFromClipParams* pCBFCP,
    1047                 :            :                                     SCROW & rClipStartRow );
    1048                 :            :     void            StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
    1049                 :            :                                         SCCOL nCol2, SCROW nRow2,
    1050                 :            :                                         const ScMarkData& rMark, sal_uInt16 nInsFlag );
    1051                 :            :     void            BroadcastFromClip( SCCOL nCol1, SCROW nRow1,
    1052                 :            :                                     SCCOL nCol2, SCROW nRow2,
    1053                 :            :                                     const ScMarkData& rMark, sal_uInt16 nInsFlag );
    1054                 :            :     /** If pDestRanges is given it overrides rDestRange, rDestRange in this
    1055                 :            :         case is the overall encompassing range. */
    1056                 :            :     void            CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMark,
    1057                 :            :                                     sal_uInt16 nInsFlag,
    1058                 :            :                                     ScDocument* pRefUndoDoc = NULL,
    1059                 :            :                                     ScDocument* pClipDoc = NULL,
    1060                 :            :                                     bool bResetCut = true,
    1061                 :            :                                     bool bAsLink = false,
    1062                 :            :                                     bool bIncludeFiltered = true,
    1063                 :            :                                     bool bSkipAttrForEmpty = false,
    1064                 :            :                                     const ScRangeList * pDestRanges = NULL );
    1065                 :            : 
    1066                 :            :     void            CopyMultiRangeFromClip(const ScAddress& rDestPos, const ScMarkData& rMark,
    1067                 :            :                                            sal_uInt16 nInsFlag, ScDocument* pClipDoc,
    1068                 :            :                                            bool bResetCut = true, bool bAsLink = false,
    1069                 :            :                                            bool bIncludeFiltered = true,
    1070                 :            :                                            bool bSkipAttrForEmpty = false);
    1071                 :            : 
    1072                 :            :     void            GetClipArea(SCCOL& nClipX, SCROW& nClipY, bool bIncludeFiltered);
    1073                 :            :     void            GetClipStart(SCCOL& nClipX, SCROW& nClipY);
    1074                 :            : 
    1075                 :            :     bool            HasClipFilteredRows();
    1076                 :            : 
    1077                 :            :     bool            IsClipboardSource() const;
    1078                 :            : 
    1079                 :            :     SC_DLLPUBLIC void           TransposeClip( ScDocument* pTransClip, sal_uInt16 nFlags, bool bAsLink );
    1080                 :            : 
    1081                 :            :     ScClipParam&    GetClipParam();
    1082                 :            :     void            SetClipParam(const ScClipParam& rParam);
    1083                 :            : 
    1084                 :            :     void            MixDocument( const ScRange& rRange, sal_uInt16 nFunction, bool bSkipEmpty,
    1085                 :            :                                     ScDocument* pSrcDoc );
    1086                 :            : 
    1087                 :            :     void            FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
    1088                 :            :                                 sal_uInt16 nFlags, sal_uInt16 nFunction,
    1089                 :            :                                 bool bSkipEmpty, bool bAsLink );
    1090                 :            :     void            FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
    1091                 :            :                                 sal_uInt16 nFlags, sal_uInt16 nFunction,
    1092                 :            :                                 bool bSkipEmpty, bool bAsLink );
    1093                 :            : 
    1094                 :            :     void            TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nType );
    1095                 :            : 
    1096                 :            :     SC_DLLPUBLIC void           InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
    1097                 :            :                                 bool bColInfo = false, bool bRowInfo = false );
    1098                 :            :     void            AddUndoTab( SCTAB nTab1, SCTAB nTab2,
    1099                 :            :                                 bool bColInfo = false, bool bRowInfo = false );
    1100                 :            :     SC_DLLPUBLIC void           InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSelection,
    1101                 :            :                                 bool bColInfo = false, bool bRowInfo = false );
    1102                 :          6 :     void            SetInTest() { mbIsInTest = true; }
    1103                 :            : 
    1104                 :            :                     //  don't use anymore:
    1105                 :            :     void            CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
    1106                 :            :                                 SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
    1107                 :            :                                 sal_uInt16 nFlags, bool bMarked, ScDocument* pDestDoc,
    1108                 :            :                                 const ScMarkData* pMarks = NULL, bool bColRowFlags = true);
    1109                 :            :     void            UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
    1110                 :            :                                 SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
    1111                 :            :                                 sal_uInt16 nFlags, bool bMarked, ScDocument* pDestDoc,
    1112                 :            :                                 const ScMarkData* pMarks = NULL);
    1113                 :            : 
    1114                 :            :     void            CopyToDocument(const ScRange& rRange,
    1115                 :            :                                 sal_uInt16 nFlags, bool bMarked, ScDocument* pDestDoc,
    1116                 :            :                                 const ScMarkData* pMarks = NULL, bool bColRowFlags = true);
    1117                 :            :     void            UndoToDocument(const ScRange& rRange,
    1118                 :            :                                 sal_uInt16 nFlags, bool bMarked, ScDocument* pDestDoc,
    1119                 :            :                                 const ScMarkData* pMarks = NULL);
    1120                 :            : 
    1121                 :            :     void            CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario = false );
    1122                 :            :     bool            TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const;
    1123                 :            :     void            MarkScenario( SCTAB nSrcTab, SCTAB nDestTab,
    1124                 :            :                                     ScMarkData& rDestMark, bool bResetMark = true,
    1125                 :            :                                     sal_uInt16 nNeededBits = 0 ) const;
    1126                 :            :     bool            HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const;
    1127                 :            :     SC_DLLPUBLIC const ScRangeList* GetScenarioRanges( SCTAB nTab ) const;
    1128                 :            : 
    1129                 :            :     SC_DLLPUBLIC void           CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc );
    1130                 :            : 
    1131                 :            :     void            UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
    1132                 :            :                                      SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
    1133                 :            :                                      SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
    1134                 :            :                                      ScDocument* pUndoDoc = NULL, bool bIncludeDraw = true,
    1135                 :            :                                      bool bUpdateNoteCaptionPos = true );
    1136                 :            : 
    1137                 :            :     SC_DLLPUBLIC void           UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc,
    1138                 :            :                                         const ScMarkData& rMark, ScDocument* pUndoDoc = NULL );
    1139                 :            : 
    1140                 :            :     void            UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
    1141                 :            : 
    1142                 :            :     SC_DLLPUBLIC void Fill(   SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
    1143                 :            :                             ScProgress* pProgress, const ScMarkData& rMark,
    1144                 :            :                             sal_uLong nFillCount, FillDir eFillDir = FILL_TO_BOTTOM,
    1145                 :            :                             FillCmd eFillCmd = FILL_LINEAR, FillDateCmd eFillDateCmd = FILL_DAY,
    1146                 :            :                             double nStepValue = 1.0, double nMaxValue = 1E307 );
    1147                 :            :     rtl::OUString          GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY );
    1148                 :            : 
    1149                 :            :     bool            GetSelectionFunction( ScSubTotalFunc eFunc,
    1150                 :            :                                             const ScAddress& rCursor, const ScMarkData& rMark,
    1151                 :            :                                             double& rResult );
    1152                 :            : 
    1153                 :            :     SC_DLLPUBLIC const SfxPoolItem*         GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
    1154                 :            :     SC_DLLPUBLIC const ScPatternAttr*   GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
    1155                 :            :     SC_DLLPUBLIC const ScPatternAttr*    GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
    1156                 :            :     const ScPatternAttr*    GetSelectionPattern( const ScMarkData& rMark, bool bDeep = true );
    1157                 :            :     ScPatternAttr*          CreateSelectionPattern( const ScMarkData& rMark, bool bDeep = true );
    1158                 :            : 
    1159                 :            :     SC_DLLPUBLIC ScConditionalFormat* GetCondFormat( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
    1160                 :            :     SC_DLLPUBLIC const SfxItemSet*  GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
    1161                 :            :     const SfxPoolItem*  GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
    1162                 :            : 
    1163                 :            :     SC_DLLPUBLIC const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator();
    1164                 :            :     bool            HasStringWeakCharacters( const rtl::OUString& rString );
    1165                 :            :     SC_DLLPUBLIC sal_uInt8          GetStringScriptType( const rtl::OUString& rString );
    1166                 :            :     SC_DLLPUBLIC sal_uInt8          GetCellScriptType( ScBaseCell* pCell, sal_uLong nNumberFormat );
    1167                 :            :     SC_DLLPUBLIC sal_uInt8          GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell = NULL );
    1168                 :            : 
    1169                 :            :     bool            HasDetectiveOperations() const;
    1170                 :            :     void            AddDetectiveOperation( const ScDetOpData& rData );
    1171                 :            :     void            ClearDetectiveOperations();
    1172                 :       4155 :     ScDetOpList*    GetDetOpList() const                { return pDetOpList; }
    1173                 :            :     void            SetDetOpList(ScDetOpList* pNew);
    1174                 :            : 
    1175                 :            :     bool            HasDetectiveObjects(SCTAB nTab) const;
    1176                 :            : 
    1177                 :            :     void            GetSelectionFrame( const ScMarkData& rMark,
    1178                 :            :                                        SvxBoxItem&      rLineOuter,
    1179                 :            :                                        SvxBoxInfoItem&  rLineInner );
    1180                 :            :     void            ApplySelectionFrame( const ScMarkData& rMark,
    1181                 :            :                                          const SvxBoxItem* pLineOuter,
    1182                 :            :                                          const SvxBoxInfoItem* pLineInner );
    1183                 :            :     void            ApplyFrameAreaTab( const ScRange& rRange,
    1184                 :            :                                          const SvxBoxItem* pLineOuter,
    1185                 :            :                                          const SvxBoxInfoItem* pLineInner );
    1186                 :            : 
    1187                 :            :     void            ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
    1188                 :            :     void            ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
    1189                 :            : 
    1190                 :            :     SC_DLLPUBLIC sal_uLong AddCondFormat( ScConditionalFormat* pNew, SCTAB nTab );
    1191                 :            :     void DeleteConditionalFormat( sal_uLong nIndex, SCTAB nTab );
    1192                 :            :     SC_DLLPUBLIC void           FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges, SCTAB nTab );
    1193                 :            :     void            ConditionalChanged( sal_uLong nKey, SCTAB nTab );
    1194                 :            : 
    1195                 :            :     void SetCondFormList( ScConditionalFormatList* pList, SCTAB nTab );
    1196                 :            : 
    1197                 :            :     SC_DLLPUBLIC sal_uLong          AddValidationEntry( const ScValidationData& rNew );
    1198                 :            : 
    1199                 :            :     SC_DLLPUBLIC const ScValidationData*    GetValidationEntry( sal_uLong nIndex ) const;
    1200                 :            : 
    1201                 :            :     SC_DLLPUBLIC ScConditionalFormatList* GetCondFormList( SCTAB nTab ) const;
    1202                 :            : 
    1203                 :          0 :     ScValidationDataList* GetValidationList() const
    1204                 :          0 :                     { return pValidationList; }
    1205                 :            : 
    1206                 :            :     SC_DLLPUBLIC void           ApplyAttr( SCCOL nCol, SCROW nRow, SCTAB nTab,
    1207                 :            :                                 const SfxPoolItem& rAttr );
    1208                 :            :     SC_DLLPUBLIC void           ApplyPattern( SCCOL nCol, SCROW nRow, SCTAB nTab,
    1209                 :            :                                     const ScPatternAttr& rAttr );
    1210                 :            :     SC_DLLPUBLIC void           ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
    1211                 :            :                                         SCCOL nEndCol, SCROW nEndRow,
    1212                 :            :                                         const ScMarkData& rMark, const ScPatternAttr& rAttr,
    1213                 :            :                                         ScEditDataArray* pDataArray = NULL );
    1214                 :            :     SC_DLLPUBLIC void           ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
    1215                 :            :                                             SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
    1216                 :            :                                             const ScPatternAttr& rAttr );
    1217                 :            : 
    1218                 :            :     SC_DLLPUBLIC bool SetAttrEntries(SCCOL nCol, SCTAB nTab, ScAttrEntry* pData, SCSIZE nSize);
    1219                 :            : 
    1220                 :            :     SC_DLLPUBLIC void           ApplyPatternIfNumberformatIncompatible(
    1221                 :            :                             const ScRange& rRange, const ScMarkData& rMark,
    1222                 :            :                             const ScPatternAttr& rPattern, short nNewType );
    1223                 :            : 
    1224                 :            :     void            ApplyStyle( SCCOL nCol, SCROW nRow, SCTAB nTab,
    1225                 :            :                                 const ScStyleSheet& rStyle);
    1226                 :            :     void            ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow,
    1227                 :            :                                     SCCOL nEndCol, SCROW nEndRow,
    1228                 :            :                                     const ScMarkData& rMark, const ScStyleSheet& rStyle);
    1229                 :            :     SC_DLLPUBLIC void           ApplyStyleAreaTab( SCCOL nStartCol, SCROW nStartRow,
    1230                 :            :                                         SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
    1231                 :            :                                         const ScStyleSheet& rStyle);
    1232                 :            : 
    1233                 :            :     void            ApplySelectionStyle( const ScStyleSheet& rStyle, const ScMarkData& rMark );
    1234                 :            :     void            ApplySelectionLineStyle( const ScMarkData& rMark,
    1235                 :            :                                             const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
    1236                 :            : 
    1237                 :            :     const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
    1238                 :            :     const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark ) const;
    1239                 :            : 
    1240                 :            :     void            StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
    1241                 :            :                                         OutputDevice* pDev,
    1242                 :            :                                         double nPPTX, double nPPTY,
    1243                 :            :                                         const Fraction& rZoomX, const Fraction& rZoomY );
    1244                 :            : 
    1245                 :            :     bool            IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const;
    1246                 :            : 
    1247                 :            :     SC_DLLPUBLIC bool           ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
    1248                 :            :                                             SCCOL nEndCol, SCROW nEndRow,
    1249                 :            :                                             SCTAB nTab, sal_Int16 nFlags );
    1250                 :            :     SC_DLLPUBLIC bool           RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
    1251                 :            :                                             SCCOL nEndCol, SCROW nEndRow,
    1252                 :            :                                             SCTAB nTab, sal_Int16 nFlags );
    1253                 :            : 
    1254                 :            :     SC_DLLPUBLIC void           SetPattern( const ScAddress&, const ScPatternAttr& rAttr,
    1255                 :            :                                     bool bPutToPool = false );
    1256                 :            :     SC_DLLPUBLIC void           SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr,
    1257                 :            :                                     bool bPutToPool = false );
    1258                 :            : 
    1259                 :            :     void            AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
    1260                 :            :                                     sal_uInt16 nFormatNo, const ScMarkData& rMark );
    1261                 :            :     void            GetAutoFormatData( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
    1262                 :            :                                         ScAutoFormatData& rData );
    1263                 :            :     bool            SearchAndReplace( const SvxSearchItem& rSearchItem,
    1264                 :            :                                       SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
    1265                 :            :                                       const ScMarkData& rMark, ScRangeList& rMatchedRanges,
    1266                 :            :                                       rtl::OUString& rUndoStr, ScDocument* pUndoDoc = NULL );
    1267                 :            : 
    1268                 :            :                     // determine Col/Row of subsequent calls
    1269                 :            :                     // (e.g. not found from the beginning, or subsequent tables)
    1270                 :            :                     // meaning of explanation in "()" was already unclear in German
    1271                 :            :     static void     GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
    1272                 :            :                         SCCOL& rCol, SCROW& rRow );
    1273                 :            : 
    1274                 :            :     bool            Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
    1275                 :            :                             SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
    1276                 :            :                             const rtl::OUString& sValStr, double& nX);
    1277                 :            : 
    1278                 :            :     SC_DLLPUBLIC void            ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark,
    1279                 :            :                                            ScEditDataArray* pDataArray = NULL );
    1280                 :            :     void            DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark );
    1281                 :            :     void            DeleteSelectionTab( SCTAB nTab, sal_uInt16 nDelFlag, const ScMarkData& rMark );
    1282                 :            : 
    1283                 :            :     SC_DLLPUBLIC void           SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
    1284                 :            :     SC_DLLPUBLIC void           SetColWidthOnly( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
    1285                 :            :     SC_DLLPUBLIC void           SetRowHeight( SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight );
    1286                 :            :     SC_DLLPUBLIC void           SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
    1287                 :            :                                             sal_uInt16 nNewHeight );
    1288                 :            : 
    1289                 :            :     SC_DLLPUBLIC void           SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
    1290                 :            :                                                   sal_uInt16 nNewHeight );
    1291                 :            :     SC_DLLPUBLIC void           SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual );
    1292                 :            : 
    1293                 :            :     SC_DLLPUBLIC sal_uInt16         GetColWidth( SCCOL nCol, SCTAB nTab ) const;
    1294                 :            :     SC_DLLPUBLIC sal_uInt16         GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
    1295                 :            :     SC_DLLPUBLIC sal_uInt16         GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const;
    1296                 :            :     SC_DLLPUBLIC sal_uLong          GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
    1297                 :            :     SCROW                       GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const;
    1298                 :            :     sal_uLong                       GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const;
    1299                 :            :     SC_DLLPUBLIC sal_uLong          GetColOffset( SCCOL nCol, SCTAB nTab ) const;
    1300                 :            :     SC_DLLPUBLIC sal_uLong          GetRowOffset( SCROW nRow, SCTAB nTab ) const;
    1301                 :            : 
    1302                 :            :     SC_DLLPUBLIC sal_uInt16         GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const;
    1303                 :            :     SC_DLLPUBLIC sal_uInt16         GetOriginalHeight( SCROW nRow, SCTAB nTab ) const;
    1304                 :            : 
    1305                 :            :     sal_uInt16          GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const;
    1306                 :            : 
    1307                 :            :     SCROW           GetHiddenRowCount( SCROW nRow, SCTAB nTab ) const;
    1308                 :            : 
    1309                 :            :     sal_uInt16          GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
    1310                 :            :                                         double nPPTX, double nPPTY,
    1311                 :            :                                         const Fraction& rZoomX, const Fraction& rZoomY,
    1312                 :            :                                         bool bFormula,
    1313                 :            :                                         const ScMarkData* pMarkData = NULL,
    1314                 :            :                                         const ScColWidthParam* pParam = NULL );
    1315                 :            :     SC_DLLPUBLIC bool           SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nExtra,
    1316                 :            :                                         OutputDevice* pDev,
    1317                 :            :                                         double nPPTX, double nPPTY,
    1318                 :            :                                         const Fraction& rZoomX, const Fraction& rZoomY,
    1319                 :            :                                         bool bShrink );
    1320                 :            :     void            UpdateAllRowHeights( OutputDevice* pDev,
    1321                 :            :                                         double nPPTX, double nPPTY,
    1322                 :            :                                         const Fraction& rZoomX, const Fraction& rZoomY,
    1323                 :            :                                         const ScMarkData* pTabMark = NULL );
    1324                 :            :     long            GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
    1325                 :            :                                     OutputDevice* pDev,
    1326                 :            :                                     double nPPTX, double nPPTY,
    1327                 :            :                                     const Fraction& rZoomX, const Fraction& rZoomY,
    1328                 :            :                                     bool bWidth, bool bTotalSize = false );
    1329                 :            : 
    1330                 :            :     SC_DLLPUBLIC void           ShowCol(SCCOL nCol, SCTAB nTab, bool bShow);
    1331                 :            :     SC_DLLPUBLIC void           ShowRow(SCROW nRow, SCTAB nTab, bool bShow);
    1332                 :            :     SC_DLLPUBLIC void           ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow);
    1333                 :            :     SC_DLLPUBLIC void           SetRowFlags( SCROW nRow, SCTAB nTab, sal_uInt8 nNewFlags );
    1334                 :            :     SC_DLLPUBLIC void           SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt8 nNewFlags );
    1335                 :            : 
    1336                 :            :     SC_DLLPUBLIC sal_uInt8          GetColFlags( SCCOL nCol, SCTAB nTab ) const;
    1337                 :            :     SC_DLLPUBLIC sal_uInt8          GetRowFlags( SCROW nRow, SCTAB nTab ) const;
    1338                 :            : 
    1339                 :            :     SC_DLLPUBLIC const ScBitMaskCompressedArray< SCROW, sal_uInt8> & GetRowFlagsArray( SCTAB nTab ) const;
    1340                 :            : 
    1341                 :            :     SC_DLLPUBLIC void           GetAllRowBreaks(::std::set<SCROW>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
    1342                 :            :     SC_DLLPUBLIC void           GetAllColBreaks(::std::set<SCCOL>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
    1343                 :            :     SC_DLLPUBLIC ScBreakType    HasRowBreak(SCROW nRow, SCTAB nTab) const;
    1344                 :            :     SC_DLLPUBLIC ScBreakType    HasColBreak(SCCOL nCol, SCTAB nTab) const;
    1345                 :            :     SC_DLLPUBLIC void           SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
    1346                 :            :     SC_DLLPUBLIC void           SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
    1347                 :            :     void                        RemoveRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
    1348                 :            :     void                        RemoveColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
    1349                 :            :     ::com::sun::star::uno::Sequence<
    1350                 :            :         ::com::sun::star::sheet::TablePageBreakData> GetRowBreakData(SCTAB nTab) const;
    1351                 :            : 
    1352                 :            :     SC_DLLPUBLIC bool           RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL);
    1353                 :            :     SC_DLLPUBLIC bool           HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
    1354                 :            :     SC_DLLPUBLIC bool           ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL);
    1355                 :            :     SC_DLLPUBLIC void           SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden);
    1356                 :            :     SC_DLLPUBLIC void           SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden);
    1357                 :            :     SC_DLLPUBLIC SCROW          FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
    1358                 :            :     SC_DLLPUBLIC SCROW          LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
    1359                 :            :     SCROW                       CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
    1360                 :            : 
    1361                 :            :     bool                        RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL);
    1362                 :            :     bool                        HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
    1363                 :            :     bool                        ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL);
    1364                 :            :     SC_DLLPUBLIC void           SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered);
    1365                 :            :     SCROW                       FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
    1366                 :            :     SCROW                       LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
    1367                 :            :     SCROW                       CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
    1368                 :            : 
    1369                 :            :     bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const;
    1370                 :            : 
    1371                 :            :     /**
    1372                 :            :      * Write all column row flags to table's flag data, because not all column
    1373                 :            :      * row attributes are stored in the flag data members.  This is necessary
    1374                 :            :      * for ods export.
    1375                 :            :      */
    1376                 :            :     void                        SyncColRowFlags();
    1377                 :            : 
    1378                 :            :                     /// @return  the index of the last row with any set flags (auto-pagebreak is ignored).
    1379                 :            :     SC_DLLPUBLIC SCROW          GetLastFlaggedRow( SCTAB nTab ) const;
    1380                 :            : 
    1381                 :            :                     /// @return  the index of the last changed column (flags and column width, auto pagebreak is ignored).
    1382                 :            :     SCCOL           GetLastChangedCol( SCTAB nTab ) const;
    1383                 :            :                     /// @return  the index of the last changed row (flags and row height, auto pagebreak is ignored).
    1384                 :            :     SCROW           GetLastChangedRow( SCTAB nTab ) const;
    1385                 :            : 
    1386                 :            :     SCCOL           GetNextDifferentChangedCol( SCTAB nTab, SCCOL nStart) const;
    1387                 :            : 
    1388                 :            :                     // if bCareManualSize is set then the row
    1389                 :            :                     // heights are compared only if the manual size flag for
    1390                 :            :                     // the row is set. If the bCareManualSize is not set then
    1391                 :            :                     // the row heights are always compared.
    1392                 :            :     SCROW           GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCareManualSize = true) const;
    1393                 :            : 
    1394                 :            :     // returns whether to export a Default style for this col/row or not
    1395                 :            :     // nDefault is setted to one possition in the current row/col where the Default style is
    1396                 :            :     bool            GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault);
    1397                 :            :     bool            GetRowDefault( SCTAB nTab, SCROW nRow, SCCOL nLastCol, SCCOL& nDefault);
    1398                 :            : 
    1399                 :            :     bool            UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow );
    1400                 :            :     bool            UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow );
    1401                 :            : 
    1402                 :            :     void            StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
    1403                 :            :     void            ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
    1404                 :            : 
    1405                 :            :     SC_DLLPUBLIC ScPatternAttr*     GetDefPattern() const;
    1406                 :            :     SC_DLLPUBLIC ScDocumentPool*        GetPool();
    1407                 :            :     SC_DLLPUBLIC ScStyleSheetPool*  GetStyleSheetPool() const;
    1408                 :            : 
    1409                 :            :     // PageStyle:
    1410                 :            :     SC_DLLPUBLIC const rtl::OUString  GetPageStyle( SCTAB nTab ) const;
    1411                 :            :     SC_DLLPUBLIC void           SetPageStyle( SCTAB nTab, const rtl::OUString& rName );
    1412                 :            :     Size            GetPageSize( SCTAB nTab ) const;
    1413                 :            :     void            SetPageSize( SCTAB nTab, const Size& rSize );
    1414                 :            :     void            SetRepeatArea( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
    1415                 :            :     void            InvalidatePageBreaks(SCTAB nTab);
    1416                 :            :     void            UpdatePageBreaks( SCTAB nTab, const ScRange* pUserArea = NULL );
    1417                 :            :     void            RemoveManualBreaks( SCTAB nTab );
    1418                 :            :     bool            HasManualBreaks( SCTAB nTab ) const;
    1419                 :            : 
    1420                 :            :     bool            IsPageStyleInUse( const rtl::OUString& rStrPageStyle, SCTAB* pInTab = NULL );
    1421                 :            :     bool            RemovePageStyleInUse( const rtl::OUString& rStrPageStyle );
    1422                 :            :     bool            RenamePageStyleInUse( const rtl::OUString& rOld, const rtl::OUString& rNew );
    1423                 :            :     void            ModifyStyleSheet( SfxStyleSheetBase& rPageStyle,
    1424                 :            :                                       const SfxItemSet&  rChanges );
    1425                 :            : 
    1426                 :            :     void            PageStyleModified( SCTAB nTab, const rtl::OUString& rNewName );
    1427                 :            : 
    1428                 :            :     SC_DLLPUBLIC bool           NeedPageResetAfterTab( SCTAB nTab ) const;
    1429                 :            : 
    1430                 :            :     // Was stored in PageStyle previously. Now it exists for every table:
    1431                 :            :     SC_DLLPUBLIC bool           HasPrintRange();
    1432                 :            :     SC_DLLPUBLIC sal_uInt16         GetPrintRangeCount( SCTAB nTab );
    1433                 :            :     SC_DLLPUBLIC const ScRange* GetPrintRange( SCTAB nTab, sal_uInt16 nPos );
    1434                 :            :     SC_DLLPUBLIC const ScRange* GetRepeatColRange( SCTAB nTab );
    1435                 :            :     SC_DLLPUBLIC const ScRange* GetRepeatRowRange( SCTAB nTab );
    1436                 :            :     /** Returns true, if the specified sheet is always printed. */
    1437                 :            :     bool            IsPrintEntireSheet( SCTAB nTab ) const;
    1438                 :            : 
    1439                 :            :     /** Removes all print ranges. */
    1440                 :            :     SC_DLLPUBLIC void            ClearPrintRanges( SCTAB nTab );
    1441                 :            :     /** Adds a new print ranges. */
    1442                 :            :     SC_DLLPUBLIC void            AddPrintRange( SCTAB nTab, const ScRange& rNew );
    1443                 :            :     /** Marks the specified sheet to be printed completely. Deletes old print ranges on the sheet! */
    1444                 :            :     SC_DLLPUBLIC void            SetPrintEntireSheet( SCTAB nTab );
    1445                 :            :     SC_DLLPUBLIC void           SetRepeatColRange( SCTAB nTab, const ScRange* pNew );
    1446                 :            :     SC_DLLPUBLIC void           SetRepeatRowRange( SCTAB nTab, const ScRange* pNew );
    1447                 :            :     ScPrintRangeSaver* CreatePrintRangeSaver() const;
    1448                 :            :     void            RestorePrintRanges( const ScPrintRangeSaver& rSaver );
    1449                 :            : 
    1450                 :            :     SC_DLLPUBLIC Rectangle      GetMMRect( SCCOL nStartCol, SCROW nStartRow,
    1451                 :            :                                            SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const;
    1452                 :            :     SC_DLLPUBLIC ScRange            GetRange( SCTAB nTab, const Rectangle& rMMRect ) const;
    1453                 :            : 
    1454                 :            :     void            UpdStlShtPtrsFrmNms();
    1455                 :            :     void            StylesToNames();
    1456                 :            : 
    1457                 :            :     SC_DLLPUBLIC void           CopyStdStylesFrom( ScDocument* pSrcDoc );
    1458                 :            : 
    1459                 :            :     CharSet         GetSrcCharSet() const   { return eSrcSet; }
    1460                 :       1773 :     sal_uLong           GetSrcVersion() const   { return nSrcVer; }
    1461                 :            :     SCROW           GetSrcMaxRow() const    { return nSrcMaxRow; }
    1462                 :            : 
    1463                 :         55 :     void            SetSrcCharSet( CharSet eNew )   { eSrcSet = eNew; }
    1464                 :            :     void            UpdateFontCharSet();
    1465                 :            : 
    1466                 :            :     void            FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
    1467                 :            :                         SCTAB nTab, double nScaleX, double nScaleY,
    1468                 :            :                         bool bPageMode, bool bFormulaMode,
    1469                 :            :                         const ScMarkData* pMarkData = NULL );
    1470                 :            : 
    1471                 :            :     SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const;
    1472                 :            : 
    1473                 :            :     void            Sort( SCTAB nTab, const ScSortParam& rSortParam, bool bKeepQuery );
    1474                 :            :     SCSIZE          Query( SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub );
    1475                 :            :     SC_DLLPUBLIC bool           CreateQueryParam( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
    1476                 :            :                                         SCTAB nTab, ScQueryParam& rQueryParam );
    1477                 :            :     void            GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, rtl::OUString& rStr);
    1478                 :            : 
    1479                 :            :     /**
    1480                 :            :      * Get a list of unique strings to use in filtering criteria.  The string
    1481                 :            :      * values are sorted, and there are no duplicate values in the list.  The
    1482                 :            :      * data range to use to populate the filter entries is inferred from the
    1483                 :            :      * database range that contains the specified cell position.
    1484                 :            :      */
    1485                 :            :     bool GetFilterEntries(
    1486                 :            :         SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, std::vector<ScTypedStrData>& rStrings, bool& rHasDates);
    1487                 :            : 
    1488                 :            :     SC_DLLPUBLIC bool GetFilterEntriesArea(
    1489                 :            :         SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bCaseSens,
    1490                 :            :         std::vector<ScTypedStrData>& rStrings, bool& rHasDates);
    1491                 :            : 
    1492                 :            :     bool GetDataEntries(
    1493                 :            :         SCCOL nCol, SCROW nRow, SCTAB nTab, bool bCaseSens,
    1494                 :            :         std::vector<ScTypedStrData>& rStrings, bool bLimit = false );
    1495                 :            :     bool GetFormulaEntries( ScTypedCaseStrSet& rStrings );
    1496                 :            : 
    1497                 :            :     bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab );
    1498                 :            : 
    1499                 :            :     SC_DLLPUBLIC bool           HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
    1500                 :            :                                     SCTAB nTab );
    1501                 :            :     SC_DLLPUBLIC bool           HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
    1502                 :            :                                     SCTAB nTab );
    1503                 :            : 
    1504                 :            :     SfxPrinter*     GetPrinter( bool bCreateIfNotExist = true );
    1505                 :            :     void            SetPrinter( SfxPrinter* pNewPrinter );
    1506                 :            :     VirtualDevice*  GetVirtualDevice_100th_mm();
    1507                 :            :     SC_DLLPUBLIC OutputDevice*  GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
    1508                 :            : 
    1509                 :            :     bool            GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab,
    1510                 :            :                                         bool bInSel, const ScMarkData& rMark) const;
    1511                 :            : 
    1512                 :            :     bool            ReplaceStyle(const SvxSearchItem& rSearchItem,
    1513                 :            :                                  SCCOL nCol, SCROW nRow, SCTAB nTab,
    1514                 :            :                                  ScMarkData& rMark, bool bIsUndo);
    1515                 :            : 
    1516                 :            :     void            DoColResize( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd );
    1517                 :            : 
    1518                 :            :     void            InvalidateTextWidth( const rtl::OUString& rStyleName );
    1519                 :            :     void            InvalidateTextWidth( SCTAB nTab );
    1520                 :            :     void            InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, bool bNumFormatChanged );
    1521                 :            : 
    1522                 :            :     bool            IdleCalcTextWidth();
    1523                 :            :     bool            IdleCheckLinks();
    1524                 :            : 
    1525                 :            :     bool            ContinueOnlineSpelling();   // TRUE = found s.th.
    1526                 :            : 
    1527                 :            :     void            RepaintRange( const ScRange& rRange );
    1528                 :            : 
    1529                 :      20878 :     bool        IsIdleDisabled() const      { return bIdleDisabled; }
    1530                 :      41984 :     void            DisableIdle(bool bDo)   { bIdleDisabled = bDo; }
    1531                 :            : 
    1532                 :         18 :     bool            IsDetectiveDirty() const     { return bDetectiveDirty; }
    1533                 :       8446 :     void            SetDetectiveDirty(bool bSet) { bDetectiveDirty = bSet; }
    1534                 :            : 
    1535                 :            :     void            RemoveAutoSpellObj();
    1536                 :            :     void            SetOnlineSpellPos( const ScAddress& rPos );
    1537                 :            :     SC_DLLPUBLIC bool           SetVisibleSpellRange( const ScRange& rRange );  // true = changed
    1538                 :            : 
    1539                 :            :     sal_uInt8           GetMacroCallMode() const     { return nMacroCallMode; }
    1540                 :            :     void            SetMacroCallMode(sal_uInt8 nNew)     { nMacroCallMode = nNew; }
    1541                 :            : 
    1542                 :       1067 :     bool            GetHasMacroFunc() const      { return bHasMacroFunc; }
    1543                 :          0 :     void            SetHasMacroFunc(bool bSet)   { bHasMacroFunc = bSet; }
    1544                 :            : 
    1545                 :            :     bool            CheckMacroWarn();
    1546                 :            : 
    1547                 :        372 :     void            SetRangeOverflowType(sal_uInt32 nType)  { nRangeOverflowType = nType; }
    1548                 :        372 :     bool        HasRangeOverflow() const                { return nRangeOverflowType != 0; }
    1549                 :          0 :     SC_DLLPUBLIC sal_uInt32      GetRangeOverflowType() const            { return nRangeOverflowType; }
    1550                 :            : 
    1551                 :            :     // for broadcasting/listening
    1552                 :            :     void            SetNoSetDirty( bool bVal ) { bNoSetDirty = bVal; }
    1553                 :            :     bool            GetNoSetDirty() const { return bNoSetDirty; }
    1554                 :       4610 :     void            SetInsertingFromOtherDoc( bool bVal ) { bInsertingFromOtherDoc = bVal; }
    1555                 :      52589 :     bool            IsInsertingFromOtherDoc() const { return bInsertingFromOtherDoc; }
    1556                 :            :     void            SetLoadingMedium( bool bVal );
    1557                 :            :     void            SetImportingXML( bool bVal );
    1558                 :      29647 :     bool            IsImportingXML() const { return bImportingXML; }
    1559                 :            :     void            SetXMLFromWrapper( bool bVal );
    1560                 :        378 :     bool            IsXMLFromWrapper() const { return bXMLFromWrapper; }
    1561                 :            :     void            SetCalcingAfterLoad( bool bVal ) { bCalcingAfterLoad = bVal; }
    1562                 :      28651 :     bool            IsCalcingAfterLoad() const { return bCalcingAfterLoad; }
    1563                 :         64 :     void            SetNoListening( bool bVal ) { bNoListening = bVal; }
    1564                 :       3909 :     bool            GetNoListening() const { return bNoListening; }
    1565                 :       1259 :     ScBroadcastAreaSlotMachine* GetBASM() const { return pBASM; }
    1566                 :            : 
    1567                 :            :     SC_DLLPUBLIC ScChartListenerCollection* GetChartListenerCollection() const;
    1568                 :            :     void            SetChartListenerCollection( ScChartListenerCollection*,
    1569                 :            :                         bool bSetChartRangeLists = false );
    1570                 :            :     void            UpdateChart( const rtl::OUString& rName );
    1571                 :            :     void            RestoreChartListener( const rtl::OUString& rName );
    1572                 :            :     SC_DLLPUBLIC void           UpdateChartListenerCollection();
    1573                 :       4226 :     bool            IsChartListenerCollectionNeedsUpdate() const
    1574                 :       4226 :                         { return bChartListenerCollectionNeedsUpdate; }
    1575                 :      69676 :     void            SetChartListenerCollectionNeedsUpdate( bool bFlg )
    1576                 :      69676 :                         { bChartListenerCollectionNeedsUpdate = bFlg; }
    1577                 :            :     void            AddOLEObjectToCollection(const rtl::OUString& rName);
    1578                 :            : 
    1579                 :          4 :     ScChangeViewSettings* GetChangeViewSettings() const     { return pChangeViewSettings; }
    1580                 :            :     SC_DLLPUBLIC void               SetChangeViewSettings(const ScChangeViewSettings& rNew);
    1581                 :            : 
    1582                 :            :     rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharacters();
    1583                 :            :     void            SetForbiddenCharacters( const rtl::Reference<SvxForbiddenCharactersTable> xNew );
    1584                 :            : 
    1585                 :            :     sal_uInt8           GetAsianCompression() const;        // CharacterCompressionType values
    1586                 :            :     bool            IsValidAsianCompression() const;
    1587                 :            :     void            SetAsianCompression(sal_uInt8 nNew);
    1588                 :            : 
    1589                 :            :     bool            GetAsianKerning() const;
    1590                 :            :     bool            IsValidAsianKerning() const;
    1591                 :            :     void            SetAsianKerning(bool bNew);
    1592                 :            :     void            ApplyAsianEditSettings(ScEditEngineDefaulter& rEngine);
    1593                 :            : 
    1594                 :            :     sal_uInt8           GetEditTextDirection(SCTAB nTab) const; // EEHorizontalTextDirection values
    1595                 :            : 
    1596                 :          9 :     SC_DLLPUBLIC ScLkUpdMode        GetLinkMode() const             { return eLinkMode ;}
    1597                 :         95 :     void            SetLinkMode( ScLkUpdMode nSet ) {   eLinkMode  = nSet;}
    1598                 :            : 
    1599                 :            :     SC_DLLPUBLIC ScMacroManager* GetMacroManager();
    1600                 :            : 
    1601                 :            : private:
    1602                 :            :     ScDocument(const ScDocument& r); // disabled with no definition
    1603                 :            : 
    1604                 :            :     void                FindMaxRotCol( SCTAB nTab, RowInfo* pRowInfo, SCSIZE nArrCount,
    1605                 :            :                                         SCCOL nX1, SCCOL nX2 ) const;
    1606                 :            : 
    1607                 :            :     sal_uInt16              RowDifferences( SCROW nThisRow, SCTAB nThisTab,
    1608                 :            :                                         ScDocument& rOtherDoc,
    1609                 :            :                                         SCROW nOtherRow, SCTAB nOtherTab,
    1610                 :            :                                         SCCOL nMaxCol, SCCOLROW* pOtherCols );
    1611                 :            :     sal_uInt16              ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
    1612                 :            :                                         ScDocument& rOtherDoc,
    1613                 :            :                                         SCCOL nOtherCol, SCTAB nOtherTab,
    1614                 :            :                                         SCROW nMaxRow, SCCOLROW* pOtherRows );
    1615                 :            :     void                FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow,
    1616                 :            :                                         bool bColumns,
    1617                 :            :                                         ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab,
    1618                 :            :                                         SCCOLROW nEndCol, SCCOLROW* pTranslate,
    1619                 :            :                                         ScProgress* pProgress, sal_uLong nProAdd );
    1620                 :            :     bool                OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpellPos,
    1621                 :            :                                         sal_uInt16 nMaxTest );
    1622                 :            : 
    1623                 :            :     DECL_LINK(TrackTimeHdl, void *);
    1624                 :            : 
    1625                 :            :     static ScRecursionHelper*   CreateRecursionHelperInstance();
    1626                 :            : 
    1627                 :            : public:
    1628                 :            :     void                StartListeningArea( const ScRange& rRange,
    1629                 :            :                                             SvtListener* pListener );
    1630                 :            :     void                EndListeningArea( const ScRange& rRange,
    1631                 :            :                                             SvtListener* pListener );
    1632                 :            :                         /** Broadcast wrapper, calls
    1633                 :            :     SC_DLLPUBLIC                         rHint.GetCell()->Broadcast() and AreaBroadcast()
    1634                 :            :                             and TrackFormulas() and conditional format list
    1635                 :            :                             SourceChanged().
    1636                 :            :                             Preferred.
    1637                 :            :                          */
    1638                 :            :     void                Broadcast( const ScHint& rHint );
    1639                 :            :                         /// deprecated
    1640                 :            :     void                Broadcast( sal_uLong nHint, const ScAddress& rAddr,
    1641                 :            :                                     ScBaseCell* pCell );
    1642                 :            :                         /// only area, no cell broadcast
    1643                 :            :     void                AreaBroadcast( const ScHint& rHint );
    1644                 :            :                         /// only areas in range, no cell broadcasts
    1645                 :            :     void                AreaBroadcastInRange( const ScRange& rRange,
    1646                 :            :                                               const ScHint& rHint );
    1647                 :            :     void                DelBroadcastAreasInRange( const ScRange& rRange );
    1648                 :            :     void                UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
    1649                 :            :                                             const ScRange& rRange,
    1650                 :            :                                             SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
    1651                 :            : 
    1652                 :            : 
    1653                 :            :     void                StartListeningCell( const ScAddress& rAddress,
    1654                 :            :                                             SvtListener* pListener );
    1655                 :            :     void                EndListeningCell( const ScAddress& rAddress,
    1656                 :            :                                             SvtListener* pListener );
    1657                 :            :     void                PutInFormulaTree( ScFormulaCell* pCell );
    1658                 :            :     void                RemoveFromFormulaTree( ScFormulaCell* pCell );
    1659                 :            :     void                CalcFormulaTree( bool bOnlyForced = false,
    1660                 :            :                                         bool bNoProgressBar = false );
    1661                 :            :     void                ClearFormulaTree();
    1662                 :            :     void                AppendToFormulaTrack( ScFormulaCell* pCell );
    1663                 :            :     void                RemoveFromFormulaTrack( ScFormulaCell* pCell );
    1664                 :            :     void                TrackFormulas( sal_uLong nHintId = SC_HINT_DATACHANGED );
    1665                 :            :     sal_uInt16              GetFormulaTrackCount() const { return nFormulaTrackCount; }
    1666                 :            :     bool                IsInFormulaTree( ScFormulaCell* pCell ) const;
    1667                 :            :     bool                IsInFormulaTrack( ScFormulaCell* pCell ) const;
    1668                 :      20115 :     bool                GetHardRecalcState() { return bHardRecalcState; }
    1669                 :        188 :     void                SetHardRecalcState( bool bVal ) { bHardRecalcState = bVal; }
    1670                 :            :     void                StartAllListeners();
    1671                 :            :     const ScFormulaCell*    GetFormulaTree() const { return pFormulaTree; }
    1672                 :            :     bool                HasForcedFormulas() const { return bHasForcedFormulas; }
    1673                 :          0 :     void                SetForcedFormulas( bool bVal ) { bHasForcedFormulas = bVal; }
    1674                 :       2701 :     sal_uLong               GetFormulaCodeInTree() const { return nFormulaCodeInTree; }
    1675                 :       3493 :     bool                IsInInterpreter() const { return nInterpretLevel != 0; }
    1676                 :            :     sal_uInt16              GetInterpretLevel() { return nInterpretLevel; }
    1677                 :       2619 :     void                IncInterpretLevel()
    1678                 :            :                             {
    1679         [ +  - ]:       2619 :                                 if ( nInterpretLevel < USHRT_MAX )
    1680                 :       2619 :                                     nInterpretLevel++;
    1681                 :       2619 :                             }
    1682                 :       2619 :     void                DecInterpretLevel()
    1683                 :            :                             {
    1684         [ +  - ]:       2619 :                                 if ( nInterpretLevel )
    1685                 :       2619 :                                     nInterpretLevel--;
    1686                 :       2619 :                             }
    1687                 :            :     bool                IsInMacroInterpreter() const { return nMacroInterpretLevel != 0; }
    1688                 :          0 :     sal_uInt16              GetMacroInterpretLevel() { return nMacroInterpretLevel; }
    1689                 :        103 :     void                IncMacroInterpretLevel()
    1690                 :            :                             {
    1691         [ +  - ]:        103 :                                 if ( nMacroInterpretLevel < USHRT_MAX )
    1692                 :        103 :                                     nMacroInterpretLevel++;
    1693                 :        103 :                             }
    1694                 :        103 :     void                DecMacroInterpretLevel()
    1695                 :            :                             {
    1696         [ +  - ]:        103 :                                 if ( nMacroInterpretLevel )
    1697                 :        103 :                                     nMacroInterpretLevel--;
    1698                 :        103 :                             }
    1699                 :          0 :     bool                IsInInterpreterTableOp() const { return nInterpreterTableOpLevel != 0; }
    1700                 :            :     sal_uInt16              GetInterpreterTableOpLevel() { return nInterpreterTableOpLevel; }
    1701                 :         89 :     void                IncInterpreterTableOpLevel()
    1702                 :            :                             {
    1703         [ +  - ]:         89 :                                 if ( nInterpreterTableOpLevel < USHRT_MAX )
    1704                 :         89 :                                     nInterpreterTableOpLevel++;
    1705                 :         89 :                             }
    1706                 :         89 :     void                DecInterpreterTableOpLevel()
    1707                 :            :                             {
    1708         [ +  - ]:         89 :                                 if ( nInterpreterTableOpLevel )
    1709                 :         89 :                                     nInterpreterTableOpLevel--;
    1710                 :         89 :                             }
    1711                 :            :                         // add a formula to be remembered for TableOp broadcasts
    1712                 :            :     void                AddTableOpFormulaCell( ScFormulaCell* );
    1713                 :       3985 :     void                InvalidateLastTableOpParams() { aLastTableOpParams.bValid = false; }
    1714                 :      15923 :     ScRecursionHelper&  GetRecursionHelper()
    1715                 :            :                             {
    1716         [ +  + ]:      15923 :                                 if (!pRecursionHelper)
    1717                 :        142 :                                     pRecursionHelper = CreateRecursionHelperInstance();
    1718                 :      15923 :                                 return *pRecursionHelper;
    1719                 :            :                             }
    1720                 :      11992 :     bool                IsInDtorClear() const { return bInDtorClear; }
    1721                 :        409 :     void                SetExpandRefs( bool bVal ) { bExpandRefs = bVal; }
    1722                 :       3321 :     bool                IsExpandRefs() { return bExpandRefs; }
    1723                 :            : 
    1724                 :            :     SC_DLLPUBLIC void               IncSizeRecalcLevel( SCTAB nTab );
    1725                 :            :     SC_DLLPUBLIC void               DecSizeRecalcLevel( SCTAB nTab, bool bUpdateNoteCaptionPos = true );
    1726                 :            : 
    1727                 :       1160 :     sal_uLong               GetXMLImportedFormulaCount() const { return nXMLImportedFormulaCount; }
    1728                 :       1067 :     void                IncXMLImportedFormulaCount( sal_uLong nVal )
    1729                 :            :                             {
    1730         [ +  - ]:       1067 :                                 if ( nXMLImportedFormulaCount + nVal > nXMLImportedFormulaCount )
    1731                 :       1067 :                                     nXMLImportedFormulaCount += nVal;
    1732                 :       1067 :                             }
    1733                 :       1067 :     void                DecXMLImportedFormulaCount( sal_uLong nVal )
    1734                 :            :                             {
    1735         [ +  - ]:       1067 :                                 if ( nVal <= nXMLImportedFormulaCount )
    1736                 :       1067 :                                     nXMLImportedFormulaCount -= nVal;
    1737                 :            :                                 else
    1738                 :          0 :                                     nXMLImportedFormulaCount = 0;
    1739                 :       1067 :                             }
    1740                 :            : 
    1741                 :            :     void                StartTrackTimer();
    1742                 :            : 
    1743                 :            :     void            CompileDBFormula();
    1744                 :            :     void            CompileDBFormula( bool bCreateFormulaString );
    1745                 :            :     void            CompileNameFormula( bool bCreateFormulaString );
    1746                 :            :     void            CompileColRowNameFormula();
    1747                 :            : 
    1748                 :            :     /** Maximum string length of a column, e.g. for dBase export.
    1749                 :            :         @return String length in octets (!) of the destination encoding. In
    1750                 :            :                 case of non-octet encodings (e.g. UCS2) the length in code
    1751                 :            :                 points times sizeof(sal_Unicode) is returned. */
    1752                 :            :     sal_Int32       GetMaxStringLen( SCTAB nTab, SCCOL nCol,
    1753                 :            :                                      SCROW nRowStart, SCROW nRowEnd,
    1754                 :            :                                      CharSet eCharSet ) const;
    1755                 :            :     /** Maximum string length of numerical cells of a column, e.g. for dBase export.
    1756                 :            :         @return String length in characters (!) including the decimal
    1757                 :            :                 separator, and the decimal precision needed. */
    1758                 :            :     xub_StrLen      GetMaxNumberStringLen( sal_uInt16& nPrecision,
    1759                 :            :                                            SCTAB nTab, SCCOL nCol,
    1760                 :            :                                            SCROW nRowStart, SCROW nRowEnd ) const;
    1761                 :            : 
    1762                 :            :     void    KeyInput( const KeyEvent& rKEvt );      // TimerDelays etc.
    1763                 :            : 
    1764                 :       5351 :     ScChangeTrack*      GetChangeTrack() const { return pChangeTrack; }
    1765                 :            : 
    1766                 :            :     //! only for import filter, deletes any existing ChangeTrack via
    1767                 :            :     //! EndChangeTracking() and takes ownership of new ChangeTrack pTrack
    1768                 :            :     SC_DLLPUBLIC void           SetChangeTrack( ScChangeTrack* pTrack );
    1769                 :            : 
    1770                 :            :     void            StartChangeTracking();
    1771                 :            :     void            EndChangeTracking();
    1772                 :            : 
    1773                 :            :     SC_DLLPUBLIC void           CompareDocument( ScDocument& rOtherDoc );
    1774                 :            : 
    1775                 :            :     void            AddUnoObject( SfxListener& rObject );
    1776                 :            :     void            RemoveUnoObject( SfxListener& rObject );
    1777                 :            :     void            BroadcastUno( const SfxHint &rHint );
    1778                 :            :     void            AddUnoListenerCall( const ::com::sun::star::uno::Reference<
    1779                 :            :                                             ::com::sun::star::util::XModifyListener >& rListener,
    1780                 :            :                                         const ::com::sun::star::lang::EventObject& rEvent );
    1781                 :            : 
    1782                 :            :     void            SetInLinkUpdate(bool bSet);             // TableLink or AreaLink
    1783                 :            :     bool            IsInLinkUpdate() const;                 // including DdeLink
    1784                 :            : 
    1785                 :            :     SC_DLLPUBLIC SfxItemPool*       GetEditPool() const;
    1786                 :            :     SC_DLLPUBLIC SfxItemPool*       GetEnginePool() const;
    1787                 :            :     SC_DLLPUBLIC ScFieldEditEngine& GetEditEngine();
    1788                 :            :     SC_DLLPUBLIC ScNoteEditEngine&  GetNoteEngine();
    1789                 :            : 
    1790                 :            :     ScRefreshTimerControl*  GetRefreshTimerControl() const
    1791                 :            :         { return pRefreshTimerControl; }
    1792                 :      16381 :     ScRefreshTimerControl * const * GetRefreshTimerControlAddress() const
    1793                 :      16381 :         { return &pRefreshTimerControl; }
    1794                 :            : 
    1795                 :          0 :     void            SetPastingDrawFromOtherDoc( bool bVal )
    1796                 :          0 :                         { bPastingDrawFromOtherDoc = bVal; }
    1797                 :          0 :     bool            PastingDrawFromOtherDoc() const
    1798                 :          0 :                         { return bPastingDrawFromOtherDoc; }
    1799                 :            : 
    1800                 :            :                     /// an ID unique to each document instance
    1801                 :            :     sal_uInt32      GetDocumentID() const;
    1802                 :            : 
    1803                 :       3985 :     void            InvalidateStyleSheetUsage()
    1804                 :       3985 :                         { bStyleSheetUsageInvalid = true; }
    1805                 :            :     void GetSortParam( ScSortParam& rParam, SCTAB nTab );
    1806                 :            :     void SetSortParam( ScSortParam& rParam, SCTAB nTab );
    1807                 :            : 
    1808                 :         10 :     inline void     SetVbaEventProcessor( const com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor >& rxVbaEvents )
    1809                 :         10 :                         { mxVbaEvents = rxVbaEvents; }
    1810                 :            :     inline com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor >
    1811                 :      53437 :                     GetVbaEventProcessor() const { return mxVbaEvents; }
    1812                 :            : 
    1813                 :            :     /** Should only be GRAM_PODF or GRAM_ODFF. */
    1814                 :            :     void                SetStorageGrammar( formula::FormulaGrammar::Grammar eGrammar );
    1815                 :        284 :     formula::FormulaGrammar::Grammar  GetStorageGrammar() const
    1816                 :        284 :                             { return eStorageGrammar; }
    1817                 :            : 
    1818                 :            :     SfxUndoManager*     GetUndoManager();
    1819                 :            :     bool IsInVBAMode() const;
    1820                 :            :     ScRowBreakIterator* GetRowBreakIterator(SCTAB nTab) const;
    1821                 :            : 
    1822                 :            :     void AddSubTotalCell(ScFormulaCell* pCell);
    1823                 :            :     void RemoveSubTotalCell(ScFormulaCell* pCell);
    1824                 :            :     void SetSubTotalCellsDirty(const ScRange& rDirtyRange);
    1825                 :            : 
    1826                 :            : private: // CLOOK-Impl-methods
    1827                 :            : 
    1828                 :            :     /**
    1829                 :            :      * Use this class as a locale variable to merge number formatter from
    1830                 :            :      * another document, and set NULL pointer to pFormatExchangeList when
    1831                 :            :      * done.
    1832                 :            :      */
    1833                 :            :     class NumFmtMergeHandler
    1834                 :            :     {
    1835                 :            :     public:
    1836                 :            :         explicit NumFmtMergeHandler(ScDocument* pDoc, ScDocument* pSrcDoc);
    1837                 :            :         ~NumFmtMergeHandler();
    1838                 :            : 
    1839                 :            :     private:
    1840                 :            :         ScDocument* mpDoc;
    1841                 :            :     };
    1842                 :            : 
    1843                 :            :     void    MergeNumberFormatter(ScDocument* pSrcDoc);
    1844                 :            : 
    1845                 :            :     void    ImplCreateOptions(); // Suggestion: switch to on-demand?
    1846                 :            :     void    ImplDeleteOptions();
    1847                 :            : 
    1848                 :            :     void    DeleteDrawLayer();
    1849                 :            :     SC_DLLPUBLIC bool   DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const;
    1850                 :            :     void    DrawMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos );
    1851                 :            :     void    DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos );
    1852                 :            : 
    1853                 :            :     void    UpdateDrawPrinter();
    1854                 :            :     void    UpdateDrawLanguages();
    1855                 :            :     void    UpdateDrawDefaults();
    1856                 :            :     SC_DLLPUBLIC void   InitClipPtrs( ScDocument* pSourceDoc );
    1857                 :            : 
    1858                 :            :     void    LoadDdeLinks(SvStream& rStream);
    1859                 :            :     void    SaveDdeLinks(SvStream& rStream) const;
    1860                 :            : 
    1861                 :            :     void    DeleteAreaLinksOnTab( SCTAB nTab );
    1862                 :            :     void    UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
    1863                 :            :                              const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
    1864                 :            : 
    1865                 :            :     void    CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks, bool bAllTabs);
    1866                 :            :     void    CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, SCTAB nTab);
    1867                 :            : 
    1868                 :            :     bool    HasPartOfMerged( const ScRange& rRange );
    1869                 :            : 
    1870                 :            :     std::map< SCTAB, ScSortParam > mSheetSortParams;
    1871                 :            : 
    1872                 :            : };
    1873                 :          0 : inline void ScDocument::GetSortParam( ScSortParam& rParam, SCTAB nTab )
    1874                 :            : {
    1875                 :          0 :     rParam = mSheetSortParams[ nTab ];
    1876                 :          0 : }
    1877                 :            : 
    1878                 :          0 : inline void ScDocument::SetSortParam( ScSortParam& rParam, SCTAB nTab )
    1879                 :            : {
    1880                 :          0 :     mSheetSortParams[ nTab ] = rParam;
    1881                 :          0 : }
    1882                 :            : 
    1883                 :            : #endif
    1884                 :            : 
    1885                 :            : 
    1886                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10