[Libreoffice-commits] core.git: writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Aug 5 09:41:50 PDT 2014


 writerfilter/source/dmapper/DomainMapper.cxx           |    4 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx      |   12 
 writerfilter/source/dmapper/TablePropertiesHandler.cxx |    1 
 writerfilter/source/ooxml/OOXMLFactory.cxx             |    2 
 writerfilter/source/ooxml/OOXMLFactory.hxx             |   19 -
 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx  |  249 ++++++-----------
 writerfilter/source/ooxml/OOXMLFastHelper.hxx          |    4 
 writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx     |    1 
 writerfilter/source/ooxml/fasttokens.py                |    3 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx         |   16 -
 writerfilter/source/rtftok/rtffly.hxx                  |   28 -
 11 files changed, 137 insertions(+), 202 deletions(-)

New commits:
commit eec640d9a0ab8aa52406b711d66f36c3b8d8d83f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Aug 5 18:33:57 2014 +0200

    writerfilter: avoid 'using' in generated header
    
    Change-Id: Ib9510aed34e451c529133c9c114b770c374fe403

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index f80d6c0..3f6c798 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2980,7 +2980,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
 
 void DomainMapper::lcl_props(writerfilter::Reference<Properties>::Pointer_t ref)
 {
-    string sType = ref->getType();
+    std::string sType = ref->getType();
     if( sType == "PICF" )
     {
         m_pImpl->ImportGraphic(ref, IMPORT_AS_GRAPHIC);
@@ -3122,7 +3122,7 @@ void DomainMapper_Impl::substream(Id rName,
     }
 }
 
-void DomainMapper::lcl_info(const string & /*info_*/)
+void DomainMapper::lcl_info(const std::string & /*info_*/)
 {
 }
 
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 1c736f0..1cb3354 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1636,8 +1636,8 @@ void DomainMapper_Impl::CheckParaMarkerRedline( uno::Reference< text::XTextRange
 
 void DomainMapper_Impl::CheckRedline( uno::Reference< text::XTextRange > const& xRange )
 {
-    vector<RedlineParamsPtr>::iterator pIt = m_aRedlines.top().begin( );
-    vector< RedlineParamsPtr > aCleaned;
+    std::vector<RedlineParamsPtr>::iterator pIt = m_aRedlines.top().begin( );
+    std::vector< RedlineParamsPtr > aCleaned;
     for (; pIt != m_aRedlines.top().end( ); ++pIt )
     {
         CreateRedline( xRange, *pIt );
@@ -2175,12 +2175,12 @@ static OUString lcl_ExtractToken(OUString const& rCommand,
 }
 
 SAL_DLLPUBLIC_EXPORT // export just for test
-boost::tuple<OUString, vector<OUString>, vector<OUString> >
+boost::tuple<OUString, std::vector<OUString>, std::vector<OUString> >
 lcl_SplitFieldCommand(const OUString& rCommand)
 {
     OUString sType;
-    vector<OUString> arguments;
-    vector<OUString> switches;
+    std::vector<OUString> arguments;
+    std::vector<OUString> switches;
     sal_Int32 nStartIndex(0);
 
     do
@@ -3306,7 +3306,7 @@ void DomainMapper_Impl::CloseFieldCommand()
         {
             uno::Reference< uno::XInterface > xFieldInterface;
 
-            boost::tuple<OUString, vector<OUString>, vector<OUString> > const
+            boost::tuple<OUString, std::vector<OUString>, std::vector<OUString> > const
                 field(lcl_SplitFieldCommand(pContext->GetCommand()));
             OUString const sFirstParam(boost::get<1>(field).empty()
                     ? OUString() : boost::get<1>(field).front());
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
index 64172a0..0832ec2 100644
--- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx
+++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
@@ -34,6 +34,7 @@
 #include <dmapperLoggers.hxx>
 #include <ooxml/OOXMLFastTokens.hxx>
 
+using namespace com::sun::star;
 
 namespace writerfilter {
 namespace dmapper {
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 5f8512f..e40096a 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -28,6 +28,8 @@
 namespace writerfilter {
 namespace ooxml {
 
+using namespace com::sun::star;
+
 AttributeInfo::AttributeInfo()
 :m_nResource(RT_NoResource), m_nRef(0)
 {
diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx b/writerfilter/source/ooxml/OOXMLFactory.hxx
index 6167290..6b7eb30 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.hxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.hxx
@@ -82,7 +82,7 @@ struct CreateElement
 typedef boost::unordered_map<Token_t, CreateElement> CreateElementMap;
 typedef boost::shared_ptr<CreateElementMap> CreateElementMapPointer;
 typedef boost::unordered_map<Id, CreateElementMapPointer> CreateElementsMap;
-typedef boost::unordered_map<Id, string> IdToStringMap;
+typedef boost::unordered_map<Id, std::string> IdToStringMap;
 typedef boost::shared_ptr<IdToStringMap> IdToStringMapPointer;
 
 typedef boost::unordered_map<Id, Token_t> TokenToIdMap;
@@ -127,17 +127,13 @@ public:
 
     static Pointer_t getInstance();
 
-    uno::Reference< xml::sax::XFastContextHandler> createFastChildContext
-    (OOXMLFastContextHandler * pHandler, Token_t Element);
+    css::uno::Reference< css::xml::sax::XFastContextHandler> createFastChildContext(OOXMLFastContextHandler * pHandler, Token_t Element);
 
-    uno::Reference< xml::sax::XFastContextHandler> createFastChildContextFromStart
-    (OOXMLFastContextHandler * pHandler, Token_t Element);
+    css::uno::Reference< css::xml::sax::XFastContextHandler> createFastChildContextFromStart(OOXMLFastContextHandler * pHandler, Token_t Element);
 
-    void attributes(OOXMLFastContextHandler * pHandler,
-                    const uno::Reference< xml::sax::XFastAttributeList > & Attribs);
+    void attributes(OOXMLFastContextHandler * pHandler, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs);
 
-    void characters(OOXMLFastContextHandler * pHandler,
-                    const OUString & rString);
+    void characters(OOXMLFastContextHandler * pHandler, const OUString & rString);
 
     void startAction(OOXMLFastContextHandler * pHandler, Token_t nToken);
     void endAction(OOXMLFastContextHandler * pHandler, Token_t nToken);
@@ -151,10 +147,7 @@ private:
     OOXMLFactory();
     OOXMLFactory_ns::Pointer_t getFactoryForNamespace(Id id);
 
-    uno::Reference< xml::sax::XFastContextHandler>
-    createFastChildContextFromFactory(OOXMLFastContextHandler * pHandler,
-                                      OOXMLFactory_ns::Pointer_t pFactory,
-                                      Token_t Element);
+    css::uno::Reference< css::xml::sax::XFastContextHandler> createFastChildContextFromFactory(OOXMLFastContextHandler * pHandler, OOXMLFactory_ns::Pointer_t pFactory, Token_t Element);
 };
 
   inline void intrusive_ptr_add_ref(OOXMLFactory* p)
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index c186159..0719a56 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -43,9 +43,7 @@ namespace ooxml
 
 typedef boost::shared_ptr<Stream> StreamPointer_t;
 
-class OOXMLFastContextHandler:
-    public ::cppu::WeakImplHelper1<
-        xml::sax::XFastContextHandler>
+class OOXMLFastContextHandler: public ::cppu::WeakImplHelper1<css::xml::sax::XFastContextHandler>
 {
 public:
     typedef boost::shared_ptr<OOXMLFastContextHandler> Pointer_t;
@@ -54,7 +52,7 @@ public:
 
     OOXMLFastContextHandler();
     explicit OOXMLFastContextHandler
-    (uno::Reference< uno::XComponentContext > const & context);
+    (css::uno::Reference< css::uno::XComponentContext > const & context);
 
     explicit OOXMLFastContextHandler
     (OOXMLFastContextHandler * pContext);
@@ -62,43 +60,31 @@ public:
     virtual ~OOXMLFastContextHandler();
 
     // ::com::sun::star::xml::sax::XFastContextHandler:
-    virtual void SAL_CALL startFastElement
-    (Token_t Element,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL startFastElement (Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
-    virtual void SAL_CALL startUnknownElement
-    (const OUString & Namespace,
-     const OUString & Name,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL startUnknownElement(const OUString & Namespace, const OUString & Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
     virtual void SAL_CALL endFastElement(Token_t Element)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
-    virtual void SAL_CALL endUnknownElement
-    (const OUString & Namespace, const OUString & Name)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL endUnknownElement(const OUString & Namespace, const OUString & Name)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
-    virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
-    createFastChildContext
-    (Token_t Element,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Reference<css::xml::sax::XFastContextHandler> SAL_CALL createFastChildContext(Token_t Element,
+        const css::uno::Reference<css::xml::sax::XFastAttributeList>& Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
-    virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
-    createUnknownChildContext
-    (const OUString & Namespace,
-     const OUString & Name,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext(const OUString & Namespace, const OUString & Name,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
     virtual void SAL_CALL characters(const OUString & aChars)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
-    static const uno::Sequence< sal_Int8 > & getUnoTunnelId();
-    virtual sal_Int64 SAL_CALL getSomething(const uno::Sequence<sal_Int8> & rId)
-        throw (uno::RuntimeException);
+    static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+    virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8> & rId) throw (css::uno::RuntimeException);
 
     // local
 
@@ -118,13 +104,11 @@ public:
 
        @return type string
      */
-    virtual string getType() const { return "??"; }
+    virtual std::string getType() const { return "??"; }
 
     virtual ResourceEnum_t getResource() const { return STREAM; }
 
-    virtual void attributes
-    (const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException);
+    virtual void attributes(const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs) throw (css::uno::RuntimeException, css::xml::sax::SAXException);
 
     virtual void newProperty(const Id & rId, OOXMLValue::Pointer_t pVal);
     virtual void setPropertySet(OOXMLPropertySet::Pointer_t pPropertySet);
@@ -145,10 +129,7 @@ public:
 
     OUString getTargetForId(const OUString & rId);
 
-    uno::Reference < xml::sax::XFastContextHandler >
-    createFromStart
-    (Token_t Element,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs);
+    css::uno::Reference < css::xml::sax::XFastContextHandler > createFromStart(Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs);
 
     void setDocument(OOXMLDocumentImpl* pDocument);
     OOXMLDocumentImpl* getDocument();
@@ -242,22 +223,17 @@ protected:
     // the table depth of this context
     unsigned int mnTableDepth;
 
-    virtual void lcl_startFastElement
-    (Token_t Element,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException);
+    virtual void lcl_startFastElement(Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException);
 
     virtual void lcl_endFastElement(Token_t Element)
-        throw (uno::RuntimeException, xml::sax::SAXException);
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException);
 
-    virtual uno::Reference< xml::sax::XFastContextHandler >
-    lcl_createFastChildContext
-    (Token_t Element,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException);
+    virtual css::uno::Reference< css::xml::sax::XFastContextHandler > lcl_createFastChildContext(Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException);
 
     virtual void lcl_characters(const OUString & aChars)
-        throw (uno::RuntimeException, xml::sax::SAXException);
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException);
 
     void startAction(Token_t Element);
     void endAction(Token_t Element);
@@ -266,7 +242,7 @@ protected:
     (const OUString & rId);
     virtual void resolvePropertySetAttrs();
 
-    uno::Reference< uno::XComponentContext > getComponentContext() { return m_xContext;}
+    css::uno::Reference< css::uno::XComponentContext > getComponentContext() { return m_xContext;}
 
     sal_uInt32 mnInstanceNumber;
 
@@ -275,9 +251,9 @@ protected:
 private:
     void operator =(OOXMLFastContextHandler &); // not defined
     /// Handles AlternateContent. Returns true, if children of the current element should be ignored.
-    bool prepareMceContext(Token_t nElement, const uno::Reference<xml::sax::XFastAttributeList>& Attribs);
+    bool prepareMceContext(Token_t nElement, const css::uno::Reference<css::xml::sax::XFastAttributeList>& Attribs);
 
-    uno::Reference< uno::XComponentContext > m_xContext;
+    css::uno::Reference< css::uno::XComponentContext > m_xContext;
     bool m_bDiscardChildren;
     bool m_bTookChoice; ///< Did we take the Choice or want Fallback instead?
 
@@ -339,7 +315,7 @@ protected:
     OOXMLPropertySet::Pointer_t mpPropertySet;
 
     virtual void lcl_endFastElement(Token_t Element)
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
     virtual void setParent(OOXMLFastContextHandler * pParent) SAL_OVERRIDE;
 
 private:
@@ -358,7 +334,7 @@ protected:
     OOXMLTableImpl mTable;
 
     virtual void lcl_endFastElement(Token_t Element)
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
  };
 
 class OOXMLFastContextHandlerValue :
@@ -373,9 +349,9 @@ public:
     virtual OOXMLValue::Pointer_t getValue() const SAL_OVERRIDE;
 
     virtual void lcl_endFastElement(Token_t Element)
-    throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
-    virtual string getType() const SAL_OVERRIDE { return "Value"; }
+    virtual std::string getType() const SAL_OVERRIDE { return "Value"; }
 
     virtual void setDefaultBooleanValue() SAL_OVERRIDE;
     virtual void setDefaultIntegerValue() SAL_OVERRIDE;
@@ -392,24 +368,22 @@ public:
     OOXMLFastContextHandlerTable(OOXMLFastContextHandler * pContext);
     virtual ~OOXMLFastContextHandlerTable();
 
-    virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
-    createFastChildContext
-    (Token_t Element,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext (Token_t Element,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
     virtual void newPropertySet(OOXMLPropertySet::Pointer_t pPropertySet);
 protected:
     OOXMLTableImpl mTable;
 
-    uno::Reference<XFastContextHandler> mCurrentChild;
+    css::uno::Reference<css::xml::sax::XFastContextHandler> mCurrentChild;
 
     virtual void lcl_endFastElement(Token_t Element)
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
     virtual ResourceEnum_t getResource() const SAL_OVERRIDE { return TABLE; }
 
-    virtual string getType() const SAL_OVERRIDE { return "Table"; }
+    virtual std::string getType() const SAL_OVERRIDE { return "Table"; }
 
     void addCurrentChild();
 };
@@ -424,20 +398,18 @@ public:
 
     void checkType(OOXMLValue::Pointer_t pValue);
 
-    virtual string getType() const SAL_OVERRIDE { return "XNote"; }
+    virtual std::string getType() const SAL_OVERRIDE { return "XNote"; }
 
 private:
     bool mbForwardEventsSaved;
     sal_Int32 mnMyXNoteId;
     sal_Int32 mnMyXNoteType;
 
-    virtual void lcl_startFastElement
-    (Token_t Element,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+    virtual void lcl_startFastElement(Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
     virtual void lcl_endFastElement(Token_t Element)
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
     virtual ResourceEnum_t getResource() const SAL_OVERRIDE { return STREAM; }
 };
@@ -449,7 +421,7 @@ public:
     (OOXMLFastContextHandler * pContext);
     virtual ~OOXMLFastContextHandlerTextTableCell();
 
-    virtual string getType() const SAL_OVERRIDE { return "TextTableCell"; }
+    virtual std::string getType() const SAL_OVERRIDE { return "TextTableCell"; }
 
     void startCell();
     void endCell();
@@ -462,7 +434,7 @@ public:
     (OOXMLFastContextHandler * pContext);
     virtual ~OOXMLFastContextHandlerTextTableRow();
 
-    virtual string getType() const SAL_OVERRIDE { return "TextTableRow"; }
+    virtual std::string getType() const SAL_OVERRIDE { return "TextTableRow"; }
 
     void startRow();
     void endRow();
@@ -479,16 +451,14 @@ public:
 
     virtual ~OOXMLFastContextHandlerTextTable();
 
-    virtual string getType() const SAL_OVERRIDE { return "TextTable"; }
+    virtual std::string getType() const SAL_OVERRIDE { return "TextTable"; }
 
 protected:
-    virtual void lcl_startFastElement
-    (Token_t Element,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+    virtual void lcl_startFastElement(Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
     virtual void lcl_endFastElement(Token_t Element)
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 };
 
 class OOXMLFastContextHandlerShape: public OOXMLFastContextHandlerProperties
@@ -502,26 +472,18 @@ public:
     (OOXMLFastContextHandler * pContext);
     virtual ~OOXMLFastContextHandlerShape();
 
-    virtual string getType() const SAL_OVERRIDE { return "Shape"; }
+    virtual std::string getType() const SAL_OVERRIDE { return "Shape"; }
 
     // ::com::sun::star::xml::sax::XFastContextHandler:
-    virtual void SAL_CALL startUnknownElement
-    (const OUString & Namespace,
-     const OUString & Name,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
-
-    virtual void SAL_CALL endUnknownElement
-    (const OUString & Namespace,
-     const OUString & Name)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
-
-    virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
-    createUnknownChildContext
-    (const OUString & Namespace,
-     const OUString & Name,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL startUnknownElement (const OUString & Namespace, const OUString & Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+
+    virtual void SAL_CALL endUnknownElement(const OUString & Namespace, const OUString & Name)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+
+    virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext(const OUString & Namespace, const OUString & Name,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
     virtual void setToken(Token_t nToken) SAL_OVERRIDE;
 
@@ -534,22 +496,17 @@ protected:
     typedef css::uno::Reference<css::xml::sax::XFastShapeContextHandler> ShapeContextRef;
     ShapeContextRef mrShapeContext;
 
-    virtual void lcl_startFastElement
-    (Token_t Element,
-     const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+    virtual void lcl_startFastElement(Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
         throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
     virtual void lcl_endFastElement(Token_t Element)
         throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
-    virtual uno::Reference< xml::sax::XFastContextHandler >
-    lcl_createFastChildContext
-    (Token_t Element,
-     const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+    virtual css::uno::Reference< css::xml::sax::XFastContextHandler > lcl_createFastChildContext (Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
         throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
     virtual void lcl_characters(const OUString & aChars)
-                throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
 };
 
@@ -563,33 +520,22 @@ protected:
 class OOXMLFastContextHandlerWrapper : public OOXMLFastContextHandler
 {
 public:
-    explicit OOXMLFastContextHandlerWrapper
-    (OOXMLFastContextHandler * pParent,
-     uno::Reference<XFastContextHandler>  xContext);
+    explicit OOXMLFastContextHandlerWrapper(OOXMLFastContextHandler * pParent, css::uno::Reference<css::xml::sax::XFastContextHandler> xContext);
     virtual ~OOXMLFastContextHandlerWrapper();
 
     // ::com::sun::star::xml::sax::XFastContextHandler:
-    virtual void SAL_CALL startUnknownElement
-    (const OUString & Namespace,
-     const OUString & Name,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
-
-    virtual void SAL_CALL endUnknownElement
-    (const OUString & Namespace,
-     const OUString & Name)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
-
-    virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
-    createUnknownChildContext
-    (const OUString & Namespace,
-     const OUString & Name,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException, std::exception) SAL_OVERRIDE;
-
-    virtual void attributes
-    (const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-    throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+    virtual void SAL_CALL startUnknownElement(const OUString & Namespace, const OUString & Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+
+    virtual void SAL_CALL endUnknownElement(const OUString & Namespace, const OUString & Name)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+
+    virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext (const OUString & Namespace, const OUString & Name,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
+
+    virtual void attributes(const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
     virtual ResourceEnum_t getResource() const SAL_OVERRIDE;
 
@@ -600,25 +546,20 @@ public:
     virtual void setPropertySet(OOXMLPropertySet::Pointer_t pPropertySet) SAL_OVERRIDE;
     virtual OOXMLPropertySet::Pointer_t getPropertySet() const SAL_OVERRIDE;
 
-    virtual string getType() const SAL_OVERRIDE;
+    virtual std::string getType() const SAL_OVERRIDE;
 
 protected:
-    virtual void lcl_startFastElement
-    (Token_t Element,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+    virtual void lcl_startFastElement(Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
     virtual void lcl_endFastElement(Token_t Element)
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
-    virtual uno::Reference< xml::sax::XFastContextHandler >
-    lcl_createFastChildContext
-    (Token_t Element,
-     const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+    virtual css::uno::Reference< css::xml::sax::XFastContextHandler > lcl_createFastChildContext(Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
     virtual void lcl_characters(const OUString & aChars)
-                throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
     virtual void setId(Id nId) SAL_OVERRIDE;
     virtual Id getId() const SAL_OVERRIDE;
@@ -627,9 +568,9 @@ protected:
     virtual Token_t getToken() const SAL_OVERRIDE;
 
 private:
-    uno::Reference<XFastContextHandler> mxContext;
-    set<Id> mMyNamespaces;
-    set<Token_t> mMyTokens;
+    css::uno::Reference<css::xml::sax::XFastContextHandler> mxContext;
+    std::set<Id> mMyNamespaces;
+    std::set<Token_t> mMyTokens;
     OOXMLPropertySet::Pointer_t mpPropertySet;
 
     OOXMLFastContextHandler * getFastContextHandler() const;
@@ -658,7 +599,7 @@ public:
     /**
      Return the type of the class, as written in model.xml .
      */
-    virtual string getType() const SAL_OVERRIDE = 0;
+    virtual std::string getType() const SAL_OVERRIDE = 0;
 
 protected:
     /**
@@ -667,16 +608,16 @@ protected:
     */
     virtual void process() = 0;
 
-    virtual void lcl_startFastElement(Token_t Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+    virtual void lcl_startFastElement(Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
-    virtual void lcl_endFastElement(Token_t Element) throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+    virtual void lcl_endFastElement(Token_t Element) throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
-    virtual uno::Reference< xml::sax::XFastContextHandler > lcl_createFastChildContext(Token_t Element,
-        const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
-        throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+    virtual css::uno::Reference< css::xml::sax::XFastContextHandler > lcl_createFastChildContext(Token_t Element,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs)
+        throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
-    virtual void lcl_characters(const OUString & aChars) throw (uno::RuntimeException, xml::sax::SAXException) SAL_OVERRIDE;
+    virtual void lcl_characters(const OUString & aChars) throw (css::uno::RuntimeException, css::xml::sax::SAXException) SAL_OVERRIDE;
 
     // should be private, but not much point in making deep copies of it
     oox::formulaimport::XmlStreamBuilder buffer;
@@ -689,7 +630,7 @@ class OOXMLFastContextHandlerMath: public OOXMLFastContextHandlerLinear
 {
 public:
     explicit OOXMLFastContextHandlerMath(OOXMLFastContextHandler * pContext);
-    virtual string getType() const SAL_OVERRIDE { return "Math"; }
+    virtual std::string getType() const SAL_OVERRIDE { return "Math"; }
 protected:
     virtual void process() SAL_OVERRIDE;
 };
diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx b/writerfilter/source/ooxml/OOXMLFastHelper.hxx
index 6958aa2..4d5b971 100644
--- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx
@@ -48,9 +48,7 @@ public:
 };
 
 template <class T>
-uno::Reference<css::xml::sax::XFastContextHandler>
-OOXMLFastHelper<T>::createAndSetParentAndDefine
-(OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId, Id nDefine)
+css::uno::Reference<css::xml::sax::XFastContextHandler> OOXMLFastHelper<T>::createAndSetParentAndDefine (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId, Id nDefine)
 {
     OOXMLFastContextHandler * pTmp = new T(pHandler);
 
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
index c399af0..cca0e66 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
@@ -29,6 +29,7 @@ namespace writerfilter {
 namespace ooxml
 {
 using namespace ::std;
+using namespace com::sun::star;
 
 OOXMLProperty::~OOXMLProperty()
 {
diff --git a/writerfilter/source/ooxml/fasttokens.py b/writerfilter/source/ooxml/fasttokens.py
index 2f662d2..307237c 100644
--- a/writerfilter/source/ooxml/fasttokens.py
+++ b/writerfilter/source/ooxml/fasttokens.py
@@ -56,9 +56,6 @@ print("""
 
 #include <resourcemodel/WW8ResourceModel.hxx>
 
-using namespace ::std;
-using namespace ::com::sun::star;
-
 typedef sal_Int32 Token_t;
     """)
 
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 14fef60..6407a27 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -60,6 +60,8 @@
 
 #define MM100_TO_EMU(MM100)     (MM100 * 360)
 
+using namespace com::sun::star;
+
 namespace writerfilter
 {
 namespace rtftok
@@ -394,7 +396,7 @@ void RTFDocumentImpl::checkFirstRun()
         // output settings table
         writerfilter::Reference<Properties>::Pointer_t const pProp(new RTFReferenceProperties(m_aSettingsTableAttributes, m_aSettingsTableSprms));
         RTFReferenceTable::Entries_t aSettingsTableEntries;
-        aSettingsTableEntries.insert(make_pair(0, pProp));
+        aSettingsTableEntries.insert(std::make_pair(0, pProp));
         writerfilter::Reference<Table>::Pointer_t const pTable(new RTFReferenceTable(aSettingsTableEntries));
         Mapper().table(NS_ooxml::LN_settings_settings, pTable);
         // start initial paragraph
@@ -1140,7 +1142,7 @@ void RTFDocumentImpl::text(OUString& rString)
                 if (lb != m_aFontTableEntries.end() && !(m_aFontTableEntries.key_comp()(m_nCurrentFontIndex, lb->first)))
                     lb->second = pProp;
                 else
-                    m_aFontTableEntries.insert(lb, make_pair(m_nCurrentFontIndex, pProp));
+                    m_aFontTableEntries.insert(lb, std::make_pair(m_nCurrentFontIndex, pProp));
             }
             break;
             case DESTINATION_STYLEENTRY:
@@ -1152,7 +1154,7 @@ void RTFDocumentImpl::text(OUString& rString)
                     m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Style_name, pValue);
 
                     writerfilter::Reference<Properties>::Pointer_t const pProp(createStyleProperties());
-                    m_aStyleTableEntries.insert(make_pair(m_nCurrentStyleIndex, pProp));
+                    m_aStyleTableEntries.insert(std::make_pair(m_nCurrentStyleIndex, pProp));
                 }
                 else
                     SAL_INFO("writerfilter", "no RTF style type defined, ignoring");
@@ -1607,7 +1609,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
                 default:
                     break;
                 }
-                m_nHeaderFooterPositions.push(make_pair(nId, nPos));
+                m_nHeaderFooterPositions.push(std::make_pair(nId, nPos));
                 m_aStates.top().nDestinationState = DESTINATION_SKIP;
             }
             break;
@@ -4829,7 +4831,7 @@ int RTFDocumentImpl::popState()
         RTFSprms aListTableAttributes;
         writerfilter::Reference<Properties>::Pointer_t const pProp(new RTFReferenceProperties(aListTableAttributes, m_aListTableSprms));
         RTFReferenceTable::Entries_t aListTableEntries;
-        aListTableEntries.insert(make_pair(0, pProp));
+        aListTableEntries.insert(std::make_pair(0, pProp));
         writerfilter::Reference<Table>::Pointer_t const pTable(new RTFReferenceTable(aListTableEntries));
         Mapper().table(NS_ooxml::LN_NUMBERING, pTable);
     }
@@ -4899,7 +4901,7 @@ int RTFDocumentImpl::popState()
     case DESTINATION_SHAPEPROPERTYNAME:
         if (&m_aStates.top().aDestinationText != m_aStates.top().pDestinationText)
             break; // not for nested group
-        aState.aShape.aProperties.push_back(make_pair(m_aStates.top().pDestinationText->makeStringAndClear(), OUString()));
+        aState.aShape.aProperties.push_back(std::make_pair(m_aStates.top().pDestinationText->makeStringAndClear(), OUString()));
         break;
     case DESTINATION_SHAPEPROPERTYVALUE:
         if (aState.aShape.aProperties.size())
@@ -5620,7 +5622,7 @@ int RTFDocumentImpl::popState()
             writerfilter::Reference<Properties>::Pointer_t const pProp(new RTFReferenceProperties(aListTableAttributes, aListTableSprms));
 
             RTFReferenceTable::Entries_t aListTableEntries;
-            aListTableEntries.insert(make_pair(0, pProp));
+            aListTableEntries.insert(std::make_pair(0, pProp));
             writerfilter::Reference<Table>::Pointer_t const pTable(new RTFReferenceTable(aListTableEntries));
             Mapper().table(NS_ooxml::LN_NUMBERING, pTable);
 
diff --git a/writerfilter/source/rtftok/rtffly.hxx b/writerfilter/source/rtftok/rtffly.hxx
index 5a9769d..4725a28 100644
--- a/writerfilter/source/rtftok/rtffly.hxx
+++ b/writerfilter/source/rtftok/rtffly.hxx
@@ -38,13 +38,13 @@ public:
         sal_Int32 nAlign = 0;
         switch (GetOrient())
         {
-        case text::VertOrientation::CENTER:
+        case css::text::VertOrientation::CENTER:
             nAlign = NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_center;
             break;
-        case text::VertOrientation::TOP:
+        case css::text::VertOrientation::TOP:
             nAlign = NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_top;
             break;
-        case text::VertOrientation::BOTTOM:
+        case css::text::VertOrientation::BOTTOM:
             nAlign = NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_bottom;
             break;
         }
@@ -57,13 +57,13 @@ public:
         sal_Int32 nAnchor = 0;
         switch (GetRelation())
         {
-        case text::RelOrientation::FRAME:
+        case css::text::RelOrientation::FRAME:
             nAnchor = NS_ooxml::LN_Value_wordprocessingml_ST_VAnchor_text;
             break;
-        case text::RelOrientation::PAGE_FRAME:
+        case css::text::RelOrientation::PAGE_FRAME:
             nAnchor = NS_ooxml::LN_Value_wordprocessingml_ST_VAnchor_page;
             break;
-        case text::RelOrientation::PAGE_PRINT_AREA:
+        case css::text::RelOrientation::PAGE_PRINT_AREA:
             nAnchor = NS_ooxml::LN_Value_wordprocessingml_ST_VAnchor_margin;
             break;
         }
@@ -109,19 +109,19 @@ public:
         sal_Int32 nAlign = 0;
         switch (GetOrient())
         {
-        case text::HoriOrientation::CENTER:
+        case css::text::HoriOrientation::CENTER:
             nAlign = NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_center;
             break;
-        case text::HoriOrientation::RIGHT:
+        case css::text::HoriOrientation::RIGHT:
             nAlign = NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_right;
             break;
-        case text::HoriOrientation::LEFT:
+        case css::text::HoriOrientation::LEFT:
             nAlign = NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_left;
             break;
-        case text::HoriOrientation::INSIDE:
+        case css::text::HoriOrientation::INSIDE:
             nAlign = NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_inside;
             break;
-        case text::HoriOrientation::OUTSIDE:
+        case css::text::HoriOrientation::OUTSIDE:
             nAlign = NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_outside;
             break;
         }
@@ -134,13 +134,13 @@ public:
         sal_Int32 nAnchor = 0;
         switch (GetRelation())
         {
-        case text::RelOrientation::FRAME:
+        case css::text::RelOrientation::FRAME:
             nAnchor = NS_ooxml::LN_Value_wordprocessingml_ST_HAnchor_text;
             break;
-        case text::RelOrientation::PAGE_FRAME:
+        case css::text::RelOrientation::PAGE_FRAME:
             nAnchor = NS_ooxml::LN_Value_wordprocessingml_ST_HAnchor_page;
             break;
-        case text::RelOrientation::PAGE_PRINT_AREA:
+        case css::text::RelOrientation::PAGE_PRINT_AREA:
             nAnchor = NS_ooxml::LN_Value_wordprocessingml_ST_HAnchor_margin;
             break;
         }


More information about the Libreoffice-commits mailing list