From 329213cb249e92d2483780f9193e3355854234f2 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 24 Aug 2017 22:51:54 +0200 Subject: writerfilter: fix inconsistent param naming in interface/implementation Talking about names when those are numbers is confusing. Change-Id: Icfeed8924daeb1d6f658118515f9d4a76229106e Reviewed-on: https://gerrit.libreoffice.org/41540 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- writerfilter/source/dmapper/LatentStyleHandler.cxx | 4 ++-- writerfilter/source/dmapper/LatentStyleHandler.hxx | 2 +- writerfilter/source/dmapper/SmartTagHandler.cxx | 6 +++--- writerfilter/source/dmapper/SmartTagHandler.hxx | 4 ++-- writerfilter/source/dmapper/TableManager.hxx | 4 ++-- writerfilter/source/dmapper/TablePositionHandler.cxx | 4 ++-- writerfilter/source/dmapper/TablePositionHandler.hxx | 2 +- writerfilter/source/filter/RtfFilter.cxx | 8 ++++---- writerfilter/source/filter/WriterFilter.cxx | 8 ++++---- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 4 ++-- writerfilter/source/rtftok/rtfdocumentimpl.hxx | 4 ++-- writerfilter/source/rtftok/rtfsdrimport.cxx | 4 ++-- writerfilter/source/rtftok/rtfsdrimport.hxx | 4 ++-- 13 files changed, 29 insertions(+), 29 deletions(-) (limited to 'writerfilter') diff --git a/writerfilter/source/dmapper/LatentStyleHandler.cxx b/writerfilter/source/dmapper/LatentStyleHandler.cxx index 5be3e72d65ee..cfd01c770cc7 100644 --- a/writerfilter/source/dmapper/LatentStyleHandler.cxx +++ b/writerfilter/source/dmapper/LatentStyleHandler.cxx @@ -23,11 +23,11 @@ LatentStyleHandler::LatentStyleHandler() : LatentStyleHandler::~LatentStyleHandler() = default; -void LatentStyleHandler::lcl_attribute(Id rName, Value& rVal) +void LatentStyleHandler::lcl_attribute(Id nId, Value& rVal) { beans::PropertyValue aValue; bool bFound = true; - switch (rName) + switch (nId) { case NS_ooxml::LN_CT_LsdException_name: aValue.Name = "name"; diff --git a/writerfilter/source/dmapper/LatentStyleHandler.hxx b/writerfilter/source/dmapper/LatentStyleHandler.hxx index 778c108d9a88..f75b77c2caf2 100644 --- a/writerfilter/source/dmapper/LatentStyleHandler.hxx +++ b/writerfilter/source/dmapper/LatentStyleHandler.hxx @@ -26,7 +26,7 @@ class LatentStyleHandler std::vector m_aAttributes; // Properties - void lcl_attribute(Id Name, Value& val) override; + void lcl_attribute(Id nId, Value& rVal) override; void lcl_sprm(Sprm& sprm) override; public: diff --git a/writerfilter/source/dmapper/SmartTagHandler.cxx b/writerfilter/source/dmapper/SmartTagHandler.cxx index 1d8c8a385486..4a1ee2b4cfdf 100644 --- a/writerfilter/source/dmapper/SmartTagHandler.cxx +++ b/writerfilter/source/dmapper/SmartTagHandler.cxx @@ -44,9 +44,9 @@ SmartTagHandler::SmartTagHandler(uno::Reference xCompone SmartTagHandler::~SmartTagHandler() = default; -void SmartTagHandler::lcl_attribute(Id nName, Value& rValue) +void SmartTagHandler::lcl_attribute(Id nId, Value& rValue) { - switch (nName) + switch (nId) { case NS_ooxml::LN_CT_Attr_name: m_aAttributes.emplace_back(rValue.getString(), OUString()); @@ -56,7 +56,7 @@ void SmartTagHandler::lcl_attribute(Id nName, Value& rValue) m_aAttributes.back().second = rValue.getString(); break; default: - SAL_WARN("writerfilter", "SmartTagHandler::lcl_attribute: unhandled attribute " << nName << " (string value: '"< xComponentContext, const css::uno::Reference& xTextDocument); ~SmartTagHandler() override; - void lcl_attribute(Id Name, Value& val) override; - void lcl_sprm(Sprm& sprm) override; + void lcl_attribute(Id nId, Value& rValue) override; + void lcl_sprm(Sprm& rSprm) override; void setURI(const OUString& rURI); void setElement(const OUString& rElement); diff --git a/writerfilter/source/dmapper/TableManager.hxx b/writerfilter/source/dmapper/TableManager.hxx index 8aad0216a2c4..bdfc0e4bd9fd 100644 --- a/writerfilter/source/dmapper/TableManager.hxx +++ b/writerfilter/source/dmapper/TableManager.hxx @@ -314,12 +314,12 @@ private: Open a cell at current level. */ - void openCell(const css::uno::Reference& handle, const TablePropertyMapPtr& pProps); + void openCell(const css::uno::Reference& rHandle, const TablePropertyMapPtr& pProps); /** Close a cell at current level. */ - void closeCell(const css::uno::Reference& handle); + void closeCell(const css::uno::Reference& rHandle); /** Ensure a cell is open at the current level. diff --git a/writerfilter/source/dmapper/TablePositionHandler.cxx b/writerfilter/source/dmapper/TablePositionHandler.cxx index 9707eaa584d7..0654c12c5f18 100644 --- a/writerfilter/source/dmapper/TablePositionHandler.cxx +++ b/writerfilter/source/dmapper/TablePositionHandler.cxx @@ -30,9 +30,9 @@ TablePositionHandler::TablePositionHandler() : TablePositionHandler::~TablePositionHandler() = default; -void TablePositionHandler::lcl_attribute(Id rName, Value& rVal) +void TablePositionHandler::lcl_attribute(Id nId, Value& rVal) { - switch (rName) + switch (nId) { case NS_ooxml::LN_CT_TblPPr_vertAnchor: m_aVertAnchor = rVal.getString(); diff --git a/writerfilter/source/dmapper/TablePositionHandler.hxx b/writerfilter/source/dmapper/TablePositionHandler.hxx index 50806a9eac3d..c7b0674e435f 100644 --- a/writerfilter/source/dmapper/TablePositionHandler.hxx +++ b/writerfilter/source/dmapper/TablePositionHandler.hxx @@ -34,7 +34,7 @@ class TablePositionHandler sal_Int32 m_nBottomFromText = 0; // Properties - void lcl_attribute(Id Name, Value& val) override; + void lcl_attribute(Id nId, Value& rVal) override; void lcl_sprm(Sprm& sprm) override; public: diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx index 1d77b5253ed1..d985942b863f 100644 --- a/writerfilter/source/filter/RtfFilter.cxx +++ b/writerfilter/source/filter/RtfFilter.cxx @@ -69,7 +69,7 @@ public: // XServiceInfo OUString SAL_CALL getImplementationName() override; - sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; + sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override; uno::Sequence SAL_CALL getSupportedServiceNames() override; }; @@ -79,7 +79,7 @@ RtfFilter::RtfFilter(uno::Reference xContext) { } -sal_Bool RtfFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescriptor) +sal_Bool RtfFilter::filter(const uno::Sequence< beans::PropertyValue >& rDescriptor) { sal_uInt32 nStartTime = osl_getGlobalTimer(); if (m_xSrcDoc.is()) @@ -93,7 +93,7 @@ sal_Bool RtfFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescrip if (!xExporter.is() || !xFilter.is()) return false; xExporter->setSourceDocument(m_xSrcDoc); - return xFilter->filter(aDescriptor); + return xFilter->filter(rDescriptor); } bool bResult(false); @@ -101,7 +101,7 @@ sal_Bool RtfFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescrip try { - utl::MediaDescriptor aMediaDesc(aDescriptor); + utl::MediaDescriptor aMediaDesc(rDescriptor); bool bRepairStorage = aMediaDesc.getUnpackedValueOrDefault("RepairPackage", false); bool bIsNewDoc = !aMediaDesc.getUnpackedValueOrDefault("InsertMode", false); uno::Reference< io::XInputStream > xInputStream; diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx index 11cd6e1207d6..eafbb21d0bd5 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -123,7 +123,7 @@ private: }; -sal_Bool WriterFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescriptor) +sal_Bool WriterFilter::filter(const uno::Sequence< beans::PropertyValue >& rDescriptor) { if (m_xSrcDoc.is()) { @@ -147,11 +147,11 @@ sal_Bool WriterFilter::filter(const uno::Sequence< beans::PropertyValue >& aDesc if (!xExprtr.is() || !xFltr.is()) return false; xExprtr->setSourceDocument(m_xSrcDoc); - return xFltr->filter(aDescriptor); + return xFltr->filter(rDescriptor); } else if (m_xDstDoc.is()) { - utl::MediaDescriptor aMediaDesc(aDescriptor); + utl::MediaDescriptor aMediaDesc(rDescriptor); bool bRepairStorage = aMediaDesc.getUnpackedValueOrDefault("RepairPackage", false); bool bSkipImages = aMediaDesc.getUnpackedValueOrDefault("FilterOptions", OUString()) == "SkipImages"; @@ -176,7 +176,7 @@ sal_Bool WriterFilter::filter(const uno::Sequence< beans::PropertyValue >& aDesc //create the tokenizer and domain mapper writerfilter::ooxml::OOXMLStream::Pointer_t pDocStream = writerfilter::ooxml::OOXMLDocumentFactory::createStream(m_xContext, xInputStream, bRepairStorage); uno::Reference xStatusIndicator = aMediaDesc.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_STATUSINDICATOR(), uno::Reference()); - writerfilter::ooxml::OOXMLDocument::Pointer_t pDocument(writerfilter::ooxml::OOXMLDocumentFactory::createDocument(pDocStream, xStatusIndicator, bSkipImages, aDescriptor)); + writerfilter::ooxml::OOXMLDocument::Pointer_t pDocument(writerfilter::ooxml::OOXMLDocumentFactory::createDocument(pDocStream, xStatusIndicator, bSkipImages, rDescriptor)); uno::Reference xModel(m_xDstDoc, uno::UNO_QUERY_THROW); pDocument->setModel(xModel); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 14f250b3492d..bdcb128d6128 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -768,7 +768,7 @@ void RTFDocumentImpl::resolve(Stream& rMapper) } } -void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference const& i_xShape) +void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference const& rShape) { SvMemoryStream aStream; SvStream* pStream = nullptr; @@ -858,7 +858,7 @@ void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference xShape(i_xShape); + uno::Reference xShape(rShape); if (xShape.is()) { uno::Reference xSI(xShape, uno::UNO_QUERY_THROW); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 2a75d1f48948..bd9658310e24 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -396,7 +396,7 @@ public: ~RTFDocumentImpl() override; // RTFDocument - void resolve(Stream& rHandler) override; + void resolve(Stream& rMapper) override; // RTFListener RTFError dispatchDestination(RTFKeyword nKeyword) override; @@ -428,7 +428,7 @@ public: bool isInBackground(); void setDestinationText(OUString const& rString); /// Resolve a picture: If not inline, then anchored. - void resolvePict(bool bInline, css::uno::Reference const& xShape); + void resolvePict(bool bInline, css::uno::Reference const& rShape); /// If this is the first run of the document, starts the initial paragraph. void checkFirstRun(); diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index 0933236c834a..ea9a800e35c0 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -73,10 +73,10 @@ RTFSdrImport::~RTFSdrImport() m_aParents.pop(); } -void RTFSdrImport::createShape(const OUString& aStr, uno::Reference& xShape, uno::Reference& xPropertySet) +void RTFSdrImport::createShape(const OUString& rService, uno::Reference& xShape, uno::Reference& xPropertySet) { if (m_rImport.getModelFactory().is()) - xShape.set(m_rImport.getModelFactory()->createInstance(aStr), uno::UNO_QUERY); + xShape.set(m_rImport.getModelFactory()->createInstance(rService), uno::UNO_QUERY); xPropertySet.set(xShape, uno::UNO_QUERY); } diff --git a/writerfilter/source/rtftok/rtfsdrimport.hxx b/writerfilter/source/rtftok/rtfsdrimport.hxx index 22959fb88dbe..a60ec73ce559 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.hxx +++ b/writerfilter/source/rtftok/rtfsdrimport.hxx @@ -25,7 +25,7 @@ namespace rtftok class RTFSdrImport final { public: - RTFSdrImport(RTFDocumentImpl& rImport, css::uno::Reference const& xDstDoc); + RTFSdrImport(RTFDocumentImpl& rDocument, css::uno::Reference const& xDstDoc); ~RTFSdrImport(); enum ShapeOrPict { SHAPE, PICT }; @@ -57,7 +57,7 @@ public: return m_bFakePict; } private: - void createShape(const OUString& aService, css::uno::Reference& xShape, css::uno::Reference& xPropertySet); + void createShape(const OUString& rService, css::uno::Reference& xShape, css::uno::Reference& xPropertySet); void applyProperty(css::uno::Reference const& xShape, const OUString& aKey, const OUString& aValue); int initShape(css::uno::Reference& o_xShape, css::uno::Reference& o_xPropSet, -- cgit