2008-12-12 09:38:47 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
|
|
|
*
|
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
|
|
|
*
|
|
|
|
* $RCSfile: externalrefmgr.hxx,v $
|
|
|
|
* $Revision: 1.1.2.23 $
|
|
|
|
*
|
|
|
|
* This file is part of OpenOffice.org.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* 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).
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef SC_EXTERNALREFMGR_HXX
|
|
|
|
#define SC_EXTERNALREFMGR_HXX
|
|
|
|
|
|
|
|
#include "global.hxx"
|
|
|
|
#include "address.hxx"
|
|
|
|
#include "sfx2/objsh.hxx"
|
|
|
|
#include "sfx2/lnkbase.hxx"
|
|
|
|
#include "tools/time.hxx"
|
|
|
|
#include "vcl/timer.hxx"
|
|
|
|
#include "svtools/zforlist.hxx"
|
|
|
|
#include "scmatrix.hxx"
|
|
|
|
|
|
|
|
#include <hash_map>
|
|
|
|
#include <hash_set>
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
#include <vector>
|
|
|
|
#include <list>
|
2009-01-13 11:01:13 +00:00
|
|
|
#include <formula/ExternalReferenceHelper.hxx>
|
2008-12-12 09:38:47 +00:00
|
|
|
|
|
|
|
class ScDocument;
|
2009-01-13 11:01:13 +00:00
|
|
|
namespace formula
|
|
|
|
{
|
|
|
|
class FormulaToken;
|
|
|
|
}
|
2008-12-12 09:38:47 +00:00
|
|
|
class ScToken;
|
|
|
|
class ScMatrix;
|
|
|
|
class ScTokenArray;
|
|
|
|
class String;
|
|
|
|
class SfxObjectShellRef;
|
|
|
|
class Window;
|
|
|
|
|
|
|
|
class ScExternalRefCache;
|
|
|
|
|
|
|
|
class ScExternalRefLink : public ::sfx2::SvBaseLink
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ScExternalRefLink(ScDocument* pDoc, sal_uInt16 nFileId, const String& rFilter);
|
|
|
|
virtual ~ScExternalRefLink();
|
|
|
|
|
|
|
|
virtual void Closed();
|
|
|
|
virtual void DataChanged(const String& rMimeType, const ::com::sun::star::uno::Any & rValue);
|
|
|
|
virtual void Edit(Window* pParent, const Link& rEndEditHdl);
|
|
|
|
|
|
|
|
void SetDoReferesh(bool b);
|
|
|
|
|
|
|
|
private:
|
|
|
|
ScExternalRefLink(); // disabled
|
|
|
|
ScExternalRefLink(const ScExternalRefLink&); // disabled
|
|
|
|
|
|
|
|
DECL_LINK( ExternalRefEndEditHdl, ::sfx2::SvBaseLink* );
|
|
|
|
|
|
|
|
sal_uInt16 mnFileId;
|
|
|
|
String maFilterName;
|
|
|
|
ScDocument* mpDoc;
|
|
|
|
bool mbDoRefresh;
|
|
|
|
};
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Cache table for external reference data.
|
|
|
|
*/
|
|
|
|
class ScExternalRefCache
|
|
|
|
{
|
|
|
|
public:
|
2009-01-13 11:01:13 +00:00
|
|
|
typedef ::boost::shared_ptr< formula::FormulaToken> TokenRef;
|
|
|
|
typedef ::boost::shared_ptr<ScTokenArray> TokenArrayRef;
|
2008-12-12 09:38:47 +00:00
|
|
|
|
|
|
|
struct TableName
|
|
|
|
{
|
|
|
|
String maUpperName;
|
|
|
|
String maRealName;
|
|
|
|
|
|
|
|
explicit TableName(const String& rUppper, const String& rReal);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CellFormat
|
|
|
|
{
|
|
|
|
bool mbIsSet;
|
|
|
|
short mnType;
|
|
|
|
sal_uInt32 mnIndex;
|
|
|
|
|
|
|
|
explicit CellFormat();
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
/** individual cell within cached external ref table. */
|
|
|
|
struct Cell
|
|
|
|
{
|
|
|
|
TokenRef mxToken;
|
|
|
|
sal_uInt32 mnFmtIndex;
|
|
|
|
};
|
|
|
|
typedef ::std::hash_map<SCCOL, Cell> RowDataType;
|
|
|
|
typedef ::std::hash_map<SCROW, RowDataType> RowsDataType;
|
|
|
|
|
|
|
|
public:
|
|
|
|
// SUNWS needs a forward declared friend, otherwise types and members
|
|
|
|
// of the outer class are not accessible.
|
|
|
|
class Table;
|
|
|
|
friend class ScExternalRefCache::Table;
|
|
|
|
|
|
|
|
class Table
|
|
|
|
{
|
|
|
|
public:
|
2009-07-28 10:04:47 +00:00
|
|
|
|
|
|
|
enum ReferencedFlag
|
|
|
|
{
|
|
|
|
UNREFERENCED,
|
|
|
|
REFERENCED_MARKED, // marked as referenced during store to file
|
|
|
|
REFERENCED_PERMANENT // permanently marked, e.g. from within interpreter
|
|
|
|
};
|
|
|
|
|
2008-12-12 09:38:47 +00:00
|
|
|
Table();
|
|
|
|
~Table();
|
|
|
|
|
2009-01-14 13:43:32 +00:00
|
|
|
SC_DLLPUBLIC void setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uInt32 nFmtIndex = 0);
|
2008-12-12 09:38:47 +00:00
|
|
|
TokenRef getCell(SCCOL nCol, SCROW nRow, sal_uInt32* pnFmtIndex = NULL) const;
|
|
|
|
bool hasRow( SCROW nRow ) const;
|
2009-07-28 10:04:47 +00:00
|
|
|
/** Set/clear referenced status flag only if current status is not
|
|
|
|
REFERENCED_PERMANENT. */
|
2009-04-02 15:00:15 +00:00
|
|
|
void setReferenced( bool bReferenced );
|
2009-07-28 10:04:47 +00:00
|
|
|
/// Unconditionally set the reference status flag.
|
|
|
|
void setReferencedFlag( ReferencedFlag eFlag );
|
|
|
|
ReferencedFlag getReferencedFlag() const;
|
|
|
|
bool isReferenced() const;
|
2009-04-02 15:00:15 +00:00
|
|
|
/// Obtain a sorted vector of rows.
|
2008-12-12 09:38:47 +00:00
|
|
|
void getAllRows(::std::vector<SCROW>& rRows) const;
|
2009-04-02 15:00:15 +00:00
|
|
|
/// Obtain a sorted vector of columns.
|
2008-12-12 09:38:47 +00:00
|
|
|
void getAllCols(SCROW nRow, ::std::vector<SCCOL>& rCols) const;
|
|
|
|
void getAllNumberFormats(::std::vector<sal_uInt32>& rNumFmts) const;
|
|
|
|
|
|
|
|
private:
|
2009-07-28 10:04:47 +00:00
|
|
|
RowsDataType maRows;
|
|
|
|
ReferencedFlag meReferenced;
|
2008-12-12 09:38:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef ::boost::shared_ptr<Table> TableTypeRef;
|
|
|
|
typedef ::std::hash_map<String, size_t, ScStringHashCode> TableNameIndexMap;
|
|
|
|
|
|
|
|
ScExternalRefCache();
|
|
|
|
~ScExternalRefCache();
|
|
|
|
|
|
|
|
const String* getRealTableName(sal_uInt16 nFileId, const String& rTabName) const;
|
|
|
|
const String* getRealRangeName(sal_uInt16 nFileId, const String& rRangeName) const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a cached cell data at specified cell location.
|
|
|
|
*
|
|
|
|
* @param nFileId file ID of an external document
|
|
|
|
* @param rTabName sheet name
|
|
|
|
* @param nCol
|
CWS-TOOLING: integrate CWS koheiformula02
2009-02-19 13:18:02 +0100 iha r268276 : #i99400# Missing value plotting broken
2009-02-11 03:39:50 +0100 kohei r267579 : forgot to add an in-line comment.
2009-02-11 00:26:03 +0100 kohei r267578 : Handle also the single cell references when exporting chart ranges.
2009-02-10 19:50:37 +0100 kohei r267576 : removed a compiler warning.
2009-02-10 06:48:55 +0100 kohei r267536 : got xls export filter to correctly write external references in charts.
However, Excel doesn't entirely like my chart output if the chart contains
external references. The data are all there, but it refuses to draw it.
It works fine with charts with internal references.
2009-02-10 03:33:13 +0100 kohei r267533 : correctly import external references used in chart objects, by using a token
array instead of a range list to represent the data ranges.
2009-02-04 15:22:30 +0100 kohei r267387 : return aRet instead of the sRangeRepresentation, just to be consistent with the
rest of the code there. Both strings are empty so this is just for aesthetic
reasons.
2009-02-04 15:07:49 +0100 kohei r267384 : #i98872# allow export of empty data range, in order to allow saving of documents
with an empty chart.
2009-02-03 19:20:38 +0100 kohei r267340 : #i98801# added a special case handler for parsing range address syntax used by
the older version of OOo. In the old syntax, the sheet name was dropped for
the 2nd reference of a range if the 1st and 2nd references are on the same
sheet. In the new syntax this is not the case.
Also fixed unintential display of the sheet name for the end range address of a
single-sheet range.
2009-01-28 20:46:11 +0100 kohei r267085 : call GetIndex() and GetString() only when the token is external ref, to avoid
triggering assertions in a non-pro build.
2009-01-28 19:30:58 +0100 kohei r267080 : When listeners are being destroyed, don't bother unregistering them with the
external ref manager if the document itself is being destroyed.
2009-01-28 18:56:52 +0100 kohei r267079 : fixed a heap corruption. The Table instance stores instances of FormulaToken
type, not of ScAddress type.
2009-01-26 18:59:14 +0100 kohei r266945 : removed another warning on win32 build.
2009-01-26 18:50:56 +0100 kohei r266943 : removed warnings on windows build.
2009-01-26 17:16:09 +0100 kohei r266939 : added const to a returned reference value that is never used to modify its value.
2009-01-26 16:49:33 +0100 kohei r266937 : Assume that the document instance is not null, or else don't copy any data at all.
2009-01-26 16:19:50 +0100 kohei r266935 : create a clone of ScChart2DataSeqeunce without calling its copy constructor,
since explicit definition of copy constructor would cause a serious compiler
warning that's too ugly to fix.
2009-01-26 05:26:58 +0100 kohei r266894 : removed unused variable and changed function signature.
2009-01-26 05:02:58 +0100 kohei r266893 : removed unused variables to remove compiler warnings.
2009-01-25 18:07:31 +0100 kohei r266890 : fixed indentation inconsistencies in ctor initializers.
2009-01-25 18:01:41 +0100 kohei r266889 : * removed a compiler warning.
* tab -> whitespace conversion in some code.
2009-01-25 03:57:37 +0100 kohei r266888 : removed a mis-leading comment.
2009-01-25 02:37:45 +0100 kohei r266887 : * moved the ref token join method from chart2uno local to ScRefTokenHelper.
* a little code cleanup.
2009-01-24 09:29:26 +0100 kohei r266865 : Don't re-link external files if their link has been broken once.
2009-01-24 09:16:28 +0100 kohei r266864 : a typo in an in-line comment.
2009-01-24 09:14:29 +0100 kohei r266863 : Treat non-cached cells as empty cells only when the source document is not
reachable.
2009-01-24 07:23:44 +0100 kohei r266862 : Don't purge the external ref cache when the link is broken.
2009-01-24 03:25:46 +0100 kohei r266861 : When a cell outside the cached range is queried, we should return an emtpy cell
token instead of NULL, to be consistent with the old behavior.
2009-01-24 02:34:38 +0100 kohei r266860 : Remove corresponding listeners when an external doc link is broken.
2009-01-23 23:18:44 +0100 kohei r266856 : more work on handling external ref update listeners.
2009-01-23 18:10:09 +0100 kohei r266846 : Handle loading of chart objects when their external link is updated.
2009-01-23 06:57:34 +0100 kohei r266765 : more work on ref-tokenizing ScChartListener.
2009-01-22 22:57:52 +0100 kohei r266760 : More work on moving ref token helper code to reftokenhelper & ref-tokenizing
ScChartListener.
2009-01-22 21:52:38 +0100 kohei r266758 : moved the code that converts XML range string into Calc's internal range string
from chart2uno to rangeutl & compile the range string to generate ref tokens
upon ods import.
2009-01-22 18:56:14 +0100 kohei r266749 : fixed a build breakage.
2009-01-22 18:53:43 +0100 kohei r266748 : Initial work toward using ref tokens in ScChartListener class. I'll start
moving some of local ref token handling functions from chart2uno.cxx to
ScRefTokenHelper class to make them available in other places.
2009-01-22 17:38:20 +0100 kohei r266746 : Add a big, fat warning against mixed use of ScSharedTokenRef and ScTokenRef.
2009-01-22 08:33:28 +0100 kohei r266711 : #i98338# fixed slicing of external ref token classes by adding their own Clone() method.
2009-01-22 05:02:25 +0100 kohei r266710 : Applied the same fix that npower/oj applied to fix a crasher (from #i98317#).
2009-01-21 23:02:42 +0100 kohei r266705 : fix build breakages as a result of rebase to m39. Mostly due to the new formula
module and its associated changes esp. wrt token classes.
2009-01-21 19:14:40 +0100 kohei r266699 : CWS-TOOLING: rebase CWS koheiformula02 to trunk@266428 (milestone: DEV300:m39)
2009-01-21 17:55:10 +0100 kohei r266698 : moved the shared ScToken typedef to token.hxx, and use it instead of
ScChart2TokenRef, since I need this typedef in the odf importer. In the future
this can also replace the similar typedef in ScExternalRefManager.
2009-01-21 06:54:04 +0100 kohei r266627 : Added external ref listener framework so that objects listening to external ref changes can get notified
when the link is updated.
The work is not done yet.
2009-01-20 23:07:38 +0100 kohei r266626 : When exporting a range to ODF, we don't want to prepend a sheet name with '$' even for an external sheet.
2009-01-20 23:06:40 +0100 kohei r266625 : 1) code cleanup to remove compiler warnings.
2) fixed convertRangesToXML to convert ref tokens into correct ODF range format.
2009-01-20 19:40:45 +0100 kohei r266620 : extracted the code that fills cache from external ref into its own method.
2009-01-20 18:26:47 +0100 kohei r266616 : added javadoc parameter descriptions.
2009-01-20 18:01:17 +0100 kohei r266615 : disable ScChart2EmptyDataSequence entirely since that class doesn't appear to be used any more.
2009-01-20 17:42:59 +0100 kohei r266608 : fixed a crash when the data source range is empty at time of chart creation.
2009-01-20 17:13:34 +0100 kohei r266601 : a simple locale variable rename.
2009-01-20 16:57:04 +0100 kohei r266598 : #i97563# applied my patch, to fix incorrect export attempts of color values as a number formatter key, and change the condition of
one assertion to prevent it from being triggered incorrectly in non-pro build.
2009-01-17 07:41:01 +0100 kohei r266458 : a little code cleanup.
2009-01-17 07:30:48 +0100 kohei r266457 : removed a method that it no longer used.
2009-01-17 07:29:15 +0100 kohei r266456 : fixed a crash when no external data is available for a given range.
2009-01-17 07:14:50 +0100 kohei r266455 : Even more work on range list to ref token migration. The chart now retains
external data after editing of chart.
2009-01-16 18:54:35 +0100 kohei r266453 : More work on replacing flat ranges and addresses with ref tokens.
2009-01-16 17:07:51 +0100 kohei r266438 : extracted a large code block into its own local method.
2009-01-16 15:22:57 +0100 kohei r266423 : Initial work toward replacing the chart positioner and its related code in
order to use reference tokens instead of range list. The basis of that code
is the old ScChartPositioner and ScChartPositionMap duplicated to avoid breaking
any existing legacy code that might still use it. It appears to be used by the
StarOffice 1.0 filter only.
Still not working with the external references.
2009-01-15 05:33:39 +0100 kohei r266334 : renamed chackRanges() to overlaps() to make it more descriptive of what it does.
2009-01-13 23:25:50 +0100 kohei r266260 : Moved the token-to-string conversion code up so that other parts of the code can use it.
2009-01-13 22:14:35 +0100 kohei r266256 : generateLabels() now uses reference token list.
2009-01-13 18:42:23 +0100 kohei r266246 : Finally, build data array for external data sources. This will now allow the
data to be displayed in the diagram.
2009-01-13 16:34:03 +0100 kohei r266235 : We now need to verify range representation by compiling it instead of parsing it.
2009-01-13 15:41:48 +0100 kohei r266230 : cosmetic function name change & added javadoc comment for it.
2009-01-13 06:32:06 +0100 kohei r266194 : Fixed a typo.
2009-01-13 06:04:23 +0100 kohei r266193 : Generate data source range string by compiling reference tokens. This way
we can also display external reference addresses correctly.
2009-01-13 05:55:44 +0100 kohei r266192 : moved compileRangeRepresentation from being a class member method to a local function.
2009-01-13 05:41:53 +0100 kohei r266191 : nuked one unused method & tab -> whitespace conversion.
2009-01-13 05:35:10 +0100 kohei r266190 : A little code cleanup & consolidated all range-joining code
into a single function object class.
2009-01-13 03:58:51 +0100 kohei r266189 : removed the unused method.
2009-01-13 03:53:01 +0100 kohei r266188 : This time I (hopefully) fixed the range consolidation problem for real. I forgot to join
the missing upper-left corner cell with the existing range list. Also, I needed to join
ranges recursively instead of just doing it once.
2009-01-13 02:15:48 +0100 kohei r266187 : fixed the "add corner if missing" thing.
2009-01-12 23:36:19 +0100 kohei r266185 : More work on range list -> ref tokens.
2009-01-12 23:12:28 +0100 kohei r266184 : More work on switching to reference tokens from range list. Still in progress.
2009-01-10 08:15:39 +0100 kohei r266125 : More code change for switching to reference tokens, especially in ScChart2DataProvider.
Created another addUpperLeftCornerIfMissing method that can take a list of reference tokens
instead of range list.
2009-01-09 19:22:33 +0100 kohei r266110 : entirely removed the range list data member from ScChart2DataSequence class. From now on
we will use a list of tokens to track data source ranges.
Now, if I haven't introduced any bugs in the process, normal charts with no external
references should work as before. But I still need to get the external refs to
work.
2009-01-09 19:11:45 +0100 kohei r266108 : Convert ranges to token list before instantiating ScChart2DataSequence.
2009-01-09 18:27:13 +0100 kohei r266107 : Extracted a common code block into its own method.
2009-01-09 18:18:36 +0100 kohei r266106 : More progress on chart2uno implementation change. Still more to do.
2009-01-09 06:24:36 +0100 kohei r266043 : another place to swap the use of range list with token list.
2009-01-09 06:18:57 +0100 kohei r266042 : Started re-working the chart2uno implementation, to use a list of ScToken
instances instead of ScRangeList, to keep track of data source ranges.
This way, the chart2uno code can tell whether the ranges are external or
internal, and act accordingly.
I'm not finished with it yet. Some things are still not working.
2009-01-08 19:28:51 +0100 kohei r266034 : yet another place to hardcode CONV_OOO for cell range address parsing.
2009-01-08 19:19:21 +0100 kohei r266033 : transferred the BuildArray() method from the koheichart01 cws and its associated changes.
I need to be changing code around this area, and I don't want to redo my changes once
koheichart01 gets integrated for 3.2.
2009-01-08 18:07:08 +0100 kohei r266030 : Have convertRangeFromXML convert external ranges into the appropriate OOO A1 format.
I also added a helper method to append a table name because this is useful in a lot of
other places.
2009-01-07 06:57:52 +0100 kohei r265944 : These places also need a hard-coded CONV_OOO address convention, for Excel chart import and export to function properly.
2009-01-06 16:41:07 +0100 kohei r265932 : removed unused variable.
2009-01-06 16:30:36 +0100 kohei r265931 : removed unused ScDPCacheTable::GroupFilter::setMatchIfFound() method and its
associated member variable (per Caolan's callcatcher output). I added that
method to allow reverse matching in some code but later retracted that logic.
I guess I forgot to remove the method itself afterwards...
2009-01-06 06:39:51 +0100 kohei r265891 : #i97735# Always write cell and cell range addresses using the OOo A1 (CONV_OOO) address convention
when exporting to ODF, regardless of current address convention. Same for reading from ODF documents.
2009-01-06 05:46:40 +0100 kohei r265890 : #i94696# Use the current address convention in the chart wizard dialog.
2009-03-03 15:05:33 +00:00
|
|
|
* @param nRow
|
2008-12-12 09:38:47 +00:00
|
|
|
*
|
CWS-TOOLING: integrate CWS koheiformula02
2009-02-19 13:18:02 +0100 iha r268276 : #i99400# Missing value plotting broken
2009-02-11 03:39:50 +0100 kohei r267579 : forgot to add an in-line comment.
2009-02-11 00:26:03 +0100 kohei r267578 : Handle also the single cell references when exporting chart ranges.
2009-02-10 19:50:37 +0100 kohei r267576 : removed a compiler warning.
2009-02-10 06:48:55 +0100 kohei r267536 : got xls export filter to correctly write external references in charts.
However, Excel doesn't entirely like my chart output if the chart contains
external references. The data are all there, but it refuses to draw it.
It works fine with charts with internal references.
2009-02-10 03:33:13 +0100 kohei r267533 : correctly import external references used in chart objects, by using a token
array instead of a range list to represent the data ranges.
2009-02-04 15:22:30 +0100 kohei r267387 : return aRet instead of the sRangeRepresentation, just to be consistent with the
rest of the code there. Both strings are empty so this is just for aesthetic
reasons.
2009-02-04 15:07:49 +0100 kohei r267384 : #i98872# allow export of empty data range, in order to allow saving of documents
with an empty chart.
2009-02-03 19:20:38 +0100 kohei r267340 : #i98801# added a special case handler for parsing range address syntax used by
the older version of OOo. In the old syntax, the sheet name was dropped for
the 2nd reference of a range if the 1st and 2nd references are on the same
sheet. In the new syntax this is not the case.
Also fixed unintential display of the sheet name for the end range address of a
single-sheet range.
2009-01-28 20:46:11 +0100 kohei r267085 : call GetIndex() and GetString() only when the token is external ref, to avoid
triggering assertions in a non-pro build.
2009-01-28 19:30:58 +0100 kohei r267080 : When listeners are being destroyed, don't bother unregistering them with the
external ref manager if the document itself is being destroyed.
2009-01-28 18:56:52 +0100 kohei r267079 : fixed a heap corruption. The Table instance stores instances of FormulaToken
type, not of ScAddress type.
2009-01-26 18:59:14 +0100 kohei r266945 : removed another warning on win32 build.
2009-01-26 18:50:56 +0100 kohei r266943 : removed warnings on windows build.
2009-01-26 17:16:09 +0100 kohei r266939 : added const to a returned reference value that is never used to modify its value.
2009-01-26 16:49:33 +0100 kohei r266937 : Assume that the document instance is not null, or else don't copy any data at all.
2009-01-26 16:19:50 +0100 kohei r266935 : create a clone of ScChart2DataSeqeunce without calling its copy constructor,
since explicit definition of copy constructor would cause a serious compiler
warning that's too ugly to fix.
2009-01-26 05:26:58 +0100 kohei r266894 : removed unused variable and changed function signature.
2009-01-26 05:02:58 +0100 kohei r266893 : removed unused variables to remove compiler warnings.
2009-01-25 18:07:31 +0100 kohei r266890 : fixed indentation inconsistencies in ctor initializers.
2009-01-25 18:01:41 +0100 kohei r266889 : * removed a compiler warning.
* tab -> whitespace conversion in some code.
2009-01-25 03:57:37 +0100 kohei r266888 : removed a mis-leading comment.
2009-01-25 02:37:45 +0100 kohei r266887 : * moved the ref token join method from chart2uno local to ScRefTokenHelper.
* a little code cleanup.
2009-01-24 09:29:26 +0100 kohei r266865 : Don't re-link external files if their link has been broken once.
2009-01-24 09:16:28 +0100 kohei r266864 : a typo in an in-line comment.
2009-01-24 09:14:29 +0100 kohei r266863 : Treat non-cached cells as empty cells only when the source document is not
reachable.
2009-01-24 07:23:44 +0100 kohei r266862 : Don't purge the external ref cache when the link is broken.
2009-01-24 03:25:46 +0100 kohei r266861 : When a cell outside the cached range is queried, we should return an emtpy cell
token instead of NULL, to be consistent with the old behavior.
2009-01-24 02:34:38 +0100 kohei r266860 : Remove corresponding listeners when an external doc link is broken.
2009-01-23 23:18:44 +0100 kohei r266856 : more work on handling external ref update listeners.
2009-01-23 18:10:09 +0100 kohei r266846 : Handle loading of chart objects when their external link is updated.
2009-01-23 06:57:34 +0100 kohei r266765 : more work on ref-tokenizing ScChartListener.
2009-01-22 22:57:52 +0100 kohei r266760 : More work on moving ref token helper code to reftokenhelper & ref-tokenizing
ScChartListener.
2009-01-22 21:52:38 +0100 kohei r266758 : moved the code that converts XML range string into Calc's internal range string
from chart2uno to rangeutl & compile the range string to generate ref tokens
upon ods import.
2009-01-22 18:56:14 +0100 kohei r266749 : fixed a build breakage.
2009-01-22 18:53:43 +0100 kohei r266748 : Initial work toward using ref tokens in ScChartListener class. I'll start
moving some of local ref token handling functions from chart2uno.cxx to
ScRefTokenHelper class to make them available in other places.
2009-01-22 17:38:20 +0100 kohei r266746 : Add a big, fat warning against mixed use of ScSharedTokenRef and ScTokenRef.
2009-01-22 08:33:28 +0100 kohei r266711 : #i98338# fixed slicing of external ref token classes by adding their own Clone() method.
2009-01-22 05:02:25 +0100 kohei r266710 : Applied the same fix that npower/oj applied to fix a crasher (from #i98317#).
2009-01-21 23:02:42 +0100 kohei r266705 : fix build breakages as a result of rebase to m39. Mostly due to the new formula
module and its associated changes esp. wrt token classes.
2009-01-21 19:14:40 +0100 kohei r266699 : CWS-TOOLING: rebase CWS koheiformula02 to trunk@266428 (milestone: DEV300:m39)
2009-01-21 17:55:10 +0100 kohei r266698 : moved the shared ScToken typedef to token.hxx, and use it instead of
ScChart2TokenRef, since I need this typedef in the odf importer. In the future
this can also replace the similar typedef in ScExternalRefManager.
2009-01-21 06:54:04 +0100 kohei r266627 : Added external ref listener framework so that objects listening to external ref changes can get notified
when the link is updated.
The work is not done yet.
2009-01-20 23:07:38 +0100 kohei r266626 : When exporting a range to ODF, we don't want to prepend a sheet name with '$' even for an external sheet.
2009-01-20 23:06:40 +0100 kohei r266625 : 1) code cleanup to remove compiler warnings.
2) fixed convertRangesToXML to convert ref tokens into correct ODF range format.
2009-01-20 19:40:45 +0100 kohei r266620 : extracted the code that fills cache from external ref into its own method.
2009-01-20 18:26:47 +0100 kohei r266616 : added javadoc parameter descriptions.
2009-01-20 18:01:17 +0100 kohei r266615 : disable ScChart2EmptyDataSequence entirely since that class doesn't appear to be used any more.
2009-01-20 17:42:59 +0100 kohei r266608 : fixed a crash when the data source range is empty at time of chart creation.
2009-01-20 17:13:34 +0100 kohei r266601 : a simple locale variable rename.
2009-01-20 16:57:04 +0100 kohei r266598 : #i97563# applied my patch, to fix incorrect export attempts of color values as a number formatter key, and change the condition of
one assertion to prevent it from being triggered incorrectly in non-pro build.
2009-01-17 07:41:01 +0100 kohei r266458 : a little code cleanup.
2009-01-17 07:30:48 +0100 kohei r266457 : removed a method that it no longer used.
2009-01-17 07:29:15 +0100 kohei r266456 : fixed a crash when no external data is available for a given range.
2009-01-17 07:14:50 +0100 kohei r266455 : Even more work on range list to ref token migration. The chart now retains
external data after editing of chart.
2009-01-16 18:54:35 +0100 kohei r266453 : More work on replacing flat ranges and addresses with ref tokens.
2009-01-16 17:07:51 +0100 kohei r266438 : extracted a large code block into its own local method.
2009-01-16 15:22:57 +0100 kohei r266423 : Initial work toward replacing the chart positioner and its related code in
order to use reference tokens instead of range list. The basis of that code
is the old ScChartPositioner and ScChartPositionMap duplicated to avoid breaking
any existing legacy code that might still use it. It appears to be used by the
StarOffice 1.0 filter only.
Still not working with the external references.
2009-01-15 05:33:39 +0100 kohei r266334 : renamed chackRanges() to overlaps() to make it more descriptive of what it does.
2009-01-13 23:25:50 +0100 kohei r266260 : Moved the token-to-string conversion code up so that other parts of the code can use it.
2009-01-13 22:14:35 +0100 kohei r266256 : generateLabels() now uses reference token list.
2009-01-13 18:42:23 +0100 kohei r266246 : Finally, build data array for external data sources. This will now allow the
data to be displayed in the diagram.
2009-01-13 16:34:03 +0100 kohei r266235 : We now need to verify range representation by compiling it instead of parsing it.
2009-01-13 15:41:48 +0100 kohei r266230 : cosmetic function name change & added javadoc comment for it.
2009-01-13 06:32:06 +0100 kohei r266194 : Fixed a typo.
2009-01-13 06:04:23 +0100 kohei r266193 : Generate data source range string by compiling reference tokens. This way
we can also display external reference addresses correctly.
2009-01-13 05:55:44 +0100 kohei r266192 : moved compileRangeRepresentation from being a class member method to a local function.
2009-01-13 05:41:53 +0100 kohei r266191 : nuked one unused method & tab -> whitespace conversion.
2009-01-13 05:35:10 +0100 kohei r266190 : A little code cleanup & consolidated all range-joining code
into a single function object class.
2009-01-13 03:58:51 +0100 kohei r266189 : removed the unused method.
2009-01-13 03:53:01 +0100 kohei r266188 : This time I (hopefully) fixed the range consolidation problem for real. I forgot to join
the missing upper-left corner cell with the existing range list. Also, I needed to join
ranges recursively instead of just doing it once.
2009-01-13 02:15:48 +0100 kohei r266187 : fixed the "add corner if missing" thing.
2009-01-12 23:36:19 +0100 kohei r266185 : More work on range list -> ref tokens.
2009-01-12 23:12:28 +0100 kohei r266184 : More work on switching to reference tokens from range list. Still in progress.
2009-01-10 08:15:39 +0100 kohei r266125 : More code change for switching to reference tokens, especially in ScChart2DataProvider.
Created another addUpperLeftCornerIfMissing method that can take a list of reference tokens
instead of range list.
2009-01-09 19:22:33 +0100 kohei r266110 : entirely removed the range list data member from ScChart2DataSequence class. From now on
we will use a list of tokens to track data source ranges.
Now, if I haven't introduced any bugs in the process, normal charts with no external
references should work as before. But I still need to get the external refs to
work.
2009-01-09 19:11:45 +0100 kohei r266108 : Convert ranges to token list before instantiating ScChart2DataSequence.
2009-01-09 18:27:13 +0100 kohei r266107 : Extracted a common code block into its own method.
2009-01-09 18:18:36 +0100 kohei r266106 : More progress on chart2uno implementation change. Still more to do.
2009-01-09 06:24:36 +0100 kohei r266043 : another place to swap the use of range list with token list.
2009-01-09 06:18:57 +0100 kohei r266042 : Started re-working the chart2uno implementation, to use a list of ScToken
instances instead of ScRangeList, to keep track of data source ranges.
This way, the chart2uno code can tell whether the ranges are external or
internal, and act accordingly.
I'm not finished with it yet. Some things are still not working.
2009-01-08 19:28:51 +0100 kohei r266034 : yet another place to hardcode CONV_OOO for cell range address parsing.
2009-01-08 19:19:21 +0100 kohei r266033 : transferred the BuildArray() method from the koheichart01 cws and its associated changes.
I need to be changing code around this area, and I don't want to redo my changes once
koheichart01 gets integrated for 3.2.
2009-01-08 18:07:08 +0100 kohei r266030 : Have convertRangeFromXML convert external ranges into the appropriate OOO A1 format.
I also added a helper method to append a table name because this is useful in a lot of
other places.
2009-01-07 06:57:52 +0100 kohei r265944 : These places also need a hard-coded CONV_OOO address convention, for Excel chart import and export to function properly.
2009-01-06 16:41:07 +0100 kohei r265932 : removed unused variable.
2009-01-06 16:30:36 +0100 kohei r265931 : removed unused ScDPCacheTable::GroupFilter::setMatchIfFound() method and its
associated member variable (per Caolan's callcatcher output). I added that
method to allow reverse matching in some code but later retracted that logic.
I guess I forgot to remove the method itself afterwards...
2009-01-06 06:39:51 +0100 kohei r265891 : #i97735# Always write cell and cell range addresses using the OOo A1 (CONV_OOO) address convention
when exporting to ODF, regardless of current address convention. Same for reading from ODF documents.
2009-01-06 05:46:40 +0100 kohei r265890 : #i94696# Use the current address convention in the chart wizard dialog.
2009-03-03 15:05:33 +00:00
|
|
|
* @return pointer to the token instance in the cache.
|
2008-12-12 09:38:47 +00:00
|
|
|
*/
|
|
|
|
ScExternalRefCache::TokenRef getCellData(
|
CWS-TOOLING: integrate CWS koheiformula02
2009-02-19 13:18:02 +0100 iha r268276 : #i99400# Missing value plotting broken
2009-02-11 03:39:50 +0100 kohei r267579 : forgot to add an in-line comment.
2009-02-11 00:26:03 +0100 kohei r267578 : Handle also the single cell references when exporting chart ranges.
2009-02-10 19:50:37 +0100 kohei r267576 : removed a compiler warning.
2009-02-10 06:48:55 +0100 kohei r267536 : got xls export filter to correctly write external references in charts.
However, Excel doesn't entirely like my chart output if the chart contains
external references. The data are all there, but it refuses to draw it.
It works fine with charts with internal references.
2009-02-10 03:33:13 +0100 kohei r267533 : correctly import external references used in chart objects, by using a token
array instead of a range list to represent the data ranges.
2009-02-04 15:22:30 +0100 kohei r267387 : return aRet instead of the sRangeRepresentation, just to be consistent with the
rest of the code there. Both strings are empty so this is just for aesthetic
reasons.
2009-02-04 15:07:49 +0100 kohei r267384 : #i98872# allow export of empty data range, in order to allow saving of documents
with an empty chart.
2009-02-03 19:20:38 +0100 kohei r267340 : #i98801# added a special case handler for parsing range address syntax used by
the older version of OOo. In the old syntax, the sheet name was dropped for
the 2nd reference of a range if the 1st and 2nd references are on the same
sheet. In the new syntax this is not the case.
Also fixed unintential display of the sheet name for the end range address of a
single-sheet range.
2009-01-28 20:46:11 +0100 kohei r267085 : call GetIndex() and GetString() only when the token is external ref, to avoid
triggering assertions in a non-pro build.
2009-01-28 19:30:58 +0100 kohei r267080 : When listeners are being destroyed, don't bother unregistering them with the
external ref manager if the document itself is being destroyed.
2009-01-28 18:56:52 +0100 kohei r267079 : fixed a heap corruption. The Table instance stores instances of FormulaToken
type, not of ScAddress type.
2009-01-26 18:59:14 +0100 kohei r266945 : removed another warning on win32 build.
2009-01-26 18:50:56 +0100 kohei r266943 : removed warnings on windows build.
2009-01-26 17:16:09 +0100 kohei r266939 : added const to a returned reference value that is never used to modify its value.
2009-01-26 16:49:33 +0100 kohei r266937 : Assume that the document instance is not null, or else don't copy any data at all.
2009-01-26 16:19:50 +0100 kohei r266935 : create a clone of ScChart2DataSeqeunce without calling its copy constructor,
since explicit definition of copy constructor would cause a serious compiler
warning that's too ugly to fix.
2009-01-26 05:26:58 +0100 kohei r266894 : removed unused variable and changed function signature.
2009-01-26 05:02:58 +0100 kohei r266893 : removed unused variables to remove compiler warnings.
2009-01-25 18:07:31 +0100 kohei r266890 : fixed indentation inconsistencies in ctor initializers.
2009-01-25 18:01:41 +0100 kohei r266889 : * removed a compiler warning.
* tab -> whitespace conversion in some code.
2009-01-25 03:57:37 +0100 kohei r266888 : removed a mis-leading comment.
2009-01-25 02:37:45 +0100 kohei r266887 : * moved the ref token join method from chart2uno local to ScRefTokenHelper.
* a little code cleanup.
2009-01-24 09:29:26 +0100 kohei r266865 : Don't re-link external files if their link has been broken once.
2009-01-24 09:16:28 +0100 kohei r266864 : a typo in an in-line comment.
2009-01-24 09:14:29 +0100 kohei r266863 : Treat non-cached cells as empty cells only when the source document is not
reachable.
2009-01-24 07:23:44 +0100 kohei r266862 : Don't purge the external ref cache when the link is broken.
2009-01-24 03:25:46 +0100 kohei r266861 : When a cell outside the cached range is queried, we should return an emtpy cell
token instead of NULL, to be consistent with the old behavior.
2009-01-24 02:34:38 +0100 kohei r266860 : Remove corresponding listeners when an external doc link is broken.
2009-01-23 23:18:44 +0100 kohei r266856 : more work on handling external ref update listeners.
2009-01-23 18:10:09 +0100 kohei r266846 : Handle loading of chart objects when their external link is updated.
2009-01-23 06:57:34 +0100 kohei r266765 : more work on ref-tokenizing ScChartListener.
2009-01-22 22:57:52 +0100 kohei r266760 : More work on moving ref token helper code to reftokenhelper & ref-tokenizing
ScChartListener.
2009-01-22 21:52:38 +0100 kohei r266758 : moved the code that converts XML range string into Calc's internal range string
from chart2uno to rangeutl & compile the range string to generate ref tokens
upon ods import.
2009-01-22 18:56:14 +0100 kohei r266749 : fixed a build breakage.
2009-01-22 18:53:43 +0100 kohei r266748 : Initial work toward using ref tokens in ScChartListener class. I'll start
moving some of local ref token handling functions from chart2uno.cxx to
ScRefTokenHelper class to make them available in other places.
2009-01-22 17:38:20 +0100 kohei r266746 : Add a big, fat warning against mixed use of ScSharedTokenRef and ScTokenRef.
2009-01-22 08:33:28 +0100 kohei r266711 : #i98338# fixed slicing of external ref token classes by adding their own Clone() method.
2009-01-22 05:02:25 +0100 kohei r266710 : Applied the same fix that npower/oj applied to fix a crasher (from #i98317#).
2009-01-21 23:02:42 +0100 kohei r266705 : fix build breakages as a result of rebase to m39. Mostly due to the new formula
module and its associated changes esp. wrt token classes.
2009-01-21 19:14:40 +0100 kohei r266699 : CWS-TOOLING: rebase CWS koheiformula02 to trunk@266428 (milestone: DEV300:m39)
2009-01-21 17:55:10 +0100 kohei r266698 : moved the shared ScToken typedef to token.hxx, and use it instead of
ScChart2TokenRef, since I need this typedef in the odf importer. In the future
this can also replace the similar typedef in ScExternalRefManager.
2009-01-21 06:54:04 +0100 kohei r266627 : Added external ref listener framework so that objects listening to external ref changes can get notified
when the link is updated.
The work is not done yet.
2009-01-20 23:07:38 +0100 kohei r266626 : When exporting a range to ODF, we don't want to prepend a sheet name with '$' even for an external sheet.
2009-01-20 23:06:40 +0100 kohei r266625 : 1) code cleanup to remove compiler warnings.
2) fixed convertRangesToXML to convert ref tokens into correct ODF range format.
2009-01-20 19:40:45 +0100 kohei r266620 : extracted the code that fills cache from external ref into its own method.
2009-01-20 18:26:47 +0100 kohei r266616 : added javadoc parameter descriptions.
2009-01-20 18:01:17 +0100 kohei r266615 : disable ScChart2EmptyDataSequence entirely since that class doesn't appear to be used any more.
2009-01-20 17:42:59 +0100 kohei r266608 : fixed a crash when the data source range is empty at time of chart creation.
2009-01-20 17:13:34 +0100 kohei r266601 : a simple locale variable rename.
2009-01-20 16:57:04 +0100 kohei r266598 : #i97563# applied my patch, to fix incorrect export attempts of color values as a number formatter key, and change the condition of
one assertion to prevent it from being triggered incorrectly in non-pro build.
2009-01-17 07:41:01 +0100 kohei r266458 : a little code cleanup.
2009-01-17 07:30:48 +0100 kohei r266457 : removed a method that it no longer used.
2009-01-17 07:29:15 +0100 kohei r266456 : fixed a crash when no external data is available for a given range.
2009-01-17 07:14:50 +0100 kohei r266455 : Even more work on range list to ref token migration. The chart now retains
external data after editing of chart.
2009-01-16 18:54:35 +0100 kohei r266453 : More work on replacing flat ranges and addresses with ref tokens.
2009-01-16 17:07:51 +0100 kohei r266438 : extracted a large code block into its own local method.
2009-01-16 15:22:57 +0100 kohei r266423 : Initial work toward replacing the chart positioner and its related code in
order to use reference tokens instead of range list. The basis of that code
is the old ScChartPositioner and ScChartPositionMap duplicated to avoid breaking
any existing legacy code that might still use it. It appears to be used by the
StarOffice 1.0 filter only.
Still not working with the external references.
2009-01-15 05:33:39 +0100 kohei r266334 : renamed chackRanges() to overlaps() to make it more descriptive of what it does.
2009-01-13 23:25:50 +0100 kohei r266260 : Moved the token-to-string conversion code up so that other parts of the code can use it.
2009-01-13 22:14:35 +0100 kohei r266256 : generateLabels() now uses reference token list.
2009-01-13 18:42:23 +0100 kohei r266246 : Finally, build data array for external data sources. This will now allow the
data to be displayed in the diagram.
2009-01-13 16:34:03 +0100 kohei r266235 : We now need to verify range representation by compiling it instead of parsing it.
2009-01-13 15:41:48 +0100 kohei r266230 : cosmetic function name change & added javadoc comment for it.
2009-01-13 06:32:06 +0100 kohei r266194 : Fixed a typo.
2009-01-13 06:04:23 +0100 kohei r266193 : Generate data source range string by compiling reference tokens. This way
we can also display external reference addresses correctly.
2009-01-13 05:55:44 +0100 kohei r266192 : moved compileRangeRepresentation from being a class member method to a local function.
2009-01-13 05:41:53 +0100 kohei r266191 : nuked one unused method & tab -> whitespace conversion.
2009-01-13 05:35:10 +0100 kohei r266190 : A little code cleanup & consolidated all range-joining code
into a single function object class.
2009-01-13 03:58:51 +0100 kohei r266189 : removed the unused method.
2009-01-13 03:53:01 +0100 kohei r266188 : This time I (hopefully) fixed the range consolidation problem for real. I forgot to join
the missing upper-left corner cell with the existing range list. Also, I needed to join
ranges recursively instead of just doing it once.
2009-01-13 02:15:48 +0100 kohei r266187 : fixed the "add corner if missing" thing.
2009-01-12 23:36:19 +0100 kohei r266185 : More work on range list -> ref tokens.
2009-01-12 23:12:28 +0100 kohei r266184 : More work on switching to reference tokens from range list. Still in progress.
2009-01-10 08:15:39 +0100 kohei r266125 : More code change for switching to reference tokens, especially in ScChart2DataProvider.
Created another addUpperLeftCornerIfMissing method that can take a list of reference tokens
instead of range list.
2009-01-09 19:22:33 +0100 kohei r266110 : entirely removed the range list data member from ScChart2DataSequence class. From now on
we will use a list of tokens to track data source ranges.
Now, if I haven't introduced any bugs in the process, normal charts with no external
references should work as before. But I still need to get the external refs to
work.
2009-01-09 19:11:45 +0100 kohei r266108 : Convert ranges to token list before instantiating ScChart2DataSequence.
2009-01-09 18:27:13 +0100 kohei r266107 : Extracted a common code block into its own method.
2009-01-09 18:18:36 +0100 kohei r266106 : More progress on chart2uno implementation change. Still more to do.
2009-01-09 06:24:36 +0100 kohei r266043 : another place to swap the use of range list with token list.
2009-01-09 06:18:57 +0100 kohei r266042 : Started re-working the chart2uno implementation, to use a list of ScToken
instances instead of ScRangeList, to keep track of data source ranges.
This way, the chart2uno code can tell whether the ranges are external or
internal, and act accordingly.
I'm not finished with it yet. Some things are still not working.
2009-01-08 19:28:51 +0100 kohei r266034 : yet another place to hardcode CONV_OOO for cell range address parsing.
2009-01-08 19:19:21 +0100 kohei r266033 : transferred the BuildArray() method from the koheichart01 cws and its associated changes.
I need to be changing code around this area, and I don't want to redo my changes once
koheichart01 gets integrated for 3.2.
2009-01-08 18:07:08 +0100 kohei r266030 : Have convertRangeFromXML convert external ranges into the appropriate OOO A1 format.
I also added a helper method to append a table name because this is useful in a lot of
other places.
2009-01-07 06:57:52 +0100 kohei r265944 : These places also need a hard-coded CONV_OOO address convention, for Excel chart import and export to function properly.
2009-01-06 16:41:07 +0100 kohei r265932 : removed unused variable.
2009-01-06 16:30:36 +0100 kohei r265931 : removed unused ScDPCacheTable::GroupFilter::setMatchIfFound() method and its
associated member variable (per Caolan's callcatcher output). I added that
method to allow reverse matching in some code but later retracted that logic.
I guess I forgot to remove the method itself afterwards...
2009-01-06 06:39:51 +0100 kohei r265891 : #i97735# Always write cell and cell range addresses using the OOo A1 (CONV_OOO) address convention
when exporting to ODF, regardless of current address convention. Same for reading from ODF documents.
2009-01-06 05:46:40 +0100 kohei r265890 : #i94696# Use the current address convention in the chart wizard dialog.
2009-03-03 15:05:33 +00:00
|
|
|
sal_uInt16 nFileId, const String& rTabName, SCCOL nCol, SCROW nRow,
|
2009-06-04 20:36:53 +00:00
|
|
|
bool bEmptyCellOnNull, bool bWriteEmpty, sal_uInt32* pnFmtIndex);
|
2008-12-12 09:38:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a cached cell range data.
|
|
|
|
*
|
|
|
|
* @return a new token array instance. Note that <i>the caller must
|
|
|
|
* manage the life cycle of the returned instance</i>, which is
|
|
|
|
* guaranteed if the TokenArrayRef is properly used..
|
|
|
|
*/
|
CWS-TOOLING: integrate CWS koheiformula02
2009-02-19 13:18:02 +0100 iha r268276 : #i99400# Missing value plotting broken
2009-02-11 03:39:50 +0100 kohei r267579 : forgot to add an in-line comment.
2009-02-11 00:26:03 +0100 kohei r267578 : Handle also the single cell references when exporting chart ranges.
2009-02-10 19:50:37 +0100 kohei r267576 : removed a compiler warning.
2009-02-10 06:48:55 +0100 kohei r267536 : got xls export filter to correctly write external references in charts.
However, Excel doesn't entirely like my chart output if the chart contains
external references. The data are all there, but it refuses to draw it.
It works fine with charts with internal references.
2009-02-10 03:33:13 +0100 kohei r267533 : correctly import external references used in chart objects, by using a token
array instead of a range list to represent the data ranges.
2009-02-04 15:22:30 +0100 kohei r267387 : return aRet instead of the sRangeRepresentation, just to be consistent with the
rest of the code there. Both strings are empty so this is just for aesthetic
reasons.
2009-02-04 15:07:49 +0100 kohei r267384 : #i98872# allow export of empty data range, in order to allow saving of documents
with an empty chart.
2009-02-03 19:20:38 +0100 kohei r267340 : #i98801# added a special case handler for parsing range address syntax used by
the older version of OOo. In the old syntax, the sheet name was dropped for
the 2nd reference of a range if the 1st and 2nd references are on the same
sheet. In the new syntax this is not the case.
Also fixed unintential display of the sheet name for the end range address of a
single-sheet range.
2009-01-28 20:46:11 +0100 kohei r267085 : call GetIndex() and GetString() only when the token is external ref, to avoid
triggering assertions in a non-pro build.
2009-01-28 19:30:58 +0100 kohei r267080 : When listeners are being destroyed, don't bother unregistering them with the
external ref manager if the document itself is being destroyed.
2009-01-28 18:56:52 +0100 kohei r267079 : fixed a heap corruption. The Table instance stores instances of FormulaToken
type, not of ScAddress type.
2009-01-26 18:59:14 +0100 kohei r266945 : removed another warning on win32 build.
2009-01-26 18:50:56 +0100 kohei r266943 : removed warnings on windows build.
2009-01-26 17:16:09 +0100 kohei r266939 : added const to a returned reference value that is never used to modify its value.
2009-01-26 16:49:33 +0100 kohei r266937 : Assume that the document instance is not null, or else don't copy any data at all.
2009-01-26 16:19:50 +0100 kohei r266935 : create a clone of ScChart2DataSeqeunce without calling its copy constructor,
since explicit definition of copy constructor would cause a serious compiler
warning that's too ugly to fix.
2009-01-26 05:26:58 +0100 kohei r266894 : removed unused variable and changed function signature.
2009-01-26 05:02:58 +0100 kohei r266893 : removed unused variables to remove compiler warnings.
2009-01-25 18:07:31 +0100 kohei r266890 : fixed indentation inconsistencies in ctor initializers.
2009-01-25 18:01:41 +0100 kohei r266889 : * removed a compiler warning.
* tab -> whitespace conversion in some code.
2009-01-25 03:57:37 +0100 kohei r266888 : removed a mis-leading comment.
2009-01-25 02:37:45 +0100 kohei r266887 : * moved the ref token join method from chart2uno local to ScRefTokenHelper.
* a little code cleanup.
2009-01-24 09:29:26 +0100 kohei r266865 : Don't re-link external files if their link has been broken once.
2009-01-24 09:16:28 +0100 kohei r266864 : a typo in an in-line comment.
2009-01-24 09:14:29 +0100 kohei r266863 : Treat non-cached cells as empty cells only when the source document is not
reachable.
2009-01-24 07:23:44 +0100 kohei r266862 : Don't purge the external ref cache when the link is broken.
2009-01-24 03:25:46 +0100 kohei r266861 : When a cell outside the cached range is queried, we should return an emtpy cell
token instead of NULL, to be consistent with the old behavior.
2009-01-24 02:34:38 +0100 kohei r266860 : Remove corresponding listeners when an external doc link is broken.
2009-01-23 23:18:44 +0100 kohei r266856 : more work on handling external ref update listeners.
2009-01-23 18:10:09 +0100 kohei r266846 : Handle loading of chart objects when their external link is updated.
2009-01-23 06:57:34 +0100 kohei r266765 : more work on ref-tokenizing ScChartListener.
2009-01-22 22:57:52 +0100 kohei r266760 : More work on moving ref token helper code to reftokenhelper & ref-tokenizing
ScChartListener.
2009-01-22 21:52:38 +0100 kohei r266758 : moved the code that converts XML range string into Calc's internal range string
from chart2uno to rangeutl & compile the range string to generate ref tokens
upon ods import.
2009-01-22 18:56:14 +0100 kohei r266749 : fixed a build breakage.
2009-01-22 18:53:43 +0100 kohei r266748 : Initial work toward using ref tokens in ScChartListener class. I'll start
moving some of local ref token handling functions from chart2uno.cxx to
ScRefTokenHelper class to make them available in other places.
2009-01-22 17:38:20 +0100 kohei r266746 : Add a big, fat warning against mixed use of ScSharedTokenRef and ScTokenRef.
2009-01-22 08:33:28 +0100 kohei r266711 : #i98338# fixed slicing of external ref token classes by adding their own Clone() method.
2009-01-22 05:02:25 +0100 kohei r266710 : Applied the same fix that npower/oj applied to fix a crasher (from #i98317#).
2009-01-21 23:02:42 +0100 kohei r266705 : fix build breakages as a result of rebase to m39. Mostly due to the new formula
module and its associated changes esp. wrt token classes.
2009-01-21 19:14:40 +0100 kohei r266699 : CWS-TOOLING: rebase CWS koheiformula02 to trunk@266428 (milestone: DEV300:m39)
2009-01-21 17:55:10 +0100 kohei r266698 : moved the shared ScToken typedef to token.hxx, and use it instead of
ScChart2TokenRef, since I need this typedef in the odf importer. In the future
this can also replace the similar typedef in ScExternalRefManager.
2009-01-21 06:54:04 +0100 kohei r266627 : Added external ref listener framework so that objects listening to external ref changes can get notified
when the link is updated.
The work is not done yet.
2009-01-20 23:07:38 +0100 kohei r266626 : When exporting a range to ODF, we don't want to prepend a sheet name with '$' even for an external sheet.
2009-01-20 23:06:40 +0100 kohei r266625 : 1) code cleanup to remove compiler warnings.
2) fixed convertRangesToXML to convert ref tokens into correct ODF range format.
2009-01-20 19:40:45 +0100 kohei r266620 : extracted the code that fills cache from external ref into its own method.
2009-01-20 18:26:47 +0100 kohei r266616 : added javadoc parameter descriptions.
2009-01-20 18:01:17 +0100 kohei r266615 : disable ScChart2EmptyDataSequence entirely since that class doesn't appear to be used any more.
2009-01-20 17:42:59 +0100 kohei r266608 : fixed a crash when the data source range is empty at time of chart creation.
2009-01-20 17:13:34 +0100 kohei r266601 : a simple locale variable rename.
2009-01-20 16:57:04 +0100 kohei r266598 : #i97563# applied my patch, to fix incorrect export attempts of color values as a number formatter key, and change the condition of
one assertion to prevent it from being triggered incorrectly in non-pro build.
2009-01-17 07:41:01 +0100 kohei r266458 : a little code cleanup.
2009-01-17 07:30:48 +0100 kohei r266457 : removed a method that it no longer used.
2009-01-17 07:29:15 +0100 kohei r266456 : fixed a crash when no external data is available for a given range.
2009-01-17 07:14:50 +0100 kohei r266455 : Even more work on range list to ref token migration. The chart now retains
external data after editing of chart.
2009-01-16 18:54:35 +0100 kohei r266453 : More work on replacing flat ranges and addresses with ref tokens.
2009-01-16 17:07:51 +0100 kohei r266438 : extracted a large code block into its own local method.
2009-01-16 15:22:57 +0100 kohei r266423 : Initial work toward replacing the chart positioner and its related code in
order to use reference tokens instead of range list. The basis of that code
is the old ScChartPositioner and ScChartPositionMap duplicated to avoid breaking
any existing legacy code that might still use it. It appears to be used by the
StarOffice 1.0 filter only.
Still not working with the external references.
2009-01-15 05:33:39 +0100 kohei r266334 : renamed chackRanges() to overlaps() to make it more descriptive of what it does.
2009-01-13 23:25:50 +0100 kohei r266260 : Moved the token-to-string conversion code up so that other parts of the code can use it.
2009-01-13 22:14:35 +0100 kohei r266256 : generateLabels() now uses reference token list.
2009-01-13 18:42:23 +0100 kohei r266246 : Finally, build data array for external data sources. This will now allow the
data to be displayed in the diagram.
2009-01-13 16:34:03 +0100 kohei r266235 : We now need to verify range representation by compiling it instead of parsing it.
2009-01-13 15:41:48 +0100 kohei r266230 : cosmetic function name change & added javadoc comment for it.
2009-01-13 06:32:06 +0100 kohei r266194 : Fixed a typo.
2009-01-13 06:04:23 +0100 kohei r266193 : Generate data source range string by compiling reference tokens. This way
we can also display external reference addresses correctly.
2009-01-13 05:55:44 +0100 kohei r266192 : moved compileRangeRepresentation from being a class member method to a local function.
2009-01-13 05:41:53 +0100 kohei r266191 : nuked one unused method & tab -> whitespace conversion.
2009-01-13 05:35:10 +0100 kohei r266190 : A little code cleanup & consolidated all range-joining code
into a single function object class.
2009-01-13 03:58:51 +0100 kohei r266189 : removed the unused method.
2009-01-13 03:53:01 +0100 kohei r266188 : This time I (hopefully) fixed the range consolidation problem for real. I forgot to join
the missing upper-left corner cell with the existing range list. Also, I needed to join
ranges recursively instead of just doing it once.
2009-01-13 02:15:48 +0100 kohei r266187 : fixed the "add corner if missing" thing.
2009-01-12 23:36:19 +0100 kohei r266185 : More work on range list -> ref tokens.
2009-01-12 23:12:28 +0100 kohei r266184 : More work on switching to reference tokens from range list. Still in progress.
2009-01-10 08:15:39 +0100 kohei r266125 : More code change for switching to reference tokens, especially in ScChart2DataProvider.
Created another addUpperLeftCornerIfMissing method that can take a list of reference tokens
instead of range list.
2009-01-09 19:22:33 +0100 kohei r266110 : entirely removed the range list data member from ScChart2DataSequence class. From now on
we will use a list of tokens to track data source ranges.
Now, if I haven't introduced any bugs in the process, normal charts with no external
references should work as before. But I still need to get the external refs to
work.
2009-01-09 19:11:45 +0100 kohei r266108 : Convert ranges to token list before instantiating ScChart2DataSequence.
2009-01-09 18:27:13 +0100 kohei r266107 : Extracted a common code block into its own method.
2009-01-09 18:18:36 +0100 kohei r266106 : More progress on chart2uno implementation change. Still more to do.
2009-01-09 06:24:36 +0100 kohei r266043 : another place to swap the use of range list with token list.
2009-01-09 06:18:57 +0100 kohei r266042 : Started re-working the chart2uno implementation, to use a list of ScToken
instances instead of ScRangeList, to keep track of data source ranges.
This way, the chart2uno code can tell whether the ranges are external or
internal, and act accordingly.
I'm not finished with it yet. Some things are still not working.
2009-01-08 19:28:51 +0100 kohei r266034 : yet another place to hardcode CONV_OOO for cell range address parsing.
2009-01-08 19:19:21 +0100 kohei r266033 : transferred the BuildArray() method from the koheichart01 cws and its associated changes.
I need to be changing code around this area, and I don't want to redo my changes once
koheichart01 gets integrated for 3.2.
2009-01-08 18:07:08 +0100 kohei r266030 : Have convertRangeFromXML convert external ranges into the appropriate OOO A1 format.
I also added a helper method to append a table name because this is useful in a lot of
other places.
2009-01-07 06:57:52 +0100 kohei r265944 : These places also need a hard-coded CONV_OOO address convention, for Excel chart import and export to function properly.
2009-01-06 16:41:07 +0100 kohei r265932 : removed unused variable.
2009-01-06 16:30:36 +0100 kohei r265931 : removed unused ScDPCacheTable::GroupFilter::setMatchIfFound() method and its
associated member variable (per Caolan's callcatcher output). I added that
method to allow reverse matching in some code but later retracted that logic.
I guess I forgot to remove the method itself afterwards...
2009-01-06 06:39:51 +0100 kohei r265891 : #i97735# Always write cell and cell range addresses using the OOo A1 (CONV_OOO) address convention
when exporting to ODF, regardless of current address convention. Same for reading from ODF documents.
2009-01-06 05:46:40 +0100 kohei r265890 : #i94696# Use the current address convention in the chart wizard dialog.
2009-03-03 15:05:33 +00:00
|
|
|
ScExternalRefCache::TokenArrayRef getCellRangeData(
|
2009-06-04 20:36:53 +00:00
|
|
|
sal_uInt16 nFileId, const String& rTabName, const ScRange& rRange, bool bEmptyCellOnNull, bool bWriteEmpty);
|
2008-12-12 09:38:47 +00:00
|
|
|
|
|
|
|
ScExternalRefCache::TokenArrayRef getRangeNameTokens(sal_uInt16 nFileId, const String& rName);
|
|
|
|
void setRangeNameTokens(sal_uInt16 nFileId, const String& rName, TokenArrayRef pArray);
|
|
|
|
|
|
|
|
void setCellData(sal_uInt16 nFileId, const String& rTabName, SCROW nRow, SCCOL nCol, TokenRef pToken, sal_uInt32 nFmtIndex);
|
|
|
|
|
|
|
|
struct SingleRangeData
|
|
|
|
{
|
|
|
|
/** This name must be in upper-case. */
|
|
|
|
String maTableName;
|
|
|
|
ScMatrixRef mpRangeData;
|
|
|
|
};
|
|
|
|
void setCellRangeData(sal_uInt16 nFileId, const ScRange& rRange, const ::std::vector<SingleRangeData>& rData,
|
|
|
|
TokenArrayRef pArray);
|
|
|
|
|
|
|
|
bool isDocInitialized(sal_uInt16 nFileId);
|
|
|
|
void initializeDoc(sal_uInt16 nFileId, const ::std::vector<String>& rTabNames);
|
|
|
|
String getTableName(sal_uInt16 nFileId, size_t nCacheId) const;
|
|
|
|
void getAllTableNames(sal_uInt16 nFileId, ::std::vector<String>& rTabNames) const;
|
|
|
|
SCsTAB getTabSpan( sal_uInt16 nFileId, const String& rStartTabName, const String& rEndTabName ) const;
|
|
|
|
void getAllNumberFormats(::std::vector<sal_uInt32>& rNumFmts) const;
|
|
|
|
bool hasCacheTable(sal_uInt16 nFileId, const String& rTabName) const;
|
|
|
|
size_t getCacheTableCount(sal_uInt16 nFileId) const;
|
|
|
|
|
2009-04-02 15:00:15 +00:00
|
|
|
/**
|
|
|
|
* Set all tables of a document as referenced, used only during
|
|
|
|
* store-to-file.
|
|
|
|
* @returns <TRUE/> if ALL tables of ALL documents are marked.
|
|
|
|
*/
|
|
|
|
bool setCacheDocReferenced( sal_uInt16 nFileId );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set a table as referenced, used only during store-to-file.
|
|
|
|
* @returns <TRUE/> if ALL tables of ALL documents are marked.
|
|
|
|
*/
|
2009-07-28 10:04:47 +00:00
|
|
|
bool setCacheTableReferenced( sal_uInt16 nFileId, const String& rTabName, size_t nSheets, bool bPermanent );
|
2009-04-02 15:00:15 +00:00
|
|
|
void setAllCacheTableReferencedStati( bool bReferenced );
|
|
|
|
bool areAllCacheTablesReferenced() const;
|
2009-07-28 10:04:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set a table as permanently referenced, to be called if not in
|
|
|
|
* mark-during-store-to-file cycle.
|
|
|
|
*/
|
|
|
|
void setCacheTableReferencedPermanently( sal_uInt16 nFileId, const String& rTabName, size_t nSheets );
|
|
|
|
|
2009-04-02 15:00:15 +00:00
|
|
|
private:
|
|
|
|
struct ReferencedStatus
|
|
|
|
{
|
|
|
|
struct DocReferenced
|
|
|
|
{
|
|
|
|
::std::vector<bool> maTables;
|
|
|
|
bool mbAllTablesReferenced;
|
|
|
|
// Initially, documents have no tables but all referenced.
|
|
|
|
DocReferenced() : mbAllTablesReferenced(true) {}
|
|
|
|
};
|
|
|
|
typedef ::std::vector<DocReferenced> DocReferencedVec;
|
|
|
|
|
|
|
|
DocReferencedVec maDocs;
|
|
|
|
bool mbAllReferenced;
|
|
|
|
|
|
|
|
ReferencedStatus();
|
|
|
|
explicit ReferencedStatus( size_t nDocs );
|
|
|
|
void reset( size_t nDocs );
|
|
|
|
void checkAllDocs();
|
|
|
|
|
|
|
|
} maReferenced;
|
|
|
|
void addCacheTableToReferenced( sal_uInt16 nFileId, size_t nIndex );
|
|
|
|
void addCacheDocToReferenced( sal_uInt16 nFileId );
|
|
|
|
public:
|
|
|
|
|
2008-12-12 09:38:47 +00:00
|
|
|
ScExternalRefCache::TableTypeRef getCacheTable(sal_uInt16 nFileId, size_t nTabIndex) const;
|
|
|
|
ScExternalRefCache::TableTypeRef getCacheTable(sal_uInt16 nFileId, const String& rTabName, bool bCreateNew, size_t* pnIndex);
|
|
|
|
|
|
|
|
void clearCache(sal_uInt16 nFileId);
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct RangeHash
|
|
|
|
{
|
|
|
|
size_t operator()(const ScRange& rRange) const
|
|
|
|
{
|
|
|
|
const ScAddress& s = rRange.aStart;
|
|
|
|
const ScAddress& e = rRange.aEnd;
|
|
|
|
return s.Tab() + s.Col() + s.Row() + e.Tab() + e.Col() + e.Row();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef ::std::hash_map<String, TokenArrayRef, ScStringHashCode> RangeNameMap;
|
|
|
|
typedef ::std::hash_map<ScRange, TokenArrayRef, RangeHash> RangeArrayMap;
|
|
|
|
typedef ::std::hash_map<String, String, ScStringHashCode> NamePairMap;
|
|
|
|
|
|
|
|
// SUNWS needs a forward declared friend, otherwise types and members
|
|
|
|
// of the outer class are not accessible.
|
|
|
|
struct DocItem;
|
|
|
|
friend struct ScExternalRefCache::DocItem;
|
|
|
|
|
|
|
|
/** Represents data cached for a single external document. */
|
|
|
|
struct DocItem
|
|
|
|
{
|
|
|
|
/** The raw cache tables. */
|
|
|
|
::std::vector<TableTypeRef> maTables;
|
|
|
|
/** Table name list in correct order, in both upper- and real-case. */
|
|
|
|
::std::vector<TableName> maTableNames;
|
|
|
|
/** Table name to index map. The names must be stored upper-case. */
|
|
|
|
TableNameIndexMap maTableNameIndex;
|
|
|
|
/** Range name cache. */
|
|
|
|
RangeNameMap maRangeNames;
|
|
|
|
/** Token array cache for cell ranges. */
|
|
|
|
RangeArrayMap maRangeArrays;
|
|
|
|
/** Upper- to real-case mapping for range names. */
|
|
|
|
NamePairMap maRealRangeNameMap;
|
|
|
|
|
|
|
|
bool mbInitFromSource;
|
|
|
|
|
|
|
|
DocItem() : mbInitFromSource(false) {}
|
|
|
|
};
|
|
|
|
typedef ::std::hash_map<sal_uInt16, DocItem> DocDataType;
|
|
|
|
DocItem* getDocItem(sal_uInt16 nFileId) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
mutable DocDataType maDocs;
|
|
|
|
};
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
|
2009-01-13 20:22:44 +00:00
|
|
|
class SC_DLLPUBLIC ScExternalRefManager : public formula::ExternalReferenceHelper
|
2008-12-12 09:38:47 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
// SUNWS needs a forward declared friend, otherwise types and members
|
|
|
|
// of the outer class are not accessible.
|
|
|
|
class RefCells;
|
|
|
|
friend class ScExternalRefManager::RefCells;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Collection of cell addresses that contain external references. This
|
|
|
|
* data is used for link updates.
|
|
|
|
*/
|
|
|
|
class RefCells
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RefCells();
|
|
|
|
~RefCells();
|
|
|
|
|
|
|
|
void insertCell(const ScAddress& rAddr);
|
|
|
|
void removeCell(const ScAddress& rAddr);
|
|
|
|
void moveTable(SCTAB nOldTab, SCTAB nNewTab, bool bCopy);
|
|
|
|
void insertTable(SCTAB nPos);
|
|
|
|
void removeTable(SCTAB nPos);
|
|
|
|
void refreshAllCells(ScExternalRefManager& rRefMgr);
|
|
|
|
private:
|
|
|
|
|
|
|
|
typedef ::std::hash_set<SCROW> RowSet;
|
|
|
|
typedef ::std::hash_map<SCCOL, RowSet> ColSet;
|
|
|
|
|
|
|
|
// SUNWS needs a forward declared friend, otherwise types and members
|
|
|
|
// of the outer class are not accessible.
|
|
|
|
struct TabItem;
|
|
|
|
friend struct ScExternalRefManager::RefCells::TabItem;
|
|
|
|
|
|
|
|
struct TabItem
|
|
|
|
{
|
|
|
|
SCTAB mnIndex;
|
|
|
|
ColSet maCols;
|
|
|
|
explicit TabItem(SCTAB nIndex);
|
|
|
|
explicit TabItem(const TabItem& r);
|
|
|
|
};
|
|
|
|
typedef ::boost::shared_ptr<TabItem> TabItemRef;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the position that points either to the specified table
|
|
|
|
* position or to the position where a new table would be inserted in
|
|
|
|
* case the specified table is not present.
|
|
|
|
*
|
|
|
|
* @param nTab index of the desired table
|
|
|
|
*/
|
|
|
|
::std::list<TabItemRef>::iterator getTabPos(SCTAB nTab);
|
|
|
|
|
|
|
|
// This list must be sorted by the table index at all times.
|
|
|
|
::std::list<TabItemRef> maTables;
|
|
|
|
};
|
|
|
|
|
CWS-TOOLING: integrate CWS koheiformula02
2009-02-19 13:18:02 +0100 iha r268276 : #i99400# Missing value plotting broken
2009-02-11 03:39:50 +0100 kohei r267579 : forgot to add an in-line comment.
2009-02-11 00:26:03 +0100 kohei r267578 : Handle also the single cell references when exporting chart ranges.
2009-02-10 19:50:37 +0100 kohei r267576 : removed a compiler warning.
2009-02-10 06:48:55 +0100 kohei r267536 : got xls export filter to correctly write external references in charts.
However, Excel doesn't entirely like my chart output if the chart contains
external references. The data are all there, but it refuses to draw it.
It works fine with charts with internal references.
2009-02-10 03:33:13 +0100 kohei r267533 : correctly import external references used in chart objects, by using a token
array instead of a range list to represent the data ranges.
2009-02-04 15:22:30 +0100 kohei r267387 : return aRet instead of the sRangeRepresentation, just to be consistent with the
rest of the code there. Both strings are empty so this is just for aesthetic
reasons.
2009-02-04 15:07:49 +0100 kohei r267384 : #i98872# allow export of empty data range, in order to allow saving of documents
with an empty chart.
2009-02-03 19:20:38 +0100 kohei r267340 : #i98801# added a special case handler for parsing range address syntax used by
the older version of OOo. In the old syntax, the sheet name was dropped for
the 2nd reference of a range if the 1st and 2nd references are on the same
sheet. In the new syntax this is not the case.
Also fixed unintential display of the sheet name for the end range address of a
single-sheet range.
2009-01-28 20:46:11 +0100 kohei r267085 : call GetIndex() and GetString() only when the token is external ref, to avoid
triggering assertions in a non-pro build.
2009-01-28 19:30:58 +0100 kohei r267080 : When listeners are being destroyed, don't bother unregistering them with the
external ref manager if the document itself is being destroyed.
2009-01-28 18:56:52 +0100 kohei r267079 : fixed a heap corruption. The Table instance stores instances of FormulaToken
type, not of ScAddress type.
2009-01-26 18:59:14 +0100 kohei r266945 : removed another warning on win32 build.
2009-01-26 18:50:56 +0100 kohei r266943 : removed warnings on windows build.
2009-01-26 17:16:09 +0100 kohei r266939 : added const to a returned reference value that is never used to modify its value.
2009-01-26 16:49:33 +0100 kohei r266937 : Assume that the document instance is not null, or else don't copy any data at all.
2009-01-26 16:19:50 +0100 kohei r266935 : create a clone of ScChart2DataSeqeunce without calling its copy constructor,
since explicit definition of copy constructor would cause a serious compiler
warning that's too ugly to fix.
2009-01-26 05:26:58 +0100 kohei r266894 : removed unused variable and changed function signature.
2009-01-26 05:02:58 +0100 kohei r266893 : removed unused variables to remove compiler warnings.
2009-01-25 18:07:31 +0100 kohei r266890 : fixed indentation inconsistencies in ctor initializers.
2009-01-25 18:01:41 +0100 kohei r266889 : * removed a compiler warning.
* tab -> whitespace conversion in some code.
2009-01-25 03:57:37 +0100 kohei r266888 : removed a mis-leading comment.
2009-01-25 02:37:45 +0100 kohei r266887 : * moved the ref token join method from chart2uno local to ScRefTokenHelper.
* a little code cleanup.
2009-01-24 09:29:26 +0100 kohei r266865 : Don't re-link external files if their link has been broken once.
2009-01-24 09:16:28 +0100 kohei r266864 : a typo in an in-line comment.
2009-01-24 09:14:29 +0100 kohei r266863 : Treat non-cached cells as empty cells only when the source document is not
reachable.
2009-01-24 07:23:44 +0100 kohei r266862 : Don't purge the external ref cache when the link is broken.
2009-01-24 03:25:46 +0100 kohei r266861 : When a cell outside the cached range is queried, we should return an emtpy cell
token instead of NULL, to be consistent with the old behavior.
2009-01-24 02:34:38 +0100 kohei r266860 : Remove corresponding listeners when an external doc link is broken.
2009-01-23 23:18:44 +0100 kohei r266856 : more work on handling external ref update listeners.
2009-01-23 18:10:09 +0100 kohei r266846 : Handle loading of chart objects when their external link is updated.
2009-01-23 06:57:34 +0100 kohei r266765 : more work on ref-tokenizing ScChartListener.
2009-01-22 22:57:52 +0100 kohei r266760 : More work on moving ref token helper code to reftokenhelper & ref-tokenizing
ScChartListener.
2009-01-22 21:52:38 +0100 kohei r266758 : moved the code that converts XML range string into Calc's internal range string
from chart2uno to rangeutl & compile the range string to generate ref tokens
upon ods import.
2009-01-22 18:56:14 +0100 kohei r266749 : fixed a build breakage.
2009-01-22 18:53:43 +0100 kohei r266748 : Initial work toward using ref tokens in ScChartListener class. I'll start
moving some of local ref token handling functions from chart2uno.cxx to
ScRefTokenHelper class to make them available in other places.
2009-01-22 17:38:20 +0100 kohei r266746 : Add a big, fat warning against mixed use of ScSharedTokenRef and ScTokenRef.
2009-01-22 08:33:28 +0100 kohei r266711 : #i98338# fixed slicing of external ref token classes by adding their own Clone() method.
2009-01-22 05:02:25 +0100 kohei r266710 : Applied the same fix that npower/oj applied to fix a crasher (from #i98317#).
2009-01-21 23:02:42 +0100 kohei r266705 : fix build breakages as a result of rebase to m39. Mostly due to the new formula
module and its associated changes esp. wrt token classes.
2009-01-21 19:14:40 +0100 kohei r266699 : CWS-TOOLING: rebase CWS koheiformula02 to trunk@266428 (milestone: DEV300:m39)
2009-01-21 17:55:10 +0100 kohei r266698 : moved the shared ScToken typedef to token.hxx, and use it instead of
ScChart2TokenRef, since I need this typedef in the odf importer. In the future
this can also replace the similar typedef in ScExternalRefManager.
2009-01-21 06:54:04 +0100 kohei r266627 : Added external ref listener framework so that objects listening to external ref changes can get notified
when the link is updated.
The work is not done yet.
2009-01-20 23:07:38 +0100 kohei r266626 : When exporting a range to ODF, we don't want to prepend a sheet name with '$' even for an external sheet.
2009-01-20 23:06:40 +0100 kohei r266625 : 1) code cleanup to remove compiler warnings.
2) fixed convertRangesToXML to convert ref tokens into correct ODF range format.
2009-01-20 19:40:45 +0100 kohei r266620 : extracted the code that fills cache from external ref into its own method.
2009-01-20 18:26:47 +0100 kohei r266616 : added javadoc parameter descriptions.
2009-01-20 18:01:17 +0100 kohei r266615 : disable ScChart2EmptyDataSequence entirely since that class doesn't appear to be used any more.
2009-01-20 17:42:59 +0100 kohei r266608 : fixed a crash when the data source range is empty at time of chart creation.
2009-01-20 17:13:34 +0100 kohei r266601 : a simple locale variable rename.
2009-01-20 16:57:04 +0100 kohei r266598 : #i97563# applied my patch, to fix incorrect export attempts of color values as a number formatter key, and change the condition of
one assertion to prevent it from being triggered incorrectly in non-pro build.
2009-01-17 07:41:01 +0100 kohei r266458 : a little code cleanup.
2009-01-17 07:30:48 +0100 kohei r266457 : removed a method that it no longer used.
2009-01-17 07:29:15 +0100 kohei r266456 : fixed a crash when no external data is available for a given range.
2009-01-17 07:14:50 +0100 kohei r266455 : Even more work on range list to ref token migration. The chart now retains
external data after editing of chart.
2009-01-16 18:54:35 +0100 kohei r266453 : More work on replacing flat ranges and addresses with ref tokens.
2009-01-16 17:07:51 +0100 kohei r266438 : extracted a large code block into its own local method.
2009-01-16 15:22:57 +0100 kohei r266423 : Initial work toward replacing the chart positioner and its related code in
order to use reference tokens instead of range list. The basis of that code
is the old ScChartPositioner and ScChartPositionMap duplicated to avoid breaking
any existing legacy code that might still use it. It appears to be used by the
StarOffice 1.0 filter only.
Still not working with the external references.
2009-01-15 05:33:39 +0100 kohei r266334 : renamed chackRanges() to overlaps() to make it more descriptive of what it does.
2009-01-13 23:25:50 +0100 kohei r266260 : Moved the token-to-string conversion code up so that other parts of the code can use it.
2009-01-13 22:14:35 +0100 kohei r266256 : generateLabels() now uses reference token list.
2009-01-13 18:42:23 +0100 kohei r266246 : Finally, build data array for external data sources. This will now allow the
data to be displayed in the diagram.
2009-01-13 16:34:03 +0100 kohei r266235 : We now need to verify range representation by compiling it instead of parsing it.
2009-01-13 15:41:48 +0100 kohei r266230 : cosmetic function name change & added javadoc comment for it.
2009-01-13 06:32:06 +0100 kohei r266194 : Fixed a typo.
2009-01-13 06:04:23 +0100 kohei r266193 : Generate data source range string by compiling reference tokens. This way
we can also display external reference addresses correctly.
2009-01-13 05:55:44 +0100 kohei r266192 : moved compileRangeRepresentation from being a class member method to a local function.
2009-01-13 05:41:53 +0100 kohei r266191 : nuked one unused method & tab -> whitespace conversion.
2009-01-13 05:35:10 +0100 kohei r266190 : A little code cleanup & consolidated all range-joining code
into a single function object class.
2009-01-13 03:58:51 +0100 kohei r266189 : removed the unused method.
2009-01-13 03:53:01 +0100 kohei r266188 : This time I (hopefully) fixed the range consolidation problem for real. I forgot to join
the missing upper-left corner cell with the existing range list. Also, I needed to join
ranges recursively instead of just doing it once.
2009-01-13 02:15:48 +0100 kohei r266187 : fixed the "add corner if missing" thing.
2009-01-12 23:36:19 +0100 kohei r266185 : More work on range list -> ref tokens.
2009-01-12 23:12:28 +0100 kohei r266184 : More work on switching to reference tokens from range list. Still in progress.
2009-01-10 08:15:39 +0100 kohei r266125 : More code change for switching to reference tokens, especially in ScChart2DataProvider.
Created another addUpperLeftCornerIfMissing method that can take a list of reference tokens
instead of range list.
2009-01-09 19:22:33 +0100 kohei r266110 : entirely removed the range list data member from ScChart2DataSequence class. From now on
we will use a list of tokens to track data source ranges.
Now, if I haven't introduced any bugs in the process, normal charts with no external
references should work as before. But I still need to get the external refs to
work.
2009-01-09 19:11:45 +0100 kohei r266108 : Convert ranges to token list before instantiating ScChart2DataSequence.
2009-01-09 18:27:13 +0100 kohei r266107 : Extracted a common code block into its own method.
2009-01-09 18:18:36 +0100 kohei r266106 : More progress on chart2uno implementation change. Still more to do.
2009-01-09 06:24:36 +0100 kohei r266043 : another place to swap the use of range list with token list.
2009-01-09 06:18:57 +0100 kohei r266042 : Started re-working the chart2uno implementation, to use a list of ScToken
instances instead of ScRangeList, to keep track of data source ranges.
This way, the chart2uno code can tell whether the ranges are external or
internal, and act accordingly.
I'm not finished with it yet. Some things are still not working.
2009-01-08 19:28:51 +0100 kohei r266034 : yet another place to hardcode CONV_OOO for cell range address parsing.
2009-01-08 19:19:21 +0100 kohei r266033 : transferred the BuildArray() method from the koheichart01 cws and its associated changes.
I need to be changing code around this area, and I don't want to redo my changes once
koheichart01 gets integrated for 3.2.
2009-01-08 18:07:08 +0100 kohei r266030 : Have convertRangeFromXML convert external ranges into the appropriate OOO A1 format.
I also added a helper method to append a table name because this is useful in a lot of
other places.
2009-01-07 06:57:52 +0100 kohei r265944 : These places also need a hard-coded CONV_OOO address convention, for Excel chart import and export to function properly.
2009-01-06 16:41:07 +0100 kohei r265932 : removed unused variable.
2009-01-06 16:30:36 +0100 kohei r265931 : removed unused ScDPCacheTable::GroupFilter::setMatchIfFound() method and its
associated member variable (per Caolan's callcatcher output). I added that
method to allow reverse matching in some code but later retracted that logic.
I guess I forgot to remove the method itself afterwards...
2009-01-06 06:39:51 +0100 kohei r265891 : #i97735# Always write cell and cell range addresses using the OOo A1 (CONV_OOO) address convention
when exporting to ODF, regardless of current address convention. Same for reading from ODF documents.
2009-01-06 05:46:40 +0100 kohei r265890 : #i94696# Use the current address convention in the chart wizard dialog.
2009-03-03 15:05:33 +00:00
|
|
|
enum LinkUpdateType { LINK_MODIFIED, LINK_BROKEN };
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Base class for objects that need to listen to link updates. When a
|
|
|
|
* link to a certain external file is updated, the notify() method gets
|
|
|
|
* called.
|
|
|
|
*/
|
|
|
|
class LinkListener
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
LinkListener();
|
|
|
|
virtual ~LinkListener() = 0;
|
|
|
|
virtual void notify(sal_uInt16 nFileId, LinkUpdateType eType) = 0;
|
|
|
|
|
|
|
|
struct Hash
|
|
|
|
{
|
|
|
|
size_t operator() (const LinkListener* p) const
|
|
|
|
{
|
|
|
|
return reinterpret_cast<size_t>(p);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2008-12-12 09:38:47 +00:00
|
|
|
private:
|
|
|
|
/** Shell instance for a source document. */
|
|
|
|
struct SrcShell
|
|
|
|
{
|
|
|
|
SfxObjectShellRef maShell;
|
|
|
|
Time maLastAccess;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef ::std::hash_map<sal_uInt16, SrcShell> DocShellMap;
|
CWS-TOOLING: integrate CWS koheiformula02
2009-02-19 13:18:02 +0100 iha r268276 : #i99400# Missing value plotting broken
2009-02-11 03:39:50 +0100 kohei r267579 : forgot to add an in-line comment.
2009-02-11 00:26:03 +0100 kohei r267578 : Handle also the single cell references when exporting chart ranges.
2009-02-10 19:50:37 +0100 kohei r267576 : removed a compiler warning.
2009-02-10 06:48:55 +0100 kohei r267536 : got xls export filter to correctly write external references in charts.
However, Excel doesn't entirely like my chart output if the chart contains
external references. The data are all there, but it refuses to draw it.
It works fine with charts with internal references.
2009-02-10 03:33:13 +0100 kohei r267533 : correctly import external references used in chart objects, by using a token
array instead of a range list to represent the data ranges.
2009-02-04 15:22:30 +0100 kohei r267387 : return aRet instead of the sRangeRepresentation, just to be consistent with the
rest of the code there. Both strings are empty so this is just for aesthetic
reasons.
2009-02-04 15:07:49 +0100 kohei r267384 : #i98872# allow export of empty data range, in order to allow saving of documents
with an empty chart.
2009-02-03 19:20:38 +0100 kohei r267340 : #i98801# added a special case handler for parsing range address syntax used by
the older version of OOo. In the old syntax, the sheet name was dropped for
the 2nd reference of a range if the 1st and 2nd references are on the same
sheet. In the new syntax this is not the case.
Also fixed unintential display of the sheet name for the end range address of a
single-sheet range.
2009-01-28 20:46:11 +0100 kohei r267085 : call GetIndex() and GetString() only when the token is external ref, to avoid
triggering assertions in a non-pro build.
2009-01-28 19:30:58 +0100 kohei r267080 : When listeners are being destroyed, don't bother unregistering them with the
external ref manager if the document itself is being destroyed.
2009-01-28 18:56:52 +0100 kohei r267079 : fixed a heap corruption. The Table instance stores instances of FormulaToken
type, not of ScAddress type.
2009-01-26 18:59:14 +0100 kohei r266945 : removed another warning on win32 build.
2009-01-26 18:50:56 +0100 kohei r266943 : removed warnings on windows build.
2009-01-26 17:16:09 +0100 kohei r266939 : added const to a returned reference value that is never used to modify its value.
2009-01-26 16:49:33 +0100 kohei r266937 : Assume that the document instance is not null, or else don't copy any data at all.
2009-01-26 16:19:50 +0100 kohei r266935 : create a clone of ScChart2DataSeqeunce without calling its copy constructor,
since explicit definition of copy constructor would cause a serious compiler
warning that's too ugly to fix.
2009-01-26 05:26:58 +0100 kohei r266894 : removed unused variable and changed function signature.
2009-01-26 05:02:58 +0100 kohei r266893 : removed unused variables to remove compiler warnings.
2009-01-25 18:07:31 +0100 kohei r266890 : fixed indentation inconsistencies in ctor initializers.
2009-01-25 18:01:41 +0100 kohei r266889 : * removed a compiler warning.
* tab -> whitespace conversion in some code.
2009-01-25 03:57:37 +0100 kohei r266888 : removed a mis-leading comment.
2009-01-25 02:37:45 +0100 kohei r266887 : * moved the ref token join method from chart2uno local to ScRefTokenHelper.
* a little code cleanup.
2009-01-24 09:29:26 +0100 kohei r266865 : Don't re-link external files if their link has been broken once.
2009-01-24 09:16:28 +0100 kohei r266864 : a typo in an in-line comment.
2009-01-24 09:14:29 +0100 kohei r266863 : Treat non-cached cells as empty cells only when the source document is not
reachable.
2009-01-24 07:23:44 +0100 kohei r266862 : Don't purge the external ref cache when the link is broken.
2009-01-24 03:25:46 +0100 kohei r266861 : When a cell outside the cached range is queried, we should return an emtpy cell
token instead of NULL, to be consistent with the old behavior.
2009-01-24 02:34:38 +0100 kohei r266860 : Remove corresponding listeners when an external doc link is broken.
2009-01-23 23:18:44 +0100 kohei r266856 : more work on handling external ref update listeners.
2009-01-23 18:10:09 +0100 kohei r266846 : Handle loading of chart objects when their external link is updated.
2009-01-23 06:57:34 +0100 kohei r266765 : more work on ref-tokenizing ScChartListener.
2009-01-22 22:57:52 +0100 kohei r266760 : More work on moving ref token helper code to reftokenhelper & ref-tokenizing
ScChartListener.
2009-01-22 21:52:38 +0100 kohei r266758 : moved the code that converts XML range string into Calc's internal range string
from chart2uno to rangeutl & compile the range string to generate ref tokens
upon ods import.
2009-01-22 18:56:14 +0100 kohei r266749 : fixed a build breakage.
2009-01-22 18:53:43 +0100 kohei r266748 : Initial work toward using ref tokens in ScChartListener class. I'll start
moving some of local ref token handling functions from chart2uno.cxx to
ScRefTokenHelper class to make them available in other places.
2009-01-22 17:38:20 +0100 kohei r266746 : Add a big, fat warning against mixed use of ScSharedTokenRef and ScTokenRef.
2009-01-22 08:33:28 +0100 kohei r266711 : #i98338# fixed slicing of external ref token classes by adding their own Clone() method.
2009-01-22 05:02:25 +0100 kohei r266710 : Applied the same fix that npower/oj applied to fix a crasher (from #i98317#).
2009-01-21 23:02:42 +0100 kohei r266705 : fix build breakages as a result of rebase to m39. Mostly due to the new formula
module and its associated changes esp. wrt token classes.
2009-01-21 19:14:40 +0100 kohei r266699 : CWS-TOOLING: rebase CWS koheiformula02 to trunk@266428 (milestone: DEV300:m39)
2009-01-21 17:55:10 +0100 kohei r266698 : moved the shared ScToken typedef to token.hxx, and use it instead of
ScChart2TokenRef, since I need this typedef in the odf importer. In the future
this can also replace the similar typedef in ScExternalRefManager.
2009-01-21 06:54:04 +0100 kohei r266627 : Added external ref listener framework so that objects listening to external ref changes can get notified
when the link is updated.
The work is not done yet.
2009-01-20 23:07:38 +0100 kohei r266626 : When exporting a range to ODF, we don't want to prepend a sheet name with '$' even for an external sheet.
2009-01-20 23:06:40 +0100 kohei r266625 : 1) code cleanup to remove compiler warnings.
2) fixed convertRangesToXML to convert ref tokens into correct ODF range format.
2009-01-20 19:40:45 +0100 kohei r266620 : extracted the code that fills cache from external ref into its own method.
2009-01-20 18:26:47 +0100 kohei r266616 : added javadoc parameter descriptions.
2009-01-20 18:01:17 +0100 kohei r266615 : disable ScChart2EmptyDataSequence entirely since that class doesn't appear to be used any more.
2009-01-20 17:42:59 +0100 kohei r266608 : fixed a crash when the data source range is empty at time of chart creation.
2009-01-20 17:13:34 +0100 kohei r266601 : a simple locale variable rename.
2009-01-20 16:57:04 +0100 kohei r266598 : #i97563# applied my patch, to fix incorrect export attempts of color values as a number formatter key, and change the condition of
one assertion to prevent it from being triggered incorrectly in non-pro build.
2009-01-17 07:41:01 +0100 kohei r266458 : a little code cleanup.
2009-01-17 07:30:48 +0100 kohei r266457 : removed a method that it no longer used.
2009-01-17 07:29:15 +0100 kohei r266456 : fixed a crash when no external data is available for a given range.
2009-01-17 07:14:50 +0100 kohei r266455 : Even more work on range list to ref token migration. The chart now retains
external data after editing of chart.
2009-01-16 18:54:35 +0100 kohei r266453 : More work on replacing flat ranges and addresses with ref tokens.
2009-01-16 17:07:51 +0100 kohei r266438 : extracted a large code block into its own local method.
2009-01-16 15:22:57 +0100 kohei r266423 : Initial work toward replacing the chart positioner and its related code in
order to use reference tokens instead of range list. The basis of that code
is the old ScChartPositioner and ScChartPositionMap duplicated to avoid breaking
any existing legacy code that might still use it. It appears to be used by the
StarOffice 1.0 filter only.
Still not working with the external references.
2009-01-15 05:33:39 +0100 kohei r266334 : renamed chackRanges() to overlaps() to make it more descriptive of what it does.
2009-01-13 23:25:50 +0100 kohei r266260 : Moved the token-to-string conversion code up so that other parts of the code can use it.
2009-01-13 22:14:35 +0100 kohei r266256 : generateLabels() now uses reference token list.
2009-01-13 18:42:23 +0100 kohei r266246 : Finally, build data array for external data sources. This will now allow the
data to be displayed in the diagram.
2009-01-13 16:34:03 +0100 kohei r266235 : We now need to verify range representation by compiling it instead of parsing it.
2009-01-13 15:41:48 +0100 kohei r266230 : cosmetic function name change & added javadoc comment for it.
2009-01-13 06:32:06 +0100 kohei r266194 : Fixed a typo.
2009-01-13 06:04:23 +0100 kohei r266193 : Generate data source range string by compiling reference tokens. This way
we can also display external reference addresses correctly.
2009-01-13 05:55:44 +0100 kohei r266192 : moved compileRangeRepresentation from being a class member method to a local function.
2009-01-13 05:41:53 +0100 kohei r266191 : nuked one unused method & tab -> whitespace conversion.
2009-01-13 05:35:10 +0100 kohei r266190 : A little code cleanup & consolidated all range-joining code
into a single function object class.
2009-01-13 03:58:51 +0100 kohei r266189 : removed the unused method.
2009-01-13 03:53:01 +0100 kohei r266188 : This time I (hopefully) fixed the range consolidation problem for real. I forgot to join
the missing upper-left corner cell with the existing range list. Also, I needed to join
ranges recursively instead of just doing it once.
2009-01-13 02:15:48 +0100 kohei r266187 : fixed the "add corner if missing" thing.
2009-01-12 23:36:19 +0100 kohei r266185 : More work on range list -> ref tokens.
2009-01-12 23:12:28 +0100 kohei r266184 : More work on switching to reference tokens from range list. Still in progress.
2009-01-10 08:15:39 +0100 kohei r266125 : More code change for switching to reference tokens, especially in ScChart2DataProvider.
Created another addUpperLeftCornerIfMissing method that can take a list of reference tokens
instead of range list.
2009-01-09 19:22:33 +0100 kohei r266110 : entirely removed the range list data member from ScChart2DataSequence class. From now on
we will use a list of tokens to track data source ranges.
Now, if I haven't introduced any bugs in the process, normal charts with no external
references should work as before. But I still need to get the external refs to
work.
2009-01-09 19:11:45 +0100 kohei r266108 : Convert ranges to token list before instantiating ScChart2DataSequence.
2009-01-09 18:27:13 +0100 kohei r266107 : Extracted a common code block into its own method.
2009-01-09 18:18:36 +0100 kohei r266106 : More progress on chart2uno implementation change. Still more to do.
2009-01-09 06:24:36 +0100 kohei r266043 : another place to swap the use of range list with token list.
2009-01-09 06:18:57 +0100 kohei r266042 : Started re-working the chart2uno implementation, to use a list of ScToken
instances instead of ScRangeList, to keep track of data source ranges.
This way, the chart2uno code can tell whether the ranges are external or
internal, and act accordingly.
I'm not finished with it yet. Some things are still not working.
2009-01-08 19:28:51 +0100 kohei r266034 : yet another place to hardcode CONV_OOO for cell range address parsing.
2009-01-08 19:19:21 +0100 kohei r266033 : transferred the BuildArray() method from the koheichart01 cws and its associated changes.
I need to be changing code around this area, and I don't want to redo my changes once
koheichart01 gets integrated for 3.2.
2009-01-08 18:07:08 +0100 kohei r266030 : Have convertRangeFromXML convert external ranges into the appropriate OOO A1 format.
I also added a helper method to append a table name because this is useful in a lot of
other places.
2009-01-07 06:57:52 +0100 kohei r265944 : These places also need a hard-coded CONV_OOO address convention, for Excel chart import and export to function properly.
2009-01-06 16:41:07 +0100 kohei r265932 : removed unused variable.
2009-01-06 16:30:36 +0100 kohei r265931 : removed unused ScDPCacheTable::GroupFilter::setMatchIfFound() method and its
associated member variable (per Caolan's callcatcher output). I added that
method to allow reverse matching in some code but later retracted that logic.
I guess I forgot to remove the method itself afterwards...
2009-01-06 06:39:51 +0100 kohei r265891 : #i97735# Always write cell and cell range addresses using the OOo A1 (CONV_OOO) address convention
when exporting to ODF, regardless of current address convention. Same for reading from ODF documents.
2009-01-06 05:46:40 +0100 kohei r265890 : #i94696# Use the current address convention in the chart wizard dialog.
2009-03-03 15:05:33 +00:00
|
|
|
typedef ::std::hash_map<sal_uInt16, bool> LinkedDocMap;
|
2008-12-12 09:38:47 +00:00
|
|
|
|
|
|
|
typedef ::std::hash_map<sal_uInt16, RefCells> RefCellMap;
|
|
|
|
typedef ::std::hash_map<sal_uInt16, SvNumberFormatterMergeMap> NumFmtMap;
|
|
|
|
|
CWS-TOOLING: integrate CWS koheiformula02
2009-02-19 13:18:02 +0100 iha r268276 : #i99400# Missing value plotting broken
2009-02-11 03:39:50 +0100 kohei r267579 : forgot to add an in-line comment.
2009-02-11 00:26:03 +0100 kohei r267578 : Handle also the single cell references when exporting chart ranges.
2009-02-10 19:50:37 +0100 kohei r267576 : removed a compiler warning.
2009-02-10 06:48:55 +0100 kohei r267536 : got xls export filter to correctly write external references in charts.
However, Excel doesn't entirely like my chart output if the chart contains
external references. The data are all there, but it refuses to draw it.
It works fine with charts with internal references.
2009-02-10 03:33:13 +0100 kohei r267533 : correctly import external references used in chart objects, by using a token
array instead of a range list to represent the data ranges.
2009-02-04 15:22:30 +0100 kohei r267387 : return aRet instead of the sRangeRepresentation, just to be consistent with the
rest of the code there. Both strings are empty so this is just for aesthetic
reasons.
2009-02-04 15:07:49 +0100 kohei r267384 : #i98872# allow export of empty data range, in order to allow saving of documents
with an empty chart.
2009-02-03 19:20:38 +0100 kohei r267340 : #i98801# added a special case handler for parsing range address syntax used by
the older version of OOo. In the old syntax, the sheet name was dropped for
the 2nd reference of a range if the 1st and 2nd references are on the same
sheet. In the new syntax this is not the case.
Also fixed unintential display of the sheet name for the end range address of a
single-sheet range.
2009-01-28 20:46:11 +0100 kohei r267085 : call GetIndex() and GetString() only when the token is external ref, to avoid
triggering assertions in a non-pro build.
2009-01-28 19:30:58 +0100 kohei r267080 : When listeners are being destroyed, don't bother unregistering them with the
external ref manager if the document itself is being destroyed.
2009-01-28 18:56:52 +0100 kohei r267079 : fixed a heap corruption. The Table instance stores instances of FormulaToken
type, not of ScAddress type.
2009-01-26 18:59:14 +0100 kohei r266945 : removed another warning on win32 build.
2009-01-26 18:50:56 +0100 kohei r266943 : removed warnings on windows build.
2009-01-26 17:16:09 +0100 kohei r266939 : added const to a returned reference value that is never used to modify its value.
2009-01-26 16:49:33 +0100 kohei r266937 : Assume that the document instance is not null, or else don't copy any data at all.
2009-01-26 16:19:50 +0100 kohei r266935 : create a clone of ScChart2DataSeqeunce without calling its copy constructor,
since explicit definition of copy constructor would cause a serious compiler
warning that's too ugly to fix.
2009-01-26 05:26:58 +0100 kohei r266894 : removed unused variable and changed function signature.
2009-01-26 05:02:58 +0100 kohei r266893 : removed unused variables to remove compiler warnings.
2009-01-25 18:07:31 +0100 kohei r266890 : fixed indentation inconsistencies in ctor initializers.
2009-01-25 18:01:41 +0100 kohei r266889 : * removed a compiler warning.
* tab -> whitespace conversion in some code.
2009-01-25 03:57:37 +0100 kohei r266888 : removed a mis-leading comment.
2009-01-25 02:37:45 +0100 kohei r266887 : * moved the ref token join method from chart2uno local to ScRefTokenHelper.
* a little code cleanup.
2009-01-24 09:29:26 +0100 kohei r266865 : Don't re-link external files if their link has been broken once.
2009-01-24 09:16:28 +0100 kohei r266864 : a typo in an in-line comment.
2009-01-24 09:14:29 +0100 kohei r266863 : Treat non-cached cells as empty cells only when the source document is not
reachable.
2009-01-24 07:23:44 +0100 kohei r266862 : Don't purge the external ref cache when the link is broken.
2009-01-24 03:25:46 +0100 kohei r266861 : When a cell outside the cached range is queried, we should return an emtpy cell
token instead of NULL, to be consistent with the old behavior.
2009-01-24 02:34:38 +0100 kohei r266860 : Remove corresponding listeners when an external doc link is broken.
2009-01-23 23:18:44 +0100 kohei r266856 : more work on handling external ref update listeners.
2009-01-23 18:10:09 +0100 kohei r266846 : Handle loading of chart objects when their external link is updated.
2009-01-23 06:57:34 +0100 kohei r266765 : more work on ref-tokenizing ScChartListener.
2009-01-22 22:57:52 +0100 kohei r266760 : More work on moving ref token helper code to reftokenhelper & ref-tokenizing
ScChartListener.
2009-01-22 21:52:38 +0100 kohei r266758 : moved the code that converts XML range string into Calc's internal range string
from chart2uno to rangeutl & compile the range string to generate ref tokens
upon ods import.
2009-01-22 18:56:14 +0100 kohei r266749 : fixed a build breakage.
2009-01-22 18:53:43 +0100 kohei r266748 : Initial work toward using ref tokens in ScChartListener class. I'll start
moving some of local ref token handling functions from chart2uno.cxx to
ScRefTokenHelper class to make them available in other places.
2009-01-22 17:38:20 +0100 kohei r266746 : Add a big, fat warning against mixed use of ScSharedTokenRef and ScTokenRef.
2009-01-22 08:33:28 +0100 kohei r266711 : #i98338# fixed slicing of external ref token classes by adding their own Clone() method.
2009-01-22 05:02:25 +0100 kohei r266710 : Applied the same fix that npower/oj applied to fix a crasher (from #i98317#).
2009-01-21 23:02:42 +0100 kohei r266705 : fix build breakages as a result of rebase to m39. Mostly due to the new formula
module and its associated changes esp. wrt token classes.
2009-01-21 19:14:40 +0100 kohei r266699 : CWS-TOOLING: rebase CWS koheiformula02 to trunk@266428 (milestone: DEV300:m39)
2009-01-21 17:55:10 +0100 kohei r266698 : moved the shared ScToken typedef to token.hxx, and use it instead of
ScChart2TokenRef, since I need this typedef in the odf importer. In the future
this can also replace the similar typedef in ScExternalRefManager.
2009-01-21 06:54:04 +0100 kohei r266627 : Added external ref listener framework so that objects listening to external ref changes can get notified
when the link is updated.
The work is not done yet.
2009-01-20 23:07:38 +0100 kohei r266626 : When exporting a range to ODF, we don't want to prepend a sheet name with '$' even for an external sheet.
2009-01-20 23:06:40 +0100 kohei r266625 : 1) code cleanup to remove compiler warnings.
2) fixed convertRangesToXML to convert ref tokens into correct ODF range format.
2009-01-20 19:40:45 +0100 kohei r266620 : extracted the code that fills cache from external ref into its own method.
2009-01-20 18:26:47 +0100 kohei r266616 : added javadoc parameter descriptions.
2009-01-20 18:01:17 +0100 kohei r266615 : disable ScChart2EmptyDataSequence entirely since that class doesn't appear to be used any more.
2009-01-20 17:42:59 +0100 kohei r266608 : fixed a crash when the data source range is empty at time of chart creation.
2009-01-20 17:13:34 +0100 kohei r266601 : a simple locale variable rename.
2009-01-20 16:57:04 +0100 kohei r266598 : #i97563# applied my patch, to fix incorrect export attempts of color values as a number formatter key, and change the condition of
one assertion to prevent it from being triggered incorrectly in non-pro build.
2009-01-17 07:41:01 +0100 kohei r266458 : a little code cleanup.
2009-01-17 07:30:48 +0100 kohei r266457 : removed a method that it no longer used.
2009-01-17 07:29:15 +0100 kohei r266456 : fixed a crash when no external data is available for a given range.
2009-01-17 07:14:50 +0100 kohei r266455 : Even more work on range list to ref token migration. The chart now retains
external data after editing of chart.
2009-01-16 18:54:35 +0100 kohei r266453 : More work on replacing flat ranges and addresses with ref tokens.
2009-01-16 17:07:51 +0100 kohei r266438 : extracted a large code block into its own local method.
2009-01-16 15:22:57 +0100 kohei r266423 : Initial work toward replacing the chart positioner and its related code in
order to use reference tokens instead of range list. The basis of that code
is the old ScChartPositioner and ScChartPositionMap duplicated to avoid breaking
any existing legacy code that might still use it. It appears to be used by the
StarOffice 1.0 filter only.
Still not working with the external references.
2009-01-15 05:33:39 +0100 kohei r266334 : renamed chackRanges() to overlaps() to make it more descriptive of what it does.
2009-01-13 23:25:50 +0100 kohei r266260 : Moved the token-to-string conversion code up so that other parts of the code can use it.
2009-01-13 22:14:35 +0100 kohei r266256 : generateLabels() now uses reference token list.
2009-01-13 18:42:23 +0100 kohei r266246 : Finally, build data array for external data sources. This will now allow the
data to be displayed in the diagram.
2009-01-13 16:34:03 +0100 kohei r266235 : We now need to verify range representation by compiling it instead of parsing it.
2009-01-13 15:41:48 +0100 kohei r266230 : cosmetic function name change & added javadoc comment for it.
2009-01-13 06:32:06 +0100 kohei r266194 : Fixed a typo.
2009-01-13 06:04:23 +0100 kohei r266193 : Generate data source range string by compiling reference tokens. This way
we can also display external reference addresses correctly.
2009-01-13 05:55:44 +0100 kohei r266192 : moved compileRangeRepresentation from being a class member method to a local function.
2009-01-13 05:41:53 +0100 kohei r266191 : nuked one unused method & tab -> whitespace conversion.
2009-01-13 05:35:10 +0100 kohei r266190 : A little code cleanup & consolidated all range-joining code
into a single function object class.
2009-01-13 03:58:51 +0100 kohei r266189 : removed the unused method.
2009-01-13 03:53:01 +0100 kohei r266188 : This time I (hopefully) fixed the range consolidation problem for real. I forgot to join
the missing upper-left corner cell with the existing range list. Also, I needed to join
ranges recursively instead of just doing it once.
2009-01-13 02:15:48 +0100 kohei r266187 : fixed the "add corner if missing" thing.
2009-01-12 23:36:19 +0100 kohei r266185 : More work on range list -> ref tokens.
2009-01-12 23:12:28 +0100 kohei r266184 : More work on switching to reference tokens from range list. Still in progress.
2009-01-10 08:15:39 +0100 kohei r266125 : More code change for switching to reference tokens, especially in ScChart2DataProvider.
Created another addUpperLeftCornerIfMissing method that can take a list of reference tokens
instead of range list.
2009-01-09 19:22:33 +0100 kohei r266110 : entirely removed the range list data member from ScChart2DataSequence class. From now on
we will use a list of tokens to track data source ranges.
Now, if I haven't introduced any bugs in the process, normal charts with no external
references should work as before. But I still need to get the external refs to
work.
2009-01-09 19:11:45 +0100 kohei r266108 : Convert ranges to token list before instantiating ScChart2DataSequence.
2009-01-09 18:27:13 +0100 kohei r266107 : Extracted a common code block into its own method.
2009-01-09 18:18:36 +0100 kohei r266106 : More progress on chart2uno implementation change. Still more to do.
2009-01-09 06:24:36 +0100 kohei r266043 : another place to swap the use of range list with token list.
2009-01-09 06:18:57 +0100 kohei r266042 : Started re-working the chart2uno implementation, to use a list of ScToken
instances instead of ScRangeList, to keep track of data source ranges.
This way, the chart2uno code can tell whether the ranges are external or
internal, and act accordingly.
I'm not finished with it yet. Some things are still not working.
2009-01-08 19:28:51 +0100 kohei r266034 : yet another place to hardcode CONV_OOO for cell range address parsing.
2009-01-08 19:19:21 +0100 kohei r266033 : transferred the BuildArray() method from the koheichart01 cws and its associated changes.
I need to be changing code around this area, and I don't want to redo my changes once
koheichart01 gets integrated for 3.2.
2009-01-08 18:07:08 +0100 kohei r266030 : Have convertRangeFromXML convert external ranges into the appropriate OOO A1 format.
I also added a helper method to append a table name because this is useful in a lot of
other places.
2009-01-07 06:57:52 +0100 kohei r265944 : These places also need a hard-coded CONV_OOO address convention, for Excel chart import and export to function properly.
2009-01-06 16:41:07 +0100 kohei r265932 : removed unused variable.
2009-01-06 16:30:36 +0100 kohei r265931 : removed unused ScDPCacheTable::GroupFilter::setMatchIfFound() method and its
associated member variable (per Caolan's callcatcher output). I added that
method to allow reverse matching in some code but later retracted that logic.
I guess I forgot to remove the method itself afterwards...
2009-01-06 06:39:51 +0100 kohei r265891 : #i97735# Always write cell and cell range addresses using the OOo A1 (CONV_OOO) address convention
when exporting to ODF, regardless of current address convention. Same for reading from ODF documents.
2009-01-06 05:46:40 +0100 kohei r265890 : #i94696# Use the current address convention in the chart wizard dialog.
2009-03-03 15:05:33 +00:00
|
|
|
|
|
|
|
typedef ::std::hash_set<LinkListener*, LinkListener::Hash> LinkListeners;
|
|
|
|
typedef ::std::hash_map<sal_uInt16, LinkListeners> LinkListenerMap;
|
|
|
|
|
2008-12-12 09:38:47 +00:00
|
|
|
public:
|
|
|
|
/** Source document meta-data container. */
|
|
|
|
struct SrcFileData
|
|
|
|
{
|
2009-09-17 11:09:25 +00:00
|
|
|
String maFileName; /// original file name as loaded from the file.
|
|
|
|
String maRealFileName; /// file name created from the relative name.
|
2008-12-12 09:38:47 +00:00
|
|
|
String maRelativeName;
|
|
|
|
String maFilterName;
|
|
|
|
String maFilterOptions;
|
2009-09-17 11:09:25 +00:00
|
|
|
|
|
|
|
void maybeCreateRealFileName(const String& rOwnDocName);
|
2008-12-12 09:38:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit ScExternalRefManager(ScDocument* pDoc);
|
2009-01-13 12:48:06 +00:00
|
|
|
virtual ~ScExternalRefManager();
|
2008-12-12 09:38:47 +00:00
|
|
|
|
2009-01-13 11:01:13 +00:00
|
|
|
virtual String getCacheTableName(sal_uInt16 nFileId, size_t nTabIndex) const;
|
2008-12-12 09:38:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a cache table instance for specified table and table index. Unlike
|
|
|
|
* the other method that takes a table name, this method does not create a
|
|
|
|
* new table when a table is not available for specified index.
|
|
|
|
*
|
|
|
|
* @param nFileId file ID
|
|
|
|
* @param nTabIndex cache table index
|
|
|
|
*
|
|
|
|
* @return shared_ptr to the cache table instance
|
|
|
|
*/
|
|
|
|
ScExternalRefCache::TableTypeRef getCacheTable(sal_uInt16 nFileId, size_t nTabIndex) const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a cache table instance for specified file and table name. If the
|
|
|
|
* table instance is not already present, it'll instantiate a new one and
|
|
|
|
* append it to the end of the table array. <I>It's important to be
|
|
|
|
* aware of this fact especially for multi-table ranges for which
|
|
|
|
* table orders are critical.</I>
|
|
|
|
*
|
|
|
|
* Excel filter calls this method to populate the cache table from the
|
|
|
|
* XCT/CRN records.
|
|
|
|
*
|
|
|
|
* @param nFileId file ID
|
|
|
|
* @param rTabName table name
|
CWS-TOOLING: integrate CWS koheiformula02
2009-02-19 13:18:02 +0100 iha r268276 : #i99400# Missing value plotting broken
2009-02-11 03:39:50 +0100 kohei r267579 : forgot to add an in-line comment.
2009-02-11 00:26:03 +0100 kohei r267578 : Handle also the single cell references when exporting chart ranges.
2009-02-10 19:50:37 +0100 kohei r267576 : removed a compiler warning.
2009-02-10 06:48:55 +0100 kohei r267536 : got xls export filter to correctly write external references in charts.
However, Excel doesn't entirely like my chart output if the chart contains
external references. The data are all there, but it refuses to draw it.
It works fine with charts with internal references.
2009-02-10 03:33:13 +0100 kohei r267533 : correctly import external references used in chart objects, by using a token
array instead of a range list to represent the data ranges.
2009-02-04 15:22:30 +0100 kohei r267387 : return aRet instead of the sRangeRepresentation, just to be consistent with the
rest of the code there. Both strings are empty so this is just for aesthetic
reasons.
2009-02-04 15:07:49 +0100 kohei r267384 : #i98872# allow export of empty data range, in order to allow saving of documents
with an empty chart.
2009-02-03 19:20:38 +0100 kohei r267340 : #i98801# added a special case handler for parsing range address syntax used by
the older version of OOo. In the old syntax, the sheet name was dropped for
the 2nd reference of a range if the 1st and 2nd references are on the same
sheet. In the new syntax this is not the case.
Also fixed unintential display of the sheet name for the end range address of a
single-sheet range.
2009-01-28 20:46:11 +0100 kohei r267085 : call GetIndex() and GetString() only when the token is external ref, to avoid
triggering assertions in a non-pro build.
2009-01-28 19:30:58 +0100 kohei r267080 : When listeners are being destroyed, don't bother unregistering them with the
external ref manager if the document itself is being destroyed.
2009-01-28 18:56:52 +0100 kohei r267079 : fixed a heap corruption. The Table instance stores instances of FormulaToken
type, not of ScAddress type.
2009-01-26 18:59:14 +0100 kohei r266945 : removed another warning on win32 build.
2009-01-26 18:50:56 +0100 kohei r266943 : removed warnings on windows build.
2009-01-26 17:16:09 +0100 kohei r266939 : added const to a returned reference value that is never used to modify its value.
2009-01-26 16:49:33 +0100 kohei r266937 : Assume that the document instance is not null, or else don't copy any data at all.
2009-01-26 16:19:50 +0100 kohei r266935 : create a clone of ScChart2DataSeqeunce without calling its copy constructor,
since explicit definition of copy constructor would cause a serious compiler
warning that's too ugly to fix.
2009-01-26 05:26:58 +0100 kohei r266894 : removed unused variable and changed function signature.
2009-01-26 05:02:58 +0100 kohei r266893 : removed unused variables to remove compiler warnings.
2009-01-25 18:07:31 +0100 kohei r266890 : fixed indentation inconsistencies in ctor initializers.
2009-01-25 18:01:41 +0100 kohei r266889 : * removed a compiler warning.
* tab -> whitespace conversion in some code.
2009-01-25 03:57:37 +0100 kohei r266888 : removed a mis-leading comment.
2009-01-25 02:37:45 +0100 kohei r266887 : * moved the ref token join method from chart2uno local to ScRefTokenHelper.
* a little code cleanup.
2009-01-24 09:29:26 +0100 kohei r266865 : Don't re-link external files if their link has been broken once.
2009-01-24 09:16:28 +0100 kohei r266864 : a typo in an in-line comment.
2009-01-24 09:14:29 +0100 kohei r266863 : Treat non-cached cells as empty cells only when the source document is not
reachable.
2009-01-24 07:23:44 +0100 kohei r266862 : Don't purge the external ref cache when the link is broken.
2009-01-24 03:25:46 +0100 kohei r266861 : When a cell outside the cached range is queried, we should return an emtpy cell
token instead of NULL, to be consistent with the old behavior.
2009-01-24 02:34:38 +0100 kohei r266860 : Remove corresponding listeners when an external doc link is broken.
2009-01-23 23:18:44 +0100 kohei r266856 : more work on handling external ref update listeners.
2009-01-23 18:10:09 +0100 kohei r266846 : Handle loading of chart objects when their external link is updated.
2009-01-23 06:57:34 +0100 kohei r266765 : more work on ref-tokenizing ScChartListener.
2009-01-22 22:57:52 +0100 kohei r266760 : More work on moving ref token helper code to reftokenhelper & ref-tokenizing
ScChartListener.
2009-01-22 21:52:38 +0100 kohei r266758 : moved the code that converts XML range string into Calc's internal range string
from chart2uno to rangeutl & compile the range string to generate ref tokens
upon ods import.
2009-01-22 18:56:14 +0100 kohei r266749 : fixed a build breakage.
2009-01-22 18:53:43 +0100 kohei r266748 : Initial work toward using ref tokens in ScChartListener class. I'll start
moving some of local ref token handling functions from chart2uno.cxx to
ScRefTokenHelper class to make them available in other places.
2009-01-22 17:38:20 +0100 kohei r266746 : Add a big, fat warning against mixed use of ScSharedTokenRef and ScTokenRef.
2009-01-22 08:33:28 +0100 kohei r266711 : #i98338# fixed slicing of external ref token classes by adding their own Clone() method.
2009-01-22 05:02:25 +0100 kohei r266710 : Applied the same fix that npower/oj applied to fix a crasher (from #i98317#).
2009-01-21 23:02:42 +0100 kohei r266705 : fix build breakages as a result of rebase to m39. Mostly due to the new formula
module and its associated changes esp. wrt token classes.
2009-01-21 19:14:40 +0100 kohei r266699 : CWS-TOOLING: rebase CWS koheiformula02 to trunk@266428 (milestone: DEV300:m39)
2009-01-21 17:55:10 +0100 kohei r266698 : moved the shared ScToken typedef to token.hxx, and use it instead of
ScChart2TokenRef, since I need this typedef in the odf importer. In the future
this can also replace the similar typedef in ScExternalRefManager.
2009-01-21 06:54:04 +0100 kohei r266627 : Added external ref listener framework so that objects listening to external ref changes can get notified
when the link is updated.
The work is not done yet.
2009-01-20 23:07:38 +0100 kohei r266626 : When exporting a range to ODF, we don't want to prepend a sheet name with '$' even for an external sheet.
2009-01-20 23:06:40 +0100 kohei r266625 : 1) code cleanup to remove compiler warnings.
2) fixed convertRangesToXML to convert ref tokens into correct ODF range format.
2009-01-20 19:40:45 +0100 kohei r266620 : extracted the code that fills cache from external ref into its own method.
2009-01-20 18:26:47 +0100 kohei r266616 : added javadoc parameter descriptions.
2009-01-20 18:01:17 +0100 kohei r266615 : disable ScChart2EmptyDataSequence entirely since that class doesn't appear to be used any more.
2009-01-20 17:42:59 +0100 kohei r266608 : fixed a crash when the data source range is empty at time of chart creation.
2009-01-20 17:13:34 +0100 kohei r266601 : a simple locale variable rename.
2009-01-20 16:57:04 +0100 kohei r266598 : #i97563# applied my patch, to fix incorrect export attempts of color values as a number formatter key, and change the condition of
one assertion to prevent it from being triggered incorrectly in non-pro build.
2009-01-17 07:41:01 +0100 kohei r266458 : a little code cleanup.
2009-01-17 07:30:48 +0100 kohei r266457 : removed a method that it no longer used.
2009-01-17 07:29:15 +0100 kohei r266456 : fixed a crash when no external data is available for a given range.
2009-01-17 07:14:50 +0100 kohei r266455 : Even more work on range list to ref token migration. The chart now retains
external data after editing of chart.
2009-01-16 18:54:35 +0100 kohei r266453 : More work on replacing flat ranges and addresses with ref tokens.
2009-01-16 17:07:51 +0100 kohei r266438 : extracted a large code block into its own local method.
2009-01-16 15:22:57 +0100 kohei r266423 : Initial work toward replacing the chart positioner and its related code in
order to use reference tokens instead of range list. The basis of that code
is the old ScChartPositioner and ScChartPositionMap duplicated to avoid breaking
any existing legacy code that might still use it. It appears to be used by the
StarOffice 1.0 filter only.
Still not working with the external references.
2009-01-15 05:33:39 +0100 kohei r266334 : renamed chackRanges() to overlaps() to make it more descriptive of what it does.
2009-01-13 23:25:50 +0100 kohei r266260 : Moved the token-to-string conversion code up so that other parts of the code can use it.
2009-01-13 22:14:35 +0100 kohei r266256 : generateLabels() now uses reference token list.
2009-01-13 18:42:23 +0100 kohei r266246 : Finally, build data array for external data sources. This will now allow the
data to be displayed in the diagram.
2009-01-13 16:34:03 +0100 kohei r266235 : We now need to verify range representation by compiling it instead of parsing it.
2009-01-13 15:41:48 +0100 kohei r266230 : cosmetic function name change & added javadoc comment for it.
2009-01-13 06:32:06 +0100 kohei r266194 : Fixed a typo.
2009-01-13 06:04:23 +0100 kohei r266193 : Generate data source range string by compiling reference tokens. This way
we can also display external reference addresses correctly.
2009-01-13 05:55:44 +0100 kohei r266192 : moved compileRangeRepresentation from being a class member method to a local function.
2009-01-13 05:41:53 +0100 kohei r266191 : nuked one unused method & tab -> whitespace conversion.
2009-01-13 05:35:10 +0100 kohei r266190 : A little code cleanup & consolidated all range-joining code
into a single function object class.
2009-01-13 03:58:51 +0100 kohei r266189 : removed the unused method.
2009-01-13 03:53:01 +0100 kohei r266188 : This time I (hopefully) fixed the range consolidation problem for real. I forgot to join
the missing upper-left corner cell with the existing range list. Also, I needed to join
ranges recursively instead of just doing it once.
2009-01-13 02:15:48 +0100 kohei r266187 : fixed the "add corner if missing" thing.
2009-01-12 23:36:19 +0100 kohei r266185 : More work on range list -> ref tokens.
2009-01-12 23:12:28 +0100 kohei r266184 : More work on switching to reference tokens from range list. Still in progress.
2009-01-10 08:15:39 +0100 kohei r266125 : More code change for switching to reference tokens, especially in ScChart2DataProvider.
Created another addUpperLeftCornerIfMissing method that can take a list of reference tokens
instead of range list.
2009-01-09 19:22:33 +0100 kohei r266110 : entirely removed the range list data member from ScChart2DataSequence class. From now on
we will use a list of tokens to track data source ranges.
Now, if I haven't introduced any bugs in the process, normal charts with no external
references should work as before. But I still need to get the external refs to
work.
2009-01-09 19:11:45 +0100 kohei r266108 : Convert ranges to token list before instantiating ScChart2DataSequence.
2009-01-09 18:27:13 +0100 kohei r266107 : Extracted a common code block into its own method.
2009-01-09 18:18:36 +0100 kohei r266106 : More progress on chart2uno implementation change. Still more to do.
2009-01-09 06:24:36 +0100 kohei r266043 : another place to swap the use of range list with token list.
2009-01-09 06:18:57 +0100 kohei r266042 : Started re-working the chart2uno implementation, to use a list of ScToken
instances instead of ScRangeList, to keep track of data source ranges.
This way, the chart2uno code can tell whether the ranges are external or
internal, and act accordingly.
I'm not finished with it yet. Some things are still not working.
2009-01-08 19:28:51 +0100 kohei r266034 : yet another place to hardcode CONV_OOO for cell range address parsing.
2009-01-08 19:19:21 +0100 kohei r266033 : transferred the BuildArray() method from the koheichart01 cws and its associated changes.
I need to be changing code around this area, and I don't want to redo my changes once
koheichart01 gets integrated for 3.2.
2009-01-08 18:07:08 +0100 kohei r266030 : Have convertRangeFromXML convert external ranges into the appropriate OOO A1 format.
I also added a helper method to append a table name because this is useful in a lot of
other places.
2009-01-07 06:57:52 +0100 kohei r265944 : These places also need a hard-coded CONV_OOO address convention, for Excel chart import and export to function properly.
2009-01-06 16:41:07 +0100 kohei r265932 : removed unused variable.
2009-01-06 16:30:36 +0100 kohei r265931 : removed unused ScDPCacheTable::GroupFilter::setMatchIfFound() method and its
associated member variable (per Caolan's callcatcher output). I added that
method to allow reverse matching in some code but later retracted that logic.
I guess I forgot to remove the method itself afterwards...
2009-01-06 06:39:51 +0100 kohei r265891 : #i97735# Always write cell and cell range addresses using the OOo A1 (CONV_OOO) address convention
when exporting to ODF, regardless of current address convention. Same for reading from ODF documents.
2009-01-06 05:46:40 +0100 kohei r265890 : #i94696# Use the current address convention in the chart wizard dialog.
2009-03-03 15:05:33 +00:00
|
|
|
* @param bCreateNew if true, create a new table instance if it's not
|
|
|
|
* already present. If false, it returns NULL if the
|
|
|
|
* specified table's cache doesn't exist.
|
|
|
|
* @param pnIndex if non-NULL pointer is passed, it stores the internal
|
|
|
|
* index of a cache table instance.
|
2008-12-12 09:38:47 +00:00
|
|
|
*
|
|
|
|
* @return shared_ptr to the cache table instance
|
|
|
|
*/
|
|
|
|
ScExternalRefCache::TableTypeRef getCacheTable(sal_uInt16 nFileId, const String& rTabName, bool bCreateNew, size_t* pnIndex = 0);
|
|
|
|
void getAllCachedTableNames(sal_uInt16 nFileId, ::std::vector<String>& rTabNames) const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the span (distance+sign(distance)) of two sheets of a specified
|
|
|
|
* file.
|
|
|
|
*
|
|
|
|
* @param nFileId file ID
|
|
|
|
* @param rStartTabName name of first sheet (sheet1)
|
|
|
|
* @param rEndTabName name of second sheet (sheet2)
|
|
|
|
*
|
|
|
|
* @return span
|
|
|
|
* 1 if sheet2 == sheet1
|
|
|
|
* > 1 if sheet2 > sheet1
|
|
|
|
* < -1 if sheet2 < sheet1
|
|
|
|
* -1 if nFileId or rStartTabName not found
|
|
|
|
* 0 if rEndTabName not found
|
|
|
|
*/
|
|
|
|
SCsTAB getCachedTabSpan( sal_uInt16 nFileId, const String& rStartTabName, const String& rEndTabName ) const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get all unique number format indices that are used in the cache tables.
|
|
|
|
* The retrieved indices are sorted in ascending order.
|
|
|
|
*
|
|
|
|
* @param rNumFmts (reference) all unique number format indices.
|
|
|
|
*/
|
|
|
|
void getAllCachedNumberFormats(::std::vector<sal_uInt32>& rNumFmts) const;
|
|
|
|
|
|
|
|
bool hasCacheTable(sal_uInt16 nFileId, const String& rTabName) const;
|
|
|
|
size_t getCacheTableCount(sal_uInt16 nFileId) const;
|
|
|
|
sal_uInt16 getExternalFileCount() const;
|
|
|
|
|
2009-04-02 15:00:15 +00:00
|
|
|
/**
|
|
|
|
* Mark all tables as referenced that are used by any LinkListener, used
|
|
|
|
* only during store-to-file.
|
|
|
|
* @returns <TRUE/> if ALL tables of ALL external documents are marked.
|
|
|
|
*/
|
|
|
|
bool markUsedByLinkListeners();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set all tables of a document as referenced, used only during
|
|
|
|
* store-to-file.
|
|
|
|
* @returns <TRUE/> if ALL tables of ALL external documents are marked.
|
|
|
|
*/
|
|
|
|
bool setCacheDocReferenced( sal_uInt16 nFileId );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set a table as referenced, used only during store-to-file.
|
|
|
|
* @returns <TRUE/> if ALL tables of ALL external documents are marked.
|
|
|
|
*/
|
2009-07-28 10:04:47 +00:00
|
|
|
bool setCacheTableReferenced( sal_uInt16 nFileId, const String& rTabName, size_t nSheets );
|
2009-04-02 15:00:15 +00:00
|
|
|
void setAllCacheTableReferencedStati( bool bReferenced );
|
|
|
|
|
2009-07-28 10:04:47 +00:00
|
|
|
/**
|
|
|
|
* Set a table as permanently referenced, to be called if not in
|
|
|
|
* mark-during-store-to-file cycle.
|
|
|
|
*/
|
|
|
|
void setCacheTableReferencedPermanently( sal_uInt16 nFileId, const String& rTabName, size_t nSheets );
|
|
|
|
|
2009-04-02 15:00:15 +00:00
|
|
|
/**
|
|
|
|
* @returns <TRUE/> if setAllCacheTableReferencedStati(false) was called,
|
|
|
|
* <FALSE/> if setAllCacheTableReferencedStati(true) was called.
|
|
|
|
*/
|
|
|
|
bool isInReferenceMarking() const { return bInReferenceMarking; }
|
|
|
|
|
2008-12-12 09:38:47 +00:00
|
|
|
void storeRangeNameTokens(sal_uInt16 nFileId, const String& rName, const ScTokenArray& rArray);
|
|
|
|
|
|
|
|
ScExternalRefCache::TokenRef getSingleRefToken(
|
|
|
|
sal_uInt16 nFileId, const String& rTabName, const ScAddress& rCell,
|
|
|
|
const ScAddress* pCurPos, SCTAB* pTab, ScExternalRefCache::CellFormat* pFmt = NULL);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get an array of tokens that consist of the specified external cell
|
|
|
|
* range.
|
|
|
|
*
|
|
|
|
* @param nFileId file ID for an external document
|
|
|
|
* @param rTabName referenced sheet name
|
|
|
|
* @param rRange referenced cell range
|
|
|
|
* @param pCurPos current cursor position to keep track of cells that
|
|
|
|
* reference an external data.
|
|
|
|
*
|
|
|
|
* @return shared_ptr to a token array instance. <i>The caller must not
|
|
|
|
* delete the instance returned by this method.</i>
|
|
|
|
*/
|
|
|
|
ScExternalRefCache::TokenArrayRef getDoubleRefTokens(sal_uInt16 nFileId, const String& rTabName, const ScRange& rRange, const ScAddress* pCurPos);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get an array of tokens corresponding with a specified name in a
|
|
|
|
* specified file.
|
|
|
|
*
|
|
|
|
* @param pCurPos currnet cell address where this name token is used.
|
|
|
|
* This is purely to keep track of all cells containing
|
|
|
|
* external names for refreshing purposes. If this is
|
|
|
|
* NULL, then the cell will not be added to the list.
|
|
|
|
*
|
|
|
|
* @return shared_ptr to array of tokens composing the name
|
|
|
|
*/
|
|
|
|
ScExternalRefCache::TokenArrayRef getRangeNameTokens(sal_uInt16 nFileId, const String& rName, const ScAddress* pCurPos = NULL);
|
|
|
|
|
|
|
|
const String& getOwnDocumentName() const;
|
|
|
|
bool isOwnDocument(const String& rFile) const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Takes a flat file name, and convert it to an absolute URL path. An
|
|
|
|
* absolute URL path begines with 'file:///.
|
|
|
|
*
|
|
|
|
* @param rFile file name to convert
|
|
|
|
*/
|
|
|
|
void convertToAbsName(String& rFile) const;
|
|
|
|
sal_uInt16 getExternalFileId(const String& rFile);
|
2009-09-17 11:09:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* It returns a pointer to the name of the URI associated with a given
|
|
|
|
* external file ID. In case the original document has moved, it returns
|
|
|
|
* an URI adjusted for the relocation.
|
|
|
|
*
|
|
|
|
* @param nFileId file ID for an external document
|
|
|
|
* @param bForceOriginal If true, it always returns the original document
|
|
|
|
* URI even if the referring document has relocated.
|
|
|
|
* If false, it returns an URI adjusted for
|
|
|
|
* relocated document.
|
|
|
|
*
|
|
|
|
* @return const String* external document URI.
|
|
|
|
*/
|
|
|
|
const String* getExternalFileName(sal_uInt16 nFileId, bool bForceOriginal = false);
|
2008-12-12 09:38:47 +00:00
|
|
|
bool hasExternalFile(sal_uInt16 nFileId) const;
|
|
|
|
bool hasExternalFile(const String& rFile) const;
|
|
|
|
const SrcFileData* getExternalFileData(sal_uInt16 nFileId) const;
|
|
|
|
|
|
|
|
const String* getRealTableName(sal_uInt16 nFileId, const String& rTabName) const;
|
|
|
|
const String* getRealRangeName(sal_uInt16 nFileId, const String& rRangeName) const;
|
|
|
|
void refreshNames(sal_uInt16 nFileId);
|
CWS-TOOLING: integrate CWS koheiformula02
2009-02-19 13:18:02 +0100 iha r268276 : #i99400# Missing value plotting broken
2009-02-11 03:39:50 +0100 kohei r267579 : forgot to add an in-line comment.
2009-02-11 00:26:03 +0100 kohei r267578 : Handle also the single cell references when exporting chart ranges.
2009-02-10 19:50:37 +0100 kohei r267576 : removed a compiler warning.
2009-02-10 06:48:55 +0100 kohei r267536 : got xls export filter to correctly write external references in charts.
However, Excel doesn't entirely like my chart output if the chart contains
external references. The data are all there, but it refuses to draw it.
It works fine with charts with internal references.
2009-02-10 03:33:13 +0100 kohei r267533 : correctly import external references used in chart objects, by using a token
array instead of a range list to represent the data ranges.
2009-02-04 15:22:30 +0100 kohei r267387 : return aRet instead of the sRangeRepresentation, just to be consistent with the
rest of the code there. Both strings are empty so this is just for aesthetic
reasons.
2009-02-04 15:07:49 +0100 kohei r267384 : #i98872# allow export of empty data range, in order to allow saving of documents
with an empty chart.
2009-02-03 19:20:38 +0100 kohei r267340 : #i98801# added a special case handler for parsing range address syntax used by
the older version of OOo. In the old syntax, the sheet name was dropped for
the 2nd reference of a range if the 1st and 2nd references are on the same
sheet. In the new syntax this is not the case.
Also fixed unintential display of the sheet name for the end range address of a
single-sheet range.
2009-01-28 20:46:11 +0100 kohei r267085 : call GetIndex() and GetString() only when the token is external ref, to avoid
triggering assertions in a non-pro build.
2009-01-28 19:30:58 +0100 kohei r267080 : When listeners are being destroyed, don't bother unregistering them with the
external ref manager if the document itself is being destroyed.
2009-01-28 18:56:52 +0100 kohei r267079 : fixed a heap corruption. The Table instance stores instances of FormulaToken
type, not of ScAddress type.
2009-01-26 18:59:14 +0100 kohei r266945 : removed another warning on win32 build.
2009-01-26 18:50:56 +0100 kohei r266943 : removed warnings on windows build.
2009-01-26 17:16:09 +0100 kohei r266939 : added const to a returned reference value that is never used to modify its value.
2009-01-26 16:49:33 +0100 kohei r266937 : Assume that the document instance is not null, or else don't copy any data at all.
2009-01-26 16:19:50 +0100 kohei r266935 : create a clone of ScChart2DataSeqeunce without calling its copy constructor,
since explicit definition of copy constructor would cause a serious compiler
warning that's too ugly to fix.
2009-01-26 05:26:58 +0100 kohei r266894 : removed unused variable and changed function signature.
2009-01-26 05:02:58 +0100 kohei r266893 : removed unused variables to remove compiler warnings.
2009-01-25 18:07:31 +0100 kohei r266890 : fixed indentation inconsistencies in ctor initializers.
2009-01-25 18:01:41 +0100 kohei r266889 : * removed a compiler warning.
* tab -> whitespace conversion in some code.
2009-01-25 03:57:37 +0100 kohei r266888 : removed a mis-leading comment.
2009-01-25 02:37:45 +0100 kohei r266887 : * moved the ref token join method from chart2uno local to ScRefTokenHelper.
* a little code cleanup.
2009-01-24 09:29:26 +0100 kohei r266865 : Don't re-link external files if their link has been broken once.
2009-01-24 09:16:28 +0100 kohei r266864 : a typo in an in-line comment.
2009-01-24 09:14:29 +0100 kohei r266863 : Treat non-cached cells as empty cells only when the source document is not
reachable.
2009-01-24 07:23:44 +0100 kohei r266862 : Don't purge the external ref cache when the link is broken.
2009-01-24 03:25:46 +0100 kohei r266861 : When a cell outside the cached range is queried, we should return an emtpy cell
token instead of NULL, to be consistent with the old behavior.
2009-01-24 02:34:38 +0100 kohei r266860 : Remove corresponding listeners when an external doc link is broken.
2009-01-23 23:18:44 +0100 kohei r266856 : more work on handling external ref update listeners.
2009-01-23 18:10:09 +0100 kohei r266846 : Handle loading of chart objects when their external link is updated.
2009-01-23 06:57:34 +0100 kohei r266765 : more work on ref-tokenizing ScChartListener.
2009-01-22 22:57:52 +0100 kohei r266760 : More work on moving ref token helper code to reftokenhelper & ref-tokenizing
ScChartListener.
2009-01-22 21:52:38 +0100 kohei r266758 : moved the code that converts XML range string into Calc's internal range string
from chart2uno to rangeutl & compile the range string to generate ref tokens
upon ods import.
2009-01-22 18:56:14 +0100 kohei r266749 : fixed a build breakage.
2009-01-22 18:53:43 +0100 kohei r266748 : Initial work toward using ref tokens in ScChartListener class. I'll start
moving some of local ref token handling functions from chart2uno.cxx to
ScRefTokenHelper class to make them available in other places.
2009-01-22 17:38:20 +0100 kohei r266746 : Add a big, fat warning against mixed use of ScSharedTokenRef and ScTokenRef.
2009-01-22 08:33:28 +0100 kohei r266711 : #i98338# fixed slicing of external ref token classes by adding their own Clone() method.
2009-01-22 05:02:25 +0100 kohei r266710 : Applied the same fix that npower/oj applied to fix a crasher (from #i98317#).
2009-01-21 23:02:42 +0100 kohei r266705 : fix build breakages as a result of rebase to m39. Mostly due to the new formula
module and its associated changes esp. wrt token classes.
2009-01-21 19:14:40 +0100 kohei r266699 : CWS-TOOLING: rebase CWS koheiformula02 to trunk@266428 (milestone: DEV300:m39)
2009-01-21 17:55:10 +0100 kohei r266698 : moved the shared ScToken typedef to token.hxx, and use it instead of
ScChart2TokenRef, since I need this typedef in the odf importer. In the future
this can also replace the similar typedef in ScExternalRefManager.
2009-01-21 06:54:04 +0100 kohei r266627 : Added external ref listener framework so that objects listening to external ref changes can get notified
when the link is updated.
The work is not done yet.
2009-01-20 23:07:38 +0100 kohei r266626 : When exporting a range to ODF, we don't want to prepend a sheet name with '$' even for an external sheet.
2009-01-20 23:06:40 +0100 kohei r266625 : 1) code cleanup to remove compiler warnings.
2) fixed convertRangesToXML to convert ref tokens into correct ODF range format.
2009-01-20 19:40:45 +0100 kohei r266620 : extracted the code that fills cache from external ref into its own method.
2009-01-20 18:26:47 +0100 kohei r266616 : added javadoc parameter descriptions.
2009-01-20 18:01:17 +0100 kohei r266615 : disable ScChart2EmptyDataSequence entirely since that class doesn't appear to be used any more.
2009-01-20 17:42:59 +0100 kohei r266608 : fixed a crash when the data source range is empty at time of chart creation.
2009-01-20 17:13:34 +0100 kohei r266601 : a simple locale variable rename.
2009-01-20 16:57:04 +0100 kohei r266598 : #i97563# applied my patch, to fix incorrect export attempts of color values as a number formatter key, and change the condition of
one assertion to prevent it from being triggered incorrectly in non-pro build.
2009-01-17 07:41:01 +0100 kohei r266458 : a little code cleanup.
2009-01-17 07:30:48 +0100 kohei r266457 : removed a method that it no longer used.
2009-01-17 07:29:15 +0100 kohei r266456 : fixed a crash when no external data is available for a given range.
2009-01-17 07:14:50 +0100 kohei r266455 : Even more work on range list to ref token migration. The chart now retains
external data after editing of chart.
2009-01-16 18:54:35 +0100 kohei r266453 : More work on replacing flat ranges and addresses with ref tokens.
2009-01-16 17:07:51 +0100 kohei r266438 : extracted a large code block into its own local method.
2009-01-16 15:22:57 +0100 kohei r266423 : Initial work toward replacing the chart positioner and its related code in
order to use reference tokens instead of range list. The basis of that code
is the old ScChartPositioner and ScChartPositionMap duplicated to avoid breaking
any existing legacy code that might still use it. It appears to be used by the
StarOffice 1.0 filter only.
Still not working with the external references.
2009-01-15 05:33:39 +0100 kohei r266334 : renamed chackRanges() to overlaps() to make it more descriptive of what it does.
2009-01-13 23:25:50 +0100 kohei r266260 : Moved the token-to-string conversion code up so that other parts of the code can use it.
2009-01-13 22:14:35 +0100 kohei r266256 : generateLabels() now uses reference token list.
2009-01-13 18:42:23 +0100 kohei r266246 : Finally, build data array for external data sources. This will now allow the
data to be displayed in the diagram.
2009-01-13 16:34:03 +0100 kohei r266235 : We now need to verify range representation by compiling it instead of parsing it.
2009-01-13 15:41:48 +0100 kohei r266230 : cosmetic function name change & added javadoc comment for it.
2009-01-13 06:32:06 +0100 kohei r266194 : Fixed a typo.
2009-01-13 06:04:23 +0100 kohei r266193 : Generate data source range string by compiling reference tokens. This way
we can also display external reference addresses correctly.
2009-01-13 05:55:44 +0100 kohei r266192 : moved compileRangeRepresentation from being a class member method to a local function.
2009-01-13 05:41:53 +0100 kohei r266191 : nuked one unused method & tab -> whitespace conversion.
2009-01-13 05:35:10 +0100 kohei r266190 : A little code cleanup & consolidated all range-joining code
into a single function object class.
2009-01-13 03:58:51 +0100 kohei r266189 : removed the unused method.
2009-01-13 03:53:01 +0100 kohei r266188 : This time I (hopefully) fixed the range consolidation problem for real. I forgot to join
the missing upper-left corner cell with the existing range list. Also, I needed to join
ranges recursively instead of just doing it once.
2009-01-13 02:15:48 +0100 kohei r266187 : fixed the "add corner if missing" thing.
2009-01-12 23:36:19 +0100 kohei r266185 : More work on range list -> ref tokens.
2009-01-12 23:12:28 +0100 kohei r266184 : More work on switching to reference tokens from range list. Still in progress.
2009-01-10 08:15:39 +0100 kohei r266125 : More code change for switching to reference tokens, especially in ScChart2DataProvider.
Created another addUpperLeftCornerIfMissing method that can take a list of reference tokens
instead of range list.
2009-01-09 19:22:33 +0100 kohei r266110 : entirely removed the range list data member from ScChart2DataSequence class. From now on
we will use a list of tokens to track data source ranges.
Now, if I haven't introduced any bugs in the process, normal charts with no external
references should work as before. But I still need to get the external refs to
work.
2009-01-09 19:11:45 +0100 kohei r266108 : Convert ranges to token list before instantiating ScChart2DataSequence.
2009-01-09 18:27:13 +0100 kohei r266107 : Extracted a common code block into its own method.
2009-01-09 18:18:36 +0100 kohei r266106 : More progress on chart2uno implementation change. Still more to do.
2009-01-09 06:24:36 +0100 kohei r266043 : another place to swap the use of range list with token list.
2009-01-09 06:18:57 +0100 kohei r266042 : Started re-working the chart2uno implementation, to use a list of ScToken
instances instead of ScRangeList, to keep track of data source ranges.
This way, the chart2uno code can tell whether the ranges are external or
internal, and act accordingly.
I'm not finished with it yet. Some things are still not working.
2009-01-08 19:28:51 +0100 kohei r266034 : yet another place to hardcode CONV_OOO for cell range address parsing.
2009-01-08 19:19:21 +0100 kohei r266033 : transferred the BuildArray() method from the koheichart01 cws and its associated changes.
I need to be changing code around this area, and I don't want to redo my changes once
koheichart01 gets integrated for 3.2.
2009-01-08 18:07:08 +0100 kohei r266030 : Have convertRangeFromXML convert external ranges into the appropriate OOO A1 format.
I also added a helper method to append a table name because this is useful in a lot of
other places.
2009-01-07 06:57:52 +0100 kohei r265944 : These places also need a hard-coded CONV_OOO address convention, for Excel chart import and export to function properly.
2009-01-06 16:41:07 +0100 kohei r265932 : removed unused variable.
2009-01-06 16:30:36 +0100 kohei r265931 : removed unused ScDPCacheTable::GroupFilter::setMatchIfFound() method and its
associated member variable (per Caolan's callcatcher output). I added that
method to allow reverse matching in some code but later retracted that logic.
I guess I forgot to remove the method itself afterwards...
2009-01-06 06:39:51 +0100 kohei r265891 : #i97735# Always write cell and cell range addresses using the OOo A1 (CONV_OOO) address convention
when exporting to ODF, regardless of current address convention. Same for reading from ODF documents.
2009-01-06 05:46:40 +0100 kohei r265890 : #i94696# Use the current address convention in the chart wizard dialog.
2009-03-03 15:05:33 +00:00
|
|
|
void breakLink(sal_uInt16 nFileId);
|
2009-09-17 11:09:25 +00:00
|
|
|
void switchSrcFile(sal_uInt16 nFileId, const String& rNewFile, const String& rNewFilter);
|
2008-12-12 09:38:47 +00:00
|
|
|
|
2009-09-17 11:09:25 +00:00
|
|
|
/**
|
|
|
|
* Set a relative file path for the specified file ID. Note that the
|
|
|
|
* caller must ensure that the passed URL is a valid relative URL.
|
|
|
|
*
|
|
|
|
* @param nFileId file ID for an external document
|
|
|
|
* @param rRelUrl relative URL
|
|
|
|
*/
|
2008-12-12 09:38:47 +00:00
|
|
|
void setRelativeFileName(sal_uInt16 nFileId, const String& rRelUrl);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the filter name and options if any for a given source document.
|
|
|
|
* These values get reset when the source document ever gets reloaded.
|
|
|
|
*
|
|
|
|
* @param nFileId
|
|
|
|
* @param rFilterName
|
|
|
|
* @param rOptions
|
|
|
|
*/
|
|
|
|
void setFilterData(sal_uInt16 nFileId, const String& rFilterName, const String& rOptions);
|
|
|
|
|
|
|
|
void clear();
|
|
|
|
|
|
|
|
bool hasExternalData() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Re-generates relative names for all stored source files. This is
|
|
|
|
* necessary when exporting to an ods document, to ensure that all source
|
|
|
|
* files have their respective relative names for xlink:href export.
|
2009-09-17 11:09:25 +00:00
|
|
|
*
|
|
|
|
* @param rBaseFileUrl Absolute URL of the content.xml fragment of the
|
|
|
|
* document being exported.
|
2008-12-12 09:38:47 +00:00
|
|
|
*/
|
2009-09-17 11:09:25 +00:00
|
|
|
void resetSrcFileData(const String& rBaseFileUrl);
|
2008-12-12 09:38:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Update a single referencing cell position.
|
|
|
|
*
|
|
|
|
* @param rOldPos old position
|
|
|
|
* @param rNewPos new position
|
|
|
|
*/
|
|
|
|
void updateRefCell(const ScAddress& rOldPos, const ScAddress& rNewPos, bool bCopy);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Update referencing cells affected by sheet movement.
|
|
|
|
*
|
|
|
|
* @param nOldTab old sheet position
|
|
|
|
* @param nNewTab new sheet position
|
|
|
|
* @param bCopy whether this is a sheet move (false) or sheet copy (true)
|
|
|
|
*/
|
|
|
|
void updateRefMoveTable(SCTAB nOldTab, SCTAB nNewTab, bool bCopy);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Update referencing cells affected by sheet insertion.
|
|
|
|
*
|
|
|
|
* @param nPos sheet insertion position. All sheets to the right
|
|
|
|
* including the one at the insertion poistion shift to the
|
|
|
|
* right by one.
|
|
|
|
*/
|
|
|
|
void updateRefInsertTable(SCTAB nPos);
|
|
|
|
|
|
|
|
void updateRefDeleteTable(SCTAB nPos);
|
|
|
|
|
CWS-TOOLING: integrate CWS koheiformula02
2009-02-19 13:18:02 +0100 iha r268276 : #i99400# Missing value plotting broken
2009-02-11 03:39:50 +0100 kohei r267579 : forgot to add an in-line comment.
2009-02-11 00:26:03 +0100 kohei r267578 : Handle also the single cell references when exporting chart ranges.
2009-02-10 19:50:37 +0100 kohei r267576 : removed a compiler warning.
2009-02-10 06:48:55 +0100 kohei r267536 : got xls export filter to correctly write external references in charts.
However, Excel doesn't entirely like my chart output if the chart contains
external references. The data are all there, but it refuses to draw it.
It works fine with charts with internal references.
2009-02-10 03:33:13 +0100 kohei r267533 : correctly import external references used in chart objects, by using a token
array instead of a range list to represent the data ranges.
2009-02-04 15:22:30 +0100 kohei r267387 : return aRet instead of the sRangeRepresentation, just to be consistent with the
rest of the code there. Both strings are empty so this is just for aesthetic
reasons.
2009-02-04 15:07:49 +0100 kohei r267384 : #i98872# allow export of empty data range, in order to allow saving of documents
with an empty chart.
2009-02-03 19:20:38 +0100 kohei r267340 : #i98801# added a special case handler for parsing range address syntax used by
the older version of OOo. In the old syntax, the sheet name was dropped for
the 2nd reference of a range if the 1st and 2nd references are on the same
sheet. In the new syntax this is not the case.
Also fixed unintential display of the sheet name for the end range address of a
single-sheet range.
2009-01-28 20:46:11 +0100 kohei r267085 : call GetIndex() and GetString() only when the token is external ref, to avoid
triggering assertions in a non-pro build.
2009-01-28 19:30:58 +0100 kohei r267080 : When listeners are being destroyed, don't bother unregistering them with the
external ref manager if the document itself is being destroyed.
2009-01-28 18:56:52 +0100 kohei r267079 : fixed a heap corruption. The Table instance stores instances of FormulaToken
type, not of ScAddress type.
2009-01-26 18:59:14 +0100 kohei r266945 : removed another warning on win32 build.
2009-01-26 18:50:56 +0100 kohei r266943 : removed warnings on windows build.
2009-01-26 17:16:09 +0100 kohei r266939 : added const to a returned reference value that is never used to modify its value.
2009-01-26 16:49:33 +0100 kohei r266937 : Assume that the document instance is not null, or else don't copy any data at all.
2009-01-26 16:19:50 +0100 kohei r266935 : create a clone of ScChart2DataSeqeunce without calling its copy constructor,
since explicit definition of copy constructor would cause a serious compiler
warning that's too ugly to fix.
2009-01-26 05:26:58 +0100 kohei r266894 : removed unused variable and changed function signature.
2009-01-26 05:02:58 +0100 kohei r266893 : removed unused variables to remove compiler warnings.
2009-01-25 18:07:31 +0100 kohei r266890 : fixed indentation inconsistencies in ctor initializers.
2009-01-25 18:01:41 +0100 kohei r266889 : * removed a compiler warning.
* tab -> whitespace conversion in some code.
2009-01-25 03:57:37 +0100 kohei r266888 : removed a mis-leading comment.
2009-01-25 02:37:45 +0100 kohei r266887 : * moved the ref token join method from chart2uno local to ScRefTokenHelper.
* a little code cleanup.
2009-01-24 09:29:26 +0100 kohei r266865 : Don't re-link external files if their link has been broken once.
2009-01-24 09:16:28 +0100 kohei r266864 : a typo in an in-line comment.
2009-01-24 09:14:29 +0100 kohei r266863 : Treat non-cached cells as empty cells only when the source document is not
reachable.
2009-01-24 07:23:44 +0100 kohei r266862 : Don't purge the external ref cache when the link is broken.
2009-01-24 03:25:46 +0100 kohei r266861 : When a cell outside the cached range is queried, we should return an emtpy cell
token instead of NULL, to be consistent with the old behavior.
2009-01-24 02:34:38 +0100 kohei r266860 : Remove corresponding listeners when an external doc link is broken.
2009-01-23 23:18:44 +0100 kohei r266856 : more work on handling external ref update listeners.
2009-01-23 18:10:09 +0100 kohei r266846 : Handle loading of chart objects when their external link is updated.
2009-01-23 06:57:34 +0100 kohei r266765 : more work on ref-tokenizing ScChartListener.
2009-01-22 22:57:52 +0100 kohei r266760 : More work on moving ref token helper code to reftokenhelper & ref-tokenizing
ScChartListener.
2009-01-22 21:52:38 +0100 kohei r266758 : moved the code that converts XML range string into Calc's internal range string
from chart2uno to rangeutl & compile the range string to generate ref tokens
upon ods import.
2009-01-22 18:56:14 +0100 kohei r266749 : fixed a build breakage.
2009-01-22 18:53:43 +0100 kohei r266748 : Initial work toward using ref tokens in ScChartListener class. I'll start
moving some of local ref token handling functions from chart2uno.cxx to
ScRefTokenHelper class to make them available in other places.
2009-01-22 17:38:20 +0100 kohei r266746 : Add a big, fat warning against mixed use of ScSharedTokenRef and ScTokenRef.
2009-01-22 08:33:28 +0100 kohei r266711 : #i98338# fixed slicing of external ref token classes by adding their own Clone() method.
2009-01-22 05:02:25 +0100 kohei r266710 : Applied the same fix that npower/oj applied to fix a crasher (from #i98317#).
2009-01-21 23:02:42 +0100 kohei r266705 : fix build breakages as a result of rebase to m39. Mostly due to the new formula
module and its associated changes esp. wrt token classes.
2009-01-21 19:14:40 +0100 kohei r266699 : CWS-TOOLING: rebase CWS koheiformula02 to trunk@266428 (milestone: DEV300:m39)
2009-01-21 17:55:10 +0100 kohei r266698 : moved the shared ScToken typedef to token.hxx, and use it instead of
ScChart2TokenRef, since I need this typedef in the odf importer. In the future
this can also replace the similar typedef in ScExternalRefManager.
2009-01-21 06:54:04 +0100 kohei r266627 : Added external ref listener framework so that objects listening to external ref changes can get notified
when the link is updated.
The work is not done yet.
2009-01-20 23:07:38 +0100 kohei r266626 : When exporting a range to ODF, we don't want to prepend a sheet name with '$' even for an external sheet.
2009-01-20 23:06:40 +0100 kohei r266625 : 1) code cleanup to remove compiler warnings.
2) fixed convertRangesToXML to convert ref tokens into correct ODF range format.
2009-01-20 19:40:45 +0100 kohei r266620 : extracted the code that fills cache from external ref into its own method.
2009-01-20 18:26:47 +0100 kohei r266616 : added javadoc parameter descriptions.
2009-01-20 18:01:17 +0100 kohei r266615 : disable ScChart2EmptyDataSequence entirely since that class doesn't appear to be used any more.
2009-01-20 17:42:59 +0100 kohei r266608 : fixed a crash when the data source range is empty at time of chart creation.
2009-01-20 17:13:34 +0100 kohei r266601 : a simple locale variable rename.
2009-01-20 16:57:04 +0100 kohei r266598 : #i97563# applied my patch, to fix incorrect export attempts of color values as a number formatter key, and change the condition of
one assertion to prevent it from being triggered incorrectly in non-pro build.
2009-01-17 07:41:01 +0100 kohei r266458 : a little code cleanup.
2009-01-17 07:30:48 +0100 kohei r266457 : removed a method that it no longer used.
2009-01-17 07:29:15 +0100 kohei r266456 : fixed a crash when no external data is available for a given range.
2009-01-17 07:14:50 +0100 kohei r266455 : Even more work on range list to ref token migration. The chart now retains
external data after editing of chart.
2009-01-16 18:54:35 +0100 kohei r266453 : More work on replacing flat ranges and addresses with ref tokens.
2009-01-16 17:07:51 +0100 kohei r266438 : extracted a large code block into its own local method.
2009-01-16 15:22:57 +0100 kohei r266423 : Initial work toward replacing the chart positioner and its related code in
order to use reference tokens instead of range list. The basis of that code
is the old ScChartPositioner and ScChartPositionMap duplicated to avoid breaking
any existing legacy code that might still use it. It appears to be used by the
StarOffice 1.0 filter only.
Still not working with the external references.
2009-01-15 05:33:39 +0100 kohei r266334 : renamed chackRanges() to overlaps() to make it more descriptive of what it does.
2009-01-13 23:25:50 +0100 kohei r266260 : Moved the token-to-string conversion code up so that other parts of the code can use it.
2009-01-13 22:14:35 +0100 kohei r266256 : generateLabels() now uses reference token list.
2009-01-13 18:42:23 +0100 kohei r266246 : Finally, build data array for external data sources. This will now allow the
data to be displayed in the diagram.
2009-01-13 16:34:03 +0100 kohei r266235 : We now need to verify range representation by compiling it instead of parsing it.
2009-01-13 15:41:48 +0100 kohei r266230 : cosmetic function name change & added javadoc comment for it.
2009-01-13 06:32:06 +0100 kohei r266194 : Fixed a typo.
2009-01-13 06:04:23 +0100 kohei r266193 : Generate data source range string by compiling reference tokens. This way
we can also display external reference addresses correctly.
2009-01-13 05:55:44 +0100 kohei r266192 : moved compileRangeRepresentation from being a class member method to a local function.
2009-01-13 05:41:53 +0100 kohei r266191 : nuked one unused method & tab -> whitespace conversion.
2009-01-13 05:35:10 +0100 kohei r266190 : A little code cleanup & consolidated all range-joining code
into a single function object class.
2009-01-13 03:58:51 +0100 kohei r266189 : removed the unused method.
2009-01-13 03:53:01 +0100 kohei r266188 : This time I (hopefully) fixed the range consolidation problem for real. I forgot to join
the missing upper-left corner cell with the existing range list. Also, I needed to join
ranges recursively instead of just doing it once.
2009-01-13 02:15:48 +0100 kohei r266187 : fixed the "add corner if missing" thing.
2009-01-12 23:36:19 +0100 kohei r266185 : More work on range list -> ref tokens.
2009-01-12 23:12:28 +0100 kohei r266184 : More work on switching to reference tokens from range list. Still in progress.
2009-01-10 08:15:39 +0100 kohei r266125 : More code change for switching to reference tokens, especially in ScChart2DataProvider.
Created another addUpperLeftCornerIfMissing method that can take a list of reference tokens
instead of range list.
2009-01-09 19:22:33 +0100 kohei r266110 : entirely removed the range list data member from ScChart2DataSequence class. From now on
we will use a list of tokens to track data source ranges.
Now, if I haven't introduced any bugs in the process, normal charts with no external
references should work as before. But I still need to get the external refs to
work.
2009-01-09 19:11:45 +0100 kohei r266108 : Convert ranges to token list before instantiating ScChart2DataSequence.
2009-01-09 18:27:13 +0100 kohei r266107 : Extracted a common code block into its own method.
2009-01-09 18:18:36 +0100 kohei r266106 : More progress on chart2uno implementation change. Still more to do.
2009-01-09 06:24:36 +0100 kohei r266043 : another place to swap the use of range list with token list.
2009-01-09 06:18:57 +0100 kohei r266042 : Started re-working the chart2uno implementation, to use a list of ScToken
instances instead of ScRangeList, to keep track of data source ranges.
This way, the chart2uno code can tell whether the ranges are external or
internal, and act accordingly.
I'm not finished with it yet. Some things are still not working.
2009-01-08 19:28:51 +0100 kohei r266034 : yet another place to hardcode CONV_OOO for cell range address parsing.
2009-01-08 19:19:21 +0100 kohei r266033 : transferred the BuildArray() method from the koheichart01 cws and its associated changes.
I need to be changing code around this area, and I don't want to redo my changes once
koheichart01 gets integrated for 3.2.
2009-01-08 18:07:08 +0100 kohei r266030 : Have convertRangeFromXML convert external ranges into the appropriate OOO A1 format.
I also added a helper method to append a table name because this is useful in a lot of
other places.
2009-01-07 06:57:52 +0100 kohei r265944 : These places also need a hard-coded CONV_OOO address convention, for Excel chart import and export to function properly.
2009-01-06 16:41:07 +0100 kohei r265932 : removed unused variable.
2009-01-06 16:30:36 +0100 kohei r265931 : removed unused ScDPCacheTable::GroupFilter::setMatchIfFound() method and its
associated member variable (per Caolan's callcatcher output). I added that
method to allow reverse matching in some code but later retracted that logic.
I guess I forgot to remove the method itself afterwards...
2009-01-06 06:39:51 +0100 kohei r265891 : #i97735# Always write cell and cell range addresses using the OOo A1 (CONV_OOO) address convention
when exporting to ODF, regardless of current address convention. Same for reading from ODF documents.
2009-01-06 05:46:40 +0100 kohei r265890 : #i94696# Use the current address convention in the chart wizard dialog.
2009-03-03 15:05:33 +00:00
|
|
|
/**
|
|
|
|
* Register a new link listener to a specified external document. Note
|
|
|
|
* that the caller is responsible for managing the life cycle of the
|
|
|
|
* listener object.
|
|
|
|
*/
|
|
|
|
void addLinkListener(sal_uInt16 nFileId, LinkListener* pListener);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove an existing link listener. Note that removing a listener
|
|
|
|
* pointer here does not delete the listener object instance.
|
|
|
|
*/
|
|
|
|
void removeLinkListener(sal_uInt16 nFileId, LinkListener* pListener);
|
|
|
|
|
|
|
|
void removeLinkListener(LinkListener* pListener);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Notify all listeners that are listening to a specified external
|
|
|
|
* document.
|
|
|
|
*
|
|
|
|
* @param nFileId file ID for an external document.
|
|
|
|
*/
|
|
|
|
void notifyAllLinkListeners(sal_uInt16 nFileId, LinkUpdateType eType);
|
|
|
|
|
2008-12-12 09:38:47 +00:00
|
|
|
private:
|
|
|
|
ScExternalRefManager();
|
|
|
|
ScExternalRefManager(const ScExternalRefManager&);
|
|
|
|
|
|
|
|
void refreshAllRefCells(sal_uInt16 nFileId);
|
|
|
|
|
|
|
|
void insertRefCell(sal_uInt16 nFileId, const ScAddress& rCell);
|
|
|
|
|
|
|
|
ScDocument* getSrcDocument(sal_uInt16 nFileId);
|
|
|
|
SfxObjectShellRef loadSrcDocument(sal_uInt16 nFileId, String& rFilter);
|
|
|
|
bool isFileLoadable(const String& rFile) const;
|
|
|
|
|
|
|
|
void maybeLinkExternalFile(sal_uInt16 nFileId);
|
|
|
|
|
2009-09-17 11:09:25 +00:00
|
|
|
/**
|
|
|
|
* Try to create a "real" file name from the relative path. The original
|
|
|
|
* file name may not point to the real document when the referencing and
|
|
|
|
* referenced documents have been moved.
|
|
|
|
*
|
|
|
|
* For the real file name to be created, the relative name should not be
|
|
|
|
* empty before calling this method, or the real file name will not be
|
|
|
|
* created.
|
|
|
|
*
|
|
|
|
* @param nFileId file ID for an external document
|
|
|
|
*/
|
|
|
|
void maybeCreateRealFileName(sal_uInt16 nFileId);
|
|
|
|
|
2008-12-12 09:38:47 +00:00
|
|
|
bool compileTokensByCell(const ScAddress& rCell);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Purge those source document instances that have not been accessed for
|
|
|
|
* the specified duration.
|
|
|
|
*
|
|
|
|
* @param nTimeOut time out value in 100th of a second
|
|
|
|
*/
|
|
|
|
void purgeStaleSrcDocument(sal_Int32 nTimeOut);
|
|
|
|
|
|
|
|
sal_uInt32 getMappedNumberFormat(sal_uInt16 nFileId, sal_uInt32 nNumFmt, ScDocument* pSrcDoc);
|
|
|
|
|
|
|
|
private:
|
|
|
|
/** cache of referenced ranges and names from source documents. */
|
|
|
|
ScExternalRefCache maRefCache;
|
|
|
|
|
|
|
|
ScDocument* mpDoc;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Source document cache. This stores the original source document shell
|
|
|
|
* instances. They get purged after a certain period of time.
|
|
|
|
*/
|
|
|
|
DocShellMap maDocShells;
|
|
|
|
|
|
|
|
/** list of source documents that are managed by the link manager. */
|
CWS-TOOLING: integrate CWS koheiformula02
2009-02-19 13:18:02 +0100 iha r268276 : #i99400# Missing value plotting broken
2009-02-11 03:39:50 +0100 kohei r267579 : forgot to add an in-line comment.
2009-02-11 00:26:03 +0100 kohei r267578 : Handle also the single cell references when exporting chart ranges.
2009-02-10 19:50:37 +0100 kohei r267576 : removed a compiler warning.
2009-02-10 06:48:55 +0100 kohei r267536 : got xls export filter to correctly write external references in charts.
However, Excel doesn't entirely like my chart output if the chart contains
external references. The data are all there, but it refuses to draw it.
It works fine with charts with internal references.
2009-02-10 03:33:13 +0100 kohei r267533 : correctly import external references used in chart objects, by using a token
array instead of a range list to represent the data ranges.
2009-02-04 15:22:30 +0100 kohei r267387 : return aRet instead of the sRangeRepresentation, just to be consistent with the
rest of the code there. Both strings are empty so this is just for aesthetic
reasons.
2009-02-04 15:07:49 +0100 kohei r267384 : #i98872# allow export of empty data range, in order to allow saving of documents
with an empty chart.
2009-02-03 19:20:38 +0100 kohei r267340 : #i98801# added a special case handler for parsing range address syntax used by
the older version of OOo. In the old syntax, the sheet name was dropped for
the 2nd reference of a range if the 1st and 2nd references are on the same
sheet. In the new syntax this is not the case.
Also fixed unintential display of the sheet name for the end range address of a
single-sheet range.
2009-01-28 20:46:11 +0100 kohei r267085 : call GetIndex() and GetString() only when the token is external ref, to avoid
triggering assertions in a non-pro build.
2009-01-28 19:30:58 +0100 kohei r267080 : When listeners are being destroyed, don't bother unregistering them with the
external ref manager if the document itself is being destroyed.
2009-01-28 18:56:52 +0100 kohei r267079 : fixed a heap corruption. The Table instance stores instances of FormulaToken
type, not of ScAddress type.
2009-01-26 18:59:14 +0100 kohei r266945 : removed another warning on win32 build.
2009-01-26 18:50:56 +0100 kohei r266943 : removed warnings on windows build.
2009-01-26 17:16:09 +0100 kohei r266939 : added const to a returned reference value that is never used to modify its value.
2009-01-26 16:49:33 +0100 kohei r266937 : Assume that the document instance is not null, or else don't copy any data at all.
2009-01-26 16:19:50 +0100 kohei r266935 : create a clone of ScChart2DataSeqeunce without calling its copy constructor,
since explicit definition of copy constructor would cause a serious compiler
warning that's too ugly to fix.
2009-01-26 05:26:58 +0100 kohei r266894 : removed unused variable and changed function signature.
2009-01-26 05:02:58 +0100 kohei r266893 : removed unused variables to remove compiler warnings.
2009-01-25 18:07:31 +0100 kohei r266890 : fixed indentation inconsistencies in ctor initializers.
2009-01-25 18:01:41 +0100 kohei r266889 : * removed a compiler warning.
* tab -> whitespace conversion in some code.
2009-01-25 03:57:37 +0100 kohei r266888 : removed a mis-leading comment.
2009-01-25 02:37:45 +0100 kohei r266887 : * moved the ref token join method from chart2uno local to ScRefTokenHelper.
* a little code cleanup.
2009-01-24 09:29:26 +0100 kohei r266865 : Don't re-link external files if their link has been broken once.
2009-01-24 09:16:28 +0100 kohei r266864 : a typo in an in-line comment.
2009-01-24 09:14:29 +0100 kohei r266863 : Treat non-cached cells as empty cells only when the source document is not
reachable.
2009-01-24 07:23:44 +0100 kohei r266862 : Don't purge the external ref cache when the link is broken.
2009-01-24 03:25:46 +0100 kohei r266861 : When a cell outside the cached range is queried, we should return an emtpy cell
token instead of NULL, to be consistent with the old behavior.
2009-01-24 02:34:38 +0100 kohei r266860 : Remove corresponding listeners when an external doc link is broken.
2009-01-23 23:18:44 +0100 kohei r266856 : more work on handling external ref update listeners.
2009-01-23 18:10:09 +0100 kohei r266846 : Handle loading of chart objects when their external link is updated.
2009-01-23 06:57:34 +0100 kohei r266765 : more work on ref-tokenizing ScChartListener.
2009-01-22 22:57:52 +0100 kohei r266760 : More work on moving ref token helper code to reftokenhelper & ref-tokenizing
ScChartListener.
2009-01-22 21:52:38 +0100 kohei r266758 : moved the code that converts XML range string into Calc's internal range string
from chart2uno to rangeutl & compile the range string to generate ref tokens
upon ods import.
2009-01-22 18:56:14 +0100 kohei r266749 : fixed a build breakage.
2009-01-22 18:53:43 +0100 kohei r266748 : Initial work toward using ref tokens in ScChartListener class. I'll start
moving some of local ref token handling functions from chart2uno.cxx to
ScRefTokenHelper class to make them available in other places.
2009-01-22 17:38:20 +0100 kohei r266746 : Add a big, fat warning against mixed use of ScSharedTokenRef and ScTokenRef.
2009-01-22 08:33:28 +0100 kohei r266711 : #i98338# fixed slicing of external ref token classes by adding their own Clone() method.
2009-01-22 05:02:25 +0100 kohei r266710 : Applied the same fix that npower/oj applied to fix a crasher (from #i98317#).
2009-01-21 23:02:42 +0100 kohei r266705 : fix build breakages as a result of rebase to m39. Mostly due to the new formula
module and its associated changes esp. wrt token classes.
2009-01-21 19:14:40 +0100 kohei r266699 : CWS-TOOLING: rebase CWS koheiformula02 to trunk@266428 (milestone: DEV300:m39)
2009-01-21 17:55:10 +0100 kohei r266698 : moved the shared ScToken typedef to token.hxx, and use it instead of
ScChart2TokenRef, since I need this typedef in the odf importer. In the future
this can also replace the similar typedef in ScExternalRefManager.
2009-01-21 06:54:04 +0100 kohei r266627 : Added external ref listener framework so that objects listening to external ref changes can get notified
when the link is updated.
The work is not done yet.
2009-01-20 23:07:38 +0100 kohei r266626 : When exporting a range to ODF, we don't want to prepend a sheet name with '$' even for an external sheet.
2009-01-20 23:06:40 +0100 kohei r266625 : 1) code cleanup to remove compiler warnings.
2) fixed convertRangesToXML to convert ref tokens into correct ODF range format.
2009-01-20 19:40:45 +0100 kohei r266620 : extracted the code that fills cache from external ref into its own method.
2009-01-20 18:26:47 +0100 kohei r266616 : added javadoc parameter descriptions.
2009-01-20 18:01:17 +0100 kohei r266615 : disable ScChart2EmptyDataSequence entirely since that class doesn't appear to be used any more.
2009-01-20 17:42:59 +0100 kohei r266608 : fixed a crash when the data source range is empty at time of chart creation.
2009-01-20 17:13:34 +0100 kohei r266601 : a simple locale variable rename.
2009-01-20 16:57:04 +0100 kohei r266598 : #i97563# applied my patch, to fix incorrect export attempts of color values as a number formatter key, and change the condition of
one assertion to prevent it from being triggered incorrectly in non-pro build.
2009-01-17 07:41:01 +0100 kohei r266458 : a little code cleanup.
2009-01-17 07:30:48 +0100 kohei r266457 : removed a method that it no longer used.
2009-01-17 07:29:15 +0100 kohei r266456 : fixed a crash when no external data is available for a given range.
2009-01-17 07:14:50 +0100 kohei r266455 : Even more work on range list to ref token migration. The chart now retains
external data after editing of chart.
2009-01-16 18:54:35 +0100 kohei r266453 : More work on replacing flat ranges and addresses with ref tokens.
2009-01-16 17:07:51 +0100 kohei r266438 : extracted a large code block into its own local method.
2009-01-16 15:22:57 +0100 kohei r266423 : Initial work toward replacing the chart positioner and its related code in
order to use reference tokens instead of range list. The basis of that code
is the old ScChartPositioner and ScChartPositionMap duplicated to avoid breaking
any existing legacy code that might still use it. It appears to be used by the
StarOffice 1.0 filter only.
Still not working with the external references.
2009-01-15 05:33:39 +0100 kohei r266334 : renamed chackRanges() to overlaps() to make it more descriptive of what it does.
2009-01-13 23:25:50 +0100 kohei r266260 : Moved the token-to-string conversion code up so that other parts of the code can use it.
2009-01-13 22:14:35 +0100 kohei r266256 : generateLabels() now uses reference token list.
2009-01-13 18:42:23 +0100 kohei r266246 : Finally, build data array for external data sources. This will now allow the
data to be displayed in the diagram.
2009-01-13 16:34:03 +0100 kohei r266235 : We now need to verify range representation by compiling it instead of parsing it.
2009-01-13 15:41:48 +0100 kohei r266230 : cosmetic function name change & added javadoc comment for it.
2009-01-13 06:32:06 +0100 kohei r266194 : Fixed a typo.
2009-01-13 06:04:23 +0100 kohei r266193 : Generate data source range string by compiling reference tokens. This way
we can also display external reference addresses correctly.
2009-01-13 05:55:44 +0100 kohei r266192 : moved compileRangeRepresentation from being a class member method to a local function.
2009-01-13 05:41:53 +0100 kohei r266191 : nuked one unused method & tab -> whitespace conversion.
2009-01-13 05:35:10 +0100 kohei r266190 : A little code cleanup & consolidated all range-joining code
into a single function object class.
2009-01-13 03:58:51 +0100 kohei r266189 : removed the unused method.
2009-01-13 03:53:01 +0100 kohei r266188 : This time I (hopefully) fixed the range consolidation problem for real. I forgot to join
the missing upper-left corner cell with the existing range list. Also, I needed to join
ranges recursively instead of just doing it once.
2009-01-13 02:15:48 +0100 kohei r266187 : fixed the "add corner if missing" thing.
2009-01-12 23:36:19 +0100 kohei r266185 : More work on range list -> ref tokens.
2009-01-12 23:12:28 +0100 kohei r266184 : More work on switching to reference tokens from range list. Still in progress.
2009-01-10 08:15:39 +0100 kohei r266125 : More code change for switching to reference tokens, especially in ScChart2DataProvider.
Created another addUpperLeftCornerIfMissing method that can take a list of reference tokens
instead of range list.
2009-01-09 19:22:33 +0100 kohei r266110 : entirely removed the range list data member from ScChart2DataSequence class. From now on
we will use a list of tokens to track data source ranges.
Now, if I haven't introduced any bugs in the process, normal charts with no external
references should work as before. But I still need to get the external refs to
work.
2009-01-09 19:11:45 +0100 kohei r266108 : Convert ranges to token list before instantiating ScChart2DataSequence.
2009-01-09 18:27:13 +0100 kohei r266107 : Extracted a common code block into its own method.
2009-01-09 18:18:36 +0100 kohei r266106 : More progress on chart2uno implementation change. Still more to do.
2009-01-09 06:24:36 +0100 kohei r266043 : another place to swap the use of range list with token list.
2009-01-09 06:18:57 +0100 kohei r266042 : Started re-working the chart2uno implementation, to use a list of ScToken
instances instead of ScRangeList, to keep track of data source ranges.
This way, the chart2uno code can tell whether the ranges are external or
internal, and act accordingly.
I'm not finished with it yet. Some things are still not working.
2009-01-08 19:28:51 +0100 kohei r266034 : yet another place to hardcode CONV_OOO for cell range address parsing.
2009-01-08 19:19:21 +0100 kohei r266033 : transferred the BuildArray() method from the koheichart01 cws and its associated changes.
I need to be changing code around this area, and I don't want to redo my changes once
koheichart01 gets integrated for 3.2.
2009-01-08 18:07:08 +0100 kohei r266030 : Have convertRangeFromXML convert external ranges into the appropriate OOO A1 format.
I also added a helper method to append a table name because this is useful in a lot of
other places.
2009-01-07 06:57:52 +0100 kohei r265944 : These places also need a hard-coded CONV_OOO address convention, for Excel chart import and export to function properly.
2009-01-06 16:41:07 +0100 kohei r265932 : removed unused variable.
2009-01-06 16:30:36 +0100 kohei r265931 : removed unused ScDPCacheTable::GroupFilter::setMatchIfFound() method and its
associated member variable (per Caolan's callcatcher output). I added that
method to allow reverse matching in some code but later retracted that logic.
I guess I forgot to remove the method itself afterwards...
2009-01-06 06:39:51 +0100 kohei r265891 : #i97735# Always write cell and cell range addresses using the OOo A1 (CONV_OOO) address convention
when exporting to ODF, regardless of current address convention. Same for reading from ODF documents.
2009-01-06 05:46:40 +0100 kohei r265890 : #i94696# Use the current address convention in the chart wizard dialog.
2009-03-03 15:05:33 +00:00
|
|
|
LinkedDocMap maLinkedDocs;
|
2008-12-12 09:38:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* List of referencing cells that may contain external names. There is
|
|
|
|
* one list per source document.
|
|
|
|
*/
|
|
|
|
RefCellMap maRefCells;
|
|
|
|
|
CWS-TOOLING: integrate CWS koheiformula02
2009-02-19 13:18:02 +0100 iha r268276 : #i99400# Missing value plotting broken
2009-02-11 03:39:50 +0100 kohei r267579 : forgot to add an in-line comment.
2009-02-11 00:26:03 +0100 kohei r267578 : Handle also the single cell references when exporting chart ranges.
2009-02-10 19:50:37 +0100 kohei r267576 : removed a compiler warning.
2009-02-10 06:48:55 +0100 kohei r267536 : got xls export filter to correctly write external references in charts.
However, Excel doesn't entirely like my chart output if the chart contains
external references. The data are all there, but it refuses to draw it.
It works fine with charts with internal references.
2009-02-10 03:33:13 +0100 kohei r267533 : correctly import external references used in chart objects, by using a token
array instead of a range list to represent the data ranges.
2009-02-04 15:22:30 +0100 kohei r267387 : return aRet instead of the sRangeRepresentation, just to be consistent with the
rest of the code there. Both strings are empty so this is just for aesthetic
reasons.
2009-02-04 15:07:49 +0100 kohei r267384 : #i98872# allow export of empty data range, in order to allow saving of documents
with an empty chart.
2009-02-03 19:20:38 +0100 kohei r267340 : #i98801# added a special case handler for parsing range address syntax used by
the older version of OOo. In the old syntax, the sheet name was dropped for
the 2nd reference of a range if the 1st and 2nd references are on the same
sheet. In the new syntax this is not the case.
Also fixed unintential display of the sheet name for the end range address of a
single-sheet range.
2009-01-28 20:46:11 +0100 kohei r267085 : call GetIndex() and GetString() only when the token is external ref, to avoid
triggering assertions in a non-pro build.
2009-01-28 19:30:58 +0100 kohei r267080 : When listeners are being destroyed, don't bother unregistering them with the
external ref manager if the document itself is being destroyed.
2009-01-28 18:56:52 +0100 kohei r267079 : fixed a heap corruption. The Table instance stores instances of FormulaToken
type, not of ScAddress type.
2009-01-26 18:59:14 +0100 kohei r266945 : removed another warning on win32 build.
2009-01-26 18:50:56 +0100 kohei r266943 : removed warnings on windows build.
2009-01-26 17:16:09 +0100 kohei r266939 : added const to a returned reference value that is never used to modify its value.
2009-01-26 16:49:33 +0100 kohei r266937 : Assume that the document instance is not null, or else don't copy any data at all.
2009-01-26 16:19:50 +0100 kohei r266935 : create a clone of ScChart2DataSeqeunce without calling its copy constructor,
since explicit definition of copy constructor would cause a serious compiler
warning that's too ugly to fix.
2009-01-26 05:26:58 +0100 kohei r266894 : removed unused variable and changed function signature.
2009-01-26 05:02:58 +0100 kohei r266893 : removed unused variables to remove compiler warnings.
2009-01-25 18:07:31 +0100 kohei r266890 : fixed indentation inconsistencies in ctor initializers.
2009-01-25 18:01:41 +0100 kohei r266889 : * removed a compiler warning.
* tab -> whitespace conversion in some code.
2009-01-25 03:57:37 +0100 kohei r266888 : removed a mis-leading comment.
2009-01-25 02:37:45 +0100 kohei r266887 : * moved the ref token join method from chart2uno local to ScRefTokenHelper.
* a little code cleanup.
2009-01-24 09:29:26 +0100 kohei r266865 : Don't re-link external files if their link has been broken once.
2009-01-24 09:16:28 +0100 kohei r266864 : a typo in an in-line comment.
2009-01-24 09:14:29 +0100 kohei r266863 : Treat non-cached cells as empty cells only when the source document is not
reachable.
2009-01-24 07:23:44 +0100 kohei r266862 : Don't purge the external ref cache when the link is broken.
2009-01-24 03:25:46 +0100 kohei r266861 : When a cell outside the cached range is queried, we should return an emtpy cell
token instead of NULL, to be consistent with the old behavior.
2009-01-24 02:34:38 +0100 kohei r266860 : Remove corresponding listeners when an external doc link is broken.
2009-01-23 23:18:44 +0100 kohei r266856 : more work on handling external ref update listeners.
2009-01-23 18:10:09 +0100 kohei r266846 : Handle loading of chart objects when their external link is updated.
2009-01-23 06:57:34 +0100 kohei r266765 : more work on ref-tokenizing ScChartListener.
2009-01-22 22:57:52 +0100 kohei r266760 : More work on moving ref token helper code to reftokenhelper & ref-tokenizing
ScChartListener.
2009-01-22 21:52:38 +0100 kohei r266758 : moved the code that converts XML range string into Calc's internal range string
from chart2uno to rangeutl & compile the range string to generate ref tokens
upon ods import.
2009-01-22 18:56:14 +0100 kohei r266749 : fixed a build breakage.
2009-01-22 18:53:43 +0100 kohei r266748 : Initial work toward using ref tokens in ScChartListener class. I'll start
moving some of local ref token handling functions from chart2uno.cxx to
ScRefTokenHelper class to make them available in other places.
2009-01-22 17:38:20 +0100 kohei r266746 : Add a big, fat warning against mixed use of ScSharedTokenRef and ScTokenRef.
2009-01-22 08:33:28 +0100 kohei r266711 : #i98338# fixed slicing of external ref token classes by adding their own Clone() method.
2009-01-22 05:02:25 +0100 kohei r266710 : Applied the same fix that npower/oj applied to fix a crasher (from #i98317#).
2009-01-21 23:02:42 +0100 kohei r266705 : fix build breakages as a result of rebase to m39. Mostly due to the new formula
module and its associated changes esp. wrt token classes.
2009-01-21 19:14:40 +0100 kohei r266699 : CWS-TOOLING: rebase CWS koheiformula02 to trunk@266428 (milestone: DEV300:m39)
2009-01-21 17:55:10 +0100 kohei r266698 : moved the shared ScToken typedef to token.hxx, and use it instead of
ScChart2TokenRef, since I need this typedef in the odf importer. In the future
this can also replace the similar typedef in ScExternalRefManager.
2009-01-21 06:54:04 +0100 kohei r266627 : Added external ref listener framework so that objects listening to external ref changes can get notified
when the link is updated.
The work is not done yet.
2009-01-20 23:07:38 +0100 kohei r266626 : When exporting a range to ODF, we don't want to prepend a sheet name with '$' even for an external sheet.
2009-01-20 23:06:40 +0100 kohei r266625 : 1) code cleanup to remove compiler warnings.
2) fixed convertRangesToXML to convert ref tokens into correct ODF range format.
2009-01-20 19:40:45 +0100 kohei r266620 : extracted the code that fills cache from external ref into its own method.
2009-01-20 18:26:47 +0100 kohei r266616 : added javadoc parameter descriptions.
2009-01-20 18:01:17 +0100 kohei r266615 : disable ScChart2EmptyDataSequence entirely since that class doesn't appear to be used any more.
2009-01-20 17:42:59 +0100 kohei r266608 : fixed a crash when the data source range is empty at time of chart creation.
2009-01-20 17:13:34 +0100 kohei r266601 : a simple locale variable rename.
2009-01-20 16:57:04 +0100 kohei r266598 : #i97563# applied my patch, to fix incorrect export attempts of color values as a number formatter key, and change the condition of
one assertion to prevent it from being triggered incorrectly in non-pro build.
2009-01-17 07:41:01 +0100 kohei r266458 : a little code cleanup.
2009-01-17 07:30:48 +0100 kohei r266457 : removed a method that it no longer used.
2009-01-17 07:29:15 +0100 kohei r266456 : fixed a crash when no external data is available for a given range.
2009-01-17 07:14:50 +0100 kohei r266455 : Even more work on range list to ref token migration. The chart now retains
external data after editing of chart.
2009-01-16 18:54:35 +0100 kohei r266453 : More work on replacing flat ranges and addresses with ref tokens.
2009-01-16 17:07:51 +0100 kohei r266438 : extracted a large code block into its own local method.
2009-01-16 15:22:57 +0100 kohei r266423 : Initial work toward replacing the chart positioner and its related code in
order to use reference tokens instead of range list. The basis of that code
is the old ScChartPositioner and ScChartPositionMap duplicated to avoid breaking
any existing legacy code that might still use it. It appears to be used by the
StarOffice 1.0 filter only.
Still not working with the external references.
2009-01-15 05:33:39 +0100 kohei r266334 : renamed chackRanges() to overlaps() to make it more descriptive of what it does.
2009-01-13 23:25:50 +0100 kohei r266260 : Moved the token-to-string conversion code up so that other parts of the code can use it.
2009-01-13 22:14:35 +0100 kohei r266256 : generateLabels() now uses reference token list.
2009-01-13 18:42:23 +0100 kohei r266246 : Finally, build data array for external data sources. This will now allow the
data to be displayed in the diagram.
2009-01-13 16:34:03 +0100 kohei r266235 : We now need to verify range representation by compiling it instead of parsing it.
2009-01-13 15:41:48 +0100 kohei r266230 : cosmetic function name change & added javadoc comment for it.
2009-01-13 06:32:06 +0100 kohei r266194 : Fixed a typo.
2009-01-13 06:04:23 +0100 kohei r266193 : Generate data source range string by compiling reference tokens. This way
we can also display external reference addresses correctly.
2009-01-13 05:55:44 +0100 kohei r266192 : moved compileRangeRepresentation from being a class member method to a local function.
2009-01-13 05:41:53 +0100 kohei r266191 : nuked one unused method & tab -> whitespace conversion.
2009-01-13 05:35:10 +0100 kohei r266190 : A little code cleanup & consolidated all range-joining code
into a single function object class.
2009-01-13 03:58:51 +0100 kohei r266189 : removed the unused method.
2009-01-13 03:53:01 +0100 kohei r266188 : This time I (hopefully) fixed the range consolidation problem for real. I forgot to join
the missing upper-left corner cell with the existing range list. Also, I needed to join
ranges recursively instead of just doing it once.
2009-01-13 02:15:48 +0100 kohei r266187 : fixed the "add corner if missing" thing.
2009-01-12 23:36:19 +0100 kohei r266185 : More work on range list -> ref tokens.
2009-01-12 23:12:28 +0100 kohei r266184 : More work on switching to reference tokens from range list. Still in progress.
2009-01-10 08:15:39 +0100 kohei r266125 : More code change for switching to reference tokens, especially in ScChart2DataProvider.
Created another addUpperLeftCornerIfMissing method that can take a list of reference tokens
instead of range list.
2009-01-09 19:22:33 +0100 kohei r266110 : entirely removed the range list data member from ScChart2DataSequence class. From now on
we will use a list of tokens to track data source ranges.
Now, if I haven't introduced any bugs in the process, normal charts with no external
references should work as before. But I still need to get the external refs to
work.
2009-01-09 19:11:45 +0100 kohei r266108 : Convert ranges to token list before instantiating ScChart2DataSequence.
2009-01-09 18:27:13 +0100 kohei r266107 : Extracted a common code block into its own method.
2009-01-09 18:18:36 +0100 kohei r266106 : More progress on chart2uno implementation change. Still more to do.
2009-01-09 06:24:36 +0100 kohei r266043 : another place to swap the use of range list with token list.
2009-01-09 06:18:57 +0100 kohei r266042 : Started re-working the chart2uno implementation, to use a list of ScToken
instances instead of ScRangeList, to keep track of data source ranges.
This way, the chart2uno code can tell whether the ranges are external or
internal, and act accordingly.
I'm not finished with it yet. Some things are still not working.
2009-01-08 19:28:51 +0100 kohei r266034 : yet another place to hardcode CONV_OOO for cell range address parsing.
2009-01-08 19:19:21 +0100 kohei r266033 : transferred the BuildArray() method from the koheichart01 cws and its associated changes.
I need to be changing code around this area, and I don't want to redo my changes once
koheichart01 gets integrated for 3.2.
2009-01-08 18:07:08 +0100 kohei r266030 : Have convertRangeFromXML convert external ranges into the appropriate OOO A1 format.
I also added a helper method to append a table name because this is useful in a lot of
other places.
2009-01-07 06:57:52 +0100 kohei r265944 : These places also need a hard-coded CONV_OOO address convention, for Excel chart import and export to function properly.
2009-01-06 16:41:07 +0100 kohei r265932 : removed unused variable.
2009-01-06 16:30:36 +0100 kohei r265931 : removed unused ScDPCacheTable::GroupFilter::setMatchIfFound() method and its
associated member variable (per Caolan's callcatcher output). I added that
method to allow reverse matching in some code but later retracted that logic.
I guess I forgot to remove the method itself afterwards...
2009-01-06 06:39:51 +0100 kohei r265891 : #i97735# Always write cell and cell range addresses using the OOo A1 (CONV_OOO) address convention
when exporting to ODF, regardless of current address convention. Same for reading from ODF documents.
2009-01-06 05:46:40 +0100 kohei r265890 : #i94696# Use the current address convention in the chart wizard dialog.
2009-03-03 15:05:33 +00:00
|
|
|
LinkListenerMap maLinkListeners;
|
|
|
|
|
2008-12-12 09:38:47 +00:00
|
|
|
NumFmtMap maNumFormatMap;
|
|
|
|
|
|
|
|
/** original source file index. */
|
|
|
|
::std::vector<SrcFileData> maSrcFiles;
|
|
|
|
|
2009-04-02 15:00:15 +00:00
|
|
|
/** Status whether in reference marking state. See isInReferenceMarking(). */
|
|
|
|
bool bInReferenceMarking;
|
|
|
|
|
2008-12-12 09:38:47 +00:00
|
|
|
AutoTimer maSrcDocTimer;
|
|
|
|
DECL_LINK(TimeOutHdl, AutoTimer*);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|