[Libreoffice-commits] core.git: Branch 'feature/sc-notes-storage' - sc/inc sc/source

Laurent Godard lgodard.libre at laposte.net
Fri Oct 4 01:05:29 PDT 2013


 sc/inc/document.hxx                |    4 ----
 sc/inc/table.hxx                   |    3 ---
 sc/source/core/data/document.cxx   |    6 ------
 sc/source/core/data/table1.cxx     |    1 -
 sc/source/core/data/table2.cxx     |   18 ------------------
 sc/source/core/data/table3.cxx     |    4 ----
 sc/source/core/tool/consoli.cxx    |    1 -
 sc/source/core/tool/detfunc.cxx    |    1 -
 sc/source/ui/docshell/dbdocfun.cxx |    1 -
 sc/source/ui/docshell/docfunc.cxx  |    5 -----
 sc/source/ui/docshell/olinefun.cxx |    8 --------
 sc/source/ui/view/viewfunc.cxx     |    1 -
 12 files changed, 53 deletions(-)

New commits:
commit 58896e05c42a0a724a48bddb39cda231d5309130
Author: Laurent Godard <lgodard.libre at laposte.net>
Date:   Fri Oct 4 10:00:04 2013 +0200

    remove useless method InitializeNoteCaptions
    
    Change-Id: I68d4fec5cdfb7c6ea504fa783ca54e6482b90ead

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index b266b2d..d681728 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -907,10 +907,6 @@ public:
     SC_DLLPUBLIC ScPostIt*       CreateNote(const ScAddress& rPos);
     sal_uLong                    CountNotes();
 
-    /** Creates the captions of all uninitialized cell notes in the specified sheet.
-        @param bForced  True = always create all captions, false = skip when Undo is disabled. */
-    void            InitializeNoteCaptions( SCTAB nTab, bool bForced = false );
-
     SC_DLLPUBLIC void            SetDrawPageSize(SCTAB nTab);
 
     bool            ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 3679c89..2715983 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -374,9 +374,6 @@ public:
     void        GetLastDataPos(SCCOL& rCol, SCROW& rRow) const;
 
     ScPostIt*   GetNote(const SCCOL nCol, const SCROW nRow);
-    /** Creates the captions of all uninitialized cell notes.
-        @param bForced  True = always create all captions, false = skip when Undo is disabled. */
-    void        InitializeNoteCaptions( bool bForced = false );
 
     bool TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize ) const;
     void        InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize );
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 19ab662..9ebdd62 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3517,12 +3517,6 @@ bool ScDocument::HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
 }
 
 
-void ScDocument::InitializeNoteCaptions( SCTAB nTab, bool bForced )
-{
-    if( ValidTab( nTab ) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[ nTab ] )
-        maTabs[ nTab ]->InitializeNoteCaptions( bForced );
-}
-
 void ScDocument::SetDirty()
 {
     bool bOldAutoCalc = GetAutoCalc();
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 184177c..3531982 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1458,7 +1458,6 @@ void ScTable::UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nR
 {
     if ( nTab >= nTab1 && nTab <= nTab2 && nDz == 0 )       // only within the table
     {
-        InitializeNoteCaptions();
         ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
         if ( eUpdateRefMode != URM_COPY && pDrawLayer )
         {
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 43a43d1..d34dac6 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1437,24 +1437,6 @@ ScPostIt* ScTable::GetNote(const SCCOL nCol, const SCROW nRow)
     return pDocument->GetNote(nCol, nRow, nTab);
 }
 
-void ScTable::InitializeNoteCaptions( bool bForced )
-{
-    if( bForced || pDocument->IsUndoEnabled() )
-    {
-        for (SCCOL nCol=0; nCol<MAXCOL; nCol++)
-        {
-            if ( pDocument->HasColNotes(nCol, nTab) )
-            {
-                for (SCROW nRow=0; nRow < MAXROWCOUNT; nRow++) // TODO : notes suboptimal ?
-                {
-                    if (ScPostIt* pNote = GetNote(nCol, nRow))
-                        pNote->GetOrCreateCaption( ScAddress( nCol, nRow, nTab ) );
-                }
-            }
-        }
-    }
-}
-
 CellType ScTable::GetCellType( SCCOL nCol, SCROW nRow ) const
 {
     if (ValidColRow( nCol, nRow ))
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index a8877d9..c65892a 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1830,10 +1830,6 @@ SCSIZE ScTable::Query(ScQueryParam& rParamOrg, bool bKeepSub)
                             aParam.nDestCol, aParam.nDestRow, aParam.nDestTab );
     }
 
-
-    if (aParam.bInplace)
-        InitializeNoteCaptions();
-
     SCROW nRealRow2 = aParam.nRow2;
     for (SCROW j = aParam.nRow1 + nHeader; j <= nRealRow2; ++j)
     {
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index 1281966..cd2ac2b 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -774,7 +774,6 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
                 SCROW nOutEnd = nRow+nArrY+nNeeded-1;
                 bool bSize = false;
                 pOutArr->Insert( nOutStart, nOutEnd, bSize );
-                pDestDoc->InitializeNoteCaptions(nTab);
                 for (SCROW nOutRow=nOutStart; nOutRow<=nOutEnd; nOutRow++)
                     pDestDoc->ShowRow( nOutRow, nTab, false );
                 pDestDoc->SetDrawPageSize(nTab);
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 2d2fe80..1008339 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -1422,7 +1422,6 @@ void ScDetectiveFunc::UpdateAllComments( ScDocument& rDoc )
 
     for( SCTAB nObjTab = 0, nTabCount = rDoc.GetTableCount(); nObjTab < nTabCount; ++nObjTab )
     {
-        rDoc.InitializeNoteCaptions( nObjTab );
         SdrPage* pPage = pModel->GetPage( static_cast< sal_uInt16 >( nObjTab ) );
         OSL_ENSURE( pPage, "Page ?" );
         if( pPage )
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 1c35fd6..5f30f80 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1134,7 +1134,6 @@ sal_Bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
                 Sort( nTab, aSortParam, false, false, bApi );
             }
 
-            pDoc->InitializeNoteCaptions(nTab);
             bSuccess = pDoc->DoSubTotals( nTab, aNewParam );
             pDoc->SetDrawPageSize(nTab);
         }
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 81c1966..7fb763e 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1726,8 +1726,6 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
     itr = aMark.begin();
     for (; itr != itrEnd && nTabCount; ++itr)
     {
-        pDoc->InitializeNoteCaptions(*itr);
-
         i = *itr;
         if( pDoc->HasAttrib( nMergeTestStartCol, nMergeTestStartRow, i, nMergeTestEndCol, nMergeTestEndRow, i, HASATTR_MERGED | HASATTR_OVERLAPPED ) )
         {
@@ -2143,8 +2141,6 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
     itr = aMark.begin();
     for (; itr != itrEnd && *itr < nTabCount; ++itr)
     {
-        pDoc->InitializeNoteCaptions(*itr);
-
         SCTAB i = *itr;
         if ( pDoc->HasAttrib( nUndoStartCol, nUndoStartRow, i, nMergeTestEndCol, nMergeTestEndRow, i, HASATTR_MERGED | HASATTR_OVERLAPPED ))
         {
@@ -3405,7 +3401,6 @@ sal_Bool ScDocFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOL
     sal_Bool bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT;
     sal_Bool bOutline = false;
 
-    pDoc->InitializeNoteCaptions(nTab);
     for (SCCOLROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++)
     {
         SCCOLROW nStartNo = *(pRanges++);
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx
index dae3721..8be9257 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -374,7 +374,6 @@ sal_Bool ScOutlineDocFunc::SelectLevel( SCTAB nTab, sal_Bool bColumns, sal_uInt1
                                     bColumns, nLevel ) );
     }
 
-    pDoc->InitializeNoteCaptions(nTab);
     ScSubOutlineIterator aIter( pArray );                   // alle Eintraege
     ScOutlineEntry* pEntry;
     while ((pEntry=aIter.GetNext()) != NULL)
@@ -469,8 +468,6 @@ sal_Bool ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, sal_Bool b
                                         pUndoDoc, pUndoTab, sal_True ) );
         }
 
-        pDoc->InitializeNoteCaptions(nTab);
-
         //  Spalten
 
         nMin=MAXCOL;
@@ -498,7 +495,6 @@ sal_Bool ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, sal_Bool b
         nMax=0;
         pArray = pTable->GetRowArray();
         ScSubOutlineIterator aRowIter( pArray );
-        pDoc->InitializeNoteCaptions(nTab);
         while ((pEntry=aRowIter.GetNext()) != NULL)
         {
             nStart = pEntry->GetStart();
@@ -588,8 +584,6 @@ sal_Bool ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, sal_Bool b
                                         pUndoDoc, pUndoTab, false ) );
         }
 
-        pDoc->InitializeNoteCaptions(nTab);
-
         //  Spalten
 
         nCount = pColArray->GetCount(nColLevel);
@@ -667,7 +661,6 @@ sal_Bool ScOutlineDocFunc::ShowOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt1
                                     bColumns, nLevel, nEntry, sal_True ) );
     }
 
-    pDoc->InitializeNoteCaptions(nTab);
     pEntry->SetHidden(false);
     SCCOLROW i;
     for ( i = nStart; i <= nEnd; i++ )
@@ -752,7 +745,6 @@ sal_Bool ScOutlineDocFunc::HideOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt1
                                     bColumns, nLevel, nEntry, false ) );
     }
 
-    pDoc->InitializeNoteCaptions(nTab);
     pEntry->SetHidden(true);
     SCCOLROW i;
     if ( bColumns )
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 6e026fb..15975bd 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2065,7 +2065,6 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW
         nTab = *itr;
         const SCCOLROW* pTabRanges = pRanges;
 
-        pDoc->InitializeNoteCaptions( nTab );
         for (SCCOLROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++)
         {
             SCCOLROW nStartNo = *(pTabRanges++);


More information about the Libreoffice-commits mailing list