summaryrefslogtreecommitdiff
path: root/oox/inc/oox/xls
diff options
context:
space:
mode:
Diffstat (limited to 'oox/inc/oox/xls')
-rw-r--r--oox/inc/oox/xls/addressconverter.hxx15
-rwxr-xr-xoox/inc/oox/xls/autofilterbuffer.hxx279
-rw-r--r--oox/inc/oox/xls/autofiltercontext.hxx130
-rw-r--r--oox/inc/oox/xls/biffcodec.hxx1
-rw-r--r--oox/inc/oox/xls/biffdetector.hxx14
-rw-r--r--oox/inc/oox/xls/biffhelper.hxx476
-rw-r--r--oox/inc/oox/xls/biffinputstream.hxx1
-rw-r--r--oox/inc/oox/xls/biffoutputstream.hxx1
-rw-r--r--oox/inc/oox/xls/chartsheetfragment.hxx19
-rw-r--r--oox/inc/oox/xls/commentsbuffer.hxx3
-rw-r--r--oox/inc/oox/xls/commentsfragment.hxx16
-rw-r--r--oox/inc/oox/xls/condformatbuffer.hxx18
-rw-r--r--oox/inc/oox/xls/condformatcontext.hxx13
-rwxr-xr-xoox/inc/oox/xls/connectionsbuffer.hxx186
-rw-r--r--oox/inc/oox/xls/connectionsfragment.hxx37
-rw-r--r--oox/inc/oox/xls/defnamesbuffer.hxx80
-rw-r--r--oox/inc/oox/xls/drawingfragment.hxx152
-rw-r--r--oox/inc/oox/xls/excelchartconverter.hxx1
-rw-r--r--oox/inc/oox/xls/excelfilter.hxx26
-rw-r--r--oox/inc/oox/xls/excelhandlers.hxx191
-rwxr-xr-xoox/inc/oox/xls/excelvbaproject.hxx5
-rw-r--r--oox/inc/oox/xls/externallinkbuffer.hxx53
-rw-r--r--oox/inc/oox/xls/externallinkfragment.hxx76
-rw-r--r--oox/inc/oox/xls/formulabase.hxx110
-rw-r--r--oox/inc/oox/xls/formulaparser.hxx18
-rw-r--r--oox/inc/oox/xls/numberformatsbuffer.hxx4
-rw-r--r--oox/inc/oox/xls/ooxformulaparser.hxx1
-rw-r--r--oox/inc/oox/xls/pagesettings.hxx17
-rw-r--r--oox/inc/oox/xls/pivotcachebuffer.hxx55
-rw-r--r--oox/inc/oox/xls/pivotcachefragment.hxx31
-rw-r--r--oox/inc/oox/xls/pivottablebuffer.hxx49
-rw-r--r--oox/inc/oox/xls/pivottablefragment.hxx31
-rw-r--r--oox/inc/oox/xls/querytablebuffer.hxx109
-rw-r--r--oox/inc/oox/xls/querytablefragment.hxx31
-rw-r--r--oox/inc/oox/xls/richstring.hxx19
-rw-r--r--oox/inc/oox/xls/richstringcontext.hxx15
-rw-r--r--oox/inc/oox/xls/scenariobuffer.hxx10
-rw-r--r--oox/inc/oox/xls/scenariocontext.hxx17
-rw-r--r--oox/inc/oox/xls/sharedformulabuffer.hxx5
-rw-r--r--oox/inc/oox/xls/sharedstringsbuffer.hxx2
-rw-r--r--oox/inc/oox/xls/sharedstringsfragment.hxx12
-rw-r--r--oox/inc/oox/xls/sheetdatacontext.hxx76
-rw-r--r--oox/inc/oox/xls/stylesbuffer.hxx126
-rw-r--r--oox/inc/oox/xls/stylesfragment.hxx47
-rw-r--r--oox/inc/oox/xls/tablebuffer.hxx24
-rw-r--r--oox/inc/oox/xls/tablefragment.hxx16
-rw-r--r--oox/inc/oox/xls/themebuffer.hxx1
-rw-r--r--oox/inc/oox/xls/unitconverter.hxx3
-rw-r--r--oox/inc/oox/xls/viewsettings.hxx17
-rw-r--r--oox/inc/oox/xls/webquerybuffer.hxx127
-rw-r--r--oox/inc/oox/xls/workbookfragment.hxx17
-rw-r--r--oox/inc/oox/xls/workbookhelper.hxx91
-rw-r--r--oox/inc/oox/xls/workbooksettings.hxx11
-rw-r--r--oox/inc/oox/xls/worksheetbuffer.hxx14
-rw-r--r--oox/inc/oox/xls/worksheetfragment.hxx90
-rw-r--r--oox/inc/oox/xls/worksheethelper.hxx42
-rw-r--r--oox/inc/oox/xls/worksheetsettings.hxx15
57 files changed, 1780 insertions, 1266 deletions
diff --git a/oox/inc/oox/xls/addressconverter.hxx b/oox/inc/oox/xls/addressconverter.hxx
index c11bd31bbf22..11b5e74ccd5c 100644
--- a/oox/inc/oox/xls/addressconverter.hxx
+++ b/oox/inc/oox/xls/addressconverter.hxx
@@ -69,7 +69,7 @@ struct BinAddress
inline void set( sal_Int32 nCol, sal_Int32 nRow ) { mnCol = nCol; mnRow = nRow; }
inline void set( const ::com::sun::star::table::CellAddress& rAddr ) { mnCol = rAddr.Column; mnRow = rAddr.Row; }
- void read( RecordInputStream& rStrm );
+ void read( SequenceInputStream& rStrm );
void read( BiffInputStream& rStrm, bool bCol16Bit = true, bool bRow32Bit = false );
void write( BiffOutputStream& rStrm, bool bCol16Bit = true, bool bRow32Bit = false ) const;
};
@@ -86,7 +86,7 @@ inline bool operator<( const BinAddress& rL, const BinAddress& rR )
return (rL.mnCol < rR.mnCol) || ((rL.mnCol == rR.mnCol) && (rL.mnRow < rR.mnRow));
}
-inline RecordInputStream& operator>>( RecordInputStream& rStrm, BinAddress& orPos )
+inline SequenceInputStream& operator>>( SequenceInputStream& rStrm, BinAddress& orPos )
{
orPos.read( rStrm );
return rStrm;
@@ -134,7 +134,7 @@ struct BinRange
inline sal_Int32 getRowCount() const { return maLast.mnRow - maFirst.mnRow + 1; }
bool contains( const BinAddress& rAddr ) const;
- void read( RecordInputStream& rStrm );
+ void read( SequenceInputStream& rStrm );
void read( BiffInputStream& rStrm, bool bCol16Bit = true, bool bRow32Bit = false );
void write( BiffOutputStream& rStrm, bool bCol16Bit = true, bool bRow32Bit = false ) const;
};
@@ -151,7 +151,7 @@ inline bool operator<( const BinRange& rL, const BinRange& rR )
return (rL.maFirst < rR.maFirst) || ((rL.maFirst == rR.maFirst) && (rL.maLast < rR.maLast));
}
-inline RecordInputStream& operator>>( RecordInputStream& rStrm, BinRange& orRange )
+inline SequenceInputStream& operator>>( SequenceInputStream& rStrm, BinRange& orRange )
{
orRange.read( rStrm );
return rStrm;
@@ -179,7 +179,7 @@ public:
BinRange getEnclosingRange() const;
- void read( RecordInputStream& rStrm );
+ void read( SequenceInputStream& rStrm );
void read( BiffInputStream& rStrm, bool bCol16Bit = true, bool bRow32Bit = false );
void write( BiffOutputStream& rStrm, bool bCol16Bit = true, bool bRow32Bit = false ) const;
void writeSubList( BiffOutputStream& rStrm,
@@ -188,7 +188,7 @@ public:
// ----------------------------------------------------------------------------
-inline RecordInputStream& operator>>( RecordInputStream& rStrm, BinRangeList& orRanges )
+inline SequenceInputStream& operator>>( SequenceInputStream& rStrm, BinRangeList& orRanges )
{
orRanges.read( rStrm );
return rStrm;
@@ -221,7 +221,7 @@ enum BiffTargetType
// ============================================================================
// ============================================================================
-/** Converter for cell addresses and cell ranges for OOX and BIFF filters.
+/** Converter for cell addresses and cell ranges for OOXML and BIFF filters.
*/
class AddressConverter : public WorkbookHelper
{
@@ -689,4 +689,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/autofilterbuffer.hxx b/oox/inc/oox/xls/autofilterbuffer.hxx
new file mode 100755
index 000000000000..ddf083c2ea98
--- /dev/null
+++ b/oox/inc/oox/xls/autofilterbuffer.hxx
@@ -0,0 +1,279 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_XLS_AUTOFILTERBUFFER_HXX
+#define OOX_XLS_AUTOFILTERBUFFER_HXX
+
+#include <com/sun/star/table/CellRangeAddress.hpp>
+#include "oox/helper/refvector.hxx"
+#include "oox/xls/workbookhelper.hxx"
+
+namespace com { namespace sun { namespace star {
+ namespace sheet { struct TableFilterField2; }
+ namespace sheet { class XDatabaseRange; }
+ namespace sheet { class XSheetFilterDescriptor2; }
+} } }
+
+namespace oox {
+namespace xls {
+
+// ============================================================================
+
+/** Contains UNO API filter settings for a column in a filtered range. */
+struct ApiFilterSettings
+{
+ typedef ::std::vector< ::com::sun::star::sheet::TableFilterField2 > FilterFieldVector;
+
+ FilterFieldVector maFilterFields; /// List of UNO API filter settings.
+ OptValue< bool > mobNeedsRegExp; /// If set, requires regular expressions to be enabled/disabled.
+
+ explicit ApiFilterSettings();
+
+ void appendField( bool bAnd, sal_Int32 nOperator, double fValue );
+ void appendField( bool bAnd, sal_Int32 nOperator, const ::rtl::OUString& rValue );
+};
+
+// ============================================================================
+
+/** Base class for specific filter settings for a column in a filtered range.
+ */
+class FilterSettingsBase : public WorkbookHelper
+{
+public:
+ explicit FilterSettingsBase( const WorkbookHelper& rHelper );
+
+ /** Derived classes import filter settings from the passed attribute list. */
+ virtual void importAttribs( sal_Int32 nElement, const AttributeList& rAttribs );
+ /** Derived classes import filter settings from the passed record. */
+ virtual void importRecord( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ /** Derived classes import filter settings from the FILTERCOLUMN record. */
+ virtual void importBiffRecord( BiffInputStream& rStrm, sal_uInt16 nFlags );
+
+ /** Derived classes return converted UNO API filter settings representing all filter settings. */
+ virtual ApiFilterSettings finalizeImport( sal_Int32 nMaxCount );
+};
+
+typedef ::boost::shared_ptr< FilterSettingsBase > FilterSettingsRef;
+
+// ============================================================================
+
+/** Settings for a discrete filter, specifying a list of values to be shown in
+ the filtered range.
+ */
+class DiscreteFilter : public FilterSettingsBase
+{
+public:
+ explicit DiscreteFilter( const WorkbookHelper& rHelper );
+
+ /** Imports filter settings from the filters and filter elements. */
+ virtual void importAttribs( sal_Int32 nElement, const AttributeList& rAttribs );
+ /** Imports filter settings from the FILTERS and FILTER records. */
+ virtual void importRecord( sal_Int32 nRecId, SequenceInputStream& rStrm );
+
+ /** Returns converted UNO API filter settings representing all filter settings. */
+ virtual ApiFilterSettings finalizeImport( sal_Int32 nMaxCount );
+
+private:
+ typedef ::std::vector< ::rtl::OUString > FilterValueVector;
+
+ FilterValueVector maValues;
+ sal_Int32 mnCalendarType;
+ bool mbShowBlank;
+};
+
+// ============================================================================
+
+/** Settings for a top-10 filter. */
+class Top10Filter : public FilterSettingsBase
+{
+public:
+ explicit Top10Filter( const WorkbookHelper& rHelper );
+
+ /** Imports filter settings from the filters and filter elements. */
+ virtual void importAttribs( sal_Int32 nElement, const AttributeList& rAttribs );
+ /** Imports filter settings from the FILTERS and FILTER records. */
+ virtual void importRecord( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ /** Imports filter settings from the FILTERCOLUMN record. */
+ virtual void importBiffRecord( BiffInputStream& rStrm, sal_uInt16 nFlags );
+
+ /** Returns converted UNO API filter settings representing all filter settings. */
+ virtual ApiFilterSettings finalizeImport( sal_Int32 nMaxCount );
+
+private:
+ double mfValue; /// Number of items or percentage.
+ bool mbTop; /// True = show top (greatest) items/percentage.
+ bool mbPercent; /// True = percentage, false = number of items.
+};
+
+// ============================================================================
+
+/** A filter criterion for a custom filter. */
+struct FilterCriterionModel
+{
+ ::com::sun::star::uno::Any maValue; /// Comparison operand.
+ sal_Int32 mnOperator; /// Comparison operator.
+ sal_uInt8 mnDataType; /// Operand data type (BIFF only).
+ sal_uInt8 mnStrLen; /// Length of string operand (BIFF5-BIFF8 only).
+
+ explicit FilterCriterionModel();
+
+ /** Sets the passed BIFF operator constant. */
+ void setBiffOperator( sal_uInt8 nOperator );
+
+ /** Imports the criterion model from the passed BIFF12 stream. */
+ void readBiffData( SequenceInputStream& rStrm );
+ /** Imports the initial criterion data from the passed BIFF5/BIFF8 stream. */
+ void readBiffData( BiffInputStream& rStrm );
+ /** Imports the trailing string data from the passed BIFF5/BIFF8 stream. */
+ void readString( BiffInputStream& rStrm, BiffType eBiff, rtl_TextEncoding eTextEnc );
+};
+
+// ----------------------------------------------------------------------------
+
+/** Settings for a custom filter, specifying one or two comparison operators
+ associated with some values.
+ */
+class CustomFilter : public FilterSettingsBase
+{
+public:
+ explicit CustomFilter( const WorkbookHelper& rHelper );
+
+ /** Imports filter settings from the filters and filter elements. */
+ virtual void importAttribs( sal_Int32 nElement, const AttributeList& rAttribs );
+ /** Imports filter settings from the FILTERS and FILTER records. */
+ virtual void importRecord( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ /** Imports filter settings from the FILTERCOLUMN record. */
+ virtual void importBiffRecord( BiffInputStream& rStrm, sal_uInt16 nFlags );
+
+ /** Returns converted UNO API filter settings representing all filter settings. */
+ virtual ApiFilterSettings finalizeImport( sal_Int32 nMaxCount );
+
+private:
+ /** Apeends the passed filter criteriom, if it contains valid settings. */
+ void appendCriterion( const FilterCriterionModel& rCriterion );
+
+private:
+ typedef ::std::vector< FilterCriterionModel > FilterCriterionVector;
+
+ FilterCriterionVector maCriteria;
+ bool mbAnd;
+};
+
+// ============================================================================
+
+/** A column in a filtered range. Contains an object with specific filter
+ settings for the cells in the column.
+ */
+class FilterColumn : public WorkbookHelper
+{
+public:
+ explicit FilterColumn( const WorkbookHelper& rHelper );
+
+ /** Imports auto filter column settings from the filterColumn element. */
+ void importFilterColumn( const AttributeList& rAttribs );
+ /** Imports auto filter column settings from the FILTERCOLUMN record. */
+ void importFilterColumn( SequenceInputStream& rStrm );
+ /** Imports auto filter column settings from the FILTERCOLUMN record. */
+ void importFilterColumn( BiffInputStream& rStrm );
+
+ /** Creates and returns the specified filter settings object. */
+ template< typename FilterSettingsType >
+ inline FilterSettingsBase& createFilterSettings()
+ { mxSettings.reset( new FilterSettingsType( *this ) ); return *mxSettings; }
+
+ /** Returns the index of the column in the filtered range this object is related to. */
+ inline sal_Int32 getColumnId() const { return mnColId; }
+
+ /** Returns converted UNO API filter settings representing all filter
+ settings of this column. */
+ ApiFilterSettings finalizeImport( sal_Int32 nMaxCount );
+
+private:
+ FilterSettingsRef mxSettings;
+ sal_Int32 mnColId;
+ bool mbHiddenButton;
+ bool mbShowButton;
+};
+
+// ============================================================================
+
+class AutoFilter : public WorkbookHelper
+{
+public:
+ explicit AutoFilter( const WorkbookHelper& rHelper );
+
+ /** Imports auto filter settings from the autoFilter element. */
+ void importAutoFilter( const AttributeList& rAttribs, sal_Int16 nSheet );
+ /** Imports auto filter settings from the AUTOFILTER record. */
+ void importAutoFilter( SequenceInputStream& rStrm, sal_Int16 nSheet );
+
+ /** Creates a new auto filter column and stores it internally. */
+ FilterColumn& createFilterColumn();
+
+ /** Applies the filter to the passed filter descriptor. */
+ void finalizeImport( const ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor2 >& rxFilterDesc );
+
+private:
+ typedef RefVector< FilterColumn > FilterColumnVector;
+
+ FilterColumnVector maFilterColumns;
+ ::com::sun::star::table::CellRangeAddress maRange;
+};
+
+// ============================================================================
+
+class AutoFilterBuffer : public WorkbookHelper
+{
+public:
+ explicit AutoFilterBuffer( const WorkbookHelper& rHelper );
+
+ /** Creates a new auto filter and stores it internally. */
+ AutoFilter& createAutoFilter();
+
+ /** Applies filter settings to a new database range object (used for sheet
+ autofilter or advanced filter as specified by built-in defined names). */
+ void finalizeImport( sal_Int16 nSheet );
+
+ /** Applies the filters to the passed database range object.
+ @return True = this buffer contains valid auto filter settings. */
+ bool finalizeImport( const ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDatabaseRange >& rxDatabaseRange );
+
+private:
+ /** Returns the auto filter object used to perform auto filtering. */
+ AutoFilter* getActiveAutoFilter();
+
+private:
+ typedef RefVector< AutoFilter > AutoFilterVector;
+ AutoFilterVector maAutoFilters;
+};
+
+// ============================================================================
+
+} // namespace xls
+} // namespace oox
+
+#endif
diff --git a/oox/inc/oox/xls/autofiltercontext.hxx b/oox/inc/oox/xls/autofiltercontext.hxx
index ccef6972e871..13508bbf5e63 100644
--- a/oox/inc/oox/xls/autofiltercontext.hxx
+++ b/oox/inc/oox/xls/autofiltercontext.hxx
@@ -28,126 +28,82 @@
#ifndef OOX_XLS_AUTOFILTERCONTEXT_HXX
#define OOX_XLS_AUTOFILTERCONTEXT_HXX
-#define USE_SC_MULTI_STRING_FILTER_PATCH 0
-
#include "oox/xls/excelhandlers.hxx"
-#include <com/sun/star/table/CellRangeAddress.hpp>
-
-#if USE_SC_MULTI_STRING_FILTER_PATCH
-#include <com/sun/star/sheet/TableFilterFieldBase.hpp>
-#else
-#include <com/sun/star/sheet/TableFilterField.hpp>
-#endif
-
-#include <boost/shared_ptr.hpp>
-#include <list>
-
-namespace com { namespace sun { namespace star { namespace sheet {
-#if USE_SC_MULTI_STRING_FILTER_PATCH
- struct TableFilterFieldBase;
-#else
- struct TableFilterField;
-#endif
- struct TableFilterFieldMultiString;
-}}}}
namespace oox {
namespace xls {
+class AutoFilter;
+class FilterColumn;
+class FilterSettingsBase;
+
// ============================================================================
-struct FilterFieldItem
+class FilterSettingsContext : public WorksheetContextBase
{
-#if USE_SC_MULTI_STRING_FILTER_PATCH
- typedef ::boost::shared_ptr< ::com::sun::star::sheet::TableFilterFieldBase > TableFilterFieldRef;
-#else
- typedef ::boost::shared_ptr< ::com::sun::star::sheet::TableFilterField > TableFilterFieldRef;
-#endif
+public:
+ explicit FilterSettingsContext( WorksheetContextBase& rParent, FilterSettingsBase& rFilterSettings );
- enum Type { NORMAL, MULTI_STRING };
+protected:
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
+ virtual void onStartElement( const AttributeList& rAttribs );
- TableFilterFieldRef mpField;
- Type meType;
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ virtual void onStartRecord( SequenceInputStream& rStrm );
- FilterFieldItem();
- FilterFieldItem(Type eType);
+private:
+ FilterSettingsBase& mrFilterSettings;
};
// ============================================================================
-class OoxAutoFilterContext : public OoxWorksheetContextBase
+class FilterColumnContext : public WorksheetContextBase
{
public:
- explicit OoxAutoFilterContext( OoxWorksheetFragmentBase& rFragment );
+ explicit FilterColumnContext( WorksheetContextBase& rParent, FilterColumn& rFilterColumn );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
virtual void onStartElement( const AttributeList& rAttribs );
- virtual void onEndElement( const ::rtl::OUString& rChars );
-
-private:
- /** Initializes data members to prepare for autofilter parsing. Call this
- method when a new autofilter context starts. */
- void initialize();
-
- /** Commits the imported autofilter data to Calc. */
- void setAutoFilter();
-
- /** Check if the shown blank bit is on, if so, add show blank filter to the
- list. */
- void maybeShowBlank();
-
- /** Packs the collected filter names into a single regex string. */
- void setFilterNames();
- void importAutoFilter( const AttributeList& rAttribs );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ virtual void onStartRecord( SequenceInputStream& rStrm );
- void importFilterColumn( const AttributeList& rAttribs );
-
- void importTop10( const AttributeList& rAttribs );
-
- /** Be sure to check for its 'and' attribute when there are two
- customFilter's. If the attribute is not given, assume OR. */
- void importCustomFilters( const AttributeList& rAttribs );
+private:
+ FilterColumn& mrFilterColumn;
+};
- /** Imports custumFilter element. Note that the standard specifies there
- can be at most two custom filters specified, but no more than two. When
- there are two custom filters, then their relationship (AND or OR) must
- be specified by the parent element <customFilters>. */
- void importCustomFilter( const AttributeList& rAttribs );
+// ============================================================================
- void importFilters( const AttributeList& rAttribs );
+class AutoFilterContext : public WorksheetContextBase
+{
+public:
+ explicit AutoFilterContext( WorksheetFragmentBase& rFragment, AutoFilter& rAutoFilter );
- void importFilter( const AttributeList& rAttribs );
+protected:
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
+ virtual void onStartElement( const AttributeList& rAttribs );
- void importDynamicFilter( const AttributeList& rAttribs );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ virtual void onStartRecord( SequenceInputStream& rStrm );
private:
- typedef ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > XCellRef;
-
- ::std::list< FilterFieldItem > maFields;
-
- ::std::list< ::rtl::OUString > maFilterNames;
- ::com::sun::star::table::CellRangeAddress maAutoFilterRange;
- sal_Int32 mnCurColID;
+ AutoFilter& mrAutoFilter;
+};
- /** If this is false (i.e. the given cell range address is not valid), then
- don't do anything. */
- bool mbValidAddress:1;
+// ============================================================================
- /** We use regex to compensate for Calc's lack of filtering by individual
- names (i.e. <filter> tag). */
- bool mbUseRegex:1;
+class BiffAutoFilterContext : public BiffWorksheetContextBase
+{
+public:
+ explicit BiffAutoFilterContext( const WorksheetHelper& rHelper, AutoFilter& rAutoFilter );
- /** The <filters> tag may have a 'blank' attribute when the blank values
- need to be shown. This flag stores that information. */
- bool mbShowBlank:1;
+protected:
+ /** Imports all records related to the current auto filter. */
+ virtual void importRecord( BiffInputStream& rStrm );
- /** true if FilterConnection_AND, or false if FilterConnection_OR. This
- flag is used to store the relationship of paired customFilter's. */
- bool mbConnectionAnd:1;
+private:
+ AutoFilter& mrAutoFilter;
};
// ============================================================================
diff --git a/oox/inc/oox/xls/biffcodec.hxx b/oox/inc/oox/xls/biffcodec.hxx
index c1c040de095b..9b9157c7e494 100644
--- a/oox/inc/oox/xls/biffcodec.hxx
+++ b/oox/inc/oox/xls/biffcodec.hxx
@@ -185,4 +185,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/biffdetector.hxx b/oox/inc/oox/xls/biffdetector.hxx
index 9ce5d19af3fe..df372c76d7cc 100644
--- a/oox/inc/oox/xls/biffdetector.hxx
+++ b/oox/inc/oox/xls/biffdetector.hxx
@@ -28,15 +28,15 @@
#ifndef OOX_XLS_BIFFDETECTOR_HXX
#define OOX_XLS_BIFFDETECTOR_HXX
-#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase2.hxx>
#include "oox/helper/storagebase.hxx"
#include "oox/xls/biffhelper.hxx"
namespace com { namespace sun { namespace star {
- namespace lang { class XMultiServiceFactory; }
namespace beans { struct PropertyValue; }
+ namespace uno { class XComponentContext; }
} } }
namespace oox { class BinaryInputStream; }
@@ -53,7 +53,8 @@ class BiffDetector : public ::cppu::WeakImplHelper2<
{
public:
explicit BiffDetector(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxFactory );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext )
+ throw( ::com::sun::star::uno::RuntimeException );
virtual ~BiffDetector();
@@ -63,7 +64,7 @@ public:
/** Detects the BIFF version and workbook stream name of the passed storage. */
static BiffType detectStorageBiffVersion(
::rtl::OUString& orWorkbookStreamName,
- StorageRef xStorage );
+ const StorageRef& rxStorage );
// com.sun.star.lang.XServiceInfo interface -------------------------------
@@ -84,8 +85,8 @@ public:
throw( ::com::sun::star::uno::RuntimeException );
private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
- mxFactory;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ mxContext;
};
// ============================================================================
@@ -94,4 +95,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/biffhelper.hxx b/oox/inc/oox/xls/biffhelper.hxx
index ce43e44fb613..9c0a57a83c04 100644
--- a/oox/inc/oox/xls/biffhelper.hxx
+++ b/oox/inc/oox/xls/biffhelper.hxx
@@ -30,217 +30,229 @@
#include "oox/helper/binarystreambase.hxx"
+namespace oox { class SequenceInputStream; }
+
namespace oox {
namespace xls {
class BiffInputStream;
-// OOBIN record identifiers ===================================================
-
-const sal_Int32 OOBIN_ID_ARRAY = 0x01AA;
-const sal_Int32 OOBIN_ID_AUTOFILTER = 0x00A1;
-const sal_Int32 OOBIN_ID_AUTOSORTSCOPE = 0x01CB;
-const sal_Int32 OOBIN_ID_BINARYINDEXBLOCK = 0x002A;
-const sal_Int32 OOBIN_ID_BINARYINDEXROWS = 0x0028;
-const sal_Int32 OOBIN_ID_BOOKVIEWS = 0x0087;
-const sal_Int32 OOBIN_ID_BORDER = 0x002E;
-const sal_Int32 OOBIN_ID_BORDERS = 0x0265;
-const sal_Int32 OOBIN_ID_BRK = 0x018C;
-const sal_Int32 OOBIN_ID_CALCPR = 0x009D;
-const sal_Int32 OOBIN_ID_CELL_BLANK = 0x0001;
-const sal_Int32 OOBIN_ID_CELL_BOOL = 0x0004;
-const sal_Int32 OOBIN_ID_CELL_DOUBLE = 0x0005;
-const sal_Int32 OOBIN_ID_CELL_ERROR = 0x0003;
-const sal_Int32 OOBIN_ID_CELL_RK = 0x0002;
-const sal_Int32 OOBIN_ID_CELL_RSTRING = 0x003E;
-const sal_Int32 OOBIN_ID_CELL_SI = 0x0007;
-const sal_Int32 OOBIN_ID_CELL_STRING = 0x0006;
-const sal_Int32 OOBIN_ID_CELLSTYLE = 0x0030;
-const sal_Int32 OOBIN_ID_CELLSTYLES = 0x026B;
-const sal_Int32 OOBIN_ID_CELLSTYLEXFS = 0x0272;
-const sal_Int32 OOBIN_ID_CELLXFS = 0x0269;
-const sal_Int32 OOBIN_ID_CFCOLOR = 0x0234;
-const sal_Int32 OOBIN_ID_CFRULE = 0x01CF;
-const sal_Int32 OOBIN_ID_CHARTPAGESETUP = 0x028C;
-const sal_Int32 OOBIN_ID_CHARTPROTECTION = 0x029D;
-const sal_Int32 OOBIN_ID_CHARTSHEETPR = 0x028B;
-const sal_Int32 OOBIN_ID_CHARTSHEETVIEW = 0x008D;
-const sal_Int32 OOBIN_ID_CHARTSHEETVIEWS = 0x008B;
-const sal_Int32 OOBIN_ID_COL = 0x003C;
-const sal_Int32 OOBIN_ID_COLBREAKS = 0x018A;
-const sal_Int32 OOBIN_ID_COLOR = 0x023C;
-const sal_Int32 OOBIN_ID_COLORS = 0x01D9;
-const sal_Int32 OOBIN_ID_COLORSCALE = 0x01D5;
-const sal_Int32 OOBIN_ID_COLS = 0x0186;
-const sal_Int32 OOBIN_ID_COMMENT = 0x027B;
-const sal_Int32 OOBIN_ID_COMMENTAUTHOR = 0x0278;
-const sal_Int32 OOBIN_ID_COMMENTAUTHORS = 0x0276;
-const sal_Int32 OOBIN_ID_COMMENTLIST = 0x0279;
-const sal_Int32 OOBIN_ID_COMMENTS = 0x0274;
-const sal_Int32 OOBIN_ID_COMMENTTEXT = 0x027D;
-const sal_Int32 OOBIN_ID_CONDFORMATTING = 0x01CD;
-const sal_Int32 OOBIN_ID_CONTROL = 0x0284;
-const sal_Int32 OOBIN_ID_CONTROLS = 0x0283;
-const sal_Int32 OOBIN_ID_CUSTOMCHARTVIEW = 0x028F;
-const sal_Int32 OOBIN_ID_CUSTOMCHARTVIEWS = 0x028D;
-const sal_Int32 OOBIN_ID_CUSTOMSHEETVIEW = 0x01A7;
-const sal_Int32 OOBIN_ID_CUSTOMSHEETVIEWS = 0x01A6;
-const sal_Int32 OOBIN_ID_CUSTOMWORKBOOKVIEW = 0x018D;
-const sal_Int32 OOBIN_ID_DATABAR = 0x01D3;
-const sal_Int32 OOBIN_ID_DATATABLE = 0x01AC;
-const sal_Int32 OOBIN_ID_DATAVALIDATION = 0x0040;
-const sal_Int32 OOBIN_ID_DATAVALIDATIONS = 0x023D;
-const sal_Int32 OOBIN_ID_DDEITEMVALUES = 0x0242;
-const sal_Int32 OOBIN_ID_DDEITEM_BOOL = 0x0248;
-const sal_Int32 OOBIN_ID_DDEITEM_DOUBLE = 0x0244;
-const sal_Int32 OOBIN_ID_DDEITEM_ERROR = 0x0245;
-const sal_Int32 OOBIN_ID_DDEITEM_STRING = 0x0246;
-const sal_Int32 OOBIN_ID_DEFINEDNAME = 0x0027;
-const sal_Int32 OOBIN_ID_DIMENSION = 0x0094;
-const sal_Int32 OOBIN_ID_DRAWING = 0x0226;
-const sal_Int32 OOBIN_ID_DXF = 0x01FB;
-const sal_Int32 OOBIN_ID_DXFS = 0x01F9;
-const sal_Int32 OOBIN_ID_EXTCELL_BLANK = 0x016F;
-const sal_Int32 OOBIN_ID_EXTCELL_BOOL = 0x0171;
-const sal_Int32 OOBIN_ID_EXTCELL_DOUBLE = 0x0170;
-const sal_Int32 OOBIN_ID_EXTCELL_ERROR = 0x0172;
-const sal_Int32 OOBIN_ID_EXTCELL_STRING = 0x0173;
-const sal_Int32 OOBIN_ID_EXTERNALADDIN = 0x029B;
-const sal_Int32 OOBIN_ID_EXTERNALBOOK = 0x0168;
-const sal_Int32 OOBIN_ID_EXTERNALNAME = 0x0241;
-const sal_Int32 OOBIN_ID_EXTERNALREF = 0x0163;
-const sal_Int32 OOBIN_ID_EXTERNALREFS = 0x0161;
-const sal_Int32 OOBIN_ID_EXTERNALSELF = 0x0165;
-const sal_Int32 OOBIN_ID_EXTERNALSAME = 0x0166;
-const sal_Int32 OOBIN_ID_EXTERNALSHEETS = 0x016A;
-const sal_Int32 OOBIN_ID_EXTROW = 0x016E;
-const sal_Int32 OOBIN_ID_EXTSHEETDATA = 0x016B;
-const sal_Int32 OOBIN_ID_EXTERNALNAMEFLAGS = 0x024A;
-const sal_Int32 OOBIN_ID_EXTSHEETNAMES = 0x0167;
-const sal_Int32 OOBIN_ID_FILESHARING = 0x0224;
-const sal_Int32 OOBIN_ID_FILEVERSION = 0x0080;
-const sal_Int32 OOBIN_ID_FILL = 0x002D;
-const sal_Int32 OOBIN_ID_FILLS = 0x025B;
-const sal_Int32 OOBIN_ID_FILTERCOLUMN = 0x00A3;
-const sal_Int32 OOBIN_ID_FONT = 0x002B;
-const sal_Int32 OOBIN_ID_FONTS = 0x0263;
-const sal_Int32 OOBIN_ID_FORMULA_STRING = 0x0008;
-const sal_Int32 OOBIN_ID_FORMULA_DOUBLE = 0x0009;
-const sal_Int32 OOBIN_ID_FORMULA_BOOL = 0x000A;
-const sal_Int32 OOBIN_ID_FORMULA_ERROR = 0x000B;
-const sal_Int32 OOBIN_ID_FUNCTIONGROUP = 0x0299;
-const sal_Int32 OOBIN_ID_FUNCTIONGROUPS = 0x0298;
-const sal_Int32 OOBIN_ID_HEADERFOOTER = 0x01DF;
-const sal_Int32 OOBIN_ID_HYPERLINK = 0x01EE;
-const sal_Int32 OOBIN_ID_ICONSET = 0x01D1;
-const sal_Int32 OOBIN_ID_INDEXEDCOLORS = 0x0235;
-const sal_Int32 OOBIN_ID_INPUTCELLS = 0x01F8;
-const sal_Int32 OOBIN_ID_LEGACYDRAWING = 0x0227;
-const sal_Int32 OOBIN_ID_MERGECELL = 0x00B0;
-const sal_Int32 OOBIN_ID_MERGECELLS = 0x00B1;
-const sal_Int32 OOBIN_ID_MRUCOLORS = 0x0239;
-const sal_Int32 OOBIN_ID_MULTCELL_BLANK = 0x000C;
-const sal_Int32 OOBIN_ID_MULTCELL_BOOL = 0x000F;
-const sal_Int32 OOBIN_ID_MULTCELL_DOUBLE = 0x0010;
-const sal_Int32 OOBIN_ID_MULTCELL_ERROR = 0x000E;
-const sal_Int32 OOBIN_ID_MULTCELL_RK = 0x000D;
-const sal_Int32 OOBIN_ID_MULTCELL_RSTRING = 0x003D;
-const sal_Int32 OOBIN_ID_MULTCELL_SI = 0x0012;
-const sal_Int32 OOBIN_ID_MULTCELL_STRING = 0x0011;
-const sal_Int32 OOBIN_ID_NUMFMT = 0x002C;
-const sal_Int32 OOBIN_ID_NUMFMTS = 0x0267;
-const sal_Int32 OOBIN_ID_OLEOBJECT = 0x027F;
-const sal_Int32 OOBIN_ID_OLEOBJECTS = 0x027E;
-const sal_Int32 OOBIN_ID_OLESIZE = 0x0225;
-const sal_Int32 OOBIN_ID_PAGEMARGINS = 0x01DC;
-const sal_Int32 OOBIN_ID_PAGESETUP = 0x01DE;
-const sal_Int32 OOBIN_ID_PANE = 0x0097;
-const sal_Int32 OOBIN_ID_PCDEFINITION = 0x00B3;
-const sal_Int32 OOBIN_ID_PCDFDISCRETEPR = 0x00E1;
-const sal_Int32 OOBIN_ID_PCDFGROUPITEMS = 0x00DD;
-const sal_Int32 OOBIN_ID_PCDFIELD = 0x00B7;
-const sal_Int32 OOBIN_ID_PCDFIELDGROUP = 0x00DB;
-const sal_Int32 OOBIN_ID_PCDFIELDS = 0x00B5;
-const sal_Int32 OOBIN_ID_PCDFRANGEPR = 0x00DF;
-const sal_Int32 OOBIN_ID_PCDFSHAREDITEMS = 0x00BD;
-const sal_Int32 OOBIN_ID_PCDSHEETSOURCE = 0x00BB;
-const sal_Int32 OOBIN_ID_PCDSOURCE = 0x00B9;
-const sal_Int32 OOBIN_ID_PCITEM_ARRAY = 0x00BF;
-const sal_Int32 OOBIN_ID_PCITEM_BOOL = 0x0016;
-const sal_Int32 OOBIN_ID_PCITEM_DATE = 0x0019;
-const sal_Int32 OOBIN_ID_PCITEM_DOUBLE = 0x0015;
-const sal_Int32 OOBIN_ID_PCITEM_ERROR = 0x0017;
-const sal_Int32 OOBIN_ID_PCITEM_INDEX = 0x001A;
-const sal_Int32 OOBIN_ID_PCITEM_MISSING = 0x0014;
-const sal_Int32 OOBIN_ID_PCITEM_STRING = 0x0018;
-const sal_Int32 OOBIN_ID_PCITEMA_BOOL = 0x001D;
-const sal_Int32 OOBIN_ID_PCITEMA_DATE = 0x0020;
-const sal_Int32 OOBIN_ID_PCITEMA_DOUBLE = 0x001C;
-const sal_Int32 OOBIN_ID_PCITEMA_ERROR = 0x001E;
-const sal_Int32 OOBIN_ID_PCITEMA_MISSING = 0x001B;
-const sal_Int32 OOBIN_ID_PCITEMA_STRING = 0x001F;
-const sal_Int32 OOBIN_ID_PCRECORD = 0x0021;
-const sal_Int32 OOBIN_ID_PCRECORDDT = 0x0022;
-const sal_Int32 OOBIN_ID_PCRECORDS = 0x00C1;
-const sal_Int32 OOBIN_ID_PHONETICPR = 0x0219;
-const sal_Int32 OOBIN_ID_PICTURE = 0x0232;
-const sal_Int32 OOBIN_ID_PIVOTAREA = 0x00F7;
-const sal_Int32 OOBIN_ID_PIVOTCACHE = 0x0182;
-const sal_Int32 OOBIN_ID_PIVOTCACHES = 0x0180;
-const sal_Int32 OOBIN_ID_PRINTOPTIONS = 0x01DD;
-const sal_Int32 OOBIN_ID_PTCOLFIELDS = 0x0137;
-const sal_Int32 OOBIN_ID_PTDATAFIELD = 0x0125;
-const sal_Int32 OOBIN_ID_PTDATAFIELDS = 0x0127;
-const sal_Int32 OOBIN_ID_PTDEFINITION = 0x0118;
-const sal_Int32 OOBIN_ID_PTFIELD = 0x011D;
-const sal_Int32 OOBIN_ID_PTFIELDS = 0x011F;
-const sal_Int32 OOBIN_ID_PTFILTER = 0x0259;
-const sal_Int32 OOBIN_ID_PTFILTERS = 0x0257;
-const sal_Int32 OOBIN_ID_PTFITEM = 0x011A;
-const sal_Int32 OOBIN_ID_PTFITEMS = 0x011B;
-const sal_Int32 OOBIN_ID_PTLOCATION = 0x013A;
-const sal_Int32 OOBIN_ID_PTPAGEFIELD = 0x0121;
-const sal_Int32 OOBIN_ID_PTPAGEFIELDS = 0x0123;
-const sal_Int32 OOBIN_ID_PTREFERENCE = 0x00FB;
-const sal_Int32 OOBIN_ID_PTREFERENCEITEM = 0x017E;
-const sal_Int32 OOBIN_ID_PTREFERENCES = 0x00F9;
-const sal_Int32 OOBIN_ID_PTROWFIELDS = 0x0135;
-const sal_Int32 OOBIN_ID_RGBCOLOR = 0x01DB;
-const sal_Int32 OOBIN_ID_ROW = 0x0000;
-const sal_Int32 OOBIN_ID_ROWBREAKS = 0x0188;
-const sal_Int32 OOBIN_ID_SCENARIO = 0x01F6;
-const sal_Int32 OOBIN_ID_SCENARIOS = 0x01F4;
-const sal_Int32 OOBIN_ID_SELECTION = 0x0098;
-const sal_Int32 OOBIN_ID_SHAREDFMLA = 0x01AB;
-const sal_Int32 OOBIN_ID_SHEET = 0x009C;
-const sal_Int32 OOBIN_ID_SHEETDATA = 0x0091;
-const sal_Int32 OOBIN_ID_SHEETFORMATPR = 0x01E5;
-const sal_Int32 OOBIN_ID_SHEETPR = 0x0093;
-const sal_Int32 OOBIN_ID_SHEETPROTECTION = 0x0217;
-const sal_Int32 OOBIN_ID_SHEETS = 0x008F;
-const sal_Int32 OOBIN_ID_SHEETVIEW = 0x0089;
-const sal_Int32 OOBIN_ID_SHEETVIEWS = 0x0085;
-const sal_Int32 OOBIN_ID_SI = 0x0013;
-const sal_Int32 OOBIN_ID_SST = 0x009F;
-const sal_Int32 OOBIN_ID_STYLESHEET = 0x0116;
-const sal_Int32 OOBIN_ID_TABLE = 0x0157;
-const sal_Int32 OOBIN_ID_TABLEPART = 0x0295;
-const sal_Int32 OOBIN_ID_TABLEPARTS = 0x0294;
-const sal_Int32 OOBIN_ID_TABLESTYLEINFO = 0x0201;
-const sal_Int32 OOBIN_ID_TABLESTYLES = 0x01FC;
-const sal_Int32 OOBIN_ID_TOP10FILTER = 0x00AA;
-const sal_Int32 OOBIN_ID_VOLTYPE = 0x0204;
-const sal_Int32 OOBIN_ID_VOLTYPEMAIN = 0x0206;
-const sal_Int32 OOBIN_ID_VOLTYPES = 0x0202;
-const sal_Int32 OOBIN_ID_VOLTYPESTP = 0x020A;
-const sal_Int32 OOBIN_ID_VOLTYPETR = 0x020B;
-const sal_Int32 OOBIN_ID_WORKBOOK = 0x0083;
-const sal_Int32 OOBIN_ID_WORKBOOKPR = 0x0099;
-const sal_Int32 OOBIN_ID_WORKBOOKVIEW = 0x009E;
-const sal_Int32 OOBIN_ID_WORKSHEET = 0x0081;
-const sal_Int32 OOBIN_ID_XF = 0x002F;
+// BIFF12 record identifiers ==================================================
-// ============================================================================
+const sal_Int32 BIFF12_ID_ARRAY = 0x01AA;
+const sal_Int32 BIFF12_ID_AUTOFILTER = 0x00A1;
+const sal_Int32 BIFF12_ID_AUTOSORTSCOPE = 0x01CB;
+const sal_Int32 BIFF12_ID_BINARYINDEXBLOCK = 0x002A;
+const sal_Int32 BIFF12_ID_BINARYINDEXROWS = 0x0028;
+const sal_Int32 BIFF12_ID_BOOKVIEWS = 0x0087;
+const sal_Int32 BIFF12_ID_BORDER = 0x002E;
+const sal_Int32 BIFF12_ID_BORDERS = 0x0265;
+const sal_Int32 BIFF12_ID_BRK = 0x018C;
+const sal_Int32 BIFF12_ID_CALCPR = 0x009D;
+const sal_Int32 BIFF12_ID_CELL_BLANK = 0x0001;
+const sal_Int32 BIFF12_ID_CELL_BOOL = 0x0004;
+const sal_Int32 BIFF12_ID_CELL_DOUBLE = 0x0005;
+const sal_Int32 BIFF12_ID_CELL_ERROR = 0x0003;
+const sal_Int32 BIFF12_ID_CELL_RK = 0x0002;
+const sal_Int32 BIFF12_ID_CELL_RSTRING = 0x003E;
+const sal_Int32 BIFF12_ID_CELL_SI = 0x0007;
+const sal_Int32 BIFF12_ID_CELL_STRING = 0x0006;
+const sal_Int32 BIFF12_ID_CELLSTYLE = 0x0030;
+const sal_Int32 BIFF12_ID_CELLSTYLES = 0x026B;
+const sal_Int32 BIFF12_ID_CELLSTYLEXFS = 0x0272;
+const sal_Int32 BIFF12_ID_CELLXFS = 0x0269;
+const sal_Int32 BIFF12_ID_CFCOLOR = 0x0234;
+const sal_Int32 BIFF12_ID_CFRULE = 0x01CF;
+const sal_Int32 BIFF12_ID_CHARTPAGESETUP = 0x028C;
+const sal_Int32 BIFF12_ID_CHARTPROTECTION = 0x029D;
+const sal_Int32 BIFF12_ID_CHARTSHEETPR = 0x028B;
+const sal_Int32 BIFF12_ID_CHARTSHEETVIEW = 0x008D;
+const sal_Int32 BIFF12_ID_CHARTSHEETVIEWS = 0x008B;
+const sal_Int32 BIFF12_ID_COL = 0x003C;
+const sal_Int32 BIFF12_ID_COLBREAKS = 0x018A;
+const sal_Int32 BIFF12_ID_COLOR = 0x023C;
+const sal_Int32 BIFF12_ID_COLORS = 0x01D9;
+const sal_Int32 BIFF12_ID_COLORSCALE = 0x01D5;
+const sal_Int32 BIFF12_ID_COLS = 0x0186;
+const sal_Int32 BIFF12_ID_COMMENT = 0x027B;
+const sal_Int32 BIFF12_ID_COMMENTAUTHOR = 0x0278;
+const sal_Int32 BIFF12_ID_COMMENTAUTHORS = 0x0276;
+const sal_Int32 BIFF12_ID_COMMENTLIST = 0x0279;
+const sal_Int32 BIFF12_ID_COMMENTS = 0x0274;
+const sal_Int32 BIFF12_ID_COMMENTTEXT = 0x027D;
+const sal_Int32 BIFF12_ID_CONDFORMATTING = 0x01CD;
+const sal_Int32 BIFF12_ID_CONNECTION = 0x00C9;
+const sal_Int32 BIFF12_ID_CONNECTIONS = 0x01AD;
+const sal_Int32 BIFF12_ID_CONTROL = 0x0284;
+const sal_Int32 BIFF12_ID_CONTROLS = 0x0283;
+const sal_Int32 BIFF12_ID_CUSTOMCHARTVIEW = 0x028F;
+const sal_Int32 BIFF12_ID_CUSTOMCHARTVIEWS = 0x028D;
+const sal_Int32 BIFF12_ID_CUSTOMFILTER = 0x00AE;
+const sal_Int32 BIFF12_ID_CUSTOMFILTERS = 0x00AC;
+const sal_Int32 BIFF12_ID_CUSTOMSHEETVIEW = 0x01A7;
+const sal_Int32 BIFF12_ID_CUSTOMSHEETVIEWS = 0x01A6;
+const sal_Int32 BIFF12_ID_CUSTOMWORKBOOKVIEW= 0x018D;
+const sal_Int32 BIFF12_ID_DATABAR = 0x01D3;
+const sal_Int32 BIFF12_ID_DATATABLE = 0x01AC;
+const sal_Int32 BIFF12_ID_DATAVALIDATION = 0x0040;
+const sal_Int32 BIFF12_ID_DATAVALIDATIONS = 0x023D;
+const sal_Int32 BIFF12_ID_DDEITEMVALUES = 0x0242;
+const sal_Int32 BIFF12_ID_DDEITEM_BOOL = 0x0248;
+const sal_Int32 BIFF12_ID_DDEITEM_DOUBLE = 0x0244;
+const sal_Int32 BIFF12_ID_DDEITEM_ERROR = 0x0245;
+const sal_Int32 BIFF12_ID_DDEITEM_STRING = 0x0246;
+const sal_Int32 BIFF12_ID_DEFINEDNAME = 0x0027;
+const sal_Int32 BIFF12_ID_DIMENSION = 0x0094;
+const sal_Int32 BIFF12_ID_DISCRETEFILTER = 0x00A7;
+const sal_Int32 BIFF12_ID_DISCRETEFILTERS = 0x00A5;
+const sal_Int32 BIFF12_ID_DRAWING = 0x0226;
+const sal_Int32 BIFF12_ID_DXF = 0x01FB;
+const sal_Int32 BIFF12_ID_DXFS = 0x01F9;
+const sal_Int32 BIFF12_ID_EXTCELL_BLANK = 0x016F;
+const sal_Int32 BIFF12_ID_EXTCELL_BOOL = 0x0171;
+const sal_Int32 BIFF12_ID_EXTCELL_DOUBLE = 0x0170;
+const sal_Int32 BIFF12_ID_EXTCELL_ERROR = 0x0172;
+const sal_Int32 BIFF12_ID_EXTCELL_STRING = 0x0173;
+const sal_Int32 BIFF12_ID_EXTERNALADDIN = 0x029B;
+const sal_Int32 BIFF12_ID_EXTERNALBOOK = 0x0168;
+const sal_Int32 BIFF12_ID_EXTERNALNAME = 0x0241;
+const sal_Int32 BIFF12_ID_EXTERNALREF = 0x0163;
+const sal_Int32 BIFF12_ID_EXTERNALREFS = 0x0161;
+const sal_Int32 BIFF12_ID_EXTERNALSELF = 0x0165;
+const sal_Int32 BIFF12_ID_EXTERNALSAME = 0x0166;
+const sal_Int32 BIFF12_ID_EXTERNALSHEETS = 0x016A;
+const sal_Int32 BIFF12_ID_EXTROW = 0x016E;
+const sal_Int32 BIFF12_ID_EXTSHEETDATA = 0x016B;
+const sal_Int32 BIFF12_ID_EXTERNALNAMEFLAGS = 0x024A;
+const sal_Int32 BIFF12_ID_EXTSHEETNAMES = 0x0167;
+const sal_Int32 BIFF12_ID_FILESHARING = 0x0224;
+const sal_Int32 BIFF12_ID_FILEVERSION = 0x0080;
+const sal_Int32 BIFF12_ID_FILL = 0x002D;
+const sal_Int32 BIFF12_ID_FILLS = 0x025B;
+const sal_Int32 BIFF12_ID_FILTERCOLUMN = 0x00A3;
+const sal_Int32 BIFF12_ID_FONT = 0x002B;
+const sal_Int32 BIFF12_ID_FONTS = 0x0263;
+const sal_Int32 BIFF12_ID_FORMULA_STRING = 0x0008;
+const sal_Int32 BIFF12_ID_FORMULA_DOUBLE = 0x0009;
+const sal_Int32 BIFF12_ID_FORMULA_BOOL = 0x000A;
+const sal_Int32 BIFF12_ID_FORMULA_ERROR = 0x000B;
+const sal_Int32 BIFF12_ID_FUNCTIONGROUP = 0x0299;
+const sal_Int32 BIFF12_ID_FUNCTIONGROUPS = 0x0298;
+const sal_Int32 BIFF12_ID_HEADERFOOTER = 0x01DF;
+const sal_Int32 BIFF12_ID_HYPERLINK = 0x01EE;
+const sal_Int32 BIFF12_ID_ICONSET = 0x01D1;
+const sal_Int32 BIFF12_ID_INDEXEDCOLORS = 0x0235;
+const sal_Int32 BIFF12_ID_INPUTCELLS = 0x01F8;
+const sal_Int32 BIFF12_ID_LEGACYDRAWING = 0x0227;
+const sal_Int32 BIFF12_ID_MERGECELL = 0x00B0;
+const sal_Int32 BIFF12_ID_MERGECELLS = 0x00B1;
+const sal_Int32 BIFF12_ID_MRUCOLORS = 0x0239;
+const sal_Int32 BIFF12_ID_MULTCELL_BLANK = 0x000C;
+const sal_Int32 BIFF12_ID_MULTCELL_BOOL = 0x000F;
+const sal_Int32 BIFF12_ID_MULTCELL_DOUBLE = 0x0010;
+const sal_Int32 BIFF12_ID_MULTCELL_ERROR = 0x000E;
+const sal_Int32 BIFF12_ID_MULTCELL_RK = 0x000D;
+const sal_Int32 BIFF12_ID_MULTCELL_RSTRING = 0x003D;
+const sal_Int32 BIFF12_ID_MULTCELL_SI = 0x0012;
+const sal_Int32 BIFF12_ID_MULTCELL_STRING = 0x0011;
+const sal_Int32 BIFF12_ID_NUMFMT = 0x002C;
+const sal_Int32 BIFF12_ID_NUMFMTS = 0x0267;
+const sal_Int32 BIFF12_ID_OLEOBJECT = 0x027F;
+const sal_Int32 BIFF12_ID_OLEOBJECTS = 0x027E;
+const sal_Int32 BIFF12_ID_OLESIZE = 0x0225;
+const sal_Int32 BIFF12_ID_PAGEMARGINS = 0x01DC;
+const sal_Int32 BIFF12_ID_PAGESETUP = 0x01DE;
+const sal_Int32 BIFF12_ID_PANE = 0x0097;
+const sal_Int32 BIFF12_ID_PCDEFINITION = 0x00B3;
+const sal_Int32 BIFF12_ID_PCDFDISCRETEPR = 0x00E1;
+const sal_Int32 BIFF12_ID_PCDFGROUPITEMS = 0x00DD;
+const sal_Int32 BIFF12_ID_PCDFIELD = 0x00B7;
+const sal_Int32 BIFF12_ID_PCDFIELDGROUP = 0x00DB;
+const sal_Int32 BIFF12_ID_PCDFIELDS = 0x00B5;
+const sal_Int32 BIFF12_ID_PCDFRANGEPR = 0x00DF;
+const sal_Int32 BIFF12_ID_PCDFSHAREDITEMS = 0x00BD;
+const sal_Int32 BIFF12_ID_PCDSHEETSOURCE = 0x00BB;
+const sal_Int32 BIFF12_ID_PCDSOURCE = 0x00B9;
+const sal_Int32 BIFF12_ID_PCITEM_ARRAY = 0x00BF;
+const sal_Int32 BIFF12_ID_PCITEM_BOOL = 0x0016;
+const sal_Int32 BIFF12_ID_PCITEM_DATE = 0x0019;
+const sal_Int32 BIFF12_ID_PCITEM_DOUBLE = 0x0015;
+const sal_Int32 BIFF12_ID_PCITEM_ERROR = 0x0017;
+const sal_Int32 BIFF12_ID_PCITEM_INDEX = 0x001A;
+const sal_Int32 BIFF12_ID_PCITEM_MISSING = 0x0014;
+const sal_Int32 BIFF12_ID_PCITEM_STRING = 0x0018;
+const sal_Int32 BIFF12_ID_PCITEMA_BOOL = 0x001D;
+const sal_Int32 BIFF12_ID_PCITEMA_DATE = 0x0020;
+const sal_Int32 BIFF12_ID_PCITEMA_DOUBLE = 0x001C;
+const sal_Int32 BIFF12_ID_PCITEMA_ERROR = 0x001E;
+const sal_Int32 BIFF12_ID_PCITEMA_MISSING = 0x001B;
+const sal_Int32 BIFF12_ID_PCITEMA_STRING = 0x001F;
+const sal_Int32 BIFF12_ID_PCRECORD = 0x0021;
+const sal_Int32 BIFF12_ID_PCRECORDDT = 0x0022;
+const sal_Int32 BIFF12_ID_PCRECORDS = 0x00C1;
+const sal_Int32 BIFF12_ID_PHONETICPR = 0x0219;
+const sal_Int32 BIFF12_ID_PICTURE = 0x0232;
+const sal_Int32 BIFF12_ID_PIVOTAREA = 0x00F7;
+const sal_Int32 BIFF12_ID_PIVOTCACHE = 0x0182;
+const sal_Int32 BIFF12_ID_PIVOTCACHES = 0x0180;
+const sal_Int32 BIFF12_ID_PRINTOPTIONS = 0x01DD;
+const sal_Int32 BIFF12_ID_PTCOLFIELDS = 0x0137;
+const sal_Int32 BIFF12_ID_PTDATAFIELD = 0x0125;
+const sal_Int32 BIFF12_ID_PTDATAFIELDS = 0x0127;
+const sal_Int32 BIFF12_ID_PTDEFINITION = 0x0118;
+const sal_Int32 BIFF12_ID_PTFIELD = 0x011D;
+const sal_Int32 BIFF12_ID_PTFIELDS = 0x011F;
+const sal_Int32 BIFF12_ID_PTFILTER = 0x0259;
+const sal_Int32 BIFF12_ID_PTFILTERS = 0x0257;
+const sal_Int32 BIFF12_ID_PTFITEM = 0x011A;
+const sal_Int32 BIFF12_ID_PTFITEMS = 0x011B;
+const sal_Int32 BIFF12_ID_PTLOCATION = 0x013A;
+const sal_Int32 BIFF12_ID_PTPAGEFIELD = 0x0121;
+const sal_Int32 BIFF12_ID_PTPAGEFIELDS = 0x0123;
+const sal_Int32 BIFF12_ID_PTREFERENCE = 0x00FB;
+const sal_Int32 BIFF12_ID_PTREFERENCEITEM = 0x017E;
+const sal_Int32 BIFF12_ID_PTREFERENCES = 0x00F9;
+const sal_Int32 BIFF12_ID_PTROWFIELDS = 0x0135;
+const sal_Int32 BIFF12_ID_QUERYTABLE = 0x01BF;
+const sal_Int32 BIFF12_ID_QUERYTABLEREFRESH = 0x01C1;
+const sal_Int32 BIFF12_ID_RGBCOLOR = 0x01DB;
+const sal_Int32 BIFF12_ID_ROW = 0x0000;
+const sal_Int32 BIFF12_ID_ROWBREAKS = 0x0188;
+const sal_Int32 BIFF12_ID_SCENARIO = 0x01F6;
+const sal_Int32 BIFF12_ID_SCENARIOS = 0x01F4;
+const sal_Int32 BIFF12_ID_SELECTION = 0x0098;
+const sal_Int32 BIFF12_ID_SHAREDFMLA = 0x01AB;
+const sal_Int32 BIFF12_ID_SHEET = 0x009C;
+const sal_Int32 BIFF12_ID_SHEETDATA = 0x0091;
+const sal_Int32 BIFF12_ID_SHEETFORMATPR = 0x01E5;
+const sal_Int32 BIFF12_ID_SHEETPR = 0x0093;
+const sal_Int32 BIFF12_ID_SHEETPROTECTION = 0x0217;
+const sal_Int32 BIFF12_ID_SHEETS = 0x008F;
+const sal_Int32 BIFF12_ID_SHEETVIEW = 0x0089;
+const sal_Int32 BIFF12_ID_SHEETVIEWS = 0x0085;
+const sal_Int32 BIFF12_ID_SI = 0x0013;
+const sal_Int32 BIFF12_ID_SST = 0x009F;
+const sal_Int32 BIFF12_ID_STYLESHEET = 0x0116;
+const sal_Int32 BIFF12_ID_TABLE = 0x0157;
+const sal_Int32 BIFF12_ID_TABLEPART = 0x0295;
+const sal_Int32 BIFF12_ID_TABLEPARTS = 0x0294;
+const sal_Int32 BIFF12_ID_TABLESTYLEINFO = 0x0201;
+const sal_Int32 BIFF12_ID_TABLESTYLES = 0x01FC;
+const sal_Int32 BIFF12_ID_TOP10FILTER = 0x00AA;
+const sal_Int32 BIFF12_ID_VOLTYPE = 0x0204;
+const sal_Int32 BIFF12_ID_VOLTYPEMAIN = 0x0206;
+const sal_Int32 BIFF12_ID_VOLTYPES = 0x0202;
+const sal_Int32 BIFF12_ID_VOLTYPESTP = 0x020A;
+const sal_Int32 BIFF12_ID_VOLTYPETR = 0x020B;
+const sal_Int32 BIFF12_ID_WEBPR = 0x0105;
+const sal_Int32 BIFF12_ID_WEBPRTABLES = 0x0107;
+const sal_Int32 BIFF12_ID_WORKBOOK = 0x0083;
+const sal_Int32 BIFF12_ID_WORKBOOKPR = 0x0099;
+const sal_Int32 BIFF12_ID_WORKBOOKVIEW = 0x009E;
+const sal_Int32 BIFF12_ID_WORKSHEET = 0x0081;
+const sal_Int32 BIFF12_ID_XF = 0x002F;
+
+// BIFF2-BIFF8 record identifiers =============================================
/** An enumeration for all binary Excel file format types (BIFF types). */
enum BiffType
@@ -260,6 +272,7 @@ const sal_uInt16 BIFF8_MAXRECSIZE = 8224;
const sal_uInt16 BIFF2_ID_ARRAY = 0x0021;
const sal_uInt16 BIFF3_ID_ARRAY = 0x0221;
+const sal_uInt16 BIFF_ID_AUTOFILTER = 0x009D;
const sal_uInt16 BIFF2_ID_BLANK = 0x0001;
const sal_uInt16 BIFF3_ID_BLANK = 0x0201;
const sal_uInt16 BIFF2_ID_BOF = 0x0009;
@@ -352,6 +365,7 @@ const sal_uInt16 BIFF_ID_COLINFO = 0x007D;
const sal_uInt16 BIFF_ID_COLUMNDEFAULT = 0x0020;
const sal_uInt16 BIFF_ID_COLWIDTH = 0x0024;
const sal_uInt16 BIFF_ID_COMPRESSPICS = 0x089B;
+const sal_uInt16 BIFF_ID_CONNECTION = 0x0876;
const sal_uInt16 BIFF_ID_CONT = 0x003C;
const sal_uInt16 BIFF_ID_COORDLIST = 0x00A9;
const sal_uInt16 BIFF_ID_COUNTRY = 0x008C;
@@ -363,6 +377,7 @@ const sal_uInt16 BIFF_ID_DATAVALIDATION = 0x01BE;
const sal_uInt16 BIFF_ID_DATAVALIDATIONS = 0x01B2;
const sal_uInt16 BIFF_ID_DATEMODE = 0x0022;
const sal_uInt16 BIFF_ID_DBCELL = 0x00D7;
+const sal_uInt16 BIFF_ID_DBQUERY = 0x00DC;
const sal_uInt16 BIFF_ID_DCONBINAME = 0x01B5;
const sal_uInt16 BIFF_ID_DCONNAME = 0x0052;
const sal_uInt16 BIFF_ID_DCONREF = 0x0051;
@@ -385,6 +400,8 @@ const sal_uInt16 BIFF_ID_EXTERNSHEET = 0x0017;
const sal_uInt16 BIFF_ID_EXTSST = 0x00FF;
const sal_uInt16 BIFF_ID_FILEPASS = 0x002F;
const sal_uInt16 BIFF_ID_FILESHARING = 0x005B;
+const sal_uInt16 BIFF_ID_FILTERCOLUMN = 0x009E;
+const sal_uInt16 BIFF_ID_FILTERMODE = 0x009B;
const sal_uInt16 BIFF2_ID_FONT = 0x0031;
const sal_uInt16 BIFF3_ID_FONT = 0x0231;
const sal_uInt16 BIFF5_ID_FONT = 0x0031;
@@ -434,6 +451,7 @@ const sal_uInt16 BIFF_ID_PAGELAYOUTVIEW = 0x088B;
const sal_uInt16 BIFF_ID_PAGESETUP = 0x00A1;
const sal_uInt16 BIFF_ID_PALETTE = 0x0092;
const sal_uInt16 BIFF_ID_PANE = 0x0041;
+const sal_uInt16 BIFF_ID_PARAMQUERY = 0x00DC;
const sal_uInt16 BIFF_ID_PASSWORD = 0x0013;
const sal_uInt16 BIFF_ID_PCDEFINITION = 0x00C6;
const sal_uInt16 BIFF_ID_PCDEFINITION2 = 0x0122;
@@ -469,6 +487,10 @@ const sal_uInt16 BIFF_ID_PTFITEM = 0x00B2;
const sal_uInt16 BIFF_ID_PTPAGEFIELDS = 0x00B6;
const sal_uInt16 BIFF_ID_PTROWCOLFIELDS = 0x00B4;
const sal_uInt16 BIFF_ID_PTROWCOLITEMS = 0x00B5;
+const sal_uInt16 BIFF_ID_QUERYTABLE = 0x01AD;
+const sal_uInt16 BIFF_ID_QUERYTABLEREFRESH = 0x0802;
+const sal_uInt16 BIFF_ID_QUERYTABLESETTINGS = 0x0803;
+const sal_uInt16 BIFF_ID_QUERYTABLESTRING = 0x0804;
const sal_uInt16 BIFF_ID_RECALCID = 0x01C1;
const sal_uInt16 BIFF_ID_REFMODE = 0x000F;
const sal_uInt16 BIFF_ID_RIGHTMARGIN = 0x0027;
@@ -495,7 +517,6 @@ const sal_uInt16 BIFF2_ID_STRING = 0x0007;
const sal_uInt16 BIFF3_ID_STRING = 0x0207;
const sal_uInt16 BIFF_ID_STYLE = 0x0293;
const sal_uInt16 BIFF_ID_STYLEEXT = 0x0892;
-const sal_uInt16 BIFF_ID_SXEXT = 0x00DC;
const sal_uInt16 BIFF_ID_TABLESTYLES = 0x088E;
const sal_uInt16 BIFF_ID_THEME = 0x0896;
const sal_uInt16 BIFF_ID_TOPMARGIN = 0x0028;
@@ -520,6 +541,8 @@ const sal_uInt16 BIFF_ID_XFEXT = 0x087D;
const sal_uInt16 BIFF_ID_UNKNOWN = SAL_MAX_UINT16;
+// OBJ subrecord identifiers --------------------------------------------------
+
const sal_uInt16 BIFF_ID_OBJEND = 0x0000; /// End of OBJ.
const sal_uInt16 BIFF_ID_OBJMACRO = 0x0004; /// Macro link.
const sal_uInt16 BIFF_ID_OBJBUTTON = 0x0005; /// Button data.
@@ -562,7 +585,10 @@ const sal_uInt8 BIFF_DATATYPE_STRING = 2;
const sal_uInt8 BIFF_DATATYPE_BOOL = 4;
const sal_uInt8 BIFF_DATATYPE_ERROR = 16;
-// unicode strings ------------------------------------------------------------
+const sal_uInt8 BIFF_BOOLERR_BOOL = 0;
+const sal_uInt8 BIFF_BOOLERR_ERROR = 1;
+
+// BIFF8 unicode strings ------------------------------------------------------
const sal_uInt8 BIFF_STRF_16BIT = 0x01;
const sal_uInt8 BIFF_STRF_PHONETIC = 0x04;
@@ -591,6 +617,32 @@ public:
/** Returns a Windows code page from a text encoding. */
static sal_uInt16 calcCodePageFromTextEncoding( rtl_TextEncoding eTextEnc );
+ // BIFF12 import ----------------------------------------------------------
+
+ /** Reads a BIFF12 string with leading 16-bit or 32-bit length field. */
+ static ::rtl::OUString readString( SequenceInputStream& rStrm, bool b32BitLen = true );
+
+ // BIFF2-BIFF8 import -----------------------------------------------------
+
+ /** Returns true, if the current record of the stream is a BOF record. */
+ static bool isBofRecord( BiffInputStream& rStrm );
+
+ /** Skips a block of records up to the specified end record.
+
+ Skips all records until next end record. When this function returns,
+ the stream points to the end record, and the next call of the function
+ startNextRecord() at the stream will start the record following the end
+ record.
+
+ The identifier of the record that is active while this function is
+ called is used as start record identifier. This identifier is used to
+ correctly skip embedded record blocks with the same start and end
+ record identifier.
+
+ @return True = stream points to the end record.
+ */
+ static bool skipRecordBlock( BiffInputStream& rStrm, sal_uInt16 nEndRecId );
+
/** Imports a picture from an IMGDATA record. */
static void importImgData( StreamDataSequence& orDataSeq, BiffInputStream& rStrm, BiffType eBiff );
@@ -599,10 +651,18 @@ private:
~BiffHelper(); // not implemented
};
+// ----------------------------------------------------------------------------
+
+/** BIFF12 stream operator for an ::rtl::OUString, reads 32-bit string length and Unicode array. */
+inline SequenceInputStream& operator>>( SequenceInputStream& rStrm, ::rtl::OUString& orString )
+{
+ orString = BiffHelper::readString( rStrm );
+ return rStrm;
+}
+
// ============================================================================
} // namespace xls
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/biffinputstream.hxx b/oox/inc/oox/xls/biffinputstream.hxx
index c804d2c9c6e0..003ab28be34f 100644
--- a/oox/inc/oox/xls/biffinputstream.hxx
+++ b/oox/inc/oox/xls/biffinputstream.hxx
@@ -444,4 +444,3 @@ public:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/biffoutputstream.hxx b/oox/inc/oox/xls/biffoutputstream.hxx
index 6e36b08d3592..ada646bd879a 100644
--- a/oox/inc/oox/xls/biffoutputstream.hxx
+++ b/oox/inc/oox/xls/biffoutputstream.hxx
@@ -162,4 +162,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/chartsheetfragment.hxx b/oox/inc/oox/xls/chartsheetfragment.hxx
index dc8e0f85fd13..8dfedc5ba48e 100644
--- a/oox/inc/oox/xls/chartsheetfragment.hxx
+++ b/oox/inc/oox/xls/chartsheetfragment.hxx
@@ -35,24 +35,20 @@ namespace xls {
// ============================================================================
-class OoxChartsheetFragment : public OoxWorksheetFragmentBase
+class ChartsheetFragment : public WorksheetFragmentBase
{
public:
- explicit OoxChartsheetFragment(
+ explicit ChartsheetFragment(
const WorkbookHelper& rHelper,
const ::rtl::OUString& rFragmentPath,
- ISegmentProgressBarRef xProgressBar,
+ const ISegmentProgressBarRef& rxProgressBar,
sal_Int16 nSheet );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual void onEndElement( const ::rtl::OUString& rChars );
-
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
+ virtual void onCharacters( const ::rtl::OUString& rChars );
- // oox.core.FragmentHandler2 interface ------------------------------------
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
virtual const ::oox::core::RecordInfo* getRecordInfos() const;
virtual void initializeImport();
@@ -62,7 +58,7 @@ private:
/** Imports the the relation identifier for the DrawingML part. */
void importDrawing( const AttributeList& rAttribs );
/** Imports the DRAWING record containing the relation identifier for the DrawingML part. */
- void importDrawing( RecordInputStream& rStrm );
+ void importDrawing( SequenceInputStream& rStrm );
};
// ============================================================================
@@ -72,7 +68,7 @@ class BiffChartsheetFragment : public BiffWorksheetFragmentBase
public:
explicit BiffChartsheetFragment(
const BiffWorkbookFragmentBase& rParent,
- ISegmentProgressBarRef xProgressBar,
+ const ISegmentProgressBarRef& rxProgressBar,
sal_Int16 nSheet );
/** Imports the entire sheet fragment, returns true, if EOF record has been reached. */
@@ -85,4 +81,3 @@ public:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/commentsbuffer.hxx b/oox/inc/oox/xls/commentsbuffer.hxx
index 8a43eb7fe9fe..e87d52ff03a2 100644
--- a/oox/inc/oox/xls/commentsbuffer.hxx
+++ b/oox/inc/oox/xls/commentsbuffer.hxx
@@ -56,7 +56,7 @@ public:
/** Imports a cell comment from the passed attributes of the comment element. */
void importComment( const AttributeList& rAttribs );
/** Imports a cell comment from the passed stream of a COMMENT record. */
- void importComment( RecordInputStream& rStrm );
+ void importComment( SequenceInputStream& rStrm );
/** Creates and returns a new rich-string object for the comment text. */
RichStringRef createText();
@@ -99,4 +99,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/commentsfragment.hxx b/oox/inc/oox/xls/commentsfragment.hxx
index 584c6a2bb340..3751cde764f4 100644
--- a/oox/inc/oox/xls/commentsfragment.hxx
+++ b/oox/inc/oox/xls/commentsfragment.hxx
@@ -36,30 +36,27 @@ namespace xls {
// ============================================================================
-class OoxCommentsFragment : public OoxWorksheetFragmentBase
+class CommentsFragment : public WorksheetFragmentBase
{
public:
- explicit OoxCommentsFragment(
+ explicit CommentsFragment(
const WorksheetHelper& rHelper,
const ::rtl::OUString& rFragmentPath );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual void onEndElement( const ::rtl::OUString& rChars );
+ virtual void onCharacters( const ::rtl::OUString& rChars );
+ virtual void onEndElement();
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
virtual void onEndRecord();
- // oox.core.FragmentHandler2 interface ------------------------------------
-
virtual const ::oox::core::RecordInfo* getRecordInfos() const;
private:
/** Imports comment data from the comment element. */
void importComment( const AttributeList& rAttribs );
/** Imports comment data from the COMMENT record. */
- void importComment( RecordInputStream& rStrm );
+ void importComment( SequenceInputStream& rStrm );
private:
CommentRef mxComment;
@@ -71,4 +68,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/condformatbuffer.hxx b/oox/inc/oox/xls/condformatbuffer.hxx
index 25259ce04295..fae6381f6402 100644
--- a/oox/inc/oox/xls/condformatbuffer.hxx
+++ b/oox/inc/oox/xls/condformatbuffer.hxx
@@ -29,7 +29,6 @@
#define OOX_XLS_CONDFORMATBUFFER_HXX
#include <com/sun/star/sheet/ConditionOperator.hpp>
-#include "oox/helper/containerhelper.hxx"
#include "oox/xls/formulaparser.hxx"
#include "oox/xls/worksheethelper.hxx"
@@ -64,11 +63,11 @@ struct CondFormatRuleModel
explicit CondFormatRuleModel();
- /** Sets the passed OOBIN or BIFF operator for condition type cellIs. */
- void setBinOperator( sal_Int32 nOperator );
+ /** Sets the passed BIFF operator for condition type cellIs. */
+ void setBiffOperator( sal_Int32 nOperator );
- /** Sets the passed OOBIN text comparison type and operator. */
- void setOobTextType( sal_Int32 nOperator );
+ /** Sets the passed BIFF12 text comparison type and operator. */
+ void setBiff12TextType( sal_Int32 nOperator );
};
// ============================================================================
@@ -87,7 +86,7 @@ public:
void appendFormula( const ::rtl::OUString& rFormula );
/** Imports rule settings from a CFRULE record. */
- void importCfRule( RecordInputStream& rStrm );
+ void importCfRule( SequenceInputStream& rStrm );
/** Imports rule settings from a CFRULE record. */
void importCfRule( BiffInputStream& rStrm, sal_Int32 nPriority );
@@ -131,9 +130,9 @@ public:
CondFormatRuleRef importCfRule( const AttributeList& rAttribs );
/** Imports settings from the CONDFORMATTING record. */
- void importCondFormatting( RecordInputStream& rStrm );
+ void importCondFormatting( SequenceInputStream& rStrm );
/** Imports a conditional formatting rule from the CFRULE record. */
- void importCfRule( RecordInputStream& rStrm );
+ void importCfRule( SequenceInputStream& rStrm );
/** Imports settings from the CFHEADER record. */
void importCfHeader( BiffInputStream& rStrm );
@@ -167,7 +166,7 @@ public:
/** Imports settings from the conditionalFormatting element. */
CondFormatRef importConditionalFormatting( const AttributeList& rAttribs );
/** Imports settings from the CONDFORMATTING record. */
- CondFormatRef importCondFormatting( RecordInputStream& rStrm );
+ CondFormatRef importCondFormatting( SequenceInputStream& rStrm );
/** Imports settings from the CFHEADER record. */
void importCfHeader( BiffInputStream& rStrm );
@@ -192,4 +191,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/condformatcontext.hxx b/oox/inc/oox/xls/condformatcontext.hxx
index 799e3127b7a3..44c9fe592250 100644
--- a/oox/inc/oox/xls/condformatcontext.hxx
+++ b/oox/inc/oox/xls/condformatcontext.hxx
@@ -36,20 +36,18 @@ namespace xls {
// ============================================================================
-class OoxCondFormatContext : public OoxWorksheetContextBase
+class CondFormatContext : public WorksheetContextBase
{
public:
- explicit OoxCondFormatContext( OoxWorksheetFragmentBase& rFragment );
+ explicit CondFormatContext( WorksheetFragmentBase& rFragment );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
virtual void onStartElement( const AttributeList& rAttribs );
- virtual void onEndElement( const ::rtl::OUString& rChars );
+ virtual void onCharacters( const ::rtl::OUString& rChars );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
- virtual void onStartRecord( RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ virtual void onStartRecord( SequenceInputStream& rStrm );
private:
CondFormatRef mxCondFmt;
@@ -62,4 +60,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/connectionsbuffer.hxx b/oox/inc/oox/xls/connectionsbuffer.hxx
new file mode 100755
index 000000000000..98a5bea17bc6
--- /dev/null
+++ b/oox/inc/oox/xls/connectionsbuffer.hxx
@@ -0,0 +1,186 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_XLS_CONNECTIONSBUFFER_HXX
+#define OOX_XLS_CONNECTIONSBUFFER_HXX
+
+#include "oox/helper/refvector.hxx"
+#include "oox/xls/workbookhelper.hxx"
+
+namespace oox {
+namespace xls {
+
+// ============================================================================
+
+const sal_Int32 BIFF12_CONNECTION_UNKNOWN = 0;
+const sal_Int32 BIFF12_CONNECTION_ODBC = 1;
+const sal_Int32 BIFF12_CONNECTION_DAO = 2;
+const sal_Int32 BIFF12_CONNECTION_FILE = 3;
+const sal_Int32 BIFF12_CONNECTION_HTML = 4;
+const sal_Int32 BIFF12_CONNECTION_OLEDB = 5;
+const sal_Int32 BIFF12_CONNECTION_TEXT = 6;
+const sal_Int32 BIFF12_CONNECTION_ADO = 7;
+const sal_Int32 BIFF12_CONNECTION_DSP = 8;
+
+// ============================================================================
+
+/** Special properties for data connections representing web queries. */
+struct WebPrModel
+{
+ typedef ::std::vector< ::com::sun::star::uno::Any > TablesVector;
+
+ TablesVector maTables; /// Names or indexes of the web query tables.
+ ::rtl::OUString maUrl; /// Source URL to refresh the data.
+ ::rtl::OUString maPostMethod; /// POST method to query data.
+ ::rtl::OUString maEditPage; /// Web page showing query data (for XML queries).
+ sal_Int32 mnHtmlFormat; /// Plain text, rich text, or HTML.
+ bool mbXml; /// True = XML query, false = HTML query.
+ bool mbSourceData; /// True = import XML source data referred by HTML table.
+ bool mbParsePre; /// True = parse preformatted sections (<pre> tag).
+ bool mbConsecutive; /// True = join consecutive delimiters.
+ bool mbFirstRow; /// True = use column withs of first row for entire <pre> tag.
+ bool mbXl97Created; /// True = web query created with Excel 97.
+ bool mbTextDates; /// True = read date values as text, false = parse dates.
+ bool mbXl2000Refreshed; /// True = refreshed with Excel 2000 or newer.
+ bool mbHtmlTables; /// True = HTML tables, false = entire document.
+
+ explicit WebPrModel();
+};
+
+// ----------------------------------------------------------------------------
+
+/** Common properties of an external data connection. */
+struct ConnectionModel
+{
+ typedef ::std::auto_ptr< WebPrModel > WebPrModelPtr;
+
+ WebPrModelPtr mxWebPr; /// Special settings for web queries.
+ ::rtl::OUString maName; /// Unique name of this connection.
+ ::rtl::OUString maDescription; /// User description of this connection.
+ ::rtl::OUString maSourceFile; /// URL of a source data file.
+ ::rtl::OUString maSourceConnFile; /// URL of a source connection file.
+ ::rtl::OUString maSsoId; /// Single sign-on identifier.
+ sal_Int32 mnId; /// Unique connection identifier.
+ sal_Int32 mnType; /// Data source type.
+ sal_Int32 mnReconnectMethod; /// Reconnection method.
+ sal_Int32 mnCredentials; /// Credentials method.
+ sal_Int32 mnInterval; /// Refresh interval in minutes.
+ bool mbKeepAlive; /// True = keep connection open after import.
+ bool mbNew; /// True = new connection, never updated.
+ bool mbDeleted; /// True = connection has been deleted.
+ bool mbOnlyUseConnFile; /// True = use maSourceConnFile, ignore mnReconnectMethod.
+ bool mbBackground; /// True = background refresh enabled.
+ bool mbRefreshOnLoad; /// True = refresh connection on import.
+ bool mbSaveData; /// True = save cached data with connection.
+ bool mbSavePassword; /// True = save password in connection string.
+
+ explicit ConnectionModel();
+
+ WebPrModel& createWebPr();
+};
+
+// ----------------------------------------------------------------------------
+
+/** An external data connection (database, web query, etc.). */
+class Connection : public WorkbookHelper
+{
+public:
+ explicit Connection( const WorkbookHelper& rHelper, sal_Int32 nConnId = -1 );
+
+ /** Imports connection settings from the connection element. */
+ void importConnection( const AttributeList& rAttribs );
+ /** Imports web query settings from the webPr element. */
+ void importWebPr( const AttributeList& rAttribs );
+ /** Imports web query table settings from the tables element. */
+ void importTables( const AttributeList& rAttribs );
+ /** Imports a web query table identifier from the m, s, or x element. */
+ void importTable( const AttributeList& rAttribs, sal_Int32 nElement );
+
+ /** Imports connection settings from the CONNECTION record. */
+ void importConnection( SequenceInputStream& rStrm );
+ /** Imports web query settings from the WEBPR record. */
+ void importWebPr( SequenceInputStream& rStrm );
+ /** Imports web query table settings from the WEBPRTABLES record. */
+ void importWebPrTables( SequenceInputStream& rStrm );
+ /** Imports a web query table identifier from the PCITEM_MISSING, PCITEM_STRING, or PCITEM_INDEX record. */
+ void importWebPrTable( SequenceInputStream& rStrm, sal_Int32 nRecId );
+
+ /** Imports connection settings from the DBQUERY record. */
+ void importDbQuery( BiffInputStream& rStrm );
+ /** Imports connection settings from the QUERYTABLESETTINGS record. */
+ void importQueryTableSettings( BiffInputStream& rStrm );
+
+ /** Returns the unique connection identifier. */
+ inline sal_Int32 getConnectionId() const { return maModel.mnId; }
+ /** Returns the source data type of the connection. */
+ inline sal_Int32 getConnectionType() const { return maModel.mnType; }
+ /** Returns read-only access to the connection model data. */
+ const ConnectionModel& getModel() const { return maModel; }
+
+private:
+ ConnectionModel maModel;
+};
+
+typedef ::boost::shared_ptr< Connection > ConnectionRef;
+
+// ============================================================================
+
+class ConnectionsBuffer : public WorkbookHelper
+{
+public:
+ explicit ConnectionsBuffer( const WorkbookHelper& rHelper );
+
+ /** Creates a new empty connection. */
+ Connection& createConnection();
+ /** Creates a new empty connection with a valid but unused identifier. */
+ Connection& createConnectionWithId();
+
+ /** Maps all connections by their identifier. */
+ void finalizeImport();
+
+ /** Returns a data connection by its unique identifier. */
+ ConnectionRef getConnection( sal_Int32 nConnId ) const;
+
+private:
+ /** Inserts the passed connection into the map according to its identifier. */
+ void insertConnectionToMap( const ConnectionRef& rxConnection );
+
+private:
+ typedef RefVector< Connection > ConnectionVector;
+ typedef RefMap< sal_Int32, Connection > ConnectionMap;
+
+ ConnectionVector maConnections;
+ ConnectionMap maConnectionsById;
+ sal_Int32 mnUnusedId;
+};
+
+// ============================================================================
+
+} // namespace xls
+} // namespace oox
+
+#endif
diff --git a/oox/inc/oox/xls/connectionsfragment.hxx b/oox/inc/oox/xls/connectionsfragment.hxx
index 85951a5bbfc7..5a9a9085c6c5 100644
--- a/oox/inc/oox/xls/connectionsfragment.hxx
+++ b/oox/inc/oox/xls/connectionsfragment.hxx
@@ -29,31 +29,45 @@
#define OOX_XLS_CONNECTIONSFRAGMENT_HXX
#include "oox/xls/excelhandlers.hxx"
-#include "oox/xls/workbookhelper.hxx"
namespace oox {
namespace xls {
+class Connection;
+
+// ============================================================================
+
+class ConnectionContext : public WorkbookContextBase
+{
+public:
+ explicit ConnectionContext( WorkbookFragmentBase& rParent, Connection& rConnection );
+
+protected:
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
+ virtual void onStartElement( const AttributeList& rAttribs );
+
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ virtual void onStartRecord( SequenceInputStream& rStrm );
+
+private:
+ Connection& mrConnection;
+};
+
// ============================================================================
-class OoxConnectionsFragment : public OoxWorkbookFragmentBase
+class ConnectionsFragment : public WorkbookFragmentBase
{
public:
- explicit OoxConnectionsFragment(
+ explicit ConnectionsFragment(
const WorkbookHelper& rHelper,
const ::rtl::OUString& rFragmentPath );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
-private:
- void importConnection( const AttributeList& rAttribs );
- void importWebPr( const AttributeList& rAttribs );
- void importTables( const AttributeList& rAttribs );
- void importS( const AttributeList& rAttribs );
- void importX( const AttributeList& rAttribs );
+ virtual const ::oox::core::RecordInfo* getRecordInfos() const;
+ virtual void finalizeImport();
};
// ============================================================================
@@ -62,4 +76,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/defnamesbuffer.hxx b/oox/inc/oox/xls/defnamesbuffer.hxx
index 45208f0ac344..5374c47f6a07 100644
--- a/oox/inc/oox/xls/defnamesbuffer.hxx
+++ b/oox/inc/oox/xls/defnamesbuffer.hxx
@@ -28,8 +28,6 @@
#ifndef OOX_XLS_DEFINEDNAMESBUFFER_HXX
#define OOX_XLS_DEFINEDNAMESBUFFER_HXX
-#include "oox/helper/containerhelper.hxx"
-#include "oox/helper/recordinputstream.hxx"
#include "oox/xls/formulabase.hxx"
namespace com { namespace sun { namespace star {
@@ -45,21 +43,21 @@ class BiffInputStreamPos;
// ============================================================================
// codes for built-in names
-const sal_Unicode OOX_DEFNAME_CONSOLIDATEAREA = '\x00';
-const sal_Unicode OOX_DEFNAME_AUTOOPEN = '\x01';
-const sal_Unicode OOX_DEFNAME_AUTOCLOSE = '\x02';
-const sal_Unicode OOX_DEFNAME_EXTRACT = '\x03';
-const sal_Unicode OOX_DEFNAME_DATABASE = '\x04';
-const sal_Unicode OOX_DEFNAME_CRITERIA = '\x05';
-const sal_Unicode OOX_DEFNAME_PRINTAREA = '\x06';
-const sal_Unicode OOX_DEFNAME_PRINTTITLES = '\x07';
-const sal_Unicode OOX_DEFNAME_RECORDER = '\x08';
-const sal_Unicode OOX_DEFNAME_DATAFORM = '\x09';
-const sal_Unicode OOX_DEFNAME_AUTOACTIVATE = '\x0A';
-const sal_Unicode OOX_DEFNAME_AUTODEACTIVATE = '\x0B';
-const sal_Unicode OOX_DEFNAME_SHEETTITLE = '\x0C';
-const sal_Unicode OOX_DEFNAME_FILTERDATABASE = '\x0D';
-const sal_Unicode OOX_DEFNAME_UNKNOWN = '\x0E';
+const sal_Unicode BIFF_DEFNAME_CONSOLIDATEAREA = '\x00';
+const sal_Unicode BIFF_DEFNAME_AUTOOPEN = '\x01'; // Sheet macro executed when workbook is opened.
+const sal_Unicode BIFF_DEFNAME_AUTOCLOSE = '\x02'; // Sheet macro executed when workbook is closed.
+const sal_Unicode BIFF_DEFNAME_EXTRACT = '\x03'; // Filter output destination for advanced filter.
+const sal_Unicode BIFF_DEFNAME_DATABASE = '\x04';
+const sal_Unicode BIFF_DEFNAME_CRITERIA = '\x05'; // Filter criteria source range for advanced filter.
+const sal_Unicode BIFF_DEFNAME_PRINTAREA = '\x06'; // Print ranges.
+const sal_Unicode BIFF_DEFNAME_PRINTTITLES = '\x07'; // Rows/columns repeated on each page when printing.
+const sal_Unicode BIFF_DEFNAME_RECORDER = '\x08';
+const sal_Unicode BIFF_DEFNAME_DATAFORM = '\x09';
+const sal_Unicode BIFF_DEFNAME_AUTOACTIVATE = '\x0A'; // Sheet macro executed when workbook is activated.
+const sal_Unicode BIFF_DEFNAME_AUTODEACTIVATE = '\x0B'; // Sheet macro executed when workbook is deactivated.
+const sal_Unicode BIFF_DEFNAME_SHEETTITLE = '\x0C';
+const sal_Unicode BIFF_DEFNAME_FILTERDATABASE = '\x0D'; // Sheet range autofilter or advanced filter works on.
+const sal_Unicode BIFF_DEFNAME_UNKNOWN = '\x0E';
// ============================================================================
@@ -69,9 +67,9 @@ struct DefinedNameModel
::rtl::OUString maFormula; /// The formula string.
sal_Int32 mnSheet; /// Sheet index for local names.
sal_Int32 mnFuncGroupId; /// Function group identifier.
- bool mbMacro; /// True = Macro name (VBasic or sheet macro).
+ bool mbMacro; /// True = Macro name (VBA or sheet macro).
bool mbFunction; /// True = function, false = command.
- bool mbVBName; /// True = VBasic macro, false = sheet macro.
+ bool mbVBName; /// True = VBA macro, false = sheet macro.
bool mbHidden; /// True = name hidden in UI.
explicit DefinedNameModel();
@@ -96,10 +94,10 @@ public:
::com::sun::star::uno::Any getReference( const ::com::sun::star::table::CellAddress& rBaseAddress ) const;
protected:
- /** Imports the OOX formula string, using the passed formula context. */
+ /** Imports the OOXML formula string, using the passed formula context. */
void importOoxFormula( FormulaContext& rContext, sal_Int16 nBaseSheet );
- /** Imports the OOBIN formula, using the passed formula context. */
- void importOobFormula( FormulaContext& rContext, sal_Int16 nBaseSheet, RecordInputStream& rStrm );
+ /** Imports the BIFF12 formula, using the passed formula context. */
+ void importBiff12Formula( FormulaContext& rContext, sal_Int16 nBaseSheet, SequenceInputStream& rStrm );
/** Imports the BIFF formula, using the passed formula context. */
void importBiffFormula( FormulaContext& rContext, sal_Int16 nBaseSheet, BiffInputStream& rStrm, const sal_uInt16* pnFmlaSize = 0 );
@@ -125,7 +123,7 @@ public:
/** Sets the formula string from the body of the definedName element. */
void setFormula( const ::rtl::OUString& rFormula );
/** Imports the defined name from a DEFINEDNAME record in the passed stream. */
- void importDefinedName( RecordInputStream& rStrm );
+ void importDefinedName( SequenceInputStream& rStrm );
/** Imports the defined name from a DEFINEDNAME record in the passed BIFF stream. */
void importDefinedName( BiffInputStream& rStrm, sal_Int16 nCalcSheet );
@@ -134,22 +132,26 @@ public:
/** Converts the formula string or BIFF token array for this defined name. */
void convertFormula();
+ /** Returns true, if this defined name is global in the document. */
+ inline bool isGlobalName() const { return mnCalcSheet < 0; }
/** Returns true, if this defined name is a special builtin name. */
- inline bool isBuiltinName() const { return mcBuiltinId != OOX_DEFNAME_UNKNOWN; }
+ inline bool isBuiltinName() const { return mcBuiltinId != BIFF_DEFNAME_UNKNOWN; }
/** Returns true, if this defined name is a macro function call. */
inline bool isMacroFunction() const { return maModel.mbMacro && maModel.mbFunction; }
- /** Returns true, if this defined name is global in the document. */
- inline bool isGlobalName() const { return mnCalcSheet < 0; }
+ /** Returns true, if this defined name is a reference to a VBA macro. */
+ inline bool isVBName() const { return maModel.mbMacro && maModel.mbVBName; }
- /** Returns the token index used in API token arrays (com.sun.star.sheet.FormulaToken). */
- inline sal_Int32 getTokenIndex() const { return mnTokenIndex; }
/** Returns the 0-based sheet index for local names, or -1 for global names. */
inline sal_Int16 getLocalCalcSheet() const { return mnCalcSheet; }
+ /** Returns the built-in identifier of the defined name. */
+ inline sal_Unicode getBuiltinId() const { return mcBuiltinId; }
+ /** Returns the token index used in API token arrays (com.sun.star.sheet.FormulaToken). */
+ inline sal_Int32 getTokenIndex() const { return mnTokenIndex; }
/** Tries to resolve the defined name to an absolute cell range. */
bool getAbsoluteRange( ::com::sun::star::table::CellRangeAddress& orRange ) const;
private:
- /** Imports the OOX or OOBIN formula, using the passed formula context. */
+ /** Imports the OOXML or BIFF12 formula, using the passed formula context. */
void implImportOoxFormula( FormulaContext& rContext );
/** Imports the BIFF formula, using the passed formula context. */
void implImportBiffFormula( FormulaContext& rContext );
@@ -163,7 +165,7 @@ private:
sal_Int32 mnTokenIndex; /// Name index used in API token array.
sal_Int16 mnCalcSheet; /// Calc sheet index for sheet-local names.
sal_Unicode mcBuiltinId; /// Identifier for built-in defined names.
- StreamDataSeqPtr mxFormula; /// Formula data for OOBIN import.
+ StreamDataSeqPtr mxFormula; /// Formula data for BIFF12 import.
BiffStreamPosPtr mxBiffStrm; /// Cached BIFF stream for formula import.
sal_uInt16 mnFmlaSize; /// Cached BIFF formula size for formula import.
};
@@ -183,7 +185,7 @@ public:
/** Imports a defined name from the passed attribute set. */
DefinedNameRef importDefinedName( const AttributeList& rAttribs );
/** Imports a defined name from a DEFINEDNAME record in the passed stream. */
- void importDefinedName( RecordInputStream& rStrm );
+ void importDefinedName( SequenceInputStream& rStrm );
/** Imports a defined name from a DEFINEDNAME record in the passed BIFF stream. */
void importDefinedName( BiffInputStream& rStrm );
@@ -199,16 +201,27 @@ public:
If no local name is found, tries to find a matching global name.
@return Reference to the defined name or empty reference. */
DefinedNameRef getByModelName( const ::rtl::OUString& rModelName, sal_Int16 nCalcSheet = -1 ) const;
+ /** Returns a built-in defined name by its built-in identifier.
+ @param nSheet The sheet index of the built-in name.
+ @return Reference to the defined name or empty reference. */
+ DefinedNameRef getByBuiltinId( sal_Unicode cBuiltinId, sal_Int16 nCalcSheet ) const;
private:
DefinedNameRef createDefinedName();
private:
+ typedef ::std::pair< sal_Int16, ::rtl::OUString > SheetNameKey;
+ typedef ::std::pair< sal_Int16, sal_Unicode > BuiltinKey;
+
typedef RefVector< DefinedName > DefNameVector;
- typedef RefMap< sal_Int32, DefinedName > DefNameMap;
+ typedef RefMap< SheetNameKey, DefinedName > DefNameNameMap;
+ typedef RefMap< BuiltinKey, DefinedName > DefNameBuiltinMap;
+ typedef RefMap< sal_Int32, DefinedName > DefNameTokenIdMap;
DefNameVector maDefNames; /// List of all defined names in insertion order.
- DefNameMap maDefNameMap; /// Maps all defined names by API token index.
+ DefNameNameMap maModelNameMap; /// Maps all defined names by sheet index and model name.
+ DefNameBuiltinMap maBuiltinMap; /// Maps all defined names by sheet index and built-in identifier.
+ DefNameTokenIdMap maTokenIdMap; /// Maps all defined names by API token index.
sal_Int16 mnCalcSheet; /// Current sheet index for BIFF2-BIFF4 names (always sheet-local).
};
@@ -218,4 +231,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/drawingfragment.hxx b/oox/inc/oox/xls/drawingfragment.hxx
index 66d716220b8a..0d3360323a94 100644
--- a/oox/inc/oox/xls/drawingfragment.hxx
+++ b/oox/inc/oox/xls/drawingfragment.hxx
@@ -31,14 +31,25 @@
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/awt/Size.hpp>
#include "oox/drawingml/shape.hxx"
+#include "oox/drawingml/shapegroupcontext.hxx"
+#include "oox/ole/axcontrol.hxx"
+#include "oox/ole/vbaproject.hxx"
#include "oox/vml/vmldrawing.hxx"
#include "oox/vml/vmldrawingfragment.hxx"
+#include "oox/vml/vmltextbox.hxx"
#include "oox/xls/excelhandlers.hxx"
+namespace oox { namespace ole {
+ struct AxFontData;
+ class AxMorphDataModelBase;
+} }
+
namespace oox {
namespace xls {
// ============================================================================
+// DrawingML
+// ============================================================================
/** Absolute position in spreadsheet (in EMUs) independent from cells. */
struct AnchorPosModel : public ::oox::drawingml::EmuPoint
@@ -100,6 +111,7 @@ public:
void importClientData( const AttributeList& rAttribs );
/** Sets an attribute of the cell-dependent anchor position from xdr:from and xdr:to elements. */
void setCellPos( sal_Int32 nElement, sal_Int32 nParentContext, const ::rtl::OUString& rValue );
+ /** Imports and converts the VML specific client anchor. */
void importVmlAnchor( const ::rtl::OUString& rAnchor );
/** Returns true, if the anchor contains valid position and size settings. */
@@ -131,19 +143,81 @@ typedef ::boost::shared_ptr< ShapeAnchor > ShapeAnchorRef;
// ============================================================================
+class ShapeMacroAttacher : public ::oox::ole::VbaMacroAttacherBase
+{
+public:
+ explicit ShapeMacroAttacher( const ::rtl::OUString& rMacroName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape );
+
+private:
+ virtual void attachMacro( const ::rtl::OUString& rMacroUrl );
+
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape;
+};
+
+// ============================================================================
+
+class Shape : public ::oox::drawingml::Shape, public WorksheetHelper
+{
+public:
+ explicit Shape(
+ const WorksheetHelper& rHelper,
+ const AttributeList& rAttribs,
+ const sal_Char* pcServiceName = 0 );
+
+protected:
+ virtual void finalizeXShape(
+ ::oox::core::XmlFilterBase& rFilter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes );
+
+private:
+ ::rtl::OUString maMacroName;
+};
+
+// ============================================================================
+
+/** Context handler for creation of shapes embedded in group shapes. */
+class GroupShapeContext : public ::oox::drawingml::ShapeGroupContext, public WorksheetHelper
+{
+public:
+ explicit GroupShapeContext(
+ ::oox::core::ContextHandler& rParent,
+ const WorksheetHelper& rHelper,
+ const ::oox::drawingml::ShapePtr& rxParentShape,
+ const ::oox::drawingml::ShapePtr& rxShape );
+
+ static ::oox::core::ContextHandlerRef
+ createShapeContext(
+ ::oox::core::ContextHandler& rParent,
+ const WorksheetHelper& rHelper,
+ sal_Int32 nElement,
+ const AttributeList& rAttribs,
+ const ::oox::drawingml::ShapePtr& rxParentShape,
+ ::oox::drawingml::ShapePtr* pxShape = 0 );
+
+protected:
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
+ createFastChildContext(
+ sal_Int32 nElement,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+};
+
+// ============================================================================
+
/** Fragment handler for a complete sheet drawing. */
-class OoxDrawingFragment : public OoxWorksheetFragmentBase
+class DrawingFragment : public WorksheetFragmentBase
{
public:
- explicit OoxDrawingFragment(
+ explicit DrawingFragment(
const WorksheetHelper& rHelper,
const ::rtl::OUString& rFragmentPath );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual void onEndElement( const ::rtl::OUString& rChars );
+ virtual void onCharacters( const ::rtl::OUString& rChars );
+ virtual void onEndElement();
private:
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
@@ -155,6 +229,27 @@ private:
};
// ============================================================================
+// VML
+// ============================================================================
+
+class VmlControlMacroAttacher : public ::oox::ole::VbaMacroAttacherBase
+{
+public:
+ explicit VmlControlMacroAttacher( const ::rtl::OUString& rMacroName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& rxCtrlFormIC,
+ sal_Int32 nCtrlIndex, sal_Int32 nCtrlType, sal_Int32 nDropStyle );
+
+private:
+ virtual void attachMacro( const ::rtl::OUString& rMacroUrl );
+
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > mxCtrlFormIC;
+ sal_Int32 mnCtrlIndex;
+ sal_Int32 mnCtrlType;
+ sal_Int32 mnDropStyle;
+};
+
+// ============================================================================
class VmlDrawing : public ::oox::vml::Drawing, public WorksheetHelper
{
@@ -167,29 +262,55 @@ public:
/** Filters cell note shapes. */
virtual bool isShapeSupported( const ::oox::vml::ShapeBase& rShape ) const;
+ /** Returns additional base names for automatic shape name creation. */
+ virtual ::rtl::OUString getShapeBaseName( const ::oox::vml::ShapeBase& rShape ) const;
+
/** Calculates the shape rectangle from a cell anchor string. */
- virtual bool convertShapeClientAnchor(
+ virtual bool convertClientAnchor(
::com::sun::star::awt::Rectangle& orShapeRect,
const ::rtl::OUString& rShapeAnchor ) const;
- /** Converts additional form control properties from the passed VML shape
- client data. */
- virtual void convertControlClientData(
- const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& rxCtrlModel,
- const ::oox::vml::ShapeClientData& rClientData ) const;
+ /** Creates a UNO control shape for legacy drawing controls. */
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
+ createAndInsertClientXShape(
+ const ::oox::vml::ShapeBase& rShape,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes,
+ const ::com::sun::star::awt::Rectangle& rShapeRect ) const;
/** Updates the bounding box covering all shapes of this drawing. */
- virtual void notifyShapeInserted(
+ virtual void notifyXShapeInserted(
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape,
- const ::com::sun::star::awt::Rectangle& rShapeRect );
+ const ::com::sun::star::awt::Rectangle& rShapeRect,
+ const ::oox::vml::ShapeBase& rShape, bool bGroupChild );
+
+private:
+ /** Converts the passed VML textbox text color to an OLE color. */
+ sal_uInt32 convertControlTextColor( const ::rtl::OUString& rTextColor ) const;
+ /** Converts the passed VML textbox font to an ActiveX form control font. */
+ void convertControlFontData(
+ ::oox::ole::AxFontData& rAxFontData, sal_uInt32& rnOleTextColor,
+ const ::oox::vml::TextFontModel& rFontModel ) const;
+ /** Converts the caption, the font settings, and the horizontal alignment
+ from the passed VML textbox to ActiveX form control settings. */
+ void convertControlText(
+ ::oox::ole::AxFontData& rAxFontData, sal_uInt32& rnOleTextColor, ::rtl::OUString& rCaption,
+ const ::oox::vml::TextBox* pTextBox, sal_Int32 nTextHAlign ) const;
+ /** Converts the passed VML shape background formatting to ActiveX control formatting. */
+ void convertControlBackground(
+ ::oox::ole::AxMorphDataModelBase& rAxModel,
+ const ::oox::vml::ShapeBase& rShape ) const;
+
+private:
+ ::oox::ole::ControlConverter maControlConv;
+ ::oox::vml::TextFontModel maListBoxFont;
};
// ============================================================================
-class OoxVmlDrawingFragment : public ::oox::vml::DrawingFragment, public WorksheetHelper
+class VmlDrawingFragment : public ::oox::vml::DrawingFragment, public WorksheetHelper
{
public:
- explicit OoxVmlDrawingFragment(
+ explicit VmlDrawingFragment(
const WorksheetHelper& rHelper,
const ::rtl::OUString& rFragmentPath );
@@ -203,4 +324,3 @@ protected:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/excelchartconverter.hxx b/oox/inc/oox/xls/excelchartconverter.hxx
index 08c3398a5718..a46d484f2074 100644
--- a/oox/inc/oox/xls/excelchartconverter.hxx
+++ b/oox/inc/oox/xls/excelchartconverter.hxx
@@ -59,4 +59,3 @@ public:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/excelfilter.hxx b/oox/inc/oox/xls/excelfilter.hxx
index b5d7a97f33b5..789cbc99cb07 100644
--- a/oox/inc/oox/xls/excelfilter.hxx
+++ b/oox/inc/oox/xls/excelfilter.hxx
@@ -28,8 +28,8 @@
#ifndef OOX_XLS_EXCELFILTER_HXX
#define OOX_XLS_EXCELFILTER_HXX
-#include "oox/core/xmlfilterbase.hxx"
#include "oox/core/binaryfilterbase.hxx"
+#include "oox/core/xmlfilterbase.hxx"
namespace oox {
namespace xls {
@@ -59,7 +59,8 @@ class ExcelFilter : public ::oox::core::XmlFilterBase, public ExcelFilterBase
{
public:
explicit ExcelFilter(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxGlobalFactory );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext )
+ throw( ::com::sun::star::uno::RuntimeException );
virtual ~ExcelFilter();
virtual bool importDocument() throw();
@@ -72,6 +73,7 @@ public:
private:
virtual GraphicHelper* implCreateGraphicHelper() const;
+ virtual ::oox::ole::VbaProject* implCreateVbaProject() const;
virtual ::rtl::OUString implGetImplementationName() const;
};
@@ -81,7 +83,8 @@ class ExcelBiffFilter : public ::oox::core::BinaryFilterBase, public ExcelFilter
{
public:
explicit ExcelBiffFilter(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxGlobalFactory );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext )
+ throw( ::com::sun::star::uno::RuntimeException );
virtual ~ExcelBiffFilter();
virtual bool importDocument() throw();
@@ -89,13 +92,28 @@ public:
private:
virtual GraphicHelper* implCreateGraphicHelper() const;
+ virtual ::oox::ole::VbaProject* implCreateVbaProject() const;
virtual ::rtl::OUString implGetImplementationName() const;
};
// ============================================================================
+class ExcelVbaProjectFilter : public ExcelBiffFilter
+{
+public:
+ explicit ExcelVbaProjectFilter(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext )
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual bool importDocument() throw();
+ virtual bool exportDocument() throw();
+
+private:
+ virtual ::rtl::OUString implGetImplementationName() const;
+};
+ // ============================================================================
+
} // namespace xls
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/excelhandlers.hxx b/oox/inc/oox/xls/excelhandlers.hxx
index 986f42aadba4..864f5f9a9e44 100644
--- a/oox/inc/oox/xls/excelhandlers.hxx
+++ b/oox/inc/oox/xls/excelhandlers.hxx
@@ -41,17 +41,17 @@ namespace xls {
Used to import contexts in global workbook fragments.
*/
-class OoxWorkbookContextBase : public ::oox::core::ContextHandler2, public WorkbookHelper
+class WorkbookContextBase : public ::oox::core::ContextHandler2, public WorkbookHelper
{
public:
template< typename ParentType >
- explicit OoxWorkbookContextBase( ParentType& rParent );
+ explicit WorkbookContextBase( ParentType& rParent );
};
// ----------------------------------------------------------------------------
template< typename ParentType >
-OoxWorkbookContextBase::OoxWorkbookContextBase( ParentType& rParent ) :
+WorkbookContextBase::WorkbookContextBase( ParentType& rParent ) :
::oox::core::ContextHandler2( rParent ),
WorkbookHelper( rParent )
{
@@ -63,32 +63,32 @@ OoxWorkbookContextBase::OoxWorkbookContextBase( ParentType& rParent ) :
Used to import contexts in sheet fragments.
*/
-class OoxWorksheetContextBase : public ::oox::core::ContextHandler2, public WorksheetHelperRoot
+class WorksheetContextBase : public ::oox::core::ContextHandler2, public WorksheetHelperRoot
{
public:
template< typename ParentType >
- explicit OoxWorksheetContextBase(
+ explicit WorksheetContextBase(
ParentType& rParent,
- ISegmentProgressBarRef xProgressBar,
+ const ISegmentProgressBarRef& rxProgressBar,
WorksheetType eSheetType,
sal_Int16 nSheet );
template< typename ParentType >
- explicit OoxWorksheetContextBase( ParentType& rParent );
+ explicit WorksheetContextBase( ParentType& rParent );
};
// ----------------------------------------------------------------------------
template< typename ParentType >
-OoxWorksheetContextBase::OoxWorksheetContextBase( ParentType& rParent,
- ISegmentProgressBarRef xProgressBar, WorksheetType eSheetType, sal_Int16 nSheet ) :
+WorksheetContextBase::WorksheetContextBase( ParentType& rParent,
+ const ISegmentProgressBarRef& rxProgressBar, WorksheetType eSheetType, sal_Int16 nSheet ) :
::oox::core::ContextHandler2( rParent ),
- WorksheetHelperRoot( rParent, xProgressBar, eSheetType, nSheet )
+ WorksheetHelperRoot( rParent, rxProgressBar, eSheetType, nSheet )
{
}
template< typename ParentType >
-OoxWorksheetContextBase::OoxWorksheetContextBase( ParentType& rParent ) :
+WorksheetContextBase::WorksheetContextBase( ParentType& rParent ) :
::oox::core::ContextHandler2( rParent ),
WorksheetHelperRoot( rParent )
{
@@ -100,10 +100,10 @@ OoxWorksheetContextBase::OoxWorksheetContextBase( ParentType& rParent ) :
Used to import global workbook fragments.
*/
-class OoxWorkbookFragmentBase : public ::oox::core::FragmentHandler2, public WorkbookHelper
+class WorkbookFragmentBase : public ::oox::core::FragmentHandler2, public WorkbookHelper
{
public:
- explicit OoxWorkbookFragmentBase(
+ explicit WorkbookFragmentBase(
const WorkbookHelper& rHelper,
const ::rtl::OUString& rFragmentPath );
};
@@ -114,17 +114,17 @@ public:
Used to import sheet fragments.
*/
-class OoxWorksheetFragmentBase : public ::oox::core::FragmentHandler2, public WorksheetHelperRoot
+class WorksheetFragmentBase : public ::oox::core::FragmentHandler2, public WorksheetHelperRoot
{
public:
- explicit OoxWorksheetFragmentBase(
+ explicit WorksheetFragmentBase(
const WorkbookHelper& rHelper,
const ::rtl::OUString& rFragmentPath,
- ISegmentProgressBarRef xProgressBar,
+ const ISegmentProgressBarRef& rxProgressBar,
WorksheetType eSheetType,
sal_Int16 nSheet );
- explicit OoxWorksheetFragmentBase(
+ explicit WorksheetFragmentBase(
const WorksheetHelper& rHelper,
const ::rtl::OUString& rFragmentPath );
};
@@ -132,72 +132,21 @@ public:
// ============================================================================
// ============================================================================
-/** An enumeration for all types of fragments in a BIFF workbook stream. */
-enum BiffFragmentType
-{
- BIFF_FRAGMENT_GLOBALS, /// Workbook globals fragment.
- BIFF_FRAGMENT_WORKSHEET, /// Worksheet fragment.
- BIFF_FRAGMENT_CHARTSHEET, /// Chart sheet fragment.
- BIFF_FRAGMENT_MACROSHEET, /// Macro sheet fragment.
- BIFF_FRAGMENT_MODULESHEET, /// BIFF5 VB module fragment.
- BIFF_FRAGMENT_EMPTYSHEET, /// Sheet fragment of unsupported type.
- BIFF_FRAGMENT_WORKSPACE, /// BIFF4 workspace/workbook globals.
- BIFF_FRAGMENT_UNKNOWN /// Unknown fragment/error.
-};
-
-// ============================================================================
-
-/** Base class for all BIFF context handlers and fragment handlers.
-
- This base class holds a reference to the BIFF input stream which can be
- accessed in all derived classes.
- */
-class BiffHandlerBase
-{
-protected:
- inline explicit BiffHandlerBase( BiffInputStream& rStrm ) : mrStrm( rStrm ) {}
- virtual ~BiffHandlerBase();
-
- /** Skips a block of records up to the specified end record.
-
- Skips all records until next end record. When this function returns,
- stream points to the end record, and the next call of startNextRecord()
- at the stream will start the record following the end record.
-
- The identifier of the record that is active while this function is
- called is used as start record identifier. This identifier is used to
- correctly skip embedded record blocks with the same start and end
- record identifier.
-
- @return True = stream points to the end record.
- */
- bool skipRecordBlock( sal_uInt16 nEndRecId );
-
- /** @return True = current record identifier is a BOF record. */
- bool isBofRecord() const;
-
-protected:
- BiffInputStream& mrStrm;
-};
-
-// ============================================================================
-
/** Base class for all BIFF context handlers.
Derived handlers have to implement the importRecord() function that has to
- import the record the BIFF input stream currently points to.
+ import the record the passed BIFF input stream currently points to.
*/
-class BiffContextHandler : public BiffHandlerBase
+class BiffContextHandler
{
public:
- /** Derived classes have to implement importing the current record. */
- virtual void importRecord() = 0;
+ virtual ~BiffContextHandler();
-protected:
- explicit BiffContextHandler( const BiffHandlerBase& rParent );
+ /** Derived classes have to implement importing the current record. */
+ virtual void importRecord( BiffInputStream& rStrm ) = 0;
};
-// ============================================================================
+// ----------------------------------------------------------------------------
/** Context handler derived from the WorkbookHelper helper class.
@@ -206,21 +155,11 @@ protected:
class BiffWorkbookContextBase : public BiffContextHandler, public WorkbookHelper
{
protected:
- template< typename ParentType >
- explicit BiffWorkbookContextBase( const ParentType& rParent );
+ explicit BiffWorkbookContextBase( const WorkbookHelper& rHelper );
};
// ----------------------------------------------------------------------------
-template< typename ParentType >
-BiffWorkbookContextBase::BiffWorkbookContextBase( const ParentType& rParent ) :
- BiffContextHandler( rParent ),
- WorkbookHelper( rParent )
-{
-}
-
-// ============================================================================
-
/** Context handler derived from the WorksheetHelper helper class.
Used to import contexts in sheet fragments.
@@ -228,68 +167,48 @@ BiffWorkbookContextBase::BiffWorkbookContextBase( const ParentType& rParent ) :
class BiffWorksheetContextBase : public BiffContextHandler, public WorksheetHelperRoot
{
protected:
- template< typename ParentType >
explicit BiffWorksheetContextBase(
- const ParentType& rParent,
- ISegmentProgressBarRef xProgressBar,
+ const WorkbookHelper& rHelper,
+ const ISegmentProgressBarRef& rxProgressBar,
WorksheetType eSheetType,
sal_Int16 nSheet );
- template< typename ParentType >
- explicit BiffWorksheetContextBase( const ParentType& rParent );
+ explicit BiffWorksheetContextBase( const WorksheetHelper& rHelper );
};
-// ----------------------------------------------------------------------------
-
-template< typename ParentType >
-BiffWorksheetContextBase::BiffWorksheetContextBase( const ParentType& rParent,
- ISegmentProgressBarRef xProgressBar, WorksheetType eSheetType, sal_Int16 nSheet ) :
- BiffContextHandler( rParent ),
- WorksheetHelperRoot( rParent, xProgressBar, eSheetType, nSheet )
-{
-}
-
-template< typename ParentType >
-BiffWorksheetContextBase::BiffWorksheetContextBase( const ParentType& rParent ) :
- BiffContextHandler( rParent ),
- WorksheetHelperRoot( rParent )
-{
-}
-
// ============================================================================
-namespace prv {
-
-struct BiffFragmentStreamOwner
+/** An enumeration for all types of fragments in a BIFF workbook stream. */
+enum BiffFragmentType
{
- typedef ::boost::shared_ptr< BinaryXInputStream > XInputStreamRef;
- typedef ::boost::shared_ptr< BiffInputStream > BiffInputStreamRef;
-
- XInputStreamRef mxXInStrm;
- BiffInputStreamRef mxBiffStrm;
-
- explicit BiffFragmentStreamOwner( const ::oox::core::FilterBase& rFilter, const ::rtl::OUString& rStrmName );
- virtual ~BiffFragmentStreamOwner();
+ BIFF_FRAGMENT_GLOBALS, /// Workbook globals fragment.
+ BIFF_FRAGMENT_WORKSHEET, /// Worksheet fragment.
+ BIFF_FRAGMENT_CHARTSHEET, /// Chart sheet fragment.
+ BIFF_FRAGMENT_MACROSHEET, /// Macro sheet fragment.
+ BIFF_FRAGMENT_MODULESHEET, /// BIFF5 VB module fragment.
+ BIFF_FRAGMENT_EMPTYSHEET, /// Sheet fragment of unsupported type.
+ BIFF_FRAGMENT_WORKSPACE, /// BIFF4 workspace/workbook globals.
+ BIFF_FRAGMENT_UNKNOWN /// Unknown fragment/error.
};
-} // namespace prv
-
// ----------------------------------------------------------------------------
-class BiffFragmentHandler : private prv::BiffFragmentStreamOwner, public BiffHandlerBase
+class BiffFragmentHandler
{
public:
- /** Imports the fragment, returns true, if EOF record has been reached. */
- virtual bool importFragment() = 0;
-
-protected:
/** Opens the stream with the passed full name. */
explicit BiffFragmentHandler(
const ::oox::core::FilterBase& rFilter,
const ::rtl::OUString& rStrmName );
- /** Reuses the stream of the passed fragment. */
- explicit BiffFragmentHandler( const BiffFragmentHandler& rHandler );
+ virtual ~BiffFragmentHandler();
+
+ /** Imports the fragment, returns true, if EOF record has been reached. */
+ virtual bool importFragment() = 0;
+
+protected:
+ /** Returns the BIFF input stream of this fragment. */
+ inline BiffInputStream& getInputStream() { return *mxBiffStrm; }
/** Starts a new fragment in a workbbok stream and returns the fragment type.
@@ -326,11 +245,14 @@ protected:
bool skipFragment();
private:
- /** Implementation helper for the startFragment() functions. */
- BiffFragmentType implStartFragment( BiffType eBiff );
+ typedef ::boost::shared_ptr< BinaryXInputStream > XInputStreamRef;
+ typedef ::boost::shared_ptr< BiffInputStream > BiffInputStreamRef;
+
+ XInputStreamRef mxXInStrm;
+ BiffInputStreamRef mxBiffStrm;
};
-// ============================================================================
+// ----------------------------------------------------------------------------
/** Fragment handler derived from the WorkbookHelper helper class.
@@ -345,7 +267,7 @@ protected:
bool bCloneDecoder = false );
};
-// ============================================================================
+// ----------------------------------------------------------------------------
/** Fragment handler derived from the WorksheetHelper helper class.
@@ -356,12 +278,12 @@ class BiffWorksheetFragmentBase : public BiffFragmentHandler, public WorksheetHe
protected:
explicit BiffWorksheetFragmentBase(
const BiffWorkbookFragmentBase& rParent,
- ISegmentProgressBarRef xProgressBar,
+ const ISegmentProgressBarRef& rxProgressBar,
WorksheetType eSheetType,
sal_Int16 nSheet );
};
-// ============================================================================
+// ----------------------------------------------------------------------------
/** Special fragment handler for worksheets that have to be skipped.
*/
@@ -370,7 +292,7 @@ class BiffSkipWorksheetFragment : public BiffWorksheetFragmentBase
public:
explicit BiffSkipWorksheetFragment(
const BiffWorkbookFragmentBase& rParent,
- ISegmentProgressBarRef xProgressBar,
+ const ISegmentProgressBarRef& rxProgressBar,
sal_Int16 nSheet );
virtual bool importFragment();
@@ -383,4 +305,3 @@ public:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/excelvbaproject.hxx b/oox/inc/oox/xls/excelvbaproject.hxx
index 121e6a1667cd..96dabd08b5d7 100755
--- a/oox/inc/oox/xls/excelvbaproject.hxx
+++ b/oox/inc/oox/xls/excelvbaproject.hxx
@@ -45,12 +45,9 @@ class OOX_DLLPUBLIC ExcelVbaProject : public ::oox::ole::VbaProject
{
public:
explicit ExcelVbaProject(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxGlobalFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheetDocument >& rxDocument );
- /** Generates VBA modules for sheets that do not specify a codename. */
- void createMissingModules();
-
protected:
/** Adds dummy modules for sheets without imported code name. */
virtual void prepareImport();
diff --git a/oox/inc/oox/xls/externallinkbuffer.hxx b/oox/inc/oox/xls/externallinkbuffer.hxx
index b9980cc21e2f..c616a2b97e97 100644
--- a/oox/inc/oox/xls/externallinkbuffer.hxx
+++ b/oox/inc/oox/xls/externallinkbuffer.hxx
@@ -84,19 +84,19 @@ public:
void importOleItem( const AttributeList& rAttribs );
/** Imports the EXTERNALNAME record containing the name (only). */
- void importExternalName( RecordInputStream& rStrm );
+ void importExternalName( SequenceInputStream& rStrm );
/** Imports the EXTERNALNAMEFLAGS record containing the settings of an external name. */
- void importExternalNameFlags( RecordInputStream& rStrm );
+ void importExternalNameFlags( SequenceInputStream& rStrm );
/** Imports the DDEITEMVALUES record containing the size of the DDE result matrix. */
- void importDdeItemValues( RecordInputStream& rStrm );
+ void importDdeItemValues( SequenceInputStream& rStrm );
/** Imports the DDEITEM_BOOL record containing a boolean value in a link result. */
- void importDdeItemBool( RecordInputStream& rStrm );
+ void importDdeItemBool( SequenceInputStream& rStrm );
/** Imports the DDEITEM_DOUBLE record containing a double value in a link result. */
- void importDdeItemDouble( RecordInputStream& rStrm );
+ void importDdeItemDouble( SequenceInputStream& rStrm );
/** Imports the DDEITEM_ERROR record containing an error code in a link result. */
- void importDdeItemError( RecordInputStream& rStrm );
+ void importDdeItemError( SequenceInputStream& rStrm );
/** Imports the DDEITEM_STRING record containing a string in a link result. */
- void importDdeItemString( RecordInputStream& rStrm );
+ void importDdeItemString( SequenceInputStream& rStrm );
/** Imports the EXTERNALNAME record from the passed stream. */
void importExternalName( BiffInputStream& rStrm );
@@ -227,19 +227,19 @@ public:
ExternalNameRef importOleItem( const AttributeList& rAttribs );
/** Imports the EXTERNALBOOK record describing an externally linked document, DDE link, or OLE link. */
- void importExternalBook( const ::oox::core::Relations& rRelations, RecordInputStream& rStrm );
+ void importExternalBook( const ::oox::core::Relations& rRelations, SequenceInputStream& rStrm );
/** Imports the EXTSHEETNAMES record containing the sheet names in an externally linked document. */
- void importExtSheetNames( RecordInputStream& rStrm );
+ void importExtSheetNames( SequenceInputStream& rStrm );
/** Imports the EXTERNALNAME record describing an external name. */
- ExternalNameRef importExternalName( RecordInputStream& rStrm );
+ ExternalNameRef importExternalName( SequenceInputStream& rStrm );
/** Imports the EXTERNALREF record from the passed stream. */
- void importExternalRef( RecordInputStream& rStrm );
+ void importExternalRef( SequenceInputStream& rStrm );
/** Imports the EXTERNALSELF record from the passed stream. */
- void importExternalSelf( RecordInputStream& rStrm );
+ void importExternalSelf( SequenceInputStream& rStrm );
/** Imports the EXTERNALSAME record from the passed stream. */
- void importExternalSame( RecordInputStream& rStrm );
+ void importExternalSame( SequenceInputStream& rStrm );
/** Imports the EXTERNALADDIN record from the passed stream. */
- void importExternalAddin( RecordInputStream& rStrm );
+ void importExternalAddin( SequenceInputStream& rStrm );
/** Imports the EXTERNSHEET record from the passed stream. */
void importExternSheet( BiffInputStream& rStrm );
@@ -248,6 +248,9 @@ public:
/** Imports the EXTERNALNAME record from the passed stream. */
void importExternalName( BiffInputStream& rStrm );
+ /** Sets the link type to 'self reference'. */
+ inline void setSelfLinkType() { meLinkType = LINKTYPE_SELF; }
+
/** Returns the type of this external link. */
inline ExternalLinkType getLinkType() const { return meLinkType; }
/** Returns true, if the link refers to the current workbook. */
@@ -314,10 +317,10 @@ typedef ::boost::shared_ptr< ExternalLink > ExternalLinkRef;
// ============================================================================
-/** Represents a REF entry in the OOBIN EXTERNALSHEETS or in the BIFF8
+/** Represents a REF entry in the BIFF12 EXTERNALSHEETS or in the BIFF8
EXTERNSHEET record.
- This struct is used to map ref identifiers to external books (OOBIN:
+ This struct is used to map ref identifiers to external books (BIFF12:
EXTERNALREF records, BIFF8: EXTERNALBOOK records), and provides sheet
indexes into the sheet list of the external document.
*/
@@ -329,7 +332,7 @@ struct RefSheetsModel
explicit RefSheetsModel();
- void readOobData( RecordInputStream& rStrm );
+ void readBiff12Data( SequenceInputStream& rStrm );
void readBiff8Data( BiffInputStream& rStrm );
};
@@ -344,15 +347,15 @@ public:
ExternalLinkRef importExternalReference( const AttributeList& rAttribs );
/** Imports the EXTERNALREF record from the passed stream. */
- ExternalLinkRef importExternalRef( RecordInputStream& rStrm );
+ ExternalLinkRef importExternalRef( SequenceInputStream& rStrm );
/** Imports the EXTERNALSELF record from the passed stream. */
- void importExternalSelf( RecordInputStream& rStrm );
+ void importExternalSelf( SequenceInputStream& rStrm );
/** Imports the EXTERNALSAME record from the passed stream. */
- void importExternalSame( RecordInputStream& rStrm );
+ void importExternalSame( SequenceInputStream& rStrm );
/** Imports the EXTERNALADDIN record from the passed stream. */
- void importExternalAddin( RecordInputStream& rStrm );
+ void importExternalAddin( SequenceInputStream& rStrm );
/** Imports the EXTERNALSHEETS record from the passed stream. */
- void importExternalSheets( RecordInputStream& rStrm );
+ void importExternalSheets( SequenceInputStream& rStrm );
/** Imports the EXTERNSHEET record from the passed stream. */
ExternalLinkRef importExternSheet( BiffInputStream& rStrm );
@@ -368,7 +371,7 @@ public:
getLinkInfos() const;
/** Returns the external link for the passed reference identifier. */
- ExternalLinkRef getExternalLink( sal_Int32 nRefId ) const;
+ ExternalLinkRef getExternalLink( sal_Int32 nRefId, bool bUseRefSheets = true ) const;
/** Returns the sheet range for the specified reference (BIFF2-BIFF5 only). */
LinkSheetRange getSheetRange( sal_Int32 nRefId, sal_Int16 nTabId1, sal_Int16 nTabId2 ) const;
@@ -386,10 +389,11 @@ private:
typedef RefVector< ExternalLink > ExternalLinkVec;
typedef ::std::vector< RefSheetsModel > RefSheetsModelVec;
+ ExternalLinkRef mxSelfRef; /// Implicit self reference at index 0.
ExternalLinkVec maLinks; /// List of link structures for all kinds of links.
ExternalLinkVec maExtLinks; /// Real external links needed for formula parser.
RefSheetsModelVec maRefSheets; /// Sheet indexes for reference ids.
- bool mbUseRefSheets; /// True = use maRefSheets list (OOBIN only).
+ bool mbUseRefSheets; /// True = use maRefSheets list (BIFF12 only).
};
// ============================================================================
@@ -398,4 +402,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/externallinkfragment.hxx b/oox/inc/oox/xls/externallinkfragment.hxx
index ec310974818a..0e1f293d2444 100644
--- a/oox/inc/oox/xls/externallinkfragment.hxx
+++ b/oox/inc/oox/xls/externallinkfragment.hxx
@@ -37,41 +37,40 @@ namespace xls {
class ExternalLink;
// ============================================================================
+// ============================================================================
/** This class implements importing the sheetData element in external sheets.
The sheetData element embedded in the externalBook element contains cached
cells from externally linked sheets.
*/
-class OoxExternalSheetDataContext : public OoxWorkbookContextBase
+class ExternalSheetDataContext : public WorkbookContextBase
{
public:
- explicit OoxExternalSheetDataContext(
- OoxWorkbookFragmentBase& rFragment,
+ explicit ExternalSheetDataContext(
+ WorkbookFragmentBase& rFragment,
const ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XExternalSheetCache >& rxSheetCache );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual void onEndElement( const ::rtl::OUString& rChars );
+ virtual void onCharacters( const ::rtl::OUString& rChars );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
private:
/** Imports cell settings from a c element. */
void importCell( const AttributeList& rAttribs );
/** Imports the EXTCELL_BLANK from the passed stream. */
- void importExtCellBlank( RecordInputStream& rStrm );
+ void importExtCellBlank( SequenceInputStream& rStrm );
/** Imports the EXTCELL_BOOL from the passed stream. */
- void importExtCellBool( RecordInputStream& rStrm );
+ void importExtCellBool( SequenceInputStream& rStrm );
/** Imports the EXTCELL_DOUBLE from the passed stream. */
- void importExtCellDouble( RecordInputStream& rStrm );
+ void importExtCellDouble( SequenceInputStream& rStrm );
/** Imports the EXTCELL_ERROR from the passed stream. */
- void importExtCellError( RecordInputStream& rStrm );
+ void importExtCellError( SequenceInputStream& rStrm );
/** Imports the EXTCELL_STRING from the passed stream. */
- void importExtCellString( RecordInputStream& rStrm );
+ void importExtCellString( SequenceInputStream& rStrm );
/** Sets the passed cell value to the current position in the sheet cache. */
void setCellValue( const ::com::sun::star::uno::Any& rValue );
@@ -85,23 +84,20 @@ private:
// ============================================================================
-class OoxExternalLinkFragment : public OoxWorkbookFragmentBase
+class ExternalLinkFragment : public WorkbookFragmentBase
{
public:
- explicit OoxExternalLinkFragment(
+ explicit ExternalLinkFragment(
const WorkbookHelper& rHelper,
const ::rtl::OUString& rFragmentPath,
ExternalLink& rExtLink );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual void onEndElement( const ::rtl::OUString& rChars );
+ virtual void onCharacters( const ::rtl::OUString& rChars );
+ virtual void onEndElement();
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
-
- // oox.core.FragmentHandler2 interface ------------------------------------
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
virtual const ::oox::core::RecordInfo* getRecordInfos() const;
@@ -116,29 +112,24 @@ private:
};
// ============================================================================
+// ============================================================================
-class BiffExternalLinkFragment : public BiffWorkbookFragmentBase
+class BiffExternalSheetDataContext : public BiffWorkbookContextBase
{
public:
- explicit BiffExternalLinkFragment( const BiffWorkbookFragmentBase& rParent, bool bImportDefNames );
- virtual ~BiffExternalLinkFragment();
-
- /** Imports all records related to external links. */
- virtual bool importFragment();
+ explicit BiffExternalSheetDataContext( const WorkbookHelper& rHelper, bool bImportDefNames );
+ virtual ~BiffExternalSheetDataContext();
/** Tries to import a record related to external links and defined names. */
- void importRecord();
-
- /** Finalizes buffers related to external links and defined names. */
- void finalizeImport();
+ virtual void importRecord( BiffInputStream& rStrm );
private:
- void importExternSheet();
- void importExternalBook();
- void importExternalName();
- void importXct();
- void importCrn();
- void importDefinedName();
+ void importExternSheet( BiffInputStream& rStrm );
+ void importExternalBook( BiffInputStream& rStrm );
+ void importExternalName( BiffInputStream& rStrm );
+ void importXct( BiffInputStream& rStrm );
+ void importCrn( BiffInputStream& rStrm );
+ void importDefinedName( BiffInputStream& rStrm );
/** Sets the passed cell value to the passed position in the sheet cache. */
void setCellValue( const BinAddress& rBinAddr, const ::com::sun::star::uno::Any& rValue );
@@ -152,8 +143,19 @@ private:
// ============================================================================
+class BiffExternalLinkFragment : public BiffWorkbookFragmentBase
+{
+public:
+ explicit BiffExternalLinkFragment( const BiffWorkbookFragmentBase& rParent );
+
+ /** Imports all records related to external links. */
+ virtual bool importFragment();
+};
+
+// ============================================================================
+// ============================================================================
+
} // namespace xls
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/formulabase.hxx b/oox/inc/oox/xls/formulabase.hxx
index 510404d2b662..013e63f3bf30 100644
--- a/oox/inc/oox/xls/formulabase.hxx
+++ b/oox/inc/oox/xls/formulabase.hxx
@@ -28,19 +28,19 @@
#ifndef OOX_XLS_FORMULABASE_HXX
#define OOX_XLS_FORMULABASE_HXX
-#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/sheet/FormulaOpCodeMapEntry.hpp>
+#include <com/sun/star/sheet/FormulaToken.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
-#include <com/sun/star/sheet/FormulaToken.hpp>
-#include <com/sun/star/sheet/FormulaOpCodeMapEntry.hpp>
-#include "oox/helper/containerhelper.hxx"
+#include <com/sun/star/uno/Sequence.hxx>
#include "oox/helper/propertyset.hxx"
+#include "oox/helper/refvector.hxx"
#include "oox/xls/addressconverter.hxx"
namespace com { namespace sun { namespace star {
+ namespace sheet { class XFormulaOpCodeMapper; }
namespace sheet { class XFormulaParser; }
namespace sheet { class XFormulaTokens; }
- namespace sheet { class XFormulaOpCodeMapper; }
} } }
namespace oox { template< typename Type > class Matrix; }
@@ -126,24 +126,14 @@ const sal_uInt8 BIFF_TOKID_AREAERR3D = 0x1D; /// Deleted 3D area
// specific token constants ---------------------------------------------------
-const sal_uInt8 OOBIN_TOK_ARRAY_DOUBLE = 0;
-const sal_uInt8 OOBIN_TOK_ARRAY_STRING = 1;
-const sal_uInt8 OOBIN_TOK_ARRAY_BOOL = 2;
-const sal_uInt8 OOBIN_TOK_ARRAY_ERROR = 4;
+const sal_uInt8 BIFF_TOK_ARRAY_DOUBLE = 0; /// Double value in an array.
+const sal_uInt8 BIFF_TOK_ARRAY_STRING = 1; /// String value in an array.
+const sal_uInt8 BIFF_TOK_ARRAY_BOOL = 2; /// Boolean value in an array.
+const sal_uInt8 BIFF_TOK_ARRAY_ERROR = 4; /// Error code in an array.
const sal_uInt8 BIFF_TOK_BOOL_FALSE = 0; /// FALSE value of a tBool token.
const sal_uInt8 BIFF_TOK_BOOL_TRUE = 1; /// TRUE value of a tBool token.
-const sal_uInt8 OOBIN_TOK_ATTR_VOLATILE = 0x01; /// Volatile function.
-const sal_uInt8 OOBIN_TOK_ATTR_IF = 0x02; /// Start of true condition in IF function.
-const sal_uInt8 OOBIN_TOK_ATTR_CHOOSE = 0x04; /// Jump array of CHOOSE function.
-const sal_uInt8 OOBIN_TOK_ATTR_SKIP = 0x08; /// Skip tokens.
-const sal_uInt8 OOBIN_TOK_ATTR_SUM = 0x10; /// SUM function with one parameter.
-const sal_uInt8 OOBIN_TOK_ATTR_ASSIGN = 0x20; /// BASIC style assignment.
-const sal_uInt8 OOBIN_TOK_ATTR_SPACE = 0x40; /// Spaces in formula representation.
-const sal_uInt8 OOBIN_TOK_ATTR_SPACE_VOLATILE = 0x41; /// Leading spaces and volatile formula.
-const sal_uInt8 OOBIN_TOK_ATTR_IFERROR = 0x80; /// Start of condition in IFERROR function.
-
const sal_uInt8 BIFF_TOK_ATTR_VOLATILE = 0x01; /// Volatile function.
const sal_uInt8 BIFF_TOK_ATTR_IF = 0x02; /// Start of true condition in IF function.
const sal_uInt8 BIFF_TOK_ATTR_CHOOSE = 0x04; /// Jump array of CHOOSE function.
@@ -152,6 +142,7 @@ const sal_uInt8 BIFF_TOK_ATTR_SUM = 0x10; /// SUM function wit
const sal_uInt8 BIFF_TOK_ATTR_ASSIGN = 0x20; /// BASIC style assignment.
const sal_uInt8 BIFF_TOK_ATTR_SPACE = 0x40; /// Spaces in formula representation.
const sal_uInt8 BIFF_TOK_ATTR_SPACE_VOLATILE = 0x41; /// Leading spaces and volatile formula.
+const sal_uInt8 BIFF_TOK_ATTR_IFERROR = 0x80; /// Start of condition in IFERROR function (BIFF12 only).
const sal_uInt8 BIFF_TOK_ATTR_SPACE_SP = 0x00; /// Spaces before next token.
const sal_uInt8 BIFF_TOK_ATTR_SPACE_BR = 0x01; /// Line breaks before next token.
@@ -166,27 +157,27 @@ const sal_uInt16 BIFF_TOK_FUNCVAR_FUNCIDMASK = 0x7FFF; /// Mask for functio
const sal_uInt8 BIFF_TOK_FUNCVAR_CMDPROMPT = 0x80; /// User prompt for macro commands.
const sal_uInt8 BIFF_TOK_FUNCVAR_COUNTMASK = 0x7F; /// Mask for parameter count.
-const sal_uInt16 OOBIN_TOK_REF_COLMASK = 0x3FFF; /// Mask to extract column from reference.
-const sal_Int32 OOBIN_TOK_REF_ROWMASK = 0xFFFFF; /// Mask to extract row from reference.
-const sal_uInt16 OOBIN_TOK_REF_COLREL = 0x4000; /// True = column is relative.
-const sal_uInt16 OOBIN_TOK_REF_ROWREL = 0x8000; /// True = row is relative.
+const sal_uInt16 BIFF12_TOK_REF_COLMASK = 0x3FFF; /// Mask to extract column from reference (BIFF12).
+const sal_Int32 BIFF12_TOK_REF_ROWMASK = 0xFFFFF; /// Mask to extract row from reference (BIFF12).
+const sal_uInt16 BIFF12_TOK_REF_COLREL = 0x4000; /// True = column is relative (BIFF12).
+const sal_uInt16 BIFF12_TOK_REF_ROWREL = 0x8000; /// True = row is relative (BIFF12).
const sal_uInt16 BIFF_TOK_REF_COLMASK = 0x00FF; /// Mask to extract BIFF8 column from reference.
const sal_uInt16 BIFF_TOK_REF_ROWMASK = 0x3FFF; /// Mask to extract BIFF2-BIFF5 row from reference.
const sal_uInt16 BIFF_TOK_REF_COLREL = 0x4000; /// True = column is relative.
const sal_uInt16 BIFF_TOK_REF_ROWREL = 0x8000; /// True = row is relative.
-const sal_uInt16 OOBIN_TOK_TABLE_COLUMN = 0x0001; /// Table reference: Single column.
-const sal_uInt16 OOBIN_TOK_TABLE_COLRANGE = 0x0002; /// Table reference: Range of columns.
-const sal_uInt16 OOBIN_TOK_TABLE_ALL = 0x0004; /// Table reference: Special [#All] range.
-const sal_uInt16 OOBIN_TOK_TABLE_HEADERS = 0x0008; /// Table reference: Special [#Headers] range.
-const sal_uInt16 OOBIN_TOK_TABLE_DATA = 0x0010; /// Table reference: Special [#Data] range.
-const sal_uInt16 OOBIN_TOK_TABLE_TOTALS = 0x0020; /// Table reference: Special [#Totals] range.
-const sal_uInt16 OOBIN_TOK_TABLE_THISROW = 0x0040; /// Table reference: Special [#This Row] range.
-const sal_uInt16 OOBIN_TOK_TABLE_SP_BRACKETS = 0x0080; /// Table reference: Spaces in outer brackets.
-const sal_uInt16 OOBIN_TOK_TABLE_SP_SEP = 0x0100; /// Table reference: Spaces after separators.
-const sal_uInt16 OOBIN_TOK_TABLE_ROW = 0x0200; /// Table reference: Single row.
-const sal_uInt16 OOBIN_TOK_TABLE_CELL = 0x0400; /// Table reference: Single cell.
+const sal_uInt16 BIFF12_TOK_TABLE_COLUMN = 0x0001; /// Table reference: Single column.
+const sal_uInt16 BIFF12_TOK_TABLE_COLRANGE = 0x0002; /// Table reference: Range of columns.
+const sal_uInt16 BIFF12_TOK_TABLE_ALL = 0x0004; /// Table reference: Special [#All] range.
+const sal_uInt16 BIFF12_TOK_TABLE_HEADERS = 0x0008; /// Table reference: Special [#Headers] range.
+const sal_uInt16 BIFF12_TOK_TABLE_DATA = 0x0010; /// Table reference: Special [#Data] range.
+const sal_uInt16 BIFF12_TOK_TABLE_TOTALS = 0x0020; /// Table reference: Special [#Totals] range.
+const sal_uInt16 BIFF12_TOK_TABLE_THISROW = 0x0040; /// Table reference: Special [#This Row] range.
+const sal_uInt16 BIFF12_TOK_TABLE_SP_BRACKETS = 0x0080; /// Table reference: Spaces in outer brackets.
+const sal_uInt16 BIFF12_TOK_TABLE_SP_SEP = 0x0100; /// Table reference: Spaces after separators.
+const sal_uInt16 BIFF12_TOK_TABLE_ROW = 0x0200; /// Table reference: Single row.
+const sal_uInt16 BIFF12_TOK_TABLE_CELL = 0x0400; /// Table reference: Single cell.
const sal_uInt8 BIFF_TOK_NLR_ERR = 0x01; /// NLR: Invalid/deleted.
const sal_uInt8 BIFF_TOK_NLR_ROWR = 0x02; /// NLR: Row index.
@@ -209,23 +200,21 @@ const sal_uInt32 BIFF_TOK_NLR_ADDMASK = 0x3FFFFFFF; /// Mask for num
// function constants ---------------------------------------------------------
-const sal_uInt8 OOX_MAX_PARAMCOUNT = 255; /// Maximum parameter count for OOXML/OOBIN files.
-const sal_uInt8 BIFF_MAX_PARAMCOUNT = 30; /// Maximum parameter count for BIFF files.
-
-const sal_uInt16 OOBIN_FUNC_IF = 1; /// OOBIN function id of the IF function.
-const sal_uInt16 OOBIN_FUNC_SUM = 4; /// OOBIN function id of the SUM function.
-const sal_uInt16 OOBIN_FUNC_TRUE = 34; /// OOBIN function id of the TRUE function.
-const sal_uInt16 OOBIN_FUNC_FALSE = 35; /// OOBIN function id of the FALSE function.
-const sal_uInt16 OOBIN_FUNC_ROWS = 76; /// OOBIN function id of the ROWS function.
-const sal_uInt16 OOBIN_FUNC_COLUMNS = 77; /// OOBIN function id of the COLUMNS function.
-const sal_uInt16 OOBIN_FUNC_OFFSET = 78; /// OOBIN function id of the OFFSET function.
-const sal_uInt16 OOBIN_FUNC_FLOOR = 285; /// OOBIN function id of the FLOOR function.
-const sal_uInt16 OOBIN_FUNC_CEILING = 288; /// OOBIN function id of the CEILING function.
-const sal_uInt16 OOBIN_FUNC_HYPERLINK = 359; /// OOBIN function id of the HYPERLINK function.
-const sal_uInt16 OOBIN_FUNC_WEEKNUM = 465; /// OOBIN function id of the WEEKNUM function.
-
-const sal_uInt16 BIFF_FUNC_SUM = 4; /// BIFF function id of the SUM function.
+const sal_uInt8 OOX_MAX_PARAMCOUNT = 255; /// Maximum parameter count for OOXML/BIFF12 files.
+const sal_uInt8 BIFF_MAX_PARAMCOUNT = 30; /// Maximum parameter count for BIFF2-BIFF8 files.
+
+const sal_uInt16 BIFF_FUNC_IF = 1; /// Function identifier of the IF function.
+const sal_uInt16 BIFF_FUNC_SUM = 4; /// Function identifier of the SUM function.
+const sal_uInt16 BIFF_FUNC_TRUE = 34; /// Function identifier of the TRUE function.
+const sal_uInt16 BIFF_FUNC_FALSE = 35; /// Function identifier of the FALSE function.
+const sal_uInt16 BIFF_FUNC_ROWS = 76; /// Function identifier of the ROWS function.
+const sal_uInt16 BIFF_FUNC_COLUMNS = 77; /// Function identifier of the COLUMNS function.
+const sal_uInt16 BIFF_FUNC_OFFSET = 78; /// Function identifier of the OFFSET function.
const sal_uInt16 BIFF_FUNC_EXTERNCALL = 255; /// BIFF function id of the EXTERN.CALL function.
+const sal_uInt16 BIFF_FUNC_FLOOR = 285; /// Function identifier of the FLOOR function.
+const sal_uInt16 BIFF_FUNC_CEILING = 288; /// Function identifier of the CEILING function.
+const sal_uInt16 BIFF_FUNC_HYPERLINK = 359; /// Function identifier of the HYPERLINK function.
+const sal_uInt16 BIFF_FUNC_WEEKNUM = 465; /// Function identifier of the WEEKNUM function.
// reference helpers ==========================================================
@@ -239,11 +228,11 @@ struct BinSingleRef2d
explicit BinSingleRef2d();
- void setOobData( sal_uInt16 nCol, sal_Int32 nRow, bool bRelativeAsOffset );
+ void setBiff12Data( sal_uInt16 nCol, sal_Int32 nRow, bool bRelativeAsOffset );
void setBiff2Data( sal_uInt8 nCol, sal_uInt16 nRow, bool bRelativeAsOffset );
void setBiff8Data( sal_uInt16 nCol, sal_uInt16 nRow, bool bRelativeAsOffset );
- void readOobData( RecordInputStream& rStrm, bool bRelativeAsOffset );
+ void readBiff12Data( SequenceInputStream& rStrm, bool bRelativeAsOffset );
void readBiff2Data( BiffInputStream& rStrm, bool bRelativeAsOffset );
void readBiff8Data( BiffInputStream& rStrm, bool bRelativeAsOffset );
};
@@ -256,7 +245,7 @@ struct BinComplexRef2d
BinSingleRef2d maRef1; /// Start (top-left) cell address.
BinSingleRef2d maRef2; /// End (bottom-right) cell address.
- void readOobData( RecordInputStream& rStrm, bool bRelativeAsOffset );
+ void readBiff12Data( SequenceInputStream& rStrm, bool bRelativeAsOffset );
void readBiff2Data( BiffInputStream& rStrm, bool bRelativeAsOffset );
void readBiff8Data( BiffInputStream& rStrm, bool bRelativeAsOffset );
};
@@ -495,8 +484,8 @@ struct FunctionInfo
::rtl::OUString maExtProgName; /// Programmatic function name for external functions.
FunctionLibraryType meFuncLibType; /// The external library this function is part of.
sal_Int32 mnApiOpCode; /// API function opcode.
- sal_uInt16 mnOobFuncId; /// OOBIN function identifier.
- sal_uInt16 mnBiffFuncId; /// BIFF function identifier.
+ sal_uInt16 mnBiff12FuncId; /// BIFF12 function identifier.
+ sal_uInt16 mnBiffFuncId; /// BIFF2-BIFF8 function identifier.
sal_uInt8 mnMinParamCount; /// Minimum number of parameters.
sal_uInt8 mnMaxParamCount; /// Maximum number of parameters.
sal_uInt8 mnRetClass; /// BIFF token class of the return value.
@@ -551,13 +540,13 @@ public:
/** Returns the function info for an ODF function name, or 0 on error. */
const FunctionInfo* getFuncInfoFromOdfFuncName( const ::rtl::OUString& rFuncName ) const;
- /** Returns the function info for an OOX function name, or 0 on error. */
+ /** Returns the function info for an OOXML function name, or 0 on error. */
const FunctionInfo* getFuncInfoFromOoxFuncName( const ::rtl::OUString& rFuncName ) const;
- /** Returns the function info for an OOBIN function index, or 0 on error. */
- const FunctionInfo* getFuncInfoFromOobFuncId( sal_uInt16 nFuncId ) const;
+ /** Returns the function info for a BIFF12 function index, or 0 on error. */
+ const FunctionInfo* getFuncInfoFromBiff12FuncId( sal_uInt16 nFuncId ) const;
- /** Returns the function info for a BIFF function index, or 0 on error. */
+ /** Returns the function info for a BIFF2-BIFF8 function index, or 0 on error. */
const FunctionInfo* getFuncInfoFromBiffFuncId( sal_uInt16 nFuncId ) const;
/** Returns the function info for a macro function referred by the
@@ -599,7 +588,7 @@ public:
/** Returns the function info for an API token, or 0 on error. */
const FunctionInfo* getFuncInfoFromApiToken( const ApiToken& rToken ) const;
- /** Returns the op-code map that is used by the OOX formula parser. */
+ /** Returns the op-code map that is used by the OOXML formula parser. */
::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaOpCodeMapEntry >
getOoxParserMap() const;
@@ -933,4 +922,3 @@ public:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/formulaparser.hxx b/oox/inc/oox/xls/formulaparser.hxx
index 0227e8efee6d..c595993264d9 100644
--- a/oox/inc/oox/xls/formulaparser.hxx
+++ b/oox/inc/oox/xls/formulaparser.hxx
@@ -100,9 +100,9 @@ private:
class FormulaParserImpl;
-/** Import formula parser for OOX and BIFF filters.
+/** Import formula parser for OOXML and BIFF filters.
- This class implements formula import for the OOX and BIFF filter. One
+ This class implements formula import for the OOXML and BIFF filter. One
instance is contained in the global filter data to prevent construction and
destruction of internal buffers for every imported formula.
*/
@@ -112,17 +112,17 @@ public:
explicit FormulaParser( const WorkbookHelper& rHelper );
virtual ~FormulaParser();
- /** Converts an XML formula string. */
+ /** Converts an OOXML formula string. */
void importFormula(
FormulaContext& rContext,
const ::rtl::OUString& rFormulaString ) const;
- /** Imports and converts a OOBIN token array from the passed stream. */
+ /** Imports and converts a BIFF12 token array from the passed stream. */
void importFormula(
FormulaContext& rContext,
- RecordInputStream& rStrm ) const;
+ SequenceInputStream& rStrm ) const;
- /** Imports and converts a BIFF token array from the passed stream.
+ /** Imports and converts a BIFF2-BIFF8 token array from the passed stream.
@param pnFmlaSize Size of the token array. If null is passed, reads
it from stream (1 byte in BIFF2, 2 bytes otherwise) first. */
void importFormula(
@@ -150,13 +150,16 @@ public:
::rtl::OUString importOleTargetLink( const ::rtl::OUString& rFormulaString );
/** Imports and converts an OLE link target from the passed stream. */
- ::rtl::OUString importOleTargetLink( RecordInputStream& rStrm );
+ ::rtl::OUString importOleTargetLink( SequenceInputStream& rStrm );
/** Imports and converts an OLE link target from the passed stream. */
::rtl::OUString importOleTargetLink(
BiffInputStream& rStrm,
const sal_uInt16* pnFmlaSize = 0 ) const;
+ /** Converts the passed formula to a macro name for a drawing shape. */
+ ::rtl::OUString importMacroName( const ::rtl::OUString& rFormulaString );
+
private:
::std::auto_ptr< FormulaParserImpl > mxImpl;
};
@@ -167,4 +170,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/numberformatsbuffer.hxx b/oox/inc/oox/xls/numberformatsbuffer.hxx
index 59a2c4e9324e..768572a5839c 100644
--- a/oox/inc/oox/xls/numberformatsbuffer.hxx
+++ b/oox/inc/oox/xls/numberformatsbuffer.hxx
@@ -29,7 +29,6 @@
#define OOX_XLS_NUMBERFORMATSBUFFER_HXX
#include <com/sun/star/lang/Locale.hpp>
-#include "oox/helper/containerhelper.hxx"
#include "oox/xls/workbookhelper.hxx"
namespace com { namespace sun { namespace star {
@@ -109,7 +108,7 @@ public:
/** Inserts a new number format code. */
NumberFormatRef importNumFmt( const AttributeList& rAttribs );
/** Inserts a new number format code from a NUMFMT record. */
- void importNumFmt( RecordInputStream& rStrm );
+ void importNumFmt( SequenceInputStream& rStrm );
/** Inserts a new number format code from a FORMAT record. */
void importFormat( BiffInputStream& rStrm );
@@ -137,4 +136,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/ooxformulaparser.hxx b/oox/inc/oox/xls/ooxformulaparser.hxx
index 1c20febf5f43..7bc1bbdd4909 100644
--- a/oox/inc/oox/xls/ooxformulaparser.hxx
+++ b/oox/inc/oox/xls/ooxformulaparser.hxx
@@ -109,4 +109,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/pagesettings.hxx b/oox/inc/oox/xls/pagesettings.hxx
index eb163daf94c8..6ff896b1bb51 100644
--- a/oox/inc/oox/xls/pagesettings.hxx
+++ b/oox/inc/oox/xls/pagesettings.hxx
@@ -83,8 +83,8 @@ struct PageSettingsModel
explicit PageSettingsModel();
- /** Sets the OOBIN or BIFF print errors mode. */
- void setBinPrintErrors( sal_uInt8 nPrintErrors );
+ /** Sets the BIFF print errors mode. */
+ void setBiffPrintErrors( sal_uInt8 nPrintErrors );
};
// ============================================================================
@@ -110,17 +110,17 @@ public:
void importPicture( const ::oox::core::Relations& rRelations, const AttributeList& rAttribs );
/** Imports the PRINTOPTIONS record from the passed stream. */
- void importPrintOptions( RecordInputStream& rStrm );
+ void importPrintOptions( SequenceInputStream& rStrm );
/** Imports the PAGEMARGINS record from the passed stream. */
- void importPageMargins( RecordInputStream& rStrm );
+ void importPageMargins( SequenceInputStream& rStrm );
/** Imports the PAGESETUP record from the passed stream. */
- void importPageSetup( const ::oox::core::Relations& rRelations, RecordInputStream& rStrm );
+ void importPageSetup( const ::oox::core::Relations& rRelations, SequenceInputStream& rStrm );
/** Imports the CHARTPAGESETUP record from the passed stream. */
- void importChartPageSetup( const ::oox::core::Relations& rRelations, RecordInputStream& rStrm );
+ void importChartPageSetup( const ::oox::core::Relations& rRelations, SequenceInputStream& rStrm );
/** Imports the HEADERFOOTER record from the passed stream. */
- void importHeaderFooter( RecordInputStream& rStrm );
+ void importHeaderFooter( SequenceInputStream& rStrm );
/** Imports the PICTURE record from the passed stream. */
- void importPicture( const ::oox::core::Relations& rRelations, RecordInputStream& rStrm );
+ void importPicture( const ::oox::core::Relations& rRelations, SequenceInputStream& rStrm );
/** Imports the LEFTMARGIN record from the passed BIFF stream. */
void importLeftMargin( BiffInputStream& rStrm );
@@ -217,4 +217,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/pivotcachebuffer.hxx b/oox/inc/oox/xls/pivotcachebuffer.hxx
index 8f79ab0685b3..2e32d0faa7e5 100644
--- a/oox/inc/oox/xls/pivotcachebuffer.hxx
+++ b/oox/inc/oox/xls/pivotcachebuffer.hxx
@@ -28,10 +28,10 @@
#ifndef OOX_XLS_PIVOTCACHEBUFFER_HXX
#define OOX_XLS_PIVOTCACHEBUFFER_HXX
-#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
-#include "oox/helper/containerhelper.hxx"
+#include <com/sun/star/util/DateTime.hpp>
+#include "oox/helper/refvector.hxx"
#include "oox/xls/workbookhelper.hxx"
namespace com { namespace sun { namespace star {
@@ -66,17 +66,17 @@ public:
void readIndex( const AttributeList& rAttribs );
/** Reads the string value from a pivot cache item. */
- void readString( RecordInputStream& rStrm );
+ void readString( SequenceInputStream& rStrm );
/** Reads the double value from a pivot cache item. */
- void readDouble( RecordInputStream& rStrm );
+ void readDouble( SequenceInputStream& rStrm );
/** Reads the date/time value from a pivot cache item. */
- void readDate( RecordInputStream& rStrm );
+ void readDate( SequenceInputStream& rStrm );
/** Reads the boolean value from a pivot cache item. */
- void readBool( RecordInputStream& rStrm );
+ void readBool( SequenceInputStream& rStrm );
/** Reads the error code value from a pivot cache item. */
- void readError( RecordInputStream& rStrm );
+ void readError( SequenceInputStream& rStrm );
/** Reads the index of a shared item. */
- void readIndex( RecordInputStream& rStrm );
+ void readIndex( SequenceInputStream& rStrm );
/** Reads the string value from a pivot cache item. */
void readString( BiffInputStream& rStrm, const WorkbookHelper& rHelper );
@@ -100,7 +100,7 @@ public:
private:
::com::sun::star::uno::Any maValue; /// Value of the item.
- sal_Int32 mnType; /// Value type (OOX token identifier).
+ sal_Int32 mnType; /// Value type (OOXML token identifier).
};
// ----------------------------------------------------------------------------
@@ -113,7 +113,7 @@ public:
/** Imports the item from the passed attribute list. */
void importItem( sal_Int32 nElement, const AttributeList& rAttribs );
/** Imports the item from the passed stream and record. */
- void importItem( sal_Int32 nRecId, RecordInputStream& rStrm );
+ void importItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
/** Imports a complete item list from the passed stream. */
void importItemList( BiffInputStream& rStrm, sal_uInt16 nCount );
@@ -131,7 +131,7 @@ private:
/** Creates and returns a new item at the end of the items list. */
PivotCacheItem& createItem();
/** Imports an array of items from the PCITEM_ARRAY record */
- void importArray( RecordInputStream& rStrm );
+ void importArray( SequenceInputStream& rStrm );
private:
typedef ::std::vector< PivotCacheItem > CacheItemVector;
@@ -196,8 +196,8 @@ struct PCFieldGroupModel
explicit PCFieldGroupModel();
- /** Sets the group-by value for BIFF/OOBIN import. */
- void setBinGroupBy( sal_uInt8 nGroupBy );
+ /** Sets the group-by value for BIFF import. */
+ void setBiffGroupBy( sal_uInt8 nGroupBy );
};
// ----------------------------------------------------------------------------
@@ -237,19 +237,19 @@ public:
void importGroupItem( sal_Int32 nElement, const AttributeList& rAttribs );
/** Imports pivot cache field settings from the PCDFIELD record. */
- void importPCDField( RecordInputStream& rStrm );
+ void importPCDField( SequenceInputStream& rStrm );
/** Imports shared items settings from the PCDFSHAREDITEMS record. */
- void importPCDFSharedItems( RecordInputStream& rStrm );
+ void importPCDFSharedItems( SequenceInputStream& rStrm );
/** Imports one or more shared items from the passed record. */
- void importPCDFSharedItem( sal_Int32 nRecId, RecordInputStream& rStrm );
+ void importPCDFSharedItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
/** Imports grouping settings from the PCDFIELDGROUP record. */
- void importPCDFieldGroup( RecordInputStream& rStrm );
+ void importPCDFieldGroup( SequenceInputStream& rStrm );
/** Imports numeric grouping settings from the PCDFRANGEPR record. */
- void importPCDFRangePr( RecordInputStream& rStrm );
+ void importPCDFRangePr( SequenceInputStream& rStrm );
/** Imports an item of the mapping between group items and base items from the passed record. */
- void importPCDFDiscretePrItem( sal_Int32 nRecId, RecordInputStream& rStrm );
+ void importPCDFDiscretePrItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
/** Imports one or more group items from the passed record. */
- void importPCDFGroupItem( sal_Int32 nRecId, RecordInputStream& rStrm );
+ void importPCDFGroupItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
/** Imports pivot cache field settings from the PCDFIELD record. */
void importPCDField( BiffInputStream& rStrm );
@@ -304,7 +304,7 @@ public:
const PivotCacheItem& rItem ) const;
/** Reads an item from the PCRECORD record and writes it to the passed sheet. */
- void importPCRecordItem( RecordInputStream& rStrm,
+ void importPCRecordItem( SequenceInputStream& rStrm,
WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow ) const;
/** Reads an item index from the PCITEM_INDEXLIST record and writes the item to the passed sheet. */
void importPCItemIndex( BiffInputStream& rStrm,
@@ -392,11 +392,11 @@ public:
void importWorksheetSource( const AttributeList& rAttribs, const ::oox::core::Relations& rRelations );
/** Reads pivot cache global settings from the PCDEFINITION record. */
- void importPCDefinition( RecordInputStream& rStrm );
+ void importPCDefinition( SequenceInputStream& rStrm );
/** Reads cache source settings from the PCDSOURCE record. */
- void importPCDSource( RecordInputStream& rStrm );
+ void importPCDSource( SequenceInputStream& rStrm );
/** Reads sheet source settings from the PCDSHEETSOURCE record. */
- void importPCDSheetSource( RecordInputStream& rStrm, const ::oox::core::Relations& rRelations );
+ void importPCDSheetSource( SequenceInputStream& rStrm, const ::oox::core::Relations& rRelations );
/** Reads cache source settings from the PCDSOURCE record. */
void importPCDSource( BiffInputStream& rStrm );
@@ -434,7 +434,7 @@ public:
const PivotCacheItem& rItem ) const;
/** Reads a PCRECORD record and writes all item values to the passed sheet. */
- void importPCRecord( RecordInputStream& rStrm,
+ void importPCRecord( SequenceInputStream& rStrm,
WorksheetHelper& rSheetHelper, sal_Int32 nRow ) const;
/** Reads a PCITEM_INDEXLIST record and writes all item values to the passed sheet. */
void importPCItemIndexList( BiffInputStream& rStrm,
@@ -479,9 +479,9 @@ class PivotCacheBuffer : public WorkbookHelper
public:
explicit PivotCacheBuffer( const WorkbookHelper& rHelper );
- /** Registers a pivot cache definition fragment. The fragment will be loaded on demand (OOX/OOBIN only). */
+ /** Registers a pivot cache definition fragment. The fragment will be loaded on demand (OOXML/BIFF12 only). */
void registerPivotCacheFragment( sal_Int32 nCacheId, const ::rtl::OUString& rFragmentPath );
- /** Reads the reference to a pivot cache stream. The stream will be loaded on demand (BIFF only). */
+ /** Reads the reference to a pivot cache stream. The stream will be loaded on demand (BIFF2-BIFF8 only). */
void importPivotCacheRef( BiffInputStream& rStrm );
/** Imports and stores a pivot cache definition fragment on first call,
@@ -508,4 +508,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/pivotcachefragment.hxx b/oox/inc/oox/xls/pivotcachefragment.hxx
index 745208f485e6..34a833e26525 100644
--- a/oox/inc/oox/xls/pivotcachefragment.hxx
+++ b/oox/inc/oox/xls/pivotcachefragment.hxx
@@ -38,18 +38,18 @@ class PivotCacheField;
// ============================================================================
-class OoxPivotCacheFieldContext : public OoxWorkbookContextBase
+class PivotCacheFieldContext : public WorkbookContextBase
{
public:
- explicit OoxPivotCacheFieldContext(
- OoxWorkbookFragmentBase& rFragment,
+ explicit PivotCacheFieldContext(
+ WorkbookFragmentBase& rFragment,
PivotCacheField& rCacheField );
protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
virtual void onStartElement( const AttributeList& rAttribs );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
- virtual void onStartRecord( RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ virtual void onStartRecord( SequenceInputStream& rStrm );
private:
PivotCacheField& mrCacheField;
@@ -57,17 +57,17 @@ private:
// ============================================================================
-class OoxPivotCacheDefinitionFragment : public OoxWorkbookFragmentBase
+class PivotCacheDefinitionFragment : public WorkbookFragmentBase
{
public:
- explicit OoxPivotCacheDefinitionFragment(
+ explicit PivotCacheDefinitionFragment(
const WorkbookHelper& rHelper,
const ::rtl::OUString& rFragmentPath,
PivotCache& rPivotCache );
protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
virtual const ::oox::core::RecordInfo* getRecordInfos() const;
virtual void finalizeImport();
@@ -77,23 +77,23 @@ private:
// ============================================================================
-class OoxPivotCacheRecordsFragment : public OoxWorksheetFragmentBase
+class PivotCacheRecordsFragment : public WorksheetFragmentBase
{
public:
- explicit OoxPivotCacheRecordsFragment(
+ explicit PivotCacheRecordsFragment(
const WorkbookHelper& rHelper,
const ::rtl::OUString& rFragmentPath,
const PivotCache& rPivotCache );
protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
virtual const ::oox::core::RecordInfo* getRecordInfos() const;
private:
void startCacheRecord();
- void importPCRecord( RecordInputStream& rStrm );
- void importPCRecordItem( sal_Int32 nRecId, RecordInputStream& rStrm );
+ void importPCRecord( SequenceInputStream& rStrm );
+ void importPCRecordItem( sal_Int32 nRecId, SequenceInputStream& rStrm );
private:
const PivotCache& mrPivotCache;
@@ -126,12 +126,12 @@ class BiffPivotCacheRecordsContext : public BiffWorksheetContextBase
{
public:
explicit BiffPivotCacheRecordsContext(
- const BiffWorkbookFragmentBase& rFragment,
+ const WorkbookHelper& rHelper,
const PivotCache& rPivotCache );
/** Reads the current record from stream and tries to insert a cell into
the source data sheet. */
- virtual void importRecord();
+ virtual void importRecord( BiffInputStream& rStrm );
private:
void startNextRow();
@@ -153,4 +153,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/pivottablebuffer.hxx b/oox/inc/oox/xls/pivottablebuffer.hxx
index 6fde212f0018..7732037bd579 100644
--- a/oox/inc/oox/xls/pivottablebuffer.hxx
+++ b/oox/inc/oox/xls/pivottablebuffer.hxx
@@ -29,9 +29,8 @@
#define OOX_XLS_PIVOTTABLEBUFFER_HXX
#include <com/sun/star/table/CellRangeAddress.hpp>
-#include "oox/helper/containerhelper.hxx"
#include "oox/xls/pivotcachebuffer.hxx"
-#include "oox/xls/workbookhelper.hxx"
+#include "oox/xls/stylesbuffer.hxx"
namespace com { namespace sun { namespace star {
namespace sheet { class XDataPilotDescriptor; }
@@ -54,8 +53,8 @@ struct PTFieldItemModel
explicit PTFieldItemModel();
- /** Sets item type for BIFF/OOBIN import. */
- void setBinType( sal_uInt16 nType );
+ /** Sets item type for BIFF import. */
+ void setBiffType( sal_uInt16 nType );
};
// ----------------------------------------------------------------------------
@@ -93,8 +92,8 @@ struct PTFieldModel
explicit PTFieldModel();
- /** Sets axis type for BIFF/OOBIN import. */
- void setBinAxis( sal_uInt8 nAxisFlags );
+ /** Sets axis type for BIFF import. */
+ void setBiffAxis( sal_uInt8 nAxisFlags );
};
// ----------------------------------------------------------------------------
@@ -122,10 +121,10 @@ struct PTDataFieldModel
explicit PTDataFieldModel();
- /** Sets the subtotal aggregation function for BIFF/OOBIN import. */
- void setBinSubtotal( sal_Int32 nSubtotal );
- /** Sets the 'show data as' type for BIFF/OOBIN import. */
- void setBinShowDataAs( sal_Int32 nShowDataAs );
+ /** Sets the subtotal aggregation function for BIFF import. */
+ void setBiffSubtotal( sal_Int32 nSubtotal );
+ /** Sets the 'show data as' type for BIFF import. */
+ void setBiffShowDataAs( sal_Int32 nShowDataAs );
};
// ----------------------------------------------------------------------------
@@ -145,13 +144,13 @@ public:
void importReferenceItem( const AttributeList& rAttribs );
/** Imports pivot field settings from the PTFIELD record. */
- void importPTField( RecordInputStream& rStrm );
+ void importPTField( SequenceInputStream& rStrm );
/** Imports settings of an item in this pivot field from the PTFITEM record. */
- void importPTFItem( RecordInputStream& rStrm );
+ void importPTFItem( SequenceInputStream& rStrm );
/** Imports pivot field reference settings from the PTREFERENCE record. */
- void importPTReference( RecordInputStream& rStrm );
+ void importPTReference( SequenceInputStream& rStrm );
/** Imports pivot field item reference settings from the PTREFERENCEITEM record. */
- void importPTReferenceItem( RecordInputStream& rStrm );
+ void importPTReferenceItem( SequenceInputStream& rStrm );
/** Imports pivot field settings from the PTFIELD and following records. */
void importPTField( BiffInputStream& rStrm );
@@ -235,9 +234,9 @@ public:
void importTop10( const AttributeList& rAttribs );
/** Reads the settings of a field filter from the PTFILTER record. */
- void importPTFilter( RecordInputStream& rStrm );
+ void importPTFilter( SequenceInputStream& rStrm );
/** Reads additional settings of a field filter from the TOP10FILTER record. */
- void importTop10Filter( RecordInputStream& rStrm );
+ void importTop10Filter( SequenceInputStream& rStrm );
/** Applies the filter to the associated pivot table field if possible. */
void finalizeImport();
@@ -249,7 +248,7 @@ private:
// ============================================================================
-struct PTDefinitionModel
+struct PTDefinitionModel : public AutoFormatModel
{
::rtl::OUString maName;
::rtl::OUString maDataCaption;
@@ -281,6 +280,7 @@ struct PTDefinitionModel
bool mbPrintDrill;
bool mbEnableDrill;
bool mbPreserveFormatting;
+ bool mbUseAutoFormat;
bool mbPageOverThenDown;
bool mbSubtotalHiddenItems;
bool mbRowGrandTotals;
@@ -333,17 +333,17 @@ public:
void importDataField( const AttributeList& rAttribs );
/** Reads global pivot table settings from the PTDEFINITION record. */
- void importPTDefinition( RecordInputStream& rStrm );
+ void importPTDefinition( SequenceInputStream& rStrm );
/** Reads the location of the pivot table from the PTLOCATION record. */
- void importPTLocation( RecordInputStream& rStrm, sal_Int16 nSheet );
+ void importPTLocation( SequenceInputStream& rStrm, sal_Int16 nSheet );
/** Reads the indexes of all fields located in the row dimension from a PTROWFIELDS record. */
- void importPTRowFields( RecordInputStream& rStrm );
+ void importPTRowFields( SequenceInputStream& rStrm );
/** Reads the indexes of all fields located in the column dimension from a PTCOLFIELDS record. */
- void importPTColFields( RecordInputStream& rStrm );
+ void importPTColFields( SequenceInputStream& rStrm );
/** Reads the settings of a field located in the page dimension from the PTPAGEFIELD record. */
- void importPTPageField( RecordInputStream& rStrm );
+ void importPTPageField( SequenceInputStream& rStrm );
/** Reads the settings of a field located in the data dimension from the PTDATAFIELD record. */
- void importPTDataField( RecordInputStream& rStrm );
+ void importPTDataField( SequenceInputStream& rStrm );
/** Reads global pivot table settings from the PTDEFINITION record. */
void importPTDefinition( BiffInputStream& rStrm, sal_Int16 nSheet );
@@ -403,7 +403,7 @@ private:
/** Reads a field index for the row or column dimension. */
static void importField( IndexVector& orFields, const AttributeList& rAttribs );
/** Reads an array of field indexes for the row or column dimension. */
- static void importFields( IndexVector& orFields, RecordInputStream& rStrm );
+ static void importFields( IndexVector& orFields, SequenceInputStream& rStrm );
/** Reads an array of field indexes for the row or column dimension. */
static void importFields( IndexVector& orFields, BiffInputStream& rStrm, sal_Int32 nCount );
@@ -446,4 +446,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/pivottablefragment.hxx b/oox/inc/oox/xls/pivottablefragment.hxx
index 59c86b4ba3cb..aafae063990c 100644
--- a/oox/inc/oox/xls/pivottablefragment.hxx
+++ b/oox/inc/oox/xls/pivottablefragment.hxx
@@ -40,18 +40,18 @@ class PivotTableFilter;
// ============================================================================
-class OoxPivotTableFieldContext : public OoxWorksheetContextBase
+class PivotTableFieldContext : public WorksheetContextBase
{
public:
- explicit OoxPivotTableFieldContext(
- OoxWorksheetFragmentBase& rFragment,
+ explicit PivotTableFieldContext(
+ WorksheetFragmentBase& rFragment,
PivotTableField& rTableField );
protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
virtual void onStartElement( const AttributeList& rAttribs );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
- virtual void onStartRecord( RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ virtual void onStartRecord( SequenceInputStream& rStrm );
private:
PivotTableField& mrTableField;
@@ -59,18 +59,18 @@ private:
// ============================================================================
-class OoxPivotTableFilterContext : public OoxWorksheetContextBase
+class PivotTableFilterContext : public WorksheetContextBase
{
public:
- explicit OoxPivotTableFilterContext(
- OoxWorksheetFragmentBase& rFragment,
+ explicit PivotTableFilterContext(
+ WorksheetFragmentBase& rFragment,
PivotTableFilter& rTableFilter );
protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
virtual void onStartElement( const AttributeList& rAttribs );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
- virtual void onStartRecord( RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ virtual void onStartRecord( SequenceInputStream& rStrm );
private:
PivotTableFilter& mrTableFilter;
@@ -78,16 +78,16 @@ private:
// ============================================================================
-class OoxPivotTableFragment : public OoxWorksheetFragmentBase
+class PivotTableFragment : public WorksheetFragmentBase
{
public:
- explicit OoxPivotTableFragment(
+ explicit PivotTableFragment(
const WorksheetHelper& rHelper,
const ::rtl::OUString& rFragmentPath );
protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
virtual const ::oox::core::RecordInfo* getRecordInfos() const;
private:
@@ -100,10 +100,10 @@ private:
class BiffPivotTableContext : public BiffWorksheetContextBase
{
public:
- explicit BiffPivotTableContext( const BiffWorksheetFragmentBase& rFragment, PivotTable& rPivotTable );
+ explicit BiffPivotTableContext( const WorksheetHelper& rHelper );
/** Imports all records related to the current pivot table. */
- virtual void importRecord();
+ virtual void importRecord( BiffInputStream& rStrm );
private:
PivotTable& mrPivotTable;
@@ -115,4 +115,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/querytablebuffer.hxx b/oox/inc/oox/xls/querytablebuffer.hxx
new file mode 100644
index 000000000000..fa67ca8874c0
--- /dev/null
+++ b/oox/inc/oox/xls/querytablebuffer.hxx
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_XLS_QUERYTABLEBUFFER_HXX
+#define OOX_XLS_QUERYTABLEBUFFER_HXX
+
+#include "oox/xls/stylesbuffer.hxx"
+#include "oox/xls/worksheethelper.hxx"
+
+namespace oox {
+namespace xls {
+
+// ============================================================================
+
+struct QueryTableModel : public AutoFormatModel
+{
+ ::rtl::OUString maDefName; /// Defined name containing the target cell range.
+ sal_Int32 mnConnId; /// Identifier of the external connection used to query the data.
+ sal_Int32 mnGrowShrinkType; /// Behaviour when source data size changes.
+ bool mbHeaders; /// True = source data contains a header row.
+ bool mbRowNumbers; /// True = first column contains row numbers.
+ bool mbDisableRefresh; /// True = refreshing data disabled.
+ bool mbBackground; /// True = refresh asynchronously.
+ bool mbFirstBackground; /// True = first background refresh not yet finished.
+ bool mbRefreshOnLoad; /// True = refresh table after import.
+ bool mbFillFormulas; /// True = expand formulas next to range when source data grows.
+ bool mbRemoveDataOnSave; /// True = remove querried data before saving.
+ bool mbDisableEdit; /// True = connection locked for editing.
+ bool mbPreserveFormat; /// True = use existing formatting for new rows.
+ bool mbAdjustColWidth; /// True = adjust column widths after refresh.
+ bool mbIntermediate; /// True = query table defined but not built yet.
+
+ explicit QueryTableModel();
+};
+
+// ----------------------------------------------------------------------------
+
+class QueryTable : public WorksheetHelper
+{
+public:
+ explicit QueryTable( const WorksheetHelper& rHelper );
+
+ /** Imports query table settings from the queryTable element. */
+ void importQueryTable( const AttributeList& rAttribs );
+ /** Imports query table settings from the QUERYTABLE record. */
+ void importQueryTable( SequenceInputStream& rStrm );
+
+ /** Imports query table settings from the QUERYTABLE record. */
+ void importQueryTable( BiffInputStream& rStrm );
+ /** Imports query table settings from the QUERYTABLEREFRESH record. */
+ void importQueryTableRefresh( BiffInputStream& rStrm );
+ /** Imports query table settings from the QUERYTABLESETTINGS record. */
+ void importQueryTableSettings( BiffInputStream& rStrm );
+
+ /** Inserts a web query into the sheet. */
+ void finalizeImport();
+
+private:
+ QueryTableModel maModel;
+};
+
+// ============================================================================
+
+class QueryTableBuffer : public WorksheetHelper
+{
+public:
+ explicit QueryTableBuffer( const WorksheetHelper& rHelper );
+
+ /** Creates a new query table and stores it into the internal vector. */
+ QueryTable& createQueryTable();
+
+ /** Inserts all web queries into the sheet. */
+ void finalizeImport();
+
+private:
+ typedef RefVector< QueryTable > QueryTableVector;
+ QueryTableVector maQueryTables;
+};
+
+// ============================================================================
+
+} // namespace xls
+} // namespace oox
+
+#endif
diff --git a/oox/inc/oox/xls/querytablefragment.hxx b/oox/inc/oox/xls/querytablefragment.hxx
index 3702069b4859..6eb561aa5a5e 100644
--- a/oox/inc/oox/xls/querytablefragment.hxx
+++ b/oox/inc/oox/xls/querytablefragment.hxx
@@ -33,19 +33,39 @@
namespace oox {
namespace xls {
+class QueryTable;
+
// ============================================================================
-class OoxQueryTableFragment : public OoxWorkbookFragmentBase
+class QueryTableFragment : public WorksheetFragmentBase
{
public:
- explicit OoxQueryTableFragment(
- const WorkbookHelper& rHelper,
+ explicit QueryTableFragment(
+ const WorksheetHelper& rHelper,
const ::rtl::OUString& rFragmentPath );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
+
+ virtual const ::oox::core::RecordInfo* getRecordInfos() const;
+
+private:
+ QueryTable& mrQueryTable;
+};
+
+// ============================================================================
+
+class BiffQueryTableContext : public BiffWorksheetContextBase
+{
+public:
+ explicit BiffQueryTableContext( const WorksheetHelper& rHelper );
+
+ /** Imports all records related to the current query table. */
+ virtual void importRecord( BiffInputStream& rStrm );
+
+private:
+ QueryTable& mrQueryTable;
};
// ============================================================================
@@ -54,4 +74,3 @@ protected:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/richstring.hxx b/oox/inc/oox/xls/richstring.hxx
index 6293aac4d340..f21e2a021111 100644
--- a/oox/inc/oox/xls/richstring.hxx
+++ b/oox/inc/oox/xls/richstring.hxx
@@ -28,7 +28,7 @@
#ifndef OOX_XLS_RICHSTRING_HXX
#define OOX_XLS_RICHSTRING_HXX
-#include "oox/helper/containerhelper.hxx"
+#include "oox/helper/refvector.hxx"
#include "oox/xls/stylesbuffer.hxx"
namespace com { namespace sun { namespace star {
@@ -110,7 +110,7 @@ struct FontPortionModel
explicit inline FontPortionModel( sal_Int32 nPos, sal_Int32 nFontId ) :
mnPos( nPos ), mnFontId( nFontId ) {}
- void read( RecordInputStream& rStrm );
+ void read( SequenceInputStream& rStrm );
void read( BiffInputStream& rStrm, BiffFontPortionMode eMode );
};
@@ -125,7 +125,7 @@ public:
/** Appends a rich-string font identifier. */
void appendPortion( const FontPortionModel& rPortion );
/** Reads count and font identifiers from the passed stream. */
- void importPortions( RecordInputStream& rStrm );
+ void importPortions( SequenceInputStream& rStrm );
/** Reads nCount font identifiers from the passed stream. */
void importPortions( BiffInputStream& rStrm, sal_uInt16 nCount, BiffFontPortionMode eMode );
/** Reads count and font identifiers from the passed stream. */
@@ -143,7 +143,7 @@ struct PhoneticDataModel
explicit PhoneticDataModel();
/** Sets the passed data from binary import. */
- void setBinData( sal_Int32 nType, sal_Int32 nAlignment );
+ void setBiffData( sal_Int32 nType, sal_Int32 nAlignment );
};
// ----------------------------------------------------------------------------
@@ -156,12 +156,12 @@ public:
/** Imports phonetic settings from the phoneticPr element. */
void importPhoneticPr( const AttributeList& rAttribs );
/** Imports phonetic settings from the PHONETICPR record. */
- void importPhoneticPr( RecordInputStream& rStrm );
+ void importPhoneticPr( SequenceInputStream& rStrm );
/** Imports phonetic settings from the PHONETICPR record. */
void importPhoneticPr( BiffInputStream& rStrm );
/** Imports phonetic settings from a rich string. */
- void importStringData( RecordInputStream& rStrm );
+ void importStringData( SequenceInputStream& rStrm );
/** Imports phonetic settings from a rich string. */
void importStringData( BiffInputStream& rStrm );
@@ -206,7 +206,7 @@ struct PhoneticPortionModel
explicit inline PhoneticPortionModel( sal_Int32 nPos, sal_Int32 nBasePos, sal_Int32 nBaseLen ) :
mnPos( nPos ), mnBasePos( nBasePos ), mnBaseLen( nBaseLen ) {}
- void read( RecordInputStream& rStrm );
+ void read( SequenceInputStream& rStrm );
void read( BiffInputStream& rStrm );
};
@@ -221,7 +221,7 @@ public:
/** Appends a rich-string phonetic portion. */
void appendPortion( const PhoneticPortionModel& rPortion );
/** Reads all phonetic portions from the passed stream. */
- void importPortions( RecordInputStream& rStrm );
+ void importPortions( SequenceInputStream& rStrm );
/** Reads phonetic portion data from the passed stream. */
::rtl::OUString importPortions( BiffInputStream& rStrm, sal_Int32 nPhoneticSize );
};
@@ -244,7 +244,7 @@ public:
void importPhoneticPr( const AttributeList& rAttribs );
/** Imports a Unicode rich-string from the passed record stream. */
- void importString( RecordInputStream& rStrm, bool bRich );
+ void importString( SequenceInputStream& rStrm, bool bRich );
/** Imports a byte string from the passed BIFF stream. */
void importByteString( BiffInputStream& rStrm, rtl_TextEncoding eDefaultTextEnc, BiffStringFlags nFlags = BIFF_STR_DEFAULT );
@@ -292,4 +292,3 @@ typedef ::boost::shared_ptr< RichString > RichStringRef;
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/richstringcontext.hxx b/oox/inc/oox/xls/richstringcontext.hxx
index 53882641df7e..df3f412d87ec 100644
--- a/oox/inc/oox/xls/richstringcontext.hxx
+++ b/oox/inc/oox/xls/richstringcontext.hxx
@@ -36,17 +36,15 @@ namespace xls {
// ============================================================================
-class OoxRichStringContext : public OoxWorkbookContextBase
+class RichStringContext : public WorkbookContextBase
{
public:
template< typename ParentType >
- explicit OoxRichStringContext( ParentType& rParent, RichStringRef xString );
+ explicit RichStringContext( ParentType& rParent, RichStringRef xString );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual void onEndElement( const ::rtl::OUString& rChars );
+ virtual void onCharacters( const ::rtl::OUString& rChars );
private:
RichStringRef mxString; /// Processed string.
@@ -58,11 +56,11 @@ private:
// ----------------------------------------------------------------------------
template< typename ParentType >
-OoxRichStringContext::OoxRichStringContext( ParentType& rParent, RichStringRef xString ) :
- OoxWorkbookContextBase( rParent ),
+RichStringContext::RichStringContext( ParentType& rParent, RichStringRef xString ) :
+ WorkbookContextBase( rParent ),
mxString( xString )
{
- OSL_ENSURE( mxString.get(), "OoxRichStringContext::OoxRichStringContext - missing string object" );
+ OSL_ENSURE( mxString.get(), "RichStringContext::RichStringContext - missing string object" );
}
// ============================================================================
@@ -71,4 +69,3 @@ OoxRichStringContext::OoxRichStringContext( ParentType& rParent, RichStringRef x
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/scenariobuffer.hxx b/oox/inc/oox/xls/scenariobuffer.hxx
index 8c2e0b0f1065..ed8d4e919bd2 100644
--- a/oox/inc/oox/xls/scenariobuffer.hxx
+++ b/oox/inc/oox/xls/scenariobuffer.hxx
@@ -29,7 +29,8 @@
#define OOX_XLS_SCENARIOBUFFER_HXX
#include <com/sun/star/table/CellAddress.hpp>
-#include "oox/helper/containerhelper.hxx"
+#include "oox/helper/refmap.hxx"
+#include "oox/helper/refvector.hxx"
#include "oox/xls/workbookhelper.hxx"
namespace oox {
@@ -73,9 +74,9 @@ public:
void importInputCells( const AttributeList& rAttribs );
/** Imports a scenario definition from a SCENARIO record. */
- void importScenario( RecordInputStream& rStrm );
+ void importScenario( SequenceInputStream& rStrm );
/** Imports a new cell for this scenario from a INPUTCELLS record. */
- void importInputCells( RecordInputStream& rStrm );
+ void importInputCells( SequenceInputStream& rStrm );
/** Imports a scenario definition from a SCENARIO record. */
void importScenario( BiffInputStream& rStrm );
@@ -111,7 +112,7 @@ public:
/** Imports sheet scenario settings from a scenarios element. */
void importScenarios( const AttributeList& rAttribs );
/** Imports sheet scenario settings from a SCENARIOS record. */
- void importScenarios( RecordInputStream& rStrm );
+ void importScenarios( SequenceInputStream& rStrm );
/** Imports sheet scenario settings from a SCENARIOS record. */
void importScenarios( BiffInputStream& rStrm );
@@ -152,4 +153,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/scenariocontext.hxx b/oox/inc/oox/xls/scenariocontext.hxx
index f3286f144656..3e6ccc5c22d6 100644
--- a/oox/inc/oox/xls/scenariocontext.hxx
+++ b/oox/inc/oox/xls/scenariocontext.hxx
@@ -38,17 +38,17 @@ class SheetScenarios;
// ============================================================================
-class OoxScenarioContext : public OoxWorksheetContextBase
+class ScenarioContext : public WorksheetContextBase
{
public:
- explicit OoxScenarioContext( OoxWorksheetContextBase& rParent, SheetScenarios& rSheetScenarios );
+ explicit ScenarioContext( WorksheetContextBase& rParent, SheetScenarios& rSheetScenarios );
protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
virtual void onStartElement( const AttributeList& rAttribs );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
- virtual void onStartRecord( RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ virtual void onStartRecord( SequenceInputStream& rStrm );
private:
Scenario& mrScenario;
@@ -56,17 +56,17 @@ private:
// ============================================================================
-class OoxScenariosContext : public OoxWorksheetContextBase
+class ScenariosContext : public WorksheetContextBase
{
public:
- explicit OoxScenariosContext( OoxWorksheetFragmentBase& rFragment );
+ explicit ScenariosContext( WorksheetFragmentBase& rFragment );
protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
virtual void onStartElement( const AttributeList& rAttribs );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
- virtual void onStartRecord( RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
+ virtual void onStartRecord( SequenceInputStream& rStrm );
private:
SheetScenarios& mrSheetScenarios;
@@ -78,4 +78,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/sharedformulabuffer.hxx b/oox/inc/oox/xls/sharedformulabuffer.hxx
index 0f9fb0bb093e..94b7572dcfd9 100644
--- a/oox/inc/oox/xls/sharedformulabuffer.hxx
+++ b/oox/inc/oox/xls/sharedformulabuffer.hxx
@@ -61,12 +61,12 @@ class SharedFormulaBuffer : public WorksheetHelper
public:
explicit SharedFormulaBuffer( const WorksheetHelper& rHelper );
- /** Imports a shared formula from a OOX formula string. */
+ /** Imports a shared formula from a OOXML formula string. */
void importSharedFmla( const ::rtl::OUString& rFormula,
const ::rtl::OUString& rSharedRange, sal_Int32 nId,
const ::com::sun::star::table::CellAddress& rBaseAddr );
/** Imports a shared formula from a SHAREDFORMULA record in the passed stream */
- void importSharedFmla( RecordInputStream& rStrm,
+ void importSharedFmla( SequenceInputStream& rStrm,
const ::com::sun::star::table::CellAddress& rBaseAddr );
/** Imports a shared formula from a SHAREDFMLA record in the passed stream. */
void importSharedFmla( BiffInputStream& rStrm,
@@ -109,4 +109,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/sharedstringsbuffer.hxx b/oox/inc/oox/xls/sharedstringsbuffer.hxx
index 27827ec215ed..eff8ab4e7738 100644
--- a/oox/inc/oox/xls/sharedstringsbuffer.hxx
+++ b/oox/inc/oox/xls/sharedstringsbuffer.hxx
@@ -28,7 +28,6 @@
#ifndef OOX_XLS_SHAREDSTRINGSBUFFER_HXX
#define OOX_XLS_SHAREDSTRINGSBUFFER_HXX
-#include "oox/helper/containerhelper.hxx"
#include "oox/xls/richstring.hxx"
namespace oox {
@@ -67,4 +66,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/sharedstringsfragment.hxx b/oox/inc/oox/xls/sharedstringsfragment.hxx
index 7294643b7df5..bc3a23122d19 100644
--- a/oox/inc/oox/xls/sharedstringsfragment.hxx
+++ b/oox/inc/oox/xls/sharedstringsfragment.hxx
@@ -35,21 +35,16 @@ namespace xls {
// ============================================================================
-class OoxSharedStringsFragment : public OoxWorkbookFragmentBase
+class SharedStringsFragment : public WorkbookFragmentBase
{
public:
- explicit OoxSharedStringsFragment(
+ explicit SharedStringsFragment(
const WorkbookHelper& rHelper,
const ::rtl::OUString& rFragmentPath );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
-
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
-
- // oox.core.FragmentHandler2 interface ------------------------------------
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
virtual const ::oox::core::RecordInfo* getRecordInfos() const;
virtual void finalizeImport();
@@ -61,4 +56,3 @@ protected:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/sheetdatacontext.hxx b/oox/inc/oox/xls/sheetdatacontext.hxx
index a77f4b285fa4..fdbc0ba21231 100644
--- a/oox/inc/oox/xls/sheetdatacontext.hxx
+++ b/oox/inc/oox/xls/sheetdatacontext.hxx
@@ -45,18 +45,17 @@ namespace xls {
The sheetData element contains all row settings and all cells in a single
sheet of a spreadsheet document.
*/
-class OoxSheetDataContext : public OoxWorksheetContextBase
+class SheetDataContext : public WorksheetContextBase
{
public:
- explicit OoxSheetDataContext( OoxWorksheetFragmentBase& rFragment );
+ explicit SheetDataContext( WorksheetFragmentBase& rFragment );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual void onEndElement( const ::rtl::OUString& rChars );
+ virtual void onCharacters( const ::rtl::OUString& rChars );
+ virtual void onEndElement();
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
private:
/** Different types of cell records. */
@@ -70,35 +69,35 @@ private:
void importFormula( const AttributeList& rAttribs );
/** Imports a cell address and the following XF identifier. */
- void importCellHeader( RecordInputStream& rStrm, CellType eCellType );
+ void importCellHeader( SequenceInputStream& rStrm, CellType eCellType );
/** Imports an empty cell from a CELL_BLANK or MULTCELL_BLANK record. */
- void importCellBlank( RecordInputStream& rStrm, CellType eCellType );
+ void importCellBlank( SequenceInputStream& rStrm, CellType eCellType );
/** Imports a boolean cell from a CELL_BOOL, MULTCELL_BOOL, or FORMULA_BOOL record. */
- void importCellBool( RecordInputStream& rStrm, CellType eCellType );
+ void importCellBool( SequenceInputStream& rStrm, CellType eCellType );
/** Imports a numeric cell from a CELL_DOUBLE, MULTCELL_DOUBLE, or FORMULA_DOUBLE record. */
- void importCellDouble( RecordInputStream& rStrm, CellType eCellType );
+ void importCellDouble( SequenceInputStream& rStrm, CellType eCellType );
/** Imports an error code cell from a CELL_ERROR, MULTCELL_ERROR, or FORMULA_ERROR record. */
- void importCellError( RecordInputStream& rStrm, CellType eCellType );
+ void importCellError( SequenceInputStream& rStrm, CellType eCellType );
/** Imports an encoded numeric cell from a CELL_RK or MULTCELL_RK record. */
- void importCellRk( RecordInputStream& rStrm, CellType eCellType );
+ void importCellRk( SequenceInputStream& rStrm, CellType eCellType );
/** Imports a rich-string cell from a CELL_RSTRING or MULTCELL_RSTRING record. */
- void importCellRString( RecordInputStream& rStrm, CellType eCellType );
+ void importCellRString( SequenceInputStream& rStrm, CellType eCellType );
/** Imports a string cell from a CELL_SI or MULTCELL_SI record. */
- void importCellSi( RecordInputStream& rStrm, CellType eCellType );
+ void importCellSi( SequenceInputStream& rStrm, CellType eCellType );
/** Imports a string cell from a CELL_STRING, MULTCELL_STRING, or FORMULA_STRING record. */
- void importCellString( RecordInputStream& rStrm, CellType eCellType );
+ void importCellString( SequenceInputStream& rStrm, CellType eCellType );
/** Imports a cell formula for the current cell. */
- void importCellFormula( RecordInputStream& rStrm );
+ void importCellFormula( SequenceInputStream& rStrm );
/** Imports row settings from a ROW record. */
- void importRow( RecordInputStream& rStrm );
+ void importRow( SequenceInputStream& rStrm );
/** Imports an array formula from an ARRAY record. */
- void importArray( RecordInputStream& rStrm );
+ void importArray( SequenceInputStream& rStrm );
/** Imports a shared formula from a SHAREDFORMULA record. */
- void importSharedFmla( RecordInputStream& rStrm );
+ void importSharedFmla( SequenceInputStream& rStrm );
/** Imports table operation from a DATATABLE record. */
- void importDataTable( RecordInputStream& rStrm );
+ void importDataTable( SequenceInputStream& rStrm );
private:
CellModel maCurrCell; /// Position and formatting of current imported cell.
@@ -114,49 +113,49 @@ private:
class BiffSheetDataContext : public BiffWorksheetContextBase
{
public:
- explicit BiffSheetDataContext( const BiffWorksheetFragmentBase& rParent );
+ explicit BiffSheetDataContext( const WorksheetHelper& rHelper );
/** Tries to import a sheet data record. */
- virtual void importRecord();
+ virtual void importRecord( BiffInputStream& rStrm );
private:
/** Sets current cell according to the passed address. */
void setCurrCell( const BinAddress& rAddr );
/** Imports an XF identifier and sets the mnXfId member. */
- void importXfId( bool bBiff2 );
+ void importXfId( BiffInputStream& rStrm, bool bBiff2 );
/** Imports a BIFF cell address and the following XF identifier. */
- void importCellHeader( bool bBiff2 );
+ void importCellHeader( BiffInputStream& rStrm, bool bBiff2 );
/** Imports a BLANK record describing a blank but formatted cell. */
- void importBlank();
+ void importBlank( BiffInputStream& rStrm );
/** Imports a BOOLERR record describing a boolean or error code cell. */
- void importBoolErr();
+ void importBoolErr( BiffInputStream& rStrm );
/** Imports a FORMULA record describing a formula cell. */
- void importFormula();
+ void importFormula( BiffInputStream& rStrm );
/** Imports an INTEGER record describing a BIFF2 integer cell. */
- void importInteger();
+ void importInteger( BiffInputStream& rStrm );
/** Imports a LABEL record describing an unformatted string cell. */
- void importLabel();
+ void importLabel( BiffInputStream& rStrm );
/** Imports a LABELSST record describing a string cell using the shared string list. */
- void importLabelSst();
+ void importLabelSst( BiffInputStream& rStrm );
/** Imports a MULTBLANK record describing a range of blank but formatted cells. */
- void importMultBlank();
+ void importMultBlank( BiffInputStream& rStrm );
/** Imports a MULTRK record describing a range of numeric cells. */
- void importMultRk();
+ void importMultRk( BiffInputStream& rStrm );
/** Imports a NUMBER record describing a floating-point cell. */
- void importNumber();
+ void importNumber( BiffInputStream& rStrm );
/** Imports an RK record describing a numeric cell. */
- void importRk();
+ void importRk( BiffInputStream& rStrm );
/** Imports row settings from a ROW record. */
- void importRow();
+ void importRow( BiffInputStream& rStrm );
/** Imports an ARRAY record describing an array formula of a cell range. */
- void importArray();
+ void importArray( BiffInputStream& rStrm );
/** Imports a SHAREDFMLA record describing a shared formula in a cell range. */
- void importSharedFmla();
+ void importSharedFmla( BiffInputStream& rStrm );
/** Imports table operation from a DATATABLE or DATATABLE2 record. */
- void importDataTable();
+ void importDataTable( BiffInputStream& rStrm );
private:
CellModel maCurrCell; /// Position and formatting of current imported cell.
@@ -171,4 +170,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/stylesbuffer.hxx b/oox/inc/oox/xls/stylesbuffer.hxx
index 4fa9c964108e..64a56968aa37 100644
--- a/oox/inc/oox/xls/stylesbuffer.hxx
+++ b/oox/inc/oox/xls/stylesbuffer.hxx
@@ -29,14 +29,15 @@
#define OOX_XLS_STYLESBUFFER_HXX
#include <com/sun/star/awt/FontDescriptor.hpp>
-#include <com/sun/star/util/CellProtection.hpp>
#include <com/sun/star/table/CellHoriJustify.hpp>
#include <com/sun/star/table/CellOrientation.hpp>
#include <com/sun/star/table/CellVertJustify.hpp>
#include <com/sun/star/table/TableBorder.hpp>
-#include "oox/helper/containerhelper.hxx"
-#include "oox/helper/graphichelper.hxx"
+#include <com/sun/star/util/CellProtection.hpp>
#include "oox/drawingml/color.hxx"
+#include "oox/helper/graphichelper.hxx"
+#include "oox/helper/refmap.hxx"
+#include "oox/helper/refvector.hxx"
#include "oox/xls/numberformatsbuffer.hxx"
namespace com { namespace sun { namespace star {
@@ -111,11 +112,11 @@ public:
void importColor( const AttributeList& rAttribs );
/** Imports a 64-bit color from the passed binary stream. */
- void importColor( RecordInputStream& rStrm );
- /** Imports a 32-bit palette color identifier from the passed OOBIN stream. */
- void importColorId( RecordInputStream& rStrm );
- /** Imports a 32-bit RGBA color value from the passed OOBIN stream. */
- void importColorRgb( RecordInputStream& rStrm );
+ void importColor( SequenceInputStream& rStrm );
+ /** Imports a 32-bit palette color identifier from the passed BIFF12 stream. */
+ void importColorId( SequenceInputStream& rStrm );
+ /** Imports a 32-bit RGBA color value from the passed BIFF12 stream. */
+ void importColorRgb( SequenceInputStream& rStrm );
/** Imports an 8-bit or 16-bit palette color identifier from the passed BIFF stream. */
void importColorId( BiffInputStream& rStrm, bool b16Bit = true );
@@ -128,7 +129,7 @@ public:
// ----------------------------------------------------------------------------
-RecordInputStream& operator>>( RecordInputStream& rStrm, Color& orColor );
+SequenceInputStream& operator>>( SequenceInputStream& rStrm, Color& orColor );
// ============================================================================
@@ -142,9 +143,11 @@ public:
/** Appends a new color from the passed attributes. */
void importPaletteColor( const AttributeList& rAttribs );
/** Appends a new color from the passed RGBCOLOR record. */
- void importPaletteColor( RecordInputStream& rStrm );
+ void importPaletteColor( SequenceInputStream& rStrm );
/** Imports the PALETTE record from the passed stream. */
void importPalette( BiffInputStream& rStrm );
+ /** Imports a color palette from a UNO sequence in the passed any. */
+ void importPalette( const ::com::sun::star::uno::Any& rPalette );
/** Rturns the RGB value of the color with the passed index. */
sal_Int32 getColor( sal_Int32 nPaletteIdx ) const;
@@ -179,7 +182,7 @@ struct FontModel
explicit FontModel();
- void setBinScheme( sal_uInt8 nScheme );
+ void setBiff12Scheme( sal_uInt8 nScheme );
void setBiffHeight( sal_uInt16 nHeight );
void setBiffWeight( sal_uInt16 nWeight );
void setBiffUnderline( sal_uInt16 nUnderline );
@@ -259,23 +262,23 @@ public:
void importAttribs( sal_Int32 nElement, const AttributeList& rAttribs );
/** Imports the FONT record from the passed stream. */
- void importFont( RecordInputStream& rStrm );
+ void importFont( SequenceInputStream& rStrm );
/** Imports the font name from a DXF record. */
- void importDxfName( RecordInputStream& rStrm );
+ void importDxfName( SequenceInputStream& rStrm );
/** Imports the font color from a DXF record. */
- void importDxfColor( RecordInputStream& rStrm );
+ void importDxfColor( SequenceInputStream& rStrm );
/** Imports the font scheme from a DXF record. */
- void importDxfScheme( RecordInputStream& rStrm );
+ void importDxfScheme( SequenceInputStream& rStrm );
/** Imports the font height from a DXF record. */
- void importDxfHeight( RecordInputStream& rStrm );
+ void importDxfHeight( SequenceInputStream& rStrm );
/** Imports the font weight from a DXF record. */
- void importDxfWeight( RecordInputStream& rStrm );
+ void importDxfWeight( SequenceInputStream& rStrm );
/** Imports the font underline style from a DXF record. */
- void importDxfUnderline( RecordInputStream& rStrm );
+ void importDxfUnderline( SequenceInputStream& rStrm );
/** Imports the font escapement style from a DXF record. */
- void importDxfEscapement( RecordInputStream& rStrm );
+ void importDxfEscapement( SequenceInputStream& rStrm );
/** Imports a font style flag from a DXF record. */
- void importDxfFlag( sal_Int32 nElement, RecordInputStream& rStrm );
+ void importDxfFlag( sal_Int32 nElement, SequenceInputStream& rStrm );
/** Imports the FONT record from the passed stream. */
void importFont( BiffInputStream& rStrm );
@@ -346,12 +349,12 @@ struct AlignmentModel
explicit AlignmentModel();
- /** Sets horizontal alignment from the passed OOBIN or BIFF data. */
- void setBinHorAlign( sal_uInt8 nHorAlign );
- /** Sets vertical alignment from the passed OOBIN or BIFF data. */
- void setBinVerAlign( sal_uInt8 nVerAlign );
- /** Sets rotation from the passed OOBIN or BIFF text orientation. */
- void setBinTextOrient( sal_uInt8 nTextOrient );
+ /** Sets horizontal alignment from the passed BIFF data. */
+ void setBiffHorAlign( sal_uInt8 nHorAlign );
+ /** Sets vertical alignment from the passed BIFF data. */
+ void setBiffVerAlign( sal_uInt8 nVerAlign );
+ /** Sets rotation from the passed BIFF text orientation. */
+ void setBiffTextOrient( sal_uInt8 nTextOrient );
};
// ----------------------------------------------------------------------------
@@ -387,8 +390,8 @@ public:
/** Sets all attributes from the alignment element. */
void importAlignment( const AttributeList& rAttribs );
- /** Sets the alignment attributes from the passed OOBIN XF record data. */
- void setBinData( sal_uInt32 nFlags );
+ /** Sets the alignment attributes from the passed BIFF12 XF record data. */
+ void setBiff12Data( sal_uInt32 nFlags );
/** Sets the alignment attributes from the passed BIFF2 XF record data. */
void setBiff2Data( sal_uInt8 nFlags );
/** Sets the alignment attributes from the passed BIFF3 XF record data. */
@@ -453,8 +456,8 @@ public:
/** Sets all attributes from the protection element. */
void importProtection( const AttributeList& rAttribs );
- /** Sets the protection attributes from the passed OOBIN XF record data. */
- void setBinData( sal_uInt32 nFlags );
+ /** Sets the protection attributes from the passed BIFF12 XF record data. */
+ void setBiff12Data( sal_uInt32 nFlags );
/** Sets the protection attributes from the passed BIFF2 XF record data. */
void setBiff2Data( sal_uInt8 nNumFmt );
/** Sets the protection attributes from the passed BIFF3-BIFF8 XF record data. */
@@ -489,7 +492,7 @@ struct BorderLineModel
explicit BorderLineModel( bool bDxf );
- /** Sets the passed OOBIN or BIFF line style. */
+ /** Sets the passed BIFF line style. */
void setBiffStyle( sal_Int32 nLineStyle );
/** Sets line style and line color from the passed BIFF data. */
void setBiffData( sal_uInt8 nLineStyle, sal_uInt16 nLineColor );
@@ -548,9 +551,9 @@ public:
void importColor( sal_Int32 nElement, const AttributeList& rAttribs );
/** Imports the BORDER record from the passed stream. */
- void importBorder( RecordInputStream& rStrm );
+ void importBorder( SequenceInputStream& rStrm );
/** Imports a border from a DXF record from the passed stream. */
- void importDxfBorder( sal_Int32 nElement, RecordInputStream& rStrm );
+ void importDxfBorder( sal_Int32 nElement, SequenceInputStream& rStrm );
/** Sets the border attributes from the passed BIFF2 XF record data. */
void setBiff2Data( sal_uInt8 nFlags );
@@ -605,8 +608,8 @@ struct PatternFillModel
explicit PatternFillModel( bool bDxf );
- /** Sets the passed OOBIN or BIFF pattern identifier. */
- void setBinPattern( sal_Int32 nPattern );
+ /** Sets the passed BIFF pattern identifier. */
+ void setBiffPattern( sal_Int32 nPattern );
/** Sets the pattern and pattern colors from the passed BIFF data. */
void setBiffData( sal_uInt16 nPatternColor, sal_uInt16 nFillColor, sal_uInt8 nPattern );
};
@@ -628,10 +631,10 @@ struct GradientFillModel
explicit GradientFillModel();
- /** Reads OOBIN gradient settings from a FILL or DXF record. */
- void readGradient( RecordInputStream& rStrm );
- /** Reads OOBIN gradient stop settings from a FILL or DXF record. */
- void readGradientStop( RecordInputStream& rStrm, bool bDxf );
+ /** Reads BIFF12 gradient settings from a FILL or DXF record. */
+ void readGradient( SequenceInputStream& rStrm );
+ /** Reads BIFF12 gradient stop settings from a FILL or DXF record. */
+ void readGradientStop( SequenceInputStream& rStrm, bool bDxf );
};
// ----------------------------------------------------------------------------
@@ -668,17 +671,17 @@ public:
void importColor( const AttributeList& rAttribs, double fPosition );
/** Imports the FILL record from the passed stream. */
- void importFill( RecordInputStream& rStrm );
+ void importFill( SequenceInputStream& rStrm );
/** Imports the fill pattern from a DXF record. */
- void importDxfPattern( RecordInputStream& rStrm );
+ void importDxfPattern( SequenceInputStream& rStrm );
/** Imports the pattern color from a DXF record. */
- void importDxfFgColor( RecordInputStream& rStrm );
+ void importDxfFgColor( SequenceInputStream& rStrm );
/** Imports the background color from a DXF record. */
- void importDxfBgColor( RecordInputStream& rStrm );
+ void importDxfBgColor( SequenceInputStream& rStrm );
/** Imports gradient settings from a DXF record. */
- void importDxfGradient( RecordInputStream& rStrm );
+ void importDxfGradient( SequenceInputStream& rStrm );
/** Imports gradient stop settings from a DXF record. */
- void importDxfStop( RecordInputStream& rStrm );
+ void importDxfStop( SequenceInputStream& rStrm );
/** Sets the fill attributes from the passed BIFF2 XF record data. */
void setBiff2Data( sal_uInt8 nFlags );
@@ -762,7 +765,7 @@ public:
void importProtection( const AttributeList& rAttribs );
/** Imports the XF record from the passed stream. */
- void importXf( RecordInputStream& rStrm, bool bCellXf );
+ void importXf( SequenceInputStream& rStrm, bool bCellXf );
/** Imports the XF record from the passed stream. */
void importXf( BiffInputStream& rStrm );
@@ -823,7 +826,7 @@ public:
void importProtection( const AttributeList& rAttribs );
/** Imports the DXF record from the passed stream. */
- void importDxf( RecordInputStream& rStrm );
+ void importDxf( SequenceInputStream& rStrm );
/** Imports font, border, and fill settings from the CFRULE record. */
void importCfRule( BiffInputStream& rStrm, sal_uInt32 nFlags );
@@ -878,7 +881,7 @@ public:
/** Imports passed attributes from the cellStyle element. */
void importCellStyle( const AttributeList& rAttribs );
/** Imports style settings from a CELLSTYLE record. */
- void importCellStyle( RecordInputStream& rStrm );
+ void importCellStyle( SequenceInputStream& rStrm );
/** Imports style settings from a STYLE record. */
void importStyle( BiffInputStream& rStrm );
@@ -911,7 +914,7 @@ public:
/** Appends and returns a new named cell style object. */
CellStyleRef importCellStyle( const AttributeList& rAttribs );
/** Imports the CELLSTYLE record from the passed stream. */
- CellStyleRef importCellStyle( RecordInputStream& rStrm );
+ CellStyleRef importCellStyle( SequenceInputStream& rStrm );
/** Imports the STYLE record from the passed stream. */
CellStyleRef importStyle( BiffInputStream& rStrm );
@@ -943,6 +946,21 @@ private:
// ============================================================================
+struct AutoFormatModel
+{
+ sal_Int32 mnAutoFormatId; /// Index of predefined autoformatting.
+ bool mbApplyNumFmt; /// True = apply number format from autoformatting.
+ bool mbApplyFont; /// True = apply font from autoformatting.
+ bool mbApplyAlignment; /// True = apply alignment from autoformatting.
+ bool mbApplyBorder; /// True = apply border from autoformatting.
+ bool mbApplyFill; /// True = apply fill from autoformatting.
+ bool mbApplyProtection; /// True = apply protection from autoformatting.
+
+ explicit AutoFormatModel();
+};
+
+// ============================================================================
+
class StylesBuffer : public WorkbookHelper
{
public:
@@ -977,11 +995,11 @@ public:
CellStyleRef importCellStyle( const AttributeList& rAttribs );
/** Appends a new color to the color palette. */
- void importPaletteColor( RecordInputStream& rStrm );
+ void importPaletteColor( SequenceInputStream& rStrm );
/** Imports the NUMFMT record from the passed stream. */
- void importNumFmt( RecordInputStream& rStrm );
+ void importNumFmt( SequenceInputStream& rStrm );
/** Imports the CELLSTYLE record from the passed stream. */
- void importCellStyle( RecordInputStream& rStrm );
+ void importCellStyle( SequenceInputStream& rStrm );
/** Imports the PALETTE record from the passed stream. */
void importPalette( BiffInputStream& rStrm );
@@ -996,6 +1014,9 @@ public:
/** Imports the STYLE record from the passed stream. */
void importStyle( BiffInputStream& rStrm );
+ /** Imports a color palette from a UNO sequence in the passed any. */
+ void importPalette( const ::com::sun::star::uno::Any& rPalette );
+
/** Final processing after import of all style settings. */
void finalizeImport();
@@ -1075,4 +1096,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/stylesfragment.hxx b/oox/inc/oox/xls/stylesfragment.hxx
index b3dc63fe6e31..eb1af53d9cdb 100644
--- a/oox/inc/oox/xls/stylesfragment.hxx
+++ b/oox/inc/oox/xls/stylesfragment.hxx
@@ -36,24 +36,24 @@ namespace xls {
// ============================================================================
-class OoxIndexedColorsContext : public OoxWorkbookContextBase
+class IndexedColorsContext : public WorkbookContextBase
{
public:
- explicit OoxIndexedColorsContext( OoxWorkbookFragmentBase& rFragment );
+ explicit IndexedColorsContext( WorkbookFragmentBase& rFragment );
protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
};
// ============================================================================
-class OoxFontContext : public OoxWorkbookContextBase
+class FontContext : public WorkbookContextBase
{
public:
template< typename ParentType >
- inline explicit OoxFontContext( ParentType& rParent, const FontRef& rxFont ) :
- OoxWorkbookContextBase( rParent ), mxFont( rxFont ) {}
+ inline explicit FontContext( ParentType& rParent, const FontRef& rxFont ) :
+ WorkbookContextBase( rParent ), mxFont( rxFont ) {}
protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
@@ -64,12 +64,12 @@ private:
// ============================================================================
-class OoxBorderContext : public OoxWorkbookContextBase
+class BorderContext : public WorkbookContextBase
{
public:
template< typename ParentType >
- inline explicit OoxBorderContext( ParentType& rParent, const BorderRef& rxBorder ) :
- OoxWorkbookContextBase( rParent ), mxBorder( rxBorder ) {}
+ inline explicit BorderContext( ParentType& rParent, const BorderRef& rxBorder ) :
+ WorkbookContextBase( rParent ), mxBorder( rxBorder ) {}
protected:
virtual void onStartElement( const AttributeList& rAttribs );
@@ -81,12 +81,12 @@ private:
// ============================================================================
-class OoxFillContext : public OoxWorkbookContextBase
+class FillContext : public WorkbookContextBase
{
public:
template< typename ParentType >
- inline explicit OoxFillContext( ParentType& rParent, const FillRef& rxFill ) :
- OoxWorkbookContextBase( rParent ), mxFill( rxFill ), mfGradPos( -1.0 ) {}
+ inline explicit FillContext( ParentType& rParent, const FillRef& rxFill ) :
+ WorkbookContextBase( rParent ), mxFill( rxFill ), mfGradPos( -1.0 ) {}
protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
@@ -98,12 +98,12 @@ private:
// ============================================================================
-class OoxXfContext : public OoxWorkbookContextBase
+class XfContext : public WorkbookContextBase
{
public:
template< typename ParentType >
- inline explicit OoxXfContext( ParentType& rParent, const XfRef& rxXf, bool bCellXf ) :
- OoxWorkbookContextBase( rParent ), mxXf( rxXf ), mbCellXf( bCellXf ) {}
+ inline explicit XfContext( ParentType& rParent, const XfRef& rxXf, bool bCellXf ) :
+ WorkbookContextBase( rParent ), mxXf( rxXf ), mbCellXf( bCellXf ) {}
protected:
virtual void onStartElement( const AttributeList& rAttribs );
@@ -116,12 +116,12 @@ private:
// ============================================================================
-class OoxDxfContext : public OoxWorkbookContextBase
+class DxfContext : public WorkbookContextBase
{
public:
template< typename ParentType >
- inline explicit OoxDxfContext( ParentType& rParent, const DxfRef& rxDxf ) :
- OoxWorkbookContextBase( rParent ), mxDxf( rxDxf ) {}
+ inline explicit DxfContext( ParentType& rParent, const DxfRef& rxDxf ) :
+ WorkbookContextBase( rParent ), mxDxf( rxDxf ) {}
protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
@@ -132,20 +132,16 @@ private:
// ============================================================================
-class OoxStylesFragment : public OoxWorkbookFragmentBase
+class StylesFragment : public WorkbookFragmentBase
{
public:
- explicit OoxStylesFragment(
+ explicit StylesFragment(
const WorkbookHelper& rHelper,
const ::rtl::OUString& rFragmentPath );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
-
- // oox.core.FragmentHandler2 interface ------------------------------------
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
virtual const ::oox::core::RecordInfo* getRecordInfos() const;
virtual void finalizeImport();
@@ -157,4 +153,3 @@ protected:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/tablebuffer.hxx b/oox/inc/oox/xls/tablebuffer.hxx
index 993b4305d03a..d643fbc40728 100644
--- a/oox/inc/oox/xls/tablebuffer.hxx
+++ b/oox/inc/oox/xls/tablebuffer.hxx
@@ -29,7 +29,7 @@
#define OOX_XLS_TABLEBUFFER_HXX
#include <com/sun/star/table/CellRangeAddress.hpp>
-#include "oox/helper/containerhelper.hxx"
+#include "oox/xls/autofilterbuffer.hxx"
#include "oox/xls/workbookhelper.hxx"
namespace oox {
@@ -61,16 +61,18 @@ public:
/** Imports a table definition from the passed attributes. */
void importTable( const AttributeList& rAttribs, sal_Int16 nSheet );
/** Imports a table definition from a TABLE record. */
- void importTable( RecordInputStream& rStrm, sal_Int16 nSheet );
+ void importTable( SequenceInputStream& rStrm, sal_Int16 nSheet );
+ /** Creates a new auto filter and stores it internally. */
+ inline AutoFilter& createAutoFilter() { return maAutoFilters.createAutoFilter(); }
/** Creates a database range from this tables. */
void finalizeImport();
- /** Returns the table identifier. */
+ /** Returns the unique table identifier. */
inline sal_Int32 getTableId() const { return maModel.mnId; }
/** Returns the token index used in API token arrays (com.sun.star.sheet.FormulaToken). */
inline sal_Int32 getTokenIndex() const { return mnTokenIndex; }
- /** Returns the display name of the table. */
+ /** Returns the original display name of the table. */
inline const ::rtl::OUString& getDisplayName() const { return maModel.maDisplayName; }
/** Returns the original (unchecked) total range of the table. */
@@ -88,6 +90,8 @@ public:
private:
TableModel maModel;
+ AutoFilterBuffer maAutoFilters; /// Filter settings for this table.
+ ::rtl::OUString maDBRangeName; /// Name of the databae range in the Calc document.
::com::sun::star::table::CellRangeAddress
maDestRange; /// Validated range of the table in the worksheet.
sal_Int32 mnTokenIndex; /// Token index used in API token array.
@@ -102,10 +106,8 @@ class TableBuffer : public WorkbookHelper
public:
explicit TableBuffer( const WorkbookHelper& rHelper );
- /** Imports a table definition from the passed attributes. */
- TableRef importTable( const AttributeList& rAttribs, sal_Int16 nSheet );
- /** Imports a table definition from a TABLE record. */
- TableRef importTable( RecordInputStream& rStrm, sal_Int16 nSheet );
+ /** Creates a new empty table. */
+ Table& createTable();
/** Creates database ranges from all imported tables. */
void finalizeImport();
@@ -116,12 +118,15 @@ public:
TableRef getTable( const ::rtl::OUString& rDispName ) const;
private:
- void insertTable( TableRef xTable );
+ /** Inserts the passed table into the maps according to its identifier and name. */
+ void insertTableToMaps( const TableRef& rxTable );
private:
+ typedef RefVector< Table > TableVector;
typedef RefMap< sal_Int32, Table > TableIdMap;
typedef RefMap< ::rtl::OUString, Table > TableNameMap;
+ TableVector maTables;
TableIdMap maIdTables;
TableNameMap maNameTables;
};
@@ -132,4 +137,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/tablefragment.hxx b/oox/inc/oox/xls/tablefragment.hxx
index e30eb1e2f9e8..9c2678405ee5 100644
--- a/oox/inc/oox/xls/tablefragment.hxx
+++ b/oox/inc/oox/xls/tablefragment.hxx
@@ -29,32 +29,29 @@
#define OOX_XLS_TABLEFRAGMENT_HXX
#include "oox/xls/excelhandlers.hxx"
-#include "oox/xls/tablebuffer.hxx"
namespace oox {
namespace xls {
+class Table;
+
// ============================================================================
-class OoxTableFragment : public OoxWorksheetFragmentBase
+class TableFragment : public WorksheetFragmentBase
{
public:
- explicit OoxTableFragment(
+ explicit TableFragment(
const WorksheetHelper& rHelper,
const ::rtl::OUString& rFragmentPath );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
-
- // oox.core.FragmentHandler2 interface ------------------------------------
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
virtual const ::oox::core::RecordInfo* getRecordInfos() const;
private:
- TableRef mxTable; /// Current table.
+ Table& mrTable;
};
// ============================================================================
@@ -63,4 +60,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/themebuffer.hxx b/oox/inc/oox/xls/themebuffer.hxx
index 338837e40427..95d092198b95 100644
--- a/oox/inc/oox/xls/themebuffer.hxx
+++ b/oox/inc/oox/xls/themebuffer.hxx
@@ -61,4 +61,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/unitconverter.hxx b/oox/inc/oox/xls/unitconverter.hxx
index 36a70a7f4067..1ea4180bc6fd 100644
--- a/oox/inc/oox/xls/unitconverter.hxx
+++ b/oox/inc/oox/xls/unitconverter.hxx
@@ -28,8 +28,8 @@
#ifndef OOX_XLS_UNITCONVERTER_HXX
#define OOX_XLS_UNITCONVERTER_HXX
-#include <vector>
#include <map>
+#include <vector>
#include "oox/xls/workbookhelper.hxx"
namespace com { namespace sun { namespace star {
@@ -121,4 +121,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/viewsettings.hxx b/oox/inc/oox/xls/viewsettings.hxx
index 1f82aedeef91..c5880bf077fe 100644
--- a/oox/inc/oox/xls/viewsettings.hxx
+++ b/oox/inc/oox/xls/viewsettings.hxx
@@ -30,7 +30,6 @@
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
-#include "oox/helper/containerhelper.hxx"
#include "oox/xls/addressconverter.hxx"
#include "oox/xls/stylesbuffer.hxx"
#include "oox/xls/worksheethelper.hxx"
@@ -119,13 +118,13 @@ public:
void importChartSheetView( const AttributeList& rAttribs );
/** Imports the SHEETVIEW record containing sheet view settings. */
- void importSheetView( RecordInputStream& rStrm );
+ void importSheetView( SequenceInputStream& rStrm );
/** Imports the PANE record containing sheet pane settings. */
- void importPane( RecordInputStream& rStrm );
+ void importPane( SequenceInputStream& rStrm );
/** Imports the SELECTION record containing selection settings for a pane. */
- void importSelection( RecordInputStream& rStrm );
+ void importSelection( SequenceInputStream& rStrm );
/** Imports the CHARTSHEETVIEW record containing view settings of a chart sheet. */
- void importChartSheetView( RecordInputStream& rStrm );
+ void importChartSheetView( SequenceInputStream& rStrm );
/** Imports the WINDOW2 record containing sheet view settings. */
void importWindow2( BiffInputStream& rStrm );
@@ -139,6 +138,9 @@ public:
/** Converts all imported sheet view settings. */
void finalizeImport();
+ /** Returns true, if the sheet layout is set to right-to-left. */
+ bool isSheetRightToLeft() const;
+
private:
SheetViewModelRef createSheetView();
@@ -182,9 +184,9 @@ public:
/** Imports the oleSize element containing the visible size of the workbook. */
void importOleSize( const AttributeList& rAttribs );
/** Imports the WORKBOOKVIEW record containing workbook view settings. */
- void importWorkbookView( RecordInputStream& rStrm );
+ void importWorkbookView( SequenceInputStream& rStrm );
/** Imports the OLESIZE record containing the visible size of the workbook. */
- void importOleSize( RecordInputStream& rStrm );
+ void importOleSize( SequenceInputStream& rStrm );
/** Imports the WINDOW1 record containing workbook view settings. */
void importWindow1( BiffInputStream& rStrm );
/** Imports the OLESIZE record containing the visible size of the workbook. */
@@ -228,4 +230,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/webquerybuffer.hxx b/oox/inc/oox/xls/webquerybuffer.hxx
deleted file mode 100644
index 22c91bc15d1f..000000000000
--- a/oox/inc/oox/xls/webquerybuffer.hxx
+++ /dev/null
@@ -1,127 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef OOX_XLS_WEBQUERYBUFFER_HXX
-#define OOX_XLS_WEBQUERYBUFFER_HXX
-
-#include <vector>
-#include <hash_map>
-#include <boost/shared_ptr.hpp>
-#include <com/sun/star/table/CellRangeAddress.hpp>
-#include "oox/xls/workbookhelper.hxx"
-
-namespace oox {
-namespace xls {
-
-// ============================================================================
-
-struct QueryTable
-{
- sal_Int32 mnConnectionId;
-};
-
-// struct WebQuery
-// {
-// enum WebQueryMode
-// {
-// xlWQUnknown, /// Not specified.
-// xlWQDocument, /// Entire document.
-// xlWQAllTables, /// All tables.
-// xlWQSpecTables /// Specific tables.
-// };
-//
-// ::rtl::OUString maURL; /// Source document URL.
-// ::rtl::OUString maTables; /// List of source range names.
-// ::com::sun::star::table::CellRangeAddress maDestRange; /// Destination range.
-// WebQueryMode meMode; /// Current mode of web query.
-// sal_uInt16 mnRefresh; /// Refresh time in minutes.
-// };
-
-struct BaseProperties
-{
-};
-
-/** Stores web query properties from webPr element. */
-struct WebProperties : public BaseProperties
-{
- ::rtl::OUString maURL;
-};
-
-/** Stores text data source properties from textPr element. */
-struct TextProperties : public BaseProperties
-{
- ::rtl::OUString maSourceFile;
-};
-
-struct Connection
-{
- static const sal_Int32 CONNECTION_ODBC_SOURCE;
- static const sal_Int32 CONNECTION_DAO_SOURCE;
- static const sal_Int32 CONNECTION_FILE_SOURCE;
- static const sal_Int32 CONNECTION_WEBQUERY;
- static const sal_Int32 CONNECTION_OLEDB_SOURCE;
- static const sal_Int32 CONNECTION_TEXT_SOURCE;
- static const sal_Int32 CONNECTION_ADO_RECORD_SET;
- static const sal_Int32 CONNECTION_DSP;
-
- ::rtl::OUString maName; /// Connection name (must be unique).
- sal_Int32 mnType;
- ::boost::shared_ptr< BaseProperties > mpProperties;
-};
-
-// ============================================================================
-
-typedef ::std::hash_map< ::rtl::OUString, QueryTable, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > QueryTableHashMap;
-
-class WebQueryBuffer : public WorkbookHelper
-{
-public:
- explicit WebQueryBuffer( const WorkbookHelper& rHelper );
-
- void importQueryTable( const AttributeList& rAttribs );
-
- void importConnection( const AttributeList& rAttribs );
-
- void importWebPr( const AttributeList& rAttribs );
-
- /** Dumps content for debug purposes. */
- void dump() const;
-
-private:
- QueryTableHashMap maQueryTableMap;
- ::std::vector< Connection > maConnections;
-
- sal_Int32 mnCurConnId; /// Current connection ID.
-};
-
-// ============================================================================
-
-} // namespace xls
-} // namespace oox
-
-#endif
-
diff --git a/oox/inc/oox/xls/workbookfragment.hxx b/oox/inc/oox/xls/workbookfragment.hxx
index f9f0bb25c78f..d0b0cadd416b 100644
--- a/oox/inc/oox/xls/workbookfragment.hxx
+++ b/oox/inc/oox/xls/workbookfragment.hxx
@@ -38,22 +38,18 @@ class ExternalLink;
// ============================================================================
-class OoxWorkbookFragment : public OoxWorkbookFragmentBase
+class WorkbookFragment : public WorkbookFragmentBase
{
public:
- explicit OoxWorkbookFragment(
+ explicit WorkbookFragment(
const WorkbookHelper& rHelper,
const ::rtl::OUString& rFragmentPath );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual void onEndElement( const ::rtl::OUString& rChars );
-
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
+ virtual void onCharacters( const ::rtl::OUString& rChars );
- // oox.core.FragmentHandler2 interface ------------------------------------
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
virtual const ::oox::core::RecordInfo* getRecordInfos() const;
virtual void finalizeImport();
@@ -63,8 +59,8 @@ private:
void importDefinedName( const AttributeList& rAttribs );
void importPivotCache( const AttributeList& rAttribs );
- void importExternalRef( RecordInputStream& rStrm );
- void importPivotCache( RecordInputStream& rStrm );
+ void importExternalRef( SequenceInputStream& rStrm );
+ void importPivotCache( SequenceInputStream& rStrm );
void importExternalLinkFragment( ExternalLink& rExtLink );
void importPivotCacheDefFragment( const ::rtl::OUString& rRelId, sal_Int32 nCacheId );
@@ -100,4 +96,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/workbookhelper.hxx b/oox/inc/oox/xls/workbookhelper.hxx
index 0ff8c0f9d3e5..ecf824076ef5 100644
--- a/oox/inc/oox/xls/workbookhelper.hxx
+++ b/oox/inc/oox/xls/workbookhelper.hxx
@@ -37,24 +37,21 @@ namespace com { namespace sun { namespace star {
namespace container { class XNameAccess; }
namespace container { class XNameContainer; }
namespace lang { class XMultiServiceFactory; }
- namespace awt { class XDevice; }
+ namespace sheet { class XDatabaseRange; }
+ namespace sheet { class XNamedRange; }
+ namespace sheet { class XSpreadsheet; }
+ namespace sheet { class XSpreadsheetDocument; }
+ namespace style { class XStyle; }
namespace table { struct CellAddress; }
namespace table { struct CellRangeAddress; }
namespace table { class XCell; }
namespace table { class XCellRange; }
- namespace sheet { class XSpreadsheetDocument; }
- namespace sheet { class XSpreadsheet; }
- namespace sheet { class XNamedRanges; }
- namespace sheet { class XNamedRange; }
- namespace sheet { class XDatabaseRanges; }
- namespace sheet { class XExternalDocLinks; }
- namespace style { class XStyle; }
} } }
namespace oox {
class AttributeList;
class SegmentProgressBar;
- class RecordInputStream;
+ class SequenceInputStream;
}
namespace oox { namespace core {
@@ -79,8 +76,8 @@ class ExcelBiffFilter;
/** An enumeration for all supported spreadsheet filter types. */
enum FilterType
{
- FILTER_OOX, /// MS Excel OOXML (Office Open XML) or OOBIN.
- FILTER_BIFF, /// MS Excel BIFF (Binary Interchange File Format).
+ FILTER_OOXML, /// MS Excel OOXML (Office Open XML) or BIFF12.
+ FILTER_BIFF, /// MS Excel BIFF2-BIFF8 (Binary Interchange File Format).
FILTER_UNKNOWN /// Unknown filter type.
};
@@ -89,31 +86,31 @@ enum FilterType
/** Functor for case-insensitive string comparison, usable in maps etc. */
struct IgnoreCaseCompare
{
- bool operator()( const ::rtl::OUString& rName1, const ::rtl::OUString& rName2 ) const;
+ bool operator()( const ::rtl::OUString& rName1, const ::rtl::OUString& rName2 ) const;
};
// ============================================================================
-class WorkbookData;
-class WorkbookSettings;
-class ViewSettings;
-class WorksheetBuffer;
-class ThemeBuffer;
-class StylesBuffer;
-class SharedStringsBuffer;
-class ExternalLinkBuffer;
+class AddressConverter;
+class BiffCodecHelper;
+class ConnectionsBuffer;
class DefinedNamesBuffer;
-class TableBuffer;
-class ScenarioBuffer;
-class WebQueryBuffer;
+class ExcelChartConverter;
+class ExternalLinkBuffer;
+class FormulaParser;
+class PageSettingsConverter;
class PivotCacheBuffer;
class PivotTableBuffer;
-class FormulaParser;
+class ScenarioBuffer;
+class SharedStringsBuffer;
+class StylesBuffer;
+class TableBuffer;
+class ThemeBuffer;
class UnitConverter;
-class AddressConverter;
-class ExcelChartConverter;
-class PageSettingsConverter;
-class BiffCodecHelper;
+class ViewSettings;
+class WorkbookData;
+class WorkbookSettings;
+class WorksheetBuffer;
/** Helper class to provice access to global workbook data.
@@ -163,21 +160,6 @@ public:
/** Returns a reference to the service factory of the spreadsheet document model. */
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
getDocumentFactory() const;
- /** Returns the reference device of the document. */
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice >
- getReferenceDevice() const;
- /** Returns the container for defined names from the Calc document. */
- ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XNamedRanges >
- getNamedRanges() const;
- /** Returns the container for database ranges from the Calc document. */
- ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDatabaseRanges >
- getDatabaseRanges() const;
- /** Returns the container for external documents from the Calc document. */
- ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XExternalDocLinks >
- getExternalDocLinks() const;
- /** Returns the container for DDE links from the Calc document. */
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
- getDdeLinks() const;
/** Returns a reference to the specified spreadsheet in the document model. */
::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet >
@@ -203,12 +185,21 @@ public:
getStyleObject( const ::rtl::OUString& rStyleName, bool bPageStyle ) const;
/** Creates and returns a defined name on-the-fly in the Calc document.
- The name will not be buffered in this defined names buffer.
+ The name will not be buffered in the global defined names buffer.
@param orName (in/out-parameter) Returns the resulting used name. */
::com::sun::star::uno::Reference< ::com::sun::star::sheet::XNamedRange >
createNamedRangeObject(
::rtl::OUString& orName,
sal_Int32 nNameFlags = 0 ) const;
+
+ /** Creates and returns a database range on-the-fly in the Calc document.
+ The range will not be buffered in the global table buffer.
+ @param orName (in/out-parameter) Returns the resulting used name. */
+ ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDatabaseRange >
+ createDatabaseRangeObject(
+ ::rtl::OUString& orName,
+ const ::com::sun::star::table::CellRangeAddress& rRangeAddr ) const;
+
/** Creates and returns a com.sun.star.style.Style object for cells or pages. */
::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle >
createStyleObject(
@@ -237,8 +228,8 @@ public:
TableBuffer& getTables() const;
/** Returns the scenarios collection. */
ScenarioBuffer& getScenarios() const;
- /** Returns the web queries. */
- WebQueryBuffer& getWebQueries() const;
+ /** Returns the collection of external data connections. */
+ ConnectionsBuffer& getConnections() const;
/** Returns the collection of pivot caches. */
PivotCacheBuffer& getPivotCaches() const;
/** Returns the collection of pivot tables. */
@@ -257,17 +248,17 @@ public:
/** Returns the page and print settings converter. */
PageSettingsConverter& getPageSettingsConverter() const;
- // OOX specific (MUST NOT be called in BIFF filter) -----------------------
+ // OOXML/BIFF12 specific (MUST NOT be called in BIFF filter) --------------
- /** Returns the base OOX filter object.
- Must not be called, if current filter is not the OOX filter. */
+ /** Returns the base OOXML/BIFF12 filter object.
+ Must not be called, if current filter is not the OOXML/BIFF12 filter. */
::oox::core::XmlFilterBase& getOoxFilter() const;
/** Imports a fragment using the passed fragment handler, which contains
the full path to the fragment stream. */
bool importOoxFragment( const ::rtl::Reference< ::oox::core::FragmentHandler >& rxHandler );
- // BIFF specific (MUST NOT be called in OOX filter) -----------------------
+ // BIFF2-BIFF8 specific (MUST NOT be called in OOXML/BIFF12 filter) -------
/** Returns the base BIFF filter object. */
::oox::core::BinaryFilterBase& getBiffFilter() const;
diff --git a/oox/inc/oox/xls/workbooksettings.hxx b/oox/inc/oox/xls/workbooksettings.hxx
index 8ba322103955..858e886df778 100644
--- a/oox/inc/oox/xls/workbooksettings.hxx
+++ b/oox/inc/oox/xls/workbooksettings.hxx
@@ -61,8 +61,8 @@ struct WorkbookSettingsModel
explicit WorkbookSettingsModel();
- /** Sets OOBIN or BIFF object visibility mode. */
- void setBinObjectMode( sal_uInt16 nObjMode );
+ /** Sets BIFF object visibility mode. */
+ void setBiffObjectMode( sal_uInt16 nObjMode );
};
// ============================================================================
@@ -101,11 +101,11 @@ public:
void importCalcPr( const AttributeList& rAttribs );
/** Imports the FILESHARING record containing write protection settings. */
- void importFileSharing( RecordInputStream& rStrm );
+ void importFileSharing( SequenceInputStream& rStrm );
/** Imports the WORKBOOKPR record containing global workbook settings. */
- void importWorkbookPr( RecordInputStream& rStrm );
+ void importWorkbookPr( SequenceInputStream& rStrm );
/** Imports the CALCPR record containing workbook calculation settings. */
- void importCalcPr( RecordInputStream& rStrm );
+ void importCalcPr( SequenceInputStream& rStrm );
/** Sets the save external linked values flag, e.g. from the WSBOOL record. */
void setSaveExtLinkValues( bool bSaveExtLinks );
@@ -162,4 +162,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/worksheetbuffer.hxx b/oox/inc/oox/xls/worksheetbuffer.hxx
index 2f9359b38370..7c59cce988dd 100644
--- a/oox/inc/oox/xls/worksheetbuffer.hxx
+++ b/oox/inc/oox/xls/worksheetbuffer.hxx
@@ -29,7 +29,8 @@
#define OOX_XLS_WORKSHEETBUFFER_HXX
#include <utility>
-#include "oox/helper/containerhelper.hxx"
+#include "oox/helper/refmap.hxx"
+#include "oox/helper/refvector.hxx"
#include "oox/xls/workbookhelper.hxx"
namespace com { namespace sun { namespace star {
@@ -58,8 +59,8 @@ struct SheetInfoModel
/** Stores information about all sheets in a spreadsheet document.
Information about sheets includes the sheet name, the visibility state, and
- for the OOX filter, the relation identifier of the sheet used to obtain the
- related worksheet fragment.
+ for the OOXML filter, the relation identifier of the sheet used to obtain
+ the related worksheet fragment.
*/
class WorksheetBuffer : public WorkbookHelper
{
@@ -74,8 +75,8 @@ public:
/** Imports the attributes of a sheet element. */
void importSheet( const AttributeList& rAttribs );
- /** Imports the SHEET record from the passed OOBIN stream. */
- void importSheet( RecordInputStream& rStrm );
+ /** Imports the SHEET record from the passed BIFF12 stream. */
+ void importSheet( SequenceInputStream& rStrm );
/** Imports the SHEET record from the passed BIFF stream. */
void importSheet( BiffInputStream& rStrm );
/** Inserts a new empty sheet into the document. Looks for an unused name.
@@ -84,7 +85,7 @@ public:
/** Returns the number of original sheets contained in the workbook. */
sal_Int32 getWorksheetCount() const;
- /** Returns the OOX relation identifier of the specified worksheet. */
+ /** Returns the OOXML relation identifier of the specified worksheet. */
::rtl::OUString getWorksheetRelId( sal_Int32 nWorksheet ) const;
/** Returns the BIFF record handle of the associated sheet substream. */
sal_Int64 getBiffRecordHandle( sal_Int32 nWorksheet ) const;
@@ -130,4 +131,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/worksheetfragment.hxx b/oox/inc/oox/xls/worksheetfragment.hxx
index 7234153d7dd3..4fe3bf4240dd 100644
--- a/oox/inc/oox/xls/worksheetfragment.hxx
+++ b/oox/inc/oox/xls/worksheetfragment.hxx
@@ -35,24 +35,23 @@ namespace xls {
// ============================================================================
-class OoxDataValidationsContext : public OoxWorksheetContextBase
+class DataValidationsContext : public WorksheetContextBase
{
public:
- explicit OoxDataValidationsContext( OoxWorksheetFragmentBase& rFragment );
+ explicit DataValidationsContext( WorksheetFragmentBase& rFragment );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual void onEndElement( const ::rtl::OUString& rChars );
+ virtual void onCharacters( const ::rtl::OUString& rChars );
+ virtual void onEndElement();
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
private:
/** Imports the dataValidation element containing data validation settings. */
void importDataValidation( const AttributeList& rAttribs );
/** Imports the DATAVALIDATION record containing data validation settings. */
- void importDataValidation( RecordInputStream& rStrm );
+ void importDataValidation( SequenceInputStream& rStrm );
private:
::std::auto_ptr< ValidationModel > mxValModel;
@@ -60,25 +59,21 @@ private:
// ============================================================================
-class OoxWorksheetFragment : public OoxWorksheetFragmentBase
+class WorksheetFragment : public WorksheetFragmentBase
{
public:
- explicit OoxWorksheetFragment(
+ explicit WorksheetFragment(
const WorkbookHelper& rHelper,
const ::rtl::OUString& rFragmentPath,
- ISegmentProgressBarRef xProgressBar,
+ const ISegmentProgressBarRef& rxProgressBar,
WorksheetType eSheetType,
sal_Int16 nSheet );
protected:
- // oox.core.ContextHandler2Helper interface -------------------------------
-
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
- virtual void onEndElement( const ::rtl::OUString& rChars );
-
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, RecordInputStream& rStrm );
+ virtual void onCharacters( const ::rtl::OUString& rChars );
- // oox.core.FragmentHandler2 interface ------------------------------------
+ virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
virtual const ::oox::core::RecordInfo* getRecordInfos() const;
virtual void initializeImport();
@@ -109,25 +104,25 @@ private:
void importControl( const AttributeList& rAttribs );
/** Imports the DIMENSION record containing the used area of the sheet. */
- void importDimension( RecordInputStream& rStrm );
+ void importDimension( SequenceInputStream& rStrm );
/** Imports sheet format properties from a SHEETFORMATPR record. */
- void importSheetFormatPr( RecordInputStream& rStrm );
+ void importSheetFormatPr( SequenceInputStream& rStrm );
/** Imports column settings from a COL record. */
- void importCol( RecordInputStream& rStrm );
+ void importCol( SequenceInputStream& rStrm );
/** Imports a merged cell range from a MERGECELL record. */
- void importMergeCell( RecordInputStream& rStrm );
+ void importMergeCell( SequenceInputStream& rStrm );
/** Imports a hyperlink for a cell range from a HYPERLINK record. */
- void importHyperlink( RecordInputStream& rStrm );
+ void importHyperlink( SequenceInputStream& rStrm );
/** Imports the BRK record for an individual row or column page break. */
- void importBrk( RecordInputStream& rStrm, bool bRowBreak );
+ void importBrk( SequenceInputStream& rStrm, bool bRowBreak );
/** Imports the DRAWING record containing the relation identifier for the DrawingML part. */
- void importDrawing( RecordInputStream& rStrm );
+ void importDrawing( SequenceInputStream& rStrm );
/** Imports the LEGACYDRAWING record containing the relation identifier for the VML drawing part. */
- void importLegacyDrawing( RecordInputStream& rStrm );
+ void importLegacyDrawing( SequenceInputStream& rStrm );
/** Imports additional data for an OLE object. */
- void importOleObject( RecordInputStream& rStrm );
+ void importOleObject( SequenceInputStream& rStrm );
/** Imports additional data for an OCX form control. */
- void importControl( RecordInputStream& rStrm );
+ void importControl( SequenceInputStream& rStrm );
/** Imports the binary data of an embedded OLE object from the fragment with the passed ID. */
void importEmbeddedOleData( StreamDataSequence& orEmbeddedData, const ::rtl::OUString& rRelId );
@@ -135,14 +130,12 @@ private:
// ============================================================================
-class BiffPivotTableContext;
-
class BiffWorksheetFragment : public BiffWorksheetFragmentBase
{
public:
explicit BiffWorksheetFragment(
const BiffWorkbookFragmentBase& rParent,
- ISegmentProgressBarRef xProgressBar,
+ const ISegmentProgressBarRef& rxProgressBar,
WorksheetType eSheetType,
sal_Int16 nSheet );
virtual ~BiffWorksheetFragment();
@@ -151,41 +144,45 @@ public:
virtual bool importFragment();
private:
+ /** Imports the AUTOFILTER and following records with auto filter settings. */
+ void importAutoFilter( BiffInputStream& rStrm );
/** Imports the COLINFO record and sets column properties and formatting. */
- void importColInfo();
+ void importColInfo( BiffInputStream& rStrm );
/** Imports the BIFF2 COLUMNDEFAULT record and sets column default formatting. */
- void importColumnDefault();
+ void importColumnDefault( BiffInputStream& rStrm );
/** Imports the BIFF2 COLWIDTH record and sets column width. */
- void importColWidth();
+ void importColWidth( BiffInputStream& rStrm );
/** Imports the DATAVALIDATION record containing cell ranges with data validation settings. */
- void importDataValidation();
+ void importDataValidation( BiffInputStream& rStrm );
/** Imports the DATAVALIDATIONS record containing global data validation settings. */
- void importDataValidations();
+ void importDataValidations( BiffInputStream& rStrm );
/** Imports the DEFCOLWIDTH record and sets default column width. */
- void importDefColWidth();
+ void importDefColWidth( BiffInputStream& rStrm );
/** Imports the DEFROWHEIGHT record and sets default row height and properties. */
- void importDefRowHeight();
+ void importDefRowHeight( BiffInputStream& rStrm );
/** Imports the DIMENSION record containing the used area of the sheet. */
- void importDimension();
+ void importDimension( BiffInputStream& rStrm );
/** Imports the HYPERLINK record and sets a cell hyperlink. */
- void importHyperlink();
+ void importHyperlink( BiffInputStream& rStrm );
/** Imports the LABELRANGES record and sets the imported label ranges. */
- void importLabelRanges();
+ void importLabelRanges( BiffInputStream& rStrm );
/** Imports the MEREDCELLS record and merges all cells in the document. */
- void importMergedCells();
+ void importMergedCells( BiffInputStream& rStrm );
/** Imports the HORPAGEBREAKS or VERPAGEBREAKS record and inserts page breaks. */
- void importPageBreaks( bool bRowBreak );
+ void importPageBreaks( BiffInputStream& rStrm, bool bRowBreak );
/** Imports a pivot table. */
- void importPTDefinition();
+ void importPTDefinition( BiffInputStream& rStrm );
+ /** Imports the QUERYTABLE and following records and inserts a web query. */
+ void importQueryTable( BiffInputStream& rStrm );
/** Imports the SCENARIOS record and the following scenarios. */
- void importScenarios();
+ void importScenarios( BiffInputStream& rStrm );
/** Imports the SHAREDFEATHEAD record. */
- void importSharedFeatHead();
+ void importSharedFeatHead( BiffInputStream& rStrm );
/** Imports the STANDARDWIDTH record and sets standard column width. */
- void importStandardWidth();
+ void importStandardWidth( BiffInputStream& rStrm );
private:
- ::boost::shared_ptr< BiffPivotTableContext > mxPTContext;
+ ::boost::shared_ptr< BiffWorksheetContextBase > mxContext;
};
// ============================================================================
@@ -194,4 +191,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/worksheethelper.hxx b/oox/inc/oox/xls/worksheethelper.hxx
index 632d7027403f..55bf1c044e30 100644
--- a/oox/inc/oox/xls/worksheethelper.hxx
+++ b/oox/inc/oox/xls/worksheethelper.hxx
@@ -37,29 +37,31 @@ namespace com { namespace sun { namespace star {
namespace awt { struct Point; }
namespace awt { struct Rectangle; }
namespace awt { struct Size; }
- namespace util { struct DateTime; }
namespace drawing { class XDrawPage; }
- namespace table { class XTableColumns; }
- namespace table { class XTableRows; }
+ namespace sheet { class XSheetCellRanges; }
+ namespace sheet { class XSpreadsheet; }
namespace table { class XCell; }
namespace table { class XCellRange; }
- namespace sheet { class XSpreadsheet; }
- namespace sheet { class XSheetCellRanges; }
+ namespace table { class XTableColumns; }
+ namespace table { class XTableRows; }
+ namespace util { struct DateTime; }
} } }
namespace oox {
namespace xls {
+class AutoFilterBuffer;
struct BinAddress;
struct BinRange;
class BinRangeList;
-class WorksheetSettings;
-class SharedFormulaBuffer;
-class CondFormatBuffer;
class CommentsBuffer;
+class CondFormatBuffer;
class PageSettings;
+class QueryTableBuffer;
+class SharedFormulaBuffer;
class SheetViewSettings;
class VmlDrawing;
+class WorksheetSettings;
// ============================================================================
// ============================================================================
@@ -202,12 +204,12 @@ struct ValidationModel
explicit ValidationModel();
- /** Sets the passed OOBIN or BIFF validation type. */
- void setBinType( sal_uInt8 nType );
- /** Sets the passed OOBIN or BIFF operator. */
- void setBinOperator( sal_uInt8 nOperator );
- /** Sets the passed OOBIN or BIFF error style. */
- void setBinErrorStyle( sal_uInt8 nErrorStyle );
+ /** Sets the passed BIFF validation type. */
+ void setBiffType( sal_uInt8 nType );
+ /** Sets the passed BIFF operator. */
+ void setBiffOperator( sal_uInt8 nOperator );
+ /** Sets the passed BIFF error style. */
+ void setBiffErrorStyle( sal_uInt8 nErrorStyle );
};
// ============================================================================
@@ -314,6 +316,10 @@ public:
CondFormatBuffer& getCondFormats() const;
/** Returns the buffer for all cell comments in this sheet. */
CommentsBuffer& getComments() const;
+ /** Returns the auto filters for the sheet. */
+ AutoFilterBuffer& getAutoFilters() const;
+ /** Returns the buffer for all web query tables in this sheet. */
+ QueryTableBuffer& getQueryTables() const;
/** Returns the page/print settings for this sheet. */
PageSettings& getPageSettings() const;
/** Returns the view settings for this sheet. */
@@ -383,9 +389,8 @@ public:
void extendUsedArea( const ::com::sun::star::table::CellAddress& rAddress );
/** Extends the used area of this sheet by the passed cell range. */
void extendUsedArea( const ::com::sun::star::table::CellRangeAddress& rRange );
- /** Extends the shape bounding box by the position and size of the passed rectangle. */
- void extendShapeBoundingBox(
- const ::com::sun::star::awt::Rectangle& rShapeRect );
+ /** Extends the shape bounding box by the position and size of the passed rectangle (in 1/100 mm). */
+ void extendShapeBoundingBox( const ::com::sun::star::awt::Rectangle& rShapeRect );
/** Sets base width for all columns (without padding pixels). This value
is only used, if width has not been set with setDefaultColumnWidth(). */
@@ -445,7 +450,7 @@ protected:
/** Constructs from the passed data, creates and owns a new data object. */
explicit WorksheetHelperRoot(
const WorkbookHelper& rHelper,
- ISegmentProgressBarRef xProgressBar,
+ const ISegmentProgressBarRef& rxProgressBar,
WorksheetType eSheetType,
sal_Int16 nSheet );
@@ -468,4 +473,3 @@ private:
} // namespace oox
#endif
-
diff --git a/oox/inc/oox/xls/worksheetsettings.hxx b/oox/inc/oox/xls/worksheetsettings.hxx
index 17e22dc5342c..6d6c8a4912d2 100644
--- a/oox/inc/oox/xls/worksheetsettings.hxx
+++ b/oox/inc/oox/xls/worksheetsettings.hxx
@@ -28,8 +28,8 @@
#ifndef OOX_XLS_WORKSHEETSETTINGS_HXX
#define OOX_XLS_WORKSHEETSETTINGS_HXX
-#include "oox/xls/worksheethelper.hxx"
#include "oox/xls/richstring.hxx"
+#include "oox/xls/worksheethelper.hxx"
namespace oox {
namespace xls {
@@ -98,16 +98,18 @@ public:
void importPhoneticPr( const AttributeList& rAttribs );
/** Imports sheet properties from the SHEETPR record. */
- void importSheetPr( RecordInputStream& rStrm );
+ void importSheetPr( SequenceInputStream& rStrm );
/** Imports sheet properties from the CHARTSHEETPR record. */
- void importChartSheetPr( RecordInputStream& rStrm );
+ void importChartSheetPr( SequenceInputStream& rStrm );
/** Imports sheet protection settings from the SHEETPROTECTION record. */
- void importSheetProtection( RecordInputStream& rStrm );
+ void importSheetProtection( SequenceInputStream& rStrm );
/** Imports chart sheet protection settings from the CHARTPROTECTION record. */
- void importChartProtection( RecordInputStream& rStrm );
+ void importChartProtection( SequenceInputStream& rStrm );
/** Imports phonetic settings from the PHONETICPR record. */
- void importPhoneticPr( RecordInputStream& rStrm );
+ void importPhoneticPr( SequenceInputStream& rStrm );
+ /** Imports sheet properties from a SHEETEXT record. */
+ void importSheetExt( BiffInputStream& rStrm );
/** Imports sheet properties from a SHEETPR record. */
void importSheetPr( BiffInputStream& rStrm );
/** Imports protection status from the PROTECT record. */
@@ -140,4 +142,3 @@ private:
} // namespace oox
#endif
-