Kaydet (Commit) debe137b authored tarafından Thomas Arnhold's avatar Thomas Arnhold

xmlscript: remove using namespace from headers

Change-Id: Ic3b355e732bcbecf020720752aadd70e0722b6f0
üst 673c60cd
...@@ -32,11 +32,6 @@ ...@@ -32,11 +32,6 @@
#include <vector> #include <vector>
using namespace ::rtl;
using namespace ::std;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
namespace xmlscript namespace xmlscript
{ {
inline sal_Int32 toInt32( OUString const & rStr ) SAL_THROW(()) inline sal_Int32 toInt32( OUString const & rStr ) SAL_THROW(())
...@@ -54,7 +49,7 @@ inline sal_Int32 toInt32( OUString const & rStr ) SAL_THROW(()) ...@@ -54,7 +49,7 @@ inline sal_Int32 toInt32( OUString const & rStr ) SAL_THROW(())
} }
inline bool getBoolAttr( inline bool getBoolAttr(
bool * pRet, OUString const & rAttrName, bool * pRet, OUString const & rAttrName,
Reference< xml::input::XAttributes > const & xAttributes, sal_Int32 uid ) css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, sal_Int32 uid )
{ {
OUString aValue( OUString aValue(
xAttributes->getValueByUidName( uid, rAttrName ) ); xAttributes->getValueByUidName( uid, rAttrName ) );
...@@ -72,7 +67,7 @@ inline bool getBoolAttr( ...@@ -72,7 +67,7 @@ inline bool getBoolAttr(
} }
else else
{ {
throw xml::sax::SAXException(rAttrName + ": no boolean value (true|false)!", Reference< XInterface >(), Any() ); throw css::xml::sax::SAXException(rAttrName + ": no boolean value (true|false)!", css::uno::Reference< css::uno::XInterface >(), css::uno::Any() );
} }
} }
return false; return false;
...@@ -80,7 +75,7 @@ inline bool getBoolAttr( ...@@ -80,7 +75,7 @@ inline bool getBoolAttr(
inline bool getStringAttr( inline bool getStringAttr(
OUString * pRet, OUString const & rAttrName, OUString * pRet, OUString const & rAttrName,
Reference< xml::input::XAttributes > const & xAttributes, sal_Int32 uid ) css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, sal_Int32 uid )
{ {
*pRet = xAttributes->getValueByUidName( uid, rAttrName ); *pRet = xAttributes->getValueByUidName( uid, rAttrName );
return (!pRet->isEmpty()); return (!pRet->isEmpty());
...@@ -88,7 +83,7 @@ inline bool getStringAttr( ...@@ -88,7 +83,7 @@ inline bool getStringAttr(
inline bool getLongAttr( inline bool getLongAttr(
sal_Int32 * pRet, OUString const & rAttrName, sal_Int32 * pRet, OUString const & rAttrName,
Reference< xml::input::XAttributes > const & xAttributes, css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
sal_Int32 uid ) sal_Int32 uid )
{ {
OUString aValue( OUString aValue(
...@@ -104,7 +99,7 @@ inline bool getLongAttr( ...@@ -104,7 +99,7 @@ inline bool getLongAttr(
// Library import // Library import
struct LibraryImport struct LibraryImport
: public ::cppu::WeakImplHelper1< xml::input::XRoot > : public ::cppu::WeakImplHelper1< css::xml::input::XRoot >
{ {
friend class LibrariesElement; friend class LibrariesElement;
friend class LibraryElement; friend class LibraryElement;
...@@ -138,64 +133,64 @@ public: ...@@ -138,64 +133,64 @@ public:
// XRoot // XRoot
virtual void SAL_CALL startDocument( virtual void SAL_CALL startDocument(
Reference< xml::input::XNamespaceMapping > const & xNamespaceMapping ) css::uno::Reference< css::xml::input::XNamespaceMapping > const & xNamespaceMapping )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL endDocument() virtual void SAL_CALL endDocument()
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL processingInstruction( virtual void SAL_CALL processingInstruction(
OUString const & rTarget, OUString const & rData ) OUString const & rTarget, OUString const & rData )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setDocumentLocator( virtual void SAL_CALL setDocumentLocator(
Reference< xml::sax::XLocator > const & xLocator ) css::uno::Reference< css::xml::sax::XLocator > const & xLocator )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual Reference< xml::input::XElement > SAL_CALL startRootElement( virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startRootElement(
sal_Int32 nUid, OUString const & rLocalName, sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::input::XAttributes > const & xAttributes ) css::uno::Reference< css::xml::input::XAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
}; };
class LibElementBase class LibElementBase
: public ::cppu::WeakImplHelper1< xml::input::XElement > : public ::cppu::WeakImplHelper1< css::xml::input::XElement >
{ {
protected: protected:
LibraryImport * _pImport; LibraryImport * _pImport;
LibElementBase * _pParent; LibElementBase * _pParent;
OUString _aLocalName; OUString _aLocalName;
Reference< xml::input::XAttributes > _xAttributes; css::uno::Reference< css::xml::input::XAttributes > _xAttributes;
public: public:
LibElementBase( LibElementBase(
OUString const & rLocalName, OUString const & rLocalName,
Reference< xml::input::XAttributes > const & xAttributes, css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
LibElementBase * pParent, LibraryImport * pImport ) LibElementBase * pParent, LibraryImport * pImport )
SAL_THROW(()); SAL_THROW(());
virtual ~LibElementBase() virtual ~LibElementBase()
SAL_THROW(()); SAL_THROW(());
// XElement // XElement
virtual Reference< xml::input::XElement > SAL_CALL getParent() virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL getParent()
throw (RuntimeException, std::exception) SAL_OVERRIDE; throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual OUString SAL_CALL getLocalName() virtual OUString SAL_CALL getLocalName()
throw (RuntimeException, std::exception) SAL_OVERRIDE; throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL getUid() virtual sal_Int32 SAL_CALL getUid()
throw (RuntimeException, std::exception) SAL_OVERRIDE; throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual Reference< xml::input::XAttributes > SAL_CALL getAttributes() virtual css::uno::Reference< css::xml::input::XAttributes > SAL_CALL getAttributes()
throw (RuntimeException, std::exception) SAL_OVERRIDE; throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL ignorableWhitespace( virtual void SAL_CALL ignorableWhitespace(
OUString const & rWhitespaces ) OUString const & rWhitespaces )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL characters( OUString const & rChars ) virtual void SAL_CALL characters( OUString const & rChars )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL processingInstruction( virtual void SAL_CALL processingInstruction(
OUString const & rTarget, OUString const & rData ) OUString const & rTarget, OUString const & rData )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL endElement() virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual Reference< xml::input::XElement > SAL_CALL startChildElement( virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(
sal_Int32 nUid, OUString const & rLocalName, sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::input::XAttributes > const & xAttributes ) css::uno::Reference< css::xml::input::XAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
}; };
class LibrariesElement : public LibElementBase class LibrariesElement : public LibElementBase
...@@ -203,19 +198,19 @@ class LibrariesElement : public LibElementBase ...@@ -203,19 +198,19 @@ class LibrariesElement : public LibElementBase
friend class LibraryElement; friend class LibraryElement;
protected: protected:
vector< LibDescriptor > mLibDescriptors; std::vector< LibDescriptor > mLibDescriptors;
public: public:
virtual Reference< xml::input::XElement > SAL_CALL startChildElement( virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(
sal_Int32 nUid, OUString const & rLocalName, sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::input::XAttributes > const & xAttributes ) css::uno::Reference< css::xml::input::XAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL endElement() virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
LibrariesElement( LibrariesElement(
OUString const & rLocalName, OUString const & rLocalName,
Reference< xml::input::XAttributes > const & xAttributes, css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
LibElementBase * pParent, LibraryImport * pImport ) LibElementBase * pParent, LibraryImport * pImport )
SAL_THROW(()) SAL_THROW(())
: LibElementBase( rLocalName, xAttributes, pParent, pImport ) : LibElementBase( rLocalName, xAttributes, pParent, pImport )
...@@ -225,20 +220,20 @@ public: ...@@ -225,20 +220,20 @@ public:
class LibraryElement : public LibElementBase class LibraryElement : public LibElementBase
{ {
protected: protected:
vector< OUString > mElements; std::vector< OUString > mElements;
public: public:
virtual Reference< xml::input::XElement > SAL_CALL startChildElement( virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(
sal_Int32 nUid, OUString const & rLocalName, sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::input::XAttributes > const & xAttributes ) css::uno::Reference< css::xml::input::XAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL endElement() virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
LibraryElement( LibraryElement(
OUString const & rLocalName, OUString const & rLocalName,
Reference< xml::input::XAttributes > const & xAttributes, css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
LibElementBase * pParent, LibraryImport * pImport ) LibElementBase * pParent, LibraryImport * pImport )
SAL_THROW(()) SAL_THROW(())
: LibElementBase( rLocalName, xAttributes, pParent, pImport ) : LibElementBase( rLocalName, xAttributes, pParent, pImport )
......
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
#include "imp_share.hxx" #include "imp_share.hxx"
#include "xml_import.hxx" #include "xml_import.hxx"
using namespace css;
using namespace css::uno;
namespace xmlscript namespace xmlscript
{ {
......
...@@ -33,18 +33,13 @@ ...@@ -33,18 +33,13 @@
#include <vector> #include <vector>
using namespace ::rtl;
using namespace ::std;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
namespace xmlscript namespace xmlscript
{ {
// Script module import // Script module import
struct ModuleImport struct ModuleImport
: public ::cppu::WeakImplHelper1< xml::input::XRoot > : public ::cppu::WeakImplHelper1< css::xml::input::XRoot >
{ {
friend class ModuleElement; friend class ModuleElement;
...@@ -67,65 +62,65 @@ public: ...@@ -67,65 +62,65 @@ public:
// XRoot // XRoot
virtual void SAL_CALL startDocument( virtual void SAL_CALL startDocument(
Reference< xml::input::XNamespaceMapping > const & xNamespaceMapping ) css::uno::Reference< css::xml::input::XNamespaceMapping > const & xNamespaceMapping )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL endDocument() virtual void SAL_CALL endDocument()
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL processingInstruction( virtual void SAL_CALL processingInstruction(
OUString const & rTarget, OUString const & rData ) OUString const & rTarget, OUString const & rData )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setDocumentLocator( virtual void SAL_CALL setDocumentLocator(
Reference< xml::sax::XLocator > const & xLocator ) css::uno::Reference< css::xml::sax::XLocator > const & xLocator )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual Reference< xml::input::XElement > SAL_CALL startRootElement( virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startRootElement(
sal_Int32 nUid, OUString const & rLocalName, sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::input::XAttributes > const & xAttributes ) css::uno::Reference< css::xml::input::XAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
}; };
class ModuleElement class ModuleElement
: public ::cppu::WeakImplHelper1< xml::input::XElement > : public ::cppu::WeakImplHelper1< css::xml::input::XElement >
{ {
protected: protected:
ModuleImport * _pImport; ModuleImport * _pImport;
ModuleElement * _pParent; ModuleElement * _pParent;
OUString _aLocalName; OUString _aLocalName;
Reference< xml::input::XAttributes > _xAttributes; css::uno::Reference< css::xml::input::XAttributes > _xAttributes;
OUStringBuffer _StrBuffer; OUStringBuffer _StrBuffer;
public: public:
ModuleElement( ModuleElement(
OUString const & rLocalName, OUString const & rLocalName,
Reference< xml::input::XAttributes > const & xAttributes, css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ModuleElement * pParent, ModuleImport * pImport ) ModuleElement * pParent, ModuleImport * pImport )
SAL_THROW(()); SAL_THROW(());
virtual ~ModuleElement() virtual ~ModuleElement()
SAL_THROW(()); SAL_THROW(());
// XElement // XElement
virtual Reference< xml::input::XElement > SAL_CALL getParent() virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL getParent()
throw (RuntimeException, std::exception) SAL_OVERRIDE; throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual OUString SAL_CALL getLocalName() virtual OUString SAL_CALL getLocalName()
throw (RuntimeException, std::exception) SAL_OVERRIDE; throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL getUid() virtual sal_Int32 SAL_CALL getUid()
throw (RuntimeException, std::exception) SAL_OVERRIDE; throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual Reference< xml::input::XAttributes > SAL_CALL getAttributes() virtual css::uno::Reference< css::xml::input::XAttributes > SAL_CALL getAttributes()
throw (RuntimeException, std::exception) SAL_OVERRIDE; throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL ignorableWhitespace( virtual void SAL_CALL ignorableWhitespace(
OUString const & rWhitespaces ) OUString const & rWhitespaces )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL characters( OUString const & rChars ) virtual void SAL_CALL characters( OUString const & rChars )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL processingInstruction( virtual void SAL_CALL processingInstruction(
OUString const & rTarget, OUString const & rData ) OUString const & rTarget, OUString const & rData )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL endElement() virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual Reference< xml::input::XElement > SAL_CALL startChildElement( virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement(
sal_Int32 nUid, OUString const & rLocalName, sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::input::XAttributes > const & xAttributes ) css::uno::Reference< css::xml::input::XAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException, std::exception) SAL_OVERRIDE; throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
}; };
} }
......
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
#include "imp_share.hxx" #include "imp_share.hxx"
#include "xml_import.hxx" #include "xml_import.hxx"
using namespace css;
using namespace css::uno;
namespace xmlscript namespace xmlscript
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment