[Libreoffice-commits] .: 7 commits - sc/inc sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 29 17:19:58 PST 2013


 sc/inc/document.hxx               |   29 +++++------
 sc/source/core/data/attarray.cxx  |    4 +
 sc/source/core/data/documen3.cxx  |   93 --------------------------------------
 sc/source/core/data/document.cxx  |   24 ++++-----
 sc/source/filter/xml/xmlimprt.cxx |   18 +++----
 sc/source/ui/docshell/docsh.cxx   |    5 --
 sc/source/ui/docshell/docsh4.cxx  |   88 ++++++++++++++++++++++++++++++++++-
 sc/source/ui/docshell/docsh6.cxx  |    6 +-
 sc/source/ui/inc/docsh.hxx        |    6 +-
 sc/source/ui/view/tabvwsh4.cxx    |    4 -
 10 files changed, 133 insertions(+), 144 deletions(-)

New commits:
commit 5e29af062de877476f5382e8d7368c3de4409b47
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Jan 30 01:34:24 2013 +0100

    if no cond format is valid use the existing protection, fdo#58826
    
    Change-Id: Ib52a546a98f681b918de5e3bd285c36407fa8254

diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 201538d..8059b17 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1278,6 +1278,8 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const
                         const ScProtectionAttr* pCondProtect = static_cast<const ScProtectionAttr*>(pItem);
                         if( pCondProtect->GetProtection() || pProtect->GetHideCell() )
                             bFoundCond = true;
+                        else
+                            break;
                     }
                     else
                     {
@@ -1285,7 +1287,7 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const
                         // but existing one + cell where conditional
                         // formatting does not remove it
                         // => we have a protected cell
-                        bFoundCond = true;
+                        bFoundCond = bFoundTemp;
                     }
                 }
                 bFoundTemp = bFoundCond;
commit fa7b61a087656f3b23b33492795a5bdd266776fd
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Jan 30 01:31:56 2013 +0100

    make clear that this variable should not be used inside of ScDocument
    
    Sadly it is not as easy as it should to remove this variable yet. There
    are some users inside the import filters that prevent me from moving the
    variable into the UI layer but we should not use it inside ScDocument.
    
    We should inspect in the future if this variable is actually a good idea
    at all or if it create problems with multiple views and we need to use
    the current table of the current view.
    
    Change-Id: Ic1a378bacfcba65a3df8e5782e64eb15ca057d7d

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 4795986..8456723 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -332,7 +332,7 @@ private:
     SCROW               nSrcMaxRow;                     // number of lines to load/save
     sal_uInt16              nFormulaTrackCount;
     bool                bHardRecalcState;               // false: soft, true: hard
-    SCTAB               nVisibleTab;                    // for OLE etc.
+    SCTAB               nVisibleTab;                    // for OLE etc., don't use inside ScDocument
 
     ScLkUpdMode         eLinkMode;
 
commit bc4f4de5fde53a46ff835a150f3128db2f63f860
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Jan 30 01:31:34 2013 +0100

    correct indentation
    
    Change-Id: Iacfb0838d6d66e010d4ac0a2e73040fa51841673

diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index dd9d155..6fdd4ce 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2100,17 +2100,17 @@ ScXMLImport::~ScXMLImport() throw()
     delete pDataPilotMemberAttrTokenMap;
     delete pConsolidationAttrTokenMap;
 
-        delete pChangeTrackingImportHelper;
-        delete pNumberFormatAttributesExportHelper;
-        delete pStyleNumberFormats;
-        delete pStylesImportHelper;
+    delete pChangeTrackingImportHelper;
+    delete pNumberFormatAttributesExportHelper;
+    delete pStyleNumberFormats;
+    delete pStylesImportHelper;
 
-        delete pSolarMutexGuard;
+    delete pSolarMutexGuard;
 
-        delete pMyNamedExpressions;
-        delete pMyLabelRanges;
-        delete pValidations;
-        delete pDetectiveOpArray;
+    delete pMyNamedExpressions;
+    delete pMyLabelRanges;
+    delete pValidations;
+    delete pDetectiveOpArray;
 }
 
 // ---------------------------------------------------------------------
commit d2676f3c1ab75e192e67eb3edffae11863041274
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Jan 29 14:29:06 2013 +0100

    no user of nVisibleTab inside ScDocument anymore
    
    Change-Id: I1ee09c7be958b0231f99df2ebadb0dc6a3a20246

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 79b8765..4795986 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -559,8 +559,7 @@ public:
     void            SetEmbedded( const ScRange& rRange );
     void            ResetEmbedded();
     Rectangle       GetEmbeddedRect() const;                        // 1/100 mm
-    void            SetEmbedded( const Rectangle& rRect );          // from VisArea (1/100 mm)
-    void            SnapVisArea( Rectangle& rRect ) const;          // 1/100 mm
+    void            SetEmbedded( SCTAB nTab, const Rectangle& rRect );          // from VisArea (1/100 mm)
 
     static SC_DLLPUBLIC bool ValidTabName( const rtl::OUString& rName );
 
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index fd505d6..3e64847 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1772,10 +1772,10 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) const
     return ScRange( nX1,nY1,nTab, nX2,nY2,nTab );
 }
 
-void ScDocument::SetEmbedded( const Rectangle& rRect )          // aus VisArea (1/100 mm)
+void ScDocument::SetEmbedded( SCTAB nTab, const Rectangle& rRect )          // aus VisArea (1/100 mm)
 {
     bIsEmbedded = true;
-    aEmbedRange = GetRange( nVisibleTab, rRect );
+    aEmbedRange = GetRange( nTab, rRect );
 }
 
 ScDocProtection* ScDocument::GetDocProtection() const
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index c9eec1c..6cd076c 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -162,7 +162,7 @@ void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, sal_Bool bModifySt
     {
         ScRange aOld;
         aDocument.GetEmbedded( aOld);
-        aDocument.SetEmbedded( aArea );
+        aDocument.SetEmbedded( aDocument.GetVisibleTab(), aArea );
         ScRange aNew;
         aDocument.GetEmbedded( aNew);
         if (aOld != aNew)
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 70868b3..4f9681d 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1545,7 +1545,7 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode )
             pDocSh->SetInplace( false );
             GetViewData()->RefreshZoom();           // recalculate PPT
             if (!pDoc->IsEmbedded())
-                pDoc->SetEmbedded( aVisArea );                  // VisArea markieren
+                pDoc->SetEmbedded( pDoc->GetVisibleTab(), aVisArea );                  // VisArea markieren
         }
     }
 
commit 36d99c6cb26938a7cbeae77e64fcef5bd250025a
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Jan 29 04:19:14 2013 +0100

    move these methods to ScDocShell
    
    Change-Id: I050e4d992c601c7af1a83b30137ab38fd05b8a74

diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 60e5a4e..fd505d6 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1778,95 +1778,6 @@ void ScDocument::SetEmbedded( const Rectangle& rRect )          // aus VisArea (
     aEmbedRange = GetRange( nVisibleTab, rRect );
 }
 
-//  VisArea auf Zellgrenzen anpassen
-
-static void lcl_SnapHor( ScTable* pTable, long& rVal, SCCOL& rStartCol )
-{
-    SCCOL nCol = 0;
-    long nTwips = (long) (rVal / HMM_PER_TWIPS);
-    long nSnap = 0;
-    while ( nCol<MAXCOL )
-    {
-        long nAdd = pTable->GetColWidth(nCol);
-        if ( nSnap + nAdd/2 < nTwips || nCol < rStartCol )
-        {
-            nSnap += nAdd;
-            ++nCol;
-        }
-        else
-            break;
-    }
-    rVal = (long) ( nSnap * HMM_PER_TWIPS );
-    rStartCol = nCol;
-}
-
-static void lcl_SnapVer( ScTable* pTable, long& rVal, SCROW& rStartRow )
-{
-    SCROW nRow = 0;
-    long nTwips = (long) (rVal / HMM_PER_TWIPS);
-    long nSnap = 0;
-
-    bool bFound = false;
-    for (SCROW i = nRow; i <= MAXROW; ++i)
-    {
-        SCROW nLastRow;
-        if (pTable->RowHidden(i, NULL, &nLastRow))
-        {
-            i = nLastRow;
-            continue;
-        }
-
-        nRow = i;
-        long nAdd = pTable->GetRowHeight(i);
-        if ( nSnap + nAdd/2 < nTwips || nRow < rStartRow )
-        {
-            nSnap += nAdd;
-            ++nRow;
-        }
-        else
-        {
-            bFound = true;
-            break;
-        }
-    }
-    if (!bFound)
-        nRow = MAXROW;  // all hidden down to the bottom
-
-    rVal = (long) ( nSnap * HMM_PER_TWIPS );
-    rStartRow = nRow;
-}
-
-void ScDocument::SnapVisArea( Rectangle& rRect ) const
-{
-    ScTable* pTable = NULL;
-    if (nVisibleTab < static_cast<SCTAB>(maTabs.size()))
-        pTable = maTabs[nVisibleTab];
-    else
-        OSL_FAIL("table out of range");
-    if (!pTable)
-    {
-        OSL_FAIL("SetEmbedded ohne Tabelle");
-        return;
-    }
-
-    bool bNegativePage = IsNegativePage( nVisibleTab );
-    if ( bNegativePage )
-        ScDrawLayer::MirrorRectRTL( rRect );        // calculate with positive (LTR) values
-
-    SCCOL nCol = 0;
-    lcl_SnapHor( pTable, rRect.Left(), nCol );
-    ++nCol;                                         // mindestens eine Spalte
-    lcl_SnapHor( pTable, rRect.Right(), nCol );
-
-    SCROW nRow = 0;
-    lcl_SnapVer( pTable, rRect.Top(), nRow );
-    ++nRow;                                         // mindestens eine Zeile
-    lcl_SnapVer( pTable, rRect.Bottom(), nRow );
-
-    if ( bNegativePage )
-        ScDrawLayer::MirrorRectRTL( rRect );        // back to real rectangle
-}
-
 ScDocProtection* ScDocument::GetDocProtection() const
 {
     return pDocProtection.get();
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index df3f2ad..4509c11 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1874,7 +1874,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI
         Rectangle aBoundRect = GetVisArea( ASPECT_THUMBNAIL );
         ScViewData aTmpData( this, NULL );
         aTmpData.SetTabNo(nVisTab);
-        aDocument.SnapVisArea( aBoundRect );
+        SnapVisArea( aBoundRect );
         aTmpData.SetScreen( aBoundRect );
         ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, sal_True );
     }
@@ -1883,7 +1883,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI
         Rectangle aBoundRect = SfxObjectShell::GetVisArea();
         ScViewData aTmpData( this, NULL );
         aTmpData.SetTabNo(nVisTab);
-        aDocument.SnapVisArea( aBoundRect );
+        SnapVisArea( aBoundRect );
         aTmpData.SetScreen( aBoundRect );
         ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, sal_True );
     }
@@ -1907,7 +1907,7 @@ Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const
         sal_Bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() );
         if ( bNegativePage )
             ScDrawLayer::MirrorRectRTL( aArea );
-        aDocument.SnapVisArea( aArea );
+        SnapVisArea( aArea );
         return aArea;
     }
     else if( nAspect == ASPECT_CONTENT && eShellMode != SFX_CREATE_MODE_EMBEDDED )
@@ -1940,6 +1940,88 @@ Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const
         return SfxObjectShell::GetVisArea( nAspect );
 }
 
+namespace {
+
+void SnapHor( const ScDocument& rDoc, SCTAB nTab, long& rVal, SCCOL& rStartCol )
+{
+    SCCOL nCol = 0;
+    long nTwips = (long) (rVal / HMM_PER_TWIPS);
+    long nSnap = 0;
+    while ( nCol<MAXCOL )
+    {
+        long nAdd = rDoc.GetColWidth(nCol, nTab);
+        if ( nSnap + nAdd/2 < nTwips || nCol < rStartCol )
+        {
+            nSnap += nAdd;
+            ++nCol;
+        }
+        else
+            break;
+    }
+    rVal = (long) ( nSnap * HMM_PER_TWIPS );
+    rStartCol = nCol;
+}
+
+void SnapVer( const ScDocument& rDoc, SCTAB nTab, long& rVal, SCROW& rStartRow )
+{
+    SCROW nRow = 0;
+    long nTwips = (long) (rVal / HMM_PER_TWIPS);
+    long nSnap = 0;
+
+    bool bFound = false;
+    for (SCROW i = nRow; i <= MAXROW; ++i)
+    {
+        SCROW nLastRow;
+        if (rDoc.RowHidden(i, nTab, NULL, &nLastRow))
+        {
+            i = nLastRow;
+            continue;
+        }
+
+        nRow = i;
+        long nAdd = rDoc.GetRowHeight(i, nTab);
+        if ( nSnap + nAdd/2 < nTwips || nRow < rStartRow )
+        {
+            nSnap += nAdd;
+            ++nRow;
+        }
+        else
+        {
+            bFound = true;
+            break;
+        }
+    }
+    if (!bFound)
+        nRow = MAXROW;  // all hidden down to the bottom
+
+    rVal = (long) ( nSnap * HMM_PER_TWIPS );
+    rStartRow = nRow;
+}
+
+
+}
+
+void ScDocShell::SnapVisArea( Rectangle& rRect ) const
+{
+    SCTAB nTab = aDocument.GetVisibleTab();
+    bool bNegativePage = aDocument.IsNegativePage( nTab );
+    if ( bNegativePage )
+        ScDrawLayer::MirrorRectRTL( rRect );        // calculate with positive (LTR) values
+
+    SCCOL nCol = 0;
+    SnapHor( aDocument, nTab, rRect.Left(), nCol );
+    ++nCol;                                         // mindestens eine Spalte
+    SnapHor( aDocument, nTab, rRect.Right(), nCol );
+
+    SCROW nRow = 0;
+    SnapVer( aDocument, nTab, rRect.Top(), nRow );
+    ++nRow;                                         // mindestens eine Zeile
+    SnapVer( aDocument, nTab, rRect.Bottom(), nRow );
+
+    if ( bNegativePage )
+        ScDrawLayer::MirrorRectRTL( rRect );        // back to real rectangle
+}
+
 void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
                                             SCTAB             nCurTab,
                                             bool&             rbHeader,
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 4c035ef..c9eec1c 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -133,7 +133,7 @@ void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, sal_Bool bModifySt
     //  when loading an ole object, the VisArea is set from the document's
     //  view settings and must be used as-is (document content may not be complete yet).
     if ( !aDocument.IsImportingXML() )
-        aDocument.SnapVisArea( aArea );
+        SnapVisArea( aArea );
 
     //TODO/LATER: it's unclear which IPEnv is used here
     /*
@@ -209,7 +209,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, sal_Bool bSnapSize )
         else
             aNewArea.SetPos( aMMRect.TopLeft() );
         if (bSnapSize)
-            aDocument.SnapVisArea(aNewArea);            // uses the new VisibleTab
+            SnapVisArea(aNewArea);            // uses the new VisibleTab
     }
 
     if (aNewArea != aOldArea)
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 854763b..b49bbe4 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -429,6 +429,9 @@ public:
     virtual void    SetChangeRecording( bool bActivate );
     virtual bool    SetProtectionPassword( const String &rPassword );
     virtual bool    GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash );
+
+
+    void SnapVisArea( Rectangle& rRect ) const;
 };
 
 
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index d154b01..70868b3 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -467,7 +467,7 @@ void ScTabViewShell::QueryObjAreaPixel( Rectangle& rRect ) const
     }
     aLogicRect.SetSize( aLogicSize );
 
-    pDoc->SnapVisArea( aLogicRect );
+    pViewData->GetDocShell()->SnapVisArea( aLogicRect );
 
     rRect.SetSize( pWin->LogicToPixel( aLogicRect.GetSize() ) );
 }
commit 036c7340738dd1212b57c80aba3efeb16c9ed737
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Jan 29 03:24:05 2013 +0100

    make some more methods const
    
    Change-Id: I7e7557a91d18255beaf96b64aeba0915a2c2786a

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 8e12ba3..79b8765 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1350,22 +1350,22 @@ public:
     ::com::sun::star::uno::Sequence<
         ::com::sun::star::sheet::TablePageBreakData> GetRowBreakData(SCTAB nTab) const;
 
-    SC_DLLPUBLIC bool           RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL);
-    SC_DLLPUBLIC bool           HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
-    SC_DLLPUBLIC bool           ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL);
+    SC_DLLPUBLIC bool           RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL) const;
+    SC_DLLPUBLIC bool           HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
+    SC_DLLPUBLIC bool           ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL) const;
     SC_DLLPUBLIC void           SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden);
     SC_DLLPUBLIC void           SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden);
-    SC_DLLPUBLIC SCROW          FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
-    SC_DLLPUBLIC SCROW          LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
-    SCROW                       CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
+    SC_DLLPUBLIC SCROW          FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
+    SC_DLLPUBLIC SCROW          LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
+    SCROW                       CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
 
-    bool                        RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL);
-    bool                        HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
-    bool                        ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL);
+    bool                        RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = NULL, SCROW* pLastRow = NULL) const;
+    bool                        HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
+    bool                        ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = NULL, SCCOL* pLastCol = NULL) const;
     SC_DLLPUBLIC void           SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered);
-    SCROW                       FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
-    SCROW                       LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
-    SCROW                       CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab);
+    SCROW                       FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
+    SCROW                       LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
+    SCROW                       CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
 
     SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const;
 
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 7905d6e..952b401 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3831,7 +3831,7 @@ Sequence<TablePageBreakData> ScDocument::GetRowBreakData(SCTAB nTab) const
     return maTabs[nTab]->GetRowBreakData();
 }
 
-bool ScDocument::RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow, SCROW* pLastRow)
+bool ScDocument::RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow, SCROW* pLastRow) const
 {
     if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
         return false;
@@ -3839,7 +3839,7 @@ bool ScDocument::RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow, SCROW* pLas
     return maTabs[nTab]->RowHidden(nRow, pFirstRow, pLastRow);
 }
 
-bool ScDocument::HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
+bool ScDocument::HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
 {
     if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
         return false;
@@ -3847,7 +3847,7 @@ bool ScDocument::HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
     return maTabs[nTab]->HasHiddenRows(nStartRow, nEndRow);
 }
 
-bool ScDocument::ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol, SCCOL* pLastCol)
+bool ScDocument::ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol, SCCOL* pLastCol) const
 {
     if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
     {
@@ -3877,7 +3877,7 @@ void ScDocument::SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool b
     maTabs[nTab]->SetColHidden(nStartCol, nEndCol, bHidden);
 }
 
-SCROW ScDocument::FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
+SCROW ScDocument::FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
 {
     if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
         return ::std::numeric_limits<SCROW>::max();;
@@ -3885,7 +3885,7 @@ SCROW ScDocument::FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
     return maTabs[nTab]->FirstVisibleRow(nStartRow, nEndRow);
 }
 
-SCROW ScDocument::LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
+SCROW ScDocument::LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
 {
     if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
         return ::std::numeric_limits<SCROW>::max();;
@@ -3893,7 +3893,7 @@ SCROW ScDocument::LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
     return maTabs[nTab]->LastVisibleRow(nStartRow, nEndRow);
 }
 
-SCROW ScDocument::CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
+SCROW ScDocument::CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
 {
     if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
         return 0;
@@ -3901,7 +3901,7 @@ SCROW ScDocument::CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
     return maTabs[nTab]->CountVisibleRows(nStartRow, nEndRow);
 }
 
-bool ScDocument::RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow, SCROW* pLastRow)
+bool ScDocument::RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow, SCROW* pLastRow) const
 {
     if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
         return false;
@@ -3909,7 +3909,7 @@ bool ScDocument::RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow, SCROW* pL
     return maTabs[nTab]->RowFiltered(nRow, pFirstRow, pLastRow);
 }
 
-bool ScDocument::HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
+bool ScDocument::HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
 {
     if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
         return false;
@@ -3917,7 +3917,7 @@ bool ScDocument::HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
     return maTabs[nTab]->HasFilteredRows(nStartRow, nEndRow);
 }
 
-bool ScDocument::ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol, SCCOL* pLastCol)
+bool ScDocument::ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol, SCCOL* pLastCol) const
 {
     if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
         return false;
@@ -3934,7 +3934,7 @@ void ScDocument::SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool
 }
 
 
-SCROW ScDocument::FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
+SCROW ScDocument::FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
 {
     if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
         return ::std::numeric_limits<SCROW>::max();;
@@ -3942,7 +3942,7 @@ SCROW ScDocument::FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab
     return maTabs[nTab]->FirstNonFilteredRow(nStartRow, nEndRow);
 }
 
-SCROW ScDocument::LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
+SCROW ScDocument::LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
 {
     if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
         return ::std::numeric_limits<SCROW>::max();;
@@ -3950,7 +3950,7 @@ SCROW ScDocument::LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
     return maTabs[nTab]->LastNonFilteredRow(nStartRow, nEndRow);
 }
 
-SCROW ScDocument::CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
+SCROW ScDocument::CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
 {
     if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
         return 0;
commit d064b7abbed0e8b27847109e12620b1ddd8582ce
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Jan 29 02:54:29 2013 +0100

    remove these unused static data members
    
    Change-Id: I8b3dc969fc371a47b89055e80ea762565e405f26

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 21629ce..8c92349 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -129,11 +129,6 @@ using ::std::vector;
 
 // STATIC DATA -----------------------------------------------------------
 
-//  Stream-Namen im Storage
-
-const sal_Char ScDocShell::pStarCalcDoc[] = STRING_SCSTREAM;        // "StarCalcDocument"
-const sal_Char ScDocShell::pStyleName[] = "SfxStyleSheets";
-
 //  Filter-Namen (wie in sclib.cxx)
 
 static const sal_Char pFilterSc50[]     = "StarCalc 5.0";
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index d445194..854763b 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -83,9 +83,6 @@ typedef ::boost::unordered_map< sal_uLong, sal_uLong > ScChangeActionMergeMap;
 
 class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
 {
-    static const sal_Char pStarCalcDoc[];
-    static const sal_Char pStyleName[];
-
     ScDocument          aDocument;
 
     String              aDdeTextFmt;


More information about the Libreoffice-commits mailing list