[Libreoffice-commits] .: Branch 'feature/unlimited-number-of-sheets' - sc/inc sc/source

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Mon May 23 19:54:30 PDT 2011


 sc/inc/document.hxx              |    2 +-
 sc/source/core/data/document.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1878062b9850e3c50e0e9a43645adc3aa2e862a4
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue May 24 04:53:17 2011 +0200

    fix minor problems

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 32af539..94f5ec8 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -472,7 +472,7 @@ public:
     SC_DLLPUBLIC ScRangeName* GetRangeName() const;
     void SetRangeName(SCTAB nTab, ScRangeName* pNew);
     void SetRangeName( ScRangeName* pNewRangeName );
-    SCTAB			GetMaxTableNumber() { return static_cast<SCTAB>(pTab.size()); }
+    SCTAB			GetMaxTableNumber() { return static_cast<SCTAB>(pTab.size()) - 1; }
     void			SetMaxTableNumber(SCTAB nNumber) { nMaxTableNumber = nNumber; }
 
     ScRangePairList*	GetColNameRanges() { return &xColNameRanges; }
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 09a2329..bb74700 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1681,7 +1681,7 @@ void ScDocument::CopyToClip4VBA(const ScClipParam& rClipParam, ScDocument* pClip
         pClipDoc->ResetClip( this, nTab );
 
         CopyRangeNamesToClip( pClipDoc, aClipRange, nTab );
-        if ( nTab < static_cast<SCTAB>(pTab.size()) && nTab < static_cast<SCTAB>(pCipDoc->pTab.size()) )
+        if ( nTab < static_cast<SCTAB>(pTab.size()) && nTab < static_cast<SCTAB>(pClipDoc->pTab.size()) )
             if ( pTab[nTab] && pClipDoc->pTab[nTab] )
             {
                 pTab[nTab]->CopyToClip( rClipParam.maRanges, pClipDoc->pTab[nTab], bKeepScenarioFlags, bCloneNoteCaptions );


More information about the Libreoffice-commits mailing list