summaryrefslogtreecommitdiff
path: root/xmloff/source/style/ImageStyle.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-01-08 12:52:04 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-01-14 14:45:01 +0100
commit640a7c791b4665c16be7ad8f5f7dda30dcc88eda (patch)
tree31f6dfe2de9a1620d8e1e99f3e899628930db1a0 /xmloff/source/style/ImageStyle.cxx
parent61618210f87f57ae21cc39530c9f777d76002a12 (diff)
xmloff: XmlImageStyle class is pointless as the methods are static
When used, we instantiate the XmlImageStyle class but all its methods are static, so instantioation is completely pointless. So change XmlImageStyle to a namespace and static method to functions. Change-Id: I6385bd7eeb08c627cb8e48b79a6820372cf94a65 Reviewed-on: https://gerrit.libreoffice.org/47851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'xmloff/source/style/ImageStyle.cxx')
-rw-r--r--xmloff/source/style/ImageStyle.cxx36
1 files changed, 7 insertions, 29 deletions
diff --git a/xmloff/source/style/ImageStyle.cxx b/xmloff/source/style/ImageStyle.cxx
index 2a648f3084d9..d4be8a0a2a1f 100644
--- a/xmloff/source/style/ImageStyle.cxx
+++ b/xmloff/source/style/ImageStyle.cxx
@@ -22,7 +22,7 @@
#include <xmloff/attrlist.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmluconv.hxx>
-#include<xmloff/xmlnmspe.hxx>
+#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlexp.hxx>
#include <xmloff/xmlimp.hxx>
@@ -30,9 +30,8 @@
#include <rtl/ustring.hxx>
#include <xmloff/xmltkmap.hxx>
-using namespace ::com::sun::star;
-
-using namespace ::xmloff::token;
+using namespace css;
+using namespace xmloff::token;
enum SvXMLTokenMapAttrs
{
@@ -44,21 +43,7 @@ enum SvXMLTokenMapAttrs
XML_TOK_IMAGE_ACTUATE
};
-
-XMLImageStyle::XMLImageStyle()
-{
-}
-
-XMLImageStyle::~XMLImageStyle()
-{
-}
-
-void XMLImageStyle::exportXML( const OUString& rStrName, const css::uno::Any& rValue, SvXMLExport& rExport )
-{
- ImpExportXML( rStrName, rValue, rExport );
-}
-
-void XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any& rValue, SvXMLExport& rExport )
+void XMLImageStyle::exportXML(OUString const & rStrName, uno::Any const & rValue, SvXMLExport& rExport)
{
OUString sImageURL;
@@ -97,16 +82,10 @@ void XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any& rVal
}
}
-void XMLImageStyle::importXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Any& rValue, OUString& rStrName, SvXMLImport& rImport )
+bool XMLImageStyle::importXML(uno::Reference<xml::sax::XAttributeList> const & xAttrList,
+ uno::Any& rValue, OUString& rStrName, SvXMLImport& rImport)
{
- ImpImportXML( xAttrList, rValue, rStrName, rImport );
-}
-
-bool XMLImageStyle::ImpImportXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList,
- uno::Any& rValue, OUString& rStrName,
- SvXMLImport& rImport )
-{
- static const SvXMLTokenMapEntry aHatchAttrTokenMap[] =
+ static const SvXMLTokenMapEntry aHatchAttrTokenMap[] =
{
{ XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_IMAGE_NAME },
{ XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, XML_TOK_IMAGE_DISPLAY_NAME },
@@ -175,7 +154,6 @@ bool XMLImageStyle::ImpImportXML( const uno::Reference< xml::sax::XAttributeList
}
bool bRet = bHasName && bHasHRef;
-
return bRet;
}