diff options
Diffstat (limited to 'sc/source/core/tool')
62 files changed, 1662 insertions, 1665 deletions
diff --git a/sc/source/core/tool/addincfg.cxx b/sc/source/core/tool/addincfg.cxx index 92017aad9f82..1735d4f11f35 100644 --- a/sc/source/core/tool/addincfg.cxx +++ b/sc/source/core/tool/addincfg.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx index f7e39adfd72a..e44946b11578 100644 --- a/sc/source/core/tool/addincol.cxx +++ b/sc/source/core/tool/addincol.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -1576,7 +1576,7 @@ void ScUnoAddInCall::ExecuteCallWithArgs(uno::Sequence<uno::Any>& rCallArgs) else nErrCode = errNoValue; } - + catch(uno::Exception&) { nErrCode = errNoValue; diff --git a/sc/source/core/tool/addinhelpid.cxx b/sc/source/core/tool/addinhelpid.cxx index 9ed593f58cde..0a32ca3f0487 100644 --- a/sc/source/core/tool/addinhelpid.cxx +++ b/sc/source/core/tool/addinhelpid.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx index 4133e1f4dd9e..6f5cd1a314e2 100644 --- a/sc/source/core/tool/addinlis.cxx +++ b/sc/source/core/tool/addinlis.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ #include "addinlis.hxx" -#include "miscuno.hxx" // SC_IMPL_SERVICE_INFO +#include "miscuno.hxx" // SC_IMPL_SERVICE_INFO #include "document.hxx" #include "brdcst.hxx" #include "sc.hrc" @@ -56,17 +56,17 @@ List ScAddInListener::aAllListeners; //------------------------------------------------------------------------ -// static +// static ScAddInListener* ScAddInListener::CreateListener( uno::Reference<sheet::XVolatileResult> xVR, ScDocument* pDoc ) { ScAddInListener* pNew = new ScAddInListener( xVR, pDoc ); - pNew->acquire(); // for aAllListeners + pNew->acquire(); // for aAllListeners aAllListeners.Insert( pNew, LIST_APPEND ); - if ( xVR.is() ) - xVR->addResultListener( pNew ); // after at least 1 ref exists! + if ( xVR.is() ) + xVR->addResultListener( pNew ); // after at least 1 ref exists! return pNew; } @@ -95,17 +95,17 @@ ScAddInListener* ScAddInListener::Get( uno::Reference<sheet::XVolatileResult> xV if ( pComp == (sheet::XVolatileResult*)pLst->xVolRes.get() ) return pLst; } - return NULL; // not found + return NULL; // not found } -//! move to some container object? +//! move to some container object? // static void ScAddInListener::RemoveDocument( ScDocument* pDocumentP ) { ULONG nPos = aAllListeners.Count(); while (nPos) { - // loop backwards because elements are removed + // loop backwards because elements are removed --nPos; ScAddInListener* pLst = (ScAddInListener*)aAllListeners.GetObject(nPos); ScAddInDocs* p = pLst->pDocs; @@ -116,14 +116,14 @@ void ScAddInListener::RemoveDocument( ScDocument* pDocumentP ) if ( p->Count() == 0 ) { // this AddIn is no longer used - // dont delete, just remove the ref for the list + // dont delete, just remove the ref for the list aAllListeners.Remove( nPos ); - if ( pLst->xVolRes.is() ) + if ( pLst->xVolRes.is() ) pLst->xVolRes->removeResultListener( pLst ); - pLst->release(); // Ref for aAllListeners - pLst may be deleted here + pLst->release(); // Ref for aAllListeners - pLst may be deleted here } } } @@ -136,11 +136,11 @@ void ScAddInListener::RemoveDocument( ScDocument* pDocumentP ) void SAL_CALL ScAddInListener::modified( const ::com::sun::star::sheet::ResultEvent& aEvent ) throw(::com::sun::star::uno::RuntimeException) { - SolarMutexGuard aGuard; //! or generate a UserEvent + SolarMutexGuard aGuard; //! or generate a UserEvent - aResult = aEvent.Value; // store result + aResult = aEvent.Value; // store result - // notify document of changes + // notify document of changes Broadcast( ScHint( SC_HINT_DATACHANGED, ScAddress(), NULL ) ); diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index f09812526a0c..969072174d3e 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,16 +62,16 @@ ScAddress::Details::Details ( const ScDocument* pDoc, #include <iostream> -/** - * Parse from the opening single quote to the closing single quote. Inside - * the quotes, a single quote character is encoded by double single-quote - * characters. +/** + * Parse from the opening single quote to the closing single quote. Inside + * the quotes, a single quote character is encoded by double single-quote + * characters. * - * @param p pointer to the first character to begin parsing. - * @param rName (reference) parsed name within the quotes. If the name is + * @param p pointer to the first character to begin parsing. + * @param rName (reference) parsed name within the quotes. If the name is * empty, either the parsing failed or it's an empty quote. - * - * @return pointer to the character immediately after the closing single + * + * @return pointer to the character immediately after the closing single * quote. */ static const sal_Unicode* lcl_ParseQuotedName( const sal_Unicode* p, String& rName ) @@ -87,7 +87,7 @@ static const sal_Unicode* lcl_ParseQuotedName( const sal_Unicode* p, String& rNa if (*p == '\'') { if (cPrev == '\'') - { + { // double single-quote equals one single quote. rName += *p; cPrev = 0; @@ -146,17 +146,17 @@ const sal_Unicode* lcl_eatWhiteSpace( const sal_Unicode* p ) return p; } -/** Determines the number of sheets an external reference spans and sets - rRange.aEnd.nTab accordingly. If a sheet is not found, the corresponding - bits in rFlags are cleared. pExtInfo is filled if it wasn't already. If in - cached order rStartTabName comes after rEndTabName, pExtInfo->maTabName +/** Determines the number of sheets an external reference spans and sets + rRange.aEnd.nTab accordingly. If a sheet is not found, the corresponding + bits in rFlags are cleared. pExtInfo is filled if it wasn't already. If in + cached order rStartTabName comes after rEndTabName, pExtInfo->maTabName is set to rEndTabName. - @returns <FALSE/> if pExtInfo is already filled and rExternDocName does not + @returns <FALSE/> if pExtInfo is already filled and rExternDocName does not result in the identical file ID. Else <TRUE/>. */ static bool lcl_ScRange_External_TabSpan( ScRange & rRange, - USHORT & rFlags, + USHORT & rFlags, ScAddress::ExternalInfo* pExtInfo, const String & rExternDocName, const String & rStartTabName, @@ -210,10 +210,10 @@ static bool lcl_ScRange_External_TabSpan( } /** Returns NULL if the string should be a sheet name, but is invalid. - Returns a pointer to the first character after the sheet name, if there was + Returns a pointer to the first character after the sheet name, if there was any, else pointer to start. @param pMsoxlQuoteStop - Starting _within_ a quoted name, but still may be 3D; quoted name stops + Starting _within_ a quoted name, but still may be 3D; quoted name stops at pMsoxlQuoteStop */ static const sal_Unicode * @@ -236,7 +236,7 @@ lcl_XL_ParseSheetRef( const sal_Unicode* start, // We pre-analyzed the quoting, no checks needed here. if (*++p == '\'') { - aTabName.Append( pCurrentStart, + aTabName.Append( pCurrentStart, sal::static_int_cast<xub_StrLen>( p - pCurrentStart)); pCurrentStart = ++p; } @@ -405,8 +405,8 @@ const sal_Unicode* ScRange::Parse_XL_Header( } else if (*p == '\'') { - // Sickness in Excel's ODF msoxl namespace: - // 'E:\[EXTDATA8.XLS]Sheet1'!$A$7 or + // Sickness in Excel's ODF msoxl namespace: + // 'E:\[EXTDATA8.XLS]Sheet1'!$A$7 or // 'E:\[EXTDATA12B.XLSB]Sheet1:Sheet3'!$A$11 // But, 'Sheet1'!B3 would also be a valid! // Excel does not allow [ and ] characters in sheet names though. @@ -431,7 +431,7 @@ const sal_Unicode* ScRange::Parse_XL_Header( rExternDocName.Erase( nClose); rExternDocName.Erase( nOpen, 1); pMsoxlQuoteStop = p - 1; // the ' quote char - // There may be embedded escaped quotes, just matching the + // There may be embedded escaped quotes, just matching the // doc name's length may not work. for (p = start; *p != '['; ++p) ; @@ -459,7 +459,7 @@ const sal_Unicode* ScRange::Parse_XL_Header( p = lcl_XL_ParseSheetRef( p+1, rEndTabName, false, pMsoxlQuoteStop); if( p == NULL ) { - nFlags = nSaveFlags; + nFlags = nSaveFlags; return start; // invalid tab } nFlags |= SCA_VALID_TAB2 | SCA_TAB2_3D | SCA_TAB2_ABSOLUTE; @@ -514,12 +514,12 @@ const sal_Unicode* ScRange::Parse_XL_Header( if (rEndTabName.Len()) { if (!pDoc->GetTable(rEndTabName, nTab)) - { + { // invalid table name. nFlags &= ~SCA_VALID_TAB2; nTab = -1; } - + aEnd.SetTab(nTab); } } @@ -632,11 +632,11 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r, // Keep in mind that nFlags2 gets left-shifted by 4 bits before being merged. USHORT nFlags2 = SCA_VALID_TAB; - p = r.Parse_XL_Header( p, pDoc, aExternDocName, aStartTabName, + p = r.Parse_XL_Header( p, pDoc, aExternDocName, aStartTabName, aEndTabName, nFlags, bOnlyAcceptSingle, NULL ); if (aExternDocName.Len() > 0) - lcl_ScRange_External_TabSpan( r, nFlags, pExtInfo, aExternDocName, + lcl_ScRange_External_TabSpan( r, nFlags, pExtInfo, aExternDocName, aStartTabName, aEndTabName, pDoc); if( NULL == p ) @@ -672,7 +672,7 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r, return nFlags; } - nFlags |= + nFlags |= SCA_VALID_COL | SCA_VALID_COL2 | SCA_COL_ABSOLUTE | SCA_COL2_ABSOLUTE; r.aStart.SetCol( 0 ); @@ -707,7 +707,7 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r, if (p && p[0] != 0) { // any trailing invalid character must invalidate the whole range. - nFlags &= ~(SCA_VALID | SCA_VALID_COL | SCA_VALID_ROW | SCA_VALID_TAB | + nFlags &= ~(SCA_VALID | SCA_VALID_COL | SCA_VALID_ROW | SCA_VALID_TAB | SCA_VALID_COL2 | SCA_VALID_ROW2 | SCA_VALID_TAB2); return nFlags; } @@ -740,7 +740,7 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r, return nFlags; } - nFlags |= + nFlags |= SCA_VALID_ROW | SCA_VALID_ROW2 | SCA_ROW_ABSOLUTE | SCA_ROW2_ABSOLUTE; r.aStart.SetRow( 0 ); @@ -807,11 +807,11 @@ lcl_ScRange_Parse_XL_A1( ScRange& r, String aExternDocName, aStartTabName, aEndTabName; // for external link table USHORT nFlags = SCA_VALID | SCA_VALID_TAB, nFlags2 = SCA_VALID_TAB; - p = r.Parse_XL_Header( p, pDoc, aExternDocName, aStartTabName, + p = r.Parse_XL_Header( p, pDoc, aExternDocName, aStartTabName, aEndTabName, nFlags, bOnlyAcceptSingle, pExternalLinks ); if (aExternDocName.Len() > 0) - lcl_ScRange_External_TabSpan( r, nFlags, pExtInfo, aExternDocName, + lcl_ScRange_External_TabSpan( r, nFlags, pExtInfo, aExternDocName, aStartTabName, aEndTabName, pDoc); if( NULL == p ) @@ -824,7 +824,7 @@ lcl_ScRange_Parse_XL_A1( ScRange& r, return 0; tmp1 = lcl_a1_get_row( p, &r.aStart, &nFlags ); - + tmp1 = lcl_eatWhiteSpace( tmp1 ); if( !tmp1 || *tmp1++ != ':' ) // Even a singleton requires ':' (eg 2:2) return 0; @@ -835,7 +835,7 @@ lcl_ScRange_Parse_XL_A1( ScRange& r, return 0; r.aStart.SetCol( 0 ); r.aEnd.SetCol( MAXCOL ); - nFlags |= + nFlags |= SCA_VALID_COL | SCA_VALID_COL2 | SCA_COL_ABSOLUTE | SCA_COL2_ABSOLUTE; nFlags |= (nFlags2 << 4); @@ -858,7 +858,7 @@ lcl_ScRange_Parse_XL_A1( ScRange& r, return 0; r.aStart.SetRow( 0 ); r.aEnd.SetRow( MAXROW ); - nFlags |= + nFlags |= SCA_VALID_ROW | SCA_VALID_ROW2 | SCA_ROW_ABSOLUTE | SCA_ROW2_ABSOLUTE; nFlags |= (nFlags2 << 4); @@ -884,7 +884,7 @@ lcl_ScRange_Parse_XL_A1( ScRange& r, tmp2 = lcl_eatWhiteSpace( tmp2 ); if( *tmp2 != ':' ) { - // Sheet1:Sheet2!C4 is a valid range, without a second sheet it is + // Sheet1:Sheet2!C4 is a valid range, without a second sheet it is // not. Any trailing invalid character invalidates the range. if (*tmp2 == 0 && (nFlags & SCA_TAB2_3D)) { @@ -923,12 +923,12 @@ lcl_ScRange_Parse_XL_A1( ScRange& r, } /** - @param pRange pointer to range where rAddr effectively is *pRange->aEnd, - used in conjunction with pExtInfo to determine the tab span + @param pRange pointer to range where rAddr effectively is *pRange->aEnd, + used in conjunction with pExtInfo to determine the tab span of a 3D reference. */ static USHORT -lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr, +lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr, ScAddress::ExternalInfo* pExtInfo = NULL, ScRange* pRange = NULL ) { USHORT nRes = 0; @@ -947,7 +947,7 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd if (*p++ == SC_COMPILER_FILE_TAB_SEP) bExtDoc = true; else - // This is not a document name. Perhaps a quoted relative table + // This is not a document name. Perhaps a quoted relative table // name. p = pStart; } @@ -1110,8 +1110,8 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd pExtInfo->maTabName = aTab; pExtInfo->mnFileId = nFileId; - if (pRefMgr->getSingleRefToken(nFileId, aTab, - ScAddress(nCol, nRow, 0), NULL, + if (pRefMgr->getSingleRefToken(nFileId, aTab, + ScAddress(nCol, nRow, 0), NULL, &nTab).get()) { rAddr.SetTab( nTab); @@ -1122,15 +1122,15 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd } else { - // This is a call for the second part of the reference, + // This is a call for the second part of the reference, // we must have the range to adapt tab span. if (!pRange) nRes = 0; else { USHORT nFlags = nRes | SCA_VALID_TAB2; - if (!lcl_ScRange_External_TabSpan( *pRange, nFlags, - pExtInfo, aDocName, + if (!lcl_ScRange_External_TabSpan( *pRange, nFlags, + pExtInfo, aDocName, pExtInfo->maTabName, aTab, pDoc)) nRes &= ~SCA_VALID_TAB; else @@ -1585,7 +1585,7 @@ lcl_r1c1_append_r ( String &r, int nRow, bool bIsAbs, } } -static String +static String getFileNameFromDoc( const ScDocument* pDoc ) { // TODO : er points at ScGlobal::GetAbsDocName() @@ -1606,7 +1606,7 @@ getFileNameFromDoc( const ScDocument* pDoc ) } else sFileName = pShell->GetTitle(); - } + } } return sFileName; } diff --git a/sc/source/core/tool/adiasync.cxx b/sc/source/core/tool/adiasync.cxx index 823dcb597b7f..85916d1e924c 100644 --- a/sc/source/core/tool/adiasync.cxx +++ b/sc/source/core/tool/adiasync.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ #include "brdcst.hxx" #include "global.hxx" #include "document.hxx" -#include "sc.hrc" // FID_DATACHANGED +#include "sc.hrc" // FID_DATACHANGED #include <osl/thread.h> @@ -65,7 +65,7 @@ void CALLTYPE ScAddInAsyncCallBack( double& nHandle, void* pData ) ScAddInAsync::ScAddInAsync() : SvtBroadcaster(), nHandle( 0 ) -{ // nur fuer aSeekObj ! +{ // nur fuer aSeekObj ! } @@ -92,7 +92,7 @@ ScAddInAsync::~ScAddInAsync() { // im dTor wg. theAddInAsyncTbl.DeleteAndDestroy in ScGlobal::Clear pFuncData->Unadvice( (double)nHandle ); - if ( eType == PTR_STRING && pStr ) // mit Typvergleich wg. Union! + if ( eType == PTR_STRING && pStr ) // mit Typvergleich wg. Union! delete pStr; delete pDocs; } @@ -165,14 +165,14 @@ void ScAddInAsync::RemoveDocument( ScDocument* pDocumentP ) const ScAddInAsync** ppAsync = (const ScAddInAsync**) theAddInAsyncTbl.GetData() + nPos - 1; for ( ; nPos-- >0; ppAsync-- ) - { // rueckwaerts wg. Pointer-Aufrueckerei im Array + { // rueckwaerts wg. Pointer-Aufrueckerei im Array ScAddInDocs* p = ((ScAddInAsync*)*ppAsync)->pDocs; USHORT nFoundPos; if ( p->Seek_Entry( pDocumentP, &nFoundPos ) ) { p->Remove( nFoundPos ); if ( p->Count() == 0 ) - { // dieses AddIn wird nicht mehr benutzt + { // dieses AddIn wird nicht mehr benutzt ScAddInAsync* pAsync = (ScAddInAsync*)*ppAsync; theAddInAsyncTbl.Remove( nPos ); delete pAsync; diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx index be483c8bf574..03823142ee85 100644 --- a/sc/source/core/tool/appoptio.cxx +++ b/sc/source/core/tool/appoptio.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -87,19 +87,19 @@ void ScAppOptions::SetDefaults() nTabCountInNewSpreadsheet = 3; if ( ScOptionsUtil::IsMetricSystem() ) - eMetric = FUNIT_CM; // default for countries with metric system + eMetric = FUNIT_CM; // default for countries with metric system else - eMetric = FUNIT_INCH; // default for others + eMetric = FUNIT_INCH; // default for others - nZoom = 100; - eZoomType = SVX_ZOOM_PERCENT; + nZoom = 100; + eZoomType = SVX_ZOOM_PERCENT; bSynchronizeZoom = TRUE; - nStatusFunc = SUBTOTAL_FUNC_SUM; - bAutoComplete = TRUE; - bDetectiveAuto = TRUE; + nStatusFunc = SUBTOTAL_FUNC_SUM; + bAutoComplete = TRUE; + bDetectiveAuto = TRUE; delete [] pLRUList; - pLRUList = new USHORT[5]; // sinnvoll vorbelegen + pLRUList = new USHORT[5]; // sinnvoll vorbelegen pLRUList[0] = SC_OPCODE_SUM; pLRUList[1] = SC_OPCODE_AVERAGE; pLRUList[2] = SC_OPCODE_MIN; @@ -111,7 +111,7 @@ void ScAppOptions::SetDefaults() nTrackInsertColor = COL_TRANSPARENT; nTrackDeleteColor = COL_TRANSPARENT; nTrackMoveColor = COL_TRANSPARENT; - eLinkMode = LM_ON_DEMAND; + eLinkMode = LM_ON_DEMAND; nDefaultObjectSizeWidth = 8000; nDefaultObjectSizeHeight = 5000; @@ -124,19 +124,19 @@ void ScAppOptions::SetDefaults() const ScAppOptions& ScAppOptions::operator=( const ScAppOptions& rCpy ) { nTabCountInNewSpreadsheet = rCpy.nTabCountInNewSpreadsheet; - eMetric = rCpy.eMetric; - eZoomType = rCpy.eZoomType; + eMetric = rCpy.eMetric; + eZoomType = rCpy.eZoomType; bSynchronizeZoom = rCpy.bSynchronizeZoom; - nZoom = rCpy.nZoom; + nZoom = rCpy.nZoom; SetLRUFuncList( rCpy.pLRUList, rCpy.nLRUFuncCount ); - nStatusFunc = rCpy.nStatusFunc; - bAutoComplete = rCpy.bAutoComplete; - bDetectiveAuto = rCpy.bDetectiveAuto; + nStatusFunc = rCpy.nStatusFunc; + bAutoComplete = rCpy.bAutoComplete; + bDetectiveAuto = rCpy.bDetectiveAuto; nTrackContentColor = rCpy.nTrackContentColor; nTrackInsertColor = rCpy.nTrackInsertColor; nTrackDeleteColor = rCpy.nTrackDeleteColor; nTrackMoveColor = rCpy.nTrackMoveColor; - eLinkMode = rCpy.eLinkMode; + eLinkMode = rCpy.eLinkMode; nDefaultObjectSizeWidth = rCpy.nDefaultObjectSizeWidth; nDefaultObjectSizeHeight = rCpy.nDefaultObjectSizeHeight; mbShowSharedDocumentWarning = rCpy.mbShowSharedDocumentWarning; @@ -145,7 +145,7 @@ const ScAppOptions& ScAppOptions::operator=( const ScAppOptions& rCpy ) //------------------------------------------------------------------------ -void ScAppOptions::SetLRUFuncList( const USHORT* pList, const USHORT nCount ) +void ScAppOptions::SetLRUFuncList( const USHORT* pList, const USHORT nCount ) { delete [] pLRUList; @@ -163,7 +163,7 @@ void ScAppOptions::SetLRUFuncList( const USHORT* pList, const USHORT nCount ) } //================================================================== -// Config Item containing app options +// Config Item containing app options //================================================================== void lcl_SetLastFunctions( ScAppOptions& rOpt, const Any& rValue ) @@ -199,7 +199,7 @@ void lcl_GetLastFunctions( Any& rDest, const ScAppOptions& rOpt ) rDest <<= aSeq; } else - rDest <<= Sequence<sal_Int32>(0); // empty + rDest <<= Sequence<sal_Int32>(0); // empty } void lcl_SetSortList( const Any& rValue ) @@ -211,8 +211,8 @@ void lcl_SetSortList( const Any& rValue ) const OUString* pArray = aSeq.getConstArray(); ScUserList aList; - // if setting is "default", keep default values from ScUserList ctor - //! mark "default" in a safe way + // if setting is "default", keep default values from ScUserList ctor + //! mark "default" in a safe way BOOL bDefault = ( nCount == 1 && pArray[0].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "NULL" ) ) ); @@ -245,60 +245,60 @@ void lcl_GetSortList( Any& rDest ) rDest <<= aSeq; } else - rDest <<= Sequence<OUString>(0); // empty + rDest <<= Sequence<OUString>(0); // empty } //------------------------------------------------------------------ -#define CFGPATH_LAYOUT "Office.Calc/Layout" +#define CFGPATH_LAYOUT "Office.Calc/Layout" -#define SCLAYOUTOPT_MEASURE 0 -#define SCLAYOUTOPT_STATUSBAR 1 -#define SCLAYOUTOPT_ZOOMVAL 2 -#define SCLAYOUTOPT_ZOOMTYPE 3 +#define SCLAYOUTOPT_MEASURE 0 +#define SCLAYOUTOPT_STATUSBAR 1 +#define SCLAYOUTOPT_ZOOMVAL 2 +#define SCLAYOUTOPT_ZOOMTYPE 3 #define SCLAYOUTOPT_SYNCZOOM 4 #define SCLAYOUTOPT_COUNT 5 -#define CFGPATH_INPUT "Office.Calc/Input" +#define CFGPATH_INPUT "Office.Calc/Input" -#define SCINPUTOPT_LASTFUNCS 0 -#define SCINPUTOPT_AUTOINPUT 1 -#define SCINPUTOPT_DET_AUTO 2 -#define SCINPUTOPT_COUNT 3 +#define SCINPUTOPT_LASTFUNCS 0 +#define SCINPUTOPT_AUTOINPUT 1 +#define SCINPUTOPT_DET_AUTO 2 +#define SCINPUTOPT_COUNT 3 -#define CFGPATH_REVISION "Office.Calc/Revision/Color" +#define CFGPATH_REVISION "Office.Calc/Revision/Color" -#define SCREVISOPT_CHANGE 0 -#define SCREVISOPT_INSERTION 1 -#define SCREVISOPT_DELETION 2 -#define SCREVISOPT_MOVEDENTRY 3 -#define SCREVISOPT_COUNT 4 +#define SCREVISOPT_CHANGE 0 +#define SCREVISOPT_INSERTION 1 +#define SCREVISOPT_DELETION 2 +#define SCREVISOPT_MOVEDENTRY 3 +#define SCREVISOPT_COUNT 4 -#define CFGPATH_CONTENT "Office.Calc/Content/Update" +#define CFGPATH_CONTENT "Office.Calc/Content/Update" -#define SCCONTENTOPT_LINK 0 -#define SCCONTENTOPT_COUNT 1 +#define SCCONTENTOPT_LINK 0 +#define SCCONTENTOPT_COUNT 1 -#define CFGPATH_SORTLIST "Office.Calc/SortList" +#define CFGPATH_SORTLIST "Office.Calc/SortList" -#define SCSORTLISTOPT_LIST 0 -#define SCSORTLISTOPT_COUNT 1 +#define SCSORTLISTOPT_LIST 0 +#define SCSORTLISTOPT_COUNT 1 -#define CFGPATH_MISC "Office.Calc/Misc" +#define CFGPATH_MISC "Office.Calc/Misc" -#define SCMISCOPT_DEFOBJWIDTH 0 -#define SCMISCOPT_DEFOBJHEIGHT 1 +#define SCMISCOPT_DEFOBJWIDTH 0 +#define SCMISCOPT_DEFOBJHEIGHT 1 #define SCMISCOPT_SHOWSHAREDDOCWARN 2 -#define SCMISCOPT_COUNT 3 +#define SCMISCOPT_COUNT 3 Sequence<OUString> ScAppCfg::GetLayoutPropertyNames() { static const char* aPropNames[] = { - "Other/MeasureUnit/NonMetric", // SCLAYOUTOPT_MEASURE - "Other/StatusbarFunction", // SCLAYOUTOPT_STATUSBAR - "Zoom/Value", // SCLAYOUTOPT_ZOOMVAL + "Other/MeasureUnit/NonMetric", // SCLAYOUTOPT_MEASURE + "Other/StatusbarFunction", // SCLAYOUTOPT_STATUSBAR + "Zoom/Value", // SCLAYOUTOPT_ZOOMVAL "Zoom/Type", // SCLAYOUTOPT_ZOOMTYPE "Zoom/Synchronize" // SCLAYOUTOPT_SYNCZOOM }; @@ -307,7 +307,7 @@ Sequence<OUString> ScAppCfg::GetLayoutPropertyNames() for(int i = 0; i < SCLAYOUTOPT_COUNT; i++) pNames[i] = OUString::createFromAscii(aPropNames[i]); - // adjust for metric system + // adjust for metric system if (ScOptionsUtil::IsMetricSystem()) pNames[SCLAYOUTOPT_MEASURE] = OUString::createFromAscii( "Other/MeasureUnit/Metric" ); @@ -318,9 +318,9 @@ Sequence<OUString> ScAppCfg::GetInputPropertyNames() { static const char* aPropNames[] = { - "LastFunctions", // SCINPUTOPT_LASTFUNCS - "AutoInput", // SCINPUTOPT_AUTOINPUT - "DetectiveAuto" // SCINPUTOPT_DET_AUTO + "LastFunctions", // SCINPUTOPT_LASTFUNCS + "AutoInput", // SCINPUTOPT_AUTOINPUT + "DetectiveAuto" // SCINPUTOPT_DET_AUTO }; Sequence<OUString> aNames(SCINPUTOPT_COUNT); OUString* pNames = aNames.getArray(); @@ -334,10 +334,10 @@ Sequence<OUString> ScAppCfg::GetRevisionPropertyNames() { static const char* aPropNames[] = { - "Change", // SCREVISOPT_CHANGE - "Insertion", // SCREVISOPT_INSERTION - "Deletion", // SCREVISOPT_DELETION - "MovedEntry" // SCREVISOPT_MOVEDENTRY + "Change", // SCREVISOPT_CHANGE + "Insertion", // SCREVISOPT_INSERTION + "Deletion", // SCREVISOPT_DELETION + "MovedEntry" // SCREVISOPT_MOVEDENTRY }; Sequence<OUString> aNames(SCREVISOPT_COUNT); OUString* pNames = aNames.getArray(); @@ -351,7 +351,7 @@ Sequence<OUString> ScAppCfg::GetContentPropertyNames() { static const char* aPropNames[] = { - "Link" // SCCONTENTOPT_LINK + "Link" // SCCONTENTOPT_LINK }; Sequence<OUString> aNames(SCCONTENTOPT_COUNT); OUString* pNames = aNames.getArray(); @@ -365,7 +365,7 @@ Sequence<OUString> ScAppCfg::GetSortListPropertyNames() { static const char* aPropNames[] = { - "List" // SCSORTLISTOPT_LIST + "List" // SCSORTLISTOPT_LIST }; Sequence<OUString> aNames(SCSORTLISTOPT_COUNT); OUString* pNames = aNames.getArray(); @@ -379,7 +379,7 @@ Sequence<OUString> ScAppCfg::GetMiscPropertyNames() { static const char* aPropNames[] = { - "DefaultObjectSize/Width", // SCMISCOPT_DEFOBJWIDTH + "DefaultObjectSize/Width", // SCMISCOPT_DEFOBJWIDTH "DefaultObjectSize/Height", // SCMISCOPT_DEFOBJHEIGHT "SharedDocument/ShowWarning" // SCMISCOPT_SHOWSHAREDDOCWARN }; diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index bf89efebeaa5..dc3072b6c8c3 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,23 +56,23 @@ const sal_Char *linker_dummy = ""; -// Standard-Name ist jetzt STR_STYLENAME_STANDARD (wie Vorlagen) +// Standard-Name ist jetzt STR_STYLENAME_STANDARD (wie Vorlagen) //static const sal_Char __FAR_DATA cStandardName[] = "Standard"; static const sal_Char __FAR_DATA sAutoTblFmtName[] = "autotbl.fmt"; // bis SO5PF -const USHORT AUTOFORMAT_ID_X = 9501; -const USHORT AUTOFORMAT_ID_358 = 9601; -const USHORT AUTOFORMAT_DATA_ID_X = 9502; +const USHORT AUTOFORMAT_ID_X = 9501; +const USHORT AUTOFORMAT_ID_358 = 9601; +const USHORT AUTOFORMAT_DATA_ID_X = 9502; // ab SO5 //! in nachfolgenden Versionen muss der Betrag dieser IDs groesser sein -const USHORT AUTOFORMAT_ID_504 = 9801; -const USHORT AUTOFORMAT_DATA_ID_504 = 9802; +const USHORT AUTOFORMAT_ID_504 = 9801; +const USHORT AUTOFORMAT_DATA_ID_504 = 9802; -const USHORT AUTOFORMAT_ID_552 = 9901; -const USHORT AUTOFORMAT_DATA_ID_552 = 9902; +const USHORT AUTOFORMAT_ID_552 = 9901; +const USHORT AUTOFORMAT_DATA_ID_552 = 9902; // --- from 641 on: CJK and CTL font settings const USHORT AUTOFORMAT_ID_641 = 10001; @@ -96,13 +96,13 @@ const USHORT AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_300OVRLN; #ifdef READ_OLDVERS -const USHORT AUTOFORMAT_OLD_ID_OLD = 4201; -const USHORT AUTOFORMAT_OLD_DATA_ID = 4202; -const USHORT AUTOFORMAT_OLD_ID_NEW = 4203; +const USHORT AUTOFORMAT_OLD_ID_OLD = 4201; +const USHORT AUTOFORMAT_OLD_DATA_ID = 4202; +const USHORT AUTOFORMAT_OLD_ID_NEW = 4203; #endif -// Struct mit Versionsnummern der Items +// Struct mit Versionsnummern der Items struct ScAfVersions { @@ -221,10 +221,10 @@ void ScAfVersions::Write(SvStream& rStream) rStream << SfxInt32Item(ATTR_ROTATE_VALUE).GetVersion(SOFFICE_FILEFORMAT_40); rStream << SvxRotateModeItem(SVX_ROTATE_MODE_STANDARD,0).GetVersion(SOFFICE_FILEFORMAT_40); - rStream << (USHORT)0; // Num-Format + rStream << (USHORT)0; // Num-Format } -// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- ScAutoFormatDataField::ScAutoFormatDataField() : aFont( ATTR_FONT ), @@ -481,7 +481,7 @@ BOOL ScAutoFormatDataField::Save( SvStream& rStream ) } -// --------------------------------------------------------------------------- +// --------------------------------------------------------------------------- ScAutoFormatData::ScAutoFormatData() { @@ -890,7 +890,7 @@ BOOL ScAutoFormatData::Save(SvStream& rStream) ScAutoFormat::ScAutoFormat(USHORT nLim, USHORT nDel, BOOL bDup): ScSortedCollection (nLim, nDel, bDup), - bSaveLater (FALSE) + bSaveLater (FALSE) { // create default autoformat ScAutoFormatData* pData = new ScAutoFormatData; @@ -975,13 +975,13 @@ ScAutoFormat::ScAutoFormat(USHORT nLim, USHORT nDel, BOOL bDup): ScAutoFormat::ScAutoFormat(const ScAutoFormat& rAutoFormat) : ScSortedCollection (rAutoFormat), - bSaveLater (FALSE) + bSaveLater (FALSE) {} ScAutoFormat::~ScAutoFormat() { - // Bei Aenderungen per StarOne wird nicht sofort gespeichert, sondern zuerst nur - // das SaveLater Flag gesetzt. Wenn das Flag noch gesetzt ist, jetzt speichern. + // Bei Aenderungen per StarOne wird nicht sofort gespeichert, sondern zuerst nur + // das SaveLater Flag gesetzt. Wenn das Flag noch gesetzt ist, jetzt speichern. if (bSaveLater) Save(); @@ -1038,8 +1038,8 @@ BOOL ScAutoFormat::Load() BYTE nChrSet, nCnt; long nPos = rStream.Tell(); rStream >> nCnt >> nChrSet; -// if( 4 <= nCnt ) -// rStream >> nFileVers; +// if( 4 <= nCnt ) +// rStream >> nFileVers; if( rStream.Tell() != ULONG(nPos + nCnt) ) { DBG_ERRORFILE( "Der Header enthaelt mehr/neuere Daten" ); @@ -1052,7 +1052,7 @@ BOOL ScAutoFormat::Load() if( nVal == AUTOFORMAT_ID_358 || nVal == AUTOFORMAT_ID_X || (AUTOFORMAT_ID_504 <= nVal && nVal <= AUTOFORMAT_ID) ) { - aVersions.Load( rStream, nVal ); // Item-Versionen + aVersions.Load( rStream, nVal ); // Item-Versionen ScAutoFormatData* pData; USHORT nAnz = 0; @@ -1133,13 +1133,13 @@ BOOL ScAutoFormat::Save() // Achtung hier muss ein allgemeiner Header gespeichert werden USHORT nVal = AUTOFORMAT_ID; rStream << nVal - << (BYTE)2 // Anzahl von Zeichen des Headers incl. diesem + << (BYTE)2 // Anzahl von Zeichen des Headers incl. diesem << (BYTE)::GetSOStoreTextEncoding( gsl_getSystemTextEncoding(), sal::static_int_cast<USHORT>(rStream.GetVersion()) ); -// << (BYTE)4 // Anzahl von Zeichen des Headers incl. diesem -// << (BYTE)::GetStoreCharSet(::GetSystemCharSet()) -// << (UNIT16)SOFFICE_FILEFORMAT_NOW; - ScAfVersions::Write(rStream); // Item-Versionen +// << (BYTE)4 // Anzahl von Zeichen des Headers incl. diesem +// << (BYTE)::GetStoreCharSet(::GetSystemCharSet()) +// << (UNIT16)SOFFICE_FILEFORMAT_NOW; + ScAfVersions::Write(rStream); // Item-Versionen bRet = (rStream.GetError() == 0); //----------------------------------------------------------- @@ -1157,7 +1157,7 @@ BOOL ScAutoFormat::Save() USHORT ScAutoFormat::FindIndexPerName( const String& rName ) const { - String aName; + String aName; for( USHORT i=0; i<nCount ; i++ ) { diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx index 0c3c7e8b20b3..808776ff7cd5 100644 --- a/sc/source/core/tool/callform.cxx +++ b/sc/source/core/tool/callform.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,32 +70,32 @@ typedef void (CALLTYPE* SetLanguagePtr)( USHORT& nLanguage ); typedef void (CALLTYPE* GetParamDesc) (USHORT& nNo, USHORT& nParam, sal_Char* pName, sal_Char* pDesc ); -typedef void (CALLTYPE* IsAsync) ( USHORT& nNo, - ParamType* peType ); -typedef void (CALLTYPE* Advice) ( USHORT& nNo, - AdvData& pfCallback ); -typedef void (CALLTYPE* Unadvice)( double& nHandle ); +typedef void (CALLTYPE* IsAsync) ( USHORT& nNo, + ParamType* peType ); +typedef void (CALLTYPE* Advice) ( USHORT& nNo, + AdvData& pfCallback ); +typedef void (CALLTYPE* Unadvice)( double& nHandle ); typedef void (CALLTYPE* FARPROC) ( void ); } #if defined(OS2) && defined(BLC) -#define GETFUNCTIONCOUNT "_GetFunctionCount" -#define GETFUNCTIONDATA "_GetFunctionData" -#define SETLANGUAGE "_SetLanguage" -#define GETPARAMDESC "_GetParameterDescription" -#define ISASYNC "_IsAsync" -#define ADVICE "_Advice" -#define UNADVICE "_Unadvice" +#define GETFUNCTIONCOUNT "_GetFunctionCount" +#define GETFUNCTIONDATA "_GetFunctionData" +#define SETLANGUAGE "_SetLanguage" +#define GETPARAMDESC "_GetParameterDescription" +#define ISASYNC "_IsAsync" +#define ADVICE "_Advice" +#define UNADVICE "_Unadvice" #else // Pascal oder extern "C" -#define GETFUNCTIONCOUNT "GetFunctionCount" -#define GETFUNCTIONDATA "GetFunctionData" -#define SETLANGUAGE "SetLanguage" -#define GETPARAMDESC "GetParameterDescription" -#define ISASYNC "IsAsync" -#define ADVICE "Advice" -#define UNADVICE "Unadvice" +#define GETFUNCTIONCOUNT "GetFunctionCount" +#define GETFUNCTIONDATA "GetFunctionData" +#define SETLANGUAGE "SetLanguage" +#define GETPARAMDESC "GetParameterDescription" +#define ISASYNC "IsAsync" +#define ADVICE "Advice" +#define UNADVICE "Unadvice" #endif #define LIBFUNCNAME( name ) \ @@ -104,12 +104,12 @@ typedef void (CALLTYPE* FARPROC) ( void ); //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= FuncData::FuncData(const String& rIName) : - pModuleData (NULL), + pModuleData (NULL), aInternalName (rIName), -// aFuncName (""), - nNumber (0), - nParamCount (0), - eAsyncType (NONE) +// aFuncName (""), + nNumber (0), + nParamCount (0), + eAsyncType (NONE) { for (USHORT i = 0; i < MAXFUNCPARAM; i++) eParamType[i] = PTR_DOUBLE; @@ -118,18 +118,18 @@ FuncData::FuncData(const String& rIName) : //------------------------------------------------------------------------ FuncData::FuncData(const ModuleData*pModule, - const String& rIName, - const String& rFName, - USHORT nNo, - USHORT nCount, + const String& rIName, + const String& rFName, + USHORT nNo, + USHORT nCount, const ParamType* peType, ParamType eType) : - pModuleData (pModule), + pModuleData (pModule), aInternalName (rIName), - aFuncName (rFName), - nNumber (nNo), - nParamCount (nCount), - eAsyncType (eType) + aFuncName (rFName), + nNumber (nNo), + nParamCount (nCount), + eAsyncType (eType) { for (USHORT i = 0; i < MAXFUNCPARAM; i++) eParamType[i] = peType[i]; @@ -139,12 +139,12 @@ FuncData::FuncData(const ModuleData*pModule, FuncData::FuncData(const FuncData& rData) : ScDataObject(), - pModuleData (rData.pModuleData), + pModuleData (rData.pModuleData), aInternalName (rData.aInternalName), - aFuncName (rData.aFuncName), - nNumber (rData.nNumber), - nParamCount (rData.nParamCount), - eAsyncType (rData.eAsyncType) + aFuncName (rData.aFuncName), + nNumber (rData.nNumber), + nParamCount (rData.nParamCount), + eAsyncType (rData.eAsyncType) { for (USHORT i = 0; i < MAXFUNCPARAM; i++) eParamType[i] = rData.eParamType[i]; @@ -170,17 +170,17 @@ BOOL FuncCollection::SearchFunc( const String& rName, USHORT& rIndex ) const class ModuleData : public ScDataObject { friend class ModuleCollection; - String aName; + String aName; osl::Module* pInstance; public: ModuleData(const String& rStr, osl::Module* pInst) : aName (rStr), pInstance (pInst) {} ModuleData(const ModuleData& rData) : ScDataObject(), aName (rData.aName) {pInstance = new osl::Module(aName);} ~ModuleData() { delete pInstance; } - virtual ScDataObject* Clone() const { return new ModuleData(*this); } + virtual ScDataObject* Clone() const { return new ModuleData(*this); } - const String& GetName() const { return aName; } + const String& GetName() const { return aName; } osl::Module* GetInstance() const { return pInstance; } - void FreeInstance() { delete pInstance; pInstance = 0; } + void FreeInstance() { delete pInstance; pInstance = 0; } }; //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -190,10 +190,10 @@ public: ModuleCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE) : ScSortedCollection ( nLim, nDel, bDup ) {} ModuleCollection(const ModuleCollection& rModuleCollection) : ScSortedCollection ( rModuleCollection ) {} - virtual ScDataObject* Clone() const { return new ModuleCollection(*this); } - ModuleData* operator[]( const USHORT nIndex) const {return (ModuleData*)At(nIndex);} - virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const; - BOOL SearchModule( const String& rName, + virtual ScDataObject* Clone() const { return new ModuleCollection(*this); } + ModuleData* operator[]( const USHORT nIndex) const {return (ModuleData*)At(nIndex);} + virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const; + BOOL SearchModule( const String& rName, const ModuleData*& rpModule ) const; }; @@ -452,7 +452,7 @@ BOOL FuncData::GetParamDesc( String& aName, String& aDesc, USHORT nParam ) sal_Char pcName[256]; sal_Char pcDesc[256]; *pcName = *pcDesc = 0; - USHORT nFuncNo = nNumber; // nicht per Reference versauen lassen.. + USHORT nFuncNo = nNumber; // nicht per Reference versauen lassen.. ((::GetParamDesc)fProc)( nFuncNo, nParam, pcName, pcDesc ); aName = String( pcName, osl_getThreadTextEncoding() ); aDesc = String( pcDesc, osl_getThreadTextEncoding() ); diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx index 62e00a15d9d6..113b4fd1f16a 100644 --- a/sc/source/core/tool/cellform.cxx +++ b/sc/source/core/tool/cellform.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -102,7 +102,7 @@ void ScCellFormat::GetString( ScBaseCell* pCell, ULONG nFormat, String& rString, break; case CELLTYPE_FORMULA: { - ScFormulaCell* pFCell = (ScFormulaCell*)pCell; + ScFormulaCell* pFCell = (ScFormulaCell*)pCell; if ( bFormula ) pFCell->GetFormula( rString ); else diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx index 466457cf5651..f201dc4aaef9 100644 --- a/sc/source/core/tool/cellkeytranslator.cxx +++ b/sc/source/core/tool/cellkeytranslator.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -81,7 +81,7 @@ ScCellKeyword::ScCellKeyword(const sal_Char* pName, OpCode eOpCode, const Locale ::std::auto_ptr<ScCellKeywordTranslator> ScCellKeywordTranslator::spInstance(NULL); -static void lclMatchKeyword(String& rName, const ScCellKeywordHashMap& aMap, +static void lclMatchKeyword(String& rName, const ScCellKeywordHashMap& aMap, OpCode eOpCode = ocNone, const Locale* pLocale = NULL) { ScCellKeywordHashMap::const_iterator itrEnd = aMap.end(); @@ -174,7 +174,7 @@ void ScCellKeywordTranslator::transKeyword(String& rName, const Locale* pLocale, } ScCellKeywordTranslator::ScCellKeywordTranslator() : - maTransWrapper( ::comphelper::getProcessServiceFactory(), + maTransWrapper( ::comphelper::getProcessServiceFactory(), i18n::TransliterationModules_LOWERCASE_UPPERCASE ) { init(); @@ -198,11 +198,11 @@ void ScCellKeywordTranslator::init() // The file below has been autogenerated by sc/workben/celltrans/parse.py. // To add new locale keywords, edit sc/workben/celltrans/keywords_utf16.txt // and re-run the parse.py script. - // - // All keywords must be uppercase, and the mapping must be from the + // + // All keywords must be uppercase, and the mapping must be from the // localized keyword to the English keyword. - // - // Make sure that the original keyword file (keywords_utf16.txt) is + // + // Make sure that the original keyword file (keywords_utf16.txt) is // encoded in UCS-2/UTF-16! #include "cellkeywords.inl" diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx index 691e05d6d0e1..027d2f09b54d 100644 --- a/sc/source/core/tool/chartarr.cxx +++ b/sc/source/core/tool/chartarr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,7 +36,7 @@ #include "scitems.hxx" #include <svl/intitem.hxx> #include <svl/zforlist.hxx> -#include <float.h> // DBL_MIN +#include <float.h> // DBL_MIN #include "chartarr.hxx" #include "document.hxx" @@ -141,7 +141,7 @@ ScMemChart* ScChartArray::CreateMemChart() return CreateMemChartSingle(); } else - return CreateMemChartMulti(); // kann 0 Range besser ab als Single + return CreateMemChartMulti(); // kann 0 Range besser ab als Single } ScMemChart* ScChartArray::CreateMemChartSingle() @@ -150,7 +150,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle() SCSIZE nRow; // - // wirkliche Groesse (ohne versteckte Zeilen/Spalten) + // wirkliche Groesse (ohne versteckte Zeilen/Spalten) // SCCOL nColAdd = HasRowHeaders() ? 1 : 0; @@ -165,7 +165,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle() ScRangeListRef aRangeListRef(GetRangeList()); aRangeListRef->First()->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ); - SCCOL nStrCol = nCol1; // fuer Beschriftung merken + SCCOL nStrCol = nCol1; // fuer Beschriftung merken SCROW nStrRow = nRow1; // Skip hidden columns. // TODO: make use of last column value once implemented. @@ -241,15 +241,15 @@ ScMemChart* ScChartArray::CreateMemChartSingle() } // - // Daten + // Daten // ScMemChart* pMemChart = new ScMemChart( static_cast<short>(nColCount), static_cast<short>(nRowCount) ); if (pMemChart) { -// SvNumberFormatter* pFormatter = pDocument->GetFormatTable(); -// pMemChart->SetNumberFormatter( pFormatter ); +// SvNumberFormatter* pFormatter = pDocument->GetFormatTable(); +// pMemChart->SetNumberFormatter( pFormatter ); if ( bValidData ) { BOOL bCalcAsShown = pDocument->GetDocOptions().IsCalcAsShown(); @@ -258,7 +258,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle() { for (nRow=0; nRow<nRowCount; nRow++) { - double nVal = DBL_MIN; // Hack fuer Chart, um leere Zellen zu erkennen + double nVal = DBL_MIN; // Hack fuer Chart, um leere Zellen zu erkennen pDocument->GetCell( aCols[nCol], aRows[nRow], nTab1, pCell ); if (pCell) @@ -288,7 +288,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle() } else { - //! Flag, dass Daten ungueltig ?? + //! Flag, dass Daten ungueltig ?? for (nCol=0; nCol<nColCount; nCol++) for (nRow=0; nRow<nRowCount; nRow++) @@ -296,7 +296,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle() } // - // Spalten-Header + // Spalten-Header // for (nCol=0; nCol<nColCount; nCol++) @@ -317,11 +317,11 @@ ScMemChart* ScChartArray::CreateMemChartSingle() // ULONG nNumberAttr = (nTotalRows ? pDocument->GetNumberFormat( // ScAddress( pCols[nCol], nRow1, nTab1)) : 0); -// pMemChart->SetNumFormatIdCol( static_cast<long>(nCol), nNumberAttr ); +// pMemChart->SetNumFormatIdCol( static_cast<long>(nCol), nNumberAttr ); } // - // Zeilen-Header + // Zeilen-Header // for (nRow=0; nRow<nRowCount; nRow++) @@ -342,31 +342,31 @@ ScMemChart* ScChartArray::CreateMemChartSingle() // ULONG nNumberAttr = (nTotalCols ? pDocument->GetNumberFormat( // ScAddress( nCol1, pRows[nRow], nTab1)) : 0); -// pMemChart->SetNumFormatIdRow( static_cast<long>(nRow), nNumberAttr ); +// pMemChart->SetNumFormatIdRow( static_cast<long>(nRow), nNumberAttr ); } // // Titel // -// pMemChart->SetMainTitle(ScGlobal::GetRscString(STR_CHART_MAINTITLE)); -// pMemChart->SetSubTitle(ScGlobal::GetRscString(STR_CHART_SUBTITLE)); -// pMemChart->SetXAxisTitle(ScGlobal::GetRscString(STR_CHART_XTITLE)); -// pMemChart->SetYAxisTitle(ScGlobal::GetRscString(STR_CHART_YTITLE)); -// pMemChart->SetZAxisTitle(ScGlobal::GetRscString(STR_CHART_ZTITLE)); +// pMemChart->SetMainTitle(ScGlobal::GetRscString(STR_CHART_MAINTITLE)); +// pMemChart->SetSubTitle(ScGlobal::GetRscString(STR_CHART_SUBTITLE)); +// pMemChart->SetXAxisTitle(ScGlobal::GetRscString(STR_CHART_XTITLE)); +// pMemChart->SetYAxisTitle(ScGlobal::GetRscString(STR_CHART_YTITLE)); +// pMemChart->SetZAxisTitle(ScGlobal::GetRscString(STR_CHART_ZTITLE)); // - // Zahlen-Typ + // Zahlen-Typ // // ULONG nNumberAttr = (nTotalCols && nTotalRows ? // pDocument->GetNumberFormat( ScAddress( nCol1, nRow1, nTab1)) : // 0); -// if (pFormatter) -// pMemChart->SetDataType(pFormatter->GetType( nNumberAttr )); +// if (pFormatter) +// pMemChart->SetDataType(pFormatter->GetType( nNumberAttr )); // - // Parameter-Strings + // Parameter-Strings // // SetExtraStrings( *pMemChart ); @@ -403,14 +403,14 @@ ScMemChart* ScChartArray::CreateMemChartMulti() } // - // Daten + // Daten // ScMemChart* pMemChart = new ScMemChart( static_cast<short>(nColCount), static_cast<short>(nRowCount) ); if (pMemChart) { -// pMemChart->SetNumberFormatter( pDocument->GetFormatTable() ); +// pMemChart->SetNumberFormatter( pDocument->GetFormatTable() ); BOOL bCalcAsShown = pDocument->GetDocOptions().IsCalcAsShown(); ULONG nIndex = 0; if (bValidData) @@ -419,10 +419,10 @@ ScMemChart* ScChartArray::CreateMemChartMulti() { for ( nRow = 0; nRow < nRowCount; nRow++, nIndex++ ) { - double nVal = DBL_MIN; // Hack fuer Chart, um leere Zellen zu erkennen + double nVal = DBL_MIN; // Hack fuer Chart, um leere Zellen zu erkennen const ScAddress* pPos = GetPositionMap()->GetPosition( nIndex ); if ( pPos ) - { // sonst: Luecke + { // sonst: Luecke ScBaseCell* pCell = pDocument->GetCell( *pPos ); if (pCell) { @@ -452,10 +452,10 @@ ScMemChart* ScChartArray::CreateMemChartMulti() { for ( nRow = 0; nRow < nRowCount; nRow++, nIndex++ ) { - double nVal = DBL_MIN; // Hack fuer Chart, um leere Zellen zu erkennen + double nVal = DBL_MIN; // Hack fuer Chart, um leere Zellen zu erkennen const ScAddress* pPos = GetPositionMap()->GetPosition( nIndex ); if ( pPos ) - { // sonst: Luecke + { // sonst: Luecke ScBaseCell* pCell = pDocument->GetCell( *pPos ); if (pCell) { @@ -484,7 +484,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti() //2do: Beschriftung bei Luecken // - // Spalten-Header + // Spalten-Header // SCCOL nPosCol = 0; @@ -510,15 +510,15 @@ ScMemChart* ScChartArray::CreateMemChartMulti() } pMemChart->SetColText( static_cast<short>(nCol), aString); -// ULONG nNumberAttr = 0; -// pPos = GetPositionMap()->GetPosition( nCol, 0 ); -// if ( pPos ) -// nNumberAttr = pDocument->GetNumberFormat( *pPos ); -// pMemChart->SetNumFormatIdCol( static_cast<long>(nCol), nNumberAttr ); +// ULONG nNumberAttr = 0; +// pPos = GetPositionMap()->GetPosition( nCol, 0 ); +// if ( pPos ) +// nNumberAttr = pDocument->GetNumberFormat( *pPos ); +// pMemChart->SetNumFormatIdCol( static_cast<long>(nCol), nNumberAttr ); } // - // Zeilen-Header + // Zeilen-Header // SCROW nPosRow = 0; @@ -543,43 +543,43 @@ ScMemChart* ScChartArray::CreateMemChartMulti() } pMemChart->SetRowText( static_cast<short>(nRow), aString); -// ULONG nNumberAttr = 0; -// pPos = GetPositionMap()->GetPosition( 0, nRow ); -// if ( pPos ) -// nNumberAttr = pDocument->GetNumberFormat( *pPos ); -// pMemChart->SetNumFormatIdRow( static_cast<long>(nRow), nNumberAttr ); +// ULONG nNumberAttr = 0; +// pPos = GetPositionMap()->GetPosition( 0, nRow ); +// if ( pPos ) +// nNumberAttr = pDocument->GetNumberFormat( *pPos ); +// pMemChart->SetNumFormatIdRow( static_cast<long>(nRow), nNumberAttr ); } // // Titel // -// pMemChart->SetMainTitle(ScGlobal::GetRscString(STR_CHART_MAINTITLE)); -// pMemChart->SetSubTitle(ScGlobal::GetRscString(STR_CHART_SUBTITLE)); -// pMemChart->SetXAxisTitle(ScGlobal::GetRscString(STR_CHART_XTITLE)); -// pMemChart->SetYAxisTitle(ScGlobal::GetRscString(STR_CHART_YTITLE)); -// pMemChart->SetZAxisTitle(ScGlobal::GetRscString(STR_CHART_ZTITLE)); +// pMemChart->SetMainTitle(ScGlobal::GetRscString(STR_CHART_MAINTITLE)); +// pMemChart->SetSubTitle(ScGlobal::GetRscString(STR_CHART_SUBTITLE)); +// pMemChart->SetXAxisTitle(ScGlobal::GetRscString(STR_CHART_XTITLE)); +// pMemChart->SetYAxisTitle(ScGlobal::GetRscString(STR_CHART_YTITLE)); +// pMemChart->SetZAxisTitle(ScGlobal::GetRscString(STR_CHART_ZTITLE)); // - // Zahlen-Typ + // Zahlen-Typ // -// SvNumberFormatter* pFormatter = pDocument->GetFormatTable(); -// if (pFormatter) -// { -// ULONG nIndex = 0; -// ULONG nCount = GetPositionMap()->GetCount(); -// const ScAddress* pPos; -// do -// { -// pPos = GetPositionMap()->GetPosition( nIndex ); -// } while ( !pPos && ++nIndex < nCount ); -// ULONG nFormat = ( pPos ? pDocument->GetNumberFormat( *pPos ) : 0 ); -// pMemChart->SetDataType( pFormatter->GetType( nFormat ) ); -// } +// SvNumberFormatter* pFormatter = pDocument->GetFormatTable(); +// if (pFormatter) +// { +// ULONG nIndex = 0; +// ULONG nCount = GetPositionMap()->GetCount(); +// const ScAddress* pPos; +// do +// { +// pPos = GetPositionMap()->GetPosition( nIndex ); +// } while ( !pPos && ++nIndex < nCount ); +// ULONG nFormat = ( pPos ? pDocument->GetNumberFormat( *pPos ) : 0 ); +// pMemChart->SetDataType( pFormatter->GetType( nFormat ) ); +// } // - // Parameter-Strings + // Parameter-Strings // // SetExtraStrings( *pMemChart ); @@ -594,10 +594,10 @@ ScMemChart* ScChartArray::CreateMemChartMulti() // -// Collection +// Collection // -ScDataObject* ScChartCollection::Clone() const +ScDataObject* ScChartCollection::Clone() const { return new ScChartCollection(*this); } diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx index 19b9e4099be3..a6b3e724a3aa 100644 --- a/sc/source/core/tool/charthelper.cxx +++ b/sc/source/core/tool/charthelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -95,7 +95,7 @@ USHORT lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCha BOOL lcl_AdjustRanges( ScRangeList& rRanges, SCTAB nSourceTab, SCTAB nDestTab, SCTAB nTabCount ) { - //! if multiple sheets are copied, update references into the other copied sheets? + //! if multiple sheets are copied, update references into the other copied sheets? BOOL bChanged = FALSE; @@ -261,7 +261,7 @@ void ScChartHelper::SetChartRanges( const uno::Reference< chart2::XChartDocument // the range string must be in Calc A1 format. uno::Reference< chart2::data::XDataSequence > xNewSeq( xDataProvider->createDataSequenceByRangeRepresentation( rRanges[nRange++] )); - + uno::Reference< beans::XPropertySet > xNewProps( xNewSeq, uno::UNO_QUERY ); if( xNewProps.is() ) xNewProps->setPropertyValue( aPropertyNameRole, xLabel->getPropertyValue( aPropertyNameRole ) ); @@ -277,7 +277,7 @@ void ScChartHelper::SetChartRanges( const uno::Reference< chart2::XChartDocument // the range string must be in Calc A1 format. uno::Reference< chart2::data::XDataSequence > xNewSeq( xDataProvider->createDataSequenceByRangeRepresentation( rRanges[nRange++] )); - + uno::Reference< beans::XPropertySet > xNewProps( xNewSeq, uno::UNO_QUERY ); if( xNewProps.is() ) xNewProps->setPropertyValue( aPropertyNameRole, xValues->getPropertyValue( aPropertyNameRole ) ); diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx index 15489babda4f..f3aa255b5b58 100644 --- a/sc/source/core/tool/chartlis.cxx +++ b/sc/source/core/tool/chartlis.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,7 +47,7 @@ using ::std::unary_function; using ::std::for_each; //2do: DocOption TimeOut? -//#define SC_CHARTTIMEOUT 1000 // eine Sekunde keine Aenderung/KeyEvent +//#define SC_CHARTTIMEOUT 1000 // eine Sekunde keine Aenderung/KeyEvent // Update chart listeners quickly, to get a similar behavior to loaded charts // which register UNO listeners. @@ -58,8 +58,8 @@ using ::std::for_each; class ScChartUnoData { - uno::Reference< chart::XChartDataChangeEventListener > xListener; - uno::Reference< chart::XChartData > xSource; + uno::Reference< chart::XChartDataChangeEventListener > xListener; + uno::Reference< chart::XChartData > xSource; public: ScChartUnoData( const uno::Reference< chart::XChartDataChangeEventListener >& rL, @@ -67,8 +67,8 @@ public: xListener( rL ), xSource( rS ) {} ~ScChartUnoData() {} - const uno::Reference< chart::XChartDataChangeEventListener >& GetListener() const { return xListener; } - const uno::Reference< chart::XChartData >& GetSource() const { return xSource; } + const uno::Reference< chart::XChartDataChangeEventListener >& GetListener() const { return xListener; } + const uno::Reference< chart::XChartData >& GetSource() const { return xSource; } }; @@ -96,7 +96,7 @@ void ScChartListener::ExternalRefListener::notify(sal_uInt16 nFileId, ScExternal case ScExternalRefManager::LINK_MODIFIED: { if (maFileIds.count(nFileId)) - // We are listening to this external document. Send an update + // We are listening to this external document. Send an update // requst to the chart. mrParent.SetUpdateQueue(); } @@ -128,8 +128,8 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP, const ScRange& rRange ) : StrData( rName ), SvtListener(), - mpExtRefListener(NULL), - mpTokens(new vector<ScSharedTokenRef>), + mpExtRefListener(NULL), + mpTokens(new vector<ScSharedTokenRef>), pUnoData( NULL ), pDoc( pDocP ), bUsed( FALSE ), @@ -143,8 +143,8 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP, const ScRangeListRef& rRangeList ) : StrData( rName ), SvtListener(), - mpExtRefListener(NULL), - mpTokens(new vector<ScSharedTokenRef>), + mpExtRefListener(NULL), + mpTokens(new vector<ScSharedTokenRef>), pUnoData( NULL ), pDoc( pDocP ), bUsed( FALSE ), @@ -157,7 +157,7 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP, ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP, vector<ScSharedTokenRef>* pTokens ) : StrData( rName ), SvtListener(), - mpExtRefListener(NULL), + mpExtRefListener(NULL), mpTokens(pTokens), pUnoData( NULL ), pDoc( pDocP ), @@ -170,7 +170,7 @@ ScChartListener::ScChartListener( const String& rName, ScDocument* pDocP, vector ScChartListener::ScChartListener( const ScChartListener& r ) : StrData( r ), SvtListener(), - mpExtRefListener(NULL), + mpExtRefListener(NULL), mpTokens(new vector<ScSharedTokenRef>(*r.mpTokens)), pUnoData( NULL ), pDoc( r.pDoc ), @@ -183,7 +183,7 @@ ScChartListener::ScChartListener( const ScChartListener& r ) : if (r.mpExtRefListener.get()) { - // Re-register this new listener for the files that the old listener + // Re-register this new listener for the files that the old listener // was listening to. ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager(); @@ -224,7 +224,7 @@ void ScChartListener::SetUno( const uno::Reference< chart::XChartDataChangeEventListener >& rListener, const uno::Reference< chart::XChartData >& rSource ) { -// DBG_ASSERT( rListener.is() && rSource.is(), "Nullpointer bei SetUno" ); +// DBG_ASSERT( rListener.is() && rSource.is(), "Nullpointer bei SetUno" ); delete pUnoData; pUnoData = new ScChartUnoData( rListener, rSource ); } @@ -253,7 +253,7 @@ void ScChartListener::Notify( SvtBroadcaster&, const SfxHint& rHint ) void ScChartListener::Update() { if ( pDoc->IsInInterpreter() ) - { // #73482# If interpreting do nothing and restart timer so we don't + { // #73482# If interpreting do nothing and restart timer so we don't // interfere with interpreter and don't produce an Err522 or similar. // This may happen if we are rescheduled via Basic function. pDoc->GetChartListenerCollection()->StartTimer(); @@ -262,7 +262,7 @@ void ScChartListener::Update() if ( pUnoData ) { bDirty = FALSE; - //! irgendwann mal erkennen, was sich innerhalb des Charts geaendert hat + //! irgendwann mal erkennen, was sich innerhalb des Charts geaendert hat chart::ChartDataChangeEvent aEvent( pUnoData->GetSource(), chart::ChartDataChangeType_ALL, 0, 0, 0, 0 ); @@ -441,7 +441,7 @@ BOOL ScChartListener::operator==( const ScChartListener& r ) bool b1 = (mpTokens.get() && !mpTokens->empty()); bool b2 = (r.mpTokens.get() && !r.mpTokens->empty()); - if (pDoc != r.pDoc || bUsed != r.bUsed || bDirty != r.bDirty || + if (pDoc != r.pDoc || bUsed != r.bUsed || bDirty != r.bDirty || bSeriesRangesScheduled != r.bSeriesRangesScheduled || GetString() != r.GetString() || b1 != b2) return false; @@ -488,15 +488,15 @@ ScChartListenerCollection::ScChartListenerCollection( ScChartListenerCollection::~ScChartListenerCollection() { - // #96783# remove ChartListener objects before aTimer dtor is called, because - // ScChartListener::EndListeningTo may cause ScChartListenerCollection::StartTimer - // to be called if an empty ScNoteCell is deleted + // #96783# remove ChartListener objects before aTimer dtor is called, because + // ScChartListener::EndListeningTo may cause ScChartListenerCollection::StartTimer + // to be called if an empty ScNoteCell is deleted if (GetCount()) FreeAll(); } -ScDataObject* ScChartListenerCollection::Clone() const +ScDataObject* ScChartListenerCollection::Clone() const { return new ScChartListenerCollection( *this ); } @@ -537,8 +537,8 @@ void ScChartListenerCollection::FreeUnused() for ( USHORT nIndex = nCount; nIndex-- >0; ) { ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ]; - // Uno-Charts nicht rauskicken - // (werden per FreeUno von aussen geloescht) + // Uno-Charts nicht rauskicken + // (werden per FreeUno von aussen geloescht) if ( !pCL->IsUno() ) { if ( pCL->IsUsed() ) @@ -562,7 +562,7 @@ void ScChartListenerCollection::FreeUno( const uno::Reference< chart::XChartData { Free( pCL ); } - //! sollte nur einmal vorkommen? + //! sollte nur einmal vorkommen? } } @@ -591,7 +591,7 @@ void ScChartListenerCollection::UpdateDirtyCharts() if ( pCL->IsDirty() ) pCL->Update(); if ( aTimer.IsActive() && !pDoc->IsImportingXML()) - break; // da kam einer dazwischen + break; // da kam einer dazwischen } } @@ -616,7 +616,7 @@ void ScChartListenerCollection::SetDiffDirty( ScChartListener* pCL = (ScChartListener*) pItems[ nIndex ]; USHORT nFound; BOOL bFound = rCmp.Search( pCL, nFound ); - if ( !bFound || (*pCL != *((const ScChartListener*) rCmp.pItems[ nFound ])) ) + if ( !bFound || (*pCL != *((const ScChartListener*) rCmp.pItems[ nFound ])) ) { if ( bSetChartRangeLists ) { diff --git a/sc/source/core/tool/chartlock.cxx b/sc/source/core/tool/chartlock.cxx index f73b74ff778c..78230d0373b2 100644 --- a/sc/source/core/tool/chartlock.cxx +++ b/sc/source/core/tool/chartlock.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx index f8630df4a836..bdf2e1955121 100644 --- a/sc/source/core/tool/chartpos.cxx +++ b/sc/source/core/tool/chartpos.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -113,7 +113,7 @@ void ScChartPositioner::GlueState() if ( pR->aStart.Tab() == pR->aEnd.Tab() ) eGlue = SC_CHARTGLUE_NONE; else - eGlue = SC_CHARTGLUE_COLS; // mehrere Tabellen spaltenweise + eGlue = SC_CHARTGLUE_COLS; // mehrere Tabellen spaltenweise nStartCol = pR->aStart.Col(); nStartRow = pR->aStart.Row(); } @@ -125,7 +125,7 @@ void ScChartPositioner::GlueState() } return; } -// ULONG nOldPos = aRangeListRef->GetCurPos(); +// ULONG nOldPos = aRangeListRef->GetCurPos(); pR = aRangeListRef->First(); nStartCol = pR->aStart.Col(); @@ -135,7 +135,7 @@ void ScChartPositioner::GlueState() nMaxCols = nEndCol = 0; nMaxRows = nEndRow = 0; do - { // umspannenden Bereich etc. feststellen + { // umspannenden Bereich etc. feststellen SCCOLROW nTmp, n1, n2; if ( (n1 = pR->aStart.Col()) < nStartCol ) nStartCol = static_cast<SCCOL>(n1); @@ -181,7 +181,7 @@ void ScChartPositioner::GlueState() BYTE huge* p; BYTE huge* pA = (BYTE huge*) SvMemAlloc( nCR ); if ( nCR > (ULONG)((USHORT)~0) ) - { // in 32k Bloecken initialisieren + { // in 32k Bloecken initialisieren ULONG j; for ( j=0; j<nCR; j+=0x8000 ) { @@ -199,7 +199,7 @@ void ScChartPositioner::GlueState() SCCOL nCol, nCol1, nCol2; SCROW nRow, nRow1, nRow2; for ( pR = aRangeListRef->First(); pR; pR = aRangeListRef->Next() ) - { // Selektionen 2D als belegt markieren + { // Selektionen 2D als belegt markieren nCol1 = pR->aStart.Col() - nStartCol; nCol2 = pR->aEnd.Col() - nStartCol; nRow1 = pR->aStart.Row() - nStartRow; @@ -215,16 +215,16 @@ void ScChartPositioner::GlueState() BOOL bGlueCols = FALSE; for ( nCol = 0; bGlue && nCol < nC; nCol++ ) - { // Spalten probieren durchzugehen und als frei markieren + { // Spalten probieren durchzugehen und als frei markieren p = pA + (ULONG)nCol * nR; for ( nRow = 0; bGlue && nRow < nR; nRow++, p++ ) { if ( *p == nOccu ) - { // Wenn einer mittendrin liegt ist keine Zusammenfassung + { // Wenn einer mittendrin liegt ist keine Zusammenfassung // moeglich. Am Rand koennte ok sein, wenn in dieser Spalte // in jeder belegten Zeile einer belegt ist. if ( nRow > 0 && nCol > 0 ) - bGlue = FALSE; // nCol==0 kann DummyUpperLeft sein + bGlue = FALSE; // nCol==0 kann DummyUpperLeft sein else nRow = nR; } @@ -232,22 +232,22 @@ void ScChartPositioner::GlueState() *p = nFree; } if ( bGlue && *(p = (pA + ((((ULONG)nCol+1) * nR) - 1))) == nFree ) - { // Spalte als komplett frei markieren + { // Spalte als komplett frei markieren *p = nGlue; - bGlueCols = TRUE; // mindestens eine freie Spalte + bGlueCols = TRUE; // mindestens eine freie Spalte } } BOOL bGlueRows = FALSE; for ( nRow = 0; bGlue && nRow < nR; nRow++ ) - { // Zeilen probieren durchzugehen und als frei markieren + { // Zeilen probieren durchzugehen und als frei markieren p = pA + nRow; for ( nCol = 0; bGlue && nCol < nC; nCol++, p+=nR ) { if ( *p == nOccu ) { if ( nCol > 0 && nRow > 0 ) - bGlue = FALSE; // nRow==0 kann DummyUpperLeft sein + bGlue = FALSE; // nRow==0 kann DummyUpperLeft sein else nCol = nC; } @@ -255,9 +255,9 @@ void ScChartPositioner::GlueState() *p = nFree; } if ( bGlue && *(p = (pA + ((((ULONG)nC-1) * nR) + nRow))) == nFree ) - { // Zeile als komplett frei markieren + { // Zeile als komplett frei markieren *p = nGlue; - bGlueRows = TRUE; // mindestens eine freie Zeile + bGlueRows = TRUE; // mindestens eine freie Zeile } } @@ -265,7 +265,7 @@ void ScChartPositioner::GlueState() // hinzugezogen werden p = pA + 1; for ( ULONG n = 1; bGlue && n < nCR; n++, p++ ) - { // ein unberuehrtes Feld heisst, dass es weder spaltenweise noch + { // ein unberuehrtes Feld heisst, dass es weder spaltenweise noch // zeilenweise zu erreichen war, also nichts zusamenzufassen if ( *p == nHole ) bGlue = FALSE; @@ -331,7 +331,7 @@ void ScChartPositioner::CheckColRowHeaders() pR->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ); BOOL bTopRow = (nRow1 == nStartRow); if ( bRowStrings && (bVert || nCol1 == nStartCol) ) - { // NONE oder ROWS: RowStrings in jeder Selektion moeglich + { // NONE oder ROWS: RowStrings in jeder Selektion moeglich // COLS oder BOTH: nur aus der ersten Spalte if ( nCol1 <= nCol2 ) for (iRow=nRow1; iRow<=nRow2 && bRowStrings; iRow++) @@ -341,7 +341,7 @@ void ScChartPositioner::CheckColRowHeaders() } } if ( bColStrings && bTopRow ) - { // ColStrings nur aus der ersten Zeile + { // ColStrings nur aus der ersten Zeile if ( nRow1 <= nRow2 ) for (iCol=nCol1; iCol<=nCol2 && bColStrings; iCol++) { @@ -381,7 +381,7 @@ void ScChartPositioner::CreatePositionMap() SCTAB nTab, nTab1, nTab2; // - // wirkliche Groesse (ohne versteckte Zeilen/Spalten) + // wirkliche Groesse (ohne versteckte Zeilen/Spalten) // SCSIZE nColCount = 0; @@ -408,7 +408,7 @@ void ScChartPositioner::CreatePositionMap() for ( nCol = nCol1; nCol <= nCol2; ++nCol, ++nInsCol ) { if ( bNoGlue || eGlue == SC_CHARTGLUE_ROWS ) - { // meistens gleiche Cols + { // meistens gleiche Cols if ( (pCol = (Table*) pCols->Get( nInsCol ))==NULL ) { pCols->Insert( nInsCol, pNewRowTable ); @@ -417,7 +417,7 @@ void ScChartPositioner::CreatePositionMap() } } else - { // meistens neue Cols + { // meistens neue Cols if ( pCols->Insert( nInsCol, pNewRowTable ) ) { pCol = pNewRowTable; @@ -450,7 +450,7 @@ void ScChartPositioner::CreatePositionMap() if ( (pCol = (Table*) pCols->First())!=NULL ) { if ( bDummyUpperLeft ) - pCol->Insert( 0, (void*)0 ); // Dummy fuer Beschriftung + pCol->Insert( 0, (void*)0 ); // Dummy fuer Beschriftung nRowCount = static_cast< SCSIZE >( pCol->Count()); } else @@ -461,7 +461,7 @@ void ScChartPositioner::CreatePositionMap() nRowCount -= nRowAdd; if ( nColCount==0 || nRowCount==0 ) - { // einen Eintrag ohne Daten erzeugen + { // einen Eintrag ohne Daten erzeugen pR = aRangeListRef->First(); if ( pCols->Count() > 0 ) pCol = (Table*) pCols->First(); @@ -472,7 +472,7 @@ void ScChartPositioner::CreatePositionMap() } nColCount = 1; if ( pCol->Count() > 0 ) - { // kann ja eigentlich nicht sein, wenn nColCount==0 || nRowCount==0 + { // kann ja eigentlich nicht sein, wenn nColCount==0 || nRowCount==0 pPos = (ScAddress*) pCol->First(); if ( pPos ) { @@ -489,7 +489,7 @@ void ScChartPositioner::CreatePositionMap() else { if ( bNoGlue ) - { // Luecken mit Dummies fuellen, erste Spalte ist Master + { // Luecken mit Dummies fuellen, erste Spalte ist Master Table* pFirstCol = (Table*) pCols->First(); ULONG nCount = pFirstCol->Count(); pFirstCol->First(); @@ -498,7 +498,7 @@ void ScChartPositioner::CreatePositionMap() ULONG nKey = pFirstCol->GetCurKey(); pCols->First(); while ( (pCol = (Table*) pCols->Next())!=NULL ) - pCol->Insert( nKey, (void*)0 ); // keine Daten + pCol->Insert( nKey, (void*)0 ); // keine Daten } } } @@ -506,9 +506,9 @@ void ScChartPositioner::CreatePositionMap() pPositionMap = new ScChartPositionMap( static_cast<SCCOL>(nColCount), static_cast<SCROW>(nRowCount), static_cast<SCCOL>(nColAdd), static_cast<SCROW>(nRowAdd), *pCols ); - // Aufraeumen + // Aufraeumen for ( pCol = (Table*) pCols->First(); pCol; pCol = (Table*) pCols->Next() ) - { //! nur Tables loeschen, nicht die ScAddress* + { //! nur Tables loeschen, nicht die ScAddress* delete pCol; } delete pCols; @@ -540,7 +540,7 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows, if ( nRowAdd ) pPos = (ScAddress*) pCol->Next(); if ( nColAdd ) - { // eigenstaendig + { // eigenstaendig for ( nRow = 0; nRow < nRowCount; nRow++ ) { ppRowHeader[ nRow ] = pPos; @@ -548,7 +548,7 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows, } } else - { // Kopie + { // Kopie for ( nRow = 0; nRow < nRowCount; nRow++ ) { ppRowHeader[ nRow ] = ( pPos ? new ScAddress( *pPos ) : NULL ); @@ -567,7 +567,7 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, SCROW nChartRows, pPos = (ScAddress*) pCol->First(); if ( nRowAdd ) { - ppColHeader[ nCol ] = pPos; // eigenstaendig + ppColHeader[ nCol ] = pPos; // eigenstaendig pPos = (ScAddress*) pCol->Next(); } else diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index 7ff7e4c17b49..baef1ae3529e 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,7 +31,7 @@ #include <tools/debug.hxx> -#include <tools/shl.hxx> // SHL_CALC +#include <tools/shl.hxx> // SHL_CALC #include <tools/stack.hxx> #include <tools/rtti.hxx> #include <svl/zforlist.hxx> @@ -48,8 +48,8 @@ #include "global.hxx" #include "rechead.hxx" #include "scerrors.hxx" -#include "scmod.hxx" // SC_MOD -#include "inputopt.hxx" // GetExpandRefs +#include "scmod.hxx" // SC_MOD +#include "inputopt.hxx" // GetExpandRefs #include "patattr.hxx" #include "hints.hxx" @@ -69,8 +69,8 @@ const USHORT nMemPoolChangeActionLinkEntry = (0x8000 - 64) / sizeof(ScChangeActi IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeActionLinkEntry, nMemPoolChangeActionLinkEntry, nMemPoolChangeActionLinkEntry ) // loaded MSB > eigenes => inkompatibel -#define SC_CHGTRACK_FILEFORMAT_FIRST 0x0001 -#define SC_CHGTRACK_FILEFORMAT 0x0001 +#define SC_CHGTRACK_FILEFORMAT_FIRST 0x0001 +#define SC_CHGTRACK_FILEFORMAT 0x0001 // --- ScChangeActionLinkEntry --------------------------------------------- @@ -202,7 +202,7 @@ BOOL ScChangeAction::IsClickable() const if ( eCCT == SC_CACCT_MATREF ) return FALSE; if ( eCCT == SC_CACCT_MATORG ) - { // no Accept-Select if one of the references is in a deleted col/row + { // no Accept-Select if one of the references is in a deleted col/row const ScChangeActionLinkEntry* pL = ((ScChangeActionContent*)this)->GetFirstDependentEntry(); while ( pL ) @@ -213,9 +213,9 @@ BOOL ScChangeAction::IsClickable() const pL = pL->GetNext(); } } - return TRUE; // for Select() a content doesn't have to be touchable + return TRUE; // for Select() a content doesn't have to be touchable } - return IsTouchable(); // Accept()/Reject() only on touchables + return IsTouchable(); // Accept()/Reject() only on touchables } @@ -231,8 +231,8 @@ BOOL ScChangeAction::IsRejectable() const ScChangeActionContent* pNextContent = ((ScChangeActionContent*)this)->GetNextContent(); if ( pNextContent == NULL ) - return TRUE; // *this is TopContent - return pNextContent->IsRejected(); // *this is next rejectable + return TRUE; // *this is TopContent + return pNextContent->IsRejected(); // *this is next rejectable } return IsTouchable(); } @@ -250,8 +250,8 @@ BOOL ScChangeAction::IsInternalRejectable() const ScChangeActionContent* pNextContent = ((ScChangeActionContent*)this)->GetNextContent(); if ( pNextContent == NULL ) - return TRUE; // *this is TopContent - return pNextContent->IsRejected(); // *this is next rejectable + return TRUE; // *this is TopContent + return pNextContent->IsRejected(); // *this is next rejectable } return IsTouchable(); } @@ -259,7 +259,7 @@ BOOL ScChangeAction::IsInternalRejectable() const BOOL ScChangeAction::IsDialogRoot() const { - return IsInternalRejectable(); // only rejectables in root + return IsInternalRejectable(); // only rejectables in root } @@ -321,7 +321,7 @@ void ScChangeAction::RemoveAllLinks() void ScChangeAction::RemoveAllAnyLinks() { while ( pLinkAny ) - delete pLinkAny; // rueckt sich selbst hoch + delete pLinkAny; // rueckt sich selbst hoch } @@ -360,7 +360,7 @@ void ScChangeAction::RemoveAllDeletedIn() { //! nicht vom evtl. TopContent sondern wirklich dieser while ( pLinkDeletedIn ) - delete pLinkDeletedIn; // rueckt sich selbst hoch + delete pLinkDeletedIn; // rueckt sich selbst hoch } @@ -413,14 +413,14 @@ void ScChangeAction::SetDeletedIn( ScChangeAction* p ) void ScChangeAction::RemoveAllDeleted() { while ( pLinkDeleted ) - delete pLinkDeleted; // rueckt sich selbst hoch + delete pLinkDeleted; // rueckt sich selbst hoch } void ScChangeAction::RemoveAllDependent() { while ( pLinkDependent ) - delete pLinkDependent; // rueckt sich selbst hoch + delete pLinkDependent; // rueckt sich selbst hoch } @@ -603,8 +603,8 @@ void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack, pListContents = pE; } } - SetState( SC_CAS_REJECTED ); // vor UpdateReference fuer Move - pTrack->UpdateReference( this, TRUE ); // LinkDeleted freigeben + SetState( SC_CAS_REJECTED ); // vor UpdateReference fuer Move + pTrack->UpdateReference( this, TRUE ); // LinkDeleted freigeben DBG_ASSERT( !pLinkDeleted, "ScChangeAction::RejectRestoreContents: pLinkDeleted != NULL" ); // Liste der Contents abarbeiten und loeschen ScDocument* pDoc = pTrack->GetDocument(); @@ -619,7 +619,7 @@ void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack, delete pE; pE = pNextEntry; } - DeleteCellEntries(); // weg mit den generierten + DeleteCellEntries(); // weg mit den generierten } @@ -1114,12 +1114,12 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc ) BOOL bOk = TRUE; if ( IsTopDelete() ) - { // den kompletten Bereich in einem Rutsch restaurieren + { // den kompletten Bereich in einem Rutsch restaurieren ScBigRange aTmpRange( GetOverAllRange() ); if ( !aTmpRange.IsValid( pDoc ) ) { if ( GetType() == SC_CAT_DELETE_TABS ) - { // wird Tab angehaengt? + { // wird Tab angehaengt? if ( aTmpRange.aStart.Tab() > pDoc->GetMaxTableNumber() ) bOk = FALSE; } @@ -1138,7 +1138,7 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc ) { case SC_CAT_DELETE_COLS : if ( !(aRange.aStart.Col() == 0 && aRange.aEnd.Col() == MAXCOL) ) - { // nur wenn nicht TabDelete + { // nur wenn nicht TabDelete if ( ( bOk = pDoc->CanInsertCol( aRange ) ) != FALSE ) bOk = pDoc->InsertCol( aRange ); } @@ -1182,7 +1182,7 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc ) void ScChangeActionDel::UndoCutOffMoves() -{ // abgeschnittene Moves wiederherstellen, Entries/Links deleten +{ // abgeschnittene Moves wiederherstellen, Entries/Links deleten while ( pLinkMove ) { ScChangeActionMove* pMove = pLinkMove->GetMove(); @@ -1225,12 +1225,12 @@ void ScChangeActionDel::UndoCutOffMoves() // added to avoid warnings } } - delete pLinkMove; // rueckt sich selbst hoch + delete pLinkMove; // rueckt sich selbst hoch } } void ScChangeActionDel::UndoCutOffInsert() -{ // abgeschnittenes Insert wiederherstellen +{ // abgeschnittenes Insert wiederherstellen if ( pCutOff ) { switch ( pCutOff->GetType() ) @@ -1373,7 +1373,7 @@ BOOL ScChangeActionMove::Reject( ScDocument* pDoc ) if ( !bOk ) return FALSE; - pTrack->LookUpContents( aToRange, pDoc, 0, 0, 0 ); // zu movende Contents + pTrack->LookUpContents( aToRange, pDoc, 0, 0, 0 ); // zu movende Contents pDoc->DeleteAreaTab( aToRange, IDF_ALL ); pDoc->DeleteAreaTab( aFrmRange, IDF_ALL ); @@ -1405,7 +1405,7 @@ BOOL ScChangeActionMove::Reject( ScDocument* pDoc ) if ( pTrack->IsGenerated( pContent->GetActionNumber() ) && !pContent->IsDeletedIn() ) { - pLinkDependent->UnLink(); //! sonst wird der mitgeloescht + pLinkDependent->UnLink(); //! sonst wird der mitgeloescht pTrack->DeleteGeneratedDelContent( pContent ); } } @@ -1712,7 +1712,7 @@ BOOL ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack, } if ( bOldest || pEnd != this ) - { // wenn nicht aeltester: ist es ueberhaupt ein anderer als der letzte? + { // wenn nicht aeltester: ist es ueberhaupt ein anderer als der letzte? ScRange aRange( aBigRange.aStart.MakeAddress() ); const ScAddress& rPos = aRange.aStart; @@ -1771,7 +1771,7 @@ void ScChangeActionContent::GetStringOfCell( String& rStr, case CELLTYPE_VALUE : { double nValue = ((ScValueCell*)pCell)->GetValue(); - pDoc->GetFormatTable()->GetInputLineString( nValue, nFormat, + pDoc->GetFormatTable()->GetInputLineString( nValue, nFormat, rStr ); } break; @@ -1860,7 +1860,7 @@ void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell, switch ( pOrgCell->GetCellType() ) { case CELLTYPE_VALUE : - { // z.B. Datum auch als solches merken + { // z.B. Datum auch als solches merken double nValue = ((ScValueCell*)pOrgCell)->GetValue(); pFromDoc->GetFormatTable()->GetInputLineString( nValue, nFormat, rStr ); @@ -1890,7 +1890,7 @@ void ScChangeActionContent::SetCell( String& rStr, ScBaseCell* pCell, switch ( pCell->GetCellType() ) { case CELLTYPE_VALUE : - { // e.g. remember date as date string + { // e.g. remember date as date string double nValue = ((ScValueCell*)pCell)->GetValue(); pDoc->GetFormatTable()->GetInputLineString( nValue, nFormat, rStr ); @@ -1923,7 +1923,7 @@ void ScChangeActionContent::GetValueString( String& rStr, case CELLTYPE_EDIT : ((ScEditCell*)pCell)->GetString( rStr ); break; - case CELLTYPE_VALUE : // ist immer in rValue + case CELLTYPE_VALUE : // ist immer in rValue rStr = rValue; break; case CELLTYPE_FORMULA : @@ -1987,7 +1987,7 @@ void ScChangeActionContent::PutValueToDoc( ScBaseCell* pCell, { switch ( pCell->GetCellType() ) { - case CELLTYPE_VALUE : // ist immer in rValue + case CELLTYPE_VALUE : // ist immer in rValue pDoc->SetString( aPos.Col(), aPos.Row(), aPos.Tab(), rValue ); break; default: @@ -2089,12 +2089,12 @@ void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack, } if ( pTrack->IsInDelete() && !pTrack->IsInDeleteTop() ) - return ; // Formeln nur kompletten Bereich updaten + return ; // Formeln nur kompletten Bereich updaten BOOL bOldFormula = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_FORMULA ); BOOL bNewFormula = ( pNewCell && pNewCell->GetCellType() == CELLTYPE_FORMULA ); if ( bOldFormula || bNewFormula ) - { // via ScFormulaCell UpdateReference anpassen (dort) + { // via ScFormulaCell UpdateReference anpassen (dort) if ( pTrack->IsInDelete() ) { const ScRange& rDelRange = pTrack->GetInDeleteRange(); @@ -2116,7 +2116,7 @@ void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack, { case URM_INSDEL : if ( nDx < 0 || nDy < 0 || nDz < 0 ) - { // Delete startet dort hinter geloeschtem Bereich, + { // Delete startet dort hinter geloeschtem Bereich, // Position wird dort angepasst. if ( nDx ) aTmpRange.aStart.IncCol( -nDx ); @@ -2162,7 +2162,7 @@ void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack, ((ScFormulaCell*)pNewCell)->UpdateReference( eMode, aRange, (SCsCOL) nDx, (SCsROW) nDy, (SCsTAB) nDz, NULL ); if ( !aBigRange.aStart.IsValid( pTrack->GetDocument() ) ) - { //! HACK! + { //! HACK! //! UpdateReference kann nicht mit Positionen ausserhalb des //! Dokuments umgehen, deswegen alles auf #REF! setzen //2do: make it possible! das bedeutet grossen Umbau von ScAddress etc.! @@ -2368,7 +2368,7 @@ void __EXPORT ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster void ScChangeTrack::SetUser( const String& rUser ) { if ( IsLoadSave() ) - return ; // nicht die Collection zerschiessen + return ; // nicht die Collection zerschiessen aUser = rUser; StrData* pStrData = new StrData( aUser ); @@ -2383,7 +2383,7 @@ void ScChangeTrack::StartBlockModify( ScChangeTrackMsgType eMsgType, if ( aModifiedLink.IsSet() ) { if ( pBlockModifyMsg ) - aMsgStackTmp.Push( pBlockModifyMsg ); // Block im Block + aMsgStackTmp.Push( pBlockModifyMsg ); // Block im Block pBlockModifyMsg = new ScChangeTrackMsgInfo; pBlockModifyMsg->eMsgType = eMsgType; pBlockModifyMsg->nStartAction = nStartAction; @@ -2405,7 +2405,7 @@ void ScChangeTrack::EndBlockModify( ULONG nEndAction ) } else delete pBlockModifyMsg; - pBlockModifyMsg = aMsgStackTmp.Pop(); // evtl. Block im Block + pBlockModifyMsg = aMsgStackTmp.Pop(); // evtl. Block im Block } if ( !pBlockModifyMsg ) { @@ -2431,7 +2431,7 @@ void ScChangeTrack::NotifyModified( ScChangeTrackMsgType eMsgType, if ( !pBlockModifyMsg || pBlockModifyMsg->eMsgType != eMsgType || (IsGenerated( nStartAction ) && (eMsgType == SC_CTM_APPEND || eMsgType == SC_CTM_REMOVE)) ) - { // Append innerhalb von Append z.B. nicht + { // Append innerhalb von Append z.B. nicht StartBlockModify( eMsgType, nStartAction ); EndBlockModify( nEndAction ); } @@ -2456,7 +2456,7 @@ void ScChangeTrack::MasterLinks( ScChangeAction* pAppend ) } if ( pAppend->IsRejecting() ) - return ; // Rejects haben keine Abhaengigkeiten + return ; // Rejects haben keine Abhaengigkeiten switch ( eType ) { @@ -2594,13 +2594,13 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, if ( !pRefDoc || nTab < pRefDoc->GetTableCount() ) { if ( nCol1 == 0 && nCol2 == MAXCOL ) - { // ganze Zeilen und/oder Tabellen + { // ganze Zeilen und/oder Tabellen if ( nRow1 == 0 && nRow2 == MAXROW ) - { // ganze Tabellen + { // ganze Tabellen //2do: geht nicht auch komplette Tabelle als ganzes? ScRange aRange( 0, 0, nTab, 0, MAXROW, nTab ); for ( SCCOL nCol = nCol1; nCol <= nCol2; nCol++ ) - { // spaltenweise ist weniger als zeilenweise + { // spaltenweise ist weniger als zeilenweise aRange.aStart.SetCol( nCol ); aRange.aEnd.SetCol( nCol ); if ( nCol == nCol2 ) @@ -2613,7 +2613,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, nTab-nTab1 + nDz, nRejectingInsert ); } else - { // ganze Zeilen + { // ganze Zeilen ScRange aRange( 0, 0, nTab, MAXCOL, 0, nTab ); for ( SCROW nRow = nRow1; nRow <= nRow2; nRow++ ) { @@ -2627,7 +2627,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, } } else if ( nRow1 == 0 && nRow2 == MAXROW ) - { // ganze Spalten + { // ganze Spalten ScRange aRange( 0, 0, nTab, 0, MAXROW, nTab ); for ( SCCOL nCol = nCol1; nCol <= nCol2; nCol++ ) { @@ -2702,7 +2702,7 @@ void ScChangeTrack::LookUpContents( const ScRange& rOrgRange, aIter.GetTab() + nDz ); ScChangeActionContent* pContent = SearchContentAt( aBigPos, NULL ); if ( !pContent ) - { // nicht getrackte Contents + { // nicht getrackte Contents aPos.Set( aIter.GetCol() + nDx, aIter.GetRow() + nDy, aIter.GetTab() + nDz ); GenerateDelContent( aPos, pCell, pRefDoc ); @@ -2721,7 +2721,7 @@ void ScChangeTrack::AppendMove( const ScRange& rFromRange, const ScRange& rToRange, ScDocument* pRefDoc ) { ScChangeActionMove* pAct = new ScChangeActionMove( rFromRange, rToRange, this ); - LookUpContents( rToRange, pRefDoc, 0, 0, 0 ); // ueberschriebene Contents + LookUpContents( rToRange, pRefDoc, 0, 0, 0 ); // ueberschriebene Contents Append( pAct ); } @@ -2751,7 +2751,7 @@ void ScChangeTrack::AppendContent( const ScAddress& rPos, ScChangeActionContent::GetStringOfCell( aOldValue, pOldCell, pDoc, rPos ); if ( aOldValue != rNewValue || IsMatrixFormulaRangeDifferent( pOldCell, NULL ) ) - { // nur wirkliche Aenderung tracken + { // nur wirkliche Aenderung tracken ScRange aRange( rPos ); ScChangeActionContent* pAct = new ScChangeActionContent( aRange ); pAct->SetOldValue( pOldCell, pDoc, pDoc ); @@ -2773,7 +2773,7 @@ void ScChangeTrack::AppendContent( const ScAddress& rPos, ScChangeActionContent::GetStringOfCell( aNewValue, pNewCell, pDoc, rPos ); if ( aOldValue != aNewValue || IsMatrixFormulaRangeDifferent( pOldCell, pNewCell ) ) - { // nur wirkliche Aenderung tracken + { // nur wirkliche Aenderung tracken ScRange aRange( rPos ); ScChangeActionContent* pAct = new ScChangeActionContent( aRange ); pAct->SetOldValue( pOldCell, pRefDoc, pDoc, nOldFormat ); @@ -2794,7 +2794,7 @@ void ScChangeTrack::AppendContent( const ScAddress& rPos, ScChangeActionContent::GetStringOfCell( aNewValue, pNewCell, pDoc, rPos ); if ( aOldValue != aNewValue || IsMatrixFormulaRangeDifferent( pOldCell, pNewCell ) ) - { // nur wirkliche Aenderung tracken + { // nur wirkliche Aenderung tracken ScRange aRange( rPos ); ScChangeActionContent* pAct = new ScChangeActionContent( aRange ); pAct->SetOldValue( pOldCell, pRefDoc, pDoc ); @@ -2882,7 +2882,7 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange, bDoContents = TRUE; } r = aRange; - Undo( nStartLastCut, nEndLastCut ); // hier werden sich die Cuts gemerkt + Undo( nStartLastCut, nEndLastCut ); // hier werden sich die Cuts gemerkt //! StartAction erst nach Undo nStartAction = GetActionMax() + 1; StartBlockModify( SC_CTM_APPEND, nStartAction ); @@ -3004,7 +3004,7 @@ ScChangeActionContent* ScChangeTrack::GenerateDelContent( rPos, pCell, pFromDoc, pDoc ); // pNextContent und pPrevContent werden nicht gesetzt if ( pFirstGeneratedDelContent ) - { // vorne reinhaengen + { // vorne reinhaengen pFirstGeneratedDelContent->pPrev = pContent; pContent->pNext = pFirstGeneratedDelContent; } @@ -3028,7 +3028,7 @@ void ScChangeTrack::DeleteGeneratedDelContent( ScChangeActionContent* pContent ) delete pContent; NotifyModified( SC_CTM_REMOVE, nAct, nAct ); if ( nAct == nGeneratedMin ) - ++nGeneratedMin; //! erst nach NotifyModified wg. IsGenerated + ++nGeneratedMin; //! erst nach NotifyModified wg. IsGenerated } @@ -3072,13 +3072,13 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct ) ScChangeActionType eActType = pAct->GetType(); if ( eActType == SC_CAT_REJECT || (eActType == SC_CAT_MOVE && pAct->IsRejecting()) ) - return ; // diese Rejects sind nicht abhaengig + return ; // diese Rejects sind nicht abhaengig if ( eActType == SC_CAT_CONTENT ) { if ( !(((ScChangeActionContent*)pAct)->GetNextContent() || ((ScChangeActionContent*)pAct)->GetPrevContent()) ) - { // Contents an gleicher Position verketten + { // Contents an gleicher Position verketten ScChangeActionContent* pContent = SearchContentAt( pAct->GetBigRange().aStart, pAct ); if ( pContent ) @@ -3105,9 +3105,9 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct ) } if ( !(pLinkInsertCol || pLinkInsertRow || pLinkInsertTab || pLinkMove) ) - return ; // keine Dependencies + return ; // keine Dependencies if ( pAct->IsRejecting() ) - return ; // ausser Content keine Dependencies + return ; // ausser Content keine Dependencies // Insert in einem entsprechenden Insert haengt davon ab, sonst muesste // der vorherige Insert gesplittet werden. @@ -3133,7 +3133,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct ) pTest->GetBigRange().Intersects( rRange ) ) { AddDependentWithNotify( pTest, pAct ); - break; // for + break; // for } } } @@ -3147,7 +3147,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct ) pTest->GetBigRange().Intersects( rRange ) ) { AddDependentWithNotify( pTest, pAct ); - break; // for + break; // for } } } @@ -3161,7 +3161,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct ) pTest->GetBigRange().Intersects( rRange ) ) { AddDependentWithNotify( pTest, pAct ); - break; // for + break; // for } } } @@ -3169,7 +3169,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct ) if ( pLinkMove ) { if ( eActType == SC_CAT_CONTENT ) - { // Content ist von FromRange abhaengig + { // Content ist von FromRange abhaengig const ScBigAddress& rPos = rRange.aStart; for ( ScChangeActionLinkEntry* pL = pLinkMove; pL; pL = pL->GetNext() ) { @@ -3182,7 +3182,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct ) } } else if ( eActType == SC_CAT_MOVE ) - { // Move FromRange ist von ToRange abhaengig + { // Move FromRange ist von ToRange abhaengig const ScBigRange& rFromRange = ((ScChangeActionMove*)pAct)->GetFromRange(); for ( ScChangeActionLinkEntry* pL = pLinkMove; pL; pL = pL->GetNext() ) { @@ -3195,7 +3195,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct ) } } else - { // Inserts und Deletes sind abhaengig, sobald sie FromRange oder + { // Inserts und Deletes sind abhaengig, sobald sie FromRange oder // ToRange kreuzen for ( ScChangeActionLinkEntry* pL = pLinkMove; pL; pL = pL->GetNext() ) { @@ -3254,7 +3254,7 @@ void ScChangeTrack::Remove( ScChangeAction* pRemove ) } if ( IsInPasteCut() && pRemove->GetType() == SC_CAT_CONTENT ) - { //! Content wird wiederverwertet + { //! Content wird wiederverwertet ScChangeActionContent* pContent = (ScChangeActionContent*) pRemove; pContent->RemoveAllLinks(); pContent->ClearTrack(); @@ -3283,7 +3283,7 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge ) ResetLastCut(); StartBlockModify( SC_CTM_REMOVE, nStartAction ); for ( ULONG j = nEndAction; j >= nStartAction; --j ) - { // rueckwaerts um evtl. nActionMax zu recyclen und schnelleren + { // rueckwaerts um evtl. nActionMax zu recyclen und schnelleren // Zugriff via pLast, Deletes in richtiger Reihenfolge ScChangeAction* pAct = ( (j == nActionMax && pLast && pLast->GetActionNumber() == j) ? pLast : GetAction( j ) ); @@ -3312,7 +3312,7 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge ) ULONG nStart = pMove->GetStartLastCut(); ULONG nEnd = pMove->GetEndLastCut(); if ( nStart && nStart <= nEnd ) - { // LastCut wiederherstellen + { // LastCut wiederherstellen //! Links vor Cut-Append aufloesen pMove->RemoveAllLinks(); StartBlockModify( SC_CTM_APPEND, nStart ); @@ -3360,12 +3360,12 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge ) BOOL ScChangeTrack::MergeIgnore( const ScChangeAction& rAction, ULONG nFirstMerge ) { if ( rAction.IsRejected() ) - return TRUE; // da kommt noch eine passende Reject-Action + return TRUE; // da kommt noch eine passende Reject-Action if ( rAction.IsRejecting() && rAction.GetRejectAction() >= nFirstMerge ) - return TRUE; // da ist sie + return TRUE; // da ist sie - return FALSE; // alles andere + return FALSE; // alles andere } @@ -3378,7 +3378,7 @@ void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared ) { SetLastMerge( pAct->GetActionNumber() ); while ( pAct ) - { // rueckwaerts, Deletes in richtiger Reihenfolge + { // rueckwaerts, Deletes in richtiger Reihenfolge // #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong if ( bShared || !ScChangeTrack::MergeIgnore( *pAct, nFirstMerge ) ) { @@ -3393,12 +3393,12 @@ void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared ) } UpdateReference( pAct, TRUE ); SetInDeleteTop( FALSE ); - pAct->DeleteCellEntries(); // sonst GPF bei Track Clear() + pAct->DeleteCellEntries(); // sonst GPF bei Track Clear() } pAct = ( pAct == pFirstMerge ? NULL : pAct->GetPrev() ); } } - SetMergeState( SC_CTMS_OTHER ); //! nachfolgende per default MergeOther + SetMergeState( SC_CTMS_OTHER ); //! nachfolgende per default MergeOther } @@ -3419,7 +3419,7 @@ void ScChangeTrack::MergeOwn( ScChangeAction* pAct, ULONG nFirstMerge, bool bSha } UpdateReference( pAct, FALSE ); SetInDeleteTop( FALSE ); - SetMergeState( SC_CTMS_OTHER ); //! nachfolgende per default MergeOther + SetMergeState( SC_CTMS_OTHER ); //! nachfolgende per default MergeOther } } @@ -3527,11 +3527,11 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, nDz = -nDz; } if ( bDel ) - { //! fuer diesen Mechanismus gilt: + { //! fuer diesen Mechanismus gilt: //! es gibt nur ganze, einfache geloeschte Spalten/Zeilen ScChangeActionDel* pActDel = (ScChangeActionDel*) pAct; if ( !bUndo ) - { // Delete + { // Delete ScChangeActionType eInsType = SC_CAT_NONE; // for Insert-Undo-"Deletes" switch ( eActType ) { @@ -3552,11 +3552,11 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, for ( ScChangeAction* p = *ppFirstAction; p; p = p->GetNext() ) { if ( p == pAct ) - continue; // for + continue; // for BOOL bUpdate = TRUE; if ( GetMergeState() == SC_CTMS_OTHER && p->GetActionNumber() <= GetLastMerge() ) - { // Delete in mergendem Dokument, Action im zu mergenden + { // Delete in mergendem Dokument, Action im zu mergenden if ( p->IsInsertType() ) { // Bei Insert Referenzen nur anpassen, wenn das Delete @@ -3567,7 +3567,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, } else if ( p->GetType() == SC_CAT_CONTENT && p->IsDeletedInDelType( eInsType ) ) - { // Content in Insert-Undo-"Delete" + { // Content in Insert-Undo-"Delete" // Nicht anpassen, wenn dieses Delete in dem // Insert-"Delete" sein wuerde (ist nur verschoben). if ( aDelRange.In( p->GetBigRange().aStart ) ) @@ -3586,7 +3586,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, } } if ( !bUpdate ) - continue; // for + continue; // for } if ( aDelRange.In( p->GetBigRange() ) ) { @@ -3756,16 +3756,16 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, if ( p->GetType() == eActType && !p->IsRejected() && !pActDel->IsDeletedIn() && p->GetBigRange().In( aDelRange ) ) - pActDel->SetDeletedIn( p ); // "druntergerutscht" + pActDel->SetDeletedIn( p ); // "druntergerutscht" } } } else - { // Undo Delete + { // Undo Delete for ( ScChangeAction* p = *ppFirstAction; p; p = p->GetNext() ) { if ( p == pAct ) - continue; // for + continue; // for BOOL bUpdate = TRUE; if ( aDelRange.In( p->GetBigRange() ) ) { @@ -3784,7 +3784,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, { if ( p->GetType() != SC_CAT_CONTENT || ((ScChangeActionContent*)p)->IsTopContent() ) - { // erst der TopContent wird wirklich entfernt + { // erst der TopContent wird wirklich entfernt p->RemoveDeletedIn( pActDel ); // GeneratedDelContent _nicht_ aus Liste loeschen, // wir brauchen ihn evtl. noch fuer Reject, @@ -3795,13 +3795,13 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, } else if ( eActType != SC_CAT_DELETE_TABS && p->IsDeletedInDelType( SC_CAT_DELETE_TABS ) ) - { // in geloeschten Tabellen nicht updaten, + { // in geloeschten Tabellen nicht updaten, // ausser wenn Tabelle verschoben wird bUpdate = FALSE; } if ( p->GetType() == eActType && pActDel->IsDeletedIn( p ) ) { - pActDel->RemoveDeletedIn( p ); // "druntergerutscht" + pActDel->RemoveDeletedIn( p ); // "druntergerutscht" bUpdate = TRUE; } } @@ -3809,7 +3809,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, p->UpdateReference( this, eMode, aRange, nDx, nDy, nDz ); } if ( !bGeneratedDelContents ) - { // die werden sonst noch fuer das echte Undo gebraucht + { // die werden sonst noch fuer das echte Undo gebraucht pActDel->UndoCutOffInsert(); pActDel->UndoCutOffMoves(); } @@ -3822,11 +3822,11 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, const ScBigRange& rTo = pActMove->GetBigRange(); const ScBigRange& rFrom = pActMove->GetFromRange(); if ( !bUndo ) - { // Move + { // Move for ( ScChangeAction* p = *ppFirstAction; p; p = p->GetNext() ) { if ( p == pAct ) - continue; // for + continue; // for if ( p->GetType() == SC_CAT_CONTENT ) { // Inhalt in Ziel deleten (Inhalt in Quelle moven) @@ -3843,7 +3843,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, else if ( bLastCutMove && p->GetActionNumber() > nEndLastCut && rFrom.In( p->GetBigRange() ) ) - { // Paste Cut: neuer Content nach Cut eingefuegt, bleibt. + { // Paste Cut: neuer Content nach Cut eingefuegt, bleibt. // Aufsplitten der ContentChain ScChangeActionContent *pHere, *pTmp; pHere = (ScChangeActionContent*) p; @@ -3851,12 +3851,12 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, pTmp->GetActionNumber() > nEndLastCut ) pHere = pTmp; if ( pTmp ) - { // wird TopContent des Move + { // wird TopContent des Move pTmp->SetNextContent( NULL ); pHere->SetPrevContent( NULL ); } do - { // Abhaengigkeit vom FromRange herstellen + { // Abhaengigkeit vom FromRange herstellen AddDependentWithNotify( pActMove, pHere ); } while ( ( pHere = pHere->GetNextContent() ) != NULL ); } @@ -3867,19 +3867,19 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, } } else - { // Undo Move + { // Undo Move BOOL bActRejected = pActMove->IsRejected(); for ( ScChangeAction* p = *ppFirstAction; p; p = p->GetNext() ) { if ( p == pAct ) - continue; // for + continue; // for if ( p->GetType() == SC_CAT_CONTENT ) { // Inhalt in Ziel moven, wenn nicht deleted, sonst undelete if ( p->IsDeletedIn( pActMove ) ) { if ( ((ScChangeActionContent*)p)->IsTopContent() ) - { // erst der TopContent wird wirklich entfernt + { // erst der TopContent wird wirklich entfernt p->RemoveDeletedIn( pActMove ); // GeneratedDelContent _nicht_ aus Liste loeschen, // wir brauchen ihn evtl. noch fuer Reject, @@ -3892,7 +3892,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, if ( bActRejected && ((ScChangeActionContent*)p)->IsTopContent() && rFrom.In( p->GetBigRange() ) ) - { // Abhaengigkeit herstellen, um Content zu schreiben + { // Abhaengigkeit herstellen, um Content zu schreiben ScChangeActionLinkEntry* pLink = pActMove->AddDependent( p ); p->AddLink( pActMove, pLink ); @@ -3902,7 +3902,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, } } else - { // Insert / Undo Insert + { // Insert / Undo Insert switch ( GetMergeState() ) { case SC_CTMS_NONE : @@ -3911,7 +3911,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, for ( ScChangeAction* p = *ppFirstAction; p; p = p->GetNext() ) { if ( p == pAct ) - continue; // for + continue; // for p->UpdateReference( this, eMode, aRange, nDx, nDy, nDz ); } } @@ -3945,7 +3945,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, for ( ScChangeAction* p = *ppFirstAction; p; p = p->GetNext() ) { if ( p == pAct ) - continue; // for + continue; // for if ( !p->IsDeletedIn( pAct ) // #i95212# [Collaboration] Bad handling of row insertion in shared spreadsheet && p->GetActionNumber() <= pAct->GetActionNumber() ) @@ -3960,7 +3960,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, for ( ScChangeAction* p = *ppFirstAction; p; p = p->GetNext() ) { if ( p == pAct ) - continue; // for + continue; // for if ( !p->IsDeletedIn( pAct ) // #i95212# [Collaboration] Bad handling of row insertion in shared spreadsheet && p->GetActionNumber() <= pAct->GetActionNumber() ) @@ -4071,7 +4071,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct, else if ( pCur->IsDeleteType() ) { if ( bIsDelete ) - { // Inhalte geloeschter Bereiche interessieren nur bei Delete + { // Inhalte geloeschter Bereiche interessieren nur bei Delete ScChangeActionDel* pDel = (ScChangeActionDel*) pCur; if ( !bAllFlat && bIsMasterDelete && pCur == pAct ) { @@ -4105,7 +4105,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct, else { if ( p->IsDeleteType() ) - { // weiteres TopDelete in gleiche Ebene, + { // weiteres TopDelete in gleiche Ebene, // es ist nicht rejectable if ( ((ScChangeActionDel*)p)->IsTopDelete() ) rTable.Insert( p->GetActionNumber(), p ); @@ -4165,7 +4165,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct, } } else if ( pCur->GetType() == SC_CAT_CONTENT ) - { // alle Aenderungen an gleicher Position + { // alle Aenderungen an gleicher Position ScChangeActionContent* pContent = (ScChangeActionContent*) pCur; // alle vorherigen while ( ( pContent = pContent->GetPrevContent() ) != NULL ) @@ -4326,7 +4326,7 @@ BOOL ScChangeTrack::RejectAll() { BOOL bOk = TRUE; for ( ScChangeAction* p = GetLast(); p && bOk; p = p->GetPrev() ) - { //! rueckwaerts, weil abhaengige hinten und RejectActions angehaengt + { //! rueckwaerts, weil abhaengige hinten und RejectActions angehaengt if ( p->IsInternalRejectable() ) bOk = Reject( p ); } @@ -4376,9 +4376,9 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, if ( p->GetType() == SC_CAT_CONTENT ) p->SetRejected(); else if ( p->IsDeleteType() ) - p->Accept(); // geloeschtes ins Nirvana + p->Accept(); // geloeschtes ins Nirvana else - bOk = Reject( p, NULL, TRUE ); //! rekursiv + bOk = Reject( p, NULL, TRUE ); //! rekursiv } } if ( bOk && (bRejected = pAct->Reject( pDoc )) != FALSE ) @@ -4488,7 +4488,7 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, DBG_ASSERT( pTable, "ScChangeTrack::Reject: Move ohne Table" ); for ( ScChangeAction* p = pTable->Last(); p && bOk; p = pTable->Prev() ) { - bOk = Reject( p, NULL, TRUE ); //! rekursiv + bOk = Reject( p, NULL, TRUE ); //! rekursiv } } if ( bOk && (bRejected = pAct->Reject( pDoc )) != FALSE ) diff --git a/sc/source/core/tool/chgviset.cxx b/sc/source/core/tool/chgviset.cxx index 514336368797..f828d11cdf94 100644 --- a/sc/source/core/tool/chgviset.cxx +++ b/sc/source/core/tool/chgviset.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,19 +48,19 @@ ScChangeViewSettings::ScChangeViewSettings( const ScChangeViewSettings& r ) { SetTheComment(r.aComment); - aFirstDateTime =r.aFirstDateTime; - aLastDateTime =r.aLastDateTime; - aAuthorToShow =r.aAuthorToShow; - aRangeList =r.aRangeList; - eDateMode =r.eDateMode; - bShowIt =r.bShowIt; - bIsDate =r.bIsDate; - bIsAuthor =r.bIsAuthor; - bIsComment =r.bIsComment; - bIsRange =r.bIsRange; - bEveryoneButMe =r.bEveryoneButMe; - bShowAccepted =r.bShowAccepted; - bShowRejected =r.bShowRejected; + aFirstDateTime =r.aFirstDateTime; + aLastDateTime =r.aLastDateTime; + aAuthorToShow =r.aAuthorToShow; + aRangeList =r.aRangeList; + eDateMode =r.eDateMode; + bShowIt =r.bShowIt; + bIsDate =r.bIsDate; + bIsAuthor =r.bIsAuthor; + bIsComment =r.bIsComment; + bIsRange =r.bIsRange; + bEveryoneButMe =r.bEveryoneButMe; + bShowAccepted =r.bShowAccepted; + bShowRejected =r.bShowRejected; mbIsActionRange = r.mbIsActionRange; mnFirstAction = r.mnFirstAction; mnLastAction = r.mnLastAction; @@ -71,19 +71,19 @@ ScChangeViewSettings& ScChangeViewSettings::operator=( const ScChangeViewSetting { SetTheComment(r.aComment); - aFirstDateTime =r.aFirstDateTime; - aLastDateTime =r.aLastDateTime; - aAuthorToShow =r.aAuthorToShow; - aRangeList =r.aRangeList; - eDateMode =r.eDateMode; - bShowIt =r.bShowIt; - bIsDate =r.bIsDate; - bIsAuthor =r.bIsAuthor; - bIsComment =r.bIsComment; - bIsRange =r.bIsRange; - bEveryoneButMe =r.bEveryoneButMe; - bShowAccepted =r.bShowAccepted; - bShowRejected =r.bShowRejected; + aFirstDateTime =r.aFirstDateTime; + aLastDateTime =r.aLastDateTime; + aAuthorToShow =r.aAuthorToShow; + aRangeList =r.aRangeList; + eDateMode =r.eDateMode; + bShowIt =r.bShowIt; + bIsDate =r.bIsDate; + bIsAuthor =r.bIsAuthor; + bIsComment =r.bIsComment; + bIsRange =r.bIsRange; + bEveryoneButMe =r.bEveryoneButMe; + bShowAccepted =r.bShowAccepted; + bShowRejected =r.bShowRejected; mbIsActionRange = r.mbIsActionRange; mnFirstAction = r.mnFirstAction; mnLastAction = r.mnLastAction; @@ -126,7 +126,7 @@ void ScChangeViewSettings::SetTheComment(const String& rString) void ScChangeViewSettings::AdjustDateMode( const ScDocument& rDoc ) { switch ( eDateMode ) - { // corresponds with ScViewUtil::IsActionShown + { // corresponds with ScViewUtil::IsActionShown case SCDM_DATE_EQUAL : case SCDM_DATE_NOTEQUAL : aFirstDateTime.SetTime( 0 ); diff --git a/sc/source/core/tool/collect.cxx b/sc/source/core/tool/collect.cxx index 1b929892bd1e..9da54fccfd08 100644 --- a/sc/source/core/tool/collect.cxx +++ b/sc/source/core/tool/collect.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ #include "rechead.hxx" #include "collect.hxx" -#include "document.hxx" // fuer TypedStrData Konstruktor +#include "document.hxx" // fuer TypedStrData Konstruktor // ----------------------------------------------------------------------- @@ -100,7 +100,7 @@ void ScCollection::AtFree(USHORT nIndex) if ((pItems) && (nIndex < nCount)) { delete pItems[nIndex]; - --nCount; // before memmove + --nCount; // before memmove memmove ( &pItems[nIndex], &pItems[nIndex + 1], (nCount - nIndex) * sizeof(ScDataObject*)); pItems[nCount] = NULL; } @@ -194,7 +194,7 @@ ScCollection& ScCollection::operator=( const ScCollection& r ) //------------------------------------------------------------------------ -ScDataObject* ScCollection::Clone() const +ScDataObject* ScCollection::Clone() const { return new ScCollection(*this); } @@ -297,16 +297,16 @@ BOOL ScSortedCollection::operator==(const ScSortedCollection& rCmp) const //------------------------------------------------------------------------ -// IsEqual - komplette Inhalte vergleichen +// IsEqual - komplette Inhalte vergleichen BOOL ScSortedCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const { - return ( Compare(pKey1, pKey2) == 0 ); // Default: nur Index vergleichen + return ( Compare(pKey1, pKey2) == 0 ); // Default: nur Index vergleichen } //------------------------------------------------------------------------ -ScDataObject* StrData::Clone() const +ScDataObject* StrData::Clone() const { return new StrData(*this); } @@ -326,7 +326,7 @@ short ScStrCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const //------------------------------------------------------------------------ -ScDataObject* ScStrCollection::Clone() const +ScDataObject* ScStrCollection::Clone() const { return new ScStrCollection(*this); } @@ -336,15 +336,15 @@ ScDataObject* ScStrCollection::Clone() const //------------------------------------------------------------------------ -ScDataObject* TypedStrData::Clone() const +ScDataObject* TypedStrData::Clone() const { return new TypedStrData(*this); } TypedScStrCollection::TypedScStrCollection( USHORT nLim , USHORT nDel , BOOL bDup ) - : ScSortedCollection( nLim, nDel, bDup ) + : ScSortedCollection( nLim, nDel, bDup ) { - bCaseSensitive = FALSE; + bCaseSensitive = FALSE; } TypedScStrCollection::~TypedScStrCollection() @@ -354,16 +354,16 @@ ScDataObject* TypedScStrCollection::Clone() const return new TypedScStrCollection(*this); } -TypedStrData* TypedScStrCollection::operator[]( const USHORT nIndex) const -{ - return (TypedStrData*)At(nIndex); +TypedStrData* TypedScStrCollection::operator[]( const USHORT nIndex) const +{ + return (TypedStrData*)At(nIndex); } -void TypedScStrCollection::SetCaseSensitive( BOOL bSet ) -{ - bCaseSensitive = bSet; +void TypedScStrCollection::SetCaseSensitive( BOOL bSet ) +{ + bCaseSensitive = bSet; } - + short TypedScStrCollection::Compare( ScDataObject* pKey1, ScDataObject* pKey2 ) const { short nResult = 0; @@ -409,8 +409,8 @@ short TypedScStrCollection::Compare( ScDataObject* pKey1, ScDataObject* pKey2 ) BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult, USHORT& rPos, BOOL bBack ) const { - // Die Collection ist nach String-Vergleichen sortiert, darum muss hier - // alles durchsucht werden + // Die Collection ist nach String-Vergleichen sortiert, darum muss hier + // alles durchsucht werden BOOL bFound = FALSE; @@ -422,11 +422,11 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult, aOldResult = pData->aStrValue; } - if ( bBack ) // rueckwaerts + if ( bBack ) // rueckwaerts { USHORT nStartPos = nCount; if ( rPos != SCPOS_INVALID ) - nStartPos = rPos; // weitersuchen... + nStartPos = rPos; // weitersuchen... for ( USHORT i=nStartPos; i>0; ) { @@ -436,8 +436,8 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult, { if ( ScGlobal::GetpTransliteration()->isMatch( rStart, pData->aStrValue ) ) { - // If the collection is case sensitive, it may contain several entries - // that are equal when compared case-insensitive. They are skipped here. + // If the collection is case sensitive, it may contain several entries + // that are equal when compared case-insensitive. They are skipped here. if ( !bCaseSensitive || !aOldResult.Len() || !ScGlobal::GetpTransliteration()->isEqual( pData->aStrValue, aOldResult ) ) @@ -451,11 +451,11 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult, } } } - else // vorwaerts + else // vorwaerts { USHORT nStartPos = 0; if ( rPos != SCPOS_INVALID ) - nStartPos = rPos + 1; // weitersuchen... + nStartPos = rPos + 1; // weitersuchen... for ( USHORT i=nStartPos; i<nCount; i++ ) { @@ -464,8 +464,8 @@ BOOL TypedScStrCollection::FindText( const String& rStart, String& rResult, { if ( ScGlobal::GetpTransliteration()->isMatch( rStart, pData->aStrValue ) ) { - // If the collection is case sensitive, it may contain several entries - // that are equal when compared case-insensitive. They are skipped here. + // If the collection is case sensitive, it may contain several entries + // that are equal when compared case-insensitive. They are skipped here. if ( !bCaseSensitive || !aOldResult.Len() || !ScGlobal::GetpTransliteration()->isEqual( pData->aStrValue, aOldResult ) ) @@ -493,7 +493,7 @@ BOOL TypedScStrCollection::GetExactMatch( String& rString ) const if ( pData->nStrType && ScGlobal::GetpTransliteration()->isEqual( pData->aStrValue, rString ) ) { - rString = pData->aStrValue; // String anpassen + rString = pData->aStrValue; // String anpassen return TRUE; } } diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 15723af8e185..efbbb9239480 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -322,7 +322,7 @@ bool ScCompiler::IsEnglishSymbol( const String& rName ) { return true; } - return false; // no valid function name + return false; // no valid function name } // static @@ -2509,7 +2509,7 @@ Label_MaskStateMachine: } if (mnRangeOpPosInSymbol >= 0 && mnRangeOpPosInSymbol == (pSym-1) - &cSymbol[0]) { - // This is a trailing range operator, which is nonsense. Will be caught + // This is a trailing range operator, which is nonsense. Will be caught // in next round. mnRangeOpPosInSymbol = -1; *--pSym = 0; @@ -2546,10 +2546,10 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray ) } else if (mxSymbols->isODFF()) { - // ODFF names that are not written in the current mapping but to be - // recognized. New names will be written in a future relase, then - // exchange (!) with the names in - // formula/source/core/resource/core_resource.src to be able to still + // ODFF names that are not written in the current mapping but to be + // recognized. New names will be written in a future relase, then + // exchange (!) with the names in + // formula/source/core/resource/core_resource.src to be able to still // read the old names as well. struct FunctionName { @@ -2922,7 +2922,7 @@ BOOL ScCompiler::IsReference( const String& rName ) { if (IsDoubleReference( rName)) return true; - // Now try with a symbol up to the range operator, rewind source + // Now try with a symbol up to the range operator, rewind source // position. sal_Int32 nLen = mnRangeOpPosInSymbol; while (cSymbol[++nLen]) @@ -2935,8 +2935,8 @@ BOOL ScCompiler::IsReference( const String& rName ) } else { - // Special treatment for the 'E:\[doc]Sheet1:Sheet3'!D5 Excel sickness, - // mnRangeOpPosInSymbol did not catch the range operator as it is + // Special treatment for the 'E:\[doc]Sheet1:Sheet3'!D5 Excel sickness, + // mnRangeOpPosInSymbol did not catch the range operator as it is // within a quoted name. switch (pConv->meConv) { @@ -2967,9 +2967,9 @@ BOOL ScCompiler::IsMacro( const String& rName ) else pObj = pSfxApp->GetBasic(); - // ODFF recommends to store user-defined functions prefixed with "USER.", - // use only unprefixed name if encountered. BASIC doesn't allow '.' in a - // function name so a function "USER.FOO" could not exist, and macro check + // ODFF recommends to store user-defined functions prefixed with "USER.", + // use only unprefixed name if encountered. BASIC doesn't allow '.' in a + // function name so a function "USER.FOO" could not exist, and macro check // is assigned the lowest priority in function name check. if (FormulaGrammar::isODFF( GetGrammar()) && aName.EqualsIgnoreCaseAscii( "USER.", 0, 5)) aName.Erase( 0, 5); @@ -3569,7 +3569,7 @@ inline bool lcl_UpperAsciiOrI18n( String& rUpper, const String& rOrg, FormulaGra { if (FormulaGrammar::isODFF( eGrammar )) { - // ODFF has a defined set of English function names, avoid i18n + // ODFF has a defined set of English function names, avoid i18n // overhead. rUpper = rOrg; rUpper.ToUpperAscii(); @@ -3730,8 +3730,8 @@ BOOL ScCompiler::NextNewToken( bool bInArray ) return false; } - // Provide single token information and continue. Do not set an error, that - // would prematurely end compilation. Simple unknown names are handled by + // Provide single token information and continue. Do not set an error, that + // would prematurely end compilation. Simple unknown names are handled by // the interpreter. ScGlobal::pCharClass->toLower( aUpper ); ScRawToken aToken; diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx index 006d1746501b..4260acb563e1 100644 --- a/sc/source/core/tool/consoli.cxx +++ b/sc/source/core/tool/consoli.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,13 +46,13 @@ #include <math.h> #include <string.h> -#define SC_CONS_NOTFOUND -1 +#define SC_CONS_NOTFOUND -1 // STATIC DATA ----------------------------------------------------------- -/* Strings bei Gelegenheit ganz raus... -static USHORT nFuncRes[] = { // Reihenfolge wie bei enum ScSubTotalFunc - 0, // none +/* Strings bei Gelegenheit ganz raus... +static USHORT nFuncRes[] = { // Reihenfolge wie bei enum ScSubTotalFunc + 0, // none STR_PIVOTFUNC_AVG, STR_PIVOTFUNC_COUNT, STR_PIVOTFUNC_COUNT2, @@ -66,8 +66,8 @@ static USHORT nFuncRes[] = { // Reihenfolge wie bei enum ScSubTo STR_PIVOTFUNC_VAR2 }; */ -static OpCode eOpCodeTable[] = { // Reihenfolge wie bei enum ScSubTotalFunc - ocBad, // none +static OpCode eOpCodeTable[] = { // Reihenfolge wie bei enum ScSubTotalFunc + ocBad, // none ocAverage, ocCount, ocCount2, @@ -150,24 +150,24 @@ ScConsData::~ScConsData() } -#define DELETEARR(ppArray,nCount) \ -{ \ - ULONG i; \ - if (ppArray) \ - for(i=0; i<nCount; i++) \ - delete[] ppArray[i]; \ - delete[] ppArray; \ - ppArray = NULL; \ +#define DELETEARR(ppArray,nCount) \ +{ \ + ULONG i; \ + if (ppArray) \ + for(i=0; i<nCount; i++) \ + delete[] ppArray[i]; \ + delete[] ppArray; \ + ppArray = NULL; \ } -#define DELETESTR(ppArray,nCount) \ -{ \ - ULONG i; \ - if (ppArray) \ - for(i=0; i<nCount; i++) \ - delete ppArray[i]; \ - delete[] ppArray; \ - ppArray = NULL; \ +#define DELETESTR(ppArray,nCount) \ +{ \ + ULONG i; \ + if (ppArray) \ + for(i=0; i<nCount; i++) \ + delete ppArray[i]; \ + delete[] ppArray; \ + ppArray = NULL; \ } void ScConsData::DeleteData() @@ -185,12 +185,12 @@ void ScConsData::DeleteData() ppRefs = NULL; } -// DELETEARR( ppData1, nColCount ); -// DELETEARR( ppData2, nColCount ); +// DELETEARR( ppData1, nColCount ); +// DELETEARR( ppData2, nColCount ); DELETEARR( ppCount, nColCount ); DELETEARR( ppSum, nColCount ); DELETEARR( ppSumSqr,nColCount ); - DELETEARR( ppUsed, nColCount ); // erst nach ppRefs !!! + DELETEARR( ppUsed, nColCount ); // erst nach ppRefs !!! DELETEARR( ppTitlePos, nRowCount ); DELETESTR( ppColHeaders, nColCount ); DELETESTR( ppRowHeaders, nRowCount ); @@ -198,7 +198,7 @@ void ScConsData::DeleteData() nTitleCount = 0; nDataCount = 0; - if (bColByName) nColCount = 0; // sonst stimmt ppColHeaders nicht + if (bColByName) nColCount = 0; // sonst stimmt ppColHeaders nicht if (bRowByName) nRowCount = 0; bCornerUsed = FALSE; @@ -248,11 +248,11 @@ void ScConsData::InitData( BOOL bDelete ) for (SCSIZE i=0; i<nRowCount; i++) { ppTitlePos[i] = new SCSIZE[nDataCount]; - memset( ppTitlePos[i], 0, nDataCount * sizeof(SCSIZE) ); //! unnoetig ? + memset( ppTitlePos[i], 0, nDataCount * sizeof(SCSIZE) ); //! unnoetig ? } } - // CornerText: einzelner String + // CornerText: einzelner String } void ScConsData::DoneFields() @@ -293,8 +293,8 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab, SCCOL nStartCol = nCol1; SCROW nStartRow = nRow1; - if (bColByName) ++nStartRow; - if (bRowByName) ++nStartCol; + if (bColByName) ++nStartRow; + if (bRowByName) ++nStartCol; if (bColByName) { @@ -342,7 +342,7 @@ void ScConsData::AddName( const String& rName ) for (nArrY=0; nArrY<nRowCount; nArrY++) { - // Daten auf gleiche Laenge bringen + // Daten auf gleiche Laenge bringen SCSIZE nMax = 0; for (nArrX=0; nArrX<nColCount; nArrX++) @@ -359,7 +359,7 @@ void ScConsData::AddName( const String& rName ) ppRefs[nArrX][nArrY].SetFullSize(nMax); } - // Positionen eintragen + // Positionen eintragen if (ppTitlePos) if (nTitleCount < nDataCount) @@ -540,7 +540,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab, SCCOL nCol; SCROW nRow; - // Ecke links oben + // Ecke links oben if ( bColByName && bRowByName ) { @@ -558,15 +558,15 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab, } } - // Titel suchen + // Titel suchen SCCOL nStartCol = nCol1; SCROW nStartRow = nRow1; - if (bColByName) ++nStartRow; - if (bRowByName) ++nStartCol; + if (bColByName) ++nStartRow; + if (bRowByName) ++nStartCol; String aTitle; - SCCOL* pDestCols = NULL; - SCROW* pDestRows = NULL; + SCCOL* pDestCols = NULL; + SCROW* pDestRows = NULL; if (bColByName) { pDestCols = new SCCOL[nCol2-nStartCol+1]; @@ -612,19 +612,19 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab, nCol1 = nStartCol; nRow1 = nStartRow; - // Daten + // Daten BOOL bAnyCell = ( eFunction == SUBTOTAL_FUNC_CNT2 ); for (nCol=nCol1; nCol<=nCol2; nCol++) { SCCOL nArrX = nCol-nCol1; - if (bColByName) nArrX = pDestCols[nArrX]; + if (bColByName) nArrX = pDestCols[nArrX]; if (nArrX != SC_CONS_NOTFOUND) { for (nRow=nRow1; nRow<=nRow2; nRow++) { SCROW nArrY = nRow-nRow1; - if (bRowByName) nArrY = pDestRows[nArrY]; + if (bRowByName) nArrY = pDestRows[nArrY]; if ( nArrY != SC_CONS_NOTFOUND && ( bAnyCell ? pSrcDoc->HasData( nCol, nRow, nTab ) : pSrcDoc->HasValueData( nCol, nRow, nTab ) ) ) @@ -665,7 +665,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab, delete[] pDestRows; } -// vorher testen, wieviele Zeilen eingefuegt werden (fuer Undo) +// vorher testen, wieviele Zeilen eingefuegt werden (fuer Undo) SCROW ScConsData::GetInsertCount() const { @@ -687,8 +687,8 @@ SCROW ScConsData::GetInsertCount() const return nInsert; } -// fertige Daten ins Dokument schreiben -//! optimieren nach Spalten? +// fertige Daten ins Dokument schreiben +//! optimieren nach Spalten? void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, SCTAB nTab ) { @@ -697,17 +697,17 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, SCSIZE nArrX; SCSIZE nArrY; - // Ecke links oben + // Ecke links oben if ( bColByName && bRowByName && aCornerText.Len() ) pDestDoc->SetString( nCol, nRow, nTab, aCornerText ); - // Titel + // Titel SCCOL nStartCol = nCol; SCROW nStartRow = nRow; - if (bColByName) ++nStartRow; - if (bRowByName) ++nStartCol; + if (bColByName) ++nStartRow; + if (bRowByName) ++nStartCol; if (bColByName) for (SCSIZE i=0; i<nColCount; i++) @@ -719,9 +719,9 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, nCol = nStartCol; nRow = nStartRow; - // Daten + // Daten - if ( ppCount && ppUsed ) // Werte direkt einfuegen + if ( ppCount && ppUsed ) // Werte direkt einfuegen { for (nArrX=0; nArrX<nColCount; nArrX++) for (nArrY=0; nArrY<nRowCount; nArrY++) @@ -739,16 +739,16 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, } } - if ( ppRefs && ppUsed ) // Referenzen einfuegen + if ( ppRefs && ppUsed ) // Referenzen einfuegen { //! unterscheiden, ob nach Kategorien aufgeteilt String aString; - ScSingleRefData aSRef; // Daten fuer Referenz-Formelzellen + ScSingleRefData aSRef; // Daten fuer Referenz-Formelzellen aSRef.InitFlags(); aSRef.SetFlag3D(TRUE); - ScComplexRefData aCRef; // Daten fuer Summen-Zellen + ScComplexRefData aCRef; // Daten fuer Summen-Zellen aCRef.InitFlags(); aCRef.Ref1.SetColRel(TRUE); aCRef.Ref1.SetRowRel(TRUE); aCRef.Ref1.SetTabRel(TRUE); aCRef.Ref2.SetColRel(TRUE); aCRef.Ref2.SetRowRel(TRUE); aCRef.Ref2.SetTabRel(TRUE); @@ -776,7 +776,7 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, ScReferenceEntry aRef = rList.GetEntry(nPos); if (aRef.nTab != SC_CONS_NOTFOUND) { - // Referenz einfuegen (absolut, 3d) + // Referenz einfuegen (absolut, 3d) aSRef.nCol = aRef.nCol; aSRef.nRow = aRef.nRow; @@ -792,7 +792,7 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, } } - // Summe einfuegen (relativ, nicht 3d) + // Summe einfuegen (relativ, nicht 3d) ScAddress aDest( sal::static_int_cast<SCCOL>(nCol+nArrX), sal::static_int_cast<SCROW>(nRow+nArrY+nNeeded), nTab ); @@ -804,7 +804,7 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, aCRef.CalcRelFromAbs( aDest ); ScTokenArray aArr; - aArr.AddOpCode(eOpCode); // ausgewaehlte Funktion + aArr.AddOpCode(eOpCode); // ausgewaehlte Funktion aArr.AddOpCode(ocOpen); aArr.AddDoubleReference(aCRef); aArr.AddOpCode(ocClose); @@ -814,7 +814,7 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, } } - // Gliederung einfuegen + // Gliederung einfuegen ScOutlineArray* pOutArr = pDestDoc->GetOutlineTable( nTab, TRUE )->GetRowArray(); SCROW nOutStart = nRow+nArrY; @@ -827,7 +827,7 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, pDestDoc->SetDrawPageSize(nTab); pDestDoc->UpdateOutlineRow( nOutStart, nOutEnd, nTab, FALSE ); - // Zwischentitel + // Zwischentitel if (ppTitlePos && ppTitles && ppRowHeaders) { @@ -838,7 +838,7 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, BOOL bDo = TRUE; if (nPos+1<nDataCount) if (ppTitlePos[nArrY][nPos+1] == nTPos) - bDo = FALSE; // leer + bDo = FALSE; // leer if ( bDo && nTPos < nNeeded ) { aString = *ppRowHeaders[nArrY]; diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx index 3bd737b2c572..a348dff2c184 100644 --- a/sc/source/core/tool/dbcolect.cxx +++ b/sc/source/core/tool/dbcolect.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,22 +48,22 @@ ScDBData::ScDBData( const String& rName, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, BOOL bByR, BOOL bHasH) : - aName (rName), - nTable (nTab), - nStartCol (nCol1), - nStartRow (nRow1), - nEndCol (nCol2), - nEndRow (nRow2), - bByRow (bByR), - bHasHeader (bHasH), - bDoSize (FALSE), - bKeepFmt (FALSE), - bStripData (FALSE), - bIsAdvanced (FALSE), + aName (rName), + nTable (nTab), + nStartCol (nCol1), + nStartRow (nRow1), + nEndCol (nCol2), + nEndRow (nRow2), + bByRow (bByR), + bHasHeader (bHasH), + bDoSize (FALSE), + bKeepFmt (FALSE), + bStripData (FALSE), + bIsAdvanced (FALSE), bDBSelection(FALSE), - nIndex (0), + nIndex (0), bAutoFilter (FALSE), - bModified (FALSE) + bModified (FALSE) { USHORT i; @@ -90,87 +90,87 @@ ScDBData::ScDBData( const String& rName, ScDBData::ScDBData( const ScDBData& rData ) : ScDataObject(), - ScRefreshTimer ( rData ), - aName (rData.aName), - nTable (rData.nTable), - nStartCol (rData.nStartCol), - nStartRow (rData.nStartRow), - nEndCol (rData.nEndCol), - nEndRow (rData.nEndRow), - bByRow (rData.bByRow), - bHasHeader (rData.bHasHeader), - bDoSize (rData.bDoSize), - bKeepFmt (rData.bKeepFmt), - bStripData (rData.bStripData), - bSortCaseSens (rData.bSortCaseSens), - bSortNaturalSort (rData.bSortNaturalSort), - bIncludePattern (rData.bIncludePattern), - bSortInplace (rData.bSortInplace), - bSortUserDef (rData.bSortUserDef), - nSortUserIndex (rData.nSortUserIndex), - nSortDestTab (rData.nSortDestTab), - nSortDestCol (rData.nSortDestCol), - nSortDestRow (rData.nSortDestRow), - aSortLocale (rData.aSortLocale), - aSortAlgorithm (rData.aSortAlgorithm), - bQueryInplace (rData.bQueryInplace), - bQueryCaseSens (rData.bQueryCaseSens), - bQueryRegExp (rData.bQueryRegExp), - bQueryDuplicate (rData.bQueryDuplicate), - nQueryDestTab (rData.nQueryDestTab), - nQueryDestCol (rData.nQueryDestCol), - nQueryDestRow (rData.nQueryDestRow), - bIsAdvanced (rData.bIsAdvanced), - aAdvSource (rData.aAdvSource), - bSubRemoveOnly (rData.bSubRemoveOnly), - bSubReplace (rData.bSubReplace), - bSubPagebreak (rData.bSubPagebreak), - bSubCaseSens (rData.bSubCaseSens), - bSubDoSort (rData.bSubDoSort), - bSubAscending (rData.bSubAscending), - bSubIncludePattern (rData.bSubIncludePattern), - bSubUserDef (rData.bSubUserDef), - nSubUserIndex (rData.nSubUserIndex), - bDBImport (rData.bDBImport), - aDBName (rData.aDBName), - aDBStatement (rData.aDBStatement), - bDBNative (rData.bDBNative), - bDBSelection (rData.bDBSelection), - bDBSql (rData.bDBSql), - nDBType (rData.nDBType), - nIndex (rData.nIndex), - bAutoFilter (rData.bAutoFilter), - bModified (rData.bModified) + ScRefreshTimer ( rData ), + aName (rData.aName), + nTable (rData.nTable), + nStartCol (rData.nStartCol), + nStartRow (rData.nStartRow), + nEndCol (rData.nEndCol), + nEndRow (rData.nEndRow), + bByRow (rData.bByRow), + bHasHeader (rData.bHasHeader), + bDoSize (rData.bDoSize), + bKeepFmt (rData.bKeepFmt), + bStripData (rData.bStripData), + bSortCaseSens (rData.bSortCaseSens), + bSortNaturalSort (rData.bSortNaturalSort), + bIncludePattern (rData.bIncludePattern), + bSortInplace (rData.bSortInplace), + bSortUserDef (rData.bSortUserDef), + nSortUserIndex (rData.nSortUserIndex), + nSortDestTab (rData.nSortDestTab), + nSortDestCol (rData.nSortDestCol), + nSortDestRow (rData.nSortDestRow), + aSortLocale (rData.aSortLocale), + aSortAlgorithm (rData.aSortAlgorithm), + bQueryInplace (rData.bQueryInplace), + bQueryCaseSens (rData.bQueryCaseSens), + bQueryRegExp (rData.bQueryRegExp), + bQueryDuplicate (rData.bQueryDuplicate), + nQueryDestTab (rData.nQueryDestTab), + nQueryDestCol (rData.nQueryDestCol), + nQueryDestRow (rData.nQueryDestRow), + bIsAdvanced (rData.bIsAdvanced), + aAdvSource (rData.aAdvSource), + bSubRemoveOnly (rData.bSubRemoveOnly), + bSubReplace (rData.bSubReplace), + bSubPagebreak (rData.bSubPagebreak), + bSubCaseSens (rData.bSubCaseSens), + bSubDoSort (rData.bSubDoSort), + bSubAscending (rData.bSubAscending), + bSubIncludePattern (rData.bSubIncludePattern), + bSubUserDef (rData.bSubUserDef), + nSubUserIndex (rData.nSubUserIndex), + bDBImport (rData.bDBImport), + aDBName (rData.aDBName), + aDBStatement (rData.aDBStatement), + bDBNative (rData.bDBNative), + bDBSelection (rData.bDBSelection), + bDBSql (rData.bDBSql), + nDBType (rData.nDBType), + nIndex (rData.nIndex), + bAutoFilter (rData.bAutoFilter), + bModified (rData.bModified) { USHORT i; USHORT j; for (i=0; i<MAXSORT; i++) { - bDoSort[i] = rData.bDoSort[i]; - nSortField[i] = rData.nSortField[i]; - bAscending[i] = rData.bAscending[i]; + bDoSort[i] = rData.bDoSort[i]; + nSortField[i] = rData.nSortField[i]; + bAscending[i] = rData.bAscending[i]; } for (i=0; i<MAXQUERY; i++) { - bDoQuery[i] = rData.bDoQuery[i]; - nQueryField[i] = rData.nQueryField[i]; - eQueryOp[i] = rData.eQueryOp[i]; - bQueryByString[i] = rData.bQueryByString[i]; + bDoQuery[i] = rData.bDoQuery[i]; + nQueryField[i] = rData.nQueryField[i]; + eQueryOp[i] = rData.eQueryOp[i]; + bQueryByString[i] = rData.bQueryByString[i]; bQueryByDate[i] = rData.bQueryByDate[i]; - pQueryStr[i] = new String( *(rData.pQueryStr[i]) ); - nQueryVal[i] = rData.nQueryVal[i]; - eQueryConnect[i] = rData.eQueryConnect[i]; + pQueryStr[i] = new String( *(rData.pQueryStr[i]) ); + nQueryVal[i] = rData.nQueryVal[i]; + eQueryConnect[i] = rData.eQueryConnect[i]; } for (i=0; i<MAXSUBTOTAL; i++) { - bDoSubTotal[i] = rData.bDoSubTotal[i]; - nSubField[i] = rData.nSubField[i]; + bDoSubTotal[i] = rData.bDoSubTotal[i]; + nSubField[i] = rData.nSubField[i]; - SCCOL nCount = rData.nSubTotals[i]; - nSubTotals[i] = nCount; - pFunctions[i] = nCount > 0 ? new ScSubTotalFunc [nCount] : NULL; - pSubTotals[i] = nCount > 0 ? new SCCOL [nCount] : NULL; + SCCOL nCount = rData.nSubTotals[i]; + nSubTotals[i] = nCount; + pFunctions[i] = nCount > 0 ? new ScSubTotalFunc [nCount] : NULL; + pSubTotals[i] = nCount > 0 ? new SCCOL [nCount] : NULL; for (j=0; j<nCount; j++) { @@ -186,84 +186,84 @@ ScDBData& ScDBData::operator= (const ScDBData& rData) USHORT j; ScRefreshTimer::operator=( rData ); - aName = rData.aName; - nTable = rData.nTable; - nStartCol = rData.nStartCol; - nStartRow = rData.nStartRow; - nEndCol = rData.nEndCol; - nEndRow = rData.nEndRow; - bByRow = rData.bByRow; - bHasHeader = rData.bHasHeader; - bDoSize = rData.bDoSize; - bKeepFmt = rData.bKeepFmt; - bStripData = rData.bStripData; - bSortCaseSens = rData.bSortCaseSens; - bSortNaturalSort = rData.bSortNaturalSort; - bIncludePattern = rData.bIncludePattern; - bSortInplace = rData.bSortInplace; - nSortDestTab = rData.nSortDestTab; - nSortDestCol = rData.nSortDestCol; - nSortDestRow = rData.nSortDestRow; - bSortUserDef = rData.bSortUserDef; - nSortUserIndex = rData.nSortUserIndex; - aSortLocale = rData.aSortLocale; - aSortAlgorithm = rData.aSortAlgorithm; - bQueryInplace = rData.bQueryInplace; - bQueryCaseSens = rData.bQueryCaseSens; - bQueryRegExp = rData.bQueryRegExp; - bQueryDuplicate = rData.bQueryDuplicate; - nQueryDestTab = rData.nQueryDestTab; - nQueryDestCol = rData.nQueryDestCol; - nQueryDestRow = rData.nQueryDestRow; - bIsAdvanced = rData.bIsAdvanced; - aAdvSource = rData.aAdvSource; - bSubRemoveOnly = rData.bSubRemoveOnly; - bSubReplace = rData.bSubReplace; - bSubPagebreak = rData.bSubPagebreak; - bSubCaseSens = rData.bSubCaseSens; - bSubDoSort = rData.bSubDoSort; - bSubAscending = rData.bSubAscending; - bSubIncludePattern = rData.bSubIncludePattern; - bSubUserDef = rData.bSubUserDef; - nSubUserIndex = rData.nSubUserIndex; - bDBImport = rData.bDBImport; - aDBName = rData.aDBName; - aDBStatement = rData.aDBStatement; - bDBNative = rData.bDBNative; - bDBSelection = rData.bDBSelection; - bDBSql = rData.bDBSql; - nDBType = rData.nDBType; - nIndex = rData.nIndex; + aName = rData.aName; + nTable = rData.nTable; + nStartCol = rData.nStartCol; + nStartRow = rData.nStartRow; + nEndCol = rData.nEndCol; + nEndRow = rData.nEndRow; + bByRow = rData.bByRow; + bHasHeader = rData.bHasHeader; + bDoSize = rData.bDoSize; + bKeepFmt = rData.bKeepFmt; + bStripData = rData.bStripData; + bSortCaseSens = rData.bSortCaseSens; + bSortNaturalSort = rData.bSortNaturalSort; + bIncludePattern = rData.bIncludePattern; + bSortInplace = rData.bSortInplace; + nSortDestTab = rData.nSortDestTab; + nSortDestCol = rData.nSortDestCol; + nSortDestRow = rData.nSortDestRow; + bSortUserDef = rData.bSortUserDef; + nSortUserIndex = rData.nSortUserIndex; + aSortLocale = rData.aSortLocale; + aSortAlgorithm = rData.aSortAlgorithm; + bQueryInplace = rData.bQueryInplace; + bQueryCaseSens = rData.bQueryCaseSens; + bQueryRegExp = rData.bQueryRegExp; + bQueryDuplicate = rData.bQueryDuplicate; + nQueryDestTab = rData.nQueryDestTab; + nQueryDestCol = rData.nQueryDestCol; + nQueryDestRow = rData.nQueryDestRow; + bIsAdvanced = rData.bIsAdvanced; + aAdvSource = rData.aAdvSource; + bSubRemoveOnly = rData.bSubRemoveOnly; + bSubReplace = rData.bSubReplace; + bSubPagebreak = rData.bSubPagebreak; + bSubCaseSens = rData.bSubCaseSens; + bSubDoSort = rData.bSubDoSort; + bSubAscending = rData.bSubAscending; + bSubIncludePattern = rData.bSubIncludePattern; + bSubUserDef = rData.bSubUserDef; + nSubUserIndex = rData.nSubUserIndex; + bDBImport = rData.bDBImport; + aDBName = rData.aDBName; + aDBStatement = rData.aDBStatement; + bDBNative = rData.bDBNative; + bDBSelection = rData.bDBSelection; + bDBSql = rData.bDBSql; + nDBType = rData.nDBType; + nIndex = rData.nIndex; bAutoFilter = rData.bAutoFilter; for (i=0; i<MAXSORT; i++) { - bDoSort[i] = rData.bDoSort[i]; - nSortField[i] = rData.nSortField[i]; - bAscending[i] = rData.bAscending[i]; + bDoSort[i] = rData.bDoSort[i]; + nSortField[i] = rData.nSortField[i]; + bAscending[i] = rData.bAscending[i]; } for (i=0; i<MAXQUERY; i++) { - bDoQuery[i] = rData.bDoQuery[i]; - nQueryField[i] = rData.nQueryField[i]; - eQueryOp[i] = rData.eQueryOp[i]; - bQueryByString[i] = rData.bQueryByString[i]; + bDoQuery[i] = rData.bDoQuery[i]; + nQueryField[i] = rData.nQueryField[i]; + eQueryOp[i] = rData.eQueryOp[i]; + bQueryByString[i] = rData.bQueryByString[i]; bQueryByDate[i] = rData.bQueryByDate[i]; - *pQueryStr[i] = *rData.pQueryStr[i]; - nQueryVal[i] = rData.nQueryVal[i]; - eQueryConnect[i] = rData.eQueryConnect[i]; + *pQueryStr[i] = *rData.pQueryStr[i]; + nQueryVal[i] = rData.nQueryVal[i]; + eQueryConnect[i] = rData.eQueryConnect[i]; } for (i=0; i<MAXSUBTOTAL; i++) { - bDoSubTotal[i] = rData.bDoSubTotal[i]; - nSubField[i] = rData.nSubField[i]; - SCCOL nCount = rData.nSubTotals[i]; - nSubTotals[i] = nCount; + bDoSubTotal[i] = rData.bDoSubTotal[i]; + nSubField[i] = rData.nSubField[i]; + SCCOL nCount = rData.nSubTotals[i]; + nSubTotals[i] = nCount; delete[] pSubTotals[i]; delete[] pFunctions[i]; - pSubTotals[i] = nCount > 0 ? new SCCOL [nCount] : NULL; + pSubTotals[i] = nCount > 0 ? new SCCOL [nCount] : NULL; pFunctions[i] = nCount > 0 ? new ScSubTotalFunc [nCount] : NULL; for (j=0; j<nCount; j++) { @@ -277,13 +277,13 @@ ScDBData& ScDBData::operator= (const ScDBData& rData) BOOL ScDBData::operator== (const ScDBData& rData) const { - // Daten, die nicht in den Params sind + // Daten, die nicht in den Params sind - if ( nTable != rData.nTable || - bDoSize != rData.bDoSize || - bKeepFmt != rData.bKeepFmt || + if ( nTable != rData.nTable || + bDoSize != rData.bDoSize || + bKeepFmt != rData.bKeepFmt || bIsAdvanced!= rData.bIsAdvanced|| - bStripData != rData.bStripData || + bStripData != rData.bStripData || // SAB: I think this should be here, but I don't want to break something // bAutoFilter!= rData.bAutoFilter|| ScRefreshTimer::operator!=( rData ) @@ -391,7 +391,7 @@ void ScDBData::GetArea(ScRange& rRange, bool bUseDynamicRange) const void ScDBData::SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) { - nTable = nTab; + nTable = nTab; nStartCol = nCol1; nStartRow = nRow1; nEndCol = nCol2; @@ -418,7 +418,7 @@ void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n if (nSortField[i] > nSortEnd) { nSortField[i] = 0; - bDoSort[i] = FALSE; + bDoSort[i] = FALSE; } } for (i=0; i<MAXQUERY; i++) @@ -427,7 +427,7 @@ void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n if (nQueryField[i] > nCol2) { nQueryField[i] = 0; - bDoQuery[i] = FALSE; + bDoQuery[i] = FALSE; } } for (i=0; i<MAXSUBTOTAL; i++) @@ -458,12 +458,12 @@ void ScDBData::GetSortParam( ScSortParam& rSortParam ) const rSortParam.nDestCol = nSortDestCol; rSortParam.nDestRow = nSortDestRow; rSortParam.bIncludePattern = bIncludePattern; - rSortParam.bUserDef = bSortUserDef; + rSortParam.bUserDef = bSortUserDef; rSortParam.nUserIndex = nSortUserIndex; for (USHORT i=0; i<MAXSORT; i++) { - rSortParam.bDoSort[i] = bDoSort[i]; - rSortParam.nField[i] = nSortField[i]; + rSortParam.bDoSort[i] = bDoSort[i]; + rSortParam.nField[i] = nSortField[i]; rSortParam.bAscending[i] = bAscending[i]; } rSortParam.aCollatorLocale = aSortLocale; @@ -483,7 +483,7 @@ void ScDBData::SetSortParam( const ScSortParam& rSortParam ) nSortUserIndex = rSortParam.nUserIndex; for (USHORT i=0; i<MAXSORT; i++) { - bDoSort[i] = rSortParam.bDoSort[i]; + bDoSort[i] = rSortParam.bDoSort[i]; nSortField[i] = rSortParam.nField[i]; bAscending[i] = rSortParam.bAscending[i]; } @@ -534,8 +534,8 @@ void ScDBData::SetQueryParam(const ScQueryParam& rQueryParam) !rQueryParam.GetEntry(MAXQUERY).bDoQuery, "zuviele Eintraege bei ScDBData::SetQueryParam" ); - // set bIsAdvanced to FALSE for everything that is not from the - // advanced filter dialog + // set bIsAdvanced to FALSE for everything that is not from the + // advanced filter dialog bIsAdvanced = FALSE; bQueryInplace = rQueryParam.bInplace; @@ -587,20 +587,20 @@ void ScDBData::GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const rSubTotalParam.nCol2 = nEndCol; rSubTotalParam.nRow2 = nEndRow; - rSubTotalParam.bRemoveOnly = bSubRemoveOnly; - rSubTotalParam.bReplace = bSubReplace; - rSubTotalParam.bPagebreak = bSubPagebreak; - rSubTotalParam.bCaseSens = bSubCaseSens; - rSubTotalParam.bDoSort = bSubDoSort; - rSubTotalParam.bAscending = bSubAscending; - rSubTotalParam.bIncludePattern = bSubIncludePattern; - rSubTotalParam.bUserDef = bSubUserDef; - rSubTotalParam.nUserIndex = nSubUserIndex; + rSubTotalParam.bRemoveOnly = bSubRemoveOnly; + rSubTotalParam.bReplace = bSubReplace; + rSubTotalParam.bPagebreak = bSubPagebreak; + rSubTotalParam.bCaseSens = bSubCaseSens; + rSubTotalParam.bDoSort = bSubDoSort; + rSubTotalParam.bAscending = bSubAscending; + rSubTotalParam.bIncludePattern = bSubIncludePattern; + rSubTotalParam.bUserDef = bSubUserDef; + rSubTotalParam.nUserIndex = nSubUserIndex; for (i=0; i<MAXSUBTOTAL; i++) { - rSubTotalParam.bGroupActive[i] = bDoSubTotal[i]; - rSubTotalParam.nField[i] = nSubField[i]; + rSubTotalParam.bGroupActive[i] = bDoSubTotal[i]; + rSubTotalParam.nField[i] = nSubField[i]; SCCOL nCount = nSubTotals[i]; rSubTotalParam.nSubTotals[i] = nCount; @@ -622,26 +622,26 @@ void ScDBData::SetSubTotalParam(const ScSubTotalParam& rSubTotalParam) USHORT i; USHORT j; - bSubRemoveOnly = rSubTotalParam.bRemoveOnly; - bSubReplace = rSubTotalParam.bReplace; - bSubPagebreak = rSubTotalParam.bPagebreak; - bSubCaseSens = rSubTotalParam.bCaseSens; - bSubDoSort = rSubTotalParam.bDoSort; - bSubAscending = rSubTotalParam.bAscending; - bSubIncludePattern = rSubTotalParam.bIncludePattern; - bSubUserDef = rSubTotalParam.bUserDef; - nSubUserIndex = rSubTotalParam.nUserIndex; + bSubRemoveOnly = rSubTotalParam.bRemoveOnly; + bSubReplace = rSubTotalParam.bReplace; + bSubPagebreak = rSubTotalParam.bPagebreak; + bSubCaseSens = rSubTotalParam.bCaseSens; + bSubDoSort = rSubTotalParam.bDoSort; + bSubAscending = rSubTotalParam.bAscending; + bSubIncludePattern = rSubTotalParam.bIncludePattern; + bSubUserDef = rSubTotalParam.bUserDef; + nSubUserIndex = rSubTotalParam.nUserIndex; for (i=0; i<MAXSUBTOTAL; i++) { - bDoSubTotal[i] = rSubTotalParam.bGroupActive[i]; - nSubField[i] = rSubTotalParam.nField[i]; + bDoSubTotal[i] = rSubTotalParam.bGroupActive[i]; + nSubField[i] = rSubTotalParam.nField[i]; SCCOL nCount = rSubTotalParam.nSubTotals[i]; nSubTotals[i] = nCount; delete[] pSubTotals[i]; delete[] pFunctions[i]; - pSubTotals[i] = nCount > 0 ? new SCCOL [nCount] : NULL; + pSubTotals[i] = nCount > 0 ? new SCCOL [nCount] : NULL; pFunctions[i] = nCount > 0 ? new ScSubTotalFunc [nCount] : NULL; for (j=0; j<nCount; j++) { @@ -658,22 +658,22 @@ void ScDBData::GetImportParam(ScImportParam& rImportParam) const rImportParam.nCol2 = nEndCol; rImportParam.nRow2 = nEndRow; - rImportParam.bImport = bDBImport; - rImportParam.aDBName = aDBName; - rImportParam.aStatement = aDBStatement; - rImportParam.bNative = bDBNative; - rImportParam.bSql = bDBSql; - rImportParam.nType = nDBType; + rImportParam.bImport = bDBImport; + rImportParam.aDBName = aDBName; + rImportParam.aStatement = aDBStatement; + rImportParam.bNative = bDBNative; + rImportParam.bSql = bDBSql; + rImportParam.nType = nDBType; } void ScDBData::SetImportParam(const ScImportParam& rImportParam) { - bDBImport = rImportParam.bImport; - aDBName = rImportParam.aDBName; - aDBStatement = rImportParam.aStatement; - bDBNative = rImportParam.bNative; - bDBSql = rImportParam.bSql; - nDBType = rImportParam.nType; + bDBImport = rImportParam.bImport; + aDBName = rImportParam.aDBName; + aDBStatement = rImportParam.aStatement; + bDBNative = rImportParam.bNative; + bDBSql = rImportParam.bSql; + nDBType = rImportParam.nType; } BOOL ScDBData::IsDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bStartOnly) const @@ -697,14 +697,14 @@ BOOL ScDBData::IsDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR && (nCol2 == nEndCol) && (nRow2 == nEndRow)); } -ScDataObject* ScDBData::Clone() const +ScDataObject* ScDBData::Clone() const { return new ScDBData(*this); } //--------------------------------------------------------------------------------------- -// Compare zum Sortieren +// Compare zum Sortieren short ScDBCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const { @@ -713,7 +713,7 @@ short ScDBCollection::Compare(ScDataObject* pKey1, ScDataObject* pKey2) const return (short) ScGlobal::GetpTransliteration()->compareString( rStr1, rStr2 ); } -// IsEqual - alles gleich +// IsEqual - alles gleich BOOL ScDBCollection::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const { @@ -737,7 +737,7 @@ ScDBData* ScDBCollection::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL return pDB; } } - return pNoNameData; // "unbenannt" nur zurueck, wenn sonst nichts gefunden + return pNoNameData; // "unbenannt" nur zurueck, wenn sonst nichts gefunden } ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const @@ -757,7 +757,7 @@ ScDBData* ScDBCollection::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCO return pDB; } } - return pNoNameData; // "unbenannt" nur zurueck, wenn sonst nichts gefunden + return pNoNameData; // "unbenannt" nur zurueck, wenn sonst nichts gefunden } BOOL ScDBCollection::SearchName( const String& rName, USHORT& rIndex ) const @@ -818,40 +818,40 @@ void ScDBCollection::UpdateReference(UpdateRefMode eUpdateRefMode, aAdvSource.aEnd.Set( theCol2,theRow2,theTab2 ); ((ScDBData*)pItems[i])->SetAdvancedQuerySource( &aAdvSource ); - bDoUpdate = TRUE; // DBData is modified + bDoUpdate = TRUE; // DBData is modified } } ((ScDBData*)pItems[i])->SetModified(bDoUpdate); - //! Testen, ob mitten aus dem Bereich geloescht/eingefuegt wurde !!! + //! Testen, ob mitten aus dem Bereich geloescht/eingefuegt wurde !!! } } void ScDBCollection::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ) { - // wenn nOldPos vor nNewPos liegt, ist nNewPos schon angepasst + // wenn nOldPos vor nNewPos liegt, ist nNewPos schon angepasst for (USHORT i=0; i<nCount; i++) { ScRange aRange; ScDBData* pData = (ScDBData*)pItems[i]; pData->GetArea( aRange ); - SCTAB nTab = aRange.aStart.Tab(); // hat nur eine Tabelle + SCTAB nTab = aRange.aStart.Tab(); // hat nur eine Tabelle - // anpassen wie die aktuelle Tabelle bei ScTablesHint (tabvwsh5.cxx) + // anpassen wie die aktuelle Tabelle bei ScTablesHint (tabvwsh5.cxx) - if ( nTab == nOldPos ) // verschobene Tabelle + if ( nTab == nOldPos ) // verschobene Tabelle nTab = nNewPos; - else if ( nOldPos < nNewPos ) // nach hinten verschoben + else if ( nOldPos < nNewPos ) // nach hinten verschoben { - if ( nTab > nOldPos && nTab <= nNewPos ) // nachrueckender Bereich + if ( nTab > nOldPos && nTab <= nNewPos ) // nachrueckender Bereich --nTab; } - else // nach vorne verschoben + else // nach vorne verschoben { - if ( nTab >= nNewPos && nTab < nOldPos ) // nachrueckender Bereich + if ( nTab >= nNewPos && nTab < nOldPos ) // nachrueckender Bereich ++nTab; } @@ -860,7 +860,7 @@ void ScDBCollection::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ) pData->SetArea( nTab, aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(),aRange.aEnd .Row() ); - // MoveTo ist nicht noetig, wenn nur die Tabelle geaendert ist + // MoveTo ist nicht noetig, wenn nur die Tabelle geaendert ist pData->SetModified(bChanged); } @@ -882,7 +882,7 @@ ScDBData* ScDBCollection::FindIndex(USHORT nIndex) BOOL ScDBCollection::Insert(ScDataObject* pScDataObject) { ScDBData* pData = (ScDBData*) pScDataObject; - if (!pData->GetIndex()) // schon gesetzt? + if (!pData->GetIndex()) // schon gesetzt? pData->SetIndex(nEntryIndex++); BOOL bInserted = ScSortedCollection::Insert(pScDataObject); if ( bInserted && pData->HasImportParam() && !pData->HasImportSelection() ) diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index 00b97d430f0c..56ac77fa2c7c 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ TYPEINIT2(ScDdeLink,::sfx2::SvBaseLink,SfxBroadcaster); -#define DDE_TXT_ENCODING gsl_getSystemTextEncoding() +#define DDE_TXT_ENCODING gsl_getSystemTextEncoding() BOOL ScDdeLink::bIsInUpdate = FALSE; @@ -77,13 +77,13 @@ __EXPORT ScDdeLink::~ScDdeLink() ScDdeLink::ScDdeLink( ScDocument* pD, const ScDdeLink& rOther ) : ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ALWAYS,FORMAT_STRING), - pDoc ( pD ), - aAppl ( rOther.aAppl ), - aTopic ( rOther.aTopic ), - aItem ( rOther.aItem ), - nMode ( rOther.nMode ), + pDoc ( pD ), + aAppl ( rOther.aAppl ), + aTopic ( rOther.aTopic ), + aItem ( rOther.aItem ), + nMode ( rOther.nMode ), bNeedUpdate( FALSE ), - pResult ( NULL ) + pResult ( NULL ) { if (rOther.pResult) pResult = rOther.pResult->Clone(); @@ -107,7 +107,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& r if ( bHasValue ) pResult = new ScMatrix( rStream ); - if (rHdr.BytesLeft()) // neu in 388b und der 364w (RealTime-Client) Version + if (rHdr.BytesLeft()) // neu in 388b und der 364w (RealTime-Client) Version rStream >> nMode; else nMode = SC_DDE_DEFAULT; @@ -129,11 +129,11 @@ void ScDdeLink::Store( SvStream& rStream, ScMultipleWriteHeader& rHdr ) const if (bHasValue) pResult->Store( rStream ); - if( rStream.GetVersion() > SOFFICE_FILEFORMAT_40 ) // nicht bei 4.0 Export - rStream << nMode; // seit 388b + if( rStream.GetVersion() > SOFFICE_FILEFORMAT_40 ) // nicht bei 4.0 Export + rStream << nMode; // seit 388b - // Links mit Mode != SC_DDE_DEFAULT werden bei 4.0 Export komplett weggelassen - // (aus ScDocument::SaveDdeLinks) + // Links mit Mode != SC_DDE_DEFAULT werden bei 4.0 Export komplett weggelassen + // (aus ScDocument::SaveDdeLinks) rHdr.EndEntry(); } @@ -141,7 +141,7 @@ void ScDdeLink::Store( SvStream& rStream, ScMultipleWriteHeader& rHdr ) const void __EXPORT ScDdeLink::DataChanged( const String& rMimeType, const ::com::sun::star::uno::Any & rValue ) { - // wir koennen nur Strings... + // wir koennen nur Strings... if ( FORMAT_STRING != SotExchange::GetFormatIdFromMimeType( rMimeType )) return; @@ -149,14 +149,14 @@ void __EXPORT ScDdeLink::DataChanged( const String& rMimeType, ScByteSequenceToString::GetString( aLinkStr, rValue, DDE_TXT_ENCODING ); aLinkStr.ConvertLineEnd(LINEEND_LF); - // wenn String mit Zeilenende aufhoert, streichen: + // wenn String mit Zeilenende aufhoert, streichen: xub_StrLen nLen = aLinkStr.Len(); if (nLen && aLinkStr.GetChar(nLen-1) == '\n') aLinkStr.Erase(nLen-1); String aLine; - SCSIZE nCols = 1; // Leerstring -> eine leere Zelle + SCSIZE nCols = 1; // Leerstring -> eine leere Zelle SCSIZE nRows = 1; if (aLinkStr.Len()) { @@ -166,25 +166,25 @@ void __EXPORT ScDdeLink::DataChanged( const String& rMimeType, nCols = static_cast<SCSIZE>(aLine.GetTokenCount( '\t' )); } - if (!nRows || !nCols) // keine Daten + if (!nRows || !nCols) // keine Daten { pResult.Clear(); } - else // Daten aufteilen + else // Daten aufteilen { - // Matrix immer neu anlegen, damit bIsString nicht durcheinanderkommt + // Matrix immer neu anlegen, damit bIsString nicht durcheinanderkommt pResult = new ScMatrix( nCols, nRows ); SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); - // nMode bestimmt, wie der Text interpretiert wird (#44455#/#49783#): - // SC_DDE_DEFAULT - Zahlformat aus Zellvorlage "Standard" - // SC_DDE_ENGLISH - Standard-Zahlformat fuer English/US - // SC_DDE_TEXT - ohne NumberFormatter direkt als String + // nMode bestimmt, wie der Text interpretiert wird (#44455#/#49783#): + // SC_DDE_DEFAULT - Zahlformat aus Zellvorlage "Standard" + // SC_DDE_ENGLISH - Standard-Zahlformat fuer English/US + // SC_DDE_TEXT - ohne NumberFormatter direkt als String ULONG nStdFormat = 0; if ( nMode == SC_DDE_DEFAULT ) { - ScPatternAttr* pDefPattern = pDoc->GetDefPattern(); // enthaelt Standard-Vorlage + ScPatternAttr* pDefPattern = pDoc->GetDefPattern(); // enthaelt Standard-Vorlage if ( pDefPattern ) nStdFormat = pDefPattern->GetNumberFormat( pFormatter ); } @@ -208,22 +208,22 @@ void __EXPORT ScDdeLink::DataChanged( const String& rMimeType, } } - // Es hat sich was getan... + // Es hat sich was getan... if (HasListeners()) { Broadcast( ScHint( SC_HINT_DATACHANGED, ScAddress(), NULL ) ); - pDoc->TrackFormulas(); // muss sofort passieren + pDoc->TrackFormulas(); // muss sofort passieren pDoc->StartTrackTimer(); - // StartTrackTimer ruft asynchron TrackFormulas, Broadcast(FID_DATACHANGED), - // ResetChanged, SetModified und Invalidate(SID_SAVEDOC/SID_DOC_MODIFIED) - // TrackFormulas zusaetzlich nochmal sofort, damit nicht z.B. durch IdleCalc - // eine Formel berechnet wird, die noch im FormulaTrack steht (#61676#) + // StartTrackTimer ruft asynchron TrackFormulas, Broadcast(FID_DATACHANGED), + // ResetChanged, SetModified und Invalidate(SID_SAVEDOC/SID_DOC_MODIFIED) + // TrackFormulas zusaetzlich nochmal sofort, damit nicht z.B. durch IdleCalc + // eine Formel berechnet wird, die noch im FormulaTrack steht (#61676#) - // notify Uno objects (for XRefreshListener) - // must be after TrackFormulas - //! do this asynchronously? + // notify Uno objects (for XRefreshListener) + // must be after TrackFormulas + //! do this asynchronously? ScLinkRefreshedHint aHint; aHint.SetDdeLink( aAppl, aTopic, aItem, nMode ); pDoc->BroadcastUno( aHint ); @@ -234,8 +234,8 @@ void ScDdeLink::ResetValue() { pResult.Clear(); - // Es hat sich was getan... - // Tracking, FID_DATACHANGED etc. passiert von aussen + // Es hat sich was getan... + // Tracking, FID_DATACHANGED etc. passiert von aussen if (HasListeners()) Broadcast( ScHint( SC_HINT_DATACHANGED, ScAddress(), NULL ) ); @@ -244,16 +244,16 @@ void ScDdeLink::ResetValue() void __EXPORT ScDdeLink::ListenersGone() { BOOL bWas = bIsInUpdate; - bIsInUpdate = TRUE; // Remove() kann Reschedule ausloesen??!? + bIsInUpdate = TRUE; // Remove() kann Reschedule ausloesen??!? - ScDocument* pStackDoc = pDoc; // member pDoc can't be used after removing the link + ScDocument* pStackDoc = pDoc; // member pDoc can't be used after removing the link sfx2::LinkManager* pLinkMgr = pDoc->GetLinkManager(); - pLinkMgr->Remove( this); // deletes this + pLinkMgr->Remove( this); // deletes this - if ( !pLinkMgr->GetLinks().Count() ) // letzten geloescht ? + if ( !pLinkMgr->GetLinks().Count() ) // letzten geloescht ? { - SfxBindings* pBindings = pStackDoc->GetViewBindings(); // don't use member pDoc! + SfxBindings* pBindings = pStackDoc->GetViewBindings(); // don't use member pDoc! if (pBindings) pBindings->Invalidate( SID_LINKS ); } @@ -264,11 +264,11 @@ void __EXPORT ScDdeLink::ListenersGone() void ScDdeLink::TryUpdate() { if (bIsInUpdate) - bNeedUpdate = TRUE; // kann jetzt nicht ausgefuehrt werden + bNeedUpdate = TRUE; // kann jetzt nicht ausgefuehrt werden else { bIsInUpdate = TRUE; - //Application::Reschedule(); //! OS/2-Simulation + //Application::Reschedule(); //! OS/2-Simulation pDoc->IncInDdeLinkUpdate(); Update(); pDoc->DecInDdeLinkUpdate(); diff --git a/sc/source/core/tool/detdata.cxx b/sc/source/core/tool/detdata.cxx index 075187105461..5f813ce6b303 100644 --- a/sc/source/core/tool/detdata.cxx +++ b/sc/source/core/tool/detdata.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -108,8 +108,8 @@ BOOL ScDetOpList::operator==( const ScDetOpList& r ) const USHORT nCount = Count(); BOOL bEqual = ( nCount == r.Count() ); - for (USHORT i=0; i<nCount && bEqual; i++) // Reihenfolge muss auch gleich sein - if ( !(*(*this)[i] == *r[i]) ) // Eintraege unterschiedlich ? + for (USHORT i=0; i<nCount && bEqual; i++) // Reihenfolge muss auch gleich sein + if ( !(*(*this)[i] == *r[i]) ) // Eintraege unterschiedlich ? bEqual = FALSE; return bEqual; diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 3916e2e27de3..7748122e8896 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -89,11 +89,11 @@ using ::std::vector; // #99319# line ends are now created with an empty name. // The checkForUniqueItem method then finds a unique name for the item's value. -#define SC_LINEEND_NAME EMPTY_STRING +#define SC_LINEEND_NAME EMPTY_STRING //------------------------------------------------------------------------ -enum DetInsertResult { // Return-Werte beim Einfuegen in einen Level +enum DetInsertResult { // Return-Werte beim Einfuegen in einen Level DET_INS_CONTINUE, DET_INS_INSERTED, DET_INS_EMPTY, @@ -105,24 +105,24 @@ enum DetInsertResult { // Return-Werte beim Einfuegen in einen Leve class ScDetectiveData { private: - SfxItemSet aBoxSet; - SfxItemSet aArrowSet; - SfxItemSet aToTabSet; - SfxItemSet aFromTabSet; - SfxItemSet aCircleSet; //! einzeln ? - USHORT nMaxLevel; + SfxItemSet aBoxSet; + SfxItemSet aArrowSet; + SfxItemSet aToTabSet; + SfxItemSet aFromTabSet; + SfxItemSet aCircleSet; //! einzeln ? + USHORT nMaxLevel; public: ScDetectiveData( SdrModel* pModel ); - SfxItemSet& GetBoxSet() { return aBoxSet; } - SfxItemSet& GetArrowSet() { return aArrowSet; } - SfxItemSet& GetToTabSet() { return aToTabSet; } - SfxItemSet& GetFromTabSet() { return aFromTabSet; } - SfxItemSet& GetCircleSet() { return aCircleSet; } + SfxItemSet& GetBoxSet() { return aBoxSet; } + SfxItemSet& GetArrowSet() { return aArrowSet; } + SfxItemSet& GetToTabSet() { return aToTabSet; } + SfxItemSet& GetFromTabSet() { return aFromTabSet; } + SfxItemSet& GetCircleSet() { return aCircleSet; } - void SetMaxLevel( USHORT nVal ) { nMaxLevel = nVal; } - USHORT GetMaxLevel() const { return nMaxLevel; } + void SetMaxLevel( USHORT nVal ) { nMaxLevel = nVal; } + USHORT GetMaxLevel() const { return nMaxLevel; } }; class ScCommentData @@ -130,11 +130,11 @@ class ScCommentData public: ScCommentData( ScDocument& rDoc, SdrModel* pModel ); - SfxItemSet& GetCaptionSet() { return aCaptionSet; } - void UpdateCaptionSet( const SfxItemSet& rItemSet ); + SfxItemSet& GetCaptionSet() { return aCaptionSet; } + void UpdateCaptionSet( const SfxItemSet& rItemSet ); private: - SfxItemSet aCaptionSet; + SfxItemSet aCaptionSet; }; //------------------------------------------------------------------------ @@ -167,8 +167,8 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) : aBoxSet.Put( XLineColorItem( EMPTY_STRING, Color( ScDetectiveFunc::GetArrowColor() ) ) ); aBoxSet.Put( XFillStyleItem( XFILL_NONE ) ); - // #66479# Standard-Linienenden (wie aus XLineEndList::Create) selber zusammenbasteln, - // um von den konfigurierten Linienenden unabhaengig zu sein + // #66479# Standard-Linienenden (wie aus XLineEndList::Create) selber zusammenbasteln, + // um von den konfigurierten Linienenden unabhaengig zu sein basegfx::B2DPolygon aTriangle; aTriangle.append(basegfx::B2DPoint(10.0, 0.0)); @@ -211,7 +211,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) : aCircleSet.Put( XLineColorItem( String(), Color( ScDetectiveFunc::GetErrorColor() ) ) ); aCircleSet.Put( XFillStyleItem( XFILL_NONE ) ); - USHORT nWidth = 55; // 54 = 1 Pixel + USHORT nWidth = 55; // 54 = 1 Pixel aCircleSet.Put( XLineWidthItem( nWidth ) ); } @@ -233,15 +233,15 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) : Color aYellow( ScDetectiveFunc::GetCommentColor() ); aCaptionSet.Put( XFillColorItem( String(), aYellow ) ); - // shadow - // SdrShadowItem has FALSE, instead the shadow is set for the rectangle - // only with SetSpecialTextBoxShadow when the object is created - // (item must be set to adjust objects from older files) + // shadow + // SdrShadowItem has FALSE, instead the shadow is set for the rectangle + // only with SetSpecialTextBoxShadow when the object is created + // (item must be set to adjust objects from older files) aCaptionSet.Put( SdrShadowItem( FALSE ) ); aCaptionSet.Put( SdrShadowXDistItem( 100 ) ); aCaptionSet.Put( SdrShadowYDistItem( 100 ) ); - // text attributes + // text attributes aCaptionSet.Put( SdrTextLeftDistItem( 100 ) ); aCaptionSet.Put( SdrTextRightDistItem( 100 ) ); aCaptionSet.Put( SdrTextUpperDistItem( 100 ) ); @@ -250,8 +250,8 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) : aCaptionSet.Put( SdrTextAutoGrowWidthItem( FALSE ) ); aCaptionSet.Put( SdrTextAutoGrowHeightItem( TRUE ) ); - // #78943# do use the default cell style, so the user has a chance to - // modify the font for the annotations + // #78943# do use the default cell style, so the user has a chance to + // modify the font for the annotations ((const ScPatternAttr&)rDoc.GetPool()->GetDefaultItem(ATTR_PATTERN)). FillEditItemSet( &aCaptionSet ); @@ -393,7 +393,7 @@ Rectangle ScDetectiveFunc::GetDrawRect( SCCOL nCol, SCROW nRow ) const BOOL lcl_IsOtherTab( const basegfx::B2DPolyPolygon& rPolyPolygon ) { - // test if rPolygon is the line end for "other table" (rectangle) + // test if rPolygon is the line end for "other table" (rectangle) if(1L == rPolyPolygon.count()) { const basegfx::B2DPolygon aSubPoly(rPolyPolygon.getB2DPolygon(0L)); @@ -461,7 +461,7 @@ BOOL ScDetectiveFunc::HasArrow( const ScAddress& rStart, return bFound; } -BOOL ScDetectiveFunc::IsNonAlienArrow( SdrObject* pObject ) // static +BOOL ScDetectiveFunc::IsNonAlienArrow( SdrObject* pObject ) // static { if ( pObject->GetLayer()==SC_LAYER_INTERN && pObject->IsPolyObj() && pObject->GetPointCount()==2 ) @@ -481,7 +481,7 @@ BOOL ScDetectiveFunc::IsNonAlienArrow( SdrObject* pObject ) // static //------------------------------------------------------------------------ -// InsertXXX: called from DrawEntry/DrawAlienEntry and InsertObject +// InsertXXX: called from DrawEntry/DrawAlienEntry and InsertObject BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow, SCCOL nRefStartCol, SCROW nRefStartRow, @@ -512,7 +512,7 @@ BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow, pData->maEnd.Set( nRefEndCol, nRefEndRow, nTab); } - Point aStartPos = GetDrawPos( nRefStartCol, nRefStartRow, DRAWPOS_DETARROW ); + Point aStartPos = GetDrawPos( nRefStartCol, nRefStartRow, DRAWPOS_DETARROW ); Point aEndPos = GetDrawPos( nCol, nRow, DRAWPOS_DETARROW ); if (bFromOtherTab) @@ -530,9 +530,9 @@ BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow, SfxItemSet& rAttrSet = bFromOtherTab ? rData.GetFromTabSet() : rData.GetArrowSet(); if (bArea && !bFromOtherTab) - rAttrSet.Put( XLineWidthItem( 50 ) ); // Bereich + rAttrSet.Put( XLineWidthItem( 50 ) ); // Bereich else - rAttrSet.Put( XLineWidthItem( 0 ) ); // einzelne Referenz + rAttrSet.Put( XLineWidthItem( 0 ) ); // einzelne Referenz ColorData nColorData = ( bRed ? GetErrorColor() : GetArrowColor() ); rAttrSet.Put( XLineColorItem( String(), Color( nColorData ) ) ); @@ -541,7 +541,7 @@ BOOL ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow, aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y())); aTempPoly.append(basegfx::B2DPoint(aEndPos.X(), aEndPos.Y())); SdrPathObj* pArrow = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aTempPoly)); - pArrow->NbcSetLogicRect(Rectangle(aStartPos,aEndPos)); //! noetig ??? + pArrow->NbcSetLogicRect(Rectangle(aStartPos,aEndPos)); //! noetig ??? pArrow->SetMergedItemSetAndBroadcast(rAttrSet); ScDrawLayer::SetAnchor( pArrow, SCA_CELL ); @@ -589,16 +589,16 @@ BOOL ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, BOOL bNegativePage = pDoc->IsNegativePage( nTab ); long nPageSign = bNegativePage ? -1 : 1; - Point aStartPos = GetDrawPos( nStartCol, nStartRow, DRAWPOS_DETARROW ); + Point aStartPos = GetDrawPos( nStartCol, nStartRow, DRAWPOS_DETARROW ); Point aEndPos = Point( aStartPos.X() + 1000 * nPageSign, aStartPos.Y() - 1000 ); if (aEndPos.Y() < 0) aEndPos.Y() += 2000; SfxItemSet& rAttrSet = rData.GetToTabSet(); if (bArea) - rAttrSet.Put( XLineWidthItem( 50 ) ); // Bereich + rAttrSet.Put( XLineWidthItem( 50 ) ); // Bereich else - rAttrSet.Put( XLineWidthItem( 0 ) ); // einzelne Referenz + rAttrSet.Put( XLineWidthItem( 0 ) ); // einzelne Referenz ColorData nColorData = ( bRed ? GetErrorColor() : GetArrowColor() ); rAttrSet.Put( XLineColorItem( String(), Color( nColorData ) ) ); @@ -607,7 +607,7 @@ BOOL ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y())); aTempPoly.append(basegfx::B2DPoint(aEndPos.X(), aEndPos.Y())); SdrPathObj* pArrow = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aTempPoly)); - pArrow->NbcSetLogicRect(Rectangle(aStartPos,aEndPos)); //! noetig ??? + pArrow->NbcSetLogicRect(Rectangle(aStartPos,aEndPos)); //! noetig ??? pArrow->SetMergedItemSetAndBroadcast(rAttrSet); @@ -626,12 +626,12 @@ BOOL ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, //------------------------------------------------------------------------ -// DrawEntry: Formel auf dieser Tabelle, -// Referenz auf dieser oder anderer -// DrawAlienEntry: Formel auf anderer Tabelle, -// Referenz auf dieser +// DrawEntry: Formel auf dieser Tabelle, +// Referenz auf dieser oder anderer +// DrawAlienEntry: Formel auf anderer Tabelle, +// Referenz auf dieser -// return FALSE: da war schon ein Pfeil +// return FALSE: da war schon ein Pfeil BOOL ScDetectiveFunc::DrawEntry( SCCOL nCol, SCROW nRow, const ScRange& rRef, @@ -670,10 +670,10 @@ void ScDetectiveFunc::DrawCircle( SCCOL nCol, SCROW nRow, ScDetectiveData& rData SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); Rectangle aRect = GetDrawRect( nCol, nRow ); - aRect.Left() -= 250; - aRect.Right() += 250; - aRect.Top() -= 70; - aRect.Bottom() += 70; + aRect.Left() -= 250; + aRect.Right() += 250; + aRect.Top() -= 70; + aRect.Bottom() += 70; SdrCircObj* pCircle = new SdrCircObj( OBJ_CIRC, aRect ); SfxItemSet& rAttrSet = rData.GetCircleSet(); @@ -702,8 +702,8 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, BOOL bDestPnt ) pPage->RecalcObjOrdNums(); - long nDelCount = 0; - ULONG nObjCount = pPage->GetObjCount(); + long nDelCount = 0; + ULONG nObjCount = pPage->GetObjCount(); if (nObjCount) { SdrObject** ppObj = new SdrObject*[nObjCount]; @@ -715,7 +715,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, BOOL bDestPnt ) if ( pObject->GetLayer()==SC_LAYER_INTERN && pObject->IsPolyObj() && pObject->GetPointCount()==2 ) { - if (aRect.IsInside(pObject->GetPoint(bDestPnt))) // Start/Zielpunkt + if (aRect.IsInside(pObject->GetPoint(bDestPnt))) // Start/Zielpunkt ppObj[nDelCount++] = pObject; } @@ -735,9 +735,9 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, BOOL bDestPnt ) } } - // Box um Referenz loeschen + // Box um Referenz loeschen -#define SC_DET_TOLERANCE 50 +#define SC_DET_TOLERANCE 50 inline BOOL RectIsPoints( const Rectangle& rRect, const Point& rStart, const Point& rEnd ) { @@ -755,7 +755,7 @@ inline BOOL RectIsPoints( const Rectangle& rRect, const Point& rStart, const Poi void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) { -/* String aStr; +/* String aStr; aStr += nCol1; aStr += '/'; aStr += nRow1; @@ -777,8 +777,8 @@ void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nR pPage->RecalcObjOrdNums(); - long nDelCount = 0; - ULONG nObjCount = pPage->GetObjCount(); + long nDelCount = 0; + ULONG nObjCount = pPage->GetObjCount(); if (nObjCount) { SdrObject** ppObj = new SdrObject*[nObjCount]; @@ -860,7 +860,7 @@ USHORT ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData return DET_INS_CIRCULAR; if (pFCell->GetDirty()) - pFCell->Interpret(); // nach SetRunning geht's nicht mehr! + pFCell->Interpret(); // nach SetRunning geht's nicht mehr! pFCell->SetRunning(TRUE); USHORT nResult = DET_INS_EMPTY; @@ -871,11 +871,11 @@ USHORT ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData { if (DrawEntry( nCol, nRow, aRef, rData )) { - nResult = DET_INS_INSERTED; // neuer Pfeil eingetragen + nResult = DET_INS_INSERTED; // neuer Pfeil eingetragen } else { - // weiterverfolgen + // weiterverfolgen if ( nLevel < rData.GetMaxLevel() ) { @@ -903,7 +903,7 @@ USHORT ScDetectiveFunc::InsertPredLevel( SCCOL nCol, SCROW nRow, ScDetectiveData // DET_INS_EMPTY: unveraendert lassen } } - else // nMaxLevel erreicht + else // nMaxLevel erreicht if (nResult != DET_INS_INSERTED) nResult = DET_INS_CONTINUE; } @@ -935,7 +935,7 @@ USHORT ScDetectiveFunc::FindPredLevelArea( const ScRange& rRef, return nResult; } - // nDeleteLevel != 0 -> loeschen + // nDeleteLevel != 0 -> loeschen USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, USHORT nDeleteLevel ) { @@ -953,7 +953,7 @@ USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, US return nLevel; if (pFCell->GetDirty()) - pFCell->Interpret(); // nach SetRunning geht's nicht mehr! + pFCell->Interpret(); // nach SetRunning geht's nicht mehr! pFCell->SetRunning(TRUE); USHORT nResult = nLevel; @@ -961,7 +961,7 @@ USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, US if ( bDelete ) { - DeleteArrowsAt( nCol, nRow, TRUE ); // Pfeile, die hierher zeigen + DeleteArrowsAt( nCol, nRow, TRUE ); // Pfeile, die hierher zeigen } ScDetectiveRefIter aIter( (ScFormulaCell*) pCell ); @@ -970,14 +970,14 @@ USHORT ScDetectiveFunc::FindPredLevel( SCCOL nCol, SCROW nRow, USHORT nLevel, US { BOOL bArea = ( aRef.aStart != aRef.aEnd ); - if ( bDelete ) // Rahmen loeschen ? + if ( bDelete ) // Rahmen loeschen ? { if (bArea) { DeleteBox( aRef.aStart.Col(), aRef.aStart.Row(), aRef.aEnd.Col(), aRef.aEnd.Row() ); } } - else // weitersuchen + else // weitersuchen { if ( HasArrow( aRef.aStart, nCol,nRow,nTab ) ) { @@ -1015,7 +1015,7 @@ USHORT ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveDat return DET_INS_CIRCULAR; if (pFCell->GetDirty()) - pFCell->Interpret(); // nach SetRunning geht's nicht mehr! + pFCell->Interpret(); // nach SetRunning geht's nicht mehr! pFCell->SetRunning(TRUE); USHORT nResult = DET_INS_EMPTY; @@ -1032,9 +1032,9 @@ USHORT ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveDat if (DrawEntry( nCol, nRow, ScRange( aErrorPos), rData )) nResult = DET_INS_INSERTED; - // und weiterverfolgen + // und weiterverfolgen - if ( nLevel < rData.GetMaxLevel() ) // praktisch immer + if ( nLevel < rData.GetMaxLevel() ) // praktisch immer { if (InsertErrorLevel( aErrorPos.Col(), aErrorPos.Row(), rData, nLevel+1 ) == DET_INS_INSERTED) @@ -1058,11 +1058,11 @@ USHORT ScDetectiveFunc::InsertErrorLevel( SCCOL nCol, SCROW nRow, ScDetectiveDat USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScDetectiveData& rData, USHORT nLevel ) { - // ueber ganzes Dokument + // ueber ganzes Dokument USHORT nResult = DET_INS_EMPTY; -// ScCellIterator aCellIter( pDoc, 0,0, nTab, MAXCOL,MAXROW, nTab ); - ScCellIterator aCellIter( pDoc, 0,0,0, MAXCOL,MAXROW,MAXTAB ); // alle Tabellen +// ScCellIterator aCellIter( pDoc, 0,0, nTab, MAXCOL,MAXROW, nTab ); + ScCellIterator aCellIter( pDoc, 0,0,0, MAXCOL,MAXROW,MAXTAB ); // alle Tabellen ScBaseCell* pCell = aCellIter.GetFirst(); while (pCell) { @@ -1072,7 +1072,7 @@ USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, BOOL bRunning = pFCell->IsRunning(); if (pFCell->GetDirty()) - pFCell->Interpret(); // nach SetRunning geht's nicht mehr! + pFCell->Interpret(); // nach SetRunning geht's nicht mehr! pFCell->SetRunning(TRUE); ScDetectiveRefIter aIter( (ScFormulaCell*) pCell ); @@ -1094,7 +1094,7 @@ USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, aRef, rData ); if (bDrawRet) { - nResult = DET_INS_INSERTED; // neuer Pfeil eingetragen + nResult = DET_INS_INSERTED; // neuer Pfeil eingetragen } else { @@ -1105,7 +1105,7 @@ USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, } else { - // weiterverfolgen + // weiterverfolgen if ( nLevel < rData.GetMaxLevel() ) { @@ -1129,7 +1129,7 @@ USHORT ScDetectiveFunc::InsertSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, // DET_INS_EMPTY: unveraendert lassen } } - else // nMaxLevel erreicht + else // nMaxLevel erreicht if (nResult != DET_INS_INSERTED) nResult = DET_INS_CONTINUE; } @@ -1163,7 +1163,7 @@ USHORT ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SC BOOL bRunning = pFCell->IsRunning(); if (pFCell->GetDirty()) - pFCell->Interpret(); // nach SetRunning geht's nicht mehr! + pFCell->Interpret(); // nach SetRunning geht's nicht mehr! pFCell->SetRunning(TRUE); ScDetectiveRefIter aIter( (ScFormulaCell*) pCell ); @@ -1176,7 +1176,7 @@ USHORT ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SC aRef.aStart.Col(),aRef.aStart.Row(), aRef.aEnd.Col(),aRef.aEnd.Row() )) { - if ( bDelete ) // Pfeile, die hier anfangen + if ( bDelete ) // Pfeile, die hier anfangen { if (aRef.aStart != aRef.aEnd) { @@ -1209,7 +1209,7 @@ USHORT ScDetectiveFunc::FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SC // -// -------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------- // BOOL ScDetectiveFunc::ShowPred( SCCOL nCol, SCROW nRow ) @@ -1279,7 +1279,7 @@ BOOL ScDetectiveFunc::DeleteSucc( SCCOL nCol, SCROW nRow ) USHORT nLevelCount = FindSuccLevel( nCol, nRow, nCol, nRow, 0, 0 ); if ( nLevelCount ) - FindSuccLevel( nCol, nRow, nCol, nRow, 0, nLevelCount ); // loeschen + FindSuccLevel( nCol, nRow, nCol, nRow, 0, nLevelCount ); // loeschen return ( nLevelCount != 0 ); } @@ -1292,7 +1292,7 @@ BOOL ScDetectiveFunc::DeletePred( SCCOL nCol, SCROW nRow ) USHORT nLevelCount = FindPredLevel( nCol, nRow, 0, 0 ); if ( nLevelCount ) - FindPredLevel( nCol, nRow, 0, nLevelCount ); // loeschen + FindPredLevel( nCol, nRow, 0, nLevelCount ); // loeschen return ( nLevelCount != 0 ); } @@ -1308,8 +1308,8 @@ BOOL ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat ) pPage->RecalcObjOrdNums(); - long nDelCount = 0; - ULONG nObjCount = pPage->GetObjCount(); + long nDelCount = 0; + ULONG nObjCount = pPage->GetObjCount(); if (nObjCount) { SdrObject** ppObj = new SdrObject*[nObjCount]; @@ -1325,12 +1325,12 @@ BOOL ScDetectiveFunc::DeleteAll( ScDetectiveDelete eWhat ) { BOOL bCircle = ( pObject->ISA(SdrCircObj) ); BOOL bCaption = ScDrawLayer::IsNoteCaption( pObject ); - if ( eWhat == SC_DET_DETECTIVE ) // Detektiv, aus Menue - bDoThis = !bCaption; // auch Kreise - else if ( eWhat == SC_DET_CIRCLES ) // Kreise, wenn neue erzeugt werden + if ( eWhat == SC_DET_DETECTIVE ) // Detektiv, aus Menue + bDoThis = !bCaption; // auch Kreise + else if ( eWhat == SC_DET_CIRCLES ) // Kreise, wenn neue erzeugt werden bDoThis = bCircle; - else if ( eWhat == SC_DET_ARROWS ) // DetectiveRefresh - bDoThis = !bCaption && !bCircle; // don't include circles + else if ( eWhat == SC_DET_ARROWS ) // DetectiveRefresh + bDoThis = !bCaption && !bCircle; // don't include circles else { DBG_ERROR("wat?"); @@ -1365,12 +1365,12 @@ BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow) if (!pModel) return FALSE; - BOOL bDeleted = DeleteAll( SC_DET_CIRCLES ); // nur die Kreise + BOOL bDeleted = DeleteAll( SC_DET_CIRCLES ); // nur die Kreise ScDetectiveData aData( pModel ); long nInsCount = 0; - // Stellen suchen, wo Gueltigkeit definiert ist + // Stellen suchen, wo Gueltigkeit definiert ist ScDocAttrIterator aAttrIter( pDoc, nTab, 0,0,MAXCOL,MAXROW ); SCCOL nCol; @@ -1382,10 +1382,10 @@ BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow) ULONG nIndex = ((const SfxUInt32Item&)pPattern->GetItem(ATTR_VALIDDATA)).GetValue(); if (nIndex) { - const ScValidationData* pData = pDoc->GetValidationEntry( nIndex ); + const ScValidationData* pData = pDoc->GetValidationEntry( nIndex ); if ( pData ) { - // Zellen in dem Bereich durchgehen + // Zellen in dem Bereich durchgehen BOOL bMarkEmpty = !pData->IsIgnoreBlank(); SCROW nNextRow = nRow1; @@ -1475,10 +1475,10 @@ void ScDetectiveFunc::GetAllSuccs(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n void ScDetectiveFunc::UpdateAllComments( ScDocument& rDoc ) { - // for all caption objects, update attributes and SpecialTextBoxShadow flag - // (on all tables - nTab is ignored!) + // for all caption objects, update attributes and SpecialTextBoxShadow flag + // (on all tables - nTab is ignored!) - // no undo actions, this is refreshed after undo + // no undo actions, this is refreshed after undo ScDrawLayer* pModel = rDoc.GetDrawLayer(); if (!pModel) @@ -1520,7 +1520,7 @@ void ScDetectiveFunc::UpdateAllComments( ScDocument& rDoc ) void ScDetectiveFunc::UpdateAllArrowColors() { - // no undo actions necessary + // no undo actions necessary ScDrawLayer* pModel = pDoc->GetDrawLayer(); if (!pModel) @@ -1546,7 +1546,7 @@ void ScDetectiveFunc::UpdateAllArrowColors() ScDetectiveObjType eType = GetDetectiveObjectType( pObject, nObjTab, aPos, aSource, bDummy ); if ( eType == SC_DETOBJ_ARROW || eType == SC_DETOBJ_TOOTHERTAB ) { - // source is valid, determine error flag from source range + // source is valid, determine error flag from source range ScAddress aErrPos; if ( HasError( aSource, aErrPos ) ) @@ -1556,9 +1556,9 @@ void ScDetectiveFunc::UpdateAllArrowColors() } else if ( eType == SC_DETOBJ_FROMOTHERTAB ) { - // source range is no longer known, take error flag from formula itself - // (this means, if the formula has an error, all references to other tables - // are marked red) + // source range is no longer known, take error flag from formula itself + // (this means, if the formula has an error, all references to other tables + // are marked red) ScAddress aErrPos; if ( HasError( ScRange( aPos), aErrPos ) ) @@ -1568,13 +1568,13 @@ void ScDetectiveFunc::UpdateAllArrowColors() } else if ( eType == SC_DETOBJ_CIRCLE ) { - // circles (error marks) are always red + // circles (error marks) are always red bError = TRUE; } else if ( eType == SC_DETOBJ_NONE ) { - // frame for area reference has no ObjType, always gets arrow color + // frame for area reference has no ObjType, always gets arrow color if ( pObject->ISA( SdrRectObj ) && !pObject->ISA( SdrCaptionObj ) ) { @@ -1600,8 +1600,8 @@ void ScDetectiveFunc::UpdateAllArrowColors() BOOL ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRange ) { - // find the rectangle for an arrow (always the object directly before the arrow) - // rRange must be initialized to the source cell of the arrow (start of area) + // find the rectangle for an arrow (always the object directly before the arrow) + // rRange must be initialized to the source cell of the arrow (start of area) ScDrawLayer* pModel = pDoc->GetDrawLayer(); if (!pModel) return FALSE; diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx index 6c89ba675049..ccc5eae58f2c 100644 --- a/sc/source/core/tool/docoptio.cxx +++ b/sc/source/core/tool/docoptio.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -61,20 +61,20 @@ TYPEINIT1(ScTpCalcItem, SfxPoolItem); //------------------------------------------------------------------------ -//! these functions should be moved to some header file -inline long TwipsToHMM(long nTwips) { return (nTwips * 127 + 36) / 72; } -inline long HMMToTwips(long nHMM) { return (nHMM * 72 + 63) / 127; } +//! these functions should be moved to some header file +inline long TwipsToHMM(long nTwips) { return (nTwips * 127 + 36) / 72; } +inline long HMMToTwips(long nHMM) { return (nHMM * 72 + 63) / 127; } -inline long TwipsToEvenHMM(long nTwips) { return ( (nTwips * 127 + 72) / 144 ) * 2; } +inline long TwipsToEvenHMM(long nTwips) { return ( (nTwips * 127 + 72) / 144 ) * 2; } //------------------------------------------------------------------------ USHORT lcl_GetDefaultTabDist() { if ( ScOptionsUtil::IsMetricSystem() ) - return 709; // 1,25 cm + return 709; // 1,25 cm else - return 720; // 1/2" + return 720; // 1/2" } //======================================================================== @@ -123,21 +123,21 @@ ScDocOptions::~ScDocOptions() void ScDocOptions::ResetDocOptions() { - bIsIgnoreCase = FALSE; - bIsIter = FALSE; - nIterCount = 100; - fIterEps = 1.0E-3; + bIsIgnoreCase = FALSE; + bIsIter = FALSE; + nIterCount = 100; + fIterEps = 1.0E-3; nPrecStandardFormat = SvNumberFormatter::UNLIMITED_PRECISION; eKeyBindingType = ScOptionsUtil::KEY_DEFAULT; - nDay = 30; - nMonth = 12; - nYear = 1899; - nYear2000 = SvNumberFormatter::GetYear2000Default(); - nTabDistance = lcl_GetDefaultTabDist(); - bCalcAsShown = FALSE; - bMatchWholeCell = TRUE; - bDoAutoSpell = FALSE; - bLookUpColRowNames = TRUE; + nDay = 30; + nMonth = 12; + nYear = 1899; + nYear2000 = SvNumberFormatter::GetYear2000Default(); + nTabDistance = lcl_GetDefaultTabDist(); + bCalcAsShown = FALSE; + bMatchWholeCell = TRUE; + bDoAutoSpell = FALSE; + bLookUpColRowNames = TRUE; bFormulaRegexEnabled= TRUE; bUseEnglishFuncName = false; eFormulaGrammar = ::formula::FormulaGrammar::GRAM_NATIVE; @@ -210,15 +210,15 @@ const LocaleDataWrapper& ScDocOptions::GetLocaleDataWrapper() ScTpCalcItem::ScTpCalcItem( USHORT nWhichP, const ScDocOptions& rOpt ) : SfxPoolItem ( nWhichP ), - theOptions ( rOpt ) + theOptions ( rOpt ) { } //------------------------------------------------------------------------ ScTpCalcItem::ScTpCalcItem( const ScTpCalcItem& rItem ) - : SfxPoolItem ( rItem ), - theOptions ( rItem.theOptions ) + : SfxPoolItem ( rItem ), + theOptions ( rItem.theOptions ) { } @@ -254,22 +254,22 @@ SfxPoolItem* __EXPORT ScTpCalcItem::Clone( SfxItemPool * ) const } //================================================================== -// Config Item containing document options +// Config Item containing document options //================================================================== -#define CFGPATH_CALC "Office.Calc/Calculate" - -#define SCCALCOPT_ITER_ITER 0 -#define SCCALCOPT_ITER_STEPS 1 -#define SCCALCOPT_ITER_MINCHG 2 -#define SCCALCOPT_DATE_DAY 3 -#define SCCALCOPT_DATE_MONTH 4 -#define SCCALCOPT_DATE_YEAR 5 -#define SCCALCOPT_DECIMALS 6 -#define SCCALCOPT_CASESENSITIVE 7 -#define SCCALCOPT_PRECISION 8 -#define SCCALCOPT_SEARCHCRIT 9 -#define SCCALCOPT_FINDLABEL 10 +#define CFGPATH_CALC "Office.Calc/Calculate" + +#define SCCALCOPT_ITER_ITER 0 +#define SCCALCOPT_ITER_STEPS 1 +#define SCCALCOPT_ITER_MINCHG 2 +#define SCCALCOPT_DATE_DAY 3 +#define SCCALCOPT_DATE_MONTH 4 +#define SCCALCOPT_DATE_YEAR 5 +#define SCCALCOPT_DECIMALS 6 +#define SCCALCOPT_CASESENSITIVE 7 +#define SCCALCOPT_PRECISION 8 +#define SCCALCOPT_SEARCHCRIT 9 +#define SCCALCOPT_FINDLABEL 10 #define SCCALCOPT_REGEX 11 #define SCCALCOPT_COUNT 12 @@ -281,10 +281,10 @@ SfxPoolItem* __EXPORT ScTpCalcItem::Clone( SfxItemPool * ) const #define SCFORMULAOPT_SEP_ARRAY_COL 4 #define SCFORMULAOPT_COUNT 5 -#define CFGPATH_DOCLAYOUT "Office.Calc/Layout/Other" +#define CFGPATH_DOCLAYOUT "Office.Calc/Layout/Other" -#define SCDOCLAYOUTOPT_TABSTOP 0 -#define SCDOCLAYOUTOPT_COUNT 1 +#define SCDOCLAYOUTOPT_TABSTOP 0 +#define SCDOCLAYOUTOPT_COUNT 1 #define CFGPATH_COMPAT "Office.Calc/Compatibility" #define SCCOMPATOPT_KEY_BINDING 0 @@ -294,16 +294,16 @@ Sequence<OUString> ScDocCfg::GetCalcPropertyNames() { static const char* aPropNames[] = { - "IterativeReference/Iteration", // SCCALCOPT_ITER_ITER - "IterativeReference/Steps", // SCCALCOPT_ITER_STEPS - "IterativeReference/MinimumChange", // SCCALCOPT_ITER_MINCHG - "Other/Date/DD", // SCCALCOPT_DATE_DAY - "Other/Date/MM", // SCCALCOPT_DATE_MONTH - "Other/Date/YY", // SCCALCOPT_DATE_YEAR - "Other/DecimalPlaces", // SCCALCOPT_DECIMALS - "Other/CaseSensitive", // SCCALCOPT_CASESENSITIVE - "Other/Precision", // SCCALCOPT_PRECISION - "Other/SearchCriteria", // SCCALCOPT_SEARCHCRIT + "IterativeReference/Iteration", // SCCALCOPT_ITER_ITER + "IterativeReference/Steps", // SCCALCOPT_ITER_STEPS + "IterativeReference/MinimumChange", // SCCALCOPT_ITER_MINCHG + "Other/Date/DD", // SCCALCOPT_DATE_DAY + "Other/Date/MM", // SCCALCOPT_DATE_MONTH + "Other/Date/YY", // SCCALCOPT_DATE_YEAR + "Other/DecimalPlaces", // SCCALCOPT_DECIMALS + "Other/CaseSensitive", // SCCALCOPT_CASESENSITIVE + "Other/Precision", // SCCALCOPT_PRECISION + "Other/SearchCriteria", // SCCALCOPT_SEARCHCRIT "Other/FindLabel", // SCCALCOPT_FINDLABEL "Other/RegularExpressions", // SCCALCOPT_REGEX }; @@ -337,14 +337,14 @@ Sequence<OUString> ScDocCfg::GetLayoutPropertyNames() { static const char* aPropNames[] = { - "TabStop/NonMetric" // SCDOCLAYOUTOPT_TABSTOP + "TabStop/NonMetric" // SCDOCLAYOUTOPT_TABSTOP }; Sequence<OUString> aNames(SCDOCLAYOUTOPT_COUNT); OUString* pNames = aNames.getArray(); for(int i = 0; i < SCDOCLAYOUTOPT_COUNT; i++) pNames[i] = OUString::createFromAscii(aPropNames[i]); - // adjust for metric system + // adjust for metric system if (ScOptionsUtil::IsMetricSystem()) pNames[SCDOCLAYOUTOPT_TABSTOP] = OUString::createFromAscii( "TabStop/Metric" ); @@ -671,9 +671,9 @@ IMPL_LINK( ScDocCfg, LayoutCommitHdl, void *, EMPTYARG ) switch(nProp) { case SCDOCLAYOUTOPT_TABSTOP: - // TabDistance in ScDocOptions is in twips - // use only even numbers, so defaults don't get changed - // by modifying other settings in the same config item + // TabDistance in ScDocOptions is in twips + // use only even numbers, so defaults don't get changed + // by modifying other settings in the same config item pValues[nProp] <<= (sal_Int32) TwipsToEvenHMM( GetTabDistance() ); break; } diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx index a547041b4ce2..e83ee373e131 100644 --- a/sc/source/core/tool/doubleref.cxx +++ b/sc/source/core/tool/doubleref.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -115,7 +115,7 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef, else bValid = false; } - + if (bValid) { // equality, non-equality operator in the 3rd column. @@ -143,7 +143,7 @@ bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef, rEntry.eOp = SC_EQUAL; } - + if (bValid) { // Finally, the right-hand-side value in the 4th column. @@ -260,7 +260,7 @@ bool lcl_fillQueryEntries( // ============================================================================ -ScDBRangeBase::ScDBRangeBase(ScDocument* pDoc, RefType eType) : +ScDBRangeBase::ScDBRangeBase(ScDocument* pDoc, RefType eType) : mpDoc(pDoc), meType(eType) { } diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index a8a5e2cda967..cd31717935a0 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -67,7 +67,7 @@ // STATIC DATA ----------------------------------------------------------- -// Delimiters zusaetzlich zu EditEngine-Default: +// Delimiters zusaetzlich zu EditEngine-Default: const sal_Char __FAR_DATA ScEditUtil::pCalcDelimiters[] = "=()+-*/^&<>"; @@ -77,7 +77,7 @@ const sal_Char __FAR_DATA ScEditUtil::pCalcDelimiters[] = "=()+-*/^&<>"; String ScEditUtil::ModifyDelimiters( const String& rOld ) { String aRet = rOld; - aRet.EraseAllChars( '_' ); // underscore is used in function argument names + aRet.EraseAllChars( '_' ); // underscore is used in function argument names aRet.AppendAscii( RTL_CONSTASCII_STRINGPARAM( pCalcDelimiters ) ); aRet.Append(ScCompiler::GetNativeSymbol(ocSep)); // argument separator is localized. return aRet; @@ -141,18 +141,18 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToT if ( ((const SvxHorJustifyItem&)pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue() == SVX_HOR_JUSTIFY_LEFT ) nIndent = ((const SfxUInt16Item&)pPattern->GetItem(ATTR_INDENT)).GetValue(); - long nPixDifX = (long) ( ( pMargin->GetLeftMargin() + nIndent ) * nPPTX ); - aStartPos.X() += nPixDifX * nLayoutSign; - nCellX -= nPixDifX + (long) ( pMargin->GetRightMargin() * nPPTX ); // wegen Umbruch etc. + long nPixDifX = (long) ( ( pMargin->GetLeftMargin() + nIndent ) * nPPTX ); + aStartPos.X() += nPixDifX * nLayoutSign; + nCellX -= nPixDifX + (long) ( pMargin->GetRightMargin() * nPPTX ); // wegen Umbruch etc. - // vertikale Position auf die in der Tabelle anpassen + // vertikale Position auf die in der Tabelle anpassen long nPixDifY; long nTopMargin = (long) ( pMargin->GetTopMargin() * nPPTY ); SvxCellVerJustify eJust = (SvxCellVerJustify) ((const SvxVerJustifyItem&)pPattern-> GetItem(ATTR_VER_JUSTIFY)).GetValue(); - // asian vertical is always edited top-aligned + // asian vertical is always edited top-aligned BOOL bAsianVertical = ((const SfxBoolItem&)pPattern->GetItem( ATTR_STACKED )).GetValue() && ((const SfxBoolItem&)pPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue(); @@ -167,7 +167,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToT long nTextHeight = pDoc->GetNeededSize( nCol, nRow, nTab, pDev, nPPTX, nPPTY, aZoomX, aZoomY, FALSE ); if (!nTextHeight) - { // leere Zelle + { // leere Zelle Font aFont; // font color doesn't matter here pPattern->GetFont( aFont, SC_AUTOCOL_BLACK, pDev, &aZoomY ); @@ -179,23 +179,23 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToT pDev->SetMapMode(aMode); if ( nTextHeight > nCellY + nTopMargin || bForceToTop ) - nPixDifY = 0; // zu gross -> oben anfangen + nPixDifY = 0; // zu gross -> oben anfangen else { if ( eJust == SVX_VER_JUSTIFY_CENTER ) nPixDifY = nTopMargin + ( nCellY - nTextHeight ) / 2; else - nPixDifY = nCellY - nTextHeight + nTopMargin; // JUSTIFY_BOTTOM + nPixDifY = nCellY - nTextHeight + nTopMargin; // JUSTIFY_BOTTOM } } aStartPos.Y() += nPixDifY; - nCellY -= nPixDifY; + nCellY -= nPixDifY; if ( bLayoutRTL ) - aStartPos.X() -= nCellX - 2; // excluding grid on both sides + aStartPos.X() -= nCellX - 2; // excluding grid on both sides - // -1 -> Gitter nicht ueberschreiben + // -1 -> Gitter nicht ueberschreiben return Rectangle( aStartPos, Size(nCellX-1,nCellY-1) ); } @@ -209,7 +209,7 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) : { if ( pEngine->GetParagraphCount() > 1 ) { - bNeedsObject = TRUE; //! Zellatribute finden ? + bNeedsObject = TRUE; //! Zellatribute finden ? } else { @@ -228,10 +228,10 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) : if ( nId == EE_CHAR_ESCAPEMENT || nId == EE_CHAR_PAIRKERNING || nId == EE_CHAR_KERNING || nId == EE_CHAR_XMLATTRIBS ) { - // Escapement and kerning are kept in EditEngine because there are no - // corresponding cell format items. User defined attributes are kept in - // EditEngine because "user attributes applied to all the text" is different - // from "user attributes applied to the cell". + // Escapement and kerning are kept in EditEngine because there are no + // corresponding cell format items. User defined attributes are kept in + // EditEngine because "user attributes applied to all the text" is different + // from "user attributes applied to the cell". if ( *pItem != rEditDefaults.Get(nId) ) bNeedsObject = TRUE; @@ -244,13 +244,13 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) : } } - // Feldbefehle enthalten? + // Feldbefehle enthalten? SfxItemState eFieldState = pEditAttrs->GetItemState( EE_FEATURE_FIELD, FALSE ); if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET ) bNeedsObject = TRUE; - // not converted characters? + // not converted characters? SfxItemState eConvState = pEditAttrs->GetItemState( EE_FEATURE_NOTCONV, FALSE ); if ( eConvState == SFX_ITEM_DONTCARE || eConvState == SFX_ITEM_SET ) @@ -304,8 +304,8 @@ ScEditEngineDefaulter::ScEditEngineDefaulter( SfxItemPool* pEnginePoolP, ScEnginePoolHelper( pEnginePoolP, bDeleteEnginePoolP ), EditEngine( pEnginePoolP ) { - // All EditEngines use ScGlobal::GetEditDefaultLanguage as DefaultLanguage. - // DefaultLanguage for InputHandler's EditEngine is updated later. + // All EditEngines use ScGlobal::GetEditDefaultLanguage as DefaultLanguage. + // DefaultLanguage for InputHandler's EditEngine is updated later. SetDefaultLanguage( ScGlobal::GetEditDefaultLanguage() ); } @@ -483,7 +483,7 @@ void ScEditEngineDefaulter::RemoveParaAttribs() const SfxPoolItem* pParaItem; if ( rParaAttribs.GetItemState( nWhich, FALSE, &pParaItem ) == SFX_ITEM_SET ) { - // if defaults are set, use only items that are different from default + // if defaults are set, use only items that are different from default if ( !pDefaults || *pParaItem != pDefaults->Get(nWhich) ) { if (!pCharItems) @@ -498,8 +498,8 @@ void ScEditEngineDefaulter::RemoveParaAttribs() SvUShorts aPortions; GetPortions( nPar, aPortions ); - // loop through the portions of the paragraph, and set only those items - // that are not overridden by existing character attributes + // loop through the portions of the paragraph, and set only those items + // that are not overridden by existing character attributes USHORT nPCount = aPortions.Count(); USHORT nStart = 0; @@ -511,8 +511,8 @@ void ScEditEngineDefaulter::RemoveParaAttribs() SfxItemSet aNewCharAttrs = *pCharItems; for (nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich ++) { - // Clear those items that are different from existing character attributes. - // Where no character attributes are set, GetAttribs returns the paragraph attributes. + // Clear those items that are different from existing character attributes. + // Where no character attributes are set, GetAttribs returns the paragraph attributes. const SfxPoolItem* pItem; if ( aNewCharAttrs.GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && *pItem != aOldCharAttrs.Get(nWhich) ) @@ -531,8 +531,8 @@ void ScEditEngineDefaulter::RemoveParaAttribs() if ( rParaAttribs.Count() ) { - // clear all paragraph attributes (including defaults), - // so they are not contained in resulting EditTextObjects + // clear all paragraph attributes (including defaults), + // so they are not contained in resulting EditTextObjects SetParaAttribs( nPar, SfxItemSet( *rParaAttribs.GetPool(), rParaAttribs.GetRanges() ) ); } @@ -570,11 +570,11 @@ void ScTabEditEngine::Init( const ScPatternAttr& rPattern ) } //------------------------------------------------------------------------ -// Feldbefehle fuer Kopf- und Fusszeilen +// Feldbefehle fuer Kopf- und Fusszeilen //------------------------------------------------------------------------ // -// Zahlen aus \sw\source\core\doc\numbers.cxx +// Zahlen aus \sw\source\core\doc\numbers.cxx // String lcl_GetCharStr( sal_Int32 nNo ) @@ -621,10 +621,10 @@ String lcl_GetNumStr( sal_Int32 nNo, SvxNumType eType ) aTmpStr.Erase(); break; -// CHAR_SPECIAL: -// ???? +// CHAR_SPECIAL: +// ???? -// case ARABIC: ist jetzt default +// case ARABIC: ist jetzt default default: aTmpStr = String::CreateFromInt32( nNo ); break; @@ -652,7 +652,7 @@ String __EXPORT ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField, Color*& /* rTxtColor */, Color*& /* rFldColor */ ) { String aRet; - const SvxFieldData* pFieldData = rField.GetField(); + const SvxFieldData* pFieldData = rField.GetField(); if ( pFieldData ) { TypeId aType = pFieldData->Type(); @@ -696,7 +696,7 @@ String __EXPORT ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField, //------------------------------------------------------------------------ // -// Feld-Daten +// Feld-Daten // //------------------------------------------------------------------------ @@ -708,7 +708,7 @@ ScFieldEditEngine::ScFieldEditEngine( SfxItemPool* pEnginePoolP, { if ( pTextObjectPool ) SetEditTextObjectPool( pTextObjectPool ); - // EE_CNTRL_URLSFXEXECUTE nicht, weil die Edit-Engine den ViewFrame nicht kennt + // EE_CNTRL_URLSFXEXECUTE nicht, weil die Edit-Engine den ViewFrame nicht kennt // wir haben keine StyleSheets fuer Text SetControlWord( (GetControlWord() | EE_CNTRL_MARKFIELDS) & ~EE_CNTRL_RTFSTYLESHEETS ); } @@ -718,7 +718,7 @@ String __EXPORT ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField, Color*& rTxtColor, Color*& /* rFldColor */ ) { String aRet; - const SvxFieldData* pFieldData = rField.GetField(); + const SvxFieldData* pFieldData = rField.GetField(); if ( pFieldData ) { @@ -751,8 +751,8 @@ String __EXPORT ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField, } } - if (!aRet.Len()) // leer ist baeh - aRet = ' '; // Space ist Default der Editengine + if (!aRet.Len()) // leer ist baeh + aRet = ' '; // Space ist Default der Editengine return aRet; } diff --git a/sc/source/core/tool/filtopt.cxx b/sc/source/core/tool/filtopt.cxx index b5c109b6602f..61e22c8736b7 100644 --- a/sc/source/core/tool/filtopt.cxx +++ b/sc/source/core/tool/filtopt.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,20 +47,20 @@ using namespace com::sun::star::uno; //------------------------------------------------------------------ -#define CFGPATH_FILTER "Office.Calc/Filter/Import" +#define CFGPATH_FILTER "Office.Calc/Filter/Import" -#define SCFILTOPT_COLSCALE 0 -#define SCFILTOPT_ROWSCALE 1 -#define SCFILTOPT_WK3 2 -#define SCFILTOPT_COUNT 3 +#define SCFILTOPT_COLSCALE 0 +#define SCFILTOPT_ROWSCALE 1 +#define SCFILTOPT_WK3 2 +#define SCFILTOPT_COUNT 3 Sequence<OUString> ScFilterOptions::GetPropertyNames() { static const char* aPropNames[] = { - "MS_Excel/ColScale", // SCFILTOPT_COLSCALE - "MS_Excel/RowScale", // SCFILTOPT_ROWSCALE - "Lotus123/WK3" // SCFILTOPT_WK3 + "MS_Excel/ColScale", // SCFILTOPT_COLSCALE + "MS_Excel/RowScale", // SCFILTOPT_ROWSCALE + "Lotus123/WK3" // SCFILTOPT_WK3 }; Sequence<OUString> aNames(SCFILTOPT_COUNT); OUString* pNames = aNames.getArray(); @@ -78,7 +78,7 @@ ScFilterOptions::ScFilterOptions() : { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues = GetProperties(aNames); -// EnableNotification(aNames); +// EnableNotification(aNames); const Any* pValues = aValues.getConstArray(); DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed"); if(aValues.getLength() == aNames.getLength()) diff --git a/sc/source/core/tool/formulaparserpool.cxx b/sc/source/core/tool/formulaparserpool.cxx index 1270bf185ff4..b62d3e007592 100644 --- a/sc/source/core/tool/formulaparserpool.cxx +++ b/sc/source/core/tool/formulaparserpool.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/core/tool/hints.cxx b/sc/source/core/tool/hints.cxx index 7597070fbe18..4f9c850eba88 100644 --- a/sc/source/core/tool/hints.cxx +++ b/sc/source/core/tool/hints.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/core/tool/inputopt.cxx b/sc/source/core/tool/inputopt.cxx index 449ec8355dc1..25c4b358ad30 100644 --- a/sc/source/core/tool/inputopt.cxx +++ b/sc/source/core/tool/inputopt.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,7 +52,7 @@ using namespace com::sun::star::uno; //------------------------------------------------------------------ -// Version, ab der das Item kompatibel ist +// Version, ab der das Item kompatibel ist #define SC_VERSION ((USHORT)351) @@ -82,15 +82,15 @@ ScInputOptions::~ScInputOptions() void ScInputOptions::SetDefaults() { - nMoveDir = DIR_BOTTOM; - bMoveSelection = TRUE; - bEnterEdit = FALSE; - bExtendFormat = FALSE; - bRangeFinder = TRUE; - bExpandRefs = FALSE; - bMarkHeader = TRUE; - bUseTabCol = FALSE; - bTextWysiwyg = FALSE; + nMoveDir = DIR_BOTTOM; + bMoveSelection = TRUE; + bEnterEdit = FALSE; + bExtendFormat = FALSE; + bRangeFinder = TRUE; + bExpandRefs = FALSE; + bMarkHeader = TRUE; + bUseTabCol = FALSE; + bTextWysiwyg = FALSE; bReplCellsWarn = TRUE; } @@ -98,15 +98,15 @@ void ScInputOptions::SetDefaults() const ScInputOptions& ScInputOptions::operator=( const ScInputOptions& rCpy ) { - nMoveDir = rCpy.nMoveDir; - bMoveSelection = rCpy.bMoveSelection; - bEnterEdit = rCpy.bEnterEdit; - bExtendFormat = rCpy.bExtendFormat; - bRangeFinder = rCpy.bRangeFinder; - bExpandRefs = rCpy.bExpandRefs; - bMarkHeader = rCpy.bMarkHeader; - bUseTabCol = rCpy.bUseTabCol; - bTextWysiwyg = rCpy.bTextWysiwyg; + nMoveDir = rCpy.nMoveDir; + bMoveSelection = rCpy.bMoveSelection; + bEnterEdit = rCpy.bEnterEdit; + bExtendFormat = rCpy.bExtendFormat; + bRangeFinder = rCpy.bRangeFinder; + bExpandRefs = rCpy.bExpandRefs; + bMarkHeader = rCpy.bMarkHeader; + bUseTabCol = rCpy.bUseTabCol; + bTextWysiwyg = rCpy.bTextWysiwyg; bReplCellsWarn = rCpy.bReplCellsWarn; return *this; @@ -114,20 +114,20 @@ const ScInputOptions& ScInputOptions::operator=( const ScInputOptions& rCpy ) //================================================================== -// Config Item containing input options +// Config Item containing input options //================================================================== -#define CFGPATH_INPUT "Office.Calc/Input" - -#define SCINPUTOPT_MOVEDIR 0 -#define SCINPUTOPT_MOVESEL 1 -#define SCINPUTOPT_EDTEREDIT 2 -#define SCINPUTOPT_EXTENDFMT 3 -#define SCINPUTOPT_RANGEFIND 4 -#define SCINPUTOPT_EXPANDREFS 5 -#define SCINPUTOPT_MARKHEADER 6 -#define SCINPUTOPT_USETABCOL 7 -#define SCINPUTOPT_TEXTWYSIWYG 8 +#define CFGPATH_INPUT "Office.Calc/Input" + +#define SCINPUTOPT_MOVEDIR 0 +#define SCINPUTOPT_MOVESEL 1 +#define SCINPUTOPT_EDTEREDIT 2 +#define SCINPUTOPT_EXTENDFMT 3 +#define SCINPUTOPT_RANGEFIND 4 +#define SCINPUTOPT_EXPANDREFS 5 +#define SCINPUTOPT_MARKHEADER 6 +#define SCINPUTOPT_USETABCOL 7 +#define SCINPUTOPT_TEXTWYSIWYG 8 #define SCINPUTOPT_REPLCELLSWARN 9 #define SCINPUTOPT_COUNT 10 @@ -135,14 +135,14 @@ Sequence<OUString> ScInputCfg::GetPropertyNames() { static const char* aPropNames[] = { - "MoveSelectionDirection", // SCINPUTOPT_MOVEDIR - "MoveSelection", // SCINPUTOPT_MOVESEL - "SwitchToEditMode", // SCINPUTOPT_EDTEREDIT - "ExpandFormatting", // SCINPUTOPT_EXTENDFMT - "ShowReference", // SCINPUTOPT_RANGEFIND - "ExpandReference", // SCINPUTOPT_EXPANDREFS - "HighlightSelection", // SCINPUTOPT_MARKHEADER - "UseTabCol", // SCINPUTOPT_USETABCOL + "MoveSelectionDirection", // SCINPUTOPT_MOVEDIR + "MoveSelection", // SCINPUTOPT_MOVESEL + "SwitchToEditMode", // SCINPUTOPT_EDTEREDIT + "ExpandFormatting", // SCINPUTOPT_EXTENDFMT + "ShowReference", // SCINPUTOPT_RANGEFIND + "ExpandReference", // SCINPUTOPT_EXPANDREFS + "HighlightSelection", // SCINPUTOPT_MARKHEADER + "UseTabCol", // SCINPUTOPT_USETABCOL "UsePrinterMetrics", // SCINPUTOPT_TEXTWYSIWYG "ReplaceCellsWarning" // SCINPUTOPT_REPLCELLSWARN }; diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 0b702777d8e8..08f048147769 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -755,7 +755,7 @@ double ScInterpreter::GetChiSqDistPDF(double fX, double fDF) else // fDF is small in most cases, we can iterate { if (fmod(fDF,2.0)<0.5) - { + { // even fValue = 0.5; fCount = 2.0; @@ -863,7 +863,7 @@ double ScInterpreter::GetBeta(double fAlpha, double fBeta) fResult *= fLanczos; return fResult; } - + // Same as GetBeta but with logarithm double ScInterpreter::GetLogBeta(double fAlpha, double fBeta) { @@ -939,7 +939,7 @@ double ScInterpreter::GetBetaDistPDF(double fX, double fA, double fB) if (fB < 1.0 && fX == 1.0) { SetError(errIllegalArgument); - return HUGE_VAL; + return HUGE_VAL; } else return 0.0; @@ -1125,7 +1125,7 @@ double ScInterpreter::GetBetaDist(double fXin, double fAlpha, double fBeta) return; } } - + void ScInterpreter::ScPhi() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPhi" ); @@ -1345,7 +1345,7 @@ void ScInterpreter::ScB() } } else - { + { if ( bIsValidX ) // not(0<p<1) { if ( p == 0.0 ) @@ -1353,7 +1353,7 @@ void ScInterpreter::ScB() else if ( p == 1.0 ) PushDouble( (xe == n) ? 1.0 : 0.0 ); else - PushIllegalArgument(); + PushIllegalArgument(); } else PushIllegalArgument(); @@ -1536,7 +1536,7 @@ void ScInterpreter::ScLogNormDist() //expanded, see #i100119# { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLogNormDist" ); BYTE nParamCount = GetByte(); - if ( !MustHaveParamCount( nParamCount, 1, 4)) + if ( !MustHaveParamCount( nParamCount, 1, 4)) return; bool bCumulative = nParamCount == 4 ? GetBool() : true; // cumulative double sigma = nParamCount >= 3 ? GetDouble() : 1.0; // standard deviation @@ -3014,7 +3014,7 @@ bool ScInterpreter::CalculateSkew(double& fSum,double& fCount,double& vSum,std:: short nParamCount = GetByte(); if ( !MustHaveParamCountMin( nParamCount, 1 ) ) return false; - + fSum = 0.0; fCount = 0.0; vSum = 0.0; @@ -3303,9 +3303,9 @@ void ScInterpreter::CalculateSmallLarge(BOOL bSmall) } SCSIZE k = static_cast<SCSIZE>(f); vector<double> aSortArray; - /* TODO: using nth_element() is best for one single value, but LARGE/SMALL - * actually are defined to return an array of values if an array of - * positions was passed, in which case, depending on the number of values, + /* TODO: using nth_element() is best for one single value, but LARGE/SMALL + * actually are defined to return an array of values if an array of + * positions was passed, in which case, depending on the number of values, * we may or will need a real sorted array again, see #i32345. */ //GetSortArray(1, aSortArray); GetNumberSequenceArray(1, aSortArray); @@ -3324,7 +3324,7 @@ void ScInterpreter::CalculateSmallLarge(BOOL bSmall) void ScInterpreter::ScLarge() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScLarge" ); - CalculateSmallLarge(FALSE); + CalculateSmallLarge(FALSE); } void ScInterpreter::ScSmall() @@ -3948,7 +3948,7 @@ void ScInterpreter::ScProbability() void ScInterpreter::ScCorrel() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCorrel" ); - // This is identical to ScPearson() + // This is identical to ScPearson() ScPearson(); } @@ -3958,12 +3958,12 @@ void ScInterpreter::ScCovar() CalculatePearsonCovar(FALSE,FALSE); } -void ScInterpreter::ScPearson() +void ScInterpreter::ScPearson() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScPearson" ); CalculatePearsonCovar(TRUE,FALSE); } -void ScInterpreter::CalculatePearsonCovar(BOOL _bPearson,BOOL _bStexy) +void ScInterpreter::CalculatePearsonCovar(BOOL _bPearson,BOOL _bStexy) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::CalculatePearsonCovar" ); if ( !MustHaveParamCount( GetByte(), 2 ) ) @@ -4074,7 +4074,7 @@ void ScInterpreter::ScRSQ() void ScInterpreter::ScSTEXY() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScSTEXY" ); - CalculatePearsonCovar(TRUE,TRUE); + CalculatePearsonCovar(TRUE,TRUE); } void ScInterpreter::CalculateSlopeIntercept(BOOL bSlope) { diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 049e7a235870..ff728173661b 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -66,35 +66,35 @@ const double fInvEpsilon = 1.0E-7; // ----------------------------------------------------------------------- struct MatrixAdd : public ::std::binary_function<double,double,double> { - inline double operator() (const double& lhs, const double& rhs) const + inline double operator() (const double& lhs, const double& rhs) const { return ::rtl::math::approxAdd( lhs,rhs); } }; struct MatrixSub : public ::std::binary_function<double,double,double> { - inline double operator() (const double& lhs, const double& rhs) const + inline double operator() (const double& lhs, const double& rhs) const { return ::rtl::math::approxSub( lhs,rhs); } }; struct MatrixMul : public ::std::binary_function<double,double,double> { - inline double operator() (const double& lhs, const double& rhs) const + inline double operator() (const double& lhs, const double& rhs) const { return lhs * rhs; } }; struct MatrixDiv : public ::std::binary_function<double,double,double> { - inline double operator() (const double& lhs, const double& rhs) const + inline double operator() (const double& lhs, const double& rhs) const { return ScInterpreter::div( lhs,rhs); } }; struct MatrixPow : public ::std::binary_function<double,double,double> { - inline double operator() (const double& lhs, const double& rhs) const + inline double operator() (const double& lhs, const double& rhs) const { return ::pow( lhs,rhs); } @@ -309,7 +309,7 @@ ScMatrixRef ScInterpreter::GetNewMat(SCSIZE nC, SCSIZE nR) RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetNewMat" ); ScMatrix* pMat = new ScMatrix( nC, nR); pMat->SetErrorInterpreter( this); - // A temporary matrix is mutable and ScMatrix::CloneIfConst() returns the + // A temporary matrix is mutable and ScMatrix::CloneIfConst() returns the // very matrix. pMat->SetImmutable( false); SCSIZE nCols, nRows; @@ -2061,7 +2061,7 @@ void ScInterpreter::ScRGP() CalulateRGPRKP(FALSE); } bool ScInterpreter::CheckMatrix(BOOL _bLOG,BOOL _bTrendGrowth,BYTE& nCase,SCSIZE& nCX,SCSIZE& nCY,SCSIZE& nRX,SCSIZE& nRY,SCSIZE& M,SCSIZE& N,ScMatrixRef& pMatX,ScMatrixRef& pMatY) -{ +{ nCX = 0; nCY = 0; nRX = 0; @@ -2191,7 +2191,7 @@ void ScInterpreter::CalulateRGPRKP(BOOL _bRKP) SCSIZE M = 0, N = 0; if ( !CheckMatrix(_bRKP,FALSE,nCase,nCX,nCY,nRX,nRY,M,N,pMatX,pMatY) ) return; - + ScMatrixRef pResMat; if (nCase == 1) { @@ -2350,7 +2350,7 @@ void ScInterpreter::CalulateRGPRKP(BOOL _bRKP) } if ( !Calculate4(_bRKP,pResMat,pQ,bConstant,N,M) ) return; - + if (bStats) Calculate(pResMat,pE,pQ,pV,pMatX,bConstant,N,M,nCase); } @@ -2406,7 +2406,7 @@ bool ScInterpreter::Calculate4(BOOL _bExp,ScMatrixRef& pResMat,ScMatrixRef& pQ,B { if ( !Calculate3(M,pQ) ) return false; - + } for (SCSIZE i = 0; i < M+1; i++) { @@ -2594,8 +2594,8 @@ void ScInterpreter::CalculateTrendGrowth(BOOL _bGrowth) SCSIZE M = 0, N = 0; if ( !CheckMatrix(_bGrowth,TRUE,nCase,nCX,nCY,nRX,nRY,M,N,pMatX,pMatY) ) return; - - + + SCSIZE nCXN, nRXN; SCSIZE nCountXN; if (!pMatNewX) diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx index 109495ddb6d2..f9f8284b9cd3 100644 --- a/sc/source/core/tool/interpr6.cxx +++ b/sc/source/core/tool/interpr6.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,7 +70,7 @@ double ScInterpreter::GetGammaContFraction( double fA, double fX ) fPk = fPkm1 * fDenom - fPkm2 * fNum; fQk = fQkm1 * fDenom - fQkm2 * fNum; if (fQk != 0.0) - { + { fR = fPk/fQk; bFinished = (fabs( (fApprox - fR)/fR ) <= fHalfMachEps); fApprox = fR; @@ -138,7 +138,7 @@ double ScInterpreter::GetLowRegIGamma( double fA, double fX ) double ScInterpreter::GetUpRegIGamma( double fA, double fX ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetUpRegIGamma" ); - + double fLnFactor= fA*log(fX)-fX-GetLogGamma(fA); double fFactor = exp(fLnFactor); //Do I need more accuracy than exp(ln()) has?; if (fX>fA+1.0) // includes fX>1.0 @@ -164,7 +164,7 @@ double ScInterpreter::GetGammaDistPDF( double fX, double fAlpha, double fLambda const double fLogDblMax = log( ::std::numeric_limits<double>::max()); if (log(fXr) * (fAlpha-1.0) < fLogDblMax && fAlpha < fMaxGammaArgument) { - return pow( fXr, fAlpha-1.0) * exp(-fXr) / fLambda / GetGamma(fAlpha); + return pow( fXr, fAlpha-1.0) * exp(-fXr) / fLambda / GetGamma(fAlpha); } else { diff --git a/sc/source/core/tool/lookupcache.cxx b/sc/source/core/tool/lookupcache.cxx index 75f45261e471..a9b2cfdb078d 100644 --- a/sc/source/core/tool/lookupcache.cxx +++ b/sc/source/core/tool/lookupcache.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/core/tool/navicfg.cxx b/sc/source/core/tool/navicfg.cxx index a0b9b629bc34..1e9faff2a725 100644 --- a/sc/source/core/tool/navicfg.cxx +++ b/sc/source/core/tool/navicfg.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,12 +37,12 @@ //------------------------------------------------------------------ -//! #define CFGPATH_NAVIPI "Office.Calc/Navigator" +//! #define CFGPATH_NAVIPI "Office.Calc/Navigator" //------------------------------------------------------------------ ScNavipiCfg::ScNavipiCfg() : -//! ConfigItem( OUString::createFromAscii( CFGPATH_NAVIPI ) ), +//! ConfigItem( OUString::createFromAscii( CFGPATH_NAVIPI ) ), nListMode(0), nDragMode(0), nRootType(0) @@ -56,7 +56,7 @@ void ScNavipiCfg::SetListMode(USHORT nNew) if ( nListMode != nNew ) { nListMode = nNew; -//! SetModified(); +//! SetModified(); } } @@ -65,7 +65,7 @@ void ScNavipiCfg::SetDragMode(USHORT nNew) if ( nDragMode != nNew ) { nDragMode = nNew; -//! SetModified(); +//! SetModified(); } } @@ -74,7 +74,7 @@ void ScNavipiCfg::SetRootType(USHORT nNew) if ( nRootType != nNew ) { nRootType = nNew; -//! SetModified(); +//! SetModified(); } } diff --git a/sc/source/core/tool/odffmap.cxx b/sc/source/core/tool/odffmap.cxx index 28b13e249a07..74c86e75deab 100644 --- a/sc/source/core/tool/odffmap.cxx +++ b/sc/source/core/tool/odffmap.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/core/tool/optutil.cxx b/sc/source/core/tool/optutil.cxx index 03f4174c8613..5c461e352559 100644 --- a/sc/source/core/tool/optutil.cxx +++ b/sc/source/core/tool/optutil.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,9 +42,9 @@ // static BOOL ScOptionsUtil::IsMetricSystem() { - //! which language should be used here - system language or installed office language? + //! which language should be used here - system language or installed office language? -// MeasurementSystem eSys = Application::GetAppInternational().GetMeasurementSystem(); +// MeasurementSystem eSys = Application::GetAppInternational().GetMeasurementSystem(); MeasurementSystem eSys = ScGlobal::pLocaleData->getMeasurementSystemEnum(); return ( eSys == MEASURE_METRIC ); @@ -69,7 +69,7 @@ void ScLinkConfigItem::SetCommitLink( const Link& rLink ) void ScLinkConfigItem::Notify( const com::sun::star::uno::Sequence<rtl::OUString>& /* aPropertyNames */ ) { - //! not implemented yet... + //! not implemented yet... } void ScLinkConfigItem::Commit() diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx index 9af15044f69a..f7b414d3149e 100644 --- a/sc/source/core/tool/parclass.cxx +++ b/sc/source/core/tool/parclass.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx index f895bbc0a6ca..86e36bfb9a9f 100644 --- a/sc/source/core/tool/printopt.cxx +++ b/sc/source/core/tool/printopt.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -91,13 +91,13 @@ int ScPrintOptions::operator!=( const ScPrintOptions& rOpt ) const ScTpPrintItem::ScTpPrintItem( USHORT nWhichP, const ScPrintOptions& rOpt ) : SfxPoolItem ( nWhichP ), - theOptions ( rOpt ) + theOptions ( rOpt ) { } ScTpPrintItem::ScTpPrintItem( const ScTpPrintItem& rItem ) : - SfxPoolItem ( rItem ), - theOptions ( rItem.theOptions ) + SfxPoolItem ( rItem ), + theOptions ( rItem.theOptions ) { } @@ -125,18 +125,18 @@ SfxPoolItem* ScTpPrintItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -#define CFGPATH_PRINT "Office.Calc/Print" +#define CFGPATH_PRINT "Office.Calc/Print" -#define SCPRINTOPT_EMPTYPAGES 0 -#define SCPRINTOPT_ALLSHEETS 1 -#define SCPRINTOPT_COUNT 2 +#define SCPRINTOPT_EMPTYPAGES 0 +#define SCPRINTOPT_ALLSHEETS 1 +#define SCPRINTOPT_COUNT 2 Sequence<OUString> ScPrintCfg::GetPropertyNames() { static const char* aPropNames[] = { - "Page/EmptyPages", // SCPRINTOPT_EMPTYPAGES - "Other/AllSheets" // SCPRINTOPT_ALLSHEETS + "Page/EmptyPages", // SCPRINTOPT_EMPTYPAGES + "Other/AllSheets" // SCPRINTOPT_ALLSHEETS }; Sequence<OUString> aNames(SCPRINTOPT_COUNT); OUString* pNames = aNames.getArray(); @@ -151,7 +151,7 @@ ScPrintCfg::ScPrintCfg() : { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues = GetProperties(aNames); -// EnableNotification(aNames); +// EnableNotification(aNames); const Any* pValues = aValues.getConstArray(); DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed"); if(aValues.getLength() == aNames.getLength()) diff --git a/sc/source/core/tool/prnsave.cxx b/sc/source/core/tool/prnsave.cxx index 35200d6b4ff9..9301225f4c3e 100644 --- a/sc/source/core/tool/prnsave.cxx +++ b/sc/source/core/tool/prnsave.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,7 +44,7 @@ //------------------------------------------------------------------ // -// Daten pro Tabelle +// Daten pro Tabelle // ScPrintSaverTab::ScPrintSaverTab() : @@ -89,7 +89,7 @@ BOOL ScPrintSaverTab::operator==( const ScPrintSaverTab& rCmp ) const } // -// Daten fuer das ganze Dokument +// Daten fuer das ganze Dokument // ScPrintRangeSaver::ScPrintRangeSaver( SCTAB nCount ) : diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx index 0a26b968f112..58b8fd3c2b7a 100644 --- a/sc/source/core/tool/progress.cxx +++ b/sc/source/core/tool/progress.cxx @@ -50,16 +50,16 @@ static ScProgress theDummyInterpretProgress; -SfxProgress* ScProgress::pGlobalProgress = NULL; -ULONG ScProgress::nGlobalRange = 0; -ULONG ScProgress::nGlobalPercent = 0; -BOOL ScProgress::bGlobalNoUserBreak = TRUE; -ScProgress* ScProgress::pInterpretProgress = &theDummyInterpretProgress; -ScProgress* ScProgress::pOldInterpretProgress = NULL; -ULONG ScProgress::nInterpretProgress = 0; -BOOL ScProgress::bAllowInterpretProgress = TRUE; -ScDocument* ScProgress::pInterpretDoc; -BOOL ScProgress::bIdleWasDisabled = FALSE; +SfxProgress* ScProgress::pGlobalProgress = NULL; +ULONG ScProgress::nGlobalRange = 0; +ULONG ScProgress::nGlobalPercent = 0; +BOOL ScProgress::bGlobalNoUserBreak = TRUE; +ScProgress* ScProgress::pInterpretProgress = &theDummyInterpretProgress; +ScProgress* ScProgress::pOldInterpretProgress = NULL; +ULONG ScProgress::nInterpretProgress = 0; +BOOL ScProgress::bAllowInterpretProgress = TRUE; +ScDocument* ScProgress::pInterpretDoc; +BOOL ScProgress::bIdleWasDisabled = FALSE; BOOL lcl_IsHiddenDocument( SfxObjectShell* pObjSh ) @@ -98,17 +98,17 @@ ScProgress::ScProgress( SfxObjectShell* pObjSh, const String& rText, } else if ( SFX_APP()->IsDowning() ) { - // kommt vor z.B. beim Speichern des Clipboard-Inhalts als OLE beim Beenden - // Dann wuerde ein SfxProgress wild im Speicher rummuellen - //! Soll das so sein ??? + // kommt vor z.B. beim Speichern des Clipboard-Inhalts als OLE beim Beenden + // Dann wuerde ein SfxProgress wild im Speicher rummuellen + //! Soll das so sein ??? pProgress = NULL; } else if ( pObjSh && ( pObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED || pObjSh->GetProgress() ) ) { - // #62808# no own progress for embedded objects, - // #73633# no second progress if the document already has one + // #62808# no own progress for embedded objects, + // #73633# no second progress if the document already has one pProgress = NULL; } @@ -125,7 +125,7 @@ ScProgress::ScProgress( SfxObjectShell* pObjSh, const String& rText, ScProgress::ScProgress() : pProgress( NULL ) -{ // DummyInterpret +{ // DummyInterpret } diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx index ca87b1503b0b..429bdc908bc3 100644 --- a/sc/source/core/tool/queryparam.cxx +++ b/sc/source/core/tool/queryparam.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -170,7 +170,7 @@ ScQueryParamTable::~ScQueryParamTable() // ============================================================================ -ScQueryParam::ScQueryParam() : +ScQueryParam::ScQueryParam() : ScQueryParamBase(), ScQueryParamTable(), bDestPers(true), @@ -202,7 +202,7 @@ ScQueryParam::ScQueryParam( const ScDBQueryParamInternal& r ) : bUseDynamicRange(false) { } - + //------------------------------------------------------------------------ diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index ed93713eb65f..b7d21336d451 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -32,10 +32,10 @@ //------------------------------------------------------------------------ -#define SC_RANGELST_CXX //fuer ICC +#define SC_RANGELST_CXX //fuer ICC #include <tools/debug.hxx> -#include <stdlib.h> // qsort +#include <stdlib.h> // qsort #include <unotools/collatorwrapper.hxx> #include "rangelst.hxx" @@ -68,15 +68,15 @@ USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask, if (!cDelimiter) cDelimiter = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); - nMask |= SCA_VALID; // falls das jemand vergessen sollte - USHORT nResult = (USHORT)~0; // alle Bits setzen - ScRange aRange; + nMask |= SCA_VALID; // falls das jemand vergessen sollte + USHORT nResult = (USHORT)~0; // alle Bits setzen + ScRange aRange; String aOne; SCTAB nTab = 0; if ( pDoc ) { - //! erste markierte Tabelle gibts nicht mehr am Dokument - //! -> uebergeben? oder spaeter an den Ranges setzen + //! erste markierte Tabelle gibts nicht mehr am Dokument + //! -> uebergeben? oder spaeter an den Ranges setzen } else nTab = 0; @@ -84,7 +84,7 @@ USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask, for ( USHORT i=0; i<nTCount; i++ ) { aOne = rStr.GetToken( i, cDelimiter ); - aRange.aStart.SetTab( nTab ); // Default Tab wenn nicht angegeben + aRange.aStart.SetTab( nTab ); // Default Tab wenn nicht angegeben USHORT nRes = aRange.ParseAny( aOne, pDoc, eConv ); USHORT nEndRangeBits = SCA_VALID_COL2 | SCA_VALID_ROW2 | SCA_VALID_TAB2; @@ -98,9 +98,9 @@ SCA_VALID_TAB2; if ( (nRes & nMask) == nMask ) Append( aRange ); - nResult &= nRes; // alle gemeinsamen Bits bleiben erhalten + nResult &= nRes; // alle gemeinsamen Bits bleiben erhalten } - return nResult; // SCA_VALID gesetzt wenn alle ok + return nResult; // SCA_VALID gesetzt wenn alle ok } else return 0; @@ -141,44 +141,44 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList ) SCCOL nCol2 = r.aEnd.Col(); SCROW nRow2 = r.aEnd.Row(); SCTAB nTab2 = r.aEnd.Tab(); - ScRangePtr pOver = (ScRangePtr) &r; // fies aber wahr wenn bInList + ScRangePtr pOver = (ScRangePtr) &r; // fies aber wahr wenn bInList ULONG nOldPos = 0; if ( bIsInList ) - { // merken um ggbf. zu loeschen bzw. wiederherzustellen + { // merken um ggbf. zu loeschen bzw. wiederherzustellen nOldPos = GetPos( pOver ); } BOOL bJoinedInput = FALSE; for ( ScRangePtr p = First(); p && pOver; p = Next() ) { if ( p == pOver ) - continue; // derselbe, weiter mit dem naechsten + continue; // derselbe, weiter mit dem naechsten BOOL bJoined = FALSE; if ( p->In( r ) ) - { // Range r in Range p enthalten oder identisch + { // Range r in Range p enthalten oder identisch if ( bIsInList ) - bJoined = TRUE; // weg mit Range r + bJoined = TRUE; // weg mit Range r else - { // das war's dann - bJoinedInput = TRUE; // nicht anhaengen - break; // for + { // das war's dann + bJoinedInput = TRUE; // nicht anhaengen + break; // for } } else if ( r.In( *p ) ) - { // Range p in Range r enthalten, r zum neuen Range machen + { // Range p in Range r enthalten, r zum neuen Range machen *p = r; bJoined = TRUE; } if ( !bJoined && p->aStart.Tab() == nTab1 && p->aEnd.Tab() == nTab2 ) - { // 2D + { // 2D if ( p->aStart.Col() == nCol1 && p->aEnd.Col() == nCol2 ) { if ( p->aStart.Row() == nRow2+1 ) - { // oben + { // oben p->aStart.SetRow( nRow1 ); bJoined = TRUE; } else if ( p->aEnd.Row() == nRow1-1 ) - { // unten + { // unten p->aEnd.SetRow( nRow2 ); bJoined = TRUE; } @@ -186,12 +186,12 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList ) else if ( p->aStart.Row() == nRow1 && p->aEnd.Row() == nRow2 ) { if ( p->aStart.Col() == nCol2+1 ) - { // links + { // links p->aStart.SetCol( nCol1 ); bJoined = TRUE; } else if ( p->aEnd.Col() == nCol1-1 ) - { // rechts + { // rechts p->aEnd.SetCol( nCol2 ); bJoined = TRUE; } @@ -200,15 +200,15 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList ) if ( bJoined ) { if ( bIsInList ) - { // innerhalb der Liste Range loeschen + { // innerhalb der Liste Range loeschen Remove( nOldPos ); delete pOver; pOver = NULL; if ( nOldPos ) - nOldPos--; // Seek richtig aufsetzen + nOldPos--; // Seek richtig aufsetzen } bJoinedInput = TRUE; - Join( *p, TRUE ); // rekursiv! + Join( *p, TRUE ); // rekursiv! } } if ( bIsInList ) @@ -221,14 +221,14 @@ void ScRangeList::Join( const ScRange& r, BOOL bIsInList ) BOOL ScRangeList::operator==( const ScRangeList& r ) const { if ( this == &r ) - return TRUE; // identische Referenz + return TRUE; // identische Referenz if ( Count() != r.Count() ) return FALSE; ULONG nCnt = Count(); for ( ULONG nIdx = 0; nIdx < nCnt; nIdx++ ) { if ( *GetObject( nIdx ) != *r.GetObject( nIdx ) ) - return FALSE; // auch andere Reihenfolge ist ungleich + return FALSE; // auch andere Reihenfolge ist ungleich } return TRUE; } @@ -373,34 +373,34 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList ) SCCOL nCol2 = r1.aEnd.Col(); SCROW nRow2 = r1.aEnd.Row(); SCTAB nTab2 = r1.aEnd.Tab(); - ScRangePair* pOver = (ScRangePair*) &r; // fies aber wahr wenn bInList + ScRangePair* pOver = (ScRangePair*) &r; // fies aber wahr wenn bInList ULONG nOldPos = 0; if ( bIsInList ) - { // merken um ggbf. zu loeschen bzw. wiederherzustellen + { // merken um ggbf. zu loeschen bzw. wiederherzustellen nOldPos = GetPos( pOver ); } BOOL bJoinedInput = FALSE; for ( ScRangePair* p = First(); p && pOver; p = Next() ) { if ( p == pOver ) - continue; // derselbe, weiter mit dem naechsten + continue; // derselbe, weiter mit dem naechsten BOOL bJoined = FALSE; ScRange& rp1 = p->GetRange(0); ScRange& rp2 = p->GetRange(1); if ( rp2 == r2 ) - { // nur wenn Range2 gleich ist + { // nur wenn Range2 gleich ist if ( rp1.In( r1 ) ) - { // RangePair r in RangePair p enthalten oder identisch + { // RangePair r in RangePair p enthalten oder identisch if ( bIsInList ) - bJoined = TRUE; // weg mit RangePair r + bJoined = TRUE; // weg mit RangePair r else - { // das war's dann - bJoinedInput = TRUE; // nicht anhaengen - break; // for + { // das war's dann + bJoinedInput = TRUE; // nicht anhaengen + break; // for } } else if ( r1.In( rp1 ) ) - { // RangePair p in RangePair r enthalten, r zum neuen RangePair machen + { // RangePair p in RangePair r enthalten, r zum neuen RangePair machen *p = r; bJoined = TRUE; } @@ -408,21 +408,21 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList ) if ( !bJoined && rp1.aStart.Tab() == nTab1 && rp1.aEnd.Tab() == nTab2 && rp2.aStart.Tab() == r2.aStart.Tab() && rp2.aEnd.Tab() == r2.aEnd.Tab() ) - { // 2D, Range2 muss genauso nebeneinander liegen wie Range1 + { // 2D, Range2 muss genauso nebeneinander liegen wie Range1 if ( rp1.aStart.Col() == nCol1 && rp1.aEnd.Col() == nCol2 && rp2.aStart.Col() == r2.aStart.Col() && rp2.aEnd.Col() == r2.aEnd.Col() ) { if ( rp1.aStart.Row() == nRow2+1 && rp2.aStart.Row() == r2.aEnd.Row()+1 ) - { // oben + { // oben rp1.aStart.SetRow( nRow1 ); rp2.aStart.SetRow( r2.aStart.Row() ); bJoined = TRUE; } else if ( rp1.aEnd.Row() == nRow1-1 && rp2.aEnd.Row() == r2.aStart.Row()-1 ) - { // unten + { // unten rp1.aEnd.SetRow( nRow2 ); rp2.aEnd.SetRow( r2.aEnd.Row() ); bJoined = TRUE; @@ -434,14 +434,14 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList ) { if ( rp1.aStart.Col() == nCol2+1 && rp2.aStart.Col() == r2.aEnd.Col()+1 ) - { // links + { // links rp1.aStart.SetCol( nCol1 ); rp2.aStart.SetCol( r2.aStart.Col() ); bJoined = TRUE; } else if ( rp1.aEnd.Col() == nCol1-1 && rp2.aEnd.Col() == r2.aEnd.Col()-1 ) - { // rechts + { // rechts rp1.aEnd.SetCol( nCol2 ); rp2.aEnd.SetCol( r2.aEnd.Col() ); bJoined = TRUE; @@ -451,15 +451,15 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList ) if ( bJoined ) { if ( bIsInList ) - { // innerhalb der Liste RangePair loeschen + { // innerhalb der Liste RangePair loeschen Remove( nOldPos ); delete pOver; pOver = NULL; if ( nOldPos ) - nOldPos--; // Seek richtig aufsetzen + nOldPos--; // Seek richtig aufsetzen } bJoinedInput = TRUE; - Join( *p, TRUE ); // rekursiv! + Join( *p, TRUE ); // rekursiv! } } if ( bIsInList ) @@ -472,14 +472,14 @@ void ScRangePairList::Join( const ScRangePair& r, BOOL bIsInList ) BOOL ScRangePairList::operator==( const ScRangePairList& r ) const { if ( this == &r ) - return TRUE; // identische Referenz + return TRUE; // identische Referenz if ( Count() != r.Count() ) return FALSE; ULONG nCnt = Count(); for ( ULONG nIdx = 0; nIdx < nCnt; nIdx++ ) { if ( *GetObject( nIdx ) != *r.GetObject( nIdx ) ) - return FALSE; // auch andere Reihenfolge ist ungleich + return FALSE; // auch andere Reihenfolge ist ungleich } return TRUE; } @@ -590,8 +590,8 @@ ScRangePairList* ScRangePairList::Clone() const struct ScRangePairNameSort { - ScRangePair* pPair; - ScDocument* pDoc; + ScRangePair* pPair; + ScDocument* pDoc; }; diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index f115f4a4bf62..008d5f41c4ad 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -66,14 +66,14 @@ ScRangeData::ScRangeData( ScDocument* pDok, const ScAddress& rAddress, RangeType nType, const FormulaGrammar::Grammar eGrammar ) : - aName ( rName ), + aName ( rName ), aUpperName ( ScGlobal::pCharClass->upper( rName ) ), - pCode ( NULL ), - aPos ( rAddress ), - eType ( nType ), - pDoc ( pDok ), - nIndex ( 0 ), - bModified ( FALSE ), + pCode ( NULL ), + aPos ( rAddress ), + eType ( nType ), + pDoc ( pDok ), + nIndex ( 0 ), + bModified ( FALSE ), mnMaxRow (-1), mnMaxCol (-1) { @@ -114,14 +114,14 @@ ScRangeData::ScRangeData( ScDocument* pDok, const ScTokenArray& rArr, const ScAddress& rAddress, RangeType nType ) : - aName ( rName ), + aName ( rName ), aUpperName ( ScGlobal::pCharClass->upper( rName ) ), - pCode ( new ScTokenArray( rArr ) ), - aPos ( rAddress ), - eType ( nType ), - pDoc ( pDok ), - nIndex ( 0 ), - bModified ( FALSE ), + pCode ( new ScTokenArray( rArr ) ), + aPos ( rAddress ), + eType ( nType ), + pDoc ( pDok ), + nIndex ( 0 ), + bModified ( FALSE ), mnMaxRow (-1), mnMaxCol (-1) { @@ -138,27 +138,27 @@ ScRangeData::ScRangeData( ScDocument* pDok, } // Die Importfilter haben diesen Test nicht, // da die benannten Bereiche z.T. noch unvollstaendig sind. -// if( !pCode->GetCodeLen() ) -// { -// // ggf. den Fehlercode wg. unvollstaendiger Formel setzen! -// ScCompiler aComp( pDok, aPos, *pCode ); -// aComp.CompileTokenArray(); -// pCode->DelRPN(); -// } +// if( !pCode->GetCodeLen() ) +// { +// // ggf. den Fehlercode wg. unvollstaendiger Formel setzen! +// ScCompiler aComp( pDok, aPos, *pCode ); +// aComp.CompileTokenArray(); +// pCode->DelRPN(); +// } } } ScRangeData::ScRangeData( ScDocument* pDok, const String& rName, const ScAddress& rTarget ) : - aName ( rName ), + aName ( rName ), aUpperName ( ScGlobal::pCharClass->upper( rName ) ), - pCode ( new ScTokenArray() ), - aPos ( rTarget ), - eType ( RT_NAME ), - pDoc ( pDok ), - nIndex ( 0 ), - bModified ( FALSE ), + pCode ( new ScTokenArray() ), + aPos ( rTarget ), + eType ( RT_NAME ), + pDoc ( pDok ), + nIndex ( 0 ), + bModified ( FALSE ), mnMaxRow (-1), mnMaxCol (-1) { @@ -175,14 +175,14 @@ ScRangeData::ScRangeData( ScDocument* pDok, ScRangeData::ScRangeData(const ScRangeData& rScRangeData) : ScDataObject(), - aName (rScRangeData.aName), + aName (rScRangeData.aName), aUpperName (rScRangeData.aUpperName), - pCode (rScRangeData.pCode ? rScRangeData.pCode->Clone() : new ScTokenArray()), // echte Kopie erzeugen (nicht copy-ctor) - aPos (rScRangeData.aPos), - eType (rScRangeData.eType), - pDoc (rScRangeData.pDoc), - nIndex (rScRangeData.nIndex), - bModified (rScRangeData.bModified), + pCode (rScRangeData.pCode ? rScRangeData.pCode->Clone() : new ScTokenArray()), // echte Kopie erzeugen (nicht copy-ctor) + aPos (rScRangeData.aPos), + eType (rScRangeData.eType), + pDoc (rScRangeData.pDoc), + nIndex (rScRangeData.nIndex), + bModified (rScRangeData.bModified), mnMaxRow (rScRangeData.mnMaxRow), mnMaxCol (rScRangeData.mnMaxCol) {} @@ -199,8 +199,8 @@ ScDataObject* ScRangeData::Clone() const void ScRangeData::GuessPosition() { - // setzt eine Position, mit der alle relative Referenzen bei CalcAbsIfRel - // ohne Fehler verabsolutiert werden koennen + // setzt eine Position, mit der alle relative Referenzen bei CalcAbsIfRel + // ohne Fehler verabsolutiert werden koennen DBG_ASSERT(aPos == ScAddress(), "die Position geht jetzt verloren"); @@ -234,9 +234,9 @@ void ScRangeData::GuessPosition() aPos = ScAddress( (SCCOL)(-nMinCol), (SCROW)(-nMinRow), (SCTAB)(-nMinTab) ); - //! Test -// DBG_ERROR(String("Pos ")+String((SCCOL)(-nMinCol))+String("/")+ -// String((SCROW)(-nMinRow))+String("/")+String((SCTAB)(-nMinTab))); + //! Test +// DBG_ERROR(String("Pos ")+String((SCCOL)(-nMinCol))+String("/")+ +// String((SCROW)(-nMinRow))+String("/")+String((SCTAB)(-nMinTab))); } void ScRangeData::GetSymbol( String& rSymbol, const FormulaGrammar::Grammar eGrammar ) const @@ -246,7 +246,7 @@ void ScRangeData::GetSymbol( String& rSymbol, const FormulaGrammar::Grammar eGra aComp.CreateStringFromTokenArray( rSymbol ); } -void ScRangeData::UpdateSymbol( rtl::OUStringBuffer& rBuffer, const ScAddress& rPos, +void ScRangeData::UpdateSymbol( rtl::OUStringBuffer& rBuffer, const ScAddress& rPos, const FormulaGrammar::Grammar eGrammar ) { ::std::auto_ptr<ScTokenArray> pTemp( pCode->Clone() ); @@ -256,7 +256,7 @@ void ScRangeData::UpdateSymbol( rtl::OUStringBuffer& rBuffer, const ScAddress& r aComp.CreateStringFromTokenArray( rBuffer ); } -void ScRangeData::UpdateReference( UpdateRefMode eUpdateRefMode, +void ScRangeData::UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { @@ -337,15 +337,15 @@ void ScRangeData::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY ) } } - bModified = bChanged; // muss direkt hinterher ausgewertet werden + bModified = bChanged; // muss direkt hinterher ausgewertet werden } -BOOL ScRangeData::operator== (const ScRangeData& rData) const // fuer Undo +BOOL ScRangeData::operator== (const ScRangeData& rData) const // fuer Undo { - if ( nIndex != rData.nIndex || - aName != rData.aName || - aPos != rData.aPos || - eType != rData.eType ) return FALSE; + if ( nIndex != rData.nIndex || + aName != rData.aName || + aPos != rData.aPos || + eType != rData.eType ) return FALSE; USHORT nLen = pCode->GetLen(); if ( nLen != rData.pCode->GetLen() ) return FALSE; @@ -411,13 +411,13 @@ void ScRangeData::UpdateTabRef(SCTAB nOldTable, USHORT nFlag, SCTAB nNewTable) aComp.SetGrammar(pDoc->GetGrammar()); switch (nFlag) { - case 1: // einfache InsertTab (doc.cxx) - pRangeData = aComp.UpdateInsertTab(nOldTable, TRUE ); // und CopyTab (doc2.cxx) + case 1: // einfache InsertTab (doc.cxx) + pRangeData = aComp.UpdateInsertTab(nOldTable, TRUE ); // und CopyTab (doc2.cxx) break; - case 2: // einfaches delete (doc.cxx) + case 2: // einfaches delete (doc.cxx) pRangeData = aComp.UpdateDeleteTab(nOldTable, FALSE, TRUE, bChanged); break; - case 3: // move (doc2.cxx) + case 3: // move (doc2.cxx) { pRangeData = aComp.UpdateMoveTab(nOldTable, nNewTable, TRUE ); } @@ -439,7 +439,7 @@ void ScRangeData::UpdateTabRef(SCTAB nOldTable, USHORT nFlag, SCTAB nNewTable) } -void ScRangeData::MakeValidName( String& rName ) // static +void ScRangeData::MakeValidName( String& rName ) // static { //ScCompiler::InitSymbolsNative(); @@ -451,7 +451,7 @@ void ScRangeData::MakeValidName( String& rName ) // static if ( nPos>0 ) rName.Erase(0,nPos); - // if the first character is an invalid start character, precede with '_' + // if the first character is an invalid start character, precede with '_' if ( rName.Len() && !ScCompiler::IsCharFlagAllConventions( rName, 0, SC_COMPILER_C_CHAR_NAME ) ) rName.Insert('_',0); @@ -463,14 +463,14 @@ void ScRangeData::MakeValidName( String& rName ) // static rName.SetChar( nPos, '_' ); } - // Ensure that the proposed name is not a reference under any convention, + // Ensure that the proposed name is not a reference under any convention, // same as in IsNameValid() ScAddress aAddr; ScRange aRange; for (int nConv = FormulaGrammar::CONV_UNSPECIFIED; ++nConv < FormulaGrammar::CONV_LAST; ) { ScAddress::Details details( static_cast<FormulaGrammar::AddressConvention>( nConv ) ); - // Don't check Parse on VALID, any partial only VALID may result in + // Don't check Parse on VALID, any partial only VALID may result in // #REF! during compile later! while (aRange.Parse( rName, NULL, details) || aAddr.Parse( rName, NULL, details)) { @@ -484,7 +484,7 @@ void ScRangeData::MakeValidName( String& rName ) // static BOOL ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc ) { - /* XXX If changed, sc/source/filter/ftools/ftools.cxx + /* XXX If changed, sc/source/filter/ftools/ftools.cxx * ScfTools::ConvertToScDefinedName needs to be changed too. */ xub_StrLen nPos = 0; xub_StrLen nLen = rName.Len(); @@ -500,7 +500,7 @@ BOOL ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc ) for (int nConv = FormulaGrammar::CONV_UNSPECIFIED; ++nConv < FormulaGrammar::CONV_LAST; ) { ScAddress::Details details( static_cast<FormulaGrammar::AddressConvention>( nConv ) ); - // Don't check Parse on VALID, any partial only VALID may result in + // Don't check Parse on VALID, any partial only VALID may result in // #REF! during compile later! if (aRange.Parse( rName, pDoc, details) || aAddr.Parse( rName, pDoc, details)) return FALSE; @@ -596,13 +596,13 @@ void ScRangeData::ReplaceRangeNamesInUse( const IndexMap& rMap ) void ScRangeData::ValidateTabRefs() { - // try to make sure all relative references and the reference position - // are within existing tables, so they can be represented as text - // (if the range of used tables is more than the existing tables, - // the result may still contain invalid tables, because the relative - // references aren't changed so formulas stay the same) + // try to make sure all relative references and the reference position + // are within existing tables, so they can be represented as text + // (if the range of used tables is more than the existing tables, + // the result may still contain invalid tables, because the relative + // references aren't changed so formulas stay the same) - // find range of used tables + // find range of used tables SCTAB nMinTab = aPos.Tab(); SCTAB nMaxTab = nMinTab; @@ -634,8 +634,8 @@ void ScRangeData::ValidateTabRefs() SCTAB nTabCount = pDoc->GetTableCount(); if ( nMaxTab >= nTabCount && nMinTab > 0 ) { - // move position and relative tab refs - // The formulas that use the name are not changed by this + // move position and relative tab refs + // The formulas that use the name are not changed by this SCTAB nMove = nMinTab; aPos.SetTab( aPos.Tab() - nMove ); @@ -717,7 +717,7 @@ BOOL ScRangeName::SearchName( const String& rName, USHORT& rIndex ) const return FALSE; } -void ScRangeName::UpdateReference( UpdateRefMode eUpdateRefMode, +void ScRangeName::UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { @@ -745,7 +745,7 @@ BOOL ScRangeName::IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const BOOL ScRangeName::Insert(ScDataObject* pScDataObject) { - if (!((ScRangeData*)pScDataObject)->GetIndex()) // schon gesetzt? + if (!((ScRangeData*)pScDataObject)->GetIndex()) // schon gesetzt? { ((ScRangeData*)pScDataObject)->SetIndex( GetEntryIndex() ); } diff --git a/sc/source/core/tool/rangeseq.cxx b/sc/source/core/tool/rangeseq.cxx index d7b86780e562..95ccdc700ba4 100644 --- a/sc/source/core/tool/rangeseq.cxx +++ b/sc/source/core/tool/rangeseq.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,7 +54,7 @@ long lcl_DoubleToLong( double fVal ) if ( fInt >= LONG_MIN && fInt <= LONG_MAX ) return (long)fInt; else - return 0; // out of range + return 0; // out of range } BOOL ScRangeToSequence::FillLongArray( uno::Any& rAny, ScDocument* pDoc, const ScRange& rRange ) @@ -79,7 +79,7 @@ BOOL ScRangeToSequence::FillLongArray( uno::Any& rAny, ScDocument* pDoc, const S } rAny <<= aRowSeq; - return TRUE; //! check for errors + return TRUE; //! check for errors } @@ -135,7 +135,7 @@ BOOL ScRangeToSequence::FillDoubleArray( uno::Any& rAny, ScDocument* pDoc, const } rAny <<= aRowSeq; - return TRUE; //! check for errors + return TRUE; //! check for errors } @@ -194,7 +194,7 @@ BOOL ScRangeToSequence::FillStringArray( uno::Any& rAny, ScDocument* pDoc, const } rAny <<= aRowSeq; - return TRUE; //! check for errors + return TRUE; //! check for errors } @@ -242,13 +242,13 @@ BOOL ScRangeToSequence::FillStringArray( uno::Any& rAny, const ScMatrix* pMatrix double lcl_GetValueFromCell( ScBaseCell& rCell ) { - //! ScBaseCell member function? + //! ScBaseCell member function? CellType eType = rCell.GetCellType(); if ( eType == CELLTYPE_VALUE ) return ((ScValueCell&)rCell).GetValue(); else if ( eType == CELLTYPE_FORMULA ) - return ((ScFormulaCell&)rCell).GetValue(); // called only if result is value + return ((ScFormulaCell&)rCell).GetValue(); // called only if result is value DBG_ERROR( "GetValueFromCell: wrong type" ); return 0; @@ -292,7 +292,7 @@ BOOL ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument* pDoc, const rElement <<= rtl::OUString( pCell->GetStringData() ); } else - rElement <<= rtl::OUString(); // empty: empty string + rElement <<= rtl::OUString(); // empty: empty string } pRowAry[nRow] = aColSeq; } diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 6cae0b6d2f24..08a07c090110 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,10 +53,10 @@ using namespace ::com::sun::star; //------------------------------------------------------------------------ -BOOL ScRangeUtil::MakeArea( const String& rAreaStr, - ScArea& rArea, - ScDocument* pDoc, - SCTAB nTab, +BOOL ScRangeUtil::MakeArea( const String& rAreaStr, + ScArea& rArea, + ScDocument* pDoc, + SCTAB nTab, ScAddress::Details const & rDetails ) const { // Eingabe in rAreaStr: "$Tabelle1.$A1:$D17" @@ -64,12 +64,12 @@ BOOL ScRangeUtil::MakeArea( const String& rAreaStr, // BROKEN BROKEN BROKEN // but it is only used in the consolidate dialog. Ignore for now. - BOOL nSuccess = FALSE; - USHORT nPointPos = rAreaStr.Search('.'); - USHORT nColonPos = rAreaStr.Search(':'); - String aStrArea( rAreaStr ); - ScRefAddress startPos; - ScRefAddress endPos; + BOOL nSuccess = FALSE; + USHORT nPointPos = rAreaStr.Search('.'); + USHORT nColonPos = rAreaStr.Search(':'); + String aStrArea( rAreaStr ); + ScRefAddress startPos; + ScRefAddress endPos; if ( nColonPos == STRING_NOTFOUND ) if ( nPointPos != STRING_NOTFOUND ) @@ -82,22 +82,22 @@ BOOL ScRangeUtil::MakeArea( const String& rAreaStr, if ( nSuccess ) rArea = ScArea( startPos.Tab(), - startPos.Col(), startPos.Row(), - endPos.Col(), endPos.Row() ); + startPos.Col(), startPos.Row(), + endPos.Col(), endPos.Row() ); return nSuccess; } //------------------------------------------------------------------------ -void ScRangeUtil::CutPosString( const String& theAreaStr, - String& thePosStr ) const +void ScRangeUtil::CutPosString( const String& theAreaStr, + String& thePosStr ) const { - String aPosStr; + String aPosStr; // BROKEN BROKEN BROKEN // but it is only used in the consolidate dialog. Ignore for now. - USHORT nColonPos = theAreaStr.Search(':'); + USHORT nColonPos = theAreaStr.Search(':'); if ( nColonPos != STRING_NOTFOUND ) aPosStr = theAreaStr.Copy( 0, nColonPos ); // ':' nicht mitkopieren @@ -109,10 +109,10 @@ void ScRangeUtil::CutPosString( const String& theAreaStr, //------------------------------------------------------------------------ -BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr, - ScDocument* pDoc, - ScArea*** pppAreas, - USHORT* pAreaCount, +BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr, + ScDocument* pDoc, + ScArea*** pppAreas, + USHORT* pAreaCount, BOOL /* bAcceptCellRef */, ScAddress::Details const & rDetails ) const { @@ -125,9 +125,9 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr, /* * Erwartet wird ein String der Form - * "$Tabelle1.$A$1:$Tabelle3.$D$17" + * "$Tabelle1.$A$1:$Tabelle3.$D$17" * Wenn bAcceptCellRef == TRUE ist, wird auch ein String der Form - * "$Tabelle1.$A$1" + * "$Tabelle1.$A$1" * akzeptiert. * * als Ergebnis wird ein ScArea-Array angelegt, @@ -135,10 +135,10 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr, * wieder geloescht werden muss! */ - BOOL bStrOk = FALSE; - String aTempAreaStr(rAreaStr); - String aStartPosStr; - String aEndPosStr; + BOOL bStrOk = FALSE; + String aTempAreaStr(rAreaStr); + String aStartPosStr; + String aEndPosStr; if ( STRING_NOTFOUND == aTempAreaStr.Search(':') ) { @@ -146,16 +146,16 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr, aTempAreaStr.Append(rAreaStr); } - USHORT nColonPos = aTempAreaStr.Search(':'); + USHORT nColonPos = aTempAreaStr.Search(':'); if ( STRING_NOTFOUND != nColonPos && STRING_NOTFOUND != aTempAreaStr.Search('.') ) { - ScRefAddress aStartPos; - ScRefAddress aEndPos; + ScRefAddress aStartPos; + ScRefAddress aEndPos; - aStartPosStr = aTempAreaStr.Copy( 0, nColonPos ); - aEndPosStr = aTempAreaStr.Copy( nColonPos+1, STRING_LEN ); + aStartPosStr = aTempAreaStr.Copy( 0, nColonPos ); + aEndPosStr = aTempAreaStr.Copy( nColonPos+1, STRING_LEN ); if ( ConvertSingleRef( pDoc, aStartPosStr, 0, aStartPos, rDetails ) ) { @@ -172,13 +172,13 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr, if ( pppAreas && pAreaCount ) // Array zurueckgegeben? { - SCTAB nStartTab = aStartPos.Tab(); - SCTAB nEndTab = aEndPos.Tab(); - USHORT nTabCount = static_cast<USHORT>(nEndTab-nStartTab+1); - ScArea** theAreas = new ScArea*[nTabCount]; - SCTAB nTab = 0; - USHORT i = 0; - ScArea theArea( 0, aStartPos.Col(), aStartPos.Row(), + SCTAB nStartTab = aStartPos.Tab(); + SCTAB nEndTab = aEndPos.Tab(); + USHORT nTabCount = static_cast<USHORT>(nEndTab-nStartTab+1); + ScArea** theAreas = new ScArea*[nTabCount]; + SCTAB nTab = 0; + USHORT i = 0; + ScArea theArea( 0, aStartPos.Col(), aStartPos.Row(), aEndPos.Col(), aEndPos.Row() ); nTab = nStartTab; @@ -200,17 +200,17 @@ BOOL ScRangeUtil::IsAbsTabArea( const String& rAreaStr, //------------------------------------------------------------------------ -BOOL ScRangeUtil::IsAbsArea( const String& rAreaStr, - ScDocument* pDoc, - SCTAB nTab, - String* pCompleteStr, - ScRefAddress* pStartPos, - ScRefAddress* pEndPos, +BOOL ScRangeUtil::IsAbsArea( const String& rAreaStr, + ScDocument* pDoc, + SCTAB nTab, + String* pCompleteStr, + ScRefAddress* pStartPos, + ScRefAddress* pEndPos, ScAddress::Details const & rDetails ) const { - BOOL bIsAbsArea = FALSE; - ScRefAddress startPos; - ScRefAddress endPos; + BOOL bIsAbsArea = FALSE; + ScRefAddress startPos; + ScRefAddress endPos; bIsAbsArea = ConvertDoubleRef( pDoc, rAreaStr, nTab, startPos, endPos, rDetails ); @@ -242,17 +242,17 @@ BOOL ScRangeUtil::IsAbsArea( const String& rAreaStr, //------------------------------------------------------------------------ -BOOL ScRangeUtil::IsAbsPos( const String& rPosStr, - ScDocument* pDoc, - SCTAB nTab, - String* pCompleteStr, - ScRefAddress* pPosTripel, +BOOL ScRangeUtil::IsAbsPos( const String& rPosStr, + ScDocument* pDoc, + SCTAB nTab, + String* pCompleteStr, + ScRefAddress* pPosTripel, ScAddress::Details const & rDetails ) const { - BOOL bIsAbsPos = FALSE; - ScRefAddress thePos; + BOOL bIsAbsPos = FALSE; + ScRefAddress thePos; - bIsAbsPos = ConvertSingleRef( pDoc, rPosStr, nTab, thePos, rDetails ); + bIsAbsPos = ConvertSingleRef( pDoc, rPosStr, nTab, thePos, rDetails ); thePos.SetRelCol( FALSE ); thePos.SetRelRow( FALSE ); thePos.SetRelTab( FALSE ); @@ -270,16 +270,16 @@ BOOL ScRangeUtil::IsAbsPos( const String& rPosStr, //------------------------------------------------------------------------ -BOOL ScRangeUtil::MakeRangeFromName ( - const String& rName, - ScDocument* pDoc, - SCTAB nCurTab, - ScRange& rRange, - RutlNameScope eScope, +BOOL ScRangeUtil::MakeRangeFromName ( + const String& rName, + ScDocument* pDoc, + SCTAB nCurTab, + ScRange& rRange, + RutlNameScope eScope, ScAddress::Details const & rDetails ) const { BOOL bResult=FALSE; - ScRangeUtil aRangeUtil; + ScRangeUtil aRangeUtil; SCTAB nTab = 0; SCCOL nColStart = 0; SCCOL nColEnd = 0; @@ -289,26 +289,26 @@ BOOL ScRangeUtil::MakeRangeFromName ( if( eScope==RUTL_NAMES ) { ScRangeName& rRangeNames = *(pDoc->GetRangeName()); - USHORT nAt = 0; + USHORT nAt = 0; if ( rRangeNames.SearchName( rName, nAt ) ) { ScRangeData* pData = rRangeNames[nAt]; - String aStrArea; - ScRefAddress aStartPos; - ScRefAddress aEndPos; + String aStrArea; + ScRefAddress aStartPos; + ScRefAddress aEndPos; pData->GetSymbol( aStrArea ); if ( IsAbsArea( aStrArea, pDoc, nCurTab, NULL, &aStartPos, &aEndPos, rDetails ) ) { - nTab = aStartPos.Tab(); + nTab = aStartPos.Tab(); nColStart = aStartPos.Col(); nRowStart = aStartPos.Row(); nColEnd = aEndPos.Col(); nRowEnd = aEndPos.Row(); - bResult = TRUE; + bResult = TRUE; } else { @@ -317,25 +317,25 @@ BOOL ScRangeUtil::MakeRangeFromName ( if ( IsAbsPos( aStrArea, pDoc, nCurTab, NULL, &aStartPos, rDetails ) ) { - nTab = aStartPos.Tab(); + nTab = aStartPos.Tab(); nColStart = nColEnd = aStartPos.Col(); nRowStart = nRowEnd = aStartPos.Row(); - bResult = TRUE; + bResult = TRUE; } } } } else if( eScope==RUTL_DBASE ) { - ScDBCollection& rDbNames = *(pDoc->GetDBCollection()); - USHORT nAt = 0; + ScDBCollection& rDbNames = *(pDoc->GetDBCollection()); + USHORT nAt = 0; if ( rDbNames.SearchName( rName, nAt ) ) { ScDBData* pData = rDbNames[nAt]; pData->GetArea( nTab, nColStart, nRowStart, - nColEnd, nRowEnd ); + nColEnd, nRowEnd ); bResult = TRUE; } } @@ -379,10 +379,10 @@ sal_Int32 ScRangeStringConverter::IndexOf( sal_Int32 nOffset, sal_Unicode cQuote ) { - sal_Int32 nLength = rString.getLength(); - sal_Int32 nIndex = nOffset; - sal_Bool bQuoted = sal_False; - sal_Bool bExitLoop = sal_False; + sal_Int32 nLength = rString.getLength(); + sal_Int32 nIndex = nOffset; + sal_Bool bQuoted = sal_False; + sal_Bool bExitLoop = sal_False; while( !bExitLoop && (nIndex < nLength) ) { @@ -400,9 +400,9 @@ sal_Int32 ScRangeStringConverter::IndexOfDifferent( sal_Unicode cSearchChar, sal_Int32 nOffset ) { - sal_Int32 nLength = rString.getLength(); - sal_Int32 nIndex = nOffset; - sal_Bool bExitLoop = sal_False; + sal_Int32 nLength = rString.getLength(); + sal_Int32 nIndex = nOffset; + sal_Bool bExitLoop = sal_False; while( !bExitLoop && (nIndex < nLength) ) { @@ -448,9 +448,9 @@ void ScRangeStringConverter::AppendTableName(OUStringBuffer& rBuf, const OUStrin sal_Int32 ScRangeStringConverter::GetTokenCount( const OUString& rString, sal_Unicode cSeperator, sal_Unicode cQuote ) { - OUString sToken; - sal_Int32 nCount = 0; - sal_Int32 nOffset = 0; + OUString sToken; + sal_Int32 nCount = 0; + sal_Int32 nOffset = 0; while( nOffset >= 0 ) { GetTokenByOffset( sToken, rString, nOffset, cQuote, cSeperator ); @@ -532,7 +532,7 @@ sal_Bool ScRangeStringConverter::GetRangeFromString( // #i77703# chart ranges in the file format contain both sheet names, even for an external reference sheet. // This isn't parsed by ScRange, so try to parse the two Addresses then. if (!bResult) - { + { bResult = ((rRange.aStart.Parse( aUIString.Copy(0, (xub_StrLen)nIndex), const_cast<ScDocument*>(pDocument), eConv) & SCA_VALID) == SCA_VALID) && ((rRange.aEnd.Parse( aUIString.Copy((xub_StrLen)nIndex+1), const_cast<ScDocument*>(pDocument), @@ -797,7 +797,7 @@ void ScRangeStringConverter::GetStringFromRangeList( } static void lcl_appendCellAddress( - rtl::OUStringBuffer& rBuf, ScDocument* pDoc, const ScAddress& rCell, + rtl::OUStringBuffer& rBuf, ScDocument* pDoc, const ScAddress& rCell, const ScAddress::ExternalInfo& rExtInfo) { if (rExtInfo.mbExternal) @@ -915,7 +915,7 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con OUStringBuffer aBuf = aBeginCell.copy(0, nDotPos); if (nEndCellDotPos == 0) - { + { // workaround for old syntax (probably pre-chart2 age?) // e.g. Sheet1.A1:.B2 aBuf.append(aEndCell); @@ -928,7 +928,7 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con } aEndCell = aBuf.makeStringAndClear(); } - + ScAddress::ExternalInfo aExtInfo1, aExtInfo2; ScAddress aCell1, aCell2; rtl::OUString aBuf; @@ -1015,18 +1015,18 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con ScArea::ScArea( SCTAB tab, SCCOL colStart, SCROW rowStart, SCCOL colEnd, SCROW rowEnd ) : - nTab ( tab ), - nColStart( colStart ), nRowStart( rowStart ), - nColEnd ( colEnd ), nRowEnd ( rowEnd ) + nTab ( tab ), + nColStart( colStart ), nRowStart( rowStart ), + nColEnd ( colEnd ), nRowEnd ( rowEnd ) { } //------------------------------------------------------------------------ ScArea::ScArea( const ScArea& r ) : - nTab ( r.nTab ), - nColStart( r.nColStart ), nRowStart( r.nRowStart ), - nColEnd ( r.nColEnd ), nRowEnd ( r.nRowEnd ) + nTab ( r.nTab ), + nColStart( r.nColStart ), nRowStart( r.nRowStart ), + nColEnd ( r.nColEnd ), nRowEnd ( r.nRowEnd ) { } @@ -1034,11 +1034,11 @@ ScArea::ScArea( const ScArea& r ) : ScArea& ScArea::operator=( const ScArea& r ) { - nTab = r.nTab; - nColStart = r.nColStart; - nRowStart = r.nRowStart; - nColEnd = r.nColEnd; - nRowEnd = r.nRowEnd; + nTab = r.nTab; + nColStart = r.nColStart; + nRowStart = r.nRowStart; + nColEnd = r.nColEnd; + nRowEnd = r.nRowEnd; return *this; } @@ -1046,11 +1046,11 @@ ScArea& ScArea::operator=( const ScArea& r ) BOOL ScArea::operator==( const ScArea& r ) const { - return ( (nTab == r.nTab) - && (nColStart == r.nColStart) - && (nRowStart == r.nRowStart) - && (nColEnd == r.nColEnd) - && (nRowEnd == r.nRowEnd) ); + return ( (nTab == r.nTab) + && (nColStart == r.nColStart) + && (nRowStart == r.nRowStart) + && (nColEnd == r.nColEnd) + && (nRowEnd == r.nRowEnd) ); } //------------------------------------------------------------------------ @@ -1068,7 +1068,7 @@ BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange ) { for (;;) { - if ( bFirstPass ) // erst Bereichsnamen + if ( bFirstPass ) // erst Bereichsnamen { if ( pRangeName && nPos < pRangeName->GetCount() ) { @@ -1076,7 +1076,7 @@ BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange ) if ( pData && pData->IsValidReference(rRange) ) { rName = pData->GetName(); - return TRUE; // gefunden + return TRUE; // gefunden } } else @@ -1085,7 +1085,7 @@ BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange ) nPos = 0; } } - if ( !bFirstPass ) // dann DB-Bereiche + if ( !bFirstPass ) // dann DB-Bereiche { if ( pDBCollection && nPos < pDBCollection->GetCount() ) { @@ -1094,11 +1094,11 @@ BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange ) { pData->GetArea( rRange ); rName = pData->GetName(); - return TRUE; // gefunden + return TRUE; // gefunden } } else - return FALSE; // gibt nichts mehr + return FALSE; // gibt nichts mehr } } } diff --git a/sc/source/core/tool/rechead.cxx b/sc/source/core/tool/rechead.cxx index 90818b37cd60..06cba51dcad4 100644 --- a/sc/source/core/tool/rechead.cxx +++ b/sc/source/core/tool/rechead.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,7 +60,7 @@ ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) : if ( rStream.GetError() == SVSTREAM_OK ) rStream.SetError( SVSTREAM_FILEFORMAT_ERROR ); - // alles auf 0, damit BytesLeft() wenigstens abbricht + // alles auf 0, damit BytesLeft() wenigstens abbricht pBuf = NULL; pMemStream = NULL; nEntryEnd = nDataPos; } @@ -99,10 +99,10 @@ void ScMultipleReadHeader::EndEntry() { if ( rStream.GetError() == SVSTREAM_OK ) rStream.SetError( SCWARN_IMPORT_INFOLOST ); - rStream.Seek( nEntryEnd ); // Rest ueberspringen + rStream.Seek( nEntryEnd ); // Rest ueberspringen } - nEntryEnd = nTotalEnd; // den ganzen Rest, wenn kein StartEntry kommt + nEntryEnd = nTotalEnd; // den ganzen Rest, wenn kein StartEntry kommt } void ScMultipleReadHeader::StartEntry() @@ -146,12 +146,12 @@ ScMultipleWriteHeader::~ScMultipleWriteHeader() rStream << static_cast<sal_uInt32>(aMemStream.Tell()); rStream.Write( aMemStream.GetData(), aMemStream.Tell() ); - if ( nDataEnd - nDataPos != nDataSize ) // Default getroffen? + if ( nDataEnd - nDataPos != nDataSize ) // Default getroffen? { nDataSize = nDataEnd - nDataPos; ULONG nPos = rStream.Tell(); rStream.Seek(nDataPos-sizeof(sal_uInt32)); - rStream << nDataSize; // Groesse am Anfang eintragen + rStream << nDataSize; // Groesse am Anfang eintragen rStream.Seek(nPos); } } diff --git a/sc/source/core/tool/refdata.cxx b/sc/source/core/tool/refdata.cxx index 07c8442f6bd7..22c524f7593e 100644 --- a/sc/source/core/tool/refdata.cxx +++ b/sc/source/core/tool/refdata.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -244,7 +244,7 @@ ScComplexRefData& ScComplexRefData::Extend( const ScSingleRefData & rRef, const Ref2.SetColRel( aRef.IsColRel()); if (Ref2.nRow == aRef.nRow) Ref2.SetRowRel( aRef.IsRowRel()); - // $Sheet1.$A$5:$A$6 => $Sheet1.$A$5:$A$5:$A$6 => $Sheet1.$A$5:$A$6, and + // $Sheet1.$A$5:$A$6 => $Sheet1.$A$5:$A$5:$A$6 => $Sheet1.$A$5:$A$6, and // not $Sheet1.$A$5:Sheet1.$A$6 (with invisible second 3D, but relative). if (Ref2.nTab == aRef.nTab) Ref2.SetTabRel( bInherit3Dtemp ? Ref1.IsTabRel() : aRef.IsTabRel()); diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx index 49c91cfa42e8..461ce92f42b1 100644 --- a/sc/source/core/tool/reffind.cxx +++ b/sc/source/core/tool/reffind.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ // STATIC DATA ----------------------------------------------------------- -// incl. Doppelpunkt -> Doppelte Referenzen werden einzeln behandelt +// incl. Doppelpunkt -> Doppelte Referenzen werden einzeln behandelt const sal_Unicode __FAR_DATA ScRefFinder::pDelimiters[] = { '=','(',')','+','-','*','/','^','&',' ','{','}','<','>',':', 0 }; @@ -88,11 +88,11 @@ ScRefFinder::~ScRefFinder() USHORT lcl_NextFlags( USHORT nOld ) { - USHORT nNew = nOld & 7; // die drei Abs-Flags - nNew = ( nNew - 1 ) & 7; // weiterzaehlen + USHORT nNew = nOld & 7; // die drei Abs-Flags + nNew = ( nNew - 1 ) & 7; // weiterzaehlen if (!(nOld & SCA_TAB_3D)) - nNew &= ~SCA_TAB_ABSOLUTE; // nicht 3D -> nie absolut! + nNew &= ~SCA_TAB_ABSOLUTE; // nicht 3D -> nie absolut! return ( nOld & 0xfff8 ) | nNew; } @@ -102,9 +102,9 @@ void ScRefFinder::ToggleRel( xub_StrLen nStartPos, xub_StrLen nEndPos ) xub_StrLen nLen = aFormula.Len(); if (!nLen) return; - const sal_Unicode* pSource = aFormula.GetBuffer(); // fuer schnellen Zugriff + const sal_Unicode* pSource = aFormula.GetBuffer(); // fuer schnellen Zugriff - // Selektion erweitern, und statt Selektion Start- und Endindex + // Selektion erweitern, und statt Selektion Start- und Endindex if ( nEndPos < nStartPos ) { @@ -126,7 +126,7 @@ void ScRefFinder::ToggleRel( xub_StrLen nStartPos, xub_StrLen nEndPos ) xub_StrLen nLoopStart = nStartPos; while ( nLoopStart <= nEndPos ) { - // Formel zerlegen + // Formel zerlegen xub_StrLen nEStart = nLoopStart; while ( nEStart <= nEndPos && !IsText(pSource[nEStart]) ) @@ -140,7 +140,7 @@ void ScRefFinder::ToggleRel( xub_StrLen nStartPos, xub_StrLen nEndPos ) aSep = aFormula.Copy( nLoopStart, nEStart-nLoopStart ); aExpr = aFormula.Copy( nEStart, nEEnd-nEStart ); - // Test, ob aExpr eine Referenz ist + // Test, ob aExpr eine Referenz ist USHORT nResult = aAddr.Parse( aExpr, pDoc, pDoc->GetAddressConvention() ); if ( nResult & SCA_VALID ) @@ -150,13 +150,13 @@ void ScRefFinder::ToggleRel( xub_StrLen nStartPos, xub_StrLen nEndPos ) xub_StrLen nAbsStart = nStartPos+aResult.Len()+aSep.Len(); - if (!nFound) // erste Referenz ? + if (!nFound) // erste Referenz ? nSelStart = nAbsStart; - nSelEnd = nAbsStart+aExpr.Len(); // Selektion, keine Indizes + nSelEnd = nAbsStart+aExpr.Len(); // Selektion, keine Indizes ++nFound; } - // zusammenbauen + // zusammenbauen aResult += aSep; aResult += aExpr; diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx index e12916a9f907..5d890a993f97 100644 --- a/sc/source/core/tool/refreshtimer.cxx +++ b/sc/source/core/tool/refreshtimer.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/core/tool/reftokenhelper.cxx b/sc/source/core/tool/reftokenhelper.cxx index eaf4b8134490..83df2dd9fc0c 100644 --- a/sc/source/core/tool/reftokenhelper.cxx +++ b/sc/source/core/tool/reftokenhelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/core/tool/refupdat.cxx b/sc/source/core/tool/refupdat.cxx index 970a85d3392a..1703f7cd26f8 100644 --- a/sc/source/core/tool/refupdat.cxx +++ b/sc/source/core/tool/refupdat.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ BOOL lcl_MoveStart( R& rRef, U nStart, S nDelta, U nMask ) if ( rRef >= nStart ) rRef = sal::static_int_cast<R>( rRef + nDelta ); else if ( nDelta < 0 && rRef >= nStart + nDelta ) - rRef = nStart + nDelta; //! begrenzen ??? + rRef = nStart + nDelta; //! begrenzen ??? if ( rRef < 0 ) { rRef = 0; @@ -69,7 +69,7 @@ BOOL lcl_MoveEnd( R& rRef, U nStart, S nDelta, U nMask ) if ( rRef >= nStart ) rRef = sal::static_int_cast<R>( rRef + nDelta ); else if ( nDelta < 0 && rRef >= nStart + nDelta ) - rRef = nStart + nDelta - 1; //! begrenzen ??? + rRef = nStart + nDelta - 1; //! begrenzen ??? if ( rRef < 0 ) { rRef = 0; @@ -92,25 +92,25 @@ BOOL lcl_MoveReorder( R& rRef, U nStart, U nEnd, S nDelta ) return TRUE; } - if ( nDelta > 0 ) // nach hinten schieben + if ( nDelta > 0 ) // nach hinten schieben { if ( rRef >= nStart && rRef <= nEnd + nDelta ) { if ( rRef <= nEnd ) rRef = sal::static_int_cast<R>( rRef + nDelta ); // in the moved range else - rRef -= nEnd - nStart + 1; // nachruecken + rRef -= nEnd - nStart + 1; // nachruecken return TRUE; } } - else // nach vorne schieben + else // nach vorne schieben { if ( rRef >= nStart + nDelta && rRef <= nEnd ) { if ( rRef >= nStart ) rRef = sal::static_int_cast<R>( rRef + nDelta ); // in the moved range else - rRef += nEnd - nStart + 1; // nachruecken + rRef += nEnd - nStart + 1; // nachruecken return TRUE; } } @@ -174,7 +174,7 @@ BOOL lcl_MoveRefPart( R& rRef1Val, BOOL& rRef1Del, BOOL bDo1, } } if ( bDel ) - { // move deleted along + { // move deleted along rRef1Val = sal::static_int_cast<R>( rRef1Val + nDelta ); rRef2Val = sal::static_int_cast<R>( rRef2Val + nDelta ); } @@ -205,23 +205,23 @@ BOOL lcl_MoveRefPart( R& rRef1Val, BOOL& rRef1Del, BOOL bDo1, template< typename R, typename S, typename U > BOOL IsExpand( R n1, R n2, U nStart, S nD ) -{ //! vor normalem Move... +{ //! vor normalem Move... return - nD > 0 // Insert - && n1 < n2 // mindestens zwei Cols/Rows/Tabs in Ref + nD > 0 // Insert + && n1 < n2 // mindestens zwei Cols/Rows/Tabs in Ref && ( - (nStart <= n1 && n1 < nStart + nD) // n1 innerhalb des Insert - || (n2 + 1 == nStart) // n2 direkt vor Insert - ); // n1 < nStart <= n2 wird sowieso expanded! + (nStart <= n1 && n1 < nStart + nD) // n1 innerhalb des Insert + || (n2 + 1 == nStart) // n2 direkt vor Insert + ); // n1 < nStart <= n2 wird sowieso expanded! } template< typename R, typename S, typename U > void Expand( R& n1, R& n2, U nStart, S nD ) -{ //! nach normalem Move..., nur wenn IsExpand vorher TRUE war! +{ //! nach normalem Move..., nur wenn IsExpand vorher TRUE war! //! erst das Ende if ( n2 + 1 == nStart ) - { // am Ende + { // am Ende n2 = sal::static_int_cast<R>( n2 + nD ); return; } @@ -375,7 +375,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo } else if (eUpdateRefMode == URM_REORDER) { - // bisher nur fuer nDz (MoveTab) + // bisher nur fuer nDz (MoveTab) DBG_ASSERT ( !nDx && !nDy, "URM_REORDER fuer x und y noch nicht implementiert" ); if ( nDz && (theCol1 >= nCol1) && (theCol2 <= nCol2) && @@ -391,11 +391,11 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo if ( eRet == UR_NOTHING ) { if (oldCol1 != theCol1 - || oldRow1 != theRow1 - || oldTab1 != theTab1 - || oldCol2 != theCol2 - || oldRow2 != theRow2 - || oldTab2 != theTab2 + || oldRow1 != theRow1 + || oldTab1 != theTab1 + || oldCol2 != theCol2 + || oldRow2 != theRow2 + || oldTab2 != theTab2 ) eRet = UR_UPDATED; } @@ -663,11 +663,11 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode, if ( eRet == UR_NOTHING ) { if (oldCol1 != rRef.Ref1.nCol - || oldRow1 != rRef.Ref1.nRow - || oldTab1 != rRef.Ref1.nTab - || oldCol2 != rRef.Ref2.nCol - || oldRow2 != rRef.Ref2.nRow - || oldTab2 != rRef.Ref2.nTab + || oldRow1 != rRef.Ref1.nRow + || oldTab1 != rRef.Ref1.nTab + || oldCol2 != rRef.Ref2.nCol + || oldRow2 != rRef.Ref2.nRow + || oldTab2 != rRef.Ref2.nTab ) eRet = UR_UPDATED; } @@ -685,7 +685,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode, && rRef.Ref2.nRow <= nRow2-nDy && rRef.Ref2.nTab <= nTab2-nDz ) { - eRet = Move( pDoc, rPos, nDx, nDy, nDz, rRef, FALSE, TRUE ); // immer verschieben + eRet = Move( pDoc, rPos, nDx, nDy, nDz, rRef, FALSE, TRUE ); // immer verschieben } else if ( nDz && r.In( rPos ) ) { @@ -699,7 +699,7 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eMode, rRef.CalcRelFromAbs( rPos ); } else if( eMode == URM_COPY && r.In( rPos ) ) - eRet = Move( pDoc, rPos, nDx, nDy, nDz, rRef, FALSE, FALSE ); // nur relative + eRet = Move( pDoc, rPos, nDx, nDy, nDz, rRef, FALSE, FALSE ); // nur relative // sollte nicht mehr verwendet werden muessen else if (eWhat != ScRefUpdate::ABSOLUTE) rRef.CalcRelFromAbs( rPos ); @@ -804,11 +804,11 @@ ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos, if ( eRet == UR_NOTHING ) { if (oldCol1 != rRef.Ref1.nCol - || oldRow1 != rRef.Ref1.nRow - || oldTab1 != rRef.Ref1.nTab - || oldCol2 != rRef.Ref2.nCol - || oldRow2 != rRef.Ref2.nRow - || oldTab2 != rRef.Ref2.nTab + || oldRow1 != rRef.Ref1.nRow + || oldTab1 != rRef.Ref1.nTab + || oldCol2 != rRef.Ref2.nCol + || oldRow2 != rRef.Ref2.nRow + || oldTab2 != rRef.Ref2.nTab ) eRet = UR_UPDATED; } @@ -818,7 +818,7 @@ ScRefUpdateRes ScRefUpdate::Move( ScDocument* pDoc, const ScAddress& rPos, return eRet; } -void ScRefUpdate::MoveRelWrap( ScDocument* pDoc, const ScAddress& rPos, +void ScRefUpdate::MoveRelWrap( ScDocument* pDoc, const ScAddress& rPos, SCCOL nMaxCol, SCROW nMaxRow, ScComplexRefData& rRef ) { if( rRef.Ref1.IsColRel() ) @@ -901,8 +901,8 @@ ScRefUpdateRes ScRefUpdate::UpdateTranspose( ScDocument* pDoc, //------------------------------------------------------------------ -// UpdateGrow - erweitert Referenzen, die genau auf den Bereich zeigen -// kommt ohne Dokument aus +// UpdateGrow - erweitert Referenzen, die genau auf den Bereich zeigen +// kommt ohne Dokument aus ScRefUpdateRes ScRefUpdate::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY, @@ -910,8 +910,8 @@ ScRefUpdateRes ScRefUpdate::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCRO { ScRefUpdateRes eRet = UR_NOTHING; - // in Y-Richtung darf die Ref auch eine Zeile weiter unten anfangen, - // falls ein Bereich Spaltenkoepfe enthaelt + // in Y-Richtung darf die Ref auch eine Zeile weiter unten anfangen, + // falls ein Bereich Spaltenkoepfe enthaelt BOOL bUpdateX = ( nGrowX && rRef.Ref1.nCol == rArea.aStart.Col() && rRef.Ref2.nCol == rArea.aEnd.Col() && diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index c7232c3adebc..f0bad698aac3 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,7 +44,7 @@ //------------------------------------------------------------------------ -void ScMatrix::CreateMatrix(SCSIZE nC, SCSIZE nR) // nur fuer ctor +void ScMatrix::CreateMatrix(SCSIZE nC, SCSIZE nR) // nur fuer ctor { pErrorInterpreter = NULL; nColCount = nC; @@ -97,7 +97,7 @@ ScMatrix* ScMatrix::CloneAndExtend( SCSIZE nNewCols, SCSIZE nNewRows ) const { ScMatrix* pScMat = new ScMatrix( nNewCols, nNewRows); MatCopy(*pScMat); - pScMat->SetErrorInterpreter( pErrorInterpreter); + pScMat->SetErrorInterpreter( pErrorInterpreter); return pScMat; } @@ -108,15 +108,15 @@ void ScMatrix::SetErrorAtInterpreter( USHORT nError ) const } // -// File format: USHORT columns, USHORT rows, (columns*rows) entries: -// BYTE type ( CELLTYPE_NONE, CELLTYPE_VALUE, CELLTYPE_STRING ); nothing, double or String +// File format: USHORT columns, USHORT rows, (columns*rows) entries: +// BYTE type ( CELLTYPE_NONE, CELLTYPE_VALUE, CELLTYPE_STRING ); nothing, double or String // ScMatrix::ScMatrix(SvStream& /* rStream */) : pErrorInterpreter( NULL) , nRefCnt(0) { -#if SC_ROWLIMIT_STREAM_ACCESS +#if SC_ROWLIMIT_STREAM_ACCESS #error address types changed! USHORT nC; USHORT nR; @@ -153,7 +153,7 @@ ScMatrix::ScMatrix(SvStream& /* rStream */) if ( i < nCount ) { if (!mnValType) - ResetIsString(); // init string flags + ResetIsString(); // init string flags mnValType[i] = ( nType == CELLTYPE_NONE ? SC_MATVAL_EMPTY : SC_MATVAL_STRING ); mnNonValue++; @@ -171,7 +171,7 @@ ScMatrix::ScMatrix(SvStream& /* rStream */) void ScMatrix::Store(SvStream& /* rStream */) const { -#if SC_ROWLIMIT_STREAM_ACCESS +#if SC_ROWLIMIT_STREAM_ACCESS #error address types changed! SCSIZE nCount = nColCount * nRowCount; // Don't store matrix with more than USHORT max elements, old versions @@ -655,7 +655,7 @@ void ScMatrix::CompareEqual() if ( mnValType ) { for ( SCSIZE j=0; j<n; j++ ) - if ( IsValueType( mnValType[j]) ) // else: #WERT! + if ( IsValueType( mnValType[j]) ) // else: #WERT! if ( ::rtl::math::isFinite( pMat[j].fVal)) // else: DoubleError pMat[j].fVal = (pMat[j].fVal == 0.0); } @@ -673,7 +673,7 @@ void ScMatrix::CompareNotEqual() if ( mnValType ) { for ( SCSIZE j=0; j<n; j++ ) - if ( IsValueType( mnValType[j]) ) // else: #WERT! + if ( IsValueType( mnValType[j]) ) // else: #WERT! if ( ::rtl::math::isFinite( pMat[j].fVal)) // else: DoubleError pMat[j].fVal = (pMat[j].fVal != 0.0); } @@ -691,7 +691,7 @@ void ScMatrix::CompareLess() if ( mnValType ) { for ( SCSIZE j=0; j<n; j++ ) - if ( IsValueType( mnValType[j]) ) // else: #WERT! + if ( IsValueType( mnValType[j]) ) // else: #WERT! if ( ::rtl::math::isFinite( pMat[j].fVal)) // else: DoubleError pMat[j].fVal = (pMat[j].fVal < 0.0); } @@ -709,7 +709,7 @@ void ScMatrix::CompareGreater() if ( mnValType ) { for ( SCSIZE j=0; j<n; j++ ) - if ( IsValueType( mnValType[j]) ) // else: #WERT! + if ( IsValueType( mnValType[j]) ) // else: #WERT! if ( ::rtl::math::isFinite( pMat[j].fVal)) // else: DoubleError pMat[j].fVal = (pMat[j].fVal > 0.0); } @@ -727,7 +727,7 @@ void ScMatrix::CompareLessEqual() if ( mnValType ) { for ( SCSIZE j=0; j<n; j++ ) - if ( IsValueType( mnValType[j]) ) // else: #WERT! + if ( IsValueType( mnValType[j]) ) // else: #WERT! if ( ::rtl::math::isFinite( pMat[j].fVal)) // else: DoubleError pMat[j].fVal = (pMat[j].fVal <= 0.0); } @@ -745,7 +745,7 @@ void ScMatrix::CompareGreaterEqual() if ( mnValType ) { for ( SCSIZE j=0; j<n; j++ ) - if ( IsValueType( mnValType[j]) ) // else: #WERT! + if ( IsValueType( mnValType[j]) ) // else: #WERT! if ( ::rtl::math::isFinite( pMat[j].fVal)) // else: DoubleError pMat[j].fVal = (pMat[j].fVal >= 0.0); } diff --git a/sc/source/core/tool/stringutil.cxx b/sc/source/core/tool/stringutil.cxx index 34561bf50cb5..1953aaedfd50 100644 --- a/sc/source/core/tool/stringutil.cxx +++ b/sc/source/core/tool/stringutil.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/core/tool/subtotal.cxx b/sc/source/core/tool/subtotal.cxx index 7f211cef4033..9e248ce30cc7 100644 --- a/sc/source/core/tool/subtotal.cxx +++ b/sc/source/core/tool/subtotal.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 7c972250c7d2..48021b1a2ddb 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -86,7 +86,7 @@ namespace rRef.SetFlag3D( ( rAPI.Flags & sheet::ReferenceFlags::SHEET_3D ) != 0 ); rRef.SetRelName( ( rAPI.Flags & sheet::ReferenceFlags::RELATIVE_NAME ) != 0 ); } - + void lcl_ExternalRefToCalc( ScSingleRefData& rRef, const sheet::SingleReference& rAPI ) { rRef.InitFlags(); @@ -109,10 +109,7 @@ namespace } // } // namespace -// -// ImpTokenIterator wird je Interpreter angelegt, mehrfache auch durch -// SubCode via FormulaTokenIterator Push/Pop moeglich -IMPL_FIXEDMEMPOOL_NEWDEL( ImpTokenIterator, 32, 16 ) +// // Align MemPools on 4k boundaries - 64 bytes (4k is a MUST for OS/2) @@ -246,7 +243,7 @@ void ScRawToken::SetExternalSingleRef( sal_uInt16 nFileId, const String& rTabNam nRefCnt = 0; extref.nFileId = nFileId; - extref.aRef.Ref1 = + extref.aRef.Ref1 = extref.aRef.Ref2 = rRef; xub_StrLen n = rTabName.Len(); @@ -535,7 +532,7 @@ BOOL ScToken::Is3DRef() const FormulaTokenRef ScToken::ExtendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2, const ScAddress & rPos, bool bReuseDoubleRef ) { - + StackVar sv1, sv2; // Doing a RangeOp with RefList is probably utter nonsense, but Xcl // supports it, so do we. @@ -811,7 +808,7 @@ ScExternalSingleRefToken::ScExternalSingleRefToken( sal_uInt16 nFileId, const St } ScExternalSingleRefToken::ScExternalSingleRefToken( const ScExternalSingleRefToken& r ) : - ScToken(r), + ScToken(r), mnFileId(r.mnFileId), maTabName(r.maTabName), maSingleRef(r.maSingleRef) @@ -877,7 +874,7 @@ ScExternalDoubleRefToken::ScExternalDoubleRefToken( sal_uInt16 nFileId, const St } ScExternalDoubleRefToken::ScExternalDoubleRefToken( const ScExternalDoubleRefToken& r ) : - ScToken(r), + ScToken(r), mnFileId(r.mnFileId), maTabName(r.maTabName), maDoubleRef(r.maDoubleRef) @@ -1016,10 +1013,10 @@ ScJumpMatrixToken::~ScJumpMatrixToken() } double ScEmptyCellToken::GetDouble() const { return 0.0; } -const String & ScEmptyCellToken::GetString() const -{ +const String & ScEmptyCellToken::GetString() const +{ static String aDummyString; - return aDummyString; + return aDummyString; } BOOL ScEmptyCellToken::operator==( const FormulaToken& r ) const { @@ -1272,7 +1269,7 @@ BOOL ScTokenArray::IsValidReference( ScRange& rRange ) const //////////////////////////////////////////////////////////////////////////// -ScTokenArray::ScTokenArray() +ScTokenArray::ScTokenArray() { } diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx index 918060b12751..42b5921eb9c3 100644 --- a/sc/source/core/tool/unitconv.cxx +++ b/sc/source/core/tool/unitconv.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,7 +36,7 @@ #include "unitconv.hxx" #include "global.hxx" -#include "viewopti.hxx" //! move ScLinkConfigItem to separate header! +#include "viewopti.hxx" //! move ScLinkConfigItem to separate header! using namespace utl; using namespace rtl; @@ -44,7 +44,7 @@ using namespace com::sun::star::uno; // -------------------------------------------------------------------- -const sal_Unicode cDelim = 0x01; // Delimiter zwischen From und To +const sal_Unicode cDelim = 0x01; // Delimiter zwischen From und To // --- ScUnitConverterData -------------------------------------------- @@ -98,16 +98,16 @@ void ScUnitConverterData::BuildIndexString( String& rStr, // --- ScUnitConverter ------------------------------------------------ -#define CFGPATH_UNIT "Office.Calc/UnitConversion" -#define CFGSTR_UNIT_FROM "FromUnit" -#define CFGSTR_UNIT_TO "ToUnit" -#define CFGSTR_UNIT_FACTOR "Factor" +#define CFGPATH_UNIT "Office.Calc/UnitConversion" +#define CFGSTR_UNIT_FROM "FromUnit" +#define CFGSTR_UNIT_TO "ToUnit" +#define CFGSTR_UNIT_FACTOR "Factor" ScUnitConverter::ScUnitConverter( USHORT nInit, USHORT nDeltaP ) : ScStrCollection( nInit, nDeltaP, FALSE ) { - // read from configuration - "convert.ini" is no longer used - //! config item as member to allow change of values + // read from configuration - "convert.ini" is no longer used + //! config item as member to allow change of values ScLinkConfigItem aConfigItem( OUString::createFromAscii( CFGPATH_UNIT ) ); diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx index deb070005653..aad2f730a62c 100644 --- a/sc/source/core/tool/userlist.cxx +++ b/sc/source/core/tool/userlist.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -181,7 +181,7 @@ StringCompare ScUserListData::ICompare(const String& rSubStr1, const String& rSu } ScUserList::ScUserList(USHORT nLim, USHORT nDel) : - ScCollection ( nLim, nDel ) + ScCollection ( nLim, nDel ) { using namespace ::com::sun::star; @@ -254,8 +254,8 @@ ScDataObject* ScUserList::Clone() const ScUserListData* ScUserList::GetData(const String& rSubStr) const { - USHORT nIndex; - USHORT i = 0; + USHORT nIndex; + USHORT i = 0; for (i=0; i < nCount; i++) if (((ScUserListData*)pItems[i])->GetSubIndex(rSubStr, nIndex)) return (ScUserListData*)pItems[i]; @@ -277,7 +277,7 @@ BOOL ScUserList::operator==( const ScUserList& r ) const pOtherData = (ScUserListData*)r.At(i); bEqual =( (pMyData->nTokenCount == pOtherData->nTokenCount) - && (pMyData->aStr == pOtherData->aStr) ); + && (pMyData->aStr == pOtherData->aStr) ); } } diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx index 4c01f443d0db..1d0ab5575b08 100644 --- a/sc/source/core/tool/viewopti.cxx +++ b/sc/source/core/tool/viewopti.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,7 +51,7 @@ using namespace com::sun::star::uno; //------------------------------------------------------------------ -TYPEINIT1(ScTpViewItem, SfxPoolItem); +TYPEINIT1(ScTpViewItem, SfxPoolItem); #define SC_VERSION ((USHORT)302) @@ -65,19 +65,19 @@ void ScGridOptions::SetDefaults() { *this = ScGridOptions(); - // Raster-Defaults sind jetzt zwischen den Apps unterschiedlich - // darum hier selber eintragen (alles in 1/100mm) + // Raster-Defaults sind jetzt zwischen den Apps unterschiedlich + // darum hier selber eintragen (alles in 1/100mm) if ( ScOptionsUtil::IsMetricSystem() ) { - nFldDrawX = 1000; // 1cm + nFldDrawX = 1000; // 1cm nFldDrawY = 1000; nFldSnapX = 1000; nFldSnapY = 1000; } else { - nFldDrawX = 1270; // 0,5" + nFldDrawX = 1270; // 0,5" nFldDrawY = 1270; nFldSnapX = 1270; nFldSnapY = 1270; @@ -90,17 +90,17 @@ void ScGridOptions::SetDefaults() const ScGridOptions& ScGridOptions::operator=( const ScGridOptions& rCpy ) { - nFldDrawX = rCpy.nFldDrawX; // UINT32 - nFldDrawX = rCpy.nFldDrawX; - nFldDivisionX = rCpy.nFldDivisionX; - nFldDrawY = rCpy.nFldDrawY; - nFldDivisionY = rCpy.nFldDivisionY; - nFldSnapX = rCpy.nFldSnapX; - nFldSnapY = rCpy.nFldSnapY; - bUseGridsnap = rCpy.bUseGridsnap; // BitBool - bSynchronize = rCpy.bSynchronize; - bGridVisible = rCpy.bGridVisible; - bEqualGrid = rCpy.bEqualGrid; + nFldDrawX = rCpy.nFldDrawX; // UINT32 + nFldDrawX = rCpy.nFldDrawX; + nFldDivisionX = rCpy.nFldDivisionX; + nFldDrawY = rCpy.nFldDrawY; + nFldDivisionY = rCpy.nFldDivisionY; + nFldSnapX = rCpy.nFldSnapX; + nFldSnapY = rCpy.nFldSnapY; + bUseGridsnap = rCpy.bUseGridsnap; // BitBool + bSynchronize = rCpy.bSynchronize; + bGridVisible = rCpy.bGridVisible; + bEqualGrid = rCpy.bEqualGrid; return *this; } @@ -109,17 +109,17 @@ const ScGridOptions& ScGridOptions::operator=( const ScGridOptions& rCpy ) int ScGridOptions::operator==( const ScGridOptions& rCpy ) const { - return ( nFldDrawX == rCpy.nFldDrawX - && nFldDrawX == rCpy.nFldDrawX - && nFldDivisionX == rCpy.nFldDivisionX - && nFldDrawY == rCpy.nFldDrawY - && nFldDivisionY == rCpy.nFldDivisionY - && nFldSnapX == rCpy.nFldSnapX - && nFldSnapY == rCpy.nFldSnapY - && bUseGridsnap == rCpy.bUseGridsnap - && bSynchronize == rCpy.bSynchronize - && bGridVisible == rCpy.bGridVisible - && bEqualGrid == rCpy.bEqualGrid ); + return ( nFldDrawX == rCpy.nFldDrawX + && nFldDrawX == rCpy.nFldDrawX + && nFldDivisionX == rCpy.nFldDivisionX + && nFldDrawY == rCpy.nFldDrawY + && nFldDivisionY == rCpy.nFldDivisionY + && nFldSnapX == rCpy.nFldSnapX + && nFldSnapY == rCpy.nFldSnapY + && bUseGridsnap == rCpy.bUseGridsnap + && bSynchronize == rCpy.bSynchronize + && bGridVisible == rCpy.bGridVisible + && bEqualGrid == rCpy.bEqualGrid ); } @@ -149,22 +149,22 @@ __EXPORT ScViewOptions::~ScViewOptions() void ScViewOptions::SetDefaults() { - aOptArr[ VOPT_FORMULAS ] = - aOptArr[ VOPT_SYNTAX ] = + aOptArr[ VOPT_FORMULAS ] = + aOptArr[ VOPT_SYNTAX ] = aOptArr[ VOPT_HELPLINES ] = aOptArr[ VOPT_BIGHANDLES ] = FALSE; - aOptArr[ VOPT_NOTES ] = - aOptArr[ VOPT_NULLVALS ] = - aOptArr[ VOPT_VSCROLL ] = - aOptArr[ VOPT_HSCROLL ] = + aOptArr[ VOPT_NOTES ] = + aOptArr[ VOPT_NULLVALS ] = + aOptArr[ VOPT_VSCROLL ] = + aOptArr[ VOPT_HSCROLL ] = aOptArr[ VOPT_TABCONTROLS ] = - aOptArr[ VOPT_OUTLINER ] = - aOptArr[ VOPT_HEADER ] = - aOptArr[ VOPT_GRID ] = - aOptArr[ VOPT_ANCHOR ] = + aOptArr[ VOPT_OUTLINER ] = + aOptArr[ VOPT_HEADER ] = + aOptArr[ VOPT_GRID ] = + aOptArr[ VOPT_ANCHOR ] = aOptArr[ VOPT_PAGEBREAKS ] = aOptArr[ VOPT_SOLIDHANDLES] = - aOptArr[ VOPT_CLIPMARKS ] = TRUE; + aOptArr[ VOPT_CLIPMARKS ] = TRUE; aModeArr[VOBJ_TYPE_OLE ] = aModeArr[VOBJ_TYPE_CHART] = @@ -192,12 +192,12 @@ const ScViewOptions& ScViewOptions::operator=( const ScViewOptions& rCpy ) { USHORT i; - for ( i=0; i<MAX_OPT; i++ ) aOptArr [i] = rCpy.aOptArr[i]; + for ( i=0; i<MAX_OPT; i++ ) aOptArr [i] = rCpy.aOptArr[i]; for ( i=0; i<MAX_TYPE; i++ ) aModeArr[i] = rCpy.aModeArr[i]; - aGridCol = rCpy.aGridCol; - aGridColName = rCpy.aGridColName; - aGridOpt = rCpy.aGridOpt; + aGridCol = rCpy.aGridCol; + aGridColName = rCpy.aGridColName; + aGridOpt = rCpy.aGridOpt; return *this; } @@ -206,15 +206,15 @@ const ScViewOptions& ScViewOptions::operator=( const ScViewOptions& rCpy ) int ScViewOptions::operator==( const ScViewOptions& rOpt ) const { - BOOL bEqual = TRUE; - USHORT i; + BOOL bEqual = TRUE; + USHORT i; for ( i=0; i<MAX_OPT && bEqual; i++ ) bEqual = (aOptArr [i] == rOpt.aOptArr[i]); for ( i=0; i<MAX_TYPE && bEqual; i++ ) bEqual = (aModeArr[i] == rOpt.aModeArr[i]); bEqual = bEqual && (aGridCol == rOpt.aGridCol); bEqual = bEqual && (aGridColName == rOpt.aGridColName); - bEqual = bEqual && (aGridOpt == rOpt.aGridOpt); + bEqual = bEqual && (aGridOpt == rOpt.aGridOpt); return bEqual; } @@ -225,16 +225,16 @@ SvxGridItem* ScViewOptions::CreateGridItem( USHORT nId /* = SID_ATTR_GRID_OPTION { SvxGridItem* pItem = new SvxGridItem( nId ); - pItem->SetFldDrawX ( aGridOpt.GetFldDrawX() ); - pItem->SetFldDivisionX ( aGridOpt.GetFldDivisionX() ); - pItem->SetFldDrawY ( aGridOpt.GetFldDrawY() ); - pItem->SetFldDivisionY ( aGridOpt.GetFldDivisionY() ); - pItem->SetFldSnapX ( aGridOpt.GetFldSnapX() ); - pItem->SetFldSnapY ( aGridOpt.GetFldSnapY() ); - pItem->SetUseGridSnap ( aGridOpt.GetUseGridSnap() ); - pItem->SetSynchronize ( aGridOpt.GetSynchronize() ); - pItem->SetGridVisible ( aGridOpt.GetGridVisible() ); - pItem->SetEqualGrid ( aGridOpt.GetEqualGrid() ); + pItem->SetFldDrawX ( aGridOpt.GetFldDrawX() ); + pItem->SetFldDivisionX ( aGridOpt.GetFldDivisionX() ); + pItem->SetFldDrawY ( aGridOpt.GetFldDrawY() ); + pItem->SetFldDivisionY ( aGridOpt.GetFldDivisionY() ); + pItem->SetFldSnapX ( aGridOpt.GetFldSnapX() ); + pItem->SetFldSnapY ( aGridOpt.GetFldSnapY() ); + pItem->SetUseGridSnap ( aGridOpt.GetUseGridSnap() ); + pItem->SetSynchronize ( aGridOpt.GetSynchronize() ); + pItem->SetGridVisible ( aGridOpt.GetGridVisible() ); + pItem->SetEqualGrid ( aGridOpt.GetEqualGrid() ); return pItem; } @@ -247,15 +247,15 @@ SvxGridItem* ScViewOptions::CreateGridItem( USHORT nId /* = SID_ATTR_GRID_OPTION ScTpViewItem::ScTpViewItem( USHORT nWhichP, const ScViewOptions& rOpt ) : SfxPoolItem ( nWhichP ), - theOptions ( rOpt ) + theOptions ( rOpt ) { } //------------------------------------------------------------------------ ScTpViewItem::ScTpViewItem( const ScTpViewItem& rItem ) - : SfxPoolItem ( rItem ), - theOptions ( rItem.theOptions ) + : SfxPoolItem ( rItem ), + theOptions ( rItem.theOptions ) { } @@ -291,67 +291,67 @@ SfxPoolItem* __EXPORT ScTpViewItem::Clone( SfxItemPool * ) const } //================================================================== -// Config Item containing view options +// Config Item containing view options //================================================================== -#define CFGPATH_LAYOUT "Office.Calc/Layout" - -#define SCLAYOUTOPT_GRIDLINES 0 -#define SCLAYOUTOPT_GRIDCOLOR 1 -#define SCLAYOUTOPT_PAGEBREAK 2 -#define SCLAYOUTOPT_GUIDE 3 -#define SCLAYOUTOPT_SIMPLECONT 4 -#define SCLAYOUTOPT_LARGECONT 5 -#define SCLAYOUTOPT_COLROWHDR 6 -#define SCLAYOUTOPT_HORISCROLL 7 -#define SCLAYOUTOPT_VERTSCROLL 8 -#define SCLAYOUTOPT_SHEETTAB 9 -#define SCLAYOUTOPT_OUTLINE 10 -#define SCLAYOUTOPT_COUNT 11 - -#define CFGPATH_DISPLAY "Office.Calc/Content/Display" - -#define SCDISPLAYOPT_FORMULA 0 -#define SCDISPLAYOPT_ZEROVALUE 1 -#define SCDISPLAYOPT_NOTETAG 2 -#define SCDISPLAYOPT_VALUEHI 3 -#define SCDISPLAYOPT_ANCHOR 4 -#define SCDISPLAYOPT_TEXTOVER 5 -#define SCDISPLAYOPT_OBJECTGRA 6 -#define SCDISPLAYOPT_CHART 7 -#define SCDISPLAYOPT_DRAWING 8 -#define SCDISPLAYOPT_COUNT 9 - -#define CFGPATH_GRID "Office.Calc/Grid" - -#define SCGRIDOPT_RESOLU_X 0 -#define SCGRIDOPT_RESOLU_Y 1 -#define SCGRIDOPT_SUBDIV_X 2 -#define SCGRIDOPT_SUBDIV_Y 3 -#define SCGRIDOPT_OPTION_X 4 -#define SCGRIDOPT_OPTION_Y 5 -#define SCGRIDOPT_SNAPTOGRID 6 -#define SCGRIDOPT_SYNCHRON 7 -#define SCGRIDOPT_VISIBLE 8 -#define SCGRIDOPT_SIZETOGRID 9 -#define SCGRIDOPT_COUNT 10 +#define CFGPATH_LAYOUT "Office.Calc/Layout" + +#define SCLAYOUTOPT_GRIDLINES 0 +#define SCLAYOUTOPT_GRIDCOLOR 1 +#define SCLAYOUTOPT_PAGEBREAK 2 +#define SCLAYOUTOPT_GUIDE 3 +#define SCLAYOUTOPT_SIMPLECONT 4 +#define SCLAYOUTOPT_LARGECONT 5 +#define SCLAYOUTOPT_COLROWHDR 6 +#define SCLAYOUTOPT_HORISCROLL 7 +#define SCLAYOUTOPT_VERTSCROLL 8 +#define SCLAYOUTOPT_SHEETTAB 9 +#define SCLAYOUTOPT_OUTLINE 10 +#define SCLAYOUTOPT_COUNT 11 + +#define CFGPATH_DISPLAY "Office.Calc/Content/Display" + +#define SCDISPLAYOPT_FORMULA 0 +#define SCDISPLAYOPT_ZEROVALUE 1 +#define SCDISPLAYOPT_NOTETAG 2 +#define SCDISPLAYOPT_VALUEHI 3 +#define SCDISPLAYOPT_ANCHOR 4 +#define SCDISPLAYOPT_TEXTOVER 5 +#define SCDISPLAYOPT_OBJECTGRA 6 +#define SCDISPLAYOPT_CHART 7 +#define SCDISPLAYOPT_DRAWING 8 +#define SCDISPLAYOPT_COUNT 9 + +#define CFGPATH_GRID "Office.Calc/Grid" + +#define SCGRIDOPT_RESOLU_X 0 +#define SCGRIDOPT_RESOLU_Y 1 +#define SCGRIDOPT_SUBDIV_X 2 +#define SCGRIDOPT_SUBDIV_Y 3 +#define SCGRIDOPT_OPTION_X 4 +#define SCGRIDOPT_OPTION_Y 5 +#define SCGRIDOPT_SNAPTOGRID 6 +#define SCGRIDOPT_SYNCHRON 7 +#define SCGRIDOPT_VISIBLE 8 +#define SCGRIDOPT_SIZETOGRID 9 +#define SCGRIDOPT_COUNT 10 Sequence<OUString> ScViewCfg::GetLayoutPropertyNames() { static const char* aPropNames[] = { - "Line/GridLine", // SCLAYOUTOPT_GRIDLINES - "Line/GridLineColor", // SCLAYOUTOPT_GRIDCOLOR - "Line/PageBreak", // SCLAYOUTOPT_PAGEBREAK - "Line/Guide", // SCLAYOUTOPT_GUIDE - "Line/SimpleControlPoint", // SCLAYOUTOPT_SIMPLECONT - "Line/LargeControlPoint", // SCLAYOUTOPT_LARGECONT - "Window/ColumnRowHeader", // SCLAYOUTOPT_COLROWHDR - "Window/HorizontalScroll", // SCLAYOUTOPT_HORISCROLL - "Window/VerticalScroll", // SCLAYOUTOPT_VERTSCROLL - "Window/SheetTab", // SCLAYOUTOPT_SHEETTAB - "Window/OutlineSymbol" // SCLAYOUTOPT_OUTLINE + "Line/GridLine", // SCLAYOUTOPT_GRIDLINES + "Line/GridLineColor", // SCLAYOUTOPT_GRIDCOLOR + "Line/PageBreak", // SCLAYOUTOPT_PAGEBREAK + "Line/Guide", // SCLAYOUTOPT_GUIDE + "Line/SimpleControlPoint", // SCLAYOUTOPT_SIMPLECONT + "Line/LargeControlPoint", // SCLAYOUTOPT_LARGECONT + "Window/ColumnRowHeader", // SCLAYOUTOPT_COLROWHDR + "Window/HorizontalScroll", // SCLAYOUTOPT_HORISCROLL + "Window/VerticalScroll", // SCLAYOUTOPT_VERTSCROLL + "Window/SheetTab", // SCLAYOUTOPT_SHEETTAB + "Window/OutlineSymbol" // SCLAYOUTOPT_OUTLINE }; Sequence<OUString> aNames(SCLAYOUTOPT_COUNT); OUString* pNames = aNames.getArray(); @@ -365,15 +365,15 @@ Sequence<OUString> ScViewCfg::GetDisplayPropertyNames() { static const char* aPropNames[] = { - "Formula", // SCDISPLAYOPT_FORMULA - "ZeroValue", // SCDISPLAYOPT_ZEROVALUE - "NoteTag", // SCDISPLAYOPT_NOTETAG - "ValueHighlighting", // SCDISPLAYOPT_VALUEHI - "Anchor", // SCDISPLAYOPT_ANCHOR - "TextOverflow", // SCDISPLAYOPT_TEXTOVER - "ObjectGraphic", // SCDISPLAYOPT_OBJECTGRA - "Chart", // SCDISPLAYOPT_CHART - "DrawingObject" // SCDISPLAYOPT_DRAWING + "Formula", // SCDISPLAYOPT_FORMULA + "ZeroValue", // SCDISPLAYOPT_ZEROVALUE + "NoteTag", // SCDISPLAYOPT_NOTETAG + "ValueHighlighting", // SCDISPLAYOPT_VALUEHI + "Anchor", // SCDISPLAYOPT_ANCHOR + "TextOverflow", // SCDISPLAYOPT_TEXTOVER + "ObjectGraphic", // SCDISPLAYOPT_OBJECTGRA + "Chart", // SCDISPLAYOPT_CHART + "DrawingObject" // SCDISPLAYOPT_DRAWING }; Sequence<OUString> aNames(SCDISPLAYOPT_COUNT); OUString* pNames = aNames.getArray(); @@ -387,23 +387,23 @@ Sequence<OUString> ScViewCfg::GetGridPropertyNames() { static const char* aPropNames[] = { - "Resolution/XAxis/NonMetric", // SCGRIDOPT_RESOLU_X - "Resolution/YAxis/NonMetric", // SCGRIDOPT_RESOLU_Y - "Subdivision/XAxis", // SCGRIDOPT_SUBDIV_X - "Subdivision/YAxis", // SCGRIDOPT_SUBDIV_Y - "Option/XAxis/NonMetric", // SCGRIDOPT_OPTION_X - "Option/YAxis/NonMetric", // SCGRIDOPT_OPTION_Y - "Option/SnapToGrid", // SCGRIDOPT_SNAPTOGRID - "Option/Synchronize", // SCGRIDOPT_SYNCHRON - "Option/VisibleGrid", // SCGRIDOPT_VISIBLE - "Option/SizeToGrid" // SCGRIDOPT_SIZETOGRID + "Resolution/XAxis/NonMetric", // SCGRIDOPT_RESOLU_X + "Resolution/YAxis/NonMetric", // SCGRIDOPT_RESOLU_Y + "Subdivision/XAxis", // SCGRIDOPT_SUBDIV_X + "Subdivision/YAxis", // SCGRIDOPT_SUBDIV_Y + "Option/XAxis/NonMetric", // SCGRIDOPT_OPTION_X + "Option/YAxis/NonMetric", // SCGRIDOPT_OPTION_Y + "Option/SnapToGrid", // SCGRIDOPT_SNAPTOGRID + "Option/Synchronize", // SCGRIDOPT_SYNCHRON + "Option/VisibleGrid", // SCGRIDOPT_VISIBLE + "Option/SizeToGrid" // SCGRIDOPT_SIZETOGRID }; Sequence<OUString> aNames(SCGRIDOPT_COUNT); OUString* pNames = aNames.getArray(); for(int i = 0; i < SCGRIDOPT_COUNT; i++) pNames[i] = OUString::createFromAscii(aPropNames[i]); - // adjust for metric system + // adjust for metric system if (ScOptionsUtil::IsMetricSystem()) { pNames[SCGRIDOPT_RESOLU_X] = OUString::createFromAscii( "Resolution/XAxis/Metric" ); @@ -543,7 +543,7 @@ ScViewCfg::ScViewCfg() : } aDisplayItem.SetCommitLink( LINK( this, ScViewCfg, DisplayCommitHdl ) ); - ScGridOptions aGrid = GetGridOptions(); //! initialization necessary? + ScGridOptions aGrid = GetGridOptions(); //! initialization necessary? aNames = GetGridPropertyNames(); aValues = aGridItem.GetProperties(aNames); aGridItem.EnableNotification(aNames); diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx index 0b9f116aa153..3205faa38b18 100644 --- a/sc/source/core/tool/zforauto.cxx +++ b/sc/source/core/tool/zforauto.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,16 +42,16 @@ static const sal_Char __FAR_DATA pStandardName[] = "Standard"; //------------------------------------------------------------------------ ScNumFormatAbbrev::ScNumFormatAbbrev() : - sFormatstring ( RTL_CONSTASCII_USTRINGPARAM( pStandardName ) ), - eLnge (LANGUAGE_SYSTEM), - eSysLnge (LANGUAGE_GERMAN) // sonst passt "Standard" nicht + sFormatstring ( RTL_CONSTASCII_USTRINGPARAM( pStandardName ) ), + eLnge (LANGUAGE_SYSTEM), + eSysLnge (LANGUAGE_GERMAN) // sonst passt "Standard" nicht { } ScNumFormatAbbrev::ScNumFormatAbbrev(const ScNumFormatAbbrev& aFormat) : - sFormatstring (aFormat.sFormatstring), - eLnge (aFormat.eLnge), - eSysLnge (aFormat.eSysLnge) + sFormatstring (aFormat.sFormatstring), + eLnge (aFormat.eLnge), + eSysLnge (aFormat.eSysLnge) { } @@ -92,7 +92,7 @@ void ScNumFormatAbbrev::PutFormatIndex(ULONG nFormat, { DBG_ERROR("SCNumFormatAbbrev:: unbekanntes Zahlformat"); eLnge = LANGUAGE_SYSTEM; - eSysLnge = LANGUAGE_GERMAN; // sonst passt "Standard" nicht + eSysLnge = LANGUAGE_GERMAN; // sonst passt "Standard" nicht sFormatstring.AssignAscii( RTL_CONSTASCII_STRINGPARAM( pStandardName ) ); } } |