summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-24 20:35:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-24 22:12:28 +0200
commit57c9a995bafcaeb9ab00facb9b7f3ed52c7e7d2a (patch)
tree0694b1f49f2e51e533fe2a571b5aefbc9049fc54
parent592c31a8fa8729259cf42440a0a26c0322bbbba5 (diff)
loplugin:returnconstval in test..writerfilter
Change-Id: Iea7d15f0a54921514cc4b71c5dc8caaa2ee573c8 Reviewed-on: https://gerrit.libreoffice.org/78063 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--include/test/table/xtablecolumns.hxx2
-rw-r--r--test/source/table/xtablecolumns.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.hxx2
-rw-r--r--unoxml/source/rdf/librdf_repository.cxx8
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.hxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx4
-rw-r--r--writerfilter/source/dmapper/FontTable.cxx2
-rw-r--r--writerfilter/source/dmapper/FontTable.hxx2
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx6
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.hxx6
-rw-r--r--writerfilter/source/dmapper/ThemeTable.cxx2
-rw-r--r--writerfilter/source/dmapper/ThemeTable.hxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLParserState.cxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLParserState.hxx2
17 files changed, 27 insertions, 27 deletions
diff --git a/include/test/table/xtablecolumns.hxx b/include/test/table/xtablecolumns.hxx
index 169eac9dbc77..957d344c598f 100644
--- a/include/test/table/xtablecolumns.hxx
+++ b/include/test/table/xtablecolumns.hxx
@@ -47,7 +47,7 @@ protected:
private:
css::uno::Reference<css::sheet::XSpreadsheet> m_xSheet;
- static const OUString getCellText(const css::uno::Reference<css::table::XCell>& r_xCell);
+ static OUString getCellText(const css::uno::Reference<css::table::XCell>& r_xCell);
};
} // namespace apitest
diff --git a/test/source/table/xtablecolumns.cxx b/test/source/table/xtablecolumns.cxx
index 90c67977dd83..b338ddd0bdb4 100644
--- a/test/source/table/xtablecolumns.cxx
+++ b/test/source/table/xtablecolumns.cxx
@@ -163,7 +163,7 @@ void XTableColumns::testRemoveByIndexWithOutOfBoundIndex()
CPPUNIT_ASSERT_THROW(xTC->removeByIndex(xTC->getCount(), 1), uno::RuntimeException);
}
-const OUString XTableColumns::getCellText(const uno::Reference<table::XCell>& r_xCell)
+OUString XTableColumns::getCellText(const uno::Reference<table::XCell>& r_xCell)
{
uno::Reference<text::XSimpleText> xST(r_xCell, uno::UNO_QUERY_THROW);
return xST->getString();
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index b360f300265a..62181772ae17 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -3664,7 +3664,7 @@ void Content::cancelCommandExecution(
}
-const OUString
+OUString
Content::getBaseURI( const std::unique_ptr< DAVResourceAccess > & rResAccess )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.hxx b/ucb/source/ucp/webdav-neon/webdavcontent.hxx
index 2d56c02b42c3..dbe3102c744b 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.hxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.hxx
@@ -142,7 +142,7 @@ private:
bool
exchangeIdentity( const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId );
- const OUString
+ OUString
getBaseURI( const std::unique_ptr< DAVResourceAccess > & rResAccess );
/// @throws css::uno::Exception
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index eb15843ef25b..72e417cfd699 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -344,10 +344,10 @@ public:
const uno::Sequence< css::uno::Any > & i_rArguments) override;
// XNamedGraph forwards ---------------------------------------------
- const NamedGraphMap_t::iterator clearGraph_NoLock(
+ NamedGraphMap_t::iterator clearGraph_NoLock(
const OUString & i_rGraphName,
bool i_Internal = false );
- const NamedGraphMap_t::iterator clearGraph_Lock(
+ NamedGraphMap_t::iterator clearGraph_Lock(
const OUString & i_rGraphName,
bool i_Internal);
void addStatementGraph_NoLock(
@@ -1747,7 +1747,7 @@ void SAL_CALL librdf_Repository::initialize(
m_pWorld.get(), m_pStorage.get()), safe_librdf_free_model);
}
-const NamedGraphMap_t::iterator librdf_Repository::clearGraph_NoLock(
+NamedGraphMap_t::iterator librdf_Repository::clearGraph_NoLock(
OUString const& i_rGraphName, bool i_Internal)
// throw (uno::RuntimeException, container::NoSuchElementException,
// rdf::RepositoryException)
@@ -1757,7 +1757,7 @@ const NamedGraphMap_t::iterator librdf_Repository::clearGraph_NoLock(
return clearGraph_Lock(i_rGraphName, i_Internal);
}
-const NamedGraphMap_t::iterator librdf_Repository::clearGraph_Lock(
+NamedGraphMap_t::iterator librdf_Repository::clearGraph_Lock(
OUString const& i_rGraphName, bool i_Internal)
{
// internal: must be called with mutex locked!
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 2c33628615be..9b9f884e7b5a 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -400,12 +400,12 @@ DomainMapperTableManager::IntVectorPtr const & DomainMapperTableManager::getCurr
return m_aCellWidths.back( );
}
-const uno::Sequence<beans::PropertyValue> DomainMapperTableManager::getCurrentTablePosition( )
+uno::Sequence<beans::PropertyValue> DomainMapperTableManager::getCurrentTablePosition( )
{
if ( !m_aTablePositions.empty( ) && m_aTablePositions.back() )
return m_aTablePositions.back( )->getTablePosition();
else
- return uno::Sequence< beans::PropertyValue >( 0 );
+ return uno::Sequence< beans::PropertyValue >();
}
TablePositionHandler* DomainMapperTableManager::getCurrentTableRealPosition()
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.hxx b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
index c835277919c9..243e901169bb 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
@@ -96,7 +96,7 @@ public:
/// Turn the attributes collected so far in m_aTableLook into a property and clear the container.
void finishTableLook();
- const css::uno::Sequence<css::beans::PropertyValue> getCurrentTablePosition();
+ css::uno::Sequence<css::beans::PropertyValue> getCurrentTablePosition();
TablePositionHandler* getCurrentTableRealPosition();
virtual void cellProps(const TablePropertyMapPtr& pProps) override
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index eea7bff847d8..c78753545bfc 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -701,7 +701,7 @@ uno::Sequence< style::TabStop > DomainMapper_Impl::GetCurrentTabStopAndClear()
return comphelper::containerToSequence(aRet);
}
-const OUString DomainMapper_Impl::GetCurrentParaStyleName()
+OUString DomainMapper_Impl::GetCurrentParaStyleName()
{
// use saved currParaStyleName as a fallback, in case no particular para style name applied.
OUString sName = m_sCurrentParaStyleName;
@@ -719,7 +719,7 @@ const OUString DomainMapper_Impl::GetCurrentParaStyleName()
return sName;
}
-const OUString DomainMapper_Impl::GetDefaultParaStyleName()
+OUString DomainMapper_Impl::GetDefaultParaStyleName()
{
// After import the default style won't change and is frequently requested: cache the LO style name.
// TODO assert !InStyleSheetImport? This function really only makes sense once import is finished anyway.
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index c027faea1d60..ec1a25bf5b17 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -708,8 +708,8 @@ public:
css::uno::Sequence<css::style::TabStop> GetCurrentTabStopAndClear();
void SetCurrentParaStyleName(const OUString& sStringValue) {m_sCurrentParaStyleName = sStringValue;}
- const OUString GetCurrentParaStyleName();
- const OUString GetDefaultParaStyleName();
+ OUString GetCurrentParaStyleName();
+ OUString GetDefaultParaStyleName();
css::uno::Any GetPropertyFromStyleSheet(PropertyIds eId);
// get property first from the given context, or secondly from its stylesheet
diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx
index 45c63558d077..4e46878506cf 100644
--- a/writerfilter/source/dmapper/FontTable.cxx
+++ b/writerfilter/source/dmapper/FontTable.cxx
@@ -217,7 +217,7 @@ void FontTable::lcl_endShape( )
{
}
-const FontEntry::Pointer_t FontTable::getFontEntry(sal_uInt32 nIndex)
+FontEntry::Pointer_t FontTable::getFontEntry(sal_uInt32 nIndex)
{
return (m_pImpl->aFontEntries.size() > nIndex)
? m_pImpl->aFontEntries[nIndex]
diff --git a/writerfilter/source/dmapper/FontTable.hxx b/writerfilter/source/dmapper/FontTable.hxx
index e1878190a1d4..052282b1f090 100644
--- a/writerfilter/source/dmapper/FontTable.hxx
+++ b/writerfilter/source/dmapper/FontTable.hxx
@@ -51,7 +51,7 @@ class FontTable : public LoggedProperties, public LoggedTable
virtual ~FontTable() override;
sal_uInt32 size();
- const FontEntry::Pointer_t getFontEntry(sal_uInt32 nIndex);
+ FontEntry::Pointer_t getFontEntry(sal_uInt32 nIndex);
private:
// Properties
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 7e10e334bcf7..bd983857545a 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1225,7 +1225,7 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable )
}
-const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByISTD(const OUString& sIndex)
+StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByISTD(const OUString& sIndex)
{
StyleSheetEntryPtr pRet;
for(const StyleSheetEntryPtr & rpEntry : m_pImpl->m_aStyleSheetEntries)
@@ -1240,7 +1240,7 @@ const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByISTD(const OUString& s
}
-const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByConvertedStyleName(const OUString& sIndex)
+StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByConvertedStyleName(const OUString& sIndex)
{
StyleSheetEntryPtr pRet;
for(const StyleSheetEntryPtr & rpEntry : m_pImpl->m_aStyleSheetEntries)
@@ -1255,7 +1255,7 @@ const StyleSheetEntryPtr StyleSheetTable::FindStyleSheetByConvertedStyleName(con
}
-const StyleSheetEntryPtr StyleSheetTable::FindDefaultParaStyle()
+StyleSheetEntryPtr StyleSheetTable::FindDefaultParaStyle()
{
return FindStyleSheetByISTD( m_pImpl->m_sDefaultParaStyleName );
}
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index da9987dce265..960651394955 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -94,9 +94,9 @@ public:
virtual ~StyleSheetTable() override;
void ApplyStyleSheets( const FontTablePtr& rFontTable );
- const StyleSheetEntryPtr FindStyleSheetByISTD(const OUString& sIndex);
- const StyleSheetEntryPtr FindStyleSheetByConvertedStyleName(const OUString& rIndex);
- const StyleSheetEntryPtr FindDefaultParaStyle();
+ StyleSheetEntryPtr FindStyleSheetByISTD(const OUString& sIndex);
+ StyleSheetEntryPtr FindStyleSheetByConvertedStyleName(const OUString& rIndex);
+ StyleSheetEntryPtr FindDefaultParaStyle();
OUString ConvertStyleName( const OUString& rWWName, bool bExtendedSearch = false );
diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx
index 13fdbe0187d1..68515d1c918e 100644
--- a/writerfilter/source/dmapper/ThemeTable.cxx
+++ b/writerfilter/source/dmapper/ThemeTable.cxx
@@ -187,7 +187,7 @@ OUString ThemeTable::getStringForTheme(const Id id)
}
return OUString();
}
-const OUString ThemeTable::getFontNameForTheme(const Id id) const
+OUString ThemeTable::getFontNameForTheme(const Id id) const
{
std::map<sal_uInt32, OUString> tmpThemeFontMap;
switch (id)
diff --git a/writerfilter/source/dmapper/ThemeTable.hxx b/writerfilter/source/dmapper/ThemeTable.hxx
index c998b9bdd205..c85fd29380cf 100644
--- a/writerfilter/source/dmapper/ThemeTable.hxx
+++ b/writerfilter/source/dmapper/ThemeTable.hxx
@@ -41,7 +41,7 @@ public:
ThemeTable();
virtual ~ThemeTable() override;
- const OUString getFontNameForTheme(const Id id) const;
+ OUString getFontNameForTheme(const Id id) const;
static OUString getStringForTheme(const Id id);
void setThemeFontLangProperties(const css::uno::Sequence<css::beans::PropertyValue>& aPropSeq);
diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx
index 907484b02cd5..c7fc43e46bdd 100644
--- a/writerfilter/source/ooxml/OOXMLParserState.cxx
+++ b/writerfilter/source/ooxml/OOXMLParserState.cxx
@@ -80,7 +80,7 @@ void OOXMLParserState::setForwardEvents(bool bForwardEvents)
}
-const std::string OOXMLParserState::getHandle() const
+std::string OOXMLParserState::getHandle() const
{
return std::to_string(mnHandle);
}
diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx b/writerfilter/source/ooxml/OOXMLParserState.hxx
index 01abebcfed37..5e9811e2ac51 100644
--- a/writerfilter/source/ooxml/OOXMLParserState.hxx
+++ b/writerfilter/source/ooxml/OOXMLParserState.hxx
@@ -84,7 +84,7 @@ public:
void setForwardEvents(bool bForwardEvents);
bool isForwardEvents() const { return mbForwardEvents;}
- const std::string getHandle() const;
+ std::string getHandle() const;
void setHandle();
void setDocument(OOXMLDocumentImpl* pDocument);