summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-03-04 08:57:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-05 12:12:26 +0100
commit191f85df5851473af270be486f95f940e3091fef (patch)
tree753d9513ccda8ee2a132bdad74eedc47bd71b179 /writerfilter
parent983566119c926d0e2478f74548f00a789de55c15 (diff)
re-land "new loplugin typedefparam""
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/BorderHandler.hxx5
-rw-r--r--writerfilter/source/dmapper/CellColorHandler.hxx3
-rw-r--r--writerfilter/source/dmapper/DomainMapper.hxx9
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx6
-rw-r--r--writerfilter/source/dmapper/PropertyMap.hxx7
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.cxx8
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.hxx8
7 files changed, 26 insertions, 20 deletions
diff --git a/writerfilter/source/dmapper/BorderHandler.hxx b/writerfilter/source/dmapper/BorderHandler.hxx
index 9d8001d51050..b986b2ed997a 100644
--- a/writerfilter/source/dmapper/BorderHandler.hxx
+++ b/writerfilter/source/dmapper/BorderHandler.hxx
@@ -19,9 +19,10 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_BORDERHANDLER_HXX
#define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_BORDERHANDLER_HXX
+#include <memory>
#include <vector>
#include "LoggedResources.hxx"
-#include <memory>
+#include "PropertyMap.hxx"
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <o3tl/enumarray.hxx>
@@ -67,7 +68,7 @@ public:
explicit BorderHandler( bool bOOXML );
virtual ~BorderHandler() override;
- ::tools::SvRef<PropertyMap> getProperties();
+ PropertyMapPtr getProperties();
css::table::BorderLine2 getBorderLine();
sal_Int32 getLineDistance() const { return m_nLineDistance;}
bool getShadow() { return m_bShadow;}
diff --git a/writerfilter/source/dmapper/CellColorHandler.hxx b/writerfilter/source/dmapper/CellColorHandler.hxx
index fb72be4262bb..8e77c1c080be 100644
--- a/writerfilter/source/dmapper/CellColorHandler.hxx
+++ b/writerfilter/source/dmapper/CellColorHandler.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_CELLCOLORHANDLER_HXX
#include "LoggedResources.hxx"
+#include "PropertyMap.hxx"
#include <memory>
#include <vector>
@@ -54,7 +55,7 @@ public:
CellColorHandler( );
virtual ~CellColorHandler() override;
- ::tools::SvRef<TablePropertyMap> getProperties();
+ TablePropertyMapPtr getProperties();
void setOutputFormat( OutputFormat format ) { m_OutputFormat = format; }
diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx
index e6b082cfcd47..78e4cf535bbd 100644
--- a/writerfilter/source/dmapper/DomainMapper.hxx
+++ b/writerfilter/source/dmapper/DomainMapper.hxx
@@ -21,6 +21,7 @@
#include <dmapper/DomainMapperFactory.hxx>
#include "LoggedResources.hxx"
+#include "PropertyMap.hxx"
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/style/TabAlign.hpp>
@@ -64,6 +65,8 @@ class StyleSheetTable;
class GraphicZOrderHelper;
class GraphicNamingHelper;
+typedef tools::SvRef<StyleSheetTable> StyleSheetTablePtr;
+
class DomainMapper : public LoggedProperties, public LoggedTable,
public BinaryObj, public LoggedStream
{
@@ -86,9 +89,9 @@ public:
virtual void data(const sal_uInt8* buf, size_t len,
writerfilter::Reference<Properties>::Pointer_t ref) override;
- void sprmWithProps( Sprm& sprm, const ::tools::SvRef<PropertyMap>& pContext );
+ void sprmWithProps( Sprm& sprm, const PropertyMapPtr& pContext );
- void PushStyleSheetProperties( const ::tools::SvRef<PropertyMap>& pStyleProperties, bool bAffectTableMngr = false );
+ void PushStyleSheetProperties( const PropertyMapPtr& pStyleProperties, bool bAffectTableMngr = false );
void PopStyleSheetProperties( bool bAffectTableMngr = false );
void PushListProperties( const ::tools::SvRef<PropertyMap>& pListProperties );
@@ -100,7 +103,7 @@ public:
css::uno::Reference<css::text::XTextRange> GetCurrentTextRange();
OUString getOrCreateCharStyle( PropertyValueVector_t& rCharProperties, bool bAlwaysCreate );
- tools::SvRef< StyleSheetTable > const & GetStyleSheetTable( );
+ StyleSheetTablePtr const & GetStyleSheetTable( );
GraphicZOrderHelper* graphicZOrderHelper();
GraphicNamingHelper& GetGraphicNamingHelper();
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 20d6fb60b3a9..74ca53ab814f 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -389,7 +389,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
return bRet;
}
-std::shared_ptr< vector<sal_Int32> > const & DomainMapperTableManager::getCurrentGrid( )
+DomainMapperTableManager::IntVectorPtr const & DomainMapperTableManager::getCurrentGrid( )
{
return m_aTableGrid.back( );
}
@@ -399,12 +399,12 @@ bool DomainMapperTableManager::hasCurrentSpans() const
return !m_aGridSpans.empty();
}
-std::shared_ptr< vector< sal_Int32 > > const & DomainMapperTableManager::getCurrentSpans( )
+DomainMapperTableManager::IntVectorPtr const & DomainMapperTableManager::getCurrentSpans( )
{
return m_aGridSpans.back( );
}
-std::shared_ptr< vector< sal_Int32 > > const & DomainMapperTableManager::getCurrentCellWidths( )
+DomainMapperTableManager::IntVectorPtr const & DomainMapperTableManager::getCurrentCellWidths( )
{
return m_aCellWidths.back( );
}
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index 69f5a905cb0c..4d2a9cd2047a 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -114,6 +114,9 @@ public:
GrabBagType getGrabBagType() const { return m_GrabBagType; }
};
+class PropertyMap;
+typedef tools::SvRef< PropertyMap > PropertyMapPtr;
+
class PropertyMap : public virtual SvRefBase
{
private:
@@ -142,7 +145,7 @@ public:
void Erase( PropertyIds eId);
// Imports properties from pMap
- void InsertProps( const tools::SvRef< PropertyMap >& rMap, const bool bOverwrite = true );
+ void InsertProps( const PropertyMapPtr& rMap, const bool bOverwrite = true );
// Returns a copy of the property if it exists, .first is its PropertyIds and .second is its Value (type css::uno::Any)
boost::optional< Property > getProperty( PropertyIds eId ) const;
@@ -176,8 +179,6 @@ protected:
}
};
-typedef tools::SvRef< PropertyMap > PropertyMapPtr;
-
class SectionPropertyMap : public PropertyMap
{
public:
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index eba8a479e98a..abe565112a6c 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -143,7 +143,7 @@ bool OOXMLFastContextHandler::prepareMceContext(Token_t nElement, const uno::Ref
// xml::sax::XFastContextHandler:
void SAL_CALL OOXMLFastContextHandler::startFastElement
-(Token_t Element,
+(sal_Int32 Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
{
if (oox::getNamespace(Element) == NMSP_mce)
@@ -162,7 +162,7 @@ void SAL_CALL OOXMLFastContextHandler::startUnknownElement
{
}
-void SAL_CALL OOXMLFastContextHandler::endFastElement(Token_t Element)
+void SAL_CALL OOXMLFastContextHandler::endFastElement(sal_Int32 Element)
{
if (Element == (NMSP_mce | XML_Choice) || Element == (NMSP_mce | XML_Fallback))
m_bDiscardChildren = false;
@@ -202,7 +202,7 @@ void SAL_CALL OOXMLFastContextHandler::endUnknownElement
uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
OOXMLFastContextHandler::createFastChildContext
-(Token_t Element,
+(sal_Int32 Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
{
uno::Reference< xml::sax::XFastContextHandler > xResult;
@@ -1249,7 +1249,7 @@ OOXMLFastContextHandlerTable::~OOXMLFastContextHandlerTable()
uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
OOXMLFastContextHandlerTable::createFastChildContext
-(Token_t Element,
+(sal_Int32 Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
{
addCurrentChild();
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index 03aab0070209..38653bf29b1b 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -51,15 +51,15 @@ public:
virtual ~OOXMLFastContextHandler() override;
// css::xml::sax::XFastContextHandler:
- virtual void SAL_CALL startFastElement (Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs) override;
+ virtual void SAL_CALL startFastElement (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs) override;
virtual void SAL_CALL startUnknownElement(const OUString & Namespace, const OUString & Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs) override;
- virtual void SAL_CALL endFastElement(Token_t Element) override;
+ virtual void SAL_CALL endFastElement(sal_Int32 Element) override;
virtual void SAL_CALL endUnknownElement(const OUString & Namespace, const OUString & Name) override;
- virtual css::uno::Reference<css::xml::sax::XFastContextHandler> SAL_CALL createFastChildContext(Token_t Element,
+ virtual css::uno::Reference<css::xml::sax::XFastContextHandler> SAL_CALL createFastChildContext(sal_Int32 Element,
const css::uno::Reference<css::xml::sax::XFastAttributeList>& Attribs) override;
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext(const OUString & Namespace, const OUString & Name,
@@ -348,7 +348,7 @@ public:
explicit OOXMLFastContextHandlerTable(OOXMLFastContextHandler * pContext);
virtual ~OOXMLFastContextHandlerTable() override;
- virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext (Token_t Element,
+ virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext (sal_Int32 Element,
const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs) override;
private: