diff options
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 3 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlimprt.hxx | 5 | ||||
-rw-r--r-- | sc/source/filter/xml/xmltabi.cxx | 3 |
4 files changed, 13 insertions, 4 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index a0bc8075371a..0520e7cc9071 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -2886,12 +2886,12 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const Reference<sheet::XSpreadshe if (pProtect && pProtect->isProtected() && getDefaultVersion() > SvtSaveOptions::ODFVER_012) { if (pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS)) - AddAttribute(XML_NAMESPACE_TABLE, XML_SELECT_PROTECTED_CELLS, XML_TRUE); + AddAttribute(XML_NAMESPACE_OFFICE_EXT, XML_SELECT_PROTECTED_CELLS, XML_TRUE); if (pProtect->isOptionEnabled(ScTableProtection::SELECT_UNLOCKED_CELLS)) - AddAttribute(XML_NAMESPACE_TABLE, XML_SELECT_UNPROTECTED_CELLS, XML_TRUE); + AddAttribute(XML_NAMESPACE_OFFICE_EXT, XML_SELECT_UNPROTECTED_CELLS, XML_TRUE); OUString aElemName = GetNamespaceMap().GetQNameByKey( - XML_NAMESPACE_TABLE, GetXMLToken(XML_TABLE_PROTECTION)); + XML_NAMESPACE_OFFICE_EXT, GetXMLToken(XML_TABLE_PROTECTION)); SvXMLElementExport aElemProtected(*this, aElemName, true, true); } diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 69f46b08229b..1f02083e63b3 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -829,6 +829,7 @@ const SvXMLTokenMap& ScXMLImport::GetTableElemTokenMap() { XML_NAMESPACE_TABLE, XML_TABLE_COLUMNS, XML_TOK_TABLE_COLS }, { XML_NAMESPACE_TABLE, XML_TABLE_COLUMN, XML_TOK_TABLE_COL }, { XML_NAMESPACE_TABLE, XML_TABLE_PROTECTION, XML_TOK_TABLE_PROTECTION }, + { XML_NAMESPACE_OFFICE_EXT, XML_TABLE_PROTECTION, XML_TOK_TABLE_PROTECTION_EXT }, { XML_NAMESPACE_TABLE, XML_TABLE_ROW_GROUP, XML_TOK_TABLE_ROW_GROUP }, { XML_NAMESPACE_TABLE, XML_TABLE_HEADER_ROWS, XML_TOK_TABLE_HEADER_ROWS }, { XML_NAMESPACE_TABLE, XML_TABLE_ROWS, XML_TOK_TABLE_ROWS }, @@ -857,6 +858,8 @@ const SvXMLTokenMap& ScXMLImport::GetTableProtectionAttrTokenMap() { { XML_NAMESPACE_TABLE, XML_SELECT_PROTECTED_CELLS, XML_TOK_TABLE_SELECT_PROTECTED_CELLS }, { XML_NAMESPACE_TABLE, XML_SELECT_UNPROTECTED_CELLS, XML_TOK_TABLE_SELECT_UNPROTECTED_CELLS }, + { XML_NAMESPACE_OFFICE_EXT, XML_SELECT_PROTECTED_CELLS, XML_TOK_TABLE_SELECT_PROTECTED_CELLS_EXT }, + { XML_NAMESPACE_OFFICE_EXT, XML_SELECT_UNPROTECTED_CELLS, XML_TOK_TABLE_SELECT_UNPROTECTED_CELLS_EXT }, XML_TOKEN_MAP_END }; pTableProtectionElemTokenMap = new SvXMLTokenMap(aTableProtectionTokenMap); diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx index f3dba757686d..bf2d9ae5ea36 100644 --- a/sc/source/filter/xml/xmlimprt.hxx +++ b/sc/source/filter/xml/xmlimprt.hxx @@ -247,6 +247,7 @@ enum ScXMLTableTokens XML_TOK_TABLE_ROW_GROUP, XML_TOK_TABLE_HEADER_ROWS, XML_TOK_TABLE_PROTECTION, + XML_TOK_TABLE_PROTECTION_EXT, XML_TOK_TABLE_ROWS, XML_TOK_TABLE_ROW, XML_TOK_TABLE_SOURCE, @@ -261,7 +262,9 @@ enum ScXMLTableTokens enum ScXMLTokenProtectionTokens { XML_TOK_TABLE_SELECT_PROTECTED_CELLS, - XML_TOK_TABLE_SELECT_UNPROTECTED_CELLS + XML_TOK_TABLE_SELECT_UNPROTECTED_CELLS, + XML_TOK_TABLE_SELECT_PROTECTED_CELLS_EXT, + XML_TOK_TABLE_SELECT_UNPROTECTED_CELLS_EXT }; enum ScXMLTableRowsTokens diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx index 17015291e6c8..fc23c226cde1 100644 --- a/sc/source/filter/xml/xmltabi.cxx +++ b/sc/source/filter/xml/xmltabi.cxx @@ -286,6 +286,7 @@ SvXMLImportContext *ScXMLTableContext::CreateChildContext( sal_uInt16 nPrefix, rLName, xAttrList ); break; case XML_TOK_TABLE_PROTECTION: + case XML_TOK_TABLE_PROTECTION_EXT: pContext = new ScXMLTableProtectionContext( GetScImport(), nPrefix, rLName, xAttrList ); break; case XML_TOK_TABLE_ROW_GROUP: @@ -454,9 +455,11 @@ ScXMLTableProtectionContext::ScXMLTableProtectionContext( switch (rAttrTokenMap.Get(nLocalPrefix, aLocalName)) { case XML_TOK_TABLE_SELECT_PROTECTED_CELLS: + case XML_TOK_TABLE_SELECT_PROTECTED_CELLS_EXT: bSelectProtectedCells = IsXMLToken(aValue, XML_TRUE); break; case XML_TOK_TABLE_SELECT_UNPROTECTED_CELLS: + case XML_TOK_TABLE_SELECT_UNPROTECTED_CELLS_EXT: bSelectUnprotectedCells = IsXMLToken(aValue, XML_TRUE); break; default: |