diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-07-01 15:03:15 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-07-01 15:03:15 +0000 |
commit | d91c7dd8e932b3a16ef7bff8d9edf84af7ef1b70 (patch) | |
tree | c9973af45ae146377b874bfaf412bb8c128b3230 /xmloff/source/table | |
parent | 49c040f8cfd84bf41c2324544064f85ec636ba3b (diff) |
INTEGRATION: CWS odfmetadata (1.3.50); FILE MERGED
2008/06/19 17:04:48 mst 1.3.50.1: #i90620#
- xmloff/source/table/XMLTableImport.cxx:
+ XMLTableImportContext::ImportColumn(),
XMLTableImportContext::ImportRow(),
XMLCellImportContext::XMLCellImportContext(): attribute xml:id
Diffstat (limited to 'xmloff/source/table')
-rw-r--r-- | xmloff/source/table/XMLTableImport.cxx | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx index 287cb6bd1b46..3a9816064ea9 100644 --- a/xmloff/source/table/XMLTableImport.cxx +++ b/xmloff/source/table/XMLTableImport.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: XMLTableImport.cxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -349,11 +349,13 @@ SvXMLImportContext * XMLTableImportContext::ImportColumn( USHORT nPrefix, const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for(sal_Int16 i=0; i < nAttrCount; i++) { - OUString sAttrName = xAttrList->getNameByIndex( i ); + const OUString sAttrName( xAttrList->getNameByIndex( i ) ); + const OUString sValue( xAttrList->getValueByIndex( i ) ); OUString aLocalName; - if( GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ) == XML_NAMESPACE_TABLE ) + + sal_uInt16 nPrefix2 = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + if( XML_NAMESPACE_TABLE == nPrefix2 ) { - const OUString sValue( xAttrList->getValueByIndex( i ) ); if( IsXMLToken( aLocalName, XML_NUMBER_COLUMNS_REPEATED ) ) { nRepeated = sValue.toInt32(); @@ -371,6 +373,12 @@ SvXMLImportContext * XMLTableImportContext::ImportColumn( USHORT nPrefix, const xInfo->mbVisibility = IsXMLToken( sValue, XML_VISIBLE ); } } + else if ( (XML_NAMESPACE_XML == nPrefix2) && + IsXMLToken(aLocalName, XML_ID) ) + { + (void) sValue; +//FIXME: TODO + } } if( nRepeated <= 1 ) @@ -457,13 +465,13 @@ SvXMLImportContext * XMLTableImportContext::ImportRow( USHORT nPrefix, const OUS sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for(sal_Int16 i=0; i < nAttrCount; i++) { - OUString sAttrName = xAttrList->getNameByIndex( i ); + const OUString sAttrName( xAttrList->getNameByIndex( i ) ); + const OUString sValue( xAttrList->getValueByIndex( i ) ); OUString aLocalName; sal_uInt16 nPrefix2 = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); if( nPrefix2 == XML_NAMESPACE_TABLE ) { - const OUString sValue( xAttrList->getValueByIndex( i ) ); if( IsXMLToken( aLocalName, XML_NUMBER_ROWS_REPEATED ) ) { nRepeated = sValue.toInt32(); @@ -481,6 +489,12 @@ SvXMLImportContext * XMLTableImportContext::ImportRow( USHORT nPrefix, const OUS bVisibility = IsXMLToken( sValue, XML_VISIBLE ); } } + else if ( (XML_NAMESPACE_XML == nPrefix2) && + IsXMLToken(aLocalName, XML_ID) ) + { + (void) sValue; +//FIXME: TODO + } } if( sStyleName.getLength() ) @@ -618,16 +632,17 @@ XMLCellImportContext::XMLCellImportContext( SvXMLImport& rImport, const Referenc { OUString sStyleName; - // read attributes for the table-row + // read attributes for the table-cell sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for(sal_Int16 i=0; i < nAttrCount; i++) { - OUString sAttrName = xAttrList->getNameByIndex( i ); + const OUString sAttrName( xAttrList->getNameByIndex( i ) ); + const OUString sValue( xAttrList->getValueByIndex( i ) ); OUString aLocalName; - if( GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ) == XML_NAMESPACE_TABLE ) + sal_uInt16 nPrefix2 = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + if( XML_NAMESPACE_TABLE == nPrefix2 ) { - const OUString sValue( xAttrList->getValueByIndex( i ) ); if( IsXMLToken( aLocalName, XML_NUMBER_COLUMNS_REPEATED ) ) { mnRepeated = sValue.toInt32(); @@ -645,6 +660,13 @@ XMLCellImportContext::XMLCellImportContext( SvXMLImport& rImport, const Referenc sStyleName = sValue; } } + else if ( (XML_NAMESPACE_XML == nPrefix2) && + IsXMLToken(aLocalName, XML_ID) ) + { + (void) sValue; +//FIXME: TODO + } +//FIXME: RDFa (table:table-cell) } // if there is no style name at the cell, try default style name from row |