loplugin:constantfunction: xmloff
Change-Id: I0ddcaada71eaa53cd7e6320c6ccaa8d8971f6df0
This commit is contained in:
@@ -63,16 +63,6 @@ public:
|
||||
virtual ~DomVisitor() {}
|
||||
virtual void element( const Reference<XElement>& ) {}
|
||||
virtual void character( const Reference<XCharacterData>& ) {}
|
||||
void attribute( const Reference<XAttr>& ) {}
|
||||
void cdata( const Reference<XCDATASection>& ) {}
|
||||
void comment( const Reference<XComment>& ) {}
|
||||
void documentFragment( const Reference<XDocumentFragment>& ) {}
|
||||
void document( const Reference<XDocument>& ) {}
|
||||
void documentType( const Reference<XDocumentType>& ) {}
|
||||
void entity( const Reference<XEntity>& ) {}
|
||||
void entityReference( const Reference<XEntityReference>& ) {}
|
||||
void notation( const Reference<XNotation>& ) {}
|
||||
void processingInstruction( const Reference<XProcessingInstruction>& ) {}
|
||||
virtual void endElement( const Reference<XElement>& ) {}
|
||||
};
|
||||
|
||||
@@ -86,37 +76,27 @@ void visitNode( DomVisitor& rVisitor, const Reference<XNode>& xNode )
|
||||
switch( xNode->getNodeType() )
|
||||
{
|
||||
case NodeType_ATTRIBUTE_NODE:
|
||||
rVisitor.attribute( Reference<XAttr>( xNode, UNO_QUERY_THROW ) );
|
||||
break;
|
||||
case NodeType_CDATA_SECTION_NODE:
|
||||
rVisitor.cdata( Reference<XCDATASection>( xNode, UNO_QUERY_THROW ) );
|
||||
break;
|
||||
case NodeType_COMMENT_NODE:
|
||||
rVisitor.comment( Reference<XComment>( xNode, UNO_QUERY_THROW ) );
|
||||
break;
|
||||
case NodeType_DOCUMENT_FRAGMENT_NODE:
|
||||
rVisitor.documentFragment( Reference<XDocumentFragment>( xNode, UNO_QUERY_THROW ) );
|
||||
break;
|
||||
case NodeType_DOCUMENT_NODE:
|
||||
rVisitor.document( Reference<XDocument>( xNode, UNO_QUERY_THROW ) );
|
||||
break;
|
||||
case NodeType_DOCUMENT_TYPE_NODE:
|
||||
rVisitor.documentType( Reference<XDocumentType>( xNode, UNO_QUERY_THROW ) );
|
||||
break;
|
||||
case NodeType_ELEMENT_NODE:
|
||||
rVisitor.element( Reference<XElement>( xNode, UNO_QUERY_THROW ) );
|
||||
break;
|
||||
case NodeType_ENTITY_NODE:
|
||||
rVisitor.entity( Reference<XEntity>( xNode, UNO_QUERY_THROW ) );
|
||||
break;
|
||||
case NodeType_ENTITY_REFERENCE_NODE:
|
||||
rVisitor.entityReference( Reference<XEntityReference>( xNode, UNO_QUERY_THROW ) );
|
||||
break;
|
||||
case NodeType_NOTATION_NODE:
|
||||
rVisitor.notation( Reference<XNotation>( xNode, UNO_QUERY_THROW ) );
|
||||
break;
|
||||
case NodeType_PROCESSING_INSTRUCTION_NODE:
|
||||
rVisitor.processingInstruction( Reference<XProcessingInstruction>( xNode, UNO_QUERY_THROW ) );
|
||||
break;
|
||||
case NodeType_TEXT_NODE:
|
||||
rVisitor.character( Reference<XCharacterData>( xNode, UNO_QUERY_THROW ) );
|
||||
|
@@ -140,12 +140,6 @@ namespace xmloff
|
||||
return "";
|
||||
}
|
||||
|
||||
sal_uInt16 OAttributeMetaData::getDatabaseAttributeNamespace(sal_Int32 /*_nId*/)
|
||||
{
|
||||
// nothing special here
|
||||
return XML_NAMESPACE_FORM;
|
||||
}
|
||||
|
||||
const sal_Char* OAttributeMetaData::getBindingAttributeName(sal_Int32 _nId)
|
||||
{
|
||||
switch (_nId)
|
||||
@@ -159,12 +153,6 @@ namespace xmloff
|
||||
return "";
|
||||
}
|
||||
|
||||
sal_uInt16 OAttributeMetaData::getBindingAttributeNamespace(sal_Int32)
|
||||
{
|
||||
// nothing special here
|
||||
return XML_NAMESPACE_FORM;
|
||||
}
|
||||
|
||||
const sal_Char* OAttributeMetaData::getSpecialAttributeName(sal_Int32 _nId)
|
||||
{
|
||||
switch (_nId)
|
||||
@@ -214,12 +202,6 @@ namespace xmloff
|
||||
return "";
|
||||
}
|
||||
|
||||
sal_uInt16 OAttributeMetaData::getOfficeFormsAttributeNamespace(OfficeFormsAttributes /* _eAttrib */)
|
||||
{
|
||||
// nothing special here
|
||||
return XML_NAMESPACE_FORM;
|
||||
}
|
||||
|
||||
//= OAttribute2Property
|
||||
OAttribute2Property::OAttribute2Property()
|
||||
{
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include <com/sun/star/beans/XPropertySet.hpp>
|
||||
#include <sal/types.h>
|
||||
#include <salhelper/simplereferenceobject.hxx>
|
||||
#include <xmloff/xmlnmspe.hxx>
|
||||
|
||||
struct SvXMLEnumMapEntry;
|
||||
|
||||
@@ -181,7 +182,11 @@ namespace xmloff
|
||||
@param _nId
|
||||
the id of the attribute. Has to be one of the DA_* constants.
|
||||
*/
|
||||
static sal_uInt16 getDatabaseAttributeNamespace(sal_Int32 _nId);
|
||||
static inline sal_uInt16 getDatabaseAttributeNamespace(sal_Int32 )
|
||||
{
|
||||
// nothing special here
|
||||
return XML_NAMESPACE_FORM;
|
||||
}
|
||||
|
||||
/** calculates the xml attribute representation of a special attribute.
|
||||
@param _nId
|
||||
@@ -199,7 +204,11 @@ namespace xmloff
|
||||
@param _nId
|
||||
the id of the attribute. Has to be one of the BA_* constants.
|
||||
*/
|
||||
static sal_uInt16 getBindingAttributeNamespace(sal_Int32 _nId);
|
||||
static inline sal_uInt16 getBindingAttributeNamespace(sal_Int32 )
|
||||
{
|
||||
// nothing special here
|
||||
return XML_NAMESPACE_FORM;
|
||||
}
|
||||
|
||||
/** calculates the xml namespace key to use for a special attribute.
|
||||
@param _nId
|
||||
@@ -217,7 +226,10 @@ namespace xmloff
|
||||
@param _nId
|
||||
the id of the attribute
|
||||
*/
|
||||
static sal_uInt16 getOfficeFormsAttributeNamespace(OfficeFormsAttributes _eAttrib);
|
||||
static inline sal_uInt16 getOfficeFormsAttributeNamespace(OfficeFormsAttributes )
|
||||
{ // nothing special here
|
||||
return XML_NAMESPACE_FORM;
|
||||
}
|
||||
};
|
||||
|
||||
//= OAttribute2Property
|
||||
|
Reference in New Issue
Block a user