[Libreoffice-commits] core.git: 3 commits - sw/inc sw/source unusedcode.easy

Miklos Vajna vmiklos at collabora.co.uk
Wed May 7 12:47:40 PDT 2014


 sw/inc/accmap.hxx                        |    1 -
 sw/source/core/access/accmap.cxx         |   18 ------------------
 sw/source/core/doc/acmplwrd.cxx          |    5 ++---
 sw/source/filter/ww8/rtfstringbuffer.cxx |   10 +++++-----
 unusedcode.easy                          |    1 -
 5 files changed, 7 insertions(+), 28 deletions(-)

New commits:
commit ea1a038fe31217b43723b517facc5ac51d6b6959
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 7 21:37:38 2014 +0200

    sw: fix indentation in rtfstringbuffer
    
    Change-Id: Ie1029a03e614aceaeda10a762183cb06e93c1639

diff --git a/sw/source/filter/ww8/rtfstringbuffer.cxx b/sw/source/filter/ww8/rtfstringbuffer.cxx
index 1d652db..16535f7 100644
--- a/sw/source/filter/ww8/rtfstringbuffer.cxx
+++ b/sw/source/filter/ww8/rtfstringbuffer.cxx
@@ -11,22 +11,22 @@
 
 RtfStringBufferValue::RtfStringBufferValue()
     : m_aBuffer(),
-    m_pFlyFrmFmt(0),
-    m_pGrfNode(0)
+      m_pFlyFrmFmt(0),
+      m_pGrfNode(0)
 {
 }
 
 RtfStringBufferValue::RtfStringBufferValue(const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode* pGrfNode)
     : m_aBuffer(),
-    m_pFlyFrmFmt(pFlyFrmFmt),
-    m_pGrfNode(pGrfNode)
+      m_pFlyFrmFmt(pFlyFrmFmt),
+      m_pGrfNode(pGrfNode)
 {
 }
 
 void RtfStringBufferValue::makeStringAndClear(RtfAttributeOutput* pAttributeOutput)
 {
     if (!isGraphic())
-        pAttributeOutput->m_rExport.Strm().WriteCharPtr( m_aBuffer.makeStringAndClear().getStr() );
+        pAttributeOutput->m_rExport.Strm().WriteCharPtr(m_aBuffer.makeStringAndClear().getStr());
     else
         pAttributeOutput->FlyFrameGraphic(m_pFlyFrmFmt, m_pGrfNode);
 }
commit c3239f45ddd09937c86724213e34f2046a74ff88
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 7 21:36:32 2014 +0200

    coverity#735892 Unchecked dynamic_cast
    
    Change-Id: I0624dd7d50cc82ddfe76ce5d8219b2fa1c10f002

diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 08b4e3d..2dcd890 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -417,9 +417,8 @@ void SwAutoCompleteWord::DocumentDying(const SwDoc& rDoc)
     const bool bDelete = !pACorr->GetSwFlags().bAutoCmpltKeepList;
     for (size_t nPos = m_WordList.size(); nPos; nPos--)
     {
-        SwAutoCompleteString *const pCurrent =
-            dynamic_cast<SwAutoCompleteString*>(m_WordList[nPos - 1]);
-        if(pCurrent->RemoveDocument(rDoc) && bDelete)
+        SwAutoCompleteString *const pCurrent = dynamic_cast<SwAutoCompleteString*>(m_WordList[nPos - 1]);
+        if(pCurrent && pCurrent->RemoveDocument(rDoc) && bDelete)
         {
             m_WordList.erase(nPos - 1);
             SwAutoCompleteStringPtrDeque::iterator it = std::find( aLRULst.begin(), aLRULst.end(), pCurrent );
commit 6e2103585e2c01104314fbcf2a7257e7df224b2b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 7 20:43:04 2014 +0200

    unused SwAccessibleMap::FireSectionChangeEvent
    
    Change-Id: Iabf50f68d06684d36eaf5793251361ccd771ae8d

diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index 20a04ef..aacfcc0 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -208,7 +208,6 @@ public:
     void InvalidateCursorPosition( const SwFrm *pFrm );
     void InvalidateFocus();
     void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage);
-    void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection);
     void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn);
     void SetCursorContext(
         const ::rtl::Reference < SwAccessibleContext >& rCursorContext );
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index d6b949a..dee4126 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2770,24 +2770,6 @@ void SwAccessibleMap::FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPa
         }
 }
 
-void SwAccessibleMap::FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection)
-{
-    uno::Reference<XAccessible> xAcc = GetDocumentView( );
-        if ( xAcc.is() )
-        {
-            SwAccessibleDocumentBase *pAcc =
-            static_cast< SwAccessibleDocumentBase * >( xAcc.get() );
-            if (pAcc)
-            {
-                AccessibleEventObject aEvent;
-                aEvent.EventId = AccessibleEventId::SECTION_CHANGED;
-                aEvent.OldValue <<= nOldSection;
-                aEvent.NewValue <<= nNewSection;
-                pAcc->FireAccessibleEvent( aEvent );
-
-            }
-        }
-}
 void SwAccessibleMap::FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn)
 {
     uno::Reference<XAccessible> xAcc = GetDocumentView( );
diff --git a/unusedcode.easy b/unusedcode.easy
index 3dd021b..b19d035 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -80,7 +80,6 @@ SvxUnoTextBase::SvxUnoTextBase()
 SwAccessibleField::SwAccessibleField(SwField*, SwAccessibleParagraph*, short)
 SwAccessibleMap::FireColumnChangeEvent(unsigned short, unsigned short)
 SwAccessibleMap::FirePageChangeEvent(unsigned short, unsigned short)
-SwAccessibleMap::FireSectionChangeEvent(unsigned short, unsigned short)
 SwExtraRedlineTbl::GetPos(SwExtraRedline const*) const
 SwExtraRedlineTbl::Remove(unsigned short)
 TextDoc::IsValidPaM(TextPaM const&)


More information about the Libreoffice-commits mailing list