diff options
author | Eike Rathke <er@openoffice.org> | 2001-08-14 13:16:30 +0000 |
---|---|---|
committer | Eike Rathke <er@openoffice.org> | 2001-08-14 13:16:30 +0000 |
commit | 03ef5765e2e6c99ab023984ad8d5c062822cc339 (patch) | |
tree | 73cfb13fc08433a7c2179a876ff4dc0e0dfba6bb /sc/source/core/tool/chartarr.cxx | |
parent | 251e1195d0fd8b0b93ee67ffe7bdfc3f17b4e180 (diff) |
#90896# SchMemChart.SomeData3 holds sheet names for old->new conversion in clipboard/OLE
Diffstat (limited to 'sc/source/core/tool/chartarr.cxx')
-rw-r--r-- | sc/source/core/tool/chartarr.cxx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx index b8d35dcfab71..519a93f8f9a7 100644 --- a/sc/source/core/tool/chartarr.cxx +++ b/sc/source/core/tool/chartarr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: chartarr.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: dr $ $Date: 2001-07-09 08:43:39 $ + * last change: $Author: er $ $Date: 2001-08-14 14:16:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -210,6 +210,9 @@ ScChartArray::ScChartArray( ScDocument* pDoc, const SchMemChart& rData ) : } else { // old SO5 chart format + //! A similar routine is implemented in + //! SchMemChart::ConvertChartRangeForCalc() for OldToNew. If anything + //! is changed here it propably must be changed there too! const sal_Unicode cTok = ';'; xub_StrLen nToken; String aPos = ((SchMemChart&)rData).SomeData1(); @@ -217,15 +220,15 @@ ScChartArray::ScChartArray( ScDocument* pDoc, const SchMemChart& rData ) : { String aOpt = ((SchMemChart&)rData).SomeData2(); xub_StrLen nOptToken = aOpt.GetTokenCount( cTok ); - BOOL bNewChart = (nOptToken >= 4); // ab 341/342 + BOOL bNewChart = (nOptToken >= 4); // as of 341/342 USHORT nCol1, nRow1, nTab1, nCol2, nRow2, nTab2; xub_StrLen nInd = 0; for ( xub_StrLen j=0; j < nToken; j+=5 ) { xub_StrLen nInd2 = nInd; nTab1 = (USHORT) aPos.GetToken( 0, cTok, nInd ).ToInt32(); - // damit alte Versionen (<341/342) das ueberlesen ist der nTab2 - // Token Separator ein ',' + // To make old versions (<341/342) skip it, the token separator + // is a ',' if ( bNewChart ) nTab2 = (USHORT) aPos.GetToken( 1, ',', nInd2 ).ToInt32(); else @@ -1029,6 +1032,7 @@ void ScChartArray::SetExtraStrings( SchMemChart& rMem ) */ #endif + String aSheetNames; SchChartRange aChartRange; aChartRange.mbFirstColumnContainsLabels = bRowHeaders; aChartRange.mbFirstRowContainsLabels = bColHeaders; @@ -1051,10 +1055,16 @@ void ScChartArray::SetExtraStrings( SchMemChart& rMem ) pDocument->GetName( nTab, aName ); aCellRangeAddress.msTableName = aName; aChartRange.maRanges.push_back( aCellRangeAddress ); + if ( aSheetNames.Len() ) + aSheetNames += ';'; + aSheetNames += aName; } } rMem.SetChartRange( aChartRange ); + // #90896# need that for OLE and clipboard of old binary file format + rMem.SomeData3() = aSheetNames; + rMem.SetReadOnly( TRUE ); // Daten nicht im Chart per Daten-Fenster veraendern } |