diff options
-rw-r--r-- | sc/inc/rangeutl.hxx | 7 | ||||
-rw-r--r-- | sc/source/core/tool/rangeutl.cxx | 25 | ||||
-rw-r--r-- | sc/source/ui/dbgui/consdlg.cxx | 6 |
3 files changed, 25 insertions, 13 deletions
diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index f458469aa84e..4a46b016ac9c 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -2,9 +2,9 @@ * * $RCSfile: rangeutl.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:44:49 $ + * last change: $Author: dr $ $Date: 2000-11-03 15:50:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -109,7 +109,8 @@ public: BOOL IsAbsTabArea ( const String& rAreaStr, ScDocument* pDoc, ScArea*** pppAreas = 0, - USHORT* pAreaCount = 0 ) const; + USHORT* pAreaCount = 0, + BOOL bAcceptCellRef = FALSE ) const; BOOL IsAbsArea ( const String& rAreaStr, ScDocument* pDoc, diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 50da4c7de519..2559bfb520fb 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: rangeutl.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-19 00:16:18 $ + * last change: $Author: dr $ $Date: 2000-11-03 15:56:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -206,7 +206,8 @@ void ScRangeUtil::CutPosString( const String& theAreaStr, BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr, ScDocument* pDoc, ScArea*** pppAreas, - USHORT* pAreaCount ) const + USHORT* pAreaCount, + BOOL bAcceptCellRef ) const { DBG_ASSERT( pDoc, "Kein Dokument uebergeben!" ); if ( !pDoc ) @@ -215,6 +216,9 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr, /* * Erwartet wird ein String der Form * "$Tabelle1.$A$1:$Tabelle3.$D$17" + * Wenn bAcceptCellRef == TRUE ist, wird auch ein String der Form + * "$Tabelle1.$A$1" + * akzeptiert. * * als Ergebnis wird ein ScArea-Array angelegt, * welches ueber ppAreas bekannt gegeben wird und auch @@ -222,19 +226,26 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr, */ BOOL bStrOk = FALSE; + String aTempAreaStr(rAreaStr); String aStartPosStr; String aEndPosStr; - USHORT nColonPos = rAreaStr.Search(':'); + if ( STRING_NOTFOUND == aTempAreaStr.Search(':') ) + { + aTempAreaStr.Append(':'); + aTempAreaStr.Append(rAreaStr); + } + + USHORT nColonPos = aTempAreaStr.Search(':'); if ( STRING_NOTFOUND != nColonPos - && STRING_NOTFOUND != rAreaStr.Search('.') ) + && STRING_NOTFOUND != aTempAreaStr.Search('.') ) { ScRefTripel aStartPos; ScRefTripel aEndPos; - aStartPosStr = rAreaStr.Copy( 0, nColonPos ); - aEndPosStr = rAreaStr.Copy( nColonPos+1, STRING_LEN ); + aStartPosStr = aTempAreaStr.Copy( 0, nColonPos ); + aEndPosStr = aTempAreaStr.Copy( nColonPos+1, STRING_LEN ); if ( ConvertSingleRef( pDoc, aStartPosStr, 0, aStartPos ) ) { diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index cb2b2343abdf..efd3cf5d2d78 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: consdlg.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: nn $ $Date: 2000-09-22 18:48:02 $ + * last change: $Author: dr $ $Date: 2000-11-03 15:51:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -520,7 +520,7 @@ IMPL_LINK( ScConsolidateDlg, ClickHdl, PushButton*, pBtn ) ScArea** ppAreas = NULL; USHORT nAreaCount = 0; - if ( pRangeUtil->IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount ) ) + if ( pRangeUtil->IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount, TRUE ) ) { // IsAbsTabArea() legt ein Array von ScArea-Zeigern an, // welche ebenfalls dynamisch erzeugt wurden. |