Files
libreoffice/sc/source/core/data/documen2.cxx

1158 lines
38 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 23:16:46 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 23:16:46 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 23:16:46 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 23:16:46 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 23:16:46 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 23:16:46 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 23:16:46 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 23:16:46 +00:00
*
************************************************************************/
#include "scitems.hxx"
#include <editeng/eeitem.hxx>
2000-09-18 23:16:46 +00:00
#include <editeng/editeng.hxx>
#include <editeng/forbiddencharacterstable.hxx>
#include <svx/xtable.hxx>
2010-01-13 22:25:07 +01:00
#include <sfx2/linkmgr.hxx>
#include <svx/svdpool.hxx>
#include <svx/svdobj.hxx>
2000-09-18 23:16:46 +00:00
#include <sfx2/bindings.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/docfile.hxx>
2000-09-18 23:16:46 +00:00
#include <sfx2/printer.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <vcl/virdev.hxx>
2000-10-20 08:15:16 +00:00
#include <comphelper/processfactory.hxx>
#include <svl/PasswordHelper.hxx>
#include <tools/tenccvt.hxx>
#include <tools/urlobj.hxx>
#include <rtl/crc.h>
#include <basic/basmgr.hxx>
2000-09-18 23:16:46 +00:00
#include "document.hxx"
#include "table.hxx"
#include "attrib.hxx"
#include "patattr.hxx"
#include "rangenam.hxx"
#include "dbdata.hxx"
2000-09-18 23:16:46 +00:00
#include "pivot.hxx"
#include "docpool.hxx"
#include "stlpool.hxx"
#include "stlsheet.hxx"
#include "globstr.hrc"
#include "chartarr.hxx"
#include "chartlock.hxx"
2000-09-18 23:16:46 +00:00
#include "rechead.hxx"
#include "global.hxx"
#include "brdcst.hxx"
#include "bcaslot.hxx"
#include "adiasync.hxx"
#include "addinlis.hxx"
#include "chartlis.hxx"
#include "markdata.hxx"
#include "conditio.hxx"
#include "colorscale.hxx"
2000-09-18 23:16:46 +00:00
#include "validat.hxx"
#include "progress.hxx"
#include "detdata.hxx"
#include "sc.hrc" // FID_DATACHANGED
#include "ddelink.hxx"
#include "chgtrack.hxx"
#include "chgviset.hxx"
#include "editutil.hxx"
#include "hints.hxx"
#include "dpobject.hxx"
2000-11-26 14:24:00 +00:00
#include "scrdata.hxx"
#include "poolhelp.hxx"
#include "unoreflist.hxx"
#include "listenercalls.hxx"
#include "recursionhelper.hxx"
#include "lookupcache.hxx"
CWS-TOOLING: integrate CWS mooxlsc 2008-12-12 09:32:19 +0100 dr r265390 : #i10000# warning 2008-12-11 14:54:26 +0100 dr r265301 : add strings from dr66 to meet ui freeze 2008-12-11 14:53:20 +0100 dr r265300 : add strings from dr66 to meet ui freeze 2008-12-08 14:43:25 +0100 er r264997 : DBG_... need semicolon 2008-12-04 19:16:50 +0100 er r264872 : DBG_... needs semicolon 2008-12-04 11:09:27 +0100 er r264824 : DBG_ERROR needs semicolon 2008-12-03 13:29:46 +0100 er r264770 : CWS-TOOLING: rebase CWS mooxlsc to trunk@264325 (milestone: DEV300:m36) 2008-12-02 16:49:09 +0100 er r264722 : disable code for named references #i4385# import as long as #i3740# isn't fully implemented 2008-12-02 16:45:04 +0100 er r264721 : some compilers attempt to be too smart; persuade them it's really meant what was written 2008-12-02 16:04:56 +0100 er r264715 : #i3740# no storage in ODF for external name references 2008-11-29 02:20:50 +0100 er r264575 : some huge performance improvement when reading repeated empty rows for the external references cache from ODF, as they often occur in the sparse matrix 2008-11-29 01:14:55 +0100 er r264574 : WriteExternalRefCaches: for table:number-columns-repeated write used columns instead of MAXCOLCOUNT 2008-11-28 18:30:04 +0100 er r264570 : #i3740# write/read external name references as bracketed references, as proposed on the ODFF list 2008-11-27 20:36:54 +0100 er r264521 : merge i95068 from cws calc46 for code correctness 2008-11-21 20:39:34 +0100 kohei r264174 : fixed a crash when importing a BIFF8 document with per-sheet external names. For now, we don't support per-sheet external names. Let's throw in NoName error until they are supported. 2008-11-21 18:47:27 +0100 kohei r264168 : I forgot to process cached range references in the EXTERNNAME record, which prevented cached external names with range references from being imported correctly. P.S. I swear I thought I had covered this.... 2008-11-20 23:07:22 +0100 er r264104 : #i4385# parse external defined names in MOOXML import 2008-11-14 23:18:54 +0100 er r263700 : #i92797# parse external sheet references under aspects of MOOXML import and new ScExternalRefManager 2008-11-14 18:49:48 +0100 er r263696 : remove infinity assertion, leftover from binary file format; coded double error may occur via filter import 2008-11-12 13:29:44 +0100 er r263593 : make references to entire rows/columns, such as A:A or 3:3, actually work in MOOXML import 2008-11-03 12:35:11 +0100 er r263282 : a struct is a struct is a ... 2008-10-31 00:30:59 +0100 er r262843 : aTableRowCellAttrTokenMap needed 2008-10-31 00:26:07 +0100 er r262842 : GetTableRowCellAttrTokenMap() is not unused 2008-10-31 00:13:53 +0100 er r262841 : merge error 2008-10-31 00:05:39 +0100 er r262840 : merge error 2008-10-30 23:17:48 +0100 er r262839 : unresolved merge conflict!?! 2008-10-30 22:59:11 +0100 er r262838 : merge error 2008-10-30 16:31:04 +0100 hr r262833 : CWS-TOOLING: rebase CWS mooxlsc to trunk@262620 (milestone: DEV300:m34) 2008-10-16 21:57:51 +0200 er r262272 : migrate CWS mooxlsc to SVN
2008-12-12 09:38:47 +00:00
#include "externalrefmgr.hxx"
CWS-TOOLING: integrate CWS scsheetprotection02 2009-06-18 16:48:14 +0200 kohei r273124 : #i102906# Fix a crasher when loading an xls document with unsupported encrytpion. 2009-06-15 14:02:00 +0200 dr r272982 : #i10000# compiler warnings 2009-04-13 23:06:21 +0200 kohei r270740 : Renamed SetData() to SetDataFromDocument(), in order to resolve name clash with the method of the same name in class Window. This caused a compiler warning on Solaris Intel. 2009-04-13 04:09:59 +0200 kohei r270729 : CWS-TOOLING: rebase CWS scsheetprotection02 to trunk@270723 (milestone: DEV300:m46) 2009-02-23 16:13:45 +0100 kohei r268361 : added tabprotection.obj to the exception file list. Apparently the older versions of boost::shared_ptr rely on C++ exceptions for its implementation. 2009-02-18 19:59:05 +0100 kohei r268253 : Switched to using ::boost::shared_ptr to wrap a pimpl class, because using ::std::auto_ptr in this header breaks the build on win32. The MSVC implementation of ::std::auto_ptr has some weird quirks... 2009-02-17 21:47:13 +0100 kohei r268192 : fixed linkage issue due to library split. 2009-02-17 04:50:34 +0100 kohei r267842 : CWS-TOOLING: rebase CWS scsheetprotection02 to trunk@267171 (milestone: DEV300:m41) 2009-02-17 02:36:10 +0100 kohei r267841 : reverted the last commit, to re-surrect the removed src files. 2009-02-03 22:02:34 +0100 kohei r267342 : removed the src files to prevent them from being entered into the translation process. The dialogs that need the strings are not yet enabled in the code, so their removal will not cause any harm. 2009-01-14 12:24:29 +0100 dr r266280 : #i10000# wntmsci12 compiler warnings #4 2009-01-14 09:35:46 +0100 dr r266267 : #i10000# wntmsci12 compiler warnings #3 2009-01-13 15:42:07 +0100 dr r266231 : #i10000# wntmsci12 compiler warnings #2 2009-01-13 13:18:28 +0100 dr r266216 : #i10000# wntmsci12 compiler warnings 2009-01-07 03:59:11 +0100 kohei r265943 : remove the fscking compiler warnings. 2009-01-06 15:55:32 +0100 kohei r265925 : removed compiler warnings that caused the buildbot build to fail.... 2009-01-05 23:24:59 +0100 kohei r265888 : Undoing my own local build fix to work around the libmoz... issue. 2008-12-30 21:39:58 +0100 kohei r265833 : Duh! Sheet protection was supposed to be disabled. :-/ 2008-12-23 20:25:55 +0100 kohei r265792 : recovered the code block that was accidentally removed during cws rebase. 2008-12-23 19:03:19 +0100 kohei r265791 : fixed breakage in ods export filter due to rebase to m38. 2008-12-23 16:41:49 +0100 kohei r265787 : CWS-TOOLING: rebase CWS scsheetprotection02 to trunk@265758 (milestone: DEV300:m38) 2008-12-23 05:37:47 +0100 kohei r265768 : deliberately forget document and sheet passwords when importing from or exporting to excel, to emulate the current behavior. 2008-12-23 05:12:59 +0100 kohei r265767 : removed commented-out unused method ScDocument::SetAutoFilterFlags(). 2008-12-23 05:05:19 +0100 kohei r265766 : removed one duplicate method and made associated changes with the removal, and a little more code cleanup. 2008-12-23 04:24:58 +0100 kohei r265765 : a typo in in-line comment 2008-12-23 04:23:08 +0100 kohei r265764 : remove fprintf statement that blatantly prints out document encryption password to stdout. not a good practice. 2008-12-23 04:14:21 +0100 kohei r265763 : we actually don't want to clear all options, because if we do, then we would no longer be able to select any cells on a protected sheet. 2008-12-23 04:07:10 +0100 kohei r265762 : * minor code cleanup (indentation inconsistencies & use of tab) * fixed unprotecting a sheet with password to make it work again. 2008-12-23 03:22:50 +0100 kohei r265761 : reverted all the new functionalities to the existing ones, while keeping the new code in as much as I could. 2008-12-22 23:11:08 +0100 kohei r265760 : in xls export filter, renamed two unknown records into records of known name. 2008-12-22 22:34:50 +0100 kohei r265759 : temporarily disable password capability on file export for MS Excel 97. 2008-12-22 17:01:21 +0100 kohei r265754 : CWS-TOOLING: rebase CWS scsheetprotection02 to trunk@264807 (milestone: DEV300:m37) 2008-11-26 03:12:58 +0100 kohei r264335 : recovered a method that was actually used. 2008-11-25 21:51:10 +0100 kohei r264334 : CWS-TOOLING: rebase CWS scsheetprotection02 to trunk@264325 (milestone: DEV300:m36) 2008-10-08 19:57:35 +0200 kohei r262094 : changed description string to make it less technical. 2008-10-01 05:56:58 +0200 kohei r261986 : migrated from the cvs-based cws. 2008-10-01 05:55:19 +0200 kohei r261985 : migrated from the cvs-based cws. 2008-10-01 05:55:00 +0200 kohei r261984 : migrated from the cvs-based cws.
2009-07-01 08:58:41 +00:00
#include "tabprotection.hxx"
CWS-TOOLING: integrate CWS dr71 2009-07-07 16:26:00 +0200 dr r273805 : #i10000# unused variables 2009-07-07 10:27:14 +0200 dr r273780 : CWS-TOOLING: rebase CWS dr71 to trunk@273468 (milestone: DEV300:m51) 2009-07-01 11:28:24 +0200 dr r273559 : #101471# special handling for XL library functions in ODF formulas (EUROCONVERT) 2009-06-29 17:48:46 +0200 dr r273478 : #i101471# typo 2009-06-29 17:35:16 +0200 dr r273477 : #i101471# import msoxl: formulas from conditional formatting and data validation 2009-06-18 13:45:17 +0200 dr r273115 : #101471# changed interface css.sheet.XFormulaParser 2009-06-18 13:44:43 +0200 dr r273114 : #101471# changed interface css.sheet.XFormulaParser 2009-06-17 17:29:23 +0200 dr r273089 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter, make rel-refs from msoxl: namespace working 2009-06-17 17:28:39 +0200 dr r273088 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter 2009-06-17 17:28:19 +0200 dr r273087 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter 2009-06-17 17:27:19 +0200 dr r273086 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter, remove that property from FormulaParser service 2009-06-17 12:52:20 +0200 dr r273059 : #i101471# import cell formulas from msoxl: namespace 2009-06-16 11:40:50 +0200 dr r273013 : #i101471# import formula namespace from xml elements 2009-06-12 18:34:13 +0200 dr r272935 : #i101471# external formula parser for oox in odf 2009-06-12 18:33:13 +0200 dr r272934 : #i101471# external formula parsers 2009-06-12 18:29:46 +0200 dr r272933 : #i101471# external formula parsers 2009-06-05 15:53:47 +0200 dr r272705 : #i101471# provide OOX formula parser as UNO service
2009-07-29 14:46:52 +00:00
#include "formulaparserpool.hxx"
CWS-TOOLING: integrate CWS koheimultirangecopy 2009-08-29 08:19:57 +0200 kohei r275558 : A bit of cleanup & comments. 2009-08-29 08:10:31 +0200 kohei r275557 : removed duplicated code block. 2009-08-29 07:30:33 +0200 kohei r275556 : #i104551# fixed it. 2009-08-28 17:23:28 +0200 kohei r275541 : #i104553# fixed a crash on pasting over existing data. This also fixes notes being destroyed as originally reported in the IZ entry. 2009-08-27 23:36:17 +0200 kohei r275510 : #i104550# fixed. All I had to do was to call MarkToSimple() before examining the geometry of the marked ranges. 2009-08-27 18:04:11 +0200 kohei r275501 : CWS-TOOLING: rebase CWS koheimultirangecopy to trunk@275331 (milestone: DEV300:m56) 2009-08-21 11:37:20 +0200 dr r275228 : #i10000# another wntmsci12 warning 2009-08-21 09:33:32 +0200 dr r275218 : #i10000# sunncc warnings 2009-08-20 20:01:15 +0200 kohei r275196 : Let's not initialize a variable with itself, which is not yet initialized. This was obviously a silly human error. 2009-08-05 23:24:16 +0200 kohei r274702 : correct error message on matrix fragment. 2009-08-05 20:00:12 +0200 kohei r274699 : removed header includes for indexmap.hxx. 2009-08-05 19:54:24 +0200 kohei r274698 : removed ScIndexMap entirely - we don't need this any more. 2009-08-05 19:53:01 +0200 kohei r274697 : Removed duplicated methods that use ScIndexMap. We should now use ScRangeData::IndexMap across the board. 2009-08-05 18:45:17 +0200 kohei r274695 : Refactored code to remove redundant ScDocument::CopyToClip method. 2009-07-21 18:03:54 +0200 kohei r274209 : #i25855# initial commit of the patch from ooo-build. It's buildable.
2009-09-09 07:31:32 +00:00
#include "clipparam.hxx"
#include "macromgr.hxx"
using namespace com::sun::star;
// pImpl because including lookupcache.hxx in document.hxx isn't wanted, and
// dtor plus helpers are convenient.
struct ScLookupCacheMapImpl
{
ScLookupCacheMap aCacheMap;
~ScLookupCacheMapImpl()
{
freeCaches();
}
void clear()
{
freeCaches();
// Zap map.
ScLookupCacheMap aTmp;
aCacheMap.swap( aTmp);
}
private:
void freeCaches()
{
for (ScLookupCacheMap::iterator it( aCacheMap.begin()); it != aCacheMap.end(); ++it)
delete (*it).second;
}
};
2000-09-18 23:16:46 +00:00
// STATIC DATA -----------------------------------------------------------
ScDocument::ScDocument( ScDocumentMode eMode,
SfxObjectShell* pDocShell ) :
2000-10-20 08:15:16 +00:00
xServiceManager( ::comphelper::getProcessServiceFactory() ),
mpUndoManager( NULL ),
pEditEngine( NULL ),
pNoteEngine( NULL ),
2000-09-18 23:16:46 +00:00
pShell( pDocShell ),
pPrinter( NULL ),
pVirtualDevice_100th_mm( NULL ),
pDrawLayer( NULL ),
2000-09-18 23:16:46 +00:00
pValidationList( NULL ),
pFormatExchangeList( NULL ),
pRangeName(NULL),
pDPCollection( NULL ),
2000-09-18 23:16:46 +00:00
pLinkManager( NULL ),
pFormulaTree( NULL ),
pEOFormulaTree( NULL ),
pFormulaTrack( NULL ),
pEOFormulaTrack( NULL ),
pClipData( NULL ),
pDetOpList(NULL),
pChangeTrack( NULL ),
pUnoBroadcaster( NULL ),
pUnoListenerCalls( NULL ),
pUnoRefUndoList( NULL ),
pChangeViewSettings( NULL ),
pScriptTypeData( NULL ),
pCacheFieldEditEngine( NULL ),
CWS-TOOLING: integrate CWS scsheetprotection02 2009-06-18 16:48:14 +0200 kohei r273124 : #i102906# Fix a crasher when loading an xls document with unsupported encrytpion. 2009-06-15 14:02:00 +0200 dr r272982 : #i10000# compiler warnings 2009-04-13 23:06:21 +0200 kohei r270740 : Renamed SetData() to SetDataFromDocument(), in order to resolve name clash with the method of the same name in class Window. This caused a compiler warning on Solaris Intel. 2009-04-13 04:09:59 +0200 kohei r270729 : CWS-TOOLING: rebase CWS scsheetprotection02 to trunk@270723 (milestone: DEV300:m46) 2009-02-23 16:13:45 +0100 kohei r268361 : added tabprotection.obj to the exception file list. Apparently the older versions of boost::shared_ptr rely on C++ exceptions for its implementation. 2009-02-18 19:59:05 +0100 kohei r268253 : Switched to using ::boost::shared_ptr to wrap a pimpl class, because using ::std::auto_ptr in this header breaks the build on win32. The MSVC implementation of ::std::auto_ptr has some weird quirks... 2009-02-17 21:47:13 +0100 kohei r268192 : fixed linkage issue due to library split. 2009-02-17 04:50:34 +0100 kohei r267842 : CWS-TOOLING: rebase CWS scsheetprotection02 to trunk@267171 (milestone: DEV300:m41) 2009-02-17 02:36:10 +0100 kohei r267841 : reverted the last commit, to re-surrect the removed src files. 2009-02-03 22:02:34 +0100 kohei r267342 : removed the src files to prevent them from being entered into the translation process. The dialogs that need the strings are not yet enabled in the code, so their removal will not cause any harm. 2009-01-14 12:24:29 +0100 dr r266280 : #i10000# wntmsci12 compiler warnings #4 2009-01-14 09:35:46 +0100 dr r266267 : #i10000# wntmsci12 compiler warnings #3 2009-01-13 15:42:07 +0100 dr r266231 : #i10000# wntmsci12 compiler warnings #2 2009-01-13 13:18:28 +0100 dr r266216 : #i10000# wntmsci12 compiler warnings 2009-01-07 03:59:11 +0100 kohei r265943 : remove the fscking compiler warnings. 2009-01-06 15:55:32 +0100 kohei r265925 : removed compiler warnings that caused the buildbot build to fail.... 2009-01-05 23:24:59 +0100 kohei r265888 : Undoing my own local build fix to work around the libmoz... issue. 2008-12-30 21:39:58 +0100 kohei r265833 : Duh! Sheet protection was supposed to be disabled. :-/ 2008-12-23 20:25:55 +0100 kohei r265792 : recovered the code block that was accidentally removed during cws rebase. 2008-12-23 19:03:19 +0100 kohei r265791 : fixed breakage in ods export filter due to rebase to m38. 2008-12-23 16:41:49 +0100 kohei r265787 : CWS-TOOLING: rebase CWS scsheetprotection02 to trunk@265758 (milestone: DEV300:m38) 2008-12-23 05:37:47 +0100 kohei r265768 : deliberately forget document and sheet passwords when importing from or exporting to excel, to emulate the current behavior. 2008-12-23 05:12:59 +0100 kohei r265767 : removed commented-out unused method ScDocument::SetAutoFilterFlags(). 2008-12-23 05:05:19 +0100 kohei r265766 : removed one duplicate method and made associated changes with the removal, and a little more code cleanup. 2008-12-23 04:24:58 +0100 kohei r265765 : a typo in in-line comment 2008-12-23 04:23:08 +0100 kohei r265764 : remove fprintf statement that blatantly prints out document encryption password to stdout. not a good practice. 2008-12-23 04:14:21 +0100 kohei r265763 : we actually don't want to clear all options, because if we do, then we would no longer be able to select any cells on a protected sheet. 2008-12-23 04:07:10 +0100 kohei r265762 : * minor code cleanup (indentation inconsistencies & use of tab) * fixed unprotecting a sheet with password to make it work again. 2008-12-23 03:22:50 +0100 kohei r265761 : reverted all the new functionalities to the existing ones, while keeping the new code in as much as I could. 2008-12-22 23:11:08 +0100 kohei r265760 : in xls export filter, renamed two unknown records into records of known name. 2008-12-22 22:34:50 +0100 kohei r265759 : temporarily disable password capability on file export for MS Excel 97. 2008-12-22 17:01:21 +0100 kohei r265754 : CWS-TOOLING: rebase CWS scsheetprotection02 to trunk@264807 (milestone: DEV300:m37) 2008-11-26 03:12:58 +0100 kohei r264335 : recovered a method that was actually used. 2008-11-25 21:51:10 +0100 kohei r264334 : CWS-TOOLING: rebase CWS scsheetprotection02 to trunk@264325 (milestone: DEV300:m36) 2008-10-08 19:57:35 +0200 kohei r262094 : changed description string to make it less technical. 2008-10-01 05:56:58 +0200 kohei r261986 : migrated from the cvs-based cws. 2008-10-01 05:55:19 +0200 kohei r261985 : migrated from the cvs-based cws. 2008-10-01 05:55:00 +0200 kohei r261984 : migrated from the cvs-based cws.
2009-07-01 08:58:41 +00:00
pDocProtection( NULL ),
CWS-TOOLING: integrate CWS koheimultirangecopy 2009-08-29 08:19:57 +0200 kohei r275558 : A bit of cleanup & comments. 2009-08-29 08:10:31 +0200 kohei r275557 : removed duplicated code block. 2009-08-29 07:30:33 +0200 kohei r275556 : #i104551# fixed it. 2009-08-28 17:23:28 +0200 kohei r275541 : #i104553# fixed a crash on pasting over existing data. This also fixes notes being destroyed as originally reported in the IZ entry. 2009-08-27 23:36:17 +0200 kohei r275510 : #i104550# fixed. All I had to do was to call MarkToSimple() before examining the geometry of the marked ranges. 2009-08-27 18:04:11 +0200 kohei r275501 : CWS-TOOLING: rebase CWS koheimultirangecopy to trunk@275331 (milestone: DEV300:m56) 2009-08-21 11:37:20 +0200 dr r275228 : #i10000# another wntmsci12 warning 2009-08-21 09:33:32 +0200 dr r275218 : #i10000# sunncc warnings 2009-08-20 20:01:15 +0200 kohei r275196 : Let's not initialize a variable with itself, which is not yet initialized. This was obviously a silly human error. 2009-08-05 23:24:16 +0200 kohei r274702 : correct error message on matrix fragment. 2009-08-05 20:00:12 +0200 kohei r274699 : removed header includes for indexmap.hxx. 2009-08-05 19:54:24 +0200 kohei r274698 : removed ScIndexMap entirely - we don't need this any more. 2009-08-05 19:53:01 +0200 kohei r274697 : Removed duplicated methods that use ScIndexMap. We should now use ScRangeData::IndexMap across the board. 2009-08-05 18:45:17 +0200 kohei r274695 : Refactored code to remove redundant ScDocument::CopyToClip method. 2009-07-21 18:03:54 +0200 kohei r274209 : #i25855# initial commit of the patch from ooo-build. It's buildable.
2009-09-09 07:31:32 +00:00
mpClipParam( NULL),
pExternalRefMgr( NULL ),
2010-10-20 12:07:10 +01:00
mpMacroMgr( NULL ),
2000-09-18 23:16:46 +00:00
pViewOptions( NULL ),
pDocOptions( NULL ),
2000-09-18 23:16:46 +00:00
pExtDocOptions( NULL ),
pConsolidateDlgData( NULL ),
pRecursionHelper( NULL ),
pAutoNameCache( NULL ),
pLookupCacheMapImpl( NULL ),
nUnoObjectId( 0 ),
nRangeOverflowType( 0 ),
2000-09-18 23:16:46 +00:00
aCurTextWidthCalcPos(MAXCOL,0,0),
aTableOpList( 0 ),
nFormulaCodeInTree(0),
nXMLImportedFormulaCount( 0 ),
nInterpretLevel(0),
nMacroInterpretLevel(0),
nInterpreterTableOpLevel(0),
nSrcVer( SC_CURRENT_VERSION ),
nSrcMaxRow( MAXROW ),
nFormulaTrackCount(0),
bHardRecalcState(false),
nVisibleTab( 0 ),
eLinkMode(LM_UNKNOWN),
bAutoCalc( eMode == SCDOCMODE_DOCUMENT ),
bAutoCalcShellDisabled( false ),
bForcedFormulaPending( false ),
bCalculatingFormulaTree( false ),
bIsClip( eMode == SCDOCMODE_CLIP ),
bIsUndo( eMode == SCDOCMODE_UNDO ),
bIsVisible( false ),
bIsEmbedded( false ),
bNoSetDirty( false ),
bInsertingFromOtherDoc( false ),
bLoadingMedium( false ),
bImportingXML( false ),
bXMLFromWrapper( false ),
bCalcingAfterLoad( false ),
bNoListening( false ),
bIdleDisabled( false ),
bInLinkUpdate( false ),
bChartListenerCollectionNeedsUpdate( false ),
bHasForcedFormulas( false ),
bInDtorClear( false ),
bExpandRefs( false ),
bDetectiveDirty( false ),
nMacroCallMode( SC_MACROCALL_ALLOWED ),
bHasMacroFunc( false ),
nVisSpellState( 0 ),
nAsianCompression(SC_ASIANCOMPRESSION_INVALID),
nAsianKerning(SC_ASIANKERNING_INVALID),
bSetDrawDefaults( false ),
bPastingDrawFromOtherDoc( false ),
nInDdeLinkUpdate( 0 ),
bInUnoBroadcast( false ),
bInUnoListenerCall( false ),
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
eGrammar( formula::FormulaGrammar::GRAM_NATIVE ),
2011-11-05 07:00:32 +01:00
bStyleSheetUsageInvalid( true ),
mbUndoEnabled( true ),
mbAdjustHeightEnabled( true ),
mbExecuteLinkEnabled( true ),
mbChangeReadOnlyEnabled( false ),
CWS-TOOLING: integrate CWS calcsheetdata 2009-08-13 16:18:48 +0200 nn r274950 : #i102616# shared/remote files, better handling of formula results 2009-08-12 11:17:30 +0200 nn r274884 : CWS-TOOLING: rebase CWS calcsheetdata to trunk@274622 (milestone: DEV300:m54) 2009-08-12 10:30:47 +0200 nn r274881 : #i102616# some clean-up 2009-08-11 19:01:18 +0200 nn r274876 : #i102616# store loaded namespaces, so prefixes remain valid 2009-08-11 19:00:49 +0200 nn r274875 : #i102616# store loaded namespaces, so prefixes remain valid 2009-08-10 19:12:04 +0200 nn r274835 : #i102616# detective, notes, encoding, error handling 2009-08-07 11:18:46 +0200 nn r274751 : #i102616# use new method SvXMLAutoStylePoolP::AddNamed 2009-08-07 11:18:15 +0200 nn r274750 : #i102616# new method SvXMLAutoStylePoolP::AddNamed 2009-08-06 18:02:42 +0200 nn r274740 : #i102616# modification: shapes, notes, pending row heights; skip sheets in export iterator 2009-08-05 18:41:59 +0200 nn r274694 : #i102616# handle text styles in notes 2009-08-03 18:55:59 +0200 nn r274594 : #i102616# handle text styles in cells 2009-07-31 19:00:06 +0200 nn r274548 : #i102616# handle styles for notes 2009-07-28 16:46:20 +0200 nn r274414 : missed a conflict 2009-07-28 14:01:56 +0200 nn r274404 : CWS-TOOLING: rebase CWS calcsheetdata to trunk@274203 (milestone: DEV300:m53) 2009-07-23 18:28:47 +0200 nn r274278 : #i102616# handle table styles 2009-07-22 15:40:24 +0200 nn r274244 : #i102616# handle row styles 2009-07-21 20:09:37 +0200 nn r274211 : #i102616# handle column styles 2009-07-16 13:00:18 +0200 nn r274043 : #i102616# invalidate all stream positions when inserting/deleting sheets 2009-07-15 17:41:15 +0200 nn r274021 : #i102616# don't collect cell styles twice for copied sheets 2009-07-14 18:36:11 +0200 nn r273985 : #i102616# allow to query stream position, clear buffer 2009-07-14 18:32:10 +0200 nn r273984 : #i102616# allow to specify a name for an autostyle 2009-07-09 22:01:23 +0200 nn r273870 : #i102616# copy stream for unchanged sheets 2009-07-08 18:11:42 +0200 nn r273844 : #i102616# store stream positions of sheets 2009-06-24 19:08:18 +0200 nn r273363 : #i102616# detect changed sheets since loading 2009-06-09 15:53:32 +0200 nn r272774 : #i102616# store automatic cell style information after loading
2009-09-07 15:38:19 +00:00
mbStreamValidLocked( false ),
mnNamedRangesLockCount( 0 ),
mbIsInTest( false )
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
SetStorageGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT);
eSrcSet = osl_getThreadTextEncoding();
2000-09-18 23:16:46 +00:00
if ( eMode == SCDOCMODE_DOCUMENT )
{
if ( pDocShell )
2010-01-13 22:25:07 +01:00
pLinkManager = new sfx2::LinkManager( pDocShell );
2000-09-18 23:16:46 +00:00
xPoolHelper = new ScPoolHelper( this );
2000-09-18 23:16:46 +00:00
pBASM = new ScBroadcastAreaSlotMachine( this );
pChartListenerCollection = new ScChartListenerCollection( this );
pRefreshTimerControl = new ScRefreshTimerControl;
2000-09-18 23:16:46 +00:00
}
else
{
pBASM = NULL;
pChartListenerCollection = NULL;
pRefreshTimerControl = NULL;
2000-09-18 23:16:46 +00:00
}
pDBCollection = new ScDBCollection(this);
2000-09-18 23:16:46 +00:00
pSelectionAttr = NULL;
pChartCollection = new ScChartCollection;
apTemporaryChartLock = std::auto_ptr< ScTemporaryChartLock >( new ScTemporaryChartLock(this) );
2000-09-18 23:16:46 +00:00
xColNameRanges = new ScRangePairList;
xRowNameRanges = new ScRangePairList;
ImplCreateOptions();
2000-11-26 12:41:18 +00:00
// languages for a visible document are set by docshell later (from options)
SetLanguage( ScGlobal::eLnge, ScGlobal::eLnge, ScGlobal::eLnge );
2000-09-18 23:16:46 +00:00
aTrackTimer.SetTimeoutHdl( LINK( this, ScDocument, TrackTimeHdl ) );
aTrackTimer.SetTimeout( 100 );
}
2010-01-13 22:25:07 +01:00
sfx2::LinkManager* ScDocument::GetLinkManager() const
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
{
if ( bAutoCalc && !pLinkManager && pShell)
{
2010-01-13 22:25:07 +01:00
pLinkManager = new sfx2::LinkManager( pShell );
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
}
return pLinkManager;
}
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
void ScDocument::SetStorageGrammar( formula::FormulaGrammar::Grammar eGram )
{
OSL_PRECOND(
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
eGram == formula::FormulaGrammar::GRAM_ODFF ||
eGram == formula::FormulaGrammar::GRAM_PODF,
"ScDocument::SetStorageGrammar: wrong storage grammar");
eStorageGrammar = eGram;
// FIXME: the XML import shouldn't strip brackets, the compiler should
// digest them instead, which could also speedup reference recognition
// during import.
CWS-TOOLING: integrate CWS frmdlg 2008-12-18 09:13:09 +0100 oj r265667 : merge from odff05 2008-12-18 07:58:16 +0100 oj r265658 : #i94555# patch from <regina>, ODFF: Add GAMMA, CHISQDIST, CHISQINV. Make the 'cumulative' parameter of GAMMADIST optional. Adapt the domain of CHIDIST to allow negative x. Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV. Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and ODFF if omitted, for backwards compatibility. 2008-12-15 14:06:11 +0100 oj r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37) 2008-12-15 13:55:28 +0100 oj r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:55:07 +0100 oj r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:48 +0100 oj r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:36 +0100 oj r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:54:24 +0100 oj r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:48:11 +0100 oj r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:31:12 +0100 oj r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:13:58 +0100 oj r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:10:09 +0100 oj r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 13:05:11 +0100 oj r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:47:17 +0100 oj r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:46:19 +0100 oj r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 10:45:47 +0100 oj r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C' CWS: frmdlg New MWS: DEV300 New milestone: m37 2008-12-15 07:35:07 +0100 oj r265458 : add dependency to formula 2008-12-15 07:34:24 +0100 oj r265457 : add dependency to formula 2008-12-12 13:22:00 +0100 msc r265413 : #i97089# 2008-12-12 13:20:25 +0100 msc r265412 : #i97089# 2008-12-12 12:35:12 +0100 msc r265406 : #i97089# 2008-12-12 12:34:16 +0100 msc r265405 : #i97089# 2008-12-12 12:33:05 +0100 msc r265404 : #i97089# 2008-12-12 12:31:11 +0100 msc r265403 : #i97089# 2008-12-08 11:59:10 +0100 oj r264981 : insert RTL_LOG 2008-12-08 11:50:17 +0100 oj r264980 : some small changes 2008-12-05 12:57:57 +0100 oj r264902 : eof changed 2008-12-05 12:56:46 +0100 oj r264901 : eof changed 2008-12-05 12:28:47 +0100 oj r264899 : wrong var used 2008-12-05 10:08:57 +0100 oj r264890 : token order reversed 2008-12-04 13:49:22 +0100 oc r264843 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:45:27 +0100 oc r264842 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:42:54 +0100 oc r264841 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:37:41 +0100 oc r264840 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 13:34:11 +0100 oc r264839 : #i96688: Adapt autotests because of outsourced functionwizard 2008-12-04 12:35:31 +0100 oj r264835 : new help ids for struct and function tabpage 2008-12-04 12:00:35 +0100 oj r264828 : set explicit help id 2008-12-03 14:53:27 +0100 oj r264786 : #i96845# change ref button 2008-12-03 14:51:49 +0100 oj r264785 : #i96845# change ref button 2008-12-03 08:51:57 +0100 oj r264746 : convert dos to unix lineends 2008-12-03 08:50:45 +0100 oj r264745 : convert dos to unix lineends 2008-12-03 08:50:05 +0100 oj r264744 : convert dos to unix lineends 2008-12-02 12:28:33 +0100 oj r264686 : clear help text when new helpid is set 2008-12-02 12:28:02 +0100 oj r264685 : set help id for listbox category 2008-12-02 07:15:56 +0100 oj r264655 : remove define to auto generate help ids 2008-12-01 14:36:43 +0100 oj r264604 : use temp var 2008-12-01 14:18:31 +0100 oj r264601 : moved ScJumpToken to formula 2008-12-01 14:18:11 +0100 oj r264600 : moved ScJumpToken to formula 2008-12-01 14:14:35 +0100 oj r264599 : moved ScJumpToken from sc 2008-12-01 10:48:51 +0100 oj r264589 : change quickhelptext from Shrink to Select 2008-12-01 10:28:41 +0100 oj r264588 : fix opcode data, has to be Any.Void 2008-11-28 11:16:48 +0100 oj r264532 : add help ids 2008-11-28 10:16:56 +0100 oj r264529 : set help id 2008-11-28 10:16:43 +0100 oj r264528 : set help id 2008-11-26 13:55:04 +0100 oj r264381 : #94535# use of optional instead of deleting a string myself and some small changes 2008-11-26 09:53:20 +0100 oj r264346 : compile error with debug/without debug 2008-11-25 07:41:28 +0100 oj r264271 : put static into the method which make use of them 2008-11-24 08:16:07 +0100 oj r264196 : removed not needed classes for op code 2008-11-24 08:13:44 +0100 oj r264195 : removed not needed classes for op code 2008-11-21 14:05:53 +0100 oj r264135 : make GetOpCode inline 2008-11-21 12:35:27 +0100 oj r264124 : hold symbols 2008-11-20 09:27:27 +0100 oj r264028 : merged code from DEV300_m35 which got lost 2008-11-19 20:42:12 +0100 oj r264022 : more changes for formula dialog remove 2008-11-19 20:37:41 +0100 oj r264021 : removed unused var 2008-11-19 20:35:35 +0100 oj r264020 : some more changes at token 2008-11-19 10:59:47 +0100 oj r263967 : deleted 2008-11-19 10:58:24 +0100 oj r263966 : add forui and for res files 2008-11-18 15:27:36 +0100 oj r263777 : unused para removed 2008-11-18 15:23:23 +0100 oj r263775 : add insert button to add field dlg 2008-11-18 13:39:53 +0100 oj r263764 : enable the formula dialog as well for conditional print as for conditional formatting 2008-11-18 12:03:25 +0100 oj r263760 : rename isRef in IsRef 2008-11-17 11:46:16 +0100 oj r263711 : patches for function handling 2008-11-17 11:36:22 +0100 oj r263710 : add new for forui and res file 2008-11-17 09:21:12 +0100 oj r263704 : patches for some resource for libformula 2008-11-15 12:45:30 +0100 oj r263701 : changes for formula editor extraction 2008-11-07 08:23:27 +0100 oj r263416 : merge from DEV300:m35 2008-11-07 08:22:35 +0100 oj r263415 : merge from DEV300:m35 2008-11-07 08:22:16 +0100 oj r263414 : merge from DEV300:m35 2008-11-07 08:21:41 +0100 oj r263413 : merge from DEV300:m35 2008-11-07 08:21:31 +0100 oj r263412 : merge from DEV300:m35 2008-11-07 08:20:38 +0100 oj r263411 : merge from DEV300:m35 2008-11-07 08:20:00 +0100 oj r263410 : merge from DEV300:m35 2008-11-07 08:18:50 +0100 oj r263409 : merge from DEV300:m35 2008-11-07 08:18:19 +0100 oj r263408 : merge from DEV300:m35 2008-11-07 08:10:27 +0100 oj r263407 : merge from DEV300:m35 2008-10-21 07:43:46 +0200 oj r262560 : some compile errors resolved 2008-10-17 16:40:01 +0200 oj r262291 : dep for 1st target 2008-10-07 10:08:39 +0200 oj r262077 : copy 2008-10-07 09:45:31 +0200 oj r262076 : #i94535# 2008-10-07 09:44:26 +0200 oj r262075 : #i94535# new base class 2008-10-07 09:43:21 +0200 oj r262074 : moved to formula 2008-10-07 09:41:51 +0200 oj r262073 : new images 2008-10-07 09:03:01 +0200 oj r262072 : new ids for formula 2008-10-02 08:46:27 +0200 oj r262024 : #i94535# move the formula compiler to formula 2008-10-02 08:08:54 +0200 oj r262023 : #i94535# 2008-10-02 08:06:28 +0200 oj r262022 : #i94535# 2008-10-02 08:05:52 +0200 oj r262021 : #i94535# 2008-10-01 17:15:29 +0200 oj r262014 : #i94535# 2008-10-01 17:12:40 +0200 oj r262013 : new module formula 2008-10-01 17:04:55 +0200 oj r262012 : #i94535# 2008-10-01 16:49:03 +0200 oj r262010 : #i94535# 2008-10-01 16:46:59 +0200 oj r262009 : #i94535#
2009-01-08 10:47:13 +00:00
eXmlImportGrammar = formula::FormulaGrammar::mergeToGrammar( eGram,
formula::FormulaGrammar::CONV_OOO);
}
2011-11-05 07:00:32 +01:00
void ScDocument::SetDocVisible( bool bSet )
{
// called from view ctor - only for a visible document,
// each new sheet's RTL flag is initialized from the locale
bIsVisible = bSet;
}
sal_uInt32 ScDocument::GetDocumentID() const
{
const ScDocument* pThis = this;
sal_uInt32 nCrc = rtl_crc32( 0, &pThis, sizeof(ScDocument*) );
// the this pointer only might not be sufficient
nCrc = rtl_crc32( nCrc, &pShell, sizeof(SfxObjectShell*) );
return nCrc;
}
2000-09-18 23:16:46 +00:00
void ScDocument::StartChangeTracking()
{
if (!pChangeTrack)
pChangeTrack = new ScChangeTrack( this );
}
void ScDocument::EndChangeTracking()
{
delete pChangeTrack;
pChangeTrack = NULL;
}
2000-11-21 09:24:41 +00:00
void ScDocument::SetChangeTrack( ScChangeTrack* pTrack )
{
OSL_ENSURE( pTrack->GetDocument() == this, "SetChangeTrack: different documents" );
2000-11-21 09:24:41 +00:00
if ( !pTrack || pTrack == pChangeTrack || pTrack->GetDocument() != this )
return ;
EndChangeTracking();
pChangeTrack = pTrack;
}
IMPL_LINK_NOARG(ScDocument, TrackTimeHdl)
2000-09-18 23:16:46 +00:00
{
if ( ScDdeLink::IsInUpdate() ) // nicht verschachteln
{
aTrackTimer.Start(); // spaeter nochmal versuchen
}
else if (pShell) // ausfuehren
{
TrackFormulas();
pShell->Broadcast( SfxSimpleHint( FID_DATACHANGED ) );
// modified...
if (!pShell->IsModified())
{
2011-11-05 07:00:32 +01:00
pShell->SetModified( true );
2000-09-22 17:57:10 +00:00
SfxBindings* pBindings = GetViewBindings();
if (pBindings)
{
pBindings->Invalidate( SID_SAVEDOC );
pBindings->Invalidate( SID_DOC_MODIFIED );
}
2000-09-18 23:16:46 +00:00
}
}
return 0;
}
void ScDocument::StartTrackTimer()
{
if (!aTrackTimer.IsActive()) // nicht ewig aufschieben
aTrackTimer.Start();
}
ScDocument::~ScDocument()
{
OSL_PRECOND( !bInLinkUpdate, "bInLinkUpdate in dtor" );
2000-09-18 23:16:46 +00:00
2011-11-05 07:00:32 +01:00
bInDtorClear = true;
2000-09-18 23:16:46 +00:00
// first of all disable all refresh timers by deleting the control
if ( pRefreshTimerControl )
{ // To be sure there isn't anything running do it with a protector,
// this ensures also that nothing needs the control anymore.
ScRefreshTimerProtector aProt( GetRefreshTimerControlAddress() );
delete pRefreshTimerControl, pRefreshTimerControl = NULL;
}
2000-09-18 23:16:46 +00:00
// Links aufrauemen
CWS-TOOLING: integrate CWS oj18 2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
2009-09-08 04:57:32 +00:00
if ( GetLinkManager() )
2000-09-18 23:16:46 +00:00
{
// BaseLinks freigeben
::sfx2::SvLinkSources aTemp(pLinkManager->GetServers());
for( ::sfx2::SvLinkSources::const_iterator it = aTemp.begin(); it != aTemp.end(); ++it )
(*it)->Closed();
2000-09-18 23:16:46 +00:00
if ( pLinkManager->GetLinks().size() )
pLinkManager->Remove( 0, pLinkManager->GetLinks().size() );
2000-09-18 23:16:46 +00:00
}
CWS-TOOLING: integrate CWS dr71 2009-07-07 16:26:00 +0200 dr r273805 : #i10000# unused variables 2009-07-07 10:27:14 +0200 dr r273780 : CWS-TOOLING: rebase CWS dr71 to trunk@273468 (milestone: DEV300:m51) 2009-07-01 11:28:24 +0200 dr r273559 : #101471# special handling for XL library functions in ODF formulas (EUROCONVERT) 2009-06-29 17:48:46 +0200 dr r273478 : #i101471# typo 2009-06-29 17:35:16 +0200 dr r273477 : #i101471# import msoxl: formulas from conditional formatting and data validation 2009-06-18 13:45:17 +0200 dr r273115 : #101471# changed interface css.sheet.XFormulaParser 2009-06-18 13:44:43 +0200 dr r273114 : #101471# changed interface css.sheet.XFormulaParser 2009-06-17 17:29:23 +0200 dr r273089 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter, make rel-refs from msoxl: namespace working 2009-06-17 17:28:39 +0200 dr r273088 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter 2009-06-17 17:28:19 +0200 dr r273087 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter 2009-06-17 17:27:19 +0200 dr r273086 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter, remove that property from FormulaParser service 2009-06-17 12:52:20 +0200 dr r273059 : #i101471# import cell formulas from msoxl: namespace 2009-06-16 11:40:50 +0200 dr r273013 : #i101471# import formula namespace from xml elements 2009-06-12 18:34:13 +0200 dr r272935 : #i101471# external formula parser for oox in odf 2009-06-12 18:33:13 +0200 dr r272934 : #i101471# external formula parsers 2009-06-12 18:29:46 +0200 dr r272933 : #i101471# external formula parsers 2009-06-05 15:53:47 +0200 dr r272705 : #i101471# provide OOX formula parser as UNO service
2009-07-29 14:46:52 +00:00
mxFormulaParserPool.reset();
// Destroy the external ref mgr instance here because it has a timer
// which needs to be stopped before the app closes.
pExternalRefMgr.reset();
CWS-TOOLING: integrate CWS mooxlsc 2008-12-12 09:32:19 +0100 dr r265390 : #i10000# warning 2008-12-11 14:54:26 +0100 dr r265301 : add strings from dr66 to meet ui freeze 2008-12-11 14:53:20 +0100 dr r265300 : add strings from dr66 to meet ui freeze 2008-12-08 14:43:25 +0100 er r264997 : DBG_... need semicolon 2008-12-04 19:16:50 +0100 er r264872 : DBG_... needs semicolon 2008-12-04 11:09:27 +0100 er r264824 : DBG_ERROR needs semicolon 2008-12-03 13:29:46 +0100 er r264770 : CWS-TOOLING: rebase CWS mooxlsc to trunk@264325 (milestone: DEV300:m36) 2008-12-02 16:49:09 +0100 er r264722 : disable code for named references #i4385# import as long as #i3740# isn't fully implemented 2008-12-02 16:45:04 +0100 er r264721 : some compilers attempt to be too smart; persuade them it's really meant what was written 2008-12-02 16:04:56 +0100 er r264715 : #i3740# no storage in ODF for external name references 2008-11-29 02:20:50 +0100 er r264575 : some huge performance improvement when reading repeated empty rows for the external references cache from ODF, as they often occur in the sparse matrix 2008-11-29 01:14:55 +0100 er r264574 : WriteExternalRefCaches: for table:number-columns-repeated write used columns instead of MAXCOLCOUNT 2008-11-28 18:30:04 +0100 er r264570 : #i3740# write/read external name references as bracketed references, as proposed on the ODFF list 2008-11-27 20:36:54 +0100 er r264521 : merge i95068 from cws calc46 for code correctness 2008-11-21 20:39:34 +0100 kohei r264174 : fixed a crash when importing a BIFF8 document with per-sheet external names. For now, we don't support per-sheet external names. Let's throw in NoName error until they are supported. 2008-11-21 18:47:27 +0100 kohei r264168 : I forgot to process cached range references in the EXTERNNAME record, which prevented cached external names with range references from being imported correctly. P.S. I swear I thought I had covered this.... 2008-11-20 23:07:22 +0100 er r264104 : #i4385# parse external defined names in MOOXML import 2008-11-14 23:18:54 +0100 er r263700 : #i92797# parse external sheet references under aspects of MOOXML import and new ScExternalRefManager 2008-11-14 18:49:48 +0100 er r263696 : remove infinity assertion, leftover from binary file format; coded double error may occur via filter import 2008-11-12 13:29:44 +0100 er r263593 : make references to entire rows/columns, such as A:A or 3:3, actually work in MOOXML import 2008-11-03 12:35:11 +0100 er r263282 : a struct is a struct is a ... 2008-10-31 00:30:59 +0100 er r262843 : aTableRowCellAttrTokenMap needed 2008-10-31 00:26:07 +0100 er r262842 : GetTableRowCellAttrTokenMap() is not unused 2008-10-31 00:13:53 +0100 er r262841 : merge error 2008-10-31 00:05:39 +0100 er r262840 : merge error 2008-10-30 23:17:48 +0100 er r262839 : unresolved merge conflict!?! 2008-10-30 22:59:11 +0100 er r262838 : merge error 2008-10-30 16:31:04 +0100 hr r262833 : CWS-TOOLING: rebase CWS mooxlsc to trunk@262620 (milestone: DEV300:m34) 2008-10-16 21:57:51 +0200 er r262272 : migrate CWS mooxlsc to SVN
2008-12-12 09:38:47 +00:00
2000-09-18 23:16:46 +00:00
ScAddInAsync::RemoveDocument( this );
ScAddInListener::RemoveDocument( this );
CWS-TOOLING: integrate CWS dr71 2009-07-07 16:26:00 +0200 dr r273805 : #i10000# unused variables 2009-07-07 10:27:14 +0200 dr r273780 : CWS-TOOLING: rebase CWS dr71 to trunk@273468 (milestone: DEV300:m51) 2009-07-01 11:28:24 +0200 dr r273559 : #101471# special handling for XL library functions in ODF formulas (EUROCONVERT) 2009-06-29 17:48:46 +0200 dr r273478 : #i101471# typo 2009-06-29 17:35:16 +0200 dr r273477 : #i101471# import msoxl: formulas from conditional formatting and data validation 2009-06-18 13:45:17 +0200 dr r273115 : #101471# changed interface css.sheet.XFormulaParser 2009-06-18 13:44:43 +0200 dr r273114 : #101471# changed interface css.sheet.XFormulaParser 2009-06-17 17:29:23 +0200 dr r273089 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter, make rel-refs from msoxl: namespace working 2009-06-17 17:28:39 +0200 dr r273088 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter 2009-06-17 17:28:19 +0200 dr r273087 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter 2009-06-17 17:27:19 +0200 dr r273086 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter, remove that property from FormulaParser service 2009-06-17 12:52:20 +0200 dr r273059 : #i101471# import cell formulas from msoxl: namespace 2009-06-16 11:40:50 +0200 dr r273013 : #i101471# import formula namespace from xml elements 2009-06-12 18:34:13 +0200 dr r272935 : #i101471# external formula parser for oox in odf 2009-06-12 18:33:13 +0200 dr r272934 : #i101471# external formula parsers 2009-06-12 18:29:46 +0200 dr r272933 : #i101471# external formula parsers 2009-06-05 15:53:47 +0200 dr r272705 : #i101471# provide OOX formula parser as UNO service
2009-07-29 14:46:52 +00:00
DELETEZ( pChartListenerCollection); // vor pBASM wg. evtl. Listener!
DELETEZ( pLookupCacheMapImpl); // before pBASM because of listeners
2000-09-18 23:16:46 +00:00
// BroadcastAreas vor allen Zellen zerstoeren um unnoetige
// Einzel-EndListenings der Formelzellen zu vermeiden
delete pBASM; // BroadcastAreaSlotMachine
pBASM = NULL;
if (pUnoBroadcaster)
{
delete pUnoBroadcaster; // broadcasted nochmal SFX_HINT_DYING
pUnoBroadcaster = NULL;
}
delete pUnoRefUndoList;
delete pUnoListenerCalls;
2011-11-05 07:00:32 +01:00
Clear( true ); // true = from destructor (needed for SdrModel::ClearModel)
2000-09-18 23:16:46 +00:00
if (pValidationList)
{
pValidationList->DeleteAndDestroy( 0, pValidationList->Count() );
DELETEZ(pValidationList);
}
delete pRangeName;
delete pDBCollection;
delete pSelectionAttr;
apTemporaryChartLock.reset();
2000-09-18 23:16:46 +00:00
delete pChartCollection;
DeleteDrawLayer();
delete pFormatExchangeList;
delete pPrinter;
ImplDeleteOptions();
delete pConsolidateDlgData;
delete pLinkManager;
delete pClipData;
delete pDetOpList; // loescht auch die Eintraege
delete pChangeTrack;
delete pEditEngine;
delete pNoteEngine;
2000-09-18 23:16:46 +00:00
delete pChangeViewSettings; // und weg damit
delete pVirtualDevice_100th_mm;
2000-09-18 23:16:46 +00:00
delete pDPCollection;
// delete the EditEngine before destroying the xPoolHelper
delete pCacheFieldEditEngine;
2010-10-15 12:20:01 -05:00
if ( xPoolHelper.is() && !bIsClip )
xPoolHelper->SourceDocumentGone();
2010-10-15 12:20:01 -05:00
xPoolHelper.clear();
2000-09-18 23:16:46 +00:00
2000-11-26 14:24:00 +00:00
delete pScriptTypeData;
delete pRecursionHelper;
2001-11-26 08:28:27 +00:00
OSL_POSTCOND( !pAutoNameCache, "AutoNameCache still set in dtor" );
2000-09-18 23:16:46 +00:00
}
void ScDocument::InitClipPtrs( ScDocument* pSourceDoc )
{
OSL_ENSURE(bIsClip, "InitClipPtrs und nicht bIsClip");
2000-09-18 23:16:46 +00:00
if (pValidationList)
{
pValidationList->DeleteAndDestroy( 0, pValidationList->Count() );
DELETEZ(pValidationList);
}
Clear();
xPoolHelper = pSourceDoc->xPoolHelper;
2000-09-18 23:16:46 +00:00
// bedingte Formate / Gueltigkeiten
//! Vorlagen kopieren?
const ScValidationDataList* pSourceValid = pSourceDoc->pValidationList;
if ( pSourceValid )
pValidationList = new ScValidationDataList(this, *pSourceValid);
// Links in Stream speichern
delete pClipData;
if (pSourceDoc->HasDdeLinks())
{
pClipData = new SvMemoryStream;
pSourceDoc->SaveDdeLinks(*pClipData);
}
else
pClipData = NULL;
// Options pointers exist (ImplCreateOptions) for any document.
// Must be copied for correct results in OLE objects (#i42666#).
SetDocOptions( pSourceDoc->GetDocOptions() );
SetViewOptions( pSourceDoc->GetViewOptions() );
2000-09-18 23:16:46 +00:00
}
SvNumberFormatter* ScDocument::GetFormatTable() const
{
return xPoolHelper->GetFormTable();
}
SfxItemPool* ScDocument::GetEditPool() const
{
return xPoolHelper->GetEditPool();
}
SfxItemPool* ScDocument::GetEnginePool() const
{
return xPoolHelper->GetEnginePool();
}
2000-09-18 23:16:46 +00:00
ScFieldEditEngine& ScDocument::GetEditEngine()
{
if ( !pEditEngine )
{
pEditEngine = new ScFieldEditEngine(this, GetEnginePool(), GetEditPool());
pEditEngine->SetUpdateMode( false );
pEditEngine->EnableUndo( false );
2000-09-18 23:16:46 +00:00
pEditEngine->SetRefMapMode( MAP_100TH_MM );
ApplyAsianEditSettings( *pEditEngine );
2000-09-18 23:16:46 +00:00
}
return *pEditEngine;
}
ScNoteEditEngine& ScDocument::GetNoteEngine()
{
if ( !pNoteEngine )
{
pNoteEngine = new ScNoteEditEngine( GetEnginePool(), GetEditPool() );
pNoteEngine->SetUpdateMode( false );
pNoteEngine->EnableUndo( false );
pNoteEngine->SetRefMapMode( MAP_100TH_MM );
ApplyAsianEditSettings( *pNoteEngine );
const SfxItemSet& rItemSet = GetDefPattern()->GetItemSet();
SfxItemSet* pEEItemSet = new SfxItemSet( pNoteEngine->GetEmptyItemSet() );
ScPatternAttr::FillToEditItemSet( *pEEItemSet, rItemSet );
pNoteEngine->SetDefaults( pEEItemSet ); // edit engine takes ownership
}
return *pNoteEngine;
}
2000-09-18 23:16:46 +00:00
void ScDocument::ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks )
{
if (bIsClip)
{
InitClipPtrs(pSourceDoc);
for (SCTAB i = 0; i < static_cast<SCTAB>(pSourceDoc->maTabs.size()); i++)
if (pSourceDoc->maTabs[i])
2000-09-18 23:16:46 +00:00
if (!pMarks || pMarks->GetTableSelect(i))
{
2011-08-26 19:33:59 -04:00
rtl::OUString aString;
pSourceDoc->maTabs[i]->GetName(aString);
if ( i < static_cast<SCTAB>(maTabs.size()) )
{
maTabs[i] = new ScTable(this, i, aString);
}
else
{
if( i > static_cast<SCTAB>(maTabs.size()) )
{
maTabs.resize(i, NULL );
}
maTabs.push_back(new ScTable(this, i, aString));
}
maTabs[i]->SetLayoutRTL( pSourceDoc->maTabs[i]->IsLayoutRTL() );
2000-09-18 23:16:46 +00:00
}
}
else
{
2011-03-01 19:05:02 +01:00
OSL_FAIL("ResetClip");
}
2000-09-18 23:16:46 +00:00
}
void ScDocument::ResetClip( ScDocument* pSourceDoc, SCTAB nTab )
2000-09-18 23:16:46 +00:00
{
if (bIsClip)
{
InitClipPtrs(pSourceDoc);
if (nTab >= static_cast<SCTAB>(maTabs.size()))
{
maTabs.resize(nTab+1, NULL );
}
maTabs[nTab] = new ScTable(this, nTab,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("baeh")));
if (nTab < static_cast<SCTAB>(pSourceDoc->maTabs.size()) && pSourceDoc->maTabs[nTab])
maTabs[nTab]->SetLayoutRTL( pSourceDoc->maTabs[nTab]->IsLayoutRTL() );
2000-09-18 23:16:46 +00:00
}
else
{
2011-03-01 19:05:02 +01:00
OSL_FAIL("ResetClip");
}
2000-09-18 23:16:46 +00:00
}
void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
2011-11-05 07:00:32 +01:00
ScBaseCell* pCell, sal_uLong nFormatIndex, bool bForceTab )
2000-09-18 23:16:46 +00:00
{
if (VALIDTAB(nTab))
{
if ( bForceTab && ( nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab] ) )
2000-09-18 23:16:46 +00:00
{
2011-11-05 07:00:32 +01:00
bool bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
if ( nTab >= static_cast<SCTAB>(maTabs.size()) )
{
maTabs.resize( nTab + 1, NULL );
}
maTabs.at(nTab) = new ScTable(this, nTab,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("temp")),
bExtras, bExtras);
2000-09-18 23:16:46 +00:00
}
if ( nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
maTabs[nTab]->PutCell( nCol, nRow, nFormatIndex, pCell );
2000-09-18 23:16:46 +00:00
}
}
2011-11-05 07:00:32 +01:00
bool ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
bool bNotes ) const
2000-09-18 23:16:46 +00:00
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
2000-09-18 23:16:46 +00:00
{
2011-11-05 07:00:32 +01:00
bool bAny = maTabs[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes );
2000-09-18 23:16:46 +00:00
if (pDrawLayer)
{
ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab);
2011-11-05 07:00:32 +01:00
if (DrawGetPrintArea( aDrawRange, true, true ))
2000-09-18 23:16:46 +00:00
{
if (aDrawRange.aEnd.Col()>rEndCol) rEndCol=aDrawRange.aEnd.Col();
if (aDrawRange.aEnd.Row()>rEndRow) rEndRow=aDrawRange.aEnd.Row();
2011-11-05 07:00:32 +01:00
bAny = true;
2000-09-18 23:16:46 +00:00
}
}
return bAny;
}
rEndCol = 0;
rEndRow = 0;
return false;
2000-09-18 23:16:46 +00:00
}
2011-11-05 07:00:32 +01:00
bool ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
SCCOL& rEndCol, bool bNotes ) const
2000-09-18 23:16:46 +00:00
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
2000-09-18 23:16:46 +00:00
{
2011-11-05 07:00:32 +01:00
bool bAny = maTabs[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol, bNotes );
2000-09-18 23:16:46 +00:00
if (pDrawLayer)
{
ScRange aDrawRange(0,nStartRow,nTab, MAXCOL,nEndRow,nTab);
2011-11-05 07:00:32 +01:00
if (DrawGetPrintArea( aDrawRange, true, false ))
2000-09-18 23:16:46 +00:00
{
if (aDrawRange.aEnd.Col()>rEndCol) rEndCol=aDrawRange.aEnd.Col();
2011-11-05 07:00:32 +01:00
bAny = true;
2000-09-18 23:16:46 +00:00
}
}
return bAny;
}
rEndCol = 0;
return false;
2000-09-18 23:16:46 +00:00
}
2011-11-05 07:00:32 +01:00
bool ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
SCROW& rEndRow, bool bNotes ) const
2000-09-18 23:16:46 +00:00
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
2000-09-18 23:16:46 +00:00
{
2011-11-05 07:00:32 +01:00
bool bAny = maTabs[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes );
2000-09-18 23:16:46 +00:00
if (pDrawLayer)
{
ScRange aDrawRange(nStartCol,0,nTab, nEndCol,MAXROW,nTab);
2011-11-05 07:00:32 +01:00
if (DrawGetPrintArea( aDrawRange, false, true ))
2000-09-18 23:16:46 +00:00
{
if (aDrawRange.aEnd.Row()>rEndRow) rEndRow=aDrawRange.aEnd.Row();
2011-11-05 07:00:32 +01:00
bAny = true;
2000-09-18 23:16:46 +00:00
}
}
return bAny;
}
rEndRow = 0;
return false;
2000-09-18 23:16:46 +00:00
}
2011-11-05 07:00:32 +01:00
bool ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const
2000-09-18 23:16:46 +00:00
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
2000-09-18 23:16:46 +00:00
{
2011-11-05 07:00:32 +01:00
bool bAny = maTabs[nTab]->GetDataStart( rStartCol, rStartRow );
2000-09-18 23:16:46 +00:00
if (pDrawLayer)
{
ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab);
2011-11-05 07:00:32 +01:00
if (DrawGetPrintArea( aDrawRange, true, true ))
2000-09-18 23:16:46 +00:00
{
if (aDrawRange.aStart.Col()<rStartCol) rStartCol=aDrawRange.aStart.Col();
if (aDrawRange.aStart.Row()<rStartRow) rStartRow=aDrawRange.aStart.Row();
2011-11-05 07:00:32 +01:00
bAny = true;
2000-09-18 23:16:46 +00:00
}
}
return bAny;
}
rStartCol = 0;
rStartRow = 0;
return false;
2000-09-18 23:16:46 +00:00
}
2011-11-05 07:00:32 +01:00
bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress )
2000-09-18 23:16:46 +00:00
{
if (nOldPos == nNewPos) return false;
2011-11-05 07:00:32 +01:00
bool bValid = false;
SCTAB nTabCount = static_cast<SCTAB>(maTabs.size());
if (VALIDTAB(nOldPos) && nOldPos < nTabCount )
2000-09-18 23:16:46 +00:00
{
if (maTabs[nOldPos])
2000-09-18 23:16:46 +00:00
{
if (nTabCount > 1)
{
2011-11-05 07:00:32 +01:00
bool bOldAutoCalc = GetAutoCalc();
SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
2011-11-05 07:00:32 +01:00
SetNoListening( true );
if (nNewPos == SC_TAB_APPEND || nNewPos >= nTabCount)
2000-09-18 23:16:46 +00:00
nNewPos = nTabCount-1;
// Referenz-Updaterei
//! mit UpdateReference zusammenfassen!
SCsTAB nDz = ((SCsTAB)nNewPos) - (SCsTAB)nOldPos;
2000-09-18 23:16:46 +00:00
ScRange aSourceRange( 0,0,nOldPos, MAXCOL,MAXROW,nOldPos );
if (pRangeName)
pRangeName->UpdateTabRef(nOldPos, 3, nNewPos);
2000-09-18 23:16:46 +00:00
pDBCollection->UpdateMoveTab( nOldPos, nNewPos );
xColNameRanges->UpdateReference( URM_REORDER, this, aSourceRange, 0,0,nDz );
xRowNameRanges->UpdateReference( URM_REORDER, this, aSourceRange, 0,0,nDz );
if (pDPCollection)
pDPCollection->UpdateReference( URM_REORDER, aSourceRange, 0,0,nDz );
if (pDetOpList)
pDetOpList->UpdateReference( this, URM_REORDER, aSourceRange, 0,0,nDz );
UpdateChartRef( URM_REORDER,
0,0,nOldPos, MAXCOL,MAXROW,nOldPos, 0,0,nDz );
2000-10-30 10:33:41 +00:00
UpdateRefAreaLinks( URM_REORDER, aSourceRange, 0,0,nDz );
if ( pValidationList )
pValidationList->UpdateMoveTab( nOldPos, nNewPos );
2000-09-18 23:16:46 +00:00
if ( pUnoBroadcaster )
pUnoBroadcaster->Broadcast( ScUpdateRefHint( URM_REORDER,
aSourceRange, 0,0,nDz ) );
ScTable* pSaveTab = maTabs[nOldPos];
maTabs.erase(maTabs.begin()+nOldPos);
maTabs.insert(maTabs.begin()+nNewPos, pSaveTab);
TableContainer::iterator it = maTabs.begin();
for (SCTAB i = 0; i < nTabCount; i++)
if (maTabs[i])
maTabs[i]->UpdateMoveTab( nOldPos, nNewPos, i, pProgress );
it = maTabs.begin();
for (; it != maTabs.end(); ++it)
if (*it)
(*it)->UpdateCompile();
SetNoListening( false );
it = maTabs.begin();
for (; it != maTabs.end(); ++it)
if (*it)
(*it)->StartAllListeners();
2011-02-07 20:20:44 +01:00
// sheet names of references may not be valid until sheet is moved
2000-12-13 11:43:43 +00:00
pChartListenerCollection->UpdateScheduledSeriesRanges();
2000-09-18 23:16:46 +00:00
SetDirty();
SetAutoCalc( bOldAutoCalc );
if (pDrawLayer)
DrawMovePage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
2000-09-18 23:16:46 +00:00
2011-11-05 07:00:32 +01:00
bValid = true;
2000-09-18 23:16:46 +00:00
}
}
}
return bValid;
}
2011-11-05 07:00:32 +01:00
bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyMarked )
2000-09-18 23:16:46 +00:00
{
if (SC_TAB_APPEND == nNewPos || nNewPos >= static_cast<SCTAB>(maTabs.size()))
nNewPos = static_cast<SCTAB>(maTabs.size());
2011-08-26 19:33:59 -04:00
rtl::OUString aName;
2000-09-18 23:16:46 +00:00
GetName(nOldPos, aName);
// vorneweg testen, ob der Prefix als gueltig erkannt wird
// wenn nicht, nur doppelte vermeiden
2011-11-05 07:00:32 +01:00
bool bPrefix = ValidTabName( aName );
OSL_ENSURE(bPrefix, "ungueltiger Tabellenname");
SCTAB nDummy;
2000-09-18 23:16:46 +00:00
CreateValidTabName(aName);
2011-11-05 07:00:32 +01:00
bool bValid;
2000-09-18 23:16:46 +00:00
if (bPrefix)
bValid = ( ValidNewTabName(aName) );
2000-09-18 23:16:46 +00:00
else
bValid = ( !GetTable( aName, nDummy ) );
2000-09-18 23:16:46 +00:00
2011-11-05 07:00:32 +01:00
bool bOldAutoCalc = GetAutoCalc();
SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
2000-09-18 23:16:46 +00:00
if (bValid)
{
if (nNewPos >= static_cast<SCTAB>(maTabs.size()))
2000-09-18 23:16:46 +00:00
{
nNewPos = static_cast<SCTAB>(maTabs.size());
maTabs.push_back(new ScTable(this, nNewPos, aName));
2000-09-18 23:16:46 +00:00
}
else
{
if (VALIDTAB(nNewPos) && (nNewPos < static_cast<SCTAB>(maTabs.size())))
2000-09-18 23:16:46 +00:00
{
2011-11-05 07:00:32 +01:00
SetNoListening( true );
2000-09-18 23:16:46 +00:00
ScRange aRange( 0,0,nNewPos, MAXCOL,MAXROW,MAXTAB );
xColNameRanges->UpdateReference( URM_INSDEL, this, aRange, 0,0,1 );
xRowNameRanges->UpdateReference( URM_INSDEL, this, aRange, 0,0,1 );
if (pRangeName)
pRangeName->UpdateTabRef(nNewPos, 1);
2000-09-18 23:16:46 +00:00
pDBCollection->UpdateReference(
URM_INSDEL, 0,0,nNewPos, MAXCOL,MAXROW,MAXTAB, 0,0,1 );
if (pDPCollection)
pDPCollection->UpdateReference( URM_INSDEL, aRange, 0,0,1 );
if (pDetOpList)
pDetOpList->UpdateReference( this, URM_INSDEL, aRange, 0,0,1 );
UpdateChartRef( URM_INSDEL, 0,0,nNewPos, MAXCOL,MAXROW,MAXTAB, 0,0,1 );
2000-10-30 10:33:41 +00:00
UpdateRefAreaLinks( URM_INSDEL, aRange, 0,0,1 );
2000-09-18 23:16:46 +00:00
if ( pUnoBroadcaster )
pUnoBroadcaster->Broadcast( ScUpdateRefHint( URM_INSDEL, aRange, 0,0,1 ) );
SCTAB i;
for (TableContainer::iterator it = maTabs.begin(); it != maTabs.end(); ++it)
if (*it && it != (maTabs.begin() + nOldPos))
(*it)->UpdateInsertTab(nNewPos);
maTabs.push_back(NULL);
for (i = static_cast<SCTAB>(maTabs.size())-1; i > nNewPos; i--)
maTabs[i] = maTabs[i - 1];
2000-09-18 23:16:46 +00:00
if (nNewPos <= nOldPos)
nOldPos++;
maTabs[nNewPos] = new ScTable(this, nNewPos, aName);
2011-11-05 07:00:32 +01:00
bValid = true;
for (TableContainer::iterator it = maTabs.begin(); it != maTabs.end(); ++it)
if (*it && it != maTabs.begin()+nOldPos && it != maTabs.begin() + nNewPos)
(*it)->UpdateCompile();
SetNoListening( false );
for (TableContainer::iterator it = maTabs.begin(); it != maTabs.end(); ++it)
if (*it && it != maTabs.begin()+nOldPos && it != maTabs.begin()+nNewPos)
(*it)->StartAllListeners();
2000-09-18 23:16:46 +00:00
if ( pValidationList )
pValidationList->UpdateReference( URM_INSDEL, aRange, 0,0,1 );
2011-02-07 20:20:44 +01:00
// sheet names of references may not be valid until sheet is copied
2000-12-13 11:43:43 +00:00
pChartListenerCollection->UpdateScheduledSeriesRanges();
2000-09-18 23:16:46 +00:00
}
else
bValid = false;
2000-09-18 23:16:46 +00:00
}
}
if (bValid)
{
2011-11-05 07:00:32 +01:00
SetNoListening( true ); // noch nicht bei CopyToTable/Insert
maTabs[nOldPos]->CopyToTable(0, 0, MAXCOL, MAXROW, IDF_ALL, (pOnlyMarked != NULL),
maTabs[nNewPos], pOnlyMarked );
maTabs[nNewPos]->SetTabBgColor(maTabs[nOldPos]->GetTabBgColor());
SCsTAB nDz;
2010-11-08 10:51:25 -05:00
nDz = ((short)nNewPos) - (short)nOldPos;
maTabs[nNewPos]->UpdateReference(URM_COPY, 0, 0, nNewPos , MAXCOL, MAXROW,
2000-09-18 23:16:46 +00:00
nNewPos, 0, 0, nDz, NULL);
maTabs[nNewPos]->UpdateInsertTabAbs(nNewPos); // alle abs. um eins hoch!!
maTabs[nOldPos]->UpdateInsertTab(nNewPos);
2000-09-18 23:16:46 +00:00
maTabs[nOldPos]->UpdateCompile();
maTabs[nNewPos]->UpdateCompile( true ); // maybe already compiled in Clone, but used names need recompilation
SetNoListening( false );
maTabs[nOldPos]->StartAllListeners();
maTabs[nNewPos]->StartAllListeners();
2000-09-18 23:16:46 +00:00
SetDirty();
SetAutoCalc( bOldAutoCalc );
if (pDrawLayer)
DrawCopyPage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
2000-09-18 23:16:46 +00:00
if (pDPCollection)
pDPCollection->CopyToTab(nOldPos, nNewPos);
maTabs[nNewPos]->SetPageStyle( maTabs[nOldPos]->GetPageStyle() );
maTabs[nNewPos]->SetPendingRowHeights( maTabs[nOldPos]->IsPendingRowHeights() );
// Copy the custom print range if exists.
maTabs[nNewPos]->CopyPrintRange(*maTabs[nOldPos]);
// Copy the RTL settings
maTabs[nNewPos]->SetLayoutRTL(maTabs[nOldPos]->IsLayoutRTL());
maTabs[nNewPos]->SetLoadingRTL(maTabs[nOldPos]->IsLoadingRTL());
2000-09-18 23:16:46 +00:00
}
else
SetAutoCalc( bOldAutoCalc );
return bValid;
}
void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, const rtl::OUString& sModuleName, const rtl::OUString& sModuleSource );
sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
2011-11-05 07:00:32 +01:00
SCTAB nDestPos, bool bInsertNew,
bool bResultsOnly )
2000-09-18 23:16:46 +00:00
{
sal_uLong nRetVal = 1; // 0 => Fehler 1 = ok
// 3 => NameBox
2000-09-18 23:16:46 +00:00
// 4 => beides
if (pSrcDoc->pShell->GetMedium())
{
pSrcDoc->maFileURL = pSrcDoc->pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI);
// for unsaved files use the title name and adjust during save of file
if (pSrcDoc->maFileURL.isEmpty())
pSrcDoc->maFileURL = pSrcDoc->pShell->GetName();
}
else
{
pSrcDoc->maFileURL = pSrcDoc->pShell->GetName();
}
2011-11-05 07:00:32 +01:00
bool bValid = true;
2000-09-18 23:16:46 +00:00
if (bInsertNew) // neu einfuegen
{
2011-08-26 19:33:59 -04:00
rtl::OUString aName;
2000-09-18 23:16:46 +00:00
pSrcDoc->GetName(nSrcPos, aName);
CreateValidTabName(aName);
bValid = InsertTab(nDestPos, aName);
// Copy the RTL settings
maTabs[nDestPos]->SetLayoutRTL(pSrcDoc->maTabs[nSrcPos]->IsLayoutRTL());
2012-03-01 11:50:13 +01:00
maTabs[nDestPos]->SetLoadingRTL(pSrcDoc->maTabs[nSrcPos]->IsLoadingRTL());
2000-09-18 23:16:46 +00:00
}
else // bestehende Tabelle ersetzen
{
if (VALIDTAB(nDestPos) && nDestPos < static_cast<SCTAB>(maTabs.size()) && maTabs[nDestPos])
2000-09-18 23:16:46 +00:00
{
maTabs[nDestPos]->DeleteArea( 0,0, MAXCOL,MAXROW, IDF_ALL );
2000-09-18 23:16:46 +00:00
}
else
bValid = false;
2000-09-18 23:16:46 +00:00
}
if (bValid)
{
2011-11-05 07:00:32 +01:00
bool bOldAutoCalcSrc = false;
bool bOldAutoCalc = GetAutoCalc();
SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
2011-11-05 07:00:32 +01:00
SetNoListening( true );
2000-09-18 23:16:46 +00:00
if ( bResultsOnly )
{
bOldAutoCalcSrc = pSrcDoc->GetAutoCalc();
2011-11-05 07:00:32 +01:00
pSrcDoc->SetAutoCalc( true ); // falls was berechnet werden muss
2000-09-18 23:16:46 +00:00
}
CWS-TOOLING: integrate CWS koheimultirangecopy 2009-08-29 08:19:57 +0200 kohei r275558 : A bit of cleanup & comments. 2009-08-29 08:10:31 +0200 kohei r275557 : removed duplicated code block. 2009-08-29 07:30:33 +0200 kohei r275556 : #i104551# fixed it. 2009-08-28 17:23:28 +0200 kohei r275541 : #i104553# fixed a crash on pasting over existing data. This also fixes notes being destroyed as originally reported in the IZ entry. 2009-08-27 23:36:17 +0200 kohei r275510 : #i104550# fixed. All I had to do was to call MarkToSimple() before examining the geometry of the marked ranges. 2009-08-27 18:04:11 +0200 kohei r275501 : CWS-TOOLING: rebase CWS koheimultirangecopy to trunk@275331 (milestone: DEV300:m56) 2009-08-21 11:37:20 +0200 dr r275228 : #i10000# another wntmsci12 warning 2009-08-21 09:33:32 +0200 dr r275218 : #i10000# sunncc warnings 2009-08-20 20:01:15 +0200 kohei r275196 : Let's not initialize a variable with itself, which is not yet initialized. This was obviously a silly human error. 2009-08-05 23:24:16 +0200 kohei r274702 : correct error message on matrix fragment. 2009-08-05 20:00:12 +0200 kohei r274699 : removed header includes for indexmap.hxx. 2009-08-05 19:54:24 +0200 kohei r274698 : removed ScIndexMap entirely - we don't need this any more. 2009-08-05 19:53:01 +0200 kohei r274697 : Removed duplicated methods that use ScIndexMap. We should now use ScRangeData::IndexMap across the board. 2009-08-05 18:45:17 +0200 kohei r274695 : Refactored code to remove redundant ScDocument::CopyToClip method. 2009-07-21 18:03:54 +0200 kohei r274209 : #i25855# initial commit of the patch from ooo-build. It's buildable.
2009-09-09 07:31:32 +00:00
2000-09-18 23:16:46 +00:00
{
CWS-TOOLING: integrate CWS koheimultirangecopy 2009-08-29 08:19:57 +0200 kohei r275558 : A bit of cleanup & comments. 2009-08-29 08:10:31 +0200 kohei r275557 : removed duplicated code block. 2009-08-29 07:30:33 +0200 kohei r275556 : #i104551# fixed it. 2009-08-28 17:23:28 +0200 kohei r275541 : #i104553# fixed a crash on pasting over existing data. This also fixes notes being destroyed as originally reported in the IZ entry. 2009-08-27 23:36:17 +0200 kohei r275510 : #i104550# fixed. All I had to do was to call MarkToSimple() before examining the geometry of the marked ranges. 2009-08-27 18:04:11 +0200 kohei r275501 : CWS-TOOLING: rebase CWS koheimultirangecopy to trunk@275331 (milestone: DEV300:m56) 2009-08-21 11:37:20 +0200 dr r275228 : #i10000# another wntmsci12 warning 2009-08-21 09:33:32 +0200 dr r275218 : #i10000# sunncc warnings 2009-08-20 20:01:15 +0200 kohei r275196 : Let's not initialize a variable with itself, which is not yet initialized. This was obviously a silly human error. 2009-08-05 23:24:16 +0200 kohei r274702 : correct error message on matrix fragment. 2009-08-05 20:00:12 +0200 kohei r274699 : removed header includes for indexmap.hxx. 2009-08-05 19:54:24 +0200 kohei r274698 : removed ScIndexMap entirely - we don't need this any more. 2009-08-05 19:53:01 +0200 kohei r274697 : Removed duplicated methods that use ScIndexMap. We should now use ScRangeData::IndexMap across the board. 2009-08-05 18:45:17 +0200 kohei r274695 : Refactored code to remove redundant ScDocument::CopyToClip method. 2009-07-21 18:03:54 +0200 kohei r274209 : #i25855# initial commit of the patch from ooo-build. It's buildable.
2009-09-09 07:31:32 +00:00
NumFmtMergeHandler aNumFmtMergeHdl(this, pSrcDoc);
nDestPos = Min(nDestPos, (SCTAB)(GetTableCount() - 1));
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( pBASM);
pSrcDoc->maTabs[nSrcPos]->CopyToTable(0, 0, MAXCOL, MAXROW,
CWS-TOOLING: integrate CWS koheimultirangecopy 2009-08-29 08:19:57 +0200 kohei r275558 : A bit of cleanup & comments. 2009-08-29 08:10:31 +0200 kohei r275557 : removed duplicated code block. 2009-08-29 07:30:33 +0200 kohei r275556 : #i104551# fixed it. 2009-08-28 17:23:28 +0200 kohei r275541 : #i104553# fixed a crash on pasting over existing data. This also fixes notes being destroyed as originally reported in the IZ entry. 2009-08-27 23:36:17 +0200 kohei r275510 : #i104550# fixed. All I had to do was to call MarkToSimple() before examining the geometry of the marked ranges. 2009-08-27 18:04:11 +0200 kohei r275501 : CWS-TOOLING: rebase CWS koheimultirangecopy to trunk@275331 (milestone: DEV300:m56) 2009-08-21 11:37:20 +0200 dr r275228 : #i10000# another wntmsci12 warning 2009-08-21 09:33:32 +0200 dr r275218 : #i10000# sunncc warnings 2009-08-20 20:01:15 +0200 kohei r275196 : Let's not initialize a variable with itself, which is not yet initialized. This was obviously a silly human error. 2009-08-05 23:24:16 +0200 kohei r274702 : correct error message on matrix fragment. 2009-08-05 20:00:12 +0200 kohei r274699 : removed header includes for indexmap.hxx. 2009-08-05 19:54:24 +0200 kohei r274698 : removed ScIndexMap entirely - we don't need this any more. 2009-08-05 19:53:01 +0200 kohei r274697 : Removed duplicated methods that use ScIndexMap. We should now use ScRangeData::IndexMap across the board. 2009-08-05 18:45:17 +0200 kohei r274695 : Refactored code to remove redundant ScDocument::CopyToClip method. 2009-07-21 18:03:54 +0200 kohei r274209 : #i25855# initial commit of the patch from ooo-build. It's buildable.
2009-09-09 07:31:32 +00:00
( bResultsOnly ? IDF_ALL & ~IDF_FORMULA : IDF_ALL),
false, maTabs[nDestPos] );
CWS-TOOLING: integrate CWS koheimultirangecopy 2009-08-29 08:19:57 +0200 kohei r275558 : A bit of cleanup & comments. 2009-08-29 08:10:31 +0200 kohei r275557 : removed duplicated code block. 2009-08-29 07:30:33 +0200 kohei r275556 : #i104551# fixed it. 2009-08-28 17:23:28 +0200 kohei r275541 : #i104553# fixed a crash on pasting over existing data. This also fixes notes being destroyed as originally reported in the IZ entry. 2009-08-27 23:36:17 +0200 kohei r275510 : #i104550# fixed. All I had to do was to call MarkToSimple() before examining the geometry of the marked ranges. 2009-08-27 18:04:11 +0200 kohei r275501 : CWS-TOOLING: rebase CWS koheimultirangecopy to trunk@275331 (milestone: DEV300:m56) 2009-08-21 11:37:20 +0200 dr r275228 : #i10000# another wntmsci12 warning 2009-08-21 09:33:32 +0200 dr r275218 : #i10000# sunncc warnings 2009-08-20 20:01:15 +0200 kohei r275196 : Let's not initialize a variable with itself, which is not yet initialized. This was obviously a silly human error. 2009-08-05 23:24:16 +0200 kohei r274702 : correct error message on matrix fragment. 2009-08-05 20:00:12 +0200 kohei r274699 : removed header includes for indexmap.hxx. 2009-08-05 19:54:24 +0200 kohei r274698 : removed ScIndexMap entirely - we don't need this any more. 2009-08-05 19:53:01 +0200 kohei r274697 : Removed duplicated methods that use ScIndexMap. We should now use ScRangeData::IndexMap across the board. 2009-08-05 18:45:17 +0200 kohei r274695 : Refactored code to remove redundant ScDocument::CopyToClip method. 2009-07-21 18:03:54 +0200 kohei r274209 : #i25855# initial commit of the patch from ooo-build. It's buildable.
2009-09-09 07:31:32 +00:00
}
}
maTabs[nDestPos]->SetTabNo(nDestPos);
2000-09-18 23:16:46 +00:00
if ( !bResultsOnly )
{
SCsTAB nDz = ((SCsTAB)nDestPos) - (SCsTAB)nSrcPos;
maTabs[nDestPos]->UpdateReference(URM_COPY, 0, 0, nDestPos,
2000-09-18 23:16:46 +00:00
MAXCOL, MAXROW, nDestPos,
0, 0, nDz, NULL);
// Readjust self-contained absolute references to this sheet
maTabs[nDestPos]->TestTabRefAbs(nSrcPos);
maTabs[nDestPos]->CompileAll();
2000-09-18 23:16:46 +00:00
}
SetNoListening( false );
2000-09-18 23:16:46 +00:00
if ( !bResultsOnly )
maTabs[nDestPos]->StartAllListeners();
SetDirty( ScRange( 0, 0, nDestPos, MAXCOL, MAXROW, nDestPos));
2000-09-18 23:16:46 +00:00
if ( bResultsOnly )
pSrcDoc->SetAutoCalc( bOldAutoCalcSrc );
SetAutoCalc( bOldAutoCalc );
// Drawing kopieren
if (bInsertNew)
TransferDrawPage( pSrcDoc, nSrcPos, nDestPos );
CWS-TOOLING: integrate CWS dr70 2009-06-09 13:52:02 +0200 dr r272770 : #i101930# SXC import broken 2009-06-05 11:50:16 +0200 dr r272675 : #i10000# compiler warning 2009-06-05 11:24:39 +0200 dr r272674 : #i10000# compiler warning 2009-06-05 10:35:22 +0200 dr r272668 : #i10000# compiler warning 2009-06-04 16:53:32 +0200 dr r272646 : CWS-TOOLING: rebase CWS dr70 to trunk@272291 (milestone: DEV300:m49) 2009-06-04 14:50:45 +0200 dr r272633 : #i10000# compiler warning 2009-06-03 18:50:57 +0200 dr r272603 : #i101930# fix ODS export of uninit'ed notes, do not craete note captions in UpdatePendingRowHeights 2009-05-28 11:11:17 +0200 dr r272384 : #i101930# note captions must be created before changing row/column size 2009-05-27 15:48:44 +0200 iha r272356 : #i101925# metafile creation is requested superfluously during inplace editing 2009-05-27 15:46:44 +0200 iha r272355 : #i101925# metafile creation is requested superfluously during inplace editing 2009-05-27 15:06:58 +0200 iha r272349 : #i101928# superfluous paint calls while entering and editing charts 2009-05-27 15:01:08 +0200 iha r272348 : #i101928# superfluous paint calls while entering and editing charts 2009-05-26 14:43:39 +0200 dr r272303 : #i101930# import performance: invisible cell notes cache caption data 2009-05-22 18:44:19 +0200 dr r272205 : #i101930# preparations for uninitialized notes (performance), adapted ODF import filter 2009-05-14 19:50:43 +0200 dr r271918 : #i101930# 'recycle' the shapes already created while loading cell notes 2009-05-06 16:07:45 +0200 dr r271598 : #i100827# improve performance of HTML query filter, patch by mmeeks, slightly modified 2009-05-06 11:02:38 +0200 dr r271577 : #i100827# improve performance of HTML query filter, patch by mmeeks 2009-05-06 10:50:13 +0200 dr r271575 : #i86650# improve performance of HTML query filter 2009-05-05 10:09:44 +0200 nn r271502 : #i101428# better handling of non-existing view data 2009-04-29 16:42:57 +0200 nn r271384 : #i101428# after loading, update row heights per sheet on demand
2009-07-03 12:42:53 +00:00
maTabs[nDestPos]->SetPendingRowHeights( pSrcDoc->maTabs[nSrcPos]->IsPendingRowHeights() );
2000-09-18 23:16:46 +00:00
}
if (!bValid)
nRetVal = 0;
2011-11-05 07:00:32 +01:00
bool bVbaEnabled = IsInVBAMode();
if ( bVbaEnabled )
{
SfxObjectShell* pSrcShell = pSrcDoc ? pSrcDoc->GetDocumentShell() : NULL;
if ( pSrcShell )
{
rtl::OUString aLibName(RTL_CONSTASCII_USTRINGPARAM("Standard"));
const BasicManager *pBasicManager = pSrcShell->GetBasicManager();
if (pBasicManager && pBasicManager->GetName().Len() > 0)
aLibName = pSrcShell->GetBasicManager()->GetName();
rtl::OUString sCodeName;
rtl::OUString sSource;
uno::Reference< script::XLibraryContainer > xLibContainer = pSrcShell->GetBasicContainer();
uno::Reference< container::XNameContainer > xLib;
if( xLibContainer.is() )
{
uno::Any aLibAny = xLibContainer->getByName(aLibName);
aLibAny >>= xLib;
}
if( xLib.is() )
{
2011-08-26 19:33:59 -04:00
rtl::OUString sSrcCodeName;
pSrcDoc->GetCodeName( nSrcPos, sSrcCodeName );
rtl::OUString sRTLSource;
xLib->getByName( sSrcCodeName ) >>= sRTLSource;
sSource = sRTLSource;
}
VBA_InsertModule( *this, nDestPos, sCodeName, sSource );
}
}
2000-09-18 23:16:46 +00:00
return nRetVal;
}
// ----------------------------------------------------------------------------
void ScDocument::SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const sal_uInt16 nError)
2000-09-18 23:16:46 +00:00
{
if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
if (maTabs[nTab])
maTabs[nTab]->SetError( nCol, nRow, nError );
2000-09-18 23:16:46 +00:00
}
// ----------------------------------------------------------------------------
void ScDocument::SetConsolidateDlgData( const ScConsolidateParam* pData )
{
delete pConsolidateDlgData;
if ( pData )
pConsolidateDlgData = new ScConsolidateParam( *pData );
else
pConsolidateDlgData = NULL;
}
void ScDocument::SetChangeViewSettings(const ScChangeViewSettings& rNew)
{
if (pChangeViewSettings==NULL)
pChangeViewSettings = new ScChangeViewSettings;
OSL_ENSURE( pChangeViewSettings, "Oops. No ChangeViewSettings :-( by!" );
2000-09-18 23:16:46 +00:00
*pChangeViewSettings=rNew;
}
2001-11-26 08:28:27 +00:00
// ----------------------------------------------------------------------------
2000-09-18 23:16:46 +00:00
2001-11-26 08:28:27 +00:00
ScFieldEditEngine* ScDocument::CreateFieldEditEngine()
{
ScFieldEditEngine* pNewEditEngine = NULL;
2001-11-26 08:28:27 +00:00
if (!pCacheFieldEditEngine)
{
pNewEditEngine = new ScFieldEditEngine(
this, GetEnginePool(), GetEditPool(), false);
2001-11-26 08:28:27 +00:00
}
else
{
if ( !bImportingXML )
{
// #i66209# previous use might not have restored update mode,
2011-11-05 07:00:32 +01:00
// ensure same state as for a new EditEngine (UpdateMode = true)
if ( !pCacheFieldEditEngine->GetUpdateMode() )
2011-11-05 07:00:32 +01:00
pCacheFieldEditEngine->SetUpdateMode(true);
}
pNewEditEngine = pCacheFieldEditEngine;
2001-11-26 08:28:27 +00:00
pCacheFieldEditEngine = NULL;
}
return pNewEditEngine;
2001-11-26 08:28:27 +00:00
}
2000-09-18 23:16:46 +00:00
2001-11-26 08:28:27 +00:00
void ScDocument::DisposeFieldEditEngine(ScFieldEditEngine*& rpEditEngine)
{
if (!pCacheFieldEditEngine && rpEditEngine)
{
pCacheFieldEditEngine = rpEditEngine;
pCacheFieldEditEngine->Clear();
}
else
delete rpEditEngine;
rpEditEngine = NULL;
}
2000-09-18 23:16:46 +00:00
// ----------------------------------------------------------------------------
ScRecursionHelper* ScDocument::CreateRecursionHelperInstance()
{
return new ScRecursionHelper;
}
// ----------------------------------------------------------------------------
ScLookupCache & ScDocument::GetLookupCache( const ScRange & rRange )
{
ScLookupCache* pCache = 0;
if (!pLookupCacheMapImpl)
pLookupCacheMapImpl = new ScLookupCacheMapImpl;
ScLookupCacheMap::iterator it( pLookupCacheMapImpl->aCacheMap.find( rRange));
if (it == pLookupCacheMapImpl->aCacheMap.end())
{
pCache = new ScLookupCache( this, rRange);
AddLookupCache( *pCache);
}
else
pCache = (*it).second;
return *pCache;
}
void ScDocument::AddLookupCache( ScLookupCache & rCache )
{
if (!pLookupCacheMapImpl->aCacheMap.insert( ::std::pair< const ScRange,
ScLookupCache*>( rCache.getRange(), &rCache)).second)
{
OSL_FAIL( "ScDocument::AddLookupCache: couldn't add to hash map");
}
else
StartListeningArea( rCache.getRange(), &rCache);
}
void ScDocument::RemoveLookupCache( ScLookupCache & rCache )
{
ScLookupCacheMap::iterator it( pLookupCacheMapImpl->aCacheMap.find(
rCache.getRange()));
if (it == pLookupCacheMapImpl->aCacheMap.end())
{
OSL_FAIL( "ScDocument::RemoveLookupCache: range not found in hash map");
}
else
{
ScLookupCache* pCache = (*it).second;
pLookupCacheMapImpl->aCacheMap.erase( it);
EndListeningArea( pCache->getRange(), &rCache);
}
}
void ScDocument::ClearLookupCaches()
{
if( pLookupCacheMapImpl )
pLookupCacheMapImpl->clear();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */