2000-09-18 23:16:46 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 18:22:33 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 23:16:46 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 23:16:46 +00:00
|
|
|
*
|
2008-04-10 18:22:33 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 23:16:46 +00:00
|
|
|
*
|
2008-04-10 18:22:33 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 23:16:46 +00:00
|
|
|
*
|
2008-04-10 18:22:33 +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
|
|
|
*
|
2008-04-10 18:22:33 +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
|
|
|
*
|
2008-04-10 18:22:33 +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
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-07-21 09:51:42 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sc.hxx"
|
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
// INCLUDE ---------------------------------------------------------------
|
|
|
|
|
|
|
|
#define _ZFORLIST_DECLARE_TABLE
|
|
|
|
#include "scitems.hxx"
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/eeitem.hxx>
|
2000-09-18 23:16:46 +00:00
|
|
|
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/editeng.hxx>
|
|
|
|
#include <editeng/forbiddencharacterstable.hxx>
|
2010-01-13 22:25:07 +01:00
|
|
|
#include <sfx2/linkmgr.hxx>
|
2004-09-08 12:43:12 +00:00
|
|
|
#include <svx/svdpool.hxx>
|
2008-01-29 14:17:20 +00:00
|
|
|
#include <svx/svdobj.hxx>
|
2000-09-18 23:16:46 +00:00
|
|
|
#include <sfx2/bindings.hxx>
|
|
|
|
#include <sfx2/objsh.hxx>
|
|
|
|
#include <sfx2/printer.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/zforlist.hxx>
|
|
|
|
#include <svl/zformat.hxx>
|
2006-05-04 14:01:03 +00:00
|
|
|
#include <vcl/virdev.hxx>
|
2000-10-20 08:15:16 +00:00
|
|
|
#include <comphelper/processfactory.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/PasswordHelper.hxx>
|
2001-07-19 15:44:21 +00:00
|
|
|
#include <tools/tenccvt.hxx>
|
2001-08-10 17:02:39 +00:00
|
|
|
#include <tools/list.hxx>
|
2001-10-25 16:46:44 +00:00
|
|
|
#include <rtl/crc.h>
|
2010-07-06 19:34:53 +02:00
|
|
|
#include <basic/basmgr.hxx>
|
2000-10-19 14:29:41 +00:00
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
#include "document.hxx"
|
|
|
|
#include "table.hxx"
|
|
|
|
#include "attrib.hxx"
|
|
|
|
#include "patattr.hxx"
|
|
|
|
#include "rangenam.hxx"
|
|
|
|
#include "dbcolect.hxx"
|
|
|
|
#include "pivot.hxx"
|
|
|
|
#include "docpool.hxx"
|
|
|
|
#include "stlpool.hxx"
|
|
|
|
#include "stlsheet.hxx"
|
|
|
|
#include "globstr.hrc"
|
|
|
|
#include "chartarr.hxx"
|
2007-08-03 12:06:51 +00:00
|
|
|
#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 "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"
|
2001-01-31 15:44:36 +00:00
|
|
|
#include "poolhelp.hxx"
|
2007-05-22 18:41:42 +00:00
|
|
|
#include "unoreflist.hxx"
|
2003-10-21 07:47:10 +00:00
|
|
|
#include "listenercalls.hxx"
|
2005-03-08 10:29:42 +00:00
|
|
|
#include "recursionhelper.hxx"
|
2007-09-27 12:52:23 +00:00
|
|
|
#include "lookupcache.hxx"
|
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"
|
2009-07-29 14:46:52 +00:00
|
|
|
#include "formulaparserpool.hxx"
|
2009-09-09 07:31:32 +00:00
|
|
|
#include "clipparam.hxx"
|
2010-07-06 19:34:53 +02:00
|
|
|
|
|
|
|
using namespace com::sun::star;
|
2007-09-27 12:52:23 +00:00
|
|
|
|
|
|
|
// pImpl because including lookupcache.hxx in document.hxx isn't wanted, and
|
2008-07-07 06:39:38 +00:00
|
|
|
// dtor plus helpers are convenient.
|
2007-09-27 12:52:23 +00:00
|
|
|
struct ScLookupCacheMapImpl
|
|
|
|
{
|
|
|
|
ScLookupCacheMap aCacheMap;
|
|
|
|
~ScLookupCacheMapImpl()
|
2008-07-07 06:39:38 +00:00
|
|
|
{
|
|
|
|
freeCaches();
|
|
|
|
}
|
|
|
|
void clear()
|
|
|
|
{
|
|
|
|
freeCaches();
|
|
|
|
// Zap map.
|
|
|
|
ScLookupCacheMap aTmp;
|
|
|
|
aCacheMap.swap( aTmp);
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
void freeCaches()
|
2007-09-27 12:52:23 +00:00
|
|
|
{
|
|
|
|
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() ),
|
2009-06-04 16:21:29 +00:00
|
|
|
mpUndoManager( NULL ),
|
2005-03-08 10:29:42 +00:00
|
|
|
pEditEngine( NULL ),
|
|
|
|
pNoteEngine( NULL ),
|
|
|
|
pNoteItemPool( NULL ),
|
2000-09-18 23:16:46 +00:00
|
|
|
pShell( pDocShell ),
|
|
|
|
pPrinter( NULL ),
|
2006-05-04 14:01:03 +00:00
|
|
|
pVirtualDevice_100th_mm( NULL ),
|
2005-03-08 10:29:42 +00:00
|
|
|
pDrawLayer( NULL ),
|
|
|
|
pColorTable( NULL ),
|
2000-09-18 23:16:46 +00:00
|
|
|
pCondFormList( NULL ),
|
|
|
|
pValidationList( NULL ),
|
|
|
|
pFormatExchangeList( NULL ),
|
2005-03-08 10:29:42 +00:00
|
|
|
pDPCollection( NULL ),
|
2000-09-18 23:16:46 +00:00
|
|
|
pLinkManager( NULL ),
|
2005-03-08 10:29:42 +00:00
|
|
|
pFormulaTree( NULL ),
|
|
|
|
pEOFormulaTree( NULL ),
|
|
|
|
pFormulaTrack( NULL ),
|
|
|
|
pEOFormulaTrack( NULL ),
|
|
|
|
pOtherObjects( NULL ),
|
|
|
|
pClipData( NULL ),
|
|
|
|
pDetOpList(NULL),
|
|
|
|
pChangeTrack( NULL ),
|
|
|
|
pUnoBroadcaster( NULL ),
|
|
|
|
pUnoListenerCalls( NULL ),
|
2007-05-22 18:41:42 +00:00
|
|
|
pUnoRefUndoList( NULL ),
|
2005-03-08 10:29:42 +00:00
|
|
|
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 ),
|
2009-09-09 07:31:32 +00:00
|
|
|
mpClipParam( NULL),
|
|
|
|
pExternalRefMgr( NULL ),
|
2000-09-18 23:16:46 +00:00
|
|
|
pViewOptions( NULL ),
|
2005-03-08 10:29:42 +00:00
|
|
|
pDocOptions( NULL ),
|
2000-09-18 23:16:46 +00:00
|
|
|
pExtDocOptions( NULL ),
|
|
|
|
pConsolidateDlgData( NULL ),
|
2005-03-08 10:29:42 +00:00
|
|
|
pRecursionHelper( NULL ),
|
2006-01-31 17:35:12 +00:00
|
|
|
pAutoNameCache( NULL ),
|
2007-09-27 12:52:23 +00:00
|
|
|
pLookupCacheMapImpl( NULL ),
|
2007-05-22 18:41:42 +00:00
|
|
|
nUnoObjectId( 0 ),
|
2005-03-08 10:29:42 +00:00
|
|
|
nRangeOverflowType( 0 ),
|
2000-09-18 23:16:46 +00:00
|
|
|
aCurTextWidthCalcPos(MAXCOL,0,0),
|
2005-03-08 10:29:42 +00:00
|
|
|
nFormulaCodeInTree(0),
|
|
|
|
nXMLImportedFormulaCount( 0 ),
|
|
|
|
nInterpretLevel(0),
|
|
|
|
nMacroInterpretLevel(0),
|
|
|
|
nInterpreterTableOpLevel(0),
|
|
|
|
nMaxTableNumber( 0 ),
|
|
|
|
nSrcVer( SC_CURRENT_VERSION ),
|
|
|
|
nSrcMaxRow( MAXROW ),
|
|
|
|
nFormulaTrackCount(0),
|
|
|
|
nHardRecalcState(0),
|
|
|
|
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 ),
|
2000-09-18 23:16:46 +00:00
|
|
|
// bNoSetDirty( TRUE ),
|
|
|
|
bNoSetDirty( FALSE ),
|
|
|
|
bInsertingFromOtherDoc( FALSE ),
|
2010-06-23 13:38:34 +02:00
|
|
|
bLoadingMedium( false ),
|
|
|
|
bImportingXML( false ),
|
2006-03-27 08:27:02 +00:00
|
|
|
bXMLFromWrapper( FALSE ),
|
2000-09-18 23:16:46 +00:00
|
|
|
bCalcingAfterLoad( FALSE ),
|
|
|
|
bNoListening( FALSE ),
|
|
|
|
bIdleDisabled( FALSE ),
|
|
|
|
bInLinkUpdate( FALSE ),
|
|
|
|
bChartListenerCollectionNeedsUpdate( FALSE ),
|
|
|
|
bHasForcedFormulas( FALSE ),
|
|
|
|
bInDtorClear( FALSE ),
|
|
|
|
bExpandRefs( FALSE ),
|
2005-03-08 10:29:42 +00:00
|
|
|
bDetectiveDirty( FALSE ),
|
|
|
|
nMacroCallMode( SC_MACROCALL_ALLOWED ),
|
|
|
|
bHasMacroFunc( FALSE ),
|
|
|
|
nVisSpellState( 0 ),
|
2001-08-10 17:02:39 +00:00
|
|
|
nAsianCompression(SC_ASIANCOMPRESSION_INVALID),
|
2001-10-19 15:01:00 +00:00
|
|
|
nAsianKerning(SC_ASIANKERNING_INVALID),
|
2006-12-19 11:59:12 +00:00
|
|
|
bSetDrawDefaults( FALSE ),
|
2001-11-26 08:28:27 +00:00
|
|
|
bPastingDrawFromOtherDoc( FALSE ),
|
2002-10-01 16:15:54 +00:00
|
|
|
nInDdeLinkUpdate( 0 ),
|
2003-03-26 17:07:02 +00:00
|
|
|
bInUnoBroadcast( FALSE ),
|
2003-10-21 07:47:10 +00:00
|
|
|
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 ),
|
2008-01-10 12:10:57 +00:00
|
|
|
bStyleSheetUsageInvalid( TRUE ),
|
2009-06-04 16:21:29 +00:00
|
|
|
mbUndoEnabled( true ),
|
2008-01-10 12:10:57 +00:00
|
|
|
mbAdjustHeightEnabled( true ),
|
|
|
|
mbExecuteLinkEnabled( true ),
|
|
|
|
mbChangeReadOnlyEnabled( false ),
|
2009-09-07 15:38:19 +00:00
|
|
|
mbStreamValidLocked( false ),
|
2008-01-10 12:10:57 +00:00
|
|
|
mnNamedRangesLockCount( 0 )
|
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);
|
2008-03-06 14:25:51 +00:00
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
eSrcSet = gsl_getSystemTextEncoding();
|
|
|
|
|
|
|
|
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
|
|
|
|
2001-01-31 15:44:36 +00:00
|
|
|
xPoolHelper = new ScPoolHelper( this );
|
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
pTab[0] = NULL;
|
|
|
|
pBASM = new ScBroadcastAreaSlotMachine( this );
|
|
|
|
pChartListenerCollection = new ScChartListenerCollection( this );
|
2001-04-21 19:31:39 +00:00
|
|
|
pRefreshTimerControl = new ScRefreshTimerControl;
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pTab[0] = NULL;
|
|
|
|
pBASM = NULL;
|
|
|
|
pChartListenerCollection = NULL;
|
2001-04-21 19:31:39 +00:00
|
|
|
pRefreshTimerControl = NULL;
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
for (SCTAB i=1; i<=MAXTAB; i++)
|
2000-09-18 23:16:46 +00:00
|
|
|
pTab[i] = NULL;
|
|
|
|
|
|
|
|
pRangeName = new ScRangeName( 4, 4, FALSE, this );
|
|
|
|
pDBCollection = new ScDBCollection( 4, 4, FALSE, this );
|
|
|
|
pSelectionAttr = NULL;
|
|
|
|
pChartCollection = new ScChartCollection;
|
2007-08-03 12:06:51 +00:00
|
|
|
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
|
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 );
|
2009-09-08 04:57:32 +00:00
|
|
|
}
|
|
|
|
return pLinkManager;
|
|
|
|
}
|
|
|
|
|
2001-10-25 16:46:44 +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
|
|
|
void ScDocument::SetStorageGrammar( formula::FormulaGrammar::Grammar eGram )
|
2008-03-06 14:25:51 +00:00
|
|
|
{
|
|
|
|
DBG_ASSERT(
|
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,
|
2008-03-06 14:25:51 +00:00
|
|
|
"ScDocument::SetStorageGrammar: wrong storage grammar");
|
|
|
|
|
2008-05-14 08:50:52 +00:00
|
|
|
eStorageGrammar = eGram;
|
2008-03-06 14:25:51 +00:00
|
|
|
|
|
|
|
// 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);
|
2008-03-06 14:25:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-02-03 11:16:56 +00: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;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-10-25 16:46:44 +00:00
|
|
|
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 )
|
|
|
|
{
|
|
|
|
DBG_ASSERT( pTrack->GetDocument() == this, "SetChangeTrack: different documents" );
|
|
|
|
if ( !pTrack || pTrack == pChangeTrack || pTrack->GetDocument() != this )
|
|
|
|
return ;
|
|
|
|
EndChangeTracking();
|
|
|
|
pChangeTrack = pTrack;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-02-27 11:01:25 +00:00
|
|
|
IMPL_LINK( ScDocument, TrackTimeHdl, Timer*, EMPTYARG )
|
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 ) );
|
|
|
|
ResetChanged( ScRange(0,0,0,MAXCOL,MAXROW,MAXTAB) );
|
|
|
|
|
|
|
|
// modified...
|
|
|
|
|
|
|
|
if (!pShell->IsModified())
|
|
|
|
{
|
|
|
|
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()
|
|
|
|
{
|
|
|
|
DBG_ASSERT( !bInLinkUpdate, "bInLinkUpdate in dtor" );
|
|
|
|
|
|
|
|
bInDtorClear = TRUE;
|
|
|
|
|
2001-04-21 19:31:39 +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
|
|
|
|
|
2009-09-08 04:57:32 +00:00
|
|
|
if ( GetLinkManager() )
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
|
|
|
// BaseLinks freigeben
|
|
|
|
for ( USHORT n = pLinkManager->GetServers().Count(); n; )
|
2001-04-11 13:36:34 +00:00
|
|
|
pLinkManager->GetServers()[ --n ]->Closed();
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
if ( pLinkManager->GetLinks().Count() )
|
|
|
|
pLinkManager->Remove( 0, pLinkManager->GetLinks().Count() );
|
|
|
|
}
|
|
|
|
|
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();
|
2008-12-12 09:38:47 +00:00
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
ScAddInAsync::RemoveDocument( this );
|
|
|
|
ScAddInListener::RemoveDocument( this );
|
2009-07-29 14:46:52 +00:00
|
|
|
DELETEZ( pChartListenerCollection); // vor pBASM wg. evtl. Listener!
|
2007-09-27 12:52:23 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2007-05-22 18:41:42 +00:00
|
|
|
delete pUnoRefUndoList;
|
2003-10-21 07:47:10 +00:00
|
|
|
delete pUnoListenerCalls;
|
|
|
|
|
2004-07-30 15:15:42 +00:00
|
|
|
Clear( sal_True ); // TRUE = from destructor (needed for SdrModel::ClearModel)
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
if (pCondFormList)
|
|
|
|
{
|
|
|
|
pCondFormList->DeleteAndDestroy( 0, pCondFormList->Count() );
|
|
|
|
DELETEZ(pCondFormList);
|
|
|
|
}
|
|
|
|
if (pValidationList)
|
|
|
|
{
|
|
|
|
pValidationList->DeleteAndDestroy( 0, pValidationList->Count() );
|
|
|
|
DELETEZ(pValidationList);
|
|
|
|
}
|
|
|
|
delete pRangeName;
|
|
|
|
delete pDBCollection;
|
|
|
|
delete pSelectionAttr;
|
2007-08-03 12:06:51 +00:00
|
|
|
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;
|
2004-09-08 12:43:12 +00:00
|
|
|
delete pNoteEngine;
|
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
|
|
|
SfxItemPool::Free(pNoteItemPool);
|
2000-09-18 23:16:46 +00:00
|
|
|
delete pChangeViewSettings; // und weg damit
|
2006-05-04 14:01:03 +00:00
|
|
|
delete pVirtualDevice_100th_mm;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
delete pDPCollection;
|
|
|
|
|
2001-11-28 08:48:27 +00:00
|
|
|
// delete the EditEngine before destroying the xPoolHelper
|
|
|
|
delete pCacheFieldEditEngine;
|
|
|
|
|
2001-01-31 15:44:36 +00:00
|
|
|
if ( xPoolHelper.isValid() && !bIsClip )
|
|
|
|
xPoolHelper->SourceDocumentGone();
|
|
|
|
xPoolHelper.unbind();
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
DeleteColorTable();
|
2000-11-26 14:24:00 +00:00
|
|
|
delete pScriptTypeData;
|
2001-02-16 15:11:05 +00:00
|
|
|
delete pOtherObjects;
|
2005-03-08 10:29:42 +00:00
|
|
|
delete pRecursionHelper;
|
2001-11-26 08:28:27 +00:00
|
|
|
|
2006-01-31 17:35:12 +00:00
|
|
|
DBG_ASSERT( !pAutoNameCache, "AutoNameCache still set in dtor" );
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ScDocument::InitClipPtrs( ScDocument* pSourceDoc )
|
|
|
|
{
|
|
|
|
DBG_ASSERT(bIsClip, "InitClipPtrs und nicht bIsClip");
|
|
|
|
|
|
|
|
if (pCondFormList)
|
|
|
|
{
|
|
|
|
pCondFormList->DeleteAndDestroy( 0, pCondFormList->Count() );
|
|
|
|
DELETEZ(pCondFormList);
|
|
|
|
}
|
|
|
|
if (pValidationList)
|
|
|
|
{
|
|
|
|
pValidationList->DeleteAndDestroy( 0, pValidationList->Count() );
|
|
|
|
DELETEZ(pValidationList);
|
|
|
|
}
|
|
|
|
|
|
|
|
Clear();
|
2001-01-31 15:44:36 +00:00
|
|
|
|
|
|
|
xPoolHelper = pSourceDoc->xPoolHelper;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
// bedingte Formate / Gueltigkeiten
|
|
|
|
//! Vorlagen kopieren?
|
|
|
|
const ScConditionalFormatList* pSourceCond = pSourceDoc->pCondFormList;
|
|
|
|
if ( pSourceCond )
|
|
|
|
pCondFormList = new ScConditionalFormatList(this, *pSourceCond);
|
|
|
|
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;
|
2005-03-08 14:41:15 +00:00
|
|
|
|
|
|
|
// 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
|
|
|
}
|
|
|
|
|
2001-01-31 15:44:36 +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 )
|
|
|
|
{
|
2001-07-11 18:22:05 +00:00
|
|
|
pEditEngine = new ScFieldEditEngine( GetEnginePool(), GetEditPool() );
|
2000-09-18 23:16:46 +00:00
|
|
|
pEditEngine->SetUpdateMode( FALSE );
|
|
|
|
pEditEngine->EnableUndo( FALSE );
|
|
|
|
pEditEngine->SetRefMapMode( MAP_100TH_MM );
|
2001-04-06 13:37:54 +00:00
|
|
|
pEditEngine->SetForbiddenCharsTable( xForbiddenCharacters );
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
return *pEditEngine;
|
|
|
|
}
|
|
|
|
|
2004-09-08 12:43:12 +00:00
|
|
|
ScNoteEditEngine& ScDocument::GetNoteEngine()
|
|
|
|
{
|
|
|
|
if ( !pNoteEngine )
|
|
|
|
{
|
|
|
|
pNoteEngine = new ScNoteEditEngine( GetEnginePool(), GetEditPool() );
|
|
|
|
pNoteEngine->SetUpdateMode( FALSE );
|
|
|
|
pNoteEngine->EnableUndo( FALSE );
|
|
|
|
pNoteEngine->SetRefMapMode( MAP_100TH_MM );
|
|
|
|
pNoteEngine->SetForbiddenCharsTable( xForbiddenCharacters );
|
|
|
|
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);
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
for (SCTAB i = 0; i <= MAXTAB; i++)
|
2000-09-18 23:16:46 +00:00
|
|
|
if (pSourceDoc->pTab[i])
|
|
|
|
if (!pMarks || pMarks->GetTableSelect(i))
|
|
|
|
{
|
|
|
|
String aString;
|
|
|
|
pSourceDoc->pTab[i]->GetName(aString);
|
|
|
|
pTab[i] = new ScTable(this, i, aString);
|
2004-02-03 11:16:56 +00:00
|
|
|
pTab[i]->SetLayoutRTL( pSourceDoc->pTab[i]->IsLayoutRTL() );
|
2000-09-18 23:16:46 +00:00
|
|
|
nMaxTableNumber = i+1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2008-01-29 14:17:20 +00:00
|
|
|
{
|
2000-09-18 23:16:46 +00:00
|
|
|
DBG_ERROR("ResetClip");
|
2008-01-29 14:17:20 +00:00
|
|
|
}
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
void ScDocument::ResetClip( ScDocument* pSourceDoc, SCTAB nTab )
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
|
|
|
if (bIsClip)
|
|
|
|
{
|
|
|
|
InitClipPtrs(pSourceDoc);
|
|
|
|
|
|
|
|
pTab[nTab] = new ScTable(this, nTab,
|
|
|
|
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("baeh")));
|
2004-02-03 11:16:56 +00:00
|
|
|
if (pSourceDoc->pTab[nTab])
|
|
|
|
pTab[nTab]->SetLayoutRTL( pSourceDoc->pTab[nTab]->IsLayoutRTL() );
|
2000-09-18 23:16:46 +00:00
|
|
|
nMaxTableNumber = nTab+1;
|
|
|
|
}
|
|
|
|
else
|
2008-01-29 14:17:20 +00:00
|
|
|
{
|
2000-09-18 23:16:46 +00:00
|
|
|
DBG_ERROR("ResetClip");
|
2008-01-29 14:17:20 +00:00
|
|
|
}
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
|
2007-02-27 11:01:25 +00:00
|
|
|
void ScDocument::DeleteNumberFormat( const sal_uInt32* /* pDelKeys */, sal_uInt32 /* nCount */ )
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
for (ULONG i = 0; i < nCount; i++)
|
2001-01-31 15:44:36 +00:00
|
|
|
xPoolHelper->GetFormTable()->DeleteEntry(pDelKeys[i]);
|
2000-09-18 23:16:46 +00:00
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
|
2000-09-18 23:16:46 +00:00
|
|
|
ScBaseCell* pCell, ULONG nFormatIndex, BOOL bForceTab )
|
|
|
|
{
|
|
|
|
if (VALIDTAB(nTab))
|
|
|
|
{
|
|
|
|
if ( bForceTab && !pTab[nTab] )
|
|
|
|
{
|
|
|
|
BOOL bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags
|
|
|
|
|
|
|
|
pTab[nTab] = new ScTable(this, nTab,
|
|
|
|
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("temp")),
|
|
|
|
bExtras, bExtras);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (pTab[nTab])
|
|
|
|
pTab[nTab]->PutCell( nCol, nRow, nFormatIndex, pCell );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
BOOL ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
|
2000-09-18 23:16:46 +00:00
|
|
|
BOOL bNotes ) const
|
|
|
|
{
|
2004-06-04 09:21:50 +00:00
|
|
|
if (ValidTab(nTab) && pTab[nTab])
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
|
|
|
BOOL bAny = pTab[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes );
|
|
|
|
if (pDrawLayer)
|
|
|
|
{
|
|
|
|
ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab);
|
|
|
|
if (DrawGetPrintArea( aDrawRange, TRUE, TRUE ))
|
|
|
|
{
|
|
|
|
if (aDrawRange.aEnd.Col()>rEndCol) rEndCol=aDrawRange.aEnd.Col();
|
|
|
|
if (aDrawRange.aEnd.Row()>rEndRow) rEndRow=aDrawRange.aEnd.Row();
|
|
|
|
bAny = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return bAny;
|
|
|
|
}
|
|
|
|
|
|
|
|
rEndCol = 0;
|
|
|
|
rEndRow = 0;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
BOOL ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
|
|
|
|
SCCOL& rEndCol, BOOL bNotes ) const
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2004-06-04 09:21:50 +00:00
|
|
|
if (ValidTab(nTab) && pTab[nTab])
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
|
|
|
BOOL bAny = pTab[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol, bNotes );
|
|
|
|
if (pDrawLayer)
|
|
|
|
{
|
|
|
|
ScRange aDrawRange(0,nStartRow,nTab, MAXCOL,nEndRow,nTab);
|
|
|
|
if (DrawGetPrintArea( aDrawRange, TRUE, FALSE ))
|
|
|
|
{
|
|
|
|
if (aDrawRange.aEnd.Col()>rEndCol) rEndCol=aDrawRange.aEnd.Col();
|
|
|
|
bAny = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return bAny;
|
|
|
|
}
|
|
|
|
|
|
|
|
rEndCol = 0;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
BOOL ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
|
|
|
|
SCROW& rEndRow, BOOL bNotes ) const
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2004-06-04 09:21:50 +00:00
|
|
|
if (ValidTab(nTab) && pTab[nTab])
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
|
|
|
BOOL bAny = pTab[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes );
|
|
|
|
if (pDrawLayer)
|
|
|
|
{
|
|
|
|
ScRange aDrawRange(nStartCol,0,nTab, nEndCol,MAXROW,nTab);
|
|
|
|
if (DrawGetPrintArea( aDrawRange, FALSE, TRUE ))
|
|
|
|
{
|
|
|
|
if (aDrawRange.aEnd.Row()>rEndRow) rEndRow=aDrawRange.aEnd.Row();
|
|
|
|
bAny = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return bAny;
|
|
|
|
}
|
|
|
|
|
|
|
|
rEndRow = 0;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
BOOL ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2004-06-04 09:21:50 +00:00
|
|
|
if (ValidTab(nTab) && pTab[nTab])
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
|
|
|
BOOL bAny = pTab[nTab]->GetDataStart( rStartCol, rStartRow );
|
|
|
|
if (pDrawLayer)
|
|
|
|
{
|
|
|
|
ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab);
|
|
|
|
if (DrawGetPrintArea( aDrawRange, TRUE, TRUE ))
|
|
|
|
{
|
|
|
|
if (aDrawRange.aStart.Col()<rStartCol) rStartCol=aDrawRange.aStart.Col();
|
|
|
|
if (aDrawRange.aStart.Row()<rStartRow) rStartRow=aDrawRange.aStart.Row();
|
|
|
|
bAny = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return bAny;
|
|
|
|
}
|
|
|
|
|
|
|
|
rStartCol = 0;
|
|
|
|
rStartRow = 0;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
BOOL ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos )
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
|
|
|
if (nOldPos == nNewPos) return FALSE;
|
|
|
|
BOOL bValid = FALSE;
|
|
|
|
if (VALIDTAB(nOldPos))
|
|
|
|
{
|
|
|
|
if (pTab[nOldPos])
|
|
|
|
{
|
2004-06-04 09:21:50 +00:00
|
|
|
SCTAB nTabCount = GetTableCount();
|
2000-09-18 23:16:46 +00:00
|
|
|
if (nTabCount > 1)
|
|
|
|
{
|
|
|
|
BOOL bOldAutoCalc = GetAutoCalc();
|
|
|
|
SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
|
|
|
|
SetNoListening( TRUE );
|
|
|
|
ScProgress* pProgress = new ScProgress( GetDocumentShell(),
|
|
|
|
ScGlobal::GetRscString(STR_UNDO_MOVE_TAB), GetCodeCount() );
|
|
|
|
if (nNewPos == SC_TAB_APPEND)
|
|
|
|
nNewPos = nTabCount-1;
|
|
|
|
|
|
|
|
// Referenz-Updaterei
|
|
|
|
//! mit UpdateReference zusammenfassen!
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
SCsTAB nDz = ((SCsTAB)nNewPos) - (SCsTAB)nOldPos;
|
2000-09-18 23:16:46 +00:00
|
|
|
ScRange aSourceRange( 0,0,nOldPos, MAXCOL,MAXROW,nOldPos );
|
|
|
|
pRangeName->UpdateTabRef(nOldPos, 3, nNewPos);
|
|
|
|
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 );
|
2000-09-18 23:16:46 +00:00
|
|
|
if ( pCondFormList )
|
|
|
|
pCondFormList->UpdateMoveTab( nOldPos, nNewPos );
|
2005-09-28 10:30:23 +00:00
|
|
|
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 = pTab[nOldPos];
|
2004-06-04 09:21:50 +00:00
|
|
|
SCTAB i;
|
2000-09-18 23:16:46 +00:00
|
|
|
for (i = nOldPos + 1; i < nTabCount; i++)
|
|
|
|
pTab[i - 1] = pTab[i];
|
|
|
|
pTab[i-1] = NULL;
|
|
|
|
for (i = nTabCount - 1; i > nNewPos; i--)
|
|
|
|
pTab[i] = pTab[i - 1];
|
|
|
|
pTab[nNewPos] = pSaveTab;
|
|
|
|
for (i = 0; i <= MAXTAB; i++)
|
|
|
|
if (pTab[i])
|
|
|
|
pTab[i]->UpdateMoveTab( nOldPos, nNewPos, i, *pProgress );
|
|
|
|
delete pProgress; // freimachen fuer evtl. andere
|
|
|
|
for (i = 0; i <= MAXTAB; i++)
|
|
|
|
if (pTab[i])
|
|
|
|
pTab[i]->UpdateCompile();
|
|
|
|
SetNoListening( FALSE );
|
|
|
|
for (i = 0; i <= MAXTAB; i++)
|
|
|
|
if (pTab[i])
|
|
|
|
pTab[i]->StartAllListeners();
|
2000-12-13 11:43:43 +00:00
|
|
|
// #81844# sheet names of references may not be valid until sheet is moved
|
|
|
|
pChartListenerCollection->UpdateScheduledSeriesRanges();
|
2000-09-18 23:16:46 +00:00
|
|
|
SetDirty();
|
|
|
|
SetAutoCalc( bOldAutoCalc );
|
|
|
|
|
|
|
|
if (pDrawLayer)
|
2004-06-04 09:21:50 +00:00
|
|
|
DrawMovePage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
bValid = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return bValid;
|
|
|
|
}
|
|
|
|
|
2004-06-04 09:21:50 +00: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 = nMaxTableNumber;
|
|
|
|
String aName;
|
|
|
|
GetName(nOldPos, aName);
|
|
|
|
|
|
|
|
// vorneweg testen, ob der Prefix als gueltig erkannt wird
|
|
|
|
// wenn nicht, nur doppelte vermeiden
|
|
|
|
BOOL bPrefix = ValidTabName( aName );
|
|
|
|
DBG_ASSERT(bPrefix, "ungueltiger Tabellenname");
|
2004-06-04 09:21:50 +00:00
|
|
|
SCTAB nDummy;
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
CreateValidTabName(aName);
|
|
|
|
|
|
|
|
BOOL bValid;
|
|
|
|
if (bPrefix)
|
|
|
|
bValid = ( ValidNewTabName(aName) && (nMaxTableNumber <= MAXTAB) );
|
|
|
|
else
|
|
|
|
bValid = ( !GetTable( aName, nDummy ) && (nMaxTableNumber <= MAXTAB) );
|
|
|
|
|
|
|
|
BOOL bOldAutoCalc = GetAutoCalc();
|
|
|
|
SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
|
|
|
|
if (bValid)
|
|
|
|
{
|
|
|
|
if (nNewPos == nMaxTableNumber)
|
|
|
|
{
|
|
|
|
pTab[nMaxTableNumber] = new ScTable(this, nMaxTableNumber, aName);
|
|
|
|
++nMaxTableNumber;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (VALIDTAB(nNewPos) && (nNewPos < nMaxTableNumber))
|
|
|
|
{
|
|
|
|
SetNoListening( TRUE );
|
|
|
|
|
|
|
|
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 );
|
|
|
|
pRangeName->UpdateTabRef(nNewPos, 1);
|
|
|
|
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 ) );
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
SCTAB i;
|
2000-09-18 23:16:46 +00:00
|
|
|
for (i = 0; i <= MAXTAB; i++)
|
|
|
|
if (pTab[i] && i != nOldPos)
|
|
|
|
pTab[i]->UpdateInsertTab(nNewPos);
|
|
|
|
for (i = nMaxTableNumber; i > nNewPos; i--)
|
|
|
|
pTab[i] = pTab[i - 1];
|
|
|
|
if (nNewPos <= nOldPos)
|
|
|
|
nOldPos++;
|
|
|
|
pTab[nNewPos] = new ScTable(this, nNewPos, aName);
|
|
|
|
++nMaxTableNumber;
|
|
|
|
bValid = TRUE;
|
|
|
|
for (i = 0; i <= MAXTAB; i++)
|
|
|
|
if (pTab[i] && i != nOldPos && i != nNewPos)
|
|
|
|
pTab[i]->UpdateCompile();
|
|
|
|
SetNoListening( FALSE );
|
|
|
|
for (i = 0; i <= MAXTAB; i++)
|
|
|
|
if (pTab[i] && i != nOldPos && i != nNewPos)
|
|
|
|
pTab[i]->StartAllListeners();
|
|
|
|
|
|
|
|
// update conditional formats after table is inserted
|
|
|
|
if ( pCondFormList )
|
|
|
|
pCondFormList->UpdateReference( URM_INSDEL, aRange, 0,0,1 );
|
2005-09-28 10:30:23 +00:00
|
|
|
if ( pValidationList )
|
|
|
|
pValidationList->UpdateReference( URM_INSDEL, aRange, 0,0,1 );
|
2000-12-13 11:43:43 +00:00
|
|
|
// #81844# sheet names of references may not be valid until sheet is copied
|
|
|
|
pChartListenerCollection->UpdateScheduledSeriesRanges();
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
bValid = FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (bValid)
|
|
|
|
{
|
|
|
|
SetNoListening( TRUE ); // noch nicht bei CopyToTable/Insert
|
|
|
|
pTab[nOldPos]->CopyToTable(0, 0, MAXCOL, MAXROW, IDF_ALL, (pOnlyMarked != NULL),
|
|
|
|
pTab[nNewPos], pOnlyMarked );
|
2010-06-14 21:03:58 -04:00
|
|
|
pTab[nNewPos]->SetTabBgColor(pTab[nOldPos]->GetTabBgColor());
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
SCsTAB nDz;
|
2000-09-18 23:16:46 +00:00
|
|
|
/* if (nNewPos < nOldPos)
|
|
|
|
nDz = ((short)nNewPos) - (short)nOldPos + 1;
|
|
|
|
else
|
|
|
|
*/ nDz = ((short)nNewPos) - (short)nOldPos;
|
|
|
|
pTab[nNewPos]->UpdateReference(URM_COPY, 0, 0, nNewPos , MAXCOL, MAXROW,
|
|
|
|
nNewPos, 0, 0, nDz, NULL);
|
|
|
|
|
|
|
|
pTab[nNewPos]->UpdateInsertTabAbs(nNewPos); // alle abs. um eins hoch!!
|
|
|
|
pTab[nOldPos]->UpdateInsertTab(nNewPos);
|
|
|
|
|
|
|
|
pTab[nOldPos]->UpdateCompile();
|
|
|
|
pTab[nNewPos]->UpdateCompile( TRUE ); // #67996# maybe already compiled in Clone, but used names need recompilation
|
|
|
|
SetNoListening( FALSE );
|
|
|
|
pTab[nOldPos]->StartAllListeners();
|
|
|
|
pTab[nNewPos]->StartAllListeners();
|
|
|
|
SetDirty();
|
|
|
|
SetAutoCalc( bOldAutoCalc );
|
|
|
|
|
|
|
|
if (pDrawLayer)
|
2004-06-04 09:21:50 +00:00
|
|
|
DrawCopyPage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
|
2000-09-18 23:16:46 +00:00
|
|
|
|
|
|
|
pTab[nNewPos]->SetPageStyle( pTab[nOldPos]->GetPageStyle() );
|
2009-07-03 12:42:53 +00:00
|
|
|
pTab[nNewPos]->SetPendingRowHeights( pTab[nOldPos]->IsPendingRowHeights() );
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
SetAutoCalc( bOldAutoCalc );
|
|
|
|
return bValid;
|
|
|
|
}
|
|
|
|
|
2010-03-02 12:39:31 +00:00
|
|
|
void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sModuleSource );
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
|
|
|
|
SCTAB nDestPos, BOOL bInsertNew,
|
2000-09-18 23:16:46 +00:00
|
|
|
BOOL bResultsOnly )
|
|
|
|
{
|
|
|
|
ULONG nRetVal = 1; // 0 => Fehler 1 = ok
|
|
|
|
// 2 => RefBox, 3 => NameBox
|
|
|
|
// 4 => beides
|
|
|
|
BOOL bValid = TRUE;
|
|
|
|
if (bInsertNew) // neu einfuegen
|
|
|
|
{
|
|
|
|
String aName;
|
|
|
|
pSrcDoc->GetName(nSrcPos, aName);
|
|
|
|
CreateValidTabName(aName);
|
|
|
|
bValid = InsertTab(nDestPos, aName);
|
|
|
|
}
|
|
|
|
else // bestehende Tabelle ersetzen
|
|
|
|
{
|
|
|
|
if (VALIDTAB(nDestPos) && pTab[nDestPos])
|
|
|
|
{
|
|
|
|
pTab[nDestPos]->DeleteArea( 0,0, MAXCOL,MAXROW, IDF_ALL );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
bValid = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (bValid)
|
|
|
|
{
|
2007-02-27 11:01:25 +00:00
|
|
|
BOOL bOldAutoCalcSrc = FALSE;
|
2000-09-18 23:16:46 +00:00
|
|
|
BOOL bOldAutoCalc = GetAutoCalc();
|
|
|
|
SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
|
|
|
|
SetNoListening( TRUE );
|
|
|
|
if ( bResultsOnly )
|
|
|
|
{
|
|
|
|
bOldAutoCalcSrc = pSrcDoc->GetAutoCalc();
|
|
|
|
pSrcDoc->SetAutoCalc( TRUE ); // falls was berechnet werden muss
|
|
|
|
}
|
2009-09-09 07:31:32 +00:00
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
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->pTab[nSrcPos]->CopyToTable(0, 0, MAXCOL, MAXROW,
|
|
|
|
( bResultsOnly ? IDF_ALL & ~IDF_FORMULA : IDF_ALL),
|
|
|
|
FALSE, pTab[nDestPos] );
|
|
|
|
}
|
2007-07-03 14:47:26 +00:00
|
|
|
}
|
2000-09-18 23:16:46 +00:00
|
|
|
pTab[nDestPos]->SetTabNo(nDestPos);
|
|
|
|
|
|
|
|
if ( !bResultsOnly )
|
|
|
|
{
|
2004-07-30 15:15:42 +00:00
|
|
|
BOOL bNamesLost = FALSE;
|
2000-09-18 23:16:46 +00:00
|
|
|
USHORT nSrcRangeNames = pSrcDoc->pRangeName->GetCount();
|
|
|
|
// array containing range names which might need update of indices
|
|
|
|
ScRangeData** pSrcRangeNames = nSrcRangeNames ? new ScRangeData* [nSrcRangeNames] : NULL;
|
|
|
|
// the index mapping thereof
|
2009-09-09 07:31:32 +00:00
|
|
|
ScRangeData::IndexMap aSrcRangeMap;
|
2000-09-18 23:16:46 +00:00
|
|
|
BOOL bRangeNameReplace = FALSE;
|
|
|
|
|
2008-02-12 12:23:44 +00:00
|
|
|
// find named ranges that are used in the source sheet
|
|
|
|
std::set<USHORT> aUsedNames;
|
|
|
|
pSrcDoc->pTab[nSrcPos]->FindRangeNamesInUse( 0, 0, MAXCOL, MAXROW, aUsedNames );
|
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
for (USHORT i = 0; i < nSrcRangeNames; i++) //! DB-Bereiche Pivot-Bereiche auch !!!
|
|
|
|
{
|
|
|
|
ScRangeData* pSrcData = (*pSrcDoc->pRangeName)[i];
|
|
|
|
USHORT nOldIndex = pSrcData->GetIndex();
|
2008-02-12 12:23:44 +00:00
|
|
|
bool bInUse = ( aUsedNames.find(nOldIndex) != aUsedNames.end() );
|
2000-09-18 23:16:46 +00:00
|
|
|
if (bInUse)
|
|
|
|
{
|
2004-07-30 15:15:42 +00:00
|
|
|
USHORT nExisting = 0;
|
|
|
|
if ( pRangeName->SearchName( pSrcData->GetName(), nExisting ) )
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
2004-07-30 15:15:42 +00:00
|
|
|
// the name exists already in the destination document
|
|
|
|
// -> use the existing name, but show a warning
|
|
|
|
// (when refreshing links, the existing name is used and the warning not shown)
|
|
|
|
|
|
|
|
ScRangeData* pExistingData = (*pRangeName)[nExisting];
|
|
|
|
USHORT nExistingIndex = pExistingData->GetIndex();
|
|
|
|
|
|
|
|
pSrcRangeNames[i] = NULL; // don't modify the named range
|
2009-09-09 07:31:32 +00:00
|
|
|
aSrcRangeMap.insert(
|
|
|
|
ScRangeData::IndexMap::value_type(nOldIndex, nExistingIndex));
|
2000-09-18 23:16:46 +00:00
|
|
|
bRangeNameReplace = TRUE;
|
2004-07-30 15:15:42 +00:00
|
|
|
bNamesLost = TRUE;
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2004-07-30 15:15:42 +00:00
|
|
|
ScRangeData* pData = new ScRangeData( *pSrcData );
|
|
|
|
pData->SetDocument(this);
|
|
|
|
if ( pRangeName->FindIndex( pData->GetIndex() ) )
|
|
|
|
pData->SetIndex(0); // need new index, done in Insert
|
|
|
|
if (!pRangeName->Insert(pData))
|
|
|
|
{
|
|
|
|
DBG_ERROR("can't insert name"); // shouldn't happen
|
|
|
|
delete pData;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pData->TransferTabRef( nSrcPos, nDestPos );
|
|
|
|
pSrcRangeNames[i] = pData;
|
|
|
|
USHORT nNewIndex = pData->GetIndex();
|
2009-09-09 07:31:32 +00:00
|
|
|
aSrcRangeMap.insert(
|
|
|
|
ScRangeData::IndexMap::value_type(nOldIndex, nNewIndex));
|
2004-07-30 15:15:42 +00:00
|
|
|
if ( !bRangeNameReplace )
|
|
|
|
bRangeNameReplace = ( nOldIndex != nNewIndex );
|
|
|
|
}
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pSrcRangeNames[i] = NULL;
|
|
|
|
//aSrcRangeMap.SetPair( i, 0, 0 ); // not needed, defaulted
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( bRangeNameReplace )
|
|
|
|
{
|
|
|
|
// first update all inserted named formulas if they contain other
|
|
|
|
// range names and used indices changed
|
|
|
|
for (USHORT i = 0; i < nSrcRangeNames; i++) //! DB-Bereiche Pivot-Bereiche auch
|
|
|
|
{
|
|
|
|
if ( pSrcRangeNames[i] )
|
|
|
|
pSrcRangeNames[i]->ReplaceRangeNamesInUse( aSrcRangeMap );
|
|
|
|
}
|
|
|
|
// then update the formulas, they might need the just updated range names
|
|
|
|
pTab[nDestPos]->ReplaceRangeNamesInUse( 0, 0, MAXCOL, MAXROW, aSrcRangeMap );
|
|
|
|
}
|
|
|
|
if ( pSrcRangeNames )
|
|
|
|
delete [] pSrcRangeNames;
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
SCsTAB nDz = ((SCsTAB)nDestPos) - (SCsTAB)nSrcPos;
|
2000-09-18 23:16:46 +00:00
|
|
|
pTab[nDestPos]->UpdateReference(URM_COPY, 0, 0, nDestPos,
|
|
|
|
MAXCOL, MAXROW, nDestPos,
|
|
|
|
0, 0, nDz, NULL);
|
2001-10-08 17:40:50 +00:00
|
|
|
// Test for outside absolute references for info box
|
|
|
|
BOOL bIsAbsRef = pSrcDoc->pTab[nSrcPos]->TestTabRefAbs(nSrcPos);
|
|
|
|
// Readjust self-contained absolute references to this sheet
|
|
|
|
pTab[nDestPos]->TestTabRefAbs(nSrcPos);
|
2000-09-18 23:16:46 +00:00
|
|
|
if (bIsAbsRef)
|
|
|
|
{
|
|
|
|
nRetVal += 1;
|
2005-02-16 17:05:58 +00:00
|
|
|
// InfoBox AbsoluteRefs sind moeglicherweise nicht mehr korrekt!!
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
2004-07-30 15:15:42 +00:00
|
|
|
if (bNamesLost)
|
|
|
|
{
|
|
|
|
nRetVal += 2;
|
|
|
|
// message: duplicate names
|
|
|
|
}
|
2000-09-18 23:16:46 +00:00
|
|
|
pTab[nDestPos]->CompileAll();
|
|
|
|
}
|
|
|
|
|
|
|
|
SetNoListening( FALSE );
|
|
|
|
if ( !bResultsOnly )
|
|
|
|
pTab[nDestPos]->StartAllListeners();
|
2007-07-03 14:47:26 +00:00
|
|
|
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 );
|
2009-07-03 12:42:53 +00:00
|
|
|
|
|
|
|
pTab[nDestPos]->SetPendingRowHeights( pSrcDoc->pTab[nSrcPos]->IsPendingRowHeights() );
|
2000-09-18 23:16:46 +00:00
|
|
|
}
|
|
|
|
if (!bValid)
|
|
|
|
nRetVal = 0;
|
2010-03-02 12:39:31 +00:00
|
|
|
BOOL bVbaEnabled = IsInVBAMode();
|
|
|
|
|
2010-03-03 18:36:44 +00:00
|
|
|
if ( bVbaEnabled )
|
2010-03-02 12:39:31 +00:00
|
|
|
{
|
2010-03-03 18:36:44 +00:00
|
|
|
SfxObjectShell* pSrcShell = pSrcDoc ? pSrcDoc->GetDocumentShell() : NULL;
|
|
|
|
if ( pSrcShell )
|
2010-03-02 12:39:31 +00:00
|
|
|
{
|
2010-03-03 18:36:44 +00:00
|
|
|
StarBASIC* pStarBASIC = pSrcShell ? pSrcShell->GetBasic() : NULL;
|
|
|
|
String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
|
|
|
|
if ( pSrcShell && pSrcShell->GetBasicManager()->GetName().Len() > 0 )
|
|
|
|
{
|
|
|
|
aLibName = pSrcShell->GetBasicManager()->GetName();
|
|
|
|
pStarBASIC = pSrcShell->GetBasicManager()->GetLib( aLibName );
|
|
|
|
}
|
2010-03-02 12:39:31 +00:00
|
|
|
|
2010-03-03 18:36:44 +00:00
|
|
|
String sCodeName;
|
|
|
|
String sSource;
|
2010-07-06 19:34:53 +02:00
|
|
|
uno::Reference< script::XLibraryContainer > xLibContainer = pSrcShell->GetBasicContainer();
|
|
|
|
uno::Reference< container::XNameContainer > xLib;
|
2010-03-03 18:36:44 +00:00
|
|
|
if( xLibContainer.is() )
|
|
|
|
{
|
2010-07-06 19:34:53 +02:00
|
|
|
uno::Any aLibAny = xLibContainer->getByName( aLibName );
|
2010-03-03 18:36:44 +00:00
|
|
|
aLibAny >>= xLib;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( xLib.is() )
|
|
|
|
{
|
|
|
|
String sSrcCodeName;
|
|
|
|
pSrcDoc->GetCodeName( nSrcPos, sSrcCodeName );
|
|
|
|
rtl::OUString sRTLSource;
|
|
|
|
xLib->getByName( sSrcCodeName ) >>= sRTLSource;
|
|
|
|
sSource = sRTLSource;
|
|
|
|
}
|
|
|
|
VBA_InsertModule( *this, nDestPos, sCodeName, sSource );
|
2010-03-02 12:39:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-18 23:16:46 +00:00
|
|
|
return nRetVal;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2004-06-04 09:21:50 +00:00
|
|
|
void ScDocument::SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const USHORT nError)
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
|
|
|
if (VALIDTAB(nTab))
|
|
|
|
if (pTab[nTab])
|
|
|
|
pTab[nTab]->SetError( nCol, nRow, nError );
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScDocument::EraseNonUsedSharedNames(USHORT nLevel)
|
|
|
|
{
|
|
|
|
for (USHORT i = 0; i < pRangeName->GetCount(); i++)
|
|
|
|
{
|
|
|
|
ScRangeData* pRangeData = (*pRangeName)[i];
|
|
|
|
if (pRangeData && pRangeData->HasType(RT_SHARED))
|
|
|
|
{
|
|
|
|
String aName;
|
|
|
|
pRangeData->GetName(aName);
|
|
|
|
aName.Erase(0, 6); // !!! vgl. Table4, FillFormula !!
|
|
|
|
USHORT nInd = (USHORT) aName.ToInt32();
|
|
|
|
if (nInd <= nLevel)
|
|
|
|
{
|
|
|
|
USHORT nIndex = pRangeData->GetIndex();
|
|
|
|
BOOL bInUse = FALSE;
|
2004-06-04 09:21:50 +00:00
|
|
|
for (SCTAB j = 0; !bInUse && (j <= MAXTAB); j++)
|
2000-09-18 23:16:46 +00:00
|
|
|
{
|
|
|
|
if (pTab[j])
|
|
|
|
bInUse = pTab[j]->IsRangeNameInUse(0, 0, MAXCOL-1, MAXROW-1,
|
|
|
|
nIndex);
|
|
|
|
}
|
|
|
|
if (!bInUse)
|
|
|
|
pRangeName->AtFree(i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
DBG_ASSERT( pChangeViewSettings, "Oops. No ChangeViewSettings :-( by!" );
|
|
|
|
|
|
|
|
*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()
|
|
|
|
{
|
2007-02-27 11:01:25 +00:00
|
|
|
ScFieldEditEngine* pNewEditEngine = NULL;
|
2001-11-26 08:28:27 +00:00
|
|
|
if (!pCacheFieldEditEngine)
|
|
|
|
{
|
2007-02-27 11:01:25 +00:00
|
|
|
pNewEditEngine = new ScFieldEditEngine( GetEnginePool(),
|
2001-11-26 08:28:27 +00:00
|
|
|
GetEditPool(), FALSE );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-06-20 10:54:20 +00:00
|
|
|
if ( !bImportingXML )
|
|
|
|
{
|
|
|
|
// #i66209# previous use might not have restored update mode,
|
|
|
|
// ensure same state as for a new EditEngine (UpdateMode = TRUE)
|
|
|
|
if ( !pCacheFieldEditEngine->GetUpdateMode() )
|
|
|
|
pCacheFieldEditEngine->SetUpdateMode(TRUE);
|
|
|
|
}
|
|
|
|
|
2007-02-27 11:01:25 +00:00
|
|
|
pNewEditEngine = pCacheFieldEditEngine;
|
2001-11-26 08:28:27 +00:00
|
|
|
pCacheFieldEditEngine = NULL;
|
|
|
|
}
|
2007-02-27 11:01:25 +00:00
|
|
|
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
|
|
|
|
2005-03-08 10:29:42 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// static
|
|
|
|
ScRecursionHelper* ScDocument::CreateRecursionHelperInstance()
|
|
|
|
{
|
|
|
|
return new ScRecursionHelper;
|
|
|
|
}
|
2007-09-27 12:52:23 +00:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
DBG_ERRORFILE( "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())
|
|
|
|
{
|
|
|
|
DBG_ERRORFILE( "ScDocument::RemoveLookupCache: range not found in hash map");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ScLookupCache* pCache = (*it).second;
|
|
|
|
pLookupCacheMapImpl->aCacheMap.erase( it);
|
|
|
|
EndListeningArea( pCache->getRange(), &rCache);
|
|
|
|
}
|
|
|
|
}
|
2008-07-07 06:39:38 +00:00
|
|
|
|
|
|
|
void ScDocument::ClearLookupCaches()
|
|
|
|
{
|
2008-07-22 13:43:18 +00:00
|
|
|
if( pLookupCacheMapImpl )
|
|
|
|
pLookupCacheMapImpl->clear();
|
2008-07-07 06:39:38 +00:00
|
|
|
}
|