Files
libreoffice/sc/inc/table.hxx

964 lines
48 KiB
C++
Raw Normal View History

2010-10-27 12:43:08 +01:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 16:07:07 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:07:07 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:07:07 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:07:07 +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 16:07:07 +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 16:07:07 +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 16:07:07 +00:00
*
************************************************************************/
#ifndef SC_TABLE_HXX
#define SC_TABLE_HXX
#include <vector>
CWS-TOOLING: integrate CWS dr70 2009-06-09 13:52:02 +0200 dr r272770 : #i101930# SXC import broken 2009-06-05 11:50:16 +0200 dr r272675 : #i10000# compiler warning 2009-06-05 11:24:39 +0200 dr r272674 : #i10000# compiler warning 2009-06-05 10:35:22 +0200 dr r272668 : #i10000# compiler warning 2009-06-04 16:53:32 +0200 dr r272646 : CWS-TOOLING: rebase CWS dr70 to trunk@272291 (milestone: DEV300:m49) 2009-06-04 14:50:45 +0200 dr r272633 : #i10000# compiler warning 2009-06-03 18:50:57 +0200 dr r272603 : #i101930# fix ODS export of uninit'ed notes, do not craete note captions in UpdatePendingRowHeights 2009-05-28 11:11:17 +0200 dr r272384 : #i101930# note captions must be created before changing row/column size 2009-05-27 15:48:44 +0200 iha r272356 : #i101925# metafile creation is requested superfluously during inplace editing 2009-05-27 15:46:44 +0200 iha r272355 : #i101925# metafile creation is requested superfluously during inplace editing 2009-05-27 15:06:58 +0200 iha r272349 : #i101928# superfluous paint calls while entering and editing charts 2009-05-27 15:01:08 +0200 iha r272348 : #i101928# superfluous paint calls while entering and editing charts 2009-05-26 14:43:39 +0200 dr r272303 : #i101930# import performance: invisible cell notes cache caption data 2009-05-22 18:44:19 +0200 dr r272205 : #i101930# preparations for uninitialized notes (performance), adapted ODF import filter 2009-05-14 19:50:43 +0200 dr r271918 : #i101930# 'recycle' the shapes already created while loading cell notes 2009-05-06 16:07:45 +0200 dr r271598 : #i100827# improve performance of HTML query filter, patch by mmeeks, slightly modified 2009-05-06 11:02:38 +0200 dr r271577 : #i100827# improve performance of HTML query filter, patch by mmeeks 2009-05-06 10:50:13 +0200 dr r271575 : #i86650# improve performance of HTML query filter 2009-05-05 10:09:44 +0200 nn r271502 : #i101428# better handling of non-existing view data 2009-04-29 16:42:57 +0200 nn r271384 : #i101428# after loading, update row heights per sheet on demand
2009-07-03 12:42:53 +00:00
#include <memory>
#include <utility>
2000-09-18 16:07:07 +00:00
#include <tools/gen.hxx>
#include <tools/color.hxx>
#include <com/sun/star/uno/Sequence.hxx>
2000-09-18 16:07:07 +00:00
#include "column.hxx"
#include "sortparam.hxx"
#include "compressedarray.hxx"
#include "dbcolect.hxx"
2000-09-18 16:07:07 +00:00
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 <memory>
#include <set>
#include <boost/shared_ptr.hpp>
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
namespace utl {
class SearchParam;
class TextSearch;
}
namespace com { namespace sun { namespace star {
namespace sheet {
struct TablePageBreakData;
}
} } }
2000-09-18 16:07:07 +00:00
class SfxItemSet;
class SfxStyleSheetBase;
class SvxBoxInfoItem;
class SvxBoxItem;
class SvxSearchItem;
class ScAutoFormat;
class ScAutoFormatData;
class ScBaseCell;
class ScDocument;
class ScDrawLayer;
class ScEditDataArray;
2000-09-18 16:07:07 +00:00
class ScFormulaCell;
class ScOutlineTable;
class ScPostIt;
class ScPrintSaverTab;
class ScProgress;
class ScProgress;
class ScRangeList;
class ScSheetEvents;
2000-09-18 16:07:07 +00:00
class ScSortInfoArray;
class ScStyleSheet;
class ScTableLink;
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
class ScTableProtection;
2000-09-18 16:07:07 +00:00
class ScUserListData;
struct RowInfo;
struct ScFunctionData;
struct ScLineFlags;
2001-03-14 14:50:34 +00:00
class CollatorWrapper;
class ScFlatUInt16RowSegments;
class ScFlatBoolRowSegments;
class ScFlatBoolColSegments;
struct ScSetStringParam;
struct ScColWidthParam;
struct ScColWidthParam;
2011-03-08 18:50:13 -05:00
class ScRangeName;
2000-09-18 16:07:07 +00:00
typedef boost::unordered_map< ::rtl::OUString, rtl::OUString, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > NameToNameMap;
2000-09-18 16:07:07 +00:00
class ScTable
{
private:
typedef ::std::vector< ScRange > ScRangeVec;
CWS-TOOLING: integrate CWS dr70 2009-06-09 13:52:02 +0200 dr r272770 : #i101930# SXC import broken 2009-06-05 11:50:16 +0200 dr r272675 : #i10000# compiler warning 2009-06-05 11:24:39 +0200 dr r272674 : #i10000# compiler warning 2009-06-05 10:35:22 +0200 dr r272668 : #i10000# compiler warning 2009-06-04 16:53:32 +0200 dr r272646 : CWS-TOOLING: rebase CWS dr70 to trunk@272291 (milestone: DEV300:m49) 2009-06-04 14:50:45 +0200 dr r272633 : #i10000# compiler warning 2009-06-03 18:50:57 +0200 dr r272603 : #i101930# fix ODS export of uninit'ed notes, do not craete note captions in UpdatePendingRowHeights 2009-05-28 11:11:17 +0200 dr r272384 : #i101930# note captions must be created before changing row/column size 2009-05-27 15:48:44 +0200 iha r272356 : #i101925# metafile creation is requested superfluously during inplace editing 2009-05-27 15:46:44 +0200 iha r272355 : #i101925# metafile creation is requested superfluously during inplace editing 2009-05-27 15:06:58 +0200 iha r272349 : #i101928# superfluous paint calls while entering and editing charts 2009-05-27 15:01:08 +0200 iha r272348 : #i101928# superfluous paint calls while entering and editing charts 2009-05-26 14:43:39 +0200 dr r272303 : #i101930# import performance: invisible cell notes cache caption data 2009-05-22 18:44:19 +0200 dr r272205 : #i101930# preparations for uninitialized notes (performance), adapted ODF import filter 2009-05-14 19:50:43 +0200 dr r271918 : #i101930# 'recycle' the shapes already created while loading cell notes 2009-05-06 16:07:45 +0200 dr r271598 : #i100827# improve performance of HTML query filter, patch by mmeeks, slightly modified 2009-05-06 11:02:38 +0200 dr r271577 : #i100827# improve performance of HTML query filter, patch by mmeeks 2009-05-06 10:50:13 +0200 dr r271575 : #i86650# improve performance of HTML query filter 2009-05-05 10:09:44 +0200 nn r271502 : #i101428# better handling of non-existing view data 2009-04-29 16:42:57 +0200 nn r271384 : #i101428# after loading, update row heights per sheet on demand
2009-07-03 12:42:53 +00:00
typedef ::std::pair< SCCOL, SCROW > ScAddress2D;
typedef ::std::vector< ScAddress2D > ScAddress2DVec;
typedef ::std::auto_ptr< ScAddress2DVec > ScAddress2DVecPtr;
2011-03-13 19:39:41 +01:00
// data per table
ScColumn aCol[MAXCOLCOUNT];
2000-09-18 16:07:07 +00:00
String aName;
String aCodeName;
2000-09-18 16:07:07 +00:00
String aComment;
sal_Bool bScenario;
sal_Bool bLayoutRTL;
sal_Bool bLoadingRTL;
2000-09-18 16:07:07 +00:00
String aLinkDoc;
String aLinkFlt;
String aLinkOpt;
String aLinkTab;
sal_uLong nLinkRefreshDelay;
sal_uInt8 nLinkMode;
2000-09-18 16:07:07 +00:00
2011-03-13 19:39:41 +01:00
// page style template
2000-09-18 16:07:07 +00:00
String aPageStyle;
sal_Bool bPageSizeValid;
2011-03-13 19:39:41 +01:00
Size aPageSizeTwips; // size of the print-page
SCCOL nRepeatStartX; // repeating rows/columns
SCCOL nRepeatEndX; // REPEAT_NONE, if not used
SCROW nRepeatStartY;
SCROW nRepeatEndY;
2000-09-18 16:07:07 +00:00
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
::std::auto_ptr<ScTableProtection> pTabProtection;
2000-09-18 16:07:07 +00:00
sal_uInt16* pColWidth;
::boost::shared_ptr<ScFlatUInt16RowSegments> mpRowHeights;
2000-09-18 16:07:07 +00:00
sal_uInt8* pColFlags;
ScBitMaskCompressedArray< SCROW, sal_uInt8>* pRowFlags;
::boost::shared_ptr<ScFlatBoolColSegments> mpHiddenCols;
::boost::shared_ptr<ScFlatBoolRowSegments> mpHiddenRows;
::boost::shared_ptr<ScFlatBoolColSegments> mpFilteredCols;
::boost::shared_ptr<ScFlatBoolRowSegments> mpFilteredRows;
::std::set<SCROW> maRowPageBreaks;
::std::set<SCROW> maRowManualBreaks;
::std::set<SCCOL> maColPageBreaks;
::std::set<SCCOL> maColManualBreaks;
2000-09-18 16:07:07 +00:00
ScOutlineTable* pOutlineTable;
ScSheetEvents* pSheetEvents;
SCCOL nTableAreaX;
SCROW nTableAreaY;
sal_Bool bTableAreaValid;
2000-09-18 16:07:07 +00:00
2011-03-13 19:39:41 +01:00
// internal management
sal_Bool bVisible;
sal_Bool bStreamValid;
sal_Bool bPendingRowHeights;
sal_Bool bCalcNotification;
2000-09-18 16:07:07 +00:00
SCTAB nTab;
sal_uInt16 nRecalcLvl; // recursion level Size-Recalc
2000-09-18 16:07:07 +00:00
ScDocument* pDocument;
utl::SearchParam* pSearchParam;
utl::TextSearch* pSearchText;
2000-09-18 16:07:07 +00:00
mutable String aUpperName; // #i62977# filled only on demand, reset in SetName
CWS-TOOLING: integrate CWS dr70 2009-06-09 13:52:02 +0200 dr r272770 : #i101930# SXC import broken 2009-06-05 11:50:16 +0200 dr r272675 : #i10000# compiler warning 2009-06-05 11:24:39 +0200 dr r272674 : #i10000# compiler warning 2009-06-05 10:35:22 +0200 dr r272668 : #i10000# compiler warning 2009-06-04 16:53:32 +0200 dr r272646 : CWS-TOOLING: rebase CWS dr70 to trunk@272291 (milestone: DEV300:m49) 2009-06-04 14:50:45 +0200 dr r272633 : #i10000# compiler warning 2009-06-03 18:50:57 +0200 dr r272603 : #i101930# fix ODS export of uninit'ed notes, do not craete note captions in UpdatePendingRowHeights 2009-05-28 11:11:17 +0200 dr r272384 : #i101930# note captions must be created before changing row/column size 2009-05-27 15:48:44 +0200 iha r272356 : #i101925# metafile creation is requested superfluously during inplace editing 2009-05-27 15:46:44 +0200 iha r272355 : #i101925# metafile creation is requested superfluously during inplace editing 2009-05-27 15:06:58 +0200 iha r272349 : #i101928# superfluous paint calls while entering and editing charts 2009-05-27 15:01:08 +0200 iha r272348 : #i101928# superfluous paint calls while entering and editing charts 2009-05-26 14:43:39 +0200 dr r272303 : #i101930# import performance: invisible cell notes cache caption data 2009-05-22 18:44:19 +0200 dr r272205 : #i101930# preparations for uninitialized notes (performance), adapted ODF import filter 2009-05-14 19:50:43 +0200 dr r271918 : #i101930# 'recycle' the shapes already created while loading cell notes 2009-05-06 16:07:45 +0200 dr r271598 : #i100827# improve performance of HTML query filter, patch by mmeeks, slightly modified 2009-05-06 11:02:38 +0200 dr r271577 : #i100827# improve performance of HTML query filter, patch by mmeeks 2009-05-06 10:50:13 +0200 dr r271575 : #i86650# improve performance of HTML query filter 2009-05-05 10:09:44 +0200 nn r271502 : #i101428# better handling of non-existing view data 2009-04-29 16:42:57 +0200 nn r271384 : #i101428# after loading, update row heights per sheet on demand
2009-07-03 12:42:53 +00:00
ScAddress2DVecPtr mxUninitNotes;
2011-03-13 19:39:41 +01:00
// sort parameter to minimize stack size of quicksort
2000-09-18 16:07:07 +00:00
ScSortParam aSortParam;
2001-03-14 14:50:34 +00:00
CollatorWrapper* pSortCollator;
sal_Bool bGlobalKeepQuery;
sal_Bool bSharedNameInserted;
2000-09-18 16:07:07 +00:00
ScRangeVec aPrintRanges;
bool bPrintEntireSheet;
2000-09-18 16:07:07 +00:00
ScRange* pRepeatColRange;
ScRange* pRepeatRowRange;
sal_uInt16 nLockCount;
2000-09-18 16:07:07 +00:00
ScRangeList* pScenarioRanges;
Color aScenarioColor;
Color aTabBgColor;
sal_uInt16 nScenarioFlags;
sal_Bool bActiveScenario;
ScDBData* pDBDataNoName;
mutable ScRangeName* mpRangeName;
bool mbPageBreaksValid;
2000-09-18 16:07:07 +00:00
2011-03-13 19:39:41 +01:00
friend class ScDocument; // for FillInfo
2000-09-18 16:07:07 +00:00
friend class ScDocumentIterator;
friend class ScValueIterator;
friend class ScDBQueryDataIterator;
2000-09-18 16:07:07 +00:00
friend class ScCellIterator;
friend class ScQueryCellIterator;
friend class ScHorizontalCellIterator;
friend class ScHorizontalAttrIterator;
friend class ScDocAttrIterator;
friend class ScAttrRectIterator;
public:
ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName,
sal_Bool bColInfo = sal_True, sal_Bool bRowInfo = sal_True );
2000-09-18 16:07:07 +00:00
~ScTable();
ScOutlineTable* GetOutlineTable() { return pOutlineTable; }
SCSIZE GetCellCount(SCCOL nCol) const;
sal_uLong GetCellCount() const;
sal_uLong GetWeightedCount() const;
sal_uLong GetCodeCount() const; // RPN code in formula
2000-09-18 16:07:07 +00:00
sal_Bool SetOutlineTable( const ScOutlineTable* pNewOutline );
2000-09-18 16:07:07 +00:00
void StartOutlineTable();
void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
2000-09-18 16:07:07 +00:00
sal_Bool TestRemoveSubTotals( const ScSubTotalParam& rParam );
2000-09-18 16:07:07 +00:00
void RemoveSubTotals( ScSubTotalParam& rParam );
sal_Bool DoSubTotals( ScSubTotalParam& rParam );
2000-09-18 16:07:07 +00:00
const ScSheetEvents* GetSheetEvents() const { return pSheetEvents; }
void SetSheetEvents( const ScSheetEvents* pNew );
sal_Bool IsVisible() const { return bVisible; }
void SetVisible( sal_Bool bVis );
2000-09-18 16:07:07 +00:00
sal_Bool IsStreamValid() const { return bStreamValid; }
void SetStreamValid( sal_Bool bSet, sal_Bool bIgnoreLock = false );
CWS-TOOLING: integrate CWS calcsheetdata 2009-08-13 16:18:48 +0200 nn r274950 : #i102616# shared/remote files, better handling of formula results 2009-08-12 11:17:30 +0200 nn r274884 : CWS-TOOLING: rebase CWS calcsheetdata to trunk@274622 (milestone: DEV300:m54) 2009-08-12 10:30:47 +0200 nn r274881 : #i102616# some clean-up 2009-08-11 19:01:18 +0200 nn r274876 : #i102616# store loaded namespaces, so prefixes remain valid 2009-08-11 19:00:49 +0200 nn r274875 : #i102616# store loaded namespaces, so prefixes remain valid 2009-08-10 19:12:04 +0200 nn r274835 : #i102616# detective, notes, encoding, error handling 2009-08-07 11:18:46 +0200 nn r274751 : #i102616# use new method SvXMLAutoStylePoolP::AddNamed 2009-08-07 11:18:15 +0200 nn r274750 : #i102616# new method SvXMLAutoStylePoolP::AddNamed 2009-08-06 18:02:42 +0200 nn r274740 : #i102616# modification: shapes, notes, pending row heights; skip sheets in export iterator 2009-08-05 18:41:59 +0200 nn r274694 : #i102616# handle text styles in notes 2009-08-03 18:55:59 +0200 nn r274594 : #i102616# handle text styles in cells 2009-07-31 19:00:06 +0200 nn r274548 : #i102616# handle styles for notes 2009-07-28 16:46:20 +0200 nn r274414 : missed a conflict 2009-07-28 14:01:56 +0200 nn r274404 : CWS-TOOLING: rebase CWS calcsheetdata to trunk@274203 (milestone: DEV300:m53) 2009-07-23 18:28:47 +0200 nn r274278 : #i102616# handle table styles 2009-07-22 15:40:24 +0200 nn r274244 : #i102616# handle row styles 2009-07-21 20:09:37 +0200 nn r274211 : #i102616# handle column styles 2009-07-16 13:00:18 +0200 nn r274043 : #i102616# invalidate all stream positions when inserting/deleting sheets 2009-07-15 17:41:15 +0200 nn r274021 : #i102616# don't collect cell styles twice for copied sheets 2009-07-14 18:36:11 +0200 nn r273985 : #i102616# allow to query stream position, clear buffer 2009-07-14 18:32:10 +0200 nn r273984 : #i102616# allow to specify a name for an autostyle 2009-07-09 22:01:23 +0200 nn r273870 : #i102616# copy stream for unchanged sheets 2009-07-08 18:11:42 +0200 nn r273844 : #i102616# store stream positions of sheets 2009-06-24 19:08:18 +0200 nn r273363 : #i102616# detect changed sheets since loading 2009-06-09 15:53:32 +0200 nn r272774 : #i102616# store automatic cell style information after loading
2009-09-07 15:38:19 +00:00
sal_Bool IsPendingRowHeights() const { return bPendingRowHeights; }
void SetPendingRowHeights( sal_Bool bSet );
CWS-TOOLING: integrate CWS dr70 2009-06-09 13:52:02 +0200 dr r272770 : #i101930# SXC import broken 2009-06-05 11:50:16 +0200 dr r272675 : #i10000# compiler warning 2009-06-05 11:24:39 +0200 dr r272674 : #i10000# compiler warning 2009-06-05 10:35:22 +0200 dr r272668 : #i10000# compiler warning 2009-06-04 16:53:32 +0200 dr r272646 : CWS-TOOLING: rebase CWS dr70 to trunk@272291 (milestone: DEV300:m49) 2009-06-04 14:50:45 +0200 dr r272633 : #i10000# compiler warning 2009-06-03 18:50:57 +0200 dr r272603 : #i101930# fix ODS export of uninit'ed notes, do not craete note captions in UpdatePendingRowHeights 2009-05-28 11:11:17 +0200 dr r272384 : #i101930# note captions must be created before changing row/column size 2009-05-27 15:48:44 +0200 iha r272356 : #i101925# metafile creation is requested superfluously during inplace editing 2009-05-27 15:46:44 +0200 iha r272355 : #i101925# metafile creation is requested superfluously during inplace editing 2009-05-27 15:06:58 +0200 iha r272349 : #i101928# superfluous paint calls while entering and editing charts 2009-05-27 15:01:08 +0200 iha r272348 : #i101928# superfluous paint calls while entering and editing charts 2009-05-26 14:43:39 +0200 dr r272303 : #i101930# import performance: invisible cell notes cache caption data 2009-05-22 18:44:19 +0200 dr r272205 : #i101930# preparations for uninitialized notes (performance), adapted ODF import filter 2009-05-14 19:50:43 +0200 dr r271918 : #i101930# 'recycle' the shapes already created while loading cell notes 2009-05-06 16:07:45 +0200 dr r271598 : #i100827# improve performance of HTML query filter, patch by mmeeks, slightly modified 2009-05-06 11:02:38 +0200 dr r271577 : #i100827# improve performance of HTML query filter, patch by mmeeks 2009-05-06 10:50:13 +0200 dr r271575 : #i86650# improve performance of HTML query filter 2009-05-05 10:09:44 +0200 nn r271502 : #i101428# better handling of non-existing view data 2009-04-29 16:42:57 +0200 nn r271384 : #i101428# after loading, update row heights per sheet on demand
2009-07-03 12:42:53 +00:00
sal_Bool GetCalcNotification() const { return bCalcNotification; }
void SetCalcNotification( sal_Bool bSet );
sal_Bool IsLayoutRTL() const { return bLayoutRTL; }
sal_Bool IsLoadingRTL() const { return bLoadingRTL; }
void SetLayoutRTL( sal_Bool bSet );
void SetLoadingRTL( sal_Bool bSet );
sal_Bool IsScenario() const { return bScenario; }
void SetScenario( sal_Bool bFlag );
2000-09-18 16:07:07 +00:00
void GetScenarioComment( String& rComment) const { rComment = aComment; }
void SetScenarioComment( const String& rComment ) { aComment = rComment; }
const Color& GetScenarioColor() const { return aScenarioColor; }
void SetScenarioColor(const Color& rNew) { aScenarioColor = rNew; }
const Color& GetTabBgColor() const;
void SetTabBgColor(const Color& rColor);
sal_uInt16 GetScenarioFlags() const { return nScenarioFlags; }
void SetScenarioFlags(sal_uInt16 nNew) { nScenarioFlags = nNew; }
void SetActiveScenario(sal_Bool bSet) { bActiveScenario = bSet; }
sal_Bool IsActiveScenario() const { return bActiveScenario; }
2000-09-18 16:07:07 +00:00
sal_uInt8 GetLinkMode() const { return nLinkMode; }
sal_Bool IsLinked() const { return nLinkMode != SC_LINK_NONE; }
2000-09-18 16:07:07 +00:00
const String& GetLinkDoc() const { return aLinkDoc; }
const String& GetLinkFlt() const { return aLinkFlt; }
const String& GetLinkOpt() const { return aLinkOpt; }
const String& GetLinkTab() const { return aLinkTab; }
sal_uLong GetLinkRefreshDelay() const { return nLinkRefreshDelay; }
2000-09-18 16:07:07 +00:00
void SetLink( sal_uInt8 nMode, const String& rDoc, const String& rFlt,
const String& rOpt, const String& rTab, sal_uLong nRefreshDelay );
2000-09-18 16:07:07 +00:00
void GetName( String& rName ) const;
void SetName( const String& rNewName );
void SetAnonymousDBData(ScDBData* pDBData);
ScDBData* GetAnonymousDBData();
void GetCodeName( String& rName ) const { rName = aCodeName; }
void SetCodeName( const String& rNewName ) { aCodeName = rNewName; }
const String& GetUpperName() const;
2000-09-18 16:07:07 +00:00
const String& GetPageStyle() const { return aPageStyle; }
void SetPageStyle( const String& rName );
void PageStyleModified( const String& rNewName );
sal_Bool IsProtected() const;
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
void SetProtection(const ScTableProtection* pProtect);
ScTableProtection* GetProtection();
2000-09-18 16:07:07 +00:00
Size GetPageSize() const;
void SetPageSize( const Size& rSize );
void SetRepeatArea( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
2000-09-18 16:07:07 +00:00
void RemoveAutoSpellObj();
void LockTable();
void UnlockTable();
sal_Bool IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
SCROW nRow2, sal_Bool* pOnlyNotBecauseOfMatrix = NULL ) const;
sal_Bool IsSelectionEditable( const ScMarkData& rMark,
sal_Bool* pOnlyNotBecauseOfMatrix = NULL ) const;
2000-09-18 16:07:07 +00:00
sal_Bool HasBlockMatrixFragment( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const;
bool HasSelectionMatrixFragment( const ScMarkData& rMark ) const;
2000-09-18 16:07:07 +00:00
sal_Bool IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes = false ) const;
2000-09-18 16:07:07 +00:00
void PutCell( const ScAddress&, ScBaseCell* pCell );
void PutCell( SCCOL nCol, SCROW nRow, ScBaseCell* pCell );
void PutCell(SCCOL nCol, SCROW nRow, sal_uLong nFormatIndex, ScBaseCell* pCell);
2011-03-13 19:39:41 +01:00
// TRUE = numberformat set
sal_Bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString,
ScSetStringParam* pParam = NULL );
void SetValue( SCCOL nCol, SCROW nRow, const double& rVal );
void SetError( SCCOL nCol, SCROW nRow, sal_uInt16 nError);
2000-09-18 16:07:07 +00:00
void GetString( SCCOL nCol, SCROW nRow, String& rString );
void GetInputString( SCCOL nCol, SCROW nRow, String& rString );
2000-09-18 16:07:07 +00:00
double GetValue( const ScAddress& rPos ) const
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
return ValidColRow(rPos.Col(),rPos.Row()) ?
aCol[rPos.Col()].GetValue( rPos.Row() ) :
0.0;
}
double GetValue( SCCOL nCol, SCROW nRow );
void GetFormula( SCCOL nCol, SCROW nRow, String& rFormula );
2000-09-18 16:07:07 +00:00
CellType GetCellType( const ScAddress& rPos ) const
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
return ValidColRow(rPos.Col(),rPos.Row()) ?
aCol[rPos.Col()].GetCellType( rPos.Row() ) :
CELLTYPE_NONE;
}
CellType GetCellType( SCCOL nCol, SCROW nRow ) const;
2000-09-18 16:07:07 +00:00
ScBaseCell* GetCell( const ScAddress& rPos ) const
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
return ValidColRow(rPos.Col(),rPos.Row()) ?
aCol[rPos.Col()].GetCell( rPos.Row() ) :
NULL;
}
ScBaseCell* GetCell( SCCOL nCol, SCROW nRow ) const;
2000-09-18 16:07:07 +00:00
void GetFirstDataPos(SCCOL& rCol, SCROW& rRow) const;
void GetLastDataPos(SCCOL& rCol, SCROW& rRow) const;
2000-09-18 16:07:07 +00:00
/** Returns the pointer to a cell note object at the passed cell address. */
ScPostIt* GetNote( SCCOL nCol, SCROW nRow );
/** Sets the passed cell note object at the passed cell address. Takes ownership! */
void TakeNote( SCCOL nCol, SCROW nRow, ScPostIt*& rpNote );
/** Returns and forgets the cell note object at the passed cell address. */
ScPostIt* ReleaseNote( SCCOL nCol, SCROW nRow );
/** Deletes the note at the passed cell address. */
void DeleteNote( SCCOL nCol, SCROW nRow );
CWS-TOOLING: integrate CWS dr70 2009-06-09 13:52:02 +0200 dr r272770 : #i101930# SXC import broken 2009-06-05 11:50:16 +0200 dr r272675 : #i10000# compiler warning 2009-06-05 11:24:39 +0200 dr r272674 : #i10000# compiler warning 2009-06-05 10:35:22 +0200 dr r272668 : #i10000# compiler warning 2009-06-04 16:53:32 +0200 dr r272646 : CWS-TOOLING: rebase CWS dr70 to trunk@272291 (milestone: DEV300:m49) 2009-06-04 14:50:45 +0200 dr r272633 : #i10000# compiler warning 2009-06-03 18:50:57 +0200 dr r272603 : #i101930# fix ODS export of uninit'ed notes, do not craete note captions in UpdatePendingRowHeights 2009-05-28 11:11:17 +0200 dr r272384 : #i101930# note captions must be created before changing row/column size 2009-05-27 15:48:44 +0200 iha r272356 : #i101925# metafile creation is requested superfluously during inplace editing 2009-05-27 15:46:44 +0200 iha r272355 : #i101925# metafile creation is requested superfluously during inplace editing 2009-05-27 15:06:58 +0200 iha r272349 : #i101928# superfluous paint calls while entering and editing charts 2009-05-27 15:01:08 +0200 iha r272348 : #i101928# superfluous paint calls while entering and editing charts 2009-05-26 14:43:39 +0200 dr r272303 : #i101930# import performance: invisible cell notes cache caption data 2009-05-22 18:44:19 +0200 dr r272205 : #i101930# preparations for uninitialized notes (performance), adapted ODF import filter 2009-05-14 19:50:43 +0200 dr r271918 : #i101930# 'recycle' the shapes already created while loading cell notes 2009-05-06 16:07:45 +0200 dr r271598 : #i100827# improve performance of HTML query filter, patch by mmeeks, slightly modified 2009-05-06 11:02:38 +0200 dr r271577 : #i100827# improve performance of HTML query filter, patch by mmeeks 2009-05-06 10:50:13 +0200 dr r271575 : #i86650# improve performance of HTML query filter 2009-05-05 10:09:44 +0200 nn r271502 : #i101428# better handling of non-existing view data 2009-04-29 16:42:57 +0200 nn r271384 : #i101428# after loading, update row heights per sheet on demand
2009-07-03 12:42:53 +00:00
/** Creates the captions of all uninitialized cell notes.
@param bForced True = always create all captions, false = skip when Undo is disabled. */
void InitializeNoteCaptions( bool bForced = false );
sal_Bool TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCSIZE nSize );
void InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize );
void DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize,
sal_Bool* pUndoOutline = NULL );
2000-09-18 16:07:07 +00:00
sal_Bool TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize );
void InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize );
void DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize,
sal_Bool* pUndoOutline = NULL );
2000-09-18 16:07:07 +00:00
void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nDelFlag);
void CopyToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable* pTable,
sal_Bool bKeepScenarioFlags, sal_Bool bCloneNoteCaptions);
CWS-TOOLING: integrate CWS koheimultirangecopy 2009-08-29 08:19:57 +0200 kohei r275558 : A bit of cleanup & comments. 2009-08-29 08:10:31 +0200 kohei r275557 : removed duplicated code block. 2009-08-29 07:30:33 +0200 kohei r275556 : #i104551# fixed it. 2009-08-28 17:23:28 +0200 kohei r275541 : #i104553# fixed a crash on pasting over existing data. This also fixes notes being destroyed as originally reported in the IZ entry. 2009-08-27 23:36:17 +0200 kohei r275510 : #i104550# fixed. All I had to do was to call MarkToSimple() before examining the geometry of the marked ranges. 2009-08-27 18:04:11 +0200 kohei r275501 : CWS-TOOLING: rebase CWS koheimultirangecopy to trunk@275331 (milestone: DEV300:m56) 2009-08-21 11:37:20 +0200 dr r275228 : #i10000# another wntmsci12 warning 2009-08-21 09:33:32 +0200 dr r275218 : #i10000# sunncc warnings 2009-08-20 20:01:15 +0200 kohei r275196 : Let's not initialize a variable with itself, which is not yet initialized. This was obviously a silly human error. 2009-08-05 23:24:16 +0200 kohei r274702 : correct error message on matrix fragment. 2009-08-05 20:00:12 +0200 kohei r274699 : removed header includes for indexmap.hxx. 2009-08-05 19:54:24 +0200 kohei r274698 : removed ScIndexMap entirely - we don't need this any more. 2009-08-05 19:53:01 +0200 kohei r274697 : Removed duplicated methods that use ScIndexMap. We should now use ScRangeData::IndexMap across the board. 2009-08-05 18:45:17 +0200 kohei r274695 : Refactored code to remove redundant ScDocument::CopyToClip method. 2009-07-21 18:03:54 +0200 kohei r274209 : #i25855# initial commit of the patch from ooo-build. It's buildable.
2009-09-09 07:31:32 +00:00
void CopyToClip(const ScRangeList& rRanges, ScTable* pTable,
bool bKeepScenarioFlags, bool bCloneNoteCaptions);
void CopyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCsCOL nDx, SCsROW nDy,
sal_uInt16 nInsFlag, sal_Bool bAsLink, sal_Bool bSkipAttrForEmpty, ScTable* pTable);
void StartListeningInArea( SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2 );
void BroadcastInArea( SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2 );
2000-09-18 16:07:07 +00:00
void CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uInt16 nFlags, sal_Bool bMarked, ScTable* pDestTab,
2000-09-18 16:07:07 +00:00
const ScMarkData* pMarkData = NULL,
sal_Bool bAsLink = false, sal_Bool bColRowFlags = sal_True);
void UndoToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uInt16 nFlags, sal_Bool bMarked, ScTable* pDestTab,
2000-09-18 16:07:07 +00:00
const ScMarkData* pMarkData = NULL);
void TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
ScTable* pTransClip, sal_uInt16 nFlags, sal_Bool bAsLink );
2000-09-18 16:07:07 +00:00
2011-03-13 19:39:41 +01:00
// mark of this document
void MixMarked( const ScMarkData& rMark, sal_uInt16 nFunction,
sal_Bool bSkipEmpty, ScTable* pSrcTab );
void MixData( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uInt16 nFunction, sal_Bool bSkipEmpty, ScTable* pSrcTab );
2000-09-18 16:07:07 +00:00
void CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
SCCOL nDestCol, SCROW nDestRow, SCTAB nDestTab );
2000-09-18 16:07:07 +00:00
void CopyScenarioFrom( const ScTable* pSrcTab );
void CopyScenarioTo( ScTable* pDestTab ) const;
sal_Bool TestCopyScenarioTo( const ScTable* pDestTab ) const;
void MarkScenarioIn( ScMarkData& rMark, sal_uInt16 nNeededBits ) const;
sal_Bool HasScenarioRange( const ScRange& rRange ) const;
2000-09-18 16:07:07 +00:00
void InvalidateScenarioRanges();
const ScRangeList* GetScenarioRanges() const;
void CopyUpdated( const ScTable* pPosTab, ScTable* pDestTab ) const;
void InvalidateTableArea();
void InvalidatePageBreaks();
2000-09-18 16:07:07 +00:00
sal_Bool GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const; // FALSE = empty
sal_Bool GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const;
sal_Bool GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, sal_Bool bNotes ) const;
sal_Bool GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
SCCOL& rEndCol, sal_Bool bNotes ) const;
sal_Bool GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
SCROW& rEndRow, sal_Bool bNotes ) const;
2000-09-18 16:07:07 +00:00
sal_Bool GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const;
2000-09-18 16:07:07 +00:00
void ExtendPrintArea( OutputDevice* pDev,
SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW nEndRow );
2000-09-18 16:07:07 +00:00
void GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow,
sal_Bool bIncludeOld, bool bOnlyDown ) const;
bool ShrinkToUsedDataArea( bool& o_bShrunk, SCCOL& rStartCol, SCROW& rStartRow,
SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly ) const;
2000-09-18 16:07:07 +00:00
SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, ScDirection eDir );
2000-09-18 16:07:07 +00:00
void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY );
void GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
sal_Bool bMarked, sal_Bool bUnprotected, const ScMarkData& rMark );
2000-09-18 16:07:07 +00:00
void LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow );
2000-09-18 16:07:07 +00:00
sal_Bool HasData( SCCOL nCol, SCROW nRow );
sal_Bool HasStringData( SCCOL nCol, SCROW nRow );
sal_Bool HasValueData( SCCOL nCol, SCROW nRow );
sal_Bool HasStringCells( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow ) const;
2000-09-18 16:07:07 +00:00
sal_uInt16 GetErrCode( const ScAddress& rPos ) const
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
return ValidColRow(rPos.Col(),rPos.Row()) ?
aCol[rPos.Col()].GetErrCode( rPos.Row() ) :
0;
}
2000-09-18 16:07:07 +00:00
void ResetChanged( const ScRange& rRange );
void SetDirty();
void SetDirty( const ScRange& );
void SetDirtyAfterLoad();
void SetDirtyVar();
2001-02-13 17:51:12 +00:00
void SetTableOpDirty( const ScRange& );
2000-09-18 16:07:07 +00:00
void CalcAll();
void CalcAfterLoad();
void CompileAll();
2002-10-01 16:10:37 +00:00
void CompileXML( ScProgress& rProgress );
2000-09-18 16:07:07 +00:00
void UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
ScDocument* pUndoDoc = NULL, sal_Bool bIncludeDraw = sal_True, bool bUpdateNoteCaptionPos = true );
2001-01-22 13:10:25 +00:00
void UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz, bool bUpdateNoteCaptionPos = true );
2000-09-18 16:07:07 +00:00
void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
ScDocument* pUndoDoc );
void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
2000-09-18 16:07:07 +00:00
void UpdateInsertTab(SCTAB nTable);
void UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScTable* pRefUndo = NULL );
void UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo, ScProgress& );
void UpdateCompile( sal_Bool bForceIfNameInUse = false );
void SetTabNo(SCTAB nNewTab);
sal_Bool IsRangeNameInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uInt16 nIndex) const;
void FindRangeNamesInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
std::set<sal_uInt16>& rIndexes) const;
void ReplaceRangeNamesInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
CWS-TOOLING: integrate CWS koheimultirangecopy 2009-08-29 08:19:57 +0200 kohei r275558 : A bit of cleanup & comments. 2009-08-29 08:10:31 +0200 kohei r275557 : removed duplicated code block. 2009-08-29 07:30:33 +0200 kohei r275556 : #i104551# fixed it. 2009-08-28 17:23:28 +0200 kohei r275541 : #i104553# fixed a crash on pasting over existing data. This also fixes notes being destroyed as originally reported in the IZ entry. 2009-08-27 23:36:17 +0200 kohei r275510 : #i104550# fixed. All I had to do was to call MarkToSimple() before examining the geometry of the marked ranges. 2009-08-27 18:04:11 +0200 kohei r275501 : CWS-TOOLING: rebase CWS koheimultirangecopy to trunk@275331 (milestone: DEV300:m56) 2009-08-21 11:37:20 +0200 dr r275228 : #i10000# another wntmsci12 warning 2009-08-21 09:33:32 +0200 dr r275218 : #i10000# sunncc warnings 2009-08-20 20:01:15 +0200 kohei r275196 : Let's not initialize a variable with itself, which is not yet initialized. This was obviously a silly human error. 2009-08-05 23:24:16 +0200 kohei r274702 : correct error message on matrix fragment. 2009-08-05 20:00:12 +0200 kohei r274699 : removed header includes for indexmap.hxx. 2009-08-05 19:54:24 +0200 kohei r274698 : removed ScIndexMap entirely - we don't need this any more. 2009-08-05 19:53:01 +0200 kohei r274697 : Removed duplicated methods that use ScIndexMap. We should now use ScRangeData::IndexMap across the board. 2009-08-05 18:45:17 +0200 kohei r274695 : Refactored code to remove redundant ScDocument::CopyToClip method. 2009-07-21 18:03:54 +0200 kohei r274209 : #i25855# initial commit of the patch from ooo-build. It's buildable.
2009-09-09 07:31:32 +00:00
const ScRangeData::IndexMap& rMap );
void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
2000-09-18 16:07:07 +00:00
double nStepValue, double nMaxValue);
String GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY );
2000-09-18 16:07:07 +00:00
void UpdateSelectionFunction( ScFunctionData& rData,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2000-09-18 16:07:07 +00:00
const ScMarkData& rMark );
void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
sal_uInt16 nFormatNo );
void GetAutoFormatData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScAutoFormatData& rData);
2011-03-13 19:39:41 +01:00
void ScReplaceTabsStr( String& rStr, const String& rSrch, const String& rRepl ); // from sw
sal_Bool SearchAndReplace(const SvxSearchItem& rSearchItem,
SCCOL& rCol, SCROW& rRow, ScMarkData& rMark,
2000-09-18 16:07:07 +00:00
String& rUndoStr, ScDocument* pUndoDoc);
void FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2 );
2000-09-18 16:07:07 +00:00
void GetBorderLines( SCCOL nCol, SCROW nRow,
const ::editeng::SvxBorderLine** ppLeft, const ::editeng::SvxBorderLine** ppTop,
const ::editeng::SvxBorderLine** ppRight, const ::editeng::SvxBorderLine** ppBottom ) const;
2000-09-18 16:07:07 +00:00
bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nMask ) const;
bool HasAttribSelection( const ScMarkData& rMark, sal_uInt16 nMask ) const;
bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW& rEndRow,
sal_Bool bRefresh, sal_Bool bAttrs );
const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, sal_uInt16 nWhich ) const;
const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow ) const;
const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow ) const;
2000-09-18 16:07:07 +00:00
sal_uLong GetNumberFormat( const ScAddress& rPos ) const
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
return ValidColRow(rPos.Col(),rPos.Row()) ?
aCol[rPos.Col()].GetNumberFormat( rPos.Row() ) :
0;
}
sal_uLong GetNumberFormat( SCCOL nCol, SCROW nRow ) const;
sal_uInt32 GetNumberFormat( SCCOL nCol, SCROW nStartRow, SCROW nEndRow ) const;
void MergeSelectionPattern( ScMergePatternState& rState,
const ScMarkData& rMark, sal_Bool bDeep ) const;
void MergePatternArea( ScMergePatternState& rState, SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2, sal_Bool bDeep ) const;
2000-09-18 16:07:07 +00:00
void MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
ScLineFlags& rFlags,
SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow ) const;
2000-09-18 16:07:07 +00:00
void ApplyBlockFrame( const SvxBoxItem* pLineOuter,
const SvxBoxInfoItem* pLineInner,
SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow );
2000-09-18 16:07:07 +00:00
void ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr );
void ApplyPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
const ScPatternAttr& rAttr, ScEditDataArray* pDataArray = NULL );
bool SetAttrEntries(SCCOL nCol, ScAttrEntry* pData, SCSIZE nSize);
void SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr, sal_Bool bPutToPool = false )
CWS-TOOLING: integrate CWS calc51 2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access. 2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions 2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32 2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings 2009-07-03 14:18:45 +0200 nn r273698 : msvc warning 2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end 2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51) 2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo 2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311 2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action 2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings 2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options 2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options 2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options 2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position 2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon) 2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells 2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action 2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc) 2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC 2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
2009-07-28 10:04:47 +00:00
{
if (ValidColRow(rPos.Col(),rPos.Row()))
aCol[rPos.Col()].SetPattern( rPos.Row(), rAttr, bPutToPool );
}
void SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr, sal_Bool bPutToPool = false );
2000-09-18 16:07:07 +00:00
void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange,
const ScPatternAttr& rPattern, short nNewType );
void ApplyStyle( SCCOL nCol, SCROW nRow, const ScStyleSheet& rStyle );
void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScStyleSheet& rStyle );
2000-09-18 16:07:07 +00:00
void ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData& rMark);
void ApplySelectionLineStyle( const ScMarkData& rMark,
const ::editeng::SvxBorderLine* pLine, sal_Bool bColorOnly );
2000-09-18 16:07:07 +00:00
const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow ) const;
const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark, sal_Bool& rFound ) const;
const ScStyleSheet* GetAreaStyle( sal_Bool& rFound, SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2 ) const;
2000-09-18 16:07:07 +00:00
void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, sal_Bool bRemoved,
2000-09-18 16:07:07 +00:00
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY );
sal_Bool IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const;
2000-09-18 16:07:07 +00:00
2011-03-14 00:39:56 +01:00
bool ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags );
bool RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags );
2000-09-18 16:07:07 +00:00
void ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = NULL );
void DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark );
2000-09-18 16:07:07 +00:00
void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
void ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark );
2000-09-18 16:07:07 +00:00
const ScRange* GetRepeatColRange() const { return pRepeatColRange; }
const ScRange* GetRepeatRowRange() const { return pRepeatRowRange; }
void SetRepeatColRange( const ScRange* pNew );
void SetRepeatRowRange( const ScRange* pNew );
sal_uInt16 GetPrintRangeCount() const { return static_cast< sal_uInt16 >( aPrintRanges.size() ); }
const ScRange* GetPrintRange(sal_uInt16 nPos) const;
/** Returns true, if the sheet is always printed. */
bool IsPrintEntireSheet() const { return bPrintEntireSheet; }
/** Removes all print ranges. */
void ClearPrintRanges();
/** Adds a new print ranges. */
void AddPrintRange( const ScRange& rNew );
/** Marks the specified sheet to be printed completely. Deletes old print ranges! */
void SetPrintEntireSheet();
2000-09-18 16:07:07 +00:00
void FillPrintSaver( ScPrintSaverTab& rSaveTab ) const;
void RestorePrintRanges( const ScPrintSaverTab& rSaveTab );
sal_uInt16 GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
2000-09-18 16:07:07 +00:00
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
sal_Bool bFormula, const ScMarkData* pMarkData,
const ScColWidthParam* pParam );
sal_Bool SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nExtra,
2000-09-18 16:07:07 +00:00
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
sal_Bool bForce,
ScProgress* pOuterProgress = NULL, sal_uLong nProgressStart = 0 );
void SetOptimalHeightOnly(SCROW nStartRow, SCROW nEndRow, sal_uInt16 nExtra,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
sal_Bool bForce,
ScProgress* pOuterProgress = NULL, sal_uLong nProgressStart = 0 );
long GetNeededSize( SCCOL nCol, SCROW nRow,
2000-09-18 16:07:07 +00:00
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
sal_Bool bWidth, sal_Bool bTotalSize );
void SetColWidth( SCCOL nCol, sal_uInt16 nNewWidth );
void SetColWidthOnly( SCCOL nCol, sal_uInt16 nNewWidth );
void SetRowHeight( SCROW nRow, sal_uInt16 nNewHeight );
sal_Bool SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight,
2000-09-18 16:07:07 +00:00
double nPPTX, double nPPTY );
/**
* Set specified row height to specified ranges. Don't check for drawing
* objects etc. Just set the row height. Nothing else.
*
* Note that setting a new row height via this function will not
* invalidate page breaks.
*/
void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight );
2011-03-13 19:39:41 +01:00
// nPPT to test for modification
void SetManualHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bManual );
2000-09-18 16:07:07 +00:00
sal_uInt16 GetColWidth( SCCOL nCol ) const;
SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCROW* pStartRow = NULL, SCROW* pEndRow = NULL, bool bHiddenAsZero = true ) const;
sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow ) const;
sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const;
sal_uLong GetColOffset( SCCOL nCol ) const;
sal_uLong GetRowOffset( SCROW nRow ) const;
/**
* Get the last row such that the height of row 0 to the end row is as
* high as possible without exceeding the specified height value.
*
* @param nHeight maximum desired height
*
* @return SCROW last row of the range within specified height.
*/
SCROW GetRowForHeight(sal_uLong nHeight) const;
2000-09-18 16:07:07 +00:00
sal_uInt16 GetOriginalWidth( SCCOL nCol ) const;
sal_uInt16 GetOriginalHeight( SCROW nRow ) const;
2000-09-18 16:07:07 +00:00
sal_uInt16 GetCommonWidth( SCCOL nEndCol );
SCROW GetHiddenRowCount( SCROW nRow );
2000-09-18 16:07:07 +00:00
void ShowCol(SCCOL nCol, bool bShow);
void ShowRow(SCROW nRow, bool bShow);
void DBShowRow(SCROW nRow, bool bShow);
2000-09-18 16:07:07 +00:00
void ShowRows(SCROW nRow1, SCROW nRow2, bool bShow);
void DBShowRows(SCROW nRow1, SCROW nRow2, bool bShow);
2000-09-18 16:07:07 +00:00
void SetColFlags( SCCOL nCol, sal_uInt8 nNewFlags );
void SetRowFlags( SCROW nRow, sal_uInt8 nNewFlags );
void SetRowFlags( SCROW nStartRow, SCROW nEndRow, sal_uInt8 nNewFlags );
2000-09-18 16:07:07 +00:00
/// @return the index of the last row with any set flags (auto-pagebreak is ignored).
SCROW GetLastFlaggedRow() const;
2000-09-18 16:07:07 +00:00
/// @return the index of the last changed column (flags and column width, auto pagebreak is ignored).
SCCOL GetLastChangedCol() const;
/// @return the index of the last changed row (flags and row height, auto pagebreak is ignored).
SCROW GetLastChangedRow() const;
bool IsDataFiltered() const;
sal_uInt8 GetColFlags( SCCOL nCol ) const;
sal_uInt8 GetRowFlags( SCROW nRow ) const;
2000-09-18 16:07:07 +00:00
const ScBitMaskCompressedArray< SCROW, sal_uInt8> * GetRowFlagsArray() const
{ return pRowFlags; }
sal_Bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, sal_Bool bShow );
sal_Bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, sal_Bool bShow );
2000-09-18 16:07:07 +00:00
void UpdatePageBreaks( const ScRange* pUserArea );
void RemoveManualBreaks();
sal_Bool HasManualBreaks() const;
void SetRowManualBreaks( const ::std::set<SCROW>& rBreaks );
void SetColManualBreaks( const ::std::set<SCCOL>& rBreaks );
2000-09-18 16:07:07 +00:00
void GetAllRowBreaks(::std::set<SCROW>& rBreaks, bool bPage, bool bManual) const;
void GetAllColBreaks(::std::set<SCCOL>& rBreaks, bool bPage, bool bManual) const;
bool HasRowPageBreak(SCROW nRow) const;
bool HasColPageBreak(SCCOL nCol) const;
bool HasRowManualBreak(SCROW nRow) const;
bool HasColManualBreak(SCCOL nCol) const;
/**
* Get the row position of the next manual break that occurs at or below
* specified row. When no more manual breaks are present at or below
* the specified row, -1 is returned.
*
* @param nRow row at which the search begins.
*
* @return SCROW next row position with manual page break, or -1 if no
* more manual breaks are present.
*/
SCROW GetNextManualBreak(SCROW nRow) const;
void RemoveRowPageBreaks(SCROW nStartRow, SCROW nEndRow);
void RemoveRowBreak(SCROW nRow, bool bPage, bool bManual);
void RemoveColBreak(SCCOL nCol, bool bPage, bool bManual);
void SetRowBreak(SCROW nRow, bool bPage, bool bManual);
void SetColBreak(SCCOL nCol, bool bPage, bool bManual);
::com::sun::star::uno::Sequence<
::com::sun::star::sheet::TablePageBreakData> GetRowBreakData() const;
bool RowHidden(SCROW nRow, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL) const;
bool RowHiddenLeaf(SCROW nRow, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL) const;
bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow) const;
bool ColHidden(SCCOL nCol, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL) const;
bool SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden);
bool SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden);
void CopyColHidden(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
void CopyRowHidden(ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
void CopyRowHeight(ScTable& rSrcTable, SCROW nStartRow, SCROW nEndRow, SCROW nSrcOffset);
SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow) const;
SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow) const;
SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow) const;
sal_uInt32 GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow) const;
SCCOLROW LastHiddenColRow(SCCOLROW nPos, bool bCol) const;
bool RowFiltered(SCROW nRow, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL) const;
bool ColFiltered(SCCOL nCol, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL) const;
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow) const;
void CopyColFiltered(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
void CopyRowFiltered(ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, bool bFiltered);
void SetColFiltered(SCCOL nStartCol, SCCOL nEndCol, bool bFiltered);
SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const;
SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const;
SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow) const;
void SyncColRowFlags();
void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
void Sort(const ScSortParam& rSortParam, sal_Bool bKeepQuery);
sal_Bool ValidQuery(SCROW nRow, const ScQueryParam& rQueryParam,
sal_Bool* pSpecial = NULL, ScBaseCell* pCell = NULL,
sal_Bool* pbTestEqualCondition = NULL );
2000-09-18 16:07:07 +00:00
void TopTenQuery( ScQueryParam& );
SCSIZE Query(ScQueryParam& rQueryParam, sal_Bool bKeepSub);
sal_Bool CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
2000-09-18 16:07:07 +00:00
void GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedScStrCollection& rStrings, bool& rHasDates);
void GetFilteredFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, TypedScStrCollection& rStrings, bool& rHasDates );
sal_Bool GetDataEntries(SCCOL nCol, SCROW nRow, TypedScStrCollection& rStrings, sal_Bool bLimit);
2000-09-18 16:07:07 +00:00
sal_Bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
sal_Bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
2000-09-18 16:07:07 +00:00
void DoColResize( SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd );
2000-09-18 16:07:07 +00:00
sal_Int32 GetMaxStringLen( SCCOL nCol,
SCROW nRowStart, SCROW nRowEnd, CharSet eCharSet ) const;
xub_StrLen GetMaxNumberStringLen( sal_uInt16& nPrecision,
SCCOL nCol,
SCROW nRowStart, SCROW nRowEnd ) const;
2000-09-18 16:07:07 +00:00
void FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges );
2000-09-18 16:07:07 +00:00
void IncRecalcLevel();
void DecRecalcLevel( bool bUpdateNoteCaptionPos = true );
2000-09-18 16:07:07 +00:00
sal_Bool IsSortCollatorGlobal() const;
2001-03-14 14:50:34 +00:00
void InitSortCollator( const ScSortParam& rPar );
void DestroySortCollator();
void SetDrawPageSize( bool bResetStreamValid = true, bool bUpdateNoteCaptionPos = true );
2001-03-14 14:50:34 +00:00
void SetRangeName(ScRangeName* pNew);
ScRangeName* GetRangeName() const;
void UpdateMoveTab(SCTAB nOldPos,SCTAB nNewPos);
2011-03-08 18:50:13 -05:00
2000-09-18 16:07:07 +00:00
private:
void FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd,
2000-09-18 16:07:07 +00:00
FillDateCmd eFillDateCmd,
double nStepValue, double nMaxValue, sal_uInt16 nMinDigits,
sal_Bool bAttribs, ScProgress& rProgress );
void FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
2000-09-18 16:07:07 +00:00
FillCmd& rCmd, FillDateCmd& rDateCmd,
double& rInc, sal_uInt16& rMinDigits,
ScUserListData*& rListData, sal_uInt16& rListIndex);
void FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uLong nFillCount, FillDir eFillDir, ScProgress& rProgress );
2000-09-18 16:07:07 +00:00
sal_Bool ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
sal_Bool bMarked, sal_Bool bUnprotected );
2000-09-18 16:07:07 +00:00
void AutoFormatArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
const ScPatternAttr& rAttr, sal_uInt16 nFormatNo);
void GetAutoFormatAttr(SCCOL nCol, SCROW nRow, sal_uInt16 nIndex, ScAutoFormatData& rData);
void GetAutoFormatFrame(SCCOL nCol, SCROW nRow, sal_uInt16 nFlags, sal_uInt16 nIndex, ScAutoFormatData& rData);
sal_Bool SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow,
2000-09-18 16:07:07 +00:00
const ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc);
sal_Bool Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
2000-09-18 16:07:07 +00:00
const ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc);
sal_Bool SearchAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
2000-09-18 16:07:07 +00:00
String& rUndoStr, ScDocument* pUndoDoc);
sal_Bool Replace(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
2000-09-18 16:07:07 +00:00
const ScMarkData& rMark, String& rUndoStr, ScDocument* pUndoDoc);
sal_Bool ReplaceAll(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
2000-09-18 16:07:07 +00:00
String& rUndoStr, ScDocument* pUndoDoc);
sal_Bool SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
2000-09-18 16:07:07 +00:00
ScMarkData& rMark);
sal_Bool ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
ScMarkData& rMark, sal_Bool bIsUndo);
sal_Bool SearchAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark);
sal_Bool ReplaceAllStyle(const SvxSearchItem& rSearchItem, ScMarkData& rMark,
2000-09-18 16:07:07 +00:00
ScDocument* pUndoDoc);
bool SearchAndReplaceEmptyCells(
const SvxSearchItem& rSearchItem,
SCCOL& rCol, SCROW& rRow, ScMarkData& rMark,
String& rUndoStr, ScDocument* pUndoDoc);
bool SearchRangeForEmptyCell(const ScRange& rRange,
const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
String& rUndoStr, ScDocument* pUndoDoc);
bool SearchRangeForAllEmptyCells(const ScRange& rRange,
const SvxSearchItem& rSearchItem, ScMarkData& rMark,
String& rUndoStr, ScDocument* pUndoDoc);
2000-09-18 16:07:07 +00:00
2011-03-13 19:39:41 +01:00
// use the global sort parameter:
sal_Bool IsSorted(SCCOLROW nStart, SCCOLROW nEnd);
void DecoladeRow( ScSortInfoArray*, SCROW nRow1, SCROW nRow2 );
void SwapCol(SCCOL nCol1, SCCOL nCol2);
void SwapRow(SCROW nRow1, SCROW nRow2);
short CompareCell( sal_uInt16 nSort,
ScBaseCell* pCell1, SCCOL nCell1Col, SCROW nCell1Row,
ScBaseCell* pCell2, SCCOL nCell2Col, SCROW nCell2Row );
short Compare(SCCOLROW nIndex1, SCCOLROW nIndex2);
short Compare( ScSortInfoArray*, SCCOLROW nIndex1, SCCOLROW nIndex2);
ScSortInfoArray* CreateSortInfoArray( SCCOLROW nInd1, SCCOLROW nInd2 );
void QuickSort( ScSortInfoArray*, SCsCOLROW nLo, SCsCOLROW nHi);
2000-09-18 16:07:07 +00:00
void SortReorder( ScSortInfoArray*, ScProgress& );
sal_Bool CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
sal_Bool CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
void GetUpperCellString(SCCOL nCol, SCROW nRow, String& rStr);
2000-09-18 16:07:07 +00:00
sal_Bool RefVisible(ScFormulaCell* pCell);
2000-09-18 16:07:07 +00:00
sal_Bool IsEmptyLine(SCROW nRow, SCCOL nStartCol, SCCOL nEndCol);
2000-09-18 16:07:07 +00:00
void IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillDateCmd eCmd);
void FillFormula(sal_uLong& nFormulaCounter, sal_Bool bFirst, ScFormulaCell* pSrcCell,
SCCOL nDestCol, SCROW nDestRow, sal_Bool bLast );
void UpdateInsertTabAbs(SCTAB nNewPos);
sal_Bool GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, sal_Bool bInSel,
2000-09-18 16:07:07 +00:00
const ScMarkData& rMark) const;
sal_Bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark );
sal_Bool TestTabRefAbs(SCTAB nTable);
2000-09-18 16:07:07 +00:00
void CompileDBFormula();
void CompileDBFormula( sal_Bool bCreateFormulaString );
void CompileNameFormula( sal_Bool bCreateFormulaString );
2000-09-18 16:07:07 +00:00
void CompileColRowNameFormula();
void StartListening( const ScAddress& rAddress, SvtListener* pListener );
void EndListening( const ScAddress& rAddress, SvtListener* pListener );
2000-09-18 16:07:07 +00:00
void StartAllListeners();
void StartNeededListeners(); // only for cells where NeedsListening()==TRUE
2000-09-18 16:07:07 +00:00
void SetRelNameDirty();
void SetLoadingMedium(bool bLoading);
SCSIZE FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2,
SCCOL nCol, SCROW nAttrRow1, SCROW nAttrRow2, SCSIZE nArrY,
const ScPatternAttr* pPattern, const SfxItemSet* pCondSet );
2000-09-18 16:07:07 +00:00
// idle calculation of OutputDevice text width for cell
// also invalidates script type, broadcasts for "calc as shown"
void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo,
sal_Bool bNumFormatChanged, sal_Bool bBroadcast );
void SkipFilteredRows(SCROW& rRow, SCROW& rLastNonFilteredRow, bool bForward);
/**
* In case the cell text goes beyond the column width, move the max column
* position to the right. This is called from ExtendPrintArea.
*/
void MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY);
/**
* Use this to iterate through non-empty visible cells in a single column.
*/
class VisibleDataCellIterator
{
public:
static SCROW ROW_NOT_FOUND;
explicit VisibleDataCellIterator(ScFlatBoolRowSegments& rRowSegs, ScColumn& rColumn);
~VisibleDataCellIterator();
/**
* Set the start row position. In case there is not visible data cell
* at the specified row position, it will move to the position of the
* first visible data cell below that point.
*
* @return First visible data cell if found, or NULL otherwise.
*/
ScBaseCell* reset(SCROW nRow);
/**
* Find the next visible data cell position.
*
* @return Next visible data cell if found, or NULL otherwise.
*/
ScBaseCell* next();
/**
* Get the current row position.
*
* @return Current row position, or ROW_NOT_FOUND if the iterator
* doesn't point to a valid data cell position.
*/
SCROW getRow() const;
private:
ScFlatBoolRowSegments& mrRowSegs;
ScColumn& mrColumn;
ScBaseCell* mpCell;
SCROW mnCurRow;
SCROW mnUBound;
};
2000-09-18 16:07:07 +00:00
};
#endif
2010-10-27 12:43:08 +01:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */