summaryrefslogtreecommitdiff
path: root/forms/source/xforms/model_ui.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/xforms/model_ui.cxx')
-rw-r--r--forms/source/xforms/model_ui.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx
index 39c269087710..7e28623c5a2f 100644
--- a/forms/source/xforms/model_ui.cxx
+++ b/forms/source/xforms/model_ui.cxx
@@ -669,7 +669,7 @@ Model::XNode_t Model::renameNode( const XNode_t& xNode,
// replace node
Reference<XNode> xParent = xNode->getParentNode();
xParent->removeChild( xNode );
- xNew = xParent->appendChild( Reference<XNode>( xAttr, UNO_QUERY ) );
+ xNew = xParent->appendChild( xAttr );
}
else
{
@@ -790,9 +790,7 @@ static OUString lcl_serializeForDisplay( const Reference<XNodeList>& xNodes )
Reference<XDocument> xDocument( getDocumentBuilder()->newDocument() );
Reference<XDocumentFragment> xFragment(
xDocument->createDocumentFragment() );
- Reference<XNode> xNode( xFragment, UNO_QUERY );
OSL_ENSURE( xFragment.is(), "xFragment" );
- OSL_ENSURE( xNode.is(), "xNode" );
sal_Int32 nAttributeNodes = 0;
@@ -824,7 +822,7 @@ static OUString lcl_serializeForDisplay( const Reference<XNodeList>& xNodes )
}
// append node
- xNode->appendChild( xDocument->importNode( xCurrent, sal_True ) );
+ xFragment->appendChild( xDocument->importNode( xCurrent, sal_True ) );
}
OSL_ENSURE( ( nAttributeNodes == 0 ) || ( nAttributeNodes == nLength ),
"lcl_serializeForDisplay: mixed attribute and non-attribute nodes?" );