[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Jan 5 12:38:42 UTC 2018


 sw/source/core/undo/undraw.cxx       |    4 ----
 sw/source/core/unocore/unochart.cxx  |   15 ---------------
 sw/source/core/unocore/unofield.cxx  |    4 ----
 sw/source/core/unocore/unoobj.cxx    |    5 -----
 sw/source/core/unocore/unoobj2.cxx   |    6 ------
 sw/source/core/unocore/unosett.cxx   |    6 ------
 sw/source/uibase/lingu/hhcwrp.cxx    |    4 ----
 sw/source/uibase/uiview/viewling.cxx |   14 --------------
 sw/source/uibase/utlui/content.cxx   |   13 -------------
 9 files changed, 71 deletions(-)

New commits:
commit dc7ed240d272df939ef68f64316ee77419b0e2e6
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Jan 5 09:05:41 2018 +0100

    sw: clean up some no longer building leftover debug code
    
    Change-Id: I1e895382fc858ecd9be3d974b2be155d7e9de52d
    Reviewed-on: https://gerrit.libreoffice.org/47452
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index 77b60e80ab9c..2deaa9f1b677 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -57,10 +57,6 @@ struct SwUndoGroupObjImpl
 
 IMPL_LINK( SwDoc, AddDrawUndo, SdrUndoAction *, pUndo, void )
 {
-#if OSL_DEBUG_LEVEL > 1
-    SAL_INFO("sw.core", "Id: " << pUndo->GetId() << "Comment: " << pUndo->GetComment());
-#endif
-
     if (GetIDocumentUndoRedo().DoesUndo() &&
         GetIDocumentUndoRedo().DoesDrawUndo())
     {
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 1d06634c6950..6bfbe15c641b 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -654,17 +654,6 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
 
     SortSubranges( aSubRanges, bDtaSrcIsColumns );
     const OUString *pSubRanges = aSubRanges.getConstArray();
-#if OSL_DEBUG_LEVEL > 1
-    {
-        sal_Int32 nSR = aSubRanges.getLength();
-        OUString *pSR = aSubRanges.getArray();
-        OUString aRg;
-        for (sal_Int32 i = 0;  i < nSR;  ++i)
-        {
-            aRg = pSR[i];
-        }
-    }
-#endif
 
     // get table format for that single table from above
     SwFrameFormat    *pTableFormat  = nullptr;      // pointer to table format
@@ -933,10 +922,6 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
                 // add not yet used 'old' sequences to new one
                 for (sal_Int32 i = 0;  i < nNumLDS;  ++i)
                 {
-#if OSL_DEBUG_LEVEL > 1
-                        if (!pOld_LDS[i].is())
-                            i = i;
-#endif
                     if (pOld_LDS[i].is())
                         pLDS[nNewCnt++] = pOld_LDS[i];
                 }
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 7f5b6e96242e..33e378bd8748 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2990,10 +2990,6 @@ uno::Any SAL_CALL SwXFieldEnumeration::nextElement()
             "SwXFieldEnumeration::nextElement",
             css::uno::Reference<css::uno::XInterface>());
 
-#if OSL_DEBUG_LEVEL > 1
-    uno::Reference< text::XTextField > *pItems = m_pImpl->m_Items.getArray();
-    (void)pItems;
-#endif
     uno::Reference< text::XTextField >  &rxField =
         m_pImpl->m_Items[ m_pImpl->m_nNextIndex++ ];
     uno::Any aRet;
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 4f466974cd51..1180bcafd3bc 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -2536,11 +2536,6 @@ SwUnoCursorHelper::CreateSortDescriptor(const bool bFromTable)
         aCollAlg = aSeq.getConstArray()[0];
     }
 
-#if OSL_DEBUG_LEVEL > 1
-    const OUString *pText = aSeq.getConstArray();
-    (void)pText;
-#endif
-
     pFields[0].Field = 1;
     pFields[0].IsAscending = true;
     pFields[0].IsCaseSensitive = false;
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 6046478a1997..1e5105c1f1b4 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -1196,12 +1196,6 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos)
                 const SwTextFootnote* pTextFootnote = rDoc.GetFootnoteIdxs()[ n ];
                 const SwFormatFootnote& rFootnote = pTextFootnote->GetFootnote();
                 pTextFootnote = rFootnote.GetTextFootnote();
-#if OSL_DEBUG_LEVEL > 1
-                const SwStartNode* pTmpSttNode =
-                        pTextFootnote->GetStartNode()->GetNode().
-                                FindSttNodeByType(SwFootnoteStartNode);
-                (void)pTmpSttNode;
-#endif
 
                 if (pSttNode == pTextFootnote->GetStartNode()->GetNode().
                                     FindSttNodeByType(SwFootnoteStartNode))
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index f7376b93693f..5aefbf9acb11 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1120,15 +1120,9 @@ SwXNumberingRules::SwXNumberingRules(SwDoc& rDoc) :
 {
     rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(&*m_pImpl);
     m_sCreatedNumRuleName = rDoc.GetUniqueNumRuleName();
-#if OSL_DEBUG_LEVEL > 1
-    const sal_uInt16 nIndex =
-#endif
     rDoc.MakeNumRule( m_sCreatedNumRuleName, nullptr, false,
                       // #i89178#
                       numfunc::GetDefaultPositionAndSpaceMode() );
-#if OSL_DEBUG_LEVEL > 1
-    (void)nIndex;
-#endif
 }
 
 SwXNumberingRules::~SwXNumberingRules()
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx
index 9e82fb933a85..e07705367b55 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -445,10 +445,6 @@ void SwHHCWrapper::ReplaceUnit(
         pRuby->SetPosition( static_cast<sal_uInt16>(bRubyBelow) );
         pRuby->SetAdjustment( RubyAdjust_CENTER );
 
-#if OSL_DEBUG_LEVEL > 1
-        SwPaM *pPaM = m_rWrtShell.GetCursor();
-        (void)pPaM;
-#endif
         m_rWrtShell.SetAttrItem(*pRuby);
         delete pRuby;
         m_rWrtShell.EndUndo( SwUndoId::SETRUBYATTR );
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 3fb3a1e16272..70dbdb94fa2e 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -326,9 +326,6 @@ void SwView::SpellStart( SvxSpellArea eWhich,
 // The passed pointer nlang is itself the value
 void SwView::SpellError(LanguageType eLang)
 {
-#if OSL_DEBUG_LEVEL > 1
-    sal_Bool bFocus = GetEditWin().HasFocus();
-#endif
     int nPend = 0;
 
     if ( m_pWrtShell->ActionPend() )
@@ -345,9 +342,6 @@ void SwView::SpellError(LanguageType eLang)
     OUString aErr(SvtLanguageTable::GetLanguageString( eLang ) );
 
     SwEditWin &rEditWin = GetEditWin();
-#if OSL_DEBUG_LEVEL > 1
-    bFocus = rEditWin.HasFocus();
-#endif
     int nWaitCnt = 0;
     while( rEditWin.IsWait() )
     {
@@ -364,9 +358,6 @@ void SwView::SpellError(LanguageType eLang)
         rEditWin.EnterWait();
         --nWaitCnt;
     }
-#if OSL_DEBUG_LEVEL > 1
-    bFocus = GetEditWin().HasFocus();
-#endif
 
     if ( nPend )
     {
@@ -374,11 +365,6 @@ void SwView::SpellError(LanguageType eLang)
             m_pWrtShell->StartAction();
         m_pWrtShell->Combine();
     }
-#if OSL_DEBUG_LEVEL > 1
-    if( !bFocus )
-        GetEditWin().GrabFocus();
-#endif
-
 }
 
 // Finish spelling and restore cursor
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 9b59a912c722..c28a8b9254cc 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2935,21 +2935,8 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
                     case ContentTypeId::GRAPHIC:
                         assert(dynamic_cast<SwGraphicContent*>(static_cast<SwTypeNumber*>(pUserData)));
                         sEntry = static_cast<SwGraphicContent*>(pUserData)->GetLink();
-#if OSL_DEBUG_LEVEL > 1
-                        sEntry += " ";
-                        sEntry += OUString::number(
-                                    ((SwGraphicContent*)pUserData)->GetYPos());
-#endif
                         bRet = true;
                     break;
-#if OSL_DEBUG_LEVEL > 1
-                    case ContentTypeId::TABLE:
-                    case ContentTypeId::FRAME:
-                        sEntry = OUString::number(
-                                        ((SwContent*)pUserData)->GetYPos() );
-                        bRet = true;
-                    break;
-#endif
                     default: break;
                 }
                 if(static_cast<SwContent*>(pUserData)->IsInvisible())


More information about the Libreoffice-commits mailing list