summaryrefslogtreecommitdiff
path: root/xmloff/source/forms/elementimport.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <b_michaelsen@openoffice.org>2010-07-13 14:36:24 +0200
committerBjoern Michaelsen <b_michaelsen@openoffice.org>2010-07-13 14:36:24 +0200
commit9bea5fdbf9ac1ce9d6118a63e8f98d7264872cc8 (patch)
tree577b47340d556419e4b8e690f0c841c4d69f97fc /xmloff/source/forms/elementimport.cxx
parent4f19a2d4af8de4cb23e0a9e74d8df6ba27cdf5e1 (diff)
parent871f924d559017fcf06a4c691fae6bcd9a82491e (diff)
CWS gnumake2: resync to DEV300_m84
Diffstat (limited to 'xmloff/source/forms/elementimport.cxx')
-rw-r--r--xmloff/source/forms/elementimport.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 85f465e122..c5ce0300a4 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -586,12 +586,21 @@ namespace xmloff
//---------------------------------------------------------------------
void OControlImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue)
{
- static const sal_Char* pControlIdAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_CONTROL_ID);
static const sal_Char* pLinkedCellAttributeName = OAttributeMetaData::getBindingAttributeName(BA_LINKED_CELL);
- if ( !m_sControlId.getLength() && _rLocalName.equalsAscii( pControlIdAttributeName ) )
- { // it's the control id
- m_sControlId = _rValue;
+ if (IsXMLToken(_rLocalName, XML_ID))
+ { // it's the control id
+ if (XML_NAMESPACE_XML == _nNamespaceKey)
+ {
+ m_sControlId = _rValue;
+ }
+ else if (XML_NAMESPACE_FORM == _nNamespaceKey)
+ {
+ if (!m_sControlId.getLength())
+ {
+ m_sControlId = _rValue;
+ }
+ }
}
else if ( _rLocalName.equalsAscii( pLinkedCellAttributeName ) )
{ // it's the address of a spreadsheet cell