summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2009-01-06 12:16:56 +0000
committerRüdiger Timm <rt@openoffice.org>2009-01-06 12:16:56 +0000
commit64274b38f6cc50a8bb49f114f1ac9e7c1c3b3c4f (patch)
tree66df089038aab51c9a676f111e7c98e1ffdcdb40
parent35602b5f0bcbe13fe6896c62360c5bb68309d1df (diff)
CWS-TOOLING: integrate CWS ooxml02
2008-12-18 06:12:51 +0100 jpryor r265657 : Remove valgrind warning about "Conditional jump or move depends on uninitialised value(s)" within XclFontData::SetApiEscapement(short), as nApiEscapement isn't set by maHlpChCommon>>nApiEscapement. Instead, provide a default value. 2008-12-16 21:50:23 +0100 jpryor r265575 : Remove warnings from Mac OSX gcc-4.0.1. 2008-12-11 20:13:08 +0100 jpryor r265356 : Remove warning so that ooxml02 can build on Ubuntu build bots. 2008-12-11 17:18:47 +0100 jpryor r265336 : CWS-TOOLING: rebase CWS ooxml02 to trunk@264807 (milestone: DEV300:m37) 2008-12-10 17:03:09 +0100 kohei r265208 : take out the xls english opcode bits from sc. We'll decide what to do later. 2008-12-10 16:34:30 +0100 kohei r265202 : removed the xls english formula language entry. 2008-12-10 07:03:56 +0100 jpryor r265144 : Generate the PROT4REV, PROT4REVPASS, BACKUP, and HIDEOBJ records. 2008-12-10 05:16:23 +0100 jpryor r265143 : Undo BIFF record reordering. This was originally done to increase code sharing between the BIFF & OOXML export code, and was tested as being compatible between several .xls-supporting apps, but it is now felt that the change in ordering will complicate testing more than is desirable. 2008-12-08 19:37:27 +0100 kohei r265036 : 1) reverted the localized separator bits, to keep the core functionality intact. 2) introduced English XL A1 and R1C1 grammars, which can be used for OOXML export filter (and later for VBA formula parsing). 3) use the English XL A1 grammar for OOXML export. 2008-12-08 19:33:13 +0100 kohei r265030 : added XL_ENGLISH formula language, which is used in OOXML export (and probably useful in the import as well). This will also be used in VBA formulas as well. 2008-12-03 04:23:54 +0100 jpryor r264737 : Revert -Werror changes; these will be handled in a separate CWS. 2008-12-03 04:21:10 +0100 jpryor r264736 : Revert -Werror fixes; these are being handled in a separate CWS. 2008-12-02 15:48:04 +0100 kendy r264709 : Fix even the visibility warnings. 2008-12-02 09:57:16 +0100 kendy r264661 : Deliver also scfiltmi.dll. 2008-12-02 05:19:37 +0100 jpryor r264654 : -Werror fixes... 2008-12-02 05:14:53 +0100 jpryor r264653 : -Werror fixes... 2008-12-02 05:10:36 +0100 jpryor r264652 : -Werror fixes... 2008-12-02 04:07:52 +0100 jpryor r264651 : -Werror fixes... 2008-12-02 04:00:54 +0100 jpryor r264650 : Further -Werror god appeasement... 2008-12-01 20:23:04 +0100 kendy r264637 : Deliver ioox.lib. 2008-12-01 20:13:38 +0100 kendy r264635 : More visibility fixes in sc. 2008-12-01 20:12:09 +0100 kendy r264634 : Fix build in sax, thanks to Tor :-) 2008-12-01 20:03:36 +0100 kendy r264631 : Define OOXLIB even on Windows. 2008-12-01 15:07:45 +0100 kendy r264609 : More visibilility fixes - sc links now even on Win32. 2008-12-01 12:28:18 +0100 kendy r264594 : Fix visibility markup so that it [nearly ;-)] builds on Windows. It should also save some good amount of symbols... 2008-12-01 12:18:21 +0100 kendy r264593 : Add TYPEINFO_VISIBILITY() - it is the same as TYPEINFO(), but you can specify what visibility markup should it use. 2008-11-27 16:34:23 +0100 mmeeks r264504 : revert ppt bits that slipped in by accident. 2008-11-27 16:32:38 +0100 kendy r264503 : Fix visibility markup in oox (SAL_DLLPUBLIC_EXPORT -> OOX_DLLPUBLIC). 2008-11-27 16:10:16 +0100 mmeeks r264502 : revert un-necessary filter changes ... 2008-11-27 15:52:28 +0100 mmeeks r264498 : revert un-intended evoab2 fixes ... 2008-11-27 15:17:59 +0100 mmeeks r264494 : revert apparently unrelated evoab2 fixups that crept in here. 2008-11-27 11:18:26 +0100 mmeeks r264468 : Rename ComplRefData -> ScComplexRefData for dr #96652# 2008-11-26 23:05:57 +0100 kendy r264437 : #i96634# Fix build with --disable-mozilla. 2008-11-26 22:43:25 +0100 kendy r264435 : #i96316# Fix filter signature to fix Win32 build. 2008-11-25 17:05:35 +0100 mmeeks r264316 : distribute new scfilt library 2008-11-25 17:04:56 +0100 mmeeks r264315 : Add visibility markup to allow all filters to be built as a separate module, and tweak the build to build that way. Fix some existing instances of daft symbol naming around the place. Move headers that are now internal into source/filter/inc Saves ~1.4Mb on a normal calc, on Linux 2008-11-21 22:51:08 +0100 jpryor r264178 : Disable OOXML .xlsx export. 2008-11-21 22:49:26 +0100 jpryor r264177 : More -Werror fixes... 2008-11-21 22:05:42 +0100 jpryor r264175 : Appease the great -Werror god. And cry. Warnings fixed: - Duplicate definition of CREATE_OUSTRING. This is caused because of the use of oox within sc/source/filter/excel, and oox has it's own version of CREATE_OUSTRING. Fix things by ensuring that the oox version is always included first, thus allowing the ftools.hxx version to #undef it and provide it's own version. - Addition of braces for `if` blocks, parenthesis to disambiguate & | && ||. - One s/==/&&/ in dpoutput.cxx (as it's the only thing that makes sense). - Changing parameter names so that they don't hide member variables with the same name. 2008-11-21 13:33:25 +0100 jpryor r264131 : Fix the Win32 build by moving the UnknownAttribute declaration into fastattribs.hxx (lest MSVC complain about vector<UnknownAttribute>). 2008-11-20 19:05:27 +0100 jpryor r264095 : fastsax was originally a UNO component, and then turned into a hybrid UNO/C++ library. Undo this hybridization, reverting it to a normal UNO component, and place the C++ classes into saxinstead. Update project references to use $(SAXLIB) instead of $(FASTSAXLIB). * oox/util/makefile.mk, sc/util/makefile.mk: Remove $(FASTSAXLIB) and use $(SAXLIB) instead. * sax/prj/build.lst: Don't build sax\util, as sax\source\tools now builds the sax library. * sax/source/fastparser/exports.map: Remove; no longer needed. * sax/source/fastparser/facreg.cxx: Change path for fastserializer.hxx. * sax/source/fastparser/fastattribs.cxx, sax/source/fastparser/fastserializer.cxx, sax/source/fastparser/fastserializer.hxx, sax/source/fastparser/fshelper.cxx: Moved to sax/source/tools. * sax/source/fastparser/makefile.mk: Use appropriate UNO naming convention; link against $(SAXLIB) (which now contains FastSaxSerializer, etc.); don't compile fastserializer.obj/etc. (now built by tools); use component.map instead of export.map (removed). * sax/source/tools/makefile.mk: Build sax library instead of building a saxtools.lib file. The sax library now contains FastAttributeList, FastSaxSerializer, and FastSerializerHelper. * scp2/source/ooo/file_library_ooo.scp: Install fastsax.uno, not libfastsax. 2008-11-20 19:04:06 +0100 jpryor r264094 : * oox/source/core/xmlfilterbase.cxx: Remove warning. 2008-11-19 22:26:16 +0100 kendy r264025 : #i96333# A better fix for the evoab2 installation problem Actually, it should be built as evoab2, not evoab; it should be possible to have both at the same time... 2008-11-19 21:52:12 +0100 jpryor r264024 : Shouldn't export symbols by-glob anymore, as we're using SAX_DLLPUBLIC now. 2008-11-19 21:50:30 +0100 jpryor r264023 : Fix Win32 linker error as FastAttributeList and FastSerializerHelper need to be accessible from other shared libraries. (Hopefully this'll work...) * sax/inc/sax/fastattribs.hxx, sax/inc/sax/fshelper.hxx: Add SAX_DLLPUBLIC to class declarations so that they'll be visible from other shared libraries. 2008-11-19 06:47:51 +0100 jpryor r263961 : Cope with oox::core::FilterBase changes. * xestream.cxx: FilterBase now requires that an XModel be provided so that FilterBase::filter() will actually _do_ anything useful, so call FilterBase::setSourceDocument() so that it has one. 2008-11-19 06:37:34 +0100 jpryor r263960 : make sure evoab lib is not installed twice (because it breaks install process as 2nd installation try fails). Thanks to Radek Doulik <rodo@novell.com> for the patch. 2008-11-19 01:53:27 +0100 jpryor r263959 : Fix build break under Linux. * connectivity/source/drivers/evoab2/NResultSetMetaData.cxx: Use a proper type declaration (`:.connectivity::SharedResource'? wtf?!), and use a type that actually exists. /me suspects that this was a bad case of regex search & replace without actually making sure things compiled... * connectivity/source/drivers/evoab2/NStatement.cxx: - #include <resource/common_res.hrc> so that the symbol STR_QUERY_TOO_COMPLEX can be found. - Use a variable that actually has the throwGenericSQLException() method... 2008-11-18 21:37:46 +0100 kendy r263956 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> getTableStyles() needs to be a member of XclExpXmlStream... 2008-11-18 21:37:12 +0100 kendy r263955 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Fix runtime crash due to sending a non-POD type through a ... function. * sc/source/filter/excel/xestyle.cxx: Stupid fix: s/.getStr() FSEND/.getStr(), FSEND/g (commas are important!). 2008-11-18 21:36:47 +0100 kendy r263954 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Fix sc build problems... * excel/excdoc.cxx, excel/excrecds.cxx: Remove ScTableProtection, XclExpProtection references (these don't exist here); remove compiler warnings & errors (AddSdrPage prototype changed?!). * excel/expop2.cxx: XclEscher constructor changed; deal. * excel/xestream.cxx, inc/xestream.hxx: XmlFilterBase added some additional abstract members; implement them so we're a concrete type. 2008-11-18 21:36:25 +0100 kendy r263953 : #i96320# xlsx export From: Fridrich Strba <fstrba@novell.com> disambiguate 2008-11-18 21:36:00 +0100 kendy r263952 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Flush, Flush, Flush... 2008-11-18 21:35:38 +0100 kendy r263951 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /styleSheet/numFmts/numFmt support. * sc/source/filter/inc/xestyle.hxx, sc/source/filter/excel/xestyle.cxx: Generate /styleSheet/numFmts/numFmt. 2008-11-18 21:35:08 +0100 kendy r263950 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /styleSheet/colors/indexedColors/rgbColor. Also generates /worksheet//col/@style. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/inc/xestyle.hxx, sc/source/filter/excel/xestyle.cxx: Generate /styleSheet/colors/indexedColors/rgbColor. * sc/source/filter/excel/xetable.cxx: Generate /worksheet//col/@style. 2008-11-18 21:34:46 +0100 kendy r263949 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Correct /worksheet//row/@s and /worksheet//row/@ht logic. We need an actual /styleSheet/cellXfs index for //row/@s, which mnIndex most certainly was not, and XclExpRow::mnHeight is a value in twips, while OOXML //row/@ht is a value in points, resulting in _huge_ row heights when opening the document in Excel. Oops. * sc/source/filter/excel/xetable.cxx: Fix //row/@s, //row/@ht. 2008-11-18 21:34:15 +0100 kendy r263948 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /styleSheet/cellXfs/xf/@xfId. Now that I understand what this field is supposed to contain... * sc/source/filter/inc/xestyle.hxx, sc/source/filter/excel/xestyle.cxx: Generate /styleSheet/cellXfs/xf/@xfId. 2008-11-18 21:33:52 +0100 kendy r263947 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Document current state of style support. 2008-11-18 21:33:22 +0100 kendy r263946 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Style Index Support, Take 3! The problem is XclExpCellTable and XclExpRkCell: when XclExpCellTable creates XclExpRkCell instances, it sets their style to EXC_XFID_NOTFOUND, which seems to persist for quite some time, and is later "corrected" to the correct style index in XclExpXFBuffer::GetXFIndex(). This leads to all sorts of problems for me, though, as XclExpXFBuffer::maCellIndexes and maStyleIndexes were a nXFId::index map, and it wasn't easy to get a "valid" nXFId value. Hence, Take 3: maCellIndexes and maStyleIndexes aren't nXFId::index maps, but nXFIndex::index maps. (nXFId is the "original" XF index into XclExpXFBuffer::maXFList, while nXFIndex is the index into XclExpXFBuffer::maSortedXFList, which is the order that BIFF Excel export uses.) Since the nXFId::nXFIndex map logic must work (it's required for BIFF support), we can rely on this logic via a nXFIndex::xml-index map, allowing us to export correct style indexes. Now things Just Work (at least until I find another set of bugs...). * sc/source/filter/excel/xestyle.cxx: Rewrite (and simplify) maCellIndexes and maStyleIndexes initialization, so that XclExpRkCell can get proper style indexes. * sc/source/filter/inc/xetable.hxx, sc/source/filter/excel/xetable.cxx: Rewrite XclExpBlankCell and XclExpRkCell XML generation to more closely mimic BIFF generation (thus allowing us to more sanely deal with the XclExpMultiCellBase "chaining" semantics). 2008-11-18 21:33:01 +0100 kendy r263945 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Correct font export within xl/styles.xml. The problem is that BIFF export inserts a "blind" font to appease older versions of Excel, but Excel/OOXML does not want the blind font. So instead of making XclExpBlindFont do nothing -- which causes all //*/@fontId values to be wrong because the @fontId is counting a font that isn't present -- we just don't use XclExpBlindFont with OOXML output. * sc/source/filter/inc/xestyle.hxx, sc/source/filter/excel/xestyle.cxx: Don't override+implement XclExpBlindFont::SaveXml(), and instead don't add a XclExpBlindFont() record for OOXML export. 2008-11-18 21:32:30 +0100 kendy r263944 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Enable export of blank cells. Blank cells can contain formatting information (background color, borders, etc.), and XclExpBlankCell was previously overlooked. :-( * sc/source/filter/inc/xetable.hxx, sc/source/filter/excel/xetable.cxx: Export /worksheet//c elements for blank cells. 2008-11-18 21:32:08 +0100 kendy r263943 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Start implementing /worksheet/cols/col/c/@s attribute. This allows Style information to be set for cells. It currently works for background color on cells with text; still needs work to support ~everything. * sc/source/filter/excel/xetable.cxx: Generate the /worksheet/cols/col/c/@s attribute so that it contains the Cell XF which contains the appropriate formatting information. 2008-11-18 21:31:41 +0100 kendy r263942 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Fix "Excel yells when importing a document that sets cell background color." i.e. styles weren't quite right (shock!). In this case, the issues were: - I wasn't distinguishing between *Cell* XFs and *Style* XFs. - //cellStyle/@xfId refers to an index into //cellStyleXfs, and I wasn't generating //cellStyleXfs. Thus, if //cellStyle was present, Excel yelled. - "Indexes" were *completely* wrong. BIFF only has a single set of indexes to track, nicely kept in XclExpXFBuffer::maXFIndexVec. OOXML has _two_ sets: //cellXfs and //cellStyleXfs, each of which are referenced "by index" from other XML parts (and from _this_ XML part, via //cellStyle/@xfId - above). - We needed to export builtin styles. So *now*, if you create an empty Calc document, set a cell background color, save, and load into Excel, it will load without error. You *still* won't see the proper cell background color in Excel, but at least it loads w/o error (which wasn't previously true). * sc/source/filter/inc/xestyle.hxx, sc/source/filter/excel/xestyle.cxx: Add XclExpXFBuffer::GetXmlCellIndex(); lots of other changes (see above for the details). 2008-11-18 21:31:19 +0100 kendy r263941 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Er, yeah. 2008-11-18 21:30:54 +0100 kendy r263940 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Remove deliberate segfault-inducing code. 2008-11-18 21:30:29 +0100 kendy r263939 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Allow Excel to open a document that changes a cell background. Note: it still doesn't *work* yet (as we don't set the cell's @s property so Excel reads the appropriate style), but it does LOAD w/o error now. This is progress. * sc/source/filter/excel/xestyle.cxx: Lots 'o changes; - Exclude the <bgColor/> and <fgColor/> children of //patternFill if the colors aren't actually set. - Don't export //xf/@xfId, as I'm not sure wtf this is supposed to contain yet. - Enhance the Border/Fill lists created last time so it behaves properly: use custom predicates to check for equality (no idea what the default operator== does; it's probably wrong); don't use AddBorderAndFill() at all the "entry" points as this misses cells, instead process all cells within XclExpXFBuffer::Finalize() and add borders/fills there (thus ensuring we hit all cells); Assert that the border/fill id values are valid. - Add a default set of fills. Excel complains loudly if you're missing these fills, so make sure they're always present. - //borders/@count should contain the *Borders* count, not the Fills count. Oops. 2008-11-18 21:30:04 +0100 kendy r263938 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Continue style support. Excel can now (again!) open Calc-generated spreadsheets. Compared to other parts, this was a mess, mostly because (for the first time) the XML format did NOT closely match the pre-existing binary format. It's reasonably close, but some additional mapping is necessary. In particular, in BIFF the XF records contain "inline" the border and fill information. In OOXML this information is referred to "by-index"; consequently we need to create an internal table of borders & fills so that we can then determine the by-index value for borders and fills. :-( Furthermore, my previous `font support` commit was broken: it removed duplicate fonts. While this *sounds* like a good idea (look ma, smaller files!), it's not (currently) a good idea as the XclExpXF::mnXclFont value is an index into this font list (_with_ duplicate values). Removing the duplicates results in invalid /styleSheet/cellXfs/xf/@fontId values, which causes Excel to complain (and no end of grief for me). All told, this adds support for: /styleSheet/borders, /styleSheet/borders/border, /styleSheet/borders/border/bottom, /styleSheet/borders/border/diagonal, /styleSheet/borders/border/left, /styleSheet/borders/border/right, /styleSheet/borders/border/top, /styleSheet/cellXfs, /styleSheet/cellXfs/xf, /styleSheet/cellXfs/xf/alignment, /styleSheet/cellXfs/xf/protection, /styleSheet/fills, /styleSheet/fills/fill, /styleSheet/fills/fill/patternFill, /styleSheet/fills/fill/patternFill/bgColor, and /styleSheet/fills/fill/patternFill/fgColor. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/inc/xestyle.hxx, sc/source/filter/excel/xestyle.cxx: Get xl/styles.xml into an actual Excel-loadable condition. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Add XclXmlUtils::ToOString(Color). 2008-11-18 21:29:41 +0100 kendy r263937 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /styleSheet/fonts/font. This generates: /styleSheet/fonts/font/b, /styleSheet/fonts/font/charset, /styleSheet/fonts/font/color, /styleSheet/fonts/font/condense, /styleSheet/fonts/font/extend, /styleSheet/fonts/font/family, /styleSheet/fonts/font/i, /styleSheet/fonts/font/name, /styleSheet/fonts/font/outline, /styleSheet/fonts/font/shadow, /styleSheet/fonts/font/strike, /styleSheet/fonts/font/sz, /styleSheet/fonts/font/u, and /styleSheet/fonts/font/vertAlign. Missing is: /styleSheet/fonts/font/scheme, * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Change WriteFontData() to take a `sal_Int32 nFontId' parameter, which is the element to write to contain the font name. This is necessary as the shared string table wants to use XML_rFont for the font name, while //fonts/font wants XML_name for the font name. * sc/source/filter/excel/xestring.cxx: WriteFontData() change. * sc/source/filter/inc/xestyle.hxx, sc/source/filter/excel/xestyle.cxx: Generate </styleSheet> element (oops), and generate /styleSheet/fonts/font/** for all unique fonts. 2008-11-18 21:29:12 +0100 kendy r263936 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Rename XclExpXmlStream::WriteCurrentStreamAttributes() to WriteAttributes(). Also adds XclExpXmlStream::WriteFontData(). The WriteCurrentStreamAttributes() to WriteAttributes() change was done so that method names would have a reasonable length, and adding WriteCurrentStreamFontData() was looking like an ugly pattern continuation. XclExpXmlStream::WriteFontData() is to support code sharing of XclFontData generation. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestring.cxx: s/WriteCurrentStreamAttributes/WriteAttributes/g, add WriteFontData() ("moved" from xestring.cxx). * sc/source/filter/inc/xerecord.hxx, sc/source/filter/excel/excrecds.cxx, sc/source/filter/excel/xepage.cxx, sc/source/filter/excel/xerecord.cxx, sc/source/filter/excel/xestream.cxx, sc/source/filter/xcl97/xcl97rec.cxx: Deal with above changes. 2008-11-18 21:28:50 +0100 kendy r263935 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Begin style support. * sc/source/filter/excel/excdoc.cxx: For OOXML output, create an XclExpXmlStyleSheet instance instead of generating FONTLIST, FORMATLIST, XFLIST, and PALETTE separately, as these need to be written to a separate .zip part. * sc/source/filter/inc/xestyle.hxx, sc/source/filter/excel/xestyle.cxx: Begin generating the xl/styles.xml part. 2008-11-18 21:28:25 +0100 kendy r263934 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> =?utf-8?q?Partially=20implement=20Comments=20(=C2=A73.7).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit This generates the /xl/commentsN.xml files (N == sheet index number). This is only a partial generation because Excel requires that a drawing object be associated with the comment in order to display it. No drawing object, and instead Excel displays a dialog warning that the comments could not be displayed. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/excel/excdoc.cxx: Create a XclExpComments object to generate the appropriate commentsN.xml file, as the commentsN.xml file needs to write information about *all* of the comments (author information), so we can't just write out the XclExpNotes individually. * sc/source/filter/xcl97/xcl97rec.cxx, * sc/source/filter/excel/xecontent.cxx: Cope with XclExpXmlStream::CreateOutputStream() changes. * sc/source/filter/inc/xeescher.hxx, sc/source/filter/excel/xeescher.cxx: Add and implement XclExpComments, and add XML generation to XclExpNote. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Change XclExpXmlStream::CreateOutputStream() to take full and relative paths (instead of trying to cosntruct a full/relative path based on the parameters). This was necessary because commentsN.xml needs to insert a relative path of e.g. "../comments1.xml", which the previous implementation would have made difficult. I think this makes things clearer and less magical as well. 2008-11-18 21:28:01 +0100 kendy r263933 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement most of the Shared String Table support. Previously we generated /sst/si/t, which supports non-formatted text. Now we support formatting within a cell -- AS LONG AS the formatting isn't applied to the first character/token. (The first character/token requires formal styles support, which is lacking; everything after character position 1 can be handled within the shared string table.) Now we have: /sst/si/r/rPr/b, /sst/si/r/rPr/charset, /sst/si/r/rPr/color, /sst/si/r/rPr/family, /sst/si/r/rPr/i, /sst/si/r/rPr/outline, /sst/si/r/rPr/rFont, /sst/si/r/rPr/scheme, /sst/si/r/rPr/shadow, /sst/si/r/rPr/strike, /sst/si/r/rPr/sz, /sst/si/r/rPr/u, /sst/si/r/rPr/vertAlign, and /sst/si/r/t. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/excel/xecontent.cxx: Use XclExpString::WriteXml() to generate string values, instead of assuming everything is unformatted /sst/si/t elements. * sc/source/filter/inc/xestring.hxx, sc/source/filter/excel/xestring.cxx: Add and implement XclExpString::WriteXml(), which now handles formatted text runs. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Change XclXmlUtils::ToOUString(ScfUInt16Vec) to XclXmlUtils::ToOUString(ScfUInt16Vec,int,int) so that it can be easily used for substrings; add asserts to XclXmlUtils::To*String(XclExpString) to ensure that we're not dealing with formatted text there (as formatted text needs to go through XclExpString::WriteXml(), but these methods are often used for attribute values which cannot have formatted text). 2008-11-18 21:27:35 +0100 kendy r263932 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Update of TODO. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. 2008-11-18 21:27:14 +0100 kendy r263931 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Add /Relationships/Relationship/@TargetMode support. This also fixes Calc hyperlink export, allowing Excel to properly read documents containing a hyperlink. * sc/source/filter/excel/xecontent.cxx: Generate "External" for the hyperlink's TargetMode property, so that Excel will load the generated spreadsheet without error. 2008-11-18 21:26:39 +0100 kendy r263930 : #i96320# xlsx export From: Fridrich Strba <fstrba@novell.com> I think this was what was meant 2008-11-18 21:26:18 +0100 kendy r263929 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Allow Excel to open documents w/ all contents selected. Previously, if you selected all cells (Ctrl+A) then saved, the //selection/@sqref attribute would contain "A:IV", which Excel didn't like. * sc/source/filter/excel/xestream.cxx: Don't allow a MAXROW or MAXCOL value to hit ScRange::Format(), thus avoiding the "missing row numbers" issue. 2008-11-18 21:25:46 +0100 kendy r263928 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> (Mostly) Implement /worksheet/hyperlinks/hyperlink. The only piece missing is error-free Excel import, and in order for Excel to import a generated document error-free is for the sheetN.xml.rels document to contain a /Relationships/Relationship/@TargetMode attribute, e.g. <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="http://www.example.com/" TargetMode="External"/> I'm not sure how to add this functionality yet. * sc/source/filter/excel/excdoc.cxx: Generate the /worksheet/hyperlinks start and end elements, if appropriate. * sc/source/filter/inc/xecontent.hxx, sc/source/filter/excel/xecontent.cxx: Generate the /worksheet/hyperlinks/hyperlink element * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Add XclXmlUtils::ToOUString(XclExpString). 2008-11-18 21:25:24 +0100 kendy r263927 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement AutoFilter support. This includes /worksheet/autoFilter, /worksheet/autoFilter/filterColumn, /worksheet/autoFilter/filterColumn/top10, /worksheet/autofilter/filterColumn/customFilters, and /worksheet/autofilter/filterColumn/customFilter. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/inc/excrecds.hxx, sc/source/filter/excel/excrecds.cxx: Generate //autoFilter/*. * sc/source/filter/excel/xename.cxx: Apparently adding an AutoFilter adds a "defined name" with an empty string (!), so change XclExpName::SaveXml() to skip entries with empty names. * sc/source/filter/inc/xerecord.hxx, sc/source/filter/excel/xerecord.cxx: Declare and implement a specialization for XclExpValueRecord<double>::SaveXml(). This is necessary because Fridrich's change to XclExpValueRecord::SaveXml() (to case maValue to sal_Int32) broke double exports (as it cast the double to a sal_Int32, thus truncating the value). Since we don't want to re-add the ambiguity warning, we need to specialize so that `double' output uses the correct rtl::OString::valueOf() method. 2008-11-18 21:24:55 +0100 kendy r263926 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Fix OOXML Calc export so that documents containing > 1 feature work. While most previous features worked -- you could create a document using the feature, save it, and open it in Excel w/o issue -- they worked in isolation. So in trying to create a single test document to test as many features as possible, things (expectedly) broke, so this fixes things up. * sc/source/filter/excel/excdoc.cxx, sc/source/filter/excel/xepage.cxx, sc/source/filter/excel/excrecds.cxx: Reorder element output to conform to the OOXML XSD (and allow Excel to read features.xlsx). 2008-11-18 21:24:34 +0100 kendy r263925 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/autoFilter. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/inc/excrecds.hxx, sc/source/filter/excel/excrecds.cxx: Generate the /worksheet/autoFilter element. 2008-11-18 21:24:07 +0100 kendy r263924 : #i96320# xlsx export From: Fridrich Strba <fstrba@novell.com> disambiguate OUString::valueOf calls 2008-11-18 21:23:45 +0100 kendy r263923 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> (Hopefully) Make Formula Export Locale-Independent. Nice as Kohei's patch was, it relied on formula export being in the same locale as the user's locale. So import into Excel would work for *me* (en-US user), but fail for ~everyone else (i.e. not very useful). This patch is a hack, but has the added benefit that it appears to work: create an ScCompiler::OpCodeMapPtr that's specific to OOXML output, and not cache the results. Not ideal, but enough to progress further... * sc/inc/grammar.hxx: Add GRAM_OOXML_A1, which is a locale-independent grammar value (forces ENGLISH, which is what Excel expects). * sc/source/core/tool/compiler.cxx: When dealing with GRAM_OOXML_A1, create a new/unique OpCodeMap that always uses ',' for SC_OPCODE_SEP. * sc/source/filter/excel/xestream.cxx: Use GRAM_OOXML_A1 for output. 2008-11-18 21:23:20 +0100 kendy r263922 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Fix formula export to use ',' to separate parameters instead of ';'. This is just Kohei's calc-formula-variable-separators-sc.diff patch, but it works quite nicely for this. :-) * sc/inc/compiler.hxx, sc/source/core/tool/compiler.cxx: Allow characters other than ';' to be used as the parameter separator within functions. We don't care so much about permitting people to *enter* such formulas, but this also gives us the ability to *export* such formulas using ',' instead of ';', which Excel requires. 2008-11-18 21:22:55 +0100 kendy r263921 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Finish initial support for /worksheet/sheetData/row/c. Support for some attributes is missing (such as those storing formatting information), but we now (almost completely) save cell values, errors, boolean cells, and formulas. The only missing feature is for > 1 formula argument, e.g. "SUM(A1;B1)". This needs to be exported as "SUM(A1,B1)" (note the comma). * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/inc/xetable.hxx, sc/source/filter/excel/xetable.cxx: Add formula support for /worksheet/sheetData/row/c. Remove XclExpBlankCell::SaveXml(), as I can't think of anything it would actually need to do. 2008-11-18 21:22:30 +0100 kendy r263920 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement partial support for /worksheet/sheetData/row/c. This is take 1 of string and value support (//c[@t='s' or @t='n']). Boolean (//c[@t='b']) and error (//c[@t='e']) support is also there, but I have no idea how to test bool and error output without formula support. TESTING: Numbers have two serialization paths: - "RK" numbers, which go through XclExpRkCell. - non-RK numbers, which go thorugh XclExpNumberCell. RK numbers are integers or numbers evenly divisible by 100. All other floating point values (e.g. Pi) are non-RK values. Strings are, well, strings. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/inc/xetable.hxx, sc/source/filter/excel/xetable.cxx: Generate /worksheet/sheetData/row/c for strings and numeric values, and stub out support for the other //c types (formulas, errors, boolean values, blank values...). 2008-11-18 21:22:08 +0100 kendy r263919 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/sheetData/row. * sc/source/filter/inc/xetable.hxx, sc/source/filter/excel/xetable.cxx: Generate /worksheet/sheetData/row; generate <sheetData/> instead of <sheetData></sheetData> if there are no rows. 2008-11-18 21:21:40 +0100 kendy r263918 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> =?utf-8?q?Flush=20sc/source/filter/excel/ooxml-export-TODO.txt;=20completed=20first=20passs=20of=20=C2=A73.3.1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. 2008-11-18 21:21:15 +0100 kendy r263917 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/sheetViews/sheetView. * sc/source/filter/excel/xeview.cxx: Generate attributes for /worksheet/sheetViews/sheetView. 2008-11-18 21:20:54 +0100 kendy r263916 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/sheetPr/pageSetUpPr. This also partially implements /worksheet/sheetPr, but most of it is TODO. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/excel/excdoc.cxx: Alter XclExpWsbool initialization for XML output so we can output additional information. * sc/source/filter/inc/excrecds.hxx, sc/source/filter/excel/excrecds.cxx: Generate /worksheet/sheetPr and /worksheet/sheetPtr/pageSetUpPr elements. 2008-11-18 21:20:28 +0100 kendy r263915 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Fix /worksheet/sheetViews/sheetView/selection/@sqref for multi-selection. When multiple cells are selected, //selection/@sqref needs to be space separated ("A1 A3 B2") not comma-separated ("A1,A3,B2"). * sc/source/filter/excel/xestream.cxx: Use space as the separator character between ScRanges. 2008-11-18 21:20:06 +0100 kendy r263914 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /workbook/sheetViews/sheetView/selection. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Add XclXmlUtils::ToOString(XclRangeList). * sc/source/filter/inc/xeview.hxx, sc/source/filter/excel/xeview.cxx: Generate /workbook/sheetViews/sheetView/selection. 2008-11-18 21:19:39 +0100 kendy r263913 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> *Actually* implement /worksheet/printOptions. Previously I was emitting /worksheet/printOptions, but neglected to actually emit any attributes for that element. Oops. * sc/source/filter/excel/excdoc.cxx, sc/source/filter/excel/xepage.cxx: Use the new 3-argument XclExpBoolRecord constructor to specify the OOXML attribute to generate from SaveXml(). * sc/source/filter/inc/xerecord.hxx, sc/source/filter/excel/xerecord.cxx: Add a `nAttribute' parameter to the constructor (default is disabled) so that the caller can specify which attribute to generate instead of having a horrible special-case HACK in XclExpBoolRecord::SaveXml() (which wasn't a very scalable solution; this is much better). This isn't perfect, as XclExpBoolRecord::SaveXml() still has some special logic, but it's better than it was... 2008-11-18 21:19:17 +0100 kendy r263912 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/sheetViews/sheetView/pane. Slightly more complicated than you'd think, as //pane needs to be after //dimension but *before* //sheetData, and previously //dimension was being generated as part of the //sheetData processing (thus making it difficult to interrupt the generation for //sheetViews). * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/inc/excdoc.hxx, sc/source/filter/excel/excdoc.cxx: Add FillAsXmlTable(); aRecList now gets filled either as a BINARY (FillAsXmlTable) or "XML" (FillAsXmlTable), because trying to juggle eBiff<= BIFF5, ==BIFF8, and GetOutput()!=EXC_OUTPUT_BINARY (XML) was straining my head, and OOXML record ordering is looking to be quite different from BIFF. "Create" a EXC_ID3_DIMENSIONS record so that //dimension is generated before //sheetViews. * sc/source/filter/inc/xerecord.hxx, sc/source/filter/excel/xerecord.cxx: Add XclExpDelegatingRecord. This is needed because I need an ScfRef<XclExpRecordBase> (to insert the DIMENSION record into the correct location), but XclExpDimension is located within another object and thus can't be heap-allocated itself (at least not w/o changing how it works). Thus I instead create an XclExpDelegatingRecord instance which points to the XclExpDimension instance I care about w/o worrying about double freeing or `delete`ing non-`new`d memory... * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Add XclXmlUtils::ToOString(XclAddress). * sc/source/filter/inc/xetable.hxx, sc/source/filter/excel/xetable.cxx: Don't generate //dimension from XclExpRowBuffer::SaveXml(), as this needs to be done earlier; add XclExpRowBuffer::GetDimensions(), used by XclExpCellTable::CreateRecord() to return an XclExpRecordRef to the already existing XclExpDimensions instance; change XclExpCellTable::CreateRecord() to (a) make it non-const, and (b) return the appropriate XclExpDimension instance for the EXC_ID3_DIMENSIONS record type. * sc/source/filter/inc/xeview.hxx, sc/source/filter/excel/xeview.cxx: Implement /worksheet/sheetViews and /worksheet/sheetViews/sheetView/pane, and partially implement /worksheet/sheetViews/sheetView. * sc/source/filter/xcl97/xcl97rec.cxx: Don't emit the /workbook/workbookProtection/@revisionsPassword attribute, as this causes xmllint XSD Schema validation to fail. 2008-11-18 21:18:48 +0100 kendy r263911 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet[pageMargins and pageSetup and printOptions]. Note: this change alters the ordering of records in (binary) .xls files as well as .xlsx files. This change does not seem to cause any repercussions; Excel 2007 and Calc 2.4 still open generated .xls files w/o complaint. (The records were reordered to simplify generation of OOXML, as otherwise we'd either have a conditional mess or we'd have code duplication. This seems to work, but can be worked around if deemed necessary.) * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/inc/xepage.hxx, sc/source/filter/excel/xepage.cxx: Generate /worksheet/pageMargins, /worksheet/pageSetup, and /worksheet/printOptions elements. * sc/source/filter/inc/xerecord.hxx: Add ExlExpValueRecord<T>::SaveXml() and ExlExpValueRecord<T>::SetAttribute() (needed to generate attributes for some of the above elements). 2008-11-18 21:18:26 +0100 kendy r263910 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/mergeCells/mergeCell. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/inc/xecontent.hxx, sc/source/filter/excel/xecontent.cxx: Generate /worksheet/mergeCells and /worksheet/mergeCells/mergeCell elements. 2008-11-18 21:17:58 +0100 kendy r263909 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/scenarios, //scenario, //inputCells. "Minor" implementation difficulty (making this patch larger than would normally be required): Scenarios implicitly add a new invisible worksheet (as is noticable if you look at the Calc status bar after clicking Tools->Scenarios...->OK; status goes from "Sheet 1/3" to "Sheet 1/4"). This extra sheet foiled my (stupid) resource ID mapping which "just happened" to work, allowing rId1::sheet1 mappings. The problem was that it worked only by "luck" (and I'm not exporting too much), and it was bound to break at some point...like now. Consequently in addition to exporting //scenarios et. al, this also adds additional infrastructure to deal with creating and storing Resource Ids, in particular so that sheet's get valid resource Ids and Excel will still deign to open our files w/o generating errors. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/excel/excdoc.cxx: Change the ordering of ExcEScenarioManager & FilterManager to follow the OOXML XSD; ExcTable::WriteXml() no longer creates the sheet stream (this is done by ExcBundlesheet8::SaveXml()), so lookup the correct stream to use instead. * sc/source/filter/excel/xepage.cxx: Flush comments. * sc/source/filter/excel/xetable.cxx: Cleanup. * sc/source/filter/inc/xcl97rec.hxx, sc/source/filter/xcl97/xcl97rec.cxx: Change ExcBundlesheet8::WriteXml() to open the appropriate sheet output stream (so that we can get a valid ResourceId for this output stream to use in //sheet[@r:id]); implement //scenarios, //scenario, and //inputCells for scenario generation. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Add XclXmlUtils::GetStreamName(), XclXmlUtils::ToOString(ScAddress), XclXmlUtils::ToOString(ScRange), XclXmlUtils::ToOString(XclExpString), XclExpXmlStream::GetIdForPath(), XclExpXmlStream::GetStreamForPath(). The XclXmlUtils methods are helper routines (code cleanup), while the XclExpXmlStream methods are to permit "registration" of a Path to both a RelationshipId and a FSHelperPtr for later output. This allows e.g. ExcBundlesheet8::SaveXml() to open the output stream, and have ExcTable::WriteXml() grab and use this output stream later. Changed CreateOutputStream() to (optionally) return the ResourceId as an output parameter. 2008-11-18 21:17:35 +0100 kendy r263908 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Move XML character escape logic into FastSerializerHelper. * sc/source/filter/excel/xename.cxx, sc/source/filter/excel/xepage.cxx, sc/source/filter/excel/xecontent.cxx: Use writeEscaped() instead of write() in places that require escaping. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Remove XclXmlUtils::Escape(). 2008-11-18 21:17:10 +0100 kendy r263907 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/headerFooter[oddHeader, oddFooter]. Excel distinguishes between left, right, and front page sets, while Calc doesn't (at least, the .xls output doesn't make that distinction). Consequently, we generate "all pages have these headers/footers" output. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/excel/excdoc.cxx: Alter record ordering so that the //headerFooter element is inserted into the correct position to allow Excel to open generated documents. * sc/source/filter/inc/xepage.hxx, sc/source/filter/excel/xepage.cxx: Generate the /worksheet/headerFooter, /worksheet/headerFooter/oddHeader, and /worksheet/headerFooter/evenHeader elements. * sc/source/filter/inc/xerecord.hxx, sc/source/filter/excel/xerecord.cxx: Extend the XclExpStartXmlElementRecord and XclExpStartSingleXmlElementRecord types to accept a callback function which is invoked after starting the element. This allows us to ~easily provide the /worksheet/headerFooter attributes w/o creating new XclExpRecordBase subclasses. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Add XclXmlUtils::Escape() functions which perform XML character escaping (e.g. s/</&lt;/g) so that we don't generate invalid XML. In particular, the header/footer contains a "formatting code" which contains '&', which must be escaped within the generated XML. 2008-11-18 21:16:47 +0100 kendy r263906 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/dimensions. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/excel/xetable.cxx, sc/source/filter/inc/xetable.hxx: Implement /worksheet/dimensions. 2008-11-18 21:16:21 +0100 kendy r263905 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/dataValidations/dataValidation[formula1, formula2]. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/excel/xecontent.cxx, sc/source/filter/inc/xecontent.hxx: Implement /worksheet/dataValidations, /worksheet/dataValidations/dataValidation, //formula1, //formula2. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Add XESTRING_TO_PSZ(), XclXmlUtils::ToOString(ScRangeList), XclXmlUtils::ToOUString(ScDocument&,ScAddress,ScTokenArray*). 2008-11-18 21:15:58 +0100 kendy r263904 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/conditionalFormatting. Note that Excel will NOT currently open files containing this element, as the XML is incomplete: the XSD requires at least one nested /worksheet/conditionalFormatting/cfRule element, which we're not yet generating. We do properly generate //conditionalFormatting/@sqref. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/excel/xecontent.cxx, sc/source/filter/inc/xecontent.hxx: Generate /worksheet/conditionalFormatting. 2008-11-18 21:15:31 +0100 kendy r263903 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/cols/col; unstub /worksheet/sheetData. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/excel/excdoc.cxx: Remove <sheetData/> stub, as //col needs to come _before_ //sheetData, and emitting //sheetData here makes that impossible (and keeps Excel from loading our files). * sc/source/filter/excel/xetable.cxx, sc/source/filter/inc/xetable.hxx: Implement /worksheet/cols (XclExpColinfoBuffer), /worksheet/cols/col (XclExpColinfo), and stub out /worksheet/sheetData in the correct position to appease Excel. 2008-11-18 21:15:06 +0100 kendy r263902 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /worksheet/colBreaks, /worksheet/rowBreaks, and /worksheet//brk. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/excel/xepage.cxx, sc/source/filter/inc/xepage.hxx: Add XclExpPageSettings::SaveXml() and XclExpPageBreaks::SaveXml() -- the former to call the latter, and the latter to generate /worksheet/colBreaks, /worksheet/rowBreaks, and /worksheet//brk. 2008-11-18 21:14:44 +0100 kendy r263901 : #i96320# xlsx export From: Fridrich Strba <fstrba@novell.com> disambiguate 2008-11-18 21:14:19 +0100 kendy r263900 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement (more-) proper /workbook/calcPr support. Cleanup. Previously, /workbook/calcPr was generated by filling a temporary XclExpXmlCalculationProperties instance, and generating the //calcPr element at the ~end of generation. This was not ideal, as it involved more code (the class to hold the intermediate values, etc.), and it could potentially place the //calcPr element into the wrong position (the XSD requires that it be before //oleSize, //customWorkbookViews, and //pivotCaches, while the previous approach would have placed it after ~everything). * sc/source/filter/excel/excdoc.cxx: Follow the pattern of //workbookProtection and insert the //calcPr BIFF records into the appropriate position based on file type. One minor quirk: the records move from the per-SHEET array into the workbook array. * sc/source/filter/excel/xestream.cxx, sc/source/filter/inc/xestream.hxx: Remove unnecessary code. * sc/source/filter/xcl97/xcl97rec.cxx: Directly emit the attributes instead of filling an intermediate object. 2008-11-18 21:13:56 +0100 kendy r263899 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Enable /workbook/workbookProtection. /workbook/workbookProtection was previously disabled as emitting it would cause Excel to generate an error message. The problem has been resolved: /workbook/workbookProtection *must* be before /workbook/bookviews (which in turn must be before /workbook/sheets), and this wasn't previously the case. Placing the element into the proper location makes Excel happy. * sc/source/filter/excel/excdoc.cxx: Place the workbookProtection-related BIFF records into the correct position to appease the Excel gods. * sc/source/filter/excel/excrecds.cxx, sc/source/filter/xcl97/xcl97rec.cxx: Enable output of the various /workbook/workbookProtection attributes. 2008-11-18 21:13:29 +0100 kendy r263898 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement /workbook/bookviews/workbookView. * sc/source/filter/excel/ooxml-export-TODO.txt: Remove implemented elements. * sc/source/filter/excel/excdoc.cxx, sc/source/filter/excel/excel.cxx, sc/source/filter/excel/xlroot.cxx, sc/source/filter/inc/xlroot.hxx, sc/source/filter/inc/xlconst.hxx: The WINDOW1 record needs to be in one of two different locations, depending on output format. Add a new XclOutput enumeration to contain the output format (we do NOT want to reuse XclBiff for this purpose, as otherwise XML output is a superset of BIFF8, and we don't want to update every existing check for BIFF8 to check for both BIFF8 and XML), and check for this flag so that the WINDOW1 record is created in the appropriate place. * sc/source/filter/excel/xestream.cxx, sc/source/filter/inc/xestream.hxx: Add GetRoot() method and change constructor to take a `const XclExpRoot&`, as XclExpWindow::SaveXml() requires this information. * sc/source/filter/excel/xeview.cxx, sc/source/filter/inc/xeview.hxx: XclExpWindow1::SaveXml() generates the //workbookView element. * sc/source/filter/xcl97/xcl97rec.cxx: Cleanup. 2008-11-18 21:13:04 +0100 kendy r263897 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Remove SIGILL from ExcBundlesheet8::SaveXml(). * sc/source/filter/excel/xestream.cxx: Add some asserts. * sc/source/filter/xcl97/xcl97rec.cxx: Non-POD types cause a SIGILL when passed as a "..." argument to a function. Doh! 2008-11-18 21:12:42 +0100 kendy r263896 : #i96320# xlsx export From: Fridrich Strba <fstrba@novell.com> disambiguate 2008-11-18 21:12:17 +0100 kendy r263895 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> /workbook/workbookProtection, mostly cancelled during rebase. This isn't actually implemented -- the ::SaveXml() methods are `#if 0`d out -- as Excel barfs when this element + attributes are emitted. Funnier, even <workbookProtection/> causes Excel to barf, so until all the semantics are worked out it all needs to be uncommented out. What is useful here is the mapping from BIFF record -> OOXML attribute. * sc/source/filter/excel/excdoc.cxx, sc/source/filter/excel/excrecds.cxx, sc/source/filter/inc/excrecds.hxx, sc/source/filter/inc/xcl97rec.hxx, sc/source/filter/xcl97/xcl97rec.cxx: Add method stubs to generate the /workbook/workbookProtection element & attributes. 2008-11-18 21:11:55 +0100 kendy r263894 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Initial /workbook/workbookPr implementation. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sc/source/filter/excel/excdoc.cxx: Add records to start/end the <workbookPr/> element; cleanup & document TODOs. * sc/source/filter/inc/excrecds.hxx, sc/source/filter/excel/excrecds.cxx: Declare & Implement Xcl1904::SaveXml(). * sc/source/filter/inc/xerecord.hxx, sc/source/filter/excel/xerecord.cxx: Declare and implement XclExpXmlStartSingleElementRecord, XclExpXmlEndSingleElementRecord, both used to single-style XML elements instead of the "full" start/end XML created by XclExpXmlStartElementRecord and XclExpXmlEndElementRecord, and add XclExpBoolRecord::SaveXml(), which generates some <workbookPr/> attributes. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Declare & implement XclExpXmlStream::WriteCurrentStreamAttributes(). 2008-11-18 21:11:30 +0100 kendy r263893 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement (more-) proper /workbook/sheets support. Refactor. Instead of hacking around "limitations" in NameBuffer to generate /workbook/sheets/sheet elements, use ExcBundlesheet8 to generate the /workbook/sheets/sheet elements. This also allows us to emit the //sheet/@state attribute, which is private to ExcBundlesheet8. In order to generate the /workbook/sheets elements, XclExpXmlStartElementRecord and XclExpXmlEndElementRecord were added around the ExcBundlesheet8 record entries, so that the existing record-based infrastructure could automagically generate the structural XML tags. These records do nothing for existing BIFF output. Finally, XclExpXmlStream::GetWorkbook() has been replaced with XclExpXmlStream::GetCurrentStream(), and PushStream()/PopStream() methods were added. This is hoped to permit nesting of streams, and is currently being used to generate the xl/worksheets/sheetN.xml files (to no effect, as not enough records are generate XML for the results to be visible). * sc/source/filter/excel/excdoc.cxx: Undo the pTabNames/NameBuffer changes, as we no longer use pTabNames to generate //sheets/; add records to emit the <sheets/> element; place the sheet stream on top of the XclExpXmlStream stack. * sc/source/filter/inc/excrecds.hxx, sc/source/filter/excel/excrecds.cxx: Save the tab that ExcBundlesheetBase was constructed for -- needed for <sheet/> generation within ExcBundlesheet8. * sc/source/filter/excel/xecontent.cxx, sc/source/filter/excel/xename.cxx, sc/source/filter/excel/xepivot.cxx: s#GetWorkbook#GetCurrentStream#g; don't emit empty collections. * sc/source/filter/inc/xerecord.hxx, sc/source/filter/excel/xerecord.cxx: Declare and Implement XclExpXmlElementRecord, XclExpXmlStartElementRecord, XclExpXmlEndElementRecord. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Add stream stack methods; remove warning about unused parameter. * sc/source/filter/inc/xcl97rec.hxx, sc/source/filter/xcl97/xcl97rec.cxx: Add ExcBundlesheet8::SaveXml() and generate /workbook/sheets/sheet elements from it. 2008-11-18 21:11:08 +0100 kendy r263892 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Add Calc OOXML TODO list. * sc/source/filter/excel/ooxml-export-TODO.txt: Added. I'm going through ECMA-376 Part 4 Section 3 in a breadth-first fashion (i.e. top-down), and implementing each element as I'm able. I'm not always able to immediately implement an element (frequently because I can't find the equivalent binary export code) within a short period of time, so any such elements are recorded here for later passes. Just because an element isn't here doesn't mean it's been fully implemented; any elements with associated code will have OOXTODO comments specifying what's missing/needed for that particular code. 2008-11-18 21:10:36 +0100 kendy r263891 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Initial /workbook/pivotCaches/pivotCache implementation. * sc/source/filter/excel/xepivot.cxx, sc/source/filter/inc/xepivot.hxx: Declare and implement *Xml() methods so that PivotCaches are saved into xl/workbook.xml. 2008-11-18 21:10:09 +0100 kendy r263890 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Initial <definedName/> implementation. * sc/source/filter/excel/xename.cxx: Generate <definedName/>. * sc/source/filter/excel/xestream.cxx: Add XclXmlUtils::ToPsz(bool). * sc/source/filter/inc/xename.hxx: Declare XclExpNameManager::SaveXml() so we can emit <definedName/> elements. * sc/source/filter/inc/xestream.hxx: Declare XclXmlUtils::ToPsz(bool). 2008-11-18 21:09:47 +0100 kendy r263889 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Initial <calcPr/> implementation; provide count, uniqueCount <sst/> attributes. * sc/source/filter/excel/excdoc.cxx: Initial /workbook/calcPr generation implementation. * sc/source/filter/excel/xecontent.cxx: Provide the count and uniqueCount attributes for the <sst/> element. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: Provide/implement a XclExpXmlStream::GetWorkbookCalculationProperties() method which keeps track of data used by excdoc.cxx for <calcPr/> generation. * sc/source/filter/inc/xcl97rec.hxx, sc/source/filter/xcl97/xcl97rec.cxx: Override SaveXml() for select types to cache the information needed to write <calcPr/>. 2008-11-18 21:09:22 +0100 kendy r263888 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Simplify addRelation/openOutputStream use within sc. * sc/source/filter/excel/excdoc.cxx, sc/source/filter/excel/xecontent.cxx: Use CreateOutputStream() to create sub-streams. * sc/source/filter/excel/xestream.cxx: Implement CreateOutputStream(); use CreateOutputStream() to create xl/workbook.xml. * sc/source/filter/inc/xestream.hxx: Add CreateOutputStream() methods which merge addRelation() w/ openOutputStreamWithSerializer(). 2008-11-18 21:08:59 +0100 kendy r263887 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Allow Excel to open an empty spreadsheet. * sc/source/filter/excel/excdoc.cxx: Use proper sheet names in the relations file so that correct relative paths are present within the .rels file; Use the correct content type when creating sheetN.xml; Insert a <sheetData/> element into the worksheet.xml files; insert the sheetN.xml relational data into the correct .rels file. * sc/source/filter/excel/xestream.cxx: Use the correct content type when creating xl/workbook.xml. 2008-11-18 21:08:28 +0100 kendy r263886 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> More Excel export cleanup. * sc/source/filter/excel/excdoc.cxx: Use addRelation(XOutputStream...) so that the added relation is (hopefully) inserted into the appropriate xl/_rels/workbook.xml.rels file; extra tracing. * sc/source/filter/excel/xecontent.cxx: Cleanup/simplification. * sc/source/filter/excel/xestream.cxx, sc/source/filter/inc/xestream.hxx: Add more ToOString() and ToOUString() helper methods. 2008-11-18 21:08:06 +0100 kendy r263885 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Current work-in-progress for minimal Excel support. * sc/source/filter/excel/excdoc.cxx: Implement ExcTable::WriteXml() to write xl/worksheets/sheetN.xml or the workbook.xml <sheets/> elements, depending on whether we're the header or not. Implement ExcDocument::WriteXml() to stub out xl/workbook.xml. * sc/source/filter/excel/xecontent.cxx: Use the XML Ids instead of strings to speed up XML creation. * sc/source/filter/excel/xestream.cxx: Add XclXmlUtils::To*String() helpers to simplify XML writing; open the xl/workbook.xml file so that it can be written to from multiple locations. * sc/source/filter/inc/xestream.hxx: Add XclXmlUtils class to hold various To*String() helpers; add XclExpXmlStream::GetWorkbook(). 2008-11-18 21:07:41 +0100 kendy r263884 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Generate a correct shared string table. * sc/source/filter/excel/xecontent.cxx: Write proper shared string table entries. * sc/source/filter/inc/xestream.hxx: Include <sax/fshelper.hxx> so we can easily use XmlFilterBase::openOutputStreamWithSerializer(). 2008-11-18 21:07:18 +0100 kendy r263883 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Write an actual ZIP package for .xlsx output, including a (stubbed) shared string table. * sc/prj/build.lst: We now depend on oox to build. * sc/source/filter/inc/xestream.hxx, sc/source/filter/excel/xestream.cxx: XclExpXmlStream how inherits from XmlFilterBase, which produces ZIP package files. This allows increased code sharing. * sc/source/filter/excel/excdoc.cxx: Update XclExpXmlStream construction. * sc/source/filter/excel/excel.cxx: Don't create a SotStorage() instance over pMedStrm (this makes ZipStorage very angry); don't call lcl_ExportExcelBiff(), as we want to preserve our generated file. * sc/source/filter/excel/xecontent.cxx: Write out the XML forr the shared string table (incomplete, as I need to find an easier/more elegant way of inserting strings into the XML, but it'll need updating anyway to use the FastSaxSerializer). * sc/util/makefile.mk: Link against $(OOXLIB) and $(FASTSAXLIB) as well. 2008-11-18 21:06:54 +0100 kendy r263882 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Trace output for the shared string table. This is step forward as we're hooking into the new XclExpRecordBase::SaveXml() to invoke the string table SaveXml() routine. It's still largely proof-of-concept, but we can actually invoke the appropriate code now. * oox/workben/ooxml-export-notes.txt: Flush. * sc/source/filter/inc/exp_op.hxx, sc/source/filter/excel/expop2.cxx: Add and implement the new ExportXml2007 type. * sc/source/filter/excel/excdoc.cxx, sc/source/filter/excel/excel.cxx, sc/source/filter/excel/xecontent.cxx, sc/source/filter/excel/xepivot.cxx, sc/source/filter/excel/xerecord.cxx, sc/source/filter/excel/xestream.cxx, sc/source/filter/inc/excdoc.hxx, sc/source/filter/inc/xecontent.hxx, sc/source/filter/inc/xepivot.hxx, sc/source/filter/inc/xerecord.hxx, sc/source/filter/inc/xestream.hxx, sc/source/filter/inc/xestring.hxx: Implement enough glue to allow XclExpSstImpl::SaveXml() to be invoked from the XML export context and print useful information to the screen. 2008-11-18 21:06:28 +0100 kendy r263881 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Implement support for writing .xlsx files. The .xlsx file written is still a BIFF8 (.xls) file, but a file is now written instead of generating an error message. * sc/inc/filter.hxx: Change the prototype of ScExportExcel5 so that we can specify Excel 2007 XML (Exp2007Xml) as a file format. * sc/source/filter/excel/excel.cxx: Refactor ScExportExcel5() so that Exp2007Xml is a supported format, and stub out Exp2007Xml support so that BIFF8 output is currently generated. * sc/source/ui/docshell/docsh.cxx: Add support for the "MS Excel 2007 XML" filter and the new ScExportExcel5() semantics. 2008-11-18 21:06:03 +0100 kendy r263880 : #i96320# xlsx export From: Jonathan Pryor <jpryor@novell.com> Make the filter names consistent with other filters used in sc/.../docsh.cxx. * filter/source/config/fragments/filters/calc_MS_Excel_2007_Binary.xcu, filter/source/config/fragments/filters/calc_MS_Excel_2007_Binary_ui.xcu, filter/source/config/fragments/filters/calc_MS_Excel_2007_XML.xcu, filter/source/config/fragments/filters/calc_MS_Excel_2007_XML_Template.xcu, filter/source/config/fragments/filters/calc_MS_Excel_2007_XML_Template_ui.xcu, filter/source/config/fragments/filters/calc_MS_Excel_2007_XML_ui.xcu, filter/source/config/fragments/types/MS_Excel_2007_Binary.xcu, filter/source/config/fragments/types/MS_Excel_2007_XML.xcu, filter/source/config/fragments/types/MS_Excel_2007_XML_Template.xcu: Remove 'Calc ' from the filter names (as none of the other filters mentioned in sc/source/ui/docshell.cxx use that convention), and remove 3RDPARTYFILTER from the filter's Flags property, as this flag causes objstor.cxx to use ExportTo() instead of ConvertTo(), and the existing Calc->Export logic is all within ConvertTo(). 2008-11-18 21:05:41 +0100 kendy r263879 : #i96320# xlsx export From: Radek Doulik <rodo@novell.com> Initial work on ooxml export (xlsx) * filter/source/config/fragments/filters/calc_MS_Excel_2007_XML.xcu: ditto * filter/source/config/fragments/types/MS_Excel_2007_XML.xcu: reverse extensions order so that xlsx is shown in Save dialog as default 2008-11-18 20:53:43 +0100 kendy r263877 : #i96316# OPC for export filters From: Jan Holesovsky <kendy@suse.cz> Deliver tablestylelist.hxx so that we can use xmlfilterbase.hxx. And also just do forward declaration of TableStyle instead of including the header - it includes too much in that case. 2008-11-18 20:53:21 +0100 kendy r263876 : #i96316# OPC for export filters From: Jonathan Pryor <jpryor@novell.com> Fix build break. * source/ppt/pptimport.cxx: getServiceFactory() was renamed to getGlobalFactory(). 2008-11-18 20:52:49 +0100 kendy r263875 : #i96316# OPC for export filters From: Jan Holesovsky <kendy@suse.cz> Add some namespaces so that sax builds again. 2008-11-18 20:52:27 +0100 kendy r263874 : #i96316# OPC for export filters From: Jonathan Pryor <jpryor@novell.com> Cleanup in sax (wrt. escaping attribute values). FastSaxSerializer::writeFastAttributeList() didn't properly escape attribute values, which broke number format export if the number format included e.g. '"' (double quote), e.g.: [$$-409]#,##0.00;[RED]-[$$-409]#,##0.00;"" which shows numbers with a currency type, negative numbers in red, and 0 values as the empty string. * sc/source/filter/excel/ooxml-export-TODO.txt: Flush. * sax/source/fastparser/fshelper.cxx, sax/source/fastparser/fastserializer.hxx, sax/source/fastparser/fastserializer.cxx: Move fshelper.cxx's lcl_Escape() to FastSaxSerializer::escapeXml(), and use escapeXml() when writing attribute values. 2008-11-18 20:51:59 +0100 kendy r263873 : #i96316# OPC for export filters From: Jan Holesovsky <kendy@suse.cz> Make a bit more obvious what's happenning with AttributeLists. 2008-11-18 20:51:37 +0100 kendy r263872 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> a from-scratch-build reveals some missed changes in include files :( 2008-11-18 20:51:11 +0100 kendy r263871 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> deliver the header too 2008-11-18 20:50:48 +0100 kendy r263870 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> public visibility of FastAttributeList class + some more convenience functions in fshelper 2008-11-18 20:50:26 +0100 kendy r263869 : #i96316# OPC for export filters From: Jonathan Pryor <jpryor@novell.com> Add /Relationships/Relationship/@TargetMode support. This also fixes Calc hyperlink export, allowing Excel to properly read documents containing a hyperlink. * oox/inc/oox/core/xmlfilterbase.hxx, oox/source/core/xmlfilterbase.cxx: Add a rTargetMode parameter to XmlFilterBase::addRelation(). 2008-11-18 20:50:04 +0100 kendy r263868 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> add string.h 2008-11-18 20:49:42 +0100 kendy r263867 : #i96316# OPC for export filters From: Jan Holesovsky <kendy@suse.cz> Explicitely default construct maMarkStack [to be safe ;-)]. 2008-11-18 20:49:13 +0100 kendy r263866 : #i96316# OPC for export filters From: Jan Holesovsky <kendy@suse.cz> Rename writeMarked() to mergeTopMarks() and improve the implementation. Just writing the top mark is not enough; in more complex scenarios it would destroy the order completely. This way we have better control over what's happening, and can nest the mark()/mergeTopMarks()/mergeTopMarks( true ) as necessary directly in the start/end tags. 2008-11-18 20:48:51 +0100 kendy r263865 : #i96316# OPC for export filters From: Jan Holesovsky <kendy@suse.cz> Add mark() and writeMarked() methods. These are to be able to change the order of the data being written. If you need to write eg. p, r, rPr, [something], /rPr, t, [text], /r, /p, but get it in order p, r, t, [text], /t, rPr, [something], /rPr, /r, /p, simply do p, r, mark(), t, [text], /t, mark(), rPr, [something], /rPr, writeMarked(), writeMarked(), /r, /p and you are done. 2008-11-18 20:48:24 +0100 kendy r263864 : #i96316# OPC for export filters From: Jonathan Pryor <jpryor@novell.com> Move XML character escape logic into FastSerializerHelper. * sax/inc/sax/fshelper.hxx, sax/source/fastparser/fshelper.cxx: Add and implement FastSerializerHelper::writeEscaped(), which escapes any XML characters within the string before writing. 2008-11-18 20:48:02 +0100 kendy r263863 : #i96316# OPC for export filters From: Jonathan Pryor <jpryor@novell.com> Introduce writeId(). * sax/inc/sax/fshelper.hxx sax/source/fastparser/fastserializer.cxx, sax/source/fastparser/fastserializer.hxx, sax/source/fastparser/fshelper.cxx: Add/implement FastSerializerHelper::writeId(), which does the "usual" sal_Int32->string conversion but manually, outside of any automatic context. This is done so that XclExpXmlStream::WriteCurrentStreamAttributes() can write element attributes "piecemeal"/on-demand, without needing to store the relevant information into a separate object to generate all the attributes at once. 2008-11-18 20:47:36 +0100 kendy r263862 : #i96316# OPC for export filters From: Jonathan Pryor <jpryor@novell.com> Change the semantics of startElement() and singleElement(). * sax/source/fastparser/fshelper.cxx: Change the semantics of startElement() and singleElement(), so that attributes with values that are NULL are _skipped_, instead of ending all attributes. This allows us to have "optional" attributes, in which the attribute won't be generated if the value is null. This is needed so that the //definedName/@localSheetId attribute is only emitted for non-global sheet-specific names. 2008-11-18 20:47:14 +0100 kendy r263861 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> call our pptx export filter from oox/pptimport when needed (yup, it is not only import filter from now ;-) 2008-11-18 20:46:51 +0100 kendy r263860 : #i96316# OPC for export filters From: Jan Holesovsky <kendy@suse.cz> How to install the stuff. 2008-11-18 20:46:29 +0100 kendy r263859 : #i96316# OPC for export filters From: Jan Holesovsky <kendy@suse.cz> Change 'core::addRelation' to 'static addRelation_impl'. To be better readable, and no symbol for that. 2008-11-18 20:46:04 +0100 kendy r263858 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> generate document wide unique Id's 2008-11-18 20:45:40 +0100 kendy r263857 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> added standalone="yes" to xml document beginning removed unneccessary ::rtl:: prefix in one case 2008-11-18 20:45:18 +0100 kendy r263856 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> added FSHelperPtr here as well 2008-11-18 20:44:56 +0100 kendy r263855 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> call commit on StorageBase substorages rather than only on XStorage of these substorages so that the commit propagates recursively to all substorages 2008-11-18 20:44:34 +0100 kendy r263854 : #i96316# OPC for export filters From: Jonathan Pryor <jpryor@novell.com> Implement getOutputStream(), some cleanup. * sax/inc/sax/fshelper.hxx: Add a getOutputStream() method so that excdoc.cxx can easily use the addRelation(XOutputStream, ...) method. * sax/source/fastparser/fastserializer.cxx: Code refactor to remove useless string duplication -- Sequence<byte>(ToString(s).getStr(), ToString(s).getLength()) == bad. * sax/source/fastparser/fastserializer.hxx: Add getOutputStream() (for use in fshelper.cxx); cleanupl. * sax/source/fastparser/fshelper.cxx: Implement getOutputStream(). 2008-11-18 20:44:12 +0100 kendy r263853 : #i96316# OPC for export filters From: Jonathan Pryor <jpryor@novell.com> Add write() methods to write inside elements. * sax/inc/sax/fshelper.hxx: Add write() methods to write content to the string inside of elements. * sax/source/fastparser/fshelper.cxx: Implement write() methods. 2008-11-18 20:43:50 +0100 kendy r263852 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> making singleUnknownElement and singleFastElement be a uno method 2008-11-18 20:43:27 +0100 kendy r263851 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> added NS versions of fast methods 2008-11-18 20:43:05 +0100 kendy r263850 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> support namespaces in attribute names as well 2008-11-18 20:42:44 +0100 kendy r263849 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> fix content types writting after it got broken somewhere between m4 and m19 when Version was added to properties between MediaType and FullPath 2008-11-18 20:42:21 +0100 kendy r263848 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> fixed FastAttributeList::getUnknownAttributes where a std::for_each wasn't working properly (because of ++ in bind) 2008-11-18 20:41:55 +0100 kendy r263847 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> fix attributes list and its reference creation so that the instance can be freed in Reference::release 2008-11-18 20:41:33 +0100 kendy r263846 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> export tokens added xmlns to tokens 2008-11-18 20:41:08 +0100 kendy r263845 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> instantiate token handler support xml namespaces 2008-11-18 20:40:45 +0100 kendy r263844 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> added method to XmlFilterBase which opens stream with media type and returns newly created fast serializer shared ptr 2008-11-18 20:40:23 +0100 kendy r263843 : #i96316# OPC for export filters From: Jonathan Pryor <jpryor@novell.com> * oox/workben/ooxml-export-notes.txt: Flush. 2008-11-18 20:40:01 +0100 kendy r263842 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> beefing up the fshelper 2008-11-18 20:39:40 +0100 kendy r263841 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> export ChartConverterClass - it is now needed in XmlFilterBase 2008-11-18 20:39:17 +0100 kendy r263840 : #i96316# OPC for export filters From: Jan Holesovsky <kendy@suse.cz> fastsax.uno.so was renamed to libfastsaxlx.so 2008-11-18 20:38:54 +0100 kendy r263839 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> trying to do some useful stuff with the serializer 2008-11-18 20:38:26 +0100 kendy r263838 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> use relation id names similar to ms office 2008-11-18 20:38:03 +0100 kendy r263837 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> fixed typo in namespace url 2008-11-18 20:37:38 +0100 kendy r263836 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> added 2 new methods to XmlFilterBase for adding relations to base storage and to output streams 2008-11-18 20:37:15 +0100 kendy r263835 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> let writable stream handle relation id's new id can be queried by asking for property "RelId" fixed another issue with writing relations of writable stream - the same one I fixed lately for storages - looks like another cut'n'pasted code :( 2008-11-18 20:36:48 +0100 kendy r263834 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> trying to avoid char* -> OUString and back conversions 2008-11-18 20:36:26 +0100 kendy r263833 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> added commit methods to StorageBase and FilterBase to make things easier 2008-11-18 20:35:58 +0100 kendy r263832 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> added new openOutputStream method to XmlFilterBase to open output stream of given mediat type (which is then saved to [Content_Types.xml] updated pptx export filter 2008-11-18 20:35:36 +0100 kendy r263831 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> some casts to make compiler happy 2008-11-18 20:35:13 +0100 kendy r263830 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> trying to make the fast serializer a bit less bloated 2008-11-18 20:34:51 +0100 kendy r263829 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> do not get out of bounds of sequence do not overwrite the id tag 2008-11-18 20:34:29 +0100 kendy r263828 : #i96316# OPC for export filters From: Jonathan Pryor <jpryor@novell.com> Notes for trace output for the shared string table. * oox/workben/ooxml-export-notes.txt: Flush. 2008-11-18 20:34:07 +0100 kendy r263827 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> added ifdefs to fshelper.hxx to avoid problems when including more than once fixed the constructor namespace added export.map and made FastSerializerHelper class global 2008-11-18 20:33:44 +0100 kendy r263826 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> defined OOXLIB and FASTSAXLIB variables to be used in makefiles 2008-11-18 20:33:18 +0100 kendy r263825 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> added constructor and added fshelper.obj to the makefile.mk 2008-11-18 20:32:56 +0100 kendy r263824 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> added fast serializer helper files (not implemented yet) make the fastsax a shared library (fastsax.uno.so --> libfastsaxlx.so) deliver the fast serializer header 2008-11-18 20:32:34 +0100 kendy r263823 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> add fast serializer to the uno component 2008-11-18 20:32:12 +0100 kendy r263822 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> moved uno service and implementation names to headers 2008-11-18 20:31:46 +0100 kendy r263821 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> split fastparser.cxx to fastparser.hxx with class declaration, fastparser.cxx with implementation and facreg.cxx with uno component implementation 2008-11-18 20:31:19 +0100 kendy r263820 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> export storage base class, remove old proof code from xml filter base 2008-11-18 20:30:57 +0100 kendy r263819 : #i96316# OPC for export filters From: Radek Doulik <rodo@novell.com> exported filter base and zipstorage to be used in other module's filters 2008-11-18 20:30:35 +0100 kendy r263818 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> make the FastSerializer as UNO service 2008-11-18 20:30:13 +0100 kendy r263817 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> write out the attributes too 2008-11-18 20:29:51 +0100 kendy r263816 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> some more changes to the fastserializer Originally this also duplicated the offapi changes in unoxml; but the unoxml files were removed recently ;-) 2008-11-18 20:29:24 +0100 kendy r263815 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> move the fastserializer from oox module to sax module 2008-11-18 20:29:01 +0100 kendy r263814 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> Adding a method to XFastAttributeList, in order to get the fast attributes along with unknown ones 2008-11-18 20:28:38 +0100 kendy r263813 : #i96316# OPC for export filters From: Fridrich Strba <fstrba@novell.com> refactor the serializer 2008-11-18 20:28:16 +0100 kendy r263812 : #i95759# docx/xlsx/pptx export filters From: Fridrich Strba <fstrba@novell.com> stuffing the serializer a bit more 2008-11-18 20:25:31 +0100 kendy r263811 : #i95759# docx/xlsx/pptx export filters From: Jan Holesovsky <kendy@suse.cz> More explicit pointers to the export code. 2008-11-18 20:25:04 +0100 kendy r263810 : #i95759# docx/xlsx/pptx export filters From: Fridrich Strba <fstrba@novell.com> adding and removing files up and down 2008-11-18 20:24:42 +0100 kendy r263809 : #i95759# docx/xlsx/pptx export filters From: Fridrich Strba <fstrba@novell.com> adding fastserializer dummy inplementation 2008-11-18 20:24:19 +0100 kendy r263808 : #i95759# docx/xlsx/pptx export filters From: Jan Holesovsky <kendy@suse.cz> Escher pointers. 2008-11-18 20:23:56 +0100 kendy r263807 : #i95759# docx/xlsx/pptx export filters From: Fridrich Strba <fstrba@novell.com> removing the unnecessary FastSerializer service 2008-11-18 20:23:34 +0100 kendy r263806 : #i95759# docx/xlsx/pptx export filters From: Radek Doulik <rodo@novell.com> XStream instead of XOutputStream for OOXML export filter. 2008-04-25 Radek Doulik <rodo@novell.com> * oox/workben/ooxml-export-notes.txt: added odp export trace * oox/source/core/xmlfilterbase.cxx (implCreateStorage): added test code to create test storage and stream, also committing changes here * oox/inc/oox/helper/olestorage.* (class OleStorage): as below * oox/inc/oox/helper/zipstorage.*: as below * oox/inc/oox/helper/storagebase.* (class StorageBase): let export constructor use XStream instead of XOutputStream, change member type as well * oox/inc/oox/core/xmlfilterbase.* (class XmlFilterBase): as below * oox/inc/oox/core/binaryfilterbase.* (class BinaryFilterBase): as below * oox/inc/oox/core/filterbase.*: changed implCreateStorage method to get XStream instead of XOutputStream * sfx2/source/doc/objstor.cxx (ExportTo): added StreamForOutput XStream to media descriptor properties for OOXML export filter * comphelper/source/misc/mediadescriptor.cxx (PROP_STREAMFOROUTPUT): added StreamForOutput property * oox/source/helper/zipstorage.cxx (ZipStorage): open storage with OFOPXMLFormat * oox/source/helper/zipstorage.cxx (implOpenSubStorage): added implementation for export * oox/source/core/filterbase.cxx (setMediaDescriptor): add input stream only on import 2008-11-18 20:23:07 +0100 kendy r263805 : #i95759# docx/xlsx/pptx export filters From: Fridrich Strba <fstrba@novell.com> add FastSerializer Service 2008-11-18 20:22:45 +0100 kendy r263804 : #i95759# docx/xlsx/pptx export filters From: Fridrich Strba <fstrba@novell.com> add FastSerializer service 2008-11-18 20:22:23 +0100 kendy r263803 : #i95759# docx/xlsx/pptx export filters From: Fridrich Strba <fstrba@novell.com> adapting the makefile.mk to build the XFastSerializer 2008-11-18 20:22:02 +0100 kendy r263802 : #i95759# docx/xlsx/pptx export filters From: Fridrich Strba <fstrba@novell.com> Adding the XFastSerializer interface 2008-11-18 20:21:39 +0100 kendy r263801 : #i95759# docx/xlsx/pptx export filters From: Jan Holesovsky <kendy@suse.cz> Added pointers to export code of binary filters. 2008-11-18 20:21:13 +0100 kendy r263800 : #i95759# docx/xlsx/pptx export filters From: Jan Holesovsky <kendy@suse.cz> Implementation notes: affected modules. [Started the implementation notes by asking Fridrich ;-)] 2008-11-18 20:20:51 +0100 kendy r263799 : #i95759# docx/xlsx/pptx export filters From: Radek Doulik <rodo@novell.com> Initial work on ooxml export * oox/source/helper/zipstorage.cxx (implOpenOutputStream): added prototype implementation (ZipStorage): this constructor needs to be implemented (on output stream)
-rw-r--r--sc/inc/addincol.hxx3
-rw-r--r--sc/inc/address.hxx36
-rw-r--r--sc/inc/arealink.hxx3
-rw-r--r--sc/inc/attrib.hxx4
-rw-r--r--sc/inc/autoform.hxx10
-rw-r--r--sc/inc/callform.hxx14
-rw-r--r--sc/inc/cell.hxx11
-rw-r--r--sc/inc/cellform.hxx3
-rw-r--r--sc/inc/cellsuno.hxx1
-rw-r--r--sc/inc/chartarr.hxx12
-rw-r--r--sc/inc/chartlis.hxx8
-rw-r--r--sc/inc/chgtrack.hxx35
-rw-r--r--sc/inc/chgviset.hxx3
-rw-r--r--sc/inc/collect.hxx114
-rw-r--r--sc/inc/column.hxx6
-rw-r--r--sc/inc/compiler.hxx18
-rw-r--r--sc/inc/compressedarray.hxx15
-rw-r--r--sc/inc/conditio.hxx7
-rw-r--r--sc/inc/dbcolect.hxx27
-rw-r--r--sc/inc/detfunc.hxx3
-rw-r--r--sc/inc/dociter.hxx3
-rw-r--r--sc/inc/docpool.hxx3
-rw-r--r--sc/inc/document.hxx373
-rw-r--r--sc/inc/dpcachetable.hxx6
-rw-r--r--sc/inc/dpdimsave.hxx13
-rw-r--r--sc/inc/dpgroup.hxx15
-rw-r--r--sc/inc/dpobject.hxx16
-rw-r--r--sc/inc/dpoutput.hxx4
-rw-r--r--sc/inc/dpsave.hxx54
-rw-r--r--sc/inc/dpsdbtab.hxx2
-rw-r--r--sc/inc/dpshttab.hxx5
-rw-r--r--sc/inc/dptabdat.hxx6
-rw-r--r--sc/inc/drwlayer.hxx2
-rw-r--r--sc/inc/editutil.hxx6
-rw-r--r--sc/inc/filter.hxx90
-rw-r--r--sc/inc/filtopt.hxx5
-rw-r--r--sc/inc/filtuno.hxx2
-rw-r--r--sc/inc/global.hxx50
-rw-r--r--sc/inc/miscuno.hxx4
-rw-r--r--sc/inc/olinetab.hxx12
-rw-r--r--sc/inc/pivot.hxx34
-rw-r--r--sc/inc/postit.hxx3
-rw-r--r--sc/inc/progress.hxx3
-rw-r--r--sc/inc/rangenam.hxx43
-rw-r--r--sc/inc/rangeutl.hxx2
-rw-r--r--sc/inc/refdata.hxx25
-rw-r--r--sc/inc/refreshtimer.hxx7
-rw-r--r--sc/inc/scextopt.hxx2
-rw-r--r--sc/inc/scmatrix.hxx3
-rw-r--r--sc/inc/table.hxx6
-rw-r--r--sc/inc/textuno.hxx2
-rw-r--r--sc/inc/token.hxx92
-rw-r--r--sc/inc/tokenarray.hxx11
-rw-r--r--sc/inc/unitconv.hxx4
-rw-r--r--sc/inc/userlist.hxx12
-rw-r--r--sc/inc/validat.hxx9
-rw-r--r--sc/prj/build.lst2
-rw-r--r--sc/prj/d.lst3
-rw-r--r--sc/source/core/data/attrib.cxx2
-rw-r--r--sc/source/core/data/cell.cxx14
-rw-r--r--sc/source/core/data/cell2.cxx26
-rw-r--r--sc/source/core/data/column3.cxx8
-rw-r--r--sc/source/core/data/conditio.cxx12
-rw-r--r--sc/source/core/data/documen3.cxx8
-rw-r--r--sc/source/core/data/documen4.cxx4
-rw-r--r--sc/source/core/data/documen5.cxx6
-rw-r--r--sc/source/core/data/document.cxx8
-rw-r--r--sc/source/core/data/dpcachetable.cxx8
-rw-r--r--sc/source/core/data/dpdimsave.cxx2
-rw-r--r--sc/source/core/data/dpgroup.cxx20
-rw-r--r--sc/source/core/data/dpobject.cxx12
-rw-r--r--sc/source/core/data/dpoutput.cxx4
-rw-r--r--sc/source/core/data/dpsdbtab.cxx2
-rw-r--r--sc/source/core/data/dpshttab.cxx2
-rw-r--r--sc/source/core/data/dptabsrc.cxx10
-rw-r--r--sc/source/core/data/global.cxx5
-rw-r--r--sc/source/core/data/olinetab.cxx8
-rw-r--r--sc/source/core/data/pivot.cxx16
-rw-r--r--sc/source/core/data/pivot2.cxx16
-rw-r--r--sc/source/core/data/table2.cxx2
-rw-r--r--sc/source/core/data/table3.cxx12
-rw-r--r--sc/source/core/data/table4.cxx8
-rw-r--r--sc/source/core/data/table6.cxx4
-rw-r--r--sc/source/core/data/validat.cxx6
-rw-r--r--sc/source/core/inc/interpre.hxx12
-rw-r--r--sc/source/core/inc/refupdat.hxx12
-rw-r--r--sc/source/core/tool/address.cxx6
-rw-r--r--sc/source/core/tool/autoform.cxx8
-rw-r--r--sc/source/core/tool/callform.cxx22
-rw-r--r--sc/source/core/tool/chartarr.cxx6
-rw-r--r--sc/source/core/tool/chartlis.cxx10
-rw-r--r--sc/source/core/tool/chgtrack.cxx16
-rw-r--r--sc/source/core/tool/collect.cxx124
-rw-r--r--sc/source/core/tool/compiler.cxx117
-rw-r--r--sc/source/core/tool/consoli.cxx4
-rw-r--r--sc/source/core/tool/dbcolect.cxx14
-rw-r--r--sc/source/core/tool/interpr2.cxx22
-rw-r--r--sc/source/core/tool/interpr4.cxx18
-rw-r--r--sc/source/core/tool/rangenam.cxx40
-rw-r--r--sc/source/core/tool/refdata.cxx30
-rw-r--r--sc/source/core/tool/refupdat.cxx10
-rw-r--r--sc/source/core/tool/token.cxx135
-rw-r--r--sc/source/core/tool/unitconv.cxx4
-rw-r--r--sc/source/core/tool/userlist.cxx6
-rw-r--r--sc/source/filter/dif/difexp.cxx5
-rw-r--r--sc/source/filter/dif/difimp.cxx3
-rw-r--r--sc/source/filter/dif/makefile.mk1
-rw-r--r--sc/source/filter/excel/biffdump.cxx4
-rw-r--r--sc/source/filter/excel/excdoc.cxx299
-rw-r--r--sc/source/filter/excel/excel.cxx54
-rw-r--r--sc/source/filter/excel/excform.cxx34
-rw-r--r--sc/source/filter/excel/excform8.cxx32
-rw-r--r--sc/source/filter/excel/excrecds.cxx164
-rw-r--r--sc/source/filter/excel/exctools.cxx2
-rw-r--r--sc/source/filter/excel/expop2.cxx74
-rw-r--r--sc/source/filter/excel/frmbase.cxx4
-rw-r--r--sc/source/filter/excel/makefile.mk1
-rw-r--r--sc/source/filter/excel/ooxml-export-TODO.txt148
-rw-r--r--sc/source/filter/excel/tokstack.cxx32
-rw-r--r--sc/source/filter/excel/xecontent.cxx216
-rw-r--r--sc/source/filter/excel/xeescher.cxx94
-rw-r--r--sc/source/filter/excel/xeformula.cxx32
-rw-r--r--sc/source/filter/excel/xehelper.cxx4
-rw-r--r--sc/source/filter/excel/xelink.cxx14
-rw-r--r--sc/source/filter/excel/xename.cxx68
-rw-r--r--sc/source/filter/excel/xepage.cxx109
-rw-r--r--sc/source/filter/excel/xepivot.cxx62
-rw-r--r--sc/source/filter/excel/xerecord.cxx135
-rw-r--r--sc/source/filter/excel/xeroot.cxx4
-rw-r--r--sc/source/filter/excel/xestream.cxx395
-rw-r--r--sc/source/filter/excel/xestring.cxx61
-rw-r--r--sc/source/filter/excel/xestyle.cxx564
-rw-r--r--sc/source/filter/excel/xetable.cxx378
-rw-r--r--sc/source/filter/excel/xeview.cxx111
-rw-r--r--sc/source/filter/excel/xladdress.cxx2
-rw-r--r--sc/source/filter/excel/xlescher.cxx4
-rw-r--r--sc/source/filter/excel/xlformula.cxx6
-rw-r--r--sc/source/filter/excel/xlpivot.cxx4
-rw-r--r--sc/source/filter/excel/xlroot.cxx1
-rw-r--r--sc/source/filter/excel/xlstyle.cxx2
-rw-r--r--sc/source/filter/excel/xltools.cxx4
-rw-r--r--sc/source/filter/ftools/ftools.cxx12
-rw-r--r--sc/source/filter/ftools/makefile.mk1
-rw-r--r--sc/source/filter/html/htmlexp.cxx6
-rw-r--r--sc/source/filter/html/htmlimp.cxx13
-rw-r--r--sc/source/filter/html/makefile.mk1
-rw-r--r--sc/source/filter/inc/XclExpChangeTrack.hxx2
-rw-r--r--sc/source/filter/inc/eeimport.hxx (renamed from sc/inc/eeimport.hxx)23
-rw-r--r--sc/source/filter/inc/excdoc.hxx6
-rw-r--r--sc/source/filter/inc/excform.hxx8
-rw-r--r--sc/source/filter/inc/excrecds.hxx24
-rw-r--r--sc/source/filter/inc/exp_op.hxx15
-rw-r--r--sc/source/filter/inc/fapihelper.hxx1
-rw-r--r--sc/source/filter/inc/formel.hxx16
-rw-r--r--sc/source/filter/inc/fprogressbar.hxx1
-rw-r--r--sc/source/filter/inc/ftools.hxx40
-rw-r--r--sc/source/filter/inc/htmlimp.hxx (renamed from sc/inc/htmlimp.hxx)4
-rw-r--r--sc/source/filter/inc/lotform.hxx8
-rw-r--r--sc/source/filter/inc/lotrange.hxx2
-rw-r--r--sc/source/filter/inc/namebuff.hxx12
-rw-r--r--sc/source/filter/inc/qproform.hxx2
-rw-r--r--sc/source/filter/inc/rtfimp.hxx (renamed from sc/inc/rtfimp.hxx)0
-rw-r--r--sc/source/filter/inc/scflt.hxx60
-rw-r--r--sc/source/filter/inc/tokstack.hxx14
-rw-r--r--sc/source/filter/inc/xcl97rec.hxx18
-rw-r--r--sc/source/filter/inc/xechart.hxx2
-rw-r--r--sc/source/filter/inc/xecontent.hxx15
-rw-r--r--sc/source/filter/inc/xeescher.hxx24
-rw-r--r--sc/source/filter/inc/xelink.hxx10
-rw-r--r--sc/source/filter/inc/xename.hxx3
-rw-r--r--sc/source/filter/inc/xepage.hxx6
-rw-r--r--sc/source/filter/inc/xepivot.hxx5
-rw-r--r--sc/source/filter/inc/xerecord.hxx118
-rw-r--r--sc/source/filter/inc/xestream.hxx105
-rw-r--r--sc/source/filter/inc/xestring.hxx5
-rw-r--r--sc/source/filter/inc/xestyle.hxx52
-rw-r--r--sc/source/filter/inc/xetable.hxx21
-rw-r--r--sc/source/filter/inc/xeview.hxx8
-rw-r--r--sc/source/filter/inc/xlconst.hxx7
-rw-r--r--sc/source/filter/inc/xlroot.hxx3
-rw-r--r--sc/source/filter/lotus/export.cxx2
-rw-r--r--sc/source/filter/lotus/lotform.cxx8
-rw-r--r--sc/source/filter/lotus/lotus.cxx8
-rw-r--r--sc/source/filter/lotus/makefile.mk1
-rw-r--r--sc/source/filter/lotus/tool.cxx16
-rw-r--r--sc/source/filter/qpro/makefile.mk1
-rw-r--r--sc/source/filter/qpro/qpro.cxx2
-rw-r--r--sc/source/filter/qpro/qproform.cxx6
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx4
-rw-r--r--sc/source/filter/rtf/makefile.mk1
-rw-r--r--sc/source/filter/rtf/rtfexp.cxx4
-rw-r--r--sc/source/filter/rtf/rtfimp.cxx8
-rw-r--r--sc/source/filter/starcalc/makefile.mk1
-rw-r--r--sc/source/filter/starcalc/scflt.cxx12
-rw-r--r--sc/source/filter/xcl97/XclExpChangeTrack.cxx2
-rw-r--r--sc/source/filter/xcl97/makefile.mk1
-rw-r--r--sc/source/filter/xcl97/xcl97esc.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx120
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx4
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx6
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx8
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx6
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx3
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx2
-rw-r--r--sc/source/ui/docshell/arealink.cxx4
-rw-r--r--sc/source/ui/docshell/docsh.cxx30
-rw-r--r--sc/source/ui/docshell/docsh6.cxx2
-rw-r--r--sc/source/ui/docshell/docsh8.cxx2
-rw-r--r--sc/source/ui/docshell/impex.cxx92
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx6
-rw-r--r--sc/source/ui/formdlg/funcutl.cxx4
-rw-r--r--sc/source/ui/inc/areasave.hxx8
-rw-r--r--sc/source/ui/inc/autofmt.hxx10
-rw-r--r--sc/source/ui/inc/dbfunc.hxx4
-rw-r--r--sc/source/ui/inc/filtdlg.hxx4
-rw-r--r--sc/source/ui/inc/inputhdl.hxx6
-rw-r--r--sc/source/ui/inc/pfiltdlg.hxx4
-rw-r--r--sc/source/ui/inc/scuiautofmt.hxx2
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx30
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx2
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx40
-rw-r--r--sc/source/ui/miscdlgs/highred.cxx2
-rw-r--r--sc/source/ui/miscdlgs/scuiautofmt.cxx2
-rw-r--r--sc/source/ui/miscdlgs/textdlgs.cxx4
-rw-r--r--sc/source/ui/navipi/navipi.cxx8
-rw-r--r--sc/source/ui/pagedlg/tptable.cxx2
-rw-r--r--sc/source/ui/undo/areasave.cxx8
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx4
-rw-r--r--sc/source/ui/unoobj/docuno.cxx2
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx2
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx6
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx14
-rw-r--r--sc/source/ui/view/colrowba.cxx2
-rw-r--r--sc/source/ui/view/dbfunc3.cxx22
-rw-r--r--sc/source/ui/view/gridwin.cxx6
-rw-r--r--sc/source/ui/view/output.cxx4
-rw-r--r--sc/source/ui/view/preview.cxx2
-rw-r--r--sc/source/ui/view/printfun.cxx2
-rw-r--r--sc/source/ui/view/tabcont.cxx1
-rw-r--r--sc/source/ui/view/tabview.cxx2
-rw-r--r--sc/source/ui/view/viewfun5.cxx2
-rw-r--r--sc/util/makefile.mk60
-rw-r--r--sc/util/scfilt.map6
249 files changed, 5046 insertions, 1521 deletions
diff --git a/sc/inc/addincol.hxx b/sc/inc/addincol.hxx
index 81286ab24938..1eb9c3051a14 100644
--- a/sc/inc/addincol.hxx
+++ b/sc/inc/addincol.hxx
@@ -42,6 +42,7 @@
#include <tools/string.hxx>
#include <i18npool/lang.h>
#include <rtl/ustring.h>
+#include "scdllapi.h"
#ifndef SC_SCMATRIX_HXX
#include "scmatrix.hxx"
@@ -142,7 +143,7 @@ public:
//------------------------------------------------------------------------
-class ScUnoAddInCollection
+class SC_DLLPUBLIC ScUnoAddInCollection
{
private:
long nFuncCount;
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 6105b1da00e4..b3cb45a316f6 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -248,7 +248,7 @@ inline SCTAB SanitizeTab( SCTAB nTab, SCTAB nMaxTab )
// === ScAddress =============================================================
-class SC_DLLPUBLIC ScAddress
+class ScAddress
{
private:
SCROW nRow;
@@ -290,7 +290,7 @@ public:
Details( const ScDocument* pDoc, const ScAddress & rAddr );
void SetPos( const ScDocument* pDoc, const ScAddress & rAddr );
};
- static const Details detailsOOOa1;
+ SC_DLLPUBLIC static const Details detailsOOOa1;
struct ExternalInfo
{
@@ -331,17 +331,17 @@ public:
inline void GetVars( SCCOL& nColP, SCROW& nRowP, SCTAB& nTabP ) const
{ nColP = nCol; nRowP = nRow; nTabP = nTab; }
- USHORT Parse( const String&, ScDocument* = NULL,
+ USC_DLLPUBLIC USHORT Parse( const String&, ScDocument* = NULL,
const Details& rDetails = detailsOOOa1,
ExternalInfo* pExtInfo = NULL,
const ::com::sun::star::uno::Sequence<
const ::com::sun::star::sheet::ExternalLinkInfo > * pExternalLinks = NULL );
- void Format( String&, USHORT = 0, ScDocument* = NULL,
+ SC_DLLPUBLIC void Format( String&, USHORT = 0, ScDocument* = NULL,
const Details& rDetails = detailsOOOa1) const;
// The document for the maximum defined sheet number
- bool Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScDocument* =NULL );
+ SC_DLLPUBLIC bool Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScDocument* =NULL );
inline bool operator==( const ScAddress& r ) const;
inline bool operator!=( const ScAddress& r ) const;
inline bool operator<( const ScAddress& r ) const;
@@ -449,7 +449,7 @@ inline size_t ScAddress::hash() const
// === ScRange ===============================================================
-class SC_DLLPUBLIC ScRange
+class ScRange
{
public:
ScAddress aStart, aEnd;
@@ -485,9 +485,9 @@ public:
USHORT ParseAny( const String&, ScDocument* = NULL,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 );
- USHORT ParseCols( const String&, ScDocument* = NULL,
+ SC_DLLPUBLIC USHORT ParseCols( const String&, ScDocument* = NULL,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 );
- USHORT ParseRows( const String&, ScDocument* = NULL,
+ SC_DLLPUBLIC USHORT ParseRows( const String&, ScDocument* = NULL,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 );
/** Parse an Excel style reference up to and including the sheet name
@@ -516,16 +516,16 @@ public:
const ::com::sun::star::uno::Sequence<
const ::com::sun::star::sheet::ExternalLinkInfo > * pExternalLinks = NULL );
- void Format( String&, USHORT = 0, ScDocument* = NULL,
+ SC_DLLPUBLIC void Format( String&, USHORT = 0, ScDocument* = NULL,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 ) const;
inline void GetVars( SCCOL& nCol1, SCROW& nRow1, SCTAB& nTab1,
SCCOL& nCol2, SCROW& nRow2, SCTAB& nTab2 ) const;
// The document for the maximum defined sheet number
- bool Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScDocument* =NULL );
- void Justify();
- void ExtendTo( const ScRange& rRange );
- bool Intersects( const ScRange& ) const; // do two ranges intersect?
+ SC_DLLPUBLIC bool Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScDocument* =NULL );
+ SC_DLLPUBLIC void Justify();
+ SC_DLLPUBLIC void ExtendTo( const ScRange& rRange );
+ SC_DLLPUBLIC bool Intersects( const ScRange& ) const; // do two ranges intersect?
inline bool operator==( const ScRange& r ) const;
inline bool operator!=( const ScRange& r ) const;
inline bool operator<( const ScRange& r ) const;
@@ -776,19 +776,19 @@ bool ConvertDoubleRef(ScDocument* pDoc, const String& rRefString,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1);
/// append alpha representation of column to buffer
-SC_DLLPUBLIC void ColToAlpha( rtl::OUStringBuffer& rBuffer, SCCOL nCol);
+SC_DLLPUBLIC void ScColToAlpha( rtl::OUStringBuffer& rBuffer, SCCOL nCol);
-inline void ColToAlpha( String& rStr, SCCOL nCol)
+inline void ScColToAlpha( String& rStr, SCCOL nCol)
{
rtl::OUStringBuffer aBuf(2);
- ColToAlpha( aBuf, nCol);
+ ScColToAlpha( aBuf, nCol);
rStr.Append( aBuf.getStr(), static_cast<xub_StrLen>(aBuf.getLength()));
}
-inline String ColToAlpha( SCCOL nCol )
+inline String ScColToAlpha( SCCOL nCol )
{
rtl::OUStringBuffer aBuf(2);
- ColToAlpha( aBuf, nCol);
+ ScColToAlpha( aBuf, nCol);
return aBuf.makeStringAndClear();
}
diff --git a/sc/inc/arealink.hxx b/sc/inc/arealink.hxx
index 57fc52593bcc..ad74f27f651b 100644
--- a/sc/inc/arealink.hxx
+++ b/sc/inc/arealink.hxx
@@ -35,13 +35,14 @@
#include "refreshtimer.hxx"
#include "address.hxx"
#include <sfx2/lnkbase.hxx>
+#include "scdllapi.h"
class ScDocShell;
class SfxObjectShell;
class AbstractScLinkedAreaDlg;
struct AreaLink_Impl;
-class ScAreaLink : public ::sfx2::SvBaseLink, public ScRefreshTimer
+class SC_DLLPUBLIC ScAreaLink : public ::sfx2::SvBaseLink, public ScRefreshTimer
{
private:
AreaLink_Impl* pImpl;
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index ed8c9719272b..cae72cf30cf5 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -54,11 +54,11 @@
class EditTextObject;
class SvxBorderLine;
-BOOL HasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther );
+BOOL SC_DLLPUBLIC ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther );
//------------------------------------------------------------------------
-class ScMergeAttr: public SfxPoolItem
+class SC_DLLPUBLIC ScMergeAttr: public SfxPoolItem
{
SCsCOL nColMerge;
SCsROW nRowMerge;
diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx
index 7171d8fe1cf4..f8df5e9fa236 100644
--- a/sc/inc/autoform.hxx
+++ b/sc/inc/autoform.hxx
@@ -199,7 +199,7 @@ public:
};
-class SC_DLLPUBLIC ScAutoFormatData : public DataObject
+class SC_DLLPUBLIC ScAutoFormatData : public ScDataObject
{
private:
String aName;
@@ -224,7 +224,7 @@ public:
ScAutoFormatData( const ScAutoFormatData& rData );
virtual ~ScAutoFormatData();
- virtual DataObject* Clone() const { return new ScAutoFormatData( *this ); }
+ virtual ScDataObject* Clone() const { return new ScAutoFormatData( *this ); }
void SetName( const String& rName ) { aName = rName; nStrResId = USHRT_MAX; }
void GetName( String& rName ) const { rName = aName; }
@@ -262,7 +262,7 @@ public:
#endif
};
-class SC_DLLPUBLIC ScAutoFormat : public SortedCollection
+class SC_DLLPUBLIC ScAutoFormat : public ScSortedCollection
{
private:
BOOL bSaveLater;
@@ -271,9 +271,9 @@ public:
ScAutoFormat( USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE );
ScAutoFormat( const ScAutoFormat& AutoFormat );
virtual ~ScAutoFormat();
- virtual DataObject* Clone() const { return new ScAutoFormat( *this ); }
+ virtual ScDataObject* Clone() const { return new ScAutoFormat( *this ); }
ScAutoFormatData* operator[]( const USHORT nIndex ) const {return (ScAutoFormatData*)At( nIndex );}
- virtual short Compare( DataObject* pKey1, DataObject* pKey2 ) const;
+ virtual short Compare( ScDataObject* pKey1, ScDataObject* pKey2 ) const;
BOOL Load();
BOOL Save();
USHORT FindIndexPerName( const String& rName ) const;
diff --git a/sc/inc/callform.hxx b/sc/inc/callform.hxx
index 9d1f1a20a91c..aee15caab79c 100644
--- a/sc/inc/callform.hxx
+++ b/sc/inc/callform.hxx
@@ -67,7 +67,7 @@ enum ParamType
//------------------------------------------------------------------------
class ModuleData;
-class FuncData : public DataObject
+class FuncData : public ScDataObject
{
friend class FuncCollection;
const ModuleData* pModuleData;
@@ -88,7 +88,7 @@ public:
const ParamType* peType,
ParamType eType);
FuncData(const FuncData& rData);
- virtual DataObject* Clone() const { return new FuncData(*this); }
+ virtual ScDataObject* Clone() const { return new FuncData(*this); }
const String& GetModuleName() const;
const String& GetInternalName() const { return aInternalName; }
@@ -108,15 +108,15 @@ public:
//------------------------------------------------------------------------
-class FuncCollection : public SortedCollection
+class FuncCollection : public ScSortedCollection
{
public:
- FuncCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) : SortedCollection ( nLim, nDel, bDup ) {}
- FuncCollection(const FuncCollection& rFuncCollection) : SortedCollection ( rFuncCollection ) {}
+ FuncCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) : ScSortedCollection ( nLim, nDel, bDup ) {}
+ FuncCollection(const FuncCollection& rFuncCollection) : ScSortedCollection ( rFuncCollection ) {}
- virtual DataObject* Clone() const { return new FuncCollection(*this); }
+ virtual ScDataObject* Clone() const { return new FuncCollection(*this); }
FuncData* operator[]( const USHORT nIndex) const {return (FuncData*)At(nIndex);}
- virtual short Compare(DataObject* pKey1, DataObject* pKey2) const;
+ virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
BOOL SearchFunc( const String& rName, USHORT& rIndex ) const;
};
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index 810288b56600..81250f73165f 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -42,6 +42,7 @@
#include "formularesult.hxx"
#include <rtl/ustrbuf.hxx>
#include <vcl/fontcvt.hxx>
+#include "scdllapi.h"
#define USE_MEMPOOL
#define TEXTWIDTH_DIRTY 0xffff
@@ -62,7 +63,7 @@ class ScPostIt;
class ScMultipleReadHeader;
class ScMultipleWriteHeader;
-class ScBaseCell
+class SC_DLLPUBLIC ScBaseCell
{
protected:
ScPostIt* pNote;
@@ -122,7 +123,7 @@ public:
-class ScValueCell : public ScBaseCell
+class SC_DLLPUBLIC ScValueCell : public ScBaseCell
{
private:
double aValue;
@@ -144,7 +145,7 @@ public:
};
-class ScStringCell : public ScBaseCell
+class SC_DLLPUBLIC ScStringCell : public ScBaseCell
{
private:
String aString;
@@ -168,7 +169,7 @@ public:
};
-class ScEditCell : public ScBaseCell
+class SC_DLLPUBLIC ScEditCell : public ScBaseCell
{
private:
EditTextObject* pData;
@@ -215,7 +216,7 @@ enum ScMatrixMode {
class ScIndexMap;
-class ScFormulaCell : public ScBaseCell, public SvtListener
+class SC_DLLPUBLIC ScFormulaCell : public ScBaseCell, public SvtListener
{
private:
ScFormulaResult aResult;
diff --git a/sc/inc/cellform.hxx b/sc/inc/cellform.hxx
index 232aa848fb37..246f1deb30cd 100644
--- a/sc/inc/cellform.hxx
+++ b/sc/inc/cellform.hxx
@@ -32,6 +32,7 @@
#define SC_CELLFORM_HXX
#include <tools/solar.h>
+#include "scdllapi.h"
class String;
@@ -47,7 +48,7 @@ enum ScForceTextFmt {
//------------------------------------------------------------------------
-class ScCellFormat
+class SC_DLLPUBLIC ScCellFormat
{
public:
static void GetString( ScBaseCell* pCell, ULONG nFormat, String& rString,
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index d5435c9ed684..be44ba964fbb 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -95,6 +95,7 @@
#include <com/sun/star/sheet/XExternalSheetName.hpp>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase3.hxx>
+#include "scdllapi.h"
#ifndef __SGI_STL_VECTOR
#include <vector>
diff --git a/sc/inc/chartarr.hxx b/sc/inc/chartarr.hxx
index 0cce265866c2..e2650c5652c1 100644
--- a/sc/inc/chartarr.hxx
+++ b/sc/inc/chartarr.hxx
@@ -72,7 +72,7 @@ public:
};
-class ScChartArray : public DataObject // nur noch Parameter-Struct
+class SC_DLLPUBLIC ScChartArray : public ScDataObject // nur noch Parameter-Struct
{
String aName;
ScDocument* pDocument;
@@ -92,7 +92,7 @@ public:
ScChartArray( const ScChartArray& rArr );
virtual ~ScChartArray();
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
const ScRangeListRef& GetRangeList() const { return aPositioner.GetRangeList(); }
void SetRangeList( const ScRangeListRef& rNew ) { aPositioner.SetRangeList(rNew); }
@@ -111,14 +111,14 @@ public:
ScMemChart* CreateMemChart();
};
-class ScChartCollection : public Collection
+class ScChartCollection : public ScCollection
{
public:
- ScChartCollection() : Collection( 4,4 ) {}
+ ScChartCollection() : ScCollection( 4,4 ) {}
ScChartCollection( const ScChartCollection& rColl ):
- Collection( rColl ) {}
+ ScCollection( rColl ) {}
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
ScChartArray* operator[](USHORT nIndex) const
{ return (ScChartArray*)At(nIndex); }
diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx
index 81dbbfbc9cc5..33809951005d 100644
--- a/sc/inc/chartlis.hxx
+++ b/sc/inc/chartlis.hxx
@@ -62,7 +62,7 @@ public:
const ScRangeListRef& rRangeListRef );
ScChartListener( const ScChartListener& );
virtual ~ScChartListener();
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
void SetUno( const com::sun::star::uno::Reference< com::sun::star::chart::XChartDataChangeEventListener >& rListener,
const com::sun::star::uno::Reference< com::sun::star::chart::XChartData >& rSource );
@@ -97,7 +97,7 @@ public:
{ return !operator==( r ); }
};
-class ScChartListenerCollection : public StrCollection
+class ScChartListenerCollection : public ScStrCollection
{
private:
Timer aTimer;
@@ -108,12 +108,12 @@ private:
// not implemented
ScChartListenerCollection& operator=( const ScChartListenerCollection& );
- using StrCollection::operator==;
+ using ScStrCollection::operator==;
public:
ScChartListenerCollection( ScDocument* pDoc );
ScChartListenerCollection( const ScChartListenerCollection& );
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
virtual ~ScChartListenerCollection();
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index f455954389c8..c7c35fdc8a3c 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -43,6 +43,7 @@
#include "global.hxx"
#include "bigrange.hxx"
#include "collect.hxx"
+#include "scdllapi.h"
#ifdef SC_CHGTRACK_CXX
// core/inc
@@ -423,7 +424,7 @@ public:
BOOL IsRejectable() const;
const ScBigRange& GetBigRange() const { return aBigRange; }
- DateTime GetDateTime() const; // local time
+ SC_DLLPUBLIC DateTime GetDateTime() const; // local time
const DateTime& GetDateTimeUTC() const // UTC time
{ return aDateTime; }
const String& GetUser() const { return aUser; }
@@ -729,7 +730,7 @@ public:
{ return pFirstCell; } // only to use in the XML export
const ScBigRange& GetFromRange() const { return aFromRange; }
- void GetDelta( INT32& nDx, INT32& nDy, INT32& nDz ) const;
+ SC_DLLPUBLIC void GetDelta( INT32& nDx, INT32& nDy, INT32& nDz ) const;
virtual void GetDescription( String&, ScDocument*,
BOOL bSplitRange = FALSE, bool bWarning = true ) const;
@@ -1066,7 +1067,7 @@ class ScChangeTrack : public SfxListener
ScChangeTrackMsgQueue aMsgQueue;
ScChangeTrackMsgStack aMsgStackTmp;
ScChangeTrackMsgStack aMsgStackFinal;
- StrCollection aUserCollection;
+ ScStrCollection aUserCollection;
String aUser;
Link aModifiedLink;
ScRange aInDeleteRange;
@@ -1146,7 +1147,7 @@ class ScChangeTrack : public SfxListener
void UpdateReference( ScChangeAction** ppFirstAction,
ScChangeAction* pAct, BOOL bUndo );
void Append( ScChangeAction* pAppend, ULONG nAction );
- void AppendDeleteRange( const ScRange&,
+ SC_DLLPUBLIC void AppendDeleteRange( const ScRange&,
ScDocument* pRefDoc, SCsTAB nDz,
ULONG nRejectingInsert );
void AppendOneDeleteRange( const ScRange& rOrgRange,
@@ -1192,9 +1193,9 @@ public:
return static_cast< SCSIZE >( nRow / nContentRowsPerSlot );
}
- ScChangeTrack( ScDocument* );
+ SC_DLLPUBLIC ScChangeTrack( ScDocument* );
ScChangeTrack( ScDocument*,
- const StrCollection& ); // only to use in the XML import
+ const ScStrCollection& ); // only to use in the XML import
virtual ~ScChangeTrack();
void Clear();
@@ -1229,9 +1230,9 @@ public:
BOOL IsInDeleteTop() const { return bInDeleteTop; }
BOOL IsInDeleteUndo() const { return bInDeleteUndo; }
BOOL IsInPasteCut() const { return bInPasteCut; }
- void SetUser( const String& );
+ SC_DLLPUBLIC void SetUser( const String& );
const String& GetUser() const { return aUser; }
- const StrCollection& GetUserCollection() const
+ const ScStrCollection& GetUserCollection() const
{ return aUserCollection; }
ScDocument* GetDocument() const { return pDoc; }
// for import filter
@@ -1253,7 +1254,7 @@ public:
// pRefDoc may be NULL => no lookup of contents
// => no generation of deleted contents
- void AppendDeleteRange( const ScRange&,
+ SC_DLLPUBLIC void AppendDeleteRange( const ScRange&,
ScDocument* pRefDoc,
ULONG& nStartAction, ULONG& nEndAction,
SCsTAB nDz = 0 );
@@ -1299,7 +1300,7 @@ public:
// The action is returned and may be used to
// set user name, description, date/time et al.
// Takes ownership of the cells!
- ScChangeActionContent* AppendContentOnTheFly( const ScAddress& rPos,
+ SC_DLLPUBLIC ScChangeActionContent* AppendContentOnTheFly( const ScAddress& rPos,
ScBaseCell* pOldCell,
ScBaseCell* pNewCell,
ULONG nOldFormat = 0,
@@ -1317,11 +1318,11 @@ public:
const String& rNewValue,
ScBaseCell* pOldCell );
- void AppendInsert( const ScRange& );
+ SC_DLLPUBLIC void AppendInsert( const ScRange& );
// pRefDoc may be NULL => no lookup of contents
// => no generation of deleted contents
- void AppendMove( const ScRange& rFromRange,
+ SC_DLLPUBLIC void AppendMove( const ScRange& rFromRange,
const ScRange& rToRange,
ScDocument* pRefDoc );
@@ -1342,7 +1343,7 @@ public:
pLastCutMove;
}
- void Undo( ULONG nStartAction, ULONG nEndAction );
+ SC_DLLPUBLIC void Undo( ULONG nStartAction, ULONG nEndAction );
// fuer MergeDocument, Referenzen anpassen,
//! darf nur in einem temporaer geoeffneten
@@ -1365,7 +1366,7 @@ public:
// Deletes einer Reihe gelistet.
// Mit bAllFlat werden auch alle Abhaengigen
// der Abhaengigen flach eingefuegt.
- void GetDependents( ScChangeAction*,
+ SC_DLLPUBLIC void GetDependents( ScChangeAction*,
ScChangeActionTable&,
BOOL bListMasterDelete = FALSE,
BOOL bAllFlat = FALSE ) const;
@@ -1374,7 +1375,7 @@ public:
BOOL Reject( ScChangeAction* );
// Accept visible Action (und abhaengige)
- BOOL Accept( ScChangeAction* );
+ SC_DLLPUBLIC BOOL Accept( ScChangeAction* );
void AcceptAll(); // alle Virgins
BOOL RejectAll(); // alle Virgins
@@ -1397,8 +1398,8 @@ public:
void NotifyModified( ScChangeTrackMsgType eMsgType,
ULONG nStartAction, ULONG nEndAction );
- BOOL Load( SvStream& rStrm, USHORT nVer );
- BOOL Store( SvStream& rStrm );
+ SC_DLLPUBLIC BOOL Load( SvStream& rStrm, USHORT nVer );
+ SC_DLLPUBLIC BOOL Store( SvStream& rStrm );
USHORT GetLoadedFileFormatVersion() const
{ return nLoadedFileFormatVersion; }
diff --git a/sc/inc/chgviset.hxx b/sc/inc/chgviset.hxx
index 7a3c0e3986bf..dda49c8624b1 100644
--- a/sc/inc/chgviset.hxx
+++ b/sc/inc/chgviset.hxx
@@ -33,6 +33,7 @@
#include <tools/datetime.hxx>
#include <tools/string.hxx>
#include "rangelst.hxx"
+#include "scdllapi.h"
enum ScChgsDateMode{ SCDM_DATE_BEFORE=0,SCDM_DATE_SINCE=1,SCDM_DATE_EQUAL=2,
SCDM_DATE_NOTEQUAL=3,SCDM_DATE_BETWEEN=4, SCDM_DATE_SAVE=5,
@@ -44,7 +45,7 @@ namespace utl {
class ScDocument;
-class ScChangeViewSettings
+class SC_DLLPUBLIC ScChangeViewSettings
{
private:
diff --git a/sc/inc/collect.hxx b/sc/inc/collect.hxx
index c5f3d68813ca..855d436f2ff9 100644
--- a/sc/inc/collect.hxx
+++ b/sc/inc/collect.hxx
@@ -49,81 +49,81 @@
class ScDocument;
-class DataObject
+class SC_DLLPUBLIC ScDataObject
{
public:
- DataObject() {}
- virtual ~DataObject();
- virtual DataObject* Clone() const = 0;
+ ScDataObject() {}
+ virtual ~ScDataObject();
+ virtual ScDataObject* Clone() const = 0;
};
-class SC_DLLPUBLIC Collection : public DataObject
+class SC_DLLPUBLIC ScCollection : public ScDataObject
{
protected:
USHORT nCount;
USHORT nLimit;
USHORT nDelta;
- DataObject** pItems;
+ ScDataObject** pItems;
public:
- Collection(USHORT nLim = 4, USHORT nDel = 4);
- Collection(const Collection& rCollection);
- virtual ~Collection();
+ ScCollection(USHORT nLim = 4, USHORT nDel = 4);
+ ScCollection(const ScCollection& rCollection);
+ virtual ~ScCollection();
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
void AtFree(USHORT nIndex);
- void Free(DataObject* pDataObject);
+ void Free(ScDataObject* pScDataObject);
void FreeAll();
- BOOL AtInsert(USHORT nIndex, DataObject* pDataObject);
- virtual BOOL Insert(DataObject* pDataObject);
+ BOOL AtInsert(USHORT nIndex, ScDataObject* pScDataObject);
+ virtual BOOL Insert(ScDataObject* pScDataObject);
- DataObject* At(USHORT nIndex) const;
- virtual USHORT IndexOf(DataObject* pDataObject) const;
+ ScDataObject* At(USHORT nIndex) const;
+ virtual USHORT IndexOf(ScDataObject* pScDataObject) const;
USHORT GetCount() const { return nCount; }
- DataObject* operator[]( const USHORT nIndex) const {return At(nIndex);}
- Collection& operator=( const Collection& rCol );
+ ScDataObject* operator[]( const USHORT nIndex) const {return At(nIndex);}
+ ScCollection& operator=( const ScCollection& rCol );
};
-class SC_DLLPUBLIC SortedCollection : public Collection
+class SC_DLLPUBLIC ScSortedCollection : public ScCollection
{
private:
BOOL bDuplicates;
protected:
- // fuer StrCollection Load/Store
+ // fuer ScStrCollection Load/Store
void SetDups( BOOL bVal ) { bDuplicates = bVal; }
BOOL IsDups() const { return bDuplicates; }
public:
- SortedCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE);
- SortedCollection(const SortedCollection& rSortedCollection) :
- Collection(rSortedCollection),
- bDuplicates(rSortedCollection.bDuplicates) {}
-
- virtual USHORT IndexOf(DataObject* pDataObject) const;
- virtual short Compare(DataObject* pKey1, DataObject* pKey2) const = 0;
- virtual BOOL IsEqual(DataObject* pKey1, DataObject* pKey2) const;
- BOOL Search(DataObject* pDataObject, USHORT& rIndex) const;
- virtual BOOL Insert(DataObject* pDataObject);
- virtual BOOL InsertPos(DataObject* pDataObject, USHORT& nIndex);
-
- BOOL operator==(const SortedCollection& rCmp) const;
+ ScSortedCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE);
+ ScSortedCollection(const ScSortedCollection& rScSortedCollection) :
+ ScCollection(rScSortedCollection),
+ bDuplicates(rScSortedCollection.bDuplicates) {}
+
+ virtual USHORT IndexOf(ScDataObject* pScDataObject) const;
+ virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const = 0;
+ virtual BOOL IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const;
+ BOOL Search(ScDataObject* pScDataObject, USHORT& rIndex) const;
+ virtual BOOL Insert(ScDataObject* pScDataObject);
+ virtual BOOL InsertPos(ScDataObject* pScDataObject, USHORT& nIndex);
+
+ BOOL operator==(const ScSortedCollection& rCmp) const;
};
//------------------------------------------------------------------------
-class StrData : public DataObject
+class StrData : public ScDataObject
{
-friend class StrCollection;
+friend class ScStrCollection;
String aStr;
public:
StrData(const String& rStr) : aStr(rStr) {}
- StrData(const StrData& rData) : DataObject(), aStr(rData.aStr) {}
- virtual DataObject* Clone() const;
+ StrData(const StrData& rData) : ScDataObject(), aStr(rData.aStr) {}
+ virtual ScDataObject* Clone() const;
const String& GetString() const { return aStr; }
- // SetString nur, wenn StrData nicht in StrCollection ist! !!!
+ // SetString nur, wenn StrData nicht in ScStrCollection ist! !!!
// z.B. fuer Searcher
void SetString( const String& rNew ) { aStr = rNew; }
};
@@ -132,27 +132,27 @@ public:
class SvStream;
-class SC_DLLPUBLIC StrCollection : public SortedCollection
+class SC_DLLPUBLIC ScStrCollection : public ScSortedCollection
{
public:
- StrCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) :
- SortedCollection ( nLim, nDel, bDup ) {}
- StrCollection(const StrCollection& rStrCollection) :
- SortedCollection ( rStrCollection ) {}
+ ScStrCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) :
+ ScSortedCollection ( nLim, nDel, bDup ) {}
+ ScStrCollection(const ScStrCollection& rScStrCollection) :
+ ScSortedCollection ( rScStrCollection ) {}
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
StrData* operator[]( const USHORT nIndex) const {return (StrData*)At(nIndex);}
- virtual short Compare(DataObject* pKey1, DataObject* pKey2) const;
+ virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
void Load( SvStream& );
void Store( SvStream& ) const;
};
//------------------------------------------------------------------------
-// TypedStrCollection: wie StrCollection, nur, dass Zahlen vor Strings
+// TypedScStrCollection: wie ScStrCollection, nur, dass Zahlen vor Strings
// sortiert werden
-class TypedStrData : public DataObject
+class TypedStrData : public ScDataObject
{
public:
TypedStrData( const String& rStr, double nVal = 0.0,
@@ -165,21 +165,21 @@ public:
//UNUSED2008-05 BOOL bAllStrings );
TypedStrData( const TypedStrData& rCpy )
- : DataObject(),
+ : ScDataObject(),
aStrValue(rCpy.aStrValue),
nValue(rCpy.nValue),
nStrType(rCpy.nStrType) {}
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
BOOL IsStrData() const { return nStrType != 0; }
const String& GetString() const { return aStrValue; }
double GetValue () const { return nValue; }
private:
- friend class TypedStrCollection;
+ friend class TypedScStrCollection;
#if OLD_PIVOT_IMPLEMENTATION
- friend class PivotStrCollection;
+ friend class PivotScStrCollection;
#endif
String aStrValue;
@@ -187,20 +187,20 @@ private:
USHORT nStrType; // 0 = Value
};
-class SC_DLLPUBLIC TypedStrCollection : public SortedCollection
+class SC_DLLPUBLIC TypedScStrCollection : public ScSortedCollection
{
private:
BOOL bCaseSensitive;
public:
- TypedStrCollection( USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE )
- : SortedCollection( nLim, nDel, bDup ) { bCaseSensitive = FALSE; }
+ TypedScStrCollection( USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE )
+ : ScSortedCollection( nLim, nDel, bDup ) { bCaseSensitive = FALSE; }
- TypedStrCollection( const TypedStrCollection& rCpy )
- : SortedCollection( rCpy ) { bCaseSensitive = rCpy.bCaseSensitive; }
+ TypedScStrCollection( const TypedScStrCollection& rCpy )
+ : ScSortedCollection( rCpy ) { bCaseSensitive = rCpy.bCaseSensitive; }
- virtual DataObject* Clone() const;
- virtual short Compare( DataObject* pKey1, DataObject* pKey2 ) const;
+ virtual ScDataObject* Clone() const;
+ virtual short Compare( ScDataObject* pKey1, ScDataObject* pKey2 ) const;
TypedStrData* operator[]( const USHORT nIndex) const
{ return (TypedStrData*)At(nIndex); }
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index f43193c23313..becced059802 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -63,7 +63,7 @@ class ScMultipleWriteHeader;
class ScPatternAttr;
class ScStyleSheet;
class SvtBroadcaster;
-class TypedStrCollection;
+class TypedScStrCollection;
class ScProgress;
class ScPostIt;
struct ScFunctionData;
@@ -369,8 +369,8 @@ public:
/// Including current, may return -1
SCsROW GetNextUnprotected( SCROW nRow, BOOL bUp ) const;
- void GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedStrCollection& rStrings);
- BOOL GetDataEntries(SCROW nRow, TypedStrCollection& rStrings, BOOL bLimit);
+ void GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollection& rStrings);
+ BOOL GetDataEntries(SCROW nRow, TypedScStrCollection& rStrings, BOOL bLimit);
//UNUSED2008-05 SCROW NoteCount( SCROW nMaxRow = MAXROW ) const;
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index c583bb831b19..bc3e5f6994f2 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -154,7 +154,7 @@ public:
BYTE cByte;
bool bHasForceArray;
} sbyte;
- ComplRefData aRef;
+ ScComplexRefData aRef;
struct {
sal_uInt16 nFileId;
sal_Unicode cTabName[MAXSTRLEN+1];
@@ -188,15 +188,15 @@ public:
// since the reference count is cleared!
void SetOpCode( OpCode eCode );
void SetString( const sal_Unicode* pStr );
- void SetSingleReference( const SingleRefData& rRef );
- void SetDoubleReference( const ComplRefData& rRef );
+ void SetSingleReference( const ScSingleRefData& rRef );
+ void SetDoubleReference( const ScComplexRefData& rRef );
void SetDouble( double fVal );
//UNUSED2008-05 void SetInt( int nVal );
//UNUSED2008-05 void SetMatrix( ScMatrix* p );
// These methods are ok to use, reference count not cleared.
-//UNUSED2008-05 ComplRefData& GetReference();
-//UNUSED2008-05 void SetReference( ComplRefData& rRef );
+//UNUSED2008-05 ScComplexRefData& GetReference();
+//UNUSED2008-05 void SetReference( ScComplexRefData& rRef );
void SetName( USHORT n );
void SetExternalSingleRef( sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef );
void SetExternalDoubleRef( sal_uInt16 nFileId, const String& rTabName, const ComplRefData& rRef );
@@ -239,7 +239,7 @@ public:
virtual void MakeRefStr( rtl::OUStringBuffer& rBuffer,
const ScCompiler& rCompiler,
- const ComplRefData& rRef,
+ const ScComplexRefData& rRef,
BOOL bSingleRef ) const = 0;
virtual ::com::sun::star::i18n::ParseResult
parseAnyToken( const String& rFormula,
@@ -462,7 +462,7 @@ private:
bool mbExtendedErrorDetection;
BOOL GetToken();
- BOOL NextNewToken(bool bAllowBooleans = false);
+ BOOL NextNewToken(bool bInArray = false);
OpCode NextToken();
void PutCode( ScTokenRef& );
void Factor();
@@ -480,9 +480,9 @@ private:
OpCode Expression();
void SetError(USHORT nError);
- xub_StrLen NextSymbol();
+ xub_StrLen NextSymbol(bool bInArray);
BOOL IsValue( const String& );
- BOOL IsOpCode( const String& );
+ BOOL IsOpCode( const String&, bool bInArray );
BOOL IsOpCode2( const String& );
BOOL IsString();
BOOL IsReference( const String& );
diff --git a/sc/inc/compressedarray.hxx b/sc/inc/compressedarray.hxx
index 15487e0811e8..4d48e8ba510a 100644
--- a/sc/inc/compressedarray.hxx
+++ b/sc/inc/compressedarray.hxx
@@ -40,6 +40,7 @@
#include <algorithm>
#define INCLUDED_ALGORITHM
#endif
+#include "scdllapi.h"
const size_t nScCompressedArrayDelta = 4;
@@ -120,7 +121,7 @@ public:
// methods public for the coupled array sum methods
/** Obtain index into entries for nPos */
- size_t Search( A nPos ) const;
+ SC_DLLPUBLIC size_t Search( A nPos ) const;
/** Get number of entries */
size_t GetEntryCount() const;
/** Get data entry for an index */
@@ -489,7 +490,7 @@ public:
((aValue & rBitMask) == rMaskedCompare), searching between nStart and
nEnd. If no entry meets this condition, ::std::numeric_limits<A>::max()
is returned. */
- A GetFirstForCondition( A nStart, A nEnd,
+ SC_DLLPUBLIC A GetFirstForCondition( A nStart, A nEnd,
const D& rBitMask,
const D& rMaskedCompare ) const;
@@ -497,7 +498,7 @@ public:
((aValue & rBitMask) == rMaskedCompare), searching between nStart and
nEnd. If no entry meets this condition, ::std::numeric_limits<A>::max()
is returned. */
- A GetLastForCondition( A nStart, A nEnd,
+ SC_DLLPUBLIC A GetLastForCondition( A nStart, A nEnd,
const D& rBitMask,
const D& rMaskedCompare ) const;
@@ -509,7 +510,7 @@ public:
/** Whether there is any entry between nStart and nEnd where the condition
is met: ((aValue & rBitMask) == rMaskedCompare) */
- bool HasCondition( A nStart, A nEnd,
+ SC_DLLPUBLIC bool HasCondition( A nStart, A nEnd,
const D& rBitMask,
const D& rMaskedCompare ) const;
@@ -535,7 +536,7 @@ public:
/** Sum values of a ScSummableCompressedArray for each row where in *this*
array the condition is met: ((aValue & rBitMask) == rMaskedCompare). */
template< typename S >
- unsigned long SumCoupledArrayForCondition( A nStart, A nEnd,
+ SC_DLLPUBLIC unsigned long SumCoupledArrayForCondition( A nStart, A nEnd,
const D& rBitMask, const D& rMaskedCompare,
const ScSummableCompressedArray<A,S>& rArray ) const;
@@ -577,7 +578,7 @@ void ScBitMaskCompressedArray<A,D>::OrValue( A nPos, const D& rValueToOr )
template< typename A, typename D, typename S > class ScCoupledCompressedArrayIterator
{
public:
- ScCoupledCompressedArrayIterator(
+ SC_DLLPUBLIC ScCoupledCompressedArrayIterator(
const ScBitMaskCompressedArray<A,D> & rArray1,
A nStart, A nEnd,
const D& rBitMask,
@@ -590,7 +591,7 @@ public:
A GetPos() const;
operator bool() const;
const S& operator *() const;
- bool NextRange();
+ SC_DLLPUBLIC bool NextRange();
A GetRangeStart() const;
A GetRangeEnd() const;
void Resync( A nPos );
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index a35426090f8f..e9a25c8688aa 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -35,6 +35,7 @@
#include "address.hxx"
#include "grammar.hxx"
#include <svtools/svarray.hxx>
+#include "scdllapi.h"
class ScBaseCell;
class ScFormulaCell;
@@ -74,7 +75,7 @@ enum ScConditionValType
SC_VAL_FORMULA
};
-class ScConditionEntry
+class SC_DLLPUBLIC ScConditionEntry
{
// gespeicherte Daten:
ScConditionMode eOp;
@@ -159,7 +160,7 @@ protected:
class ScConditionalFormat;
-class ScCondFormatEntry : public ScConditionEntry
+class SC_DLLPUBLIC ScCondFormatEntry : public ScConditionEntry
{
String aStyleName;
ScConditionalFormat* pParent;
@@ -194,7 +195,7 @@ protected:
// komplette bedingte Formatierung
//
-class ScConditionalFormat
+class SC_DLLPUBLIC ScConditionalFormat
{
ScDocument* pDoc;
ScRangeList* pAreas; // Bereiche fuer Paint
diff --git a/sc/inc/dbcolect.hxx b/sc/inc/dbcolect.hxx
index 0b3f965ebc96..2056bcb331f1 100644
--- a/sc/inc/dbcolect.hxx
+++ b/sc/inc/dbcolect.hxx
@@ -37,6 +37,7 @@
#include "sortparam.hxx" // MAXSORT
#include "refreshtimer.hxx"
#include "address.hxx"
+#include "scdllapi.h"
//------------------------------------------------------------------------
@@ -46,7 +47,7 @@ class ScMultipleWriteHeader;
//------------------------------------------------------------------------
-class ScDBData : public DataObject, public ScRefreshTimer
+class ScDBData : public ScDataObject, public ScRefreshTimer
{
private:
@@ -124,14 +125,14 @@ private:
using ScRefreshTimer::operator==;
public:
- ScDBData(const String& rName,
+ SC_DLLPUBLIC ScDBData(const String& rName,
SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
BOOL bByR = TRUE, BOOL bHasH = TRUE);
ScDBData(const ScDBData& rData);
~ScDBData();
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
ScDBData& operator= (const ScDBData& rData);
@@ -166,9 +167,9 @@ public:
void SetSortParam(const ScSortParam& rSortParam);
SC_DLLPUBLIC void GetQueryParam(ScQueryParam& rQueryParam) const;
- void SetQueryParam(const ScQueryParam& rQueryParam);
- BOOL GetAdvancedQuerySource(ScRange& rSource) const;
- void SetAdvancedQuerySource(const ScRange* pSource);
+ SC_DLLPUBLIC void SetQueryParam(const ScQueryParam& rQueryParam);
+ SC_DLLPUBLIC BOOL GetAdvancedQuerySource(ScRange& rSource) const;
+ SC_DLLPUBLIC void SetAdvancedQuerySource(const ScRange* pSource);
void GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const;
void SetSubTotalParam(const ScSubTotalParam& rSubTotalParam);
@@ -196,7 +197,7 @@ public:
//------------------------------------------------------------------------
-class SC_DLLPUBLIC ScDBCollection : public SortedCollection
+class SC_DLLPUBLIC ScDBCollection : public ScSortedCollection
{
private:
@@ -206,20 +207,20 @@ private:
public:
ScDBCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE, ScDocument* pDocument = NULL) :
- SortedCollection ( nLim, nDel, bDup ),
+ ScSortedCollection ( nLim, nDel, bDup ),
pDoc ( pDocument ),
nEntryIndex ( SC_START_INDEX_DB_COLL ) // oberhalb der Namen
{}
ScDBCollection(const ScDBCollection& rScDBCollection) :
- SortedCollection ( rScDBCollection ),
+ ScSortedCollection ( rScDBCollection ),
pDoc ( rScDBCollection.pDoc ),
nEntryIndex ( rScDBCollection.nEntryIndex)
{}
- virtual DataObject* Clone() const { return new ScDBCollection(*this); }
+ virtual ScDataObject* Clone() const { return new ScDBCollection(*this); }
ScDBData* operator[]( const USHORT nIndex) const {return (ScDBData*)At(nIndex);}
- virtual short Compare(DataObject* pKey1, DataObject* pKey2) const;
- virtual BOOL IsEqual(DataObject* pKey1, DataObject* pKey2) const;
+ virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
+ virtual BOOL IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const;
ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bStartOnly) const;
ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
@@ -235,7 +236,7 @@ public:
ScDBData* FindIndex(USHORT nIndex);
USHORT GetEntryIndex() { return nEntryIndex; }
void SetEntryIndex(USHORT nInd) { nEntryIndex = nInd; }
- virtual BOOL Insert(DataObject* pDataObject);
+ virtual BOOL Insert(ScDataObject* pScDataObject);
void SetRefreshHandler( const Link& rLink )
{ aRefreshHandler = rLink; }
diff --git a/sc/inc/detfunc.hxx b/sc/inc/detfunc.hxx
index 2e7c0aaed3ce..4fda448c49c0 100644
--- a/sc/inc/detfunc.hxx
+++ b/sc/inc/detfunc.hxx
@@ -34,6 +34,7 @@
#include "address.hxx"
#include <tools/gen.hxx>
#include <tools/color.hxx>
+#include "scdllapi.h"
class SdrObject;
class SdrPage;
@@ -58,7 +59,7 @@ enum ScDetectiveObjType
SC_DETOBJ_CIRCLE
};
-class ScDetectiveFunc
+class SC_DLLPUBLIC ScDetectiveFunc
{
static ColorData nArrowColor;
static ColorData nErrorColor;
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 12d47638b9ae..aaef77ca2ef6 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -34,6 +34,7 @@
#include "address.hxx"
#include <tools/solar.h>
#include "global.hxx"
+#include "scdllapi.h"
class ScDocument;
class ScBaseCell;
@@ -412,7 +413,7 @@ public:
// gibt nichtleere Zellen und Bereiche mit Formatierung zurueck (horizontal)
//
-class ScUsedAreaIterator
+class SC_DLLPUBLIC ScUsedAreaIterator
{
private:
ScHorizontalCellIterator aCellIter;
diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx
index e16ba2c7993b..ef08f72fb4a8 100644
--- a/sc/inc/docpool.hxx
+++ b/sc/inc/docpool.hxx
@@ -32,12 +32,13 @@
#define SC_SCDOCPOL_HXX
#include <svtools/itempool.hxx>
+#include "scdllapi.h"
class ScStyleSheet;
//------------------------------------------------------------------------
-class ScDocumentPool: public SfxItemPool
+class SC_DLLPUBLIC ScDocumentPool: public SfxItemPool
{
SfxPoolItem** ppPoolDefaults;
SfxItemPool* pSecondary;
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 463ccbfbd7c7..c0879f0c1327 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -43,6 +43,7 @@
#include "tabopparams.hxx"
#include "grammar.hxx"
#include <com/sun/star/chart2/XChartDocument.hpp>
+#include "scdllapi.h"
#include <memory>
#include <map>
@@ -111,8 +112,8 @@ class ScTokenArray;
class ScValidationData;
class ScValidationDataList;
class ScViewOptions;
-class StrCollection;
-class TypedStrCollection;
+class ScStrCollection;
+class TypedScStrCollection;
class ScChangeTrack;
class ScFieldEditEngine;
class ScNoteEditEngine;
@@ -268,7 +269,7 @@ private:
ScFormulaCell* pEOFormulaTrack; // BrodcastTrack Ende, letzte Zelle
ScBroadcastAreaSlotMachine* pBASM; // BroadcastAreas
ScChartListenerCollection* pChartListenerCollection;
- StrCollection* pOtherObjects; // non-chart OLE objects
+ ScStrCollection* pOtherObjects; // non-chart OLE objects
SvMemoryStream* pClipData;
ScDetOpList* pDetOpList;
ScChangeTrack* pChangeTrack;
@@ -416,38 +417,38 @@ private:
inline BOOL RowHidden( SCROW nRow, SCTAB nTab ); // FillInfo
public:
- ULONG GetCellCount() const; // alle Zellen
+ SC_DLLPUBLIC ULONG GetCellCount() const; // alle Zellen
ULONG GetWeightedCount() const; // Formeln und Edit staerker gewichtet
ULONG GetCodeCount() const; // RPN-Code in Formeln
DECL_LINK( GetUserDefinedColor, USHORT * );
// Numberformatter
public:
- ScDocument( ScDocumentMode eMode = SCDOCMODE_DOCUMENT,
+ SC_DLLPUBLIC ScDocument( ScDocumentMode eMode = SCDOCMODE_DOCUMENT,
SfxObjectShell* pDocShell = NULL );
- ~ScDocument();
+ SC_DLLPUBLIC ~ScDocument();
inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
GetServiceManager() const { return xServiceManager; }
- const String& GetName() const { return aDocName; }
+ SC_DLLPUBLIC const String& GetName() const { return aDocName; }
void SetName( const String& r ) { aDocName = r; }
void GetDocStat( ScDocStat& rDocStat );
- void InitDrawLayer( SfxObjectShell* pDocShell = NULL );
+ SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = NULL );
XColorTable* GetColorTable();
SvxLinkManager* GetLinkManager() { return pLinkManager; }
- const ScDocOptions& GetDocOptions() const;
- void SetDocOptions( const ScDocOptions& rOpt );
- const ScViewOptions& GetViewOptions() const;
- void SetViewOptions( const ScViewOptions& rOpt );
+ SC_DLLPUBLIC const ScDocOptions& GetDocOptions() const;
+ SC_DLLPUBLIC void SetDocOptions( const ScDocOptions& rOpt );
+ SC_DLLPUBLIC const ScViewOptions& GetViewOptions() const;
+ SC_DLLPUBLIC void SetViewOptions( const ScViewOptions& rOpt );
void SetPrintOptions();
ScExtDocOptions* GetExtDocOptions() { return pExtDocOptions; }
- void SetExtDocOptions( ScExtDocOptions* pNewOptions );
+ SC_DLLPUBLIC void SetExtDocOptions( ScExtDocOptions* pNewOptions );
void GetLanguage( LanguageType& rLatin, LanguageType& rCjk, LanguageType& rCtl ) const;
void SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageType eCtl );
@@ -462,7 +463,7 @@ public:
ScFieldEditEngine* CreateFieldEditEngine();
void DisposeFieldEditEngine(ScFieldEditEngine*& rpEditEngine);
-SC_DLLPUBLIC ScRangeName* GetRangeName();
+ SC_DLLPUBLIC ScRangeName* GetRangeName();
void SetRangeName( ScRangeName* pNewRangeName );
SCTAB GetMaxTableNumber() { return nMaxTableNumber; }
void SetMaxTableNumber(SCTAB nNumber) { nMaxTableNumber = nNumber; }
@@ -472,7 +473,7 @@ SC_DLLPUBLIC ScRangeName* GetRangeName();
ScRangePairListRef& GetColNameRangesRef() { return xColNameRanges; }
ScRangePairListRef& GetRowNameRangesRef() { return xRowNameRanges; }
-SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
+ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
void SetDBCollection( ScDBCollection* pNewDBCollection,
BOOL bRemoveAutoFilter = FALSE );
ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab,
@@ -481,9 +482,9 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
//UNUSED2008-05 ScRangeData* GetRangeAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab,
//UNUSED2008-05 BOOL bStartOnly = FALSE) const;
- ScRangeData* GetRangeAtBlock( const ScRange& rBlock, String* pName=NULL ) const;
+ SC_DLLPUBLIC ScRangeData* GetRangeAtBlock( const ScRange& rBlock, String* pName=NULL ) const;
- ScDPCollection* GetDPCollection();
+ SC_DLLPUBLIC ScDPCollection* GetDPCollection();
ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
ScDPObject* GetDPAtBlock( const ScRange& rBlock ) const;
#if OLD_PIVOT_IMPLEMENTATION
@@ -491,7 +492,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
void SetPivotCollection(ScPivotCollection* pNewPivotCollection);
ScPivot* GetPivotAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
#endif
- ScChartCollection* GetChartCollection() const;
+ SC_DLLPUBLIC ScChartCollection* GetChartCollection() const;
void StopTemporaryChartLock();
@@ -501,7 +502,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
BOOL HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName = NULL );
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > GetChartByName( const String& rChartName );
- void GetChartRanges( const String& rChartName, ::std::vector< ScRangeList >& rRanges, ScDocument* pSheetNameDoc );
+ SC_DLLPUBLIC void GetChartRanges( const String& rChartName, ::std::vector< ScRangeList >& rRanges, ScDocument* pSheetNameDoc );
void SetChartRanges( const String& rChartName, const ::std::vector< ScRangeList >& rRanges );
void UpdateChartArea( const String& rChartName, const ScRange& rNewArea,
@@ -515,22 +516,22 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
::com::sun::star::embed::XEmbeddedObject >
FindOleObjectByName( const String& rName );
- void MakeTable( SCTAB nTab );
+ SC_DLLPUBLIC void MakeTable( SCTAB nTab );
SCTAB GetVisibleTab() const { return nVisibleTab; }
- void SetVisibleTab(SCTAB nTab) { nVisibleTab = nTab; }
+ SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab) { nVisibleTab = nTab; }
- BOOL HasTable( SCTAB nTab ) const;
+ SC_DLLPUBLIC BOOL HasTable( SCTAB nTab ) const;
SC_DLLPUBLIC BOOL GetName( SCTAB nTab, String& rName ) const;
- BOOL GetTable( const String& rName, SCTAB& rTab ) const;
- inline SCTAB GetTableCount() const { return nMaxTableNumber; }
+ SC_DLLPUBLIC BOOL GetTable( const String& rName, SCTAB& rTab ) const;
+ SC_DLLPUBLIC inline SCTAB GetTableCount() const { return nMaxTableNumber; }
SvNumberFormatterIndexTable* GetFormatExchangeList() const { return pFormatExchangeList; }
- void SetDocProtection( BOOL bProtect, const com::sun::star::uno::Sequence <sal_Int8>& aPass );
- void SetTabProtection( SCTAB nTab, BOOL bProtect, const com::sun::star::uno::Sequence <sal_Int8>& aPass );
- BOOL IsDocProtected() const;
+ SC_DLLPUBLIC void SetDocProtection( BOOL bProtect, const com::sun::star::uno::Sequence <sal_Int8>& aPass );
+ SC_DLLPUBLIC void SetTabProtection( SCTAB nTab, BOOL bProtect, const com::sun::star::uno::Sequence <sal_Int8>& aPass );
+ SC_DLLPUBLIC BOOL IsDocProtected() const;
BOOL IsDocEditable() const;
- BOOL IsTabProtected( SCTAB nTab ) const;
+ SC_DLLPUBLIC BOOL IsTabProtected( SCTAB nTab ) const;
const com::sun::star::uno::Sequence <sal_Int8>& GetDocPassword() const;
const com::sun::star::uno::Sequence <sal_Int8>& GetTabPassword( SCTAB nTab ) const;
@@ -559,49 +560,49 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
SC_DLLPUBLIC BOOL ValidTabName( const String& rName ) const;
SC_DLLPUBLIC BOOL ValidNewTabName( const String& rName ) const;
SC_DLLPUBLIC void CreateValidTabName(String& rName) const;
- BOOL InsertTab( SCTAB nPos, const String& rName,
+ SC_DLLPUBLIC BOOL InsertTab( SCTAB nPos, const String& rName,
BOOL bExternalDocument = FALSE );
- BOOL DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc = NULL );
- BOOL RenameTab( SCTAB nTab, const String& rName,
+ SC_DLLPUBLIC BOOL DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc = NULL );
+ SC_DLLPUBLIC BOOL RenameTab( SCTAB nTab, const String& rName,
BOOL bUpdateRef = TRUE,
BOOL bExternalDocument = FALSE );
BOOL MoveTab( SCTAB nOldPos, SCTAB nNewPos );
BOOL CopyTab( SCTAB nOldPos, SCTAB nNewPos,
const ScMarkData* pOnlyMarked = NULL );
- ULONG TransferTab(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos,
+ SC_DLLPUBLIC ULONG TransferTab(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos,
BOOL bInsertNew = TRUE,
BOOL bResultsOnly = FALSE );
- void TransferDrawPage(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos);
- void SetVisible( SCTAB nTab, BOOL bVisible );
- BOOL IsVisible( SCTAB nTab ) const;
- void SetLayoutRTL( SCTAB nTab, BOOL bRTL );
- BOOL IsLayoutRTL( SCTAB nTab ) const;
+ SC_DLLPUBLIC void TransferDrawPage(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos);
+ SC_DLLPUBLIC void SetVisible( SCTAB nTab, BOOL bVisible );
+ SC_DLLPUBLIC BOOL IsVisible( SCTAB nTab ) const;
+ SC_DLLPUBLIC void SetLayoutRTL( SCTAB nTab, BOOL bRTL );
+ SC_DLLPUBLIC BOOL IsLayoutRTL( SCTAB nTab ) const;
BOOL IsNegativePage( SCTAB nTab ) const;
- void SetScenario( SCTAB nTab, BOOL bFlag );
- BOOL IsScenario( SCTAB nTab ) const;
- void GetScenarioData( SCTAB nTab, String& rComment,
+ SC_DLLPUBLIC void SetScenario( SCTAB nTab, BOOL bFlag );
+ SC_DLLPUBLIC BOOL IsScenario( SCTAB nTab ) const;
+ SC_DLLPUBLIC void GetScenarioData( SCTAB nTab, String& rComment,
Color& rColor, USHORT& rFlags ) const;
- void SetScenarioData( SCTAB nTab, const String& rComment,
+ SC_DLLPUBLIC void SetScenarioData( SCTAB nTab, const String& rComment,
const Color& rColor, USHORT nFlags );
void GetScenarioFlags( SCTAB nTab, USHORT& rFlags ) const;
- BOOL IsActiveScenario( SCTAB nTab ) const;
- void SetActiveScenario( SCTAB nTab, BOOL bActive ); // nur fuer Undo etc.
+ SC_DLLPUBLIC BOOL IsActiveScenario( SCTAB nTab ) const;
+ SC_DLLPUBLIC void SetActiveScenario( SCTAB nTab, BOOL bActive ); // nur fuer Undo etc.
SC_DLLPUBLIC ScAddress::Convention GetAddressConvention() const;
- SC_DLLPUBLIC ScGrammar::Grammar GetGrammar() const;
+ ScGrammar::Grammar GetGrammar() const;
void SetGrammar( ScGrammar::Grammar eGram );
- BYTE GetLinkMode( SCTAB nTab ) const;
+ SC_DLLPUBLIC BYTE GetLinkMode( SCTAB nTab ) const;
BOOL IsLinked( SCTAB nTab ) const;
- const String& GetLinkDoc( SCTAB nTab ) const;
+ SC_DLLPUBLIC const String& GetLinkDoc( SCTAB nTab ) const;
const String& GetLinkFlt( SCTAB nTab ) const;
const String& GetLinkOpt( SCTAB nTab ) const;
- const String& GetLinkTab( SCTAB nTab ) const;
+ SC_DLLPUBLIC const String& GetLinkTab( SCTAB nTab ) const;
ULONG GetLinkRefreshDelay( SCTAB nTab ) const;
void SetLink( SCTAB nTab, BYTE nMode, const String& rDoc,
const String& rFilter, const String& rOptions,
const String& rTabName, ULONG nRefreshDelay );
BOOL HasLink( const String& rDoc,
const String& rFilter, const String& rOptions ) const;
- BOOL LinkExternalTab( SCTAB& nTab, const String& aDocTab,
+ SC_DLLPUBLIC BOOL LinkExternalTab( SCTAB& nTab, const String& aDocTab,
const String& aFileName,
const String& aTabName );
@@ -618,7 +619,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
void DecInDdeLinkUpdate() { if ( nInDdeLinkUpdate ) --nInDdeLinkUpdate; }
BOOL IsInDdeLinkUpdate() const { return nInDdeLinkUpdate != 0; }
- void CopyDdeLinks( ScDocument* pDestDoc ) const;
+ SC_DLLPUBLIC void CopyDdeLinks( ScDocument* pDestDoc ) const;
void DisconnectDdeLinks();
// Fuer StarOne Api:
@@ -628,7 +629,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
/** Tries to find a DDE link with the specified connection data.
@param rnDdePos (out-param) Returns the index of the DDE link (does not include other links from link manager).
@return true = DDE link found, rnDdePos valid. */
- bool FindDdeLink( const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode, USHORT& rnDdePos );
+ SC_DLLPUBLIC bool FindDdeLink( const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode, USHORT& rnDdePos );
/** Returns the connection data of the specified DDE link.
@param nDdePos Index of the DDE link (does not include other links from link manager).
@@ -645,12 +646,12 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
/** Returns the result matrix of the specified DDE link.
@param nDdePos Index of the DDE link (does not include other links from link manager).
@return The result matrix, if the DDE link has been found, 0 otherwise. */
- const ScMatrix* GetDdeLinkResultMatrix( USHORT nDdePos ) const;
+ SC_DLLPUBLIC const ScMatrix* GetDdeLinkResultMatrix( USHORT nDdePos ) const;
/** Tries to find a DDE link or creates a new, if not extant.
@param pResults If not 0, sets the matrix as as DDE link result matrix (also for existing links).
@return true = DDE link found; false = Unpredictable error occured, no DDE link created. */
- bool CreateDdeLink( const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode, ScMatrix* pResults = NULL );
+ SC_DLLPUBLIC bool CreateDdeLink( const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode, ScMatrix* pResults = NULL );
/** Sets a result matrix for the specified DDE link.
@param nDdePos Index of the DDE link (does not include other links from link manager).
@param pResults The array containing all results of the DDE link (intrusive-ref-counted, do not delete).
@@ -673,7 +674,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
// #109985#
sal_Bool IsChart( const SdrObject* pObject );
- void UpdateAllCharts();
+ SC_DLLPUBLIC void UpdateAllCharts();
void UpdateChartRef( UpdateRefMode eUpdateRefMode,
SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
@@ -690,7 +691,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
BOOL HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect );
BOOL HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect );
- ScOutlineTable* GetOutlineTable( SCTAB nTab, BOOL bCreate = FALSE );
+ SC_DLLPUBLIC ScOutlineTable* GetOutlineTable( SCTAB nTab, BOOL bCreate = FALSE );
BOOL SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline );
void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
@@ -701,57 +702,57 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
BOOL TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam );
BOOL HasSubTotalCells( const ScRange& rRange );
- void PutCell( const ScAddress&, ScBaseCell* pCell, BOOL bForceTab = FALSE );
- void PutCell( const ScAddress&, ScBaseCell* pCell,
+ SC_DLLPUBLIC void PutCell( const ScAddress&, ScBaseCell* pCell, BOOL bForceTab = FALSE );
+ SC_DLLPUBLIC void PutCell( const ScAddress&, ScBaseCell* pCell,
ULONG nFormatIndex, BOOL bForceTab = FALSE);
- void PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell,
+ SC_DLLPUBLIC void PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell,
BOOL bForceTab = FALSE );
- void PutCell(SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell,
+ SC_DLLPUBLIC void PutCell(SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell,
ULONG nFormatIndex, BOOL bForceTab = FALSE);
// return TRUE = Zahlformat gesetzt
- BOOL SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString );
- void SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal );
- void SetNote( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPostIt& rNote );
+ SC_DLLPUBLIC BOOL SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString );
+ SC_DLLPUBLIC void SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal );
+ SC_DLLPUBLIC void SetNote( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPostIt& rNote );
void SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const USHORT nError);
- void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
+ SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2,
const ScMarkData& rMark,
const String& rFormula,
const ScTokenArray* p = NULL,
const ScGrammar::Grammar = ScGrammar::GRAM_DEFAULT );
- void InsertTableOp(const ScTabOpParam& rParam, // Mehrfachoperation
+ SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam& rParam, // Mehrfachoperation
SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark);
SC_DLLPUBLIC void GetString( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rString );
- void GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rString );
- double GetValue( const ScAddress& );
- void GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, double& rValue );
- double RoundValueAsShown( double fVal, ULONG nFormat );
- void GetNumberFormat( SCCOL nCol, SCROW nRow, SCTAB nTab,
+ SC_DLLPUBLIC void GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rString );
+ SC_DLLPUBLIC double GetValue( const ScAddress& );
+ SC_DLLPUBLIC void GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, double& rValue );
+ SC_DLLPUBLIC double RoundValueAsShown( double fVal, ULONG nFormat );
+ SC_DLLPUBLIC void GetNumberFormat( SCCOL nCol, SCROW nRow, SCTAB nTab,
sal_uInt32& rFormat );
- sal_uInt32 GetNumberFormat( const ScAddress& ) const;
+ SC_DLLPUBLIC sal_uInt32 GetNumberFormat( const ScAddress& ) const;
/** If no number format attribute is set and the cell
pointer passed is of type formula cell, the calculated
number format of the formula cell is returned. pCell
may be NULL. */
- void GetNumberFormatInfo( short& nType, ULONG& nIndex,
+ SC_DLLPUBLIC void GetNumberFormatInfo( short& nType, ULONG& nIndex,
const ScAddress& rPos, const ScBaseCell* pCell ) const;
void GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rFormula,
BOOL bAsciiExport = FALSE ) const;
BOOL GetNote( SCCOL nCol, SCROW nRow, SCTAB nTab, ScPostIt& rNote);
- void GetCellType( SCCOL nCol, SCROW nRow, SCTAB nTab, CellType& rCellType ) const;
- CellType GetCellType( const ScAddress& rPos ) const;
- void GetCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*& rpCell ) const;
- ScBaseCell* GetCell( const ScAddress& rPos ) const;
+ SC_DLLPUBLIC void GetCellType( SCCOL nCol, SCROW nRow, SCTAB nTab, CellType& rCellType ) const;
+ SC_DLLPUBLIC CellType GetCellType( const ScAddress& rPos ) const;
+ SC_DLLPUBLIC void GetCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*& rpCell ) const;
+ SC_DLLPUBLIC ScBaseCell* GetCell( const ScAddress& rPos ) const;
//UNUSED2008-05 void RefreshNoteFlags();
BOOL HasNoteObject( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
- BOOL HasData( SCCOL nCol, SCROW nRow, SCTAB nTab );
+ SC_DLLPUBLIC BOOL HasData( SCCOL nCol, SCROW nRow, SCTAB nTab );
SC_DLLPUBLIC BOOL HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
- BOOL HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
+ SC_DLLPUBLIC BOOL HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
BOOL HasStringCells( const ScRange& rRange ) const;
/** Returns true, if there is any data to create a selection list for rPos. */
@@ -765,17 +766,17 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
BOOL bRefresh = FALSE, BOOL bAttrs = FALSE );
BOOL ExtendMerge( ScRange& rRange, BOOL bRefresh = FALSE, BOOL bAttrs = FALSE );
BOOL ExtendTotalMerge( ScRange& rRange );
- BOOL ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
+ SC_DLLPUBLIC BOOL ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
- BOOL ExtendOverlapped( ScRange& rRange );
+ SC_DLLPUBLIC BOOL ExtendOverlapped( ScRange& rRange );
BOOL RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
- void DoMergeContents( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
+ SC_DLLPUBLIC void DoMergeContents( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow );
// ohne Ueberpruefung:
- void DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
+ SC_DLLPUBLIC void DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow );
void RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab );
@@ -790,9 +791,9 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
BOOL IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
BOOL IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
- BOOL HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
+ SC_DLLPUBLIC BOOL HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2, USHORT nMask );
- BOOL HasAttrib( const ScRange& rRange, USHORT nMask );
+ SC_DLLPUBLIC BOOL HasAttrib( const ScRange& rRange, USHORT nMask );
void GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
const SvxBorderLine** ppLeft,
@@ -806,7 +807,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
void SetDirty( const ScRange& );
void SetTableOpDirty( const ScRange& ); // for Interpreter TableOp
void CalcAll();
- void CalcAfterLoad();
+ SC_DLLPUBLIC void CalcAfterLoad();
void CompileAll();
void CompileXML();
@@ -840,23 +841,23 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
SCCOL& rEndCol, SCROW& rEndRow, BOOL bIncludeOld );
- BOOL GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
- BOOL GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
- BOOL GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
+ SC_DLLPUBLIC BOOL GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
+ SC_DLLPUBLIC BOOL GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
+ SC_DLLPUBLIC BOOL GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
BOOL bNotes = TRUE ) const;
- BOOL GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
+ SC_DLLPUBLIC BOOL GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
SCCOL& rEndCol, BOOL bNotes = TRUE ) const;
- BOOL GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
+ SC_DLLPUBLIC BOOL GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
SCROW& rEndRow, BOOL bNotes = TRUE ) const;
void InvalidateTableArea();
- BOOL GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const;
+ SC_DLLPUBLIC BOOL GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const;
void ExtendPrintArea( OutputDevice* pDev, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow,
SCCOL& rEndCol, SCROW nEndRow );
- SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
+ SC_DLLPUBLIC SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
ScDirection eDir );
@@ -874,7 +875,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
BOOL InsertRow( SCCOL nStartCol, SCTAB nStartTab,
SCCOL nEndCol, SCTAB nEndTab,
SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = NULL );
- BOOL InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL );
+ SC_DLLPUBLIC BOOL InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL );
void DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
SCCOL nEndCol, SCTAB nEndTab,
SCROW nStartRow, SCSIZE nSize,
@@ -884,7 +885,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
BOOL InsertCol( SCROW nStartRow, SCTAB nStartTab,
SCROW nEndRow, SCTAB nEndTab,
SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = NULL );
- BOOL InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL );
+ SC_DLLPUBLIC BOOL InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL );
void DeleteCol( SCROW nStartRow, SCTAB nStartTab,
SCROW nEndRow, SCTAB nEndTab,
SCCOL nStartCol, SCSIZE nSize,
@@ -909,15 +910,15 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
void EnableExecuteLink( bool bVal ) { mbExecuteLinkEnabled = bVal; }
bool IsChangeReadOnlyEnabled() const { return mbChangeReadOnlyEnabled; }
void EnableChangeReadOnly( bool bVal ) { mbChangeReadOnlyEnabled = bVal; }
- sal_Int16 GetNamedRangesLockCount() const { return mnNamedRangesLockCount; }
+ SC_DLLPUBLIC sal_Int16 GetNamedRangesLockCount() const { return mnNamedRangesLockCount; }
void SetNamedRangesLockCount( sal_Int16 nCount ) { mnNamedRangesLockCount = nCount; }
- void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
- void ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
+ SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
+ SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
void SetCutMode( BOOL bCut );
BOOL IsCutMode();
void SetClipArea( const ScRange& rArea, BOOL bCut = FALSE );
- BOOL IsDocVisible() const { return bIsVisible; }
+ SC_DLLPUBLIC BOOL IsDocVisible() const { return bIsVisible; }
void SetDocVisible( BOOL bSet );
BOOL HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = NULL );
@@ -969,7 +970,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
BOOL IsClipboardSource() const;
- void TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsLink );
+ SC_DLLPUBLIC void TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsLink );
void MixDocument( const ScRange& rRange, USHORT nFunction, BOOL bSkipEmpty,
ScDocument* pSrcDoc );
@@ -983,11 +984,11 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
void TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nType );
- void InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
+ SC_DLLPUBLIC void InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
BOOL bColInfo = FALSE, BOOL bRowInfo = FALSE );
void AddUndoTab( SCTAB nTab1, SCTAB nTab2,
BOOL bColInfo = FALSE, BOOL bRowInfo = FALSE );
- void InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSelection,
+ SC_DLLPUBLIC void InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSelection,
BOOL bColInfo = FALSE, BOOL bRowInfo = FALSE );
// nicht mehr benutzen:
@@ -1013,16 +1014,16 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
ScMarkData& rDestMark, BOOL bResetMark = TRUE,
USHORT nNeededBits = 0 ) const;
BOOL HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const;
- const ScRangeList* GetScenarioRanges( SCTAB nTab ) const;
+ SC_DLLPUBLIC const ScRangeList* GetScenarioRanges( SCTAB nTab ) const;
- void CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc );
+ SC_DLLPUBLIC void CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc );
void UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
ScDocument* pUndoDoc = NULL, BOOL bIncludeDraw = TRUE );
- void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc,
+ SC_DLLPUBLIC void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc,
const ScMarkData& rMark, ScDocument* pUndoDoc = NULL );
void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
@@ -1039,20 +1040,20 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
double& rResult );
SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nWhich ) const;
- const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
- const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
+ SC_DLLPUBLIC const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
+ SC_DLLPUBLIC const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark, BOOL bDeep = TRUE );
ScPatternAttr* CreateSelectionPattern( const ScMarkData& rMark, BOOL bDeep = TRUE );
const ScConditionalFormat* GetCondFormat( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
- const SfxItemSet* GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
+ SC_DLLPUBLIC const SfxItemSet* GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
const SfxPoolItem* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nWhich ) const;
- const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator();
+ SC_DLLPUBLIC const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator();
BOOL HasStringWeakCharacters( const String& rString );
- BYTE GetStringScriptType( const String& rString );
- BYTE GetCellScriptType( ScBaseCell* pCell, ULONG nNumberFormat );
- BYTE GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell = NULL );
+ SC_DLLPUBLIC BYTE GetStringScriptType( const String& rString );
+ SC_DLLPUBLIC BYTE GetCellScriptType( ScBaseCell* pCell, ULONG nNumberFormat );
+ SC_DLLPUBLIC BYTE GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell = NULL );
BOOL HasDetectiveOperations() const;
void AddDetectiveOperation( const ScDetOpData& rData );
@@ -1075,14 +1076,14 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
void ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark );
void ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark );
- ULONG AddCondFormat( const ScConditionalFormat& rNew );
- void FindConditionalFormat( ULONG nKey, ScRangeList& rRanges );
- void FindConditionalFormat( ULONG nKey, ScRangeList& rRanges, SCTAB nTab );
+ SC_DLLPUBLIC ULONG AddCondFormat( const ScConditionalFormat& rNew );
+ SC_DLLPUBLIC void FindConditionalFormat( ULONG nKey, ScRangeList& rRanges );
+ SC_DLLPUBLIC void FindConditionalFormat( ULONG nKey, ScRangeList& rRanges, SCTAB nTab );
void ConditionalChanged( ULONG nKey );
- ULONG AddValidationEntry( const ScValidationData& rNew );
+ SC_DLLPUBLIC ULONG AddValidationEntry( const ScValidationData& rNew );
- const ScValidationData* GetValidationEntry( ULONG nIndex ) const;
+ SC_DLLPUBLIC const ScValidationData* GetValidationEntry( ULONG nIndex ) const;
ScConditionalFormatList* GetCondFormList() const // Ref-Undo
{ return pCondFormList; }
@@ -1093,15 +1094,15 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
SC_DLLPUBLIC void ApplyAttr( SCCOL nCol, SCROW nRow, SCTAB nTab,
const SfxPoolItem& rAttr );
- void ApplyPattern( SCCOL nCol, SCROW nRow, SCTAB nTab,
+ SC_DLLPUBLIC void ApplyPattern( SCCOL nCol, SCROW nRow, SCTAB nTab,
const ScPatternAttr& rAttr );
- void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
+ SC_DLLPUBLIC void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark, const ScPatternAttr& rAttr );
- void ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
+ SC_DLLPUBLIC void ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
const ScPatternAttr& rAttr );
- void ApplyPatternIfNumberformatIncompatible(
+ SC_DLLPUBLIC void ApplyPatternIfNumberformatIncompatible(
const ScRange& rRange, const ScMarkData& rMark,
const ScPatternAttr& rPattern, short nNewType );
@@ -1110,7 +1111,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark, const ScStyleSheet& rStyle);
- void ApplyStyleAreaTab( SCCOL nStartCol, SCROW nStartRow,
+ SC_DLLPUBLIC void ApplyStyleAreaTab( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
const ScStyleSheet& rStyle);
@@ -1128,16 +1129,16 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
BOOL IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const;
- BOOL ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
+ SC_DLLPUBLIC BOOL ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
SCTAB nTab, INT16 nFlags );
BOOL RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
SCTAB nTab, INT16 nFlags );
- void SetPattern( const ScAddress&, const ScPatternAttr& rAttr,
+ SC_DLLPUBLIC void SetPattern( const ScAddress&, const ScPatternAttr& rAttr,
BOOL bPutToPool = FALSE );
- void SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr,
+ SC_DLLPUBLIC void SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr,
BOOL bPutToPool = FALSE );
void DeleteNumberFormat( const sal_uInt32* pDelKeys, sal_uInt32 nCount );
@@ -1165,19 +1166,19 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
//
- void SetColWidth( SCCOL nCol, SCTAB nTab, USHORT nNewWidth );
- void SetRowHeight( SCROW nRow, SCTAB nTab, USHORT nNewHeight );
- void SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
+ SC_DLLPUBLIC void SetColWidth( SCCOL nCol, SCTAB nTab, USHORT nNewWidth );
+ SC_DLLPUBLIC void SetRowHeight( SCROW nRow, SCTAB nTab, USHORT nNewHeight );
+ SC_DLLPUBLIC void SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
USHORT nNewHeight );
void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BOOL bManual );
- USHORT GetColWidth( SCCOL nCol, SCTAB nTab ) const;
- USHORT GetRowHeight( SCROW nRow, SCTAB nTab ) const;
- ULONG GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
+ SC_DLLPUBLIC USHORT GetColWidth( SCCOL nCol, SCTAB nTab ) const;
+ SC_DLLPUBLIC USHORT GetRowHeight( SCROW nRow, SCTAB nTab ) const;
+ SC_DLLPUBLIC ULONG GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
ULONG GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const;
- const ScSummableCompressedArray< SCROW, USHORT> & GetRowHeightArray( SCTAB nTab ) const;
- ULONG GetColOffset( SCCOL nCol, SCTAB nTab ) const;
- ULONG GetRowOffset( SCROW nRow, SCTAB nTab ) const;
+ SC_DLLPUBLIC const ScSummableCompressedArray< SCROW, USHORT> & GetRowHeightArray( SCTAB nTab ) const;
+ SC_DLLPUBLIC ULONG GetColOffset( SCCOL nCol, SCTAB nTab ) const;
+ SC_DLLPUBLIC ULONG GetRowOffset( SCROW nRow, SCTAB nTab ) const;
SC_DLLPUBLIC USHORT GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const;
SC_DLLPUBLIC USHORT GetOriginalHeight( SCROW nRow, SCTAB nTab ) const;
@@ -1189,11 +1190,11 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
// single row taking ones in loops to access a sequence of
// single rows is no good idea! Use specialized range
// taking methods instead, or iterators.
- inline ULONG FastGetRowHeight( SCROW nStartRow, SCROW nEndRow,
+ SC_DLLPUBLIC inline ULONG FastGetRowHeight( SCROW nStartRow, SCROW nEndRow,
SCTAB nTab ) const;
inline ULONG FastGetScaledRowHeight( SCROW nStartRow, SCROW nEndRow,
SCTAB nTab, double fScale ) const;
- inline USHORT FastGetRowHeight( SCROW nRow, SCTAB nTab ) const;
+ SC_DLLPUBLIC inline USHORT FastGetRowHeight( SCROW nRow, SCTAB nTab ) const;
inline SCROW FastGetRowForHeight( SCTAB nTab, ULONG nHeight ) const;
inline SCROW FastGetFirstNonHiddenRow( SCROW nStartRow, SCTAB nTab ) const;
/** No check for flags whether row is hidden, height value
@@ -1208,7 +1209,7 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
BOOL bFormula,
const ScMarkData* pMarkData = NULL,
BOOL bSimpleTextImport = FALSE );
- BOOL SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, USHORT nExtra,
+ SC_DLLPUBLIC BOOL SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, USHORT nExtra,
OutputDevice* pDev,
double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY,
@@ -1222,21 +1223,21 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
const Fraction& rZoomX, const Fraction& rZoomY,
BOOL bWidth, BOOL bTotalSize = FALSE );
- void ShowCol(SCCOL nCol, SCTAB nTab, BOOL bShow);
- void ShowRow(SCROW nRow, SCTAB nTab, BOOL bShow);
- void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, BOOL bShow);
- void SetColFlags( SCCOL nCol, SCTAB nTab, BYTE nNewFlags );
- void SetRowFlags( SCROW nRow, SCTAB nTab, BYTE nNewFlags );
- void SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BYTE nNewFlags );
+ SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, BOOL bShow);
+ SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, BOOL bShow);
+ SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, BOOL bShow);
+ SC_DLLPUBLIC void SetColFlags( SCCOL nCol, SCTAB nTab, BYTE nNewFlags );
+ SC_DLLPUBLIC void SetRowFlags( SCROW nRow, SCTAB nTab, BYTE nNewFlags );
+ SC_DLLPUBLIC void SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BYTE nNewFlags );
SC_DLLPUBLIC BYTE GetColFlags( SCCOL nCol, SCTAB nTab ) const;
SC_DLLPUBLIC BYTE GetRowFlags( SCROW nRow, SCTAB nTab ) const;
- const ScBitMaskCompressedArray< SCROW, BYTE> & GetRowFlagsArray( SCTAB nTab ) const;
- ScBitMaskCompressedArray< SCROW, BYTE> & GetRowFlagsArrayModifiable( SCTAB nTab );
+ SC_DLLPUBLIC const ScBitMaskCompressedArray< SCROW, BYTE> & GetRowFlagsArray( SCTAB nTab ) const;
+ SC_DLLPUBLIC ScBitMaskCompressedArray< SCROW, BYTE> & GetRowFlagsArrayModifiable( SCTAB nTab );
/// @return the index of the last row with any set flags (auto-pagebreak is ignored).
- SCROW GetLastFlaggedRow( SCTAB nTab ) const;
+ SC_DLLPUBLIC SCROW GetLastFlaggedRow( SCTAB nTab ) const;
/// @return the index of the last changed column (flags and column width, auto pagebreak is ignored).
SCCOL GetLastChangedCol( SCTAB nTab ) const;
@@ -1264,13 +1265,13 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
- ScPatternAttr* GetDefPattern() const;
- ScDocumentPool* GetPool();
- ScStyleSheetPool* GetStyleSheetPool() const;
+ SC_DLLPUBLIC ScPatternAttr* GetDefPattern() const;
+ SC_DLLPUBLIC ScDocumentPool* GetPool();
+ SC_DLLPUBLIC ScStyleSheetPool* GetStyleSheetPool() const;
// PageStyle:
SC_DLLPUBLIC const String& GetPageStyle( SCTAB nTab ) const;
- void SetPageStyle( SCTAB nTab, const String& rName );
+ SC_DLLPUBLIC void SetPageStyle( SCTAB nTab, const String& rName );
Size GetPageSize( SCTAB nTab ) const;
void SetPageSize( SCTAB nTab, const Size& rSize );
void SetRepeatArea( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
@@ -1286,38 +1287,38 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
void PageStyleModified( SCTAB nTab, const String& rNewName );
- BOOL NeedPageResetAfterTab( SCTAB nTab ) const;
+ SC_DLLPUBLIC BOOL NeedPageResetAfterTab( SCTAB nTab ) const;
// war vorher im PageStyle untergracht. Jetzt an jeder Tabelle:
- BOOL HasPrintRange();
- USHORT GetPrintRangeCount( SCTAB nTab );
- const ScRange* GetPrintRange( SCTAB nTab, USHORT nPos );
- const ScRange* GetRepeatColRange( SCTAB nTab );
- const ScRange* GetRepeatRowRange( SCTAB nTab );
+ SC_DLLPUBLIC BOOL HasPrintRange();
+ SC_DLLPUBLIC USHORT GetPrintRangeCount( SCTAB nTab );
+ SC_DLLPUBLIC const ScRange* GetPrintRange( SCTAB nTab, USHORT nPos );
+ SC_DLLPUBLIC const ScRange* GetRepeatColRange( SCTAB nTab );
+ SC_DLLPUBLIC const ScRange* GetRepeatRowRange( SCTAB nTab );
/** Returns true, if the specified sheet is always printed. */
BOOL IsPrintEntireSheet( SCTAB nTab ) const;
/** Removes all print ranges. */
- void ClearPrintRanges( SCTAB nTab );
+ SC_DLLPUBLIC void ClearPrintRanges( SCTAB nTab );
/** Adds a new print ranges. */
- void AddPrintRange( SCTAB nTab, const ScRange& rNew );
+ SC_DLLPUBLIC void AddPrintRange( SCTAB nTab, const ScRange& rNew );
/** Removes all old print ranges and sets the passed print ranges. */
void SetPrintRange( SCTAB nTab, const ScRange& rNew );
/** Marks the specified sheet to be printed completely. Deletes old print ranges on the sheet! */
- void SetPrintEntireSheet( SCTAB nTab );
- void SetRepeatColRange( SCTAB nTab, const ScRange* pNew );
- void SetRepeatRowRange( SCTAB nTab, const ScRange* pNew );
+ SC_DLLPUBLIC void SetPrintEntireSheet( SCTAB nTab );
+ SC_DLLPUBLIC void SetRepeatColRange( SCTAB nTab, const ScRange* pNew );
+ SC_DLLPUBLIC void SetRepeatRowRange( SCTAB nTab, const ScRange* pNew );
ScPrintRangeSaver* CreatePrintRangeSaver() const;
void RestorePrintRanges( const ScPrintRangeSaver& rSaver );
- Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow,
+ SC_DLLPUBLIC Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
- ScRange GetRange( SCTAB nTab, const Rectangle& rMMRect );
+ SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const Rectangle& rMMRect );
void UpdStlShtPtrsFrmNms();
void StylesToNames();
- void CopyStdStylesFrom( ScDocument* pSrcDoc );
+ SC_DLLPUBLIC void CopyStdStylesFrom( ScDocument* pSrcDoc );
CharSet GetSrcCharSet() const { return eSrcSet; }
ULONG GetSrcVersion() const { return nSrcVer; }
@@ -1326,30 +1327,30 @@ SC_DLLPUBLIC ScDBCollection* GetDBCollection() const;
void SetSrcCharSet( CharSet eNew ) { eSrcSet = eNew; }
void UpdateFontCharSet();
- friend SvStream& operator>>( SvStream& rStream, ScDocument& rDocument );
- friend SvStream& operator<<( SvStream& rStream, const ScDocument& rDocument );
+ SC_DLLPUBLIC friend SvStream& operator>>( SvStream& rStream, ScDocument& rDocument );
+ SC_DLLPUBLIC friend SvStream& operator<<( SvStream& rStream, const ScDocument& rDocument );
void FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
SCTAB nTab, double nScaleX, double nScaleY,
BOOL bPageMode, BOOL bFormulaMode,
const ScMarkData* pMarkData = NULL );
-SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const;
+ SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const;
void Sort( SCTAB nTab, const ScSortParam& rSortParam, BOOL bKeepQuery );
SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, BOOL bKeepSub );
BOOL ValidQuery( SCROW nRow, SCTAB nTab, const ScQueryParam& rQueryParam, BOOL* pSpecial = NULL );
- BOOL CreateQueryParam( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+ SC_DLLPUBLIC BOOL CreateQueryParam( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
SCTAB nTab, ScQueryParam& rQueryParam );
void GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, String& rStr);
BOOL GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
- TypedStrCollection& rStrings, bool bFilter = false );
+ TypedScStrCollection& rStrings, bool bFilter = false );
SC_DLLPUBLIC BOOL GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
- SCTAB nTab, TypedStrCollection& rStrings );
+ SCTAB nTab, TypedScStrCollection& rStrings );
BOOL GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
- TypedStrCollection& rStrings, BOOL bLimit = FALSE );
- BOOL GetFormulaEntries( TypedStrCollection& rStrings );
+ TypedScStrCollection& rStrings, BOOL bLimit = FALSE );
+ BOOL GetFormulaEntries( TypedScStrCollection& rStrings );
BOOL HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab );
@@ -1361,7 +1362,7 @@ SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const;
SfxPrinter* GetPrinter( BOOL bCreateIfNotExist = TRUE );
void SetPrinter( SfxPrinter* pNewPrinter );
VirtualDevice* GetVirtualDevice_100th_mm();
- OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
+ SC_DLLPUBLIC OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
void EraseNonUsedSharedNames(USHORT nLevel);
BOOL GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab,
@@ -1392,7 +1393,7 @@ SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const;
void RemoveAutoSpellObj();
void SetOnlineSpellPos( const ScAddress& rPos );
- BOOL SetVisibleSpellRange( const ScRange& rRange ); // TRUE = changed
+ SC_DLLPUBLIC BOOL SetVisibleSpellRange( const ScRange& rRange ); // TRUE = changed
BYTE GetMacroCallMode() const { return nMacroCallMode; }
void SetMacroCallMode(BYTE nNew) { nMacroCallMode = nNew; }
@@ -1404,7 +1405,7 @@ SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const;
void SetRangeOverflowType(sal_uInt32 nType) { nRangeOverflowType = nType; }
sal_Bool HasRangeOverflow() const { return nRangeOverflowType != 0; }
- sal_uInt32 GetRangeOverflowType() const { return nRangeOverflowType; }
+ SC_DLLPUBLIC sal_uInt32 GetRangeOverflowType() const { return nRangeOverflowType; }
// fuer Broadcasting/Listening
void SetNoSetDirty( BOOL bVal ) { bNoSetDirty = bVal; }
@@ -1427,7 +1428,7 @@ SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const;
BOOL bSetChartRangeLists = FALSE );
void UpdateChart( const String& rName );
void RestoreChartListener( const String& rName );
- void UpdateChartListenerCollection();
+ SC_DLLPUBLIC void UpdateChartListenerCollection();
BOOL IsChartListenerCollectionNeedsUpdate() const
{ return bChartListenerCollectionNeedsUpdate; }
void SetChartListenerCollectionNeedsUpdate( BOOL bFlg )
@@ -1435,7 +1436,7 @@ SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const;
void AddOLEObjectToCollection(const String& rName);
ScChangeViewSettings* GetChangeViewSettings() const { return pChangeViewSettings; }
- void SetChangeViewSettings(const ScChangeViewSettings& rNew);
+ SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings& rNew);
vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharacters();
void SetForbiddenCharacters( const vos::ORef<SvxForbiddenCharactersTable> xNew );
@@ -1450,7 +1451,7 @@ SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const;
BYTE GetEditTextDirection(SCTAB nTab) const; // EEHorizontalTextDirection values
- ScLkUpdMode GetLinkMode() const { return eLinkMode ;}
+ SC_DLLPUBLIC ScLkUpdMode GetLinkMode() const { return eLinkMode ;}
void SetLinkMode( ScLkUpdMode nSet ) { eLinkMode = nSet;}
@@ -1485,7 +1486,7 @@ public:
void EndListeningArea( const ScRange& rRange,
SvtListener* pListener );
/** Broadcast wrapper, calls
- rHint.GetCell()->Broadcast() and AreaBroadcast()
+ SC_DLLPUBLIC rHint.GetCell()->Broadcast() and AreaBroadcast()
and TrackFormulas() and conditional format list
SourceChanged().
Preferred.
@@ -1576,8 +1577,8 @@ public:
void SetExpandRefs( BOOL bVal ) { bExpandRefs = bVal; }
BOOL IsExpandRefs() { return bExpandRefs; }
- void IncSizeRecalcLevel( SCTAB nTab );
- void DecSizeRecalcLevel( SCTAB nTab );
+ SC_DLLPUBLIC void IncSizeRecalcLevel( SCTAB nTab );
+ SC_DLLPUBLIC void DecSizeRecalcLevel( SCTAB nTab );
ULONG GetXMLImportedFormulaCount() const { return nXMLImportedFormulaCount; }
void IncXMLImportedFormulaCount( ULONG nVal )
@@ -1620,12 +1621,12 @@ public:
//! only for import filter, deletes any existing ChangeTrack via
//! EndChangeTracking() and takes ownership of new ChangeTrack pTrack
- void SetChangeTrack( ScChangeTrack* pTrack );
+ SC_DLLPUBLIC void SetChangeTrack( ScChangeTrack* pTrack );
void StartChangeTracking();
void EndChangeTracking();
- void CompareDocument( ScDocument& rOtherDoc );
+ SC_DLLPUBLIC void CompareDocument( ScDocument& rOtherDoc );
void AddUnoObject( SfxListener& rObject );
void RemoveUnoObject( SfxListener& rObject );
@@ -1637,10 +1638,10 @@ public:
void SetInLinkUpdate(BOOL bSet); // TableLink or AreaLink
BOOL IsInLinkUpdate() const; // including DdeLink
- SfxItemPool* GetEditPool() const;
- SfxItemPool* GetEnginePool() const;
- ScFieldEditEngine& GetEditEngine();
- ScNoteEditEngine& GetNoteEngine();
+ SC_DLLPUBLIC SfxItemPool* GetEditPool() const;
+ SC_DLLPUBLIC SfxItemPool* GetEnginePool() const;
+ SC_DLLPUBLIC ScFieldEditEngine& GetEditEngine();
+ SC_DLLPUBLIC ScNoteEditEngine& GetNoteEngine();
SfxItemPool& GetNoteItemPool();
ScRefreshTimerControl* GetRefreshTimerControl() const
@@ -1673,14 +1674,14 @@ private: // CLOOK-Impl-Methoden
void DeleteDrawLayer();
void DeleteColorTable();
- BOOL DrawGetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) const;
+ SC_DLLPUBLIC BOOL DrawGetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) const;
void DrawMovePage( USHORT nOldPos, USHORT nNewPos );
void DrawCopyPage( USHORT nOldPos, USHORT nNewPos );
void UpdateDrawPrinter();
void UpdateDrawLanguages();
void UpdateDrawDefaults();
- void InitClipPtrs( ScDocument* pSourceDoc );
+ SC_DLLPUBLIC void InitClipPtrs( ScDocument* pSourceDoc );
void LoadDdeLinks(SvStream& rStream);
void SaveDdeLinks(SvStream& rStream) const;
diff --git a/sc/inc/dpcachetable.hxx b/sc/inc/dpcachetable.hxx
index 4817b36e43c7..f011d727de2a 100644
--- a/sc/inc/dpcachetable.hxx
+++ b/sc/inc/dpcachetable.hxx
@@ -186,7 +186,7 @@ public:
/** Get the unique entries for a field specified by index. The caller must
make sure that the table is filled before calling function, or it will
get an empty collection. */
- const TypedStrCollection& getFieldEntries(sal_Int32 nIndex) const;
+ const TypedScStrCollection& getFieldEntries(sal_Int32 nIndex) const;
/** Filter the table based on the specified criteria, and copy the
result to rTabData. This method is used, for example, to generate
@@ -210,7 +210,7 @@ private:
void getValueData(ScDocument* pDoc, const ScAddress& rPos, ScDPCacheCell& rCell);
private:
- typedef ::boost::shared_ptr<TypedStrCollection> TypedStrCollectionPtr;
+ typedef ::boost::shared_ptr<TypedScStrCollection> TypedScStrCollectionPtr;
/** main data table. */
::std::vector< ::std::vector< ::ScDPCacheTable::Cell > > maTable;
@@ -219,7 +219,7 @@ private:
::std::vector<sal_Int32> maHeader;
/** unique field entires for each field (column). */
- ::std::vector<TypedStrCollectionPtr> maFieldEntries;
+ ::std::vector<TypedScStrCollectionPtr> maFieldEntries;
/** used to track visibility of rows. The first row below the header row
has the index of 0. */
diff --git a/sc/inc/dpdimsave.hxx b/sc/inc/dpdimsave.hxx
index b14a4070f09e..076e35763d4e 100644
--- a/sc/inc/dpdimsave.hxx
+++ b/sc/inc/dpdimsave.hxx
@@ -34,11 +34,12 @@
#include <vector>
#include <tools/string.hxx>
#include "dpgroup.hxx" // for ScDPNumGroupInfo
+#include "scdllapi.h"
class ScDPGroupTableData;
class ScDPGroupDimension;
class ScDPObject;
-class StrCollection;
+class ScStrCollection;
class SvNumberFormatter;
class ScDPSaveGroupDimension;
@@ -49,7 +50,7 @@ class ScDPSaveGroupDimension;
// These have to be applied before the other ScDPSaveData settings.
//
-class ScDPSaveGroupItem
+class SC_DLLPUBLIC ScDPSaveGroupItem
{
String aGroupName; // name of group
::std::vector<String> aElements; // names of items in original dimension
@@ -79,7 +80,7 @@ public:
typedef ::std::vector<ScDPSaveGroupItem> ScDPSaveGroupItemVec;
-class ScDPSaveGroupDimension
+class SC_DLLPUBLIC ScDPSaveGroupDimension
{
String aSourceDim; // always the real source from the original data
String aGroupDimName;
@@ -109,7 +110,7 @@ public:
void RemoveFromGroups( const String& rItemName );
void RemoveGroup( const String& rGroupName );
bool IsEmpty() const;
- bool HasOnlyHidden( const StrCollection& rVisible );
+ bool HasOnlyHidden( const ScStrCollection& rVisible );
long GetGroupCount() const;
const ScDPSaveGroupItem* GetGroupByIndex( long nIndex ) const;
@@ -120,7 +121,7 @@ public:
typedef ::std::vector<ScDPSaveGroupDimension> ScDPSaveGroupDimensionVec;
-class ScDPSaveNumGroupDimension
+class SC_DLLPUBLIC ScDPSaveNumGroupDimension
{
String aDimensionName;
ScDPNumGroupInfo aGroupInfo;
@@ -146,7 +147,7 @@ public:
typedef ::std::vector<ScDPSaveNumGroupDimension> ScDPSaveNumGroupDimensionVec;
-class ScDPDimensionSaveData
+class SC_DLLPUBLIC ScDPDimensionSaveData
{
ScDPSaveGroupDimensionVec aGroupDimensions;
ScDPSaveNumGroupDimensionVec aNumGroupDimensions;
diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx
index 0fbab349f0a1..c93998e366b1 100644
--- a/sc/inc/dpgroup.hxx
+++ b/sc/inc/dpgroup.hxx
@@ -35,6 +35,7 @@
#include <hash_set>
#include "dptabdat.hxx"
+#include "scdllapi.h"
class ScDocument;
class SvNumberFormatter;
@@ -74,7 +75,7 @@ public:
sal_Int32 GetDatePart() const { return nDatePart; }
const ScDPNumGroupInfo& GetNumInfo() const { return aNumInfo; }
- void FillColumnEntries( TypedStrCollection& rEntries, const TypedStrCollection& rOriginal,
+ void FillColumnEntries( TypedScStrCollection& rEntries, const TypedScStrCollection& rOriginal,
SvNumberFormatter* pFormatter ) const;
};
@@ -109,7 +110,7 @@ class ScDPGroupDimension
String aGroupName;
ScDPDateGroupHelper* pDateHelper;
ScDPGroupItemVec aItems;
- mutable TypedStrCollection* pCollection; // collection of item names (cached)
+ mutable TypedScStrCollection* pCollection; // collection of item names (cached)
public:
ScDPGroupDimension( long nSource, const String& rNewName );
@@ -125,7 +126,7 @@ public:
long GetGroupDim() const { return nGroupDim; }
const String& GetName() const { return aGroupName; }
- const TypedStrCollection& GetColumnEntries( const TypedStrCollection& rOriginal, ScDocument* pDoc ) const;
+ const TypedScStrCollection& GetColumnEntries( const TypedScStrCollection& rOriginal, ScDocument* pDoc ) const;
const ScDPGroupItem* GetGroupForData( const ScDPItemData& rData ) const; // rData = entry in original dim.
const ScDPGroupItem* GetGroupForName( const ScDPItemData& rName ) const; // rName = entry in group dim.
const ScDPGroupItem* GetGroupByIndex( size_t nIndex ) const;
@@ -143,11 +144,11 @@ typedef ::std::vector<ScDPGroupDimension> ScDPGroupDimensionVec;
// --------------------------------------------------------------------
-class ScDPNumGroupDimension
+class SC_DLLPUBLIC ScDPNumGroupDimension
{
ScDPNumGroupInfo aGroupInfo; // settings
ScDPDateGroupHelper* pDateHelper;
- mutable TypedStrCollection* pCollection; // collection of item names (cached)
+ mutable TypedScStrCollection* pCollection; // collection of item names (cached)
mutable bool bHasNonInteger; // initialized in GetNumEntries
mutable sal_Unicode cDecSeparator; // initialized in GetNumEntries
@@ -159,7 +160,7 @@ public:
ScDPNumGroupDimension& operator=( const ScDPNumGroupDimension& rOther );
- const TypedStrCollection& GetNumEntries( const TypedStrCollection& rOriginal, ScDocument* pDoc ) const;
+ const TypedScStrCollection& GetNumEntries( const TypedScStrCollection& rOriginal, ScDocument* pDoc ) const;
const ScDPNumGroupInfo& GetInfo() const { return aGroupInfo; }
bool HasNonInteger() const { return bHasNonInteger; }
@@ -209,7 +210,7 @@ public:
ScDocument* GetDocument() { return pDoc; }
virtual long GetColumnCount();
- virtual const TypedStrCollection& GetColumnEntries(long nColumn);
+ virtual const TypedScStrCollection& GetColumnEntries(long nColumn);
virtual String getDimensionName(long nColumn);
virtual BOOL getIsDataLayoutDimension(long nColumn);
virtual BOOL IsDateDimension(long nDim);
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 3ba1dfab5e98..3ee9ea767386 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -62,8 +62,8 @@ class ScPivotCollection;
struct ScPivotParam;
struct ScImportSourceDesc;
struct ScSheetSourceDesc;
-class StrCollection;
-class TypedStrCollection;
+class ScStrCollection;
+class TypedScStrCollection;
struct PivotField;
class ScDPCacheTable;
@@ -89,7 +89,7 @@ struct ScDPServiceDesc
};
-class SC_DLLPUBLIC ScDPObject : public DataObject
+class SC_DLLPUBLIC ScDPObject : public ScDataObject
{
private:
ScDocument* pDoc;
@@ -119,7 +119,7 @@ public:
ScDPObject(const ScDPObject& r);
virtual ~ScDPObject();
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
void SetAlive(BOOL bSet);
void SetAllowMove(BOOL bSet);
@@ -176,9 +176,9 @@ public:
std::vector< ScDPGetPivotDataField >& rFilters,
const String& rFilterList );
- void GetMemberResultNames( StrCollection& rNames, long nDimension );
+ void GetMemberResultNames( ScStrCollection& rNames, long nDimension );
- void FillPageList( TypedStrCollection& rStrings, long nField );
+ void FillPageList( TypedScStrCollection& rStrings, long nField );
void ToggleDetails(const ::com::sun::star::sheet::DataPilotTableHeaderData& rElemDesc, ScDPObject* pDestObj);
@@ -255,7 +255,7 @@ struct ScDPCacheCell
// ============================================================================
-class ScDPCollection : public Collection
+class ScDPCollection : public ScCollection
{
private:
ScDocument* pDoc;
@@ -278,7 +278,7 @@ public:
ScDPCollection(const ScDPCollection& r);
virtual ~ScDPCollection();
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
ScDPObject* operator[](USHORT nIndex) const {return (ScDPObject*)At(nIndex);}
#if OLD_PIVOT_IMPLEMENTATION
diff --git a/sc/inc/dpoutput.hxx b/sc/inc/dpoutput.hxx
index fe77233261b1..58001e1183a6 100644
--- a/sc/inc/dpoutput.hxx
+++ b/sc/inc/dpoutput.hxx
@@ -51,7 +51,7 @@ namespace com { namespace sun { namespace star { namespace sheet {
class Rectangle;
class SvStream;
class ScDocument;
-class StrCollection;
+class ScStrCollection;
struct ScDPOutLevelData;
@@ -160,7 +160,7 @@ public:
Rectangle& rPosRect, USHORT& rOrient, long& rDimPos );
BOOL IsFilterButton( const ScAddress& rPos );
- void GetMemberResultNames( StrCollection& rNames, long nDimension );
+ void GetMemberResultNames( ScStrCollection& rNames, long nDimension );
static void GetDataDimensionNames( String& rSourceName, String& rGivenName,
const com::sun::star::uno::Reference<
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index 4d1be16e7145..44689bcf0772 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -69,10 +69,10 @@ public:
const String& GetName() const { return aName; }
BOOL HasIsVisible() const;
- void SetIsVisible(BOOL bSet);
+ SC_DLLPUBLIC void SetIsVisible(BOOL bSet);
BOOL GetIsVisible() const { return BOOL(nVisibleMode); }
BOOL HasShowDetails() const;
- void SetShowDetails(BOOL bSet);
+ SC_DLLPUBLIC void SetShowDetails(BOOL bSet);
BOOL GetShowDetails() const { return BOOL(nShowDetailsMode); }
void SetName( const String& rNew ); // used if the source member was renamed (groups)
@@ -127,39 +127,39 @@ public:
void SetName( const String& rNew ); // used if the source dim was renamed (groups)
- void SetOrientation(USHORT nNew);
+ SC_DLLPUBLIC void SetOrientation(USHORT nNew);
void SetSubTotals(BOOL bSet); // to be removed!
- void SetSubTotals(long nCount, const USHORT* pFuncs);
+ SC_DLLPUBLIC void SetSubTotals(long nCount, const USHORT* pFuncs);
long GetSubTotalsCount() const { return nSubTotalCount; }
USHORT GetSubTotalFunc(long nIndex) const { return pSubTotalFuncs[nIndex]; }
- void SetShowEmpty(BOOL bSet);
+ SC_DLLPUBLIC void SetShowEmpty(BOOL bSet);
BOOL GetShowEmpty() const { return BOOL(nShowEmptyMode); }
- void SetFunction(USHORT nNew); // enum GeneralFunction
+ SC_DLLPUBLIC void SetFunction(USHORT nNew); // enum GeneralFunction
USHORT GetFunction() const { return nFunction; }
void SetUsedHierarchy(long nNew);
long GetUsedHierarchy() const { return nUsedHierarchy; }
- void SetLayoutName(const String* pName);
- const String& GetLayoutName() const;
- BOOL HasLayoutName() const;
+ SC_DLLPUBLIC void SetLayoutName(const String* pName);
+ SC_DLLPUBLIC const String& GetLayoutName() const;
+ SC_DLLPUBLIC BOOL HasLayoutName() const;
const ::com::sun::star::sheet::DataPilotFieldReference* GetReferenceValue() const { return pReferenceValue; }
- void SetReferenceValue(const ::com::sun::star::sheet::DataPilotFieldReference* pNew);
+ SC_DLLPUBLIC void SetReferenceValue(const ::com::sun::star::sheet::DataPilotFieldReference* pNew);
const ::com::sun::star::sheet::DataPilotFieldSortInfo* GetSortInfo() const { return pSortInfo; }
- void SetSortInfo(const ::com::sun::star::sheet::DataPilotFieldSortInfo* pNew);
+ SC_DLLPUBLIC void SetSortInfo(const ::com::sun::star::sheet::DataPilotFieldSortInfo* pNew);
const ::com::sun::star::sheet::DataPilotFieldAutoShowInfo* GetAutoShowInfo() const { return pAutoShowInfo; }
- void SetAutoShowInfo(const ::com::sun::star::sheet::DataPilotFieldAutoShowInfo* pNew);
+ SC_DLLPUBLIC void SetAutoShowInfo(const ::com::sun::star::sheet::DataPilotFieldAutoShowInfo* pNew);
const ::com::sun::star::sheet::DataPilotFieldLayoutInfo* GetLayoutInfo() const { return pLayoutInfo; }
- void SetLayoutInfo(const ::com::sun::star::sheet::DataPilotFieldLayoutInfo* pNew);
+ SC_DLLPUBLIC void SetLayoutInfo(const ::com::sun::star::sheet::DataPilotFieldLayoutInfo* pNew);
- void SetCurrentPage( const String* pPage ); // NULL = no selection (all)
- BOOL HasCurrentPage() const;
- const String& GetCurrentPage() const;
+ SC_DLLPUBLIC void SetCurrentPage( const String* pPage ); // NULL = no selection (all)
+ SC_DLLPUBLIC BOOL HasCurrentPage() const;
+ SC_DLLPUBLIC const String& GetCurrentPage() const;
USHORT GetOrientation() const { return nOrientation; }
ScDPSaveMember* GetExistingMemberByName(const String& rName);
- ScDPSaveMember* GetMemberByName(const String& rName);
+ SC_DLLPUBLIC ScDPSaveMember* GetMemberByName(const String& rName);
void SetMemberPosition( const String& rName, sal_Int32 nNewPos );
@@ -181,9 +181,9 @@ private:
BOOL bDrillDown; // not passed to DataPilotSource
public:
- ScDPSaveData();
+ SC_DLLPUBLIC ScDPSaveData();
ScDPSaveData(const ScDPSaveData& r);
- ~ScDPSaveData();
+ SC_DLLPUBLIC ~ScDPSaveData();
ScDPSaveData& operator= ( const ScDPSaveData& r );
@@ -193,13 +193,13 @@ public:
void AddDimension(ScDPSaveDimension* pDim) { aDimList.Insert(pDim, LIST_APPEND); }
ScDPSaveDimension* GetDimensionByName(const String& rName);
- ScDPSaveDimension* GetDataLayoutDimension();
+ SC_DLLPUBLIC ScDPSaveDimension* GetDataLayoutDimension();
ScDPSaveDimension* DuplicateDimension(const String& rName);
- ScDPSaveDimension& DuplicateDimension(const ScDPSaveDimension& rDim);
+ SC_DLLPUBLIC ScDPSaveDimension& DuplicateDimension(const ScDPSaveDimension& rDim);
SC_DLLPUBLIC ScDPSaveDimension* GetExistingDimensionByName(const String& rName);
- ScDPSaveDimension* GetNewDimensionByName(const String& rName);
+ SC_DLLPUBLIC ScDPSaveDimension* GetNewDimensionByName(const String& rName);
void RemoveDimensionByName(const String& rName);
@@ -208,18 +208,18 @@ public:
void SetPosition( ScDPSaveDimension* pDim, long nNew );
- void SetColumnGrand( BOOL bSet );
+ SC_DLLPUBLIC void SetColumnGrand( BOOL bSet );
BOOL GetColumnGrand() const { return BOOL(nColumnGrandMode); }
- void SetRowGrand( BOOL bSet );
+ SC_DLLPUBLIC void SetRowGrand( BOOL bSet );
BOOL GetRowGrand() const { return BOOL(nRowGrandMode); }
void SetIgnoreEmptyRows( BOOL bSet );
BOOL GetIgnoreEmptyRows() const { return BOOL(nIgnoreEmptyMode); }
void SetRepeatIfEmpty( BOOL bSet );
BOOL GetRepeatIfEmpty() const { return BOOL(nRepeatEmptyMode); }
- void SetFilterButton( BOOL bSet );
+ SC_DLLPUBLIC void SetFilterButton( BOOL bSet );
BOOL GetFilterButton() const { return bFilterButton; }
- void SetDrillDown( BOOL bSet );
+ SC_DLLPUBLIC void SetDrillDown( BOOL bSet );
BOOL GetDrillDown() const { return bDrillDown; }
void WriteToSource( const com::sun::star::uno::Reference<
@@ -228,7 +228,7 @@ public:
BOOL IsEmpty() const;
const ScDPDimensionSaveData* GetExistingDimensionData() const { return pDimensionData; }
- ScDPDimensionSaveData* GetDimensionData(); // create if not there
+ SC_DLLPUBLIC ScDPDimensionSaveData* GetDimensionData(); // create if not there
void SetDimensionData( const ScDPDimensionSaveData* pNew ); // copied
};
diff --git a/sc/inc/dpsdbtab.hxx b/sc/inc/dpsdbtab.hxx
index 84fd36f65ea6..40a376c7b33a 100644
--- a/sc/inc/dpsdbtab.hxx
+++ b/sc/inc/dpsdbtab.hxx
@@ -74,7 +74,7 @@ public:
virtual ~ScDatabaseDPData();
virtual long GetColumnCount();
- virtual const TypedStrCollection& GetColumnEntries(long nColumn);
+ virtual const TypedScStrCollection& GetColumnEntries(long nColumn);
virtual String getDimensionName(long nColumn);
virtual BOOL getIsDataLayoutDimension(long nColumn);
virtual BOOL IsDateDimension(long nDim);
diff --git a/sc/inc/dpshttab.hxx b/sc/inc/dpshttab.hxx
index 9cc3881e92ab..841517ef7e17 100644
--- a/sc/inc/dpshttab.hxx
+++ b/sc/inc/dpshttab.hxx
@@ -34,6 +34,7 @@
#include "dptabdat.hxx"
#include "global.hxx"
#include "address.hxx"
+#include "scdllapi.h"
#include <vector>
@@ -61,7 +62,7 @@ struct ScSheetSourceDesc
class ScSheetDPData_Impl;
-class ScSheetDPData : public ScDPTableData
+class SC_DLLPUBLIC ScSheetDPData : public ScDPTableData
{
private:
ScSheetDPData_Impl* pImpl;
@@ -71,7 +72,7 @@ public:
virtual ~ScSheetDPData();
virtual long GetColumnCount();
- virtual const TypedStrCollection& GetColumnEntries(long nColumn);
+ virtual const TypedScStrCollection& GetColumnEntries(long nColumn);
virtual String getDimensionName(long nColumn);
virtual BOOL getIsDataLayoutDimension(long nColumn);
virtual BOOL IsDateDimension(long nDim);
diff --git a/sc/inc/dptabdat.hxx b/sc/inc/dptabdat.hxx
index 90953d8c3b4f..e97237186443 100644
--- a/sc/inc/dptabdat.hxx
+++ b/sc/inc/dptabdat.hxx
@@ -45,7 +45,7 @@ namespace com { namespace sun { namespace star { namespace sheet {
struct DataPilotFieldFilter;
}}}}
-class TypedStrCollection;
+class TypedScStrCollection;
class ScSimpleSharedString;
// -----------------------------------------------------------------------
@@ -154,11 +154,11 @@ public:
long GetDatePart( long nDateVal, long nHierarchy, long nLevel );
- //! use (new) typed collection instead of StrCollection
+ //! use (new) typed collection instead of ScStrCollection
//! or separate Str and ValueCollection
virtual long GetColumnCount() = 0;
- virtual const TypedStrCollection& GetColumnEntries(long nColumn) = 0;
+ virtual const TypedScStrCollection& GetColumnEntries(long nColumn) = 0;
virtual String getDimensionName(long nColumn) = 0;
virtual BOOL getIsDataLayoutDimension(long nColumn) = 0;
virtual BOOL IsDateDimension(long nDim) = 0;
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 9bb4cdc6aa7c..1174571a400c 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -78,7 +78,7 @@ public:
// -----------------------------------------------------------------------
-class ScDrawLayer: public FmFormModel
+class SC_DLLPUBLIC ScDrawLayer: public FmFormModel
{
private:
//REMOVE SotStorageRef xPictureStorage;
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index 02e25848af2b..3e1573ac7c89 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -169,7 +169,7 @@ public:
// 1/100 mm
-class ScTabEditEngine : public ScEditEngineDefaulter
+class SC_DLLPUBLIC ScTabEditEngine : public ScEditEngineDefaulter
{
private:
void Init(const ScPatternAttr& rPattern);
@@ -200,7 +200,7 @@ struct ScHeaderFieldData
// fuer Feldbefehle in der Tabelle
-class ScFieldEditEngine : public ScEditEngineDefaulter
+class SC_DLLPUBLIC ScFieldEditEngine : public ScEditEngineDefaulter
{
private:
BOOL bExecuteURL;
@@ -220,7 +220,7 @@ public:
// for headers/footers with fields
-class ScHeaderEditEngine : public ScEditEngineDefaulter
+class SC_DLLPUBLIC ScHeaderEditEngine : public ScEditEngineDefaulter
{
private:
ScHeaderFieldData aData;
diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx
index 3a966f210c38..157795db2a42 100644
--- a/sc/inc/filter.hxx
+++ b/sc/inc/filter.hxx
@@ -71,7 +71,7 @@ enum EXCIMPFORMAT { EIF_AUTO, EIF_BIFF5, EIF_BIFF8, EIF_BIFF_LE4 };
// fuer Export
enum ExportFormatLotus { ExpWK1, ExpWK3, ExpWK4 };
-enum ExportFormatExcel { ExpBiff2, ExpBiff3, ExpBiff4, ExpBiff4W, ExpBiff5 };
+enum ExportFormatExcel { ExpBiff2, ExpBiff3, ExpBiff4, ExpBiff4W, ExpBiff5, ExpBiff8, Exp2007Xml };
// Optionen fuer DIF-Im-/Export (Kombination ueber '|')
@@ -82,49 +82,63 @@ enum ExportFormatExcel { ExpBiff2, ExpBiff3, ExpBiff4, ExpBiff4W, ExpBiff5 };
#define SC_DIFOPT_EXCEL (SC_DIFOPT_DATE|SC_DIFOPT_TIME|SC_DIFOPT_CURRENCY)
-
-// ***********************************************************************
-// Diverse Importfilter
-// ***********************************************************************
-
-FltError ScImportLotus123( SfxMedium&, ScDocument*, CharSet eSrc = RTL_TEXTENCODING_DONTKNOW );
-
-FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT );
+// These are implemented inside the scfilt library and lazy loaded
+
+class ScRTFImport;
+class ScHTMLImport;
+
+class ScEEAbsImport {
+ public:
+ virtual ~ScEEAbsImport() {}
+ virtual ULONG Read( SvStream& rStream, const String& rBaseURL ) = 0;
+ virtual ScRange GetRange() = 0;
+ virtual void WriteToDocument( BOOL bSizeColsRows = FALSE, double nOutputFactor = 1.0 ) = 0;
+};
+
+class ScFormatFilterPlugin {
+ public:
+ // various import filters
+ virtual FltError ScImportLotus123( SfxMedium&, ScDocument*, CharSet eSrc = RTL_TEXTENCODING_DONTKNOW ) = 0;
+ virtual FltError ScImportQuattroPro( SfxMedium &rMedium, ScDocument *pDoc ) = 0;
+ virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT ) = 0;
// eFormat == EIF_AUTO -> passender Filter wird automatisch verwendet
// eFormat == EIF_BIFF5 -> nur Biff5-Stream fuehrt zum Erfolg (auch wenn in einem Excel97-Doc)
// eFormat == EIF_BIFF8 -> nur Biff8-Stream fuehrt zum Erfolg (nur in Excel97-Docs)
// eFormat == EIF_BIFF_LE4 -> nur Nicht-Storage-Dateien _koennen_ zum Erfolg fuehren
-
-FltError ScImportStarCalc10( SvStream&, ScDocument* );
-
-FltError ScImportDif( SvStream&, ScDocument*, const ScAddress& rInsPos,
- const CharSet eSrc = RTL_TEXTENCODING_DONTKNOW, UINT32 nDifOption = SC_DIFOPT_EXCEL );
-
-FltError ScImportRTF( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange );
-
-FltError ScImportHTML( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange, double nOutputFactor = 1.0, BOOL bCalcWidthHeight = TRUE );
-
-FltError ScImportQuattroPro( SfxMedium &rMedium, ScDocument *pDoc );
-// ***********************************************************************
-// Diverse Exportfilter
-// ***********************************************************************
-
+ virtual FltError ScImportStarCalc10( SvStream&, ScDocument* ) = 0;
+ virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress& rInsPos,
+ const CharSet eSrc = RTL_TEXTENCODING_DONTKNOW, UINT32 nDifOption = SC_DIFOPT_EXCEL ) = 0;
+ virtual FltError ScImportRTF( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange ) = 0;
+ virtual FltError ScImportHTML( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange, double nOutputFactor = 1.0, BOOL bCalcWidthHeight = TRUE ) = 0;
+
+ // various import helpers
+ virtual ScEEAbsImport *CreateRTFImport( ScDocument* pDoc, const ScRange& rRange ) = 0;
+ virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight ) = 0;
+ virtual String GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrigName ) = 0;
+
+ // various export filters
#if ENABLE_LOTUS123_EXPORT
-FltError ScExportLotus123( SvStream&, ScDocument*, ExportFormatLotus, CharSet eDest );
+ virtual FltError ScExportLotus123( SvStream&, ScDocument*, ExportFormatLotus, CharSet eDest ) = 0;
#endif
-
-FltError ScExportExcel5( SfxMedium&, ScDocument*, const BOOL bTuerk, CharSet eDest );
-
-FltError ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const CharSet eDest,
- UINT32 nDifOption = SC_DIFOPT_EXCEL );
-
-FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest,
- UINT32 nDifOption = SC_DIFOPT_EXCEL );
-
-FltError ScExportHTML( SvStream&, const String& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, BOOL bAll,
- const String& rStreamPath, String& rNonConvertibleChars );
-
-FltError ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest );
+ virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, CharSet eDest ) = 0;
+ virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const CharSet eDest,
+ UINT32 nDifOption = SC_DIFOPT_EXCEL ) = 0;
+ virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest,
+ UINT32 nDifOption = SC_DIFOPT_EXCEL ) = 0;
+ virtual FltError ScExportHTML( SvStream&, const String& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, BOOL bAll,
+ const String& rStreamPath, String& rNonConvertibleChars ) = 0;
+ virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest ) = 0;
+};
+
+// scfilt plugin symbol
+extern "C" {
+ ScFormatFilterPlugin * SAL_CALL ScFilterCreate(void);
+}
+
+class ScFormatFilter {
+ public:
+ static ScFormatFilterPlugin &Get();
+};
#endif
diff --git a/sc/inc/filtopt.hxx b/sc/inc/filtopt.hxx
index c188e3d0415e..9170cca94c57 100644
--- a/sc/inc/filtopt.hxx
+++ b/sc/inc/filtopt.hxx
@@ -31,16 +31,15 @@
#ifndef SC_FILTOPT_HXX
#define SC_FILTOPT_HXX
-
#include <unotools/configitem.hxx>
#include <tools/solar.h>
-
+#include "scdllapi.h"
//==================================================================
// filter options
//==================================================================
-class ScFilterOptions : public utl::ConfigItem
+class SC_DLLPUBLIC ScFilterOptions : public utl::ConfigItem
{
BOOL bWK3Flag;
double fExcelColScale;
diff --git a/sc/inc/filtuno.hxx b/sc/inc/filtuno.hxx
index e233be79515c..eedfa0ffcf70 100644
--- a/sc/inc/filtuno.hxx
+++ b/sc/inc/filtuno.hxx
@@ -37,7 +37,7 @@
#include <com/sun/star/document/XExporter.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase5.hxx>
-
+#include "scdllapi.h"
namespace com { namespace sun { namespace star { namespace io {
class XInputStream;
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 3916fa1f6da9..63296c93b96d 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -547,53 +547,53 @@ public:
static ::com::sun::star::lang::Locale* pLocale;
static SvtSysLocale* pSysLocale;
// for faster access a pointer to the single instance provided by SvtSysLocale
- static const CharClass* pCharClass;
+ SC_DLLPUBLIC static const CharClass* pCharClass;
// for faster access a pointer to the single instance provided by SvtSysLocale
- static const LocaleDataWrapper* pLocaleData;
-SC_DLLPUBLIC static const LocaleDataWrapper* GetpLocaleData();
+ SC_DLLPUBLIC static const LocaleDataWrapper* pLocaleData;
+ SC_DLLPUBLIC static const LocaleDataWrapper* GetpLocaleData();
static CalendarWrapper* pCalendar;
- static CollatorWrapper* pCollator;
+ SC_DLLPUBLIC static CollatorWrapper* pCollator;
static CollatorWrapper* pCaseCollator;
static ::utl::TransliterationWrapper* pTransliteration;
-SC_DLLPUBLIC static ::utl::TransliterationWrapper* GetpTransliteration(); //CHINA001
+ SC_DLLPUBLIC static ::utl::TransliterationWrapper* GetpTransliteration(); //CHINA001
static ::utl::TransliterationWrapper* pCaseTransliteration;
static IntlWrapper* pScIntlWrapper;
- static LanguageType eLnge;
+ SC_DLLPUBLIC static LanguageType eLnge;
static sal_Unicode cListDelimiter;
static const String& GetClipDocName();
static void SetClipDocName( const String& rNew );
- static SC_DLLPUBLIC const SvxSearchItem& GetSearchItem();
- static SC_DLLPUBLIC void SetSearchItem( const SvxSearchItem& rNew );
-SC_DLLPUBLIC static ScAutoFormat* GetAutoFormat();
+ SC_DLLPUBLIC static const SvxSearchItem& GetSearchItem();
+ SC_DLLPUBLIC static void SetSearchItem( const SvxSearchItem& rNew );
+ SC_DLLPUBLIC static ScAutoFormat* GetAutoFormat();
static void ClearAutoFormat(); //BugId 54209
static FuncCollection* GetFuncCollection();
- static ScUnoAddInCollection* GetAddInCollection();
-SC_DLLPUBLIC static ScUserList* GetUserList();
+ SC_DLLPUBLIC static ScUnoAddInCollection* GetAddInCollection();
+ SC_DLLPUBLIC static ScUserList* GetUserList();
static void SetUserList( const ScUserList* pNewList );
-SC_DLLPUBLIC static const String& GetRscString( USHORT nIndex );
+ SC_DLLPUBLIC static const String& GetRscString( USHORT nIndex );
static void OpenURL( const String& rURL, const String& rTarget );
- static String GetAbsDocName( const String& rFileName,
+ SC_DLLPUBLIC static String GetAbsDocName( const String& rFileName,
SfxObjectShell* pShell );
- static String GetDocTabName( const String& rFileName,
+ SC_DLLPUBLIC static String GetDocTabName( const String& rFileName,
const String& rTabName );
- static ULONG GetStandardFormat( SvNumberFormatter&,
+ SC_DLLPUBLIC static ULONG GetStandardFormat( SvNumberFormatter&,
ULONG nFormat, short nType );
- static ULONG GetStandardFormat( double, SvNumberFormatter&,
+ SC_DLLPUBLIC static ULONG GetStandardFormat( double, SvNumberFormatter&,
ULONG nFormat, short nType );
- static double nScreenPPTX;
- static double nScreenPPTY;
+ SC_DLLPUBLIC static double nScreenPPTX;
+ SC_DLLPUBLIC static double nScreenPPTY;
static ScDocShellRef* pDrawClipDocShellRef;
static USHORT nDefFontHeight;
static USHORT nStdRowHeight;
- static long nLastRowHeightExtra;
+ SC_DLLPUBLIC static long nLastRowHeightExtra;
static long nLastColWidthExtra;
static void Init(); // am Anfang
@@ -607,7 +607,7 @@ SC_DLLPUBLIC static const String& GetRscString( USHORT nIndex );
static SvxBrushItem* GetButtonBrushItem();
static SvxBrushItem* GetEmbeddedBrushItem() { return pEmbeddedBrushItem; }
static SvxBrushItem* GetProtectedBrushItem() { return pProtectedBrushItem; }
-SC_DLLPUBLIC static const String& GetEmptyString();
+ SC_DLLPUBLIC static const String& GetEmptyString();
static const String& GetScDocString();
/** Returns the specified image list with outline symbols.
@@ -647,13 +647,13 @@ SC_DLLPUBLIC static const String& GetEmptyString();
@param cSep The character to separate the tokens.
@param nSepCount Specifies how often cSep is inserted between two tokens.
@param bForceSep true = Always insert separator; false = Only, if not at begin or end. */
-SC_DLLPUBLIC static void AddToken(
+ SC_DLLPUBLIC static void AddToken(
String& rTokenList, const String& rToken,
sal_Unicode cSep, xub_StrLen nSepCount = 1,
bool bForceSep = false );
/** Returns true, if the first and last character of the string is cQuote. */
-SC_DLLPUBLIC static bool IsQuoted( const String& rString, sal_Unicode cQuote = '\'' );
+ SC_DLLPUBLIC static bool IsQuoted( const String& rString, sal_Unicode cQuote = '\'' );
/** Inserts the character cQuote at beginning and end of rString.
@param bEscapeEmbedded If <TRUE/>, embedded quote characters are
@@ -693,15 +693,15 @@ SC_DLLPUBLIC static const sal_Unicode* FindUnquoted( const sal_Unicode* pStri
static BOOL IsSystemRTL(); // depending on system language
static LanguageType GetEditDefaultLanguage(); // for EditEngine::SetDefaultLanguage
- static BYTE GetDefaultScriptType(); // for all WEAK characters
+ SC_DLLPUBLIC static BYTE GetDefaultScriptType(); // for all WEAK characters
/** Map ATTR_((CJK|CTL)_)?FONT_... to proper WhichIDs.
If more than one SCRIPTTYPE_... values are or'ed together, prefers
first COMPLEX, then ASIAN */
- static USHORT GetScriptedWhichID( BYTE nScriptType, USHORT nWhich );
+ SC_DLLPUBLIC static USHORT GetScriptedWhichID( BYTE nScriptType, USHORT nWhich );
/** Adds a language item to the item set, if the number format item contains
a language that differs from its parent's language. */
- static void AddLanguage( SfxItemSet& rSet, SvNumberFormatter& rFormatter );
+ SC_DLLPUBLIC static void AddLanguage( SfxItemSet& rSet, SvNumberFormatter& rFormatter );
/** Obtain the ordinal suffix for a number according to the system locale */
static String GetOrdinalSuffix( sal_Int32 nNumber);
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx
index 8eee5df56ebd..1486d3ce480b 100644
--- a/sc/inc/miscuno.hxx
+++ b/sc/inc/miscuno.hxx
@@ -271,10 +271,10 @@ public:
//UNUSED2008-05 };
-class ScUnoHelpFunctions
+class SC_DLLPUBLIC ScUnoHelpFunctions
{
public:
- SC_DLLPUBLIC static com::sun::star::uno::Reference<com::sun::star::uno::XInterface>
+ static com::sun::star::uno::Reference<com::sun::star::uno::XInterface>
AnyToInterface( const com::sun::star::uno::Any& rAny );
static sal_Bool GetBoolProperty( const com::sun::star::uno::Reference<
com::sun::star::beans::XPropertySet>& xProp,
diff --git a/sc/inc/olinetab.hxx b/sc/inc/olinetab.hxx
index 2ef72d67bc10..59846d7717a0 100644
--- a/sc/inc/olinetab.hxx
+++ b/sc/inc/olinetab.hxx
@@ -34,7 +34,7 @@
#include "collect.hxx"
#include "compressedarray.hxx"
-
+#include "scdllapi.h"
#define SC_OL_MAXDEPTH 7
@@ -43,7 +43,7 @@ class ScMultipleReadHeader;
class ScMultipleWriteHeader;
-class ScOutlineEntry : public DataObject
+class ScOutlineEntry : public ScDataObject
{
SCCOLROW nStart;
SCSIZE nSize;
@@ -55,7 +55,7 @@ public:
BOOL bNewHidden = FALSE );
ScOutlineEntry( const ScOutlineEntry& rEntry );
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
SCCOLROW GetStart() const { return nStart; }
SCSIZE GetSize() const { return nSize; }
@@ -71,18 +71,18 @@ public:
};
-class ScOutlineCollection : public SortedCollection
+class ScOutlineCollection : public ScSortedCollection
{
public:
ScOutlineCollection();
- virtual short Compare(DataObject* pKey1, DataObject* pKey2) const;
+ virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
USHORT FindStart( SCCOLROW nMinStart );
};
-class ScOutlineArray
+class SC_DLLPUBLIC ScOutlineArray
{
friend class ScSubOutlineIterator;
diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx
index 3caf946459d2..66e87facfd9a 100644
--- a/sc/inc/pivot.hxx
+++ b/sc/inc/pivot.hxx
@@ -162,19 +162,19 @@ typedef PivotField PivotFieldArr[PIVOT_MAXFIELD];
typedef PivotField PivotPageFieldArr[PIVOT_MAXPAGEFIELD];
#if OLD_PIVOT_IMPLEMENTATION
-class PivotStrCollection : public StrCollection
+class PivotScStrCollection : public ScStrCollection
{
ScUserListData* pUserData;
public:
- PivotStrCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) :
- StrCollection ( nLim, nDel, bDup ),
+ PivotScStrCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) :
+ ScStrCollection ( nLim, nDel, bDup ),
pUserData (NULL) { }
- PivotStrCollection(const PivotStrCollection& rPivotStrCollection) :
- StrCollection ( rPivotStrCollection ),
- pUserData ( rPivotStrCollection.pUserData) {}
+ PivotScStrCollection(const PivotScStrCollection& rPivotScStrCollection) :
+ ScStrCollection ( rPivotScStrCollection ),
+ pUserData ( rPivotScStrCollection.pUserData) {}
- virtual DataObject* Clone() const;
- virtual short Compare(DataObject* pKey1, DataObject* pKey2) const;
+ virtual ScDataObject* Clone() const;
+ virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
TypedStrData* operator[]( const USHORT nIndex) const
{ return (TypedStrData*)At(nIndex); }
@@ -185,7 +185,7 @@ public:
USHORT GetIndex(TypedStrData* pData) const;
};
-class ScPivot : public DataObject
+class ScPivot : public ScDataObject
{
ScDocument* pDoc;
ScQueryParam aQuery;
@@ -224,9 +224,9 @@ class ScPivot : public DataObject
PivotFieldArr aRowArr;
PivotFieldArr aDataArr;
- PivotStrCollection* pColList[PIVOT_MAXFIELD]; // pro Zeile alle Eintraege
- PivotStrCollection* pRowList[PIVOT_MAXFIELD];
- PivotStrCollection* pDataList; // Shortcut auf Col/RowList mit Daten
+ PivotScStrCollection* pColList[PIVOT_MAXFIELD]; // pro Zeile alle Eintraege
+ PivotScStrCollection* pRowList[PIVOT_MAXFIELD];
+ PivotScStrCollection* pDataList; // Shortcut auf Col/RowList mit Daten
SubTotal** ppDataArr;
SCSIZE nDataColCount;
@@ -246,7 +246,7 @@ public:
ScPivot(const ScPivot& rPivot);
~ScPivot();
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
ScPivot* CreateNew() const;
@@ -332,20 +332,20 @@ private:
};
//------------------------------------------------------------------------
-class ScPivotCollection : public Collection
+class ScPivotCollection : public ScCollection
{
private:
ScDocument* pDoc;
public:
ScPivotCollection(USHORT nLim = 4, USHORT nDel = 4, ScDocument* pDocument = NULL) :
- Collection ( nLim, nDel),
+ ScCollection ( nLim, nDel),
pDoc ( pDocument ) {}
ScPivotCollection(const ScPivotCollection& rScPivotCollection) :
- Collection ( rScPivotCollection ),
+ ScCollection ( rScPivotCollection ),
pDoc ( rScPivotCollection.pDoc ) {}
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
ScPivot* operator[]( const USHORT nIndex) const {return (ScPivot*)At(nIndex);}
ScPivot* GetPivotAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx
index 15ca7ec6a521..4997a456d223 100644
--- a/sc/inc/postit.hxx
+++ b/sc/inc/postit.hxx
@@ -45,6 +45,7 @@
#include <svx/svdocapt.hxx>
#include "global.hxx"
#include <com/sun/star/drawing/XShape.hpp>
+#include "scdllapi.h"
// indicative text length for a note object
#define SC_NOTE_SMALLTEXT 100
@@ -56,7 +57,7 @@ class ScDocument;
// Notes
//==================================================================
-class ScPostIt
+class SC_DLLPUBLIC ScPostIt
{
private:
typedef ::boost::shared_ptr< EditTextObject > EditObjPtr;
diff --git a/sc/inc/progress.hxx b/sc/inc/progress.hxx
index 6796b467aa24..b30cf6d9dc70 100644
--- a/sc/inc/progress.hxx
+++ b/sc/inc/progress.hxx
@@ -32,10 +32,11 @@
#define SC_PROGRESS_HXX
#include <sfx2/progress.hxx>
+#include "scdllapi.h"
class ScDocument;
-class ScProgress
+class SC_DLLPUBLIC ScProgress
{
private:
static SfxProgress* pGlobalProgress;
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 608f9ec1d868..4b61c4de360d 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -35,6 +35,7 @@
#include "address.hxx"
#include "collect.hxx"
#include "grammar.hxx"
+#include "scdllapi.h"
//------------------------------------------------------------------------
@@ -68,7 +69,7 @@ typedef USHORT RangeType;
class ScTokenArray;
class ScIndexMap;
-class ScRangeData : public DataObject
+class ScRangeData : public ScDataObject
{
private:
String aName;
@@ -83,18 +84,18 @@ private:
friend class ScRangeName;
ScRangeData( USHORT nIndex );
public:
- ScRangeData( ScDocument* pDoc,
+ SC_DLLPUBLIC ScRangeData( ScDocument* pDoc,
const String& rName,
const String& rSymbol,
const ScAddress& rAdr = ScAddress(),
RangeType nType = RT_NAME,
const ScGrammar::Grammar eGrammar = ScGrammar::GRAM_DEFAULT );
- ScRangeData( ScDocument* pDoc,
+ SC_DLLPUBLIC ScRangeData( ScDocument* pDoc,
const String& rName,
const ScTokenArray& rArr,
const ScAddress& rAdr = ScAddress(),
RangeType nType = RT_NAME );
- ScRangeData( ScDocument* pDoc,
+ SC_DLLPUBLIC ScRangeData( ScDocument* pDoc,
const String& rName,
const ScAddress& rTarget );
// rTarget ist ABSPOS Sprungmarke
@@ -103,7 +104,7 @@ public:
virtual ~ScRangeData();
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
BOOL operator== (const ScRangeData& rData) const;
@@ -123,7 +124,7 @@ public:
void AddType( RangeType nType ) { eType = eType|nType; }
RangeType GetType() const { return eType; }
BOOL HasType( RangeType nType ) const;
- void GetSymbol( String& rSymbol, const ScGrammar::Grammar eGrammar = ScGrammar::GRAM_DEFAULT ) const;
+ SC_DLLPUBLIC void GetSymbol( String& rSymbol, const ScGrammar::Grammar eGrammar = ScGrammar::GRAM_DEFAULT ) const;
void UpdateSymbol( String& rSymbol, const ScAddress&,
const ScGrammar::Grammar eGrammar = ScGrammar::GRAM_DEFAULT );
void UpdateSymbol( rtl::OUStringBuffer& rBuffer, const ScAddress&,
@@ -133,12 +134,12 @@ public:
SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
BOOL IsModified() const { return bModified; }
- void GuessPosition();
+ SC_DLLPUBLIC void GuessPosition();
void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest );
void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
- BOOL IsReference( ScRange& rRef ) const;
+ SC_DLLPUBLIC BOOL IsReference( ScRange& rRef ) const;
BOOL IsReference( ScRange& rRef, const ScAddress& rPos ) const;
BOOL IsValidReference( ScRange& rRef ) const;
@@ -161,11 +162,7 @@ inline BOOL ScRangeData::HasType( RangeType nType ) const
return ( ( eType & nType ) == nType );
}
-extern "C" int
-#ifdef WNT
-__cdecl
-#endif
-ScRangeData_QsortNameCompare( const void*, const void* );
+extern "C" int SAL_CALL ScRangeData_QsortNameCompare( const void*, const void* );
#if defined( ICC ) && defined( OS2 )
static int _Optlink ICCQsortNameCompare( const void* a, const void* b)
@@ -174,34 +171,34 @@ ScRangeData_QsortNameCompare( const void*, const void* );
//------------------------------------------------------------------------
-class ScRangeName : public SortedCollection
+class ScRangeName : public ScSortedCollection
{
private:
ScDocument* pDoc;
USHORT nSharedMaxIndex;
- using SortedCollection::Clone; // calcwarnings: shouldn't be used
+ using ScSortedCollection::Clone; // calcwarnings: shouldn't be used
public:
ScRangeName(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE,
ScDocument* pDocument = NULL) :
- SortedCollection ( nLim, nDel, bDup ),
+ ScSortedCollection ( nLim, nDel, bDup ),
pDoc ( pDocument ),
nSharedMaxIndex ( 1 ) {} // darf nicht 0 sein!!
ScRangeName(const ScRangeName& rScRangeName, ScDocument* pDocument);
- virtual DataObject* Clone(ScDocument* pDocP) const
+ virtual ScDataObject* Clone(ScDocument* pDocP) const
{ return new ScRangeName(*this, pDocP); }
ScRangeData* operator[]( const USHORT nIndex) const
{ return (ScRangeData*)At(nIndex); }
- virtual short Compare(DataObject* pKey1, DataObject* pKey2) const;
- virtual BOOL IsEqual(DataObject* pKey1, DataObject* pKey2) const;
+ virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
+ virtual BOOL IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const;
ScRangeData* GetRangeAtCursor( const ScAddress&, BOOL bStartOnly ) const;
- ScRangeData* GetRangeAtBlock( const ScRange& ) const;
+ SC_DLLPUBLIC ScRangeData* GetRangeAtBlock( const ScRange& ) const;
- BOOL SearchName( const String& rName, USHORT& rPos ) const;
+ SC_DLLPUBLIC BOOL SearchName( const String& rName, USHORT& rPos ) const;
// SearchNameUpper must be called with an upper-case search string
BOOL SearchNameUpper( const String& rUpperName, USHORT& rPos ) const;
void UpdateReference(UpdateRefMode eUpdateRefMode,
@@ -210,8 +207,8 @@ public:
void UpdateTabRef(SCTAB nTable, USHORT nFlag, SCTAB nNewTable = 0);
void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest );
void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
- virtual BOOL Insert(DataObject* pDataObject);
- ScRangeData* FindIndex(USHORT nIndex);
+ virtual BOOL Insert(ScDataObject* pScDataObject);
+ SC_DLLPUBLIC ScRangeData* FindIndex(USHORT nIndex);
USHORT GetSharedMaxIndex() { return nSharedMaxIndex; }
void SetSharedMaxIndex(USHORT nInd) { nSharedMaxIndex = nInd; }
USHORT GetEntryIndex();
diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx
index 74c1859fd6d3..16db690f495f 100644
--- a/sc/inc/rangeutl.hxx
+++ b/sc/inc/rangeutl.hxx
@@ -107,7 +107,7 @@ public:
//------------------------------------------------------------------------
-class ScRangeStringConverter
+class SC_DLLPUBLIC ScRangeStringConverter
{
public:
diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx
index 24c5314de7fb..38baadfd7e55 100644
--- a/sc/inc/refdata.hxx
+++ b/sc/inc/refdata.hxx
@@ -33,6 +33,7 @@
#include "global.hxx"
#include "address.hxx"
+#include "scdllapi.h"
// Ref-Flags for old (until release 3.1) documents
@@ -55,7 +56,7 @@ struct OldSingleRefBools
#define SRF_BITS 0x03 // Mask of possible bits
-struct SingleRefData // Single reference (one address) into the sheet
+struct SC_DLLPUBLIC ScSingleRefData // Single reference (one address) into the sheet
{
SCsCOL nCol; // Absolute values
SCsROW nRow;
@@ -115,11 +116,11 @@ struct SingleRefData // Single reference (one address) into the sheet
//UNUSED2008-05 void OldBoolsToNewFlags( const OldSingleRefBools& );
//UNUSED2008-05 BYTE CreateStoreByteFromFlags() const;
//UNUSED2008-05 void CreateFlagsFromLoadByte( BYTE );
- BOOL operator==( const SingleRefData& ) const;
+ BOOL operator==( const ScSingleRefData& ) const;
bool operator!=( const SingleRefData& ) const;
};
-inline void SingleRefData::InitAddress( SCCOL nColP, SCROW nRowP, SCTAB nTabP )
+inline void ScSingleRefData::InitAddress( SCCOL nColP, SCROW nRowP, SCTAB nTabP )
{
InitFlags();
nCol = nColP;
@@ -127,12 +128,12 @@ inline void SingleRefData::InitAddress( SCCOL nColP, SCROW nRowP, SCTAB nTabP )
nTab = nTabP;
}
-inline void SingleRefData::InitAddress( const ScAddress& rAdr )
+inline void ScSingleRefData::InitAddress( const ScAddress& rAdr )
{
InitAddress( rAdr.Col(), rAdr.Row(), rAdr.Tab());
}
-inline void SingleRefData::InitAddressRel( const ScAddress& rAdr,
+inline void ScSingleRefData::InitAddressRel( const ScAddress& rAdr,
const ScAddress& rPos )
{
InitAddress( rAdr.Col(), rAdr.Row(), rAdr.Tab());
@@ -142,7 +143,7 @@ inline void SingleRefData::InitAddressRel( const ScAddress& rAdr,
CalcRelFromAbs( rPos );
}
-inline BOOL SingleRefData::Valid() const
+inline BOOL ScSingleRefData::Valid() const
{
return nCol >= 0 && nCol <= MAXCOL &&
nRow >= 0 && nRow <= MAXROW &&
@@ -150,10 +151,10 @@ inline BOOL SingleRefData::Valid() const
}
-struct ComplRefData // Complex reference (a range) into the sheet
+struct ScComplexRefData // Complex reference (a range) into the sheet
{
- SingleRefData Ref1;
- SingleRefData Ref2;
+ ScSingleRefData Ref1;
+ ScSingleRefData Ref2;
inline void InitFlags()
{ Ref1.InitFlags(); Ref2.InitFlags(); }
@@ -185,13 +186,13 @@ struct ComplRefData // Complex reference (a range) into the sheet
{ return Ref1.Valid() && Ref2.Valid(); }
/// Absolute references have to be up-to-date when calling this!
void PutInOrder();
- inline BOOL operator==( const ComplRefData& r ) const
+ inline BOOL operator==( const ScComplexRefData& r ) const
{ return Ref1 == r.Ref1 && Ref2 == r.Ref2; }
/** Enlarge range if reference passed is not within existing range.
ScAddress position is used to calculate absolute references from
relative references. */
- ComplRefData& Extend( const SingleRefData & rRef, const ScAddress & rPos );
- ComplRefData& Extend( const ComplRefData & rRef, const ScAddress & rPos );
+ ScComplexRefData& Extend( const ScSingleRefData & rRef, const ScAddress & rPos );
+ ScComplexRefData& Extend( const ScComplexRefData & rRef, const ScAddress & rPos );
};
#endif
diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx
index ac63128e2a06..e8e213484f96 100644
--- a/sc/inc/refreshtimer.hxx
+++ b/sc/inc/refreshtimer.hxx
@@ -33,9 +33,8 @@
#include <tools/list.hxx>
#include <vcl/timer.hxx>
-#ifndef _VOS_MUTEX_HXX
#include <vos/mutex.hxx>
-#endif
+#include <scdllapi.h>
#define SC_REFRESHTIMER_CONTROL_LIST 0
#if SC_REFRESHTIMER_CONTROL_LIST
@@ -153,8 +152,8 @@ public:
void StopRefreshTimer()
{ Stop(); }
- virtual void SetRefreshDelay( ULONG nSeconds );
- virtual void Timeout();
+ SC_DLLPUBLIC virtual void SetRefreshDelay( ULONG nSeconds );
+ SC_DLLPUBLIC virtual void Timeout();
};
diff --git a/sc/inc/scextopt.hxx b/sc/inc/scextopt.hxx
index 9023983c79c4..4b3f763b4e8c 100644
--- a/sc/inc/scextopt.hxx
+++ b/sc/inc/scextopt.hxx
@@ -96,7 +96,7 @@ struct ScExtDocOptionsImpl;
(struct ScExtDocSettings), settings for all sheets in the document
(struct ScExtTabSettings), and a list of codenames used for VBA import/export.
*/
-class ScExtDocOptions
+class SC_DLLPUBLIC ScExtDocOptions
{
public:
explicit ScExtDocOptions();
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index b8af31dd1621..ca5a80b854f5 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -35,6 +35,7 @@
#include "intruref.hxx"
#include "errorcodes.hxx"
#include <tools/string.hxx>
+#include "scdllapi.h"
class SvStream;
class ScInterpreter;
@@ -87,7 +88,7 @@ union ScMatrixValue
methods don't reset strings. As a consequence memory leaks may occur if
used wrong.
*/
-class ScMatrix
+class SC_DLLPUBLIC ScMatrix
{
ScMatrixValue* pMat;
ScMatValType* mnValType;
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 3e8325e1793a..59decdf2364f 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -586,9 +586,9 @@ public:
SCSIZE Query(ScQueryParam& rQueryParam, BOOL bKeepSub);
BOOL CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
- void GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedStrCollection& rStrings);
- void GetFilteredFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, TypedStrCollection& rStrings );
- BOOL GetDataEntries(SCCOL nCol, SCROW nRow, TypedStrCollection& rStrings, BOOL bLimit);
+ void GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedScStrCollection& rStrings);
+ void GetFilteredFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, TypedScStrCollection& rStrings );
+ BOOL GetDataEntries(SCCOL nCol, SCROW nRow, TypedScStrCollection& rStrings, BOOL bLimit);
BOOL HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
BOOL HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx
index 2d50f575d29f..fdad032b8300 100644
--- a/sc/inc/textuno.hxx
+++ b/sc/inc/textuno.hxx
@@ -42,7 +42,7 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implbase5.hxx>
-
+#include "scdllapi.h"
class EditEngine;
class EditTextObject;
diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx
index 6702ba3b8d7b..0dd582504aac 100644
--- a/sc/inc/token.hxx
+++ b/sc/inc/token.hxx
@@ -38,7 +38,7 @@
#include "scmatrix.hxx"
#include "intruref.hxx"
#include <tools/mempool.hxx>
-
+#include "scdllapi.h"
enum StackVarEnum
{
@@ -88,10 +88,10 @@ class ScToken;
typedef ScSimpleIntrusiveReference< class ScToken > ScTokenRef;
typedef ScSimpleIntrusiveReference< const class ScToken > ScConstTokenRef;
-typedef ::std::vector< ComplRefData > ScRefList;
+typedef ::std::vector< ScComplexRefData > ScRefList;
-class ScToken
+class SC_DLLPUBLIC ScToken
{
private:
@@ -154,12 +154,12 @@ public:
virtual double GetDouble() const;
virtual double& GetDoubleAsReference();
virtual const String& GetString() const;
- virtual const SingleRefData& GetSingleRef() const;
- virtual SingleRefData& GetSingleRef();
- virtual const ComplRefData& GetDoubleRef() const;
- virtual ComplRefData& GetDoubleRef();
- virtual const SingleRefData& GetSingleRef2() const;
- virtual SingleRefData& GetSingleRef2();
+ virtual const ScSingleRefData& GetSingleRef() const;
+ virtual ScSingleRefData& GetSingleRef();
+ virtual const ScComplexRefData& GetDoubleRef() const;
+ virtual ScComplexRefData& GetDoubleRef();
+ virtual const ScSingleRefData& GetSingleRef2() const;
+ virtual ScSingleRefData& GetSingleRef2();
virtual void CalcAbsIfRel( const ScAddress& );
virtual void CalcRelFromAbs( const ScAddress& );
virtual const ScMatrix* GetMatrix() const;
@@ -327,14 +327,14 @@ public:
class ScSingleRefToken : public ScToken
{
private:
- SingleRefData aSingleRef;
+ ScSingleRefData aSingleRef;
public:
- ScSingleRefToken( const SingleRefData& r ) :
+ ScSingleRefToken( const ScSingleRefData& r ) :
ScToken( svSingleRef ), aSingleRef( r ) {}
ScSingleRefToken( const ScSingleRefToken& r ) :
ScToken( r ), aSingleRef( r.aSingleRef ) {}
- virtual const SingleRefData& GetSingleRef() const;
- virtual SingleRefData& GetSingleRef();
+ virtual const ScSingleRefData& GetSingleRef() const;
+ virtual ScSingleRefData& GetSingleRef();
virtual void CalcAbsIfRel( const ScAddress& );
virtual void CalcRelFromAbs( const ScAddress& );
virtual BOOL operator==( const ScToken& rToken ) const;
@@ -348,14 +348,14 @@ public:
class ScSingleRefOpToken : public ScOpToken
{
private:
- SingleRefData aSingleRef;
+ ScSingleRefData aSingleRef;
public:
- ScSingleRefOpToken( OpCode e, const SingleRefData& r ) :
+ ScSingleRefOpToken( OpCode e, const ScSingleRefData& r ) :
ScOpToken( e, svSingleRef ), aSingleRef( r ) {}
ScSingleRefOpToken( const ScSingleRefOpToken& r ) :
ScOpToken( r ), aSingleRef( r.aSingleRef ) {}
- virtual const SingleRefData& GetSingleRef() const;
- virtual SingleRefData& GetSingleRef();
+ virtual const ScSingleRefData& GetSingleRef() const;
+ virtual ScSingleRefData& GetSingleRef();
virtual void CalcAbsIfRel( const ScAddress& );
virtual void CalcRelFromAbs( const ScAddress& );
virtual BOOL operator==( const ScToken& rToken ) const;
@@ -365,11 +365,11 @@ public:
class ScDoubleRefToken : public ScToken
{
private:
- ComplRefData aDoubleRef;
+ ScComplexRefData aDoubleRef;
public:
- ScDoubleRefToken( const ComplRefData& r ) :
+ ScDoubleRefToken( const ScComplexRefData& r ) :
ScToken( svDoubleRef ), aDoubleRef( r ) {}
- ScDoubleRefToken( const SingleRefData& r ) :
+ ScDoubleRefToken( const ScSingleRefData& r ) :
ScToken( svDoubleRef )
{
aDoubleRef.Ref1 = r;
@@ -377,12 +377,12 @@ public:
}
ScDoubleRefToken( const ScDoubleRefToken& r ) :
ScToken( r ), aDoubleRef( r.aDoubleRef ) {}
- virtual const SingleRefData& GetSingleRef() const;
- virtual SingleRefData& GetSingleRef();
- virtual const ComplRefData& GetDoubleRef() const;
- virtual ComplRefData& GetDoubleRef();
- virtual const SingleRefData& GetSingleRef2() const;
- virtual SingleRefData& GetSingleRef2();
+ virtual const ScSingleRefData& GetSingleRef() const;
+ virtual ScSingleRefData& GetSingleRef();
+ virtual const ScComplexRefData& GetDoubleRef() const;
+ virtual ScComplexRefData& GetDoubleRef();
+ virtual const ScSingleRefData& GetSingleRef2() const;
+ virtual ScSingleRefData& GetSingleRef2();
virtual void CalcAbsIfRel( const ScAddress& );
virtual void CalcRelFromAbs( const ScAddress& );
virtual BOOL operator==( const ScToken& rToken ) const;
@@ -396,11 +396,11 @@ public:
class ScDoubleRefOpToken : public ScOpToken
{
private:
- ComplRefData aDoubleRef;
+ ScComplexRefData aDoubleRef;
public:
- ScDoubleRefOpToken( OpCode e, const ComplRefData& r ) :
+ ScDoubleRefOpToken( OpCode e, const ScComplexRefData& r ) :
ScOpToken( e, svDoubleRef ), aDoubleRef( r ) {}
- ScDoubleRefOpToken( OpCode e, const SingleRefData& r ) :
+ ScDoubleRefOpToken( OpCode e, const ScSingleRefData& r ) :
ScOpToken( e, svDoubleRef )
{
aDoubleRef.Ref1 = r;
@@ -408,12 +408,12 @@ public:
}
ScDoubleRefOpToken( const ScDoubleRefOpToken& r ) :
ScOpToken( r ), aDoubleRef( r.aDoubleRef ) {}
- virtual const SingleRefData& GetSingleRef() const;
- virtual SingleRefData& GetSingleRef();
- virtual const ComplRefData& GetDoubleRef() const;
- virtual ComplRefData& GetDoubleRef();
- virtual const SingleRefData& GetSingleRef2() const;
- virtual SingleRefData& GetSingleRef2();
+ virtual const ScSingleRefData& GetSingleRef() const;
+ virtual ScSingleRefData& GetSingleRef();
+ virtual const ScComplexRefData& GetDoubleRef() const;
+ virtual ScComplexRefData& GetDoubleRef();
+ virtual const ScSingleRefData& GetSingleRef2() const;
+ virtual ScSingleRefData& GetSingleRef2();
virtual void CalcAbsIfRel( const ScAddress& );
virtual void CalcRelFromAbs( const ScAddress& );
virtual BOOL operator==( const ScToken& rToken ) const;
@@ -572,7 +572,7 @@ public:
};
-class ScExternalToken : public ScOpToken
+class SC_DLLPUBLIC ScExternalToken : public ScOpToken
{
private:
String aExternal;
@@ -753,7 +753,7 @@ public:
};
-class ScHybridCellToken : public ScToken
+class SC_DLLPUBLIC ScHybridCellToken : public ScToken
{
private:
double fDouble;
@@ -780,9 +780,9 @@ public:
// ScDoubleRefToken
class SingleDoubleRefModifier
{
- ComplRefData aDub;
- SingleRefData* pS;
- ComplRefData* pD;
+ ScComplexRefData aDub;
+ ScSingleRefData* pS;
+ ScComplexRefData* pD;
// not implemented, prevent usage
SingleDoubleRefModifier( const SingleDoubleRefModifier& );
@@ -803,7 +803,7 @@ public:
pD = &rT.GetDoubleRef();
}
}
- SingleDoubleRefModifier( SingleRefData& rS )
+ SingleDoubleRefModifier( ScSingleRefData& rS )
{
pS = &rS;
aDub.Ref1 = aDub.Ref2 = *pS;
@@ -814,25 +814,25 @@ public:
if ( pS )
*pS = (*pD).Ref1;
}
- inline ComplRefData& Ref() { return *pD; }
+ inline ScComplexRefData& Ref() { return *pD; }
};
class SingleDoubleRefProvider
{
public:
- const SingleRefData& Ref1;
- const SingleRefData& Ref2;
+ const ScSingleRefData& Ref1;
+ const ScSingleRefData& Ref2;
SingleDoubleRefProvider( const ScToken& r )
: Ref1( r.GetSingleRef() ),
Ref2( r.GetType() == svDoubleRef ?
r.GetDoubleRef().Ref2 : Ref1 )
{}
- SingleDoubleRefProvider( const SingleRefData& r )
+ SingleDoubleRefProvider( const ScSingleRefData& r )
: Ref1( r ), Ref2( r )
{}
- SingleDoubleRefProvider( const ComplRefData& r )
+ SingleDoubleRefProvider( const ScComplexRefData& r )
: Ref1( r.Ref1 ), Ref2( r.Ref2 )
{}
~SingleDoubleRefProvider()
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index 2460fe8238e9..39bbd5062072 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -33,6 +33,7 @@
#include "token.hxx"
#include <tools/solar.h>
+#include "scdllapi.h"
// RecalcMode access only via TokenArray SetRecalcMode / IsRecalcMode...
@@ -50,7 +51,7 @@ typedef BYTE ScRecalcMode;
struct ScRawToken;
-class ScTokenArray
+class SC_DLLPUBLIC ScTokenArray
{
friend class ScCompiler;
friend class ScTokenIterator;
@@ -188,10 +189,10 @@ public:
ScToken* AddString( const String& rStr );
ScToken* AddDouble( double fVal );
/** ScSingleRefToken with ocPush. */
- ScToken* AddSingleReference( const SingleRefData& rRef );
+ ScToken* AddSingleReference( const ScSingleRefData& rRef );
/** ScSingleRefOpToken with ocMatRef. */
- ScToken* AddMatrixSingleReference( const SingleRefData& rRef );
- ScToken* AddDoubleReference( const ComplRefData& rRef );
+ ScToken* AddMatrixSingleReference( const ScSingleRefData& rRef );
+ ScToken* AddDoubleReference( const ScComplexRefData& rRef );
ScToken* AddName( USHORT n );
ScToken* AddMatrix( ScMatrix* p );
ScToken* AddExternalName( sal_uInt16 nFileId, const String& rName );
@@ -202,7 +203,7 @@ public:
Others don't use! */
ScToken* AddExternal( const String& rStr, OpCode eOp = ocExternal );
/** ScSingleRefOpToken with ocColRowName. */
- ScToken* AddColRowName( const SingleRefData& rRef );
+ ScToken* AddColRowName( const ScSingleRefData& rRef );
ScToken* AddBad( const sal_Unicode* pStr ); /// ocBad with String
ScToken* AddBad( const String& rStr ); /// ocBad with String
ScToken* MergeArray( );
diff --git a/sc/inc/unitconv.hxx b/sc/inc/unitconv.hxx
index 7b48e3ac68b2..0310bf884d42 100644
--- a/sc/inc/unitconv.hxx
+++ b/sc/inc/unitconv.hxx
@@ -47,7 +47,7 @@ public:
ScUnitConverterData( const ScUnitConverterData& );
virtual ~ScUnitConverterData() {};
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
double GetValue() const { return fValue; }
@@ -57,7 +57,7 @@ public:
};
-class ScUnitConverter : public StrCollection
+class ScUnitConverter : public ScStrCollection
{
// not implemented
ScUnitConverter( const ScUnitConverter& );
diff --git a/sc/inc/userlist.hxx b/sc/inc/userlist.hxx
index 7554cc13e49b..6d0e3720345b 100644
--- a/sc/inc/userlist.hxx
+++ b/sc/inc/userlist.hxx
@@ -36,7 +36,7 @@
#include "collect.hxx"
//------------------------------------------------------------------------
-class SC_DLLPUBLIC ScUserListData : public DataObject
+class SC_DLLPUBLIC ScUserListData : public ScDataObject
{
friend class ScUserList;
String aStr;
@@ -51,7 +51,7 @@ public:
ScUserListData(const ScUserListData& rData);
virtual ~ScUserListData();
- virtual DataObject* Clone() const { return new ScUserListData(*this); }
+ virtual ScDataObject* Clone() const { return new ScUserListData(*this); }
const String& GetString() const { return aStr; }
void SetString( const String& rStr);
@@ -63,13 +63,13 @@ public:
};
//------------------------------------------------------------------------
-class SC_DLLPUBLIC ScUserList : public Collection
+class SC_DLLPUBLIC ScUserList : public ScCollection
{
public:
ScUserList( USHORT nLim = 4, USHORT nDel = 4);
- ScUserList( const ScUserList& rUserList ) : Collection ( rUserList ) {}
+ ScUserList( const ScUserList& rUserList ) : ScCollection ( rUserList ) {}
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
ScUserListData* GetData( const String& rSubStr ) const;
/// If the list in rStr is already inserted
@@ -82,7 +82,7 @@ public:
};
inline ScUserList& ScUserList::operator=( const ScUserList& r )
- { return (ScUserList&)Collection::operator=( r ); }
+ { return (ScUserList&)ScCollection::operator=( r ); }
inline ScUserListData* ScUserList::operator[]( const USHORT nIndex) const
{ return (ScUserListData*)At(nIndex); }
diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx
index 02cdbb8fbd2c..575860d90e2b 100644
--- a/sc/inc/validat.hxx
+++ b/sc/inc/validat.hxx
@@ -33,12 +33,13 @@
#include "conditio.hxx"
#include <com/sun/star/sheet/TableValidationVisibility.hpp>
+#include "scdllapi.h"
namespace ValidListType = ::com::sun::star::sheet::TableValidationVisibility;
class ScPatternAttr;
class ScTokenArray;
-class TypedStrCollection;
+class TypedScStrCollection;
enum ScValidationMode
{
@@ -64,7 +65,7 @@ enum ScValidErrorStyle
// Eintrag fuer Gueltigkeit (es gibt nur eine Bedingung)
//
-class ScValidationData : public ScConditionEntry
+class SC_DLLPUBLIC ScValidationData : public ScConditionEntry
{
sal_uInt32 nKey; // Index in Attributen
@@ -130,7 +131,7 @@ public:
@descr Fills the list only, if this is a list validation and IsShowList() is enabled.
@param rStrings (out-param) The string list to fill with list validation entires.
@return true = rStrings has been filled with at least one entry. */
- bool FillSelectionList( TypedStrCollection& rStrings, const ScAddress& rPos ) const;
+ bool FillSelectionList( TypedScStrCollection& rStrings, const ScAddress& rPos ) const;
// mit String: bei Eingabe, mit Zelle: fuer Detektiv / RC_FORCED
BOOL IsDataValid( const String& rTest, const ScPatternAttr& rPattern,
@@ -164,7 +165,7 @@ private:
@param rTokArr Formula token array.
@param rMatch (out-param) the index of the first item that matched, -1 if nothing matched.
@return true = Cell range found, rRange is valid, or an error entry stuffed into the list if pCell==NULL. */
- bool GetSelectionFromFormula( TypedStrCollection* pStrings,
+ bool GetSelectionFromFormula( TypedScStrCollection* pStrings,
ScBaseCell* pCell, const ScAddress& rPos,
const ScTokenArray& rTokArr, int& rMatch ) const;
diff --git a/sc/prj/build.lst b/sc/prj/build.lst
index 132e91a1ed2e..59528a816694 100644
--- a/sc/prj/build.lst
+++ b/sc/prj/build.lst
@@ -1,4 +1,4 @@
-sc sc : oovbaapi svx stoc uui BOOST:boost NULL
+sc sc : oovbaapi svx stoc uui BOOST:boost oox NULL
sc sc usr1 - all sc_mkout NULL
sc sc\inc nmake - all sc_inc NULL
sc sc\prj get - all sc_prj NULL
diff --git a/sc/prj/d.lst b/sc/prj/d.lst
index 051e6c719848..63b2d7b8e978 100644
--- a/sc/prj/d.lst
+++ b/sc/prj/d.lst
@@ -17,8 +17,7 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\scalc\statusbar
..\%__SRC%\bin\*.sym %_DEST%\bin%_EXT%\*.sym
..\%__SRC%\bin\scalc3.pdb %_DEST%\bin%_EXT%\scalc3.pdb
..\%__SRC%\bin\scslots.tlb %_DEST%\bin%_EXT%\scslots.tlb
-..\%__SRC%\bin\sc?????.dll %_DEST%\bin%_EXT%\sc?????.dll
-..\%__SRC%\bin\scd?????.dll %_DEST%\bin%_EXT%\scd?????.dll
+..\%__SRC%\bin\sc*.dll %_DEST%\bin%_EXT%\sc*.dll
..\%__SRC%\bin\sc*.res %_DEST%\bin%_EXT%\sc*.res
..\%__SRC%\bin\scui?????.dll %_DEST%\bin%_EXT%\scui?????.dll
..\%__SRC%\bin\dfa?????.dll %_DEST%\bin%_EXT%\dfa?????.dll
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index ad282f3cc9e7..a5f38c813d8c 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -77,7 +77,7 @@ TYPEINIT1(ScPageScaleToItem, SfxPoolItem);
// allgemeine Hilfsfunktionen
//
-BOOL HasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther )
+BOOL ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther )
{
// DBG_ASSERT( pThis || pOther, "LineAttr == 0" );
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index efdbc0bdd849..1637eb3666ac 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -220,8 +220,8 @@ void ScBaseCell::StartListeningTo( ScDocument* pDoc )
t = pArr->GetNextReferenceRPN() )
{
StackVar eType = t->GetType();
- SingleRefData& rRef1 = t->GetSingleRef();
- SingleRefData& rRef2 = (eType == svDoubleRef ?
+ ScSingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef2 = (eType == svDoubleRef ?
t->GetDoubleRef().Ref2 : rRef1);
switch( eType )
{
@@ -310,8 +310,8 @@ void ScBaseCell::EndListeningTo( ScDocument* pDoc, ScTokenArray* pArr,
t = pArr->GetNextReferenceRPN() )
{
StackVar eType = t->GetType();
- SingleRefData& rRef1 = t->GetSingleRef();
- SingleRefData& rRef2 = (eType == svDoubleRef ?
+ ScSingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef2 = (eType == svDoubleRef ?
t->GetDoubleRef().Ref2 : rRef1);
switch( eType )
{
@@ -746,7 +746,7 @@ void ScFormulaCell::GetFormula( rtl::OUStringBuffer& rBuffer,
* GetEnglishFormula() omitted that test.
* Can we live without in all cases? */
ScBaseCell* pCell;
- SingleRefData& rRef = p->GetSingleRef();
+ ScSingleRefData& rRef = p->GetSingleRef();
rRef.CalcAbsIfRel( aPos );
if ( rRef.Valid() )
pCell = pDocument->GetCell( ScAddress( rRef.nCol,
@@ -1813,13 +1813,13 @@ ScDetectiveRefIter::ScDetectiveRefIter( ScFormulaCell* pCell )
BOOL lcl_ScDetectiveRefIter_SkipRef( ScToken* p )
{
- SingleRefData& rRef1 = p->GetSingleRef();
+ ScSingleRefData& rRef1 = p->GetSingleRef();
if ( rRef1.IsColDeleted() || rRef1.IsRowDeleted() || rRef1.IsTabDeleted()
|| !rRef1.Valid() )
return TRUE;
if ( p->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = p->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = p->GetDoubleRef().Ref2;
if ( rRef2.IsColDeleted() || rRef2.IsRowDeleted() || rRef2.IsTabDeleted()
|| !rRef2.Valid() )
return TRUE;
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index 606a1eaf089b..6a4f4257dda8 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -257,7 +257,7 @@ BOOL ScFormulaCell::GetMatrixOrigin( ScAddress& rPos ) const
ScToken* t = pCode->GetNextReferenceRPN();
if( t )
{
- SingleRefData& rRef = t->GetSingleRef();
+ ScSingleRefData& rRef = t->GetSingleRef();
rRef.CalcAbsIfRel( aPos );
if ( rRef.Valid() )
{
@@ -600,7 +600,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
pCode->Reset();
while ( !bColRowNameCompile && (t = pCode->GetNextColRowName()) != NULL )
{
- SingleRefData& rRef = t->GetSingleRef();
+ ScSingleRefData& rRef = t->GetSingleRef();
if ( nDy > 0 && rRef.IsColRel() )
{ // ColName
rRef.CalcAbsIfRel( aPos );
@@ -648,7 +648,7 @@ void ScFormulaCell::UpdateReference(UpdateRefMode eUpdateRefMode,
bColRowNameCompile = TRUE;
while ( t && !bColRowNameCompile )
{
- SingleRefData& rRef = t->GetSingleRef();
+ ScSingleRefData& rRef = t->GetSingleRef();
rRef.CalcAbsIfRel( aPos );
if ( rRef.Valid() )
{
@@ -878,12 +878,12 @@ void ScFormulaCell::UpdateInsertTabAbs(SCTAB nTable)
ScToken* p = pCode->GetNextReferenceRPN();
while( p )
{
- SingleRefData& rRef1 = p->GetSingleRef();
+ ScSingleRefData& rRef1 = p->GetSingleRef();
if( !rRef1.IsTabRel() && (SCsTAB) nTable <= rRef1.nTab )
rRef1.nTab++;
if( p->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = p->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = p->GetDoubleRef().Ref2;
if( !rRef2.IsTabRel() && (SCsTAB) nTable <= rRef2.nTab )
rRef2.nTab++;
}
@@ -901,7 +901,7 @@ BOOL ScFormulaCell::TestTabRefAbs(SCTAB nTable)
ScToken* p = pCode->GetNextReferenceRPN();
while( p )
{
- SingleRefData& rRef1 = p->GetSingleRef();
+ ScSingleRefData& rRef1 = p->GetSingleRef();
if( !rRef1.IsTabRel() )
{
if( (SCsTAB) nTable != rRef1.nTab )
@@ -911,7 +911,7 @@ BOOL ScFormulaCell::TestTabRefAbs(SCTAB nTable)
}
if( p->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = p->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = p->GetDoubleRef().Ref2;
if( !rRef2.IsTabRel() )
{
if( (SCsTAB) nTable != rRef2.nTab )
@@ -944,11 +944,11 @@ void ScFormulaCell::TransposeReference()
for( ScToken* t = pCode->GetNextReference(); t;
t = pCode->GetNextReference() )
{
- SingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsColRel() && rRef1.IsRowRel() )
{
BOOL bDouble = (t->GetType() == svDoubleRef);
- SingleRefData& rRef2 = (bDouble ? t->GetDoubleRef().Ref2 : rRef1);
+ ScSingleRefData& rRef2 = (bDouble ? t->GetDoubleRef().Ref2 : rRef1);
if ( !bDouble || (rRef2.IsColRel() && rRef2.IsRowRel()) )
{
INT16 nTemp;
@@ -1021,7 +1021,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
BOOL bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
- ComplRefData& rRef = aMod.Ref();
+ ScComplexRefData& rRef = aMod.Ref();
bMod = (ScRefUpdate::UpdateTranspose( pDocument, rSource,
rDest, rRef ) != UR_NOTHING || bPosChanged);
}
@@ -1048,7 +1048,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
BOOL bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
- ComplRefData& rRef = aMod.Ref();
+ ScComplexRefData& rRef = aMod.Ref();
bMod = (ScRefUpdate::UpdateTranspose( pDocument, rSource,
rDest, rRef ) != UR_NOTHING || bPosChanged);
}
@@ -1106,7 +1106,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
BOOL bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
- ComplRefData& rRef = aMod.Ref();
+ ScComplexRefData& rRef = aMod.Ref();
bMod = (ScRefUpdate::UpdateGrow( rArea,nGrowX,nGrowY,
rRef ) != UR_NOTHING);
}
@@ -1133,7 +1133,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
BOOL bMod;
{ // own scope for SingleDoubleRefModifier dtor if SingleRef
SingleDoubleRefModifier aMod( *t );
- ComplRefData& rRef = aMod.Ref();
+ ScComplexRefData& rRef = aMod.Ref();
bMod = (ScRefUpdate::UpdateGrow( rArea,nGrowX,nGrowY,
rRef ) != UR_NOTHING);
}
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index a79198235704..fc2fc227d130 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -629,7 +629,7 @@ ScFormulaCell* ScColumn::CreateRefCell( ScDocument* pDestDoc, const ScAddress& r
// Referenz einsetzen
- SingleRefData aRef;
+ ScSingleRefData aRef;
aRef.nCol = nCol;
aRef.nRow = pItems[nIndex].nRow;
aRef.nTab = nTab;
@@ -705,7 +705,7 @@ void ScColumn::CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy,
ScAddress aDestPos( nCol, 0, nTab ); // Row wird angepasst
// Referenz erzeugen (Quell-Position)
- SingleRefData aRef;
+ ScSingleRefData aRef;
aRef.nCol = rColumn.nCol;
// nRow wird angepasst
aRef.nTab = rColumn.nTab;
@@ -1426,7 +1426,7 @@ BOOL ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
}
-void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedStrCollection& rStrings)
+void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollection& rStrings)
{
SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
String aString;
@@ -1491,7 +1491,7 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedStrCollecti
#define DATENT_SEARCH 2000
-BOOL ScColumn::GetDataEntries(SCROW nStartRow, TypedStrCollection& rStrings, BOOL bLimit)
+BOOL ScColumn::GetDataEntries(SCROW nStartRow, TypedScStrCollection& rStrings, BOOL bLimit)
{
BOOL bFound = FALSE;
SCSIZE nThisIndex;
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index bf241128356b..4b504e2e1d05 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -70,7 +70,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion
{
case svDoubleRef:
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( rRef2.IsColRel() || rRef2.IsRowRel() || rRef2.IsTabRel() )
return TRUE;
}
@@ -78,7 +78,7 @@ BOOL lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, USHORT nRecursion
case svSingleRef:
{
- SingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsColRel() || rRef1.IsRowRel() || rRef1.IsTabRel() )
return TRUE;
}
@@ -470,7 +470,7 @@ void lcl_CondUpdateInsertTab( ScTokenArray& rCode, SCTAB nInsTab, SCTAB nPosTab,
ScToken* p = rCode.GetNextReference();
while( p )
{
- SingleRefData& rRef1 = p->GetSingleRef();
+ ScSingleRefData& rRef1 = p->GetSingleRef();
if ( !rRef1.IsTabRel() && nInsTab <= rRef1.nTab )
{
rRef1.nTab += 1;
@@ -479,7 +479,7 @@ void lcl_CondUpdateInsertTab( ScTokenArray& rCode, SCTAB nInsTab, SCTAB nPosTab,
}
if( p->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = p->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = p->GetDoubleRef().Ref2;
if ( !rRef2.IsTabRel() && nInsTab <= rRef2.nTab )
{
rRef2.nTab += 1;
@@ -1064,7 +1064,7 @@ ScAddress ScConditionEntry::GetValidSrcPos() const
ScToken* t;
while ( ( t = pFormula->GetNextReference() ) != NULL )
{
- SingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsTabRel() && !rRef1.IsTabDeleted() )
{
if ( rRef1.nTab < nMinTab )
@@ -1074,7 +1074,7 @@ ScAddress ScConditionEntry::GetValidSrcPos() const
}
if ( t->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( rRef2.IsTabRel() && !rRef2.IsTabDeleted() )
{
if ( rRef2.nTab < nMinTab )
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 78f708feae8c..56aeda321ea7 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1264,7 +1264,7 @@ BOOL ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol,
// GetFilterEntries - Eintraege fuer AutoFilter-Listbox
//
-BOOL ScDocument::GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedStrCollection& rStrings, bool bFilter )
+BOOL ScDocument::GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedScStrCollection& rStrings, bool bFilter )
{
if ( ValidTab(nTab) && pTab[nTab] && pDBCollection )
{
@@ -1320,7 +1320,7 @@ BOOL ScDocument::GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedStrC
//
BOOL ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
- SCTAB nTab, TypedStrCollection& rStrings )
+ SCTAB nTab, TypedScStrCollection& rStrings )
{
if ( ValidTab(nTab) && pTab[nTab] )
{
@@ -1336,7 +1336,7 @@ BOOL ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRo
//
BOOL ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
- TypedStrCollection& rStrings, BOOL bLimit )
+ TypedScStrCollection& rStrings, BOOL bLimit )
{
if( !bLimit )
{
@@ -1367,7 +1367,7 @@ BOOL ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
#define SC_STRTYPE_DBNAMES 3
#define SC_STRTYPE_HEADERS 4
-BOOL ScDocument::GetFormulaEntries( TypedStrCollection& rStrings )
+BOOL ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
{
USHORT i;
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 466c2044c798..fb914947ff6d 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -76,7 +76,7 @@ BOOL ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
if (eFType == CELLTYPE_FORMULA && (eVType == CELLTYPE_VALUE
|| eVType == CELLTYPE_NOTE) )
{
- SingleRefData aRefData;
+ ScSingleRefData aRefData;
aRefData.InitFlags();
aRefData.nCol = nVCol;
aRefData.nRow = nVRow;
@@ -163,7 +163,7 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
}
}
- SingleRefData aRefData;
+ ScSingleRefData aRefData;
aRefData.InitFlags();
aRefData.nCol = nCol1;
aRefData.nRow = nRow1;
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index 1339f33612b5..8d528db34118 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -901,7 +901,7 @@ uno::Reference< embed::XEmbeddedObject >
return uno::Reference< embed::XEmbeddedObject >();
}
-BOOL lcl_StringInCollection( const StrCollection* pColl, const String& rStr )
+BOOL lcl_StringInCollection( const ScStrCollection* pColl, const String& rStr )
{
if ( !pColl )
return FALSE;
@@ -989,7 +989,7 @@ void ScDocument::UpdateChartListenerCollection()
// (object names aren't used again before reloading the document)
if (!pOtherObjects)
- pOtherObjects = new StrCollection;
+ pOtherObjects = new ScStrCollection;
pOtherObjects->Insert( new StrData( aObjName ) );
}
}
@@ -1006,7 +1006,7 @@ void ScDocument::UpdateChartListenerCollection()
void ScDocument::AddOLEObjectToCollection(const String& rName)
{
if (!pOtherObjects)
- pOtherObjects = new StrCollection;
+ pOtherObjects = new ScStrCollection;
pOtherObjects->Insert( new StrData( rName ) );
}
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 78744fbeb75d..d8706416f16a 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3511,28 +3511,28 @@ void ScDocument::GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
{
const SvxBorderLine* pOther = ((const SvxBoxItem*)
GetEffItem( nCol-1, nRow, nTab, ATTR_BORDER ))->GetRight();
- if ( HasPriority( pOther, pLeftLine ) )
+ if ( ScHasPriority( pOther, pLeftLine ) )
pLeftLine = pOther;
}
if ( nRow > 0 )
{
const SvxBorderLine* pOther = ((const SvxBoxItem*)
GetEffItem( nCol, nRow-1, nTab, ATTR_BORDER ))->GetBottom();
- if ( HasPriority( pOther, pTopLine ) )
+ if ( ScHasPriority( pOther, pTopLine ) )
pTopLine = pOther;
}
if ( nCol < MAXCOL )
{
const SvxBorderLine* pOther = ((const SvxBoxItem*)
GetEffItem( nCol+1, nRow, nTab, ATTR_BORDER ))->GetLeft();
- if ( HasPriority( pOther, pRightLine ) )
+ if ( ScHasPriority( pOther, pRightLine ) )
pRightLine = pOther;
}
if ( nRow < MAXROW )
{
const SvxBorderLine* pOther = ((const SvxBoxItem*)
GetEffItem( nCol, nRow+1, nTab, ATTR_BORDER ))->GetTop();
- if ( HasPriority( pOther, pBottomLine ) )
+ if ( ScHasPriority( pOther, pBottomLine ) )
pBottomLine = pOther;
}
diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx
index 53d17894d2c3..7ac813dd5a57 100644
--- a/sc/source/core/data/dpcachetable.cxx
+++ b/sc/source/core/data/dpcachetable.cxx
@@ -247,7 +247,7 @@ void ScDPCacheTable::fillTable(ScDocument* pDoc, const ScRange& rRange, const Sc
maFieldEntries.reserve(nColCount);
for (SCCOL nCol = 0; nCol < nColCount; ++nCol)
{
- TypedStrCollectionPtr p(new TypedStrCollection);
+ TypedScStrCollectionPtr p(new TypedScStrCollection);
maFieldEntries.push_back(p);
}
@@ -438,7 +438,7 @@ void ScDPCacheTable::fillTable(const Reference<sdbc::XRowSet>& xRowSet, const Da
maFieldEntries.reserve(nColCount);
for (SCCOL nCol = 0; nCol < nColCount; ++nCol)
{
- TypedStrCollectionPtr p(new TypedStrCollection);
+ TypedScStrCollectionPtr p(new TypedScStrCollection);
maFieldEntries.push_back(p);
}
@@ -544,12 +544,12 @@ sal_Int32 ScDPCacheTable::getFieldIndex(const String& rStr) const
return -1;
}
-const TypedStrCollection& ScDPCacheTable::getFieldEntries(sal_Int32 nIndex) const
+const TypedScStrCollection& ScDPCacheTable::getFieldEntries(sal_Int32 nIndex) const
{
if (nIndex < 0 || static_cast<size_t>(nIndex) >= maFieldEntries.size())
{
// index out of bound. Hopefully this code will never be reached.
- static const TypedStrCollection emptyCollection;
+ static const TypedScStrCollection emptyCollection;
return emptyCollection;
}
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index bc0f66173fe3..71c7bf273a98 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -261,7 +261,7 @@ bool ScDPSaveGroupDimension::IsEmpty() const
return aGroups.empty();
}
-bool ScDPSaveGroupDimension::HasOnlyHidden( const StrCollection& rVisible )
+bool ScDPSaveGroupDimension::HasOnlyHidden( const ScStrCollection& rVisible )
{
// check if there are only groups that don't appear in the list of visible names
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index b8d512de9b32..d220a791f3e0 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -419,7 +419,7 @@ String lcl_GetSpecialDateName( double fValue, bool bFirst, SvNumberFormatter* pF
return aBuffer.makeStringAndClear();
}
-void ScDPDateGroupHelper::FillColumnEntries( TypedStrCollection& rEntries, const TypedStrCollection& rOriginal,
+void ScDPDateGroupHelper::FillColumnEntries( TypedScStrCollection& rEntries, const TypedScStrCollection& rOriginal,
SvNumberFormatter* pFormatter ) const
{
// auto min/max is only used for "Years" part, but the loop is always needed
@@ -609,12 +609,12 @@ void ScDPGroupDimension::SetGroupDim( long nDim )
nGroupDim = nDim;
}
-const TypedStrCollection& ScDPGroupDimension::GetColumnEntries(
- const TypedStrCollection& rOriginal, ScDocument* pDoc ) const
+const TypedScStrCollection& ScDPGroupDimension::GetColumnEntries(
+ const TypedScStrCollection& rOriginal, ScDocument* pDoc ) const
{
if ( !pCollection )
{
- pCollection = new TypedStrCollection();
+ pCollection = new TypedScStrCollection();
if ( pDateHelper )
pDateHelper->FillColumnEntries( *pCollection, rOriginal, pDoc->GetFormatTable() );
else
@@ -809,14 +809,14 @@ inline bool IsInteger( double fValue )
return rtl::math::approxEqual( fValue, rtl::math::approxFloor(fValue) );
}
-const TypedStrCollection& ScDPNumGroupDimension::GetNumEntries(
- const TypedStrCollection& rOriginal, ScDocument* pDoc ) const
+const TypedScStrCollection& ScDPNumGroupDimension::GetNumEntries(
+ const TypedScStrCollection& rOriginal, ScDocument* pDoc ) const
{
if ( !pCollection )
{
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
- pCollection = new TypedStrCollection();
+ pCollection = new TypedScStrCollection();
if ( pDateHelper )
pDateHelper->FillColumnEntries( *pCollection, rOriginal, pFormatter );
else
@@ -1043,7 +1043,7 @@ void ScDPGroupTableData::GetNumGroupInfo( long nDimension, ScDPNumGroupInfo& rIn
}
}
-const TypedStrCollection& ScDPGroupTableData::GetColumnEntries(long nColumn)
+const TypedScStrCollection& ScDPGroupTableData::GetColumnEntries(long nColumn)
{
// date handling is in ScDPGroupDimension::GetColumnEntries / ScDPNumGroupDimension::GetNumEntries
// (to use the pCollection members)
@@ -1057,7 +1057,7 @@ const TypedStrCollection& ScDPGroupTableData::GetColumnEntries(long nColumn)
const ScDPGroupDimension& rGroupDim = aGroups[nColumn - nSourceCount];
long nSourceDim = rGroupDim.GetSourceDim();
// collection is cached at pSourceData, GetColumnEntries can be called every time
- const TypedStrCollection& rOriginal = pSourceData->GetColumnEntries( nSourceDim );
+ const TypedScStrCollection& rOriginal = pSourceData->GetColumnEntries( nSourceDim );
return rGroupDim.GetColumnEntries( rOriginal, pDoc );
}
}
@@ -1065,7 +1065,7 @@ const TypedStrCollection& ScDPGroupTableData::GetColumnEntries(long nColumn)
if ( IsNumGroupDimension( nColumn ) )
{
// dimension number is unchanged for numerical groups
- const TypedStrCollection& rOriginal = pSourceData->GetColumnEntries( nColumn );
+ const TypedScStrCollection& rOriginal = pSourceData->GetColumnEntries( nColumn );
return pNumGroups[nColumn].GetNumEntries( rOriginal, pDoc );
}
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 29963323acfd..9b4feb66a161 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -169,7 +169,7 @@ ScDPObject::ScDPObject( ScDocument* pD ) :
}
ScDPObject::ScDPObject(const ScDPObject& r) :
- DataObject(),
+ ScDataObject(),
pDoc( r.pDoc ),
pSaveData( NULL ),
aTableName( r.aTableName ),
@@ -205,7 +205,7 @@ ScDPObject::~ScDPObject()
delete pServDesc;
}
-DataObject* ScDPObject::Clone() const
+ScDataObject* ScDPObject::Clone() const
{
return new ScDPObject(*this);
}
@@ -768,7 +768,7 @@ long ScDPObject::GetDimCount()
return nRet;
}
-void ScDPObject::FillPageList( TypedStrCollection& rStrings, long nField )
+void ScDPObject::FillPageList( TypedScStrCollection& rStrings, long nField )
{
//! merge members access with ToggleDetails?
@@ -901,7 +901,7 @@ BOOL ScDPObject::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
return pOutput->GetHeaderDrag( rPos, bMouseLeft, bMouseTop, nDragDim, rPosRect, rOrient, rDimPos );
}
-void ScDPObject::GetMemberResultNames( StrCollection& rNames, long nDimension )
+void ScDPObject::GetMemberResultNames( ScStrCollection& rNames, long nDimension )
{
CreateOutput(); // create xSource and pOutput if not already done
@@ -2331,7 +2331,7 @@ ScDPCollection::ScDPCollection(ScDocument* pDocument) :
}
ScDPCollection::ScDPCollection(const ScDPCollection& r) :
- Collection(r),
+ ScCollection(r),
pDoc(r.pDoc),
maSharedString(r.maSharedString),
maCacheCellPool(r.maCacheCellPool)
@@ -2343,7 +2343,7 @@ ScDPCollection::~ScDPCollection()
clearCacheCellPool();
}
-DataObject* ScDPCollection::Clone() const
+ScDataObject* ScDPCollection::Clone() const
{
return new ScDPCollection(*this);
}
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 8b6cf6292ed5..850eff7902ec 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -946,7 +946,7 @@ long ScDPOutput::GetHeaderRows()
return nPageFieldCount + ( bDoFilter ? 1 : 0 );
}
-void ScDPOutput::GetMemberResultNames( StrCollection& rNames, long nDimension )
+void ScDPOutput::GetMemberResultNames( ScStrCollection& rNames, long nDimension )
{
// Return the list of all member names in a dimension's MemberResults.
// Only the dimension has to be compared because this is only used with table data,
@@ -1750,7 +1750,7 @@ long ScDPOutput::GetHeaderDim( const ScAddress& rPos, USHORT& rOrient )
// test for row header
- if ( nRow+1 == nDataStartRow && nCol >= nTabStartCol == nCol < nTabStartCol + nRowFieldCount )
+ if ( nRow+1 == nDataStartRow && nCol >= nTabStartCol && nCol < nTabStartCol + nRowFieldCount )
{
rOrient = sheet::DataPilotFieldOrientation_ROW;
long nField = nCol - nTabStartCol;
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index 1c178e8162cf..82b4eb0bc5a1 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -240,7 +240,7 @@ void lcl_Reset( const uno::Reference<sdbc::XRowSet>& xRowSet )
xRowSet->execute(); // restart
}
-const TypedStrCollection& ScDatabaseDPData::GetColumnEntries(long nColumn)
+const TypedScStrCollection& ScDatabaseDPData::GetColumnEntries(long nColumn)
{
CreateCacheTable();
return pImpl->aCacheTable.getFieldEntries(nColumn);
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index bde7b0e98ecb..632066934bb3 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -146,7 +146,7 @@ BOOL lcl_HasQuery( const ScQueryParam& rParam )
rParam.GetEntry(0).bDoQuery;
}
-const TypedStrCollection& ScSheetDPData::GetColumnEntries(long nColumn)
+const TypedScStrCollection& ScSheetDPData::GetColumnEntries(long nColumn)
{
DBG_ASSERT(nColumn>=0 && nColumn < pImpl->aCacheTable.getColSize(), "ScSheetDPData: wrong column");
CreateCacheTable();
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index ca52ea957cef..05ad86aa8234 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -2200,7 +2200,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScDPLevel )
// -----------------------------------------------------------------------
-USHORT lcl_GetFirstStringPos( const TypedStrCollection& rColl )
+USHORT lcl_GetFirstStringPos( const TypedScStrCollection& rColl )
{
USHORT nPos = 0;
USHORT nCount = rColl.GetCount();
@@ -2230,7 +2230,7 @@ ScDPMembers::ScDPMembers( ScDPSource* pSrc, long nD, long nH, long nL ) :
{
case SC_DAPI_LEVEL_YEAR:
{
- const TypedStrCollection& rStrings = pSource->GetData()->GetColumnEntries(nSrcDim);
+ const TypedScStrCollection& rStrings = pSource->GetData()->GetColumnEntries(nSrcDim);
USHORT nFirstString = lcl_GetFirstStringPos( rStrings );
if ( nFirstString > 0 )
{
@@ -2274,7 +2274,7 @@ ScDPMembers::ScDPMembers( ScDPSource* pSrc, long nD, long nH, long nL ) :
else
{
// StringCollection is cached at TableData
- const TypedStrCollection& rStrings = pSource->GetData()->GetColumnEntries(nSrcDim);
+ const TypedScStrCollection& rStrings = pSource->GetData()->GetColumnEntries(nSrcDim);
nMbrCount = rStrings.GetCount();
}
}
@@ -2424,7 +2424,7 @@ ScDPMember* ScDPMembers::getByIndex(long nIndex) const
{
//! cache year range here!
- const TypedStrCollection& rStrings = pSource->GetData()->GetColumnEntries(nSrcDim);
+ const TypedScStrCollection& rStrings = pSource->GetData()->GetColumnEntries(nSrcDim);
double fFirstVal = rStrings[0]->GetValue();
long nFirstYear = pSource->GetData()->GetDatePart(
(long)::rtl::math::approxFloor( fFirstVal ),
@@ -2456,7 +2456,7 @@ ScDPMember* ScDPMembers::getByIndex(long nIndex) const
}
else
{
- const TypedStrCollection& rStrings = pSource->GetData()->GetColumnEntries(nSrcDim);
+ const TypedScStrCollection& rStrings = pSource->GetData()->GetColumnEntries(nSrcDim);
const TypedStrData* pData = rStrings[(USHORT)nIndex];
pNew = new ScDPMember( pSource, nDim, nHier, nLev,
pData->GetString(), pData->GetValue(), !pData->IsStrData() );
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 9047fb31a018..8a118fa1209a 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -149,6 +149,11 @@ static USHORT nPPTZoom = 0; // ScreenZoom used to determine nScreenPPTX/Y
BOOL bOderSo;
+bool SC_DLLPUBLIC ScGetWriteTeamInfo()
+{
+ return bOderSo;
+}
+
class SfxViewShell;
SfxViewShell* pScActiveViewShell = NULL; //! als Member !!!!!
USHORT nScClickMouseModifier = 0; //! dito
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
index d4a083bb8cad..11112e5774ac 100644
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -56,7 +56,7 @@ ScOutlineEntry::ScOutlineEntry( SCCOLROW nNewStart, SCCOLROW nNewSize, BOOL bNew
}
ScOutlineEntry::ScOutlineEntry( const ScOutlineEntry& rEntry ) :
- DataObject(),
+ ScDataObject(),
nStart ( rEntry.nStart ),
nSize ( rEntry.nSize ),
bHidden ( rEntry.bHidden ),
@@ -64,7 +64,7 @@ ScOutlineEntry::ScOutlineEntry( const ScOutlineEntry& rEntry ) :
{
}
-DataObject* ScOutlineEntry::Clone() const
+ScDataObject* ScOutlineEntry::Clone() const
{
return new ScOutlineEntry( *this );
}
@@ -109,7 +109,7 @@ void ScOutlineEntry::SetVisible( BOOL bNewVisible )
//------------------------------------------------------------------------
ScOutlineCollection::ScOutlineCollection() :
- SortedCollection( 4,4,FALSE )
+ ScSortedCollection( 4,4,FALSE )
{
}
@@ -120,7 +120,7 @@ inline short IntCompare( SCCOLROW nX, SCCOLROW nY )
else return 1;
}
-short ScOutlineCollection::Compare(DataObject* pKey1, DataObject* pKey2) const
+short ScOutlineCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
{
return IntCompare( ((ScOutlineEntry*)pKey1)->GetStart(),
((ScOutlineEntry*)pKey2)->GetStart() );
diff --git a/sc/source/core/data/pivot.cxx b/sc/source/core/data/pivot.cxx
index bd4395bbd670..30bacf79989a 100644
--- a/sc/source/core/data/pivot.cxx
+++ b/sc/source/core/data/pivot.cxx
@@ -172,8 +172,8 @@ ScPivot::ScPivot(ScDocument* pDocument) :
{
for (SCSIZE i=0; i<PIVOT_MAXFIELD; i++)
{
- pColList[i] = new PivotStrCollection();
- pRowList[i] = new PivotStrCollection();
+ pColList[i] = new PivotScStrCollection();
+ pRowList[i] = new PivotScStrCollection();
}
pDataList = pColList[0];
ppDataArr = NULL;
@@ -208,7 +208,7 @@ ScPivot::ScPivot(ScDocument* pDocument) :
}
ScPivot::ScPivot(const ScPivot& rPivot):
- DataObject(),
+ ScDataObject(),
pDoc (rPivot.pDoc),
aQuery (rPivot.aQuery),
bHasHeader (rPivot.bHasHeader),
@@ -248,8 +248,8 @@ ScPivot::ScPivot(const ScPivot& rPivot):
for (SCSIZE i=0; i<PIVOT_MAXFIELD; i++)
{
- pColList[i] = new PivotStrCollection();
- pRowList[i] = new PivotStrCollection();
+ pColList[i] = new PivotScStrCollection();
+ pRowList[i] = new PivotScStrCollection();
}
pDataList = pColList[0];
ppDataArr = NULL;
@@ -878,7 +878,7 @@ void ScPivot::SetDataFields(const PivotField* pFieldArr, SCSIZE nCount)
String aStr;
pDoc->GetString(aDataArr[nDataCount].nCol, nSrcRow1, nSrcTab, aStr);
if (aStr.Len() == 0)
- aStr = ColToAlpha( aDataArr[nDataCount].nCol );
+ aStr = ScColToAlpha( aDataArr[nDataCount].nCol );
TypedStrData* pStrData = new TypedStrData(aStr);
if (!(pDataList->AtInsert(pDataList->GetCount(), pStrData)))
{
@@ -1017,7 +1017,7 @@ void ScPivot::DrawData()
{
pDoc->GetString(aColArr[i].nCol, nSrcRow1, nSrcTab, aStr);
if ( !aStr.Len() )
- aStr = ColToAlpha( aColArr[i].nCol );
+ aStr = ScColToAlpha( aColArr[i].nCol );
pDoc->SetString(nCol, nRow, nDestTab, aStr);
// Kategorie 2
nCol++;
@@ -1042,7 +1042,7 @@ void ScPivot::DrawData()
{
pDoc->GetString(aRowArr[i].nCol, nSrcRow1, nSrcTab, aStr);
if ( !aStr.Len() )
- aStr = ColToAlpha( aRowArr[i].nCol );
+ aStr = ScColToAlpha( aRowArr[i].nCol );
pDoc->SetString(nCol, nRow, nDestTab, aStr);
// Kategorie 4
nCol++;
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index 483a2d0f8aeb..68d5a47010fe 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -259,23 +259,23 @@ void ScPivot::SetParam( const ScPivotParam& rParam, const ScQueryParam& rQuery,
SetDataFields( rParam.aDataArr, rParam.nDataCount );
}
-DataObject* ScPivot::Clone() const
+ScDataObject* ScPivot::Clone() const
{
return new ScPivot(*this);
}
//--------------------------------------------------------------------------------------------------
-// PivotStrCollection
+// PivotScStrCollection
//--------------------------------------------------------------------------------------------------
-DataObject* PivotStrCollection::Clone() const
+ScDataObject* PivotScStrCollection::Clone() const
{
- return new PivotStrCollection(*this);
+ return new PivotScStrCollection(*this);
}
-short PivotStrCollection::Compare(DataObject* pKey1, DataObject* pKey2) const
+short PivotScStrCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
{
- DBG_ASSERT(pKey1&&pKey2,"0-Zeiger bei PivotStrCollection::Compare");
+ DBG_ASSERT(pKey1&&pKey2,"0-Zeiger bei PivotScStrCollection::Compare");
short nResult = 0;
@@ -313,7 +313,7 @@ short PivotStrCollection::Compare(DataObject* pKey1, DataObject* pKey2) const
return nResult;
}
-USHORT PivotStrCollection::GetIndex(TypedStrData* pData) const
+USHORT PivotScStrCollection::GetIndex(TypedStrData* pData) const
{
USHORT nIndex = 0;
if (!Search(pData, nIndex))
@@ -483,7 +483,7 @@ BOOL ScPivotCollection::operator==(const ScPivotCollection& rCmp) const
return TRUE;
}
-DataObject* ScPivotCollection::Clone() const
+ScDataObject* ScPivotCollection::Clone() const
{
return new ScPivotCollection(*this);
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index b2544800673c..0d7f69e1c7ce 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -457,7 +457,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
// create simple formula, as in ScColumn::CreateRefCell
ScAddress aDestPos( static_cast<SCCOL>(nRow-nRow1), static_cast<SCROW>(nCol-nCol1), pTransClip->nTab );
- SingleRefData aRef;
+ ScSingleRefData aRef;
aRef.nCol = nCol;
aRef.nRow = nRow;
aRef.nTab = nTab;
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 8cd0a911831b..36e045f56e98 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -873,7 +873,7 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
}
// now insert the formulas
- ComplRefData aRef;
+ ScComplexRefData aRef;
aRef.InitFlags();
aRef.Ref1.nTab = nTab;
aRef.Ref2.nTab = nTab;
@@ -1349,7 +1349,7 @@ static void lcl_PrepareQuery( ScDocument* pDoc, ScTable* pTab, ScQueryParam& rPa
SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
{
ScQueryParam aParam( rParamOrg );
- StrCollection aStrCollection;
+ ScStrCollection aScStrCollection;
StrData* pStrData = NULL;
BOOL bStarted = FALSE;
@@ -1408,7 +1408,7 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, BOOL bKeepSub)
BOOL bIsUnique = TRUE;
if (pStrData)
- bIsUnique = aStrCollection.Insert(pStrData);
+ bIsUnique = aScStrCollection.Insert(pStrData);
if (bIsUnique)
bResult = TRUE;
else
@@ -1694,12 +1694,12 @@ BOOL ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL /* nEndCol *
return TRUE;
}
-void ScTable::GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedStrCollection& rStrings)
+void ScTable::GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, TypedScStrCollection& rStrings)
{
aCol[nCol].GetFilterEntries( nRow1, nRow2, rStrings );
}
-void ScTable::GetFilteredFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, TypedStrCollection& rStrings )
+void ScTable::GetFilteredFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, TypedScStrCollection& rStrings )
{
// remove the entry for this column from the query parameter
ScQueryParam aParam( rParam );
@@ -1729,7 +1729,7 @@ void ScTable::GetFilteredFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, co
delete[] pSpecial;
}
-BOOL ScTable::GetDataEntries(SCCOL nCol, SCROW nRow, TypedStrCollection& rStrings, BOOL bLimit)
+BOOL ScTable::GetDataEntries(SCCOL nCol, SCROW nRow, TypedScStrCollection& rStrings, BOOL bLimit)
{
return aCol[nCol].GetDataEntries( nRow, rStrings, bLimit );
}
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 7ad11dc99d26..358369ede555 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -1767,7 +1767,7 @@ void ScTable::GetAutoFormatFrame(SCCOL nCol, SCROW nRow, USHORT nFlags, USHORT n
{
if (pLeftBox)
{
- if (HasPriority(pTheBox->GetLeft(), pLeftBox->GetRight()))
+ if (ScHasPriority(pTheBox->GetLeft(), pLeftBox->GetRight()))
aBox.SetLine(pTheBox->GetLeft(), BOX_LINE_LEFT);
else
aBox.SetLine(pLeftBox->GetRight(), BOX_LINE_LEFT);
@@ -1779,7 +1779,7 @@ void ScTable::GetAutoFormatFrame(SCCOL nCol, SCROW nRow, USHORT nFlags, USHORT n
{
if (pTopBox)
{
- if (HasPriority(pTheBox->GetTop(), pTopBox->GetBottom()))
+ if (ScHasPriority(pTheBox->GetTop(), pTopBox->GetBottom()))
aBox.SetLine(pTheBox->GetTop(), BOX_LINE_TOP);
else
aBox.SetLine(pTopBox->GetBottom(), BOX_LINE_TOP);
@@ -1791,7 +1791,7 @@ void ScTable::GetAutoFormatFrame(SCCOL nCol, SCROW nRow, USHORT nFlags, USHORT n
{
if (pRightBox)
{
- if (HasPriority(pTheBox->GetRight(), pRightBox->GetLeft()))
+ if (ScHasPriority(pTheBox->GetRight(), pRightBox->GetLeft()))
aBox.SetLine(pTheBox->GetRight(), BOX_LINE_RIGHT);
else
aBox.SetLine(pRightBox->GetLeft(), BOX_LINE_RIGHT);
@@ -1803,7 +1803,7 @@ void ScTable::GetAutoFormatFrame(SCCOL nCol, SCROW nRow, USHORT nFlags, USHORT n
{
if (pBottomBox)
{
- if (HasPriority(pTheBox->GetBottom(), pBottomBox->GetTop()))
+ if (ScHasPriority(pTheBox->GetBottom(), pBottomBox->GetTop()))
aBox.SetLine(pTheBox->GetBottom(), BOX_LINE_BOTTOM);
else
aBox.SetLine(pBottomBox->GetTop(), BOX_LINE_BOTTOM);
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 590b05e2d23e..74d2166595b9 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -145,8 +145,8 @@ BOOL ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
( (rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE)
||(rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL) ) &&
// #60558# Matrix nicht zerreissen, nur Matrixformel ersetzen
- !( eCellType == CELLTYPE_FORMULA &&
- ((cMatrixFlag = ((ScFormulaCell*)pCell)->GetMatrixFlag()) == MM_REFERENCE)
+ !( (eCellType == CELLTYPE_FORMULA &&
+ ((cMatrixFlag = ((ScFormulaCell*)pCell)->GetMatrixFlag()) == MM_REFERENCE))
// kein UndoDoc => Matrix nicht wiederherstellbar => nicht ersetzen
|| (cMatrixFlag != MM_NONE && !pUndoDoc) )
)
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 5c6c687adc8e..8aa84645d8c8 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -616,7 +616,7 @@ ULONG lclGetCellFormat( ScDocument& rDoc, const ScAddress& rPos )
}
/** Inserts the passed string object. Always takes ownership. pData is invalid after this call! */
-void lclInsertStringToCollection( TypedStrCollection& rStrColl, TypedStrData* pData, bool bSorted )
+void lclInsertStringToCollection( TypedScStrCollection& rStrColl, TypedStrData* pData, bool bSorted )
{
if( !(bSorted ? rStrColl.Insert( pData ) : rStrColl.AtInsert( rStrColl.GetCount(), pData )) )
delete pData;
@@ -631,7 +631,7 @@ bool ScValidationData::HasSelectionList() const
return (eDataMode == SC_VALID_LIST) && (mnListType != ValidListType::INVISIBLE);
}
-bool ScValidationData::GetSelectionFromFormula( TypedStrCollection* pStrings,
+bool ScValidationData::GetSelectionFromFormula( TypedScStrCollection* pStrings,
ScBaseCell* pCell,
const ScAddress& rPos,
const ScTokenArray& rTokArr,
@@ -768,7 +768,7 @@ bool ScValidationData::GetSelectionFromFormula( TypedStrCollection* pStrings,
return bOk || NULL == pCell;
}
-bool ScValidationData::FillSelectionList( TypedStrCollection& rStrColl, const ScAddress& rPos ) const
+bool ScValidationData::FillSelectionList( TypedScStrCollection& rStrColl, const ScAddress& rPos ) const
{
bool bOk = false;
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 33be2faec46f..c1bd2c29bc48 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -261,16 +261,16 @@ void Pop();
void PopError();
double PopDouble();
const String& PopString();
-void ValidateRef( const SingleRefData & rRef );
-void ValidateRef( const ComplRefData & rRef );
+void ValidateRef( const ScSingleRefData & rRef );
+void ValidateRef( const ScComplexRefData & rRef );
void ValidateRef( const ScRefList & rRefList );
-void SingleRefToVars( const SingleRefData & rRef, SCCOL & rCol, SCROW & rRow, SCTAB & rTab );
+void SingleRefToVars( const ScSingleRefData & rRef, SCCOL & rCol, SCROW & rRow, SCTAB & rTab );
void PopSingleRef( ScAddress& );
void PopSingleRef(SCCOL& rCol, SCROW &rRow, SCTAB& rTab);
-void DoubleRefToRange( const ComplRefData&, ScRange&, BOOL bDontCheckForTableOp = FALSE );
+void DoubleRefToRange( const ScComplexRefData&, ScRange&, BOOL bDontCheckForTableOp = FALSE );
/** If StackVar svDoubleRef pop ScDoubleRefToken and return values of
- ComplRefData.
- Else if StackVar svRefList return values of the ComplRefData where
+ ScComplexRefData.
+ Else if StackVar svRefList return values of the ScComplexRefData where
rRefInList is pointing to. rRefInList is incremented. If rRefInList was the
last element in list pop ScRefListToken and set rRefInList to 0, else
rParam is incremented (!) to allow usage as in
diff --git a/sc/source/core/inc/refupdat.hxx b/sc/source/core/inc/refupdat.hxx
index d3cc221f8163..0461578db0a6 100644
--- a/sc/source/core/inc/refupdat.hxx
+++ b/sc/source/core/inc/refupdat.hxx
@@ -35,7 +35,7 @@
class ScDocument;
class ScBigRange;
-struct ComplRefData;
+struct ScComplexRefData;
class ScAddress;
class ScRange;
@@ -74,20 +74,20 @@ public:
UpdateRefMode eUpdateRefMode,
const ScAddress& rPos, const ScRange& rRange,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ComplRefData& rRef, WhatType eWhat = ALL );
+ ScComplexRefData& rRef, WhatType eWhat = ALL );
/// Before calling, the absolute references must be up-to-date!
static ScRefUpdateRes Move( ScDocument* pDoc, const ScAddress& rPos,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ComplRefData& rRef, BOOL bWrap, BOOL bAbsolute );
+ ScComplexRefData& rRef, BOOL bWrap, BOOL bAbsolute );
static void MoveRelWrap( ScDocument* pDoc, const ScAddress& rPos,
- ComplRefData& rRef );
+ ScComplexRefData& rRef );
/// Before calling, the absolute references must be up-to-date!
static ScRefUpdateRes UpdateTranspose( ScDocument* pDoc,
const ScRange& rSource, const ScAddress& rDest,
- ComplRefData& rRef );
+ ScComplexRefData& rRef );
static void DoTranspose( SCsCOL& rCol, SCsROW& rRow, SCsTAB& rTab, ScDocument* pDoc,
const ScRange& rSource, const ScAddress& rDest );
@@ -95,7 +95,7 @@ public:
/// Before calling, the absolute references must be up-to-date!
static ScRefUpdateRes UpdateGrow(
const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY,
- ComplRefData& rRef );
+ ScComplexRefData& rRef );
#if OLD_PIVOT_IMPLEMENTATION
static ScRefUpdateRes DoGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY,
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 40ab0df07c96..7bfb14f795fe 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1447,7 +1447,7 @@ lcl_a1_append_c ( String &r, int nCol, bool bIsAbs )
{
if( bIsAbs )
r += '$';
- ColToAlpha( r, sal::static_int_cast<SCCOL>(nCol) );
+ ScColToAlpha( r, sal::static_int_cast<SCCOL>(nCol) );
}
static inline void
@@ -1831,7 +1831,7 @@ String ScAddress::GetColRowString( bool bAbsolute,
if (bAbsolute)
aString.Append( '$' );
- ColToAlpha( aString, nCol);
+ ScColToAlpha( aString, nCol);
if ( bAbsolute )
aString.Append( '$' );
@@ -1877,7 +1877,7 @@ String ScRefAddress::GetRefString( ScDocument* pDoc, SCTAB nActTab,
//------------------------------------------------------------------------
-void ColToAlpha( rtl::OUStringBuffer& rBuf, SCCOL nCol )
+void ScColToAlpha( rtl::OUStringBuffer& rBuf, SCCOL nCol )
{
if (nCol < 26*26)
{
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index d584f13490b2..05af63a2ff2f 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -502,7 +502,7 @@ ScAutoFormatData::ScAutoFormatData()
}
ScAutoFormatData::ScAutoFormatData( const ScAutoFormatData& rData ) :
- DataObject(),
+ ScDataObject(),
aName( rData.aName ),
nStrResId( rData.nStrResId ),
bIncludeFont( rData.bIncludeFont ),
@@ -916,7 +916,7 @@ BOOL ScAutoFormatData::Save(SvStream& rStream)
//---------------------------------------------------------------------------------------
ScAutoFormat::ScAutoFormat(USHORT nLim, USHORT nDel, BOOL bDup):
- SortedCollection (nLim, nDel, bDup),
+ ScSortedCollection (nLim, nDel, bDup),
bSaveLater (FALSE)
{
// create default autoformat
@@ -1001,7 +1001,7 @@ ScAutoFormat::ScAutoFormat(USHORT nLim, USHORT nDel, BOOL bDup):
}
ScAutoFormat::ScAutoFormat(const ScAutoFormat& rAutoFormat) :
- SortedCollection (rAutoFormat),
+ ScSortedCollection (rAutoFormat),
bSaveLater (FALSE)
{}
@@ -1019,7 +1019,7 @@ void ScAutoFormat::SetSaveLater( BOOL bSet )
bSaveLater = bSet;
}
-short ScAutoFormat::Compare(DataObject* pKey1, DataObject* pKey2) const
+short ScAutoFormat::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
{
String aStr1;
String aStr2;
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index b09a7b788ea7..c3634db854a6 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -140,7 +140,7 @@ FuncData::FuncData(const ModuleData*pModule,
//------------------------------------------------------------------------
FuncData::FuncData(const FuncData& rData) :
- DataObject(),
+ ScDataObject(),
pModuleData (rData.pModuleData),
aInternalName (rData.aInternalName),
aFuncName (rData.aFuncName),
@@ -154,7 +154,7 @@ FuncData::FuncData(const FuncData& rData) :
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-short FuncCollection::Compare(DataObject* pKey1, DataObject* pKey2) const
+short FuncCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
{
return (short) ScGlobal::pTransliteration->compareString(
((FuncData*)pKey1)->aInternalName, ((FuncData*)pKey2)->aInternalName );
@@ -169,16 +169,16 @@ BOOL FuncCollection::SearchFunc( const String& rName, USHORT& rIndex ) const
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-class ModuleData : public DataObject
+class ModuleData : public ScDataObject
{
friend class ModuleCollection;
String aName;
osl::Module* pInstance;
public:
ModuleData(const String& rStr, osl::Module* pInst) : aName (rStr), pInstance (pInst) {}
- ModuleData(const ModuleData& rData) : DataObject(), aName (rData.aName) {pInstance = new osl::Module(aName);}
+ ModuleData(const ModuleData& rData) : ScDataObject(), aName (rData.aName) {pInstance = new osl::Module(aName);}
~ModuleData() { delete pInstance; }
- virtual DataObject* Clone() const { return new ModuleData(*this); }
+ virtual ScDataObject* Clone() const { return new ModuleData(*this); }
const String& GetName() const { return aName; }
osl::Module* GetInstance() const { return pInstance; }
@@ -186,15 +186,15 @@ public:
};
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-class ModuleCollection : public SortedCollection
+class ModuleCollection : public ScSortedCollection
{
public:
- ModuleCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) : SortedCollection ( nLim, nDel, bDup ) {}
- ModuleCollection(const ModuleCollection& rModuleCollection) : SortedCollection ( rModuleCollection ) {}
+ ModuleCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) : ScSortedCollection ( nLim, nDel, bDup ) {}
+ ModuleCollection(const ModuleCollection& rModuleCollection) : ScSortedCollection ( rModuleCollection ) {}
- virtual DataObject* Clone() const { return new ModuleCollection(*this); }
+ virtual ScDataObject* Clone() const { return new ModuleCollection(*this); }
ModuleData* operator[]( const USHORT nIndex) const {return (ModuleData*)At(nIndex);}
- virtual short Compare(DataObject* pKey1, DataObject* pKey2) const;
+ virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const;
BOOL SearchModule( const String& rName,
const ModuleData*& rpModule ) const;
};
@@ -203,7 +203,7 @@ static ModuleCollection aModuleCollection;
//------------------------------------------------------------------------
-short ModuleCollection::Compare(DataObject* pKey1, DataObject* pKey2) const
+short ModuleCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
{
return (short) ScGlobal::pTransliteration->compareString(
((ModuleData*)pKey1)->aName, ((ModuleData*)pKey2)->aName );
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index 3230597e5213..bd2b06001726 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -98,7 +98,7 @@ ScChartArray::ScChartArray( ScDocument* pDoc, const ScRangeListRef& rRangeList,
}
ScChartArray::ScChartArray( const ScChartArray& rArr ) :
- DataObject(),
+ ScDataObject(),
aName(rArr.aName),
pDocument(rArr.pDocument),
aPositioner(rArr.aPositioner),
@@ -110,7 +110,7 @@ ScChartArray::~ScChartArray()
{
}
-DataObject* ScChartArray::Clone() const
+ScDataObject* ScChartArray::Clone() const
{
return new ScChartArray(*this);
}
@@ -579,7 +579,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
// Collection
//
-DataObject* ScChartCollection::Clone() const
+ScDataObject* ScChartCollection::Clone() const
{
return new ScChartCollection(*this);
}
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index 75fbbebd5fcb..e7c1e6e83fc9 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -116,7 +116,7 @@ ScChartListener::~ScChartListener()
delete pUnoData;
}
-DataObject* ScChartListener::Clone() const
+ScDataObject* ScChartListener::Clone() const
{
return new ScChartListener( *this );
}
@@ -269,7 +269,7 @@ BOOL ScChartListener::operator==( const ScChartListener& r )
// === ScChartListenerCollection ======================================
ScChartListenerCollection::ScChartListenerCollection( ScDocument* pDocP ) :
- StrCollection( 4, 4, FALSE ),
+ ScStrCollection( 4, 4, FALSE ),
pDoc( pDocP )
{
aTimer.SetTimeoutHdl( LINK( this, ScChartListenerCollection, TimerHdl ) );
@@ -277,7 +277,7 @@ ScChartListenerCollection::ScChartListenerCollection( ScDocument* pDocP ) :
ScChartListenerCollection::ScChartListenerCollection(
const ScChartListenerCollection& rColl ) :
- StrCollection( rColl ),
+ ScStrCollection( rColl ),
pDoc( rColl.pDoc )
{
aTimer.SetTimeoutHdl( LINK( this, ScChartListenerCollection, TimerHdl ) );
@@ -293,7 +293,7 @@ ScChartListenerCollection::~ScChartListenerCollection()
FreeAll();
}
-DataObject* ScChartListenerCollection::Clone() const
+ScDataObject* ScChartListenerCollection::Clone() const
{
return new ScChartListenerCollection( *this );
}
@@ -480,7 +480,7 @@ void ScChartListenerCollection::UpdateChartsContainingTab( SCTAB nTab )
BOOL ScChartListenerCollection::operator==( const ScChartListenerCollection& r )
{
- // hier nicht StrCollection::operator==() verwenden, der umstaendlich via
+ // hier nicht ScStrCollection::operator==() verwenden, der umstaendlich via
// IsEqual und Compare laeuft, stattdessen ScChartListener::operator==()
if ( pDoc != r.pDoc || nCount != r.nCount )
return FALSE;
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index a8c673fa60c3..b85b4a02a660 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -589,9 +589,9 @@ String ScChangeAction::GetRefString( const ScBigRange& rRange,
pDoc->GetName( aTmpRange.aStart.Tab(), aStr );
aStr += '.';
}
- aStr += ::ColToAlpha( aTmpRange.aStart.Col() );
+ aStr += ::ScColToAlpha( aTmpRange.aStart.Col() );
aStr += ':';
- aStr += ::ColToAlpha( aTmpRange.aEnd.Col() );
+ aStr += ::ScColToAlpha( aTmpRange.aEnd.Col() );
break;
case SC_CAT_INSERT_ROWS :
case SC_CAT_DELETE_ROWS :
@@ -2498,7 +2498,7 @@ void ScChangeActionContent::PutValueToDoc( ScBaseCell* pCell,
void lcl_InvalidateReference( ScToken& rTok, const ScBigAddress& rPos )
{
- SingleRefData& rRef1 = rTok.GetSingleRef();
+ ScSingleRefData& rRef1 = rTok.GetSingleRef();
if ( rPos.Col() < 0 || MAXCOL < rPos.Col() )
{
rRef1.nCol = SCCOL_MAX;
@@ -2519,7 +2519,7 @@ void lcl_InvalidateReference( ScToken& rTok, const ScBigAddress& rPos )
}
if ( rTok.GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = rTok.GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = rTok.GetDoubleRef().Ref2;
if ( rPos.Col() < 0 || MAXCOL < rPos.Col() )
{
rRef2.nCol = SCCOL_MAX;
@@ -2713,7 +2713,7 @@ ScChangeTrack::ScChangeTrack( ScDocument* pDocP ) :
memset( ppContentSlots, 0, nContentSlots * sizeof( ScChangeActionContent* ) );
}
-ScChangeTrack::ScChangeTrack( ScDocument* pDocP, const StrCollection& aTempUserCollection) :
+ScChangeTrack::ScChangeTrack( ScDocument* pDocP, const ScStrCollection& aTempUserCollection) :
aUserCollection(aTempUserCollection),
pDoc( pDocP )
{
@@ -2920,7 +2920,7 @@ void ScChangeTrack::NotifyModified( ScChangeTrackMsgType eMsgType,
}
-void lcl_EnsureSorting( StrCollection& rCollection )
+void lcl_EnsureSorting( ScStrCollection& rCollection )
{
BOOL bSorted = TRUE;
USHORT nCount = rCollection.GetCount();
@@ -2932,10 +2932,10 @@ void lcl_EnsureSorting( StrCollection& rCollection )
if ( !bSorted )
{
// if not sorted, rebuild collection
- StrCollection aNewColl;
+ ScStrCollection aNewColl;
for (i=0; i<nCount; i++)
{
- DataObject* pNewObj = rCollection[i]->Clone();
+ ScDataObject* pNewObj = rCollection[i]->Clone();
if (!aNewColl.Insert(pNewObj))
delete pNewObj;
}
diff --git a/sc/source/core/tool/collect.cxx b/sc/source/core/tool/collect.cxx
index 7a10eb1ec48d..04343bb65a41 100644
--- a/sc/source/core/tool/collect.cxx
+++ b/sc/source/core/tool/collect.cxx
@@ -43,7 +43,7 @@
// -----------------------------------------------------------------------
-DataObject::~DataObject()
+ScDataObject::~ScDataObject()
{
}
@@ -51,7 +51,7 @@ DataObject::~DataObject()
// Collection
//------------------------------------------------------------------------
-void lcl_DeleteDataObjects( DataObject** p, USHORT nCount )
+void lcl_DeleteScDataObjects( ScDataObject** p, USHORT nCount )
{
if ( p )
{
@@ -61,7 +61,7 @@ void lcl_DeleteDataObjects( DataObject** p, USHORT nCount )
}
}
-Collection::Collection(USHORT nLim, USHORT nDel) :
+ScCollection::ScCollection(USHORT nLim, USHORT nDel) :
nCount ( 0 ),
nLimit ( nLim ),
nDelta ( nDel ),
@@ -75,11 +75,11 @@ Collection::Collection(USHORT nLim, USHORT nDel) :
nLimit = MAXCOLLECTIONSIZE;
else if (nLimit < nDelta)
nLimit = nDelta;
- pItems = new DataObject*[nLimit];
+ pItems = new ScDataObject*[nLimit];
}
-Collection::Collection(const Collection& rCollection)
- : DataObject(),
+ScCollection::ScCollection(const ScCollection& rCollection)
+ : ScDataObject(),
nCount ( 0 ),
nLimit ( 0 ),
nDelta ( 0 ),
@@ -90,59 +90,59 @@ Collection::Collection(const Collection& rCollection)
//------------------------------------------------------------------------
-Collection::~Collection()
+ScCollection::~ScCollection()
{
- lcl_DeleteDataObjects( pItems, nCount );
+ lcl_DeleteScDataObjects( pItems, nCount );
}
//------------------------------------------------------------------------
-void Collection::AtFree(USHORT nIndex)
+void ScCollection::AtFree(USHORT nIndex)
{
if ((pItems) && (nIndex < nCount))
{
delete pItems[nIndex];
--nCount; // before memmove
- memmove ( &pItems[nIndex], &pItems[nIndex + 1], (nCount - nIndex) * sizeof(DataObject*));
+ memmove ( &pItems[nIndex], &pItems[nIndex + 1], (nCount - nIndex) * sizeof(ScDataObject*));
pItems[nCount] = NULL;
}
}
//------------------------------------------------------------------------
-void Collection::Free(DataObject* pDataObject)
+void ScCollection::Free(ScDataObject* pScDataObject)
{
- AtFree(IndexOf(pDataObject));
+ AtFree(IndexOf(pScDataObject));
}
//------------------------------------------------------------------------
-void Collection::FreeAll()
+void ScCollection::FreeAll()
{
- lcl_DeleteDataObjects( pItems, nCount );
+ lcl_DeleteScDataObjects( pItems, nCount );
nCount = 0;
- pItems = new DataObject*[nLimit];
+ pItems = new ScDataObject*[nLimit];
}
//------------------------------------------------------------------------
-BOOL Collection::AtInsert(USHORT nIndex, DataObject* pDataObject)
+BOOL ScCollection::AtInsert(USHORT nIndex, ScDataObject* pScDataObject)
{
if ((nCount < MAXCOLLECTIONSIZE) && (nIndex <= nCount) && pItems)
{
if (nCount == nLimit)
{
- DataObject** pNewItems = new DataObject*[nLimit + nDelta];
+ ScDataObject** pNewItems = new ScDataObject*[nLimit + nDelta];
if (!pNewItems)
return FALSE;
nLimit = sal::static_int_cast<USHORT>( nLimit + nDelta );
- memmove(pNewItems, pItems, nCount * sizeof(DataObject*));
+ memmove(pNewItems, pItems, nCount * sizeof(ScDataObject*));
delete[] pItems;
pItems = pNewItems;
}
if (nCount > nIndex)
- memmove(&pItems[nIndex + 1], &pItems[nIndex], (nCount - nIndex) * sizeof(DataObject*));
- pItems[nIndex] = pDataObject;
+ memmove(&pItems[nIndex + 1], &pItems[nIndex], (nCount - nIndex) * sizeof(ScDataObject*));
+ pItems[nIndex] = pScDataObject;
nCount++;
return TRUE;
}
@@ -151,14 +151,14 @@ BOOL Collection::AtInsert(USHORT nIndex, DataObject* pDataObject)
//------------------------------------------------------------------------
-BOOL Collection::Insert(DataObject* pDataObject)
+BOOL ScCollection::Insert(ScDataObject* pScDataObject)
{
- return AtInsert(nCount, pDataObject);
+ return AtInsert(nCount, pScDataObject);
}
//------------------------------------------------------------------------
-DataObject* Collection::At(USHORT nIndex) const
+ScDataObject* ScCollection::At(USHORT nIndex) const
{
if (nIndex < nCount)
return pItems[nIndex];
@@ -168,26 +168,26 @@ DataObject* Collection::At(USHORT nIndex) const
//------------------------------------------------------------------------
-USHORT Collection::IndexOf(DataObject* pDataObject) const
+USHORT ScCollection::IndexOf(ScDataObject* pScDataObject) const
{
USHORT nIndex = 0xffff;
for (USHORT i = 0; ((i < nCount) && (nIndex == 0xffff)); i++)
{
- if (pItems[i] == pDataObject) nIndex = i;
+ if (pItems[i] == pScDataObject) nIndex = i;
}
return nIndex;
}
//------------------------------------------------------------------------
-Collection& Collection::operator=( const Collection& r )
+ScCollection& ScCollection::operator=( const ScCollection& r )
{
- lcl_DeleteDataObjects( pItems, nCount );
+ lcl_DeleteScDataObjects( pItems, nCount );
nCount = r.nCount;
nLimit = r.nLimit;
nDelta = r.nDelta;
- pItems = new DataObject*[nLimit];
+ pItems = new ScDataObject*[nLimit];
for ( USHORT i=0; i<nCount; i++ )
pItems[i] = r.pItems[i]->Clone();
@@ -196,27 +196,27 @@ Collection& Collection::operator=( const Collection& r )
//------------------------------------------------------------------------
-DataObject* Collection::Clone() const
+ScDataObject* ScCollection::Clone() const
{
- return new Collection(*this);
+ return new ScCollection(*this);
}
//------------------------------------------------------------------------
-// SortedCollection
+// ScSortedCollection
//------------------------------------------------------------------------
-SortedCollection::SortedCollection(USHORT nLim, USHORT nDel, BOOL bDup) :
- Collection (nLim, nDel),
+ScSortedCollection::ScSortedCollection(USHORT nLim, USHORT nDel, BOOL bDup) :
+ ScCollection (nLim, nDel),
bDuplicates ( bDup)
{
}
//------------------------------------------------------------------------
-USHORT SortedCollection::IndexOf(DataObject* pDataObject) const
+USHORT ScSortedCollection::IndexOf(ScDataObject* pScDataObject) const
{
USHORT nIndex;
- if (Search(pDataObject, nIndex))
+ if (Search(pScDataObject, nIndex))
return nIndex;
else
return 0xffff;
@@ -224,7 +224,7 @@ USHORT SortedCollection::IndexOf(DataObject* pDataObject) const
//------------------------------------------------------------------------
-BOOL SortedCollection::Search(DataObject* pDataObject, USHORT& rIndex) const
+BOOL ScSortedCollection::Search(ScDataObject* pScDataObject, USHORT& rIndex) const
{
rIndex = nCount;
BOOL bFound = FALSE;
@@ -235,7 +235,7 @@ BOOL SortedCollection::Search(DataObject* pDataObject, USHORT& rIndex) const
while (nLo <= nHi)
{
nIndex = (nLo + nHi) / 2;
- nCompare = Compare(pItems[nIndex], pDataObject);
+ nCompare = Compare(pItems[nIndex], pScDataObject);
if (nCompare < 0)
nLo = nIndex + 1;
else
@@ -254,40 +254,40 @@ BOOL SortedCollection::Search(DataObject* pDataObject, USHORT& rIndex) const
//------------------------------------------------------------------------
-BOOL SortedCollection::Insert(DataObject* pDataObject)
+BOOL ScSortedCollection::Insert(ScDataObject* pScDataObject)
{
USHORT nIndex;
- BOOL bFound = Search(pDataObject, nIndex);
+ BOOL bFound = Search(pScDataObject, nIndex);
if (bFound)
{
if (bDuplicates)
- return AtInsert(nIndex, pDataObject);
+ return AtInsert(nIndex, pScDataObject);
else
return FALSE;
}
else
- return AtInsert(nIndex, pDataObject);
+ return AtInsert(nIndex, pScDataObject);
}
//------------------------------------------------------------------------
-BOOL SortedCollection::InsertPos(DataObject* pDataObject, USHORT& nIndex)
+BOOL ScSortedCollection::InsertPos(ScDataObject* pScDataObject, USHORT& nIndex)
{
- BOOL bFound = Search(pDataObject, nIndex);
+ BOOL bFound = Search(pScDataObject, nIndex);
if (bFound)
{
if (bDuplicates)
- return AtInsert(nIndex, pDataObject);
+ return AtInsert(nIndex, pScDataObject);
else
return FALSE;
}
else
- return AtInsert(nIndex, pDataObject);
+ return AtInsert(nIndex, pScDataObject);
}
//------------------------------------------------------------------------
-BOOL SortedCollection::operator==(const SortedCollection& rCmp) const
+BOOL ScSortedCollection::operator==(const ScSortedCollection& rCmp) const
{
if ( nCount != rCmp.nCount )
return FALSE;
@@ -301,21 +301,21 @@ BOOL SortedCollection::operator==(const SortedCollection& rCmp) const
// IsEqual - komplette Inhalte vergleichen
-BOOL SortedCollection::IsEqual(DataObject* pKey1, DataObject* pKey2) const
+BOOL ScSortedCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
{
return ( Compare(pKey1, pKey2) == 0 ); // Default: nur Index vergleichen
}
//------------------------------------------------------------------------
-DataObject* StrData::Clone() const
+ScDataObject* StrData::Clone() const
{
return new StrData(*this);
}
//------------------------------------------------------------------------
-short StrCollection::Compare(DataObject* pKey1, DataObject* pKey2) const
+short ScStrCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
{
StringCompare eComp = ((StrData*)pKey1)->aStr.CompareTo(((StrData*)pKey2)->aStr);
if (eComp == COMPARE_EQUAL)
@@ -328,22 +328,22 @@ short StrCollection::Compare(DataObject* pKey1, DataObject* pKey2) const
//------------------------------------------------------------------------
-DataObject* StrCollection::Clone() const
+ScDataObject* ScStrCollection::Clone() const
{
- return new StrCollection(*this);
+ return new ScStrCollection(*this);
}
//------------------------------------------------------------------------
-void StrCollection::Load( SvStream& rStream )
+void ScStrCollection::Load( SvStream& rStream )
{
ScReadHeader aHdr( rStream );
- lcl_DeleteDataObjects( pItems, nCount );
+ lcl_DeleteScDataObjects( pItems, nCount );
BOOL bDups;
rStream >> bDups;
SetDups( bDups );
rStream >> nCount >> nLimit >> nDelta;
- pItems = new DataObject*[nLimit];
+ pItems = new ScDataObject*[nLimit];
String aStr;
rtl_TextEncoding eSet = rStream.GetStreamCharSet();
for ( USHORT i=0; i<nCount; i++ )
@@ -353,7 +353,7 @@ void StrCollection::Load( SvStream& rStream )
}
}
-void StrCollection::Store( SvStream& rStream ) const
+void ScStrCollection::Store( SvStream& rStream ) const
{
ScWriteHeader aHdr( rStream );
BOOL bDups = IsDups();
@@ -366,7 +366,7 @@ void StrCollection::Store( SvStream& rStream ) const
}
//------------------------------------------------------------------------
-// TypedStrCollection
+// TypedScStrCollection
//------------------------------------------------------------------------
//UNUSED2008-05 TypedStrData::TypedStrData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab,
@@ -387,17 +387,17 @@ void StrCollection::Store( SvStream& rStream ) const
//UNUSED2008-05 }
//UNUSED2008-05 }
-DataObject* TypedStrData::Clone() const
+ScDataObject* TypedStrData::Clone() const
{
return new TypedStrData(*this);
}
-DataObject* TypedStrCollection::Clone() const
+ScDataObject* TypedScStrCollection::Clone() const
{
- return new TypedStrCollection(*this);
+ return new TypedScStrCollection(*this);
}
-short TypedStrCollection::Compare( DataObject* pKey1, DataObject* pKey2 ) const
+short TypedScStrCollection::Compare( ScDataObject* pKey1, ScDataObject* pKey2 ) const
{
short nResult = 0;
@@ -439,7 +439,7 @@ short TypedStrCollection::Compare( DataObject* pKey1, DataObject* pKey2 ) const
return nResult;
}
-BOOL TypedStrCollection::FindText( const String& rStart, String& rResult,
+BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult,
USHORT& rPos, BOOL bBack ) const
{
// Die Collection ist nach String-Vergleichen sortiert, darum muss hier
@@ -518,7 +518,7 @@ BOOL TypedStrCollection::FindText( const String& rStart, String& rResult,
// Gross-/Kleinschreibung anpassen
-BOOL TypedStrCollection::GetExactMatch( String& rString ) const
+BOOL TypedScStrCollection::GetExactMatch( String& rString ) const
{
for (USHORT i=0; i<nCount; i++)
{
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 6d39951d6553..16f51a015667 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1438,7 +1438,7 @@ void Convention_A1::MakeColStr( rtl::OUStringBuffer& rBuffer, SCCOL nCol )
if ( !ValidCol( nCol) )
rBuffer.append(ScGlobal::GetRscString(STR_NO_REF_TABLE));
else
- ::ColToAlpha( rBuffer, nCol);
+ ::ScColToAlpha( rBuffer, nCol);
}
void Convention_A1::MakeRowStr( rtl::OUStringBuffer& rBuffer, SCROW nRow )
@@ -1485,13 +1485,13 @@ struct ConventionOOO_A1 : public Convention_A1
void MakeRefStrImpl( rtl::OUStringBuffer& rBuffer,
const ScCompiler& rComp,
- const ComplRefData& rRef,
+ const ScComplexRefData& rRef,
bool bSingleRef,
bool bODF ) const
{
if (bODF)
rBuffer.append(sal_Unicode('['));
- ComplRefData aRef( rRef );
+ ScComplexRefData aRef( rRef );
// In case absolute/relative positions weren't separately available:
// transform relative to absolute!
// AdjustReference( aRef.Ref1 );
@@ -1574,7 +1574,7 @@ struct ConventionOOO_A1 : public Convention_A1
void MakeRefStr( rtl::OUStringBuffer& rBuffer,
const ScCompiler& rComp,
- const ComplRefData& rRef,
+ const ScComplexRefData& rRef,
BOOL bSingleRef ) const
{
MakeRefStrImpl( rBuffer, rComp, rRef, bSingleRef, false);
@@ -1723,7 +1723,7 @@ struct ConventionOOO_A1_ODF : public ConventionOOO_A1
ConventionOOO_A1_ODF() : ConventionOOO_A1 (ScAddress::CONV_ODF) { }
void MakeRefStr( rtl::OUStringBuffer& rBuffer,
const ScCompiler& rComp,
- const ComplRefData& rRef,
+ const ScComplexRefData& rRef,
BOOL bSingleRef ) const
{
MakeRefStrImpl( rBuffer, rComp, rRef, bSingleRef, true);
@@ -1757,7 +1757,7 @@ const ScCompiler::Convention * const ScCompiler::pConvOOO_A1_ODF = &ConvOOO_A1_O
struct ConventionXL
{
static bool GetDocAndTab( const ScCompiler& rComp,
- const SingleRefData& rRef,
+ const ScSingleRefData& rRef,
String& rDocName,
String& rTabName )
{
@@ -1794,7 +1794,7 @@ struct ConventionXL
static void MakeDocStr( rtl::OUStringBuffer& rBuf,
const ScCompiler& rComp,
- const ComplRefData& rRef,
+ const ScComplexRefData& rRef,
bool bSingleRef )
{
if( rRef.Ref1.IsFlag3D() )
@@ -1974,10 +1974,10 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
void MakeRefStr( rtl::OUStringBuffer& rBuf,
const ScCompiler& rComp,
- const ComplRefData& rRef,
+ const ScComplexRefData& rRef,
BOOL bSingleRef ) const
{
- ComplRefData aRef( rRef );
+ ScComplexRefData aRef( rRef );
// Play fast and loose with invalid refs. There is not much point in producing
// Foo!A1:#REF! versus #REF! at this point
@@ -2137,7 +2137,7 @@ const ScCompiler::Convention * const ScCompiler::pConvXL_OOX = &ConvXL_OOX;
//-----------------------------------------------------------------------------
static void
-r1c1_add_col( rtl::OUStringBuffer &rBuf, const SingleRefData& rRef )
+r1c1_add_col( rtl::OUStringBuffer &rBuf, const ScSingleRefData& rRef )
{
rBuf.append( sal_Unicode( 'C' ) );
if( rRef.IsColRel() )
@@ -2153,7 +2153,7 @@ r1c1_add_col( rtl::OUStringBuffer &rBuf, const SingleRefData& rRef )
rBuf.append( String::CreateFromInt32( rRef.nCol + 1 ) );
}
static void
-r1c1_add_row( rtl::OUStringBuffer &rBuf, const SingleRefData& rRef )
+r1c1_add_row( rtl::OUStringBuffer &rBuf, const ScSingleRefData& rRef )
{
rBuf.append( sal_Unicode( 'R' ) );
if( rRef.IsRowRel() )
@@ -2174,10 +2174,10 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
ConventionXL_R1C1() : ScCompiler::Convention( ScAddress::CONV_XL_R1C1 ) { }
void MakeRefStr( rtl::OUStringBuffer& rBuf,
const ScCompiler& rComp,
- const ComplRefData& rRef,
+ const ScComplexRefData& rRef,
BOOL bSingleRef ) const
{
- ComplRefData aRef( rRef );
+ ScComplexRefData aRef( rRef );
MakeDocStr( rBuf, rComp, aRef, bSingleRef );
@@ -2528,7 +2528,7 @@ sal_Unicode* lcl_UnicodeStrNCpy( sal_Unicode* pDst, const sal_Unicode* pSrc, xub
// | Sonst | Symbol=Symbol+Zeichen | GetString
//---------------+-------------------+-----------------------+---------------
-xub_StrLen ScCompiler::NextSymbol()
+xub_StrLen ScCompiler::NextSymbol(bool bInArray)
{
cSymbol[MAXSTRLEN-1] = 0; // Stopper
sal_Unicode* pSym = cSymbol;
@@ -2542,6 +2542,8 @@ xub_StrLen ScCompiler::NextSymbol()
ScanState eState = ssGetChar;
xub_StrLen nSpaces = 0;
sal_Unicode cSep = mxSymbols->getSymbol( ocSep).GetChar(0);
+ sal_Unicode cArrayColSep = mxSymbols->getSymbol( ocArrayColSep).GetChar(0);
+ sal_Unicode cArrayRowSep = mxSymbols->getSymbol( ocArrayRowSep).GetChar(0);
sal_Unicode cDecSep = (mxSymbols->isEnglish() ? '.' :
ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0));
@@ -2558,9 +2560,9 @@ xub_StrLen ScCompiler::NextSymbol()
{
pSrc++;
ULONG nMask = GetCharTableFlags( c );
- // The parameter separator ends things unconditionally if not in
- // string or reference.
- if (c == cSep)
+ // The parameter separator and the array column and row separators end
+ // things unconditionally if not in string or reference.
+ if (c == cSep || (bInArray && (c == cArrayColSep || c == cArrayRowSep)))
{
switch (eState)
{
@@ -3045,14 +3047,22 @@ Label_MaskStateMachine:
// Convert symbol to token
//---------------------------------------------------------------------------
-BOOL ScCompiler::IsOpCode( const String& rName )
+BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
{
ScOpCodeHashMap::const_iterator iLook( mxSymbols->getHashMap()->find( rName));
BOOL bFound = (iLook != mxSymbols->getHashMap()->end());
if (bFound)
{
ScRawToken aToken;
- aToken.SetOpCode( (*iLook).second );
+ OpCode eOp = iLook->second;
+ if (bInArray)
+ {
+ if (rName.Equals(mxSymbols->getSymbol(ocArrayColSep)))
+ eOp = ocArrayColSep;
+ else if (rName.Equals(mxSymbols->getSymbol(ocArrayRowSep)))
+ eOp = ocArrayRowSep;
+ }
+ aToken.SetOpCode(eOp);
pRawToken = aToken.Clone();
}
else
@@ -3265,7 +3275,7 @@ BOOL ScCompiler::IsDoubleReference( const String& rName )
if( nFlags & SCA_VALID )
{
ScRawToken aToken;
- ComplRefData aRef;
+ ScComplexRefData aRef;
aRef.InitRange( aRange );
aRef.Ref1.SetColRel( (nFlags & SCA_COL_ABSOLUTE) == 0 );
aRef.Ref1.SetRowRel( (nFlags & SCA_ROW_ABSOLUTE) == 0 );
@@ -3309,7 +3319,7 @@ BOOL ScCompiler::IsSingleReference( const String& rName )
if( nFlags & ( SCA_VALID_COL|SCA_VALID_ROW|SCA_VALID_TAB ) )
{
ScRawToken aToken;
- SingleRefData aRef;
+ ScSingleRefData aRef;
aRef.InitAddress( aAddr );
aRef.SetColRel( (nFlags & SCA_COL_ABSOLUTE) == 0 );
aRef.SetRowRel( (nFlags & SCA_ROW_ABSOLUTE) == 0 );
@@ -3517,7 +3527,7 @@ BOOL ScCompiler::IsColRowName( const String& rName )
{
BOOL bInList = FALSE;
BOOL bFound = FALSE;
- SingleRefData aRef;
+ ScSingleRefData aRef;
String aName( rName );
DeQuote( aName );
SCTAB nThisTab = aPos.Tab();
@@ -4005,9 +4015,10 @@ void ScCompiler::AutoCorrectParsedSymbol()
}
}
-BOOL ScCompiler::NextNewToken( bool bAllowBooleans )
+BOOL ScCompiler::NextNewToken( bool bInArray )
{
- xub_StrLen nSpaces = NextSymbol();
+ bool bAllowBooleans = bInArray;
+ xub_StrLen nSpaces = NextSymbol(bInArray);
#if 0
fprintf( stderr, "NextNewToken '%s' (spaces = %d)\n",
@@ -4088,7 +4099,7 @@ BOOL ScCompiler::NextNewToken( bool bAllowBooleans )
// IsReference().
// IsBoolean before isValue to catch inline bools without the kludge
// for inline arrays.
- if ( !(bMayBeFuncName && IsOpCode( aUpper ))
+ if ( !(bMayBeFuncName && IsOpCode( aUpper, bInArray ))
&& !IsReference( aOrg )
&& !(bAllowBooleans && IsBoolean( aUpper ))
&& !IsValue( aUpper )
@@ -4527,7 +4538,7 @@ BOOL ScCompiler::GetToken()
}
else if( pToken->GetOpCode() == ocColRowName )
{
- SingleRefData& rRef = pToken->GetSingleRef();
+ ScSingleRefData& rRef = pToken->GetSingleRef();
rRef.CalcAbsIfRel( aPos );
if ( !rRef.Valid() )
{
@@ -4693,7 +4704,7 @@ BOOL ScCompiler::GetToken()
ScTokenArray* pNew = new ScTokenArray;
if ( bSingle )
{
- SingleRefData aRefData;
+ ScSingleRefData aRefData;
aRefData.InitAddress( aRange.aStart );
if ( bColName )
aRefData.SetColRel( TRUE );
@@ -4704,7 +4715,7 @@ BOOL ScCompiler::GetToken()
}
else
{
- ComplRefData aRefData;
+ ScComplexRefData aRefData;
aRefData.InitRange( aRange );
if ( bColName )
{
@@ -4740,7 +4751,7 @@ BOOL ScCompiler::GetToken()
SetError(errNoName);
else if ( !bCompileForFAP )
{
- ComplRefData aRefData;
+ ScComplexRefData aRefData;
aRefData.InitFlags();
pDBData->GetArea( (SCTAB&) aRefData.Ref1.nTab,
(SCCOL&) aRefData.Ref1.nCol,
@@ -5508,12 +5519,12 @@ void ScCompiler::SetRelNameReference()
for( ScToken* t = pArr->GetNextReference(); t;
t = pArr->GetNextReference() )
{
- SingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsColRel() || rRef1.IsRowRel() || rRef1.IsTabRel() )
rRef1.SetRelName( TRUE );
if ( t->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( rRef2.IsColRel() || rRef2.IsRowRel() || rRef2.IsTabRel() )
rRef2.SetRelName( TRUE );
}
@@ -5570,7 +5581,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
for( t = pArr->GetNextColRowName(); t;
t = pArr->GetNextColRowName() )
{
- SingleRefData& rRef = t->GetSingleRef();
+ ScSingleRefData& rRef = t->GetSingleRef();
rRef.CalcAbsIfRel( rOldPos );
ScAddress aNewRef( rRef.nCol + nDx, rRef.nRow + nDy, rRef.nTab + nDz );
if ( r.In( aNewRef ) )
@@ -5668,7 +5679,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
}
else
{
- ComplRefData& rRef = t->GetDoubleRef();
+ ScComplexRefData& rRef = t->GetDoubleRef();
SCCOL nCols = rRef.Ref2.nCol - rRef.Ref1.nCol;
SCROW nRows = rRef.Ref2.nRow - rRef.Ref1.nRow;
SCTAB nTabs = rRef.Ref2.nTab - rRef.Ref1.nTab;
@@ -5710,7 +5721,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
{ // if nRefCnt>1 it's already updated in token code
if ( t->GetType() == svSingleRef )
{
- SingleRefData& rRef = t->GetSingleRef();
+ ScSingleRefData& rRef = t->GetSingleRef();
SingleDoubleRefModifier aMod( rRef );
if ( rRef.IsRelName() )
{
@@ -5729,7 +5740,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
#if SC_PRESERVE_SHARED_FORMULAS_IF_POSSIBLE
if ( bEasyShared )
{
- const SingleRefData& rSRD = aMod.Ref().Ref1;
+ const ScSingleRefData& rSRD = aMod.Ref().Ref1;
ScAddress aRef( rSRD.nCol, rSRD.nRow, rSRD.nTab );
if ( r.In( aRef ) != bPosInRange )
bEasyShared = FALSE;
@@ -5738,7 +5749,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
}
else
{
- ComplRefData& rRef = t->GetDoubleRef();
+ ScComplexRefData& rRef = t->GetDoubleRef();
SCCOL nCols = rRef.Ref2.nCol - rRef.Ref1.nCol;
SCROW nRows = rRef.Ref2.nRow - rRef.Ref1.nRow;
SCTAB nTabs = rRef.Ref2.nTab - rRef.Ref1.nTab;
@@ -5805,7 +5816,7 @@ BOOL ScCompiler::UpdateNameReference(UpdateRefMode eUpdateRefMode,
t = pArr->GetNextReference() )
{
SingleDoubleRefModifier aMod( *t );
- ComplRefData& rRef = aMod.Ref();
+ ScComplexRefData& rRef = aMod.Ref();
bRelRef = rRef.Ref1.IsColRel() || rRef.Ref1.IsRowRel() ||
rRef.Ref1.IsTabRel();
if (!bRelRef && t->GetType() == svDoubleRef)
@@ -5860,8 +5871,8 @@ void ScCompiler::UpdateSharedFormulaReference( UpdateRefMode eUpdateRefMode,
// shared formula itself prior to breaking the shared formula
// and calling this function. Don't readjust them again.
SingleDoubleRefModifier aMod( *t );
- ComplRefData& rRef = aMod.Ref();
- ComplRefData aBkp = rRef;
+ ScComplexRefData& rRef = aMod.Ref();
+ ScComplexRefData aBkp = rRef;
ScRefUpdate::Update( pDoc, eUpdateRefMode, aPos,
r, nDx, nDy, nDz, rRef );
// restore absolute parts
@@ -5937,7 +5948,7 @@ ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, BOOL bIsName )
{
if ( !(bIsName && t->GetSingleRef().IsTabRel()) )
{ // of names only adjust absolute references
- SingleRefData& rRef = t->GetSingleRef();
+ ScSingleRefData& rRef = t->GetSingleRef();
if ( rRef.IsTabRel() )
{
rRef.nTab = rRef.nRelTab + nOldPosTab;
@@ -5954,7 +5965,7 @@ ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, BOOL bIsName )
{
if ( !(bIsName && t->GetDoubleRef().Ref2.IsTabRel()) )
{ // of names only adjust absolute references
- SingleRefData& rRef = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef = t->GetDoubleRef().Ref2;
if ( rRef.IsTabRel() )
{
rRef.nTab = rRef.nRelTab + nOldPosTab;
@@ -5984,7 +5995,7 @@ ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, BOOL bIsName )
{
if ( t->GetRef() == 1 )
{
- SingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef1 = t->GetSingleRef();
if ( !(rRef1.IsRelName() && rRef1.IsTabRel()) )
{ // of names only adjust absolute references
if ( rRef1.IsTabRel() )
@@ -5999,7 +6010,7 @@ ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, BOOL bIsName )
}
if ( t->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( !(rRef2.IsRelName() && rRef2.IsTabRel()) )
{ // of names only adjust absolute references
if ( rRef2.IsTabRel() )
@@ -6050,7 +6061,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
{
if ( !(bIsName && t->GetSingleRef().IsTabRel()) )
{ // of names only adjust absolute references
- SingleRefData& rRef = t->GetSingleRef();
+ ScSingleRefData& rRef = t->GetSingleRef();
if ( rRef.IsTabRel() )
nTab = rRef.nTab = rRef.nRelTab + nOldPosTab;
else
@@ -6064,7 +6075,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
{
if ( t->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( rRef2.IsTabRel() )
nTab2 = rRef2.nRelTab + nOldPosTab;
else
@@ -6093,7 +6104,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
{
if ( !(bIsName && t->GetDoubleRef().Ref2.IsTabRel()) )
{ // of names only adjust absolute references
- SingleRefData& rRef = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef = t->GetDoubleRef().Ref2;
if ( rRef.IsTabRel() )
nTab = rRef.nTab = rRef.nRelTab + nOldPosTab;
else
@@ -6135,7 +6146,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
{
if ( t->GetRef() == 1 )
{
- SingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef1 = t->GetSingleRef();
if ( !(rRef1.IsRelName() && rRef1.IsTabRel()) )
{ // of names only adjust absolute references
if ( rRef1.IsTabRel() )
@@ -6151,7 +6162,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
{
if ( t->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( rRef2.IsTabRel() )
nTab2 = rRef2.nRelTab + nOldPosTab;
else
@@ -6176,7 +6187,7 @@ ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, BOOL /* bIsMove */, BOOL
}
if ( t->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( !(rRef2.IsRelName() && rRef2.IsTabRel()) )
{ // of names only adjust absolute references
if ( rRef2.IsTabRel() )
@@ -6258,7 +6269,7 @@ ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab,
}
else if( t->GetType() != svIndex ) // it may be a DB area!!!
{
- SingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef1 = t->GetSingleRef();
if ( !(bIsName && rRef1.IsTabRel()) )
{ // of names only adjust absolute references
if ( rRef1.IsTabRel() )
@@ -6275,7 +6286,7 @@ ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab,
bIsRel = TRUE;
if ( t->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( !(bIsName && rRef2.IsTabRel()) )
{ // of names only adjust absolute references
if ( rRef2.IsTabRel() )
@@ -6324,7 +6335,7 @@ ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab,
{
if ( t->GetRef() == 1 )
{
- SingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsRelName() && rRef1.IsTabRel() )
{ // possibly wrap RelName, like lcl_MoveItWrap in refupdat.cxx
nTab = rRef1.nRelTab + nPosTab;
@@ -6348,7 +6359,7 @@ ScRangeData* ScCompiler::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab,
}
if( t->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( rRef2.IsRelName() && rRef2.IsTabRel() )
{ // possibly wrap RelName, like lcl_MoveItWrap in refupdat.cxx
nTab = rRef2.nRelTab + nPosTab;
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index 99c3cb3e1610..ec1c21ec4807 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -746,11 +746,11 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
//! unterscheiden, ob nach Kategorien aufgeteilt
String aString;
- SingleRefData aSRef; // Daten fuer Referenz-Formelzellen
+ ScSingleRefData aSRef; // Daten fuer Referenz-Formelzellen
aSRef.InitFlags();
aSRef.SetFlag3D(TRUE);
- ComplRefData aCRef; // Daten fuer Summen-Zellen
+ ScComplexRefData aCRef; // Daten fuer Summen-Zellen
aCRef.InitFlags();
aCRef.Ref1.SetColRel(TRUE); aCRef.Ref1.SetRowRel(TRUE); aCRef.Ref1.SetTabRel(TRUE);
aCRef.Ref2.SetColRel(TRUE); aCRef.Ref2.SetRowRel(TRUE); aCRef.Ref2.SetTabRel(TRUE);
diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx
index c9e521aebaed..e6c039b5d79f 100644
--- a/sc/source/core/tool/dbcolect.cxx
+++ b/sc/source/core/tool/dbcolect.cxx
@@ -90,7 +90,7 @@ ScDBData::ScDBData( const String& rName,
}
ScDBData::ScDBData( const ScDBData& rData ) :
- DataObject(),
+ ScDataObject(),
ScRefreshTimer ( rData ),
aName (rData.aName),
nTable (rData.nTable),
@@ -688,7 +688,7 @@ BOOL ScDBData::IsDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR
&& (nCol2 == nEndCol) && (nRow2 == nEndRow));
}
-DataObject* ScDBData::Clone() const
+ScDataObject* ScDBData::Clone() const
{
return new ScDBData(*this);
}
@@ -697,7 +697,7 @@ DataObject* ScDBData::Clone() const
//---------------------------------------------------------------------------------------
// Compare zum Sortieren
-short ScDBCollection::Compare(DataObject* pKey1, DataObject* pKey2) const
+short ScDBCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
{
const String& rStr1 = ((ScDBData*)pKey1)->GetName();
const String& rStr2 = ((ScDBData*)pKey2)->GetName();
@@ -706,7 +706,7 @@ short ScDBCollection::Compare(DataObject* pKey1, DataObject* pKey2) const
// IsEqual - alles gleich
-BOOL ScDBCollection::IsEqual(DataObject* pKey1, DataObject* pKey2) const
+BOOL ScDBCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
{
return *(ScDBData*)pKey1 == *(ScDBData*)pKey2;
}
@@ -870,12 +870,12 @@ ScDBData* ScDBCollection::FindIndex(USHORT nIndex)
return NULL;
}
-BOOL ScDBCollection::Insert(DataObject* pDataObject)
+BOOL ScDBCollection::Insert(ScDataObject* pScDataObject)
{
- ScDBData* pData = (ScDBData*) pDataObject;
+ ScDBData* pData = (ScDBData*) pScDataObject;
if (!pData->GetIndex()) // schon gesetzt?
pData->SetIndex(nEntryIndex++);
- BOOL bInserted = SortedCollection::Insert(pDataObject);
+ BOOL bInserted = ScSortedCollection::Insert(pScDataObject);
if ( bInserted && pData->HasImportParam() && !pData->HasImportSelection() )
{
pData->SetRefreshHandler( GetRefreshHandler() );
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 09fb3294cbc7..20a7a6070071 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -1746,14 +1746,14 @@ void ScInterpreter::ScIntersect()
{
if (sv[i] == svSingleRef)
{
- ComplRefData aRef;
+ ScComplexRefData aRef;
aRef.Ref1 = aRef.Ref2 = xt[i]->GetSingleRef();
xt[i] = new ScRefListToken;
xt[i]->GetRefList()->push_back( aRef);
}
else if (sv[i] == svDoubleRef)
{
- ComplRefData aRef = xt[i]->GetDoubleRef();
+ ScComplexRefData aRef = xt[i]->GetDoubleRef();
xt[i] = new ScRefListToken;
xt[i]->GetRefList()->push_back( aRef);
}
@@ -1769,13 +1769,13 @@ void ScInterpreter::ScIntersect()
for (ScRefList::const_iterator it1( x1->GetRefList()->begin());
it1 != end1; ++it1)
{
- const SingleRefData& r11 = (*it1).Ref1;
- const SingleRefData& r12 = (*it1).Ref2;
+ const ScSingleRefData& r11 = (*it1).Ref1;
+ const ScSingleRefData& r12 = (*it1).Ref2;
for (ScRefList::const_iterator it2( x2->GetRefList()->begin());
it2 != end2; ++it2)
{
- const SingleRefData& r21 = (*it2).Ref1;
- const SingleRefData& r22 = (*it2).Ref2;
+ const ScSingleRefData& r21 = (*it2).Ref1;
+ const ScSingleRefData& r22 = (*it2).Ref2;
SCCOL nCol1 = ::std::max( r11.nCol, r21.nCol);
SCROW nRow1 = ::std::max( r11.nRow, r21.nRow);
SCTAB nTab1 = ::std::max( r11.nTab, r21.nTab);
@@ -1786,7 +1786,7 @@ void ScInterpreter::ScIntersect()
; // nothing
else
{
- ComplRefData aRef;
+ ScComplexRefData aRef;
aRef.InitRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
pRefList->push_back( aRef);
}
@@ -1797,7 +1797,7 @@ void ScInterpreter::ScIntersect()
PushError( errNoRef);
else if (n == 1)
{
- const ComplRefData& rRef = (*pRefList)[0];
+ const ScComplexRefData& rRef = (*pRefList)[0];
if (rRef.Ref1 == rRef.Ref2)
PushTempToken( new ScSingleRefToken( rRef.Ref1));
else
@@ -1821,14 +1821,14 @@ void ScInterpreter::ScIntersect()
case svDoubleRef:
pt[i]->CalcAbsIfRel( aPos);
{
- const SingleRefData& r = pt[i]->GetSingleRef();
+ const ScSingleRefData& r = pt[i]->GetSingleRef();
nC1[i] = r.nCol;
nR1[i] = r.nRow;
nT1[i] = r.nTab;
}
if (sv[i] == svDoubleRef)
{
- const SingleRefData& r = pt[i]->GetSingleRef2();
+ const ScSingleRefData& r = pt[i]->GetSingleRef2();
nC2[i] = r.nCol;
nR2[i] = r.nRow;
nT2[i] = r.nTab;
@@ -1920,7 +1920,7 @@ void ScInterpreter::ScUnionFunc()
{
case svSingleRef:
{
- ComplRefData aRef;
+ ScComplexRefData aRef;
aRef.Ref1 = aRef.Ref2 = pt[i]->GetSingleRef();
pRes->push_back( aRef);
}
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 549714295899..67eac357e302 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -867,7 +867,7 @@ const String& ScInterpreter::PopString()
}
-void ScInterpreter::ValidateRef( const SingleRefData & rRef )
+void ScInterpreter::ValidateRef( const ScSingleRefData & rRef )
{
SCCOL nCol;
SCROW nRow;
@@ -876,7 +876,7 @@ void ScInterpreter::ValidateRef( const SingleRefData & rRef )
}
-void ScInterpreter::ValidateRef( const ComplRefData & rRef )
+void ScInterpreter::ValidateRef( const ScComplexRefData & rRef )
{
ValidateRef( rRef.Ref1);
ValidateRef( rRef.Ref2);
@@ -894,7 +894,7 @@ void ScInterpreter::ValidateRef( const ScRefList & rRefList )
}
-void ScInterpreter::SingleRefToVars( const SingleRefData & rRef,
+void ScInterpreter::SingleRefToVars( const ScSingleRefData & rRef,
SCCOL & rCol, SCROW & rRow, SCTAB & rTab )
{
if ( rRef.IsColRel() )
@@ -979,7 +979,7 @@ void ScInterpreter::DoubleRefToVars( const ScToken* p,
SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2,
BOOL bDontCheckForTableOp )
{
- const ComplRefData& rCRef = p->GetDoubleRef();
+ const ScComplexRefData& rCRef = p->GetDoubleRef();
SingleRefToVars( rCRef.Ref1, rCol1, rRow1, rTab1);
SingleRefToVars( rCRef.Ref2, rCol2, rRow2, rTab2);
if ( pDok->aTableOpList.Count() > 0 && !bDontCheckForTableOp )
@@ -1017,7 +1017,7 @@ void ScInterpreter::PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
}
-void ScInterpreter::DoubleRefToRange( const ComplRefData & rCRef,
+void ScInterpreter::DoubleRefToRange( const ScComplexRefData & rCRef,
ScRange & rRange, BOOL bDontCheckForTableOp )
{
SCCOL nCol;
@@ -1343,7 +1343,7 @@ void ScInterpreter::PushSingleRef(SCCOL nCol, SCROW nRow, SCTAB nTab)
{
if (!IfErrorPushError())
{
- SingleRefData aRef;
+ ScSingleRefData aRef;
aRef.InitFlags();
aRef.nCol = nCol;
aRef.nRow = nRow;
@@ -1358,7 +1358,7 @@ void ScInterpreter::PushDoubleRef(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
{
if (!IfErrorPushError())
{
- ComplRefData aRef;
+ ScComplexRefData aRef;
aRef.InitFlags();
aRef.Ref1.nCol = nCol1;
aRef.Ref1.nRow = nRow1;
@@ -2815,7 +2815,7 @@ void ScInterpreter::ScDBArea()
ScDBData* pDBData = pDok->GetDBCollection()->FindIndex( pCur->GetIndex());
if (pDBData)
{
- ComplRefData aRefData;
+ ScComplexRefData aRefData;
aRefData.InitFlags();
pDBData->GetArea( (SCTAB&) aRefData.Ref1.nTab,
(SCCOL&) aRefData.Ref1.nCol,
@@ -2833,7 +2833,7 @@ void ScInterpreter::ScDBArea()
void ScInterpreter::ScColRowNameAuto()
{
- ComplRefData aRefData( pCur->GetDoubleRef() );
+ ScComplexRefData aRefData( pCur->GetDoubleRef() );
aRefData.CalcAbsIfRel( aPos );
if ( aRefData.Valid() )
{
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index cabb19c82802..0128f17c2393 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -155,7 +155,7 @@ ScRangeData::ScRangeData( ScDocument* pDok,
nIndex ( 0 ),
bModified ( FALSE )
{
- SingleRefData aRefData;
+ ScSingleRefData aRefData;
aRefData.InitAddress( rTarget );
aRefData.SetFlag3D( TRUE );
pCode->AddSingleReference( aRefData );
@@ -166,7 +166,7 @@ ScRangeData::ScRangeData( ScDocument* pDok,
}
ScRangeData::ScRangeData(const ScRangeData& rScRangeData) :
- DataObject(),
+ ScDataObject(),
aName (rScRangeData.aName),
aUpperName (rScRangeData.aUpperName),
pCode (rScRangeData.pCode ? rScRangeData.pCode->Clone() : new ScTokenArray), // echte Kopie erzeugen (nicht copy-ctor)
@@ -182,7 +182,7 @@ ScRangeData::~ScRangeData()
delete pCode;
}
-DataObject* ScRangeData::Clone() const
+ScDataObject* ScRangeData::Clone() const
{
return new ScRangeData(*this);
}
@@ -202,7 +202,7 @@ void ScRangeData::GuessPosition()
pCode->Reset();
while ( ( t = pCode->GetNextReference() ) != NULL )
{
- SingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsColRel() && rRef1.nRelCol < nMinCol )
nMinCol = rRef1.nRelCol;
if ( rRef1.IsRowRel() && rRef1.nRelRow < nMinRow )
@@ -212,7 +212,7 @@ void ScRangeData::GuessPosition()
if ( t->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( rRef2.IsColRel() && rRef2.nRelCol < nMinCol )
nMinCol = rRef2.nRelCol;
if ( rRef2.IsRowRel() && rRef2.nRelRow < nMinRow )
@@ -294,7 +294,7 @@ void ScRangeData::UpdateTranspose( const ScRange& rSource, const ScAddress& rDes
if( t->GetType() != svIndex )
{
SingleDoubleRefModifier aMod( *t );
- ComplRefData& rRef = aMod.Ref();
+ ScComplexRefData& rRef = aMod.Ref();
if (!rRef.Ref1.IsColRel() && !rRef.Ref1.IsRowRel() &&
(!rRef.Ref1.IsFlag3D() || !rRef.Ref1.IsTabRel()) &&
( t->GetType() == svSingleRef ||
@@ -322,7 +322,7 @@ void ScRangeData::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
if( t->GetType() != svIndex )
{
SingleDoubleRefModifier aMod( *t );
- ComplRefData& rRef = aMod.Ref();
+ ScComplexRefData& rRef = aMod.Ref();
if (!rRef.Ref1.IsColRel() && !rRef.Ref1.IsRowRel() &&
(!rRef.Ref1.IsFlag3D() || !rRef.Ref1.IsTabRel()) &&
( t->GetType() == svSingleRef ||
@@ -548,14 +548,14 @@ void ScRangeData::TransferTabRef( SCTAB nOldTab, SCTAB nNewTab )
pCode->Reset();
while ( ( t = pCode->GetNextReference() ) != NULL )
{
- SingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsTabRel() )
rRef1.nTab = sal::static_int_cast<SCsTAB>( rRef1.nTab + nPosDiff );
else
rRef1.nTab = sal::static_int_cast<SCsTAB>( rRef1.nTab + nTabDiff );
if ( t->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( rRef2.IsTabRel() )
rRef2.nTab = sal::static_int_cast<SCsTAB>( rRef2.nTab + nPosDiff );
else
@@ -605,7 +605,7 @@ void ScRangeData::ValidateTabRefs()
pCode->Reset();
while ( ( t = pCode->GetNextReference() ) != NULL )
{
- SingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsTabRel() && !rRef1.IsTabDeleted() )
{
if ( rRef1.nTab < nMinTab )
@@ -615,7 +615,7 @@ void ScRangeData::ValidateTabRefs()
}
if ( t->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( rRef2.IsTabRel() && !rRef2.IsTabDeleted() )
{
if ( rRef2.nTab < nMinTab )
@@ -638,12 +638,12 @@ void ScRangeData::ValidateTabRefs()
pCode->Reset();
while ( ( t = pCode->GetNextReference() ) != NULL )
{
- SingleRefData& rRef1 = t->GetSingleRef();
+ ScSingleRefData& rRef1 = t->GetSingleRef();
if ( rRef1.IsTabRel() && !rRef1.IsTabDeleted() )
rRef1.nTab = sal::static_int_cast<SCsTAB>( rRef1.nTab - nMove );
if ( t->GetType() == svDoubleRef )
{
- SingleRefData& rRef2 = t->GetDoubleRef().Ref2;
+ ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
if ( rRef2.IsTabRel() && !rRef2.IsTabDeleted() )
rRef2.nTab = sal::static_int_cast<SCsTAB>( rRef2.nTab - nMove );
}
@@ -669,7 +669,7 @@ ScRangeData_QsortNameCompare( const void* p1, const void* p2 )
//========================================================================
ScRangeName::ScRangeName(const ScRangeName& rScRangeName, ScDocument* pDocument) :
- SortedCollection ( rScRangeName ),
+ ScSortedCollection ( rScRangeName ),
pDoc ( pDocument ),
nSharedMaxIndex (rScRangeName.nSharedMaxIndex)
{
@@ -680,7 +680,7 @@ ScRangeName::ScRangeName(const ScRangeName& rScRangeName, ScDocument* pDocument)
}
}
-short ScRangeName::Compare(DataObject* pKey1, DataObject* pKey2) const
+short ScRangeName::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const
{
USHORT i1 = ((ScRangeData*)pKey1)->GetIndex();
USHORT i2 = ((ScRangeData*)pKey2)->GetIndex();
@@ -733,19 +733,19 @@ void ScRangeName::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
((ScRangeData*)pItems[i])->UpdateGrow( rArea, nGrowX, nGrowY );
}
-BOOL ScRangeName::IsEqual(DataObject* pKey1, DataObject* pKey2) const
+BOOL ScRangeName::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const
{
return *(ScRangeData*)pKey1 == *(ScRangeData*)pKey2;
}
-BOOL ScRangeName::Insert(DataObject* pDataObject)
+BOOL ScRangeName::Insert(ScDataObject* pScDataObject)
{
- if (!((ScRangeData*)pDataObject)->GetIndex()) // schon gesetzt?
+ if (!((ScRangeData*)pScDataObject)->GetIndex()) // schon gesetzt?
{
- ((ScRangeData*)pDataObject)->SetIndex( GetEntryIndex() );
+ ((ScRangeData*)pScDataObject)->SetIndex( GetEntryIndex() );
}
- return SortedCollection::Insert(pDataObject);
+ return ScSortedCollection::Insert(pScDataObject);
}
// Suche nach einem freien Index
diff --git a/sc/source/core/tool/refdata.cxx b/sc/source/core/tool/refdata.cxx
index 4a7e07476703..db2d54268e80 100644
--- a/sc/source/core/tool/refdata.cxx
+++ b/sc/source/core/tool/refdata.cxx
@@ -36,7 +36,7 @@
#include "refdata.hxx"
-void SingleRefData::CalcRelFromAbs( const ScAddress& rPos )
+void ScSingleRefData::CalcRelFromAbs( const ScAddress& rPos )
{
nRelCol = nCol - rPos.Col();
nRelRow = nRow - rPos.Row();
@@ -44,7 +44,7 @@ void SingleRefData::CalcRelFromAbs( const ScAddress& rPos )
}
-void SingleRefData::SmartRelAbs( const ScAddress& rPos )
+void ScSingleRefData::SmartRelAbs( const ScAddress& rPos )
{
if ( Flags.bColRel )
nCol = nRelCol + rPos.Col();
@@ -63,7 +63,7 @@ void SingleRefData::SmartRelAbs( const ScAddress& rPos )
}
-void SingleRefData::CalcAbsIfRel( const ScAddress& rPos )
+void ScSingleRefData::CalcAbsIfRel( const ScAddress& rPos )
{
if ( Flags.bColRel )
{
@@ -85,7 +85,7 @@ void SingleRefData::CalcAbsIfRel( const ScAddress& rPos )
}
}
-//UNUSED2008-05 void SingleRefData::OldBoolsToNewFlags( const OldSingleRefBools& rBools )
+//UNUSED2008-05 void ScSingleRefData::OldBoolsToNewFlags( const OldSingleRefBools& rBools )
//UNUSED2008-05 {
//UNUSED2008-05 switch ( rBools.bRelCol )
//UNUSED2008-05 {
@@ -163,7 +163,7 @@ void SingleRefData::CalcAbsIfRel( const ScAddress& rPos )
//UNUSED2008-05 Aber immer noch nCol > MAXCOL und gut sollte sein..
//UNUSED2008-05 */
//UNUSED2008-05
-//UNUSED2008-05 BYTE SingleRefData::CreateStoreByteFromFlags() const
+//UNUSED2008-05 BYTE ScSingleRefData::CreateStoreByteFromFlags() const
//UNUSED2008-05 {
//UNUSED2008-05 return (BYTE)(
//UNUSED2008-05 ( (Flags.bRelName & 0x01) << 7 )
@@ -178,7 +178,7 @@ void SingleRefData::CalcAbsIfRel( const ScAddress& rPos )
//UNUSED2008-05 }
//UNUSED2008-05
//UNUSED2008-05
-//UNUSED2008-05 void SingleRefData::CreateFlagsFromLoadByte( BYTE n )
+//UNUSED2008-05 void ScSingleRefData::CreateFlagsFromLoadByte( BYTE n )
//UNUSED2008-05 {
//UNUSED2008-05 Flags.bColRel = (n & 0x01 );
//UNUSED2008-05 Flags.bColDeleted = ( (n >> 1) & 0x01 );
@@ -191,7 +191,7 @@ void SingleRefData::CalcAbsIfRel( const ScAddress& rPos )
//UNUSED2008-05 }
-BOOL SingleRefData::operator==( const SingleRefData& r ) const
+BOOL ScSingleRefData::operator==( const ScSingleRefData& r ) const
{
return bFlags == r.bFlags &&
(Flags.bColRel ? nRelCol == r.nRelCol : nCol == r.nCol) &&
@@ -204,7 +204,7 @@ bool SingleRefData::operator!=( const SingleRefData& r ) const
return !operator==(r);
}
-static void lcl_putInOrder( SingleRefData & rRef1, SingleRefData & rRef2 )
+static void lcl_putInOrder( ScSingleRefData & rRef1, ScSingleRefData & rRef2 )
{
SCCOL nCol1, nCol2;
SCROW nRow1, nRow2;
@@ -296,18 +296,18 @@ static void lcl_putInOrder( SingleRefData & rRef1, SingleRefData & rRef2 )
}
-void ComplRefData::PutInOrder()
+void ScComplexRefData::PutInOrder()
{
lcl_putInOrder( Ref1, Ref2);
}
-static void lcl_adjustInOrder( SingleRefData & rRef1, SingleRefData & rRef2, bool bFirstLeader )
+static void lcl_adjustInOrder( ScSingleRefData & rRef1, ScSingleRefData & rRef2, bool bFirstLeader )
{
// a1:a2:a3, bFirstLeader: rRef1==a1==r1, rRef2==a3==r2
// else: rRef1==a3==r2, rRef2==a2==r1
- SingleRefData& r1 = (bFirstLeader ? rRef1 : rRef2);
- SingleRefData& r2 = (bFirstLeader ? rRef2 : rRef1);
+ ScSingleRefData& r1 = (bFirstLeader ? rRef1 : rRef2);
+ ScSingleRefData& r2 = (bFirstLeader ? rRef2 : rRef1);
if (r1.Flags.bFlag3D && !r2.Flags.bFlag3D)
{
// [$]Sheet1.A5:A6 on Sheet2 do still refer only Sheet1.
@@ -319,10 +319,10 @@ static void lcl_adjustInOrder( SingleRefData & rRef1, SingleRefData & rRef2, boo
}
-ComplRefData& ComplRefData::Extend( const SingleRefData & rRef, const ScAddress & rPos )
+ScComplexRefData& ScComplexRefData::Extend( const ScSingleRefData & rRef, const ScAddress & rPos )
{
CalcAbsIfRel( rPos);
- SingleRefData aRef = rRef;
+ ScSingleRefData aRef = rRef;
aRef.CalcAbsIfRel( rPos);
bool bInherit3D = Ref1.IsFlag3D() && !Ref2.IsFlag3D();
bool bInherit3Dtemp = bInherit3D && !rRef.IsFlag3D();
@@ -369,7 +369,7 @@ ComplRefData& ComplRefData::Extend( const SingleRefData & rRef, const ScAddress
}
-ComplRefData& ComplRefData::Extend( const ComplRefData & rRef, const ScAddress & rPos )
+ScComplexRefData& ScComplexRefData::Extend( const ScComplexRefData & rRef, const ScAddress & rPos )
{
return Extend( rRef.Ref1, rPos).Extend( rRef.Ref2, rPos);
}
diff --git a/sc/source/core/tool/refupdat.cxx b/sc/source/core/tool/refupdat.cxx
index 4303e77b438a..d019a6082583 100644
--- a/sc/source/core/tool/refupdat.cxx
+++ b/sc/source/core/tool/refupdat.cxx
@@ -502,7 +502,7 @@ ScRefUpdateRes ScRefUpdate::Update( UpdateRefMode eUpdateRefMode,
ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
const ScAddress& rPos, const ScRange& r,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ComplRefData& rRef, WhatType eWhat )
+ ScComplexRefData& rRef, WhatType eWhat )
{
ScRefUpdateRes eRet = UR_NOTHING;
@@ -712,7 +712,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode,
ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
- ComplRefData& rRef, BOOL bWrap, BOOL bAbsolute )
+ ScComplexRefData& rRef, BOOL bWrap, BOOL bAbsolute )
{
ScRefUpdateRes eRet = UR_NOTHING;
@@ -821,7 +821,7 @@ ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos,
}
void ScRefUpdate::MoveRelWrap( ScDocument* pDoc, const ScAddress& rPos,
- ComplRefData& rRef )
+ ScComplexRefData& rRef )
{
if( rRef.Ref1.IsColRel() )
{
@@ -887,7 +887,7 @@ void ScRefUpdate::DoTranspose( SCsCOL& rCol, SCsROW& rRow, SCsTAB& rTab,
ScRefUpdateRes ScRefUpdate::UpdateTranspose( ScDocument* pDoc,
const ScRange& rSource, const ScAddress& rDest,
- ComplRefData& rRef )
+ ScComplexRefData& rRef )
{
ScRefUpdateRes eRet = UR_NOTHING;
if ( rRef.Ref1.nCol >= rSource.aStart.Col() && rRef.Ref2.nCol <= rSource.aEnd.Col() &&
@@ -908,7 +908,7 @@ ScRefUpdateRes ScRefUpdate::UpdateTranspose( ScDocument* pDoc,
ScRefUpdateRes ScRefUpdate::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY,
- ComplRefData& rRef )
+ ScComplexRefData& rRef )
{
ScRefUpdateRes eRet = UR_NOTHING;
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 86f89f81f446..31fdcdedb7e9 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -162,7 +162,7 @@ void ScRawToken::SetString( const sal_Unicode* pStr )
nRefCnt = 0;
}
-void ScRawToken::SetSingleReference( const SingleRefData& rRef )
+void ScRawToken::SetSingleReference( const ScSingleRefData& rRef )
{
eOp = ocPush;
eType = svSingleRef;
@@ -171,7 +171,7 @@ void ScRawToken::SetSingleReference( const SingleRefData& rRef )
nRefCnt = 0;
}
-void ScRawToken::SetDoubleReference( const ComplRefData& rRef )
+void ScRawToken::SetDoubleReference( const ScComplexRefData& rRef )
{
eOp = ocPush;
eType = svDoubleRef;
@@ -195,7 +195,7 @@ void ScRawToken::SetName( USHORT n )
nRefCnt = 0;
}
-void ScRawToken::SetExternalSingleRef( sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef )
+void ScRawToken::SetExternalSingleRef( sal_uInt16 nFileId, const String& rTabName, const ScSingleRefData& rRef )
{
eOp = ocExternalRef;
eType = svExternalSingleRef;
@@ -210,7 +210,7 @@ void ScRawToken::SetExternalSingleRef( sal_uInt16 nFileId, const String& rTabNam
extref.cTabName[n] = 0;
}
-void ScRawToken::SetExternalDoubleRef( sal_uInt16 nFileId, const String& rTabName, const ComplRefData& rRef )
+void ScRawToken::SetExternalDoubleRef( sal_uInt16 nFileId, const String& rTabName, const ScComplexRefData& rRef )
{
eOp = ocExternalRef;
eType = svExternalDoubleRef;
@@ -253,13 +253,13 @@ void ScRawToken::SetExternalName( sal_uInt16 nFileId, const String& rName )
//UNUSED2008-05 nRefCnt = 0;
//UNUSED2008-05 }
//UNUSED2008-05
-//UNUSED2008-05 ComplRefData& ScRawToken::GetReference()
+//UNUSED2008-05 ScComplexRefData& ScRawToken::GetReference()
//UNUSED2008-05 {
//UNUSED2008-05 DBG_ASSERT( lcl_IsReference( eOp, GetType() ), "GetReference: no Ref" );
//UNUSED2008-05 return aRef;
//UNUSED2008-05 }
//UNUSED2008-05
-//UNUSED2008-05 void ScRawToken::SetReference( ComplRefData& rRef )
+//UNUSED2008-05 void ScRawToken::SetReference( ScComplexRefData& rRef )
//UNUSED2008-05 {
//UNUSED2008-05 DBG_ASSERT( lcl_IsReference( eOp, GetType() ), "SetReference: no Ref" );
//UNUSED2008-05 aRef = rRef;
@@ -438,16 +438,16 @@ void ScRawToken::Delete()
// --- class ScToken --------------------------------------------------------
-SingleRefData lcl_ScToken_InitSingleRef()
+ScSingleRefData lcl_ScToken_InitSingleRef()
{
- SingleRefData aRef;
+ ScSingleRefData aRef;
aRef.InitAddress( ScAddress() );
return aRef;
}
-ComplRefData lcl_ScToken_InitDoubleRef()
+ScComplexRefData lcl_ScToken_InitDoubleRef()
{
- ComplRefData aRef;
+ ScComplexRefData aRef;
aRef.Ref1 = lcl_ScToken_InitSingleRef();
aRef.Ref2 = aRef.Ref1;
return aRef;
@@ -615,7 +615,7 @@ BOOL ScToken::TextEqual( const ScToken& rToken ) const
if ( eType != rToken.eType || GetOpCode() != rToken.GetOpCode() )
return FALSE;
- ComplRefData aTemp1;
+ ScComplexRefData aTemp1;
if ( eType == svSingleRef )
{
aTemp1.Ref1 = GetSingleRef();
@@ -624,7 +624,7 @@ BOOL ScToken::TextEqual( const ScToken& rToken ) const
else
aTemp1 = GetDoubleRef();
- ComplRefData aTemp2;
+ ScComplexRefData aTemp2;
if ( rToken.eType == svSingleRef )
{
aTemp2.Ref1 = rToken.GetSingleRef();
@@ -721,6 +721,7 @@ ScTokenRef ScToken::ExtendRangeReference( ScToken & rTok1, ScToken & rTok2,
// generating Sheet1.A1:A1, and then extending that with A2 as if
// Sheet1.A1:A1:A2 was encountered, so the mechanisms to adjust the
// references apply as well.
+<<<<<<< .working
/* Given the current structure of external references an external
* reference can only be extended if the second reference does not
@@ -737,11 +738,11 @@ ScTokenRef ScToken::ExtendRangeReference( ScToken & rTok1, ScToken & rTok2,
* merged here. For Xcl syntax already parse an external range
* reference entirely, cumbersome. */
- const SingleRefData& rRef2 = p2->GetSingleRef();
+ const ScSingleRefData& rRef2 = p2->GetSingleRef();
if (bExternal && rRef2.IsFlag3D())
return NULL;
- ComplRefData aRef;
+ ScComplexRefData aRef;
aRef.Ref1 = aRef.Ref2 = p1->GetSingleRef();
aRef.Ref2.SetFlag3D( false);
aRef.Extend( rRef2, rPos);
@@ -780,7 +781,7 @@ ScTokenRef ScToken::ExtendRangeReference( ScToken & rTok1, ScToken & rTok2,
return NULL; // shouldn't happen..
StackVar sv[2] = { sv1, sv2 };
ScToken* pt[2] = { p1, p2 };
- ComplRefData& rRef = xRes->GetDoubleRef();
+ ScComplexRefData& rRef = xRes->GetDoubleRef();
for (size_t i=0; i<2; ++i)
{
switch (sv[i])
@@ -868,45 +869,45 @@ const String& ScToken::GetString() const
return aDummyString;
}
-const SingleRefData& ScToken::GetSingleRef() const
+const ScSingleRefData& ScToken::GetSingleRef() const
{
DBG_ERRORFILE( "ScToken::GetSingleRef: virtual dummy called" );
- static SingleRefData aDummySingleRef = lcl_ScToken_InitSingleRef();
+ static ScSingleRefData aDummySingleRef = lcl_ScToken_InitSingleRef();
return aDummySingleRef;
}
-SingleRefData& ScToken::GetSingleRef()
+ScSingleRefData& ScToken::GetSingleRef()
{
DBG_ERRORFILE( "ScToken::GetSingleRef: virtual dummy called" );
- static SingleRefData aDummySingleRef = lcl_ScToken_InitSingleRef();
+ static ScSingleRefData aDummySingleRef = lcl_ScToken_InitSingleRef();
return aDummySingleRef;
}
-const ComplRefData& ScToken::GetDoubleRef() const
+const ScComplexRefData& ScToken::GetDoubleRef() const
{
DBG_ERRORFILE( "ScToken::GetDoubleRef: virtual dummy called" );
- static ComplRefData aDummyDoubleRef = lcl_ScToken_InitDoubleRef();
+ static ScComplexRefData aDummyDoubleRef = lcl_ScToken_InitDoubleRef();
return aDummyDoubleRef;
}
-ComplRefData& ScToken::GetDoubleRef()
+ScComplexRefData& ScToken::GetDoubleRef()
{
DBG_ERRORFILE( "ScToken::GetDoubleRef: virtual dummy called" );
- static ComplRefData aDummyDoubleRef = lcl_ScToken_InitDoubleRef();
+ static ScComplexRefData aDummyDoubleRef = lcl_ScToken_InitDoubleRef();
return aDummyDoubleRef;
}
-const SingleRefData& ScToken::GetSingleRef2() const
+const ScSingleRefData& ScToken::GetSingleRef2() const
{
DBG_ERRORFILE( "ScToken::GetSingleRef2: virtual dummy called" );
- static SingleRefData aDummySingleRef = lcl_ScToken_InitSingleRef();
+ static ScSingleRefData aDummySingleRef = lcl_ScToken_InitSingleRef();
return aDummySingleRef;
}
-SingleRefData& ScToken::GetSingleRef2()
+ScSingleRefData& ScToken::GetSingleRef2()
{
DBG_ERRORFILE( "ScToken::GetSingleRef2: virtual dummy called" );
- static SingleRefData aDummySingleRef = lcl_ScToken_InitSingleRef();
+ static ScSingleRefData aDummySingleRef = lcl_ScToken_InitSingleRef();
return aDummySingleRef;
}
@@ -1038,8 +1039,8 @@ BOOL ScStringOpToken::operator==( const ScToken& r ) const
}
-const SingleRefData& ScSingleRefToken::GetSingleRef() const { return aSingleRef; }
-SingleRefData& ScSingleRefToken::GetSingleRef() { return aSingleRef; }
+const ScSingleRefData& ScSingleRefToken::GetSingleRef() const { return aSingleRef; }
+ScSingleRefData& ScSingleRefToken::GetSingleRef() { return aSingleRef; }
void ScSingleRefToken::CalcAbsIfRel( const ScAddress& rPos )
{ aSingleRef.CalcAbsIfRel( rPos ); }
void ScSingleRefToken::CalcRelFromAbs( const ScAddress& rPos )
@@ -1050,8 +1051,8 @@ BOOL ScSingleRefToken::operator==( const ScToken& r ) const
}
-const SingleRefData& ScSingleRefOpToken::GetSingleRef() const { return aSingleRef; }
-SingleRefData& ScSingleRefOpToken::GetSingleRef() { return aSingleRef; }
+const ScSingleRefData& ScSingleRefOpToken::GetSingleRef() const { return aSingleRef; }
+ScSingleRefData& ScSingleRefOpToken::GetSingleRef() { return aSingleRef; }
void ScSingleRefOpToken::CalcAbsIfRel( const ScAddress& rPos )
{ aSingleRef.CalcAbsIfRel( rPos ); }
void ScSingleRefOpToken::CalcRelFromAbs( const ScAddress& rPos )
@@ -1062,12 +1063,12 @@ BOOL ScSingleRefOpToken::operator==( const ScToken& r ) const
}
-const SingleRefData& ScDoubleRefToken::GetSingleRef() const { return aDoubleRef.Ref1; }
-SingleRefData& ScDoubleRefToken::GetSingleRef() { return aDoubleRef.Ref1; }
-const ComplRefData& ScDoubleRefToken::GetDoubleRef() const { return aDoubleRef; }
-ComplRefData& ScDoubleRefToken::GetDoubleRef() { return aDoubleRef; }
-const SingleRefData& ScDoubleRefToken::GetSingleRef2() const { return aDoubleRef.Ref2; }
-SingleRefData& ScDoubleRefToken::GetSingleRef2() { return aDoubleRef.Ref2; }
+const ScSingleRefData& ScDoubleRefToken::GetSingleRef() const { return aDoubleRef.Ref1; }
+ScSingleRefData& ScDoubleRefToken::GetSingleRef() { return aDoubleRef.Ref1; }
+const ScComplexRefData& ScDoubleRefToken::GetDoubleRef() const { return aDoubleRef; }
+ScComplexRefData& ScDoubleRefToken::GetDoubleRef() { return aDoubleRef; }
+const ScSingleRefData& ScDoubleRefToken::GetSingleRef2() const { return aDoubleRef.Ref2; }
+ScSingleRefData& ScDoubleRefToken::GetSingleRef2() { return aDoubleRef.Ref2; }
void ScDoubleRefToken::CalcAbsIfRel( const ScAddress& rPos )
{ aDoubleRef.CalcAbsIfRel( rPos ); }
void ScDoubleRefToken::CalcRelFromAbs( const ScAddress& rPos )
@@ -1078,12 +1079,12 @@ BOOL ScDoubleRefToken::operator==( const ScToken& r ) const
}
-const SingleRefData& ScDoubleRefOpToken::GetSingleRef() const { return aDoubleRef.Ref1; }
-SingleRefData& ScDoubleRefOpToken::GetSingleRef() { return aDoubleRef.Ref1; }
-const ComplRefData& ScDoubleRefOpToken::GetDoubleRef() const { return aDoubleRef; }
-ComplRefData& ScDoubleRefOpToken::GetDoubleRef() { return aDoubleRef; }
-const SingleRefData& ScDoubleRefOpToken::GetSingleRef2() const { return aDoubleRef.Ref2; }
-SingleRefData& ScDoubleRefOpToken::GetSingleRef2() { return aDoubleRef.Ref2; }
+const ScSingleRefData& ScDoubleRefOpToken::GetSingleRef() const { return aDoubleRef.Ref1; }
+ScSingleRefData& ScDoubleRefOpToken::GetSingleRef() { return aDoubleRef.Ref1; }
+const ScComplexRefData& ScDoubleRefOpToken::GetDoubleRef() const { return aDoubleRef; }
+ScComplexRefData& ScDoubleRefOpToken::GetDoubleRef() { return aDoubleRef; }
+const ScSingleRefData& ScDoubleRefOpToken::GetSingleRef2() const { return aDoubleRef.Ref2; }
+ScSingleRefData& ScDoubleRefOpToken::GetSingleRef2() { return aDoubleRef.Ref2; }
void ScDoubleRefOpToken::CalcAbsIfRel( const ScAddress& rPos )
{ aDoubleRef.CalcAbsIfRel( rPos ); }
void ScDoubleRefOpToken::CalcRelFromAbs( const ScAddress& rPos )
@@ -1129,7 +1130,7 @@ BOOL ScIndexToken::operator==( const ScToken& r ) const
// ============================================================================
-ScExternalSingleRefToken::ScExternalSingleRefToken( sal_uInt16 nFileId, const String& rTabName, const SingleRefData& r ) :
+ScExternalSingleRefToken::ScExternalSingleRefToken( sal_uInt16 nFileId, const String& rTabName, const ScSingleRefData& r ) :
ScOpToken(ocExternalRef, svExternalSingleRef),
mnFileId(nFileId),
maTabName(rTabName),
@@ -1159,12 +1160,12 @@ const String& ScExternalSingleRefToken::GetString() const
return maTabName;
}
-const SingleRefData& ScExternalSingleRefToken::GetSingleRef() const
+const ScSingleRefData& ScExternalSingleRefToken::GetSingleRef() const
{
return maSingleRef;
}
-SingleRefData& ScExternalSingleRefToken::GetSingleRef()
+ScSingleRefData& ScExternalSingleRefToken::GetSingleRef()
{
return maSingleRef;
}
@@ -1185,7 +1186,7 @@ BOOL ScExternalSingleRefToken::operator ==( const ScToken& r ) const
// ============================================================================
-ScExternalDoubleRefToken::ScExternalDoubleRefToken( sal_uInt16 nFileId, const String& rTabName, const ComplRefData& r ) :
+ScExternalDoubleRefToken::ScExternalDoubleRefToken( sal_uInt16 nFileId, const String& rTabName, const ScComplexRefData& r ) :
ScOpToken(ocExternalRef, svExternalDoubleRef),
mnFileId(nFileId),
maTabName(rTabName),
@@ -1215,32 +1216,32 @@ const String& ScExternalDoubleRefToken::GetString() const
return maTabName;
}
-const SingleRefData& ScExternalDoubleRefToken::GetSingleRef() const
+const ScSingleRefData& ScExternalDoubleRefToken::GetSingleRef() const
{
return maDoubleRef.Ref1;
}
-SingleRefData& ScExternalDoubleRefToken::GetSingleRef()
+ScSingleRefData& ScExternalDoubleRefToken::GetSingleRef()
{
return maDoubleRef.Ref1;
}
-const SingleRefData& ScExternalDoubleRefToken::GetSingleRef2() const
+const ScSingleRefData& ScExternalDoubleRefToken::GetSingleRef2() const
{
return maDoubleRef.Ref2;
}
-SingleRefData& ScExternalDoubleRefToken::GetSingleRef2()
+ScSingleRefData& ScExternalDoubleRefToken::GetSingleRef2()
{
return maDoubleRef.Ref2;
}
-const ComplRefData& ScExternalDoubleRefToken::GetDoubleRef() const
+const ScComplexRefData& ScExternalDoubleRefToken::GetDoubleRef() const
{
return maDoubleRef;
}
-ComplRefData& ScExternalDoubleRefToken::GetDoubleRef()
+ScComplexRefData& ScExternalDoubleRefToken::GetDoubleRef()
{
return maDoubleRef;
}
@@ -1714,15 +1715,15 @@ BOOL ScTokenArray::ImplGetReference( ScRange& rRange, BOOL bValidOnly ) const
{
if ( pToken->GetType() == svSingleRef )
{
- const SingleRefData& rRef = ((const ScSingleRefToken*)pToken)->GetSingleRef();
+ const ScSingleRefData& rRef = ((const ScSingleRefToken*)pToken)->GetSingleRef();
rRange.aStart = rRange.aEnd = ScAddress( rRef.nCol, rRef.nRow, rRef.nTab );
bIs = !bValidOnly || !rRef.IsDeleted();
}
else if ( pToken->GetType() == svDoubleRef )
{
- const ComplRefData& rCompl = ((const ScDoubleRefToken*)pToken)->GetDoubleRef();
- const SingleRefData& rRef1 = rCompl.Ref1;
- const SingleRefData& rRef2 = rCompl.Ref2;
+ const ScComplexRefData& rCompl = ((const ScDoubleRefToken*)pToken)->GetDoubleRef();
+ const ScSingleRefData& rRef1 = rCompl.Ref1;
+ const ScSingleRefData& rRef2 = rCompl.Ref2;
rRange.aStart = ScAddress( rRef1.nCol, rRef1.nRow, rRef1.nTab );
rRange.aEnd = ScAddress( rRef2.nCol, rRef2.nRow, rRef2.nTab );
bIs = !bValidOnly || (!rRef1.IsDeleted() && !rRef2.IsDeleted());
@@ -2141,17 +2142,17 @@ ScToken* ScTokenArray::AddDouble( double fVal )
return Add( new ScDoubleToken( fVal ) );
}
-ScToken* ScTokenArray::AddSingleReference( const SingleRefData& rRef )
+ScToken* ScTokenArray::AddSingleReference( const ScSingleRefData& rRef )
{
return Add( new ScSingleRefToken( rRef ) );
}
-ScToken* ScTokenArray::AddMatrixSingleReference( const SingleRefData& rRef )
+ScToken* ScTokenArray::AddMatrixSingleReference( const ScSingleRefData& rRef )
{
return Add( new ScSingleRefOpToken( ocMatRef, rRef ) );
}
-ScToken* ScTokenArray::AddDoubleReference( const ComplRefData& rRef )
+ScToken* ScTokenArray::AddDoubleReference( const ScComplexRefData& rRef )
{
return Add( new ScDoubleRefToken( rRef ) );
}
@@ -2182,17 +2183,17 @@ ScToken* ScTokenArray::AddExternalName( sal_uInt16 nFileId, const String& rName
return Add( new ScExternalNameToken(nFileId, rName) );
}
-ScToken* ScTokenArray::AddExternalSingleReference( sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef )
+ScToken* ScTokenArray::AddExternalSingleReference( sal_uInt16 nFileId, const String& rTabName, const ScSingleRefData& rRef )
{
return Add( new ScExternalSingleRefToken(nFileId, rTabName, rRef) );
}
-ScToken* ScTokenArray::AddExternalDoubleReference( sal_uInt16 nFileId, const String& rTabName, const ComplRefData& rRef )
+ScToken* ScTokenArray::AddExternalDoubleReference( sal_uInt16 nFileId, const String& rTabName, const ScComplexRefData& rRef )
{
return Add( new ScExternalDoubleRefToken(nFileId, rTabName, rRef) );
}
-ScToken* ScTokenArray::AddColRowName( const SingleRefData& rRef )
+ScToken* ScTokenArray::AddColRowName( const ScSingleRefData& rRef )
{
return Add( new ScSingleRefOpToken( ocColRowName, rRef ) );
}
@@ -2260,7 +2261,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
{
case svSingleRef :
{
- SingleRefData& rRef = p->GetSingleRef();
+ ScSingleRefData& rRef = p->GetSingleRef();
rRef.CalcAbsIfRel( rPos );
switch ( eDir )
{
@@ -2303,7 +2304,7 @@ BOOL ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
break;
case svDoubleRef :
{
- ComplRefData& rRef = p->GetDoubleRef();
+ ScComplexRefData& rRef = p->GetDoubleRef();
rRef.CalcAbsIfRel( rPos );
switch ( eDir )
{
@@ -2455,7 +2456,7 @@ void ScTokenArray::ReadjustRelative3DReferences( const ScAddress& rOldPos,
{
case svDoubleRef :
{
- SingleRefData& rRef2 = pCode[j]->GetSingleRef2();
+ ScSingleRefData& rRef2 = pCode[j]->GetSingleRef2();
// Also adjust if the reference is of the form Sheet1.A2:A3
if ( rRef2.IsFlag3D() || pCode[j]->GetSingleRef().IsFlag3D() )
{
@@ -2466,7 +2467,7 @@ void ScTokenArray::ReadjustRelative3DReferences( const ScAddress& rOldPos,
//! fallthru
case svSingleRef :
{
- SingleRefData& rRef1 = pCode[j]->GetSingleRef();
+ ScSingleRefData& rRef1 = pCode[j]->GetSingleRef();
if ( rRef1.IsFlag3D() )
{
rRef1.CalcAbsIfRel( rOldPos );
diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx
index 4d6a98391588..477316b4c0fb 100644
--- a/sc/source/core/tool/unitconv.cxx
+++ b/sc/source/core/tool/unitconv.cxx
@@ -71,7 +71,7 @@ ScUnitConverterData::ScUnitConverterData( const ScUnitConverterData& r )
}
-DataObject* ScUnitConverterData::Clone() const
+ScDataObject* ScUnitConverterData::Clone() const
{
return new ScUnitConverterData( *this );
}
@@ -106,7 +106,7 @@ void ScUnitConverterData::BuildIndexString( String& rStr,
#define CFGSTR_UNIT_FACTOR "Factor"
ScUnitConverter::ScUnitConverter( USHORT nInit, USHORT nDeltaP ) :
- StrCollection( nInit, nDeltaP, FALSE )
+ ScStrCollection( nInit, nDeltaP, FALSE )
{
// read from configuration - "convert.ini" is no longer used
//! config item as member to allow change of values
diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx
index 3d89efc91a97..bc3537d1c94a 100644
--- a/sc/source/core/tool/userlist.cxx
+++ b/sc/source/core/tool/userlist.cxx
@@ -74,7 +74,7 @@ ScUserListData::ScUserListData(const String& rStr) :
}
ScUserListData::ScUserListData(const ScUserListData& rData) :
- DataObject(),
+ ScDataObject(),
aStr(rData.aStr)
{
InitTokens();
@@ -183,7 +183,7 @@ StringCompare ScUserListData::ICompare(const String& rSubStr1, const String& rSu
}
ScUserList::ScUserList(USHORT nLim, USHORT nDel) :
- Collection ( nLim, nDel )
+ ScCollection ( nLim, nDel )
{
using namespace ::com::sun::star;
@@ -249,7 +249,7 @@ ScUserList::ScUserList(USHORT nLim, USHORT nDel) :
}
}
-DataObject* ScUserList::Clone() const
+ScDataObject* ScUserList::Clone() const
{
return ( new ScUserList( *this ) );
}
diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx
index 29c114d2e400..fc891c864a79 100644
--- a/sc/source/filter/dif/difexp.cxx
+++ b/sc/source/filter/dif/difexp.cxx
@@ -47,8 +47,9 @@
#include "global.hxx"
#include "progress.hxx"
#include <rtl/tencinfo.h>
+#include "ftools.hxx"
-FltError ScExportDif( SvStream& rStream, ScDocument* pDoc,
+FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rStream, ScDocument* pDoc,
const ScAddress& rOutPos, const CharSet eNach, UINT32 nDifOption )
{
SCCOL nEndCol;
@@ -63,7 +64,7 @@ FltError ScExportDif( SvStream& rStream, ScDocument* pDoc,
}
-FltError ScExportDif( SvStream& rOut, ScDocument* pDoc,
+FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc,
const ScRange&rRange, const CharSet eCharSet, UINT32 nDifOption )
{
DBG_ASSERT( rRange.aStart <= rRange.aEnd, "*ScExportDif(): Range unsortiert!" );
diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx
index 110b74c6c0da..31fce4357007 100644
--- a/sc/source/filter/dif/difimp.cxx
+++ b/sc/source/filter/dif/difimp.cxx
@@ -45,6 +45,7 @@
#include "patattr.hxx"
#include "docpool.hxx"
#include "attrib.hxx"
+#include "ftools.hxx"
#include <math.h>
@@ -62,7 +63,7 @@ const sal_Unicode pKeyV[] = { 'V', 0 };
const sal_Unicode pKey1_0[] = { '1', ',', '0', 0 };
-FltError ScImportDif( SvStream& rIn, ScDocument* pDoc, const ScAddress& rInsPos,
+FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, const ScAddress& rInsPos,
const CharSet eVon, UINT32 nDifOption )
{
DifParser aDifParser( rIn, nDifOption, *pDoc, eVon );
diff --git a/sc/source/filter/dif/makefile.mk b/sc/source/filter/dif/makefile.mk
index 39dea144dff5..9d571c71fa9d 100644
--- a/sc/source/filter/dif/makefile.mk
+++ b/sc/source/filter/dif/makefile.mk
@@ -45,7 +45,6 @@ PROJECTPCHSOURCE=..\pch\filt_pch
.INCLUDE : scpre.mk
.INCLUDE : settings.mk
.INCLUDE : sc.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/excel/biffdump.cxx b/sc/source/filter/excel/biffdump.cxx
index 9501a7dab7f7..c3478cf8cb50 100644
--- a/sc/source/filter/excel/biffdump.cxx
+++ b/sc/source/filter/excel/biffdump.cxx
@@ -760,7 +760,7 @@ static void AddRef( ByteString& t, UINT16 nRow, UINT16 nC, BOOL bName, UINT16 nT
else
{
t += '=';
- t += GETSTR( ::ColToAlpha( nCol ) );
+ t += GETSTR( ::ScScColToAlpha( nCol ) );
}
t += ",R";
@@ -782,7 +782,7 @@ static void AddRef( ByteString& t, UINT16 nRow, UINT16 nC, BOOL bName, UINT16 nT
{
if( !bColRel )
t += '$';
- t += GETSTR( ::ColToAlpha( nCol ) );
+ t += GETSTR( ::ScColToAlpha( nCol ) );
if( !bRowRel )
t += '$';
__AddDec( t, (UINT16)(nRow + 1) );
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index f8a202ee3a62..811097183b1e 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -36,6 +36,7 @@
#include "scitems.hxx"
+#include <comphelper/processfactory.hxx>
#include <svx/svdobj.hxx>
#include <svx/svditer.hxx>
#include <svx/svdpage.hxx>
@@ -86,6 +87,10 @@
#include <math.h>
+#include <oox/core/tokens.hxx>
+
+using ::rtl::OString;
+
static String lcl_GetVbaTabName( SCTAB n )
{
String aRet( RTL_CONSTASCII_USTRINGPARAM( "__VBA__" ) );
@@ -94,6 +99,60 @@ static String lcl_GetVbaTabName( SCTAB n )
}
+static void lcl_AddBookviews( XclExpRecordList<>& aRecList, ExcTable& self )
+{
+ aRecList.AppendNewRecord( new XclExpXmlStartElementRecord( XML_bookViews ) );
+ aRecList.AppendNewRecord( new XclExpWindow1( self.GetRoot() ) );
+ aRecList.AppendNewRecord( new XclExpXmlEndElementRecord( XML_bookViews ) );
+}
+
+static void lcl_AddCalcPr( XclExpRecordList<>& aRecList, ExcTable& self )
+{
+ ScDocument& rDoc = self.GetDoc();
+
+ aRecList.AppendNewRecord( new XclExpXmlStartSingleElementRecord( XML_calcPr ) );
+ // OOXTODO: calcCompleted, calcId, calcMode, calcOnSave,
+ // concurrentCalc, concurrentManualCount,
+ // forceFullCalc, fullCalcOnLoad, fullPrecision
+ aRecList.AppendNewRecord( new XclCalccount( rDoc ) );
+ aRecList.AppendNewRecord( new XclRefmode( rDoc ) );
+ aRecList.AppendNewRecord( new XclIteration( rDoc ) );
+ aRecList.AppendNewRecord( new XclDelta( rDoc ) );
+ aRecList.AppendNewRecord( new ExcDummy8_02 );
+ aRecList.AppendNewRecord( new XclExpXmlEndSingleElementRecord() ); // XML_calcPr
+}
+
+#if 0
+// removed during rebase, because scsheetprotection02 is not yet up-stream :-(
+static void lcl_AddWorkbookProtection( XclExpRecordList<>& aRecList, ExcTable& self )
+{
+ aRecList.AppendNewRecord( new XclExpXmlStartSingleElementRecord( XML_workbookProtection ) );
+ const ScDocProtection* pProtect = self.GetDoc().GetDocProtection();
+ if (pProtect && pProtect->isProtected())
+ {
+ aRecList.AppendNewRecord( new XclExpWindowProtection(pProtect->isOptionEnabled(ScDocProtection::WINDOWS)) );
+ aRecList.AppendNewRecord( new XclExpProtection(pProtect->isOptionEnabled(ScDocProtection::STRUCTURE)) );
+ aRecList.AppendNewRecord( new XclExpPassHash(pProtect->getPasswordHash(PASSHASH_XL)) );
+ }
+
+ if( self.GetBiff() == EXC_BIFF8 )
+ {
+ aRecList.AppendNewRecord( new XclExpProt4Rev );
+ aRecList.AppendNewRecord( new XclExpProt4RevPass );
+ }
+ aRecList.AppendNewRecord( new XclExpXmlEndSingleElementRecord() ); // XML_workbookProtection
+}
+#endif
+
+static void lcl_AddScenariosAndFilters( XclExpRecordList<>& aRecList, ExcTable& self, SCTAB mnScTab )
+{
+ // Scenarios
+ aRecList.AppendNewRecord( new ExcEScenarioManager( self.GetDoc(), mnScTab ) );
+ // filter
+ aRecList.AppendRecord( self.GetFilterManager().CreateRecord( mnScTab ) );
+}
+
+
ExcTable::ExcTable( const XclExpRoot& rRoot ) :
XclExpRoot( rRoot ),
mnScTab( SCTAB_GLOBAL ),
@@ -187,7 +246,14 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
if( GetBiff() == EXC_BIFF8 )
Add( new ExcDummy8_040 );
- aRecList.AppendNewRecord( new XclExpWindow1( GetRoot() ) );
+ // document protection options
+ if( GetOutput() == EXC_OUTPUT_BINARY )
+ {
+ //lcl_AddWorkbookProtection( aRecList, *this );
+ lcl_AddBookviews( aRecList, *this );
+ }
+
+ Add( new XclExpXmlStartSingleElementRecord( XML_workbookPr ) );
if( GetBiff() <= EXC_BIFF5 )
{
@@ -200,13 +266,39 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
Add( new Exc1904( rDoc ) );
Add( new XclExpBoolRecord( 0x000E, !rDoc.GetDocOptions().IsCalcAsShown() ) );
Add( new ExcDummy8_041 );
+ // OOXTODO: The following /workbook/workbookPr attributes are mapped
+ // to various BIFF records that are not currently supported:
+ //
+ // XML_allowRefreshQuery: QSISTAG 802h: fEnableRefresh
+ // XML_autoCompressPictures: COMPRESSPICTURES 89Bh: fAutoCompressPictures
+ // XML_checkCompatibility: COMPAT12 88Ch: fNoCompatChk
+ // XML_codeName: "Calc"
+ // XML_defaultThemeVersion: ???
+ // XML_filterPrivacy: BOOKEXT 863h: fFilterPrivacy
+ // XML_hidePivotFieldList: BOOKBOOL DAh: fHidePivotTableFList
+ // XML_promptedSolutions: BOOKEXT 863h: fBuggedUserAboutSolution
+ // XML_publishItems: NAMEPUBLISH 893h: fPublished
+ // XML_saveExternalLinkValues: BOOKBOOL DAh: fNoSavSupp
+ // XML_showBorderUnselectedTables: BOOKBOOL DAh: fHideBorderUnsels
+ // XML_showInkAnnotation: BOOKEXT 863h: fShowInkAnnotation
+ // XML_showPivotChart: PIVOTCHARTBITS 859h: fGXHide??
+ // XML_updateLinks: BOOKBOOL DAh: grbitUpdateLinks
}
+ Add( new XclExpXmlEndSingleElementRecord() ); // XML_workbookPr
// Formatting: FONT, FORMAT, XF, STYLE, PALETTE
- aRecList.AppendRecord( CreateRecord( EXC_ID_FONTLIST ) );
- aRecList.AppendRecord( CreateRecord( EXC_ID_FORMATLIST ) );
- aRecList.AppendRecord( CreateRecord( EXC_ID_XFLIST ) );
- aRecList.AppendRecord( CreateRecord( EXC_ID_PALETTE ) );
+ if( GetOutput() != EXC_OUTPUT_BINARY )
+ {
+ aRecList.AppendNewRecord( new XclExpXmlStyleSheet( *this ) );
+ }
+ else
+ {
+ aRecList.AppendRecord( CreateRecord( EXC_ID_FONTLIST ) );
+ aRecList.AppendRecord( CreateRecord( EXC_ID_FORMATLIST ) );
+ aRecList.AppendRecord( CreateRecord( EXC_ID_XFLIST ) );
+ aRecList.AppendRecord( CreateRecord( EXC_ID_PALETTE ) );
+ }
+
if( GetBiff() <= EXC_BIFF5 )
{
@@ -235,7 +327,14 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
// Natural Language Formulas Flag
aRecList.AppendNewRecord( new XclExpBoolRecord( EXC_ID_USESELFS, GetDoc().GetDocOptions().IsLookUpColRowNames() ) );
+ if( GetOutput() != EXC_OUTPUT_BINARY )
+ {
+ //lcl_AddWorkbookProtection( aRecList, *this );
+ lcl_AddBookviews( aRecList, *this );
+ }
+
// Bundlesheet
+ aRecList.AppendNewRecord( new XclExpXmlStartElementRecord( XML_sheets ) );
for( nC = 0 ; nC < nScTabCount ; nC++ )
if( rTabInfo.IsExportTab( nC ) )
{
@@ -243,6 +342,7 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
aRecList.AppendRecord( xBoundsheet );
rBoundsheetList.AppendRecord( xBoundsheet );
}
+ aRecList.AppendNewRecord( new XclExpXmlEndElementRecord( XML_sheets ) );
for( SCTAB nAdd = 0; nC < static_cast<SCTAB>(nCodenames) ; nC++, nAdd++ )
{
@@ -258,6 +358,9 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
aRecList.AppendRecord( CreateRecord( EXC_ID_EXTERNSHEET ) );
aRecList.AppendRecord( CreateRecord( EXC_ID_NAME ) );
+ if( GetOutput() != EXC_OUTPUT_BINARY )
+ lcl_AddCalcPr( aRecList, *this );
+
// MSODRAWINGGROUP per-document data
Add( new XclMsodrawinggroup( rR, ESCHER_DggContainer ) );
// Shared string table: SST, EXTSST
@@ -286,6 +389,12 @@ void ExcTable::FillAsTable( size_t nCodeNameIdx )
// cell table: DEFROWHEIGHT, DEFCOLWIDTH, COLINFO, DIMENSIONS, ROW, cell records
mxCellTable.reset( new XclExpCellTable( GetRoot() ) );
+ if( GetOutput() != EXC_OUTPUT_BINARY )
+ {
+ FillAsXmlTable( nCodeNameIdx );
+ return;
+ }
+
// WSBOOL needs data from page settings, create it here, add it later
ScfRef< XclExpPageSettings > xPageSett( new XclExpPageSettings( GetRoot() ) );
@@ -299,11 +408,7 @@ void ExcTable::FillAsTable( size_t nCodeNameIdx )
else
{
Add( new ExcBof8 );
- Add( new XclCalccount( rDoc ) );
- Add( new XclRefmode( rDoc ) );
- Add( new XclIteration( rDoc ) );
- Add( new XclDelta( rDoc ) );
- Add( new ExcDummy8_02 );
+ lcl_AddCalcPr( aRecList, *this );
}
// GUTS (count & size of outline icons)
@@ -328,12 +433,7 @@ void ExcTable::FillAsTable( size_t nCodeNameIdx )
aRecList.AppendRecord( CreateRecord( EXC_ID_EXTERNSHEET ) );
if ( eBiff == EXC_BIFF8 )
- {
- // Scenarios
- Add( new ExcEScenarioManager( rDoc, mnScTab ) );
- // filter
- aRecList.AppendRecord( GetFilterManager().CreateRecord( mnScTab ) );
- }
+ lcl_AddScenariosAndFilters( aRecList, *this, mnScTab );
// cell table: DEFCOLWIDTH, COLINFO, DIMENSIONS, ROW, cell records
aRecList.AppendRecord( mxCellTable );
@@ -395,6 +495,94 @@ void ExcTable::FillAsTable( size_t nCodeNameIdx )
Add( new ExcEof );
}
+void ExcTable::FillAsXmlTable( size_t nCodeNameIdx )
+{
+ RootData& rR = GetOldRoot();
+
+ // WSBOOL needs data from page settings, create it here, add it later
+ ScfRef< XclExpPageSettings > xPageSett( new XclExpPageSettings( GetRoot() ) );
+ bool bFitToPages = xPageSett->GetPageData().mbFitToPages;
+
+ Add( new ExcBof8 );
+
+ Add( new XclExpWsbool( bFitToPages, mnScTab, &GetFilterManager() ) );
+
+ // GUTS (count & size of outline icons)
+ aRecList.AppendRecord( mxCellTable->CreateRecord( EXC_ID_GUTS ) );
+ // DEFROWHEIGHT, created by the cell table
+ aRecList.AppendRecord( mxCellTable->CreateRecord( EXC_ID2_DEFROWHEIGHT ) );
+
+ aRecList.AppendRecord( mxCellTable->CreateRecord( EXC_ID3_DIMENSIONS ) );
+
+ // sheet view settings: WINDOW2, SCL, PANE, SELECTION
+ aRecList.AppendNewRecord( new XclExpTabViewSettings( GetRoot(), mnScTab ) );
+
+ // cell table: DEFCOLWIDTH, COLINFO, DIMENSIONS, ROW, cell records
+ aRecList.AppendRecord( mxCellTable );
+
+ // label ranges
+ Add( new XclExpLabelranges( GetRoot() ) );
+
+ rR.pEscher->AddSdrPage();
+ //! close Escher group shape and ESCHER_DgContainer
+ //! opened by XclObjList ctor MSODRAWING
+ rR.pObjRecs->EndSheet();
+ // all MSODRAWING and OBJ stuff of this sheet goes here
+ Add( rR.pObjRecs );
+
+ // pivot tables
+ aRecList.AppendRecord( GetPivotTableManager().CreatePivotTablesRecord( mnScTab ) );
+
+ // list of NOTE records, generated by the cell table
+ XclExpRecordRef xNotes = mxCellTable->CreateRecord( EXC_ID_NOTE );
+ XclExpRecordList< XclExpNote >* xNoteList = dynamic_cast< XclExpRecordList< XclExpNote >* >( xNotes.get() );
+ if( xNoteList != NULL )
+ aRecList.AppendNewRecord( new XclExpComments( mnScTab, *xNoteList ) );
+
+ // web queries
+ Add( new XclExpWebQueryBuffer( GetRoot() ) );
+
+ lcl_AddScenariosAndFilters( aRecList, *this, mnScTab );
+
+ // MERGEDCELLS record, generated by the cell table
+ aRecList.AppendRecord( mxCellTable->CreateRecord( EXC_ID_MERGEDCELLS ) );
+
+ // conditional formats
+ Add( new XclExpCondFormatBuffer( GetRoot() ) );
+
+ if( HasVbaStorage() )
+ if( nCodeNameIdx < GetExtDocOptions().GetCodeNameCount() )
+ Add( new XclCodename( GetExtDocOptions().GetCodeName( nCodeNameIdx ) ) );
+
+ // data validation (DVAL and list of DV records), generated by the cell table
+ aRecList.AppendRecord( mxCellTable->CreateRecord( EXC_ID_DVAL ) );
+
+ // list of HLINK records, generated by the cell table
+ XclExpRecordRef xHyperlinks = mxCellTable->CreateRecord( EXC_ID_HLINK );
+ XclExpHyperlinkList* xHyperlinkList = dynamic_cast<XclExpHyperlinkList*>(xHyperlinks.get());
+ if( xHyperlinkList != NULL && !xHyperlinkList->IsEmpty() )
+ {
+ aRecList.AppendNewRecord( new XclExpXmlStartElementRecord( XML_hyperlinks ) );
+ aRecList.AppendRecord( xHyperlinks );
+ aRecList.AppendNewRecord( new XclExpXmlEndElementRecord( XML_hyperlinks ) );
+ }
+
+ aRecList.AppendRecord( xPageSett );
+
+ // change tracking
+ if( rR.pUserBViewList )
+ {
+ for( const XclExpUserBView* pBView = rR.pUserBViewList->First(); pBView; pBView = rR.pUserBViewList->Next() )
+ {
+ Add( new XclExpUsersViewBegin( pBView->GetGUID(), nExcTab ) );
+ Add( new XclExpUsersViewEnd );
+ }
+ }
+
+ // EOF
+ Add( new ExcEof );
+}
+
void ExcTable::FillAsEmptyTable( size_t nCodeNameIdx )
{
@@ -418,15 +606,43 @@ void ExcTable::FillAsEmptyTable( size_t nCodeNameIdx )
}
-void ExcTable::Write( XclExpStream& rStr )
+void ExcTable::Write( XclExpStream& rStrm )
{
SetCurrScTab( mnScTab );
if( mxCellTable.get() )
mxCellTable->Finalize();
- aRecList.Save( rStr );
+ aRecList.Save( rStrm );
}
+void ExcTable::WriteXml( XclExpXmlStream& rStrm )
+{
+ if (GetTabInfo().IsExportTab( mnScTab ) )
+ {
+ // worksheet export
+ String sSheetName = XclXmlUtils::GetStreamName( "xl/", "worksheets/sheet", mnScTab+1 );
+
+ sax_fastparser::FSHelperPtr pWorksheet = rStrm.GetStreamForPath( sSheetName );
+
+ rStrm.PushStream( pWorksheet );
+
+ pWorksheet->startElement( XML_worksheet,
+ XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ FSEND );
+ }
+
+ SetCurrScTab( mnScTab );
+ if( mxCellTable.get() )
+ mxCellTable->Finalize();
+ aRecList.SaveXml( rStrm );
+
+ if (GetTabInfo().IsExportTab( mnScTab ) )
+ {
+ rStrm.GetCurrentStream()->endElement( XML_worksheet );
+ rStrm.PopStream();
+ }
+}
ExcDocument::ExcDocument( const XclExpRoot& rRoot ) :
@@ -516,3 +732,50 @@ void ExcDocument::Write( SvStream& rSvStrm )
pExpChangeTrack->Write();
}
+void ExcDocument::WriteXml( SvStream& rStrm )
+{
+ if( !maTableList.IsEmpty() )
+ {
+ InitializeSave();
+
+ XclExpXmlStream aStrm( ::comphelper::getProcessServiceFactory(), rStrm, GetRoot() );
+
+ GetOldRoot().pEscher->GetStrm().Seek(0); // ready for take off
+
+ sax_fastparser::FSHelperPtr& rWorkbook = aStrm.GetCurrentStream();
+ rWorkbook->startElement( XML_workbook,
+ XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ FSNS(XML_xmlns, XML_r), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ FSEND );
+ rWorkbook->singleElement( XML_fileVersion,
+ XML_appName, "Calc",
+ // OOXTODO: XML_codeName
+ // OOXTODO: XML_lastEdited
+ // OOXTODO: XML_lowestEdited
+ // OOXTODO: XML_rupBuild
+ FSEND );
+
+ aHeader.WriteXml( aStrm );
+
+ for( size_t nTab = 0, nTabCount = maTableList.GetSize(); nTab < nTabCount; ++nTab )
+ {
+ // set current stream position in BOUNDSHEET record
+#if 0
+ ExcBoundsheetRef xBoundsheet = maBoundsheetList.GetRecord( nTab );
+ if( xBoundsheet.get() )
+ xBoundsheet->SetStreamPos( aXclStrm.GetSvStreamPos() );
+#endif
+ // write the table
+ maTableList.GetRecord( nTab )->WriteXml( aStrm );
+ }
+
+ rWorkbook->endElement( XML_workbook );
+ rWorkbook.reset();
+ aStrm.commit();
+ }
+#if 0
+ if( pExpChangeTrack )
+ pExpChangeTrack->WriteXml();
+#endif
+}
+
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index 753c3bc57d45..1a90817f99ae 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -54,7 +54,7 @@
#include "exp_op.hxx"
-FltError ScImportExcel( SfxMedium& rMedium, ScDocument* pDocument, const EXCIMPFORMAT eFormat )
+FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument* pDocument, const EXCIMPFORMAT eFormat )
{
// check the passed Calc document
DBG_ASSERT( pDocument, "::ScImportExcel - no document" );
@@ -196,18 +196,9 @@ FltError ScImportExcel( SfxMedium& rMedium, ScDocument* pDocument, const EXCIMPF
}
-FltError ScExportExcel5( SfxMedium& rMedium, ScDocument *pDocument,
- const BOOL bBiff8, CharSet eNach )
+static FltError lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument,
+ SvStream* pMedStrm, BOOL bBiff8, CharSet eNach )
{
- // check the passed Calc document
- DBG_ASSERT( pDocument, "::ScImportExcel - no document" );
- if( !pDocument ) return eERR_INTERN; // should not happen
-
- // check the output stream from medium
- SvStream* pMedStrm = rMedium.GetOutStream();
- DBG_ASSERT( pMedStrm, "::ScExportExcel5 - medium without output stream" );
- if( !pMedStrm ) return eERR_OPEN; // should not happen
-
// try to open an OLE storage
SotStorageRef xRootStrg = new SotStorage( pMedStrm, FALSE );
if( xRootStrg->GetError() ) return eERR_OPEN;
@@ -259,5 +250,44 @@ FltError ScExportExcel5( SfxMedium& rMedium, ScDocument *pDocument,
return eRet;
}
+static FltError lcl_ExportExcel2007Xml( SfxMedium& rMedium, ScDocument *pDocument,
+ SvStream* pMedStrm, CharSet eNach )
+{
+ SotStorageRef xRootStrg = (SotStorage*) 0;
+
+ XclExpRootData aExpData( EXC_BIFF8, rMedium, xRootStrg, *pDocument, eNach );
+ aExpData.meOutput = EXC_OUTPUT_XML_2007;
+
+ ExportXml2007 aFilter( aExpData, *pMedStrm );
+
+ FltError eRet = aFilter.Write();
+
+ return eRet;
+}
+
+FltError ScFormatFilterPluginImpl::ScExportExcel5( SfxMedium& rMedium, ScDocument *pDocument,
+ ExportFormatExcel eFormat, CharSet eNach )
+{
+ if( eFormat != ExpBiff5 && eFormat != ExpBiff8 && eFormat != Exp2007Xml )
+ return eERR_NI;
+
+ // check the passed Calc document
+ DBG_ASSERT( pDocument, "::ScImportExcel - no document" );
+ if( !pDocument ) return eERR_INTERN; // should not happen
+
+ // check the output stream from medium
+ SvStream* pMedStrm = rMedium.GetOutStream();
+ DBG_ASSERT( pMedStrm, "::ScExportExcel5 - medium without output stream" );
+ if( !pMedStrm ) return eERR_OPEN; // should not happen
+
+ FltError eRet = eERR_UNKN_BIFF;
+ if( eFormat == ExpBiff5 || eFormat == ExpBiff8 )
+ eRet = lcl_ExportExcelBiff( rMedium, pDocument, pMedStrm, eFormat == ExpBiff8, eNach );
+ else if( eFormat == Exp2007Xml )
+ eRet = lcl_ExportExcel2007Xml( rMedium, pDocument, pMedStrm, eNach );
+
+ return eRet;
+}
+
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index 56377ff6ead3..13d94d9f2587 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -216,8 +216,8 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
const BOOL bSharedFormula = eFT == FT_SharedFormula;
const BOOL bRNorSF = bRangeName || bSharedFormula;
- SingleRefData aSRD;
- ComplRefData aCRD;
+ ScSingleRefData aSRD;
+ ScComplexRefData aCRD;
ExtensionTypeVec aExtensions;
bExternName = FALSE;
@@ -577,8 +577,8 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
{
UINT16 nRowFirst, nRowLast;
UINT8 nColFirst, nColLast;
- SingleRefData& rSRef1 = aCRD.Ref1;
- SingleRefData& rSRef2 = aCRD.Ref2;
+ ScSingleRefData& rSRef1 = aCRD.Ref1;
+ ScSingleRefData& rSRef2 = aCRD.Ref2;
aIn >> nRowFirst >> nRowLast >> nColFirst >> nColLast;
@@ -819,8 +819,8 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
if( nExtSheet <= 0 )
{// in aktuellem Workbook
// erster Teil des Bereichs
- SingleRefData& rR1 = aCRD.Ref1;
- SingleRefData& rR2 = aCRD.Ref2;
+ ScSingleRefData& rR1 = aCRD.Ref1;
+ ScSingleRefData& rR2 = aCRD.Ref2;
rR1.nTab = static_cast<SCTAB>(nTabFirst);
rR2.nTab = static_cast<SCTAB>(nTabLast);
@@ -917,8 +917,8 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
const BOOL bSharedFormula = eFT == FT_SharedFormula;
const BOOL bRNorSF = bRangeName || bSharedFormula;
- SingleRefData aSRD;
- ComplRefData aCRD;
+ ScSingleRefData aSRD;
+ ScComplexRefData aCRD;
aCRD.Ref1.nTab = aCRD.Ref2.nTab = aEingPos.Tab();
bExternName = FALSE;
@@ -1080,8 +1080,8 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
{
UINT16 nRowFirst, nRowLast;
UINT8 nColFirst, nColLast;
- SingleRefData &rSRef1 = aCRD.Ref1;
- SingleRefData &rSRef2 = aCRD.Ref2;
+ ScSingleRefData &rSRef1 = aCRD.Ref1;
+ ScSingleRefData &rSRef2 = aCRD.Ref2;
aIn >> nRowFirst >> nRowLast >> nColFirst >> nColLast;
@@ -1272,8 +1272,8 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
if( nExtSheet <= 0 )
{// in aktuellem Workbook
// erster Teil des Bereichs
- SingleRefData &rR1 = aCRD.Ref1;
- SingleRefData &rR2 = aCRD.Ref2;
+ ScSingleRefData &rR1 = aCRD.Ref1;
+ ScSingleRefData &rR2 = aCRD.Ref2;
rR1.nTab = static_cast<SCTAB>(nTabFirst);
rR2.nTab = static_cast<SCTAB>(nTabLast);
@@ -1634,7 +1634,7 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCo
}
-void ExcelToSc::ExcRelToScRel( UINT16 nRow, UINT8 nCol, SingleRefData &rSRD, const BOOL bName )
+void ExcelToSc::ExcRelToScRel( UINT16 nRow, UINT8 nCol, ScSingleRefData &rSRD, const BOOL bName )
{
if( bName )
{
@@ -1847,9 +1847,9 @@ void ExcelToSc::SetError( ScFormulaCell &rCell, const ConvErr eErr )
}
-void ExcelToSc::SetComplCol( ComplRefData &rCRD )
+void ExcelToSc::SetComplCol( ScComplexRefData &rCRD )
{
- SingleRefData &rSRD = rCRD.Ref2;
+ ScSingleRefData &rSRD = rCRD.Ref2;
if( rSRD.IsColRel() )
rSRD.nRelCol = MAXCOL - aEingPos.Col();
else
@@ -1857,9 +1857,9 @@ void ExcelToSc::SetComplCol( ComplRefData &rCRD )
}
-void ExcelToSc::SetComplRow( ComplRefData &rCRD )
+void ExcelToSc::SetComplRow( ScComplexRefData &rCRD )
{
- SingleRefData &rSRD = rCRD.Ref2;
+ ScSingleRefData &rSRD = rCRD.Ref2;
if( rSRD.IsRowRel() )
rSRD.nRelRow = MAXROW - aEingPos.Row();
else
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index 88c9c798bb0f..d59618ef35ac 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -110,8 +110,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
const BOOL bSharedFormula = eFT == FT_SharedFormula;
const BOOL bRNorSF = bRangeName || bSharedFormula;
- SingleRefData aSRD;
- ComplRefData aCRD;
+ ScSingleRefData aSRD;
+ ScComplexRefData aCRD;
ExtensionTypeVec aExtensions;
if( eStatus != ConvOK )
@@ -488,8 +488,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
{
UINT16 nRowFirst, nRowLast;
UINT16 nColFirst, nColLast;
- SingleRefData &rSRef1 = aCRD.Ref1;
- SingleRefData &rSRef2 = aCRD.Ref2;
+ ScSingleRefData &rSRef1 = aCRD.Ref1;
+ ScSingleRefData &rSRef2 = aCRD.Ref2;
aIn >> nRowFirst >> nRowLast >> nColFirst >> nColLast;
@@ -783,9 +783,9 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
aPool >> aStack;
break;
}
+ ScSingleRefData &rR1 = aCRD.Ref1;
+ ScSingleRefData &rR2 = aCRD.Ref2;
- SingleRefData &rR1 = aCRD.Ref1;
- SingleRefData &rR2 = aCRD.Ref2;
rR1.nTab = nTabFirst;
rR2.nTab = nTabLast;
@@ -880,8 +880,8 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
const BOOL bSharedFormula = eFT == FT_SharedFormula;
const BOOL bRNorSF = bRangeName || bSharedFormula;
- SingleRefData aSRD;
- ComplRefData aCRD;
+ ScSingleRefData aSRD;
+ ScComplexRefData aCRD;
bExternName = FALSE;
@@ -1011,8 +1011,8 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
{
UINT16 nRowFirst, nRowLast;
UINT16 nColFirst, nColLast;
- SingleRefData &rSRef1 = aCRD.Ref1;
- SingleRefData &rSRef2 = aCRD.Ref2;
+ ScSingleRefData &rSRef1 = aCRD.Ref1;
+ ScSingleRefData &rSRef2 = aCRD.Ref2;
aIn >> nRowFirst >> nRowLast >> nColFirst >> nColLast;
@@ -1160,8 +1160,8 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa
SCTAB nFirstScTab, nLastScTab;
if( rLinkMan.GetScTabRange( nFirstScTab, nLastScTab, nIxti ) )
{
- SingleRefData &rR1 = aCRD.Ref1;
- SingleRefData &rR2 = aCRD.Ref2;
+ ScSingleRefData &rR1 = aCRD.Ref1;
+ ScSingleRefData &rR2 = aCRD.Ref2;
rR1.nTab = nFirstScTab;
rR2.nTab = nLastScTab;
@@ -1221,7 +1221,7 @@ ConvErr ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStrea
sal_uInt8 nOp, nByte;
bool bError = false;
- SingleRefData aSRD;
+ ScSingleRefData aSRD;
ComplRefData aCRD;
if (eStatus != ConvOK)
@@ -1311,8 +1311,8 @@ ConvErr ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStrea
// area reference
sal_uInt16 nExtTab1, nExtTab2, nRow1, nRow2, nGrbitCol1, nGrbitCol2;
rStrm >> nExtTab1 >> nExtTab2 >> nRow1 >> nRow2 >> nGrbitCol1 >> nGrbitCol2;
- SingleRefData& rR1 = aCRD.Ref1;
- SingleRefData& rR2 = aCRD.Ref2;
+ ScSingleRefData& rR1 = aCRD.Ref1;
+ ScSingleRefData& rR2 = aCRD.Ref2;
rR1.nTab = nExtTab1;
rR1.SetFlag3D(true);
@@ -1360,7 +1360,7 @@ ConvErr ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStrea
return eRet;
}
-void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, SingleRefData &rSRD, const BOOL bName )
+void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, ScSingleRefData &rSRD, const BOOL bName )
{
const BOOL bColRel = ( nC & 0x4000 ) != 0;
const BOOL bRowRel = ( nC & 0x8000 ) != 0;
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 80074fece62f..421bdd669480 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -98,8 +98,12 @@
#include "xcl97rec.hxx"
+#include <oox/core/tokens.hxx>
+
+using ::rtl::OString;
+
//--------------------------------------------------------- class ExcDummy_00 -
const BYTE ExcDummy_00::pMyData[] = {
0xe1, 0x00, 0x00, 0x00, // INTERFACEHDR
@@ -396,13 +400,22 @@ UINT16 Exc1904::GetNum( void ) const
}
+void Exc1904::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.WriteAttributes(
+ XML_date1904, XclXmlUtils::ToPsz( bVal ),
+ FSEND );
+}
+
+
//------------------------------------------------------ class ExcBundlesheet -
-ExcBundlesheetBase::ExcBundlesheetBase( RootData& rRootData, SCTAB nTab ) :
+ExcBundlesheetBase::ExcBundlesheetBase( RootData& rRootData, SCTAB nTabNum ) :
nStrPos( STREAM_SEEK_TO_END ),
nOwnPos( STREAM_SEEK_TO_END ),
- nGrbit( rRootData.pER->GetTabInfo().IsVisibleTab( nTab ) ? 0x0000 : 0x0001 )
+ nGrbit( rRootData.pER->GetTabInfo().IsVisibleTab( nTabNum ) ? 0x0000 : 0x0001 ),
+ nTab( nTabNum )
{
}
@@ -410,7 +423,8 @@ ExcBundlesheetBase::ExcBundlesheetBase( RootData& rRootData, SCTAB nTab ) :
ExcBundlesheetBase::ExcBundlesheetBase() :
nStrPos( STREAM_SEEK_TO_END ),
nOwnPos( STREAM_SEEK_TO_END ),
- nGrbit( 0x0000 )
+ nGrbit( 0x0000 ),
+ nTab( SCTAB_GLOBAL )
{
}
@@ -430,10 +444,10 @@ UINT16 ExcBundlesheetBase::GetNum( void ) const
-ExcBundlesheet::ExcBundlesheet( RootData& rRootData, SCTAB nTab ) :
- ExcBundlesheetBase( rRootData, nTab )
+ExcBundlesheet::ExcBundlesheet( RootData& rRootData, SCTAB _nTab ) :
+ ExcBundlesheetBase( rRootData, _nTab )
{
- String sTabName = rRootData.pER->GetTabInfo().GetScTabName( nTab );
+ String sTabName = rRootData.pER->GetTabInfo().GetScTabName( _nTab );
DBG_ASSERT( sTabName.Len() < 256, "ExcBundlesheet::ExcBundlesheet - table name too long" );
aName = ByteString( sTabName, rRootData.pER->GetTextEncoding() );
}
@@ -483,13 +497,37 @@ void XclExpCountry::WriteBody( XclExpStream& rStrm )
// XclExpWsbool ===============================================================
-XclExpWsbool::XclExpWsbool( bool bFitToPages ) :
- XclExpUInt16Record( EXC_ID_WSBOOL, EXC_WSBOOL_DEFAULTFLAGS )
+XclExpWsbool::XclExpWsbool( bool bFitToPages, SCTAB nScTab, XclExpFilterManager* pManager )
+ : XclExpUInt16Record( EXC_ID_WSBOOL, EXC_WSBOOL_DEFAULTFLAGS )
+ , mnScTab( nScTab )
+ , mpManager( pManager )
{
if( bFitToPages )
SetValue( GetValue() | EXC_WSBOOL_FITTOPAGE );
}
+void XclExpWsbool::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_sheetPr,
+ // OOXTODO: XML_syncHorizontal,
+ // OOXTODO: XML_syncVertical,
+ // OOXTODO: XML_syncRef,
+ // OOXTODO: XML_transitionEvaluation,
+ // OOXTODO: XML_transitionEntry,
+ // OOXTODO: XML_published,
+ // OOXTODO: XML_codeName,
+ XML_filterMode, mpManager ? XclXmlUtils::ToPsz( mpManager->HasFilterMode( mnScTab ) ) : NULL,
+ // OOXTODO: XML_enableFormatConditionsCalculation,
+ FSEND );
+ // OOXTODO: elements XML_tabColor, XML_outlinePr
+ rWorksheet->singleElement( XML_pageSetUpPr,
+ // OOXTODO: XML_autoPageBreaks,
+ XML_fitToPage, XclXmlUtils::ToPsz( GetValue() & EXC_WSBOOL_FITTOPAGE ),
+ FSEND );
+ rWorksheet->endElement( XML_sheetPr );
+}
+
// XclExpWindowProtection ===============================================================
@@ -498,6 +536,13 @@ XclExpWindowProtection::XclExpWindowProtection(bool bValue) :
{
}
+void XclExpWindowProtection::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.WriteAttributes(
+ XML_lockWindows, XclXmlUtils::ToPsz( GetBool() ),
+ FSEND );
+}
+
// XclExpDocProtection ===============================================================
XclExpDocProtection::XclExpDocProtection(bool bValue) :
@@ -571,6 +616,43 @@ void ExcFilterCondition::Save( XclExpStream& rStrm )
}
}
+static const char* lcl_GetOperator( UINT8 nOper )
+{
+ switch( nOper )
+ {
+ case EXC_AFOPER_EQUAL: return "equal";
+ case EXC_AFOPER_GREATER: return "greaterThan";
+ case EXC_AFOPER_GREATEREQUAL: return "greaterThanOrEqual";
+ case EXC_AFOPER_LESS: return "lessThan";
+ case EXC_AFOPER_LESSEQUAL: return "lessThanOrEqual";
+ case EXC_AFOPER_NOTEQUAL: return "notEqual";
+ case EXC_AFOPER_NONE:
+ default: return "**none**";
+ }
+}
+
+static OString lcl_GetValue( UINT8 nType, double fVal, XclExpString* pStr )
+{
+ switch( nType )
+ {
+ case EXC_AFTYPE_STRING: return XclXmlUtils::ToOString( *pStr );
+ case EXC_AFTYPE_DOUBLE: return OString::valueOf( fVal );
+ case EXC_AFTYPE_BOOLERR: return OString::valueOf( (sal_Int32) ( fVal != 0 ? 1 : 0 ) );
+ default: return OString();
+ }
+}
+
+void ExcFilterCondition::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( IsEmpty() )
+ return;
+
+ rStrm.GetCurrentStream()->singleElement( XML_customFilter,
+ XML_operator, lcl_GetOperator( nOper ),
+ XML_val, lcl_GetValue( nType, fVal, pText ).getStr(),
+ FSEND );
+}
+
void ExcFilterCondition::SaveText( XclExpStream& rStrm )
{
if( nType == EXC_AFTYPE_STRING )
@@ -695,6 +777,40 @@ void XclExpAutofilter::WriteBody( XclExpStream& rStrm )
aCond[ 1 ].SaveText( rStrm );
}
+void XclExpAutofilter::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( !HasCondition() )
+ return;
+
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+
+ rWorksheet->startElement( XML_filterColumn,
+ XML_colId, OString::valueOf( (sal_Int32) nCol ).getStr(),
+ // OOXTODO: XML_hiddenButton, AutoFilter12 fHideArrow?
+ // OOXTODO: XML_showButton,
+ FSEND );
+
+ if( HasTop10() )
+ {
+ rWorksheet->singleElement( XML_top10,
+ XML_top, XclXmlUtils::ToPsz( get_flag( nFlags, EXC_AFFLAG_TOP10TOP ) ),
+ XML_percent, XclXmlUtils::ToPsz( get_flag( nFlags, EXC_AFFLAG_TOP10PERC ) ),
+ XML_val, OString::valueOf( (sal_Int32) (nFlags >> 7 ) ).getStr(),
+ // OOXTODO: XML_filterVal,
+ FSEND );
+ }
+
+ rWorksheet->startElement( XML_customFilters,
+ XML_and, XclXmlUtils::ToPsz( (nFlags & EXC_AFFLAG_ANDORMASK) == EXC_AFFLAG_AND ),
+ FSEND );
+ aCond[ 0 ].SaveXml( rStrm );
+ aCond[ 1 ].SaveXml( rStrm );
+ rWorksheet->endElement( XML_customFilters );
+ // OOXTODO: XLM_colorFilter, XML_dynamicFilter,
+ // XML_extLst, XML_filters, XML_iconFilter, XML_top10
+ rWorksheet->endElement( XML_filterColumn );
+}
+
// ----------------------------------------------------------------------------
ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) :
@@ -735,6 +851,8 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) :
aParam.nCol2, aParam.nRow2, aParam.nTab );
SCCOL nColCnt = aParam.nCol2 - aParam.nCol1 + 1;
+ maRef = aRange;
+
// #i2394# #100489# built-in defined names must be sorted by containing sheet name
rNameMgr.InsertBuiltInName( EXC_BUILTIN_FILTERDATABASE, aRange );
@@ -854,6 +972,25 @@ void ExcAutoFilterRecs::Save( XclExpStream& rStrm )
maFilterList.Save( rStrm );
}
+void ExcAutoFilterRecs::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( maFilterList.IsEmpty() )
+ return;
+
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_autoFilter,
+ XML_ref, XclXmlUtils::ToOString( maRef ).getStr(),
+ FSEND );
+ // OOXTODO: XML_extLst, XML_sortState
+ maFilterList.SaveXml( rStrm );
+ rWorksheet->endElement( XML_autoFilter );
+}
+
+bool ExcAutoFilterRecs::HasFilterMode() const
+{
+ return pFilterMode != NULL;
+}
+
// ----------------------------------------------------------------------------
XclExpFilterManager::XclExpFilterManager( const XclExpRoot& rRoot ) :
@@ -878,5 +1015,16 @@ XclExpRecordRef XclExpFilterManager::CreateRecord( SCTAB nScTab )
return xRec;
}
+bool XclExpFilterManager::HasFilterMode( SCTAB nScTab )
+{
+ XclExpTabFilterRef xRec;
+ XclExpTabFilterMap::iterator aIt = maFilterMap.find( nScTab );
+ if( aIt != maFilterMap.end() )
+ {
+ return aIt->second->HasFilterMode();
+ }
+ return false;
+}
+
// ============================================================================
diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx
index be145e52a9a2..11400ca20742 100644
--- a/sc/source/filter/excel/exctools.cxx
+++ b/sc/source/filter/excel/exctools.cxx
@@ -52,11 +52,11 @@
#include "rangenam.hxx"
#include "editutil.hxx"
+#include "excrecds.hxx"
#include "root.hxx"
#include "imp_op.hxx"
#include "excimp8.hxx"
#include "otlnbuff.hxx"
-#include "excrecds.hxx"
#include "xcl97rec.hxx"
#include "formel.hxx"
#include "xilink.hxx"
diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx
index 5d7ee8c115c5..165a6db5fdc2 100644
--- a/sc/source/filter/excel/expop2.cxx
+++ b/sc/source/filter/excel/expop2.cxx
@@ -45,8 +45,8 @@
#include "scextopt.hxx"
#include "root.hxx"
-#include "exp_op.hxx"
#include "excdoc.hxx"
+#include "exp_op.hxx"
#include "xcl97esc.hxx"
@@ -155,3 +155,75 @@ ExportBiff8::~ExportBiff8()
}
+ExportXml2007::ExportXml2007( XclExpRootData& rExpData, SvStream& rStrm )
+ : ExportTyp( rStrm, &rExpData.mrDoc, rExpData.meTextEnc )
+ , XclExpRoot( rExpData )
+{
+ pExcRoot = &GetOldRoot();
+ pExcRoot->pER = this;
+ pExcRoot->eDateiTyp = Biff8;
+ pExcRoot->pEscher = new XclEscher( *pExcRoot->pER, GetDoc().GetTableCount() );
+ pExcDoc = new ExcDocument( *this );
+}
+
+
+ExportXml2007::~ExportXml2007()
+{
+ delete pExcRoot->pEscher;
+ pExcRoot->pEscher = NULL;
+
+ delete pExcDoc;
+}
+
+
+FltError ExportXml2007::Write()
+{
+ SfxObjectShell* pDocShell = GetDocShell();
+ DBG_ASSERT( pDocShell, "ExportXml2007::Write - no document shell" );
+
+ SotStorageRef xRootStrg = GetRootStorage();
+ DBG_ASSERT( xRootStrg.Is(), "ExportXml2007::Write - no root storage" );
+
+ bool bWriteBasicCode = false;
+ bool bWriteBasicStrg = false;
+
+ if( SvtFilterOptions* pFilterOpt = SvtFilterOptions::Get() )
+ {
+ bWriteBasicCode = pFilterOpt->IsLoadExcelBasicCode();
+ bWriteBasicStrg = pFilterOpt->IsLoadExcelBasicStorage();
+ }
+
+ if( pDocShell && xRootStrg.Is() && bWriteBasicStrg )
+ {
+ SvxImportMSVBasic aBasicImport( *pDocShell, *xRootStrg, bWriteBasicCode, bWriteBasicStrg );
+ ULONG nErr = aBasicImport.SaveOrDelMSVBAStorage( TRUE, EXC_STORAGE_VBA_PROJECT );
+ if( nErr != ERRCODE_NONE )
+ pDocShell->SetError( nErr );
+ }
+
+ pExcDoc->ReadDoc(); // ScDoc -> ExcDoc
+ pExcDoc->WriteXml( aOut ); // wechstreamen
+
+ if( pDocShell && xRootStrg.Is() )
+ {
+ using namespace ::com::sun::star;
+ uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
+ pDocShell->GetModel(), uno::UNO_QUERY_THROW);
+ uno::Reference<document::XDocumentProperties> xDocProps
+ = xDPS->getDocumentProperties();
+ ::boost::shared_ptr<GDIMetaFile> pMetaFile =
+ pDocShell->GetPreviewMetaFile (sal_False);
+ uno::Sequence<sal_uInt8> metaFile(
+ sfx2::convertMetaFile(pMetaFile.get()));
+ sfx2::SaveOlePropertySet(xDocProps, xRootStrg, &metaFile);
+ }
+
+ //! TODO: separate warnings for columns and sheets
+ const XclExpAddressConverter& rAddrConv = GetAddressConverter();
+ if( rAddrConv.IsColTruncated() || rAddrConv.IsRowTruncated() || rAddrConv.IsTabTruncated() )
+ return SCWARN_EXPORT_MAXROW;
+
+ return eERR_OK;
+}
+
+
diff --git a/sc/source/filter/excel/frmbase.cxx b/sc/source/filter/excel/frmbase.cxx
index d4899bf29fac..db50598d30b6 100644
--- a/sc/source/filter/excel/frmbase.cxx
+++ b/sc/source/filter/excel/frmbase.cxx
@@ -81,7 +81,7 @@ _ScRangeListTabs::~_ScRangeListTabs()
}
-void _ScRangeListTabs::Append( SingleRefData a, const BOOL b )
+void _ScRangeListTabs::Append( ScSingleRefData a, const BOOL b )
{
if( b )
{
@@ -113,7 +113,7 @@ void _ScRangeListTabs::Append( SingleRefData a, const BOOL b )
}
-void _ScRangeListTabs::Append( ComplRefData a, const BOOL b )
+void _ScRangeListTabs::Append( ScComplexRefData a, const BOOL b )
{
if( b )
{
diff --git a/sc/source/filter/excel/makefile.mk b/sc/source/filter/excel/makefile.mk
index ee51c4889ff7..c7bd6dbef677 100644
--- a/sc/source/filter/excel/makefile.mk
+++ b/sc/source/filter/excel/makefile.mk
@@ -45,7 +45,6 @@ PROJECTPCHSOURCE=..\pch\filt_pch
.INCLUDE : scpre.mk
.INCLUDE : settings.mk
.INCLUDE : sc.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/excel/ooxml-export-TODO.txt b/sc/source/filter/excel/ooxml-export-TODO.txt
new file mode 100644
index 000000000000..5b04efb97007
--- /dev/null
+++ b/sc/source/filter/excel/ooxml-export-TODO.txt
@@ -0,0 +1,148 @@
+TODO/Unimplemented Calc OOXML Export Features:
+=============================================
+
+Partially implemented features are not mentioned here; grep for OOXTODO within
+sc/source/filter/*.
+
+In updated OfficeFileFormatsProtocols.zip [MS-XLS].pdf,
+Section §2.3.1 (p.154) provides the record name :: record number mapping, and
+Section §2.3.2 (p.165) provides the record number :: record name mapping.
+
+Elements:
+ - Workbook (§3.2):
+ - customWorkbookViews (§3.2.3)
+ - ext (§3.2.7)
+ - externalReference (§3.2.8)
+ - externalReferences (§3.2.9)
+ - extLst (§3.2.10)
+ - fileRecoveryPr (§3.2.11) [ CRASHRECERR? 865h ]
+ - fileSharing (§3.2.12) [ FILESHARING 5Bh ]
+ - functionGroup (§3.2.14) [ FNGRP12 898h; FNGROUPNAME 9Ah ]
+ - functionGroups (§3.2.15) [ FNGROUPCOUNT: 9Ch ]
+ - oleSize (§3.2.16) [ OLESIZE DEh ]
+ - smartTagPr (§3.2.21) [ BOOKEXT 863h ]
+ - smartTagType (§3.2.22) [ unknown record ]
+ - smartTagTypes (§3.2.23) [ unknown record ]
+ - webPublishing (§3.2.24) [ WOPT 80Bh ]
+ - webPublishObject (§3.2.25) [ WEBPUB 801h ]
+ - webPublishObjects (§3.2.26) [ unsupported ]
+ - Worksheets (§3.3.1):
+ - autoFilter (§3.3.1.1) [ AutoFilter 9Eh ]
+ - cellSmartTag (§3.3.1.4) [ FEAT 868h ]
+ - cellSmartTagPr (§3.3.1.5) [ FEAT? 868h ]
+ - cellSmartTags (§3.3.1.6) [ FEAT 868h ]
+ - cellWatch (§3.3.1.7) [ CELLWATCH 86Ch ]
+ - cellWatches (§3.3.1.8) [ CELLWATCH 86Ch ]
+ - cfRule (§3.3.1.9) [ CF 1B1h ]
+ - cfvo (§3.3.1.10) [ CF12 87Ah ]
+ - chartsheet (§3.3.1.11) [ CHARTFRTINFO 850h, FRTWRAPPER 851h...]
+ - color (§3.3.1.14) [ DXF 88Dh xfpropBorder?
+ XFEXT 87Dh xclrType? ]
+ - colorScale (§3.3.1.15) [ DXF 88Dh? ]
+ - control (§3.3.1.18) [ ??? ]
+ - controls (§3.3.1.19) [ ??? ]
+ - customPr (§3.3.1.20) [ ??? ]
+ - customProperties (§3.3.1.21) [ ??? ]
+ - customSheetView (§3.3.1.22) [ ???; for charts; see chartsheet? ]
+ - customSheetView (§3.3.1.23) [ ??? ]
+ - customSheetViews (§3.3.1.24) [ ???; for charts; see chartsheet? ]
+ - customSheetViews (§3.3.1.25) [ ??? ]
+ - dataBar (§3.3.1.26) [ CF12 87Ah ct=Databar ]
+ - dataConsolidate (§3.3.1.27) [ DCON 50h ]
+ - dataRef (§3.3.1.28) [ DCONBIN 1B5h ]
+ - dataRefs (§3.3.1.29) [ ??? ]
+ - dialogsheet (§3.3.1.32) [ ??? ]
+ - drawing (§3.3.1.34) [ ??? ]
+ - evenFooter (§3.3.1.35) [ HeaderFooter 89Ch ]
+ - evenHeader (§3.3.1.36) [ HeaderFooter 89Ch ]
+ - firstFooter (§3.3.1.38) [ HeaderFooter 89Ch ]
+ - firstHeader (§3.3.1.39) [ HeaderFooter 89Ch ]
+ - formula (§3.3.1.40) [ CF 1B1h ]
+ - iconSet (§3.3.1.46) [ CF12 87Ah ct=CFMultistate ]
+ - ignoredError (§3.3.1.47) [ Feat/FeatForumulaErr2/FFErrorCheck 868h ]
+ - ignoredErrors (§3.3.1.48) [ Feat 868h ]
+ - legacyDrawing (§3.3.1.51) [ MsoDrawing ECh ]
+ - legacyDrawingHF (§3.3.1.52) [ ??? ]
+ - oleObject (§3.3.1.57) [ ??? ]
+ - oleObjects (§3.3.1.58) [ ??? ]
+ - outlinePr (§3.3.1.59) [ ??? ]
+ - pageSetup (§3.3.1.62) [ ???; for charts; see chartsheet? ]
+ - picture (§3.3.1.65) [ BkHim E9h; see XclExpBitmap ]
+ - pivotArea (§3.3.1.66) [ ??? ]
+ - pivotSelection (§3.3.1.67) [ ??? ]
+ - protectedRange (§3.3.1.69) [ ??? ]
+ - protectedRanges (§3.3.1.70) [ ??? ]
+ - sheetCalcPr (§3.3.1.76) [ REFRESHALL?? ]
+ - sheetFormatPr (§3.3.1.78) [ lots of records? ]
+ @defaultColWidth: DefColWidth
+ @defaultRowHeight: DEFROWHEIGHT
+ @baseColWidth: ColInfo/coldx?
+ @customHeight: ColInfo/fUserSet?
+ @zeroHeight: ColInfo/fHidden?
+ @thickTop: ?
+ @thickBottom: ?
+ @outlineLevelRow: ?
+ @outlineLevelCol: ColInfo/iOutLevel?
+ - sheetPr (§3.3.1.80) [ ??? ; for charts ]
+ - sheetView (§3.3.1.84) [ ??? ; for charts ]
+ - sheetViews (§3.3.1.86) [ ??? ; for charts ]
+ - smartTags (§3.3.1.87) [ FEAT 868h; isf=ISFFACTOID ]
+ - sortCondition (§3.3.1.88) [ SortData 895h? ]
+ - sortState (§3.3.1.89) [ Sort 90h ]
+ - tabColor (§3.3.1.90) [ SheetExt 862h ]
+ - tablePart (§3.3.1.91) [ ??? ]
+ - tableParts (§3.3.1.92) [ ??? ]
+ - webPublishItem (§3.3.1.94) [ WebPub 801h ]
+ - webPublishItems (§3.3.1.95)
+ - AutoFilter Settings (§3.3.2):
+ - colorFilter (§3.3.2.1) [ AutoFilter12 87Eh,
+ DXFN12NoCB struct ]
+ - dateGroupItem (§3.3.2.4) [ AutoFilter12 87Eh,
+ AF12DateInfo struct ]
+ - dynamicFilter (§3.3.2.5) [ AutoFilter12 87Eh, cft field ]
+ - filter (§3.3.2.6) [ AutoFilter12 87Eh, rgCriteria? ]
+ - filters (§3.3.2.9) [ AutoFilter12 87Eh, rgCriteria? ]
+ - iconFilter (§3.3.2.9) [ AutoFilter12 87Eh,
+ AF12CellIcon struct ]
+ - Shared String Table (§3.4):
+ - phoneticPr (§3.4.3)
+ - rPh (§3.4.6)
+ - Tables (§3.5.1):
+ - calculatedColumnFormula (§3.5.1.1)
+ [ ??? ]
+ - table (§3.5.1.2) [ ??? ]
+ - tableColumn (§3.5.1.3) [ ??? ]
+ - tableColumns (§3.5.1.4) [ ??? ]
+ - tableStyleInfo (§3.5.1.5) [ ??? ]
+ - totalRowFormula (§3.5.1.6) [ ??? ]
+ - xmlColumnPr (§3.5.1.7) [ ??? ]
+ - Single Cell Tables (§3.5.2):
+ - singleXmlCell (§3.5.2.1) [ ??? ]
+ - singleXmlCells (§3.5.2.2) [ ??? ]
+ - xmlCellPr (§3.5.2.3) [ ??? ]
+ - xmlPr (§3.5.2.4) [ ??? ]
+ - Calculation Chain (§3.6):
+ - c (§3.6.1) [ ??? ]
+ - calcChain (§3.6.2) [ ??? ]
+ - Comments (§3.7):
+ - Note: Excel *requires* that there be a drawing object associated
+ with the comment before it will show it. If you _just_ generate the
+ <comments/> XML part and create a <Relationship/> for it, Excell
+ will NOT display the comment.
+ - As drawing is not currently implemented, comments support is
+ incomplete.
+ - TODO: text formatting. Currently we only write unformatted text
+ into comments?.xml, as I'm not sure how formatted text is handled.
+ - Styles (§3.8):
+ - dxf (§3.8.14): [ DXF 88Dh; unsupported ]
+ - dxfs (§3.8.15): [ DXF 88Dh ]
+ - gradientFill (§3.8.23): [ ??? ]
+ - horizontal (§3.8.24): [ DXF 88Dh fNewBorder, xfprops ]
+ - mruColors (§3.8.28): [ ??? ]
+ - scheme (§3.8.36): [ ??? ]
+ - stop (§3.8.38): [ ??? ]
+ - tableStyle (§3.8.40): [ TableStyle 88Fh; unsupported ]
+ - tableStyleElement (§3.8.41): [ TableStyleElement 890h; unsupported ]
+ - tableStyles (§3.8.42): [ TableStyles 88Eh; unsupported ]
+ - vertical (§3.8.44): [ DXF 88Dh fNewBorder, xfprops ]
+
diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx
index d413f8f687f7..78c29e079354 100644
--- a/sc/source/filter/excel/tokstack.cxx
+++ b/sc/source/filter/excel/tokstack.cxx
@@ -100,7 +100,7 @@ TokenPool::TokenPool( void )
// Sammelstellen fuer Referenzen
nP_RefTr = 32;
- ppP_RefTr = new SingleRefData *[ nP_RefTr ];
+ ppP_RefTr = new ScSingleRefData *[ nP_RefTr ];
for( nLauf = 0 ; nLauf < nP_RefTr ; nLauf++ )
ppP_RefTr[ nLauf ] = NULL;
@@ -228,7 +228,7 @@ void TokenPool::GrowTripel( void )
UINT16 nP_RefTrNew = nP_RefTr * 2;
UINT16 nL;
- SingleRefData** ppP_RefTrNew = new SingleRefData *[ nP_RefTrNew ];
+ ScSingleRefData** ppP_RefTrNew = new ScSingleRefData *[ nP_RefTrNew ];
for( nL = 0 ; nL < nP_RefTr ; nL++ )
ppP_RefTrNew[ nL ] = ppP_RefTr[ nL ];
@@ -359,10 +359,10 @@ void TokenPool::GetElement( const UINT16 nId )
break;
case T_RefA:
{
- ComplRefData aComplRefData;
- aComplRefData.Ref1 = *ppP_RefTr[ pElement[ nId ] ];
- aComplRefData.Ref2 = *ppP_RefTr[ pElement[ nId ] + 1 ];
- pScToken->AddDoubleReference( aComplRefData );
+ ScComplexRefData aScComplexRefData;
+ aScComplexRefData.Ref1 = *ppP_RefTr[ pElement[ nId ] ];
+ aScComplexRefData.Ref2 = *ppP_RefTr[ pElement[ nId ] + 1 ];
+ pScToken->AddDoubleReference( aScComplexRefData );
}
break;
case T_RN:
@@ -469,10 +469,10 @@ void TokenPool::GetElementRek( const UINT16 nId )
break;
case T_RefA:
{
- ComplRefData aComplRefData;
- aComplRefData.Ref1 = *ppP_RefTr[ pElement[ *pAkt ] ];
- aComplRefData.Ref2 = *ppP_RefTr[ pElement[ *pAkt ] + 1 ];
- pScToken->AddDoubleReference( aComplRefData );
+ ScComplexRefData aScComplexRefData;
+ aScComplexRefData.Ref1 = *ppP_RefTr[ pElement[ *pAkt ] ];
+ aScComplexRefData.Ref2 = *ppP_RefTr[ pElement[ *pAkt ] + 1 ];
+ pScToken->AddDoubleReference( aScComplexRefData );
}
break;
case T_RN:
@@ -654,7 +654,7 @@ const TokenId TokenPool::Store( const String& rString )
}
-const TokenId TokenPool::Store( const SingleRefData& rTr )
+const TokenId TokenPool::Store( const ScSingleRefData& rTr )
{
if( nElementAkt >= nElement )
GrowElement();
@@ -666,7 +666,7 @@ const TokenId TokenPool::Store( const SingleRefData& rTr )
pType[ nElementAkt ] = T_RefC; // Typinfo Cell-Reff eintragen
if( !ppP_RefTr[ nP_RefTrAkt ] )
- ppP_RefTr[ nP_RefTrAkt ] = new SingleRefData( rTr );
+ ppP_RefTr[ nP_RefTrAkt ] = new ScSingleRefData( rTr );
else
*ppP_RefTr[ nP_RefTrAkt ] = rTr;
@@ -677,7 +677,7 @@ const TokenId TokenPool::Store( const SingleRefData& rTr )
}
-const TokenId TokenPool::Store( const ComplRefData& rTr )
+const TokenId TokenPool::Store( const ScComplexRefData& rTr )
{
if( nElementAkt >= nElement )
GrowElement();
@@ -689,13 +689,13 @@ const TokenId TokenPool::Store( const ComplRefData& rTr )
pType[ nElementAkt ] = T_RefA; // Typinfo Area-Reff eintragen
if( !ppP_RefTr[ nP_RefTrAkt ] )
- ppP_RefTr[ nP_RefTrAkt ] = new SingleRefData( rTr.Ref1 );
+ ppP_RefTr[ nP_RefTrAkt ] = new ScSingleRefData( rTr.Ref1 );
else
*ppP_RefTr[ nP_RefTrAkt ] = rTr.Ref1;
nP_RefTrAkt++;
if( !ppP_RefTr[ nP_RefTrAkt ] )
- ppP_RefTr[ nP_RefTrAkt ] = new SingleRefData( rTr.Ref2 );
+ ppP_RefTr[ nP_RefTrAkt ] = new ScSingleRefData( rTr.Ref2 );
else
*ppP_RefTr[ nP_RefTrAkt ] = rTr.Ref2;
nP_RefTrAkt++;
@@ -732,7 +732,7 @@ const TokenId TokenPool::Store( const DefTokenId e, const String& r )
}
-const TokenId TokenPool::StoreNlf( const SingleRefData& rTr )
+const TokenId TokenPool::StoreNlf( const ScSingleRefData& rTr )
{
if( nElementAkt >= nElement )
GrowElement();
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 8bbbcd5cd070..f0e721d33ef2 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -57,7 +57,8 @@
#include "xestyle.hxx"
#include "xename.hxx"
-using ::rtl::OUString;
+#include <oox/core/tokens.hxx>
+
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::UNO_QUERY;
@@ -67,6 +68,9 @@ using ::com::sun::star::frame::XModel;
using ::com::sun::star::table::CellRangeAddress;
using ::com::sun::star::sheet::XAreaLinks;
using ::com::sun::star::sheet::XAreaLink;
+using ::rtl::OString;
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
// Shared string table ========================================================
@@ -106,6 +110,7 @@ public:
/** Writes the complete SST and EXTSST records. */
void Save( XclExpStream& rStrm );
+ void SaveXml( XclExpXmlStream& rStrm );
private:
typedef ::std::list< XclExpStringRef > XclExpStringList;
@@ -253,6 +258,37 @@ void XclExpSstImpl::Save( XclExpStream& rStrm )
rStrm.EndRecord();
}
+void XclExpSstImpl::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( maStringList.empty() )
+ return;
+
+ sax_fastparser::FSHelperPtr pSst = rStrm.CreateOutputStream(
+ OUString::createFromAscii( "xl/sharedStrings.xml" ),
+ OUString::createFromAscii( "sharedStrings.xml" ),
+ rStrm.GetCurrentStream()->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" );
+ rStrm.PushStream( pSst );
+
+ pSst->startElement( XML_sst,
+ XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ XML_count, OString::valueOf( (sal_Int32) mnTotal ).getStr(),
+ XML_uniqueCount, OString::valueOf( (sal_Int32) mnSize ).getStr(),
+ FSEND );
+
+ for( XclExpStringList::const_iterator aIt = maStringList.begin(), aEnd = maStringList.end(); aIt != aEnd; ++aIt )
+ {
+ pSst->startElement( XML_si, FSEND );
+ (*aIt)->WriteXml( rStrm );
+ pSst->endElement( XML_si );
+ }
+
+ pSst->endElement( XML_sst );
+
+ rStrm.PopStream();
+}
+
// ----------------------------------------------------------------------------
XclExpSst::XclExpSst() :
@@ -274,6 +310,11 @@ void XclExpSst::Save( XclExpStream& rStrm )
mxImpl->Save( rStrm );
}
+void XclExpSst::SaveXml( XclExpXmlStream& rStrm )
+{
+ mxImpl->SaveXml( rStrm );
+}
+
// Merged cells ===============================================================
XclExpMergedcells::XclExpMergedcells( const XclExpRoot& rRoot ) :
@@ -321,6 +362,27 @@ void XclExpMergedcells::Save( XclExpStream& rStrm )
}
}
+void XclExpMergedcells::SaveXml( XclExpXmlStream& rStrm )
+{
+ ULONG nCount = maMergedRanges.Count();
+ if( !nCount )
+ return;
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_mergeCells,
+ XML_count, OString::valueOf( (sal_Int32) nCount ).getStr(),
+ FSEND );
+ for( ULONG i = 0; i < nCount; ++i )
+ {
+ if( const ScRange* pRange = maMergedRanges.GetObject( i ) )
+ {
+ rWorksheet->singleElement( XML_mergeCell,
+ XML_ref, XclXmlUtils::ToOString( *pRange ).getStr(),
+ FSEND );
+ }
+ }
+ rWorksheet->endElement( XML_mergeCells );
+}
+
// Hyperlinks =================================================================
XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rUrlField, const ScAddress& rScPos ) :
@@ -335,7 +397,6 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
const INetProtocol eProtocol = aUrlObj.GetProtocol();
bool bWithRepr = rRepr.Len() > 0;
XclExpStream aXclStrm( *mxVarData, rRoot ); // using in raw write mode.
- XclExpStringRef xTextMark;
// description
if( bWithRepr )
@@ -376,6 +437,8 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
if( !mxRepr.get() )
mxRepr.reset( new String( aFileName ) );
+
+ msTarget = XclXmlUtils::ToOUString( aLink );
}
else if( eProtocol != INET_PROT_NOT_VALID )
{
@@ -388,22 +451,24 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
mnFlags |= EXC_HLINK_BODY | EXC_HLINK_ABS;
if( !mxRepr.get() )
mxRepr.reset( new String( rUrl ) );
+
+ msTarget = XclXmlUtils::ToOUString( aUrl );
}
else if( rUrl.GetChar( 0 ) == '#' ) // hack for #89066#
{
String aTextMark( rUrl.Copy( 1 ) );
aTextMark.SearchAndReplace( '.', '!' );
- xTextMark.reset( new XclExpString( aTextMark, EXC_STR_FORCEUNICODE, 255 ) );
+ mxTextMark.reset( new XclExpString( aTextMark, EXC_STR_FORCEUNICODE, 255 ) );
}
// text mark
- if( !xTextMark.get() && aUrlObj.HasMark() )
- xTextMark.reset( new XclExpString( aUrlObj.GetMark(), EXC_STR_FORCEUNICODE, 255 ) );
+ if( !mxTextMark.get() && aUrlObj.HasMark() )
+ mxTextMark.reset( new XclExpString( aUrlObj.GetMark(), EXC_STR_FORCEUNICODE, 255 ) );
- if( xTextMark.get() )
+ if( mxTextMark.get() )
{
- aXclStrm << sal_uInt32( xTextMark->Len() + 1 ); // string length + 1 trailing zero word
- xTextMark->WriteBuffer( aXclStrm ); // NO flags
+ aXclStrm << sal_uInt32( mxTextMark->Len() + 1 ); // string length + 1 trailing zero word
+ mxTextMark->WriteBuffer( aXclStrm ); // NO flags
aXclStrm << sal_uInt16( 0 );
mnFlags |= EXC_HLINK_MARK;
@@ -462,6 +527,23 @@ void XclExpHyperlink::WriteBody( XclExpStream& rStrm )
rStrm.CopyFromStream( *mxVarData );
}
+void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
+{
+ OUString sId = rStrm.addRelation( rStrm.GetCurrentStream()->getOutputStream(),
+ XclXmlUtils::ToOUString( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" ),
+ msTarget,
+ XclXmlUtils::ToOUString( "External" ) );
+ rStrm.GetCurrentStream()->singleElement( XML_hyperlink,
+ XML_ref, XclXmlUtils::ToOString( maScPos ).getStr(),
+ FSNS( XML_r, XML_id ), XclXmlUtils::ToOString( sId ).getStr(),
+ XML_location, mxTextMark.get() != NULL
+ ? XclXmlUtils::ToOString( *mxTextMark ).getStr()
+ : NULL,
+ // OOXTODO: XML_tooltip, from record HLinkTooltip 800h wzTooltip
+ XML_display, XclXmlUtils::ToOString( *mxRepr ).getStr(),
+ FSEND );
+}
+
// Label ranges ===============================================================
XclExpLabelranges::XclExpLabelranges( const XclExpRoot& rRoot ) :
@@ -740,9 +822,12 @@ XclExpCondfmt::XclExpCondfmt( const XclExpRoot& rRoot, const ScConditionalFormat
GetDoc().FindConditionalFormat( rCondFormat.GetKey(), aScRanges, GetCurrScTab() );
GetAddressConverter().ConvertRangeList( maXclRanges, aScRanges, true );
if( !maXclRanges.empty() )
+ {
for( USHORT nIndex = 0, nCount = rCondFormat.Count(); nIndex < nCount; ++nIndex )
if( const ScCondFormatEntry* pEntry = rCondFormat.GetEntry( nIndex ) )
maCFList.AppendNewRecord( new XclExpCF( GetRoot(), *pEntry ) );
+ aScRanges.Format( msSeqRef, SCA_VALID, NULL, ScAddress::CONV_XL_A1 );
+ }
}
XclExpCondfmt::~XclExpCondfmt()
@@ -774,6 +859,21 @@ void XclExpCondfmt::WriteBody( XclExpStream& rStrm )
<< maXclRanges;
}
+void XclExpCondfmt::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( !IsValid() )
+ return;
+
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_conditionalFormatting,
+ XML_sqref, XclXmlUtils::ToOString( msSeqRef ).getStr(),
+ // OOXTODO: XML_pivot,
+ FSEND );
+ maCFList.SaveXml( rStrm );
+ // OOXTODO: XML_extLst
+ rWorksheet->endElement( XML_conditionalFormatting );
+}
+
// ----------------------------------------------------------------------------
XclExpCondFormatBuffer::XclExpCondFormatBuffer( const XclExpRoot& rRoot ) :
@@ -802,6 +902,11 @@ void XclExpCondFormatBuffer::Save( XclExpStream& rStrm )
maCondfmtList.Save( rStrm );
}
+void XclExpCondFormatBuffer::SaveXml( XclExpXmlStream& rStrm )
+{
+ maCondfmtList.SaveXml( rStrm );
+}
+
// Validation =================================================================
namespace {
@@ -825,6 +930,38 @@ void lclWriteDvFormula( XclExpStream& rStrm, const XclExpString& rString )
<< rString;
}
+const char* lcl_GetValidationType( sal_uInt32 nFlags )
+{
+ switch( nFlags & EXC_DV_MODE_MASK )
+ {
+ case EXC_DV_MODE_ANY: return "none";
+ case EXC_DV_MODE_WHOLE: return "whole";
+ case EXC_DV_MODE_DECIMAL: return "decimal";
+ case EXC_DV_MODE_LIST: return "list";
+ case EXC_DV_MODE_DATE: return "date";
+ case EXC_DV_MODE_TIME: return "time";
+ case EXC_DV_MODE_TEXTLEN: return "textLength";
+ case EXC_DV_MODE_CUSTOM: return "custom";
+ }
+ return NULL;
+}
+
+const char* lcl_GetOperatorType( sal_uInt32 nFlags )
+{
+ switch( nFlags & EXC_DV_COND_MASK )
+ {
+ case EXC_DV_COND_BETWEEN: return "between";
+ case EXC_DV_COND_NOTBETWEEN: return "notBetween";
+ case EXC_DV_COND_EQUAL: return "equal";
+ case EXC_DV_COND_NOTEQUAL: return "notEqual";
+ case EXC_DV_COND_GREATER: return "greaterThan";
+ case EXC_DV_COND_LESS: return "lessThan";
+ case EXC_DV_COND_EQGREATER: return "greaterThanOrEqual";
+ case EXC_DV_COND_EQLESS: return "lessThanOrEqual";
+ }
+ return NULL;
+}
+
} // namespace
// ----------------------------------------------------------------------------
@@ -918,6 +1055,8 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, ULONG nScHandle ) :
String aString;
if( XclTokenArrayHelper::GetStringList( aString, *xScTokArr, '\n' ) )
{
+ OUStringBuffer sFormulaBuf;
+ sFormulaBuf.append( (sal_Unicode) '"' );
/* Formula is a list of string tokens -> build the Excel string.
Data validity is BIFF8 only (important for the XclExpString object).
Excel uses the NUL character as string list separator. */
@@ -928,10 +1067,17 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, ULONG nScHandle ) :
{
String aToken( aString.GetToken( 0, '\n', nStringIx ) );
if( nToken > 0 )
+ {
mxString1->Append( '\0' );
+ sFormulaBuf.append( (sal_Unicode) ',' );
+ }
mxString1->Append( aToken );
+ sFormulaBuf.append( XclXmlUtils::ToOUString( aToken ) );
}
::set_flag( mnFlags, EXC_DV_STRINGLIST );
+
+ sFormulaBuf.append( (sal_Unicode) '"' );
+ msFormula1 = sFormulaBuf.makeStringAndClear();
}
else
{
@@ -945,19 +1091,24 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, ULONG nScHandle ) :
Formula compiler supports this by offering two different functions
CreateDataValFormula() and CreateListValFormula(). */
mxTokArr1 = rFmlaComp.CreateFormula( EXC_FMLATYPE_LISTVAL, *xScTokArr );
+ msFormula1 = XclXmlUtils::ToOUString( GetDoc(), pValData->GetSrcPos(), xScTokArr.get() );
}
}
else
{
// no list validation -> convert the formula
mxTokArr1 = rFmlaComp.CreateFormula( EXC_FMLATYPE_DATAVAL, *xScTokArr );
+ msFormula1 = XclXmlUtils::ToOUString( GetDoc(), pValData->GetSrcPos(), xScTokArr.get() );
}
}
// second formula
xScTokArr.reset( pValData->CreateTokenArry( 1 ) );
if( xScTokArr.get() )
+ {
mxTokArr2 = rFmlaComp.CreateFormula( EXC_FMLATYPE_DATAVAL, *xScTokArr );
+ msFormula2 = XclXmlUtils::ToOUString( GetDoc(), pValData->GetSrcPos(), xScTokArr.get() );
+ }
}
else
{
@@ -995,6 +1146,39 @@ void XclExpDV::WriteBody( XclExpStream& rStrm )
rStrm << maXclRanges;
}
+void XclExpDV::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_dataValidation,
+ XML_allowBlank, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_DV_IGNOREBLANK ) ),
+ XML_error, XESTRING_TO_PSZ( maErrorText ),
+ // OOXTODO: XML_errorStyle,
+ XML_errorTitle, XESTRING_TO_PSZ( maErrorTitle ),
+ // OOXTODO: XML_imeMode,
+ XML_operator, lcl_GetOperatorType( mnFlags ),
+ XML_prompt, XESTRING_TO_PSZ( maPromptText ),
+ XML_promptTitle, XESTRING_TO_PSZ( maPromptTitle ),
+ XML_showDropDown, XclXmlUtils::ToPsz( ! ::get_flag( mnFlags, EXC_DV_SUPPRESSDROPDOWN ) ),
+ XML_showErrorMessage, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_DV_SHOWERROR ) ),
+ XML_showInputMessage, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_DV_SHOWPROMPT ) ),
+ XML_sqref, XclXmlUtils::ToOString( maScRanges ).getStr(),
+ XML_type, lcl_GetValidationType( mnFlags ),
+ FSEND );
+ if( msFormula1.getLength() )
+ {
+ rWorksheet->startElement( XML_formula1, FSEND );
+ rWorksheet->writeEscaped( msFormula1 );
+ rWorksheet->endElement( XML_formula1 );
+ }
+ if( msFormula2.getLength() )
+ {
+ rWorksheet->startElement( XML_formula2, FSEND );
+ rWorksheet->writeEscaped( msFormula2 );
+ rWorksheet->endElement( XML_formula2 );
+ }
+ rWorksheet->endElement( XML_dataValidation );
+}
+
// ----------------------------------------------------------------------------
XclExpDval::XclExpDval( const XclExpRoot& rRoot ) :
@@ -1036,6 +1220,22 @@ void XclExpDval::Save( XclExpStream& rStrm )
}
}
+void XclExpDval::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( maDVList.IsEmpty() )
+ return;
+
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_dataValidations,
+ XML_count, OString::valueOf( (sal_Int32) maDVList.GetSize() ).getStr(),
+ // OOXTODO: XML_disablePrompts,
+ // OOXTODO: XML_xWindow,
+ // OOXTODO: XML_yWindow,
+ FSEND );
+ maDVList.SaveXml( rStrm );
+ rWorksheet->endElement( XML_dataValidations );
+}
+
XclExpDV& XclExpDval::SearchOrCreateDv( ULONG nScHandle )
{
// test last found record
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 1bf7c0060532..5d6fffc9f145 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -31,6 +31,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
+#include <set>
+#include <iterator>
+
#include "xeescher.hxx"
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -44,6 +47,7 @@
#include <com/sun/star/form/binding/XListEntrySource.hpp>
#include <com/sun/star/script/ScriptEventDescriptor.hpp>
+#include <rtl/ustrbuf.h>
#include <vcl/bmpacc.hxx>
#include <svx/svdoole2.hxx>
@@ -59,7 +63,11 @@
#include "xename.hxx"
#include "xestyle.hxx"
+#include <oox/core/tokens.hxx>
+
+using ::rtl::OString;
using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
@@ -822,6 +830,7 @@ XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos,
aNoteText = pScNote->GetText();
// append additional text
ScGlobal::AddToken( aNoteText, rAddText, '\n', 2 );
+ maOrigNoteText = aNoteText;
// initialize record dependent on BIFF type
switch( rRoot.GetBiff() )
@@ -954,5 +963,90 @@ void XclExpNote::WriteBody( XclExpStream& rStrm )
<< sal_uInt8( 0 );
}
+void XclExpNote::WriteXml( sal_Int32 nAuthorId, XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr rComments = rStrm.GetCurrentStream();
+
+ rComments->startElement( XML_comment,
+ XML_ref, XclXmlUtils::ToOString( maScPos ).getStr(),
+ XML_authorId, OString::valueOf( nAuthorId ).getStr(),
+ // OOXTODO: XML_guid,
+ FSEND );
+ rComments->startElement( XML_text, FSEND );
+ // OOXTODO: phoneticPr, rPh, r
+ rComments->startElement( XML_t, FSEND );
+ rComments->writeEscaped( XclXmlUtils::ToOUString( maOrigNoteText ) );
+ rComments->endElement ( XML_t );
+ rComments->endElement( XML_text );
+ rComments->endElement( XML_comment );
+}
+
+// ============================================================================
+
+XclExpComments::XclExpComments( SCTAB nTab, XclExpRecordList< XclExpNote >& rNotes )
+ : mnTab( nTab ), mrNotes( rNotes )
+{
+}
+
+struct OUStringLess : public std::binary_function<OUString, OUString, bool>
+{
+ bool operator()(const OUString& x, const OUString& y) const
+ {
+ return x.compareTo( y ) <= 0;
+ }
+};
+
+void XclExpComments::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( mrNotes.IsEmpty() )
+ return;
+
+ sax_fastparser::FSHelperPtr rComments = rStrm.CreateOutputStream(
+ XclXmlUtils::GetStreamName( "xl/", "comments", mnTab + 1 ),
+ XclXmlUtils::GetStreamName( "../", "comments", mnTab + 1 ),
+ rStrm.GetCurrentStream()->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" );
+ rStrm.PushStream( rComments );
+
+ rComments->startElement( XML_comments,
+ XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ FSEND );
+ rComments->startElement( XML_authors, FSEND );
+
+ typedef std::set< OUString, OUStringLess > Authors;
+ Authors aAuthors;
+
+ size_t nNotes = mrNotes.GetSize();
+ for( size_t i = 0; i < nNotes; ++i )
+ {
+ aAuthors.insert( XclXmlUtils::ToOUString( mrNotes.GetRecord( i )->GetAuthor() ) );
+ }
+
+ for( Authors::const_iterator b = aAuthors.begin(), e = aAuthors.end(); b != e; ++b )
+ {
+ rComments->startElement( XML_author, FSEND );
+ rComments->writeEscaped( *b );
+ rComments->endElement( XML_author );
+ }
+
+ rComments->endElement( XML_authors );
+ rComments->startElement( XML_commentList, FSEND );
+
+ for( size_t i = 0; i < nNotes; ++i )
+ {
+ XclExpNoteList::RecordRefType xNote = mrNotes.GetRecord( i );
+ Authors::const_iterator aAuthor = aAuthors.find(
+ XclXmlUtils::ToOUString( xNote->GetAuthor() ) );
+ sal_Int32 nAuthorId = distance( aAuthors.begin(), aAuthor );
+ xNote->WriteXml( nAuthorId, rStrm );
+ }
+
+ rComments->endElement( XML_commentList );
+ rComments->endElement( XML_comments );
+
+ rStrm.PopStream();
+}
+
// ============================================================================
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index bc77cd905ed4..cc2e7c519cd0 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -30,7 +30,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include "xeformula.hxx"
#include <list>
#include <map>
@@ -41,6 +40,7 @@
#include "xehelper.hxx"
#include "xelink.hxx"
#include "xename.hxx"
+#include "xeformula.hxx"
#include "document.hxx"
#include "externalrefmgr.hxx"
@@ -346,13 +346,13 @@ private:
// reference handling -----------------------------------------------------
- SCTAB GetScTab( const SingleRefData& rRefData ) const;
- bool IsRef2D( const SingleRefData& rRefData ) const;
- bool IsRef2D( const ComplRefData& rRefData ) const;
+ SCTAB GetScTab( const ScSingleRefData& rRefData ) const;
+ bool IsRef2D( const ScSingleRefData& rRefData ) const;
+ bool IsRef2D( const ScComplexRefData& rRefData ) const;
- void ConvertRefData( SingleRefData& rRefData, XclAddress& rXclPos,
+ void ConvertRefData( ScSingleRefData& rRefData, XclAddress& rXclPos,
bool bNatLangRef, bool bTruncMaxCol, bool bTruncMaxRow ) const;
- void ConvertRefData( ComplRefData& rRefData, XclRange& rXclRange,
+ void ConvertRefData( ScComplexRefData& rRefData, XclRange& rXclRange,
bool bNatLangRef ) const;
XclExpRefLogEntry* GetNewRefLogEntry();
@@ -1790,13 +1790,13 @@ void XclExpFmlaCompImpl::AppendTrailingParam( XclExpFuncData& rFuncData )
// ----------------------------------------------------------------------------
-SCTAB XclExpFmlaCompImpl::GetScTab( const SingleRefData& rRefData ) const
+SCTAB XclExpFmlaCompImpl::GetScTab( const ScSingleRefData& rRefData ) const
{
bool bInvTab = rRefData.IsTabDeleted() || (!mpScBasePos && rRefData.IsTabRel());
return bInvTab ? SCTAB_INVALID : static_cast< SCTAB >( rRefData.nTab );
}
-bool XclExpFmlaCompImpl::IsRef2D( const SingleRefData& rRefData ) const
+bool XclExpFmlaCompImpl::IsRef2D( const ScSingleRefData& rRefData ) const
{
/* rRefData.IsFlag3D() determines if sheet name is always visible, even on the
own sheet. If 3D references are allowed, the passed reference does not count
@@ -1806,13 +1806,13 @@ bool XclExpFmlaCompImpl::IsRef2D( const SingleRefData& rRefData ) const
(rRefData.IsTabRel() ? (rRefData.nRelTab == 0) : (static_cast< SCTAB >( rRefData.nTab ) == GetCurrScTab()));
}
-bool XclExpFmlaCompImpl::IsRef2D( const ComplRefData& rRefData ) const
+bool XclExpFmlaCompImpl::IsRef2D( const ScComplexRefData& rRefData ) const
{
return IsRef2D( rRefData.Ref1 ) && IsRef2D( rRefData.Ref2 );
}
void XclExpFmlaCompImpl::ConvertRefData(
- SingleRefData& rRefData, XclAddress& rXclPos,
+ ScSingleRefData& rRefData, XclAddress& rXclPos,
bool bNatLangRef, bool bTruncMaxCol, bool bTruncMaxRow ) const
{
if( mpScBasePos )
@@ -1865,7 +1865,7 @@ void XclExpFmlaCompImpl::ConvertRefData(
}
void XclExpFmlaCompImpl::ConvertRefData(
- ComplRefData& rRefData, XclRange& rXclRange, bool bNatLangRef ) const
+ ScComplexRefData& rRefData, XclRange& rXclRange, bool bNatLangRef ) const
{
// convert start and end of the range
ConvertRefData( rRefData.Ref1, rXclRange.maFirst, bNatLangRef, false, false );
@@ -1888,7 +1888,7 @@ void XclExpFmlaCompImpl::ProcessCellRef( const XclExpTokenData& rTokData, sal_uI
{
// get the Excel address components, adjust internal data in aRefData
bool bNatLangRef = (meBiff == EXC_BIFF8) && mpScBasePos && (rTokData.GetOpCode() == ocColRowName);
- SingleRefData aRefData( rTokData.mpScToken->GetSingleRef() );
+ ScSingleRefData aRefData( rTokData.mpScToken->GetSingleRef() );
XclAddress aXclPos( ScAddress::UNINITIALIZED );
ConvertRefData( aRefData, aXclPos, bNatLangRef, false, false );
@@ -1945,7 +1945,7 @@ void XclExpFmlaCompImpl::ProcessCellRef( const XclExpTokenData& rTokData, sal_uI
void XclExpFmlaCompImpl::ProcessRangeRef( const XclExpTokenData& rTokData, sal_uInt8 nExpClass )
{
// get the Excel address components, adjust internal data in aRefData
- ComplRefData aRefData( rTokData.mpScToken->GetDoubleRef() );
+ ScComplexRefData aRefData( rTokData.mpScToken->GetDoubleRef() );
XclRange aXclRange( ScAddress::UNINITIALIZED );
ConvertRefData( aRefData, aXclRange, false );
@@ -2384,7 +2384,7 @@ void XclExpFmlaCompImpl::RemoveTrailingParen()
namespace {
-void lclInitOwnTab( SingleRefData& rRef, const ScAddress& rScPos, SCTAB nCurrScTab, bool b3DRefOnly )
+void lclInitOwnTab( ScSingleRefData& rRef, const ScAddress& rScPos, SCTAB nCurrScTab, bool b3DRefOnly )
{
if( b3DRefOnly )
{
@@ -2400,7 +2400,7 @@ void lclInitOwnTab( SingleRefData& rRef, const ScAddress& rScPos, SCTAB nCurrScT
void lclPutCellToTokenArray( ScTokenArray& rScTokArr, const ScAddress& rScPos, SCTAB nCurrScTab, bool b3DRefOnly )
{
- SingleRefData aRef;
+ ScSingleRefData aRef;
aRef.InitAddress( rScPos );
lclInitOwnTab( aRef, rScPos, nCurrScTab, b3DRefOnly );
rScTokArr.AddSingleReference( aRef );
@@ -2414,7 +2414,7 @@ void lclPutRangeToTokenArray( ScTokenArray& rScTokArr, const ScRange& rScRange,
}
else
{
- ComplRefData aRef;
+ ScComplexRefData aRef;
aRef.InitRange( rScRange );
lclInitOwnTab( aRef.Ref1, rScRange.aStart, nCurrScTab, b3DRefOnly );
lclInitOwnTab( aRef.Ref2, rScRange.aEnd, nCurrScTab, b3DRefOnly );
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index b175dc2e2579..771c659cbed6 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -30,7 +30,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include "xehelper.hxx"
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <sfx2/objsh.hxx>
@@ -56,11 +55,12 @@
#include "cell.hxx"
#include "editutil.hxx"
#include "patattr.hxx"
+#include "xestyle.hxx"
#include "fprogressbar.hxx"
#include "xltracer.hxx"
-#include "xestyle.hxx"
#include "xecontent.hxx"
#include "xelink.hxx"
+#include "xehelper.hxx"
using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index de22ddc21fea..f6520d1af861 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -517,7 +517,7 @@ public:
XclExpRefLogEntry* pRefLogEntry ) = 0;
/** Derived classes store all cells in the given range in a CRN record list. */
- virtual void StoreCellRange( const SingleRefData& rRef1, const SingleRefData& rRef2 ) = 0;
+ virtual void StoreCellRange( const ScSingleRefData& rRef1, const ScSingleRefData& rRef2 ) = 0;
virtual void StoreCell( sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef ) = 0;
virtual void StoreCellRange( sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef1, const SingleRefData& rRef2 ) = 0;
@@ -560,7 +560,7 @@ public:
sal_uInt16& rnExtSheet, sal_uInt16& rnFirstSBTab, sal_uInt16& rnLastSBTab,
XclExpRefLogEntry* pRefLogEntry );
- virtual void StoreCellRange( const SingleRefData& rRef1, const SingleRefData& rRef2 );
+ virtual void StoreCellRange( const ScSingleRefData& rRef1, const ScSingleRefData& rRef2 );
virtual void StoreCell( sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef );
virtual void StoreCellRange( sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef1, const SingleRefData& rRef2 );
@@ -625,7 +625,7 @@ public:
sal_uInt16& rnExtSheet, sal_uInt16& rnFirstSBTab, sal_uInt16& rnLastSBTab,
XclExpRefLogEntry* pRefLogEntry );
- virtual void StoreCellRange( const SingleRefData& rRef1, const SingleRefData& rRef2 );
+ virtual void StoreCellRange( const ScSingleRefData& rRef1, const ScSingleRefData& rRef2 );
virtual void StoreCell( sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef );
virtual void StoreCellRange( sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef1, const SingleRefData& rRef2 );
@@ -1981,7 +1981,7 @@ void XclExpLinkManagerImpl5::FindExtSheet(
// not implemented
}
-void XclExpLinkManagerImpl5::StoreCellRange( const SingleRefData& /*rRef1*/, const SingleRefData& /*rRef2*/ )
+void XclExpLinkManagerImpl5::StoreCellRange( const ScSingleRefData& /*rRef1*/, const ScSingleRefData& /*rRef2*/ )
{
// not implemented
}
@@ -2155,7 +2155,7 @@ void XclExpLinkManagerImpl8::FindExtSheet(
rnLastSBTab = aXti.mnLastSBTab;
}
-void XclExpLinkManagerImpl8::StoreCellRange( const SingleRefData& rRef1, const SingleRefData& rRef2 )
+void XclExpLinkManagerImpl8::StoreCellRange( const ScSingleRefData& rRef1, const ScSingleRefData& rRef2 )
{
if( !rRef1.IsDeleted() && !rRef2.IsDeleted() && (rRef1.nTab >= 0) && (rRef2.nTab >= 0) )
{
@@ -2302,12 +2302,12 @@ void XclExpLinkManager::FindExtSheet( sal_uInt16 nFileId, const String& rTabName
mxImpl->FindExtSheet( nFileId, rTabName, nXclTabSpan, rnExtSheet, rnFirstSBTab, rnLastSBTab, pRefLogEntry );
}
-void XclExpLinkManager::StoreCell( const SingleRefData& rRef )
+void XclExpLinkManager::StoreCell( const ScSingleRefData& rRef )
{
mxImpl->StoreCellRange( rRef, rRef );
}
-void XclExpLinkManager::StoreCellRange( const ComplRefData& rRef )
+void XclExpLinkManager::StoreCellRange( const ScComplexRefData& rRef )
{
mxImpl->StoreCellRange( rRef.Ref1, rRef.Ref2 );
}
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index 95edfe9e1149..d52b657ec5b3 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -44,6 +44,10 @@
// for filter manager
#include "excrecds.hxx"
+#include <oox/core/tokens.hxx>
+
+using ::rtl::OString;
+
// ============================================================================
// *** Helper classes ***
// ============================================================================
@@ -68,6 +72,13 @@ public:
@param bFunc true = Macro function; false = Macro procedure. */
void SetMacroCall( bool bVBasic, bool bFunc );
+
+ /** Sets the name's symbol value
+ @param sValue the name's symbolic value */
+ void SetSymbol( String sValue );
+ /** Returns the name's symbol value */
+ inline const String& GetSymbol() const { return msSymbol; }
+
/** Returns the original name (title) of this defined name. */
inline const String& GetOrigName() const { return maOrigName; }
/** Returns the Excel built-in name index of this defined name.
@@ -93,12 +104,15 @@ public:
/** Writes the entire NAME record to the passed stream. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
private:
/** Writes the body of the NAME record to the passed stream. */
virtual void WriteBody( XclExpStream& rStrm );
private:
String maOrigName; /// The original user-defined name.
+ String msSymbol; /// The value of the symbol
XclExpStringRef mxName; /// The name as Excel string object.
XclTokenArrayRef mxTokArr; /// The definition of the defined name.
sal_Unicode mcBuiltIn; /// The built-in index for built-in names.
@@ -147,6 +161,8 @@ public:
the list of NAME records. */
void Save( XclExpStream& rStrm );
+ void SaveXml( XclExpXmlStream& rStrm );
+
private:
typedef XclExpRecordList< XclExpName > XclExpNameList;
typedef XclExpNameList::RecordRefType XclExpNameRef;
@@ -271,6 +287,11 @@ void XclExpName::SetMacroCall( bool bVBasic, bool bFunc )
::set_flag( mnFlags, EXC_NAME_FUNC, bFunc );
}
+void XclExpName::SetSymbol( String sSymbol )
+{
+ msSymbol = sSymbol;
+}
+
bool XclExpName::IsVolatile() const
{
return mxTokArr.is() && mxTokArr->IsVolatile();
@@ -296,6 +317,34 @@ void XclExpName::Save( XclExpStream& rStrm )
XclExpRecord::Save( rStrm );
}
+void XclExpName::SaveXml( XclExpXmlStream& rStrm )
+{
+ // For some reason, AutoFilter creates exportable names where maOrigName==""
+ if( maOrigName.Len() == 0 )
+ return;
+
+ sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
+ rWorkbook->startElement( XML_definedName,
+ // OOXTODO: XML_comment, "",
+ // OOXTODO: XML_customMenu, "",
+ // OOXTODO: XML_description, "",
+ XML_function, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_NAME_VB ) ),
+ // OOXTODO: XML_functionGroupId, "",
+ // OOXTODO: XML_help, "",
+ XML_hidden, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_NAME_HIDDEN ) ),
+ XML_localSheetId, mnScTab == SCTAB_GLOBAL ? NULL : OString::valueOf( (sal_Int32)mnScTab ).getStr(),
+ XML_name, XclXmlUtils::ToOString( maOrigName ).getStr(),
+ // OOXTODO: XML_publishToServer, "",
+ // OOXTODO: XML_shortcutKey, "",
+ // OOXTODO: XML_statusBar, "",
+ XML_vbProcedure, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_NAME_VB ) ),
+ // OOXTODO: XML_workbookParameter, "",
+ // OOXTODO: XML_xlm, "",
+ FSEND );
+ rWorkbook->writeEscaped( XclXmlUtils::ToOUString( msSymbol ) );
+ rWorkbook->endElement( XML_definedName );
+}
+
void XclExpName::WriteBody( XclExpStream& rStrm )
{
sal_uInt16 nFmlaSize = mxTokArr.is() ? mxTokArr->GetSize() : 0;
@@ -422,6 +471,16 @@ void XclExpNameManagerImpl::Save( XclExpStream& rStrm )
maNameList.Save( rStrm );
}
+void XclExpNameManagerImpl::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( maNameList.IsEmpty() )
+ return;
+ sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
+ rWorkbook->startElement( XML_definedNames, FSEND );
+ maNameList.SaveXml( rStrm );
+ rWorkbook->endElement( XML_definedNames );
+}
+
// private --------------------------------------------------------------------
sal_uInt16 XclExpNameManagerImpl::FindNameIdx( const XclExpIndexMap& rMap, USHORT nScIdx ) const
@@ -504,6 +563,10 @@ sal_uInt16 XclExpNameManagerImpl::CreateName( const ScRangeData& rRangeData )
XclTokenArrayRef xTokArr = GetFormulaCompiler().CreateFormula( EXC_FMLATYPE_NAME, *pScTokArr );
xName->SetTokenArray( xTokArr );
+ String sSymbol;
+ rRangeData.GetSymbol( sSymbol, ScGrammar::GRAM_NATIVE_XL_A1 );
+ xName->SetSymbol( sSymbol );
+
/* Try to replace by existing built-in name - complete token array is
needed for comparison, and due to the recursion problem above this
cannot be done earlier. If a built-in name is found, the created NAME
@@ -717,5 +780,10 @@ void XclExpNameManager::Save( XclExpStream& rStrm )
mxImpl->Save( rStrm );
}
+void XclExpNameManager::SaveXml( XclExpXmlStream& rStrm )
+{
+ mxImpl->SaveXml( rStrm );
+}
+
// ============================================================================
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index c43fc1596410..36d7a9dc31b7 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -48,6 +48,10 @@
#include "xehelper.hxx"
#include "xeescher.hxx"
+#include <oox/core/tokens.hxx>
+
+using ::rtl::OString;
+
// Page settings records ======================================================
// Header/footer --------------------------------------------------------------
@@ -58,6 +62,15 @@ XclExpHeaderFooter::XclExpHeaderFooter( sal_uInt16 nRecId, const String& rHdrStr
{
}
+void XclExpHeaderFooter::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ sal_Int32 nElement = GetRecId() == EXC_ID_HEADER ? XML_oddHeader : XML_oddFooter;
+ rWorksheet->startElement( nElement, FSEND );
+ rWorksheet->writeEscaped( XclXmlUtils::ToOUString( maHdrString ) );
+ rWorksheet->endElement( nElement );
+}
+
void XclExpHeaderFooter::WriteBody( XclExpStream& rStrm )
{
if( maHdrString.Len() )
@@ -79,6 +92,29 @@ XclExpSetup::XclExpSetup( const XclPageData& rPageData ) :
{
}
+void XclExpSetup::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.GetCurrentStream()->singleElement( XML_pageSetup,
+ XML_paperSize, OString::valueOf( (sal_Int32) mrData.mnPaperSize ).getStr(),
+ XML_scale, OString::valueOf( (sal_Int32) mrData.mnScaling ).getStr(),
+ XML_firstPageNumber, OString::valueOf( (sal_Int32) mrData.mnStartPage ).getStr(),
+ XML_fitToWidth, OString::valueOf( (sal_Int32) mrData.mnFitToWidth ).getStr(),
+ XML_fitToHeight, OString::valueOf( (sal_Int32) mrData.mnFitToHeight ).getStr(),
+ XML_pageOrder, mrData.mbPrintInRows ? "overThenDown" : "downThenOver",
+ XML_orientation, mrData.mbPortrait ? "portrait" : "landscape", // OOXTODO: "default"?
+ XML_usePrinterDefaults, XclXmlUtils::ToPsz( !mrData.mbValid ),
+ XML_blackAndWhite, XclXmlUtils::ToPsz( mrData.mbBlackWhite ),
+ XML_draft, XclXmlUtils::ToPsz( mrData.mbDraftQuality ),
+ XML_cellComments, mrData.mbPrintNotes ? "atEnd" : "none", // OOXTODO: "asDisplayed"?
+ XML_useFirstPageNumber, XclXmlUtils::ToPsz( mrData.mbManualStart ),
+ // OOXTODO: XML_errors, // == displayed|blank|dash|NA
+ XML_horizontalDpi, OString::valueOf( (sal_Int32) mrData.mnHorPrintRes ).getStr(),
+ XML_verticalDpi, OString::valueOf( (sal_Int32) mrData.mnVerPrintRes ).getStr(),
+ XML_copies, OString::valueOf( (sal_Int32) mrData.mnCopies ).getStr(),
+ // OOXTODO: devMode settings part RelationshipId: FSNS( XML_r, XML_id ),
+ FSEND );
+}
+
void XclExpSetup::WriteBody( XclExpStream& rStrm )
{
XclBiff eBiff = rStrm.GetRoot().GetBiff();
@@ -139,6 +175,31 @@ void XclExpPageBreaks::WriteBody( XclExpStream& rStrm )
}
}
+void XclExpPageBreaks::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( mrPageBreaks.empty() )
+ return;
+
+ sal_Int32 nElement = GetRecId() == EXC_ID_HORPAGEBREAKS ? XML_rowBreaks : XML_colBreaks;
+ sax_fastparser::FSHelperPtr& pWorksheet = rStrm.GetCurrentStream();
+ OString sNumPageBreaks = OString::valueOf( (sal_Int32) mrPageBreaks.size() );
+ pWorksheet->startElement( nElement,
+ XML_count, sNumPageBreaks.getStr(),
+ XML_manualBreakCount, sNumPageBreaks.getStr(),
+ FSEND );
+ for( ScfUInt16Vec::const_iterator aIt = mrPageBreaks.begin(), aEnd = mrPageBreaks.end(); aIt != aEnd; ++aIt )
+ {
+ pWorksheet->singleElement( XML_brk,
+ XML_id, OString::valueOf( (sal_Int32) *aIt ).getStr(),
+ XML_man, "true",
+ XML_max, OString::valueOf( (sal_Int32) mnMaxPos ).getStr(),
+ XML_min, "0",
+ // OOXTODO: XML_pt, "",
+ FSEND );
+ }
+ pWorksheet->endElement( nElement );
+}
+
// Page settings ==============================================================
XclExpPageSettings::XclExpPageSettings( const XclExpRoot& rRoot ) :
@@ -254,6 +315,19 @@ XclExpPageSettings::XclExpPageSettings( const XclExpRoot& rRoot ) :
maData.maVerPageBreaks.push_back( static_cast< sal_uInt16 >( nScCol ) );
}
+static void lcl_WriteHeaderFooter( XclExpXmlStream& rStrm )
+{
+ // OOXTODO: we currently only emit oddHeader/oddFooter elements, and
+ // do not support the first/even/odd page distinction.
+ rStrm.WriteAttributes(
+ // OOXTODO: XML_alignWithMargins,
+ XML_differentFirst, "false", // OOXTODO
+ XML_differentOddEven, "false", // OOXTODO
+ // OOXTODO: XML_scaleWithDoc
+ FSEND );
+ rStrm.GetCurrentStream()->write( ">" );
+}
+
void XclExpPageSettings::Save( XclExpStream& rStrm )
{
XclExpBoolRecord( EXC_ID_PRINTHEADERS, maData.mbPrintHeadings ).Save( rStrm );
@@ -276,6 +350,41 @@ void XclExpPageSettings::Save( XclExpStream& rStrm )
XclExpImgData( *pGraphic, EXC_ID8_IMGDATA ).Save( rStrm );
}
+void XclExpPageSettings::SaveXml( XclExpXmlStream& rStrm )
+{
+ XclExpXmlStartSingleElementRecord( XML_printOptions ).SaveXml( rStrm );
+ XclExpBoolRecord( EXC_ID_PRINTHEADERS, maData.mbPrintHeadings, XML_headings ).SaveXml( rStrm );
+ XclExpBoolRecord( EXC_ID_PRINTGRIDLINES, maData.mbPrintGrid, XML_gridLines ).SaveXml( rStrm );
+ XclExpBoolRecord( EXC_ID_GRIDSET, true, XML_gridLinesSet ).SaveXml( rStrm );
+ XclExpBoolRecord( EXC_ID_HCENTER, maData.mbHorCenter, XML_horizontalCentered ).SaveXml( rStrm );
+ XclExpBoolRecord( EXC_ID_VCENTER, maData.mbVerCenter, XML_verticalCentered ).SaveXml( rStrm );
+ XclExpXmlEndSingleElementRecord().SaveXml( rStrm ); // XML_printOptions
+
+ XclExpXmlStartSingleElementRecord( XML_pageMargins ).SaveXml( rStrm );
+ XclExpDoubleRecord( EXC_ID_LEFTMARGIN, maData.mfLeftMargin ).SetAttribute( XML_left )->SaveXml( rStrm );
+ XclExpDoubleRecord( EXC_ID_RIGHTMARGIN, maData.mfRightMargin ).SetAttribute( XML_right )->SaveXml( rStrm );
+ XclExpDoubleRecord( EXC_ID_TOPMARGIN, maData.mfTopMargin ).SetAttribute( XML_top )->SaveXml( rStrm );
+ XclExpDoubleRecord( EXC_ID_BOTTOMMARGIN, maData.mfBottomMargin ).SetAttribute( XML_bottom )->SaveXml( rStrm );
+ XclExpDoubleRecord( 0, maData.mfHeaderMargin).SetAttribute( XML_header )->SaveXml( rStrm );
+ XclExpDoubleRecord( 0, maData.mfFooterMargin).SetAttribute( XML_footer )->SaveXml( rStrm );
+ XclExpXmlEndSingleElementRecord().SaveXml( rStrm ); // XML_pageMargins
+
+ XclExpSetup( maData ).SaveXml( rStrm );
+
+ XclExpXmlStartElementRecord( XML_headerFooter, lcl_WriteHeaderFooter ).SaveXml( rStrm );
+ XclExpHeaderFooter( EXC_ID_HEADER, maData.maHeader ).SaveXml( rStrm );
+ XclExpHeaderFooter( EXC_ID_FOOTER, maData.maFooter ).SaveXml( rStrm );
+ XclExpXmlEndElementRecord( XML_headerFooter ).SaveXml( rStrm );
+
+ XclExpPageBreaks( EXC_ID_HORPAGEBREAKS, maData.maHorPageBreaks,
+ static_cast< sal_uInt16 >( GetXclMaxPos().Col() ) ).SaveXml( rStrm );
+ XclExpPageBreaks( EXC_ID_VERPAGEBREAKS, maData.maVerPageBreaks,
+ static_cast< sal_uInt16 >( GetXclMaxPos().Row() ) ).SaveXml( rStrm );
+
+ if( const Graphic* pGraphic = maData.mxBrushItem->GetGraphic() )
+ XclExpImgData( *pGraphic, EXC_ID8_IMGDATA ).SaveXml( rStrm );
+}
+
// ----------------------------------------------------------------------------
XclExpChartPageSettings::XclExpChartPageSettings( const XclExpRoot& rRoot ) :
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 447067299979..e0df86d37d9a 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -54,6 +54,8 @@
#include "xestring.hxx"
#include "xelink.hxx"
+#include <oox/core/tokens.hxx>
+
using ::com::sun::star::sheet::DataPilotFieldOrientation;
using ::com::sun::star::sheet::DataPilotFieldOrientation_HIDDEN;
using ::com::sun::star::sheet::DataPilotFieldOrientation_ROW;
@@ -66,6 +68,10 @@ using ::com::sun::star::sheet::DataPilotFieldAutoShowInfo;
using ::com::sun::star::sheet::DataPilotFieldLayoutInfo;
using ::com::sun::star::sheet::DataPilotFieldReference;
+using ::rtl::OString;
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
+
// ============================================================================
// Pivot cache
// ============================================================================
@@ -534,13 +540,13 @@ void XclExpPCField::InsertNumDateGroupItems( const ScDPObject& rDPObj, const ScD
{
// get the string collection with original source elements
ScSheetDPData aDPData( GetDocPtr(), *pSrcDesc );
- const TypedStrCollection& rOrigColl = aDPData.GetColumnEntries( static_cast< long >( GetBaseFieldIndex() ) );
+ const TypedScStrCollection& rOrigColl = aDPData.GetColumnEntries( static_cast< long >( GetBaseFieldIndex() ) );
// get the string collection with generated grouping elements
ScDPNumGroupDimension aTmpDim( rNumInfo );
if( nDatePart != 0 )
aTmpDim.MakeDateHelper( rNumInfo, nDatePart );
- const TypedStrCollection& rGroupColl = aTmpDim.GetNumEntries( rOrigColl, GetDocPtr() );
+ const TypedScStrCollection& rGroupColl = aTmpDim.GetNumEntries( rOrigColl, GetDocPtr() );
for( USHORT nIdx = 0, nCount = rGroupColl.GetCount(); nIdx < nCount; ++nIdx )
if( const TypedStrData* pStrData = rGroupColl[ nIdx ] )
InsertGroupItem( new XclExpPCItem( pStrData->GetString() ) );
@@ -729,6 +735,29 @@ void XclExpPivotCache::Save( XclExpStream& rStrm )
WriteCacheStream();
}
+void XclExpPivotCache::SaveXml( XclExpXmlStream& rStrm )
+{
+ DBG_ASSERT( mbValid, "XclExpPivotCache::Save - invalid pivot cache" );
+ sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
+ OUString sId = OUStringBuffer()
+ .appendAscii("rId")
+ .append( rStrm.GetUniqueIdOUString() )
+ .makeStringAndClear();
+ rWorkbook->startElement( XML_pivotCache,
+ XML_cacheId, OString::valueOf( (sal_Int32)maPCInfo.mnStrmId ).getStr(),
+ FSNS( XML_r, XML_id ), XclXmlUtils::ToOString( sId ).getStr(),
+ FSEND );
+ // SXIDSTM
+ XclExpUInt16Record( EXC_ID_SXIDSTM, maPCInfo.mnStrmId ).SaveXml( rStrm );
+ // SXVS
+ XclExpUInt16Record( EXC_ID_SXVS, EXC_SXVS_SHEET ).SaveXml( rStrm );
+ // DCONREF
+ // OOXTODO: WriteDconref( rStrm );
+ // create the pivot cache storage stream
+ // OOXTODO: WriteCacheStream();
+ rWorkbook->endElement( XML_pivotCache );
+}
+
// private --------------------------------------------------------------------
XclExpPCField* XclExpPivotCache::GetFieldAcc( sal_uInt16 nFieldIdx )
@@ -1504,6 +1533,7 @@ class XclExpPivotRecWrapper : public XclExpRecordBase
public:
explicit XclExpPivotRecWrapper( XclExpPivotTableManager& rPTMgr, SCTAB nScTab );
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
XclExpPivotTableManager& mrPTMgr;
SCTAB mnScTab;
@@ -1523,6 +1553,14 @@ void XclExpPivotRecWrapper::Save( XclExpStream& rStrm )
mrPTMgr.WritePivotTables( rStrm, mnScTab );
}
+void XclExpPivotRecWrapper::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( mnScTab == EXC_PTMGR_PIVOTCACHES )
+ mrPTMgr.WritePivotCachesXml( rStrm );
+ else
+ mrPTMgr.WritePivotTablesXml( rStrm, mnScTab );
+}
+
} // namespace
// ----------------------------------------------------------------------------
@@ -1557,6 +1595,16 @@ void XclExpPivotTableManager::WritePivotCaches( XclExpStream& rStrm )
maPCacheList.Save( rStrm );
}
+void XclExpPivotTableManager::WritePivotCachesXml( XclExpXmlStream& rStrm )
+{
+ if( maPCacheList.IsEmpty() )
+ return;
+ sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
+ rWorkbook->startElement( XML_pivotCaches, FSEND );
+ maPCacheList.SaveXml( rStrm );
+ rWorkbook->endElement( XML_pivotCaches );
+}
+
void XclExpPivotTableManager::WritePivotTables( XclExpStream& rStrm, SCTAB nScTab )
{
for( size_t nPos = 0, nSize = maPTableList.GetSize(); nPos < nSize; ++nPos )
@@ -1567,6 +1615,16 @@ void XclExpPivotTableManager::WritePivotTables( XclExpStream& rStrm, SCTAB nScTa
}
}
+void XclExpPivotTableManager::WritePivotTablesXml( XclExpXmlStream& rStrm, SCTAB nScTab )
+{
+ for( size_t nPos = 0, nSize = maPTableList.GetSize(); nPos < nSize; ++nPos )
+ {
+ XclExpPivotTableRef xPTable = maPTableList.GetRecord( nPos );
+ if( xPTable->GetScTab() == nScTab )
+ xPTable->SaveXml( rStrm );
+ }
+}
+
// private --------------------------------------------------------------------
const XclExpPivotCache* XclExpPivotTableManager::CreatePivotCache( const ScDPObject& rDPObj )
diff --git a/sc/source/filter/excel/xerecord.cxx b/sc/source/filter/excel/xerecord.cxx
index 03746882171b..1ee92c191db9 100644
--- a/sc/source/filter/excel/xerecord.cxx
+++ b/sc/source/filter/excel/xerecord.cxx
@@ -33,6 +33,8 @@
#include "xerecord.hxx"
#include "xeroot.hxx"
+#include <oox/core/tokens.hxx>
+
// Base classes to export Excel records =======================================
XclExpRecordBase::~XclExpRecordBase()
@@ -43,6 +45,10 @@ void XclExpRecordBase::Save( XclExpStream& /*rStrm*/ )
{
}
+void XclExpRecordBase::SaveXml( XclExpXmlStream& /*rStrm*/ )
+{
+}
+
//UNUSED2008-05 void XclExpRecordBase::SaveRepeated( XclExpStream& rStrm, size_t nCount )
//UNUSED2008-05 {
//UNUSED2008-05 for( size_t nIndex = 0; nIndex < nCount; ++nIndex )
@@ -51,6 +57,112 @@ void XclExpRecordBase::Save( XclExpStream& /*rStrm*/ )
// ----------------------------------------------------------------------------
+XclExpDelegatingRecord::XclExpDelegatingRecord( XclExpRecordBase* pRecord )
+ : mpRecord( pRecord )
+{
+}
+
+XclExpDelegatingRecord::~XclExpDelegatingRecord()
+{
+ // Do Nothing; we use Delegating Record for other objects we "know" will
+ // survive...
+}
+
+void XclExpDelegatingRecord::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( !mpRecord )
+ return;
+ mpRecord->SaveXml( rStrm );
+}
+
+// ----------------------------------------------------------------------------
+
+XclExpXmlElementRecord::XclExpXmlElementRecord( sal_Int32 nElement, void (*pAttributes)( XclExpXmlStream& rStrm) )
+ : mnElement( nElement ), mpAttributes( pAttributes )
+{
+}
+
+XclExpXmlElementRecord::~XclExpXmlElementRecord()
+{
+}
+
+// ----------------------------------------------------------------------------
+
+XclExpXmlStartElementRecord::XclExpXmlStartElementRecord( sal_Int32 nElement, void (*pAttributes)( XclExpXmlStream& rStrm) )
+ : XclExpXmlElementRecord( nElement, pAttributes )
+{
+}
+
+XclExpXmlStartElementRecord::~XclExpXmlStartElementRecord()
+{
+}
+
+void XclExpXmlStartElementRecord::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rStream = rStrm.GetCurrentStream();
+ if( ! mpAttributes )
+ {
+ rStream->startElement( mnElement, FSEND );
+ }
+ else
+ {
+ rStream->write( "<" )->writeId( mnElement );
+ (*mpAttributes)( rStrm );
+ }
+}
+
+// ----------------------------------------------------------------------------
+
+XclExpXmlEndElementRecord::XclExpXmlEndElementRecord( sal_Int32 nElement )
+ : XclExpXmlElementRecord( nElement )
+{
+}
+
+XclExpXmlEndElementRecord::~XclExpXmlEndElementRecord()
+{
+}
+
+void XclExpXmlEndElementRecord::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.GetCurrentStream()->endElement( mnElement );
+}
+
+// ----------------------------------------------------------------------------
+
+XclExpXmlStartSingleElementRecord::XclExpXmlStartSingleElementRecord( sal_Int32 nElement, void (*pAttributes)( XclExpXmlStream& rStrm) )
+ : XclExpXmlElementRecord( nElement, pAttributes )
+{
+}
+
+XclExpXmlStartSingleElementRecord::~XclExpXmlStartSingleElementRecord()
+{
+}
+
+void XclExpXmlStartSingleElementRecord::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rStream = rStrm.GetCurrentStream();
+ rStream->write( "<" )->writeId( mnElement );
+ if( mpAttributes )
+ (*mpAttributes)( rStrm );
+}
+
+// ----------------------------------------------------------------------------
+
+XclExpXmlEndSingleElementRecord::XclExpXmlEndSingleElementRecord()
+{
+}
+
+XclExpXmlEndSingleElementRecord::~XclExpXmlEndSingleElementRecord()
+{
+}
+
+void XclExpXmlEndSingleElementRecord::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.GetCurrentStream()->write( "/>" );
+}
+
+// ----------------------------------------------------------------------------
+
XclExpRecord::XclExpRecord( sal_uInt16 nRecId, sal_Size nRecSize ) :
mnRecSize( nRecSize ),
mnRecId( nRecId )
@@ -81,11 +193,34 @@ void XclExpRecord::Save( XclExpStream& rStrm )
// ----------------------------------------------------------------------------
+template<>
+void XclExpValueRecord<double>::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( mnAttribute == -1 )
+ return;
+ rStrm.WriteAttributes(
+ mnAttribute, rtl::OString::valueOf( maValue ).getStr(),
+ FSEND );
+}
+
+// ----------------------------------------------------------------------------
+
void XclExpBoolRecord::WriteBody( XclExpStream& rStrm )
{
rStrm << static_cast< sal_uInt16 >( mbValue ? 1 : 0 );
}
+void XclExpBoolRecord::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( mnAttribute == -1 )
+ return;
+
+ rStrm.WriteAttributes(
+ // HACK: HIDEOBJ (excdoc.cxx) should be its own object to handle XML_showObjects
+ mnAttribute, mnAttribute == XML_showObjects ? "all" : XclXmlUtils::ToPsz( mbValue ),
+ FSEND );
+}
+
// ----------------------------------------------------------------------------
XclExpDummyRecord::XclExpDummyRecord( sal_uInt16 nRecId, const void* pRecData, sal_Size nRecSize ) :
diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx
index ee023f7619e0..100f1bc54af1 100644
--- a/sc/source/filter/excel/xeroot.cxx
+++ b/sc/source/filter/excel/xeroot.cxx
@@ -30,17 +30,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include "xeroot.hxx"
#include <sfx2/docfile.hxx>
#include <svtools/saveopt.hxx>
+#include "xecontent.hxx"
#include "xltracer.hxx"
#include "xehelper.hxx"
#include "xeformula.hxx"
#include "xelink.hxx"
#include "xename.hxx"
#include "xestyle.hxx"
-#include "xecontent.hxx"
#include "xepivot.hxx"
+#include "xeroot.hxx"
// for filter manager
#include "excrecds.hxx"
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 03554efd68eb..b9ab0916ce12 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -29,11 +29,39 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <utility>
+
+#include <rtl/ustring.hxx>
+#include <sax/fshelper.hxx>
+#include <unotools/streamwrap.hxx>
+
#include "precompiled_sc.hxx"
+#include "docuno.hxx"
#include "xestream.hxx"
+#include "xladdress.hxx"
#include "xlstring.hxx"
#include "xeroot.hxx"
-
+#include "xestyle.hxx"
+#include "rangelst.hxx"
+#include "compiler.hxx"
+
+#include <oox/core/tokens.hxx>
+
+using ::com::sun::star::beans::PropertyValue;
+using ::com::sun::star::io::XOutputStream;
+using ::com::sun::star::io::XStream;
+using ::com::sun::star::lang::XComponent;
+using ::com::sun::star::lang::XMultiServiceFactory;
+using ::com::sun::star::lang::XServiceInfo;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::rtl::OString;
+using ::rtl::OUString;
+using ::utl::OStreamWrapper;
// ============================================================================
@@ -327,3 +355,368 @@ void XclExpStream::WriteRawZeroBytes( sal_Size nBytes )
// ============================================================================
+rtl::OUString XclXmlUtils::GetStreamName( const char* sStreamDir, const char* sStream, sal_Int32 nId )
+{
+ rtl::OUStringBuffer sBuf;
+ if( sStreamDir )
+ sBuf.appendAscii( sStreamDir );
+ sBuf.appendAscii( sStream );
+ if( nId )
+ sBuf.append( nId );
+ sBuf.appendAscii( ".xml" );
+ return sBuf.makeStringAndClear();
+}
+
+rtl::OString XclXmlUtils::ToOString( const Color& rColor )
+{
+ char buf[9];
+ sprintf( buf, "%.2X%.2X%.2X%.2X", rColor.GetTransparency(), rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue() );
+ buf[8] = '\0';
+ return OString( buf );
+}
+
+rtl::OString XclXmlUtils::ToOString( const ::rtl::OUString& s )
+{
+ return OUStringToOString( s, RTL_TEXTENCODING_UTF8 );
+}
+
+rtl::OString XclXmlUtils::ToOString( const String& s )
+{
+ return rtl::OString( s.GetBuffer(), s.Len(), RTL_TEXTENCODING_UTF8 );
+}
+
+rtl::OString XclXmlUtils::ToOString( const ScAddress& rAddress )
+{
+ String sAddress;
+ rAddress.Format( sAddress, SCA_VALID, NULL, ScAddress::Details( ScAddress::CONV_XL_A1 ) );
+ return ToOString( sAddress );
+}
+
+rtl::OString XclXmlUtils::ToOString( const ScfUInt16Vec& rBuffer )
+{
+ const sal_uInt16* pBuffer = &rBuffer [0];
+ return ::rtl::OString( pBuffer, rBuffer.size(), RTL_TEXTENCODING_UTF8 );
+}
+
+rtl::OString XclXmlUtils::ToOString( const ScRange& rRange )
+{
+ String sRange;
+ rRange.Format( sRange, SCA_VALID, NULL, ScAddress::Details( ScAddress::CONV_XL_A1 ) );
+ return ToOString( sRange );
+}
+
+rtl::OString XclXmlUtils::ToOString( const ScRangeList& rRangeList )
+{
+ String s;
+ rRangeList.Format( s, SCA_VALID, NULL, ScAddress::CONV_XL_A1, ' ' );
+ return ToOString( s );
+}
+
+static ScAddress lcl_ToAddress( const XclAddress& rAddress )
+{
+ ScAddress aAddress;
+
+ // For some reason, ScRange::Format() returns omits row numbers if
+ // the row is >= MAXROW or the column is >= MAXCOL, and Excel doesn't
+ // like "A:IV" (i.e. no row numbers). Prevent this.
+ aAddress.SetRow( std::min<sal_Int32>( rAddress.mnRow, MAXROW-1 ) );
+ aAddress.SetCol( std::min<sal_Int32>( rAddress.mnCol, MAXCOL-1 ) );
+
+ return aAddress;
+}
+
+rtl::OString XclXmlUtils::ToOString( const XclAddress& rAddress )
+{
+ return ToOString( lcl_ToAddress( rAddress ) );
+}
+
+rtl::OString XclXmlUtils::ToOString( const XclExpString& s )
+{
+ DBG_ASSERT( !s.IsRich(), "XclXmlUtils::ToOString(XclExpString): rich text string found!" );
+ return ToOString( s.GetUnicodeBuffer() );
+}
+
+static ScRange lcl_ToRange( const XclRange& rRange )
+{
+ ScRange aRange;
+
+ aRange.aStart = lcl_ToAddress( rRange.maFirst );
+ aRange.aEnd = lcl_ToAddress( rRange.maLast );
+
+ return aRange;
+}
+
+rtl::OString XclXmlUtils::ToOString( const XclRangeList& rRanges )
+{
+ ScRangeList aRanges;
+ for( XclRangeList::const_iterator i = rRanges.begin(), end = rRanges.end();
+ i != end; ++i )
+ {
+ aRanges.Append( lcl_ToRange( *i ) );
+ }
+ return ToOString( aRanges );
+}
+
+OUString XclXmlUtils::ToOUString( const char* s )
+{
+ return OUString( s, (sal_Int32) strlen( s ), RTL_TEXTENCODING_ASCII_US );
+}
+
+OUString XclXmlUtils::ToOUString( const ScfUInt16Vec& rBuf, sal_Int32 nStart, sal_Int32 nLength )
+{
+ if( nLength == -1 )
+ nLength = rBuf.size();
+
+ return OUString( &rBuf[nStart], nLength );
+}
+
+OUString XclXmlUtils::ToOUString( const String& s )
+{
+ return OUString( s.GetBuffer(), s.Len() );
+}
+
+rtl::OUString XclXmlUtils::ToOUString( ScDocument& rDocument, const ScAddress& rAddress, ScTokenArray* pTokenArray )
+{
+ ScCompiler aCompiler( &rDocument, rAddress, *pTokenArray, ScGrammar::GRAM_NATIVE_XL_A1 );
+ String s;
+ aCompiler.CreateStringFromTokenArray( s );
+ return ToOUString( s );
+}
+
+OUString XclXmlUtils::ToOUString( const XclExpString& s )
+{
+ DBG_ASSERT( !s.IsRich(), "XclXmlUtils::ToOString(XclExpString): rich text string found!" );
+ return ToOUString( s.GetUnicodeBuffer() );
+}
+
+const char* XclXmlUtils::ToPsz( bool b )
+{
+ return b ? "true" : "false";
+}
+
+// ============================================================================
+
+XclExpXmlStream::XclExpXmlStream( const Reference< XMultiServiceFactory >& rSMgr, SvStream& rStrm, const XclExpRoot& rRoot )
+ : XmlFilterBase( rSMgr )
+ , mrRoot( rRoot )
+{
+ Sequence< PropertyValue > aArgs( 1 );
+ const OUString sStream( RTL_CONSTASCII_USTRINGPARAM( "StreamForOutput" ) );
+ aArgs[0].Name = sStream;
+ aArgs[0].Value <<= Reference< XStream > ( new OStreamWrapper( rStrm ) );
+
+ XServiceInfo* pInfo = rRoot.GetDocModelObj();
+ Reference< XComponent > aComponent( pInfo, UNO_QUERY );
+ setSourceDocument( aComponent );
+ filter( aArgs );
+
+ PushStream( CreateOutputStream(
+ OUString::createFromAscii( "xl/workbook.xml" ),
+ OUString::createFromAscii( "xl/workbook.xml" ),
+ Reference< XOutputStream >(),
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" ) );
+}
+
+XclExpXmlStream::~XclExpXmlStream()
+{
+}
+
+sax_fastparser::FSHelperPtr& XclExpXmlStream::GetCurrentStream()
+{
+ DBG_ASSERT( !maStreams.empty(), "XclExpXmlStream::GetCurrentStream - no current stream" );
+ return maStreams.top();
+}
+
+void XclExpXmlStream::PushStream( sax_fastparser::FSHelperPtr aStream )
+{
+ maStreams.push( aStream );
+}
+
+void XclExpXmlStream::PopStream()
+{
+ DBG_ASSERT( !maStreams.empty(), "XclExpXmlStream::PopStream - stack is empty!" );
+ maStreams.pop();
+}
+
+OUString XclExpXmlStream::GetIdForPath( const OUString& sPath )
+{
+ if( maOpenedStreamMap.find( sPath ) == maOpenedStreamMap.end() )
+ return OUString();
+ return maOpenedStreamMap[ sPath ].first;
+}
+
+sax_fastparser::FSHelperPtr XclExpXmlStream::GetStreamForPath( const OUString& sPath )
+{
+ if( maOpenedStreamMap.find( sPath ) == maOpenedStreamMap.end() )
+ return sax_fastparser::FSHelperPtr();
+ return maOpenedStreamMap[ sPath ].second;
+}
+
+sax_fastparser::FSHelperPtr& XclExpXmlStream::WriteAttributes( sal_Int32 nAttribute, ... )
+{
+ sax_fastparser::FSHelperPtr& rStream = GetCurrentStream();
+
+ va_list args;
+ va_start( args, nAttribute );
+ do {
+ const char* pValue = va_arg( args, const char* );
+ if( pValue )
+ {
+ rStream->write( " " )
+ ->writeId( nAttribute )
+ ->write( "=\"" )
+ ->writeEscaped( pValue )
+ ->write( "\"" );
+ }
+
+ nAttribute = va_arg( args, sal_Int32 );
+ if( nAttribute == FSEND )
+ break;
+ } while( true );
+ va_end( args );
+
+ return rStream;
+}
+
+static void lcl_WriteValue( sax_fastparser::FSHelperPtr& rStream, sal_Int32 nElement, const char* pValue )
+{
+ if( !pValue )
+ return;
+ rStream->singleElement( nElement,
+ XML_val, pValue,
+ FSEND );
+}
+
+static const char* lcl_GetUnderlineStyle( FontUnderline eUnderline, bool& bHaveUnderline )
+{
+ bHaveUnderline = true;
+ switch( eUnderline )
+ {
+ // OOXTODO: doubleAccounting, singleAccounting
+ // OOXTODO: what should be done with the other FontUnderline values?
+ case UNDERLINE_SINGLE: return "single";
+ case UNDERLINE_DOUBLE: return "double";
+ case UNDERLINE_NONE:
+ default: bHaveUnderline = false; return "none";
+ }
+}
+
+static const char* lcl_ToVerticalAlignmentRun( SvxEscapement eEscapement, bool& bHaveAlignment )
+{
+ bHaveAlignment = true;
+ switch( eEscapement )
+ {
+ case SVX_ESCAPEMENT_SUPERSCRIPT: return "superscript";
+ case SVX_ESCAPEMENT_SUBSCRIPT: return "subscript";
+ case SVX_ESCAPEMENT_OFF:
+ default: bHaveAlignment = false; return "baseline";
+ }
+}
+
+sax_fastparser::FSHelperPtr& XclExpXmlStream::WriteFontData( const XclFontData& rFontData, sal_Int32 nFontId )
+{
+ bool bHaveUnderline, bHaveVertAlign;
+ const char* pUnderline = lcl_GetUnderlineStyle( rFontData.GetScUnderline(), bHaveUnderline );
+ const char* pVertAlign = lcl_ToVerticalAlignmentRun( rFontData.GetScEscapement(), bHaveVertAlign );
+
+ sax_fastparser::FSHelperPtr& rStream = GetCurrentStream();
+
+ lcl_WriteValue( rStream, nFontId, XclXmlUtils::ToOString( rFontData.maName ).getStr() );
+ lcl_WriteValue( rStream, XML_charset, rFontData.mnCharSet != 0 ? OString::valueOf( (sal_Int32) rFontData.mnCharSet ).getStr() : NULL );
+ lcl_WriteValue( rStream, XML_family, OString::valueOf( (sal_Int32) rFontData.mnFamily ).getStr() );
+ lcl_WriteValue( rStream, XML_b, rFontData.mnWeight > 400 ? XclXmlUtils::ToPsz( rFontData.mnWeight > 400 ) : NULL );
+ lcl_WriteValue( rStream, XML_i, rFontData.mbItalic ? XclXmlUtils::ToPsz( rFontData.mbItalic ) : NULL );
+ lcl_WriteValue( rStream, XML_strike, rFontData.mbStrikeout ? XclXmlUtils::ToPsz( rFontData.mbStrikeout ) : NULL );
+ lcl_WriteValue( rStream, XML_outline, rFontData.mbOutline ? XclXmlUtils::ToPsz( rFontData.mbOutline ) : NULL );
+ lcl_WriteValue( rStream, XML_shadow, rFontData.mbShadow ? XclXmlUtils::ToPsz( rFontData.mbShadow ) : NULL );
+ // OOXTODO: lcl_WriteValue( rStream, XML_condense, ); // mac compatibility setting
+ // OOXTODO: lcl_WriteValue( rStream, XML_extend, ); // compatibility setting
+ if( rFontData.maColor != Color( 0xFF, 0xFF, 0xFF, 0xFF ) )
+ rStream->singleElement( XML_color,
+ // OOXTODO: XML_auto, bool
+ // OOXTODO: XML_indexed, uint
+ XML_rgb, XclXmlUtils::ToOString( rFontData.maColor ).getStr(),
+ // OOXTODO: XML_theme, index into <clrScheme/>
+ // OOXTODO: XML_tint, double
+ FSEND );
+ lcl_WriteValue( rStream, XML_sz, OString::valueOf( (double) (rFontData.mnHeight / 20.0) ) ); // Twips->Pt
+ lcl_WriteValue( rStream, XML_u, bHaveUnderline ? pUnderline : NULL );
+ lcl_WriteValue( rStream, XML_vertAlign, bHaveVertAlign ? pVertAlign : NULL );
+
+ return rStream;
+}
+
+sax_fastparser::FSHelperPtr XclExpXmlStream::CreateOutputStream (
+ const OUString& sFullStream,
+ const OUString& sRelativeStream,
+ const Reference< XOutputStream >& xParentRelation,
+ const char* sContentType,
+ const char* sRelationshipType,
+ ::rtl::OUString* pRelationshipId )
+{
+ OUString sRelationshipId;
+ if (xParentRelation.is())
+ sRelationshipId = addRelation( xParentRelation, OUString::createFromAscii( sRelationshipType), sRelativeStream );
+ else
+ sRelationshipId = addRelation( OUString::createFromAscii( sRelationshipType ), sRelativeStream );
+
+ if( pRelationshipId )
+ *pRelationshipId = sRelationshipId;
+
+ sax_fastparser::FSHelperPtr p = openOutputStreamWithSerializer( sFullStream, OUString::createFromAscii( sContentType ) );
+
+ maOpenedStreamMap[ sFullStream ] = std::make_pair( sRelationshipId, p );
+
+ return p;
+}
+
+bool XclExpXmlStream::importDocument() throw()
+{
+ return false;
+}
+
+sal_Int32 XclExpXmlStream::getSchemeClr( sal_Int32 /*nColorSchemeToken*/ ) const
+{
+ return -1;
+}
+
+const oox::vml::DrawingPtr XclExpXmlStream::getDrawings()
+{
+ return oox::vml::DrawingPtr();
+}
+
+const oox::drawingml::Theme* XclExpXmlStream::getCurrentTheme() const
+{
+ return NULL;
+}
+
+const oox::drawingml::table::TableStyleListPtr XclExpXmlStream::getTableStyles()
+{
+ return oox::drawingml::table::TableStyleListPtr();
+}
+
+oox::drawingml::chart::ChartConverter& XclExpXmlStream::getChartConverter()
+{
+ // DO NOT CALL
+ return * (oox::drawingml::chart::ChartConverter*) NULL;
+}
+
+bool XclExpXmlStream::exportDocument() throw()
+{
+ return false;
+}
+
+::rtl::OUString XclExpXmlStream::implGetImplementationName() const
+{
+ return CREATE_OUSTRING( "TODO" );
+}
+
+void XclExpXmlStream::Trace( const char* format, ...)
+{
+ va_list ap;
+ va_start( ap, format );
+ vfprintf( stderr, format, ap );
+ va_end( ap );
+}
+
diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx
index f50b5bf6a24e..af066c20d0b6 100644
--- a/sc/source/filter/excel/xestring.cxx
+++ b/sc/source/filter/excel/xestring.cxx
@@ -30,12 +30,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include "xestring.hxx"
#include <algorithm>
-#include "xlstyle.hxx"
+#include <stdio.h>
#include "xestream.hxx"
+#include "xlstyle.hxx"
+#include "xestyle.hxx"
+#include "xestring.hxx"
+#include <oox/core/tokens.hxx>
+
+using ::rtl::OString;
using ::rtl::OUString;
// ============================================================================
@@ -475,6 +480,58 @@ void XclExpString::WriteToMem( sal_uInt8* pnMem ) const
WriteBufferToMem( pnMem + GetHeaderSize() );
}
+static sal_uInt16 lcl_WriteRun( XclExpXmlStream& rStrm, const ScfUInt16Vec& rBuffer, sal_uInt16 nStart, sal_Int32 nLength, const XclExpFont* pFont )
+{
+ if( nLength == 0 )
+ return nStart;
+
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+
+ rWorksheet->startElement( XML_r, FSEND );
+ if( pFont )
+ {
+ const XclFontData& rFontData = pFont->GetFontData();
+ rWorksheet->startElement( XML_rPr, FSEND );
+ rStrm.WriteFontData( rFontData, XML_rFont );
+ rWorksheet->endElement( XML_rPr );
+ }
+ rWorksheet->startElement( XML_t,
+ FSNS( XML_xml, XML_space ), "preserve",
+ FSEND );
+ rWorksheet->writeEscaped( XclXmlUtils::ToOUString( rBuffer, nStart, nLength ) );
+ rWorksheet->endElement( XML_t );
+ rWorksheet->endElement( XML_r );
+ return nStart + nLength;
+}
+
+void XclExpString::WriteXml( XclExpXmlStream& rStrm ) const
+{
+ sax_fastparser::FSHelperPtr rWorksheet = rStrm.GetCurrentStream();
+
+ if( !IsWriteFormats() )
+ {
+ rWorksheet->startElement( XML_t, FSEND );
+ rWorksheet->writeEscaped( XclXmlUtils::ToOUString( *this ) );
+ rWorksheet->endElement( XML_t );
+ }
+ else
+ {
+ XclExpFontBuffer& rFonts = rStrm.GetRoot().GetFontBuffer();
+ XclFormatRunVec::const_iterator aIt = maFormats.begin(), aEnd = maFormats.end();
+
+ sal_uInt16 nStart = 0;
+ const XclExpFont* pFont = NULL;
+ for ( ; aIt != aEnd; ++aIt )
+ {
+ nStart = lcl_WriteRun( rStrm, GetUnicodeBuffer(),
+ nStart, aIt->mnChar-nStart, pFont );
+ pFont = rFonts.GetFont( aIt->mnFontIdx );
+ }
+ lcl_WriteRun( rStrm, GetUnicodeBuffer(),
+ nStart, GetUnicodeBuffer().size() - nStart, pFont );
+ }
+}
+
// ----------------------------------------------------------------------------
bool XclExpString::IsWriteFlags() const
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 7d90b3f870cf..a9da62f838cc 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -33,6 +33,8 @@
#include "xestyle.hxx"
#include <algorithm>
+#include <iterator>
+#include <set>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <vcl/font.hxx>
#include <svtools/zformat.hxx>
@@ -56,6 +58,11 @@
#include "globstr.hrc"
#include "xestring.hxx"
+#include <oox/core/tokens.hxx>
+
+using ::rtl::OString;
+using ::rtl::OUString;
+
// PALETTE record - color information =========================================
namespace {
@@ -264,6 +271,7 @@ public:
bool IsDefaultPalette() const;
/** Writes the color list (contents of the palette record) to the passed stream. */
void WriteBody( XclExpStream& rStrm );
+ void SaveXml( XclExpXmlStream& rStrm );
private:
/** Returns the Excel index of a 0-based color index. */
@@ -494,6 +502,22 @@ void XclExpPaletteImpl::WriteBody( XclExpStream& rStrm )
rStrm << aIt->maColor;
}
+void XclExpPaletteImpl::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( !maPalette.size() )
+ return;
+
+ sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
+ rStyleSheet->startElement( XML_colors, FSEND );
+ rStyleSheet->startElement( XML_indexedColors, FSEND );
+ for( XclPaletteColorVec::const_iterator aIt = maPalette.begin(), aEnd = maPalette.end(); aIt != aEnd; ++aIt )
+ rStyleSheet->singleElement( XML_rgbColor,
+ XML_rgb, XclXmlUtils::ToOString( aIt->maColor ).getStr(),
+ FSEND );
+ rStyleSheet->endElement( XML_indexedColors );
+ rStyleSheet->endElement( XML_colors );
+}
+
const Color& XclExpPaletteImpl::GetOriginalColor( sal_uInt32 nColorId ) const
{
if( nColorId < maColorIdDataVec.size() )
@@ -784,6 +808,12 @@ void XclExpPalette::Save( XclExpStream& rStrm )
XclExpRecord::Save( rStrm );
}
+void XclExpPalette::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( !mxImpl->IsDefaultPalette() )
+ mxImpl->SaveXml( rStrm );
+}
+
void XclExpPalette::WriteBody( XclExpStream& rStrm )
{
mxImpl->WriteBody( rStrm );
@@ -834,6 +864,15 @@ bool XclExpFont::Equals( const XclFontData& rFontData, sal_uInt32 nHash ) const
return (mnHash == nHash) && (maData == rFontData);
}
+void XclExpFont::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
+ rStyleSheet->startElement( XML_font, FSEND );
+ rStrm.WriteFontData( maData, XML_name );
+ // OOXTODO: XML_scheme; //scheme/@val values: "major", "minor", "none"
+ rStyleSheet->endElement( XML_font );
+}
+
// private --------------------------------------------------------------------
void XclExpFont::WriteBody( XclExpStream& rStrm )
@@ -968,6 +1007,21 @@ void XclExpFontBuffer::Save( XclExpStream& rStrm )
maFontList.Save( rStrm );
}
+void XclExpFontBuffer::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( maFontList.IsEmpty() )
+ return;
+
+ sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
+ rStyleSheet->startElement( XML_fonts,
+ XML_count, OString::valueOf( (sal_Int32) maFontList.GetSize() ).getStr(),
+ FSEND );
+
+ maFontList.SaveXml( rStrm );
+
+ rStyleSheet->endElement( XML_fonts );
+}
+
sal_Int16 XclExpFontBuffer::GetFirstUsedScript( const SfxItemSet& rItemSet )
{
/* #i17050# We need to determine if a CJK or CTL font item is set in the
@@ -1090,8 +1144,9 @@ void XclExpFontBuffer::InitDefaultFonts()
maFontList.AppendRecord( xFont );
maFontList.AppendRecord( xFont );
maFontList.AppendRecord( xFont );
- // the blind font with index 4
- maFontList.AppendNewRecord( new XclExpBlindFont( GetRoot() ) );
+ if( GetOutput() == EXC_OUTPUT_BINARY )
+ // the blind font with index 4
+ maFontList.AppendNewRecord( new XclExpBlindFont( GetRoot() ) );
}
break;
default:
@@ -1176,6 +1231,25 @@ void XclExpNumFmtBuffer::Save( XclExpStream& rStrm )
WriteFormatRecord( rStrm, *aIt );
}
+void XclExpNumFmtBuffer::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( !maFormatMap.size() )
+ return;
+
+ sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
+ rStyleSheet->startElement( XML_numFmts,
+ XML_count, OString::valueOf( (sal_Int32) maFormatMap.size() ).getStr(),
+ FSEND );
+ for( XclExpNumFmtVec::const_iterator aIt = maFormatMap.begin(), aEnd = maFormatMap.end(); aIt != aEnd; ++aIt )
+ {
+ rStyleSheet->singleElement( XML_numFmt,
+ XML_numFmtId, OString::valueOf( sal_Int32(aIt->mnXclNumFmt) ).getStr(),
+ XML_formatCode, XclXmlUtils::ToOString( GetFormatCode( *aIt ) ).getStr(),
+ FSEND );
+ }
+ rStyleSheet->endElement( XML_numFmts );
+}
+
void XclExpNumFmtBuffer::WriteFormatRecord( XclExpStream& rStrm, sal_uInt16 nXclNumFmt, const String& rFormatStr )
{
XclExpString aExpStr;
@@ -1191,6 +1265,11 @@ void XclExpNumFmtBuffer::WriteFormatRecord( XclExpStream& rStrm, sal_uInt16 nXcl
void XclExpNumFmtBuffer::WriteFormatRecord( XclExpStream& rStrm, const XclExpNumFmt& rFormat )
{
+ WriteFormatRecord( rStrm, rFormat.mnXclNumFmt, GetFormatCode( rFormat ) );
+}
+
+String XclExpNumFmtBuffer::GetFormatCode( const XclExpNumFmt& rFormat )
+{
String aFormatStr;
if( const SvNumberformat* pEntry = GetFormatter().GetEntry( rFormat.mnScNumFmt ) )
@@ -1230,7 +1309,7 @@ void XclExpNumFmtBuffer::WriteFormatRecord( XclExpStream& rStrm, const XclExpNum
aFormatStr.AssignAscii( "General" );
}
- WriteFormatRecord( rStrm, rFormat.mnXclNumFmt, aFormatStr );
+ return aFormatStr;
}
// XF, STYLE record - Cell formatting =========================================
@@ -1257,6 +1336,14 @@ void XclExpCellProt::FillToXF3( sal_uInt16& rnProt ) const
::set_flag( rnProt, EXC_XF_HIDDEN, mbHidden );
}
+void XclExpCellProt::SaveXml( XclExpXmlStream& rStrm ) const
+{
+ rStrm.GetCurrentStream()->singleElement( XML_protection,
+ XML_locked, XclXmlUtils::ToPsz( mbLocked ),
+ XML_hidden, XclXmlUtils::ToPsz( mbHidden ),
+ FSEND );
+}
+
// ----------------------------------------------------------------------------
bool XclExpCellAlign::FillFromItemSet(
@@ -1369,6 +1456,50 @@ void XclExpCellAlign::FillToXF8( sal_uInt16& rnAlign, sal_uInt16& rnMiscAttrib )
::insert_value( rnMiscAttrib, mnTextDir, 6, 2 );
}
+static const char* ToHorizontalAlignment( sal_uInt8 nHorAlign )
+{
+ switch( nHorAlign )
+ {
+ case EXC_XF_HOR_GENERAL: return "general";
+ case EXC_XF_HOR_LEFT: return "left";
+ case EXC_XF_HOR_CENTER: return "center";
+ case EXC_XF_HOR_RIGHT: return "right";
+ case EXC_XF_HOR_FILL: return "fill";
+ case EXC_XF_HOR_JUSTIFY: return "justify";
+ case EXC_XF_HOR_CENTER_AS: return "centerContinuous";
+ case EXC_XF_HOR_DISTRIB: return "distributed";
+ }
+ return "*unknown*";
+}
+
+static const char* ToVerticalAlignment( sal_uInt8 nVerAlign )
+{
+ switch( nVerAlign )
+ {
+ case EXC_XF_VER_TOP: return "top";
+ case EXC_XF_VER_CENTER: return "center";
+ case EXC_XF_VER_BOTTOM: return "bottom";
+ case EXC_XF_VER_JUSTIFY: return "justify";
+ case EXC_XF_VER_DISTRIB: return "distributed";
+ }
+ return "*unknown*";
+}
+
+void XclExpCellAlign::SaveXml( XclExpXmlStream& rStrm ) const
+{
+ rStrm.GetCurrentStream()->singleElement( XML_alignment,
+ XML_horizontal, ToHorizontalAlignment( mnHorAlign ),
+ XML_vertical, ToVerticalAlignment( mnVerAlign ),
+ XML_textRotation, OString::valueOf( (sal_Int32) mnRotation ).getStr(),
+ XML_wrapText, XclXmlUtils::ToPsz( mbLineBreak ),
+ XML_indent, OString::valueOf( (sal_Int32) mnIndent ).getStr(),
+ // OOXTODO: XML_relativeIndent, mnIndent?
+ // OOXTODO: XML_justifyLastLine,
+ XML_shrinkToFit, XclXmlUtils::ToPsz( mbShrink ),
+ // OOXTODO: XML_readingOrder,
+ FSEND );
+}
+
// ----------------------------------------------------------------------------
namespace {
@@ -1439,7 +1570,7 @@ bool XclExpCellBorder::FillFromItemSet(
lclGetBorderLine( nBLTRLine, nBLTRColorId, rBLTRItem.GetLine(), rPalette, eBiff );
mbDiagBLtoTR = (nBLTRLine != EXC_LINE_NONE);
- if( ::HasPriority( rTLBRItem.GetLine(), rBLTRItem.GetLine() ) )
+ if( ::ScHasPriority( rTLBRItem.GetLine(), rBLTRItem.GetLine() ) )
{
mnDiagLine = nTLBRLine;
mnDiagColorId = nTLBRColorId;
@@ -1545,6 +1676,61 @@ void XclExpCellBorder::FillToCF8( sal_uInt16& rnLine, sal_uInt32& rnColor ) cons
::insert_value( rnColor, mnBottomColor, 23, 7 );
}
+static const char* ToLineStyle( sal_uInt8 nLineStyle )
+{
+ switch( nLineStyle )
+ {
+ case EXC_LINE_NONE: return "none";
+ case EXC_LINE_THIN: return "thin";
+ case EXC_LINE_MEDIUM: return "medium";
+ case EXC_LINE_THICK: return "thick";
+ case EXC_LINE_DOUBLE: return "double";
+ case EXC_LINE_HAIR: return "hair";
+ }
+ return "*unknown*";
+}
+
+static void lcl_WriteBorder( XclExpXmlStream& rStrm, sal_Int32 nElement, sal_uInt8 nLineStyle, const Color& rColor )
+{
+ sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
+ if( nLineStyle == EXC_LINE_NONE )
+ rStyleSheet->singleElement( nElement, FSEND );
+ else if( rColor == Color( 0, 0, 0, 0 ) )
+ rStyleSheet->singleElement( nElement,
+ XML_style, ToLineStyle( nLineStyle ),
+ FSEND );
+ else
+ {
+ rStyleSheet->startElement( nElement,
+ XML_style, ToLineStyle( nLineStyle ),
+ FSEND );
+ rStyleSheet->singleElement( XML_color,
+ XML_rgb, XclXmlUtils::ToOString( rColor ).getStr(),
+ FSEND );
+ rStyleSheet->endElement( nElement );
+ }
+}
+
+void XclExpCellBorder::SaveXml( XclExpXmlStream& rStrm ) const
+{
+ sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
+
+ XclExpPalette& rPalette = rStrm.GetRoot().GetPalette();
+
+ rStyleSheet->startElement( XML_border,
+ XML_diagonalUp, XclXmlUtils::ToPsz( mbDiagBLtoTR ),
+ XML_diagonalDown, XclXmlUtils::ToPsz( mbDiagTLtoBR ),
+ // OOXTODO: XML_outline,
+ FSEND );
+ lcl_WriteBorder( rStrm, XML_left, mnLeftLine, rPalette.GetColor( mnLeftColor ) );
+ lcl_WriteBorder( rStrm, XML_right, mnRightLine, rPalette.GetColor( mnRightColor ) );
+ lcl_WriteBorder( rStrm, XML_top, mnTopLine, rPalette.GetColor( mnTopColor ) );
+ lcl_WriteBorder( rStrm, XML_bottom, mnBottomLine, rPalette.GetColor( mnBottomColor ) );
+ lcl_WriteBorder( rStrm, XML_diagonal, mnDiagLine, rPalette.GetColor( mnDiagColor ) );
+ // OOXTODO: XML_vertical, XML_horizontal
+ rStyleSheet->endElement( XML_border );
+}
+
// ----------------------------------------------------------------------------
XclExpCellArea::XclExpCellArea() :
@@ -1616,6 +1802,52 @@ void XclExpCellArea::FillToCF8( sal_uInt16& rnPattern, sal_uInt16& rnColor ) con
::insert_value( rnPattern, aTmp.mnPattern, 10, 6 );
}
+static const char* ToPatternType( sal_uInt8 nPattern )
+{
+ switch( nPattern )
+ {
+ case EXC_PATT_NONE: return "none";
+ case EXC_PATT_SOLID: return "solid";
+ case EXC_PATT_50_PERC: return "mediumGray";
+ case EXC_PATT_75_PERC: return "darkGray";
+ case EXC_PATT_25_PERC: return "lightGray";
+ case EXC_PATT_12_5_PERC: return "gray125";
+ case EXC_PATT_6_25_PERC: return "gray0625";
+ }
+ return "*unknown*";
+}
+
+void XclExpCellArea::SaveXml( XclExpXmlStream& rStrm ) const
+{
+ sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
+ rStyleSheet->startElement( XML_fill,
+ FSEND );
+
+ // OOXTODO: XML_gradientFill
+
+ XclExpPalette& rPalette = rStrm.GetRoot().GetPalette();
+
+ if( mnPattern == EXC_PATT_NONE || ( mnForeColor == 0 && mnBackColor == 0 ) )
+ rStyleSheet->singleElement( XML_patternFill,
+ XML_patternType, ToPatternType( mnPattern ),
+ FSEND );
+ else
+ {
+ rStyleSheet->startElement( XML_patternFill,
+ XML_patternType, ToPatternType( mnPattern ),
+ FSEND );
+ rStyleSheet->singleElement( XML_fgColor,
+ XML_rgb, XclXmlUtils::ToOString( rPalette.GetColor( mnForeColor ) ).getStr(),
+ FSEND );
+ rStyleSheet->singleElement( XML_bgColor,
+ XML_rgb, XclXmlUtils::ToOString( rPalette.GetColor( mnBackColor ) ).getStr(),
+ FSEND );
+ rStyleSheet->endElement( XML_patternFill );
+ }
+
+ rStyleSheet->endElement( XML_fill );
+}
+
// ----------------------------------------------------------------------------
XclExpXFId::XclExpXFId() :
@@ -1804,6 +2036,46 @@ void XclExpXF::WriteBody( XclExpStream& rStrm )
}
}
+void XclExpXF::SetXmlIds( sal_uInt32 nBorderId, sal_uInt32 nFillId )
+{
+ mnBorderId = nBorderId;
+ mnFillId = nFillId;
+}
+
+void XclExpXF::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
+
+ sal_Int32 nXfId = 0;
+ if( IsCellXF() )
+ {
+ sal_uInt16 nXFIndex = rStrm.GetRoot().GetXFBuffer().GetXFIndex( mnParentXFId );
+ nXfId = rStrm.GetRoot().GetXFBuffer().GetXmlStyleIndex( nXFIndex );
+ }
+
+ rStyleSheet->startElement( XML_xf,
+ XML_numFmtId, OString::valueOf( (sal_Int32) mnXclNumFmt ).getStr(),
+ XML_fontId, OString::valueOf( (sal_Int32) mnXclFont ).getStr(),
+ XML_fillId, OString::valueOf( (sal_Int32) mnFillId ).getStr(),
+ XML_borderId, OString::valueOf( (sal_Int32) mnBorderId ).getStr(),
+ XML_xfId, IsStyleXF() ? NULL : OString::valueOf( nXfId ).getStr(),
+ // OOXTODO: XML_quotePrefix,
+ // OOXTODO: XML_pivotButton,
+ // OOXTODO: XML_applyNumberFormat, ;
+ XML_applyFont, XclXmlUtils::ToPsz( mbFontUsed ),
+ // OOXTODO: XML_applyFill,
+ XML_applyBorder, XclXmlUtils::ToPsz( mbBorderUsed ),
+ XML_applyAlignment, XclXmlUtils::ToPsz( mbAlignUsed ),
+ XML_applyProtection, XclXmlUtils::ToPsz( mbProtUsed ),
+ FSEND );
+ if( mbAlignUsed )
+ maAlignment.SaveXml( rStrm );
+ if( mbProtUsed )
+ maProtection.SaveXml( rStrm );
+ // OOXTODO: XML_extLst
+ rStyleSheet->endElement( XML_xf );
+}
+
// ----------------------------------------------------------------------------
XclExpDefaultXF::XclExpDefaultXF( const XclExpRoot& rRoot, bool bCellXF ) :
@@ -1912,6 +2184,41 @@ void XclExpStyle::WriteBody( XclExpStream& rStrm )
}
}
+static const char* lcl_StyleNameFromId( sal_Int32 nStyleId )
+{
+ switch( nStyleId )
+ {
+ case 0: return "Normal";
+ case 3: return "Comma";
+ case 4: return "Currency";
+ case 5: return "Percent";
+ case 6: return "Comma [0]";
+ case 7: return "Currency [0]";
+ }
+ return "*unknown*";
+}
+
+void XclExpStyle::SaveXml( XclExpXmlStream& rStrm )
+{
+ OString sName;
+ if( IsBuiltIn() )
+ {
+ sName = OString( lcl_StyleNameFromId( mnStyleId ) );
+ }
+ else
+ sName = XclXmlUtils::ToOString( maName );
+ sal_Int32 nXFId = rStrm.GetRoot().GetXFBuffer().GetXmlStyleIndex( maXFId.mnXFId );
+ rStrm.GetCurrentStream()->singleElement( XML_cellStyle,
+ XML_name, sName.getStr(),
+ XML_xfId, OString::valueOf( nXFId ).getStr(),
+ XML_builtinId, OString::valueOf( (sal_Int32) mnStyleId ).getStr(),
+ // OOXTODO: XML_iLevel,
+ // OOXTODO: XML_hidden,
+ XML_customBuiltin, XclXmlUtils::ToPsz( ! IsBuiltIn() ),
+ FSEND );
+ // OOXTODO: XML_extLst
+}
+
// ----------------------------------------------------------------------------
namespace {
@@ -1941,6 +2248,55 @@ XclExpXFBuffer::XclExpBuiltInInfo::XclExpBuiltInInfo() :
// ----------------------------------------------------------------------------
+/** Predicate for search algorithm. */
+struct XclExpBorderPred
+{
+ const XclExpCellBorder&
+ mrBorder;
+ inline explicit XclExpBorderPred( const XclExpCellBorder& rBorder ) : mrBorder( rBorder ) {}
+ bool operator()( const XclExpCellBorder& rBorder ) const;
+};
+
+bool XclExpBorderPred::operator()( const XclExpCellBorder& rBorder ) const
+{
+ return
+ mrBorder.mnLeftColor == rBorder.mnLeftColor &&
+ mrBorder.mnRightColor == rBorder.mnRightColor &&
+ mrBorder.mnTopColor == rBorder.mnTopColor &&
+ mrBorder.mnBottomColor == rBorder.mnBottomColor &&
+ mrBorder.mnDiagColor == rBorder.mnDiagColor &&
+ mrBorder.mnLeftLine == rBorder.mnLeftLine &&
+ mrBorder.mnRightLine == rBorder.mnRightLine &&
+ mrBorder.mnTopLine == rBorder.mnTopLine &&
+ mrBorder.mnBottomLine == rBorder.mnBottomLine &&
+ mrBorder.mnDiagLine == rBorder.mnDiagLine &&
+ mrBorder.mbDiagTLtoBR == rBorder.mbDiagTLtoBR &&
+ mrBorder.mbDiagBLtoTR == rBorder.mbDiagBLtoTR &&
+ mrBorder.mnLeftColorId == rBorder.mnLeftColorId &&
+ mrBorder.mnRightColorId == rBorder.mnRightColorId &&
+ mrBorder.mnTopColorId == rBorder.mnTopColorId &&
+ mrBorder.mnBottomColorId == rBorder.mnBottomColorId &&
+ mrBorder.mnDiagColorId == rBorder.mnDiagColorId;
+}
+
+struct XclExpFillPred
+{
+ const XclExpCellArea&
+ mrFill;
+ inline explicit XclExpFillPred( const XclExpCellArea& rFill ) : mrFill( rFill ) {}
+ bool operator()( const XclExpCellArea& rFill ) const;
+};
+
+bool XclExpFillPred::operator()( const XclExpCellArea& rFill ) const
+{
+ return
+ mrFill.mnForeColor == rFill.mnForeColor &&
+ mrFill.mnBackColor == rFill.mnBackColor &&
+ mrFill.mnPattern == rFill.mnPattern &&
+ mrFill.mnForeColorId == rFill.mnForeColorId &&
+ mrFill.mnBackColorId == rFill.mnBackColorId;
+}
+
XclExpXFBuffer::XclExpXFBuffer( const XclExpRoot& rRoot ) :
XclExpRoot( rRoot )
{
@@ -1996,6 +2352,8 @@ void XclExpXFBuffer::Finalize()
sal_uInt32 nTotalCount = static_cast< sal_uInt32 >( maXFList.GetSize() );
sal_uInt32 nId;
maXFIndexVec.resize( nTotalCount, EXC_XF_DEFAULTCELL );
+ maStyleIndexes.resize( nTotalCount, EXC_XF_DEFAULTCELL );
+ maCellIndexes.resize( nTotalCount, EXC_XF_DEFAULTCELL );
XclExpBuiltInMap::const_iterator aBuiltInEnd = maBuiltInMap.end();
/* nMaxBuiltInXFId used to decide faster whether an XF record is
@@ -2068,6 +2426,19 @@ void XclExpXFBuffer::Finalize()
AppendXFIndex( nId );
}
}
+
+ sal_uInt16 nXmlStyleIndex = 0;
+ sal_uInt16 nXmlCellIndex = 0;
+
+ size_t nXFCount = maSortedXFList.GetSize();
+ for( size_t i = 0; i < nXFCount; ++i )
+ {
+ XclExpXFList::RecordRefType xXF = maSortedXFList.GetRecord( i );
+ if( xXF->IsStyleXF() )
+ maStyleIndexes[ i ] = nXmlStyleIndex++;
+ else
+ maCellIndexes[ i ] = nXmlCellIndex++;
+ }
}
sal_uInt16 XclExpXFBuffer::GetXFIndex( sal_uInt32 nXFId ) const
@@ -2080,6 +2451,22 @@ sal_uInt16 XclExpXFBuffer::GetXFIndex( sal_uInt32 nXFId ) const
return nXFIndex;
}
+sal_Int32 XclExpXFBuffer::GetXmlStyleIndex( sal_uInt32 nXFIndex ) const
+{
+ DBG_ASSERT( nXFIndex < maStyleIndexes.size(), "XclExpXFBuffer::GetXmlStyleIndex - invalid index!" );
+ if( nXFIndex > maStyleIndexes.size() )
+ return 0; // should be caught/debugged via above assert; return "valid" index.
+ return maStyleIndexes[ nXFIndex ];
+}
+
+sal_Int32 XclExpXFBuffer::GetXmlCellIndex( sal_uInt32 nXFIndex ) const
+{
+ DBG_ASSERT( nXFIndex < maCellIndexes.size(), "XclExpXFBuffer::GetXmlStyleIndex - invalid index!" );
+ if( nXFIndex > maCellIndexes.size() )
+ return 0; // should be caught/debugged via above assert; return "valid" index.
+ return maCellIndexes[ nXFIndex ];
+}
+
void XclExpXFBuffer::Save( XclExpStream& rStrm )
{
// save all XF records contained in the maSortedXFList vector (sorted by XF index)
@@ -2088,6 +2475,108 @@ void XclExpXFBuffer::Save( XclExpStream& rStrm )
maStyleList.Save( rStrm );
}
+static void lcl_GetCellCounts( const XclExpRecordList< XclExpXF >& rXFList, sal_Int32& rCells, sal_Int32& rStyles )
+{
+ rCells = 0;
+ rStyles = 0;
+ size_t nXFCount = rXFList.GetSize();
+ for( size_t i = 0; i < nXFCount; ++i )
+ {
+ XclExpRecordList< XclExpXF >::RecordRefType xXF = rXFList.GetRecord( i );
+ if( xXF->IsCellXF() )
+ ++rCells;
+ else if( xXF->IsStyleXF() )
+ ++rStyles;
+ }
+}
+
+void XclExpXFBuffer::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
+
+ rStyleSheet->startElement( XML_fills,
+ XML_count, OString::valueOf( (sal_Int32) maFills.size() ).getStr(),
+ FSEND );
+ for( XclExpFillList::iterator aIt = maFills.begin(), aEnd = maFills.end();
+ aIt != aEnd; ++aIt )
+ {
+ aIt->SaveXml( rStrm );
+ }
+ rStyleSheet->endElement( XML_fills );
+
+ rStyleSheet->startElement( XML_borders,
+ XML_count, OString::valueOf( (sal_Int32) maBorders.size() ).getStr(),
+ FSEND );
+ for( XclExpBorderList::iterator aIt = maBorders.begin(), aEnd = maBorders.end();
+ aIt != aEnd; ++aIt )
+ {
+ aIt->SaveXml( rStrm );
+ }
+ rStyleSheet->endElement( XML_borders );
+
+ // save all XF records contained in the maSortedXFList vector (sorted by XF index)
+ sal_Int32 nCells, nStyles;
+ lcl_GetCellCounts( maSortedXFList, nCells, nStyles );
+
+ if( nStyles > 0 )
+ {
+ rStyleSheet->startElement( XML_cellStyleXfs,
+ XML_count, OString::valueOf( nStyles ).getStr(),
+ FSEND );
+ size_t nXFCount = maSortedXFList.GetSize();
+ for( size_t i = 0; i < nXFCount; ++i )
+ {
+ XclExpXFList::RecordRefType xXF = maSortedXFList.GetRecord( i );
+ if( ! xXF->IsStyleXF() )
+ continue;
+ SaveXFXml( rStrm, *xXF );
+ }
+ rStyleSheet->endElement( XML_cellStyleXfs );
+ }
+
+ if( nCells > 0 )
+ {
+ rStyleSheet->startElement( XML_cellXfs,
+ XML_count, OString::valueOf( nCells ).getStr(),
+ FSEND );
+ size_t nXFCount = maSortedXFList.GetSize();
+ for( size_t i = 0; i < nXFCount; ++i )
+ {
+ XclExpXFList::RecordRefType xXF = maSortedXFList.GetRecord( i );
+ if( ! xXF->IsCellXF() )
+ continue;
+ SaveXFXml( rStrm, *xXF );
+ }
+ rStyleSheet->endElement( XML_cellXfs );
+ }
+
+ // save all STYLE records
+ rStyleSheet->startElement( XML_cellStyles,
+ XML_count, OString::valueOf( (sal_Int32) maStyleList.GetSize() ).getStr(),
+ FSEND );
+ maStyleList.SaveXml( rStrm );
+ rStyleSheet->endElement( XML_cellStyles );
+}
+
+void XclExpXFBuffer::SaveXFXml( XclExpXmlStream& rStrm, XclExpXF& rXF )
+{
+ XclExpBorderList::iterator aBorderPos =
+ std::find_if( maBorders.begin(), maBorders.end(), XclExpBorderPred( rXF.GetBorderData() ) );
+ DBG_ASSERT( aBorderPos != maBorders.end(), "XclExpXFBuffer::SaveXml - Invalid @borderId!" );
+ XclExpFillList::iterator aFillPos =
+ std::find_if( maFills.begin(), maFills.end(), XclExpFillPred( rXF.GetAreaData() ) );
+ DBG_ASSERT( aFillPos != maFills.end(), "XclExpXFBuffer::SaveXml - Invalid @fillId!" );
+
+ sal_Int32 nBorderId = 0, nFillId = 0;
+ if( aBorderPos != maBorders.end() )
+ nBorderId = std::distance( maBorders.begin(), aBorderPos );
+ if( aFillPos != maFills.end() )
+ nFillId = std::distance( maFills.begin(), aFillPos );
+
+ rXF.SetXmlIds( nBorderId, nFillId );
+ rXF.SaveXml( rStrm );
+}
+
sal_uInt32 XclExpXFBuffer::FindXF( const ScPatternAttr& rPattern,
ULONG nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) const
{
@@ -2246,8 +2735,27 @@ sal_uInt32 XclExpXFBuffer::AppendBuiltInXFWithStyle( XclExpXFRef xXF, sal_uInt8
return nXFId;
}
+static XclExpCellArea lcl_GetPatternFill_None()
+{
+ XclExpCellArea aFill;
+ aFill.mnPattern = EXC_PATT_NONE;
+ return aFill;
+}
+
+static XclExpCellArea lcl_GetPatternFill_Gray125()
+{
+ XclExpCellArea aFill;
+ aFill.mnPattern = EXC_PATT_12_5_PERC;
+ aFill.mnForeColor = 0;
+ aFill.mnBackColor = 0;
+ return aFill;
+}
+
void XclExpXFBuffer::InsertDefaultRecords()
{
+ maFills.push_back( lcl_GetPatternFill_None() );
+ maFills.push_back( lcl_GetPatternFill_Gray125() );
+
// index 0: default style
if( SfxStyleSheetBase* pDefStyleSheet = GetStyleSheetPool().Find( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SFX_STYLE_FAMILY_PARA ) )
{
@@ -2311,9 +2819,55 @@ void XclExpXFBuffer::AppendXFIndex( sal_uInt32 nXFId )
{
DBG_ASSERT( nXFId < maXFIndexVec.size(), "XclExpXFBuffer::AppendXFIndex - XF ID out of range" );
maXFIndexVec[ nXFId ] = static_cast< sal_uInt16 >( maSortedXFList.GetSize() );
- maSortedXFList.AppendRecord( maXFList.GetRecord( nXFId ) );
+ XclExpXFRef xXF = maXFList.GetRecord( nXFId );
+ AddBorderAndFill( *xXF );
+ maSortedXFList.AppendRecord( xXF );
DBG_ASSERT( maXFList.HasRecord( nXFId ), "XclExpXFBuffer::AppendXFIndex - XF not found" );
}
+void XclExpXFBuffer::AddBorderAndFill( const XclExpXF& rXF )
+{
+ if( std::find_if( maBorders.begin(), maBorders.end(), XclExpBorderPred( rXF.GetBorderData() ) ) == maBorders.end() )
+ {
+ maBorders.push_back( rXF.GetBorderData() );
+ }
+
+ if( std::find_if( maFills.begin(), maFills.end(), XclExpFillPred( rXF.GetAreaData() ) ) == maFills.end() )
+ {
+ maFills.push_back( rXF.GetAreaData() );
+ }
+}
+
+// ============================================================================
+
+XclExpXmlStyleSheet::XclExpXmlStyleSheet( const XclExpRoot& rRoot )
+ : XclExpRoot( rRoot )
+{
+}
+
+void XclExpXmlStyleSheet::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr aStyleSheet = rStrm.CreateOutputStream(
+ OUString::createFromAscii( "xl/styles.xml" ),
+ OUString::createFromAscii( "styles.xml" ),
+ rStrm.GetCurrentStream()->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" );
+ rStrm.PushStream( aStyleSheet );
+
+ aStyleSheet->startElement( XML_styleSheet,
+ XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ FSEND );
+
+ CreateRecord( EXC_ID_FORMATLIST )->SaveXml( rStrm );
+ CreateRecord( EXC_ID_FONTLIST )->SaveXml( rStrm );
+ CreateRecord( EXC_ID_XFLIST )->SaveXml( rStrm );
+ CreateRecord( EXC_ID_PALETTE )->SaveXml( rStrm );
+
+ aStyleSheet->endElement( XML_styleSheet );
+
+ rStrm.PopStream();
+}
+
// ============================================================================
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 482db49e1863..a46c0ccea121 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -46,6 +46,12 @@
#include "xecontent.hxx"
#include "xeescher.hxx"
+#include <oox/core/tokens.hxx>
+
+using ::rtl::OString;
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
+
namespace ApiScriptType = ::com::sun::star::i18n::ScriptType;
// ============================================================================
@@ -165,7 +171,7 @@ XclExpArrayRef XclExpArrayBuffer::FindArray( const ScTokenArray& rScTokArr ) con
const ScToken* pToken = rScTokArr.GetArray()[ 0 ];
if( pToken && (pToken->GetOpCode() == ocMatRef) )
{
- const SingleRefData& rRef = pToken->GetSingleRef();
+ const ScSingleRefData& rRef = pToken->GetSingleRef();
ScAddress aBasePos( rRef.nCol, rRef.nRow, GetCurrScTab() );
XclExpArrayMap::const_iterator aIt = maRecMap.find( aBasePos );
if( aIt != maRecMap.end() )
@@ -579,6 +585,34 @@ XclExpNumberCell::XclExpNumberCell(
{
}
+static OString lcl_GetStyleId( XclExpXmlStream& rStrm, sal_uInt32 nXFIndex )
+{
+ return OString::valueOf( rStrm.GetRoot().GetXFBuffer()
+ .GetXmlCellIndex( nXFIndex ) );
+}
+
+static OString lcl_GetStyleId( XclExpXmlStream& rStrm, const XclExpCellBase& rCell )
+{
+ sal_uInt32 nXFId = rCell.GetFirstXFId();
+ sal_uInt16 nXFIndex = rStrm.GetRoot().GetXFBuffer().GetXFIndex( nXFId );
+ return lcl_GetStyleId( rStrm, nXFIndex );
+}
+
+void XclExpNumberCell::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_c,
+ XML_r, XclXmlUtils::ToOString( GetXclPos() ).getStr(),
+ XML_s, lcl_GetStyleId( rStrm, *this ).getStr(),
+ XML_t, "n",
+ // OOXTODO: XML_cm, XML_vm, XML_ph
+ FSEND );
+ rWorksheet->startElement( XML_v, FSEND );
+ rWorksheet->write( mfValue );
+ rWorksheet->endElement( XML_v );
+ rWorksheet->endElement( XML_c );
+}
+
void XclExpNumberCell::WriteContents( XclExpStream& rStrm )
{
rStrm << mfValue;
@@ -597,6 +631,21 @@ XclExpBooleanCell::XclExpBooleanCell(
{
}
+void XclExpBooleanCell::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_c,
+ XML_r, XclXmlUtils::ToOString( GetXclPos() ).getStr(),
+ XML_s, lcl_GetStyleId( rStrm, *this ).getStr(),
+ XML_t, "b",
+ // OOXTODO: XML_cm, XML_vm, XML_ph
+ FSEND );
+ rWorksheet->startElement( XML_v, FSEND );
+ rWorksheet->write( mbValue ? "1" : "0" );
+ rWorksheet->endElement( XML_v );
+ rWorksheet->endElement( XML_c );
+}
+
void XclExpBooleanCell::WriteContents( XclExpStream& rStrm )
{
rStrm << sal_uInt16( mbValue ? 1 : 0 ) << EXC_BOOLERR_BOOL;
@@ -615,6 +664,21 @@ XclExpErrorCell::XclExpErrorCell(
{
}
+void XclExpErrorCell::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_c,
+ XML_r, XclXmlUtils::ToOString( GetXclPos() ).getStr(),
+ XML_s, lcl_GetStyleId( rStrm, *this ).getStr(),
+ XML_t, "e",
+ // OOXTODO: XML_cm, XML_vm, XML_ph
+ FSEND );
+ rWorksheet->startElement( XML_v, FSEND );
+ rWorksheet->write( (sal_Int32) mnErrCode );
+ rWorksheet->endElement( XML_v );
+ rWorksheet->endElement( XML_c );
+}
+
void XclExpErrorCell::WriteContents( XclExpStream& rStrm )
{
rStrm << mnErrCode << EXC_BOOLERR_ERROR;
@@ -696,6 +760,21 @@ void XclExpLabelCell::Init( const XclExpRoot& rRoot,
}
}
+void XclExpLabelCell::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_c,
+ XML_r, XclXmlUtils::ToOString( GetXclPos() ).getStr(),
+ XML_s, lcl_GetStyleId( rStrm, *this ).getStr(),
+ XML_t, "s",
+ // OOXTODO: XML_cm, XML_vm, XML_ph
+ FSEND );
+ rWorksheet->startElement( XML_v, FSEND );
+ rWorksheet->write( (sal_Int32) mnSstIndex );
+ rWorksheet->endElement( XML_v );
+ rWorksheet->endElement( XML_c );
+}
+
void XclExpLabelCell::WriteContents( XclExpStream& rStrm )
{
switch( rStrm.GetRoot().GetBiff() )
@@ -839,6 +918,117 @@ void XclExpFormulaCell::Save( XclExpStream& rStrm )
mxStringRec->Save( rStrm );
}
+static const char* lcl_GetErrorString( USHORT nScErrCode )
+{
+ sal_uInt8 nXclErrCode = XclTools::GetXclErrorCode( nScErrCode );
+ switch( nXclErrCode )
+ {
+ case EXC_ERR_NULL: return "#NULL!";
+ case EXC_ERR_DIV0: return "#DIV/0!";
+ case EXC_ERR_VALUE: return "#VALUE!";
+ case EXC_ERR_REF: return "#REF!";
+ case EXC_ERR_NAME: return "#NAME?";
+ case EXC_ERR_NUM: return "#NUM!";
+ case EXC_ERR_NA:
+ default: return "#N/A";
+ }
+}
+
+static void lcl_GetFormulaInfo( ScFormulaCell& rCell, const char** pType, OUString& rValue)
+{
+ switch( rCell.GetFormatType() )
+ {
+ case NUMBERFORMAT_NUMBER:
+ {
+ // either value or error code
+ USHORT nScErrCode = rCell.GetErrCode();
+ if( nScErrCode )
+ {
+ *pType = "e";
+ rValue = XclXmlUtils::ToOUString( lcl_GetErrorString( nScErrCode ) );
+ }
+ else
+ {
+ *pType = "n";
+ rValue = OUString::valueOf( rCell.GetValue() );
+ }
+ }
+ break;
+
+ case NUMBERFORMAT_TEXT:
+ {
+ *pType = "str";
+ String aResult;
+ rCell.GetString( aResult );
+ rValue = XclXmlUtils::ToOUString( aResult );
+ }
+ break;
+
+ case NUMBERFORMAT_LOGICAL:
+ {
+ *pType = "b";
+ rValue = XclXmlUtils::ToOUString( rCell.GetValue() == 0.0 ? "0" : "1" );
+ }
+ break;
+
+ default:
+ {
+ *pType = "inlineStr";
+ String aResult;
+ rCell.GetString( aResult );
+ rValue = XclXmlUtils::ToOUString( aResult );
+ }
+ break;
+ }
+}
+
+void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
+{
+ const char* sType = NULL;
+ OUString sValue;
+
+ lcl_GetFormulaInfo( mrScFmlaCell, &sType, sValue );
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_c,
+ XML_r, XclXmlUtils::ToOString( GetXclPos() ).getStr(),
+ XML_s, lcl_GetStyleId( rStrm, *this ).getStr(),
+ XML_t, sType,
+ // OOXTODO: XML_cm, XML_vm, XML_ph
+ FSEND );
+
+ rWorksheet->startElement( XML_f,
+ // OOXTODO: XML_t, ST_CellFormulaType
+ XML_aca, XclXmlUtils::ToPsz( mxTokArr->IsVolatile() || (mxAddRec.is() && mxAddRec->IsVolatile()) ),
+ // OOXTODO: XML_ref, ST_Ref
+ // OOXTODO: XML_dt2D, bool
+ // OOXTODO: XML_dtr, bool
+ // OOXTODO: XML_del1, bool
+ // OOXTODO: XML_del2, bool
+ // OOXTODO: XML_r1, ST_CellRef
+ // OOXTODO: XML_r2, ST_CellRef
+ // OOXTODO: XML_ca, bool
+ // OOXTODO: XML_si, uint
+ // OOXTODO: XML_bx bool
+ FSEND );
+ rWorksheet->writeEscaped( XclXmlUtils::ToOUString( *mrScFmlaCell.GetDocument(), mrScFmlaCell.aPos, mrScFmlaCell.GetCode() ) );
+ rWorksheet->endElement( XML_f );
+ if( strcmp( sType, "inlineStr" ) == 0 )
+ {
+ rWorksheet->startElement( XML_is, FSEND );
+ rWorksheet->startElement( XML_t, FSEND );
+ rWorksheet->writeEscaped( sValue );
+ rWorksheet->endElement( XML_t );
+ rWorksheet->endElement( XML_is );
+ }
+ else
+ {
+ rWorksheet->startElement( XML_v, FSEND );
+ rWorksheet->writeEscaped( sValue );
+ rWorksheet->endElement( XML_v );
+ }
+ rWorksheet->endElement( XML_c );
+}
+
void XclExpFormulaCell::WriteContents( XclExpStream& rStrm )
{
// result of the formula
@@ -981,6 +1171,55 @@ void XclExpMultiCellBase::Save( XclExpStream& rStrm )
}
}
+void XclExpMultiCellBase::SaveXml( XclExpXmlStream& rStrm )
+{
+ XclExpMultiXFIdDeq::const_iterator aEnd = maXFIds.end();
+ XclExpMultiXFIdDeq::const_iterator aRangeBeg = maXFIds.begin();
+ XclExpMultiXFIdDeq::const_iterator aRangeEnd = aRangeBeg;
+ sal_uInt16 nBegXclCol = GetXclCol();
+ sal_uInt16 nEndXclCol = nBegXclCol;
+
+ while( aRangeEnd != aEnd )
+ {
+ // find begin of next used XF range
+ aRangeBeg = aRangeEnd;
+ nBegXclCol = nEndXclCol;
+ while( (aRangeBeg != aEnd) && (aRangeBeg->mnXFIndex == EXC_XF_NOTFOUND) )
+ {
+ nBegXclCol = nBegXclCol + aRangeBeg->mnCount;
+ ++aRangeBeg;
+ }
+ // find end of next used XF range
+ aRangeEnd = aRangeBeg;
+ nEndXclCol = nBegXclCol;
+ while( (aRangeEnd != aEnd) && (aRangeEnd->mnXFIndex != EXC_XF_NOTFOUND) )
+ {
+ nEndXclCol = nEndXclCol + aRangeEnd->mnCount;
+ ++aRangeEnd;
+ }
+
+ // export this range as a record
+ if( aRangeBeg != aRangeEnd )
+ {
+ sal_uInt16 nRelColIdx = nBegXclCol - GetXclCol();
+ sal_Int32 nRelCol = 0;
+ for( XclExpMultiXFIdDeq::const_iterator aIt = aRangeBeg; aIt != aRangeEnd; ++aIt )
+ {
+ for( sal_uInt16 nIdx = 0; nIdx < aIt->mnCount; ++nIdx )
+ {
+ WriteXmlContents(
+ rStrm,
+ XclAddress( nBegXclCol + nRelCol, GetXclRow() ),
+ aIt->mnXFIndex,
+ nRelColIdx );
+ ++nRelCol;
+ ++nRelColIdx;
+ }
+ }
+ }
+ }
+}
+
sal_uInt16 XclExpMultiCellBase::GetCellCount() const
{
sal_uInt16 nCount = 0;
@@ -1095,6 +1334,15 @@ void XclExpBlankCell::WriteContents( XclExpStream& /*rStrm*/, sal_uInt16 /*nRelC
{
}
+void XclExpBlankCell::WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress& rAddress, sal_uInt32 nXFId, sal_uInt16 /* nRelCol */ )
+{
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->singleElement( XML_c,
+ XML_r, XclXmlUtils::ToOString( rAddress ).getStr(),
+ XML_s, lcl_GetStyleId( rStrm, nXFId ).getStr(),
+ FSEND );
+}
+
// ----------------------------------------------------------------------------
IMPL_FIXEDMEMPOOL_NEWDEL( XclExpRkCell, 256, 256 )
@@ -1120,6 +1368,21 @@ bool XclExpRkCell::TryMerge( const XclExpCellBase& rCell )
return false;
}
+void XclExpRkCell::WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress& rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol )
+{
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_c,
+ XML_r, XclXmlUtils::ToOString( rAddress ).getStr(),
+ XML_s, lcl_GetStyleId( rStrm, nXFId ).getStr(),
+ XML_t, "n",
+ // OOXTODO: XML_cm, XML_vm, XML_ph
+ FSEND );
+ rWorksheet->startElement( XML_v, FSEND );
+ rWorksheet->write( XclTools::GetDoubleFromRK( maRkValues[ nRelCol ] ) );
+ rWorksheet->endElement( XML_v );
+ rWorksheet->endElement( XML_c );
+}
+
void XclExpRkCell::WriteContents( XclExpStream& rStrm, sal_uInt16 nRelCol )
{
DBG_ASSERT( nRelCol < maRkValues.size(), "XclExpRkCell::WriteContents - overflow error" );
@@ -1254,6 +1517,23 @@ void XclExpDimensions::SetDimensions(
mnFirstFreeXclCol = nFirstFreeXclCol;
}
+void XclExpDimensions::SaveXml( XclExpXmlStream& rStrm )
+{
+ ScRange aRange;
+ aRange.aStart.SetRow( (SCROW) mnFirstUsedXclRow );
+ aRange.aStart.SetCol( (SCCOL) mnFirstUsedXclCol );
+
+ if( mnFirstFreeXclRow != mnFirstUsedXclRow && mnFirstFreeXclCol != mnFirstUsedXclCol )
+ {
+ aRange.aEnd.SetRow( (SCROW) (mnFirstFreeXclRow-1) );
+ aRange.aEnd.SetCol( (SCCOL) (mnFirstFreeXclCol-1) );
+ }
+
+ rStrm.GetCurrentStream()->singleElement( XML_dimension,
+ XML_ref, XclXmlUtils::ToOString( aRange ).getStr(),
+ FSEND );
+}
+
void XclExpDimensions::WriteBody( XclExpStream& rStrm )
{
XclBiff eBiff = rStrm.GetRoot().GetBiff();
@@ -1370,6 +1650,27 @@ void XclExpColinfo::WriteBody( XclExpStream& rStrm )
<< sal_uInt16( 0 );
}
+void XclExpColinfo::SaveXml( XclExpXmlStream& rStrm )
+{
+ // if last column is equal to last possible column, Excel adds one more
+ sal_uInt16 nLastXclCol = mnLastXclCol;
+ if( nLastXclCol == static_cast< sal_uInt16 >( rStrm.GetRoot().GetMaxPos().Col() ) )
+ ++nLastXclCol;
+
+ rStrm.GetCurrentStream()->singleElement( XML_col,
+ // OOXTODO: XML_bestFit,
+ XML_collapsed, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_COLINFO_COLLAPSED ) ),
+ // OOXTODO: XML_customWidth,
+ XML_hidden, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_COLINFO_HIDDEN ) ),
+ XML_max, OString::valueOf( (sal_Int32) (nLastXclCol+1) ).getStr(),
+ XML_min, OString::valueOf( (sal_Int32) (mnFirstXclCol+1) ).getStr(),
+ // OOXTODO: XML_outlineLevel,
+ // OOXTODO: XML_phonetic,
+ XML_style, lcl_GetStyleId( rStrm, maXFId.mnXFIndex ).getStr(),
+ XML_width, OString::valueOf( (double) (mnWidth / 255.0) ).getStr(),
+ FSEND );
+}
+
// ----------------------------------------------------------------------------
XclExpColinfoBuffer::XclExpColinfoBuffer( const XclExpRoot& rRoot ) :
@@ -1454,6 +1755,18 @@ void XclExpColinfoBuffer::Save( XclExpStream& rStrm )
maColInfos.Save( rStrm );
}
+void XclExpColinfoBuffer::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( maColInfos.IsEmpty() )
+ return;
+
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_cols,
+ FSEND );
+ maColInfos.SaveXml( rStrm );
+ rWorksheet->endElement( XML_cols );
+}
+
// ============================================================================
XclExpDefaultRowData::XclExpDefaultRowData() :
@@ -1504,6 +1817,7 @@ XclExpRow::XclExpRow( const XclExpRoot& rRoot, sal_uInt16 nXclRow,
mnHeight( 0 ),
mnFlags( EXC_ROW_DEFAULTFLAGS ),
mnXFIndex( EXC_XF_DEFAULTCELL ),
+ mnOutlineLevel( 0 ),
mbAlwaysEmpty( bAlwaysEmpty ),
mbEnabled( true )
{
@@ -1539,6 +1853,7 @@ XclExpRow::XclExpRow( const XclExpRoot& rRoot, sal_uInt16 nXclRow,
rOutlineBfr.Update( nScRow );
::set_flag( mnFlags, EXC_ROW_COLLAPSED, rOutlineBfr.IsCollapsed() );
::insert_value( mnFlags, rOutlineBfr.GetLevel(), 0, 3 );
+ mnOutlineLevel = rOutlineBfr.GetLevel();
// *** Progress bar *** ---------------------------------------------------
@@ -1763,6 +2078,31 @@ void XclExpRow::WriteBody( XclExpStream& rStrm )
<< mnXFIndex;
}
+void XclExpRow::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( !mbEnabled )
+ return;
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ bool haveFormat = ::get_flag( mnFlags, EXC_ROW_USEDEFXF );
+ rWorksheet->startElement( XML_row,
+ XML_r, OString::valueOf( (sal_Int32) (mnXclRow+1) ).getStr(),
+ // OOXTODO: XML_spans, optional
+ XML_s, haveFormat ? lcl_GetStyleId( rStrm, mnXFIndex ).getStr() : NULL,
+ XML_customFormat, XclXmlUtils::ToPsz( haveFormat ),
+ XML_ht, OString::valueOf( (double) mnHeight / 20.0 ).getStr(),
+ XML_hidden, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_ROW_HIDDEN ) ),
+ XML_customHeight, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_ROW_UNSYNCED ) ),
+ XML_outlineLevel, OString::valueOf( (sal_Int32) mnOutlineLevel ).getStr(),
+ XML_collapsed, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_ROW_COLLAPSED ) ),
+ // OOXTODO: XML_thickTop, bool
+ // OOXTODO: XML_thickBot, bool
+ // OOXTODO: XML_ph, bool
+ FSEND );
+ // OOXTODO: XML_extLst
+ maCellList.SaveXml( rStrm );
+ rWorksheet->endElement( XML_row );
+}
+
// ----------------------------------------------------------------------------
XclExpRowBuffer::XclExpRowBuffer( const XclExpRoot& rRoot ) :
@@ -1922,6 +2262,33 @@ void XclExpRowBuffer::Save( XclExpStream& rStrm )
}
}
+void XclExpRowBuffer::SaveXml( XclExpXmlStream& rStrm )
+{
+ sal_Int32 nNonEmpty = 0;
+
+ size_t nRows = maRowList.GetSize();
+ for( size_t i = 0; i < nRows; ++i)
+ if( maRowList.GetRecord( i )->IsEnabled() )
+ ++nNonEmpty;
+
+ if( nNonEmpty == 0 )
+ {
+ rStrm.GetCurrentStream()->singleElement( XML_sheetData, FSEND );
+ }
+ else
+ {
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_sheetData, FSEND );
+ maRowList.SaveXml( rStrm );
+ rWorksheet->endElement( XML_sheetData );
+ }
+}
+
+XclExpDimensions* XclExpRowBuffer::GetDimensions()
+{
+ return &maDimensions;
+}
+
XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt16 nXclRow, bool bRowAlwaysEmpty )
{
if( !mpLastUsedRow || (mnLastUsedXclRow != nXclRow) )
@@ -2185,11 +2552,12 @@ void XclExpCellTable::Finalize()
mxDefrowheight->SetDefaultData( aDefRowData );
}
-XclExpRecordRef XclExpCellTable::CreateRecord( sal_uInt16 nRecId ) const
+XclExpRecordRef XclExpCellTable::CreateRecord( sal_uInt16 nRecId )
{
XclExpRecordRef xRec;
switch( nRecId )
{
+ case EXC_ID3_DIMENSIONS: xRec.reset( new XclExpDelegatingRecord( maRowBfr.GetDimensions() ) ); break;
case EXC_ID2_DEFROWHEIGHT: xRec = mxDefrowheight; break;
case EXC_ID_GUTS: xRec = mxGuts; break;
case EXC_ID_NOTE: xRec = mxNoteList; break;
@@ -2209,5 +2577,11 @@ void XclExpCellTable::Save( XclExpStream& rStrm )
maRowBfr.Save( rStrm );
}
+void XclExpCellTable::SaveXml( XclExpXmlStream& rStrm )
+{
+ maColInfoBfr.SaveXml( rStrm );
+ maRowBfr.SaveXml( rStrm );
+}
+
// ============================================================================
diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx
index 4dea8b43cf6b..387414223a20 100644
--- a/sc/source/filter/excel/xeview.cxx
+++ b/sc/source/filter/excel/xeview.cxx
@@ -37,6 +37,10 @@
#include "xelink.hxx"
#include "xestyle.hxx"
+#include <oox/core/tokens.hxx>
+
+using ::rtl::OString;
+
// Workbook view settings records =============================================
XclExpWindow1::XclExpWindow1( const XclExpRoot& rRoot ) :
@@ -54,6 +58,27 @@ XclExpWindow1::XclExpWindow1( const XclExpRoot& rRoot ) :
mnTabBarSize = static_cast< sal_uInt16 >( fTabBarWidth * 1000.0 + 0.5 );
}
+void XclExpWindow1::SaveXml( XclExpXmlStream& rStrm )
+{
+ const XclExpTabInfo& rTabInfo = rStrm.GetRoot().GetTabInfo();
+
+ rStrm.GetCurrentStream()->singleElement( XML_workbookView,
+ // OOXTODO: XML_visibility, // ST_visibilty
+ // OOXTODO: XML_minimized, // bool
+ XML_showHorizontalScroll, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_WIN1_HOR_SCROLLBAR ) ),
+ XML_showVerticalScroll, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_WIN1_VER_SCROLLBAR ) ),
+ XML_showSheetTabs, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_WIN1_TABBAR ) ),
+ XML_xWindow, "0",
+ XML_yWindow, "0",
+ XML_windowWidth, OString::valueOf( (sal_Int32)0x4000 ).getStr(),
+ XML_windowHeight, OString::valueOf( (sal_Int32)0x2000 ).getStr(),
+ XML_tabRatio, OString::valueOf( (sal_Int32)mnTabBarSize ).getStr(),
+ XML_firstSheet, OString::valueOf( (sal_Int32)rTabInfo.GetFirstVisXclTab() ).getStr(),
+ XML_activeTab, OString::valueOf( (sal_Int32)rTabInfo.GetDisplayedXclTab() ).getStr(),
+ // OOXTODO: XML_autoFilterDateGrouping, // bool; AUTOFILTER12? 87Eh
+ FSEND );
+}
+
void XclExpWindow1::WriteBody( XclExpStream& rStrm )
{
const XclExpTabInfo& rTabInfo = rStrm.GetRoot().GetTabInfo();
@@ -158,6 +183,29 @@ XclExpPane::XclExpPane( const XclTabViewData& rData ) :
DBG_ASSERT( rData.IsSplit(), "XclExpPane::XclExpPane - no PANE record for unsplit view" );
}
+static const char* lcl_GetActivePane( sal_uInt8 nActivePane )
+{
+ switch( nActivePane )
+ {
+ case EXC_PANE_TOPLEFT: return "topLeft"; break;
+ case EXC_PANE_TOPRIGHT: return "topRight"; break;
+ case EXC_PANE_BOTTOMLEFT: return "bottomLeft"; break;
+ case EXC_PANE_BOTTOMRIGHT: return "bottomRight"; break;
+ }
+ return "**error: lcl_GetActivePane";
+}
+
+void XclExpPane::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.GetCurrentStream()->singleElement( XML_pane,
+ XML_xSplit, OString::valueOf( (sal_Int32)mnSplitX ).getStr(),
+ XML_ySplit, OString::valueOf( (sal_Int32)mnSplitY ).getStr(),
+ XML_topLeftCell, XclXmlUtils::ToOString( maSecondXclPos ).getStr(),
+ XML_activePane, lcl_GetActivePane( mnActivePane ),
+ // OOXTODO: XML_state,
+ FSEND );
+}
+
void XclExpPane::WriteBody( XclExpStream& rStrm )
{
rStrm << mnSplitX
@@ -193,6 +241,16 @@ XclExpSelection::XclExpSelection( const XclTabViewData& rData, sal_uInt8 nPane )
}
}
+void XclExpSelection::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.GetCurrentStream()->singleElement( XML_selection,
+ XML_pane, lcl_GetActivePane( mnPane ),
+ XML_activeCell, XclXmlUtils::ToOString( maSelData.maXclCursor ).getStr(),
+ XML_activeCellId, OString::valueOf( (sal_Int32) maSelData.mnCursorIdx ).getStr(),
+ XML_sqref, XclXmlUtils::ToOString( maSelData.maXclSelection ).getStr(),
+ FSEND );
+}
+
void XclExpSelection::WriteBody( XclExpStream& rStrm )
{
rStrm << mnPane // pane for this selection
@@ -324,6 +382,59 @@ void XclExpTabViewSettings::Save( XclExpStream& rStrm )
WriteSelection( rStrm, EXC_PANE_BOTTOMRIGHT );
}
+static void lcl_WriteSelection( XclExpXmlStream& rStrm, const XclTabViewData& rData, sal_uInt8 nPane )
+{
+ if( rData.HasPane( nPane ) )
+ XclExpSelection( rData, nPane ).SaveXml( rStrm );
+}
+
+OString lcl_GetZoom( sal_uInt16 nZoom )
+{
+ if( nZoom )
+ return OString::valueOf( (sal_Int32)nZoom );
+ return OString( "100" );
+}
+
+void XclExpTabViewSettings::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_sheetViews, FSEND );
+ rWorksheet->startElement( XML_sheetView,
+ XML_windowProtection, XclXmlUtils::ToPsz( maData.mbFrozenPanes ),
+ XML_showFormulas, XclXmlUtils::ToPsz( maData.mbShowFormulas ),
+ XML_showGridLines, XclXmlUtils::ToPsz( maData.mbShowGrid ),
+ XML_showRowColHeaders, XclXmlUtils::ToPsz( maData.mbShowHeadings ),
+ XML_showZeros, XclXmlUtils::ToPsz( maData.mbShowZeros ),
+ XML_rightToLeft, XclXmlUtils::ToPsz( maData.mbMirrored ),
+ XML_tabSelected, XclXmlUtils::ToPsz( maData.mbSelected ),
+ // OOXTODO: XML_showRuler,
+ XML_showOutlineSymbols, XclXmlUtils::ToPsz( maData.mbShowOutline ),
+ XML_defaultGridColor, mnGridColorId == XclExpPalette::GetColorIdFromIndex( EXC_COLOR_WINDOWTEXT ) ? "true" : "false",
+ // OOXTODO: XML_showWhiteSpace,
+ XML_view, maData.mbPageMode ? "pageBreakPreview" : "normal", // OOXTODO: pageLayout
+ XML_topLeftCell, XclXmlUtils::ToOString( maData.maFirstXclPos ).getStr(),
+ XML_colorId, OString::valueOf( (sal_Int32) rStrm.GetRoot().GetPalette().GetColorIndex( mnGridColorId ) ).getStr(),
+ XML_zoomScale, lcl_GetZoom( maData.mnCurrentZoom ).getStr(),
+ XML_zoomScaleNormal, lcl_GetZoom( maData.mnNormalZoom ).getStr(),
+ // OOXTODO: XML_zoomScaleSheetLayoutView,
+ XML_zoomScalePageLayoutView, lcl_GetZoom( maData.mnPageZoom ).getStr(),
+ XML_workbookViewId, "0", // OOXTODO? 0-based index of document(xl/workbook.xml)/workbook/bookviews/workbookView
+ // should always be 0, as we only generate 1 such element.
+ FSEND );
+ if( maData.IsSplit() )
+ {
+ XclExpPane aPane( maData );
+ aPane.SaveXml( rStrm );
+ }
+ lcl_WriteSelection( rStrm, maData, EXC_PANE_TOPLEFT );
+ lcl_WriteSelection( rStrm, maData, EXC_PANE_TOPRIGHT );
+ lcl_WriteSelection( rStrm, maData, EXC_PANE_BOTTOMLEFT );
+ lcl_WriteSelection( rStrm, maData, EXC_PANE_BOTTOMRIGHT );
+ rWorksheet->endElement( XML_sheetView );
+ // OOXTODO: XML_extLst
+ rWorksheet->endElement( XML_sheetViews );
+}
+
// private --------------------------------------------------------------------
void XclExpTabViewSettings::CreateSelectionData( sal_uInt8 nPane,
diff --git a/sc/source/filter/excel/xladdress.cxx b/sc/source/filter/excel/xladdress.cxx
index e83d2cf9648f..9f2bde6672f1 100644
--- a/sc/source/filter/excel/xladdress.cxx
+++ b/sc/source/filter/excel/xladdress.cxx
@@ -31,9 +31,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
#include "xladdress.hxx"
+#include "xestream.hxx"
#include "xltracer.hxx"
#include "xistream.hxx"
-#include "xestream.hxx"
// ============================================================================
diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx
index e66f60d6fe0e..bea2ed17ddd1 100644
--- a/sc/source/filter/excel/xlescher.cxx
+++ b/sc/source/filter/excel/xlescher.cxx
@@ -31,13 +31,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include "xlescher.hxx"
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/script/ScriptEventDescriptor.hpp>
#include <svx/unoapi.hxx>
+#include "xestream.hxx"
#include "document.hxx"
#include "xistream.hxx"
-#include "xestream.hxx"
+#include "xlescher.hxx"
using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index 2170fed09397..8b09f7284716 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -30,12 +30,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include "xlformula.hxx"
#include "compiler.hxx"
#include "rangenam.hxx"
+#include "xestream.hxx"
#include "xlroot.hxx"
#include "xistream.hxx"
-#include "xestream.hxx"
+#include "xlformula.hxx"
// Function data ==============================================================
@@ -667,7 +667,7 @@ inline bool lclGetAddress( ScAddress& rAddress, const ScToken& rToken )
bool bIsSingleRef = (eOpCode == ocPush) && (rToken.GetType() == svSingleRef);
if( bIsSingleRef )
{
- const SingleRefData& rRef = rToken.GetSingleRef();
+ const ScSingleRefData& rRef = rToken.GetSingleRef();
rAddress.Set( rRef.nCol, rRef.nRow, rRef.nTab );
bIsSingleRef = !rRef.IsDeleted();
}
diff --git a/sc/source/filter/excel/xlpivot.cxx b/sc/source/filter/excel/xlpivot.cxx
index 6559bade280e..d36950b2494d 100644
--- a/sc/source/filter/excel/xlpivot.cxx
+++ b/sc/source/filter/excel/xlpivot.cxx
@@ -30,11 +30,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include "xlpivot.hxx"
#include "dpgroup.hxx"
-#include "xistream.hxx"
#include "xestream.hxx"
+#include "xistream.hxx"
#include "xestring.hxx"
+#include "xlpivot.hxx"
#include <com/sun/star/sheet/DataPilotFieldGroupBy.hpp>
using ::com::sun::star::sheet::GeneralFunction;
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index e4980d8d368d..bdc75df21c13 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -75,6 +75,7 @@ XclDebugObjCounter::~XclDebugObjCounter()
XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium,
SotStorageRef xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc, bool bExport ) :
meBiff( eBiff ),
+ meOutput( EXC_OUTPUT_BINARY ),
mrMedium( rMedium ),
mxRootStrg( xRootStrg ),
mrDoc( rDoc ),
diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx
index 55efda524da1..e748cbebc4ad 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -635,7 +635,7 @@ void XclFontPropSetHelper::ReadFontProperties( XclFontData& rFontData,
{
String aApiFontName;
float fApiHeight, fApiWeight;
- sal_Int16 nApiUnderl, nApiStrikeout, nApiEscapement;
+ sal_Int16 nApiUnderl = 0, nApiStrikeout = 0, nApiEscapement = 0;
Awt::FontSlant eApiPosture;
// read script type dependent properties
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index 2ac6fc3f6f8a..a80900f0c986 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -30,7 +30,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include "xltools.hxx"
#include <algorithm>
#include <math.h>
@@ -38,6 +37,7 @@
#include <vcl/fontcvt.hxx>
#include <sfx2/objsh.hxx>
#include <svx/editstat.hxx>
+#include "xestream.hxx"
#include "document.hxx"
#include "docuno.hxx"
#include "editutil.hxx"
@@ -46,8 +46,8 @@
#include "xlstyle.hxx"
#include "xlname.hxx"
#include "xistream.hxx"
-#include "xestream.hxx"
#include "xiroot.hxx"
+#include "xltools.hxx"
// GUID import/export =========================================================
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 4b717cc02b0a..7d493bd09226 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -392,3 +392,15 @@ bool ScfTools::GetHTMLNameFromName( const String& rSource, String& rName )
// ============================================================================
+ScFormatFilterPluginImpl::ScFormatFilterPluginImpl()
+{
+ fprintf (stderr, "loaded\n");
+}
+
+ScFormatFilterPlugin * SAL_CALL ScFilterCreate(void)
+{
+ return new ScFormatFilterPluginImpl();
+}
+
+// implementation class inside the filters
+
diff --git a/sc/source/filter/ftools/makefile.mk b/sc/source/filter/ftools/makefile.mk
index 9f79798ce262..138bf44a0c8b 100644
--- a/sc/source/filter/ftools/makefile.mk
+++ b/sc/source/filter/ftools/makefile.mk
@@ -45,7 +45,6 @@ PROJECTPCHSOURCE=..\pch\filt_pch
.INCLUDE : scpre.mk
.INCLUDE : settings.mk
.INCLUDE : sc.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index bbad9e6c0751..d6a847e62d41 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -159,7 +159,7 @@ extern BOOL bOderSo;
//========================================================================
-FltError ScExportHTML( SvStream& rStrm, const String& rBaseURL, ScDocument* pDoc,
+FltError ScFormatFilterPluginImpl::ScExportHTML( SvStream& rStrm, const String& rBaseURL, ScDocument* pDoc,
const ScRange& rRange, const CharSet /*eNach*/, BOOL bAll,
const String& rStreamPath, String& rNonConvertibleChars )
{
@@ -237,9 +237,11 @@ void lcl_AppendHTMLColorTripel( ByteString& rStr, const Color& rColor )
}
*/
+bool SC_DLLPUBLIC ScGetWriteTeamInfo();
+
void lcl_WriteTeamInfo( SvStream& rStrm, rtl_TextEncoding eDestEnc )
{
- if ( !bOderSo ) return;
+ if ( !ScGetWriteTeamInfo() ) return;
lcl_OUT_LF();
lcl_OUT_COMMENT( CREATE_STRING( "Sascha Ballach " ) );
lcl_OUT_COMMENT( CREATE_STRING( "Michael Daeumling (aka Bitsau) " ) );
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx
index c970d93600e7..9b3a155db0e1 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -61,7 +61,7 @@
//------------------------------------------------------------------------
-FltError ScImportHTML( SvStream &rStream, const String& rBaseURL, ScDocument *pDoc,
+FltError ScFormatFilterPluginImpl::ScImportHTML( SvStream &rStream, const String& rBaseURL, ScDocument *pDoc,
ScRange& rRange, double nOutputFactor, BOOL bCalcWidthHeight )
{
ScHTMLImport aImp( pDoc, rBaseURL, rRange, bCalcWidthHeight );
@@ -72,6 +72,10 @@ FltError ScImportHTML( SvStream &rStream, const String& rBaseURL, ScDocument *pD
return nErr;
}
+ScEEAbsImport *ScFormatFilterPluginImpl::CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight )
+{
+ return new ScHTMLImport( pDocP, rBaseURL, rRange, bCalcWidthHeight );
+}
ScHTMLImport::ScHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight ) :
ScEEImport( pDocP, rRange )
@@ -123,7 +127,7 @@ ScHTMLImport::~ScHTMLImport()
void ScHTMLImport::InsertRangeName( ScDocument* pDoc, const String& rName, const ScRange& rRange )
{
- ComplRefData aRefData;
+ ScComplexRefData aRefData;
aRefData.InitRange( rRange );
ScTokenArray aTokArray;
aTokArray.AddDoubleReference( aRefData );
@@ -210,6 +214,11 @@ void ScHTMLImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor )
}
}
+String ScFormatFilterPluginImpl::GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrigName )
+{
+ return GetHTMLRangeNameList( pDoc, rOrigName );
+}
+
String ScHTMLImport::GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrigName )
{
DBG_ASSERT( pDoc, "ScHTMLImport::GetHTMLRangeNameList - missing document" );
diff --git a/sc/source/filter/html/makefile.mk b/sc/source/filter/html/makefile.mk
index 4b566e15b01a..6bdb674a5226 100644
--- a/sc/source/filter/html/makefile.mk
+++ b/sc/source/filter/html/makefile.mk
@@ -45,7 +45,6 @@ PROJECTPCHSOURCE=..\pch\filt_pch
.INCLUDE : scpre.mk
.INCLUDE : settings.mk
.INCLUDE : sc.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/inc/XclExpChangeTrack.hxx b/sc/source/filter/inc/XclExpChangeTrack.hxx
index 86c90868acf8..fe496af6de3e 100644
--- a/sc/source/filter/inc/XclExpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclExpChangeTrack.hxx
@@ -36,8 +36,8 @@
#include <rtl/uuid.h>
#include "bigrange.hxx"
#include "chgtrack.hxx"
-#include "ftools.hxx"
#include "xelink.hxx"
+#include "ftools.hxx"
#include "excrecds.hxx"
//___________________________________________________________________
diff --git a/sc/inc/eeimport.hxx b/sc/source/filter/inc/eeimport.hxx
index 68d7ce2689b4..a601c7a20cbf 100644
--- a/sc/inc/eeimport.hxx
+++ b/sc/source/filter/inc/eeimport.hxx
@@ -32,6 +32,8 @@
#include "global.hxx"
#include "address.hxx"
+#include "filter.hxx"
+#include "scdllapi.h"
class ScDocument;
class ScEEParser;
@@ -41,7 +43,7 @@ class Table;
struct ScEEParseEntry;
-class ScEEImport
+class ScEEImport : public ScEEAbsImport
{
protected:
ScRange maRange;
@@ -51,20 +53,17 @@ protected:
Table* mpRowHeights;
BOOL GraphicSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
- ScEEParseEntry* );
+ ScEEParseEntry* );
void InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab,
- ScEEParseEntry* );
-
+ ScEEParseEntry* );
public:
- ScEEImport( ScDocument* pDoc, const ScRange& rRange );
- virtual ~ScEEImport();
+ ScEEImport( ScDocument* pDoc, const ScRange& rRange );
+ virtual ~ScEEImport();
- ULONG Read( SvStream& rStream, const String& rBaseURL );
- ScRange GetRange() { return maRange; }
- virtual void WriteToDocument( BOOL bSizeColsRows = FALSE,
- double nOutputFactor = 1.0 );
+ virtual ULONG Read( SvStream& rStream, const String& rBaseURL );
+ virtual ScRange GetRange() { return maRange; }
+ virtual void WriteToDocument( BOOL bSizeColsRows = FALSE,
+ double nOutputFactor = 1.0 );
};
-
-
#endif
diff --git a/sc/source/filter/inc/excdoc.hxx b/sc/source/filter/inc/excdoc.hxx
index c9f50d7f2b70..cb98096c458f 100644
--- a/sc/source/filter/inc/excdoc.hxx
+++ b/sc/source/filter/inc/excdoc.hxx
@@ -32,8 +32,8 @@
#define SC_EXCDOC_HXX
#include <tools/solar.h>
-#include "xeroot.hxx"
#include "excrecds.hxx"
+#include "xeroot.hxx"
#include "root.hxx"
//------------------------------------------------------------------ Forwards -
@@ -72,6 +72,8 @@ private:
// pRec mit new anlegen und vergessen, delete macht ExcTable selber!
void Add( XclExpRecordBase* pRec );
+ void FillAsXmlTable( size_t nCodeNameIdx );
+
public:
ExcTable( const XclExpRoot& rRoot );
ExcTable( const XclExpRoot& rRoot, SCTAB nScTab );
@@ -82,6 +84,7 @@ public:
void FillAsEmptyTable( size_t nCodeNameIdx );
void Write( XclExpStream& );
+ void WriteXml( XclExpXmlStream& );
};
@@ -110,6 +113,7 @@ public:
void ReadDoc( void );
void Write( SvStream& rSvStrm );
+ void WriteXml( SvStream& rSvStrm );
};
diff --git a/sc/source/filter/inc/excform.hxx b/sc/source/filter/inc/excform.hxx
index 4dd9c16f8dcf..54cde7ab8a8b 100644
--- a/sc/source/filter/inc/excform.hxx
+++ b/sc/source/filter/inc/excform.hxx
@@ -56,7 +56,7 @@ protected:
// ---------------------------------------------------------------
void DoMulArgs( DefTokenId eId, sal_uInt8 nNumArgs, sal_uInt8 mnMinParamCount = 0 );
- void ExcRelToScRel( UINT16 nRow, UINT8 nCol, SingleRefData&, const BOOL bName );
+ void ExcRelToScRel( UINT16 nRow, UINT8 nCol, ScSingleRefData&, const BOOL bName );
public:
ExcelToSc( const XclImpRoot& rRoot );
@@ -84,8 +84,8 @@ public:
static inline BOOL IsComplColRange( const UINT16 nCol1, const UINT16 nCol2 );
static inline BOOL IsComplRowRange( const UINT16 nRow1, const UINT16 nRow2 );
- void SetComplCol( ComplRefData& );
- void SetComplRow( ComplRefData& );
+ void SetComplCol( ScComplexRefData& );
+ void SetComplRow( ScComplexRefData& );
void ReadExtensions( const ExtensionTypeVec& rExtensions,
XclImpStream& aIn );
@@ -127,7 +127,7 @@ public:
private:
const XclImpLinkManager& rLinkMan;
- void ExcRelToScRel8( UINT16 nRow, UINT16 nCol, SingleRefData&,
+ void ExcRelToScRel8( UINT16 nRow, UINT16 nCol, ScSingleRefData&,
const BOOL bName );
bool GetExternalFileIdFromXti( UINT16 nIxti, sal_uInt16& rFileId ) const;
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index 6a7abfe85132..da4115fc8003 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -42,10 +42,10 @@
#include "olinetab.hxx"
#include "filter.hxx"
#include "rangelst.hxx"
+#include "xerecord.hxx"
#include "xeroot.hxx"
#include "xeformula.hxx"
#include "xestring.hxx"
-#include "xerecord.hxx"
#include "root.hxx"
#include "excdefs.hxx"
#include "cell.hxx"
@@ -241,6 +241,8 @@ class XclExpWindowProtection : public XclExpBoolRecord
{
public:
XclExpWindowProtection(bool bValue);
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
// EXC_ID_PROTECT Document Protection
@@ -284,6 +286,8 @@ class Exc1904 : public ExcBoolRecord
public:
Exc1904( ScDocument& rDoc );
virtual UINT16 GetNum( void ) const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
@@ -295,6 +299,7 @@ protected:
sal_Size nStrPos;
sal_Size nOwnPos; // Position NACH # und Len
UINT16 nGrbit;
+ SCTAB nTab;
ExcBundlesheetBase();
@@ -357,7 +362,12 @@ private:
class XclExpWsbool : public XclExpUInt16Record
{
public:
- explicit XclExpWsbool( bool bFitToPages );
+ explicit XclExpWsbool( bool bFitToPages, SCTAB nScTab = -1, XclExpFilterManager* pManager = NULL );
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+private:
+ SCTAB mnScTab;
+ XclExpFilterManager* mpManager;
};
@@ -405,6 +415,7 @@ public:
void SetCondition( UINT8 nTp, UINT8 nOp, double fV, String* pT );
void Save( XclExpStream& rStrm );
+ void SaveXml( XclExpXmlStream& rStrm );
void SaveText( XclExpStream& rStrm );
};
@@ -432,6 +443,8 @@ public:
inline BOOL HasTop10() const { return ::get_flag( nFlags, EXC_AFFLAG_TOP10 ); }
BOOL AddEntry( const ScQueryEntry& rEntry );
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
// ----------------------------------------------------------------------------
@@ -445,6 +458,9 @@ public:
void AddObjRecs();
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
+ bool HasFilterMode() const;
private:
XclExpAutofilter* GetByCol( SCCOL nCol ); // always 0-based
@@ -457,6 +473,7 @@ private:
XclExpAutofilterList maFilterList;
XclExpFiltermode* pFilterMode;
XclExpAutofilterinfo* pFilterInfo;
+ ScRange maRef;
};
// ----------------------------------------------------------------------------
@@ -475,6 +492,9 @@ public:
/** Returns a record object containing all filter records for the specified sheet. */
XclExpRecordRef CreateRecord( SCTAB nScTab );
+ /** Returns whether or not FilterMode is present */
+ bool HasFilterMode( SCTAB nScTab );
+
private:
using XclExpRoot::CreateRecord;
diff --git a/sc/source/filter/inc/exp_op.hxx b/sc/source/filter/inc/exp_op.hxx
index 4936e07cc36e..4afe6eff534d 100644
--- a/sc/source/filter/inc/exp_op.hxx
+++ b/sc/source/filter/inc/exp_op.hxx
@@ -130,6 +130,21 @@ public:
};
+class ExportXml2007 : public ExportTyp, protected XclExpRoot
+{
+private:
+ ExcDocument* pExcDoc;
+
+protected:
+ RootData* pExcRoot;
+
+public:
+ ExportXml2007( XclExpRootData& rExpData, SvStream& rStrm );
+ virtual ~ExportXml2007();
+ FltError Write();
+};
+
+
#endif
diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx
index 572e9d148a60..d8881889e7fa 100644
--- a/sc/source/filter/inc/fapihelper.hxx
+++ b/sc/source/filter/inc/fapihelper.hxx
@@ -39,6 +39,7 @@
#include <tools/color.hxx>
#include <comphelper/types.hxx>
#include "ftools.hxx"
+#include "scdllapi.h"
namespace com { namespace sun { namespace star {
namespace lang { class XMultiServiceFactory; }
diff --git a/sc/source/filter/inc/formel.hxx b/sc/source/filter/inc/formel.hxx
index ebef6bd83810..0961533731cb 100644
--- a/sc/source/filter/inc/formel.hxx
+++ b/sc/source/filter/inc/formel.hxx
@@ -45,8 +45,8 @@
class XclImpStream;
class ScTokenArray;
class ScFormulaCell;
-struct SingleRefData;
-struct ComplRefData;
+struct ScSingleRefData;
+struct ScComplexRefData;
@@ -83,8 +83,8 @@ public:
virtual ~_ScRangeList();
inline void Append( const ScRange& rRange );
inline void Append( ScRange* pRange );
- inline void Append( const SingleRefData& rSRD );
- inline void Append( const ComplRefData& rCRD );
+ inline void Append( const ScSingleRefData& rSRD );
+ inline void Append( const ScComplexRefData& rCRD );
using List::Count;
inline BOOL HasRanges( void ) const;
@@ -124,13 +124,13 @@ inline const ScRange* _ScRangeList::Next( void )
}
-inline void _ScRangeList::Append( const SingleRefData& r )
+inline void _ScRangeList::Append( const ScSingleRefData& r )
{
List::Insert( new ScRange( r.nCol, r.nRow, r.nTab ), LIST_APPEND );
}
-inline void _ScRangeList::Append( const ComplRefData& r )
+inline void _ScRangeList::Append( const ScComplexRefData& r )
{
List::Insert( new ScRange( r.Ref1.nCol, r.Ref1.nRow, r.Ref1.nTab,
r.Ref2.nCol, r.Ref2.nRow, r.Ref2.nTab ),
@@ -154,8 +154,8 @@ public:
_ScRangeListTabs( void );
virtual ~_ScRangeListTabs();
- void Append( SingleRefData aSRD, const BOOL bLimit = TRUE );
- void Append( ComplRefData aCRD, const BOOL bLimit = TRUE );
+ void Append( ScSingleRefData aSRD, const BOOL bLimit = TRUE );
+ void Append( ScComplexRefData aCRD, const BOOL bLimit = TRUE );
inline BOOL HasRanges( void ) const;
diff --git a/sc/source/filter/inc/fprogressbar.hxx b/sc/source/filter/inc/fprogressbar.hxx
index 77349615faac..ade7ba7b6bec 100644
--- a/sc/source/filter/inc/fprogressbar.hxx
+++ b/sc/source/filter/inc/fprogressbar.hxx
@@ -33,6 +33,7 @@
#include "globstr.hrc"
#include "ftools.hxx"
+#include "scdllapi.h"
class SfxObjectShell;
class ScProgress;
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 0c4b51239f8f..393775e721f7 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -38,6 +38,8 @@
#include <tools/string.hxx>
#include <tools/list.hxx>
#include <tools/debug.hxx>
+#include "filter.hxx"
+#include "scdllapi.h"
// Common macros ==============================================================
@@ -49,6 +51,7 @@
/** Expands to a temporary String, created from an ASCII character array. */
#define CREATE_STRING( ascii ) String( RTL_CONSTASCII_USTRINGPARAM( ascii ) )
/** Expands to a temporary ::rtl::OUString, created from an ASCII character array. */
+#undef CREATE_OUSTRING
#define CREATE_OUSTRING( ascii ) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ascii ) )
// items and item sets --------------------------------------------------------
@@ -503,7 +506,42 @@ public:
using ScfDelList< Type >::Empty;
};
+// ----------------------------------------------------------------------------
+class ScFormatFilterPluginImpl : public ScFormatFilterPlugin {
+ public:
+ ScFormatFilterPluginImpl();
+ // various import filters
+ virtual FltError ScImportLotus123( SfxMedium&, ScDocument*, CharSet eSrc = RTL_TEXTENCODING_DONTKNOW );
+ virtual FltError ScImportQuattroPro( SfxMedium &rMedium, ScDocument *pDoc );
+ virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT );
+ // eFormat == EIF_AUTO -> passender Filter wird automatisch verwendet
+ // eFormat == EIF_BIFF5 -> nur Biff5-Stream fuehrt zum Erfolg (auch wenn in einem Excel97-Doc)
+ // eFormat == EIF_BIFF8 -> nur Biff8-Stream fuehrt zum Erfolg (nur in Excel97-Docs)
+ // eFormat == EIF_BIFF_LE4 -> nur Nicht-Storage-Dateien _koennen_ zum Erfolg fuehren
+ virtual FltError ScImportStarCalc10( SvStream&, ScDocument* );
+ virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress& rInsPos,
+ const CharSet eSrc = RTL_TEXTENCODING_DONTKNOW, UINT32 nDifOption = SC_DIFOPT_EXCEL );
+ virtual FltError ScImportRTF( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange );
+ virtual FltError ScImportHTML( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange, double nOutputFactor = 1.0, BOOL bCalcWidthHeight = TRUE );
+
+ virtual ScEEAbsImport *CreateRTFImport( ScDocument* pDoc, const ScRange& rRange );
+ virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight );
+ virtual String GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrigName );
+
+ // various export filters
+#if ENABLE_LOTUS123_EXPORT
+ virtual FltError ScExportLotus123( SvStream&, ScDocument*, ExportFormatLotus, CharSet eDest );
+#endif
+ virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, CharSet eDest );
+ virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const CharSet eDest,
+ UINT32 nDifOption = SC_DIFOPT_EXCEL );
+ virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest,
+ UINT32 nDifOption = SC_DIFOPT_EXCEL );
+ virtual FltError ScExportHTML( SvStream&, const String& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, BOOL bAll,
+ const String& rStreamPath, String& rNonConvertibleChars );
+ virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest );
+};
+
// ============================================================================
#endif
-
diff --git a/sc/inc/htmlimp.hxx b/sc/source/filter/inc/htmlimp.hxx
index faadf31e8db4..d50998ba295c 100644
--- a/sc/inc/htmlimp.hxx
+++ b/sc/source/filter/inc/htmlimp.hxx
@@ -41,8 +41,8 @@ private:
static void InsertRangeName( ScDocument* pDoc, const String& rName, const ScRange& rRange );
public:
- ScHTMLImport( ScDocument* pDoc, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight = TRUE );
- ~ScHTMLImport();
+ ScHTMLImport( ScDocument* pDoc, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight = TRUE );
+ virtual ~ScHTMLImport();
const ScHTMLParser* GetParser() const { return (ScHTMLParser*)mpParser; }
virtual void WriteToDocument( BOOL bSizeColsRows = FALSE, double nOutputFactor = 1.0 );
diff --git a/sc/source/filter/inc/lotform.hxx b/sc/source/filter/inc/lotform.hxx
index a87a640820e3..0461df8d48c6 100644
--- a/sc/source/filter/inc/lotform.hxx
+++ b/sc/source/filter/inc/lotform.hxx
@@ -87,12 +87,12 @@ private:
static DefTokenId IndexToTokenWK123( BYTE );
void DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtName );
void LotusRelToScRel( UINT16 nCol, UINT16 nRow,
- SingleRefData& rSRD );
+ ScSingleRefData& rSRD );
BOOL bWK3; // alternative Codeumsetzung statt fuer < WK1
BOOL bWK123; // alternative for 123
// -------------------------------------------------------------------
- void ReadSRD( SingleRefData& rSRD, BYTE nFlags );
- inline void ReadCRD( ComplRefData& rCRD, BYTE nFlags );
+ void ReadSRD( ScSingleRefData& rSRD, BYTE nFlags );
+ inline void ReadCRD( ScComplexRefData& rCRD, BYTE nFlags );
void IncToken( TokenId &rParam );
// ACHTUNG: hier wird die aktuelle Token-Kette im Pool
// mit '(<rParam>)+1' fortgeschrieben und mit
@@ -114,7 +114,7 @@ private:
};
-inline void LotusToSc::ReadCRD( ComplRefData& rCRD, BYTE nRelBit )
+inline void LotusToSc::ReadCRD( ScComplexRefData& rCRD, BYTE nRelBit )
{
// erster Teil
ReadSRD( rCRD.Ref1, nRelBit );
diff --git a/sc/source/filter/inc/lotrange.hxx b/sc/source/filter/inc/lotrange.hxx
index 605fca8783c7..e544e953bab3 100644
--- a/sc/source/filter/inc/lotrange.hxx
+++ b/sc/source/filter/inc/lotrange.hxx
@@ -116,7 +116,7 @@ class LotusRangeList : private List
{
private:
LR_ID nIdCnt;
- ComplRefData aComplRef;
+ ScComplexRefData aComplRef;
static SCCOL nEingCol;
static SCROW nEingRow;
public:
diff --git a/sc/source/filter/inc/namebuff.hxx b/sc/source/filter/inc/namebuff.hxx
index 4048d3292ae3..e19252a795a8 100644
--- a/sc/source/filter/inc/namebuff.hxx
+++ b/sc/source/filter/inc/namebuff.hxx
@@ -204,14 +204,14 @@ private:
struct ENTRY
{
StringHashEntry aStrHashEntry;
- ComplRefData aComplRefDataRel;
+ ScComplexRefData aScComplexRefDataRel;
String aScAbsName;
UINT16 nAbsInd; // == 0 -> noch keine Abs-Name!
UINT16 nRelInd;
BOOL bSingleRef;
- ENTRY( const String& rName, const String& rScName, const ComplRefData& rCRD ) :
+ ENTRY( const String& rName, const String& rScName, const ScComplexRefData& rCRD ) :
aStrHashEntry( rName ),
- aComplRefDataRel( rCRD ),
+ aScComplexRefDataRel( rCRD ),
aScAbsName( rScName )
{
nAbsInd = 0;
@@ -224,7 +224,7 @@ private:
public:
RangeNameBufferWK3( void );
virtual ~RangeNameBufferWK3();
- void Add( const String& rName, const ComplRefData& rCRD );
+ void Add( const String& rName, const ScComplexRefData& rCRD );
inline void Add( const String& rName, const ScRange& aScRange );
BOOL FindRel( const String& rRef, UINT16& rIndex );
BOOL FindAbs( const String& rRef, UINT16& rIndex );
@@ -233,8 +233,8 @@ public:
inline void RangeNameBufferWK3::Add( const String& rName, const ScRange& aScRange )
{
- ComplRefData aCRD;
- SingleRefData* pSRD;
+ ScComplexRefData aCRD;
+ ScSingleRefData* pSRD;
const ScAddress* pScAddr;
pSRD = &aCRD.Ref1;
diff --git a/sc/source/filter/inc/qproform.hxx b/sc/source/filter/inc/qproform.hxx
index 82a5dd72d9fb..7118db9f2f5f 100644
--- a/sc/source/filter/inc/qproform.hxx
+++ b/sc/source/filter/inc/qproform.hxx
@@ -79,7 +79,7 @@ class QProToSc : public ConverterBase
ConvErr Convert( const ScTokenArray*& pArray, sal_uInt16 nLen,
const FORMULA_TYPE eFT = FT_CellFormula );
void DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const sal_Char* pExtString );
- void ReadSRD( SingleRefData& rR, sal_Int8 nPage, sal_Int8 nCol, sal_uInt16 rRel );
+ void ReadSRD( ScSingleRefData& rR, sal_Int8 nPage, sal_Int8 nCol, sal_uInt16 rRel );
void IncToken( TokenId &aParam );
DefTokenId IndexToToken( sal_uInt16 nToken );
FUNC_TYPE IndexToType( sal_uInt8 nToken );
diff --git a/sc/inc/rtfimp.hxx b/sc/source/filter/inc/rtfimp.hxx
index 7b05e617f6da..7b05e617f6da 100644
--- a/sc/inc/rtfimp.hxx
+++ b/sc/source/filter/inc/rtfimp.hxx
diff --git a/sc/source/filter/inc/scflt.hxx b/sc/source/filter/inc/scflt.hxx
index c5305364517f..0c43f9b0824a 100644
--- a/sc/source/filter/inc/scflt.hxx
+++ b/sc/source/filter/inc/scflt.hxx
@@ -537,7 +537,7 @@ struct Sc10ChartTypeData
// FontAttribut
-class Sc10FontData : public DataObject
+class Sc10FontData : public ScDataObject
{
public:
INT16 Height;
@@ -546,7 +546,7 @@ public:
sal_Char FaceName[32];
Sc10FontData( const Sc10FontData& rData ) :
- DataObject( rData ),
+ ScDataObject( rData ),
Height( rData.Height ),
CharSet( rData.CharSet ),
PitchAndFamily( rData.PitchAndFamily )
@@ -555,26 +555,26 @@ public:
FaceName[sizeof(FaceName)-1] = 0;
}
Sc10FontData( SvStream& rStream );
- virtual DataObject* Clone() const { return new Sc10FontData(*this); }
+ virtual ScDataObject* Clone() const { return new Sc10FontData(*this); }
};
// Font-Collection
-class Sc10FontCollection : public Collection
+class Sc10FontCollection : public ScCollection
{
protected:
ULONG nError;
public:
Sc10FontCollection( SvStream& rStream );
ULONG GetError() { return nError; }
- Sc10FontData* At(USHORT nIndex) { return (Sc10FontData*)Collection::At(nIndex); }
+ Sc10FontData* At(USHORT nIndex) { return (Sc10FontData*)ScCollection::At(nIndex); }
private:
- using Collection::At;
+ using ScCollection::At;
};
//BereichsDaten
-class Sc10NameData : public DataObject
+class Sc10NameData : public ScDataObject
{
public :
sal_Char Name[32];
@@ -582,7 +582,7 @@ public :
sal_Char Reserved[12];
Sc10NameData(const Sc10NameData& rData) :
- DataObject( rData )
+ ScDataObject( rData )
{
strncpy(Name, rData.Name, sizeof(Name));
Name[sizeof(Name)-1] = 0;
@@ -591,26 +591,26 @@ public :
memcpy(Reserved, rData.Reserved, sizeof(Reserved));
}
Sc10NameData(SvStream& rStream);
- virtual DataObject* Clone() const { return new Sc10NameData(*this); }
+ virtual ScDataObject* Clone() const { return new Sc10NameData(*this); }
};
// Bereichs-Collection
-class Sc10NameCollection : public Collection
+class Sc10NameCollection : public ScCollection
{
protected:
ULONG nError;
public:
Sc10NameCollection(SvStream& rStream);
ULONG GetError() { return nError; }
-Sc10NameData* At(USHORT nIndex) { return (Sc10NameData*)Collection::At(nIndex); }
+Sc10NameData* At(USHORT nIndex) { return (Sc10NameData*)ScCollection::At(nIndex); }
private:
- using Collection::At;
+ using ScCollection::At;
};
// Vorlage-Daten
-class Sc10PatternData : public DataObject
+class Sc10PatternData : public ScDataObject
{
public:
sal_Char Name[32];
@@ -627,7 +627,7 @@ public:
sal_Char Reserved[8];
Sc10PatternData(const Sc10PatternData& rData) :
- DataObject( rData )
+ ScDataObject( rData )
{
strncpy(Name, rData.Name, sizeof(Name));
Name[sizeof(Name)-1] = 0;
@@ -644,42 +644,42 @@ public:
memcpy(Reserved, rData.Reserved, sizeof(Reserved));
}
Sc10PatternData(SvStream& rStream);
-virtual DataObject* Clone() const { return new Sc10PatternData(*this); }
+virtual ScDataObject* Clone() const { return new Sc10PatternData(*this); }
};
// Vorlage-Collection
-class Sc10PatternCollection : public Collection
+class Sc10PatternCollection : public ScCollection
{
protected:
ULONG nError;
public:
Sc10PatternCollection(SvStream& rStream);
ULONG GetError() { return nError; }
- Sc10PatternData* At(USHORT nIndex) { return (Sc10PatternData*)Collection::At(nIndex); }
+ Sc10PatternData* At(USHORT nIndex) { return (Sc10PatternData*)ScCollection::At(nIndex); }
private:
- using Collection::At;
+ using ScCollection::At;
};
// DatenBank-Daten
-class Sc10DataBaseData : public DataObject
+class Sc10DataBaseData : public ScDataObject
{
public:
Sc10DataBaseRec DataBaseRec;
Sc10DataBaseData(const Sc10DataBaseData& rData) :
- DataObject( rData )
+ ScDataObject( rData )
{
memcpy(&DataBaseRec, &rData.DataBaseRec, sizeof(DataBaseRec));
}
Sc10DataBaseData(SvStream& rStream);
-virtual DataObject* Clone() const { return new Sc10DataBaseData(*this); }
+virtual ScDataObject* Clone() const { return new Sc10DataBaseData(*this); }
};
// DatenBank-Collection
-class Sc10DataBaseCollection : public Collection
+class Sc10DataBaseCollection : public ScCollection
{
protected:
ULONG nError;
@@ -687,32 +687,32 @@ protected:
public:
Sc10DataBaseCollection(SvStream& rStream);
ULONG GetError() { return nError; }
- Sc10DataBaseData* At(USHORT nIndex) { return (Sc10DataBaseData*)Collection::At(nIndex); }
+ Sc10DataBaseData* At(USHORT nIndex) { return (Sc10DataBaseData*)ScCollection::At(nIndex); }
private:
- using Collection::At;
+ using ScCollection::At;
};
-class Sc10PageData : public DataObject
+class Sc10PageData : public ScDataObject
{
public:
Sc10PageFormat aPageFormat;
Sc10PageData( const Sc10PageFormat& rFormat ) : aPageFormat(rFormat) {}
int operator==( const Sc10PageData& rData ) const
{ return aPageFormat == rData.aPageFormat; }
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
};
// Seitenformat-Collection
-class Sc10PageCollection : public Collection
+class Sc10PageCollection : public ScCollection
{
public:
- Sc10PageCollection() : Collection(1,1) {};
- Sc10PageData* At(USHORT nIndex) { return (Sc10PageData*)Collection::At(nIndex); }
+ Sc10PageCollection() : ScCollection(1,1) {};
+ Sc10PageData* At(USHORT nIndex) { return (Sc10PageData*)ScCollection::At(nIndex); }
USHORT InsertFormat( const Sc10PageFormat& rData );
void PutToDoc( ScDocument* pDoc );
private:
- using Collection::At;
+ using ScCollection::At;
};
diff --git a/sc/source/filter/inc/tokstack.hxx b/sc/source/filter/inc/tokstack.hxx
index 5d5ec3919f34..ecf1028f39ed 100644
--- a/sc/source/filter/inc/tokstack.hxx
+++ b/sc/source/filter/inc/tokstack.hxx
@@ -63,7 +63,7 @@ struct TokenId
//------------------------------------------------------------------------
-struct ComplRefData;
+struct ScComplexRefData;
class TokenStack;
class ScToken;
@@ -106,7 +106,7 @@ class TokenPool
UINT16 nP_Err;
UINT16 nP_ErrAkt;
- SingleRefData** ppP_RefTr; // Pool fuer Referenzen
+ ScSingleRefData** ppP_RefTr; // Pool fuer Referenzen
UINT16 nP_RefTr;
UINT16 nP_RefTrAkt;
@@ -128,8 +128,8 @@ class TokenPool
struct NLFCONT
{
- SingleRefData aRef;
- NLFCONT( const SingleRefData& r ) : aRef( r ) {}
+ ScSingleRefData aRef;
+ NLFCONT( const ScSingleRefData& r ) : aRef( r ) {}
};
NLFCONT** ppP_Nlf;
UINT16 nP_Nlf;
@@ -204,12 +204,12 @@ class TokenPool
const TokenId Store( const UINT16 nIndex );
inline const TokenId Store( const INT16 nWert );
const TokenId Store( const String& rString );
- const TokenId Store( const SingleRefData& rTr );
- const TokenId Store( const ComplRefData& rTr );
+ const TokenId Store( const ScSingleRefData& rTr );
+ const TokenId Store( const ScComplexRefData& rTr );
const TokenId Store( const DefTokenId eId, const String& rName );
// 4 externals (e.g. AddIns, Makros...)
- const TokenId StoreNlf( const SingleRefData& rTr );
+ const TokenId StoreNlf( const ScSingleRefData& rTr );
const TokenId StoreMatrix( SCSIZE nC, SCSIZE nR );
const TokenId StoreExtName( sal_uInt16 nFileId, const String& rName );
const TokenId StoreExtRef( sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef );
diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx
index c4e9ac72f8f3..d01f81ba8013 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -343,7 +343,8 @@ public:
class ExcBundlesheet8 : public ExcBundlesheetBase
{
private:
- XclExpString aUnicodeName;
+ String sUnicodeName;
+ XclExpString GetName() const;
virtual void SaveCont( XclExpStream& rStrm );
@@ -352,6 +353,8 @@ public:
ExcBundlesheet8( const String& rString );
virtual sal_Size GetLen() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
@@ -401,6 +404,8 @@ public:
void WriteAddress( XclExpStream& rStrm );
void WriteText( XclExpStream& rStrm );
+
+ void SaveXml( XclExpXmlStream& rStrm );
};
@@ -428,6 +433,8 @@ public:
virtual UINT16 GetNum() const;
virtual sal_Size GetLen() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
@@ -451,6 +458,7 @@ public:
virtual ~ExcEScenarioManager();
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
virtual UINT16 GetNum() const;
virtual sal_Size GetLen() const;
@@ -485,6 +493,8 @@ public:
virtual UINT16 GetNum() const;
virtual sal_Size GetLen() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
@@ -501,6 +511,8 @@ public:
virtual UINT16 GetNum() const;
virtual sal_Size GetLen() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
@@ -517,6 +529,8 @@ public:
virtual UINT16 GetNum() const;
virtual sal_Size GetLen() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
@@ -526,6 +540,8 @@ class XclRefmode : public XclExpBoolRecord
{
public:
XclRefmode( const ScDocument& );
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx
index 7c83b38a71fc..854d848a1e22 100644
--- a/sc/source/filter/inc/xechart.hxx
+++ b/sc/source/filter/inc/xechart.hxx
@@ -31,11 +31,11 @@
#ifndef SC_XECHART_HXX
#define SC_XECHART_HXX
+#include "xerecord.hxx"
#include "xlchart.hxx"
#include "xlformula.hxx"
#include "xlstyle.hxx"
#include "xeroot.hxx"
-#include "xerecord.hxx"
#include "xestring.hxx"
class Size;
diff --git a/sc/source/filter/inc/xecontent.hxx b/sc/source/filter/inc/xecontent.hxx
index 396cee399f94..92e80eceb2af 100644
--- a/sc/source/filter/inc/xecontent.hxx
+++ b/sc/source/filter/inc/xecontent.hxx
@@ -34,8 +34,8 @@
#include "rangelst.hxx"
#include "xlcontent.hxx"
#include "xladdress.hxx"
-#include "xeroot.hxx"
#include "xerecord.hxx"
+#include "xeroot.hxx"
#include "xestring.hxx"
#include "xeformula.hxx"
@@ -69,6 +69,7 @@ public:
/** Writes the complete SST and EXTSST records. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
typedef ::std::auto_ptr< XclExpSstImpl > XclExpSstImplPtr;
@@ -90,6 +91,7 @@ public:
/** Writes the record, if it contains at least one merged cell range. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
ScRangeList maMergedRanges; /// All merged cell ranges of the sheet.
@@ -113,6 +115,7 @@ public:
/** Returns the cell representation text or 0, if not available. */
inline const String* GetRepr() const { return mxRepr.get(); }
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Builds file name from the passed file URL. Tries to convert to relative file name.
@param rnLevel (out-param) The parent directory level.
@@ -132,6 +135,8 @@ private:
StringPtr mxRepr; /// Cell representation text.
SvStreamPtr mxVarData; /// Buffer stream with variable data.
sal_uInt32 mnFlags; /// Option flags.
+ XclExpStringRef mxTextMark; /// Location within mxRepr
+ ::rtl::OUString msTarget; /// Target URL
};
typedef XclExpRecordList< XclExpHyperlink > XclExpHyperlinkList;
@@ -199,6 +204,7 @@ public:
/** Writes the CONDFMT record with following CF records, if there is valid data. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Writes the body of the CONDFMT record. */
@@ -209,6 +215,7 @@ private:
XclExpCFList maCFList; /// List of CF records.
XclRangeList maXclRanges; /// Cell ranges for this conditional format.
+ String msSeqRef; /// OOXML Sequence of References
};
// ----------------------------------------------------------------------------
@@ -222,6 +229,7 @@ public:
/** Writes all contained CONDFMT records with their CF records. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
typedef XclExpRecordList< XclExpCondfmt > XclExpCondfmtList;
@@ -251,6 +259,8 @@ public:
@return false = Resulting range list empty - do not write this record. */
bool Finalize();
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
private:
/** Writes the body of the DV record. */
virtual void WriteBody( XclExpStream& rStrm );
@@ -264,7 +274,9 @@ private:
XclExpString maErrorText; /// The error text.
XclExpStringRef mxString1; /// String for first condition formula.
XclTokenArrayRef mxTokArr1; /// Formula for first condition.
+ ::rtl::OUString msFormula1; /// OOXML Formula for first condition.
XclTokenArrayRef mxTokArr2; /// Formula for second condition.
+ ::rtl::OUString msFormula2; /// OOXML Formula for second condition.
sal_uInt32 mnFlags; /// Miscellaneous flags.
ULONG mnScHandle; /// The core handle for quick list search.
};
@@ -283,6 +295,7 @@ public:
/** Writes the DVAL record and the DV record list. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Searches for or creates a XclExpDV record object with the specified handle. */
diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx
index 788f3665cf9a..cbbad6ea71a3 100644
--- a/sc/source/filter/inc/xeescher.hxx
+++ b/sc/source/filter/inc/xeescher.hxx
@@ -32,9 +32,8 @@
#define SC_XEESCHER_HXX
#include <vcl/graph.hxx>
-#include "xlescher.hxx"
-
#include "xcl97rec.hxx"
+#include "xlescher.hxx"
namespace com { namespace sun { namespace star {
namespace script { struct ScriptEventDescriptor; }
@@ -208,12 +207,16 @@ public:
/** Writes the NOTE record, if the respective Escher object is present. */
virtual void Save( XclExpStream& rStrm );
+ void WriteXml( sal_Int32 nAuthorId, XclExpXmlStream& rStrm );
+
+ const XclExpString& GetAuthor() const { return maAuthor; }
private:
/** Writes the body of the NOTE record. */
virtual void WriteBody( XclExpStream& rStrm );
private:
XclExpString maAuthor; /// Name of the author.
+ String maOrigNoteText; /// Original main text of the note.
ByteString maNoteText; /// Main text of the note (<=BIFF7).
ScAddress maScPos; /// Calc cell address of the note.
sal_uInt16 mnObjId; /// Escher object ID (BIFF8).
@@ -222,5 +225,22 @@ private:
// ============================================================================
+class XclExpComments : public XclExpRecord
+{
+public:
+ typedef XclExpRecordList< XclExpNote >
+ XclExpNoteList;
+
+ XclExpComments( SCTAB nTab, XclExpNoteList& rNotes );
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
+private:
+ SCTAB mnTab;
+ XclExpNoteList& mrNotes;
+};
+
+// ============================================================================
+
#endif
diff --git a/sc/source/filter/inc/xelink.hxx b/sc/source/filter/inc/xelink.hxx
index c131c71a59f9..dca9df2409f7 100644
--- a/sc/source/filter/inc/xelink.hxx
+++ b/sc/source/filter/inc/xelink.hxx
@@ -33,14 +33,14 @@
#include "markdata.hxx"
#include "xllink.hxx"
-#include "xehelper.hxx"
#include "xerecord.hxx"
+#include "xehelper.hxx"
#include "xeformula.hxx"
#include "externalrefmgr.hxx"
class ScRange;
-struct SingleRefData;
-struct ComplRefData;
+struct ScSingleRefData;
+struct ScComplexRefData;
/* ============================================================================
Classes for export of different kinds of internal/external references.
@@ -179,9 +179,9 @@ public:
XclExpRefLogEntry* pRefLogEntry = NULL );
/** Stores the cell with the given address in a CRN record list. */
- void StoreCell( const SingleRefData& rRef );
+ void StoreCell( const ScSingleRefData& rRef );
/** Stores all cells in the given range in a CRN record list. */
- void StoreCellRange( const ComplRefData& rRef );
+ void StoreCellRange( const ScComplexRefData& rRef );
void StoreCell( sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef );
diff --git a/sc/source/filter/inc/xename.hxx b/sc/source/filter/inc/xename.hxx
index 020450186dd0..affe57264331 100644
--- a/sc/source/filter/inc/xename.hxx
+++ b/sc/source/filter/inc/xename.hxx
@@ -31,10 +31,10 @@
#ifndef SC_XENAME_HXX
#define SC_XENAME_HXX
+#include "xerecord.hxx"
#include "xlname.hxx"
#include "xlformula.hxx"
#include "xeroot.hxx"
-#include "xerecord.hxx"
// ============================================================================
@@ -81,6 +81,7 @@ public:
/** Writes the entire list of NAME records. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
typedef ScfRef< XclExpNameManagerImpl > XclExpNameMgrImplRef;
diff --git a/sc/source/filter/inc/xepage.hxx b/sc/source/filter/inc/xepage.hxx
index 7653cf3c2b1b..3e119d3e4c1a 100644
--- a/sc/source/filter/inc/xepage.hxx
+++ b/sc/source/filter/inc/xepage.hxx
@@ -31,9 +31,9 @@
#ifndef SC_XEPAGE_HXX
#define SC_XEPAGE_HXX
+#include "xerecord.hxx"
#include "xlpage.hxx"
#include "xeroot.hxx"
-#include "xerecord.hxx"
// Page settings records ======================================================
@@ -45,6 +45,7 @@ class XclExpHeaderFooter : public XclExpRecord
public:
explicit XclExpHeaderFooter( sal_uInt16 nRecId, const String& rHdrString );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Writes the header or footer string. Writes an empty record, if no header/footer present. */
virtual void WriteBody( XclExpStream& rStrm );
@@ -61,6 +62,7 @@ class XclExpSetup : public XclExpRecord
public:
explicit XclExpSetup( const XclPageData& rPageData );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Writes the contents of the SETUP record. */
virtual void WriteBody( XclExpStream& rStrm );
@@ -82,6 +84,7 @@ public:
/** Writes the record, if the list is not empty. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Writes the page break list. */
@@ -106,6 +109,7 @@ public:
/** Writes all page settings records to the stream. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
XclPageData maData; /// Page settings data.
diff --git a/sc/source/filter/inc/xepivot.hxx b/sc/source/filter/inc/xepivot.hxx
index 980b0c13355e..80356d41f4a8 100644
--- a/sc/source/filter/inc/xepivot.hxx
+++ b/sc/source/filter/inc/xepivot.hxx
@@ -32,9 +32,9 @@
#define SC_XEPIVOT_HXX
#include <map>
+#include "xerecord.hxx"
#include "xlpivot.hxx"
#include "xeroot.hxx"
-#include "xerecord.hxx"
class ScDPObject;
class ScDPSaveData;
@@ -208,6 +208,7 @@ public:
/** Writes related records into Workbook stream and creates the pivot cache storage stream. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Returns read/write access to a pivot cache field. */
@@ -456,8 +457,10 @@ public:
/** Writes all pivot caches (all Workbook records and cache streams). */
void WritePivotCaches( XclExpStream& rStrm );
+ void WritePivotCachesXml( XclExpXmlStream& rStrm );
/** Writes all pivot tables of the specified Calc sheet. */
void WritePivotTables( XclExpStream& rStrm, SCTAB nScTab );
+ void WritePivotTablesXml( XclExpXmlStream& rStrm, SCTAB nScTab );
private:
/** Finds an existing (if enabled in mbShareCaches) or creates a new pivot cache.
diff --git a/sc/source/filter/inc/xerecord.hxx b/sc/source/filter/inc/xerecord.hxx
index 1a7cf2143736..355541234651 100644
--- a/sc/source/filter/inc/xerecord.hxx
+++ b/sc/source/filter/inc/xerecord.hxx
@@ -50,6 +50,7 @@ public:
/** Overwrite this method to do any operation while saving the record. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
//UNUSED2008-05 /** Calls Save(XclExpStream&) nCount times. */
//UNUSED2008-05 void SaveRepeated( XclExpStream& rStrm, size_t nCount );
@@ -57,6 +58,80 @@ public:
// ----------------------------------------------------------------------------
+class XclExpDelegatingRecord : public XclExpRecordBase
+{
+public:
+ XclExpDelegatingRecord( XclExpRecordBase* pRecord );
+ ~XclExpDelegatingRecord();
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+private:
+ XclExpRecordBase* mpRecord;
+};
+
+// ----------------------------------------------------------------------------
+
+class XclExpXmlElementRecord : public XclExpRecordBase
+{
+public:
+ XclExpXmlElementRecord( sal_Int32 nElement, void (*pAttributes)( XclExpXmlStream& rStrm) = NULL );
+ virtual ~XclExpXmlElementRecord();
+
+protected:
+ sal_Int32 mnElement;
+ void (*mpAttributes)( XclExpXmlStream& rStrm );
+};
+
+// ----------------------------------------------------------------------------
+
+class XclExpXmlStartElementRecord : public XclExpXmlElementRecord
+{
+public:
+ XclExpXmlStartElementRecord( sal_Int32 nElement, void (*pAttributes)( XclExpXmlStream& rStrm) = NULL );
+ virtual ~XclExpXmlStartElementRecord();
+
+ /** Starts the element nElement */
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+};
+
+// ----------------------------------------------------------------------------
+
+class XclExpXmlEndElementRecord : public XclExpXmlElementRecord
+{
+public:
+ XclExpXmlEndElementRecord( sal_Int32 nElement );
+ virtual ~XclExpXmlEndElementRecord();
+
+ /** Ends the element nElement */
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+};
+
+// ----------------------------------------------------------------------------
+
+class XclExpXmlStartSingleElementRecord : public XclExpXmlElementRecord
+{
+public:
+ XclExpXmlStartSingleElementRecord( sal_Int32 nElement, void (*pAttributes)( XclExpXmlStream& rStrm) = NULL );
+ virtual ~XclExpXmlStartSingleElementRecord();
+
+ /** Starts the single element nElement */
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+};
+
+// ----------------------------------------------------------------------------
+
+class XclExpXmlEndSingleElementRecord : public XclExpRecordBase
+{
+public:
+ XclExpXmlEndSingleElementRecord();
+ virtual ~XclExpXmlEndSingleElementRecord();
+
+ /** Ends the single element nElement */
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+};
+
+// ----------------------------------------------------------------------------
+
/** Base class for single records with any content.
This class handles writing the record header. Derived classes only have to
@@ -131,13 +206,19 @@ public:
@param rValue The value for the record body.
@param nSize Record size. Uses sizeof( Type ), if this parameter is omitted. */
inline explicit XclExpValueRecord( sal_uInt16 nRecId, const Type& rValue, sal_Size nSize = sizeof( Type ) ) :
- XclExpRecord( nRecId, nSize ), maValue( rValue ) {}
+ XclExpRecord( nRecId, nSize ), maValue( rValue ), mnAttribute( -1 ) {}
/** Returns the value of the record. */
inline const Type& GetValue() const { return maValue; }
/** Sets a new record value. */
inline void SetValue( const Type& rValue ) { maValue = rValue; }
+ /** Sets the OOXML attribute this record corresponds to */
+ XclExpValueRecord* SetAttribute( sal_Int32 nId );
+
+ /** Write the OOXML attribute and its value */
+ void SaveXml( XclExpXmlStream& rStrm );
+
private:
/** Writes the body of the record. */
inline virtual void WriteBody( XclExpStream& rStrm ) { rStrm << maValue; }
@@ -145,8 +226,29 @@ private:
private:
Type maValue; /// The record data.
+ sal_Int32 mnAttribute; /// The OOXML attribute Id
};
+template< typename Type >
+void XclExpValueRecord< Type >::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( mnAttribute == -1 )
+ return;
+ rStrm.WriteAttributes(
+ mnAttribute, rtl::OString::valueOf( (sal_Int32) maValue ).getStr(),
+ FSEND );
+}
+
+template<>
+void XclExpValueRecord<double>::SaveXml( XclExpXmlStream& rStrm );
+
+template< typename Type >
+XclExpValueRecord< Type >* XclExpValueRecord< Type >::SetAttribute( sal_Int32 nId )
+{
+ mnAttribute = nId;
+ return this;
+}
+
// ----------------------------------------------------------------------------
/** A record containing an unsigned 16-bit value. */
@@ -167,20 +269,23 @@ class XclExpBoolRecord : public XclExpRecord
public:
/** @param nRecId The record ID of this record.
@param nValue The value for the record body. */
- inline explicit XclExpBoolRecord( sal_uInt16 nRecId, bool bValue ) :
- XclExpRecord( nRecId, 2 ), mbValue( bValue ) {}
+ inline explicit XclExpBoolRecord( sal_uInt16 nRecId, bool bValue, sal_Int32 nAttribute = -1 ) :
+ XclExpRecord( nRecId, 2 ), mbValue( bValue ), mnAttribute( nAttribute ) {}
/** Returns the Boolean value of the record. */
inline bool GetBool() const { return mbValue; }
/** Sets a new Boolean record value. */
inline void SetBool( bool bValue ) { mbValue = bValue; }
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
private:
/** Writes the body of the record. */
virtual void WriteBody( XclExpStream& rStrm );
private:
bool mbValue; /// The record data.
+ sal_Int32 mnAttribute; /// The attribute to generate within SaveXml()
};
// ----------------------------------------------------------------------------
@@ -272,6 +377,13 @@ public:
(*aIt)->Save( rStrm );
}
+ inline virtual void SaveXml( XclExpXmlStream& rStrm )
+ {
+ // inlining prevents warning in wntmsci10
+ for( typename RecordVec::iterator aIt = maRecs.begin(), aEnd = maRecs.end(); aIt != aEnd; ++aIt )
+ (*aIt)->SaveXml( rStrm );
+ }
+
private:
typedef ::std::vector< RecordRefType > RecordVec;
RecordVec maRecs;
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index 8408fef68acf..8792f26c6582 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -33,7 +33,15 @@
#ifndef SC_XESTREAM_HXX
#define SC_XESTREAM_HXX
+#include <map>
+#include <stack>
+#include <string>
+
+#include <oox/core/xmlfilterbase.hxx>
+#include <sax/fshelper.hxx>
+
#include "xlstream.hxx"
+#include "xestring.hxx"
/* ============================================================================
Output stream class for Excel export
@@ -248,5 +256,102 @@ inline XclExpStream& XclExpStream::operator<<( double fValue )
// ============================================================================
+// ----------------------------------------------------------------------------
+
+
+// ============================================================================
+
+// `s.GetChar(0) != 0` needed because some strings on export only contain NULL.
+#define XESTRING_TO_PSZ(s) \
+ (s.Len() && s.GetChar( 0 ) != 0 ? XclXmlUtils::ToOString( s ).getStr() : NULL)
+
+class ScAddress;
+class ScDocument;
+class ScRange;
+class ScRangeList;
+class ScTokenArray;
+struct XclAddress;
+struct XclFontData;
+class XclRangeList;
+
+class XclXmlUtils
+{
+ XclXmlUtils();
+ ~XclXmlUtils();
+ XclXmlUtils(const XclXmlUtils&);
+ XclXmlUtils& operator=(const XclXmlUtils&);
+public:
+ static ::rtl::OUString GetStreamName( const char* sStreamDir, const char* sStream, sal_Int32 nId );
+
+ static ::rtl::OString ToOString( const Color& rColor );
+ static ::rtl::OString ToOString( const ::rtl::OUString& s );
+ static ::rtl::OString ToOString( const ScfUInt16Vec& rBuffer );
+ static ::rtl::OString ToOString( const String& s );
+ static ::rtl::OString ToOString( const ScAddress& rRange );
+ static ::rtl::OString ToOString( const ScRange& rRange );
+ static ::rtl::OString ToOString( const ScRangeList& rRangeList );
+ static ::rtl::OString ToOString( const XclAddress& rAddress );
+ static ::rtl::OString ToOString( const XclExpString& s );
+ static ::rtl::OString ToOString( const XclRangeList& rRangeList );
+
+ static ::rtl::OUString ToOUString( const char* s );
+ static ::rtl::OUString ToOUString( const ScfUInt16Vec& rBuffer, sal_Int32 nStart = 0, sal_Int32 nLength = -1 );
+ static ::rtl::OUString ToOUString( const String& s );
+ static ::rtl::OUString ToOUString( ScDocument& rDocument, const ScAddress& rAddress, ScTokenArray* pTokenArray );
+ static ::rtl::OUString ToOUString( const XclExpString& s );
+ static const char* ToPsz( bool b );
+};
+
+class XclExpXmlStream : public oox::core::XmlFilterBase
+{
+public:
+ XclExpXmlStream( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rSMgr, SvStream& rStrm, const XclExpRoot& rRoot );
+ virtual ~XclExpXmlStream();
+
+ /** Returns the filter root data. */
+ inline const XclExpRoot& GetRoot() const { return mrRoot; }
+
+ sax_fastparser::FSHelperPtr& GetCurrentStream();
+ void PushStream( sax_fastparser::FSHelperPtr aStream );
+ void PopStream();
+
+ ::rtl::OUString GetIdForPath( const ::rtl::OUString& rPath );
+ sax_fastparser::FSHelperPtr GetStreamForPath( const ::rtl::OUString& rPath );
+
+ sax_fastparser::FSHelperPtr& WriteAttributes( sal_Int32 nAttribute, ... );
+ sax_fastparser::FSHelperPtr& WriteFontData( const XclFontData& rFontData, sal_Int32 nNameId );
+
+ sax_fastparser::FSHelperPtr CreateOutputStream (
+ const ::rtl::OUString& sFullStream,
+ const ::rtl::OUString& sRelativeStream,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xParentRelation,
+ const char* sContentType,
+ const char* sRelationshipType,
+ ::rtl::OUString* pRelationshipId = NULL );
+
+ // ignore
+ virtual bool exportDocument() throw();
+
+ // only needed for import; ignore
+ virtual bool importDocument() throw();
+ virtual sal_Int32 getSchemeClr( sal_Int32 nColorSchemeToken ) const;
+ virtual const oox::vml::DrawingPtr getDrawings();
+ virtual const oox::drawingml::Theme* getCurrentTheme() const;
+ virtual const oox::drawingml::table::TableStyleListPtr getTableStyles();
+ virtual oox::drawingml::chart::ChartConverter& getChartConverter();
+
+ void Trace( const char* format, ...);
+private:
+ virtual ::rtl::OUString implGetImplementationName() const;
+
+ typedef std::map< ::rtl::OUString,
+ std::pair< ::rtl::OUString,
+ sax_fastparser::FSHelperPtr > > XclExpXmlPathToStateMap;
+
+ const XclExpRoot& mrRoot; /// Filter root data.
+ std::stack< sax_fastparser::FSHelperPtr > maStreams;
+ XclExpXmlPathToStateMap maOpenedStreamMap;
+};
+
#endif
diff --git a/sc/source/filter/inc/xestring.hxx b/sc/source/filter/inc/xestring.hxx
index d26d69976171..69a1a7af09fb 100644
--- a/sc/source/filter/inc/xestring.hxx
+++ b/sc/source/filter/inc/xestring.hxx
@@ -39,6 +39,7 @@ class ScEditCell;
class ScPatternAttr;
class EditTextObject;
class XclExpStream;
+class XclExpXmlStream;
/** This class stores an unformatted or formatted string for Excel export.
@@ -228,6 +229,8 @@ public:
/** Returns a hash value for the string. */
sal_uInt16 GetHash() const;
+ const ScfUInt16Vec& GetUnicodeBuffer() const { return maUniBuffer; }
+
// streaming --------------------------------------------------------------
/** Writes the string length field (1 byte or 2 bytes). */
@@ -250,6 +253,8 @@ public:
/** Writes the entire string to memory. */
void WriteToMem( sal_uInt8* pnMem ) const;
+ void WriteXml( XclExpXmlStream& rStrm ) const;
+
// ------------------------------------------------------------------------
private:
/** Returns true, if the flag field should be written. */
diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx
index 0c5523a510da..2e1f89641b77 100644
--- a/sc/source/filter/inc/xestyle.hxx
+++ b/sc/source/filter/inc/xestyle.hxx
@@ -37,9 +37,9 @@
#include <svtools/zforlist.hxx>
#include <svtools/nfkeytab.hxx>
#include <svx/svxfont.hxx>
+#include "xerecord.hxx"
#include "xlstyle.hxx"
#include "xeroot.hxx"
-#include "xerecord.hxx"
/* ============================================================================
- Buffers for style records (PALETTE, FONT, FORMAT, XF, STYLE).
@@ -119,6 +119,7 @@ public:
/** Saves the PALETTE record, if it differs from the default palette. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Writes the contents of the PALETTE record. */
@@ -153,6 +154,8 @@ public:
@param nHash The hash value calculated from the font data. */
virtual bool Equals( const XclFontData& rFontData, sal_uInt32 nHash ) const;
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
private:
/** Writes the contents of the FONT record. */
virtual void WriteBody( XclExpStream& rStrm );
@@ -223,6 +226,7 @@ public:
/** Writes all FONT records contained in this buffer. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
/** Returns the script type of the first font item found in the item set and its parents. */
static sal_Int16 GetFirstUsedScript( const SfxItemSet& rItemSet );
@@ -280,6 +284,7 @@ public:
/** Writes all FORMAT records contained in this buffer. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Writes the FORMAT record with index nXclIx and format string rFormatStr. */
@@ -287,6 +292,8 @@ private:
/** Writes the FORMAT record represented by rFormat. */
void WriteFormatRecord( XclExpStream& rStrm, const XclExpNumFmt& rFormat );
+ String GetFormatCode ( const XclExpNumFmt& rFormat );
+
private:
typedef ::std::auto_ptr< SvNumberFormatter > SvNumberFormatterPtr;
typedef ::std::vector< XclExpNumFmt > XclExpNumFmtVec;
@@ -315,6 +322,8 @@ struct XclExpCellProt : public XclCellProt
#endif
/** Fills the data to the passed fields of a BIFF3-BIFF8 XF record. */
void FillToXF3( sal_uInt16& rnProt ) const;
+
+ void SaveXml( XclExpXmlStream& rStrm ) const;
};
// ----------------------------------------------------------------------------
@@ -342,6 +351,8 @@ struct XclExpCellAlign : public XclCellAlign
void FillToXF5( sal_uInt16& rnAlign ) const;
/** Fills the data to the passed fields of a BIFF8 XF record. */
void FillToXF8( sal_uInt16& rnAlign, sal_uInt16& rnMiscAttrib ) const;
+
+ void SaveXml( XclExpXmlStream& rStrm ) const;
};
// ----------------------------------------------------------------------------
@@ -379,6 +390,8 @@ struct XclExpCellBorder : public XclCellBorder
/** Fills the data to the passed fields of a BIFF8 CF (conditional format) record. */
void FillToCF8( sal_uInt16& rnLine, sal_uInt32& rnColor ) const;
+
+ void SaveXml( XclExpXmlStream& rStrm ) const;
};
// ----------------------------------------------------------------------------
@@ -413,6 +426,8 @@ struct XclExpCellArea : public XclCellArea
/** Fills the data to the passed fields of a BIFF8 CF (conditional format) record. */
void FillToCF8( sal_uInt16& rnPattern, sal_uInt16& rnColor ) const;
+
+ void SaveXml( XclExpXmlStream& rStrm ) const;
};
// ----------------------------------------------------------------------------
@@ -478,6 +493,10 @@ public:
/** Returns true, if this XF record is completely equal to the passed. */
bool Equals( const XclExpXF& rCmpXF ) const;
+ void SetXmlIds( sal_uInt32 nBorderId, sal_uInt32 nFillId );
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
protected:
explicit XclExpXF( const XclExpRoot& rRoot, bool bCellXF );
@@ -492,6 +511,8 @@ protected: // access for XclExpDefaultXF
ULONG mnScNumFmt; /// Calc number format index.
sal_uInt16 mnXclFont; /// Excel font index.
sal_uInt16 mnXclNumFmt; /// Excel number format index.
+ sal_Int32 mnBorderId; /// OOXML Border Index
+ sal_Int32 mnFillId; /// OOXML Fill Index
private:
using XclXFBase::Equals;
@@ -565,6 +586,10 @@ public:
/** Returns true, if this record represents an Excel built-in style. */
inline bool IsBuiltIn() const { return mnStyleId != EXC_STYLE_USERDEF; }
+ inline const String& GetName() const { return maName; }
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
private:
/** Writes the contents of the STYLE record. */
virtual void WriteBody( XclExpStream& rStrm );
@@ -639,8 +664,12 @@ public:
/** Returns the Excel XF index of the XF record with passed XF ID. */
sal_uInt16 GetXFIndex( sal_uInt32 nXFId ) const;
+ sal_Int32 GetXmlStyleIndex( sal_uInt32 nXFId ) const;
+ sal_Int32 GetXmlCellIndex( sal_uInt32 nXFId ) const;
+
/** Writes all XF records contained in this buffer. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
typedef XclExpRecordList< XclExpXF > XclExpXFList;
@@ -684,6 +713,9 @@ private:
/** Appends a XF index to the internal ID<->index maps. */
void AppendXFIndex( sal_uInt32 nXFId );
+ void AddBorderAndFill( const XclExpXF& rXF );
+ void SaveXFXml( XclExpXmlStream& rStrm, XclExpXF& rXF );
+
private:
/** Extended info about a built-in XF. */
struct XclExpBuiltInInfo
@@ -695,12 +727,30 @@ private:
explicit XclExpBuiltInInfo();
};
typedef ::std::map< sal_uInt32, XclExpBuiltInInfo > XclExpBuiltInMap;
+ typedef ::std::vector< XclExpCellBorder > XclExpBorderList;
+ typedef ::std::vector< XclExpCellArea > XclExpFillList;
XclExpXFList maXFList; /// List of all XF records.
XclExpStyleList maStyleList; /// List of all STYLE records.
XclExpBuiltInMap maBuiltInMap; /// Contained elements describe built-in XFs.
ScfUInt16Vec maXFIndexVec; /// Maps XF IDs to XF indexes.
+ ScfUInt16Vec maStyleIndexes; /// Maps XF IDs to OOXML Style indexes
+ ScfUInt16Vec maCellIndexes; /// Maps XF IDs to OOXML Cell indexes
XclExpXFList maSortedXFList; /// List of XF records in XF index order.
+ XclExpBorderList maBorders; /// List of borders used by XF records
+ XclExpFillList maFills; /// List of fills used by XF records
+
+};
+
+// ============================================================================
+
+class XclExpXmlStyleSheet : public XclExpRecordBase, protected XclExpRoot
+{
+public:
+ explicit XclExpXmlStyleSheet( const XclExpRoot& rRoot );
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+private:
};
// ============================================================================
diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx
index a00a69603a44..024a9e808e8f 100644
--- a/sc/source/filter/inc/xetable.hxx
+++ b/sc/source/filter/inc/xetable.hxx
@@ -379,6 +379,7 @@ public:
const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
double fValue );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
virtual void WriteContents( XclExpStream& rStrm );
@@ -398,6 +399,7 @@ public:
const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
bool bValue );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
virtual void WriteContents( XclExpStream& rStrm );
@@ -417,6 +419,7 @@ public:
const ScPatternAttr* pPattern, sal_uInt32 nForcedXFId,
sal_uInt8 nErrCode );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
virtual void WriteContents( XclExpStream& rStrm );
@@ -454,6 +457,7 @@ public:
/** Returns true if the cell contains multi-line text. */
virtual bool IsMultiLineText() const;
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Initializes the record contents. Called from constructors. */
void Init( const XclExpRoot& rRoot,
@@ -486,6 +490,7 @@ public:
/** Writes the FORMULA record and additional records related to the formula. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
virtual void WriteContents( XclExpStream& rStrm );
@@ -525,6 +530,7 @@ public:
/** Writes the record, calls WriteContents() for each contained cell.
@descr May write several records, if unused XF indexes are contained. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
protected:
explicit XclExpMultiCellBase( sal_uInt16 nRecId, sal_uInt16 nMulRecId,
@@ -558,6 +564,7 @@ private:
/** Derived classes write the remaining contents of the specified cell (without XF index).
@param nRelCol Relative column index (starts with 0 for first cell of this record). */
virtual void WriteContents( XclExpStream& rStrm, sal_uInt16 nRelCol ) = 0;
+ virtual void WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress& rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol ) = 0;
private:
typedef ::std::deque< XclExpMultiXFId > XclExpMultiXFIdDeq;
@@ -591,6 +598,7 @@ public:
private:
/** Writes the remaining contents of the specified cell (without XF index). */
virtual void WriteContents( XclExpStream& rStrm, sal_uInt16 nRelCol );
+ virtual void WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress& rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol );
};
// ----------------------------------------------------------------------------
@@ -611,6 +619,7 @@ public:
private:
/** Writes the remaining contents of the specified cell (without XF index). */
virtual void WriteContents( XclExpStream& rStrm, sal_uInt16 nRelCol );
+ virtual void WriteXmlContents( XclExpXmlStream& rStrm, const XclAddress& rAddress, sal_uInt32 nXFId, sal_uInt16 nRelCol );
private:
ScfInt32Vec maRkValues; /// The cell values.
@@ -714,6 +723,7 @@ public:
sal_uInt16 nFirstUsedXclCol, sal_uInt32 nFirstUsedXclRow,
sal_uInt16 nFirstFreeXclCol, sal_uInt32 nFirstFreeXclRow );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Writes the contents of the DIMENSIONS record. */
virtual void WriteBody( XclExpStream& rStrm );
@@ -785,6 +795,8 @@ public:
/** Returns true, if the column has default format and width. */
bool IsDefault( const XclExpDefcolwidth& rDefColWidth ) const;
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
private:
/** Writes the contents of this COLINFO record. */
virtual void WriteBody( XclExpStream& rStrm );
@@ -820,6 +832,7 @@ public:
/** Writes all COLINFO records of this buffer. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
typedef XclExpRecordList< XclExpColinfo > XclExpColinfoList;
@@ -931,6 +944,7 @@ public:
/** Writes the ROW record if the row is not disabled (see DisableIfDefault() function). */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Initializes the record data. Called from constructors. */
@@ -949,6 +963,7 @@ private:
sal_uInt16 mnHeight; /// Row height in twips.
sal_uInt16 mnFlags; /// Flags for the ROW record.
sal_uInt16 mnXFIndex; /// Default row formatting.
+ sal_uInt16 mnOutlineLevel; /// Outline Level (for OOXML)
bool mbAlwaysEmpty; /// true = Do not add blank cells in Finalize().
bool mbEnabled; /// true = Write this ROW record.
};
@@ -979,6 +994,9 @@ public:
/** Writes the DIMENSIONS record, all ROW records and all cell records. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
+ XclExpDimensions* GetDimensions();
private:
/** Returns access to the specified ROW record. Inserts preceding missing ROW records.
@@ -1042,9 +1060,10 @@ public:
@param nRecId The record identifier that specifies which record is
returned. Possible values are: EXC_ID_DEFROWHEIGHT, EXC_ID_NOTE,
EXC_ID_MERGEDCELLS, EXC_ID_HLINK, EXC_ID_DVAL. */
- XclExpRecordRef CreateRecord( sal_uInt16 nRecId ) const;
+ XclExpRecordRef CreateRecord( sal_uInt16 nRecId );
/** Saves the entire cell table. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
typedef XclExpRecordList< XclExpNote > XclExpNoteList;
diff --git a/sc/source/filter/inc/xeview.hxx b/sc/source/filter/inc/xeview.hxx
index 08445b12e8cb..149cdad4d85b 100644
--- a/sc/source/filter/inc/xeview.hxx
+++ b/sc/source/filter/inc/xeview.hxx
@@ -31,9 +31,9 @@
#ifndef SC_XEVIEW_HXX
#define SC_XEVIEW_HXX
+#include "xerecord.hxx"
#include "xlview.hxx"
#include "xeroot.hxx"
-#include "xerecord.hxx"
// Workbook view settings records =============================================
@@ -43,6 +43,8 @@ class XclExpWindow1 : public XclExpRecord
public:
explicit XclExpWindow1( const XclExpRoot& rRoot );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
private:
/** Writes the contents of the WINDOW1 record. */
virtual void WriteBody( XclExpStream& rStrm );
@@ -101,6 +103,8 @@ class XclExpPane : public XclExpRecord
public:
explicit XclExpPane( const XclTabViewData& rData );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
private:
/** Writes the contents of the PANE record. */
virtual void WriteBody( XclExpStream& rStrm );
@@ -120,6 +124,7 @@ class XclExpSelection : public XclExpRecord
public:
explicit XclExpSelection( const XclTabViewData& rData, sal_uInt8 nPane );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Writes the contents of the SELECTION record. */
virtual void WriteBody( XclExpStream& rStrm );
@@ -140,6 +145,7 @@ public:
/** Writes all view settings records to the stream. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
/** Creates selection data for the specified pane. */
diff --git a/sc/source/filter/inc/xlconst.hxx b/sc/source/filter/inc/xlconst.hxx
index a71d8bc42708..2d3135bc0816 100644
--- a/sc/source/filter/inc/xlconst.hxx
+++ b/sc/source/filter/inc/xlconst.hxx
@@ -48,6 +48,13 @@ enum XclBiff
EXC_BIFF_UNKNOWN /// Unknown BIFF version.
};
+/** An enumeration for all Excel output format types. */
+enum XclOutput
+{
+ EXC_OUTPUT_BINARY, /// MS Excel binary .xls
+ EXC_OUTPUT_XML_2007, /// MS Excel 2007 .xlsx
+};
+
// Excel sheet dimensions -----------------------------------------------------
const SCCOL EXC_MAXCOL2 = 255;
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index d7cc0ca298e1..12ab2808a1ab 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -86,6 +86,7 @@ struct XclRootData
typedef ScfRef< RootData > RootDataRef;
XclBiff meBiff; /// Current BIFF version.
+ XclOutput meOutput; /// Current Output format.
SfxMedium& mrMedium; /// The medium to import from.
SotStorageRef mxRootStrg; /// The root OLE storage of imported/exported file.
ScDocument& mrDoc; /// The source or destination document.
@@ -154,6 +155,8 @@ public:
/** Returns the current BIFF version of the importer/exporter. */
inline XclBiff GetBiff() const { return mrData.meBiff; }
+ /** Returns the current output format of the importer/exporter. */
+ inline XclOutput GetOutput() const { return mrData.meOutput; }
/** Returns true, if currently a document is imported. */
inline bool IsImport() const { return !mrData.mbExport; }
/** Returns true, if currently a document is exported. */
diff --git a/sc/source/filter/lotus/export.cxx b/sc/source/filter/lotus/export.cxx
index 9c1e43c44635..ab5554591c15 100644
--- a/sc/source/filter/lotus/export.cxx
+++ b/sc/source/filter/lotus/export.cxx
@@ -38,7 +38,7 @@
#include "exp_op.hxx"
#if ENABLE_LOTUS123_EXPORT
-FltError ScExportLotus123( SvStream& aStream, ScDocument* pDoc, ExportFormatLotus eFormat, CharSet eDest )
+FltError ScFormatFilterPluginImpl::ScExportLotus123( SvStream& aStream, ScDocument* pDoc, ExportFormatLotus eFormat, CharSet eDest )
{
switch( eFormat )
{
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index f6ca73030cfd..42b55943026e 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -225,7 +225,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtString )
}
-void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, SingleRefData& rSRD )
+void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, ScSingleRefData& rSRD )
{
// Col-Bemachung
if( nCol & 0x8000 )
@@ -304,7 +304,7 @@ void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, SingleRefData& rSRD )
}
-void LotusToSc::ReadSRD( SingleRefData& rSRD, BYTE nRelBit )
+void LotusToSc::ReadSRD( ScSingleRefData& rSRD, BYTE nRelBit )
{
BYTE nTab, nCol;
UINT16 nRow;
@@ -394,9 +394,9 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest,
const sal_Char* pExtName = 0;
RangeNameBufferWK3& rRangeNameBufferWK3 = *pLotusRoot->pRngNmBffWK3;
- ComplRefData aCRD;
+ ScComplexRefData aCRD;
aCRD.InitFlags();
- SingleRefData& rR = aCRD.Ref1;
+ ScSingleRefData& rR = aCRD.Ref1;
LR_ID nId;
TokenId nNewId;
diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx
index 67dca8dd1057..5d6b4045e007 100644
--- a/sc/source/filter/lotus/lotus.cxx
+++ b/sc/source/filter/lotus/lotus.cxx
@@ -38,15 +38,14 @@
#include "scerrors.hxx"
#include "root.hxx"
#include "filtopt.hxx"
+#include "ftools.hxx"
//------------------------------------------------------------------------
extern FltError ScImportLotus123old( SvStream&, ScDocument*, CharSet eSrc );
// alter Krempel in filter.cxx!
-
-
-FltError ScImportLotus123( SfxMedium& rMedium, ScDocument* pDocument, CharSet eSrc )
+FltError ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocument* pDocument, CharSet eSrc )
{
ScFilterOptions aFilterOpt;
BOOL bWithWK3 = aFilterOpt.GetWK3Flag();
@@ -104,6 +103,3 @@ FltError ScImportLotus123( SfxMedium& rMedium, ScDocument* pDocument, CharSet eS
return eRet;
}
-
-
-
diff --git a/sc/source/filter/lotus/makefile.mk b/sc/source/filter/lotus/makefile.mk
index 980483cb9470..d16c4f2aca32 100644
--- a/sc/source/filter/lotus/makefile.mk
+++ b/sc/source/filter/lotus/makefile.mk
@@ -45,7 +45,6 @@ AUTOSEG=true
.INCLUDE : scpre.mk
.INCLUDE : settings.mk
.INCLUDE : sc.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index aaeee31d6faa..b413384064c4 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -443,7 +443,7 @@ LotusRangeList::LotusRangeList( void )
{
aComplRef.InitFlags();
- SingleRefData* pSingRef;
+ ScSingleRefData* pSingRef;
nIdCnt = 1;
pSingRef = &aComplRef.Ref1;
@@ -496,7 +496,7 @@ void LotusRangeList::Append( LotusRange* pLR, const String& rName )
ScTokenArray aTokArray;
- SingleRefData* pSingRef = &aComplRef.Ref1;
+ ScSingleRefData* pSingRef = &aComplRef.Ref1;
pSingRef->nCol = pLR->nColStart;
pSingRef->nRow = pLR->nRowStart;
@@ -545,7 +545,7 @@ RangeNameBufferWK3::~RangeNameBufferWK3()
}
-void RangeNameBufferWK3::Add( const String& rOrgName, const ComplRefData& rCRD )
+void RangeNameBufferWK3::Add( const String& rOrgName, const ScComplexRefData& rCRD )
{
String aScName( rOrgName );
ScfTools::ConvertToScDefinedName( aScName );
@@ -556,8 +556,8 @@ void RangeNameBufferWK3::Add( const String& rOrgName, const ComplRefData& rCRD )
pScTokenArray->Clear();
- register const SingleRefData& rRef1 = rCRD.Ref1;
- register const SingleRefData& rRef2 = rCRD.Ref2;
+ register const ScSingleRefData& rRef1 = rCRD.Ref1;
+ register const ScSingleRefData& rRef2 = rCRD.Ref2;
if( rRef1.nCol == rRef2.nCol && rRef1.nRow == rRef2.nRow && rRef1.nTab == rRef2.nTab )
{
@@ -616,7 +616,7 @@ BOOL RangeNameBufferWK3::FindAbs( const String& rRef, UINT16& rIndex )
rIndex = pFind->nAbsInd;
else
{
- SingleRefData* pRef = &pFind->aComplRefDataRel.Ref1;
+ ScSingleRefData* pRef = &pFind->aScComplexRefDataRel.Ref1;
pScTokenArray->Clear();
pRef->SetColRel( FALSE );
@@ -627,11 +627,11 @@ BOOL RangeNameBufferWK3::FindAbs( const String& rRef, UINT16& rIndex )
pScTokenArray->AddSingleReference( *pRef );
else
{
- pRef = &pFind->aComplRefDataRel.Ref2;
+ pRef = &pFind->aScComplexRefDataRel.Ref2;
pRef->SetColRel( FALSE );
pRef->SetRowRel( FALSE );
pRef->SetTabRel( TRUE );
- pScTokenArray->AddDoubleReference( pFind->aComplRefDataRel );
+ pScTokenArray->AddDoubleReference( pFind->aScComplexRefDataRel );
}
ScRangeData* pData = new ScRangeData( pLotusRoot->pDoc, pFind->aScAbsName, *pScTokenArray );
diff --git a/sc/source/filter/qpro/makefile.mk b/sc/source/filter/qpro/makefile.mk
index 6dfd64e9d051..f3ea4c7232cd 100644
--- a/sc/source/filter/qpro/makefile.mk
+++ b/sc/source/filter/qpro/makefile.mk
@@ -46,7 +46,6 @@ AUTOSEG=true
.INCLUDE : scpre.mk
.INCLUDE : settings.mk
.INCLUDE : sc.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index 028f3bcbd39a..cc31fcbede8b 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -129,7 +129,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt
return eRet;
}
-FltError ScImportQuattroPro( SfxMedium &rMedium, ScDocument *pDoc )
+FltError ScFormatFilterPluginImpl::ScImportQuattroPro( SfxMedium &rMedium, ScDocument *pDoc )
{
FltError eRet = eERR_OK;
ScQProReader aReader( rMedium );
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index dfeac931b50f..9d30ae1f8adb 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -40,7 +40,7 @@
#include <tokstack.hxx>
#include "ftools.hxx"
-void QProToSc::ReadSRD( SingleRefData& rSRD, sal_Int8 nPage, sal_Int8 nCol, sal_uInt16 nRelBit )
+void QProToSc::ReadSRD( ScSingleRefData& rSRD, sal_Int8 nPage, sal_Int8 nCol, sal_uInt16 nRelBit )
{
UINT16 nTmp = nRelBit & 0x1fff;
rSRD.InitAddress( ScAddress( nCol, (~nTmp + 1), 0 ) );
@@ -208,8 +208,8 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con
sal_uInt16 nDummy, nDLLId, nDLLArray[ nBufSize ];
sal_uInt16 nNote, nRef, nRelBits;
TokenId nPush;
- ComplRefData aCRD;
- SingleRefData aSRD;
+ ScComplexRefData aCRD;
+ ScSingleRefData aSRD;
FUNC_TYPE eType;
DefTokenId eOc;
double nFloatArray[ nBufSize ], nFloat;
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index bfc437f778c5..25427c0825c4 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -73,7 +73,7 @@
#include "globstr.hrc"
// in fuins1.cxx
-extern void LimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& rPage );
+extern void ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& rPage );
//------------------------------------------------------------------------
@@ -568,7 +568,7 @@ void ScEEImport::InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab,
Size aSizePix = pI->aSize;
aLogicSize = pDefaultDev->PixelToLogic( aSizePix, MapMode( MAP_100TH_MM ) );
// Groesse begrenzen
- ::LimitSizeOnDrawPage( aLogicSize, aInsertPos, pPage->GetSize() );
+ ::ScLimitSizeOnDrawPage( aLogicSize, aInsertPos, pPage->GetSize() );
if ( pI->pGraphic )
{
diff --git a/sc/source/filter/rtf/makefile.mk b/sc/source/filter/rtf/makefile.mk
index 5f3b9f3b1ece..6bacb3333b94 100644
--- a/sc/source/filter/rtf/makefile.mk
+++ b/sc/source/filter/rtf/makefile.mk
@@ -45,7 +45,6 @@ PROJECTPCHSOURCE=..\pch\filt_pch
.INCLUDE : scpre.mk
.INCLUDE : settings.mk
.INCLUDE : sc.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx
index 8fd9cd116402..3d4d50d46374 100644
--- a/sc/source/filter/rtf/rtfexp.cxx
+++ b/sc/source/filter/rtf/rtfexp.cxx
@@ -56,11 +56,11 @@
#include "cellform.hxx"
#include "editutil.hxx"
#include "stlpool.hxx"
-
+#include "ftools.hxx"
//------------------------------------------------------------------
-FltError ScExportRTF( SvStream& rStrm, ScDocument* pDoc,
+FltError ScFormatFilterPluginImpl::ScExportRTF( SvStream& rStrm, ScDocument* pDoc,
const ScRange& rRange, const CharSet /*eNach*/ )
{
ScRTFExport aEx( rStrm, pDoc, rRange );
diff --git a/sc/source/filter/rtf/rtfimp.cxx b/sc/source/filter/rtf/rtfimp.cxx
index 24d48597f23c..742954d4a519 100644
--- a/sc/source/filter/rtf/rtfimp.cxx
+++ b/sc/source/filter/rtf/rtfimp.cxx
@@ -41,9 +41,10 @@
#include "editutil.hxx"
#include "rtfimp.hxx"
#include "rtfparse.hxx"
+#include "ftools.hxx"
-FltError ScImportRTF( SvStream &rStream, const String& rBaseURL, ScDocument *pDoc, ScRange& rRange )
+FltError ScFormatFilterPluginImpl::ScImportRTF( SvStream &rStream, const String& rBaseURL, ScDocument *pDoc, ScRange& rRange )
{
ScRTFImport aImp( pDoc, rRange );
FltError nErr = (FltError) aImp.Read( rStream, rBaseURL );
@@ -53,6 +54,11 @@ FltError ScImportRTF( SvStream &rStream, const String& rBaseURL, ScDocument *pDo
return nErr;
}
+ScEEAbsImport *ScFormatFilterPluginImpl::CreateRTFImport( ScDocument* pDoc, const ScRange& rRange )
+{
+ return new ScRTFImport( pDoc, rRange );
+}
+
ScRTFImport::ScRTFImport( ScDocument* pDocP, const ScRange& rRange ) :
ScEEImport( pDocP, rRange )
diff --git a/sc/source/filter/starcalc/makefile.mk b/sc/source/filter/starcalc/makefile.mk
index 31de4366a9e9..526476e3c445 100644
--- a/sc/source/filter/starcalc/makefile.mk
+++ b/sc/source/filter/starcalc/makefile.mk
@@ -45,7 +45,6 @@ AUTOSEG=true
.INCLUDE : scpre.mk
.INCLUDE : settings.mk
.INCLUDE : sc.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 8f072435871d..05b0bdc8259a 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -421,7 +421,7 @@ Sc10FontData::Sc10FontData(SvStream& rStream)
Sc10FontCollection::Sc10FontCollection(SvStream& rStream) :
- Collection (4, 4),
+ ScCollection (4, 4),
nError (0)
{
USHORT ID;
@@ -464,7 +464,7 @@ Sc10NameData::Sc10NameData(SvStream& rStream)
Sc10NameCollection::Sc10NameCollection(SvStream& rStream) :
- Collection (4, 4),
+ ScCollection (4, 4),
nError (0)
{
USHORT ID;
@@ -512,7 +512,7 @@ Sc10PatternData::Sc10PatternData(SvStream& rStream)
Sc10PatternCollection::Sc10PatternCollection(SvStream& rStream) :
- Collection (4, 4),
+ ScCollection (4, 4),
nError (0)
{
USHORT ID;
@@ -578,7 +578,7 @@ Sc10DataBaseData::Sc10DataBaseData(SvStream& rStream)
Sc10DataBaseCollection::Sc10DataBaseCollection(SvStream& rStream) :
- Collection (4, 4),
+ ScCollection (4, 4),
nError (0)
{
USHORT ID;
@@ -956,7 +956,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
}
-DataObject* Sc10PageData::Clone() const
+ScDataObject* Sc10PageData::Clone() const
{
return new Sc10PageData(aPageFormat);
}
@@ -2499,7 +2499,7 @@ void Sc10Import::LoadObjects()
//-----------------------------------------------------------------------------------------------
-FltError ScImportStarCalc10( SvStream& rStream, ScDocument* pDocument )
+FltError ScFormatFilterPluginImpl::ScImportStarCalc10( SvStream& rStream, ScDocument* pDocument )
{
rStream.Seek( 0UL );
Sc10Import aImport( rStream, pDocument );
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index eaa3668f86a9..48f5a790f5bb 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -122,7 +122,7 @@ XclExpUserBViewList::XclExpUserBViewList( const ScChangeTrack& rChangeTrack )
{
sal_uInt8 aGUID[ 16 ];
sal_Bool bValidGUID = sal_False;
- const StrCollection& rStrColl = rChangeTrack.GetUserCollection();
+ const ScStrCollection& rStrColl = rChangeTrack.GetUserCollection();
for( USHORT nIndex = 0; nIndex < rStrColl.GetCount(); nIndex++ )
{
const StrData* pStrData = (const StrData*) rStrColl.At( nIndex );
diff --git a/sc/source/filter/xcl97/makefile.mk b/sc/source/filter/xcl97/makefile.mk
index a5194358179a..42cb08cc37a1 100644
--- a/sc/source/filter/xcl97/makefile.mk
+++ b/sc/source/filter/xcl97/makefile.mk
@@ -45,7 +45,6 @@ PROJECTPCHSOURCE=..\pch\filt_pch
.INCLUDE : scpre.mk
.INCLUDE : settings.mk
.INCLUDE : sc.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx
index 4be890dd3903..fb5188e994b0 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -30,7 +30,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include "xcl97esc.hxx"
#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/embed/XClassifiedObject.hpp>
@@ -61,6 +60,7 @@
#include "xcl97rec.hxx"
#include "xehelper.hxx"
#include "xechart.hxx"
+#include "xcl97esc.hxx"
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 7845ef682082..9d1c8375b53b 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -79,6 +79,9 @@
#include "docoptio.hxx"
#include "patattr.hxx"
+#include <oox/core/tokens.hxx>
+
+using ::rtl::OString;
using ::rtl::OUString;
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
@@ -918,17 +921,23 @@ ExcBofW8::ExcBofW8()
// --- class ExcBundlesheet8 -----------------------------------------
-ExcBundlesheet8::ExcBundlesheet8( RootData& rRootData, SCTAB nTab ) :
- ExcBundlesheetBase( rRootData, static_cast<sal_uInt16>(nTab) )
+ExcBundlesheet8::ExcBundlesheet8( RootData& rRootData, SCTAB _nTab ) :
+ ExcBundlesheetBase( rRootData, static_cast<sal_uInt16>(_nTab) ),
+ sUnicodeName( rRootData.pER->GetTabInfo().GetScTabName( _nTab ) )
{
- aUnicodeName.Assign( rRootData.pER->GetTabInfo().GetScTabName( nTab ), EXC_STR_8BITLENGTH );
}
ExcBundlesheet8::ExcBundlesheet8( const String& rString ) :
ExcBundlesheetBase(),
- aUnicodeName( rString, EXC_STR_8BITLENGTH )
+ sUnicodeName( rString )
+{
+}
+
+
+XclExpString ExcBundlesheet8::GetName() const
{
+ return XclExpString( sUnicodeName, EXC_STR_8BITLENGTH );
}
@@ -936,13 +945,33 @@ void ExcBundlesheet8::SaveCont( XclExpStream& rStrm )
{
nOwnPos = rStrm.GetSvStreamPos();
// write dummy position, real position comes later
- rStrm << sal_uInt32( 0 ) << nGrbit << aUnicodeName;
+ rStrm << sal_uInt32( 0 ) << nGrbit << GetName();
}
sal_Size ExcBundlesheet8::GetLen() const
{ // Text max 255 chars
- return 8 + aUnicodeName.GetBufferSize();
+ return 8 + GetName().GetBufferSize();
+}
+
+
+void ExcBundlesheet8::SaveXml( XclExpXmlStream& rStrm )
+{
+ OUString sId;
+ rStrm.CreateOutputStream(
+ XclXmlUtils::GetStreamName( "xl/", "worksheets/sheet", nTab+1),
+ XclXmlUtils::GetStreamName( NULL, "worksheets/sheet", nTab+1),
+ rStrm.GetCurrentStream()->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",
+ &sId );
+
+ rStrm.GetCurrentStream()->singleElement( XML_sheet,
+ XML_name, XclXmlUtils::ToOString( sUnicodeName ).getStr(),
+ XML_sheetId, rtl::OString::valueOf( (sal_Int32)( nTab+1 ) ).getStr(),
+ XML_state, nGrbit == 0x0000 ? "visible" : "hidden",
+ FSNS( XML_r, XML_id ), XclXmlUtils::ToOString( sId ).getStr(),
+ FSEND );
}
@@ -1006,6 +1035,17 @@ void ExcEScenarioCell::WriteText( XclExpStream& rStrm )
rStrm << sText;
}
+void ExcEScenarioCell::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.GetCurrentStream()->singleElement( XML_inputCells,
+ // OOXTODO: XML_deleted,
+ // OOXTODO: XML_numFmtId,
+ XML_r, XclXmlUtils::ToOString( ScAddress( nCol, nRow, 0 ) ).getStr(),
+ // OOXTODO: XML_undone,
+ XML_val, XclXmlUtils::ToOString( sText ).getStr(),
+ FSEND );
+}
+
@@ -1122,6 +1162,24 @@ sal_Size ExcEScenario::GetLen() const
return nRecLen;
}
+void ExcEScenario::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
+ rWorkbook->startElement( XML_scenario,
+ XML_name, XclXmlUtils::ToOString( sName ).getStr(),
+ XML_locked, XclXmlUtils::ToPsz( nProtected ),
+ // OOXTODO: XML_hidden,
+ XML_count, OString::valueOf( (sal_Int32) List::Count() ).getStr(),
+ XML_user, XESTRING_TO_PSZ( sUsername ),
+ XML_comment, XESTRING_TO_PSZ( sComment ),
+ FSEND );
+
+ for( ExcEScenarioCell* pCell = _First(); pCell; pCell = _Next() )
+ pCell->SaveXml( rStrm );
+
+ rWorkbook->endElement( XML_scenario );
+}
+
@@ -1167,6 +1225,24 @@ void ExcEScenarioManager::Save( XclExpStream& rStrm )
pScen->Save( rStrm );
}
+void ExcEScenarioManager::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( ! List::Count() )
+ return;
+
+ sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
+ rWorkbook->startElement( XML_scenarios,
+ XML_current, OString::valueOf( (sal_Int32)nActive ).getStr(),
+ XML_show, OString::valueOf( (sal_Int32)nActive ).getStr(),
+ // OOXTODO: XML_sqref,
+ FSEND );
+
+ for( ExcEScenario* pScen = _First(); pScen; pScen = _Next() )
+ pScen->SaveXml( rStrm );
+
+ rWorkbook->endElement( XML_scenarios );
+}
+
UINT16 ExcEScenarioManager::GetNum() const
{
return 0x00AE;
@@ -1232,6 +1308,14 @@ sal_Size XclCalccount::GetLen() const
}
+void XclCalccount::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.WriteAttributes(
+ XML_iterateCount, OString::valueOf( (sal_Int32)nCount ).getStr(),
+ FSEND );
+}
+
+
void XclIteration::SaveCont( XclExpStream& rStrm )
@@ -1258,6 +1342,14 @@ sal_Size XclIteration::GetLen() const
}
+void XclIteration::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.WriteAttributes(
+ XML_iterate, XclXmlUtils::ToPsz( nIter == 1 ),
+ FSEND );
+}
+
+
void XclDelta::SaveCont( XclExpStream& rStrm )
@@ -1285,9 +1377,25 @@ sal_Size XclDelta::GetLen() const
}
+void XclDelta::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.WriteAttributes(
+ XML_iterateDelta, OString::valueOf( fDelta ).getStr(),
+ FSEND );
+}
+
+
XclRefmode::XclRefmode( const ScDocument& rDoc ) :
XclExpBoolRecord( 0x000F, rDoc.GetAddressConvention() != ScAddress::CONV_XL_R1C1 )
{
}
+
+void XclRefmode::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.WriteAttributes(
+ XML_refMode, GetBool() ? "A1" : "R1C1",
+ FSEND );
+}
+
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx
index 2730a3f8e896..339eed189613 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx
@@ -188,7 +188,7 @@ class ScChangeViewSettings;
class ScXMLChangeTrackingImportHelper
{
- StrCollection aUsers;
+ ScStrCollection aUsers;
ScMyActions aActions;
com::sun::star::uno::Sequence<sal_Int8> aProtect;
ScDocument* pDoc;
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index cf2762b4346c..8076fe7a8e83 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2996,8 +2996,8 @@ sal_Bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2)
{
if (!aCell1.bHasAnnotation || (aCell1.bHasAnnotation && sal_False/*IsAnnotationEqual(aCell1.xCell, aCell2.xCell)*/)) // no longer compareable
{
- if (((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.bIsAutoStyle == aCell2.bIsAutoStyle) ||
- (aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.nStyleIndex == -1)) &&
+ if (((aCell1.nStyleIndex == aCell2.nStyleIndex) && ((aCell1.bIsAutoStyle == aCell2.bIsAutoStyle) ||
+ (aCell1.nStyleIndex == aCell2.nStyleIndex)) && (aCell1.nStyleIndex == -1)) &&
(aCell1.nValidationIndex == aCell2.nValidationIndex) &&
IsCellTypeEqual(aCell1, aCell2))
{
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index e436349b96c3..0c9a4abdc85c 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2052,7 +2052,7 @@ void ScXMLImport::SetConfigurationSettings(const uno::Sequence<beans::PropertyVa
pDoc->GetChangeTrack()->SetProtection(aPass);
else
{
- StrCollection aUsers;
+ ScStrCollection aUsers;
ScChangeTrack* pTrack = new ScChangeTrack(pDoc, aUsers);
pTrack->SetProtection(aPass);
pDoc->SetChangeTrack(pTrack);
@@ -2181,11 +2181,11 @@ void ScXMLImport::SetType(uno::Reference <beans::XPropertySet>& rProperties,
sal_Int32 nCurrentCellType(
GetNumberFormatAttributesExportHelper()->GetCellType(
rNumberFormat, sCurrentCurrency, bIsStandard) & ~util::NumberFormat::DEFINED);
- if ((nCellType != nCurrentCellType) && !(nCellType == util::NumberFormat::NUMBER &&
+ if ((nCellType != nCurrentCellType) && !((nCellType == util::NumberFormat::NUMBER &&
((nCurrentCellType == util::NumberFormat::SCIENTIFIC) ||
(nCurrentCellType == util::NumberFormat::FRACTION) ||
(nCurrentCellType == util::NumberFormat::LOGICAL) ||
- (nCurrentCellType == 0)) || (nCurrentCellType == util::NumberFormat::TEXT)) && !((nCellType == util::NumberFormat::DATETIME) &&
+ (nCurrentCellType == 0))) || (nCurrentCellType == util::NumberFormat::TEXT)) && !((nCellType == util::NumberFormat::DATETIME) &&
(nCurrentCellType == util::NumberFormat::DATE)))
{
if (!xNumberFormats.is())
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 3ca0267f1d8f..ddb317ccc1b0 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -398,7 +398,7 @@ rtl::OUString SAL_CALL ScAccessiblePreviewHeaderCell::createAccessibleName() thr
else
{
// name of column header
- sName += ColToAlpha( maCellPos.Col() );
+ sName += ScColToAlpha( maCellPos.Col() );
}
}
else
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index 7f4d55f02e98..f4196896083b 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -231,7 +231,7 @@ rtl::OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnDescription(
else
{
// normal column name
- sName = ColToAlpha( rInfo.nDocIndex );
+ sName = ScColToAlpha( rInfo.nDocIndex );
}
}
else
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index e6cbe303c3f0..6381c9150b44 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -623,12 +623,12 @@ void ScInputHandler::GetFormulaData()
if ( pFormulaData )
pFormulaData->FreeAll();
else
- pFormulaData = new TypedStrCollection;
+ pFormulaData = new TypedScStrCollection;
if( pFormulaDataPara )
pFormulaDataPara->FreeAll();
else
- pFormulaDataPara = new TypedStrCollection;
+ pFormulaDataPara = new TypedScStrCollection;
// MRU-Funktionen aus dem Funktions-Autopiloten
// wie in ScPosWnd::FillFunctions (inputwin.cxx)
@@ -1390,7 +1390,7 @@ void ScInputHandler::GetColData()
pColumnData->FreeAll();
else
{
- pColumnData = new TypedStrCollection;
+ pColumnData = new TypedScStrCollection;
pColumnData->SetCaseSensitive( TRUE ); // equal strings are handled in FindText
}
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 46d7385becb4..0464a70684b9 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -353,7 +353,7 @@ void ScFilterDlg::FillFieldLists()
{
aFieldName = aStrColumn;
aFieldName += ' ';
- aFieldName += ColToAlpha( col );
+ aFieldName += ScColToAlpha( col );
}
aLbField1.InsertEntry( aFieldName, i );
aLbField2.InsertEntry( aFieldName, i );
@@ -394,7 +394,7 @@ void ScFilterDlg::UpdateValueList( USHORT nList )
// erstmal ohne die erste Zeile
- pEntryLists[nColumn] = new TypedStrCollection( 128, 128 );
+ pEntryLists[nColumn] = new TypedScStrCollection( 128, 128 );
pEntryLists[nColumn]->SetCaseSensitive( aBtnCase.IsChecked() );
pDoc->GetFilterEntriesArea( nColumn, nFirstRow+1, nLastRow,
nTab, *pEntryLists[nColumn] );
@@ -403,7 +403,7 @@ void ScFilterDlg::UpdateValueList( USHORT nList )
//! Eintrag (pHdrEntry) ohne Collection erzeugen?
nHeaderPos[nColumn] = USHRT_MAX;
- TypedStrCollection aHdrColl( 1, 1 );
+ TypedScStrCollection aHdrColl( 1, 1 );
pDoc->GetFilterEntriesArea( nColumn, nFirstRow, nFirstRow,
nTab, aHdrColl );
TypedStrData* pHdrEntry = aHdrColl[0];
@@ -421,7 +421,7 @@ void ScFilterDlg::UpdateValueList( USHORT nList )
}
}
- TypedStrCollection* pColl = pEntryLists[nColumn];
+ TypedScStrCollection* pColl = pEntryLists[nColumn];
USHORT nValueCount = pColl->GetCount();
if ( nValueCount > 0 )
{
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index 2110bb24c29d..d6bd29c7fddf 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -314,7 +314,7 @@ void ScPivotFilterDlg::FillFieldLists()
{
aFieldName = aStrColumn;
aFieldName += ' ';
- aFieldName += ColToAlpha( col );
+ aFieldName += ScColToAlpha( col );
}
aLbField1.InsertEntry( aFieldName, i );
aLbField2.InsertEntry( aFieldName, i );
@@ -353,13 +353,13 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList )
SCROW nLastRow = theQueryData.nRow2;
nFirstRow++;
- pEntryLists[nColumn] = new TypedStrCollection( 128, 128 );
+ pEntryLists[nColumn] = new TypedScStrCollection( 128, 128 );
pEntryLists[nColumn]->SetCaseSensitive( aBtnCase.IsChecked() );
pDoc->GetFilterEntriesArea( nColumn, nFirstRow, nLastRow,
nTab, *pEntryLists[nColumn] );
}
- TypedStrCollection* pColl = pEntryLists[nColumn];
+ TypedScStrCollection* pColl = pEntryLists[nColumn];
USHORT nValueCount = pColl->GetCount();
if ( nValueCount > 0 )
{
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index aec1892c9930..d44791ff6972 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -31,9 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#undef SC_DLLIMPLEMENTATION
-
-
#include "pvfundlg.hxx"
#include <com/sun/star/sheet/DataPilotFieldReferenceType.hpp>
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 32bd15c4e706..080e2a2ccb05 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -441,7 +441,7 @@ void ScTabPageSortFields::FillFieldLists()
{
aFieldName = aStrColumn;
aFieldName += ' ';
- aFieldName += ColToAlpha( col );
+ aFieldName += ScColToAlpha( col );
}
nFieldArr[i] = col;
aLbSort1.InsertEntry( aFieldName, i );
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index 2025922f03d6..337329acfec6 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -310,7 +310,7 @@ void ScTpSubTotalGroup::FillListBoxes()
{
aFieldName = aStrColumn;
aFieldName += ' ';
- aFieldName += ::ColToAlpha( col ); // from global.hxx
+ aFieldName += ::ScColToAlpha( col ); // from global.hxx
}
nFieldArr[i] = col;
aLbGroup.InsertEntry( aFieldName, i+1 );
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 57ea8f060194..a290a81d9078 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -54,7 +54,7 @@
#include "globstr.hrc"
#include "markdata.hxx"
#include "hints.hxx"
-#include "htmlimp.hxx"
+#include "filter.hxx"
//CHINA001 #include "linkarea.hxx" // dialog
#include "attrib.hxx" // raus, wenn ResetAttrib am Dokument
@@ -284,7 +284,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
String aTempArea;
if( rNewFilter == ScDocShell::GetWebQueryFilterName() )
- aTempArea = ScHTMLImport::GetHTMLRangeNameList( pSrcDoc, rNewArea );
+ aTempArea = ScFormatFilter::Get().GetHTMLRangeNameList( pSrcDoc, rNewArea );
else
aTempArea = rNewArea;
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index c37306c255ce..2984b0f37e2f 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -163,6 +163,7 @@ static const sal_Char __FAR_DATA pFilterExcel95[] = "MS Excel 95";
static const sal_Char __FAR_DATA pFilterEx95Temp[] = "MS Excel 95 Vorlage/Template";
static const sal_Char __FAR_DATA pFilterExcel97[] = "MS Excel 97";
static const sal_Char __FAR_DATA pFilterEx97Temp[] = "MS Excel 97 Vorlage/Template";
+static const sal_Char __FAR_DATA pFilterEx07Xml[] = "MS Excel 2007 XML";
static const sal_Char __FAR_DATA pFilterDBase[] = "dBase";
static const sal_Char __FAR_DATA pFilterDif[] = "DIF";
static const sal_Char __FAR_DATA pFilterSylk[] = "SYLK";
@@ -850,7 +851,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
SvStream* pStream = rMedium.GetInStream();
if (pStream)
{
- FltError eError = ScImportStarCalc10( *pStream, &aDocument );
+ FltError eError = ScFormatFilter::Get().ScImportStarCalc10( *pStream, &aDocument );
if (eError != eERR_OK)
{
if (!GetError())
@@ -879,7 +880,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
ScColumn::bDoubleAlloc = TRUE;
- FltError eError = ScImportLotus123( rMedium, &aDocument,
+ FltError eError = ScFormatFilter::Get().ScImportLotus123( rMedium, &aDocument,
ScGlobal::GetCharsetValue(sItStr));
ScColumn::bDoubleAlloc = FALSE;
if (eError != eERR_OK)
@@ -912,7 +913,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
MakeDrawLayer(); //! im Filter
CalcOutputFactor(); // #93255# prepare update of row height
ScColumn::bDoubleAlloc = TRUE;
- FltError eError = ScImportExcel( rMedium, &aDocument, eFormat );
+ FltError eError = ScFormatFilter::Get().ScImportExcel( rMedium, &aDocument, eFormat );
ScColumn::bDoubleAlloc = FALSE;
aDocument.UpdateFontCharSet();
if ( aDocument.IsChartListenerCollectionNeedsUpdate() )
@@ -1064,7 +1065,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_MS_1252 );
}
- eError = ScImportDif( *pStream, &aDocument, ScAddress(0,0,0),
+ eError = ScFormatFilter::Get().ScImportDif( *pStream, &aDocument, ScAddress(0,0,0),
ScGlobal::GetCharsetValue(sItStr));
if (eError != eERR_OK)
{
@@ -1110,7 +1111,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
else if (aFltName.EqualsAscii(pFilterQPro6))
{
ScColumn::bDoubleAlloc = TRUE;
- FltError eError = ScImportQuattroPro( rMedium, &aDocument);
+ FltError eError = ScFormatFilter::Get().ScImportQuattroPro( rMedium, &aDocument);
ScColumn::bDoubleAlloc = FALSE;
if (eError != eERR_OK)
{
@@ -1137,7 +1138,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
pInStream->Seek( 0 );
ScRange aRange;
- eError = ScImportRTF( *pInStream, rMedium.GetBaseURL(), &aDocument, aRange );
+ eError = ScFormatFilter::Get().ScImportRTF( *pInStream, rMedium.GetBaseURL(), &aDocument, aRange );
if (eError != eERR_OK)
{
if (!GetError())
@@ -1175,7 +1176,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
ScRange aRange;
// HTML macht eigenes ColWidth/RowHeight
CalcOutputFactor();
- eError = ScImportHTML( *pInStream, rMedium.GetBaseURL(), &aDocument, aRange,
+ eError = ScFormatFilter::Get().ScImportHTML( *pInStream, rMedium.GetBaseURL(), &aDocument, aRange,
GetOutputFactor(), !bWebQuery );
if (eError != eERR_OK)
{
@@ -1797,7 +1798,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
SvStream* pStream = rMed.GetOutStream();
if (pStream)
{
- FltError eError = ScExportLotus123( *pStream, &aDocument, ExpWK1,
+ FltError eError = ScFormatFilter::Get().ScExportLotus123( *pStream, &aDocument, ExpWK1,
CHARSET_IBMPC_437 );
bRet = eError == eERR_OK;
}
@@ -1812,7 +1813,8 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
}
else if (aFltName.EqualsAscii(pFilterExcel5) || aFltName.EqualsAscii(pFilterExcel95) ||
aFltName.EqualsAscii(pFilterExcel97) || aFltName.EqualsAscii(pFilterEx5Temp) ||
- aFltName.EqualsAscii(pFilterEx95Temp) || aFltName.EqualsAscii(pFilterEx97Temp))
+ aFltName.EqualsAscii(pFilterEx95Temp) || aFltName.EqualsAscii(pFilterEx97Temp) ||
+ aFltName.EqualsAscii(pFilterEx07Xml))
{
WaitObject aWait( GetActiveDialogParent() );
@@ -1837,8 +1839,12 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
if( bDoSave )
{
- bool bBiff8 = aFltName.EqualsAscii( pFilterExcel97 ) || aFltName.EqualsAscii( pFilterEx97Temp );
- FltError eError = ScExportExcel5( rMed, &aDocument, bBiff8, RTL_TEXTENCODING_MS_1252 );
+ ExportFormatExcel eFormat = ExpBiff5;
+ if( aFltName.EqualsAscii( pFilterExcel97 ) || aFltName.EqualsAscii( pFilterEx97Temp ) )
+ eFormat = ExpBiff8;
+ if( aFltName.EqualsAscii( pFilterEx07Xml ) )
+ eFormat = Exp2007Xml;
+ FltError eError = ScFormatFilter::Get().ScExportExcel5( rMed, &aDocument, eFormat, RTL_TEXTENCODING_MS_1252 );
if( eError && !GetError() )
SetError( eError );
@@ -1976,7 +1982,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
}
WaitObject aWait( GetActiveDialogParent() );
- ScExportDif( *pStream, &aDocument, ScAddress(0,0,0),
+ ScFormatFilter::Get().ScExportDif( *pStream, &aDocument, ScAddress(0,0,0),
ScGlobal::GetCharsetValue(sItStr) );
bRet = TRUE;
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 229b949439f8..e3f1f6904af4 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -368,7 +368,7 @@ BOOL __EXPORT ScDocShell::Insert( SfxObjectShell &rSource,
void ScDocShell::UpdateLinks()
{
SvxLinkManager* pLinkManager = aDocument.GetLinkManager();
- StrCollection aNames;
+ ScStrCollection aNames;
// nicht mehr benutzte Links raus
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 9e6a7db16d94..149856b4aa6b 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -418,7 +418,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
SCCOL nLastCol = rDataRange.aEnd.Col();
SCROW nLastRow = rDataRange.aEnd.Row();
- StrCollection aFieldNamesCollection;
+ ScStrCollection aFieldNamesCollection;
long nField = 0;
SCROW nFirstDataRow = ( bHasFieldNames ? nFirstRow + 1 : nFirstRow );
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 088cefc12914..c463533a1924 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -65,6 +65,7 @@ class StarBASIC;
#include <unotools/transliterationwrapper.hxx>
#include "global.hxx"
+#include "scerrors.hxx"
#include "docsh.hxx"
#include "undoblk.hxx"
#include "rangenam.hxx"
@@ -73,8 +74,6 @@ class StarBASIC;
#include "filter.hxx"
#include "asciiopt.hxx"
#include "cell.hxx"
-#include "rtfimp.hxx"
-#include "htmlimp.hxx"
#include "docoptio.hxx"
#include "progress.hxx"
#include "scitems.hxx"
@@ -90,6 +89,7 @@ class StarBASIC;
#include "globstr.hrc"
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
+#include <osl/module.hxx>
//========================================================================
@@ -1755,7 +1755,7 @@ BOOL ScImportExport::Doc2Sylk( SvStream& rStrm )
BOOL ScImportExport::Doc2HTML( SvStream& rStrm, const String& rBaseURL )
{
// CharSet is ignored in ScExportHTML, read from Load/Save HTML options
- ScExportHTML( rStrm, rBaseURL, pDoc, aRange, RTL_TEXTENCODING_DONTKNOW, bAll,
+ ScFormatFilter::Get().ScExportHTML( rStrm, rBaseURL, pDoc, aRange, RTL_TEXTENCODING_DONTKNOW, bAll,
aStreamPath, aNonConvertibleChars );
return BOOL( rStrm.GetError() == SVSTREAM_OK );
}
@@ -1763,7 +1763,7 @@ BOOL ScImportExport::Doc2HTML( SvStream& rStrm, const String& rBaseURL )
BOOL ScImportExport::Doc2RTF( SvStream& rStrm )
{
// CharSet is ignored in ScExportRTF
- ScExportRTF( rStrm, pDoc, aRange, RTL_TEXTENCODING_DONTKNOW );
+ ScFormatFilter::Get().ScExportRTF( rStrm, pDoc, aRange, RTL_TEXTENCODING_DONTKNOW );
return BOOL( rStrm.GetError() == SVSTREAM_OK );
}
@@ -1771,7 +1771,7 @@ BOOL ScImportExport::Doc2RTF( SvStream& rStrm )
BOOL ScImportExport::Doc2Dif( SvStream& rStrm )
{
// for DIF in the clipboard, IBM_850 is always used
- ScExportDif( rStrm, pDoc, aRange, RTL_TEXTENCODING_IBM_850 );
+ ScFormatFilter::Get().ScExportDif( rStrm, pDoc, aRange, RTL_TEXTENCODING_IBM_850 );
return TRUE;
}
@@ -1783,7 +1783,7 @@ BOOL ScImportExport::Dif2Doc( SvStream& rStrm )
pImportDoc->InitUndo( pDoc, nTab, nTab );
// for DIF in the clipboard, IBM_850 is always used
- ScImportDif( rStrm, pImportDoc, aRange.aStart, RTL_TEXTENCODING_IBM_850 );
+ ScFormatFilter::Get().ScImportDif( rStrm, pImportDoc, aRange.aStart, RTL_TEXTENCODING_IBM_850 );
SCCOL nEndCol;
SCROW nEndRow;
@@ -1812,44 +1812,100 @@ BOOL ScImportExport::Dif2Doc( SvStream& rStrm )
BOOL ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL )
{
- ScRTFImport aImp( pDoc, aRange );
- aImp.Read( rStrm, rBaseURL );
- aRange = aImp.GetRange();
+ ScEEAbsImport *pImp = ScFormatFilter::Get().CreateRTFImport( pDoc, aRange );
+ if (pImp)
+ return false;
+ pImp->Read( rStrm, rBaseURL );
+ aRange = pImp->GetRange();
BOOL bOk = StartPaste();
if (bOk)
{
USHORT nFlags = IDF_ALL & ~IDF_STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
- aImp.WriteToDocument();
+ pImp->WriteToDocument();
EndPaste();
}
-
+ delete pImp;
return bOk;
}
BOOL ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL )
{
- ScHTMLImport aImp( pDoc, rBaseURL, aRange );
- aImp.Read( rStrm, rBaseURL );
- aRange = aImp.GetRange();
+ ScEEAbsImport *pImp = ScFormatFilter::Get().CreateHTMLImport( pDoc, rBaseURL, aRange, TRUE);
+ if (pImp)
+ return false;
+ pImp->Read( rStrm, rBaseURL );
+ aRange = pImp->GetRange();
BOOL bOk = StartPaste();
if (bOk)
{
- // ScHTMLImport may call ScDocument::InitDrawLayer, resulting in
- // a Draw Layer but no Draw View -> create Draw Layer and View here
+ // ScHTMLImport may call ScDocument::InitDrawLayer, resulting in
+ // a Draw Layer but no Draw View -> create Draw Layer and View here
if (pDocSh)
pDocSh->MakeDrawLayer();
USHORT nFlags = IDF_ALL & ~IDF_STYLES;
pDoc->DeleteAreaTab( aRange, nFlags );
- aImp.WriteToDocument();
+ pImp->WriteToDocument();
EndPaste();
}
-
+ delete pImp;
return bOk;
}
+#define RETURN_ERROR { return eERR_INTERN; }
+class ScFormatFilterMissing : public ScFormatFilterPlugin {
+ public:
+ ScFormatFilterMissing()
+ {
+ OSL_ASSERT ("Missing file filters");
+ }
+ virtual FltError ScImportLotus123( SfxMedium&, ScDocument*, CharSet ) RETURN_ERROR
+ virtual FltError ScImportQuattroPro( SfxMedium &, ScDocument * ) RETURN_ERROR
+ virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT ) RETURN_ERROR
+ virtual FltError ScImportStarCalc10( SvStream&, ScDocument* ) RETURN_ERROR
+ virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress&,
+ const CharSet, UINT32 ) RETURN_ERROR
+ virtual FltError ScImportRTF( SvStream&, const String&, ScDocument*, ScRange& ) RETURN_ERROR
+ virtual FltError ScImportHTML( SvStream&, const String&, ScDocument*, ScRange&, double, BOOL ) RETURN_ERROR
+
+ virtual ScEEAbsImport *CreateRTFImport( ScDocument*, const ScRange& ) { return NULL; }
+ virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const String&, const ScRange&, BOOL ) { return NULL; }
+ virtual String GetHTMLRangeNameList( ScDocument*, const String& ) { return String(); }
+
+#if ENABLE_LOTUS123_EXPORT
+ virtual FltError ScExportLotus123( SvStream&, ScDocument*, ExportFormatLotus, CharSet ) RETURN_ERROR
+#endif
+ virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel, CharSet ) RETURN_ERROR
+ virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress&, const CharSet, UINT32 ) RETURN_ERROR
+ virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const CharSet, UINT32 ) RETURN_ERROR
+ virtual FltError ScExportHTML( SvStream&, const String&, ScDocument*, const ScRange&, const CharSet, BOOL,
+ const String&, String& ) RETURN_ERROR
+ virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange&, const CharSet ) RETURN_ERROR
+};
+extern "C" { static void SAL_CALL thisModule() {} };
+typedef ScFormatFilterPlugin * (*FilterFn)(void);
+ScFormatFilterPlugin &ScFormatFilter::Get()
+{
+ static ScFormatFilterPlugin *plugin;
+
+ if (plugin != NULL)
+ return *plugin;
+
+ static ::osl::Module aModule;
+ if ( aModule.loadRelative( &thisModule,
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "scfilt" ) ) ) ) )
+ {
+ oslGenericFunction fn = aModule.getFunctionSymbol( ::rtl::OUString::createFromAscii( "ScFilterCreate" ) );
+ if (fn != NULL)
+ plugin = reinterpret_cast<FilterFn>(fn)();
+ }
+ if (plugin == NULL)
+ plugin = new ScFormatFilterMissing();
+
+ return *plugin;
+}
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index f8d8ac30e8ab..cb4332fca9c4 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -108,7 +108,7 @@
//------------------------------------------------------------------------
-void LimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& rPage )
+void SC_DLLPUBLIC ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& rPage )
{
if ( !rPage.Width() || !rPage.Height() )
return;
@@ -186,7 +186,7 @@ void lcl_InsertGraphic( const Graphic& rGraphic,
if ( pData->GetDocument()->IsNegativePage( pData->GetTabNo() ) )
aInsertPos.X() -= aLogicSize.Width(); // move position to left edge
- LimitSizeOnDrawPage( aLogicSize, aInsertPos, pPage->GetSize() );
+ ScLimitSizeOnDrawPage( aLogicSize, aInsertPos, pPage->GetSize() );
Rectangle aRect ( aInsertPos, aLogicSize );
@@ -233,7 +233,7 @@ void lcl_InsertMedia( const ::rtl::OUString& rMediaURL, bool bApi,
else
aSize = Size( 5000, 5000 );
- LimitSizeOnDrawPage( aSize, aInsertPos, pPage->GetSize() );
+ ScLimitSizeOnDrawPage( aSize, aInsertPos, pPage->GetSize() );
if( pData->GetDocument()->IsNegativePage( pData->GetTabNo() ) )
aInsertPos.X() -= aSize.Width();
diff --git a/sc/source/ui/formdlg/funcutl.cxx b/sc/source/ui/formdlg/funcutl.cxx
index de498880aab6..cdfac01eda8a 100644
--- a/sc/source/ui/formdlg/funcutl.cxx
+++ b/sc/source/ui/formdlg/funcutl.cxx
@@ -684,7 +684,7 @@ ScEditBox::ScEditBox( Window* pParent, const ResId& rResId )
WinBits nStyle=GetStyle();
SetStyle( nStyle| WB_DIALOGCONTROL);
- pMEdit=new MultiLineEdit(this,WB_LEFT | WB_VSCROLL | nStyle & WB_TABSTOP|
+ pMEdit=new MultiLineEdit(this,WB_LEFT | WB_VSCROLL | (nStyle & WB_TABSTOP) |
WB_NOBORDER | WB_NOHIDESELECTION | WB_IGNORETAB);
pMEdit->Show();
aOldSel=pMEdit->GetSelection();
@@ -794,7 +794,7 @@ long ScEditBox::PreNotify( NotifyEvent& rNEvt )
{
const KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode();
USHORT nKey=aKeyCode.GetCode();
- if(nKey==KEY_RETURN && !aKeyCode.IsShift() || nKey==KEY_TAB)
+ if(nKey==KEY_RETURN && (!aKeyCode.IsShift() || nKey==KEY_TAB))
{
nResult=GetParent()->Notify(rNEvt);
}
diff --git a/sc/source/ui/inc/areasave.hxx b/sc/source/ui/inc/areasave.hxx
index 05c541bebcf1..e00fa9905216 100644
--- a/sc/source/ui/inc/areasave.hxx
+++ b/sc/source/ui/inc/areasave.hxx
@@ -39,7 +39,7 @@ class ScDocument;
class ScAreaLink;
-class ScAreaLinkSaver : public DataObject
+class ScAreaLinkSaver : public ScDataObject
{
private:
String aFileName;
@@ -54,7 +54,7 @@ public:
ScAreaLinkSaver( const ScAreaLinkSaver& rCopy );
virtual ~ScAreaLinkSaver();
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
BOOL IsEqual( const ScAreaLink& rCompare ) const;
BOOL IsEqualSource( const ScAreaLink& rCompare ) const;
@@ -64,14 +64,14 @@ public:
};
-class ScAreaLinkSaveCollection : public Collection
+class ScAreaLinkSaveCollection : public ScCollection
{
public:
ScAreaLinkSaveCollection();
ScAreaLinkSaveCollection( const ScAreaLinkSaveCollection& rCopy );
virtual ~ScAreaLinkSaveCollection();
- virtual DataObject* Clone() const;
+ virtual ScDataObject* Clone() const;
ScAreaLinkSaver* operator[](USHORT nIndex) const {return (ScAreaLinkSaver*)At(nIndex);}
diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx
index a16cfe85a9b5..7e5f95cfa090 100644
--- a/sc/source/ui/inc/autofmt.hxx
+++ b/sc/source/ui/inc/autofmt.hxx
@@ -59,7 +59,7 @@ class ScAutoFormat;
class ScAutoFormatData;
class SvxBoxItem;
class SvxLineItem;
-class AutoFmtPreview; // s.u.
+class ScAutoFmtPreview; // s.u.
class SvNumberFormatter;
class ScDocument;
@@ -84,7 +84,7 @@ enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE };
//CHINA001 private:
//CHINA001 FixedLine aFlFormat;
//CHINA001 ListBox aLbFormat;
-//CHINA001 AutoFmtPreview* pWndPreview;
+//CHINA001 ScAutoFmtPreview* pWndPreview;
//CHINA001 OKButton aBtnOk;
//CHINA001 CancelButton aBtnCancel;
//CHINA001 HelpButton aBtnHelp;
@@ -128,11 +128,11 @@ enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE };
//CHINA001
//========================================================================
-class SC_DLLPUBLIC AutoFmtPreview : public Window
+class SC_DLLPUBLIC ScAutoFmtPreview : public Window
{
public:
- AutoFmtPreview( Window* pParent, const ResId& rRes, ScDocument* pDoc );
- ~AutoFmtPreview();
+ ScAutoFmtPreview( Window* pParent, const ResId& rRes, ScDocument* pDoc );
+ ~ScAutoFmtPreview();
void NotifyChange( ScAutoFormatData* pNewData );
diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx
index 7bf76e41df4c..d5a3ba864395 100644
--- a/sc/source/ui/inc/dbfunc.hxx
+++ b/sc/source/ui/inc/dbfunc.hxx
@@ -43,7 +43,7 @@ class ScDBData;
class ScDBCollection;
class ScDPObject;
class ScDPSaveData;
-class StrCollection;
+class ScStrCollection;
struct ScDPNumGroupInfo;
// ---------------------------------------------------------------------------
@@ -51,7 +51,7 @@ struct ScDPNumGroupInfo;
class ScDBFunc : public ScViewFunc
{
private:
- void GetSelectedMemberList( StrCollection& rEntries, long& rDimension );
+ void GetSelectedMemberList( ScStrCollection& rEntries, long& rDimension );
public:
ScDBFunc( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell );
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index 5b7b9ffb6644..a7a1c3f6a1ce 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -53,7 +53,7 @@ class ScRangeData;
class ScViewData;
class ScDocument;
class ScQueryItem;
-class TypedStrCollection;
+class TypedScStrCollection;
//==================================================================
// Gemeinsame Resource-Objekte:
@@ -161,7 +161,7 @@ private:
USHORT nFieldCount;
BOOL bRefInputMode;
- TypedStrCollection* pEntryLists[MAXCOLCOUNT];
+ TypedScStrCollection* pEntryLists[MAXCOLCOUNT];
USHORT nHeaderPos[MAXCOLCOUNT];
// Hack: RefInput-Kontrolle
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index c71d389e62fe..b812fde11dc3 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -46,7 +46,7 @@ class ScEditEngineDefaulter;
class EditView;
class EditTextObject;
class ScInputHdlState;
-class TypedStrCollection;
+class TypedScStrCollection;
class ScRangeFindList;
class Timer;
class KeyEvent;
@@ -67,8 +67,8 @@ private:
EditView* pTableView; // aktive EditView dazu
EditView* pTopView; // EditView in der Eingabezeile
- TypedStrCollection* pColumnData;
- TypedStrCollection* pFormulaData;
+ TypedScStrCollection* pColumnData;
+ TypedScStrCollection* pFormulaData;
TypedStrCollection* pFormulaDataPara;
ULONG nTipVisible;
ULONG nTipVisibleSec;
diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx
index 593328200862..4009f06417dc 100644
--- a/sc/source/ui/inc/pfiltdlg.hxx
+++ b/sc/source/ui/inc/pfiltdlg.hxx
@@ -61,7 +61,7 @@
class ScViewData;
class ScDocument;
class ScQueryItem;
-class TypedStrCollection;
+class TypedScStrCollection;
//==================================================================
@@ -126,7 +126,7 @@ private:
ListBox* aFieldLbArr[3];
ListBox* aCondLbArr[3];
- TypedStrCollection* pEntryLists[MAXCOLCOUNT];
+ TypedScStrCollection* pEntryLists[MAXCOLCOUNT];
#ifdef _PFILTDLG_CXX
private:
diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx
index 908d4ebb4774..3722a237ef9f 100644
--- a/sc/source/ui/inc/scuiautofmt.hxx
+++ b/sc/source/ui/inc/scuiautofmt.hxx
@@ -46,7 +46,7 @@ public:
private:
FixedLine aFlFormat;
ListBox aLbFormat;
- AutoFmtPreview* pWndPreview;
+ ScAutoFmtPreview* pWndPreview;
OKButton aBtnOk;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 602587207f7d..bc70ea9a7428 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -97,7 +97,7 @@ enum ObjectSelectionType
//==================================================================
-class SC_DLLPUBLIC ScTabViewShell: public SfxViewShell, public ScDBFunc
+class ScTabViewShell: public SfxViewShell, public ScDBFunc
{
private:
static USHORT nInsertCtrlState;
@@ -182,20 +182,20 @@ private:
String aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
private:
- SC_DLLPRIVATE void Construct( BYTE nForceDesignMode = SC_FORCEMODE_NONE );
+ void Construct( BYTE nForceDesignMode = SC_FORCEMODE_NONE );
-//UNUSED2008-05 SC_DLLPRIVATE void SetMySubShell( SfxShell* pShell );
- SC_DLLPRIVATE SfxShell* GetMySubShell() const;
+//UNUSED2008-05 void SetMySubShell( SfxShell* pShell );
+ SfxShell* GetMySubShell() const;
- SC_DLLPRIVATE void DoReadUserData( const String& rData );
- SC_DLLPRIVATE void DoReadUserDataSequence( const ::com::sun::star::uno::Sequence<
+ void DoReadUserData( const String& rData );
+ void DoReadUserDataSequence( const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& rSettings );
- SC_DLLPRIVATE DECL_LINK( SimpleRefClose, String* );
- SC_DLLPRIVATE DECL_LINK( SimpleRefDone, String* );
- SC_DLLPRIVATE DECL_LINK( SimpleRefAborted, String* );
- SC_DLLPRIVATE DECL_LINK( SimpleRefChange, String* );
- SC_DLLPRIVATE DECL_LINK( FormControlActivated, FmFormShell* );
+ DECL_LINK( SimpleRefClose, String* );
+ DECL_LINK( SimpleRefDone, String* );
+ DECL_LINK( SimpleRefAborted, String* );
+ DECL_LINK( SimpleRefChange, String* );
+ DECL_LINK( FormControlActivated, FmFormShell* );
protected:
virtual void Activate(BOOL bMDI);
@@ -231,7 +231,7 @@ protected:
virtual SdrView* GetDrawView() const;
public:
- TYPEINFO();
+ TYPEINFO_VISIBILITY(SC_DLLPUBLIC);
SFX_DECL_INTERFACE(SCID_TABVIEW_SHELL)
SFX_DECL_VIEWFACTORY(ScTabViewShell);
@@ -268,8 +268,8 @@ public:
//UNUSED2008-05 void ExecuteShowNIY( SfxRequest& rReq );
//UNUSED2008-05 void StateDisabled( SfxItemSet& rSet );
- void Execute( SfxRequest& rReq );
- void GetState( SfxItemSet& rSet );
+ SC_DLLPUBLIC void Execute( SfxRequest& rReq );
+ SC_DLLPUBLIC void GetState( SfxItemSet& rSet );
void ExecuteTable( SfxRequest& rReq );
void GetStateTable( SfxItemSet& rSet );
@@ -380,7 +380,7 @@ public:
void DeactivateOle();
- static ScTabViewShell* GetActiveViewShell();
+ SC_DLLPUBLIC static ScTabViewShell* GetActiveViewShell();
SfxModelessDialog* CreateRefDialog( SfxBindings* pB, SfxChildWindow* pCW,
SfxChildWinInfo* pInfo,
Window* pParent, USHORT nSlotId );
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 65665ccf22be..2faf148e5ac1 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -262,7 +262,7 @@ void __EXPORT ScAcceptChgDlg::Init()
pChanges->SetModifiedLink( LINK( this, ScAcceptChgDlg,ChgTrackModHdl));
aChangeViewSet.SetTheAuthorToShow(pChanges->GetUser());
pTPFilter->ClearAuthors();
- StrCollection aUserColl=pChanges->GetUserCollection();
+ ScStrCollection aUserColl=pChanges->GetUserCollection();
for(USHORT i=0;i<aUserColl.GetCount();i++)
pTPFilter->InsertAuthor(aUserColl[i]->GetString());
}
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index ea1e1a5b2066..75cc94e0e377 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -752,14 +752,14 @@ void ScAnyRefDlg::ShowFormulaReference( const XubString& rStr )
ScRange aRange;
if(bDoubleRef)
{
- ComplRefData aRef( pToken->GetDoubleRef() );
+ ScComplexRefData aRef( pToken->GetDoubleRef() );
aRef.CalcAbsIfRel( aPos );
aRange.aStart.Set( aRef.Ref1.nCol, aRef.Ref1.nRow, aRef.Ref1.nTab );
aRange.aEnd.Set( aRef.Ref2.nCol, aRef.Ref2.nRow, aRef.Ref2.nTab );
}
else
{
- SingleRefData aRef( pToken->GetSingleRef() );
+ ScSingleRefData aRef( pToken->GetSingleRef() );
aRef.CalcAbsIfRel( aPos );
aRange.aStart.Set( aRef.nCol, aRef.nRow, aRef.nTab );
aRange.aEnd = aRange.aStart;
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 54cd75c0b59f..b4fe1f83b220 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -86,7 +86,7 @@ BOOL bIsOlk = FALSE;
//CHINA001 //
//CHINA001 aLbFormat ( this, ScResId( LB_FORMAT ) ),
//CHINA001 aFlFormat ( this, ScResId( FL_FORMAT ) ),
-//CHINA001 pWndPreview ( new AutoFmtPreview( this, ScResId( WND_PREVIEW ), pDoc ) ),
+//CHINA001 pWndPreview ( new ScAutoFmtPreview( this, ScResId( WND_PREVIEW ), pDoc ) ),
//CHINA001 aBtnNumFormat ( this, ScResId( BTN_NUMFORMAT ) ),
//CHINA001 aBtnBorder ( this, ScResId( BTN_BORDER ) ),
//CHINA001 aBtnFont ( this, ScResId( BTN_FONT ) ),
@@ -486,9 +486,9 @@ BOOL bIsOlk = FALSE;
//CHINA001 }
//CHINA001
//========================================================================
-// AutoFmtPreview
+// ScAutoFmtPreview
-AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes, ScDocument* pDoc ) :
+ScAutoFmtPreview::ScAutoFmtPreview( Window* pParent, const ResId& rRes, ScDocument* pDoc ) :
Window ( pParent, rRes ),
pCurData ( NULL ),
aVD ( *this ),
@@ -517,7 +517,7 @@ AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes, ScDocument*
//------------------------------------------------------------------------
-AutoFmtPreview::~AutoFmtPreview()
+ScAutoFmtPreview::~ScAutoFmtPreview()
{
delete pNumFmt;
}
@@ -539,7 +539,7 @@ void lcl_SetFontProperties(
rFont.SetItalic ( (FontItalic)rPostureItem.GetValue() );
}
-void AutoFmtPreview::MakeFonts( USHORT nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont )
+void ScAutoFmtPreview::MakeFonts( USHORT nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont )
{
if ( pCurData )
{
@@ -588,7 +588,7 @@ rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Va
//------------------------------------------------------------------------
-USHORT AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
+USHORT ScAutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
{
static const USHORT pnFmtMap[] =
{
@@ -601,21 +601,21 @@ USHORT AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
return pnFmtMap[ maArray.GetCellIndex( nCol, nRow, mbRTL ) ];
}
-const SvxBoxItem& AutoFmtPreview::GetBoxItem( size_t nCol, size_t nRow ) const
+const SvxBoxItem& ScAutoFmtPreview::GetBoxItem( size_t nCol, size_t nRow ) const
{
- DBG_ASSERT( pCurData, "AutoFmtPreview::GetBoxItem - no format data found" );
+ DBG_ASSERT( pCurData, "ScAutoFmtPreview::GetBoxItem - no format data found" );
return *static_cast< const SvxBoxItem* >( pCurData->GetItem( GetFormatIndex( nCol, nRow ), ATTR_BORDER ) );
}
-const SvxLineItem& AutoFmtPreview::GetDiagItem( size_t nCol, size_t nRow, bool bTLBR ) const
+const SvxLineItem& ScAutoFmtPreview::GetDiagItem( size_t nCol, size_t nRow, bool bTLBR ) const
{
- DBG_ASSERT( pCurData, "AutoFmtPreview::GetDiagItem - no format data found" );
+ DBG_ASSERT( pCurData, "ScAutoFmtPreview::GetDiagItem - no format data found" );
return *static_cast< const SvxLineItem* >( pCurData->GetItem( GetFormatIndex( nCol, nRow ), bTLBR ? ATTR_BORDER_TLBR : ATTR_BORDER_BLTR ) );
}
//------------------------------------------------------------------------
-void AutoFmtPreview::DrawString( size_t nCol, size_t nRow )
+void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow )
{
if ( pCurData )
{
@@ -800,7 +800,7 @@ void AutoFmtPreview::DrawString( size_t nCol, size_t nRow )
//------------------------------------------------------------------------
-void AutoFmtPreview::DrawStrings()
+void ScAutoFmtPreview::DrawStrings()
{
for( size_t nRow = 0; nRow < 5; ++nRow )
for( size_t nCol = 0; nCol < 5; ++nCol )
@@ -809,7 +809,7 @@ void AutoFmtPreview::DrawStrings()
//------------------------------------------------------------------------
-void AutoFmtPreview::DrawBackground()
+void ScAutoFmtPreview::DrawBackground()
{
if( pCurData )
{
@@ -832,7 +832,7 @@ void AutoFmtPreview::DrawBackground()
//------------------------------------------------------------------------
-void AutoFmtPreview::PaintCells()
+void ScAutoFmtPreview::PaintCells()
{
if ( pCurData )
{
@@ -851,7 +851,7 @@ void AutoFmtPreview::PaintCells()
//------------------------------------------------------------------------
-void AutoFmtPreview::Init()
+void ScAutoFmtPreview::Init()
{
SetBorderStyle( WINDOW_BORDER_MONO );
maArray.Initialize( 5, 5 );
@@ -872,7 +872,7 @@ void AutoFmtPreview::Init()
//------------------------------------------------------------------------
-void AutoFmtPreview::CalcCellArray( BOOL bFitWidthP )
+void ScAutoFmtPreview::CalcCellArray( BOOL bFitWidthP )
{
maArray.SetXOffset( 2 );
maArray.SetAllColWidths( bFitWidthP ? mnDataColWidth2 : mnDataColWidth1 );
@@ -893,7 +893,7 @@ inline void lclSetStyleFromBorder( svx::frame::Style& rStyle, const SvxBorderLin
rStyle.Set( pBorder, 1.0 / TWIPS_PER_POINT, 5 );
}
-void AutoFmtPreview::CalcLineMap()
+void ScAutoFmtPreview::CalcLineMap()
{
if ( pCurData )
{
@@ -924,7 +924,7 @@ void AutoFmtPreview::CalcLineMap()
//------------------------------------------------------------------------
-void AutoFmtPreview::NotifyChange( ScAutoFormatData* pNewData )
+void ScAutoFmtPreview::NotifyChange( ScAutoFormatData* pNewData )
{
if ( pNewData != pCurData )
{
@@ -944,7 +944,7 @@ void AutoFmtPreview::NotifyChange( ScAutoFormatData* pNewData )
//------------------------------------------------------------------------
-void AutoFmtPreview::DoPaint( const Rectangle& /* rRect */ )
+void ScAutoFmtPreview::DoPaint( const Rectangle& /* rRect */ )
{
sal_uInt32 nOldDrawMode = aVD.GetDrawMode();
// #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
@@ -979,7 +979,7 @@ void AutoFmtPreview::DoPaint( const Rectangle& /* rRect */ )
//------------------------------------------------------------------------
-void AutoFmtPreview::Paint( const Rectangle& rRect )
+void ScAutoFmtPreview::Paint( const Rectangle& rRect )
{
DoPaint( rRect );
}
diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx
index cf362f445a6b..b6d93ee4c386 100644
--- a/sc/source/ui/miscdlgs/highred.cxx
+++ b/sc/source/ui/miscdlgs/highred.cxx
@@ -131,7 +131,7 @@ void __EXPORT ScHighlightChgDlg::Init()
{
aChangeViewSet.SetTheAuthorToShow(pChanges->GetUser());
aFilterCtr.ClearAuthors();
- StrCollection aUserColl=pChanges->GetUserCollection();
+ ScStrCollection aUserColl=pChanges->GetUserCollection();
for(USHORT i=0;i<aUserColl.GetCount();i++)
aFilterCtr.InsertAuthor(aUserColl[i]->GetString());
}
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index c5e07e380f5f..e1ec71344034 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -79,7 +79,7 @@ ScAutoFormatDlg::ScAutoFormatDlg( Window* pParent,
//
aFlFormat ( this, ScResId( FL_FORMAT ) ),
aLbFormat ( this, ScResId( LB_FORMAT ) ),
- pWndPreview ( new AutoFmtPreview( this, ScResId( WND_PREVIEW ), pDoc ) ),
+ pWndPreview ( new ScAutoFmtPreview( this, ScResId( WND_PREVIEW ), pDoc ) ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
diff --git a/sc/source/ui/miscdlgs/textdlgs.cxx b/sc/source/ui/miscdlgs/textdlgs.cxx
index c8453df886b1..c204266bbb60 100644
--- a/sc/source/ui/miscdlgs/textdlgs.cxx
+++ b/sc/source/ui/miscdlgs/textdlgs.cxx
@@ -131,8 +131,8 @@ void __EXPORT ScParagraphDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
//CHINA001 DisableControls( TABTYPE_ALL &~TABTYPE_LEFT |
//CHINA001 TABFILL_ALL &~TABFILL_NONE );
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));//add CHINA001
- aSet.Put(SfxUInt16Item(SID_SVXTABULATORTABPAGE_CONTROLFLAGS,TABTYPE_ALL &~TABTYPE_LEFT |
- TABFILL_ALL &~TABFILL_NONE ));
+ aSet.Put(SfxUInt16Item(SID_SVXTABULATORTABPAGE_CONTROLFLAGS,(TABTYPE_ALL &~TABTYPE_LEFT) |
+ (TABFILL_ALL &~TABFILL_NONE) ));
rPage.PageCreated(aSet);//add CHINA001
}
break;
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index fff6a2a477b9..9bba01960b32 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -74,7 +74,7 @@
// macro is sufficient since only used in ctor
#define SCNAV_COLDIGITS (static_cast<xub_StrLen>( floor( log10( static_cast<double>(SCNAV_MAXCOL)))) + 1) // 1...256...18278
// precomputed constant because it is used in every change of spin button field
-static const xub_StrLen SCNAV_COLLETTERS = ::ColToAlpha(SCNAV_MAXCOL).Len(); // A...IV...ZZZ
+static const xub_StrLen SCNAV_COLLETTERS = ::ScColToAlpha(SCNAV_MAXCOL).Len(); // A...IV...ZZZ
#define SCNAV_MAXROW (MAXROWCOUNT)
@@ -300,7 +300,7 @@ SCCOL ColumnEdit::NumToAlpha( SCCOL nColNo, String& rStr )
else if ( nColNo < 1 )
nColNo = 1;
- ::ColToAlpha( rStr, nColNo - 1);
+ ::ScColToAlpha( rStr, nColNo - 1);
return nColNo;
}
@@ -1523,7 +1523,7 @@ BOOL __EXPORT ScNavigatorDlg::Drop( const DropEvent& rEvt )
{
String aFileName;
- SvDataObjectRef pObject = SvDataObject::PasteDragServer(rEvt);
+ SvScDataObjectRef pObject = SvScDataObject::PasteDragServer(rEvt);
ULONG nFormat = INetBookmark::HasFormat(*pObject);
INetBookmark aBookmark;
@@ -1551,7 +1551,7 @@ BOOL __EXPORT ScNavigatorDlg::QueryDrop( DropEvent& rEvt )
if ( !aLbEntries.IsInDrag() ) // kein Verschieben innerhalb der TreeListBox
{
- SvDataObjectRef pObject = SvDataObject::PasteDragServer(rEvt);
+ SvScDataObjectRef pObject = SvScDataObject::PasteDragServer(rEvt);
if ( pObject->HasFormat(FORMAT_FILE)
|| INetBookmark::HasFormat(*pObject) )
{
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index 81a00091b2ef..e64ef46bef87 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -348,7 +348,7 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
BOOL bUseValue = aBtnPageNo.IsChecked();
if ( WAS_DEFAULT(nWhichPageNo,rOldSet)
- && ( !bUseValue && bUseValue == aBtnPageNo.GetSavedValue()
+ && ( (!bUseValue && bUseValue == aBtnPageNo.GetSavedValue())
|| ( bUseValue && bUseValue == aBtnPageNo.GetSavedValue()
&& aEdPageNo.GetText() == aEdPageNo.GetSavedValue() ) ) )
{
diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx
index eca9fd7232c5..a1ca8b9dabeb 100644
--- a/sc/source/ui/undo/areasave.cxx
+++ b/sc/source/ui/undo/areasave.cxx
@@ -57,7 +57,7 @@ ScAreaLinkSaver::ScAreaLinkSaver( const ScAreaLink& rSource ) :
}
ScAreaLinkSaver::ScAreaLinkSaver( const ScAreaLinkSaver& rCopy ) :
- DataObject(),
+ ScDataObject(),
aFileName ( rCopy.aFileName ),
aFilterName ( rCopy.aFilterName ),
aOptions ( rCopy.aOptions ),
@@ -71,7 +71,7 @@ ScAreaLinkSaver::~ScAreaLinkSaver()
{
}
-DataObject* ScAreaLinkSaver::Clone() const
+ScDataObject* ScAreaLinkSaver::Clone() const
{
return new ScAreaLinkSaver( *this );
}
@@ -122,7 +122,7 @@ ScAreaLinkSaveCollection::ScAreaLinkSaveCollection()
}
ScAreaLinkSaveCollection::ScAreaLinkSaveCollection( const ScAreaLinkSaveCollection& rCopy ) :
- Collection( rCopy )
+ ScCollection( rCopy )
{
}
@@ -130,7 +130,7 @@ ScAreaLinkSaveCollection::~ScAreaLinkSaveCollection()
{
}
-DataObject* ScAreaLinkSaveCollection::Clone() const
+ScDataObject* ScAreaLinkSaveCollection::Clone() const
{
return new ScAreaLinkSaveCollection( *this );
}
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index e72d3ab7da26..9c3cdde04756 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -3305,7 +3305,7 @@ void ScCellRangesBase::ForceChartListener_Impl()
}
}
-String lcl_UniqueName( StrCollection& rColl, const String& rPrefix )
+String lcl_UniqueName( ScStrCollection& rColl, const String& rPrefix )
{
long nNumber = 1;
USHORT nCollCount = rColl.GetCount();
@@ -8827,7 +8827,7 @@ rtl::OUString SAL_CALL ScTableColumnObj::getName() throw(uno::RuntimeException)
DBG_ASSERT(rRange.aStart.Col() == rRange.aEnd.Col(), "too many columns");
SCCOL nCol = rRange.aStart.Col();
- return ColToAlpha( nCol ); // from global.hxx
+ return ScColToAlpha( nCol ); // from global.hxx
}
void SAL_CALL ScTableColumnObj::setName( const rtl::OUString& /* aNewName */ )
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 812b3b136760..7686b2c94fd4 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -2450,7 +2450,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScTableColumnsObj::getElementNames()
uno::Sequence<rtl::OUString> aSeq(nCount);
rtl::OUString* pAry = aSeq.getArray();
for (SCCOL i=0; i<nCount; i++)
- pAry[i] = ::ColToAlpha( nStartCol + i );
+ pAry[i] = ::ScColToAlpha( nStartCol + i );
return aSeq;
}
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index 422fc4d63d8c..41b0de34840b 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -356,7 +356,7 @@ BOOL lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName )
void lcl_AddRef( ScTokenArray& rArray, long nStartRow, long nColCount, long nRowCount )
{
- ComplRefData aRef;
+ ScComplexRefData aRef;
aRef.InitFlags();
aRef.Ref1.nTab = 0;
aRef.Ref2.nTab = 0;
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index a5626f0605a5..a8f0cdf347e5 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -424,7 +424,7 @@ ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(INT32 nIndex)
if (pDocShell)
{
INT32 nCount = 0;
- StrCollection aNames; // um doppelte wegzulassen
+ ScStrCollection aNames; // um doppelte wegzulassen
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
@@ -485,7 +485,7 @@ sal_Int32 SAL_CALL ScSheetLinksObj::getCount() throw(uno::RuntimeException)
INT32 nCount = 0;
if (pDocShell)
{
- StrCollection aNames; // um doppelte wegzulassen
+ ScStrCollection aNames; // um doppelte wegzulassen
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
@@ -571,7 +571,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(u
if (pDocShell)
{
- StrCollection aNames; // um doppelte wegzulassen
+ ScStrCollection aNames; // um doppelte wegzulassen
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTabCount = pDoc->GetTableCount();
String aName;
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index 0eff6699f268..cd4b52577367 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -275,7 +275,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScFormulaParserObj )
//------------------------------------------------------------------------
-void lcl_ExternalRefToCalc( SingleRefData& rRef, const sheet::SingleReference& rAPI )
+void lcl_ExternalRefToCalc( ScSingleRefData& rRef, const sheet::SingleReference& rAPI )
{
rRef.InitFlags();
@@ -296,7 +296,7 @@ void lcl_ExternalRefToCalc( SingleRefData& rRef, const sheet::SingleReference& r
rRef.SetRelName( false );
}
-void lcl_SingleRefToCalc( SingleRefData& rRef, const sheet::SingleReference& rAPI )
+void lcl_SingleRefToCalc( ScSingleRefData& rRef, const sheet::SingleReference& rAPI )
{
rRef.InitFlags();
@@ -317,7 +317,7 @@ void lcl_SingleRefToCalc( SingleRefData& rRef, const sheet::SingleReference& rAP
rRef.SetRelName( ( rAPI.Flags & sheet::ReferenceFlags::RELATIVE_NAME ) != 0 );
}
-void lcl_ExternalRefToApi( sheet::SingleReference& rAPI, const SingleRefData& rRef )
+void lcl_ExternalRefToApi( sheet::SingleReference& rAPI, const ScSingleRefData& rRef )
{
rAPI.Column = rRef.nCol;
rAPI.Row = rRef.nRow;
@@ -336,7 +336,7 @@ void lcl_ExternalRefToApi( sheet::SingleReference& rAPI, const SingleRefData& rR
rAPI.Flags = nFlags;
}
-void lcl_SingleRefToApi( sheet::SingleReference& rAPI, const SingleRefData& rRef )
+void lcl_SingleRefToApi( sheet::SingleReference& rAPI, const ScSingleRefData& rRef )
{
rAPI.Column = rRef.nCol;
rAPI.Row = rRef.nRow;
@@ -412,7 +412,7 @@ bool ScTokenConversion::ConvertToTokenArray( ScDocument& rDoc,
uno::Type aType = rAPI.Data.getValueType();
if ( aType.equals( cppu::UnoType<sheet::SingleReference>::get() ) )
{
- SingleRefData aSingleRef;
+ ScSingleRefData aSingleRef;
sheet::SingleReference aApiRef;
rAPI.Data >>= aApiRef;
lcl_SingleRefToCalc( aSingleRef, aApiRef );
@@ -426,7 +426,7 @@ bool ScTokenConversion::ConvertToTokenArray( ScDocument& rDoc,
}
else if ( aType.equals( cppu::UnoType<sheet::ComplexReference>::get() ) )
{
- ComplRefData aComplRef;
+ ScComplexRefData aComplRef;
sheet::ComplexReference aApiRef;
rAPI.Data >>= aApiRef;
lcl_SingleRefToCalc( aComplRef.Ref1, aApiRef.Reference1 );
@@ -453,7 +453,7 @@ bool ScTokenConversion::ConvertToTokenArray( ScDocument& rDoc,
String aTabName = rDoc.GetExternalRefManager()->getCacheTableName( nFileId, nCacheId );
if( aTabName.Len() > 0 )
{
- SingleRefData aSingleRef;
+ ScSingleRefData aSingleRef;
// convert column/row settings, set sheet index to absolute
lcl_ExternalRefToCalc( aSingleRef, aApiSRef );
rTokenArray.AddExternalSingleReference( nFileId, aTabName, aSingleRef );
diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx
index 3fc3c5b379fb..66a5815b9782 100644
--- a/sc/source/ui/view/colrowba.cxx
+++ b/sc/source/ui/view/colrowba.cxx
@@ -111,7 +111,7 @@ String ScColBar::GetEntryText( SCCOLROW nEntryNo )
{
return UseNumericHeader()
? String::CreateFromInt32( nEntryNo + 1 )
- : ColToAlpha( static_cast<SCCOL>(nEntryNo) );
+ : ScColToAlpha( static_cast<SCCOL>(nEntryNo) );
}
void ScColBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize )
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index fe879999bb95..a83ef83d3ec9 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -702,7 +702,7 @@ void ScDBFunc::RecalcPivotTable()
ErrorMessage(STR_PIVOT_NOTFOUND);
}
-void ScDBFunc::GetSelectedMemberList( StrCollection& rEntries, long& rDimension )
+void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimension )
{
ScDPObject* pDPObj = GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(),
GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
@@ -782,7 +782,7 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32&
ScDPObject* pDPObj = pDoc->GetDPAtCursor( nCurX, nCurY, nTab );
if ( pDPObj )
{
- StrCollection aEntries;
+ ScStrCollection aEntries;
long nSelectDimension = -1;
GetSelectedMemberList( aEntries, nSelectDimension );
@@ -895,7 +895,7 @@ BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo )
ScDPObject* pDPObj = pDoc->GetDPAtCursor( nCurX, nCurY, nTab );
if ( pDPObj )
{
- StrCollection aEntries;
+ ScStrCollection aEntries;
long nSelectDimension = -1;
GetSelectedMemberList( aEntries, nSelectDimension );
@@ -974,7 +974,7 @@ void ScDBFunc::DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nPar
GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
if ( pDPObj )
{
- StrCollection aEntries;
+ ScStrCollection aEntries;
long nSelectDimension = -1;
GetSelectedMemberList( aEntries, nSelectDimension );
@@ -1111,7 +1111,7 @@ void ScDBFunc::NumGroupDataPilot( const ScDPNumGroupInfo& rInfo )
GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
if ( pDPObj )
{
- StrCollection aEntries;
+ ScStrCollection aEntries;
long nSelectDimension = -1;
GetSelectedMemberList( aEntries, nSelectDimension );
@@ -1155,7 +1155,7 @@ void ScDBFunc::GroupDataPilot()
GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
if ( pDPObj )
{
- StrCollection aEntries;
+ ScStrCollection aEntries;
long nSelectDimension = -1;
GetSelectedMemberList( aEntries, nSelectDimension );
@@ -1299,7 +1299,7 @@ void ScDBFunc::UngroupDataPilot()
GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
if ( pDPObj )
{
- StrCollection aEntries;
+ ScStrCollection aEntries;
long nSelectDimension = -1;
GetSelectedMemberList( aEntries, nSelectDimension );
@@ -1340,7 +1340,7 @@ void ScDBFunc::UngroupDataPilot()
{
// If all remaining groups in the dimension aren't shown, remove
// the dimension too, as if it was completely empty.
- StrCollection aVisibleEntries;
+ ScStrCollection aVisibleEntries;
pDPObj->GetMemberResultNames( aVisibleEntries, nSelectDimension );
bEmptyDim = pGroupDim->HasOnlyHidden( aVisibleEntries );
}
@@ -1614,7 +1614,7 @@ BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation )
GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
if ( pDPObj )
{
- StrCollection aEntries;
+ ScStrCollection aEntries;
long nSelectDimension = -1;
GetSelectedMemberList( aEntries, nSelectDimension );
@@ -1649,7 +1649,7 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName
GetViewData()->GetCurY(), GetViewData()->GetTabNo() );
if ( pDPObj )
{
- StrCollection aEntries;
+ ScStrCollection aEntries;
long nSelectDimension = -1;
GetSelectedMemberList( aEntries, nSelectDimension );
@@ -1699,7 +1699,7 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName
// Hide details for all visible members (selected are changed below).
//! Use all members from source level instead (including non-visible)?
- StrCollection aVisibleEntries;
+ ScStrCollection aVisibleEntries;
pDPObj->GetMemberResultNames( aVisibleEntries, nSelectDimension );
USHORT nVisCount = aVisibleEntries.GetCount();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 36566677a858..9123704a6ff9 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -601,7 +601,7 @@ void ScGridWindow::DoPageFieldMenue( SCCOL nCol, SCROW nRow )
// SetSize comes later
- TypedStrCollection aStrings( 128, 128 );
+ TypedScStrCollection aStrings( 128, 128 );
// get list box entries and selection
BOOL bHasCurrentPage = FALSE;
@@ -895,7 +895,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect )
*/
BOOL bEmpty = FALSE;
- TypedStrCollection aStrings( 128, 128 );
+ TypedScStrCollection aStrings( 128, 128 );
if ( bDataSelect ) // Auswahl-Liste
{
// Liste fuellen
@@ -4087,7 +4087,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
if (rData.aJumpTarget.Len())
{
// internal bookmark (from Navigator)
- // bookmark clipboard formats are in PasteDataObject
+ // bookmark clipboard formats are in PasteScDataObject
if ( !rData.pJumpLocalDoc || rData.pJumpLocalDoc == pViewData->GetDocument() )
{
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 936e083cd0af..cca56901dfa5 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -91,7 +91,7 @@ class ScActionColorChanger
{
private:
const ScAppOptions& rOpt;
- const StrCollection& rUsers;
+ const ScStrCollection& rUsers;
String aLastUserName;
USHORT nLastUserIndex;
ColorData nColor;
@@ -1315,7 +1315,7 @@ const SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
else
pNextTop = NULL;
- if ( HasPriority( pThisBottom, pNextTop ) )
+ if ( ScHasPriority( pThisBottom, pNextTop ) )
return pThisBottom;
else
return pNextTop;
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 19aacbef4681..b638b89b7a65 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -1441,7 +1441,7 @@ void __EXPORT ScPreview::MouseMove( const MouseEvent& rMEvt )
if( bPageMargin )
{
- if(( aPixPt.X() < ( aLeftTop.X() + 2 ) && aPixPt.X() > ( aLeftTop.X() - 2 ) || bLeftRulerMove ||
+ if(( (aPixPt.X() < ( aLeftTop.X() + 2 ) && aPixPt.X() > ( aLeftTop.X() - 2 )) || bLeftRulerMove ||
( aPixPt.X() < ( aRightTop.X() + 2 ) && aPixPt.X() > ( aRightTop.X() - 2 ) ) || bRightRulerMove || bOnColRulerChange || bColRulerMove )
&& aPixPt.Y() > aLeftTop.Y() && aPixPt.Y() < aLeftBottom.Y() )
{
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index b035fc3ad8d7..aaa6ebc2e256 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1467,7 +1467,7 @@ void ScPrintFunc::PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY )
pDev->DrawRect( Rectangle( nPosX,nPosY,nEndX,nEndY ) );
- aText = ::ColToAlpha( nCol);
+ aText = ::ScColToAlpha( nCol);
long nTextWidth = pDev->GetTextWidth(aText);
long nTextHeight = pDev->GetTextHeight();
long nAddX = ( nWidth - nTextWidth ) / 2;
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index d37d9fa3e2dc..91a9fde56c40 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -314,6 +314,7 @@ void ScTabControl::UpdateStatus()
}
}
}
+ }
}
SetCurPageId( static_cast<sal_uInt16>(pViewData->GetTabNo()) + 1 );
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index c7795a4223f7..8154da744ce4 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1293,7 +1293,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
{
aHelpStr = ScGlobal::GetRscString(STR_COLUMN);
aHelpStr += ' ';
- aHelpStr += ColToAlpha((SCCOL) nScrollPos);
+ aHelpStr += ScColToAlpha((SCCOL) nScrollPos);
aRect.Left() = aMousePos.X();
aRect.Top() = aPos.Y() - 4;
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 6bb1d2dc0421..beb2d7bf56f5 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -542,7 +542,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
SfxMedium aMed;
aMed.GetItemSet()->Put( SfxUsrAnyItem( SID_INPUTSTREAM, uno::makeAny( xStm ) ) );
- FltError eErr = ScImportExcel( aMed, pInsDoc, EIF_AUTO );
+ FltError eErr = ScFormatFilter::Get().ScImportExcel( aMed, pInsDoc, EIF_AUTO );
if ( eErr == eERR_OK )
{
ScRange aSource;
diff --git a/sc/util/makefile.mk b/sc/util/makefile.mk
index 1ba1ffbb102c..106d20bd2b11 100644
--- a/sc/util/makefile.mk
+++ b/sc/util/makefile.mk
@@ -103,12 +103,6 @@ SHL1STDLIBS= \
SHL1LIBS=$(LIB3TARGET) $(LIB4TARGET)
-.IF "$(GUI)"!="UNX"
-.IF "$(GUI)$(COM)" != "WNTGCC"
-SHL1OBJS= $(SLO)$/scdll.obj
-.ENDIF
-.ENDIF
-
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
DEFLIB1NAME= $(LIB3TARGET:b) $(LIB4TARGET:b)
@@ -143,17 +137,8 @@ LIB4TARGET=$(SLB)$/scalc3c.lib
LIB4FILES= \
$(SLB)$/data.lib \
$(SLB)$/tool.lib \
- $(SLB)$/dif.lib \
- $(SLB)$/excel.lib \
- $(SLB)$/xcl97.lib \
- $(SLB)$/html.lib \
- $(SLB)$/lotus.lib \
- $(SLB)$/qpro.lib\
- $(SLB)$/rtf.lib \
$(SLB)$/xml.lib \
- $(SLB)$/accessibility.lib \
- $(SLB)$/ftools.lib \
- $(SLB)$/scflt.lib
+ $(SLB)$/accessibility.lib
SHL2TARGET= scd$(DLLPOSTFIX)
SHL2IMPLIB= scdimp
@@ -177,6 +162,49 @@ SHL2OBJS= $(SLO)$/scdetect.obj \
$(SLO)$/detreg.obj
SHL2DEPN+= makefile.mk
+# split out filters
+SHL6TARGET= scfilt$(DLLPOSTFIX)
+SHL6IMPLIB= scfiltimp
+SHL6LIBS= \
+ $(SLB)$/ftools.lib \
+ $(SLB)$/excel.lib \
+ $(SLB)$/xcl97.lib \
+ $(SLB)$/lotus.lib \
+ $(SLB)$/qpro.lib \
+ $(SLB)$/dif.lib \
+ $(SLB)$/html.lib \
+ $(SLB)$/rtf.lib \
+ $(SLB)$/scflt.lib
+SHL6VERSIONMAP= scfilt.map
+SHL6DEF=$(MISC)$/$(SHL6TARGET).def
+DEF6NAME= $(SHL6TARGET)
+SHL6DEPN=$(SHL1TARGETN)
+SHL6STDLIBS= \
+ $(ISCLIB) \
+ $(BASICLIB) \
+ $(SFXLIB) \
+ $(SVTOOLLIB) \
+ $(SVLLIB) \
+ $(SVXLIB) \
+ $(GOODIESLIB) \
+ $(BASEGFXLIB) \
+ $(VCLLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(COMPHELPERLIB) \
+ $(UCBHELPERLIB) \
+ $(TKLIB) \
+ $(VOSLIB) \
+ $(SALLIB) \
+ $(TOOLSLIB) \
+ $(I18NISOLANGLIB) \
+ $(UNOTOOLSLIB) \
+ $(SOTLIB) \
+ $(XMLOFFLIB) \
+ $(DBTOOLSLIB) \
+ $(AVMEDIALIB) \
+ $(OOXLIB) \
+ $(SAXLIB)
# add for scui
SHL8TARGET= scui$(DLLPOSTFIX)
diff --git a/sc/util/scfilt.map b/sc/util/scfilt.map
new file mode 100644
index 000000000000..589736f24eb1
--- /dev/null
+++ b/sc/util/scfilt.map
@@ -0,0 +1,6 @@
+SCFILT_1_0 {
+ global:
+ ScFilterCreate;
+ local:
+ *;
+};