diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-17 05:41:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-17 08:18:11 +0200 |
commit | 7bad1516c5f2a85b5bae3f49261ac2494cbb7162 (patch) | |
tree | e16e60b92b2bead4e22a24949786d04008cf59ff /sw | |
parent | ff55ad1aceb10b900254c8ad3629775b7789d60a (diff) |
loplugin:unusedmethods
Change-Id: Ie2285f64919d1c83b0a8df4ceb827f731e5cd609
Reviewed-on: https://gerrit.libreoffice.org/75739
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/IDocumentMarkAccess.hxx | 7 | ||||
-rw-r--r-- | sw/inc/redline.hxx | 23 | ||||
-rw-r--r-- | sw/source/core/doc/docbm.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 61 | ||||
-rw-r--r-- | sw/source/core/inc/MarkManager.hxx | 1 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 51 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxtablestyleexport.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxtablestyleexport.hxx | 3 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmaddressblockpage.hxx | 2 |
9 files changed, 1 insertions, 162 deletions
diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx index cba649ea077e..a347c81d5bb3 100644 --- a/sw/inc/IDocumentMarkAccess.hxx +++ b/sw/inc/IDocumentMarkAccess.hxx @@ -274,13 +274,6 @@ class IDocumentMarkAccess */ virtual const_iterator_t findMark(const OUString& rMark) const =0; - /** Find the first Mark that does not start before. - - @returns - an iterator pointing to the mark, or pointing to getAllMarksEnd() if nothing was found. - */ - virtual const_iterator_t findFirstMarkStartsBefore(const SwPosition& rPos) const =0; - // interface IBookmarks (BOOKMARK, CROSSREF_NUMITEM_BOOKMARK, CROSSREF_HEADING_BOOKMARK ) /** returns a STL-like random access iterator to the begin of the sequence the IBookmarks. diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index 7ae3af488d01..c75cb932d35d 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -82,29 +82,6 @@ public: virtual bool operator == ( const SwRedlineExtraData& ) const override; }; -/* - * This class is used to store 'redline' data regarding formatting changes, - * e.g. - a text portion *was* italic and now is not italic, - * e.g. - a text portion got a highlight to it - * - * The way the information is stored is in an 'SfxItemSet' that holds all - * the WhichIds with their values. - */ -class SW_DLLPUBLIC SwRedlineExtraData_FormattingChanges : public SwRedlineExtraData -{ - std::unique_ptr<SfxItemSet> m_pSet; - - SwRedlineExtraData_FormattingChanges( const SwRedlineExtraData_FormattingChanges& rCpy ); - -public: - SwRedlineExtraData_FormattingChanges( const SfxItemSet* pItemSet ); - virtual ~SwRedlineExtraData_FormattingChanges() override; - virtual SwRedlineExtraData* CreateNew() const override; - virtual void Reject( SwPaM& rPam ) const override; - virtual bool operator == ( const SwRedlineExtraData& ) const override; - SfxItemSet* GetItemSet( ) const { return m_pSet.get(); } -}; - class SW_DLLPUBLIC SwRedlineData { friend class SwRangeRedline; diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index d5c802e3ed1c..ef7812c6cb8e 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1223,16 +1223,6 @@ namespace sw { namespace mark return IDocumentMarkAccess::iterator(ret); } - // find the first Mark that does not start before - IDocumentMarkAccess::const_iterator_t MarkManager::findFirstMarkStartsBefore(const SwPosition& rPos) const - { - return std::lower_bound( - m_vAllMarks.begin(), - m_vAllMarks.end(), - rPos, - CompareIMarkStartsBefore()); - } - IDocumentMarkAccess::const_iterator_t MarkManager::getAllMarksBegin() const { return m_vAllMarks.begin(); } diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 614cc740d42f..6b420cf1351e 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -868,67 +868,6 @@ bool SwRedlineExtraData_Format::operator == ( const SwRedlineExtraData& rCmp ) c return true; } -SwRedlineExtraData_FormattingChanges::SwRedlineExtraData_FormattingChanges( const SfxItemSet* pItemSet ) -{ - if( pItemSet && pItemSet->Count() ) - m_pSet.reset( new SfxItemSet( *pItemSet ) ); -} - -SwRedlineExtraData_FormattingChanges::SwRedlineExtraData_FormattingChanges( const SwRedlineExtraData_FormattingChanges& rCpy ) - : SwRedlineExtraData() -{ - // Checking pointer pSet before accessing it for Count - if( rCpy.m_pSet && rCpy.m_pSet->Count() ) - { - m_pSet.reset( new SfxItemSet( *(rCpy.m_pSet) ) ); - } - else - { - m_pSet.reset(); - } -} - -SwRedlineExtraData_FormattingChanges::~SwRedlineExtraData_FormattingChanges() -{ -} - -SwRedlineExtraData* SwRedlineExtraData_FormattingChanges::CreateNew() const -{ - return new SwRedlineExtraData_FormattingChanges( *this ); -} - -void SwRedlineExtraData_FormattingChanges::Reject(SwPaM& rPam) const -{ - SwDoc* pDoc = rPam.GetDoc(); - - if( m_pSet ) - { - RedlineFlags eOld = pDoc->getIDocumentRedlineAccess().GetRedlineFlags(); - pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern(eOld & ~RedlineFlags(RedlineFlags::On | RedlineFlags::Ignore)); - - pDoc->getIDocumentContentOperations().InsertItemSet(rPam, *GetItemSet()); - - pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld ); - } -} - -bool SwRedlineExtraData_FormattingChanges::operator == ( const SwRedlineExtraData& rExtraData ) const -{ - const SwRedlineExtraData_FormattingChanges& rCmp = static_cast<const SwRedlineExtraData_FormattingChanges&>(rExtraData); - - if ( !m_pSet && !rCmp.m_pSet ) - { - // Both SfxItemSet are null - return true; - } - else if ( m_pSet && rCmp.m_pSet && *m_pSet == *rCmp.m_pSet ) - { - // Both SfxItemSet exist and are equal - return true; - } - return false; -} - SwRedlineData::SwRedlineData( RedlineType eT, std::size_t nAut ) : m_pNext( nullptr ), m_pExtraData( nullptr ), m_aStamp( DateTime::SYSTEM ), diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx index 98f1dc201450..512cd4de9d6d 100644 --- a/sw/source/core/inc/MarkManager.hxx +++ b/sw/source/core/inc/MarkManager.hxx @@ -74,7 +74,6 @@ namespace sw { virtual const_iterator_t getAllMarksEnd() const override; virtual sal_Int32 getAllMarksCount() const override; virtual const_iterator_t findMark(const OUString& rName) const override; - virtual const_iterator_t findFirstMarkStartsBefore(const SwPosition& rPos) const override; // bookmarks virtual const_iterator_t getBookmarksBegin() const override; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 7d7620990ada..1410fe3308cb 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -175,7 +175,7 @@ static const sal_Int32 Tag_EndRun_1 = 9; static const sal_Int32 Tag_EndRun_2 = 10; static const sal_Int32 Tag_StartRunProperties = 11; static const sal_Int32 Tag_InitCollectedRunProperties = 12; -static const sal_Int32 Tag_Redline_1 = 13; +//static const sal_Int32 Tag_Redline_1 = 13; static const sal_Int32 Tag_Redline_2 = 14; static const sal_Int32 Tag_TableDefinition = 15; static const sal_Int32 Tag_OutputFlyFrame = 16; @@ -2968,55 +2968,6 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData) FSNS( XML_w, XML_author ), aAuthor, FSNS( XML_w, XML_date ), aDate ); - // Check if there is any extra data stored in the redline object - if (pRedlineData->GetExtraData()) - { - const SwRedlineExtraData* pExtraData = pRedlineData->GetExtraData(); - const SwRedlineExtraData_FormattingChanges* pFormattingChanges = dynamic_cast<const SwRedlineExtraData_FormattingChanges*>(pExtraData); - - // Check if the extra data is of type 'formatting changes' - if (pFormattingChanges) - { - // Get the item set that holds all the changes properties - const SfxItemSet *pChangesSet = pFormattingChanges->GetItemSet(); - if (pChangesSet) - { - m_pSerializer->mark(Tag_Redline_1); - - m_pSerializer->startElementNS(XML_w, XML_rPr); - - // The 'm_pFontsAttrList', 'm_pEastAsianLayoutAttrList', 'm_pCharLangAttrList' are used to hold information - // that should be collected by different properties in the core, and are all flushed together - // to the DOCX when the function 'WriteCollectedRunProperties' gets called. - // So we need to store the current status of these lists, so that we can revert back to them when - // we are done exporting the redline attributes. - rtl::Reference<sax_fastparser::FastAttributeList> pFontsAttrList_Original(m_pFontsAttrList); - m_pFontsAttrList.clear(); - rtl::Reference<sax_fastparser::FastAttributeList> pColorAttrList_Original(m_pColorAttrList); - m_pColorAttrList.clear(); - rtl::Reference<sax_fastparser::FastAttributeList> pEastAsianLayoutAttrList_Original(m_pEastAsianLayoutAttrList); - m_pEastAsianLayoutAttrList.clear(); - rtl::Reference<sax_fastparser::FastAttributeList> pCharLangAttrList_Original(m_pCharLangAttrList); - m_pCharLangAttrList.clear(); - - // Output the redline item set - m_rExport.OutputItemSet( *pChangesSet, false, true, i18n::ScriptType::LATIN, m_rExport.m_bExportModeRTF ); - - // Write the collected run properties that are stored in 'm_pFontsAttrList', 'm_pEastAsianLayoutAttrList', 'm_pCharLangAttrList' - WriteCollectedRunProperties(); - - // Revert back the original values that were stored in 'm_pFontsAttrList', 'm_pEastAsianLayoutAttrList', 'm_pCharLangAttrList' - m_pFontsAttrList = pFontsAttrList_Original; - m_pColorAttrList = pColorAttrList_Original; - m_pEastAsianLayoutAttrList = pEastAsianLayoutAttrList_Original; - m_pCharLangAttrList = pCharLangAttrList_Original; - - m_pSerializer->endElementNS( XML_w, XML_rPr ); - - m_pSerializer->mergeTopMarks(Tag_Redline_1, sax_fastparser::MergeMarks::PREPEND); - } - } - } m_pSerializer->endElementNS( XML_w, XML_rPrChange ); break; diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx index 32aa8b103938..3471c695a175 100644 --- a/sw/source/filter/ww8/docxtablestyleexport.cxx +++ b/sw/source/filter/ww8/docxtablestyleexport.cxx @@ -84,11 +84,6 @@ public: void tableStyleRColor(uno::Sequence<beans::PropertyValue>& rColor); }; -void DocxTableStyleExport::CharFormat(css::uno::Sequence<css::beans::PropertyValue>& rRPr) -{ - m_pImpl->tableStyleRPr(rRPr); -} - void DocxTableStyleExport::CnfStyle(uno::Sequence<beans::PropertyValue>& rAttributeList) { sax_fastparser::FastAttributeList* pAttributeList diff --git a/sw/source/filter/ww8/docxtablestyleexport.hxx b/sw/source/filter/ww8/docxtablestyleexport.hxx index 0ab76ee84a5b..c6f0c219d596 100644 --- a/sw/source/filter/ww8/docxtablestyleexport.hxx +++ b/sw/source/filter/ww8/docxtablestyleexport.hxx @@ -38,9 +38,6 @@ class DocxTableStyleExport public: void TableStyles(sal_Int32 nCountStylesToWrite); - /// Writes <w:rPr>...</w:rPr> based on grab-bagged character properties. - void CharFormat(css::uno::Sequence<css::beans::PropertyValue>& rRPr); - /// Writes <w:cnfStyle .../> based on grab-bagged para, cell or row properties. void CnfStyle(css::uno::Sequence<css::beans::PropertyValue>& rAttributeList); diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index 8998dc41daec..f8d6493e594a 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -156,8 +156,6 @@ public: void UpdateFields(); virtual ~AddressMultiLineEdit() override; - SwCustomizeAddressBlockDialog* GetAddressDialog() { return m_pParentDialog; } - void SetSelectionChangedHdl( const Link<bool,void>& rLink ) { m_aSelectionLink = rLink; } void SetModifyHdl( const Link<AddressMultiLineEdit&,void>& rLink ) { m_aModifyLink = rLink; } |