[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Mon Jan 6 03:44:22 PST 2014


 sc/source/filter/xml/xmlimprt.cxx |    3 +++
 sc/source/filter/xml/xmlimprt.hxx |    5 ++++-
 sc/source/filter/xml/xmltabi.cxx  |    3 +++
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 3d7011c3c2b47aca273d7e8a26bdaeaf982d8702
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sat Dec 28 12:44:02 2013 +0100

    read elements/attribs written to extension namespace
    
    Related to validation errors with fdo#31296
    
    Change-Id: I1b76e05a9996b1123db164629475a3f7b07dda69
    Reviewed-on: https://gerrit.libreoffice.org/7222
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 28c3ace..3378541 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -828,6 +828,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            },
@@ -856,6 +857,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 0957a9f..3fb584a 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -240,6 +240,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,
@@ -254,7 +255,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 a1bc801..f15a602 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:


More information about the Libreoffice-commits mailing list