diff options
Diffstat (limited to 'sc/source/filter/xml/xmlimprt.hxx')
-rw-r--r-- | sc/source/filter/xml/xmlimprt.hxx | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx index d11a5bc0e76a..5198f72c8b36 100644 --- a/sc/source/filter/xml/xmlimprt.hxx +++ b/sc/source/filter/xml/xmlimprt.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,7 +53,7 @@ #include <com/sun/star/sheet/XSheetCellRangeContainer.hpp> #include <vector> -#include <hash_map> +#include <boost/unordered_map.hpp> class ScRangeList; class ScMyStyleNumberFormats; @@ -169,6 +170,7 @@ enum ScXMLTableTokens XML_TOK_TABLE_COL, XML_TOK_TABLE_ROW_GROUP, XML_TOK_TABLE_HEADER_ROWS, + XML_TOK_TABLE_PROTECTION, XML_TOK_TABLE_ROWS, XML_TOK_TABLE_ROW, XML_TOK_TABLE_SOURCE, @@ -179,6 +181,12 @@ enum ScXMLTableTokens XML_TOK_TABLE_EVENT_LISTENERS_EXT }; +enum ScXMLTokenProtectionTokens +{ + XML_TOK_TABLE_SELECT_PROTECTED_CELLS, + XML_TOK_TABLE_SELECT_UNPROTECTED_CELLS +}; + enum ScXMLTableRowsTokens { XML_TOK_TABLE_ROWS_ROW_GROUP, @@ -199,9 +207,11 @@ enum ScXMLTableAttrTokens { XML_TOK_TABLE_NAME, XML_TOK_TABLE_STYLE_NAME, - XML_TOK_TABLE_PROTECTION, + XML_TOK_TABLE_PROTECTED, XML_TOK_TABLE_PRINT_RANGES, XML_TOK_TABLE_PASSWORD, + XML_TOK_TABLE_PASSHASH, + XML_TOK_TABLE_PASSHASH_2, XML_TOK_TABLE_PRINT }; @@ -481,7 +491,8 @@ enum ScXMLDataPilotTableAttrTokens XML_TOK_DATA_PILOT_TABLE_ATTR_TARGET_RANGE_ADDRESS, XML_TOK_DATA_PILOT_TABLE_ATTR_BUTTONS, XML_TOK_DATA_PILOT_TABLE_ATTR_SHOW_FILTER_BUTTON, - XML_TOK_DATA_PILOT_TABLE_ATTR_DRILL_DOWN + XML_TOK_DATA_PILOT_TABLE_ATTR_DRILL_DOWN, + XML_TOK_DATA_PILOT_TABLE_ATTR_HEADER_GRID_LAYOUT }; enum ScXMLDataPilotTableElemTokens @@ -519,7 +530,8 @@ enum ScXMLDataPilotTableSourceCellRangeElemTokens enum ScXMLDataPilotTableSourceCellRangeAttrTokens { - XML_TOK_SOURCE_CELL_RANGE_ATTR_CELL_RANGE_ADDRESS + XML_TOK_SOURCE_CELL_RANGE_ATTR_CELL_RANGE_ADDRESS, + XML_TOK_SOURCE_CELL_RANGE_ATTR_NAME }; enum ScXMLDataPilotFieldAttrTokens @@ -599,7 +611,7 @@ class SfxItemSet; class SvXMLNumFmtHelper; class XMLShapeImportHelper; class ScXMLChangeTrackingImportHelper; -class ScUnoGuard; +class SolarMutexGuard; struct tScMyCellRange { @@ -641,7 +653,7 @@ struct ScMyImportValidation rtl::OUString sFormula2; rtl::OUString sFormulaNmsp1; rtl::OUString sFormulaNmsp2; - rtl::OUString sBaseCellAddress; // #b4974740# string is used directly + rtl::OUString sBaseCellAddress; // string is used directly com::sun::star::sheet::ValidationAlertStyle aAlertStyle; com::sun::star::sheet::ValidationType aValidationType; com::sun::star::sheet::ConditionOperator aOperator; @@ -659,7 +671,7 @@ class ScMyStylesImportHelper; class ScXMLImport: public SvXMLImport { - typedef ::std::hash_map< ::rtl::OUString, sal_Int16, ::rtl::OUStringHash > CellTypeMap; + typedef ::boost::unordered_map< ::rtl::OUString, sal_Int16, ::rtl::OUStringHash > CellTypeMap; CellTypeMap aCellTypeMap; ScDocument* pDoc; @@ -672,17 +684,12 @@ class ScXMLImport: public SvXMLImport rtl::OUString sStandardFormat; rtl::OUString sType; -// SvXMLAutoStylePoolP *pScAutoStylePool; UniReference < XMLPropertyHandlerFactory > xScPropHdlFactory; UniReference < XMLPropertySetMapper > xCellStylesPropertySetMapper; UniReference < XMLPropertySetMapper > xColumnStylesPropertySetMapper; UniReference < XMLPropertySetMapper > xRowStylesPropertySetMapper; UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper; -// SvXMLImportContextRef xStyles; -// SvXMLImportContextRef xAutoStyles; -// SvXMLImportItemMapper *pParaItemMapper;// paragraph item import -// SvI18NMap *pI18NMap; // name mapping for I18N SvXMLTokenMap *pDocElemTokenMap; SvXMLTokenMap *pStylesElemTokenMap; SvXMLTokenMap *pStylesAttrTokenMap; @@ -698,6 +705,7 @@ class ScXMLImport: public SvXMLImport SvXMLTokenMap *pLabelRangesElemTokenMap; SvXMLTokenMap *pLabelRangeAttrTokenMap; SvXMLTokenMap *pTableElemTokenMap; + SvXMLTokenMap *pTableProtectionElemTokenMap; SvXMLTokenMap *pTableRowsElemTokenMap; SvXMLTokenMap *pTableColsElemTokenMap; SvXMLTokenMap *pTableScenarioAttrTokenMap; @@ -756,7 +764,7 @@ class ScXMLImport: public SvXMLImport ScMyLabelRanges* pMyLabelRanges; ScMyImportValidations* pValidations; ScMyImpDetectiveOpArray* pDetectiveOpArray; - ScUnoGuard* pScUnoGuard; + SolarMutexGuard* pSolarMutexGuard; std::vector<rtl::OUString> aTableStyles; XMLNumberFormatAttributesExportHelper* pNumberFormatAttributesExportHelper; @@ -810,8 +818,6 @@ public: const ::rtl::OUString& rLocalName ); SvXMLImportContext *CreateStylesContext(const ::rtl::OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList, sal_Bool bAutoStyles ); -// SvXMLImportContext *CreateUseStylesContext(const ::rtl::OUString& rLocalName , -// const ::com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList); SvXMLImportContext *CreateBodyContext( const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -831,26 +837,12 @@ public: sal_Int16 GetCellType(const ::rtl::OUString& rStrValue) const; -// SvI18NMap& GetI18NMap() { return *pI18NMap; } - -// inline const SvXMLImportItemMapper& GetParaItemMapper() const; -// SvXMLImportContext *CreateParaItemImportContext( sal_uInt16 nPrefix, -// const ::rtl::OUString& rLocalName, -// const ::com::sun::star::uno::Reference< -// ::com::sun::star::xml::sax::XAttributeList& xAttrList, -// SfxItemSet& rItemSet ); - UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const { return xCellStylesPropertySetMapper; } UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const { return xColumnStylesPropertySetMapper; } UniReference < XMLPropertySetMapper > GetRowStylesPropertySetMapper() const { return xRowStylesPropertySetMapper; } UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const { return xTableStylesPropertySetMapper; } -// SvXMLImportContextRef GetAutoStyles() const { return xAutoStyles; } -// SvXMLImportContextRef GetStyles() const { return xStyles; } const SvXMLTokenMap& GetDocElemTokenMap(); -//UNUSED2008-05 const SvXMLTokenMap& GetStylesElemTokenMap(); -//UNUSED2008-05 const SvXMLTokenMap& GetStylesAttrTokenMap(); -//UNUSED2008-05 const SvXMLTokenMap& GetStyleElemTokenMap(); const SvXMLTokenMap& GetBodyElemTokenMap(); const SvXMLTokenMap& GetContentValidationsElemTokenMap(); const SvXMLTokenMap& GetContentValidationElemTokenMap(); @@ -862,6 +854,7 @@ public: const SvXMLTokenMap& GetLabelRangesElemTokenMap(); const SvXMLTokenMap& GetLabelRangeAttrTokenMap(); const SvXMLTokenMap& GetTableElemTokenMap(); + const SvXMLTokenMap& GetTableProtectionAttrTokenMap(); const SvXMLTokenMap& GetTableRowsElemTokenMap(); const SvXMLTokenMap& GetTableColsElemTokenMap(); const SvXMLTokenMap& GetTableAttrTokenMap(); @@ -913,11 +906,6 @@ public: const SvXMLTokenMap& GetDataPilotMembersElemTokenMap(); const SvXMLTokenMap& GetDataPilotMemberAttrTokenMap(); const SvXMLTokenMap& GetConsolidationAttrTokenMap(); -// const SvXMLTokenMap& GetTextPElemTokenMap(); -// const SvXMLTokenMap& GetTextPAttrTokenMap(); -// const SvXMLTokenMap& GetStyleStylesElemTokenMap(); -// const SvXMLTokenMap& GetTextListBlockAttrTokenMap(); -// const SvXMLTokenMap& GetTextListBlockElemTokenMap(); void AddNamedExpression(const ScMyNamedExpression* pMyNamedExpression) { if (!pMyNamedExpressions) @@ -985,7 +973,6 @@ public: // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); - // ::com::sun::star::xml::sax::XDocumentHandler virtual void SAL_CALL startDocument(void) throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL endDocument(void) @@ -993,6 +980,18 @@ public: virtual void DisposingModel(); + /** + * Use this class to manage solar mutex locking instead of calling + * LockSolarMutex() and UnlockSolarMutex() directly. + */ + class MutexGuard + { + public: + explicit MutexGuard(ScXMLImport& rImport); + ~MutexGuard(); + private: + ScXMLImport& mrImport; + }; void LockSolarMutex(); void UnlockSolarMutex(); @@ -1046,3 +1045,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |