diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-25 14:18:27 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-25 14:18:54 +0200 |
commit | 90ddca81ae6fb4543d49193a23b5f6569ac5596a (patch) | |
tree | fda13414e9421a54852def7599e3ab6c13f59b98 | |
parent | 535aa95014b4f30ba5f06a563c35db6c98cca9d9 (diff) |
loplugin:unuseddefaultparams in writerfilter/
Change-Id: Ib5a2f6f0404e8489a9699eac6b0c50e61f31083f
-rw-r--r-- | writerfilter/inc/ooxml/OOXMLDocument.hxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 23 | ||||
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.hxx | 3 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLStreamImpl.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 16 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 2 |
6 files changed, 14 insertions, 38 deletions
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx index 9b2528ef8564..1a5254d2d560 100644 --- a/writerfilter/inc/ooxml/OOXMLDocument.hxx +++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx @@ -241,8 +241,7 @@ public: static OOXMLStream::Pointer_t createStream(css::uno::Reference<css::uno::XComponentContext> rContext, css::uno::Reference<css::io::XInputStream> rStream, - bool bRepairStorage, - OOXMLStream::StreamType_t nStreamType = OOXMLStream::DOCUMENT); + bool bRepairStorage); static OOXMLStream::Pointer_t createStream(OOXMLStream::Pointer_t pStream, diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 8bbd00c48944..8a6aca5c04b4 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -139,31 +139,10 @@ void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, PropertyMapPtr pPr m_aStyles[nType] = pProps; } -PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask, StyleSheetEntryDequePtr pStack ) +PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask ) { PropertyMapPtr pProps( new PropertyMap ); - // First get the parent properties - StyleSheetEntryPtr pEntry = m_pStyleSheet->FindParentStyleSheet( sBaseStyleIdentifier ); - - if ( pEntry.get( ) ) - { - if (pStack.get() == nullptr) - pStack.reset(new StyleSheetEntryDeque()); - - StyleSheetEntryDeque::const_iterator aIt = find(pStack->begin(), pStack->end(), pEntry); - - if (aIt != pStack->end()) - { - pStack->push_back(pEntry); - - TableStyleSheetEntry* pParent = static_cast<TableStyleSheetEntry *>( pEntry.get( ) ); - pProps->InsertProps(pParent->GetProperties(nMask)); - - pStack->pop_back(); - } - } - // And finally get the mask ones pProps->InsertProps(GetLocalPropertiesFromMask(nMask)); diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx index 0693f3c56800..e26e1588ffae 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.hxx +++ b/writerfilter/source/dmapper/StyleSheetTable.hxx @@ -143,8 +143,7 @@ public: // + from the parent styles // @param mask mask describing which properties to return - // @param pStack already processed StyleSheetEntries - PropertyMapPtr GetProperties( sal_Int32 nMask, StyleSheetEntryDequePtr pStack = StyleSheetEntryDequePtr()); + PropertyMapPtr GetProperties( sal_Int32 nMask); TableStyleSheetEntry( StyleSheetEntry& aEntry, StyleSheetTable* pStyles ); virtual ~TableStyleSheetEntry( ); diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx index 5b0d341bdea0..8ffcb5854c47 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx @@ -413,11 +413,10 @@ OOXMLStream::Pointer_t OOXMLDocumentFactory::createStream (uno::Reference<uno::XComponentContext> xContext, uno::Reference<io::XInputStream> rStream, - bool bRepairStorage, - OOXMLStream::StreamType_t nStreamType) + bool bRepairStorage) { OOXMLStreamImpl * pStream = new OOXMLStreamImpl(xContext, rStream, - nStreamType, bRepairStorage); + OOXMLStream::DOCUMENT, bRepairStorage); return OOXMLStream::Pointer_t(pStream); } diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 251ff6d2d95f..32a10a2aa959 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -81,9 +81,9 @@ static void lcl_putNestedAttribute(RTFSprms& rSprms, Id nParent, Id nId, RTFValu rAttributes.set(nId, pValue, eOverwrite); } -static void lcl_putNestedSprm(RTFSprms& rSprms, Id nParent, Id nId, RTFValue::Pointer_t pValue, RTFOverwrite eOverwrite = RTFOverwrite::NO_APPEND) +static void lcl_putNestedSprm(RTFSprms& rSprms, Id nParent, Id nId, RTFValue::Pointer_t pValue) { - lcl_putNestedAttribute(rSprms, nParent, nId, pValue, eOverwrite, false); + lcl_putNestedAttribute(rSprms, nParent, nId, pValue, RTFOverwrite::NO_APPEND, false); } static RTFValue::Pointer_t lcl_getNestedAttribute(RTFSprms& rSprms, Id nParent, Id nId) @@ -379,7 +379,7 @@ void RTFDocumentImpl::checkFirstRun() // start initial paragraph m_bFirstRun = false; assert(!m_bNeedSect); - setNeedSect(); // first call that succeeds + setNeedSect(true); // first call that succeeds // set the requested default font, if there are none RTFValue::Pointer_t pFont = lcl_getNestedAttribute(m_aDefaultState.aCharacterSprms, NS_ooxml::LN_EG_RPrBase_rFonts, NS_ooxml::LN_CT_Fonts_ascii); @@ -1505,7 +1505,7 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer, RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) { - setNeedSect(); + setNeedSect(true); checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true); RTFSkipDestination aSkip(*this); // special case \upr: ignore everything except nested \ud @@ -2079,7 +2079,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) { - setNeedSect(); + setNeedSect(true); if (nKeyword != RTF_HEXCHAR) checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true); else @@ -2563,7 +2563,7 @@ void RTFDocumentImpl::resetTableRowProperties() RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) { - setNeedSect(); + setNeedSect(true); checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true); RTFSkipDestination aSkip(*this); int nParam = -1; @@ -3585,7 +3585,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) { - setNeedSect(); + setNeedSect(true); checkUnicode(/*bUnicode =*/ nKeyword != RTF_U, /*bHex =*/ true); RTFSkipDestination aSkip(*this); int nSprm = 0; @@ -4811,7 +4811,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) RTFError RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam) { - setNeedSect(); + setNeedSect(true); checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true); RTFSkipDestination aSkip(*this); int nSprm = -1; diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 227e940c3ecf..257f4833cf12 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -439,7 +439,7 @@ private: /// If we have some unicode or hex characters to send. void checkUnicode(bool bUnicode, bool bHex); /// If we need a final section break at the end of the document. - void setNeedSect(bool bNeedSect = true); + void setNeedSect(bool bNeedSect); void resetTableRowProperties(); void backupTableRowProperties(); void restoreTableRowProperties(); |