summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-24 09:56:26 +0200
committerNoel Grandin <noel@peralex.com>2015-03-24 10:31:17 +0200
commit4d4022fef2c499e1151ee66a79377e77e5093cae (patch)
treefeaa1933b3a6b12e03daa10d9710137137817a44 /xmloff
parent6618a6d7f2b462e43ef8df4a14babacb5519c986 (diff)
loplugin:constantfunction: xmloff
Change-Id: I0ddcaada71eaa53cd7e6320c6ccaa8d8971f6df0
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/DomExport.cxx20
-rw-r--r--xmloff/source/forms/formattributes.cxx18
-rw-r--r--xmloff/source/forms/formattributes.hxx18
3 files changed, 15 insertions, 41 deletions
diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx
index f25e7c9fae76..b66fb47023b6 100644
--- a/xmloff/source/core/DomExport.cxx
+++ b/xmloff/source/core/DomExport.cxx
@@ -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 ) );
diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx
index 0ccb33973a18..1973c23adf29 100644
--- a/xmloff/source/forms/formattributes.cxx
+++ b/xmloff/source/forms/formattributes.cxx
@@ -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()
{
diff --git a/xmloff/source/forms/formattributes.hxx b/xmloff/source/forms/formattributes.hxx
index c5802a0ea5b2..299e8e0cc753 100644
--- a/xmloff/source/forms/formattributes.hxx
+++ b/xmloff/source/forms/formattributes.hxx
@@ -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