summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r--sc/source/ui/docshell/arealink.cxx122
-rw-r--r--sc/source/ui/docshell/autostyl.cxx48
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx302
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx132
-rw-r--r--sc/source/ui/docshell/docfunc.cxx368
-rw-r--r--sc/source/ui/docshell/docsh.cxx360
-rw-r--r--sc/source/ui/docshell/docsh2.cxx32
-rw-r--r--sc/source/ui/docshell/docsh3.cxx170
-rw-r--r--sc/source/ui/docshell/docsh4.cxx274
-rw-r--r--sc/source/ui/docshell/docsh5.cxx130
-rw-r--r--sc/source/ui/docshell/docsh6.cxx70
-rw-r--r--sc/source/ui/docshell/docsh7.cxx4
-rw-r--r--sc/source/ui/docshell/docsh8.cxx104
-rw-r--r--sc/source/ui/docshell/docshimp.hxx2
-rw-r--r--sc/source/ui/docshell/editable.cxx6
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx7
-rw-r--r--sc/source/ui/docshell/hiranges.cxx2
-rw-r--r--sc/source/ui/docshell/impex.cxx152
-rw-r--r--sc/source/ui/docshell/olinefun.cxx64
-rw-r--r--sc/source/ui/docshell/pagedata.cxx4
-rw-r--r--sc/source/ui/docshell/pntlock.cxx2
-rw-r--r--sc/source/ui/docshell/servobj.cxx32
-rw-r--r--sc/source/ui/docshell/sizedev.cxx4
-rw-r--r--sc/source/ui/docshell/tablink.cxx84
-rw-r--r--sc/source/ui/docshell/tpstat.cxx24
-rw-r--r--sc/source/ui/docshell/tpstat.hrc14
-rw-r--r--sc/source/ui/docshell/tpstat.src4
27 files changed, 1258 insertions, 1259 deletions
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 69a62985e02f..3e3804584e2f 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.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,9 +54,9 @@
#include "hints.hxx"
#include "filter.hxx"
-#include "attrib.hxx" // raus, wenn ResetAttrib am Dokument
-#include "patattr.hxx" // raus, wenn ResetAttrib am Dokument
-#include "docpool.hxx" // raus, wenn ResetAttrib am Dokument
+#include "attrib.hxx" // raus, wenn ResetAttrib am Dokument
+#include "patattr.hxx" // raus, wenn ResetAttrib am Dokument
+#include "docpool.hxx" // raus, wenn ResetAttrib am Dokument
#include "sc.hrc"
#include "scabstdlg.hxx"
@@ -79,16 +79,16 @@ ScAreaLink::ScAreaLink( SfxObjectShell* pShell, const String& rFile,
const String& rArea, const ScRange& rDest,
ULONG nRefresh ) :
::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE),
- ScRefreshTimer ( nRefresh ),
+ ScRefreshTimer ( nRefresh ),
pImpl ( new AreaLink_Impl() ),
- aFileName (rFile),
- aFilterName (rFilter),
- aOptions (rOpt),
- aSourceArea (rArea),
- aDestArea (rDest),
- bAddUndo (TRUE),
- bInCreate (FALSE),
- bDoInsert (TRUE)
+ aFileName (rFile),
+ aFilterName (rFilter),
+ aOptions (rOpt),
+ aSourceArea (rArea),
+ aDestArea (rDest),
+ bAddUndo (TRUE),
+ bInCreate (FALSE),
+ bDoInsert (TRUE)
{
DBG_ASSERT(pShell->ISA(ScDocShell), "ScAreaLink mit falscher ObjectShell");
pImpl->m_pDocSh = static_cast< ScDocShell* >( pShell );
@@ -104,9 +104,9 @@ __EXPORT ScAreaLink::~ScAreaLink()
void __EXPORT ScAreaLink::Edit(Window* pParent, const Link& /* rEndEditHdl */ )
{
- // use own dialog instead of SvBaseLink::Edit...
- // DefModalDialogParent setzen, weil evtl. aus der DocShell beim ConvertFrom
- // ein Optionen-Dialog kommt...
+ // use own dialog instead of SvBaseLink::Edit...
+ // DefModalDialogParent setzen, weil evtl. aus der DocShell beim ConvertFrom
+ // ein Optionen-Dialog kommt...
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
@@ -121,8 +121,8 @@ void __EXPORT ScAreaLink::Edit(Window* pParent, const Link& /* rEndEditHdl */ )
void __EXPORT ScAreaLink::DataChanged( const String&,
const ::com::sun::star::uno::Any& )
{
- // bei bInCreate nichts tun, damit Update gerufen werden kann, um den Status im
- // LinkManager zu setzen, ohne die Daten im Dokument zu aendern
+ // bei bInCreate nichts tun, damit Update gerufen werden kann, um den Status im
+ // LinkManager zu setzen, ohne die Daten im Dokument zu aendern
if (bInCreate)
return;
@@ -135,8 +135,8 @@ void __EXPORT ScAreaLink::DataChanged( const String&,
String aArea;
pLinkManager->GetDisplayNames( this,0,&aFile,&aArea,&aFilter);
- // the file dialog returns the filter name with the application prefix
- // -> remove prefix
+ // the file dialog returns the filter name with the application prefix
+ // -> remove prefix
ScDocumentLoader::RemoveAppPrefix( aFilter );
// #81155# dialog doesn't set area, so keep old one
@@ -166,7 +166,7 @@ void __EXPORT ScAreaLink::Closed()
aFileName, aFilterName, aOptions,
aSourceArea, aDestArea, GetRefreshDelay() ) );
- bAddUndo = FALSE; // nur einmal
+ bAddUndo = FALSE; // nur einmal
}
SCTAB nDestTab = aDestArea.aStart.Tab();
@@ -178,18 +178,18 @@ void __EXPORT ScAreaLink::Closed()
void ScAreaLink::SetDestArea(const ScRange& rNew)
{
- aDestArea = rNew; // fuer Undo
+ aDestArea = rNew; // fuer Undo
}
void ScAreaLink::SetSource(const String& rDoc, const String& rFlt, const String& rOpt,
const String& rArea)
{
- aFileName = rDoc;
- aFilterName = rFlt;
- aOptions = rOpt;
- aSourceArea = rArea;
+ aFileName = rDoc;
+ aFilterName = rFlt;
+ aOptions = rOpt;
+ aSourceArea = rArea;
- // also update link name for dialog
+ // also update link name for dialog
String aNewLinkName;
sfx2::MakeLnkName( aNewLinkName, NULL, aFileName, aSourceArea, &aFilterName );
SetName( aNewLinkName );
@@ -208,15 +208,15 @@ BOOL ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const Strin
BOOL bFound = FALSE;
ScRangeName* pNames = pSrcDoc->GetRangeName();
USHORT nPos;
- if (pNames) // benannte Bereiche
+ if (pNames) // benannte Bereiche
{
if (pNames->SearchName( rAreaName, nPos ))
if ( (*pNames)[nPos]->IsValidReference( rRange ) )
bFound = TRUE;
}
- if (!bFound) // Datenbankbereiche
+ if (!bFound) // Datenbankbereiche
{
- ScDBCollection* pDBColl = pSrcDoc->GetDBCollection();
+ ScDBCollection* pDBColl = pSrcDoc->GetDBCollection();
if (pDBColl)
if (pDBColl->SearchName( rAreaName, nPos ))
{
@@ -228,7 +228,7 @@ BOOL ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const Strin
bFound = TRUE;
}
}
- if (!bFound) // direct reference (range or cell)
+ if (!bFound) // direct reference (range or cell)
{
ScAddress::Details aDetails(pSrcDoc->GetAddressConvention(), 0, 0);
if ( rRange.ParseAny( rAreaName, pSrcDoc, aDetails ) & SCA_VALID )
@@ -237,12 +237,12 @@ BOOL ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const Strin
return bFound;
}
-// ausfuehren:
+// ausfuehren:
BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
const String& rNewArea, ULONG nNewRefresh )
{
- // Dokument laden - wie TabLink
+ // Dokument laden - wie TabLink
if (!rNewFile.Len() || !rNewFilter.Len())
return FALSE;
@@ -259,11 +259,11 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
BOOL bUndo (pDoc->IsUndoEnabled());
pDoc->SetInLinkUpdate( TRUE );
- // wenn neuer Filter ausgewaehlt wurde, Optionen vergessen
+ // wenn neuer Filter ausgewaehlt wurde, Optionen vergessen
if ( rNewFilter != aFilterName )
aOptions.Erase();
- // ItemSet immer anlegen, damit die DocShell die Optionen setzen kann
+ // ItemSet immer anlegen, damit die DocShell die Optionen setzen kann
SfxItemSet* pSet = new SfxAllItemSet( SFX_APP()->GetPool() );
if ( aOptions.Len() )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
@@ -271,7 +271,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, FALSE, pFilter);
ScDocShell* pSrcShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL);
-//REMOVE SvEmbeddedObjectRef aRef = pSrcShell;
+//REMOVE SvEmbeddedObjectRef aRef = pSrcShell;
SfxObjectShellRef aRef = pSrcShell;
pSrcShell->DoLoad(pMed);
@@ -313,12 +313,12 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
if( nHeight > 0 )
nHeight--;
- // alte Daten loeschen / neue kopieren
+ // alte Daten loeschen / neue kopieren
ScAddress aDestPos = aDestArea.aStart;
SCTAB nDestTab = aDestPos.Tab();
ScRange aOldRange = aDestArea;
- ScRange aNewRange = aDestArea; // alter Bereich, wenn Datei nicht gefunden o.ae.
+ ScRange aNewRange = aDestArea; // alter Bereich, wenn Datei nicht gefunden o.ae.
if (nWidth > 0 && nHeight > 0)
{
aNewRange.aEnd.SetCol( aNewRange.aStart.Col() + nWidth - 1 );
@@ -339,7 +339,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
ScRange aMaxRange( aDestPos,
ScAddress(Max(nOldEndX,nNewEndX), Max(nOldEndY,nNewEndY), nDestTab) );
- // Undo initialisieren
+ // Undo initialisieren
ScDocument* pUndoDoc = NULL;
ScDocument* pRedoDoc = NULL;
@@ -348,32 +348,32 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
if ( bDoInsert )
{
- if ( nNewEndX != nOldEndX || nNewEndY != nOldEndY ) // Bereich veraendert?
+ if ( nNewEndX != nOldEndX || nNewEndY != nOldEndY ) // Bereich veraendert?
{
pUndoDoc->InitUndo( pDoc, 0, pDoc->GetTableCount()-1 );
pDoc->CopyToDocument( 0,0,0,MAXCOL,MAXROW,MAXTAB,
- IDF_FORMULA, FALSE, pUndoDoc ); // alle Formeln
+ IDF_FORMULA, FALSE, pUndoDoc ); // alle Formeln
}
else
- pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab ); // nur Zieltabelle
+ pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab ); // nur Zieltabelle
pDoc->CopyToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
}
- else // ohne Einfuegen
+ else // ohne Einfuegen
{
- pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab ); // nur Zieltabelle
+ pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab ); // nur Zieltabelle
pDoc->CopyToDocument( aMaxRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
}
}
- // Zellen einfuegen / loeschen
- // DeleteAreaTab loescht auch MERGE_FLAG Attribute
+ // Zellen einfuegen / loeschen
+ // DeleteAreaTab loescht auch MERGE_FLAG Attribute
if (bDoInsert)
- pDoc->FitBlock( aOldRange, aNewRange ); // incl. loeschen
+ pDoc->FitBlock( aOldRange, aNewRange ); // incl. loeschen
else
pDoc->DeleteAreaTab( aMaxRange, IDF_ALL & ~IDF_NOTE );
- // Daten kopieren
+ // Daten kopieren
if (nWidth > 0 && nHeight > 0)
{
@@ -388,7 +388,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
{
SCTAB nSrcTab = aTokenRange.aStart.Tab();
ScMarkData aSourceMark;
- aSourceMark.SelectOneTable( nSrcTab ); // selektieren fuer CopyToClip
+ aSourceMark.SelectOneTable( nSrcTab ); // selektieren fuer CopyToClip
aSourceMark.SetMarkArea( aTokenRange );
ScClipParam aClipParam(aTokenRange, false);
@@ -397,10 +397,10 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
if ( aClipDoc.HasAttrib( 0,0,nSrcTab, MAXCOL,MAXROW,nSrcTab,
HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{
- //! ResetAttrib am Dokument !!!
+ //! ResetAttrib am Dokument !!!
ScPatternAttr aPattern( pSrcDoc->GetPool() );
- aPattern.GetItemSet().Put( ScMergeAttr() ); // Defaults
+ aPattern.GetItemSet().Put( ScMergeAttr() ); // Defaults
aPattern.GetItemSet().Put( ScMergeFlagAttr() );
aClipDoc.ApplyPatternAreaTab( 0,0, MAXCOL,MAXROW, nSrcTab, aPattern );
}
@@ -421,7 +421,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
pDoc->SetString( aDestPos.Col(), aDestPos.Row(), aDestPos.Tab(), aErr );
}
- // Undo eintragen
+ // Undo eintragen
if ( bAddUndo && bUndo)
{
@@ -438,7 +438,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
pUndoDoc, pRedoDoc, bDoInsert ) );
}
- // neue Einstellungen merken
+ // neue Einstellungen merken
if ( bNewUrlName )
aFileName = aNewUrl;
@@ -470,18 +470,18 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
}
else
{
- // CanFitBlock FALSE -> Probleme mit zusammengefassten Zellen
- // oder Tabellengrenze erreicht!
- //! Zellschutz ???
+ // CanFitBlock FALSE -> Probleme mit zusammengefassten Zellen
+ // oder Tabellengrenze erreicht!
+ //! Zellschutz ???
- //! Link-Dialog muss Default-Parent setzen
- // "kann keine Zeilen einfuegen"
+ //! Link-Dialog muss Default-Parent setzen
+ // "kann keine Zeilen einfuegen"
InfoBox aBox( Application::GetDefDialogParent(),
ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_2 ) );
aBox.Execute();
}
- // aufraeumen
+ // aufraeumen
aRef->DoClose();
@@ -489,8 +489,8 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
if (bCanDo)
{
- // notify Uno objects (for XRefreshListener)
- //! also notify Uno objects if file name was changed!
+ // notify Uno objects (for XRefreshListener)
+ //! also notify Uno objects if file name was changed!
ScLinkRefreshedHint aHint;
aHint.SetAreaLink( aDestPos );
pDoc->BroadcastUno( aHint );
diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx
index 511d7695c471..8b275b231b28 100644
--- a/sc/source/ui/docshell/autostyl.cxx
+++ b/sc/source/ui/docshell/autostyl.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,10 +44,10 @@
struct ScAutoStyleInitData
{
- ScRange aRange;
- String aStyle1;
- ULONG nTimeout;
- String aStyle2;
+ ScRange aRange;
+ String aStyle1;
+ ULONG nTimeout;
+ String aStyle2;
ScAutoStyleInitData( const ScRange& rR, const String& rSt1, ULONG nT, const String& rSt2 ) :
aRange(rR), aStyle1(rSt1), nTimeout(nT), aStyle2(rSt2) {}
@@ -55,9 +55,9 @@ struct ScAutoStyleInitData
struct ScAutoStyleData
{
- ULONG nTimeout;
- ScRange aRange;
- String aStyle;
+ ULONG nTimeout;
+ ScRange aRange;
+ String aStyle;
ScAutoStyleData( ULONG nT, const ScRange& rR, const String& rT ) :
nTimeout(nT), aRange(rR), aStyle(rT) {}
@@ -65,7 +65,7 @@ struct ScAutoStyleData
//==================================================================
-inline ULONG TimeNow() // Sekunden
+inline ULONG TimeNow() // Sekunden
{
return (ULONG) time(0);
}
@@ -93,7 +93,7 @@ ScAutoStyleList::~ScAutoStyleList()
//==================================================================
-// initial short delay (asynchronous call)
+// initial short delay (asynchronous call)
void ScAutoStyleList::AddInitial( const ScRange& rRange, const String& rStyle1,
ULONG nTimeout, const String& rStyle2 )
@@ -111,10 +111,10 @@ IMPL_LINK( ScAutoStyleList, InitHdl, Timer*, EMPTYARG )
{
ScAutoStyleInitData* pData = (ScAutoStyleInitData*) aInitials.GetObject(i);
- // apply first style immediately
+ // apply first style immediately
pDocSh->DoAutoStyle( pData->aRange, pData->aStyle1 );
- // add second style to list
+ // add second style to list
if ( pData->nTimeout )
AddEntry( pData->nTimeout, pData->aRange, pData->aStyle2 );
@@ -132,7 +132,7 @@ void ScAutoStyleList::AddEntry( ULONG nTimeout, const ScRange& rRange, const Str
aTimer.Stop();
ULONG nNow = TimeNow();
- // alten Eintrag loeschen
+ // alten Eintrag loeschen
ULONG nCount = aEntries.Count();
ULONG i;
@@ -144,11 +144,11 @@ void ScAutoStyleList::AddEntry( ULONG nTimeout, const ScRange& rRange, const Str
delete pData;
aEntries.Remove(i);
--nCount;
- break; // nicht weitersuchen - es kann nur einen geben
+ break; // nicht weitersuchen - es kann nur einen geben
}
}
- // Timeouts von allen Eintraegen anpassen
+ // Timeouts von allen Eintraegen anpassen
if (nCount && nNow != nTimerStart)
{
@@ -156,7 +156,7 @@ void ScAutoStyleList::AddEntry( ULONG nTimeout, const ScRange& rRange, const Str
AdjustEntries((nNow-nTimerStart)*1000);
}
- // Einfuege-Position suchen
+ // Einfuege-Position suchen
ULONG nPos = LIST_APPEND;
for (i=0; i<nCount && nPos == LIST_APPEND; i++)
@@ -166,22 +166,22 @@ void ScAutoStyleList::AddEntry( ULONG nTimeout, const ScRange& rRange, const Str
ScAutoStyleData* pNew = new ScAutoStyleData( nTimeout, rRange, rStyle );
aEntries.Insert( pNew, nPos );
- // abgelaufene ausfuehren, Timer neu starten
+ // abgelaufene ausfuehren, Timer neu starten
ExecuteEntries();
StartTimer(nNow);
}
-void ScAutoStyleList::AdjustEntries( ULONG nDiff ) // Millisekunden
+void ScAutoStyleList::AdjustEntries( ULONG nDiff ) // Millisekunden
{
ULONG nCount = aEntries.Count();
for (ULONG i=0; i<nCount; i++)
{
ScAutoStyleData* pData = (ScAutoStyleData*) aEntries.GetObject(i);
if ( pData->nTimeout <= nDiff )
- pData->nTimeout = 0; // abgelaufen
+ pData->nTimeout = 0; // abgelaufen
else
- pData->nTimeout -= nDiff; // weiterzaehlen
+ pData->nTimeout -= nDiff; // weiterzaehlen
}
}
@@ -190,7 +190,7 @@ void ScAutoStyleList::ExecuteEntries()
ScAutoStyleData* pData;
while ((pData = (ScAutoStyleData*) aEntries.GetObject(0)) != NULL && pData->nTimeout == 0)
{
- pDocSh->DoAutoStyle( pData->aRange, pData->aStyle ); //! oder Request ???
+ pDocSh->DoAutoStyle( pData->aRange, pData->aStyle ); //! oder Request ???
delete pData;
aEntries.Remove((ULONG)0);
@@ -206,14 +206,14 @@ void ScAutoStyleList::ExecuteAllNow()
{
ScAutoStyleData* pData = (ScAutoStyleData*) aEntries.GetObject(i);
- pDocSh->DoAutoStyle( pData->aRange, pData->aStyle ); //! oder Request ???
+ pDocSh->DoAutoStyle( pData->aRange, pData->aStyle ); //! oder Request ???
delete pData;
}
aEntries.Clear();
}
-void ScAutoStyleList::StartTimer( ULONG nNow ) // Sekunden
+void ScAutoStyleList::StartTimer( ULONG nNow ) // Sekunden
{
// ersten Eintrag mit Timeout != 0 suchen
@@ -233,7 +233,7 @@ void ScAutoStyleList::StartTimer( ULONG nNow ) // Sekunden
IMPL_LINK( ScAutoStyleList, TimerHdl, Timer*, EMPTYARG )
{
ULONG nNow = TimeNow();
- AdjustEntries(aTimer.GetTimeout()); // eingestellte Wartezeit
+ AdjustEntries(aTimer.GetTimeout()); // eingestellte Wartezeit
ExecuteEntries();
StartTimer(nNow);
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 4a5f68b3e658..032d3b1d4bbb 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.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,8 +51,8 @@
#include "rangenam.hxx"
#include "olinetab.hxx"
#include "dpobject.hxx"
-#include "dociter.hxx" // for lcl_EmptyExcept
-#include "cell.hxx" // for lcl_EmptyExcept
+#include "dociter.hxx" // for lcl_EmptyExcept
+#include "cell.hxx" // for lcl_EmptyExcept
#include "editable.hxx"
#include "attrib.hxx"
#include "drwlayer.hxx"
@@ -124,9 +124,9 @@ BOOL ScDBDocFunc::DeleteDBRange( const String& rName, BOOL /* bApi */ )
if (bUndo)
pUndoColl = new ScDBCollection( *pDocColl );
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
pDocColl->AtFree( nPos );
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
if (bUndo)
{
@@ -163,17 +163,17 @@ BOOL ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, BOOL /*
ScDBCollection* pUndoColl = new ScDBCollection( *pDocColl );
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
pDocColl->AtFree( nPos );
BOOL bInserted = pDocColl->Insert( pNewData );
- if (!bInserted) // Fehler -> alten Zustand wiederherstellen
+ if (!bInserted) // Fehler -> alten Zustand wiederherstellen
{
delete pNewData;
- pDoc->SetDBCollection( pUndoColl ); // gehoert dann dem Dokument
+ pDoc->SetDBCollection( pUndoColl ); // gehoert dann dem Dokument
}
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
- if (bInserted) // Einfuegen hat geklappt
+ if (bInserted) // Einfuegen hat geklappt
{
if (bUndo)
{
@@ -210,7 +210,7 @@ BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ )
ScRange aOldRange, aNewRange;
pData->GetArea(aOldRange);
rNewData.GetArea(aNewRange);
- BOOL bAreaChanged = ( aOldRange != aNewRange ); // dann muss neu compiliert werden
+ BOOL bAreaChanged = ( aOldRange != aNewRange ); // dann muss neu compiliert werden
ScDBCollection* pUndoColl = NULL;
if (bUndo)
@@ -238,13 +238,13 @@ BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ )
BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
{
- //! auch fuer ScDBFunc::RepeatDB benutzen!
+ //! auch fuer ScDBFunc::RepeatDB benutzen!
BOOL bDone = FALSE;
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
bRecord = FALSE;
- ScDBCollection* pColl = pDoc->GetDBCollection();
+ ScDBCollection* pColl = pDoc->GetDBCollection();
USHORT nIndex;
if ( pColl && pColl->SearchName( rDBName, nIndex ) )
{
@@ -285,7 +285,7 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
SCROW nEndRow;
pDBData->GetArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow );
- //! Undo nur benoetigte Daten ?
+ //! Undo nur benoetigte Daten ?
ScDocument* pUndoDoc = NULL;
ScOutlineTable* pUndoTab = NULL;
@@ -318,13 +318,13 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
else
pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE );
- // Datenbereich sichern - incl. Filter-Ergebnis
+ // Datenbereich sichern - incl. Filter-Ergebnis
pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, FALSE, pUndoDoc );
- // alle Formeln wegen Referenzen
+ // alle Formeln wegen Referenzen
pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, FALSE, pUndoDoc );
- // DB- und andere Bereiche
+ // DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
if (pDocRange->GetCount())
pUndoRange = new ScRangeName( *pDocRange );
@@ -335,33 +335,33 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
if (bSort && bSubTotal)
{
- // Sortieren ohne SubTotals
+ // Sortieren ohne SubTotals
- aSubTotalParam.bRemoveOnly = TRUE; // wird unten wieder zurueckgesetzt
+ aSubTotalParam.bRemoveOnly = TRUE; // wird unten wieder zurueckgesetzt
DoSubTotals( nTab, aSubTotalParam, NULL, FALSE, bApi );
}
if (bSort)
{
- pDBData->GetSortParam( aSortParam ); // Bereich kann sich geaendert haben
+ pDBData->GetSortParam( aSortParam ); // Bereich kann sich geaendert haben
Sort( nTab, aSortParam, FALSE, FALSE, bApi );
}
if (bQuery)
{
- pDBData->GetQueryParam( aQueryParam ); // Bereich kann sich geaendert haben
+ pDBData->GetQueryParam( aQueryParam ); // Bereich kann sich geaendert haben
ScRange aAdvSource;
if (pDBData->GetAdvancedQuerySource(aAdvSource))
Query( nTab, aQueryParam, &aAdvSource, FALSE, bApi );
else
Query( nTab, aQueryParam, NULL, FALSE, bApi );
- // bei nicht-inplace kann die Tabelle umgestellt worden sein
-// if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab )
-// SetTabNo( nTab );
+ // bei nicht-inplace kann die Tabelle umgestellt worden sein
+// if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab )
+// SetTabNo( nTab );
}
if (bSubTotal)
{
- pDBData->GetSubTotalParam( aSubTotalParam ); // Bereich kann sich geaendert haben
+ pDBData->GetSubTotalParam( aSubTotalParam ); // Bereich kann sich geaendert haben
aSubTotalParam.bRemoveOnly = FALSE;
DoSubTotals( nTab, aSubTotalParam, NULL, FALSE, bApi );
}
@@ -403,7 +403,7 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
bDone = TRUE;
}
- else if (!bApi) // "Keine Operationen auszufuehren"
+ else if (!bApi) // "Keine Operationen auszufuehren"
rDocShell.ErrorMessage(STR_MSSG_REPEATDB_0);
}
@@ -469,18 +469,18 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
aLocalParam.nCol2, aLocalParam.nRow2, nTab,
HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{
- // Merge-Attribute wuerden beim Sortieren durcheinanderkommen
+ // Merge-Attribute wuerden beim Sortieren durcheinanderkommen
if (!bApi)
rDocShell.ErrorMessage(STR_SORT_ERR_MERGED);
return FALSE;
}
- // ausfuehren
+ // ausfuehren
WaitObject aWait( rDocShell.GetActiveDialogParent() );
- BOOL bRepeatQuery = FALSE; // bestehenden Filter wiederholen?
+ BOOL bRepeatQuery = FALSE; // bestehenden Filter wiederholen?
ScQueryParam aQueryParam;
pDBData->GetQueryParam( aQueryParam );
if ( aQueryParam.GetEntry(0).bDoQuery )
@@ -491,7 +491,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
if ( aQueryParam.bInplace ||
aQueryParam.nDestCol != rSortParam.nDestCol ||
aQueryParam.nDestRow != rSortParam.nDestRow ||
- aQueryParam.nDestTab != rSortParam.nDestTab ) // Query auf selben Zielbereich?
+ aQueryParam.nDestTab != rSortParam.nDestTab ) // Query auf selben Zielbereich?
bRepeatQuery = FALSE;
}
@@ -527,8 +527,8 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
pR = &aOldDest;
}
- // Zeilenhoehen immer (wegen automatischer Anpassung)
- //! auf ScBlockUndo umstellen
+ // Zeilenhoehen immer (wegen automatischer Anpassung)
+ //! auf ScBlockUndo umstellen
// if (bRepeatQuery)
pDoc->CopyToDocument( 0, aLocalParam.nRow1, nTab, MAXCOL, aLocalParam.nRow2, nTab,
IDF_NONE, FALSE, pUndoDoc );
@@ -549,7 +549,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
if ( bCopy )
{
if (pDestData)
- pDoc->DeleteAreaTab(aOldDest, IDF_CONTENTS); // Zielbereich vorher loeschen
+ pDoc->DeleteAreaTab(aOldDest, IDF_CONTENTS); // Zielbereich vorher loeschen
ScRange aSource( rSortParam.nCol1,rSortParam.nRow1,nSrcTab,
rSortParam.nCol2,rSortParam.nRow2,nSrcTab );
@@ -567,33 +567,33 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
{
ScSortParam aOldSortParam;
pDBData->GetSortParam( aOldSortParam );
- if ( aOldSortParam.bDoSort[0] && aOldSortParam.bInplace ) // Inplace-Sortierung gemerkt?
+ if ( aOldSortParam.bDoSort[0] && aOldSortParam.bInplace ) // Inplace-Sortierung gemerkt?
{
bSave = FALSE;
aOldSortParam.nDestCol = rSortParam.nDestCol;
aOldSortParam.nDestRow = rSortParam.nDestRow;
aOldSortParam.nDestTab = rSortParam.nDestTab;
- pDBData->SetSortParam( aOldSortParam ); // dann nur DestPos merken
+ pDBData->SetSortParam( aOldSortParam ); // dann nur DestPos merken
}
}
- if (bSave) // Parameter merken
+ if (bSave) // Parameter merken
{
pDBData->SetSortParam( rSortParam );
- pDBData->SetHeader( rSortParam.bHasHeader ); //! ???
- pDBData->SetByRow( rSortParam.bByRow ); //! ???
+ pDBData->SetHeader( rSortParam.bHasHeader ); //! ???
+ pDBData->SetByRow( rSortParam.bByRow ); //! ???
}
- if (bCopy) // neuen DB-Bereich merken
+ if (bCopy) // neuen DB-Bereich merken
{
- // Tabelle umschalten von aussen (View)
- //! SetCursor ??!?!
+ // Tabelle umschalten von aussen (View)
+ //! SetCursor ??!?!
ScRange aDestPos( aLocalParam.nCol1, aLocalParam.nRow1, nTab,
aLocalParam.nCol2, aLocalParam.nRow2, nTab );
ScDBData* pNewData;
if (pDestData)
- pNewData = pDestData; // Bereich vorhanden -> anpassen
- else // Bereich ab Cursor/Markierung wird angelegt
+ pNewData = pDestData; // Bereich vorhanden -> anpassen
+ else // Bereich ab Cursor/Markierung wird angelegt
pNewData = rDocShell.GetDBData(aDestPos, SC_DB_MAKE, SC_DBSEL_FORCE_MARK );
if (pNewData)
{
@@ -601,7 +601,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
aLocalParam.nCol1,aLocalParam.nRow1,
aLocalParam.nCol2,aLocalParam.nRow2 );
pNewData->SetSortParam( aLocalParam );
- pNewData->SetHeader( aLocalParam.bHasHeader ); //! ???
+ pNewData->SetHeader( aLocalParam.bHasHeader ); //! ???
pNewData->SetByRow( aLocalParam.bByRow );
}
else
@@ -667,8 +667,8 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
return FALSE;
}
- // Wechsel von Inplace auf nicht-Inplace, dann erst Inplace aufheben:
- // (nur, wenn im Dialog "Persistent" ausgewaehlt ist)
+ // Wechsel von Inplace auf nicht-Inplace, dann erst Inplace aufheben:
+ // (nur, wenn im Dialog "Persistent" ausgewaehlt ist)
if ( !rQueryParam.bInplace && pDBData->HasQueryParam() && rQueryParam.bDestPers )
{
@@ -676,7 +676,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
pDBData->GetQueryParam(aOldQuery);
if (aOldQuery.bInplace)
{
- // alte Filterung aufheben
+ // alte Filterung aufheben
SCSIZE nEC = aOldQuery.GetEntryCount();
for (SCSIZE i=0; i<nEC; i++)
@@ -686,11 +686,11 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
}
}
- ScQueryParam aLocalParam( rQueryParam ); // fuer Paint / Zielbereich
- BOOL bCopy = !rQueryParam.bInplace; // kopiert wird in Table::Query
- ScDBData* pDestData = NULL; // Bereich, in den kopiert wird
- BOOL bDoSize = FALSE; // Zielgroesse anpassen (einf./loeschen)
- SCCOL nFormulaCols = 0; // nur bei bDoSize
+ ScQueryParam aLocalParam( rQueryParam ); // fuer Paint / Zielbereich
+ BOOL bCopy = !rQueryParam.bInplace; // kopiert wird in Table::Query
+ ScDBData* pDestData = NULL; // Bereich, in den kopiert wird
+ BOOL bDoSize = FALSE; // Zielgroesse anpassen (einf./loeschen)
+ SCCOL nFormulaCols = 0; // nur bei bDoSize
BOOL bKeepFmt = FALSE;
ScRange aOldDest;
ScRange aDestTotal;
@@ -731,10 +731,10 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
nDestTab );
bDoSize = pDestData->IsDoSize();
- // Test, ob Formeln aufgefuellt werden muessen (nFormulaCols):
+ // Test, ob Formeln aufgefuellt werden muessen (nFormulaCols):
if ( bDoSize && aOldDest.aEnd.Col() == aDestTotal.aEnd.Col() )
{
- SCCOL nTestCol = aOldDest.aEnd.Col() + 1; // neben dem Bereich
+ SCCOL nTestCol = aOldDest.aEnd.Col() + 1; // neben dem Bereich
SCROW nTestRow = rQueryParam.nDestRow +
( aLocalParam.bHasHeader ? 1 : 0 );
while ( nTestCol <= MAXCOL &&
@@ -746,21 +746,21 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
if ( bDoSize && !pDoc->CanFitBlock( aOldDest, aDestTotal ) )
{
if (!bApi)
- rDocShell.ErrorMessage(STR_MSSG_DOSUBTOTALS_2); // kann keine Zeilen einfuegen
+ rDocShell.ErrorMessage(STR_MSSG_DOSUBTOTALS_2); // kann keine Zeilen einfuegen
return FALSE;
}
}
}
- // ausfuehren
+ // ausfuehren
WaitObject aWait( rDocShell.GetActiveDialogParent() );
- BOOL bKeepSub = FALSE; // bestehende Teilergebnisse wiederholen?
+ BOOL bKeepSub = FALSE; // bestehende Teilergebnisse wiederholen?
ScSubTotalParam aSubTotalParam;
- if (rQueryParam.GetEntry(0).bDoQuery) // nicht beim Aufheben
+ if (rQueryParam.GetEntry(0).bDoQuery) // nicht beim Aufheben
{
- pDBData->GetSubTotalParam( aSubTotalParam ); // Teilergebnisse vorhanden?
+ pDBData->GetSubTotalParam( aSubTotalParam ); // Teilergebnisse vorhanden?
if ( aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly )
bKeepSub = TRUE;
@@ -779,7 +779,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
pDoc->CopyToDocument( aLocalParam.nCol1, aLocalParam.nRow1, nDestTab,
aLocalParam.nCol2, aLocalParam.nRow2, nDestTab,
IDF_ALL, FALSE, pUndoDoc );
- // Attribute sichern, falls beim Filtern mitkopiert
+ // Attribute sichern, falls beim Filtern mitkopiert
if (pDestData)
{
@@ -803,18 +803,18 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
ScDocument* pAttribDoc = NULL;
ScRange aAttribRange;
- if (pDestData) // Zielbereich loeschen
+ if (pDestData) // Zielbereich loeschen
{
if ( bKeepFmt )
{
- // kleinere der End-Spalten, Header+1 Zeile
+ // kleinere der End-Spalten, Header+1 Zeile
aAttribRange = aOldDest;
if ( aAttribRange.aEnd.Col() > aDestTotal.aEnd.Col() )
aAttribRange.aEnd.SetCol( aDestTotal.aEnd.Col() );
aAttribRange.aEnd.SetRow( aAttribRange.aStart.Row() +
( aLocalParam.bHasHeader ? 1 : 0 ) );
- // auch fuer aufgefuellte Formeln
+ // auch fuer aufgefuellte Formeln
aAttribRange.aEnd.SetCol( aAttribRange.aEnd.Col() + nFormulaCols );
pAttribDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -825,10 +825,10 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
if ( bDoSize )
pDoc->FitBlock( aOldDest, aDestTotal );
else
- pDoc->DeleteAreaTab(aOldDest, IDF_ALL); // einfach loeschen
+ pDoc->DeleteAreaTab(aOldDest, IDF_ALL); // einfach loeschen
}
- // Filtern am Dokument ausfuehren
+ // Filtern am Dokument ausfuehren
SCSIZE nCount = pDoc->Query( nTab, rQueryParam, bKeepSub );
if (bCopy)
{
@@ -838,17 +838,17 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
if ( bDoSize )
{
- // auf wirklichen Ergebnis-Bereich anpassen
- // (das hier ist immer eine Verkleinerung)
+ // auf wirklichen Ergebnis-Bereich anpassen
+ // (das hier ist immer eine Verkleinerung)
ScRange aNewDest( aLocalParam.nCol1, aLocalParam.nRow1, nDestTab,
aLocalParam.nCol2, aLocalParam.nRow2, nDestTab );
- pDoc->FitBlock( aDestTotal, aNewDest, FALSE ); // FALSE - nicht loeschen
+ pDoc->FitBlock( aDestTotal, aNewDest, FALSE ); // FALSE - nicht loeschen
if ( nFormulaCols > 0 )
{
- // Formeln ausfuellen
- //! Undo (Query und Repeat) !!!
+ // Formeln ausfuellen
+ //! Undo (Query und Repeat) !!!
ScRange aNewForm( aLocalParam.nCol2+1, aLocalParam.nRow1, nDestTab,
aLocalParam.nCol2+nFormulaCols, aLocalParam.nRow2, nDestTab );
@@ -866,9 +866,9 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
}
}
- if ( pAttribDoc ) // gemerkte Attribute zurueckkopieren
+ if ( pAttribDoc ) // gemerkte Attribute zurueckkopieren
{
- // Header
+ // Header
if (aLocalParam.bHasHeader)
{
ScRange aHdrRange = aAttribRange;
@@ -876,7 +876,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
pAttribDoc->CopyToDocument( aHdrRange, IDF_ATTRIB, FALSE, pDoc );
}
- // Daten
+ // Daten
SCCOL nAttrEndCol = aAttribRange.aEnd.Col();
SCROW nAttrRow = aAttribRange.aStart.Row() + ( aLocalParam.bHasHeader ? 1 : 0 );
for (SCCOL nCol = aAttribRange.aStart.Col(); nCol<=nAttrEndCol; nCol++)
@@ -897,27 +897,27 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
}
}
- // speichern: Inplace immer, sonst je nach Einstellung
- // alter Inplace-Filter ist ggf. schon aufgehoben
+ // speichern: Inplace immer, sonst je nach Einstellung
+ // alter Inplace-Filter ist ggf. schon aufgehoben
BOOL bSave = rQueryParam.bInplace || rQueryParam.bDestPers;
- if (bSave) // merken
+ if (bSave) // merken
{
pDBData->SetQueryParam( rQueryParam );
- pDBData->SetHeader( rQueryParam.bHasHeader ); //! ???
- pDBData->SetAdvancedQuerySource( pAdvSource ); // after SetQueryParam
+ pDBData->SetHeader( rQueryParam.bHasHeader ); //! ???
+ pDBData->SetAdvancedQuerySource( pAdvSource ); // after SetQueryParam
}
- if (bCopy) // neuen DB-Bereich merken
+ if (bCopy) // neuen DB-Bereich merken
{
- // selektieren wird hinterher von aussen (dbfunc)
- // momentan ueber DB-Bereich an der Zielposition, darum muss dort
- // auf jeden Fall ein Bereich angelegt werden.
+ // selektieren wird hinterher von aussen (dbfunc)
+ // momentan ueber DB-Bereich an der Zielposition, darum muss dort
+ // auf jeden Fall ein Bereich angelegt werden.
ScDBData* pNewData;
if (pDestData)
- pNewData = pDestData; // Bereich vorhanden -> anpassen (immer!)
- else // Bereich anlegen
+ pNewData = pDestData; // Bereich vorhanden -> anpassen (immer!)
+ else // Bereich anlegen
pNewData = rDocShell.GetDBData(
ScRange( aLocalParam.nCol1, aLocalParam.nRow1, nDestTab,
aLocalParam.nCol2, aLocalParam.nRow2, nDestTab ),
@@ -928,8 +928,8 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
pNewData->SetArea( nDestTab, aLocalParam.nCol1, aLocalParam.nRow1,
aLocalParam.nCol2, aLocalParam.nRow2 );
- // Query-Param wird am Ziel nicht mehr eingestellt, fuehrt nur zu Verwirrung
- // und Verwechslung mit dem Query-Param am Quellbereich (#37187#)
+ // Query-Param wird am Ziel nicht mehr eingestellt, fuehrt nur zu Verwirrung
+ // und Verwechslung mit dem Query-Param am Quellbereich (#37187#)
}
else
{
@@ -939,7 +939,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
if (!bCopy)
{
- pDoc->InvalidatePageBreaks(nTab);
+ pDoc->InvalidatePageBreaks(nTab);
pDoc->UpdatePageBreaks( nTab );
}
@@ -985,12 +985,12 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
const ScSortParam* pForceNewSort, BOOL bRecord, BOOL bApi )
{
- //! auch fuer ScDBFunc::DoSubTotals benutzen!
- // dann bleibt aussen:
- // - neuen Bereich (aus DBData) markieren
- // - SelectionChanged (?)
+ //! auch fuer ScDBFunc::DoSubTotals benutzen!
+ // dann bleibt aussen:
+ // - neuen Bereich (aus DBData) markieren
+ // - SelectionChanged (?)
- BOOL bDo = !rParam.bRemoveOnly; // FALSE = nur loeschen
+ BOOL bDo = !rParam.bRemoveOnly; // FALSE = nur loeschen
BOOL bRet = FALSE;
ScDocument* pDoc = rDocShell.GetDocument();
@@ -1016,7 +1016,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
rParam.nCol2, rParam.nRow2, nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ))
{
if (!bApi)
- rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); // nicht in zusammengefasste einfuegen
+ rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); // nicht in zusammengefasste einfuegen
return FALSE;
}
@@ -1038,14 +1038,14 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
WaitObject aWait( rDocShell.GetActiveDialogParent() );
ScDocShellModificator aModificator( rDocShell );
- ScSubTotalParam aNewParam( rParam ); // Bereichsende wird veraendert
- ScDocument* pUndoDoc = NULL;
- ScOutlineTable* pUndoTab = NULL;
- ScRangeName* pUndoRange = NULL;
+ ScSubTotalParam aNewParam( rParam ); // Bereichsende wird veraendert
+ ScDocument* pUndoDoc = NULL;
+ ScOutlineTable* pUndoTab = NULL;
+ ScRangeName* pUndoRange = NULL;
ScDBCollection* pUndoDB = NULL;
- SCTAB nTabCount = 0; // fuer Referenz-Undo
+ SCTAB nTabCount = 0; // fuer Referenz-Undo
- if (bRecord) // alte Daten sichern
+ if (bRecord) // alte Daten sichern
{
BOOL bOldFilter = bDo && rParam.bDoSort;
@@ -1069,15 +1069,15 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
else
pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, bOldFilter );
- // Datenbereich sichern - incl. Filter-Ergebnis
+ // Datenbereich sichern - incl. Filter-Ergebnis
pDoc->CopyToDocument( 0,rParam.nRow1+1,nTab, MAXCOL,rParam.nRow2,nTab,
IDF_ALL, FALSE, pUndoDoc );
- // alle Formeln wegen Referenzen
+ // alle Formeln wegen Referenzen
pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
IDF_FORMULA, FALSE, pUndoDoc );
- // DB- und andere Bereiche
+ // DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
if (pDocRange->GetCount())
pUndoRange = new ScRangeName( *pDocRange );
@@ -1086,10 +1086,10 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
pUndoDB = new ScDBCollection( *pDocDB );
}
-// pDoc->SetOutlineTable( nTab, NULL );
- ScOutlineTable* pOut = pDoc->GetOutlineTable( nTab );
+// pDoc->SetOutlineTable( nTab, NULL );
+ ScOutlineTable* pOut = pDoc->GetOutlineTable( nTab );
if (pOut)
- pOut->GetRowArray()->RemoveAll(); // nur Zeilen-Outlines loeschen
+ pOut->GetRowArray()->RemoveAll(); // nur Zeilen-Outlines loeschen
if (rParam.bReplace)
pDoc->RemoveSubTotals( nTab, aNewParam );
@@ -1101,8 +1101,8 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
{
pDBData->SetArea( nTab, aNewParam.nCol1,aNewParam.nRow1, aNewParam.nCol2,aNewParam.nRow2 );
- // Teilergebnis-Felder vor die Sortierung setzen
- // (doppelte werden weggelassen, kann darum auch wieder aufgerufen werden)
+ // Teilergebnis-Felder vor die Sortierung setzen
+ // (doppelte werden weggelassen, kann darum auch wieder aufgerufen werden)
ScSortParam aOldSort;
pDBData->GetSortParam( aOldSort );
@@ -1118,7 +1118,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
if (bRecord)
{
-// ScDBData* pUndoDBData = pDBData ? new ScDBData( *pDBData ) : NULL;
+// ScDBData* pUndoDBData = pDBData ? new ScDBData( *pDBData ) : NULL;
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoSubTotals( &rDocShell, nTab,
rParam, aNewParam.nRow2,
@@ -1158,12 +1158,12 @@ BOOL lcl_EmptyExcept( ScDocument* pDoc, const ScRange& rRange, const ScRange& rE
if ( !pCell->IsBlank() ) // real content?
{
if ( !rExcept.In( ScAddress( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ) ) )
- return FALSE; // cell found
+ return FALSE; // cell found
}
pCell = aIter.GetNext();
}
- return TRUE; // nothing found - empty
+ return TRUE; // nothing found - empty
}
BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
@@ -1180,15 +1180,15 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
ScDocument* pNewUndoDoc = NULL;
ScDPObject* pUndoDPObj = NULL;
if ( bRecord && pOldObj )
- pUndoDPObj = new ScDPObject( *pOldObj ); // copy old settings for undo
+ pUndoDPObj = new ScDPObject( *pOldObj ); // copy old settings for undo
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
bRecord = FALSE;
if ( !rDocShell.IsEditable() || pDoc->GetChangeTrack() )
{
- // not recorded -> disallow
- //! different error messages?
+ // not recorded -> disallow
+ //! different error messages?
nErrId = STR_PROTECTIONERR;
}
@@ -1201,9 +1201,9 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
}
if ( pNewObj && !nErrId )
{
- // at least one cell at the output position must be editable
- // -> check in advance
- // (start of output range in pNewObj is valid)
+ // at least one cell at the output position must be editable
+ // -> check in advance
+ // (start of output range in pNewObj is valid)
ScRange aNewStart( pNewObj->GetOutRange().aStart );
ScEditableTester aTester( pDoc, aNewStart );
@@ -1216,7 +1216,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
{
if ( pOldObj && !pNewObj )
{
- // delete table
+ // delete table
ScRange aRange = pOldObj->GetOutRange();
SCTAB nTab = aRange.aStart.Tab();
@@ -1237,7 +1237,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
pDoc->GetDPCollection()->FreeTable( pOldObj ); // object is deleted here
- rDocShell.PostPaintGridAll(); //! only necessary parts
+ rDocShell.PostPaintGridAll(); //! only necessary parts
rDocShell.PostPaint( aRange.aStart.Col(), aRange.aStart.Row(), nTab,
aRange.aEnd.Col(), aRange.aEnd.Row(), nTab,
PAINT_GRID );
@@ -1258,16 +1258,16 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
if ( pNewObj == pOldObj )
{
- // refresh only - no settings modified
+ // refresh only - no settings modified
}
else
{
- pNewObj->WriteSourceDataTo( *pOldObj ); // copy source data
+ pNewObj->WriteSourceDataTo( *pOldObj ); // copy source data
ScDPSaveData* pData = pNewObj->GetSaveData();
DBG_ASSERT( pData, "no SaveData from living DPObject" );
if ( pData )
- pOldObj->SetSaveData( *pData ); // copy SaveData
+ pOldObj->SetSaveData( *pData ); // copy SaveData
}
pDestObj = pOldObj;
@@ -1275,7 +1275,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
}
else
{
- // output range must be set at pNewObj
+ // output range must be set at pNewObj
pDestObj = new ScDPObject( *pNewObj );
@@ -1300,18 +1300,18 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
if ( pNewObj == pOldObj && pDestObj->IsImportData() )
pDestObj->InvalidateSource();
- pDestObj->InvalidateData(); // before getting the new output area
+ pDestObj->InvalidateData(); // before getting the new output area
- // make sure the table has a name (not set by dialog)
+ // make sure the table has a name (not set by dialog)
if ( !pDestObj->GetName().Len() )
pDestObj->SetName( pDoc->GetDPCollection()->CreateNewName() );
BOOL bOverflow = FALSE;
ScRange aNewOut = pDestObj->GetNewOutputRange( bOverflow );
- //! test for overlap with other data pilot tables
+ //! test for overlap with other data pilot tables
if( pOldObj )
- {
+ {
const ScSheetSourceDesc* pSheetDesc = pOldObj->GetSheetDesc();
if( pSheetDesc && pSheetDesc->aSourceRange.Intersects( aNewOut ) )
{
@@ -1326,7 +1326,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
if ( bOverflow )
{
- // like with STR_PROTECTIONERR, use undo to reverse everything
+ // like with STR_PROTECTIONERR, use undo to reverse everything
DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" );
bUndoSelf = TRUE;
nErrId = STR_PIVOT_ERROR;
@@ -1336,22 +1336,22 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
ScEditableTester aTester( pDoc, aNewOut );
if ( !aTester.IsEditable() )
{
- // destination area isn't editable
- //! reverse everything done so far, don't proceed
+ // destination area isn't editable
+ //! reverse everything done so far, don't proceed
- // quick solution: proceed to end, use undo action
- // to reverse everything:
+ // quick solution: proceed to end, use undo action
+ // to reverse everything:
DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" );
bUndoSelf = TRUE;
nErrId = aTester.GetMessageId();
}
}
- // test if new output area is empty except for old area
+ // test if new output area is empty except for old area
if ( !bApi )
{
BOOL bEmpty;
- if ( pOldObj ) // OutRange of pOldObj (pDestObj) is still old area
+ if ( pOldObj ) // OutRange of pOldObj (pDestObj) is still old area
bEmpty = lcl_EmptyExcept( pDoc, aNewOut, pOldObj->GetOutRange() );
else
bEmpty = pDoc->IsBlockEmpty( aNewOut.aStart.Tab(),
@@ -1364,7 +1364,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY) );
if (aBox.Execute() == RET_NO)
{
- //! like above (not editable), use undo to reverse everything
+ //! like above (not editable), use undo to reverse everything
DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" );
bUndoSelf = TRUE;
}
@@ -1381,7 +1381,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
pDestObj->Output( aNewOut.aStart );
- rDocShell.PostPaintGridAll(); //! only necessary parts
+ rDocShell.PostPaintGridAll(); //! only necessary parts
bDone = TRUE;
}
}
@@ -1393,13 +1393,13 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
SfxUndoAction* pAction = new ScUndoDataPilot( &rDocShell,
pOldUndoDoc, pNewUndoDoc, pUndoDPObj, pDestObj, bAllowMove );
pOldUndoDoc = NULL;
- pNewUndoDoc = NULL; // pointers are used in undo action
+ pNewUndoDoc = NULL; // pointers are used in undo action
// pUndoDPObj is copied
if (bUndoSelf)
{
- // use undo action to restore original state
- //! prevent setting the document modified? (ScDocShellModificator)
+ // use undo action to restore original state
+ //! prevent setting the document modified? (ScDocShellModificator)
pAction->Undo();
delete pAction;
@@ -1409,7 +1409,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
rDocShell.GetUndoManager()->AddUndoAction( pAction );
}
- delete pOldUndoDoc; // if not used for undo
+ delete pOldUndoDoc; // if not used for undo
delete pNewUndoDoc;
delete pUndoDPObj;
@@ -1429,7 +1429,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
//==================================================================
//
-// Datenbank-Import...
+// Datenbank-Import...
void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName,
const String& rTableName, const String& rStatement, BOOL bNative,
@@ -1437,7 +1437,7 @@ void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName,
::com::sun::star::sdbc::XResultSet >& xResultSet,
const SbaSelectionList* pSelection )
{
- // Target ist jetzt einfach der Bereichsname
+ // Target ist jetzt einfach der Bereichsname
ScDocument* pDoc = rDocShell.GetDocument();
ScDBCollection& rDBColl = *pDoc->GetDBCollection();
@@ -1467,31 +1467,31 @@ void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName,
BOOL bSql = ( rStatement.Len() != 0 );
- aImportParam.aDBName = rDBName;
- aImportParam.bSql = bSql;
+ aImportParam.aDBName = rDBName;
+ aImportParam.bSql = bSql;
aImportParam.aStatement = bSql ? rStatement : rTableName;
- aImportParam.bNative = bNative;
- aImportParam.nType = nType;
- aImportParam.bImport = TRUE;
+ aImportParam.bNative = bNative;
+ aImportParam.nType = nType;
+ aImportParam.bImport = TRUE;
BOOL bContinue = DoImport( nTab, aImportParam, xResultSet, pSelection, TRUE );
- // DB-Operationen wiederholen
+ // DB-Operationen wiederholen
ScTabViewShell* pViewSh = rDocShell.GetBestViewShell();
if (pViewSh)
{
ScRange aRange;
pData->GetArea(aRange);
- pViewSh->MarkRange(aRange); // selektieren
+ pViewSh->MarkRange(aRange); // selektieren
- if ( bContinue ) // #41905# Fehler beim Import -> Abbruch
+ if ( bContinue ) // #41905# Fehler beim Import -> Abbruch
{
- // interne Operationen, wenn welche gespeichert
+ // interne Operationen, wenn welche gespeichert
if ( pData->HasQueryParam() || pData->HasSortParam() || pData->HasSubTotalParam() )
pViewSh->RepeatDB();
- // Pivottabellen die den Bereich als Quelldaten haben
+ // Pivottabellen die den Bereich als Quelldaten haben
rDocShell.RefreshPivotTables(aRange);
}
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 8400f1ad8b6f..b992d595d0ea 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.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,20 +70,20 @@
using namespace com::sun::star;
-#define SC_SERVICE_ROWSET "com.sun.star.sdb.RowSet"
-#define SC_SERVICE_INTHANDLER "com.sun.star.task.InteractionHandler"
+#define SC_SERVICE_ROWSET "com.sun.star.sdb.RowSet"
+#define SC_SERVICE_INTHANDLER "com.sun.star.task.InteractionHandler"
-//! move to a header file?
-#define SC_DBPROP_DATASOURCENAME "DataSourceName"
-#define SC_DBPROP_COMMAND "Command"
-#define SC_DBPROP_COMMANDTYPE "CommandType"
-#define SC_DBPROP_SELECTION "Selection"
-#define SC_DBPROP_CURSOR "Cursor"
+//! move to a header file?
+#define SC_DBPROP_DATASOURCENAME "DataSourceName"
+#define SC_DBPROP_COMMAND "Command"
+#define SC_DBPROP_COMMANDTYPE "CommandType"
+#define SC_DBPROP_SELECTION "Selection"
+#define SC_DBPROP_CURSOR "Cursor"
// static
void ScDBDocFunc::ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFrame )
{
- // called after opening the database beamer
+ // called after opening the database beamer
if ( !pFrame || !rParam.bImport )
return;
@@ -181,21 +181,21 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos,
aList.Insert( (void*)nEntry, LIST_APPEND );
}
- BOOL bAddrInsert = FALSE; //!???
+ BOOL bAddrInsert = FALSE; //!???
if ( bAddrInsert )
{
bDone = DoImport( rPos.Tab(), aImParam, xResSet, &aList, TRUE, bAddrInsert );
}
else
{
- // create database range
- //! merge this with SID_SBA_IMPORT execute in docsh4.cxx
+ // create database range
+ //! merge this with SID_SBA_IMPORT execute in docsh4.cxx
ScDBData* pDBData = rDocShell.GetDBData( ScRange(rPos), SC_DB_IMPORT, SC_DBSEL_KEEP );
DBG_ASSERT(pDBData, "can't create DB data");
String sTarget = pDBData->GetName();
- //! change UpdateImport to use only one of rTableName, rStatement
+ //! change UpdateImport to use only one of rTableName, rStatement
String aTableName, aStatement;
if ( aImParam.bSql )
@@ -242,24 +242,24 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
ScDocShellModificator aModificator( rDocShell );
BOOL bSuccess = FALSE;
- BOOL bApi = FALSE; //! pass as argument
- BOOL bTruncated = FALSE; // for warning
+ BOOL bApi = FALSE; //! pass as argument
+ BOOL bTruncated = FALSE; // for warning
USHORT nErrStringId = 0;
String aErrorMessage;
SCCOL nCol = rParam.nCol1;
SCROW nRow = rParam.nRow1;
- SCCOL nEndCol = nCol; // end of resulting database area
+ SCCOL nEndCol = nCol; // end of resulting database area
SCROW nEndRow = nRow;
long i;
BOOL bDoSelection = FALSE;
- BOOL bRealSelection = FALSE; // TRUE if not everything is selected
+ BOOL bRealSelection = FALSE; // TRUE if not everything is selected
ULONG nListPos = 0;
ULONG nRowsRead = 0;
ULONG nListCount = 0;
- // -1 is special
+ // -1 is special
if ( pSelection && pSelection->Count() && (long)pSelection->GetObject(0) != -1L )
{
bDoSelection = TRUE;
@@ -272,13 +272,13 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
ScColumn::DoubleAllocSwitch aAllocSwitch(true);
//
- // get data from database into import document
+ // get data from database into import document
//
try
{
- // progress bar
- // only text (title is still needed, for the cancel button)
+ // progress bar
+ // only text (title is still needed, for the cancel button)
ScProgress aProgress( &rDocShell, ScGlobal::GetRscString(STR_UNDO_IMPORTDATA), 0 );
USHORT nInserted = 0;
@@ -297,7 +297,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if ( xRowProp.is() )
{
//
- // set source parameters
+ // set source parameters
//
sal_Int32 nType = rParam.bSql ? sdb::CommandType::COMMAND :
@@ -333,7 +333,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if ( xRowSet.is() )
{
//
- // get column descriptions
+ // get column descriptions
//
long nColCount = 0;
@@ -342,12 +342,12 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if ( xMetaSupp.is() )
xMeta = xMetaSupp->getMetaData();
if ( xMeta.is() )
- nColCount = xMeta->getColumnCount(); // this is the number of real columns
+ nColCount = xMeta->getColumnCount(); // this is the number of real columns
if ( rParam.nCol1 + nColCount - 1 > MAXCOL )
{
nColCount = 0;
- //! error message
+ //! error message
}
uno::Reference<sdbc::XRow> xRow( xRowSet, uno::UNO_QUERY );
@@ -355,8 +355,8 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
{
nEndCol = (SCCOL)( rParam.nCol1 + nColCount - 1 );
- uno::Sequence<sal_Int32> aColTypes( nColCount ); // column types
- uno::Sequence<sal_Bool> aColCurr( nColCount ); // currency flag is not in types
+ uno::Sequence<sal_Int32> aColTypes( nColCount ); // column types
+ uno::Sequence<sal_Bool> aColCurr( nColCount ); // currency flag is not in types
sal_Int32* pTypeArr = aColTypes.getArray();
sal_Bool* pCurrArr = aColCurr.getArray();
for (i=0; i<nColCount; i++)
@@ -365,7 +365,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
pCurrArr[i] = xMeta->isCurrency( i+1 );
}
- if ( !bAddrInsert ) // read column names
+ if ( !bAddrInsert ) // read column names
{
nCol = rParam.nCol1;
for (i=0; i<nColCount; i++)
@@ -382,7 +382,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
xRowSet->beforeFirst();
while ( !bEnd )
{
- // skip rows that are not selected
+ // skip rows that are not selected
if ( !bDoSelection )
{
if ( (bEnd = !xRowSet->next()) == FALSE )
@@ -419,7 +419,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
nEndRow = nRow;
++nRow;
- // progress bar
+ // progress bar
++nInserted;
if (!(nInserted & 15))
@@ -429,7 +429,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
aText += String::CreateFromInt32( nInserted );
aText += aPict.GetToken(1,'#');
- if (!aProgress.SetStateText( 0, aText )) // stopped by user?
+ if (!aProgress.SetStateText( 0, aText )) // stopped by user?
{
bEnd = TRUE;
bSuccess = FALSE;
@@ -437,10 +437,10 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
}
}
}
- else // past the end of the spreadsheet
+ else // past the end of the spreadsheet
{
- bEnd = TRUE; // don't continue
- bTruncated = TRUE; // warning flag
+ bEnd = TRUE; // don't continue
+ bTruncated = TRUE; // warning flag
}
}
}
@@ -464,19 +464,19 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
pImportDoc->DoColResize( nTab, rParam.nCol1,nEndCol, 0 );
//
- // test for cell protection
+ // test for cell protection
//
BOOL bKeepFormat = !bAddrInsert && pDBData->IsKeepFmt();
BOOL bMoveCells = !bAddrInsert && pDBData->IsDoSize();
- SCCOL nFormulaCols = 0; // columns to be filled with formulas
+ SCCOL nFormulaCols = 0; // columns to be filled with formulas
if (bMoveCells && nEndCol == rParam.nCol2)
{
- // if column count changes, formulas would become invalid anyway
- // -> only set nFormulaCols for unchanged column count
+ // if column count changes, formulas would become invalid anyway
+ // -> only set nFormulaCols for unchanged column count
- SCCOL nTestCol = rParam.nCol2 + 1; // right of the data
- SCROW nTestRow = rParam.nRow1 + 1; // below the title row
+ SCCOL nTestCol = rParam.nCol2 + 1; // right of the data
+ SCROW nTestRow = rParam.nRow1 + 1; // below the title row
while ( nTestCol <= MAXCOL &&
pDoc->GetCellType(ScAddress( nTestCol, nTestRow, nTab )) == CELLTYPE_FORMULA )
++nTestCol, ++nFormulaCols;
@@ -484,7 +484,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (bSuccess)
{
- // old and new range editable?
+ // old and new range editable?
ScEditableTester aTester;
aTester.TestBlock( pDoc, nTab, rParam.nCol1,rParam.nRow1,rParam.nCol2,rParam.nRow2 );
aTester.TestBlock( pDoc, nTab, rParam.nCol1,rParam.nRow1,nEndCol,nEndRow );
@@ -506,23 +506,23 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
nEndCol+nFormulaCols, nEndRow, nTab );
if (!pDoc->CanFitBlock( aOld, aNew ))
{
- nErrStringId = STR_MSSG_DOSUBTOTALS_2; // can't insert cells
+ nErrStringId = STR_MSSG_DOSUBTOTALS_2; // can't insert cells
bSuccess = FALSE;
}
}
//
- // copy data from import doc into real document
+ // copy data from import doc into real document
//
if ( bSuccess )
{
if (bKeepFormat)
{
- // keep formatting of title and first data row from the document
- // CopyToDocument also copies styles, Apply... needs separate calls
+ // keep formatting of title and first data row from the document
+ // CopyToDocument also copies styles, Apply... needs separate calls
- SCCOL nMinEndCol = Min( rParam.nCol2, nEndCol ); // not too much
+ SCCOL nMinEndCol = Min( rParam.nCol2, nEndCol ); // not too much
nMinEndCol = sal::static_int_cast<SCCOL>( nMinEndCol + nFormulaCols ); // only if column count unchanged
pImportDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, nTab, IDF_ATTRIB );
pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
@@ -543,7 +543,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
}
}
- // don't set cell protection attribute if table is protected
+ // don't set cell protection attribute if table is protected
if (pDoc->IsTabProtected(nTab))
{
ScPatternAttr aPattern(pImportDoc->GetPool());
@@ -552,10 +552,10 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
}
//
- // copy old data for undo
+ // copy old data for undo
//
- SCCOL nUndoEndCol = Max( nEndCol, rParam.nCol2 ); // rParam = old end
+ SCCOL nUndoEndCol = Max( nEndCol, rParam.nCol2 ); // rParam = old end
SCROW nUndoEndRow = Max( nEndRow, rParam.nRow2 );
ScDocument* pUndoDoc = NULL;
@@ -577,7 +577,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
// do not touch notes (ScUndoImportData does not support drawing undo)
sal_uInt16 nCopyFlags = IDF_ALL & ~IDF_NOTE;
- // nFormulaCols is set only if column count is unchanged
+ // nFormulaCols is set only if column count is unchanged
pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
nCopyFlags, FALSE, pUndoDoc );
@@ -592,13 +592,13 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
}
//
- // move new data
+ // move new data
//
if (bMoveCells)
{
- // clear only the range without the formulas,
- // so the formula title and first row are preserved
+ // clear only the range without the formulas,
+ // so the formula title and first row are preserved
ScRange aDelRange( rParam.nCol1, rParam.nRow1, nTab,
rParam.nCol2, rParam.nRow2, nTab );
@@ -608,18 +608,18 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
rParam.nCol2+nFormulaCols, rParam.nRow2, nTab );
ScRange aNew( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab );
- pDoc->FitBlock( aOld, aNew, FALSE ); // Formeln nicht loeschen
+ pDoc->FitBlock( aOld, aNew, FALSE ); // Formeln nicht loeschen
}
- else if ( nEndCol < rParam.nCol2 ) // DeleteArea calls PutInOrder
+ else if ( nEndCol < rParam.nCol2 ) // DeleteArea calls PutInOrder
pDoc->DeleteArea( nEndCol+1, rParam.nRow1, rParam.nCol2, rParam.nRow2,
aNewMark, IDF_CONTENTS & ~IDF_NOTE );
- // CopyToDocument doesn't remove contents
+ // CopyToDocument doesn't remove contents
pDoc->DeleteAreaTab( rParam.nCol1, rParam.nRow1, nEndCol, nEndRow, nTab, IDF_CONTENTS & ~IDF_NOTE );
- // #41216# remove each column from ImportDoc after copying to reduce memory usage
+ // #41216# remove each column from ImportDoc after copying to reduce memory usage
BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // outside of the loop
+ pDoc->SetAutoCalc( FALSE ); // outside of the loop
for (SCCOL nCopyCol = rParam.nCol1; nCopyCol <= nEndCol; nCopyCol++)
{
pImportDoc->CopyToDocument( nCopyCol, rParam.nRow1, nTab, nCopyCol, nEndRow, nTab,
@@ -629,9 +629,9 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
}
pDoc->SetAutoCalc( bOldAutoCalc );
- if (nFormulaCols > 0) // copy formulas
+ if (nFormulaCols > 0) // copy formulas
{
- if (bKeepFormat) // formats for formulas
+ if (bKeepFormat) // formats for formulas
pImportDoc->CopyToDocument( nEndCol+1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
IDF_ATTRIB, FALSE, pDoc );
@@ -642,9 +642,9 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
aMark, nEndRow-rParam.nRow1-1, FILL_TO_BOTTOM, FILL_SIMPLE );
}
- // if new range is smaller, clear old contents
+ // if new range is smaller, clear old contents
- if (!bMoveCells) // move has happened above
+ if (!bMoveCells) // move has happened above
{
if ( rParam.nCol2 > nEndCol )
pDoc->DeleteArea( nEndCol+1, rParam.nRow1, rParam.nCol2, rParam.nRow2,
@@ -654,7 +654,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
aNewMark, IDF_CONTENTS );
}
- if( !bAddrInsert ) // update database range
+ if( !bAddrInsert ) // update database range
{
pDBData->SetImportParam( rParam );
pDBData->SetHeader( TRUE );
@@ -669,7 +669,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
ScDocument* pRedoDoc = pImportDoc;
pImportDoc = NULL;
- if (nFormulaCols > 0) // include filled formulas for redo
+ if (nFormulaCols > 0) // include filled formulas for redo
pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
nEndCol+nFormulaCols, nEndRow, nTab,
IDF_ALL & ~IDF_NOTE, FALSE, pRedoDoc );
@@ -693,7 +693,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (pWaitWin)
pWaitWin->LeaveWait();
- if ( bTruncated && !bApi ) // show warning
+ if ( bTruncated && !bApi ) // show warning
ErrorHandler::HandleError(SCWARN_IMPORT_RANGE_OVERFLOW);
}
else if ( !bApi )
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 5a6d55e8f60f..abe1c586d3bb 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.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
@@ -137,14 +137,14 @@ IMPL_LINK( ScDocFunc, NotifyDrawUndo, SdrUndoAction*, pUndoAction )
//------------------------------------------------------------------------
-// Zeile ueber dem Range painten (fuer Linien nach AdjustRowHeight)
+// Zeile ueber dem Range painten (fuer Linien nach AdjustRowHeight)
void lcl_PaintAbove( ScDocShell& rDocShell, const ScRange& rRange )
{
SCROW nRow = rRange.aStart.Row();
if ( nRow > 0 )
{
- SCTAB nTab = rRange.aStart.Tab(); //! alle?
+ SCTAB nTab = rRange.aStart.Tab(); //! alle?
--nRow;
rDocShell.PostPaint( ScRange(0,nRow,nTab, MAXCOL,nRow,nTab), PAINT_GRID );
}
@@ -157,7 +157,7 @@ BOOL ScDocFunc::AdjustRowHeight( const ScRange& rRange, BOOL bPaint )
ScDocument* pDoc = rDocShell.GetDocument();
if ( pDoc->IsImportingXML() )
{
- // for XML import, all row heights are updated together after importing
+ // for XML import, all row heights are updated together after importing
return FALSE;
}
if ( !pDoc->IsAdjustHeightEnabled() )
@@ -481,13 +481,13 @@ BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic )
if (bUndo)
pModel->BeginCalcUndo();
- // Loeschen auf allen Tabellen
+ // Loeschen auf allen Tabellen
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
- ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_ARROWS ); // don't remove circles
+ ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_ARROWS ); // don't remove circles
- // Wiederholen
+ // Wiederholen
USHORT nCount = pList->Count();
for (USHORT i=0; i<nCount; i++)
@@ -528,7 +528,7 @@ BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic )
if (pUndo)
{
pUndo->SetComment( ScGlobal::GetRscString( STR_UNDO_DETREFRESH ) );
- // wenn automatisch, an letzte Aktion anhaengen
+ // wenn automatisch, an letzte Aktion anhaengen
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoDraw( pUndo, &rDocShell ),
bAutomatic );
@@ -608,7 +608,7 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
BOOL bSimple = FALSE;
ScMarkData aMultiMark = rMark;
- aMultiMark.SetMarking(FALSE); // fuer MarkToMulti
+ aMultiMark.SetMarking(FALSE); // fuer MarkToMulti
ScDocument* pUndoDoc = NULL;
BOOL bMulti = !bSimple && aMultiMark.IsMultiMarked();
@@ -635,15 +635,15 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
bObjects = FALSE;
}
- USHORT nExtFlags = 0; // extra flags are needed only if attributes are deleted
+ USHORT nExtFlags = 0; // extra flags are needed only if attributes are deleted
if ( nFlags & IDF_ATTRIB )
rDocShell.UpdatePaintExt( nExtFlags, aMarkRange );
- // Reihenfolge:
- // 1) BeginDrawUndo
- // 2) Objekte loeschen (DrawUndo wird gefuellt)
- // 3) Inhalte fuer Undo kopieren und Undo-Aktion anlegen
- // 4) Inhalte loeschen
+ // Reihenfolge:
+ // 1) BeginDrawUndo
+ // 2) Objekte loeschen (DrawUndo wird gefuellt)
+ // 3) Inhalte fuer Undo kopieren und Undo-Aktion anlegen
+ // 4) Inhalte loeschen
bool bDrawUndo = bObjects || (nFlags & IDF_NOTE);
if (bRecord && bDrawUndo)
@@ -664,21 +664,21 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, aMarkRange.aStart.Tab(), aMarkRange.aEnd.Tab() );
- // bei "Format/Standard" alle Attribute kopieren, weil CopyToDocument
- // nur mit IDF_HARDATTR zu langsam ist:
+ // bei "Format/Standard" alle Attribute kopieren, weil CopyToDocument
+ // nur mit IDF_HARDATTR zu langsam ist:
USHORT nUndoDocFlags = nFlags;
if (nFlags & IDF_ATTRIB)
nUndoDocFlags |= IDF_ATTRIB;
- if (nFlags & IDF_EDITATTR) // Edit-Engine-Attribute
- nUndoDocFlags |= IDF_STRING; // -> Zellen werden geaendert
+ if (nFlags & IDF_EDITATTR) // Edit-Engine-Attribute
+ nUndoDocFlags |= IDF_STRING; // -> Zellen werden geaendert
if (nFlags & IDF_NOTE)
- nUndoDocFlags |= IDF_CONTENTS; // #68795# copy all cells with their notes
+ nUndoDocFlags |= IDF_CONTENTS; // #68795# copy all cells with their notes
// note captions are handled in drawing undo
nUndoDocFlags |= IDF_NOCAPTIONS;
pDoc->CopyToDocument( aExtendedRange, nUndoDocFlags, bMulti, pUndoDoc, &aMultiMark );
}
-//! HideAllCursors(); // falls Zusammenfassung aufgehoben wird
+//! HideAllCursors(); // falls Zusammenfassung aufgehoben wird
if (bSimple)
pDoc->DeleteArea( aMarkRange.aStart.Col(), aMarkRange.aStart.Row(),
aMarkRange.aEnd.Col(), aMarkRange.aEnd.Row(),
@@ -698,12 +698,12 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
if (!AdjustRowHeight( aExtendedRange ))
rDocShell.PostPaint( aExtendedRange, PAINT_GRID, nExtFlags );
else if (nExtFlags & SC_PF_LINES)
- lcl_PaintAbove( rDocShell, aExtendedRange ); // fuer Linien ueber dem Bereich
+ lcl_PaintAbove( rDocShell, aExtendedRange ); // fuer Linien ueber dem Bereich
-// rDocShell.UpdateOle(GetViewData()); //! an der View?
+// rDocShell.UpdateOle(GetViewData()); //! an der View?
aModificator.SetDocumentModified();
-//! CellContentChanged();
-//! ShowAllCursors();
+//! CellContentChanged();
+//! ShowAllCursors();
return TRUE;
}
@@ -729,7 +729,7 @@ BOOL ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
ScRange aMarkRange;
ScMarkData aMultiMark = rMark;
- aMultiMark.SetMarking(FALSE); // for MarkToMulti
+ aMultiMark.SetMarking(FALSE); // for MarkToMulti
aMultiMark.MarkToMulti();
aMultiMark.GetMultiMarkArea( aMarkRange );
@@ -789,7 +789,7 @@ BOOL ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, BOO
{
pTabs = new SCTAB[1];
pTabs[0] = rPos.Tab();
- ppOldCells = new ScBaseCell*[1];
+ ppOldCells = new ScBaseCell*[1];
ppOldCells[0] = pDocCell ? pDocCell->CloneWithoutNote( *pDoc ) : 0;
pHasFormat = new BOOL[1];
@@ -810,7 +810,7 @@ BOOL ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, BOO
if (bUndo)
{
- // wegen ChangeTracking darf UndoAction erst nach SetString angelegt werden
+ // wegen ChangeTracking darf UndoAction erst nach SetString angelegt werden
rDocShell.GetUndoManager()->AddUndoAction(new ScUndoEnterData( &rDocShell, rPos.Col(),rPos.Row(),rPos.Tab(), 1,pTabs,
ppOldCells, pHasFormat, pOldFormats, rText, NULL ) );
}
@@ -859,7 +859,7 @@ BOOL ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi
pDoc->PutCell( rPos, pNewCell );
- // wegen ChangeTracking darf UndoAction erst nach PutCell angelegt werden
+ // wegen ChangeTracking darf UndoAction erst nach PutCell angelegt werden
if (bUndo)
{
rDocShell.GetUndoManager()->AddUndoAction(
@@ -903,8 +903,8 @@ void ScDocFunc::NotifyInputHandler( const ScAddress& /* rPos */ )
struct ScMyRememberItem
{
- USHORT nIndex;
- SfxItemSet aItemSet;
+ USHORT nIndex;
+ SfxItemSet aItemSet;
ScMyRememberItem(const SfxItemSet& rItemSet, USHORT nTempIndex) :
nIndex(nTempIndex), aItemSet(rItemSet) {}
@@ -914,7 +914,7 @@ void ScDocFunc::NotifyInputHandler( const ScAddress& /* rPos */ )
BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, BOOL bInterpret, BOOL bApi )
{
- // PutData ruft PutCell oder SetNormalString
+ // PutData ruft PutCell oder SetNormalString
BOOL bRet = FALSE;
ScDocument* pDoc = rDocShell.GetDocument();
@@ -934,10 +934,10 @@ BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
ScMyRememberItemList aRememberItems;
ScMyRememberItem* pRememberItem = NULL;
- // All paragraph attributes must be removed before calling CreateTextObject,
- // not only alignment, so the object doesn't contain the cell attributes as
- // paragraph attributes. Before remove the attributes store they in a list to
- // set they back to the EditEngine.
+ // All paragraph attributes must be removed before calling CreateTextObject,
+ // not only alignment, so the object doesn't contain the cell attributes as
+ // paragraph attributes. Before remove the attributes store they in a list to
+ // set they back to the EditEngine.
USHORT nCount = rEngine.GetParagraphCount();
for (USHORT i=0; i<nCount; i++)
{
@@ -992,7 +992,7 @@ BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
ScPatternAttr aPattern( pDoc->GetPool() );
aPattern.GetFromEditItemSet( &rEditAttr );
aPattern.DeleteUnchanged( pDoc->GetPattern( rPos.Col(), rPos.Row(), rPos.Tab() ) );
- aPattern.GetItemSet().ClearItem( ATTR_HOR_JUSTIFY ); // wasn't removed above if no edit object
+ aPattern.GetItemSet().ClearItem( ATTR_HOR_JUSTIFY ); // wasn't removed above if no edit object
if ( aPattern.GetItemSet().Count() > 0 )
{
ScMarkData aMark;
@@ -1026,7 +1026,7 @@ ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos,
{
ScTokenArray* pCode;
if ( pDoc->IsImportingXML() )
- { // temporary formula string as string tokens
+ { // temporary formula string as string tokens
pCode = lcl_ScDocFunc_CreateTokenArrayXML( rText, rFormulaNmsp, eGrammar );
pDoc->IncXMLImportedFormulaCount( rText.Len() );
}
@@ -1037,15 +1037,15 @@ ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos,
pCode = aComp.CompileString( rText );
}
pNewCell = new ScFormulaCell( pDoc, rPos, pCode, eGrammar, MM_NONE );
- delete pCode; // Zell-ctor hat das TokenArray kopiert
+ delete pCode; // Zell-ctor hat das TokenArray kopiert
}
else if ( rText.Len() > 1 && rText.GetChar(0) == '\'' )
{
- // for bEnglish, "'" at the beginning is always interpreted as text
- // marker and stripped
+ // for bEnglish, "'" at the beginning is always interpreted as text
+ // marker and stripped
pNewCell = ScBaseCell::CreateTextCell( rText.Copy( 1 ), pDoc );
}
- else // (nur) auf englisches Zahlformat testen
+ else // (nur) auf englisches Zahlformat testen
{
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
sal_uInt32 nEnglish = pFormatter->GetStandardIndex(LANGUAGE_ENGLISH_US);
@@ -1055,8 +1055,8 @@ ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos,
else if ( rText.Len() )
pNewCell = ScBaseCell::CreateTextCell( rText, pDoc );
- // das (englische) Zahlformat wird nicht gesetzt
- //! passendes lokales Format suchen und setzen???
+ // das (englische) Zahlformat wird nicht gesetzt
+ //! passendes lokales Format suchen und setzen???
}
return pNewCell;
@@ -1067,7 +1067,7 @@ BOOL ScDocFunc::SetCellText( const ScAddress& rPos, const String& rText,
BOOL bInterpret, BOOL bEnglish, BOOL bApi,
const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar )
{
- // SetCellText ruft PutCell oder SetNormalString
+ // SetCellText ruft PutCell oder SetNormalString
ScDocument* pDoc = rDocShell.GetDocument();
ScBaseCell* pNewCell = NULL;
@@ -1079,8 +1079,8 @@ BOOL ScDocFunc::SetCellText( const ScAddress& rPos, const String& rText,
if (bApi)
pExtRefGuard.reset(new ScExternalRefManager::ApiGuard(pDoc));
- // code moved to own method InterpretEnglishString because it is also used in
- // ScCellRangeObj::setFormulaArray
+ // code moved to own method InterpretEnglishString because it is also used in
+ // ScCellRangeObj::setFormulaArray
pNewCell = InterpretEnglishString( rPos, rText, rFormulaNmsp, eGrammar );
}
@@ -1089,7 +1089,7 @@ BOOL ScDocFunc::SetCellText( const ScAddress& rPos, const String& rText,
else if ( rText.Len() )
{
OSL_ENSURE( rFormulaNmsp.Len() == 0, "ScDocFunc::SetCellText - formula namespace, but do not interpret?" );
- pNewCell = ScBaseCell::CreateTextCell( rText, pDoc ); // immer Text
+ pNewCell = ScBaseCell::CreateTextCell( rText, pDoc ); // immer Text
}
if (pNewCell)
@@ -1135,12 +1135,12 @@ bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, BOOL bA
}
String aNewText = rText;
- aNewText.ConvertLineEnd(); //! ist das noetig ???
+ aNewText.ConvertLineEnd(); //! ist das noetig ???
if( ScPostIt* pNote = (aNewText.Len() > 0) ? pDoc->GetOrCreateNote( rPos ) : pDoc->GetNote( rPos ) )
pNote->SetText( rPos, aNewText );
- //! Undo !!!
+ //! Undo !!!
if (pDoc->IsStreamValid(rPos.Tab()))
pDoc->SetStreamValid(rPos.Tab(), FALSE);
@@ -1236,7 +1236,7 @@ BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r
ScDocShellModificator aModificator( rDocShell );
- //! Umrandung
+ //! Umrandung
ScRange aMultiRange;
BOOL bMulti = rMark.IsMultiMarked();
@@ -1262,15 +1262,15 @@ BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r
// While loading XML it is not neccessary to ask HasAttrib. It needs too much time.
USHORT nExtFlags = 0;
if ( !bImportingXML )
- rDocShell.UpdatePaintExt( nExtFlags, aMultiRange ); // content before the change
+ rDocShell.UpdatePaintExt( nExtFlags, aMultiRange ); // content before the change
pDoc->ApplySelectionPattern( rPattern, rMark );
if ( !bImportingXML )
- rDocShell.UpdatePaintExt( nExtFlags, aMultiRange ); // content after the change
+ rDocShell.UpdatePaintExt( nExtFlags, aMultiRange ); // content after the change
if (!AdjustRowHeight( aMultiRange ))
rDocShell.PostPaint( aMultiRange, PAINT_GRID, nExtFlags );
else if (nExtFlags & SC_PF_LINES)
- lcl_PaintAbove( rDocShell, aMultiRange ); // fuer Linien ueber dem Bereich
+ lcl_PaintAbove( rDocShell, aMultiRange ); // fuer Linien ueber dem Bereich
aModificator.SetDocumentModified();
@@ -1332,19 +1332,19 @@ BOOL ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
}
-// BOOL bPaintExt = pDoc->HasAttrib( aMultiRange, HASATTR_PAINTEXT );
-// pDoc->ApplySelectionPattern( rPattern, rMark );
+// BOOL bPaintExt = pDoc->HasAttrib( aMultiRange, HASATTR_PAINTEXT );
+// pDoc->ApplySelectionPattern( rPattern, rMark );
pDoc->ApplySelectionStyle( (ScStyleSheet&)*pStyleSheet, rMark );
-// if (!bPaintExt)
-// bPaintExt = pDoc->HasAttrib( aMultiRange, HASATTR_PAINTEXT );
-// USHORT nExtFlags = bPaintExt ? SC_PF_LINES : 0;
+// if (!bPaintExt)
+// bPaintExt = pDoc->HasAttrib( aMultiRange, HASATTR_PAINTEXT );
+// USHORT nExtFlags = bPaintExt ? SC_PF_LINES : 0;
USHORT nExtFlags = 0;
if (!AdjustRowHeight( aMultiRange ))
rDocShell.PostPaint( aMultiRange, PAINT_GRID, nExtFlags );
else if (nExtFlags & SC_PF_LINES)
- lcl_PaintAbove( rDocShell, aMultiRange ); // fuer Linien ueber dem Bereich
+ lcl_PaintAbove( rDocShell, aMultiRange ); // fuer Linien ueber dem Bereich
aModificator.SetDocumentModified();
@@ -1423,7 +1423,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
SCTAB nSelCount = aMark.GetSelectCount();
- // zugehoerige Szenarien auch anpassen
+ // zugehoerige Szenarien auch anpassen
// Test zusammengefasste
SCCOL nMergeTestStartX = nStartCol;
@@ -1470,7 +1470,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
return FALSE;
}
- WaitObject aWait( rDocShell.GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
+ WaitObject aWait( rDocShell.GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
ScDocument* pRefUndoDoc = NULL;
ScRefUndoData* pUndoData = NULL;
@@ -1742,7 +1742,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
AdjustRowHeight(ScRange(0, nPaintStartY, i, MAXCOL, nPaintEndY, i+nScenarioCount ));
if (bAdjusted)
{
- // paint only what is not done by AdjustRowHeight
+ // paint only what is not done by AdjustRowHeight
if (nPaintFlags & PAINT_TOP)
rDocShell.PostPaint( nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i+nScenarioCount, PAINT_TOP );
}
@@ -1780,7 +1780,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
delete pRefUndoDoc;
delete pUndoData;
if (!bApi)
- rDocShell.ErrorMessage(STR_INSERT_FULL); // Spalte/Zeile voll
+ rDocShell.ErrorMessage(STR_INSERT_FULL); // Spalte/Zeile voll
}
aModificator.SetDocumentModified();
@@ -2039,10 +2039,10 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
}
//
- // ausfuehren
+ // ausfuehren
//
- WaitObject aWait( rDocShell.GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
+ WaitObject aWait( rDocShell.GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
ScDocument* pUndoDoc = NULL;
ScDocument* pRefUndoDoc = NULL;
@@ -2113,7 +2113,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
break;
}
- //! Test, ob Outline in Groesse geaendert
+ //! Test, ob Outline in Groesse geaendert
if ( bRecord )
{
@@ -2121,10 +2121,10 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
if( aFullMark.GetTableSelect( i ) )
pRefUndoDoc->DeleteAreaTab(nUndoStartX,nUndoStartY,nUndoEndX,nUndoEndY, i, IDF_ALL);
- // alle Tabellen anlegen, damit Formeln kopiert werden koennen:
+ // alle Tabellen anlegen, damit Formeln kopiert werden koennen:
pUndoDoc->AddUndoTab( 0, nTabCount-1, FALSE, FALSE );
- // kopieren mit bColRowFlags=FALSE (#54194#)
+ // kopieren mit bColRowFlags=FALSE (#54194#)
pRefUndoDoc->CopyToDocument(0,0,0,MAXCOL,MAXROW,MAXTAB,IDF_FORMULA,FALSE,pUndoDoc,NULL,FALSE);
delete pRefUndoDoc;
@@ -2252,12 +2252,12 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ )
nScenarioCount ++;
- // ganze Zeilen loeschen: nichts anpassen
+ // ganze Zeilen loeschen: nichts anpassen
if ( eCmd == DEL_DELROWS || !AdjustRowHeight(ScRange( 0, nPaintStartY, i, MAXCOL, nPaintEndY, i+nScenarioCount )) )
rDocShell.PostPaint( nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i+nScenarioCount, nPaintFlags, nExtFlags );
else
{
- // paint only what is not done by AdjustRowHeight
+ // paint only what is not done by AdjustRowHeight
if (nExtFlags & SC_PF_LINES)
lcl_PaintAbove( rDocShell, ScRange( nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i+nScenarioCount) );
if (nPaintFlags & PAINT_TOP)
@@ -2293,7 +2293,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
return FALSE;
}
- // zugehoerige Szenarien auch anpassen - nur wenn innerhalb einer Tabelle verschoben wird!
+ // zugehoerige Szenarien auch anpassen - nur wenn innerhalb einer Tabelle verschoben wird!
BOOL bScenariosAdded = FALSE;
ScDocument* pDoc = rDocShell.GetDocument();
if (bRecord && !pDoc->IsUndoEnabled())
@@ -2315,13 +2315,13 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
ScMarkData aSourceMark;
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
- aSourceMark.SelectTable( nTab, TRUE ); // Source selektieren
+ aSourceMark.SelectTable( nTab, TRUE ); // Source selektieren
aSourceMark.SetMarkArea( rSource );
ScDocShellRef aDragShellRef;
if ( pDoc->HasOLEObjectsInArea( rSource ) )
{
- aDragShellRef = new ScDocShell; // DocShell needs a Ref immediately
+ aDragShellRef = new ScDocShell; // DocShell needs a Ref immediately
aDragShellRef->DoInitNew(NULL);
}
ScDrawLayer::SetGlobalDrawPersist(aDragShellRef);
@@ -2347,13 +2347,13 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
SCCOL nDestEndCol = nDestCol + ( nOldEndCol-nStartCol );
SCROW nDestEndRow = nDestRow + ( nOldEndRow-nStartRow );
- SCCOL nUndoEndCol = nDestCol + ( nEndCol-nStartCol ); // erweitert im Zielblock
+ SCCOL nUndoEndCol = nDestCol + ( nEndCol-nStartCol ); // erweitert im Zielblock
SCROW nUndoEndRow = nDestRow + ( nEndRow-nStartRow );
BOOL bIncludeFiltered = bCut;
if ( !bIncludeFiltered )
{
- // adjust sizes to include only non-filtered rows
+ // adjust sizes to include only non-filtered rows
SCCOL nClipX;
SCROW nClipY;
@@ -2371,7 +2371,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
return FALSE;
}
- // Test auf Zellschutz
+ // Test auf Zellschutz
ScEditableTester aTester;
for (nTab=nDestTab; nTab<=nDestEndTab; nTab++)
@@ -2388,19 +2388,19 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
return FALSE;
}
- // Test auf zusammengefasste - beim Verschieben erst nach dem Loeschen
+ // Test auf zusammengefasste - beim Verschieben erst nach dem Loeschen
if (bClipOver && !bCut)
if (pDoc->HasAttrib( nDestCol,nDestRow,nDestTab, nUndoEndCol,nUndoEndRow,nDestEndTab,
HASATTR_MERGED | HASATTR_OVERLAPPED ))
- { // "Zusammenfassen nicht verschachteln !"
+ { // "Zusammenfassen nicht verschachteln !"
if (!bApi)
rDocShell.ErrorMessage(STR_MSSG_MOVEBLOCKTO_0);
delete pClipDoc;
return FALSE;
}
- // Are there borders in the cells? (for painting)
+ // Are there borders in the cells? (for painting)
USHORT nSourceExt = 0;
rDocShell.UpdatePaintExt( nSourceExt, nStartCol,nStartRow,nStartTab, nEndCol,nEndRow,nEndTab );
@@ -2408,7 +2408,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
rDocShell.UpdatePaintExt( nDestExt, nDestCol,nDestRow,nDestTab, nDestEndCol,nDestEndRow,nDestEndTab );
//
- // ausfuehren
+ // ausfuehren
//
ScDocument* pUndoDoc = NULL;
@@ -2442,10 +2442,10 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
pDoc->BeginDrawUndo();
}
- BOOL bSourceHeight = FALSE; // Hoehen angepasst?
+ BOOL bSourceHeight = FALSE; // Hoehen angepasst?
if (bCut)
{
- ScMarkData aDelMark; // only for tables
+ ScMarkData aDelMark; // only for tables
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
{
pDoc->DeleteAreaTab( nStartCol,nStartRow, nOldEndCol,nOldEndRow, nTab, IDF_ALL );
@@ -2453,7 +2453,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
}
pDoc->DeleteObjectsInArea( nStartCol,nStartRow, nOldEndCol,nOldEndRow, aDelMark );
- // Test auf zusammengefasste
+ // Test auf zusammengefasste
if (bClipOver)
if (pDoc->HasAttrib( nDestCol,nDestRow,nDestTab,
@@ -2468,8 +2468,8 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
pDoc->ExtendMerge( nStartCol, nStartRow, nTmpEndCol, nTmpEndRow, nTab, TRUE );
}
- // Fehlermeldung erst nach dem Wiederherstellen des Inhalts
- if (!bApi) // "Zusammenfassen nicht verschachteln !"
+ // Fehlermeldung erst nach dem Wiederherstellen des Inhalts
+ if (!bApi) // "Zusammenfassen nicht verschachteln !"
rDocShell.ErrorMessage(STR_MSSG_MOVEBLOCKTO_0);
delete pUndoDoc;
@@ -2486,7 +2486,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
ScMarkData aDestMark;
for (nTab=nDestTab; nTab<=nDestEndTab; nTab++)
- aDestMark.SelectTable( nTab, TRUE ); // Destination selektieren
+ aDestMark.SelectTable( nTab, TRUE ); // Destination selektieren
aDestMark.SetMarkArea( aPasteDest );
/* Do not copy cell notes and drawing objects here. While pasting, the
@@ -2521,11 +2521,11 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
{
if (pRefUndoDoc)
{
- // alle Tabellen anlegen, damit Formeln kopiert werden koennen:
+ // alle Tabellen anlegen, damit Formeln kopiert werden koennen:
pUndoDoc->AddUndoTab( 0, nTabCount-1, FALSE, FALSE );
pRefUndoDoc->DeleteArea( nDestCol, nDestRow, nDestEndCol, nDestEndRow, aSourceMark, IDF_ALL );
- // kopieren mit bColRowFlags=FALSE (#54194#)
+ // kopieren mit bColRowFlags=FALSE (#54194#)
pRefUndoDoc->CopyToDocument( 0, 0, 0, MAXCOL, MAXROW, MAXTAB,
IDF_FORMULA, FALSE, pUndoDoc, NULL, FALSE );
delete pRefUndoDoc;
@@ -2556,7 +2556,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if (bPaint)
{
- // Zielbereich:
+ // Zielbereich:
SCCOL nPaintStartX = nDestCol;
SCROW nPaintStartY = nDestRow;
@@ -2564,7 +2564,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
SCROW nPaintEndY = nDestPaintEndRow;
USHORT nFlags = PAINT_GRID;
- if ( nStartRow==0 && nEndRow==MAXROW ) // Breiten mitkopiert?
+ if ( nStartRow==0 && nEndRow==MAXROW ) // Breiten mitkopiert?
{
nPaintEndX = MAXCOL;
nPaintStartY = 0;
@@ -2591,7 +2591,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
if ( bCut )
{
- // Quellbereich:
+ // Quellbereich:
nPaintStartX = nStartCol;
nPaintStartY = nStartRow;
@@ -2635,8 +2635,8 @@ uno::Reference< uno::XInterface > GetDocModuleObject( SfxObjectShell& rDocSh, St
uno::Reference< uno::XInterface > xDocModuleApiObject;
if ( xSF.is() )
{
- xVBACodeNamedObjectAccess.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider"))), uno::UNO_QUERY );
- xDocModuleApiObject.set( xVBACodeNamedObjectAccess->getByName( sCodeName ), uno::UNO_QUERY );
+ xVBACodeNamedObjectAccess.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider"))), uno::UNO_QUERY );
+ xDocModuleApiObject.set( xVBACodeNamedObjectAccess->getByName( sCodeName ), uno::UNO_QUERY );
}
return xDocModuleApiObject;
@@ -2671,7 +2671,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
// if the Module with codename exists then find a new name
sal_Int32 nNum = 0;
String genModuleName;
- if ( sModuleName.Len() )
+ if ( sModuleName.Len() )
sModuleName = sModuleName;
else
{
@@ -2680,7 +2680,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
}
while( xLib->hasByName( genModuleName ) )
genModuleName = rtl::OUString::createFromAscii( "Sheet" ) + rtl::OUString::valueOf( ++nNum );
-
+
uno::Any aSourceAny;
rtl::OUString sTmpSource = sSource;
if ( sTmpSource.getLength() == 0 )
@@ -2739,7 +2739,7 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL
// Strange loop, also basic is loaded too early ( InsertTable )
- // is called via the xml import for sheets in described in odf
+ // is called via the xml import for sheets in described in odf
BOOL bInsertDocModule = false;
if( !rDocShell.GetDocument()->IsImportingXML() )
@@ -2750,12 +2750,12 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL
bRecord = FALSE;
if (bRecord)
- pDoc->BeginDrawUndo(); // InsertTab erzeugt ein SdrUndoNewPage
+ pDoc->BeginDrawUndo(); // InsertTab erzeugt ein SdrUndoNewPage
SCTAB nTabCount = pDoc->GetTableCount();
BOOL bAppend = ( nTab >= nTabCount );
if ( bAppend )
- nTab = nTabCount; // wichtig fuer Undo
+ nTab = nTabCount; // wichtig fuer Undo
if (pDoc->InsertTab( nTab, rName ))
{
@@ -2763,7 +2763,7 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL
if (bRecord)
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoInsertTab( &rDocShell, nTab, bAppend, rName));
- // Views updaten:
+ // Views updaten:
// Only insert vba modules if vba mode ( and not currently importing XML )
if( bInsertDocModule )
{
@@ -2804,8 +2804,8 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
SCTAB nCount = pDoc->GetTableCount();
- pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); // nur nTab mit Flags
- pUndoDoc->AddUndoTab( 0, nCount-1 ); // alle Tabs fuer Referenzen
+ pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); // nur nTab mit Flags
+ pUndoDoc->AddUndoTab( 0, nCount-1 ); // alle Tabs fuer Referenzen
pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,FALSE, pUndoDoc );
String aOldName;
@@ -2832,8 +2832,8 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
pUndoDoc->SetTabBgColor( nTab, pDoc->GetTabBgColor(nTab) );
pUndoDoc->SetSheetEvents( nTab, pDoc->GetSheetEvents( nTab ) );
- // Drawing-Layer muss sein Undo selbst in der Hand behalten !!!
- pDoc->BeginDrawUndo(); // DeleteTab erzeugt ein SdrUndoDelPage
+ // Drawing-Layer muss sein Undo selbst in der Hand behalten !!!
+ pDoc->BeginDrawUndo(); // DeleteTab erzeugt ein SdrUndoDelPage
pUndoData = new ScRefUndoData( pDoc );
}
@@ -2849,7 +2849,7 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoDeleteTab( &rDocShell, theTabs, pUndoDoc, pUndoData ));
}
- // Views updaten:
+ // Views updaten:
if( bVbaEnabled )
{
if( bHasCodeName )
@@ -2861,7 +2861,7 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
if (bWasLinked)
{
- rDocShell.UpdateLinks(); // Link-Manager updaten
+ rDocShell.UpdateLinks(); // Link-Manager updaten
SfxBindings* pBindings = rDocShell.GetViewBindings();
if (pBindings)
pBindings->Invalidate(SID_LINKS);
@@ -2890,7 +2890,7 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi )
ScDocument* pDoc = rDocShell.GetDocument();
BOOL bUndo(pDoc->IsUndoEnabled());
if ( pDoc->IsVisible( nTab ) == bVisible )
- return TRUE; // nichts zu tun - ok
+ return TRUE; // nichts zu tun - ok
if ( !pDoc->IsDocEditable() )
{
@@ -2903,7 +2903,7 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi )
if ( !bVisible && !pDoc->IsImportingXML() ) // #i57869# allow hiding in any order for loading
{
- // nicht alle Tabellen ausblenden
+ // nicht alle Tabellen ausblenden
USHORT nVisCount = 0;
SCTAB nCount = pDoc->GetTableCount();
@@ -2914,7 +2914,7 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi )
if (nVisCount <= 1)
{
if (!bApi)
- rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung?
+ rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung?
return FALSE;
}
}
@@ -2923,7 +2923,7 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi )
if (bUndo)
rDocShell.GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( &rDocShell, nTab, bVisible ) );
- // Views updaten:
+ // Views updaten:
if (!bVisible)
rDocShell.Broadcast( ScTablesHint( SC_TAB_HIDDEN, nTab ) );
@@ -2939,9 +2939,9 @@ BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ )
ScDocument* pDoc = rDocShell.GetDocument();
BOOL bUndo(pDoc->IsUndoEnabled());
if ( pDoc->IsLayoutRTL( nTab ) == bRTL )
- return TRUE; // nothing to do - ok
+ return TRUE; // nothing to do - ok
- //! protection (sheet or document?)
+ //! protection (sheet or document?)
ScDocShellModificator aModificator( rDocShell );
@@ -3098,17 +3098,17 @@ bool ScDocFunc::SetTabBgColor(
//------------------------------------------------------------------------
-//! SetWidthOrHeight - noch doppelt zu ViewFunc !!!!!!
-//! Probleme:
-//! - Optimale Hoehe fuer Edit-Zellen ist unterschiedlich zwischen Drucker und Bildschirm
-//! - Optimale Breite braucht Selektion, um evtl. nur selektierte Zellen zu beruecksichtigen
+//! SetWidthOrHeight - noch doppelt zu ViewFunc !!!!!!
+//! Probleme:
+//! - Optimale Hoehe fuer Edit-Zellen ist unterschiedlich zwischen Drucker und Bildschirm
+//! - Optimale Breite braucht Selektion, um evtl. nur selektierte Zellen zu beruecksichtigen
USHORT lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCTAB nTab, BOOL bFormula )
{
USHORT nTwips = 0;
ScSizeDeviceProvider aProv(&rDocShell);
- OutputDevice* pDev = aProv.GetDevice(); // has pixel MapMode
+ OutputDevice* pDev = aProv.GetDevice(); // has pixel MapMode
double nPPTX = aProv.GetPPTX();
double nPPTY = aProv.GetPPTY();
@@ -3135,7 +3135,7 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
if ( !pDoc->IsChangeReadOnlyEnabled() && !rDocShell.IsEditable() )
{
if (!bApi)
- rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung?
+ rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung?
return FALSE;
}
@@ -3146,16 +3146,16 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
BOOL bFormula = FALSE;
if ( eMode == SC_SIZE_OPTIMAL )
{
- //! Option "Formeln anzeigen" - woher nehmen?
+ //! Option "Formeln anzeigen" - woher nehmen?
}
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = NULL;
ScOutlineTable* pUndoTab = NULL;
- SCCOLROW* pUndoRanges = NULL;
+ SCCOLROW* pUndoRanges = NULL;
if ( bRecord )
{
- pDoc->BeginDrawUndo(); // Drawing Updates
+ pDoc->BeginDrawUndo(); // Drawing Updates
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
if (bWidth)
@@ -3180,21 +3180,21 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
BOOL bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT;
BOOL bOutline = FALSE;
- pDoc->IncSizeRecalcLevel( nTab ); // nicht fuer jede Spalte einzeln
+ pDoc->IncSizeRecalcLevel( nTab ); // nicht fuer jede Spalte einzeln
for (SCCOLROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++)
{
SCCOLROW nStartNo = *(pRanges++);
SCCOLROW nEndNo = *(pRanges++);
- if ( !bWidth ) // Hoehen immer blockweise
+ if ( !bWidth ) // Hoehen immer blockweise
{
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
{
BOOL bAll = ( eMode==SC_SIZE_OPTIMAL );
if (!bAll)
{
- // fuer alle eingeblendeten CR_MANUALSIZE loeschen,
- // dann SetOptimalHeight mit bShrink = FALSE
+ // fuer alle eingeblendeten CR_MANUALSIZE loeschen,
+ // dann SetOptimalHeight mit bShrink = FALSE
for (SCROW nRow=nStartNo; nRow<=nEndNo; nRow++)
{
BYTE nOld = pDoc->GetRowFlags(nRow,nTab);
@@ -3213,15 +3213,15 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
if (bAll)
pDoc->ShowRows( nStartNo, nEndNo, nTab, TRUE );
- // Manual-Flag wird bei bAll=TRUE schon in SetOptimalHeight gesetzt
- // (an bei Extra-Height, sonst aus).
+ // Manual-Flag wird bei bAll=TRUE schon in SetOptimalHeight gesetzt
+ // (an bei Extra-Height, sonst aus).
}
else if ( eMode==SC_SIZE_DIRECT || eMode==SC_SIZE_ORIGINAL )
{
if (nSizeTwips)
{
pDoc->SetRowHeightRange( nStartNo, nEndNo, nTab, nSizeTwips );
- pDoc->SetManualHeight( nStartNo, nEndNo, nTab, TRUE ); // height was set manually
+ pDoc->SetManualHeight( nStartNo, nEndNo, nTab, TRUE ); // height was set manually
}
if ( eMode != SC_SIZE_ORIGINAL )
pDoc->ShowRows( nStartNo, nEndNo, nTab, nSizeTwips != 0 );
@@ -3231,7 +3231,7 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
pDoc->ShowRows( nStartNo, nEndNo, nTab, TRUE );
}
}
- else // Spaltenbreiten
+ else // Spaltenbreiten
{
for (SCCOL nCol=static_cast<SCCOL>(nStartNo); nCol<=static_cast<SCCOL>(nEndNo); nCol++)
{
@@ -3252,7 +3252,7 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
}
}
- // adjust outlines
+ // adjust outlines
if ( eMode != SC_SIZE_ORIGINAL )
{
@@ -3266,7 +3266,7 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa
static_cast<SCROW>(nEndNo), nTab, bShow );
}
}
- pDoc->DecSizeRecalcLevel( nTab ); // nicht fuer jede Spalte einzeln
+ pDoc->DecSizeRecalcLevel( nTab ); // nicht fuer jede Spalte einzeln
if (!bOutline)
DELETEZ(pUndoTab);
@@ -3304,10 +3304,10 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
SCCOLROW nPos = bColumn ? static_cast<SCCOLROW>(rPos.Col()) :
static_cast<SCCOLROW>(rPos.Row());
if (nPos == 0)
- return FALSE; // erste Spalte / Zeile
+ return FALSE; // erste Spalte / Zeile
- ScBreakType nBreak = bColumn ?
- pDoc->HasColBreak(static_cast<SCCOL>(nPos), nTab) :
+ ScBreakType nBreak = bColumn ?
+ pDoc->HasColBreak(static_cast<SCCOL>(nPos), nTab) :
pDoc->HasRowBreak(static_cast<SCROW>(nPos), nTab);
if (nBreak & BREAK_MANUAL)
return true;
@@ -3588,17 +3588,17 @@ BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL
return FALSE;
}
- // #i12940# ClearItems is called (from setPropertyToDefault) directly with uno object's cached
- // MarkData (GetMarkData), so rMark must be changed to multi selection for ClearSelectionItems
- // here.
+ // #i12940# ClearItems is called (from setPropertyToDefault) directly with uno object's cached
+ // MarkData (GetMarkData), so rMark must be changed to multi selection for ClearSelectionItems
+ // here.
ScRange aMarkRange;
ScMarkData aMultiMark = rMark;
- aMultiMark.SetMarking(FALSE); // for MarkToMulti
+ aMultiMark.SetMarking(FALSE); // for MarkToMulti
aMultiMark.MarkToMulti();
aMultiMark.GetMultiMarkArea( aMarkRange );
-// if (bRecord)
+// if (bRecord)
if (bUndo)
{
SCTAB nStartTab = aMarkRange.aStart.Tab();
@@ -3617,7 +3617,7 @@ BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL
rDocShell.PostPaint( aMarkRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
aModificator.SetDocumentModified();
- //! Bindings-Invalidate etc.?
+ //! Bindings-Invalidate etc.?
return TRUE;
}
@@ -3639,7 +3639,7 @@ BOOL ScDocFunc::ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bAp
ScRange aMarkRange;
rMark.GetMultiMarkArea( aMarkRange );
-// if (bRecord)
+// if (bRecord)
if (bUndo)
{
SCTAB nStartTab = aMarkRange.aStart.Tab();
@@ -3668,7 +3668,7 @@ BOOL ScDocFunc::ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bAp
SfxBindings* pBindings = rDocShell.GetViewBindings();
if (pBindings)
{
- pBindings->Invalidate( SID_ALIGNLEFT ); // ChangeIndent setzt auf links
+ pBindings->Invalidate( SID_ALIGNLEFT ); // ChangeIndent setzt auf links
pBindings->Invalidate( SID_ALIGNRIGHT );
pBindings->Invalidate( SID_ALIGNBLOCK );
pBindings->Invalidate( SID_ALIGNCENTERHOR );
@@ -3744,7 +3744,7 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
if (bSize)
{
-/* SCCOL nCols[2];
+/* SCCOL nCols[2];
nCols[0] = nStartCol;
nCols[1] = nEndCol;
SCROW nRows[2];
@@ -3779,7 +3779,7 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
}
}
- if ( bRecord ) // Draw-Undo erst jetzt verfuegbar
+ if ( bRecord ) // Draw-Undo erst jetzt verfuegbar
{
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoAutoFormat( &rDocShell, rRange, pUndoDoc, aMark, bSize, nFormatNo ) );
@@ -3827,10 +3827,10 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
WaitObject aWait( rDocShell.GetActiveDialogParent() );
ScDocument* pUndoDoc = NULL;
-// if (bRecord) // immer
+// if (bRecord) // immer
if (bUndo)
{
- //! auch bei Undo selektierte Tabellen beruecksichtigen
+ //! auch bei Undo selektierte Tabellen beruecksichtigen
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab );
pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
@@ -3863,15 +3863,15 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
pDoc->InsertMatrixFormula( nStartCol, nStartRow, nEndCol, nEndRow,
aMark, rString, NULL, eGrammar);
-// if (bRecord) // immer
+// if (bRecord) // immer
if (bUndo)
{
- //! auch bei Undo selektierte Tabellen beruecksichtigen
+ //! auch bei Undo selektierte Tabellen beruecksichtigen
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoEnterMatrix( &rDocShell, rRange, pUndoDoc, rString ) );
}
- // Err522 beim Paint von DDE-Formeln werden jetzt beim Interpretieren abgefangen
+ // Err522 beim Paint von DDE-Formeln werden jetzt beim Interpretieren abgefangen
rDocShell.PostPaint( nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab, PAINT_GRID );
aModificator.SetDocumentModified();
@@ -3918,7 +3918,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
pDoc->SetDirty( rRange );
if ( bRecord )
{
- //! auch bei Undo selektierte Tabellen beruecksichtigen
+ //! auch bei Undo selektierte Tabellen beruecksichtigen
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab );
pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc );
@@ -4036,7 +4036,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
nCount, eDir, FILL_SIMPLE );
AdjustRowHeight(rRange);
- if ( bRecord ) // Draw-Undo erst jetzt verfuegbar
+ if ( bRecord ) // Draw-Undo erst jetzt verfuegbar
{
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoAutoFill( &rDocShell, aDestArea, aSourceArea, pUndoDoc, aMark,
@@ -4045,7 +4045,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
}
rDocShell.PostPaintGridAll();
-// rDocShell.PostPaintDataChanged();
+// rDocShell.PostPaintDataChanged();
aModificator.SetDocumentModified();
bSuccess = TRUE;
@@ -4057,7 +4057,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
}
BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
+ FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
double fStart, double fStep, double fMax,
BOOL bRecord, BOOL bApi )
{
@@ -4097,7 +4097,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), aSourceArea.aEnd.Tab(),
DirFromFillDir(eDir) );
- // #27665# mindestens eine Zeile/Spalte als Quellbereich behalten:
+ // #27665# mindestens eine Zeile/Spalte als Quellbereich behalten:
SCSIZE nTotLines = ( eDir == FILL_TO_BOTTOM || eDir == FILL_TO_TOP ) ?
static_cast<SCSIZE>( aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1 ) :
static_cast<SCSIZE>( aSourceArea.aEnd.Col() - aSourceArea.aStart.Col() + 1 );
@@ -4154,11 +4154,11 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
AdjustRowHeight(rRange);
rDocShell.PostPaintGridAll();
-// rDocShell.PostPaintDataChanged();
+// rDocShell.PostPaintDataChanged();
aModificator.SetDocumentModified();
}
- if ( bRecord ) // Draw-Undo erst jetzt verfuegbar
+ if ( bRecord ) // Draw-Undo erst jetzt verfuegbar
{
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoAutoFill( &rDocShell, aDestArea, aSourceArea, pUndoDoc, aMark,
@@ -4177,12 +4177,12 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
FillDir eDir, ULONG nCount, BOOL bRecord, BOOL bApi )
{
- double fStep = 1.0;
- double fMax = MAXDOUBLE;
+ double fStep = 1.0;
+ double fMax = MAXDOUBLE;
return FillAuto( rRange, pTabMark, eDir, FILL_AUTO, FILL_DAY, nCount, fStep, fMax, bRecord, bApi );
}
-BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, ULONG nCount, double fStep, double fMax, BOOL bRecord, BOOL bApi )
+BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, ULONG nCount, double fStep, double fMax, BOOL bRecord, BOOL bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -4239,9 +4239,9 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
break;
}
- // Zellschutz testen
- //! Quellbereich darf geschuetzt sein !!!
- //! aber kein Matrixfragment enthalten !!!
+ // Zellschutz testen
+ //! Quellbereich darf geschuetzt sein !!!
+ //! aber kein Matrixfragment enthalten !!!
ScEditableTester aTester( pDoc, aDestArea );
if ( !aTester.IsEditable() )
@@ -4286,7 +4286,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
AdjustRowHeight(aDestArea);
- if ( bRecord ) // Draw-Undo erst jetzt verfuegbar
+ if ( bRecord ) // Draw-Undo erst jetzt verfuegbar
{
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoAutoFill( &rDocShell, aDestArea, aSourceArea, pUndoDoc, aMark,
@@ -4295,10 +4295,10 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
}
rDocShell.PostPaintGridAll();
-// rDocShell.PostPaintDataChanged();
+// rDocShell.PostPaintDataChanged();
aModificator.SetDocumentModified();
- rRange = aDestArea; // Zielbereich zurueckgeben (zum Markieren)
+ rRange = aDestArea; // Zielbereich zurueckgeben (zum Markieren)
return TRUE;
}
@@ -4532,10 +4532,10 @@ bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc )
BOOL bCompile = ( !pDoc->IsImportingXML() && pDoc->GetNamedRangesLockCount() == 0 );
if ( bCompile )
- pDoc->CompileNameFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileNameFormula( TRUE ); // CreateFormulaString
pDoc->SetRangeName( pNewRanges ); // takes ownership
if ( bCompile )
- pDoc->CompileNameFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileNameFormula( FALSE ); // CompileFormulaString
if (bModifyDoc)
{
@@ -4569,7 +4569,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
BOOL bInsert = FALSE;
USHORT nOldPos;
- if (rList.SearchName( aName, nOldPos )) // vorhanden ?
+ if (rList.SearchName( aName, nOldPos )) // vorhanden ?
{
ScRangeData* pOld = rList[nOldPos];
String aOldStr;
@@ -4577,7 +4577,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
if (aOldStr != aContent)
{
if (bApi)
- bInsert = TRUE; // per API nicht nachfragen
+ bInsert = TRUE; // per API nicht nachfragen
else
{
String aTemplate = ScGlobal::GetRscString( STR_CREATENAME_REPLACE );
@@ -4619,7 +4619,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi )
{
if (!nFlags)
- return FALSE; // war nix
+ return FALSE; // war nix
ScDocShellModificator aModificator( rDocShell );
@@ -4644,7 +4644,7 @@ BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi )
ScDocument* pDoc = rDocShell.GetDocument();
ScRangeName* pNames = pDoc->GetRangeName();
if (!pNames)
- return FALSE; // soll nicht sein
+ return FALSE; // soll nicht sein
ScRangeName aNewRanges( *pNames );
BOOL bTop = ( ( nFlags & NAME_TOP ) != 0 );
@@ -4742,7 +4742,7 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab,
IDF_ALL, FALSE, pUndoDoc );
- pDoc->BeginDrawUndo(); // wegen Hoehenanpassung
+ pDoc->BeginDrawUndo(); // wegen Hoehenanpassung
}
ScRangeData** ppSortArray = new ScRangeData* [ nValidCount ];
@@ -4794,7 +4794,7 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
if (!AdjustRowHeight(ScRange(0,nStartRow,nTab,MAXCOL,nEndRow,nTab)))
rDocShell.PostPaint( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, PAINT_GRID );
-//! rDocShell.UpdateOle(GetViewData());
+//! rDocShell.UpdateOle(GetViewData());
aModificator.SetDocumentModified();
bDone = TRUE;
}
@@ -4839,7 +4839,7 @@ BOOL ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd
bRet = EnterMatrix( aNewRange, &aMark, NULL, aFormula, bApi, FALSE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
if (!bRet)
{
- // versuchen, alten Zustand wiederherzustellen
+ // versuchen, alten Zustand wiederherzustellen
EnterMatrix( rOldRange, &aMark, NULL, aFormula, bApi, FALSE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 );
}
}
@@ -4858,7 +4858,7 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
const ScRange& rDestRange, ULONG nRefresh,
BOOL bFitBlock, BOOL bApi )
{
- //! auch fuer ScViewFunc::InsertAreaLink benutzen!
+ //! auch fuer ScViewFunc::InsertAreaLink benutzen!
ScDocument* pDoc = rDocShell.GetDocument();
BOOL bUndo (pDoc->IsUndoEnabled());
@@ -4906,15 +4906,15 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
if (!aFilterName.Len())
ScDocumentLoader::GetFilterName( rFile, aFilterName, aNewOptions, TRUE, !bApi );
- // remove application prefix from filter name here, so the filter options
- // aren't reset when the filter name is changed in ScAreaLink::DataChanged
+ // remove application prefix from filter name here, so the filter options
+ // aren't reset when the filter name is changed in ScAreaLink::DataChanged
ScDocumentLoader::RemoveAppPrefix( aFilterName );
ScAreaLink* pLink = new ScAreaLink( &rDocShell, rFile, aFilterName,
aNewOptions, rSource, rDestRange, nRefresh );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, rFile, &aFilterName, &rSource );
- // Undo fuer den leeren Link
+ // Undo fuer den leeren Link
if (bUndo)
{
@@ -4925,17 +4925,17 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
rDocShell.GetUndoManager()->LeaveListAction(); // undo for link update is still separate
}
- // Update hat sein eigenes Undo
+ // Update hat sein eigenes Undo
- pLink->SetDoInsert(bFitBlock); // beim ersten Update ggf. nichts einfuegen
- pLink->Update(); // kein SetInCreate -> Update ausfuehren
- pLink->SetDoInsert(TRUE); // Default = TRUE
+ pLink->SetDoInsert(bFitBlock); // beim ersten Update ggf. nichts einfuegen
+ pLink->Update(); // kein SetInCreate -> Update ausfuehren
+ pLink->SetDoInsert(TRUE); // Default = TRUE
SfxBindings* pBindings = rDocShell.GetViewBindings();
if (pBindings)
pBindings->Invalidate( SID_LINKS );
- SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
+ SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
return TRUE;
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index a777de7888e2..671b261ac644 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.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
@@ -104,7 +104,7 @@
#include "attrib.hxx"
#include "asciiopt.hxx"
#include "waitoff.hxx"
-#include "docpool.hxx" // LoadCompleted
+#include "docpool.hxx" // LoadCompleted
#include "progress.hxx"
#include "pntlock.hxx"
#include "collect.hxx"
@@ -153,38 +153,38 @@ using ::std::vector;
// STATIC DATA -----------------------------------------------------------
-// Stream-Namen im Storage
+// Stream-Namen im Storage
-const sal_Char __FAR_DATA ScDocShell::pStarCalcDoc[] = STRING_SCSTREAM; // "StarCalcDocument"
+const sal_Char __FAR_DATA ScDocShell::pStarCalcDoc[] = STRING_SCSTREAM; // "StarCalcDocument"
const sal_Char __FAR_DATA ScDocShell::pStyleName[] = "SfxStyleSheets";
-// Filter-Namen (wie in sclib.cxx)
-
-static const sal_Char __FAR_DATA pFilterSc50[] = "StarCalc 5.0";
-//static const sal_Char __FAR_DATA pFilterSc50Temp[] = "StarCalc 5.0 Vorlage/Template";
-static const sal_Char __FAR_DATA pFilterSc40[] = "StarCalc 4.0";
-//static const sal_Char __FAR_DATA pFilterSc40Temp[] = "StarCalc 4.0 Vorlage/Template";
-static const sal_Char __FAR_DATA pFilterSc30[] = "StarCalc 3.0";
-//static const sal_Char __FAR_DATA pFilterSc30Temp[] = "StarCalc 3.0 Vorlage/Template";
-static const sal_Char __FAR_DATA pFilterSc10[] = "StarCalc 1.0";
-static const sal_Char __FAR_DATA pFilterXML[] = "StarOffice XML (Calc)";
-static const sal_Char __FAR_DATA pFilterAscii[] = "Text - txt - csv (StarCalc)";
-static const sal_Char __FAR_DATA pFilterLotus[] = "Lotus";
-static const sal_Char __FAR_DATA pFilterQPro6[] = "Quattro Pro 6.0";
-static const sal_Char __FAR_DATA pFilterExcel4[] = "MS Excel 4.0";
-static const sal_Char __FAR_DATA pFilterEx4Temp[] = "MS Excel 4.0 Vorlage/Template";
-static const sal_Char __FAR_DATA pFilterExcel5[] = "MS Excel 5.0/95";
-static const sal_Char __FAR_DATA pFilterEx5Temp[] = "MS Excel 5.0/95 Vorlage/Template";
-static const sal_Char __FAR_DATA pFilterExcel95[] = "MS Excel 95";
-static const sal_Char __FAR_DATA pFilterEx95Temp[] = "MS Excel 95 Vorlage/Template";
-static const sal_Char __FAR_DATA pFilterExcel97[] = "MS Excel 97";
-static const sal_Char __FAR_DATA pFilterEx97Temp[] = "MS Excel 97 Vorlage/Template";
-static const sal_Char __FAR_DATA pFilterDBase[] = "dBase";
-static const sal_Char __FAR_DATA pFilterDif[] = "DIF";
-static const sal_Char __FAR_DATA pFilterSylk[] = "SYLK";
-static const sal_Char __FAR_DATA pFilterHtml[] = "HTML (StarCalc)";
-static const sal_Char __FAR_DATA pFilterHtmlWebQ[] = "calc_HTML_WebQuery";
-static const sal_Char __FAR_DATA pFilterRtf[] = "Rich Text Format (StarCalc)";
+// Filter-Namen (wie in sclib.cxx)
+
+static const sal_Char __FAR_DATA pFilterSc50[] = "StarCalc 5.0";
+//static const sal_Char __FAR_DATA pFilterSc50Temp[] = "StarCalc 5.0 Vorlage/Template";
+static const sal_Char __FAR_DATA pFilterSc40[] = "StarCalc 4.0";
+//static const sal_Char __FAR_DATA pFilterSc40Temp[] = "StarCalc 4.0 Vorlage/Template";
+static const sal_Char __FAR_DATA pFilterSc30[] = "StarCalc 3.0";
+//static const sal_Char __FAR_DATA pFilterSc30Temp[] = "StarCalc 3.0 Vorlage/Template";
+static const sal_Char __FAR_DATA pFilterSc10[] = "StarCalc 1.0";
+static const sal_Char __FAR_DATA pFilterXML[] = "StarOffice XML (Calc)";
+static const sal_Char __FAR_DATA pFilterAscii[] = "Text - txt - csv (StarCalc)";
+static const sal_Char __FAR_DATA pFilterLotus[] = "Lotus";
+static const sal_Char __FAR_DATA pFilterQPro6[] = "Quattro Pro 6.0";
+static const sal_Char __FAR_DATA pFilterExcel4[] = "MS Excel 4.0";
+static const sal_Char __FAR_DATA pFilterEx4Temp[] = "MS Excel 4.0 Vorlage/Template";
+static const sal_Char __FAR_DATA pFilterExcel5[] = "MS Excel 5.0/95";
+static const sal_Char __FAR_DATA pFilterEx5Temp[] = "MS Excel 5.0/95 Vorlage/Template";
+static const sal_Char __FAR_DATA pFilterExcel95[] = "MS Excel 95";
+static const sal_Char __FAR_DATA pFilterEx95Temp[] = "MS Excel 95 Vorlage/Template";
+static const sal_Char __FAR_DATA pFilterExcel97[] = "MS Excel 97";
+static const sal_Char __FAR_DATA pFilterEx97Temp[] = "MS Excel 97 Vorlage/Template";
+static const sal_Char __FAR_DATA pFilterDBase[] = "dBase";
+static const sal_Char __FAR_DATA pFilterDif[] = "DIF";
+static const sal_Char __FAR_DATA pFilterSylk[] = "SYLK";
+static const sal_Char __FAR_DATA pFilterHtml[] = "HTML (StarCalc)";
+static const sal_Char __FAR_DATA pFilterHtmlWebQ[] = "calc_HTML_WebQuery";
+static const sal_Char __FAR_DATA pFilterRtf[] = "Rich Text Format (StarCalc)";
//----------------------------------------------------------------------
@@ -197,10 +197,10 @@ SFX_IMPL_INTERFACE(ScDocShell,SfxObjectShell, ScResId(SCSTR_DOCSHELL))
SFX_CHILDWINDOW_REGISTRATION( SID_HYPERLINK_INSERT );
}
-// GlobalName der aktuellen Version:
+// GlobalName der aktuellen Version:
SFX_IMPL_OBJECTFACTORY( ScDocShell, SvGlobalName(SO3_SC_CLASSID), SFXOBJECTSHELL_STD_NORMAL, "scalc" )
-TYPEINIT1( ScDocShell, SfxObjectShell ); // SfxInPlaceObject: kein Type-Info ?
+TYPEINIT1( ScDocShell, SfxObjectShell ); // SfxInPlaceObject: kein Type-Info ?
//------------------------------------------------------------------
@@ -214,17 +214,17 @@ void __EXPORT ScDocShell::FillClass( SvGlobalName* pClassName,
{
if ( nFileFormat == SOFFICE_FILEFORMAT_60 )
{
- *pClassName = SvGlobalName( SO3_SC_CLASSID_60 );
- *pFormat = SOT_FORMATSTR_ID_STARCALC_60;
- *pFullTypeName = String( ScResId( SCSTR_LONG_SCDOC_NAME ) );
- *pShortTypeName = String( ScResId( SCSTR_SHORT_SCDOC_NAME ) );
+ *pClassName = SvGlobalName( SO3_SC_CLASSID_60 );
+ *pFormat = SOT_FORMATSTR_ID_STARCALC_60;
+ *pFullTypeName = String( ScResId( SCSTR_LONG_SCDOC_NAME ) );
+ *pShortTypeName = String( ScResId( SCSTR_SHORT_SCDOC_NAME ) );
}
else if ( nFileFormat == SOFFICE_FILEFORMAT_8 )
{
- *pClassName = SvGlobalName( SO3_SC_CLASSID_60 );
- *pFormat = bTemplate ? SOT_FORMATSTR_ID_STARCALC_8_TEMPLATE : SOT_FORMATSTR_ID_STARCALC_8;
- *pFullTypeName = String( RTL_CONSTASCII_USTRINGPARAM("calc8") );
- *pShortTypeName = String( ScResId( SCSTR_SHORT_SCDOC_NAME ) );
+ *pClassName = SvGlobalName( SO3_SC_CLASSID_60 );
+ *pFormat = bTemplate ? SOT_FORMATSTR_ID_STARCALC_8_TEMPLATE : SOT_FORMATSTR_ID_STARCALC_8;
+ *pFullTypeName = String( RTL_CONSTASCII_USTRINGPARAM("calc8") );
+ *pShortTypeName = String( ScResId( SCSTR_SHORT_SCDOC_NAME ) );
}
else
{
@@ -251,7 +251,7 @@ SCTAB ScDocShell::GetSaveTab()
if (pSh)
{
const ScMarkData& rMark = pSh->GetViewData()->GetMarkData();
- for ( nTab = 0; nTab <= MAXTAB; nTab++ ) // erste markierte Tabelle
+ for ( nTab = 0; nTab <= MAXTAB; nTab++ ) // erste markierte Tabelle
if ( rMark.GetTableSelect( nTab ) )
break;
}
@@ -340,14 +340,14 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
ScGlobal::UnicodeStrChr( pNameBuffer, SC_COMPILER_FILE_TAB_SEP ) )
{
rtl::OUStringBuffer aDocURLBuffer;
- BOOL bQuote = TRUE; // Dokumentenname ist immer quoted
+ BOOL bQuote = TRUE; // Dokumentenname ist immer quoted
++pNameBuffer;
while ( bQuote && *pNameBuffer )
{
if ( *pNameBuffer == '\'' && *(pNameBuffer-1) != '\\' )
bQuote = FALSE;
else if( !(*pNameBuffer == '\\' && *(pNameBuffer+1) == '\'') )
- aDocURLBuffer.append(*pNameBuffer); // falls escaped Quote: nur Quote in den Namen
+ aDocURLBuffer.append(*pNameBuffer); // falls escaped Quote: nur Quote in den Namen
++pNameBuffer;
}
@@ -356,7 +356,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
{
xub_StrLen nIndex = nNameLength - nLinkTabNameLength;
INetURLObject aINetURLObject(aDocURLBuffer.makeStringAndClear());
- if( aName.Equals(aLinkTabName, nIndex, nLinkTabNameLength) &&
+ if( aName.Equals(aLinkTabName, nIndex, nLinkTabNameLength) &&
(aName.GetChar(nIndex - 1) == '#') && // before the table name should be the # char
!aINetURLObject.HasError()) // the docname should be a valid URL
{
@@ -391,7 +391,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
}
else
aDocument.SetInsertingFromOtherDoc( FALSE );
-
+
aDocument.SetImportingXML( FALSE );
aDocument.EnableExecuteLink( true );
aDocument.EnableUndo( TRUE );
@@ -435,7 +435,7 @@ BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R
{
LoadMediumGuard aLoadGuard(&aDocument);
- // MacroCallMode is no longer needed, state is kept in SfxObjectShell now
+ // MacroCallMode is no longer needed, state is kept in SfxObjectShell now
// no Seek(0) here - always loading from storage, GetInStream must not be called
@@ -461,7 +461,7 @@ BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R
aDocument.SetXMLFromWrapper( FALSE );
AfterXMLLoading(bRet);
- //! row heights...
+ //! row heights...
return bRet;
}
@@ -490,8 +490,8 @@ BOOL __EXPORT ScDocShell::Load( SfxMedium& rMedium )
LoadMediumGuard aLoadGuard(&aDocument);
ScRefreshTimerProtector( aDocument.GetRefreshTimerControlAddress() );
- // only the latin script language is loaded
- // -> initialize the others from options (before loading)
+ // only the latin script language is loaded
+ // -> initialize the others from options (before loading)
InitOptions(true);
GetUndoManager()->Clear();
@@ -506,8 +506,8 @@ BOOL __EXPORT ScDocShell::Load( SfxMedium& rMedium )
}
{
- // prepare a valid document for XML filter
- // (for ConvertFrom, InitNew is called before)
+ // prepare a valid document for XML filter
+ // (for ConvertFrom, InitNew is called before)
aDocument.MakeTable(0);
aDocument.GetStyleSheetPool()->CreateStandardStyles();
aDocument.UpdStlShtPtrsFrmNms();
@@ -598,27 +598,27 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
}
- if (rHint.ISA(SfxSimpleHint)) // ohne Parameter
+ if (rHint.ISA(SfxSimpleHint)) // ohne Parameter
{
ULONG nSlot = ((const SfxSimpleHint&)rHint).GetId();
switch ( nSlot )
{
case SFX_HINT_TITLECHANGED:
aDocument.SetName( SfxShell::GetName() );
- // RegisterNewTargetNames gibts nicht mehr
- SFX_APP()->Broadcast(SfxSimpleHint( SC_HINT_DOCNAME_CHANGED )); // Navigator
+ // RegisterNewTargetNames gibts nicht mehr
+ SFX_APP()->Broadcast(SfxSimpleHint( SC_HINT_DOCNAME_CHANGED )); // Navigator
break;
}
}
- else if (rHint.ISA(SfxStyleSheetHint)) // Vorlagen geaendert
+ else if (rHint.ISA(SfxStyleSheetHint)) // Vorlagen geaendert
NotifyStyle((const SfxStyleSheetHint&) rHint);
else if (rHint.ISA(ScAutoStyleHint))
{
- //! direct call for AutoStyles
+ //! direct call for AutoStyles
- // this is called synchronously from ScInterpreter::ScStyle,
- // modifying the document must be asynchronous
- // (handled by AddInitial)
+ // this is called synchronously from ScInterpreter::ScStyle,
+ // modifying the document must be asynchronous
+ // (handled by AddInitial)
ScAutoStyleHint& rStlHint = (ScAutoStyleHint&)rHint;
ScRange aRange = rStlHint.GetRange();
@@ -661,7 +661,7 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if( aDocument.IsInVBAMode() ) try
{
uno::Reference< frame::XModel > xModel( GetModel(), uno::UNO_SET_THROW );
-
+
// create VBAGlobals object if not yet done (this also creates the "ThisExcelDoc" symbol)
uno::Reference< lang::XMultiServiceFactory > xFactory( xModel, uno::UNO_QUERY_THROW );
xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) );
@@ -1028,7 +1028,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
LoadMediumGuard aLoadGuard(&aDocument);
- BOOL bRet = FALSE; // FALSE heisst Benutzerabbruch !!
+ BOOL bRet = FALSE; // FALSE heisst Benutzerabbruch !!
// bei Fehler: Fehler am Stream setzen!!
ScRefreshTimerProtector( aDocument.GetRefreshTimerControlAddress() );
@@ -1047,10 +1047,10 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
aConvFilterName.Erase(); //@ #BugId 54198
- // Alle Filter brauchen die komplette Datei am Stueck (nicht asynchron),
- // darum vorher per CreateFileStream dafuer sorgen, dass die komplette
- // Datei uebertragen wird.
- rMedium.GetPhysicalName(); //! CreateFileStream direkt rufen, wenn verfuegbar
+ // Alle Filter brauchen die komplette Datei am Stueck (nicht asynchron),
+ // darum vorher per CreateFileStream dafuer sorgen, dass die komplette
+ // Datei uebertragen wird.
+ rMedium.GetPhysicalName(); //! CreateFileStream direkt rufen, wenn verfuegbar
SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : com::sun::star::document::UpdateDocMode::NO_UPDATE;
@@ -1087,7 +1087,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
else if (aFltName.EqualsAscii(pFilterLotus))
{
String sItStr;
- SfxItemSet* pSet = rMedium.GetItemSet();
+ SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
@@ -1097,8 +1097,8 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (sItStr.Len() == 0)
{
- // default for lotus import (from API without options):
- // IBM_437 encoding
+ // default for lotus import (from API without options):
+ // IBM_437 encoding
sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_437 );
}
@@ -1133,14 +1133,14 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
else if ( aFltName.EqualsAscii(pFilterExcel97) || aFltName.EqualsAscii(pFilterEx97Temp) )
eFormat = EIF_BIFF8;
- MakeDrawLayer(); //! im Filter
+ MakeDrawLayer(); //! im Filter
CalcOutputFactor(); // #93255# prepare update of row height
ScColumn::bDoubleAlloc = TRUE;
FltError eError = ScFormatFilter::Get().ScImportExcel( rMedium, &aDocument, eFormat );
ScColumn::bDoubleAlloc = FALSE;
aDocument.UpdateFontCharSet();
if ( aDocument.IsChartListenerCollectionNeedsUpdate() )
- aDocument.UpdateChartListenerCollection(); //! fuer alle Importe?
+ aDocument.UpdateChartListenerCollection(); //! fuer alle Importe?
// #75299# all graphics objects must have names
aDocument.EnsureGraphicNames();
@@ -1164,7 +1164,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
}
else if (aFltName.EqualsAscii(pFilterAscii))
{
- SfxItemSet* pSet = rMedium.GetItemSet();
+ SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
ScAsciiOptions aOptions;
BOOL bOptInit = FALSE;
@@ -1178,8 +1178,8 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
if ( !bOptInit )
{
- // default for ascii import (from API without options):
- // ISO8859-1/MS_1252 encoding, comma, double quotes
+ // default for ascii import (from API without options):
+ // ISO8859-1/MS_1252 encoding, comma, double quotes
aOptions.SetCharSet( RTL_TEXTENCODING_MS_1252 );
aOptions.SetFieldSeps( (sal_Unicode) ',' );
@@ -1191,7 +1191,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
if( ! rMedium.IsStorage() )
{
- ScImportExport aImpEx( &aDocument );
+ ScImportExport aImpEx( &aDocument );
aImpEx.SetExtOptions( aOptions );
SvStream* pInStream = rMedium.GetInStream();
@@ -1227,7 +1227,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
else if (aFltName.EqualsAscii(pFilterDBase))
{
String sItStr;
- SfxItemSet* pSet = rMedium.GetItemSet();
+ SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
@@ -1237,8 +1237,8 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (sItStr.Len() == 0)
{
- // default for dBase import (from API without options):
- // IBM_850 encoding
+ // default for dBase import (from API without options):
+ // IBM_850 encoding
sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_850 );
}
@@ -1257,7 +1257,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
else
bRet = TRUE;
- aColWidthRange.aStart.SetRow( 1 ); // Spaltenheader nicht
+ aColWidthRange.aStart.SetRow( 1 ); // Spaltenheader nicht
bSetColWidths = TRUE;
bSetSimpleTextColWidths = TRUE;
}
@@ -1268,7 +1268,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
FltError eError;
String sItStr;
- SfxItemSet* pSet = rMedium.GetItemSet();
+ SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
@@ -1278,8 +1278,8 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
if (sItStr.Len() == 0)
{
- // default for DIF import (from API without options):
- // ISO8859-1/MS_1252 encoding
+ // default for DIF import (from API without options):
+ // ISO8859-1/MS_1252 encoding
sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_MS_1252 );
}
@@ -1395,7 +1395,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
{
LanguageType eLang = LANGUAGE_SYSTEM;
bool bDateConvert = false;
- SfxItemSet* pSet = rMedium.GetItemSet();
+ SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
@@ -1450,13 +1450,13 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
InitItems();
CalcOutputFactor();
if ( bRet && (bSetColWidths || bSetRowHeights) )
- { // Spaltenbreiten/Zeilenhoehen anpassen, Basis 100% Zoom
+ { // Spaltenbreiten/Zeilenhoehen anpassen, Basis 100% Zoom
Fraction aZoom( 1, 1 );
double nPPTX = ScGlobal::nScreenPPTX * (double) aZoom
- / GetOutputFactor(); // Faktor ist Drucker zu Bildschirm
+ / GetOutputFactor(); // Faktor ist Drucker zu Bildschirm
double nPPTY = ScGlobal::nScreenPPTY * (double) aZoom;
VirtualDevice aVirtDev;
- // all sheets (for Excel import)
+ // all sheets (for Excel import)
SCTAB nTabCount = aDocument.GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
{
@@ -1483,12 +1483,12 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
nWidth + (USHORT)ScGlobal::nLastColWidthExtra );
}
}
-// if ( bSetRowHeights )
-// {
-// // nExtra must be 0
-// aDocument.SetOptimalHeight( 0, nEndRow, nTab, 0, &aVirtDev,
-// nPPTX, nPPTY, aZoom, aZoom, FALSE );
-// }
+// if ( bSetRowHeights )
+// {
+// // nExtra must be 0
+// aDocument.SetOptimalHeight( 0, nEndRow, nTab, 0, &aVirtDev,
+// nPPTX, nPPTY, aZoom, aZoom, FALSE );
+// }
}
if (bSetRowHeights)
@@ -1565,7 +1565,7 @@ BOOL __EXPORT ScDocShell::Save()
PrepareSaveGuard aPrepareGuard( *this);
- // wait cursor is handled with progress bar
+ // wait cursor is handled with progress bar
BOOL bRet = SfxObjectShell::Save();
if( bRet )
bRet = SaveXML( GetMedium(), NULL );
@@ -1596,7 +1596,7 @@ BOOL __EXPORT ScDocShell::SaveAs( SfxMedium& rMedium )
PrepareSaveGuard aPrepareGuard( *this);
- // wait cursor is handled with progress bar
+ // wait cursor is handled with progress bar
BOOL bRet = SfxObjectShell::SaveAs( rMedium );
if( bRet )
bRet = SaveXML( &rMedium, NULL );
@@ -1610,7 +1610,7 @@ BOOL __EXPORT ScDocShell::IsInformationLost()
/*
const SfxFilter *pFilt = GetMedium()->GetFilter();
BOOL bRet = pFilt && pFilt->IsAlienFormat() && bNoInformLost;
- if (bNoInformLost) // nur einmal!!
+ if (bNoInformLost) // nur einmal!!
bNoInformLost = FALSE;
return bRet;
*/
@@ -1624,7 +1624,7 @@ BOOL __EXPORT ScDocShell::IsInformationLost()
xub_StrLen lcl_ScDocShell_GetColWidthInChars( USHORT nWidth )
{
// double fColScale = 1.0;
- double f = nWidth;
+ double f = nWidth;
f *= 1328.0 / 25.0;
f += 90.0;
f *= 1.0 / 23.0;
@@ -1732,7 +1732,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
String aString;
- ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell, SfxViewShell::Current());
+ ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell, SfxViewShell::Current());
const ScViewOptions& rOpt = (pViewSh)
? pViewSh->GetViewData()->GetOptions()
: aDocument.GetViewOptions();
@@ -1752,7 +1752,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
ScBaseCell* pCell;
while ( ( pCell = aIter.GetNext( nCol, nRow ) ) != NULL )
{
- BOOL bProgress = FALSE; // only upon line change
+ BOOL bProgress = FALSE; // only upon line change
if ( nNextRow < nRow )
{ // empty rows or/and empty columns up to end of row
bProgress = TRUE;
@@ -1817,7 +1817,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
if ( pProtAttr->GetHideCell() ||
( eType == CELLTYPE_FORMULA && bShowFormulas &&
pProtAttr->GetHideFormula() ) )
- eType = CELLTYPE_NONE; // hide
+ eType = CELLTYPE_NONE; // hide
}
BOOL bString;
switch ( eType )
@@ -2030,7 +2030,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
if ( nNextRow <= nEndRow )
{
for ( nEmptyCol = nNextCol; nEmptyCol < nEndCol; nEmptyCol++ )
- { // remaining empty columns of last row
+ { // remaining empty columns of last row
if ( bFixedWidth )
lcl_ScDocShell_WriteEmptyFixedWidthString( rStream,
aDocument, nTab, nEmptyCol );
@@ -2041,7 +2041,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
nNextRow++;
}
for ( nEmptyRow = nNextRow; nEmptyRow <= nEndRow; nEmptyRow++ )
- { // entire empty rows
+ { // entire empty rows
for ( nEmptyCol = nStartCol; nEmptyCol < nEndCol; nEmptyCol++ )
{
if ( bFixedWidth )
@@ -2067,7 +2067,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
// it's already in ExecuteSave (as for Save and SaveAs)
if (pAutoStyleList)
- pAutoStyleList->ExecuteAllNow(); // Vorlagen-Timeouts jetzt ausfuehren
+ pAutoStyleList->ExecuteAllNow(); // Vorlagen-Timeouts jetzt ausfuehren
if (GetCreateMode()== SFX_CREATE_MODE_STANDARD)
SfxObjectShell::SetVisArea( Rectangle() ); // normal bearbeitet -> keine VisArea
@@ -2159,7 +2159,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
if (pStream)
{
String sItStr;
- SfxItemSet* pSet = rMed.GetItemSet();
+ SfxItemSet* pSet = rMed.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
@@ -2169,8 +2169,8 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
if ( sItStr.Len() == 0 )
{
- // default for ascii export (from API without options):
- // ISO8859-1/MS_1252 encoding, comma, double quotes
+ // default for ascii export (from API without options):
+ // ISO8859-1/MS_1252 encoding, comma, double quotes
ScImportOptions aDefOptions( ',', '"', RTL_TEXTENCODING_MS_1252 );
sItStr = aDefOptions.BuildString();
@@ -2189,7 +2189,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
else if (aFltName.EqualsAscii(pFilterDBase))
{
String sCharSet;
- SfxItemSet* pSet = rMed.GetItemSet();
+ SfxItemSet* pSet = rMed.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
@@ -2199,8 +2199,8 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
if (sCharSet.Len() == 0)
{
- // default for dBase export (from API without options):
- // IBM_850 encoding
+ // default for dBase export (from API without options):
+ // IBM_850 encoding
sCharSet = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_850 );
}
@@ -2215,12 +2215,12 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
if ( eError != eERR_OK && (eError & ERRCODE_WARNING_MASK) )
{
-//! if ( !rMed.GetError() )
-//! rMed.SetError( eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+//! if ( !rMed.GetError() )
+//! rMed.SetError( eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
eError = eERR_OK;
}
-//! else if ( aDocument.GetTableCount() > 1 && !rMed.GetError() )
-//! rMed.SetError( SCWARN_EXPORT_ASCII, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+//! else if ( aDocument.GetTableCount() > 1 && !rMed.GetError() )
+//! rMed.SetError( SCWARN_EXPORT_ASCII, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
INetURLObject aTmpFile( rMed.GetPhysicalName(), INET_PROT_FILE );
if ( bHasMemo )
@@ -2260,7 +2260,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
if (pStream)
{
String sItStr;
- SfxItemSet* pSet = rMed.GetItemSet();
+ SfxItemSet* pSet = rMed.GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SFX_ITEM_SET ==
pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
@@ -2270,8 +2270,8 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
if (sItStr.Len() == 0)
{
- // default for DIF export (from API without options):
- // ISO8859-1/MS_1252 encoding
+ // default for DIF export (from API without options):
+ // ISO8859-1/MS_1252 encoding
sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_MS_1252 );
}
@@ -2338,7 +2338,7 @@ BOOL __EXPORT ScDocShell::DoSaveCompleted( SfxMedium * pNewStor )
{
BOOL bRet = SfxObjectShell::DoSaveCompleted( pNewStor );
- // SC_HINT_DOC_SAVED fuer Wechsel ReadOnly -> Read/Write
+ // SC_HINT_DOC_SAVED fuer Wechsel ReadOnly -> Read/Write
Broadcast( SfxSimpleHint( SC_HINT_DOC_SAVED ) );
return bRet;
}
@@ -2347,7 +2347,7 @@ BOOL __EXPORT ScDocShell::DoSaveCompleted( SfxMedium * pNewStor )
sal_Bool ScDocShell::QuerySlotExecutable( USHORT nSlotId )
{
// #i112634# ask VBA event handlers whether to save or print the document
-
+
using namespace ::com::sun::star::script::vba;
sal_Int32 nVbaEventId = VBAEventId::NO_EVENT;
@@ -2430,27 +2430,27 @@ USHORT __EXPORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
// end handler code
USHORT nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
- if (nRet == TRUE) // TRUE = schliessen
- aDocument.DisableIdle(TRUE); // nicht mehr drin rumpfuschen !!!
+ if (nRet == TRUE) // TRUE = schliessen
+ aDocument.DisableIdle(TRUE); // nicht mehr drin rumpfuschen !!!
return nRet;
}
void ScDocShell::PrepareReload()
{
- SfxObjectShell::PrepareReload(); // tut nichts?
+ SfxObjectShell::PrepareReload(); // tut nichts?
- // Das Disconnect von DDE-Links kann Reschedule ausloesen.
- // Wenn die DDE-Links erst im Dokument-dtor geloescht werden, kann beim Reload
- // aus diesem Reschedule das DDE-Link-Update fuer das neue Dokument ausgeloest
- // werden. Dabei verklemmt sicht dann irgendwas.
- // -> Beim Reload die DDE-Links des alten Dokuments vorher disconnecten
+ // Das Disconnect von DDE-Links kann Reschedule ausloesen.
+ // Wenn die DDE-Links erst im Dokument-dtor geloescht werden, kann beim Reload
+ // aus diesem Reschedule das DDE-Link-Update fuer das neue Dokument ausgeloest
+ // werden. Dabei verklemmt sicht dann irgendwas.
+ // -> Beim Reload die DDE-Links des alten Dokuments vorher disconnecten
aDocument.DisconnectDdeLinks();
}
-String ScDocShell::GetOwnFilterName() // static
+String ScDocShell::GetOwnFilterName() // static
{
return String::CreateFromAscii(pFilterSc50);
}
@@ -2460,35 +2460,35 @@ String ScDocShell::GetHtmlFilterName()
return String::CreateFromAscii(pFilterHtml);
}
-String ScDocShell::GetWebQueryFilterName() // static
+String ScDocShell::GetWebQueryFilterName() // static
{
return String::CreateFromAscii(pFilterHtmlWebQ);
}
-String ScDocShell::GetAsciiFilterName() // static
+String ScDocShell::GetAsciiFilterName() // static
{
return String::CreateFromAscii(pFilterAscii);
}
-String ScDocShell::GetLotusFilterName() // static
+String ScDocShell::GetLotusFilterName() // static
{
return String::CreateFromAscii(pFilterLotus);
}
-String ScDocShell::GetDBaseFilterName() // static
+String ScDocShell::GetDBaseFilterName() // static
{
return String::CreateFromAscii(pFilterDBase);
}
-String ScDocShell::GetDifFilterName() // static
+String ScDocShell::GetDifFilterName() // static
{
return String::CreateFromAscii(pFilterDif);
}
-BOOL ScDocShell::HasAutomaticTableName( const String& rFilter ) // static
+BOOL ScDocShell::HasAutomaticTableName( const String& rFilter ) // static
{
- // TRUE for those filters that keep the default table name
- // (which is language specific)
+ // TRUE for those filters that keep the default table name
+ // (which is language specific)
return rFilter.EqualsAscii( pFilterAscii )
|| rFilter.EqualsAscii( pFilterLotus )
@@ -2504,24 +2504,24 @@ BOOL ScDocShell::HasAutomaticTableName( const String& rFilter ) // static
//==================================================================
#define __SCDOCSHELL_INIT \
- aDocument ( SCDOCMODE_DOCUMENT, this ), \
+ aDocument ( SCDOCMODE_DOCUMENT, this ), \
aDdeTextFmt(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("TEXT"))), \
nPrtToScreenFactor( 1.0 ), \
pImpl ( new DocShell_Impl ), \
- bHeaderOn ( TRUE ), \
- bFooterOn ( TRUE ), \
+ bHeaderOn ( TRUE ), \
+ bFooterOn ( TRUE ), \
bNoInformLost ( TRUE ), \
- bIsEmpty ( TRUE ), \
- bIsInUndo ( FALSE ), \
+ bIsEmpty ( TRUE ), \
+ bIsInUndo ( FALSE ), \
bDocumentModifiedPending( FALSE ), \
- nDocumentLock ( 0 ), \
+ nDocumentLock ( 0 ), \
nCanUpdate (com::sun::star::document::UpdateDocMode::ACCORDING_TO_CONFIG), \
bUpdateEnabled ( TRUE ), \
pOldAutoDBRange ( NULL ), \
- pDocHelper ( NULL ), \
- pAutoStyleList ( NULL ), \
- pPaintLockData ( NULL ), \
- pOldJobSetup ( NULL ), \
+ pDocHelper ( NULL ), \
+ pAutoStyleList ( NULL ), \
+ pPaintLockData ( NULL ), \
+ pOldJobSetup ( NULL ), \
pSolverSaveData ( NULL ), \
pSheetSaveData ( NULL ), \
pModificator ( NULL )
@@ -2543,7 +2543,7 @@ ScDocShell::ScDocShell( const ScDocShell& rShell )
pDocFunc = new ScDocFunc(*this);
- // SetBaseModel needs exception handling
+ // SetBaseModel needs exception handling
ScModelObj::CreateAndSet( this );
StartListening(*this);
@@ -2554,13 +2554,13 @@ ScDocShell::ScDocShell( const ScDocShell& rShell )
GetPageOnFromPageStyleSet( NULL, 0, bHeaderOn, bFooterOn );
SetHelpId( HID_SCSHELL_DOCSH );
- // InitItems und CalcOutputFactor werden jetzt nach bei Load/ConvertFrom/InitNew gerufen
+ // InitItems und CalcOutputFactor werden jetzt nach bei Load/ConvertFrom/InitNew gerufen
}
//------------------------------------------------------------------
ScDocShell::ScDocShell( const sal_uInt64 i_nSfxCreationFlags )
- : SfxObjectShell( i_nSfxCreationFlags )
+ : SfxObjectShell( i_nSfxCreationFlags )
, __SCDOCSHELL_INIT
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::ScDocShell" );
@@ -2568,11 +2568,11 @@ ScDocShell::ScDocShell( const sal_uInt64 i_nSfxCreationFlags )
SetPool( &SC_MOD()->GetPool() );
bIsInplace = (GetCreateMode() == SFX_CREATE_MODE_EMBEDDED);
- // wird zurueckgesetzt, wenn nicht inplace
+ // wird zurueckgesetzt, wenn nicht inplace
pDocFunc = new ScDocFunc(*this);
- // SetBaseModel needs exception handling
+ // SetBaseModel needs exception handling
ScModelObj::CreateAndSet( this );
StartListening(*this);
@@ -2584,14 +2584,14 @@ ScDocShell::ScDocShell( const sal_uInt64 i_nSfxCreationFlags )
aDocument.GetDBCollection()->SetRefreshHandler(
LINK( this, ScDocShell, RefreshDBDataHdl ) );
- // InitItems und CalcOutputFactor werden jetzt nach bei Load/ConvertFrom/InitNew gerufen
+ // InitItems und CalcOutputFactor werden jetzt nach bei Load/ConvertFrom/InitNew gerufen
}
//------------------------------------------------------------------
__EXPORT ScDocShell::~ScDocShell()
{
- ResetDrawObjectShell(); // #55570# falls der Drawing-Layer noch versucht, darauf zuzugreifen
+ ResetDrawObjectShell(); // #55570# falls der Drawing-Layer noch versucht, darauf zuzugreifen
SfxStyleSheetPool* pStlPool = aDocument.GetStyleSheetPool();
if (pStlPool)
@@ -2601,7 +2601,7 @@ __EXPORT ScDocShell::~ScDocShell()
delete pAutoStyleList;
SfxApplication *pSfxApp = SFX_APP();
- if ( pSfxApp->GetDdeService() ) // DDE vor Dokument loeschen
+ if ( pSfxApp->GetDdeService() ) // DDE vor Dokument loeschen
pSfxApp->RemoveDdeTopic( this );
delete pDocFunc;
@@ -2611,7 +2611,7 @@ __EXPORT ScDocShell::~ScDocShell()
delete pPaintLockData;
- delete pOldJobSetup; // gesetzt nur bei Fehler in StartJob()
+ delete pOldJobSetup; // gesetzt nur bei Fehler in StartJob()
delete pSolverSaveData;
delete pSheetSaveData;
@@ -2643,16 +2643,16 @@ void ScDocShell::SetModified( BOOL bModified )
void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
{
- // BroadcastUno muss auch mit pPaintLockData sofort passieren
- //! auch bei SetDrawModified, wenn Drawing angebunden ist
- //! dann eigener Hint???
+ // BroadcastUno muss auch mit pPaintLockData sofort passieren
+ //! auch bei SetDrawModified, wenn Drawing angebunden ist
+ //! dann eigener Hint???
if ( pPaintLockData && bIsModified )
{
//! BCA_BRDCST_ALWAYS etc. also needed here?
aDocument.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
- pPaintLockData->SetModified(); // spaeter...
+ pPaintLockData->SetModified(); // spaeter...
return;
}
@@ -2673,18 +2673,18 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
aDocument.CalcFormulaTree( TRUE );
PostDataChanged();
- // Detective AutoUpdate:
- // Update if formulas were modified (DetectiveDirty) or the list contains
- // "Trace Error" entries (#75362# - Trace Error can look completely different
- // after changes to non-formula cells).
+ // Detective AutoUpdate:
+ // Update if formulas were modified (DetectiveDirty) or the list contains
+ // "Trace Error" entries (#75362# - Trace Error can look completely different
+ // after changes to non-formula cells).
ScDetOpList* pList = aDocument.GetDetOpList();
if ( pList && ( aDocument.IsDetectiveDirty() || pList->HasAddError() ) &&
pList->Count() && !IsInUndo() && SC_MOD()->GetAppOptions().GetDetectiveAuto() )
{
- GetDocFunc().DetectiveRefresh(TRUE); // TRUE = caused by automatic update
+ GetDocFunc().DetectiveRefresh(TRUE); // TRUE = caused by automatic update
}
- aDocument.SetDetectiveDirty(FALSE); // always reset, also if not refreshed
+ aDocument.SetDetectiveDirty(FALSE); // always reset, also if not refreshed
}
// #b6697848# notify UNO objects after BCA_BRDCST_ALWAYS etc.
@@ -2692,9 +2692,9 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ )
}
}
-// SetDrawModified - ohne Formel-Update
-// (Drawing muss auch beim normalen SetDocumentModified upgedated werden,
-// z.B. bei Tabelle loeschen etc.)
+// SetDrawModified - ohne Formel-Update
+// (Drawing muss auch beim normalen SetDocumentModified upgedated werden,
+// z.B. bei Tabelle loeschen etc.)
void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ )
{
@@ -2727,7 +2727,7 @@ void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ )
if ( aDocument.IsChartListenerCollectionNeedsUpdate() )
{
aDocument.UpdateChartListenerCollection();
- SFX_APP()->Broadcast(SfxSimpleHint( SC_HINT_DRAW_CHANGED )); // Navigator
+ SFX_APP()->Broadcast(SfxSimpleHint( SC_HINT_DRAW_CHANGED )); // Navigator
}
SC_MOD()->AnythingChanged();
}
@@ -2757,7 +2757,7 @@ SfxDocumentInfoDialog* __EXPORT ScDocShell::CreateDocumentInfoDialog(
Window *pParent, const SfxItemSet &rSet )
{
SfxDocumentInfoDialog* pDlg = new SfxDocumentInfoDialog( pParent, rSet );
- ScDocShell* pDocSh = PTR_CAST(ScDocShell,SfxObjectShell::Current());
+ ScDocShell* pDocSh = PTR_CAST(ScDocShell,SfxObjectShell::Current());
//nur mit Statistik, wenn dieses Doc auch angezeigt wird, nicht
//aus dem Doc-Manager
@@ -2766,7 +2766,7 @@ SfxDocumentInfoDialog* __EXPORT ScDocShell::CreateDocumentInfoDialog(
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
- ::CreateTabPage ScDocStatPageCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_STAT );
+ ::CreateTabPage ScDocStatPageCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_STAT );
DBG_ASSERT(ScDocStatPageCreate, "Tabpage create fail!");
pDlg->AddTabPage( 42,
ScGlobal::GetRscString( STR_DOC_STAT ),
@@ -2778,7 +2778,7 @@ SfxDocumentInfoDialog* __EXPORT ScDocShell::CreateDocumentInfoDialog(
Window* ScDocShell::GetActiveDialogParent()
{
- ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
+ ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
if ( pViewSh )
return pViewSh->GetDialogParent();
else
@@ -2947,7 +2947,7 @@ ScDocShellModificator::~ScDocShellModificator()
ScDocument* pDoc = rDocShell.GetDocument();
pDoc->SetAutoCalcShellDisabled( bAutoCalcShellDisabled );
if ( !bAutoCalcShellDisabled && rDocShell.IsDocumentModifiedPending() )
- rDocShell.SetDocumentModified(); // last one shuts off the lights
+ rDocShell.SetDocumentModified(); // last one shuts off the lights
pDoc->DisableIdle( bIdleDisabled );
}
@@ -2991,7 +2991,7 @@ bool ScDocShell::IsChangeRecording() const
return pChangeTrack != NULL;
}
-
+
bool ScDocShell::HasChangeRecordProtection() const
{
bool bRes = false;
@@ -3001,7 +3001,7 @@ bool ScDocShell::HasChangeRecordProtection() const
return bRes;
}
-
+
void ScDocShell::SetChangeRecording( bool bActivate )
{
bool bOldChangeRecording = IsChangeRecording();
@@ -3027,9 +3027,9 @@ void ScDocShell::SetChangeRecording( bool bActivate )
if (pBindings)
pBindings->InvalidateAll(FALSE);
}
-}
-
+}
+
bool ScDocShell::SetProtectionPassword( const String &rNewPassword )
{
bool bRes = false;
@@ -3042,7 +3042,7 @@ bool ScDocShell::SetProtectionPassword( const String &rNewPassword )
{
// when password protection is applied change tracking must always be active
SetChangeRecording( true );
-
+
::com::sun::star::uno::Sequence< sal_Int8 > aProtectionHash;
SvPasswordHelper::GetHashPassword( aProtectionHash, rNewPassword );
pChangeTrack->SetProtection( aProtectionHash );
@@ -3061,9 +3061,9 @@ bool ScDocShell::SetProtectionPassword( const String &rNewPassword )
}
return bRes;
-}
-
+}
+
bool ScDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash )
{
bool bRes = false;
@@ -3074,8 +3074,8 @@ bool ScDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal
bRes = true;
}
return bRes;
-}
-
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index ab567f7d23df..8686cc787c14 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.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
@@ -80,12 +80,12 @@ BOOL __EXPORT ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xSt
BOOL bRet = SfxObjectShell::InitNew( xStor );
aDocument.MakeTable(0);
- // zusaetzliche Tabellen werden von der ersten View angelegt,
- // wenn bIsEmpty dann noch TRUE ist
+ // zusaetzliche Tabellen werden von der ersten View angelegt,
+ // wenn bIsEmpty dann noch TRUE ist
if( bRet )
{
- Size aSize( (long) ( STD_COL_WIDTH * HMM_PER_TWIPS * OLE_STD_CELLS_X ),
+ Size aSize( (long) ( STD_COL_WIDTH * HMM_PER_TWIPS * OLE_STD_CELLS_X ),
(long) ( ScGlobal::nStdRowHeight * HMM_PER_TWIPS * OLE_STD_CELLS_Y ) );
// hier muss auch der Start angepasst werden
SetVisAreaOrSize( Rectangle( Point(), aSize ), TRUE );
@@ -99,7 +99,7 @@ BOOL __EXPORT ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xSt
aDocument.GetStyleSheetPool()->CreateStandardStyles();
aDocument.UpdStlShtPtrsFrmNms();
- // SetDocumentModified ist in Load/InitNew nicht mehr erlaubt!
+ // SetDocumentModified ist in Load/InitNew nicht mehr erlaubt!
InitItems();
CalcOutputFactor();
@@ -109,14 +109,14 @@ BOOL __EXPORT ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xSt
aArgs[ 0 ] <<= GetModel();
aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Globals" ) ), aArgs );
GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
- // Fake ThisComponent being setup by Activate ( which is a view
- // related thing ),
+ // Fake ThisComponent being setup by Activate ( which is a view
+ // related thing ),
// a) if another document is opened then in theory ThisComponent
- // will be reset as before,
+ // will be reset as before,
// b) when this document is 'really' Activated then ThisComponent
// again will be set as before
// The only wrinkle seems if this document is loaded 'InVisible'
- // but.. I don't see that this is possible from the vba API
+ // but.. I don't see that this is possible from the vba API
// I could be wrong though
// There may be implications setting the current component
// too early :-/ so I will just manually set the Basic Variables
@@ -150,7 +150,7 @@ void ScDocShell::InitItems()
// if ( pImpl->pFontList )
// delete pImpl->pFontList;
- // Druck-Optionen werden beim Drucken und evtl. in GetPrinter gesetzt
+ // Druck-Optionen werden beim Drucken und evtl. in GetPrinter gesetzt
// pImpl->pFontList = new FontList( GetPrinter(), Application::GetDefaultDevice() );
//PutItem( SvxFontListItem( pImpl->pFontList, SID_ATTR_CHAR_FONTLIST ) );
@@ -166,23 +166,23 @@ void ScDocShell::InitItems()
PutItem( SvxDashListItem ( pDrawLayer->GetDashList(), SID_DASH_LIST ) );
PutItem( SvxLineEndListItem ( pDrawLayer->GetLineEndList(), SID_LINEEND_LIST ) );
- // andere Anpassungen nach dem Anlegen des DrawLayers
+ // andere Anpassungen nach dem Anlegen des DrawLayers
pDrawLayer->SetNotifyUndoActionHdl( LINK( pDocFunc, ScDocFunc, NotifyDrawUndo ) );
//if (SfxObjectShell::HasSbxObject())
- pDrawLayer->UpdateBasic(); // DocShell-Basic in DrawPages setzen
+ pDrawLayer->UpdateBasic(); // DocShell-Basic in DrawPages setzen
}
else
{
- // always use global color table instead of local copy
+ // always use global color table instead of local copy
PutItem( SvxColorTableItem( XColorTable::GetStdColorTable(), SID_COLOR_TABLE ) );
}
if ( !aDocument.GetForbiddenCharacters().is() ||
!aDocument.IsValidAsianCompression() || !aDocument.IsValidAsianKerning() )
{
- // get settings from SvxAsianConfig
+ // get settings from SvxAsianConfig
SvxAsianConfig aAsian( sal_False );
if ( !aDocument.GetForbiddenCharacters().is() )
@@ -218,7 +218,7 @@ void ScDocShell::InitItems()
if ( !aDocument.IsValidAsianKerning() )
{
// set asian punctuation kerning from configuration if not already set (e.g. XML import)
- aDocument.SetAsianKerning( !aAsian.IsKerningWesternTextOnly() ); // reversed
+ aDocument.SetAsianKerning( !aAsian.IsKerningWesternTextOnly() ); // reversed
}
}
}
@@ -255,7 +255,7 @@ ScDrawLayer* ScDocShell::MakeDrawLayer()
aDocument.InitDrawLayer(this);
pDrawLayer = aDocument.GetDrawLayer();
- InitItems(); // incl. Undo und Basic
+ InitItems(); // incl. Undo und Basic
Broadcast( SfxSimpleHint( SC_HINT_DRWLAYER_NEW ) );
if (nDocumentLock)
pDrawLayer->setLock(TRUE);
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 8e0719ad328b..9af5d7771385 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.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
@@ -88,15 +88,15 @@
//------------------------------------------------------------------
//
-// Redraw - Benachrichtigungen
+// Redraw - Benachrichtigungen
//
void ScDocShell::PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddress& rCursorPos )
{
-// Broadcast( ScEditViewHint( pEditEngine, rCursorPos ) );
+// Broadcast( ScEditViewHint( pEditEngine, rCursorPos ) );
- // Test: nur aktive ViewShell
+ // Test: nur aktive ViewShell
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
if (pViewSh && pViewSh->GetViewData()->GetDocShell() == this)
@@ -111,8 +111,8 @@ void ScDocShell::PostDataChanged()
Broadcast( SfxSimpleHint( FID_DATACHANGED ) );
aDocument.ResetChanged( ScRange(0,0,0,MAXCOL,MAXROW,MAXTAB) );
- SFX_APP()->Broadcast(SfxSimpleHint( FID_ANYDATACHANGED )); // Navigator
- //! Navigator direkt benachrichtigen!
+ SFX_APP()->Broadcast(SfxSimpleHint( FID_ANYDATACHANGED )); // Navigator
+ //! Navigator direkt benachrichtigen!
}
void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
@@ -157,10 +157,10 @@ void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
if ( nStartCol != 0 || nEndCol != MAXCOL )
{
- // Extend to whole rows if SC_PF_WHOLEROWS is set, or rotated or non-left
- // aligned cells are contained (see UpdatePaintExt).
- // Special handling for RTL text (#i9731#) is unnecessary now with full
- // support of right-aligned text.
+ // Extend to whole rows if SC_PF_WHOLEROWS is set, or rotated or non-left
+ // aligned cells are contained (see UpdatePaintExt).
+ // Special handling for RTL text (#i9731#) is unnecessary now with full
+ // support of right-aligned text.
if ( ( nExtFlags & SC_PF_WHOLEROWS ) ||
aDocument.HasAttrib( nStartCol,nStartRow,nStartTab,
@@ -209,8 +209,8 @@ void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, const ScRange& rRange )
{
if ( ( rExtFlags & SC_PF_LINES ) == 0 && aDocument.HasAttrib( rRange, HASATTR_PAINTEXT ) )
{
- // If the range contains lines, shadow or conditional formats,
- // set SC_PF_LINES to include one extra cell in all directions.
+ // If the range contains lines, shadow or conditional formats,
+ // set SC_PF_LINES to include one extra cell in all directions.
rExtFlags |= SC_PF_LINES;
}
@@ -219,11 +219,11 @@ void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, const ScRange& rRange )
( rRange.aStart.Col() != 0 || rRange.aEnd.Col() != MAXCOL ) &&
aDocument.HasAttrib( rRange, HASATTR_ROTATE | HASATTR_RIGHTORCENTER ) )
{
- // If the range contains (logically) right- or center-aligned cells,
- // or rotated cells, set SC_PF_WHOLEROWS to paint the whole rows.
- // This test isn't needed after the cell changes, because it's also
- // tested in PostPaint. UpdatePaintExt may later be changed to do this
- // only if called before the changes.
+ // If the range contains (logically) right- or center-aligned cells,
+ // or rotated cells, set SC_PF_WHOLEROWS to paint the whole rows.
+ // This test isn't needed after the cell changes, because it's also
+ // tested in PostPaint. UpdatePaintExt may later be changed to do this
+ // only if called before the changes.
rExtFlags |= SC_PF_WHOLEROWS;
}
@@ -240,7 +240,7 @@ void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStar
void ScDocShell::LockPaint_Impl(BOOL bDoc)
{
if ( !pPaintLockData )
- pPaintLockData = new ScPaintLockData(0); //! Modus...
+ pPaintLockData = new ScPaintLockData(0); //! Modus...
pPaintLockData->IncLevel(bDoc);
}
@@ -252,10 +252,10 @@ void ScDocShell::UnlockPaint_Impl(BOOL bDoc)
pPaintLockData->DecLevel(bDoc);
if (!pPaintLockData->GetLevel(!bDoc) && !pPaintLockData->GetLevel(bDoc))
{
- // Paint jetzt ausfuehren
+ // Paint jetzt ausfuehren
ScPaintLockData* pPaint = pPaintLockData;
- pPaintLockData = NULL; // nicht weitersammeln
+ pPaintLockData = NULL; // nicht weitersammeln
ScRangeListRef xRangeList = pPaint->GetRangeList();
if (xRangeList)
@@ -264,7 +264,7 @@ void ScDocShell::UnlockPaint_Impl(BOOL bDoc)
ULONG nCount = xRangeList->Count();
for ( ULONG i=0; i<nCount; i++ )
{
- //! nExtFlags ???
+ //! nExtFlags ???
ScRange aRange = *xRangeList->GetObject(i);
PostPaint( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aStart.Tab(),
aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aEnd.Tab(),
@@ -313,17 +313,17 @@ USHORT ScDocShell::GetLockCount() const
void ScDocShell::SetLockCount(USHORT nNew)
{
- if (nNew) // setzen
+ if (nNew) // setzen
{
if ( !pPaintLockData )
- pPaintLockData = new ScPaintLockData(0); //! Modus...
+ pPaintLockData = new ScPaintLockData(0); //! Modus...
pPaintLockData->SetLevel(nNew-1, TRUE);
LockDocument_Impl(nNew);
}
- else if (pPaintLockData) // loeschen
+ else if (pPaintLockData) // loeschen
{
- pPaintLockData->SetLevel(0, TRUE); // bei Unlock sofort ausfuehren
- UnlockPaint_Impl(TRUE); // jetzt
+ pPaintLockData->SetLevel(0, TRUE); // bei Unlock sofort ausfuehren
+ UnlockPaint_Impl(TRUE); // jetzt
UnlockDocument_Impl(0);
}
}
@@ -372,7 +372,7 @@ void ScDocShell::CalcOutputFactor()
{
if (bIsInplace)
{
- nPrtToScreenFactor = 1.0; // passt sonst nicht zur inaktiven Darstellung
+ nPrtToScreenFactor = 1.0; // passt sonst nicht zur inaktiven Darstellung
return;
}
@@ -393,10 +393,10 @@ void ScDocShell::CalcOutputFactor()
Font aDefFont;
OutputDevice* pRefDev = GetRefDevice();
MapMode aOldMode = pRefDev->GetMapMode();
- Font aOldFont = pRefDev->GetFont();
+ Font aOldFont = pRefDev->GetFont();
pRefDev->SetMapMode(MAP_PIXEL);
- pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, pRefDev); // font color doesn't matter here
+ pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, pRefDev); // font color doesn't matter here
pRefDev->SetFont(aDefFont);
nPrinterWidth = pRefDev->PixelToLogic( Size( pRefDev->GetTextWidth(aTestString), 0 ), MAP_100TH_MM ).Width();
pRefDev->SetFont(aOldFont);
@@ -404,7 +404,7 @@ void ScDocShell::CalcOutputFactor()
VirtualDevice aVirtWindow( *Application::GetDefaultDevice() );
aVirtWindow.SetMapMode(MAP_PIXEL);
- pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, &aVirtWindow); // font color doesn't matter here
+ pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, &aVirtWindow); // font color doesn't matter here
aVirtWindow.SetFont(aDefFont);
nWindowWidth = aVirtWindow.GetTextWidth(aTestString);
nWindowWidth = (long) ( nWindowWidth / ScGlobal::nScreenPPTX * HMM_PER_TWIPS );
@@ -427,7 +427,7 @@ double ScDocShell::GetOutputFactor() const
void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and Load
{
- // Einstellungen aus dem SpellCheckCfg kommen in Doc- und ViewOptions
+ // Einstellungen aus dem SpellCheckCfg kommen in Doc- und ViewOptions
USHORT nDefLang, nCjkLang, nCtlLang;
BOOL bAutoSpell;
@@ -452,14 +452,14 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L
aDocument.SetDocOptions( aDocOpt );
aDocument.SetViewOptions( aViewOpt );
- // Druck-Optionen werden jetzt direkt vor dem Drucken gesetzt
+ // Druck-Optionen werden jetzt direkt vor dem Drucken gesetzt
aDocument.SetLanguage( (LanguageType) nDefLang, (LanguageType) nCjkLang, (LanguageType) nCtlLang );
}
//---------------------------------------------------------------------
-Printer* ScDocShell::GetDocumentPrinter() // fuer OLE
+Printer* ScDocShell::GetDocumentPrinter() // fuer OLE
{
return aDocument.GetPrinter();
}
@@ -517,7 +517,7 @@ USHORT ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags )
SfxViewShell* pSh = pFrame->GetViewShell();
if (pSh && pSh->ISA(ScTabViewShell))
{
- ScTabViewShell* pViewSh = (ScTabViewShell*)pSh;
+ ScTabViewShell* pViewSh = (ScTabViewShell*)pSh;
ScInputHandler* pInputHdl = pScMod->GetInputHdl(pViewSh);
if (pInputHdl)
pInputHdl->UpdateRefDevice();
@@ -533,17 +533,17 @@ USHORT ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags )
{
pOldPrinter->SetJobSetup( pNewPrinter->GetJobSetup() );
- // #i6706# Call SetPrinter with the old printer again, so the drawing layer
- // RefDevice is set (calling ReformatAllTextObjects and rebuilding charts),
- // because the JobSetup (printer device settings) may affect text layout.
+ // #i6706# Call SetPrinter with the old printer again, so the drawing layer
+ // RefDevice is set (calling ReformatAllTextObjects and rebuilding charts),
+ // because the JobSetup (printer device settings) may affect text layout.
aDocument.SetPrinter( pOldPrinter );
- CalcOutputFactor(); // also with the new settings
+ CalcOutputFactor(); // also with the new settings
}
}
if (nDiffFlags & SFX_PRINTER_OPTIONS)
{
- aDocument.SetPrintOptions(); //! aus neuem Printer ???
+ aDocument.SetPrintOptions(); //! aus neuem Printer ???
}
if (nDiffFlags & (SFX_PRINTER_CHG_ORIENTATION | SFX_PRINTER_CHG_SIZE))
@@ -566,7 +566,7 @@ USHORT ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags )
aNewItem.SetLandscape( bNewLand );
rSet.Put( aNewItem );
- // Groesse umdrehen
+ // Groesse umdrehen
Size aOldSize = ((const SvxSizeItem&)rSet.Get(ATTR_PAGE_SIZE)).GetSize();
Size aNewSize(aOldSize.Height(),aOldSize.Width());
SvxSizeItem aNewSItem(ATTR_PAGE_SIZE,aNewSize);
@@ -575,7 +575,7 @@ USHORT ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags )
}
if (nDiffFlags & SFX_PRINTER_CHG_SIZE)
{
- SvxSizeItem aPaperSizeItem( ATTR_PAGE_SIZE, SvxPaperInfo::GetPaperSize(pNewPrinter) );
+ SvxSizeItem aPaperSizeItem( ATTR_PAGE_SIZE, SvxPaperInfo::GetPaperSize(pNewPrinter) );
rSet.Put( aPaperSizeItem );
}
}
@@ -604,7 +604,7 @@ ScChangeAction* ScDocShell::GetChangeAction( const ScAddress& rPos )
while (pAction)
{
ScChangeActionType eType = pAction->GetType();
- //! ScViewUtil::IsActionShown( *pAction, *pSettings, *pDoc )...
+ //! ScViewUtil::IsActionShown( *pAction, *pSettings, *pDoc )...
if ( pAction->IsVisible() && eType != SC_CAT_DELETE_TABS )
{
const ScBigRange& rBig = pAction->GetBigRange();
@@ -619,7 +619,7 @@ ScChangeAction* ScDocShell::GetChangeAction( const ScAddress& rPos )
if ( aRange.In( rPos ) )
{
- pFound = pAction; // der letzte gewinnt
+ pFound = pAction; // der letzte gewinnt
switch ( pAction->GetType() )
{
case SC_CAT_CONTENT :
@@ -659,10 +659,10 @@ void ScDocShell::SetChangeComment( ScChangeAction* pAction, const String& rComme
if (pAction)
{
pAction->SetComment( rComment );
- //! Undo ???
+ //! Undo ???
SetDocumentModified();
- // Dialog-Notify
+ // Dialog-Notify
ScChangeTrack* pTrack = GetDocument()->GetChangeTrack();
if (pTrack)
{
@@ -674,7 +674,7 @@ void ScDocShell::SetChangeComment( ScChangeAction* pAction, const String& rComme
void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,BOOL bPrevNext)
{
- if (!pAction) return; // ohne Aktion ist nichts..
+ if (!pAction) return; // ohne Aktion ist nichts..
String aComment = pAction->GetComment();
String aAuthor = pAction->GetUser();
@@ -708,7 +708,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc )
ScChangeTrack* pTrack = aDocument.GetChangeTrack();
if ( pTrack && pTrack->GetFirst() )
{
- //! Changes vorhanden -> Nachfrage ob geloescht werden soll
+ //! Changes vorhanden -> Nachfrage ob geloescht werden soll
}
aDocument.EndChangeTracking();
@@ -720,7 +720,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc )
{
aOldUser = pTrack->GetUser();
- // check if comparing to same document
+ // check if comparing to same document
String aThisFile;
const SfxMedium* pThisMed = GetMedium();
@@ -737,9 +737,9 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc )
BOOL bSameDoc = ( aThisFile == aOtherFile && aThisFile.Len() );
if ( !bSameDoc )
{
- // create change actions from comparing with the name of the user
- // who last saved the document
- // (only if comparing different documents)
+ // create change actions from comparing with the name of the user
+ // who last saved the document
+ // (only if comparing different documents)
using namespace ::com::sun::star;
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
@@ -766,7 +766,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc )
//---------------------------------------------------------------------
//
-// Merge (Aenderungen zusammenfuehren)
+// Merge (Aenderungen zusammenfuehren)
//
//---------------------------------------------------------------------
@@ -774,12 +774,12 @@ inline BOOL lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, BOOL
{
return pA && pB &&
pA->GetActionNumber() == pB->GetActionNumber() &&
- pA->GetType() == pB->GetType() &&
- pA->GetUser() == pB->GetUser() &&
+ pA->GetType() == pB->GetType() &&
+ pA->GetUser() == pB->GetUser() &&
(bIgnore100Sec ?
pA->GetDateTimeUTC().IsEqualIgnore100Sec( pB->GetDateTimeUTC() ) :
pA->GetDateTimeUTC() == pB->GetDateTimeUTC());
- // State nicht vergleichen, falls eine alte Aenderung akzeptiert wurde
+ // State nicht vergleichen, falls eine alte Aenderung akzeptiert wurde
}
bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument* pSearchDoc, const ScChangeAction* pFirstSearchAction, const ScChangeAction* pLastSearchAction, BOOL bIgnore100Sec )
@@ -824,11 +824,11 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
ScChangeTrack* pSourceTrack = rOtherDoc.GetChangeTrack();
if (!pSourceTrack)
- return; //! nichts zu tun - Fehlermeldung?
+ return; //! nichts zu tun - Fehlermeldung?
ScChangeTrack* pThisTrack = aDocument.GetChangeTrack();
if ( !pThisTrack )
- { // anschalten
+ { // anschalten
aDocument.StartChangeTracking();
pThisTrack = aDocument.GetChangeTrack();
DBG_ASSERT(pThisTrack,"ChangeTracking nicht angeschaltet?");
@@ -845,7 +845,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
BOOL bIgnore100Sec = !pSourceTrack->IsTime100thSeconds() ||
!pThisTrack->IsTime100thSeconds();
- // gemeinsame Ausgangsposition suchen
+ // gemeinsame Ausgangsposition suchen
ULONG nFirstNewNumber = 0;
const ScChangeAction* pSourceAction = pSourceTrack->GetFirst();
const ScChangeAction* pThisAction = pThisTrack->GetFirst();
@@ -856,10 +856,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
pSourceAction = pSourceAction->GetNext();
pThisAction = pThisAction->GetNext();
}
- // pSourceAction und pThisAction zeigen jetzt auf die ersten "eigenen" Aktionen
- // Die gemeinsamen Aktionen davor interessieren ueberhaupt nicht
+ // pSourceAction und pThisAction zeigen jetzt auf die ersten "eigenen" Aktionen
+ // Die gemeinsamen Aktionen davor interessieren ueberhaupt nicht
- //! Abfrage, ob die Dokumente vor dem Change-Tracking gleich waren !!!
+ //! Abfrage, ob die Dokumente vor dem Change-Tracking gleich waren !!!
const ScChangeAction* pFirstMergeAction = pSourceAction;
@@ -868,7 +868,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
// #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong
const ScChangeAction* pLastSearchAction = pThisTrack->GetLast();
- // MergeChangeData aus den folgenden Aktionen erzeugen
+ // MergeChangeData aus den folgenden Aktionen erzeugen
ULONG nNewActionCount = 0;
const ScChangeAction* pCount = pSourceAction;
while ( pCount )
@@ -878,8 +878,8 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
pCount = pCount->GetNext();
}
if (!nNewActionCount)
- return; //! nichts zu tun - Fehlermeldung?
- // ab hier kein return mehr
+ return; //! nichts zu tun - Fehlermeldung?
+ // ab hier kein return mehr
ScProgress aProgress( this,
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("...")),
@@ -889,8 +889,8 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
// UpdateReference-Undo, gueltige Referenzen fuer den letzten gemeinsamen Zustand
pSourceTrack->MergePrepare( (ScChangeAction*) pFirstMergeAction, bShared );
- // MergeChangeData an alle noch folgenden Aktionen in diesem Dokument anpassen
- // -> Referenzen gueltig fuer dieses Dokument
+ // MergeChangeData an alle noch folgenden Aktionen in diesem Dokument anpassen
+ // -> Referenzen gueltig fuer dieses Dokument
while ( pThisAction )
{
// #i87049# [Collaboration] Conflict between delete row and insert content is not merged correctly
@@ -910,7 +910,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
{
const ScChangeActionDel* pDel = (const ScChangeActionDel*) pThisAction;
if ( pDel->IsTopDelete() && !pDel->IsTabDeleteCol() )
- { // deleted Table enthaelt deleted Cols, die nicht
+ { // deleted Table enthaelt deleted Cols, die nicht
ULONG nStart, nEnd;
pSourceTrack->AppendDeleteRange(
pDel->GetOverAllRange().MakeRange(), NULL, nStart, nEnd );
@@ -935,7 +935,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
LockPaint(); // #i73877# no repainting after each action
- // MergeChangeData in das aktuelle Dokument uebernehmen
+ // MergeChangeData in das aktuelle Dokument uebernehmen
BOOL bHasRejected = FALSE;
String aOldUser = pThisTrack->GetUser();
pThisTrack->SetUseFixDateTime( TRUE );
@@ -968,10 +968,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
//! muss hier noch festgestellt werden, ob wirklich in
//! _diesem_ Dokument geloescht?
- // liegt in einem Bereich, der in diesem Dokument geloescht wurde
- // -> wird weggelassen
- //! ??? Loesch-Aktion rueckgaengig machen ???
- //! ??? Aktion irgendwo anders speichern ???
+ // liegt in einem Bereich, der in diesem Dokument geloescht wurde
+ // -> wird weggelassen
+ //! ??? Loesch-Aktion rueckgaengig machen ???
+ //! ??? Aktion irgendwo anders speichern ???
#ifdef DBG_UTIL
String aValue;
if ( eSourceType == SC_CAT_CONTENT )
@@ -983,7 +983,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
}
else
{
- //! Datum/Autor/Kommentar der Source-Aktion uebernehmen!
+ //! Datum/Autor/Kommentar der Source-Aktion uebernehmen!
pThisTrack->SetUser( pSourceAction->GetUser() );
pThisTrack->SetFixDateTimeUTC( pSourceAction->GetDateTimeUTC() );
@@ -1009,16 +1009,16 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
}
else
{
- // alte Aktion (aus den gemeinsamen) ablehnen
+ // alte Aktion (aus den gemeinsamen) ablehnen
ScChangeAction* pOldAction = pThisTrack->GetAction( nReject );
if (pOldAction && pOldAction->GetState() == SC_CAS_VIRGIN)
{
- //! was passiert bei Aktionen, die in diesem Dokument accepted worden sind???
- //! Fehlermeldung oder was???
- //! oder Reject-Aenderung normal ausfuehren
+ //! was passiert bei Aktionen, die in diesem Dokument accepted worden sind???
+ //! Fehlermeldung oder was???
+ //! oder Reject-Aenderung normal ausfuehren
pThisTrack->Reject(pOldAction);
- bHasRejected = TRUE; // fuer Paint
+ bHasRejected = TRUE; // fuer Paint
}
bExecute = false;
}
@@ -1026,15 +1026,15 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
if ( bExecute )
{
- // normal ausfuehren
+ // normal ausfuehren
ScRange aSourceRange = pSourceAction->GetBigRange().MakeRange();
rMarkData.SelectOneTable( aSourceRange.aStart.Tab() );
switch ( eSourceType )
{
case SC_CAT_CONTENT:
{
- //! Test, ob es ganz unten im Dokument war, dann automatisches
- //! Zeilen-Einfuegen ???
+ //! Test, ob es ganz unten im Dokument war, dann automatisches
+ //! Zeilen-Einfuegen ???
DBG_ASSERT( aSourceRange.aStart == aSourceRange.aEnd, "huch?" );
ScAddress aPos = aSourceRange.aStart;
@@ -1063,7 +1063,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
EMPTY_STRING, formula::FormulaGrammar::GRAM_DEFAULT );
}
break;
- case MM_REFERENCE : // do nothing
+ case MM_REFERENCE : // do nothing
break;
case MM_FAKE :
DBG_WARNING( "MergeDocument: MatrixFlag MM_FAKE" );
@@ -1114,7 +1114,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
{
const ScChangeActionDel* pDel = (const ScChangeActionDel*) pSourceAction;
if ( pDel->IsTopDelete() && !pDel->IsTabDeleteCol() )
- { // deleted Table enthaelt deleted Cols, die nicht
+ { // deleted Table enthaelt deleted Cols, die nicht
aSourceRange = pDel->GetOverAllRange().MakeRange();
GetDocFunc().DeleteCells( aSourceRange, NULL, DEL_DELCOLS, TRUE, FALSE );
}
@@ -1192,10 +1192,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
pThisTrack->SetUser(aOldUser);
pThisTrack->SetUseFixDateTime( FALSE );
- pSourceTrack->Clear(); //! der ist jetzt verhunzt
+ pSourceTrack->Clear(); //! der ist jetzt verhunzt
if (bHasRejected)
- PostPaintGridAll(); // Reject() paintet nicht selber
+ PostPaintGridAll(); // Reject() paintet nicht selber
UnlockPaint();
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 6abc194aa105..353fff9043d4 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.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
@@ -38,7 +38,7 @@ using namespace ::com::sun::star;
// INCLUDE ---------------------------------------------------------------
#if STLPORT_VERSION>=321
-#include <math.h> // prevent conflict between exception and std::exception
+#include <math.h> // prevent conflict between exception and std::exception
#endif
#include "scitems.hxx"
@@ -107,7 +107,7 @@ using namespace ::com::sun::star;
#include "reffact.hxx"
#include "chartlis.hxx"
#include "waitoff.hxx"
-#include "tablink.hxx" // ScDocumentLoader statics
+#include "tablink.hxx" // ScDocumentLoader statics
#include "drwlayer.hxx"
#include "docoptio.hxx"
#include "undostyl.hxx"
@@ -137,17 +137,17 @@ using namespace ::com::sun::star;
#define IS_AVAILABLE(WhichId,ppItem) \
(pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET)
-#define SC_PREVIEW_SIZE_X 10000
-#define SC_PREVIEW_SIZE_Y 12400
+#define SC_PREVIEW_SIZE_X 10000
+#define SC_PREVIEW_SIZE_Y 12400
//------------------------------------------------------------------
void ScDocShell::Execute( SfxRequest& rReq )
{
- // SID_SC_RANGE (Range),
- // SID_SC_CELLTEXT (CellText),
- // SID_SC_CELLS (Cells) - removed (old Basic)
+ // SID_SC_RANGE (Range),
+ // SID_SC_CELLTEXT (CellText),
+ // SID_SC_CELLS (Cells) - removed (old Basic)
const SfxItemSet* pReqArgs = rReq.GetArgs();
SfxBindings* pBindings = GetViewBindings();
@@ -167,7 +167,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
IS_AVAILABLE( FN_PARAM_3, &pTabItem ) &&
IS_AVAILABLE( SID_SC_SETTEXT, &pTextItem ) )
{
- // Parameter sind 1-based !!!
+ // Parameter sind 1-based !!!
SCCOL nCol = ((SfxInt16Item*)pColItem)->GetValue() - 1;
SCROW nRow = ((SfxInt32Item*)pRowItem)->GetValue() - 1;
SCTAB nTab = ((SfxInt16Item*)pTabItem)->GetValue() - 1;
@@ -186,9 +186,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
rReq.Done();
break;
}
- else // geschuetzte Zelle
+ else // geschuetzte Zelle
{
- SbxBase::SetError( SbxERR_BAD_PARAMETER ); //! welchen Fehler ?
+ SbxBase::SetError( SbxERR_BAD_PARAMETER ); //! welchen Fehler ?
break;
}
}
@@ -198,13 +198,13 @@ void ScDocShell::Execute( SfxRequest& rReq )
break;
- // SID_SBA_QRY_CHANGETARGET gibts nicht mehr - auch in idl raus
+ // SID_SBA_QRY_CHANGETARGET gibts nicht mehr - auch in idl raus
case SID_SBA_IMPORT:
{
if (pReqArgs)
{
- const sal_Unicode cSbaSep = 11; // Trennzeichen
+ const sal_Unicode cSbaSep = 11; // Trennzeichen
const SfxPoolItem* pItem;
String sSbaData, sTarget;
@@ -213,7 +213,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
if ( pReqArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET )
sTarget = ((const SfxStringItem*)pItem)->GetValue();
- BOOL bIsNewArea = TRUE; // Default TRUE (keine Nachfrage)
+ BOOL bIsNewArea = TRUE; // Default TRUE (keine Nachfrage)
if ( pReqArgs->GetItemState( FN_PARAM_2, TRUE, &pItem ) == SFX_ITEM_SET )
bIsNewArea = ((const SfxBoolItem*)pItem)->GetValue();
@@ -222,13 +222,13 @@ void ScDocShell::Execute( SfxRequest& rReq )
if ( pReqArgs->GetItemState( FN_PARAM_3, FALSE, &pItem ) == SFX_ITEM_SET && pItem )
xResultSet.set(((const SfxUsrAnyItem*)pItem)->GetValue(),::com::sun::star::uno::UNO_QUERY);
- String sDBName = sSbaData.GetToken(0,cSbaSep); // Datenbankname
- String sDBTable = sSbaData.GetToken(1,cSbaSep); // Tabellen- oder Query-Name
+ String sDBName = sSbaData.GetToken(0,cSbaSep); // Datenbankname
+ String sDBTable = sSbaData.GetToken(1,cSbaSep); // Tabellen- oder Query-Name
String sTabFlag = sSbaData.GetToken(2,cSbaSep);
- String sDBSql = sSbaData.GetToken(3,cSbaSep); // SQL im Klartext
+ String sDBSql = sSbaData.GetToken(3,cSbaSep); // SQL im Klartext
- BYTE nType = ScDbTable; // "0" oder "1"
- if ( sTabFlag.EqualsAscii("0") ) // "0" = Query, "1" = Table (Default)
+ BYTE nType = ScDbTable; // "0" oder "1"
+ if ( sTabFlag.EqualsAscii("0") ) // "0" = Query, "1" = Table (Default)
nType = ScDbQuery;
SbaSelectionListRef pSelectionList = new SbaSelectionList;
@@ -289,7 +289,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
pSelectionList );
rReq.Done();
- // UpdateImport aktualisiert auch die internen Operationen
+ // UpdateImport aktualisiert auch die internen Operationen
}
else
rReq.Ignore();
@@ -310,12 +310,12 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
ScDocument* pDoc = GetDocument();
// BOOL bUndo (pDoc->IsUndoEnabled());
- const SfxPoolItem* pItem;
- String aChartName, aRangeName;
+ const SfxPoolItem* pItem;
+ String aChartName, aRangeName;
- ScRange aSingleRange;
- ScRangeListRef aRangeListRef;
- BOOL bMultiRange = FALSE;
+ ScRange aSingleRange;
+ ScRangeListRef aRangeListRef;
+ BOOL bMultiRange = FALSE;
BOOL bColHeaders = TRUE;
BOOL bRowHeaders = TRUE;
@@ -349,17 +349,17 @@ void ScDocShell::Execute( SfxRequest& rReq )
if ( aRangeListRef->Count() )
{
bMultiRange = TRUE;
- aSingleRange = *aRangeListRef->GetObject(0); // fuer Header
+ aSingleRange = *aRangeListRef->GetObject(0); // fuer Header
bValid = TRUE;
}
else
aRangeListRef.Clear();
}
- ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
+ ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
if (pViewSh && bValid && aChartName.Len() != 0 )
{
- Window* pParent = pViewSh->GetDialogParent();
+ Window* pParent = pViewSh->GetDialogParent();
SCCOL nCol1 = aSingleRange.aStart.Col();
SCROW nRow1 = aSingleRange.aStart.Row();
@@ -367,7 +367,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
SCROW nRow2 = aSingleRange.aEnd.Row();
SCTAB nTab = aSingleRange.aStart.Tab();
- //! immer oder gar nicht begrenzen ???
+ //! immer oder gar nicht begrenzen ???
if (!bMultiRange)
aDocument.LimitChartArea( nTab, nCol1,nRow1, nCol2,nRow2 );
@@ -407,7 +407,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
delete pDlg;
}
- if (bOk) // ausfuehren
+ if (bOk) // ausfuehren
{
if (bMultiRange)
{
@@ -453,13 +453,13 @@ void ScDocShell::Execute( SfxRequest& rReq )
if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) )
bNewVal = ((const SfxBoolItem*)pItem)->GetValue();
else
- bNewVal = !aDocument.GetAutoCalc(); // Toggle fuer Menue
+ bNewVal = !aDocument.GetAutoCalc(); // Toggle fuer Menue
aDocument.SetAutoCalc( bNewVal );
SetDocumentModified();
if (pBindings)
{
pBindings->Invalidate( FID_AUTO_CALC );
-// pBindings->Invalidate( FID_RECALC ); // jetzt immer enabled
+// pBindings->Invalidate( FID_RECALC ); // jetzt immer enabled
}
rReq.AppendItem( SfxBoolItem( FID_AUTO_CALC, bNewVal ) );
rReq.Done();
@@ -519,8 +519,8 @@ void ScDocShell::Execute( SfxRequest& rReq )
case SID_REIMPORT_AFTER_LOAD:
{
- // wird nach dem Laden aufgerufen, wenn DB-Bereiche mit
- // weggelassenen Daten enthalten sind
+ // wird nach dem Laden aufgerufen, wenn DB-Bereiche mit
+ // weggelassenen Daten enthalten sind
BOOL bDone = FALSE;
ScDBCollection* pDBColl = aDocument.GetDBCollection();
@@ -546,27 +546,27 @@ void ScDocShell::Execute( SfxRequest& rReq )
pDBData->GetArea(aRange);
pViewSh->MarkRange(aRange);
- // Import und interne Operationen wie SID_REFRESH_DBAREA
- // (Abfrage auf Import hier nicht noetig)
+ // Import und interne Operationen wie SID_REFRESH_DBAREA
+ // (Abfrage auf Import hier nicht noetig)
ScImportParam aImportParam;
pDBData->GetImportParam( aImportParam );
BOOL bContinue = pViewSh->ImportData( aImportParam );
pDBData->SetImportParam( aImportParam );
- // markieren (Groesse kann sich geaendert haben)
+ // markieren (Groesse kann sich geaendert haben)
pDBData->GetArea(aRange);
pViewSh->MarkRange(aRange);
- if ( bContinue ) // #41905# Fehler beim Import -> Abbruch
+ if ( bContinue ) // #41905# Fehler beim Import -> Abbruch
{
- // interne Operationen, wenn welche gespeichert
+ // interne Operationen, wenn welche gespeichert
if ( pDBData->HasQueryParam() || pDBData->HasSortParam() ||
pDBData->HasSubTotalParam() )
pViewSh->RepeatDB();
- // Pivottabellen die den Bereich als Quelldaten haben
+ // Pivottabellen die den Bereich als Quelldaten haben
RefreshPivotTables(aRange);
}
@@ -579,10 +579,10 @@ void ScDocShell::Execute( SfxRequest& rReq )
if ( !bDone && pDBColl )
{
- // wenn nicht, dann aber die abhaengigen Formeln updaten
+ // wenn nicht, dann aber die abhaengigen Formeln updaten
//! auch fuer einzelne Bereiche, die nicht aktualisiert werden koennen
- aDocument.CalcAll(); //! nur die abhaengigen
+ aDocument.CalcAll(); //! nur die abhaengigen
PostDataChanged();
}
@@ -600,7 +600,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
case SID_GET_COLORTABLE:
{
- // passende ColorTable ist per PutItem gesetzt worden
+ // passende ColorTable ist per PutItem gesetzt worden
SvxColorTableItem* pColItem = (SvxColorTableItem*)GetItem(SID_COLOR_TABLE);
XColorTable* pTable = pColItem->GetColorTable();
rReq.SetReturnValue(OfaPtrItem(SID_GET_COLORTABLE, pTable));
@@ -745,12 +745,12 @@ void ScDocShell::Execute( SfxRequest& rReq )
nVersion = ((const SfxInt16Item*)pItem)->GetValue();
}
- // kein Filter angegeben -> Detection
+ // kein Filter angegeben -> Detection
if ( !aFilterName.Len() )
ScDocumentLoader::GetFilterName( aFileName, aFilterName, aOptions, TRUE, FALSE );
- // filter name from dialog contains application prefix,
- // GetFilter needs name without the prefix.
+ // filter name from dialog contains application prefix,
+ // GetFilter needs name without the prefix.
ScDocumentLoader::RemoveAppPrefix( aFilterName );
const SfxFilter* pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( aFilterName );
@@ -774,7 +774,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
return ;
}
- if ( pMed ) // nun wirklich ausfuehren...
+ if ( pMed ) // nun wirklich ausfuehren...
{
SfxErrorContext aEc( ERRCTX_SFX_OPENDOC, pMed->GetName() );
@@ -783,9 +783,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
pOtherDocSh->DoLoad( pMed );
ULONG nErr = pOtherDocSh->GetErrorCode();
if (nErr)
- ErrorHandler::HandleError( nErr ); // auch Warnings
+ ErrorHandler::HandleError( nErr ); // auch Warnings
- if ( !pOtherDocSh->GetError() ) // nur Errors
+ if ( !pOtherDocSh->GetError() ) // nur Errors
{
BOOL bHadTrack = ( aDocument.GetChangeTrack() != NULL );
ULONG nStart = 0;
@@ -799,7 +799,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
else
MergeDocument( *pOtherDocSh->GetDocument() );
- // show "accept changes" dialog
+ // show "accept changes" dialog
//! get view for this document!
if ( !IsDocShared() )
{
@@ -814,10 +814,10 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
}
- rReq.SetReturnValue( SfxInt32Item( nSlot, 0 ) ); //! ???????
+ rReq.SetReturnValue( SfxInt32Item( nSlot, 0 ) ); //! ???????
rReq.Done();
- if (!bHadTrack) // neu eingeschaltet -> auch anzeigen
+ if (!bHadTrack) // neu eingeschaltet -> auch anzeigen
{
ScChangeViewSettings* pOldSet = aDocument.GetChangeViewSettings();
if ( !pOldSet || !pOldSet->ShowChanges() )
@@ -846,7 +846,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
}
}
- pOtherDocSh->DoClose(); // delete passiert mit der Ref
+ pOtherDocSh->DoClose(); // delete passiert mit der Ref
}
}
break;
@@ -863,12 +863,12 @@ void ScDocShell::Execute( SfxRequest& rReq )
SCTAB nTab;
if (aDocument.GetTable( aName, nTab ))
{
- // DeleteTable von viewfunc nach docfunc verschieben!
+ // DeleteTable von viewfunc nach docfunc verschieben!
ScTabViewShell* pSh = GetBestViewShell();
if ( pSh )
{
- //! SetTabNo in DeleteTable weglassen?
+ //! SetTabNo in DeleteTable weglassen?
SCTAB nDispTab = pSh->GetViewData()->GetTabNo();
pSh->DeleteTable( nTab );
pSh->SetTabNo(nDispTab);
@@ -1238,16 +1238,16 @@ void ScDocShell::DoRecalc( BOOL bApi )
ScInputHandler* pHdl = SC_MOD()->GetInputHdl(pSh);
if ( pHdl && pHdl->IsInputMode() && pHdl->IsFormulaMode() && !bApi )
{
- pHdl->FormulaPreview(); // Teilergebnis als QuickHelp
+ pHdl->FormulaPreview(); // Teilergebnis als QuickHelp
bDone = TRUE;
}
else
{
- pSh->UpdateInputLine(); // InputEnterHandler
+ pSh->UpdateInputLine(); // InputEnterHandler
pSh->UpdateInputHandler();
}
}
- if (!bDone) // sonst Dokument neu berechnen
+ if (!bDone) // sonst Dokument neu berechnen
{
WaitObject aWaitObj( GetActiveDialogParent() );
aDocument.CalcFormulaTree();
@@ -1256,9 +1256,9 @@ void ScDocShell::DoRecalc( BOOL bApi )
aDocument.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
- // #47939# Wenn es Charts gibt, dann alles painten, damit nicht
- // PostDataChanged und die Charts nacheinander kommen und Teile
- // doppelt gepainted werden.
+ // #47939# Wenn es Charts gibt, dann alles painten, damit nicht
+ // PostDataChanged und die Charts nacheinander kommen und Teile
+ // doppelt gepainted werden.
ScChartListenerCollection* pCharts = aDocument.GetChartListenerCollection();
if ( pCharts && pCharts->GetCount() )
@@ -1274,11 +1274,11 @@ void ScDocShell::DoHardRecalc( BOOL /* bApi */ )
ScTabViewShell* pSh = GetBestViewShell();
if ( pSh )
{
- pSh->UpdateInputLine(); // InputEnterHandler
+ pSh->UpdateInputLine(); // InputEnterHandler
pSh->UpdateInputHandler();
}
aDocument.CalcAll();
- GetDocFunc().DetectiveRefresh(); // erzeugt eigenes Undo
+ GetDocFunc().DetectiveRefresh(); // erzeugt eigenes Undo
if ( pSh )
pSh->UpdateCharts(TRUE);
@@ -1346,7 +1346,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
String aNewName = pStyle->GetName();
String aOldName = aNewName;
- BOOL bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert?
+ BOOL bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert?
if (bExtended)
aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName();
@@ -1355,7 +1355,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
SCTAB nTabCount = aDocument.GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
- if (aDocument.GetPageStyle(nTab) == aNewName) // schon auf neu angepasst
+ if (aDocument.GetPageStyle(nTab) == aNewName) // schon auf neu angepasst
{
aDocument.PageStyleModified( nTab, aNewName );
ScPrintFunc aPrintFunc( this, GetPrinter(), nTab );
@@ -1393,14 +1393,14 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint )
if (pList)
pList->RenameCellStyle( aOldName,aNewName );
}
- }
+ }
}
- // alles andere geht ueber Slots...
+ // alles andere geht ueber Slots...
}
-// wie in printfun.cxx
-#define ZOOM_MIN 10
+// wie in printfun.cxx
+#define ZOOM_MIN 10
void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages )
{
@@ -1453,7 +1453,7 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange )
const ScRange* pRepeatCol = aDocument.GetRepeatColRange( nTab );
const ScRange* pRepeatRow = aDocument.GetRepeatRowRange( nTab );
- // benoetigte Skalierung fuer Selektion ausrechnen
+ // benoetigte Skalierung fuer Selektion ausrechnen
USHORT nNewScale = nOldScale;
@@ -1495,7 +1495,7 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange )
aOldPrFunc.GetScaleData( aPhysPage, nHdr, nFtr );
nBlkTwipsY += nHdr + nFtr;
- if ( nBlkTwipsX == 0 ) // #100639# hidden columns/rows may lead to 0
+ if ( nBlkTwipsX == 0 ) // #100639# hidden columns/rows may lead to 0
nBlkTwipsX = 1;
if ( nBlkTwipsY == 0 )
nBlkTwipsY = 1;
@@ -1503,7 +1503,7 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange )
long nNeeded = Min( aPhysPage.Width() * 100 / nBlkTwipsX,
aPhysPage.Height() * 100 / nBlkTwipsY );
if ( nNeeded < ZOOM_MIN )
- nNeeded = ZOOM_MIN; // Begrenzung
+ nNeeded = ZOOM_MIN; // Begrenzung
if ( nNeeded < (long) nNewScale )
nNewScale = (USHORT) nNeeded;
@@ -1528,10 +1528,10 @@ void ScDocShell::PageStyleModified( const String& rStyleName, BOOL bApi )
nUseTab = nTab;
// bei bApi nur, wenn Umbrueche schon angezeigt
- if (ValidTab(nUseTab)) // nicht verwendet -> nichts zu tun
+ if (ValidTab(nUseTab)) // nicht verwendet -> nichts zu tun
{
- ScPrintFunc aPrintFunc( this, GetPrinter(), nUseTab ); //! ohne CountPages auskommen
- if (!aPrintFunc.UpdatePages()) // setzt Umbrueche auf allen Tabs
+ ScPrintFunc aPrintFunc( this, GetPrinter(), nUseTab ); //! ohne CountPages auskommen
+ if (!aPrintFunc.UpdatePages()) // setzt Umbrueche auf allen Tabs
bWarn = TRUE;
if (bWarn && !bApi)
@@ -1556,13 +1556,13 @@ void ScDocShell::PageStyleModified( const String& rStyleName, BOOL bApi )
void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
SfxRequest& rReq,
- SCTAB nCurTab )
+ SCTAB nCurTab )
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
switch ( rReq.GetSlot() )
{
- case SID_STATUS_PAGESTYLE: // Click auf StatusBar-Control
+ case SID_STATUS_PAGESTYLE: // Click auf StatusBar-Control
case SID_FORMATPAGE:
{
if ( pReqArgs != NULL )
@@ -1584,7 +1584,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
if (bUndo)
aOldData.InitFromStyle( pStyleSheet );
- SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
+ SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
@@ -1682,7 +1682,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
}
else
{
- // #69193a# respect "shared" setting
+ // #69193a# respect "shared" setting
if ( !bHeaderOn && bFooterOn )
nResId = bShareFooter ?
RID_SCDLG_HFEDIT_RIGHTFOOTER :
@@ -1772,8 +1772,8 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
}
void ScDocShell::GetStatePageStyle( SfxViewShell& /* rCaller */,
- SfxItemSet& rSet,
- SCTAB nCurTab )
+ SfxItemSet& rSet,
+ SCTAB nCurTab )
{
SfxWhichIter aIter(rSet);
USHORT nWhich = aIter.FirstWhich();
@@ -1787,9 +1787,9 @@ void ScDocShell::GetStatePageStyle( SfxViewShell& /* rCaller */,
case SID_HFEDIT:
{
- String aStr = aDocument.GetPageStyle( nCurTab );
- ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStr, SFX_STYLE_FAMILY_PAGE );
+ String aStr = aDocument.GetPageStyle( nCurTab );
+ ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool();
+ SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStr, SFX_STYLE_FAMILY_PAGE );
DBG_ASSERT( pStyleSheet, "PageStyle not found! :-/" );
@@ -1940,12 +1940,12 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData
return;
}
- delete pOldJobSetup; // gesetzt nur bei Fehler in StartJob()
- pOldJobSetup = new ScJobSetup( pPrinter ); // Einstellungen merken
+ delete pOldJobSetup; // gesetzt nur bei Fehler in StartJob()
+ pOldJobSetup = new ScJobSetup( pPrinter ); // Einstellungen merken
- // Einstellungen fuer die erste gedruckte Seite muessen hier (vor StartJob) gesetzt werden
- //! Selection etc. mit Print() zusammenfassen !!!
- //! Seiten nur einmal zaehlen
+ // Einstellungen fuer die erste gedruckte Seite muessen hier (vor StartJob) gesetzt werden
+ //! Selection etc. mit Print() zusammenfassen !!!
+ //! Seiten nur einmal zaehlen
bool bHasOptions = false;
ScPrintOptions aOptions;
@@ -1959,7 +1959,7 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData
pMarkData, bHasOptions, aOptions, bAllTabs, nTotalPages,
aPageArr, aPageRanges, &pMarkedRange );
- BOOL bFound = FALSE; // erste Seite gefunden
+ BOOL bFound = FALSE; // erste Seite gefunden
long nTabStart = 0;
SCTAB nTabCount = aDocument.GetTableCount();
for ( SCTAB nTab=0; nTab<nTabCount && !bFound; nTab++ )
@@ -1968,15 +1968,15 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData
{
long nNext = nTabStart + aPageArr[nTab];
BOOL bSelected = FALSE;
- for (long nP=nTabStart+1; nP<=nNext; nP++) // 1-basiert
- if (aPageRanges.IsSelected( nP )) // eine Seite von dieser Tabelle selektiert?
+ for (long nP=nTabStart+1; nP<=nNext; nP++) // 1-basiert
+ if (aPageRanges.IsSelected( nP )) // eine Seite von dieser Tabelle selektiert?
bSelected = TRUE;
if (bSelected)
{
ScPrintFunc aPrintFunc( this, pPrinter, nTab );
- aPrintFunc.ApplyPrintSettings(); // dann Settings fuer diese Tabelle
+ aPrintFunc.ApplyPrintSettings(); // dann Settings fuer diese Tabelle
bFound = TRUE;
}
nTabStart = nNext;
@@ -2050,7 +2050,7 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
if ( pPrintDialog && pPrintDialog->IsCollateEnabled() && pPrintDialog->IsCollateChecked() )
nCollateCopies = pPrintDialog->GetCopyCount();
- // test if printed range contains transparent objects
+ // test if printed range contains transparent objects
BOOL bHasTransp = FALSE;
BOOL bAnyPrintRanges = aDocument.HasPrintRange();
@@ -2104,7 +2104,7 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
Rectangle aFull( 0, 0, LONG_MAX, LONG_MAX );
// #114135#
- ScDrawLayer* pModel = aDocument.GetDrawLayer(); // ist nicht NULL
+ ScDrawLayer* pModel = aDocument.GetDrawLayer(); // ist nicht NULL
if(pModel)
{
@@ -2122,7 +2122,7 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
nDisplayStart = 0;
else
nDisplayStart += aPageArr[nTab];
- nAttrPage = aPrintFunc.GetFirstPageNo(); // behalten oder aus Vorlage
+ nAttrPage = aPrintFunc.GetFirstPageNo(); // behalten oder aus Vorlage
delete pDrawView;
}
@@ -2137,7 +2137,7 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
// an odd number of pages, print an empty page between copies, so the first page of
// the second copy isn't printed on the back of the last page of the first copy.
// (same as in Writer ViewShell::Prt)
-
+
// FIXME: needs to be adapted to XRenderable interface
pPrinter->StartPage();
pPrinter->EndPage();
@@ -2151,8 +2151,8 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
if (pOldJobSetup)
{
pPrinter->SetOrientation( pOldJobSetup->eOrientation );
- pPrinter->SetPaperBin ( pOldJobSetup->nPaperBin );
- pPrinter->SetPaper ( pOldJobSetup->ePaper );
+ pPrinter->SetPaperBin ( pOldJobSetup->nPaperBin );
+ pPrinter->SetPaper ( pOldJobSetup->ePaper );
if ( PAPER_USER == pOldJobSetup->ePaper )
{
@@ -2166,15 +2166,15 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
if ( bHasOptions )
{
- // remove PrintOptions from printer ItemSet,
- // so next time the options from the configuration are used
+ // remove PrintOptions from printer ItemSet,
+ // so next time the options from the configuration are used
SfxItemSet aSet( pPrinter->GetOptions() );
aSet.ClearItem( SID_SCPRINTOPTIONS );
pPrinter->SetOptions( aSet );
}
- PostPaintGridAll(); //! nur wenn geaendert
+ PostPaintGridAll(); //! nur wenn geaendert
}
void ScDocShell::GetState( SfxItemSet &rSet )
@@ -2220,13 +2220,13 @@ void ScDocShell::GetState( SfxItemSet &rSet )
}
break;
- // Wenn eine Formel editiert wird, muss FID_RECALC auf jeden Fall enabled sein.
- // Recalc fuer das Doc war mal wegen #29898# disabled, wenn AutoCalc an war,
- // ist jetzt wegen #41540# aber auch immer enabled.
-// case FID_RECALC:
-// if ( aDocument.GetAutoCalc() )
-// rSet.DisableItem( nWhich );
-// break;
+ // Wenn eine Formel editiert wird, muss FID_RECALC auf jeden Fall enabled sein.
+ // Recalc fuer das Doc war mal wegen #29898# disabled, wenn AutoCalc an war,
+ // ist jetzt wegen #41540# aber auch immer enabled.
+// case FID_RECALC:
+// if ( aDocument.GetAutoCalc() )
+// rSet.DisableItem( nWhich );
+// break;
case SID_TABLES_COUNT:
rSet.Put( SfxInt16Item( nWhich, aDocument.GetTableCount() ) );
@@ -2258,25 +2258,25 @@ void ScDocShell::GetState( SfxItemSet &rSet )
void ScDocShell::GetSbxState( SfxItemSet &rSet )
{
- // SID_SC_SELECTION (Selection),
- // SID_SC_ACTIVECELL (ActiveCell),
- // SID_SC_ACTIVETAB (ActiveTable),
- // SID_TABLES_GET (Tables),
- // SID_PIVOT_GET (DataPilotTables) - removed (old Basic)
+ // SID_SC_SELECTION (Selection),
+ // SID_SC_ACTIVECELL (ActiveCell),
+ // SID_SC_ACTIVETAB (ActiveTable),
+ // SID_TABLES_GET (Tables),
+ // SID_PIVOT_GET (DataPilotTables) - removed (old Basic)
//
- // Wenn hier Slots von der View-Shell executed werden, muss auch der
- // GetState weitergeleitet werden!
+ // Wenn hier Slots von der View-Shell executed werden, muss auch der
+ // GetState weitergeleitet werden!
//
- ScTabViewShell* pVisibleSh = GetBestViewShell(); // sichtbare View
+ ScTabViewShell* pVisibleSh = GetBestViewShell(); // sichtbare View
if ( pVisibleSh )
pVisibleSh->GetState( rSet );
}
void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, USHORT nAspect )
{
-// bIsOle = TRUE; // jetzt ueber den CreateMode
+// bIsOle = TRUE; // jetzt ueber den CreateMode
SCTAB nVisTab = aDocument.GetVisibleTab();
if (!aDocument.HasTable(nVisTab))
@@ -2312,14 +2312,14 @@ Rectangle __EXPORT ScDocShell::GetVisArea( USHORT nAspect ) const
SfxObjectCreateMode eShellMode = GetCreateMode();
if ( eShellMode == SFX_CREATE_MODE_ORGANIZER )
{
- // ohne Inhalte wissen wir auch nicht, wie gross die Inhalte sind
- // leeres Rechteck zurueckgeben, das wird dann nach dem Laden berechnet
+ // ohne Inhalte wissen wir auch nicht, wie gross die Inhalte sind
+ // leeres Rechteck zurueckgeben, das wird dann nach dem Laden berechnet
return Rectangle();
}
if( nAspect == ASPECT_THUMBNAIL )
{
-// Rectangle aArea( 0,0, 3175,3175 ); // 120x120 Pixel in 1:1
+// Rectangle aArea( 0,0, 3175,3175 ); // 120x120 Pixel in 1:1
Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X,SC_PREVIEW_SIZE_Y );
BOOL bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() );
if ( bNegativePage )
@@ -2329,7 +2329,7 @@ Rectangle __EXPORT ScDocShell::GetVisArea( USHORT nAspect ) const
}
else if( nAspect == ASPECT_CONTENT && eShellMode != SFX_CREATE_MODE_EMBEDDED )
{
- // Visarea holen wie nach Load
+ // Visarea holen wie nach Load
SCTAB nVisTab = aDocument.GetVisibleTab();
if (!aDocument.HasTable(nVisTab))
@@ -2358,9 +2358,9 @@ Rectangle __EXPORT ScDocShell::GetVisArea( USHORT nAspect ) const
}
void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
- SCTAB nCurTab,
- BOOL& rbHeader,
- BOOL& rbFooter )
+ SCTAB nCurTab,
+ BOOL& rbHeader,
+ BOOL& rbFooter )
{
if ( !pStyleSet )
{
@@ -2381,8 +2381,8 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
//--------------------------------------------------------------------
- const SvxSetItem* pSetItem = NULL;
- const SfxItemSet* pSet = NULL;
+ const SvxSetItem* pSetItem = NULL;
+ const SfxItemSet* pSet = NULL;
pSetItem = (const SvxSetItem*) &pStyleSet->Get( ATTR_PAGE_HEADERSET );
pSet = &pSetItem->GetItemSet();
@@ -2409,7 +2409,7 @@ long __EXPORT ScDocShell::DdeGetData( const String& rItem,
}
ScImportExport aObj( &aDocument, rItem );
if ( !aObj.IsRef() )
- return 0; // ungueltiger Bereich
+ return 0; // ungueltiger Bereich
if( aDdeTextFmt.GetChar(0) == 'F' )
aObj.SetFormulas( TRUE );
@@ -2483,7 +2483,7 @@ long __EXPORT ScDocShell::DdeSetData( const String& rItem,
::sfx2::SvLinkSource* __EXPORT ScDocShell::DdeCreateLinkSource( const String& rItem )
{
- // only check for valid item string - range is parsed again in ScServerObject ctor
+ // only check for valid item string - range is parsed again in ScServerObject ctor
// named range?
String aPos = rItem;
@@ -2497,11 +2497,11 @@ long __EXPORT ScDocShell::DdeSetData( const String& rItem,
if( pData->HasType( RT_REFAREA )
|| pData->HasType( RT_ABSAREA )
|| pData->HasType( RT_ABSPOS ) )
- pData->GetSymbol( aPos ); // continue with the name's contents
+ pData->GetSymbol( aPos ); // continue with the name's contents
}
}
- // Address in DDE function must be always parsed as CONV_OOO so that it
+ // Address in DDE function must be always parsed as CONV_OOO so that it
// would always work regardless of current address convension. We do this
// because the address item in a DDE entry is *not* normalized when saved
// into ODF.
@@ -2509,11 +2509,11 @@ long __EXPORT ScDocShell::DdeSetData( const String& rItem,
bool bValid = ( (aRange.Parse(aPos, &aDocument, formula::FormulaGrammar::CONV_OOO ) & SCA_VALID) ||
(aRange.aStart.Parse(aPos, &aDocument, formula::FormulaGrammar::CONV_OOO) & SCA_VALID) );
- ScServerObject* pObj = NULL; // NULL = error
+ ScServerObject* pObj = NULL; // NULL = error
if ( bValid )
pObj = new ScServerObject( this, rItem );
- // GetLinkManager()->InsertServer() is in the ScServerObject ctor
+ // GetLinkManager()->InsertServer() is in the ScServerObject ctor
return pObj;
}
@@ -2531,7 +2531,7 @@ ScViewData* ScDocShell::GetViewData()
SCTAB ScDocShell::GetCurTab()
{
- //! this must be made non-static and use a ViewShell from this document!
+ //! this must be made non-static and use a ViewShell from this document!
ScViewData* pViewData = GetViewData();
@@ -2559,7 +2559,7 @@ ScTabViewShell* ScDocShell::GetBestViewShell( BOOL bOnlyVisible )
SfxBindings* ScDocShell::GetViewBindings()
{
- // used to invalidate slots after changes to this document
+ // used to invalidate slots after changes to this document
SfxViewShell* pViewSh = GetBestViewShell();
if (pViewSh)
@@ -2570,10 +2570,10 @@ SfxBindings* ScDocShell::GetViewBindings()
//------------------------------------------------------------------
-ScDocShell* ScDocShell::GetShellByNum( USHORT nDocNo ) // static
+ScDocShell* ScDocShell::GetShellByNum( USHORT nDocNo ) // static
{
ScDocShell* pFound = NULL;
- SfxObjectShell* pShell = SfxObjectShell::GetFirst();
+ SfxObjectShell* pShell = SfxObjectShell::GetFirst();
USHORT nShellCnt = 0;
while ( pShell && !pFound )
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index e852ca29a948..676c201a3ed1 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -74,12 +74,12 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
// ---------------------------------------------------------------------------
//
-// former viewfunc/dbfunc methods
+// former viewfunc/dbfunc methods
//
void ScDocShell::ErrorMessage( USHORT nGlobStrId )
{
- //! StopMarking an der (aktiven) View?
+ //! StopMarking an der (aktiven) View?
Window* pParent = GetActiveDialogParent();
ScWaitCursorOff aWaitOff( pParent );
@@ -119,7 +119,7 @@ void ScDocShell::DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCR
ScDBData* lcl_GetDBNearCursor( ScDBCollection* pColl, SCCOL nCol, SCROW nRow, SCTAB nTab )
{
- //! nach document/dbcolect verschieben
+ //! nach document/dbcolect verschieben
if (!pColl)
return NULL;
@@ -143,15 +143,15 @@ ScDBData* lcl_GetDBNearCursor( ScDBCollection* pColl, SCCOL nCol, SCROW nRow, SC
else if ( nCol < nStartCol || nCol > nEndCol || nRow < nStartRow || nRow > nEndRow )
{
if (!pNearData)
- pNearData = pDB; // ersten angrenzenden Bereich merken
+ pNearData = pDB; // ersten angrenzenden Bereich merken
}
else
- return pDB; // nicht "unbenannt" und Cursor steht wirklich drin
+ return pDB; // nicht "unbenannt" und Cursor steht wirklich drin
}
}
if (pNearData)
- return pNearData; // angrenzender, wenn nichts direkt getroffen
- return pNoNameData; // "unbenannt" nur zurueck, wenn sonst nichts gefunden
+ return pNearData; // angrenzender, wenn nichts direkt getroffen
+ return pNoNameData; // "unbenannt" nur zurueck, wenn sonst nichts gefunden
}
ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGetDBSelection eSel )
@@ -167,9 +167,9 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
SCROW nEndRow = rMarked.aEnd.Row();
SCTAB nEndTab = rMarked.aEnd.Tab();
- // Wegen #49655# nicht einfach GetDBAtCursor: Der zusammenhaengende Datenbereich
- // fuer "unbenannt" (GetDataArea) kann neben dem Cursor legen, also muss auch ein
- // benannter DB-Bereich dort gesucht werden.
+ // Wegen #49655# nicht einfach GetDBAtCursor: Der zusammenhaengende Datenbereich
+ // fuer "unbenannt" (GetDataArea) kann neben dem Cursor legen, also muss auch ein
+ // benannter DB-Bereich dort gesucht werden.
ScDBData* pData = aDocument.GetDBAtArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow );
if (!pData)
@@ -182,7 +182,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
BOOL bUseThis = FALSE;
if (pData)
{
- // Bereich nehmen, wenn nichts anderes markiert
+ // Bereich nehmen, wenn nichts anderes markiert
SCTAB nDummy;
SCCOL nOldCol1;
@@ -213,10 +213,10 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
}
aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, bOnlyDown );
if ( nOldCol1 != nStartCol || nOldCol2 != nEndCol || nOldRow1 != nStartRow )
- bUseThis = FALSE; // passt gar nicht
+ bUseThis = FALSE; // passt gar nicht
else if ( nOldRow2 != nEndRow )
{
- // Bereich auf neue End-Zeile erweitern
+ // Bereich auf neue End-Zeile erweitern
pData->SetArea( nTab, nOldCol1,nOldRow1, nOldCol2,nEndRow );
}
}
@@ -224,13 +224,13 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
else
{
if ( nOldCol1 == nStartCol && nOldRow1 == nStartRow &&
- nOldCol2 == nEndCol && nOldRow2 == nEndRow ) // genau markiert?
+ nOldCol2 == nEndCol && nOldRow2 == nEndRow ) // genau markiert?
bUseThis = TRUE;
else
- bUseThis = FALSE; // immer Markierung nehmen (Bug 11964)
+ bUseThis = FALSE; // immer Markierung nehmen (Bug 11964)
}
- // fuer Import nie "unbenannt" nehmen
+ // fuer Import nie "unbenannt" nehmen
if ( bUseThis && eMode == SC_DB_IMPORT && bIsNoName )
bUseThis = FALSE;
@@ -243,20 +243,20 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
}
else if ( eMode == SC_DB_OLD )
{
- pData = NULL; // nichts gefunden
+ pData = NULL; // nichts gefunden
nStartCol = nEndCol = nCol;
nStartRow = nEndRow = nRow;
nStartTab = nEndTab = nTab;
-// bMark = FALSE; // nichts zu markieren
+// bMark = FALSE; // nichts zu markieren
}
else
{
if ( bSelected )
{
-// bMark = FALSE;
+// bMark = FALSE;
}
else
- { // zusammenhaengender Bereich
+ { // zusammenhaengender Bereich
nStartCol = nCol;
nStartRow = nRow;
if (bOnlyDown)
@@ -289,19 +289,19 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
pOldAutoDBRange = new ScDBData( *pNoNameData );
}
- SCCOL nOldX1; // alten Bereich sauber wegnehmen
- SCROW nOldY1; //! (UNDO ???)
+ SCCOL nOldX1; // alten Bereich sauber wegnehmen
+ SCROW nOldY1; //! (UNDO ???)
SCCOL nOldX2;
SCROW nOldY2;
SCTAB nOldTab;
pNoNameData->GetArea( nOldTab, nOldX1, nOldY1, nOldX2, nOldY2 );
DBAreaDeleted( nOldTab, nOldX1, nOldY1, nOldX2, nOldY2 );
- pNoNameData->SetSortParam( ScSortParam() ); // Parameter zuruecksetzen
+ pNoNameData->SetSortParam( ScSortParam() ); // Parameter zuruecksetzen
pNoNameData->SetQueryParam( ScQueryParam() );
pNoNameData->SetSubTotalParam( ScSubTotalParam() );
- pNoNameData->SetArea( nTab, nStartCol,nStartRow, nEndCol,nEndRow ); // neu setzen
+ pNoNameData->SetArea( nTab, nStartCol,nStartRow, nEndCol,nEndRow ); // neu setzen
pNoNameData->SetByRow( TRUE );
pNoNameData->SetHeader( bHasHeader );
pNoNameData->SetAutoFilter( FALSE );
@@ -313,8 +313,8 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
String aNewName;
if (eMode==SC_DB_IMPORT)
{
- aDocument.CompileDBFormula( TRUE ); // CreateFormulaString
- pUndoColl = new ScDBCollection( *pColl ); // Undo fuer Import1-Bereich
+ aDocument.CompileDBFormula( TRUE ); // CreateFormulaString
+ pUndoColl = new ScDBCollection( *pColl ); // Undo fuer Import1-Bereich
String aImport = ScGlobal::GetRscString( STR_DBNAME_IMPORT );
long nCount = 0;
@@ -336,15 +336,15 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
if ( pUndoColl )
{
- aDocument.CompileDBFormula( FALSE ); // CompileFormulaString
+ aDocument.CompileDBFormula( FALSE ); // CompileFormulaString
ScDBCollection* pRedoColl = new ScDBCollection( *pColl );
GetUndoManager()->AddUndoAction( new ScUndoDBData( this, pUndoColl, pRedoColl ) );
}
- // neuen Bereich am Sba anmelden nicht mehr noetig
+ // neuen Bereich am Sba anmelden nicht mehr noetig
- // "Import1" etc am Navigator bekanntmachen
+ // "Import1" etc am Navigator bekanntmachen
if (eMode==SC_DB_IMPORT)
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
}
@@ -397,8 +397,8 @@ void ScDocShell::CancelAutoDBRange()
}
- // Hoehen anpassen
- //! mit docfunc zusammenfassen
+ // Hoehen anpassen
+ //! mit docfunc zusammenfassen
BOOL ScDocShell::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab )
{
@@ -463,13 +463,13 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
void ScDocShell::RefreshPivotTables( const ScRange& rSource )
{
- //! rename to RefreshDataPilotTables?
+ //! rename to RefreshDataPilotTables?
ScDPCollection* pColl = aDocument.GetDPCollection();
if ( pColl )
{
- // DataPilotUpdate doesn't modify the collection order like PivotUpdate did,
- // so a simple loop can be used.
+ // DataPilotUpdate doesn't modify the collection order like PivotUpdate did,
+ // so a simple loop can be used.
USHORT nCount = pColl->GetCount();
for ( USHORT i=0; i<nCount; i++ )
@@ -483,7 +483,7 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
ScDPObject* pNew = new ScDPObject( *pOld );
ScDBDocFunc aFunc( *this );
aFunc.DataPilotUpdate( pOld, pNew, TRUE, FALSE );
- delete pNew; // DataPilotUpdate copies settings from "new" object
+ delete pNew; // DataPilotUpdate copies settings from "new" object
}
}
}
@@ -537,7 +537,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
return;
}
- // ausfuehren
+ // ausfuehren
WaitObject aWait( GetActiveDialogParent() );
ScDocShellModificator aModificator( *this );
@@ -628,7 +628,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
}
}
- if (pDestData) // Zielbereich loeschen / anpassen
+ if (pDestData) // Zielbereich loeschen / anpassen
{
aDocument.DeleteAreaTab(aOldDest, IDF_CONTENTS);
pDestData->SetArea( rParam.nTab, rParam.nCol, rParam.nRow,
@@ -670,23 +670,23 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
{
if (!aDocument.IsScenario(nTab))
{
- SCTAB nTabCount = aDocument.GetTableCount();
- SCTAB nSrcTab = SCTAB_MAX;
- SCTAB nEndTab = nTab;
+ SCTAB nTabCount = aDocument.GetTableCount();
+ SCTAB nSrcTab = SCTAB_MAX;
+ SCTAB nEndTab = nTab;
String aCompare;
while ( nEndTab+1 < nTabCount && aDocument.IsScenario(nEndTab+1) )
{
++nEndTab;
- if (nSrcTab > MAXTAB) // noch auf der Suche nach dem Szenario?
+ if (nSrcTab > MAXTAB) // noch auf der Suche nach dem Szenario?
{
aDocument.GetName( nEndTab, aCompare );
if (aCompare == rName)
- nSrcTab = nEndTab; // gefunden
+ nSrcTab = nEndTab; // gefunden
}
}
if (ValidTab(nSrcTab))
{
- if ( aDocument.TestCopyScenario( nSrcTab, nTab ) ) // Zellschutz testen
+ if ( aDocument.TestCopyScenario( nSrcTab, nTab ) ) // Zellschutz testen
{
ScDocShellModificator aModificator( *this );
ScMarkData aScenMark;
@@ -701,11 +701,11 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
if (bRecord)
{
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( &aDocument, nTab,nEndTab ); // auch alle Szenarien
- // angezeigte Tabelle:
+ pUndoDoc->InitUndo( &aDocument, nTab,nEndTab ); // auch alle Szenarien
+ // angezeigte Tabelle:
aDocument.CopyToDocument( nStartCol,nStartRow,nTab,
nEndCol,nEndRow,nTab, IDF_ALL,TRUE, pUndoDoc, &aScenMark );
- // Szenarien
+ // Szenarien
for (SCTAB i=nTab+1; i<=nEndTab; i++)
{
pUndoDoc->SetScenario( i, TRUE );
@@ -716,7 +716,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
pUndoDoc->SetScenarioData( i, aComment, aColor, nScenFlags );
BOOL bActive = aDocument.IsActiveScenario( i );
pUndoDoc->SetActiveScenario( i, bActive );
- // Bei Zurueckkopier-Szenarios auch Inhalte
+ // Bei Zurueckkopier-Szenarios auch Inhalte
if ( nScenFlags & SC_SCENARIO_TWOWAY )
aDocument.CopyToDocument( 0,0,i, MAXCOL,MAXROW,i,
IDF_ALL,FALSE, pUndoDoc );
@@ -731,9 +731,9 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
aDocument.CopyScenario( nSrcTab, nTab );
aDocument.SetDirty();
- // alles painten, weil in anderen Bereichen das aktive Szenario
- // geaendert sein kann
- //! nur, wenn sichtbare Rahmen vorhanden?
+ // alles painten, weil in anderen Bereichen das aktive Szenario
+ // geaendert sein kann
+ //! nur, wenn sichtbare Rahmen vorhanden?
PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
aModificator.SetDocumentModified();
}
@@ -760,7 +760,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String& rComment,
const Color& rColor, USHORT nFlags )
{
- // Undo
+ // Undo
String aOldName;
aDocument.GetName( nTab, aOldName );
String aOldComment;
@@ -772,7 +772,7 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String&
aOldName, rName, aOldComment, rComment,
aOldColor, rColor, nOldFlags, nFlags ) );
- // ausfuehren
+ // ausfuehren
ScDocShellModificator aModificator( *this );
aDocument.RenameTab( nTab, rName );
aDocument.SetScenarioData( nTab, rComment, rColor, nFlags );
@@ -817,14 +817,14 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
rName, rComment, rColor, nFlags, rMark ));
}
- aDocument.RenameTab( nNewTab, rName, FALSE ); // ohne Formel-Update
+ aDocument.RenameTab( nNewTab, rName, FALSE ); // ohne Formel-Update
aDocument.SetScenario( nNewTab, TRUE );
aDocument.SetScenarioData( nNewTab, rComment, rColor, nFlags );
ScMarkData aDestMark = rMark;
aDestMark.SelectOneTable( nNewTab );
- //! auf Filter / Buttons / Merging testen !
+ //! auf Filter / Buttons / Merging testen !
ScPatternAttr aProtPattern( aDocument.GetPool() );
aProtPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) );
@@ -838,12 +838,12 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
if (!bCopyAll)
aDocument.SetVisible( nNewTab, FALSE );
- // dies ist dann das aktive Szenario
- aDocument.CopyScenario( nNewTab, nTab, TRUE ); // TRUE - nicht aus Szenario kopieren
+ // dies ist dann das aktive Szenario
+ aDocument.CopyScenario( nNewTab, nTab, TRUE ); // TRUE - nicht aus Szenario kopieren
if (nFlags & SC_SCENARIO_SHOWFRAME)
- PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID ); // Rahmen painten
- PostPaintExtras(); // Tabellenreiter
+ PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID ); // Rahmen painten
+ PostPaintExtras(); // Tabellenreiter
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
@@ -861,7 +861,7 @@ ULONG ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
ScDocument* pSrcDoc = rSrcDocShell.GetDocument();
ULONG nErrVal = aDocument.TransferTab( pSrcDoc, nSrcPos, nDestPos,
- bInsertNew ); // no insert
+ bInsertNew ); // no insert
// TransferTab doesn't copy drawing objects with bInsertNew=FALSE
if ( nErrVal > 0 && !bInsertNew)
@@ -907,20 +907,20 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
if (bCopy)
{
if (bRecord)
- aDocument.BeginDrawUndo(); // drawing layer must do its own undo actions
+ aDocument.BeginDrawUndo(); // drawing layer must do its own undo actions
String sSrcCodeName;
aDocument.GetCodeName( nSrcTab, sSrcCodeName );
if (!aDocument.CopyTab( nSrcTab, nDestTab ))
{
- //! EndDrawUndo?
+ //! EndDrawUndo?
return FALSE;
}
else
{
SCTAB nAdjSource = nSrcTab;
if ( nDestTab <= nSrcTab )
- ++nAdjSource; // new position of source table after CopyTab
+ ++nAdjSource; // new position of source table after CopyTab
if ( aDocument.IsTabProtected( nAdjSource ) )
aDocument.CopyTabProtection(nAdjSource, nDestTab);
@@ -978,8 +978,8 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
if ( nSrcTab == nDestTab )
{
- //! allow only for api calls?
- return TRUE; // nothing to do, but valid
+ //! allow only for api calls?
+ return TRUE; // nothing to do, but valid
}
if (!aDocument.MoveTab( nSrcTab, nDestTab ))
@@ -1019,7 +1019,7 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer )
ScRange aRange;
pDBData->GetArea( aRange );
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xResultSet;
- bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, xResultSet, NULL, TRUE, FALSE ); //! Api-Flag as parameter
+ bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, xResultSet, NULL, TRUE, FALSE ); //! Api-Flag as parameter
// internal operations (sort, query, subtotal) only if no error
if (bContinue)
{
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 60f75c885a83..e40b2b2d3108 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.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
@@ -96,13 +96,13 @@ inline OUString C2U(const char* s)
//----------------------------------------------------------------------
//
-// Ole
+// Ole
//
void __EXPORT ScDocShell::SetVisArea( const Rectangle & rVisArea )
{
- // with the SnapVisArea call in SetVisAreaOrSize, it's safe to always
- // use both the size and position of the VisArea
+ // with the SnapVisArea call in SetVisAreaOrSize, it's safe to always
+ // use both the size and position of the VisArea
SetVisAreaOrSize( rVisArea, TRUE );
}
@@ -128,9 +128,9 @@ void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart
{
if ( ( bNegativePage ? (aArea.Right() > 0) : (aArea.Left() < 0) ) || aArea.Top() < 0 )
{
- // VisArea start position can't be negative.
- // Move the VisArea, otherwise only the upper left position would
- // be changed in SnapVisArea, and the size would be wrong.
+ // VisArea start position can't be negative.
+ // Move the VisArea, otherwise only the upper left position would
+ // be changed in SnapVisArea, and the size would be wrong.
Point aNewPos( 0, Max( aArea.Top(), (long) 0 ) );
if ( bNegativePage )
@@ -155,10 +155,10 @@ void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart
aArea.SetPos( aOldVisArea.TopLeft() );
}
- // hier Position anpassen!
+ // hier Position anpassen!
- // #92248# when loading an ole object, the VisArea is set from the document's
- // view settings and must be used as-is (document content may not be complete yet).
+ // #92248# when loading an ole object, the VisArea is set from the document's
+ // view settings and must be used as-is (document content may not be complete yet).
if ( !aDocument.IsImportingXML() )
aDocument.SnapVisArea( aArea );
@@ -175,7 +175,7 @@ void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart
//TODO/LATER: formerly in SvInplaceObject
SfxObjectShell::SetVisArea( aArea );
- if (bIsInplace) // Zoom in der InPlace View einstellen
+ if (bIsInplace) // Zoom in der InPlace View einstellen
{
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
if (pViewSh)
@@ -207,8 +207,8 @@ BOOL ScDocShell::IsOle()
void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize )
{
- // wenn's gar nicht Ole ist, kann man sich die Berechnungen sparen
- // (VisArea wird dann beim Save wieder zurueckgesetzt)
+ // wenn's gar nicht Ole ist, kann man sich die Berechnungen sparen
+ // (VisArea wird dann beim Save wieder zurueckgesetzt)
if (GetCreateMode() == SFX_CREATE_MODE_STANDARD)
return;
@@ -245,13 +245,13 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize )
if (aNewArea != aOldArea)
{
- SetVisAreaOrSize( aNewArea, TRUE ); // hier muss auch der Start angepasst werden
+ SetVisAreaOrSize( aNewArea, TRUE ); // hier muss auch der Start angepasst werden
bChange = TRUE;
}
}
//
-// Style-Krempel fuer Organizer etc.
+// Style-Krempel fuer Organizer etc.
//
SfxStyleSheetBasePool* __EXPORT ScDocShell::GetStyleSheetPool()
@@ -260,9 +260,9 @@ SfxStyleSheetBasePool* __EXPORT ScDocShell::GetStyleSheetPool()
}
-// nach dem Laden von Vorlagen aus einem anderen Dokment (LoadStyles, Insert)
-// muessen die SetItems (ATTR_PAGE_HEADERSET, ATTR_PAGE_FOOTERSET) auf den richtigen
-// Pool umgesetzt werden, bevor der Quell-Pool geloescht wird.
+// nach dem Laden von Vorlagen aus einem anderen Dokment (LoadStyles, Insert)
+// muessen die SetItems (ATTR_PAGE_HEADERSET, ATTR_PAGE_FOOTERSET) auf den richtigen
+// Pool umgesetzt werden, bevor der Quell-Pool geloescht wird.
void lcl_AdjustPool( SfxStyleSheetBasePool* pStylePool )
{
@@ -297,22 +297,22 @@ void __EXPORT ScDocShell::LoadStyles( SfxObjectShell &rSource )
aDocument.StylesToNames();
SfxObjectShell::LoadStyles(rSource);
- lcl_AdjustPool( GetStyleSheetPool() ); // SetItems anpassen
+ lcl_AdjustPool( GetStyleSheetPool() ); // SetItems anpassen
aDocument.UpdStlShtPtrsFrmNms();
UpdateAllRowHeights();
- // Paint
+ // Paint
PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID | PAINT_LEFT );
}
void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellStyles, BOOL bPageStyles )
{
- // similar to LoadStyles, but with selectable behavior for XStyleLoader::loadStylesFromURL call
+ // similar to LoadStyles, but with selectable behavior for XStyleLoader::loadStylesFromURL call
- if ( !bCellStyles && !bPageStyles ) // nothing to do
+ if ( !bCellStyles && !bPageStyles ) // nothing to do
return;
ScStyleSheetPool* pSourcePool = rSource.GetDocument()->GetStyleSheetPool();
@@ -324,12 +324,12 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS
SfxStyleSheetIterator aIter( pSourcePool, eFamily );
USHORT nSourceCount = aIter.Count();
if ( nSourceCount == 0 )
- return; // no source styles
+ return; // no source styles
ScStylePair* pStyles = new ScStylePair[ nSourceCount ];
USHORT nFound = 0;
- // first create all new styles
+ // first create all new styles
SfxStyleSheetBase* pSourceStyle = aIter.First();
while (pSourceStyle)
@@ -356,7 +356,7 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS
pSourceStyle = aIter.Next();
}
- // then copy contents (after inserting all styles, for parent etc.)
+ // then copy contents (after inserting all styles, for parent etc.)
for ( USHORT i = 0; i < nFound; ++i )
{
@@ -367,9 +367,9 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS
// follow is never used
}
- lcl_AdjustPool( GetStyleSheetPool() ); // adjust SetItems
+ lcl_AdjustPool( GetStyleSheetPool() ); // adjust SetItems
UpdateAllRowHeights();
- PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID | PAINT_LEFT ); // Paint
+ PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID | PAINT_LEFT ); // Paint
delete[] pStyles;
}
@@ -382,7 +382,7 @@ BOOL __EXPORT ScDocShell::Insert( SfxObjectShell &rSource,
BOOL bRet = SfxObjectShell::Insert( rSource, nSourceIdx1, nSourceIdx2, nSourceIdx3,
nIdx1, nIdx2, nIdx3, rIdxDeleted );
if (bRet)
- lcl_AdjustPool( GetStyleSheetPool() ); // SetItems anpassen
+ lcl_AdjustPool( GetStyleSheetPool() ); // SetItems anpassen
return bRet;
}
@@ -417,7 +417,7 @@ void ScDocShell::UpdateLinks()
if (!aNames.Insert(pData))
delete pData;
}
- else // nicht mehr benutzt -> loeschen
+ else // nicht mehr benutzt -> loeschen
{
pTabLink->SetAddUndo(TRUE);
pLinkManager->Remove(k);
@@ -435,9 +435,9 @@ void ScDocShell::UpdateLinks()
String aDocName = aDocument.GetLinkDoc(i);
String aFltName = aDocument.GetLinkFlt(i);
String aOptions = aDocument.GetLinkOpt(i);
- ULONG nRefresh = aDocument.GetLinkRefreshDelay(i);
+ ULONG nRefresh = aDocument.GetLinkRefreshDelay(i);
BOOL bThere = FALSE;
- for (SCTAB j=0; j<i && !bThere; j++) // im Dokument mehrfach?
+ for (SCTAB j=0; j<i && !bThere; j++) // im Dokument mehrfach?
if (aDocument.IsLinked(j)
&& aDocument.GetLinkDoc(j) == aDocName
&& aDocument.GetLinkFlt(j) == aFltName
@@ -447,7 +447,7 @@ void ScDocShell::UpdateLinks()
// if it ain't.
bThere = TRUE;
- if (!bThere) // schon als Filter eingetragen?
+ if (!bThere) // schon als Filter eingetragen?
{
StrData* pData = new StrData(aDocName);
if (!aNames.Insert(pData))
@@ -479,7 +479,7 @@ BOOL ScDocShell::ReloadTabLinks()
if (pBase->ISA(ScTableLink))
{
ScTableLink* pTabLink = (ScTableLink*)pBase;
- pTabLink->SetPaint(FALSE); // Paint nur einmal am Ende
+ pTabLink->SetPaint(FALSE); // Paint nur einmal am Ende
pTabLink->Update();
pTabLink->SetPaint(TRUE);
bAny = TRUE;
@@ -488,14 +488,14 @@ BOOL ScDocShell::ReloadTabLinks()
if ( bAny )
{
- // Paint nur einmal
+ // Paint nur einmal
PostPaint( ScRange(0,0,0,MAXCOL,MAXROW,MAXTAB),
PAINT_GRID | PAINT_TOP | PAINT_LEFT );
SetDocumentModified();
}
- return TRUE; //! Fehler erkennen
+ return TRUE; //! Fehler erkennen
}
void ScDocShell::CheckConfigOptions()
diff --git a/sc/source/ui/docshell/docsh7.cxx b/sc/source/ui/docshell/docsh7.cxx
index 85ca951be483..7aaefa5caccc 100644
--- a/sc/source/ui/docshell/docsh7.cxx
+++ b/sc/source/ui/docshell/docsh7.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 @@
void ScDocShell::GetDrawObjState( SfxItemSet & /* rSet */ )
{
- // SID_SC_ACTIVEOBJECT (SelectedObject) - removed (old Basic)
+ // SID_SC_ACTIVEOBJECT (SelectedObject) - removed (old Basic)
}
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 1e94a7f3b2e4..a9e05e1d43b1 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.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
@@ -94,25 +94,25 @@ using ::std::vector;
// -----------------------------------------------------------------------
-#define SC_SERVICE_ROWSET "com.sun.star.sdb.RowSet"
-#define SC_SERVICE_DRVMAN "com.sun.star.sdbc.DriverManager"
+#define SC_SERVICE_ROWSET "com.sun.star.sdb.RowSet"
+#define SC_SERVICE_DRVMAN "com.sun.star.sdbc.DriverManager"
-//! move to a header file?
-//#define SC_DBPROP_DATASOURCENAME "DataSourceName"
-#define SC_DBPROP_ACTIVECONNECTION "ActiveConnection"
-#define SC_DBPROP_COMMAND "Command"
-#define SC_DBPROP_COMMANDTYPE "CommandType"
+//! move to a header file?
+//#define SC_DBPROP_DATASOURCENAME "DataSourceName"
+#define SC_DBPROP_ACTIVECONNECTION "ActiveConnection"
+#define SC_DBPROP_COMMAND "Command"
+#define SC_DBPROP_COMMANDTYPE "CommandType"
#define SC_DBPROP_PROPCHANGE_NOTIFY "PropertyChangeNotificationEnabled"
-#define SC_DBPROP_NAME "Name"
-#define SC_DBPROP_TYPE "Type"
-#define SC_DBPROP_PRECISION "Precision"
-#define SC_DBPROP_SCALE "Scale"
+#define SC_DBPROP_NAME "Name"
+#define SC_DBPROP_TYPE "Type"
+#define SC_DBPROP_PRECISION "Precision"
+#define SC_DBPROP_SCALE "Scale"
-#define SC_DBPROP_EXTENSION "Extension"
-#define SC_DBPROP_CHARSET "CharSet"
+#define SC_DBPROP_EXTENSION "Extension"
+#define SC_DBPROP_CHARSET "CharSet"
-#define SC_ROWCOUNT_ERROR (-1)
+#define SC_ROWCOUNT_ERROR (-1)
namespace
{
@@ -152,7 +152,7 @@ namespace
} // if ( aIter == aMap.end() )
rtl::OUString aCharSetStr;
if ( RTL_TEXTENCODING_DONTKNOW != *aIter )
- { // it's not the virtual "system charset"
+ { // it's not the virtual "system charset"
const char* pIanaName = rtl_getMimeCharsetFromTextEncoding( *aIter );
OSL_ENSURE( pIanaName, "invalid mime name!" );
if ( pIanaName )
@@ -322,7 +322,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
if ( !xConnection.is() || !xDrvMan.is() )
return nRet;
::utl::DisposableComponent aConnectionHelper(xConnection);
-
+
long nRowCount = 0;
if ( nRowCount < 0 )
{
@@ -367,12 +367,12 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
if ( xMetaSupp.is() )
xMeta = xMetaSupp->getMetaData();
if ( xMeta.is() )
- nColCount = xMeta->getColumnCount(); // this is the number of real columns
+ nColCount = xMeta->getColumnCount(); // this is the number of real columns
if ( nColCount > MAXCOL+1 )
{
nColCount = MAXCOL+1;
- nErr = SCWARN_IMPORT_RANGE_OVERFLOW; // warning
+ nErr = SCWARN_IMPORT_RANGE_OVERFLOW; // warning
}
if ( nColCount > 0 )
@@ -384,13 +384,13 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
if (!xRow.is()) return SCERR_IMPORT_CONNECT;
// currency flag is not needed for dBase
- uno::Sequence<sal_Int32> aColTypes( nColCount ); // column types
+ uno::Sequence<sal_Int32> aColTypes( nColCount ); // column types
sal_Int32* pTypeArr = aColTypes.getArray();
for (i=0; i<nColCount; i++)
pTypeArr[i] = xMeta->getColumnType( i+1 );
- // read column names
- //! add type descriptions
+ // read column names
+ //! add type descriptions
vector<long> aScales(nColCount, -1);
for (i=0; i<nColCount; i++)
@@ -432,7 +432,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
lcl_setScalesToColumns(aDocument, aScales);
- SCROW nRow = 1; // 0 is column titles
+ SCROW nRow = 1; // 0 is column titles
BOOL bEnd = FALSE;
while ( !bEnd && xRowSet->next() )
{
@@ -465,10 +465,10 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet,
rRowHeightsRecalc.setTrue(nRow, nRow);
++nRow;
}
- else // past the end of the spreadsheet
+ else // past the end of the spreadsheet
{
- bEnd = TRUE; // don't continue
- nErr = SCWARN_IMPORT_RANGE_OVERFLOW; // warning message
+ bEnd = TRUE; // don't continue
+ nErr = SCWARN_IMPORT_RANGE_OVERFLOW; // warning message
}
if ( nRowCount )
@@ -506,9 +506,9 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
sal_Int32* pColLengths, sal_Int32* pColScales,
BOOL& bHasMemo, CharSet eCharSet )
{
- // updating of column titles didn't work in 5.2 and isn't always wanted
- // (saving normally shouldn't modify the document)
- //! read flag from configuration
+ // updating of column titles didn't work in 5.2 and isn't always wanted
+ // (saving normally shouldn't modify the document)
+ //! read flag from configuration
BOOL bUpdateTitles = FALSE;
ScDocument* pDoc = rDocShell.GetDocument();
@@ -612,7 +612,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
aFieldName.Erase( 10 );
StrData* pStrData = new StrData( aFieldName );
if ( !aFieldNamesCollection.Insert( pStrData ) )
- { // doppelter Feldname, numerisch erweitern
+ { // doppelter Feldname, numerisch erweitern
USHORT nSub = 1;
String aFixPart( aFieldName );
do
@@ -634,7 +634,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
}
if ( !bTypeDefined )
- { // Feldtyp
+ { // Feldtyp
ScBaseCell* pCell;
pDoc->GetCell( nCol, nFirstDataRow, nTab, pCell );
if ( !pCell || pCell->HasStringData() )
@@ -673,14 +673,14 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
BOOL bSdbLenBad = FALSE;
// Feldlaenge
if ( nDbType == sdbc::DataType::VARCHAR && !nFieldLen )
- { // maximale Feldbreite bestimmen
+ { // maximale Feldbreite bestimmen
nFieldLen = pDoc->GetMaxStringLen( nTab, nCol, nFirstDataRow,
nLastRow, eCharSet );
if ( nFieldLen == 0 )
nFieldLen = 1;
}
else if ( nDbType == sdbc::DataType::DECIMAL )
- { // maximale Feldbreite und Nachkommastellen bestimmen
+ { // maximale Feldbreite und Nachkommastellen bestimmen
xub_StrLen nLen;
sal_uInt16 nPrec;
nLen = pDoc->GetMaxNumberStringLen( nPrec, nTab, nCol,
@@ -691,11 +691,11 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
if ( nPrec > 15 )
nPrec = 15;
if ( bPrecDefined && nPrecision != nPrec )
- { // Laenge auf vorgegebene Nachkommastellen anpassen
+ { // Laenge auf vorgegebene Nachkommastellen anpassen
if ( nPrecision )
nLen = sal::static_int_cast<xub_StrLen>( nLen + ( nPrecision - nPrec ) );
else
- nLen -= nPrec+1; // auch den . mit raus
+ nLen -= nPrec+1; // auch den . mit raus
}
if ( nLen > nFieldLen && !bTypeDefined )
nFieldLen = nLen;
@@ -704,9 +704,9 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
if ( nFieldLen == 0 )
nFieldLen = 1;
else if ( nFieldLen > 19 )
- nFieldLen = 19; // dBaseIII Limit Feldlaenge numerisch: 19
+ nFieldLen = 19; // dBaseIII Limit Feldlaenge numerisch: 19
if ( nPrecision && nFieldLen < nPrecision + 2 )
- nFieldLen = nPrecision + 2; // 0. muss mit reinpassen
+ nFieldLen = nPrecision + 2; // 0. muss mit reinpassen
// 538 MUST: Sdb internal representation adds 2 to the field length!
// To give the user what he wants we must substract it here.
//! CAVEAT! There is no way to define a numeric field with a length
@@ -719,13 +719,13 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
if ( nFieldLen > 254 )
{
if ( nDbType == sdbc::DataType::VARCHAR )
- { // zu lang fuer normales Textfeld => Memofeld
+ { // zu lang fuer normales Textfeld => Memofeld
nDbType = sdbc::DataType::LONGVARCHAR;
nFieldLen = 10;
bHasMemo = TRUE;
}
else
- nFieldLen = 254; // dumm gelaufen..
+ nFieldLen = 254; // dumm gelaufen..
}
pColNames[nField] = aFieldName;
@@ -738,10 +738,10 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell,
{
nFieldLen = SvDbaseConverter::ConvertPrecisionToDbase( nFieldLen, nPrecision );
if ( bSdbLenBad && nFieldLen == 1 )
- nFieldLen = 2; // THIS is reality
+ nFieldLen = 2; // THIS is reality
}
if ( bUpdateTitles )
- { // Angabe anpassen und ausgeben
+ { // Angabe anpassen und ausgeben
String aOutString = aFieldName;
switch ( nDbType )
{
@@ -818,7 +818,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
BOOL bHasFieldNames = TRUE;
for ( SCCOL nDocCol = nFirstCol; nDocCol <= nLastCol && bHasFieldNames; nDocCol++ )
- { // nur Strings in erster Zeile => sind Feldnamen
+ { // nur Strings in erster Zeile => sind Feldnamen
if ( !aDocument.HasStringData( nDocCol, nFirstRow, nTab ) )
bHasFieldNames = FALSE;
}
@@ -852,7 +852,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
// get dBase driver
uno::Reference< sdbc::XDriverAccess> xAccess(xDrvMan,uno::UNO_QUERY);
uno::Reference< sdbcx::XDataDefinitionSupplier > xDDSup( xAccess->getDriverByURL( xConnection->getMetaData()->getURL() ), uno::UNO_QUERY );
- if ( !xDDSup.is() )
+ if ( !xDDSup.is() )
return SCERR_EXPORT_CONNECT;
// create table
@@ -927,9 +927,9 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
xTablesAppend->appendByDescriptor( xTableDesc );
// re-open connection
-// xConnection = xDrvMan->getConnectionWithInfo( aConnUrl, aProps );
-// DBG_ASSERT( xConnection.is(), "can't get Connection" );
-// if (!xConnection.is()) return SCERR_EXPORT_CONNECT;
+// xConnection = xDrvMan->getConnectionWithInfo( aConnUrl, aProps );
+// DBG_ASSERT( xConnection.is(), "can't get Connection" );
+// if (!xConnection.is()) return SCERR_EXPORT_CONNECT;
// get row set for writing
uno::Reference<lang::XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory();
@@ -985,7 +985,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
if ( pCell && pCell->GetCellType() != CELLTYPE_NOTE )
{
if ( pCell->GetCellType() == CELLTYPE_EDIT )
- { // #60761# Paragraphs erhalten
+ { // #60761# Paragraphs erhalten
lcl_getLongVarCharEditString( aString,
pCell, aEditEngine);
}
@@ -1025,8 +1025,8 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
}
else
{
- Date aDate = *(pNumFmt->GetNullDate()); // tools date
- aDate += (long)fVal; //! approxfloor?
+ Date aDate = *(pNumFmt->GetNullDate()); // tools date
+ aDate += (long)fVal; //! approxfloor?
util::Date aUnoDate( aDate.GetDay(), aDate.GetMonth(), aDate.GetYear() );
xRowUpdate->updateDate( nCol+1, aUnoDate );
}
@@ -1056,11 +1056,11 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
xResultUpdate->insertRow();
- //! error handling and recovery of old
- //! ScDocShell::SbaSdbExport is still missing!
+ //! error handling and recovery of old
+ //! ScDocShell::SbaSdbExport is still missing!
if ( !aProgress.SetStateOnPercent( nDocRow - nFirstRow ) )
- { // UserBreak
+ { // UserBreak
nErr = SCERR_EXPORT_DATA;
break;
}
diff --git a/sc/source/ui/docshell/docshimp.hxx b/sc/source/ui/docshell/docshimp.hxx
index 37f6d6bb1387..492e333d2e89 100644
--- a/sc/source/ui/docshell/docshimp.hxx
+++ b/sc/source/ui/docshell/docshimp.hxx
@@ -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/ui/docshell/editable.cxx b/sc/source/ui/docshell/editable.cxx
index 24cae921fddf..7ebd9de1d1bd 100644
--- a/sc/source/ui/docshell/editable.cxx
+++ b/sc/source/ui/docshell/editable.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 @@ ScEditableTester::ScEditableTester( ScDocument* pDoc, SCTAB nTab,
TestBlock( pDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow );
}
-ScEditableTester::ScEditableTester( ScDocument* pDoc,
+ScEditableTester::ScEditableTester( ScDocument* pDoc,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark ) :
bIsEditable( TRUE ),
@@ -99,7 +99,7 @@ void ScEditableTester::TestBlock( ScDocument* pDoc, SCTAB nTab,
}
}
-void ScEditableTester::TestSelectedBlock( ScDocument* pDoc,
+void ScEditableTester::TestSelectedBlock( ScDocument* pDoc,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark )
{
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index ee7a8a6844aa..c0fc2fbfa215 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1393,8 +1393,7 @@ static ScTokenArray* lcl_convertToTokenArray(const ScDocument* pSrcDoc, ScRange&
// Only loop within the data area.
SCCOL nDataCol1 = nCol1, nDataCol2 = nCol2;
SCROW nDataRow1 = nRow1, nDataRow2 = nRow2;
- bool bShrunk;
- if (!pSrcDoc->ShrinkToUsedDataArea( bShrunk, nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2, false))
+ if (!pSrcDoc->ShrinkToDataArea(nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2))
// no data within specified range.
continue;
@@ -1721,8 +1720,8 @@ ScExternalRefCache::TokenRef ScExternalRefManager::getSingleRefToken(
SCCOL nDataCol1 = 0, nDataCol2 = MAXCOL;
SCROW nDataRow1 = 0, nDataRow2 = MAXROW;
- bool bData = pSrcDoc->ShrinkToDataArea(nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2);
- if (!bData || rCell.Col() < nDataCol1 || nDataCol2 < rCell.Col() || rCell.Row() < nDataRow1 || nDataRow2 < rCell.Row())
+ pSrcDoc->ShrinkToDataArea(nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2);
+ if (rCell.Col() < nDataCol1 || nDataCol2 < rCell.Col() || rCell.Row() < nDataRow1 || nDataRow2 < rCell.Row())
{
// requested cell is outside the data area. Don't even bother caching
// this data, but add it to the cached range to prevent accessing the
diff --git a/sc/source/ui/docshell/hiranges.cxx b/sc/source/ui/docshell/hiranges.cxx
index 0ad4c4e3e5d8..5716abe19b62 100644
--- a/sc/source/ui/docshell/hiranges.cxx
+++ b/sc/source/ui/docshell/hiranges.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/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 1e85d17bd741..3cbf5364b964 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.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
@@ -115,7 +115,7 @@ enum SylkVersion
ScImportExport::ScImportExport( ScDocument* p )
: pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ),
- nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
+ nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
bFormulas( FALSE ), bIncludeFiltered( TRUE ),
bAll( TRUE ), bSingle( TRUE ), bUndo( FALSE ),
bOverflow( FALSE ), mbApi( true ), mExportTextOptions()
@@ -130,7 +130,7 @@ ScImportExport::ScImportExport( ScDocument* p )
ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
: pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ),
aRange( rPt ),
- nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
+ nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ),
bFormulas( FALSE ), bIncludeFiltered( TRUE ),
bAll( FALSE ), bSingle( TRUE ), bUndo( BOOL( pDocSh != NULL ) ),
bOverflow( FALSE ), mbApi( true ), mExportTextOptions()
@@ -140,8 +140,8 @@ ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
}
-// ctor with a range is only used for export
-//! ctor with a string (and bSingle=TRUE) is also used for DdeSetData
+// ctor with a range is only used for export
+//! ctor with a string (and bSingle=TRUE) is also used for DdeSetData
ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
: pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ),
@@ -185,7 +185,7 @@ ScImportExport::ScImportExport( ScDocument* p, const String& rPos )
if( pData->HasType( RT_REFAREA )
|| pData->HasType( RT_ABSAREA )
|| pData->HasType( RT_ABSPOS ) )
- pData->GetSymbol( aPos ); // mit dem Inhalt weitertesten
+ pData->GetSymbol( aPos ); // mit dem Inhalt weitertesten
}
}
formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
@@ -214,7 +214,7 @@ void ScImportExport::SetExtOptions( const ScAsciiOptions& rOpt )
else
pExtOptions = new ScAsciiOptions( rOpt );
- // "normale" Optionen uebernehmen
+ // "normale" Optionen uebernehmen
cSep = rOpt.GetFieldSeps().GetChar(0);
cStr = rOpt.GetTextSep();
@@ -284,7 +284,7 @@ void ScImportExport::EndPaste()
if( pDocSh )
{
if (!bHeight)
- pDocSh->PostPaint( aRange, PAINT_GRID ); // AdjustRowHeight paintet evtl. selber
+ pDocSh->PostPaint( aRange, PAINT_GRID ); // AdjustRowHeight paintet evtl. selber
pDocSh->SetDocumentModified();
}
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
@@ -338,7 +338,7 @@ BOOL ScImportExport::ImportString( const ::rtl::OUString& rText, ULONG nFmt )
::rtl::OString aTmp( rText.getStr(), rText.getLength(), eEnc );
SvMemoryStream aStrm( (void*)aTmp.getStr(), aTmp.getLength() * sizeof(sal_Char), STREAM_READ );
aStrm.SetStreamCharSet( eEnc );
- SetNoEndianSwap( aStrm ); //! no swapping in memory
+ SetNoEndianSwap( aStrm ); //! no swapping in memory
return ImportStream( aStrm, String(), nFmt );
}
}
@@ -356,11 +356,11 @@ BOOL ScImportExport::ExportString( ::rtl::OUString& rText, ULONG nFmt )
rText = UniString( aTmp, eEnc );
return bOk;
}
- // nSizeLimit not needed for OUString
+ // nSizeLimit not needed for OUString
SvMemoryStream aStrm;
aStrm.SetStreamCharSet( RTL_TEXTENCODING_UNICODE );
- SetNoEndianSwap( aStrm ); //! no swapping in memory
+ SetNoEndianSwap( aStrm ); //! no swapping in memory
// mba: no BaseURL for data exc
if( ExportStream( aStrm, String(), nFmt ) )
{
@@ -388,7 +388,7 @@ BOOL ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding eEnc,
SvMemoryStream aStrm;
aStrm.SetStreamCharSet( eEnc );
- SetNoEndianSwap( aStrm ); //! no swapping in memory
+ SetNoEndianSwap( aStrm ); //! no swapping in memory
// mba: no BaseURL for data exchange
if( ExportStream( aStrm, String(), nFmt ) )
{
@@ -410,7 +410,7 @@ BOOL ScImportExport::ImportStream( SvStream& rStrm, const String& rBaseURL, ULON
{
if( nFmt == FORMAT_STRING )
{
- if( ExtText2Doc( rStrm ) ) // pExtOptions auswerten
+ if( ExtText2Doc( rStrm ) ) // pExtOptions auswerten
return TRUE;
}
if( nFmt == SOT_FORMATSTR_ID_SYLK )
@@ -429,7 +429,7 @@ BOOL ScImportExport::ImportStream( SvStream& rStrm, const String& rBaseURL, ULON
return TRUE;
}
if( nFmt == SOT_FORMATSTR_ID_LINK )
- return TRUE; // Link-Import?
+ return TRUE; // Link-Import?
if ( nFmt == SOT_FORMATSTR_ID_HTML )
{
if( HTML2Doc( rStrm, rBaseURL ) )
@@ -437,7 +437,7 @@ BOOL ScImportExport::ImportStream( SvStream& rStrm, const String& rBaseURL, ULON
}
if ( nFmt == SOT_FORMATSTR_ID_HTML_SIMPLE )
{
- MSE40HTMLClipFormatObj aMSE40ClpObj; // needed to skip the header data
+ MSE40HTMLClipFormatObj aMSE40ClpObj; // needed to skip the header data
SvStream* pHTML = aMSE40ClpObj.IsValid( rStrm );
if ( pHTML && HTML2Doc( *pHTML, rBaseURL ) )
return TRUE;
@@ -551,7 +551,7 @@ void ScImportExport::WriteUnicodeOrByteString( SvStream& rStrm, const String& rS
void ScImportExport::WriteUnicodeOrByteEndl( SvStream& rStrm )
{
if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE )
- { // same as endl() but unicode
+ { // same as endl() but unicode
switch ( rStrm.GetLineDelimiter() )
{
case LINEEND_CR :
@@ -571,16 +571,16 @@ void ScImportExport::WriteUnicodeOrByteEndl( SvStream& rStrm )
enum DoubledQuoteMode
{
- DQM_KEEP, // both are taken
- DQM_ESCAPE, // escaped quote, one is taken, one ignored
- DQM_CONCAT, // first is end, next is start, both ignored => strings combined
- DQM_SEPARATE // end one string and begin next
+ DQM_KEEP, // both are taken
+ DQM_ESCAPE, // escaped quote, one is taken, one ignored
+ DQM_CONCAT, // first is end, next is start, both ignored => strings combined
+ DQM_SEPARATE // end one string and begin next
};
static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString,
sal_Unicode cStr, DoubledQuoteMode eMode )
{
- p++; //! jump over opening quote
+ p++; //! jump over opening quote
BOOL bCont;
do
{
@@ -598,16 +598,16 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString,
switch ( eMode )
{
case DQM_KEEP :
- p++; // both for us (not breaking for-loop)
+ p++; // both for us (not breaking for-loop)
break;
case DQM_ESCAPE :
- p++; // one for us (breaking for-loop)
- bCont = TRUE; // and more
+ p++; // one for us (breaking for-loop)
+ bCont = TRUE; // and more
break;
case DQM_CONCAT :
if ( p0+1 < p )
rString.Append( p0, sal::static_int_cast<xub_StrLen>( (p-1) - p0 ) ); // first part
- p0 = ++p; // text of next part starts here
+ p0 = ++p; // text of next part starts here
break;
case DQM_SEPARATE :
// positioned on next opening quote
@@ -628,7 +628,7 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString,
void lcl_UnescapeSylk( String & rString, SylkVersion eVersion )
{
// Older versions didn't escape the semicolon.
- // Older versions quoted the string and doubled embedded quotes, but not
+ // Older versions quoted the string and doubled embedded quotes, but not
// the semicolons, which was plain wrong.
if (eVersion >= SYLK_OOO32)
rString.SearchAndReplaceAll( DOUBLE_SEMICOLON, ';' );
@@ -702,18 +702,18 @@ static const sal_Unicode* lcl_ScanSylkFormula( const sal_Unicode* p,
}
else
{
- // Nasty. If in old versions the formula contained a semicolon, it was
- // quoted and embedded quotes were doubled, but semicolons were not. If
- // there was no semicolon, it could still contain quotes and doubled
- // embedded quotes if it was something like ="a""b", which was saved as
- // E"a""b" as is and has to be preserved, even if older versions
- // couldn't even load it correctly. However, theoretically another
- // field might follow and thus the line contain a semicolon again, such
+ // Nasty. If in old versions the formula contained a semicolon, it was
+ // quoted and embedded quotes were doubled, but semicolons were not. If
+ // there was no semicolon, it could still contain quotes and doubled
+ // embedded quotes if it was something like ="a""b", which was saved as
+ // E"a""b" as is and has to be preserved, even if older versions
+ // couldn't even load it correctly. However, theoretically another
+ // field might follow and thus the line contain a semicolon again, such
// as ...;E"a""b";...
bool bQuoted = false;
if (*p == '"')
{
- // May be a quoted expression or just a string constant expression
+ // May be a quoted expression or just a string constant expression
// with quotes.
while (*(++p))
{
@@ -834,8 +834,8 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm )
if( bData && nCol <= nEndCol && nRow <= nEndRow )
pDoc->SetString( nCol, nRow, aRange.aStart.Tab(), aCell );
}
- else // zuviele Spalten/Zeilen
- bOverflow = TRUE; // beim Import Warnung ausgeben
+ else // zuviele Spalten/Zeilen
+ bOverflow = TRUE; // beim Import Warnung ausgeben
++nCol;
}
++nRow;
@@ -857,11 +857,11 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm )
}
//
- // erweiterter Ascii-Import
+ // erweiterter Ascii-Import
//
-static bool lcl_PutString(
+static bool lcl_PutString(
ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rStr, BYTE nColFormat,
SvNumberFormatter* pFormatter, bool bDetectNumFormat,
::utl::TransliterationWrapper& rTransliteration, CalendarWrapper& rCalendar,
@@ -891,20 +891,20 @@ static bool lcl_PutString(
if ( nColFormat == SC_COL_ENGLISH )
{
- //! SetString mit Extra-Flag ???
+ //! SetString mit Extra-Flag ???
SvNumberFormatter* pDocFormatter = pDoc->GetFormatTable();
sal_uInt32 nEnglish = pDocFormatter->GetStandardIndex(LANGUAGE_ENGLISH_US);
double fVal;
if ( pDocFormatter->IsNumberFormat( rStr, nEnglish, fVal ) )
{
- // Zahlformat wird nicht auf englisch gesetzt
+ // Zahlformat wird nicht auf englisch gesetzt
pDoc->SetValue( nCol, nRow, nTab, fVal );
return bMultiLine;
}
- // sonst weiter mit SetString
+ // sonst weiter mit SetString
}
- else if ( nColFormat != SC_COL_STANDARD ) // Datumsformate
+ else if ( nColFormat != SC_COL_STANDARD ) // Datumsformate
{
const USHORT nMaxNumberParts = 7; // Y-M-D h:m:s.t
xub_StrLen nLen = rStr.Len();
@@ -946,7 +946,7 @@ static bool lcl_PutString(
if ( nFound == 1 )
{
- // try to break one number (without separators) into date fields
+ // try to break one number (without separators) into date fields
xub_StrLen nDateStart = nStart[0];
xub_StrLen nDateLen = nEnd[0] + 1 - nDateStart;
@@ -954,9 +954,9 @@ static bool lcl_PutString(
if ( nDateLen >= 5 && nDateLen <= 8 &&
ScGlobal::pCharClass->isNumeric( rStr.Copy( nDateStart, nDateLen ) ) )
{
- // 6 digits: 2 each for day, month, year
- // 8 digits: 4 for year, 2 each for day and month
- // 5 or 7 digits: first field is shortened by 1
+ // 6 digits: 2 each for day, month, year
+ // 8 digits: 4 for year, 2 each for day and month
+ // 5 or 7 digits: first field is shortened by 1
BOOL bLongYear = ( nDateLen >= 7 );
BOOL bShortFirst = ( nDateLen == 5 || nDateLen == 7 );
@@ -964,11 +964,11 @@ static bool lcl_PutString(
USHORT nFieldStart = nDateStart;
for (USHORT nPos=0; nPos<3; nPos++)
{
- USHORT nFieldEnd = nFieldStart + 1; // default: 2 digits
+ USHORT nFieldEnd = nFieldStart + 1; // default: 2 digits
if ( bLongYear && nPos == nYP )
- nFieldEnd += 2; // 2 extra digits for long year
+ nFieldEnd += 2; // 2 extra digits for long year
if ( bShortFirst && nPos == 0 )
- --nFieldEnd; // first field shortened?
+ --nFieldEnd; // first field shortened?
nStart[nPos] = nFieldStart;
nEnd[nPos] = nFieldEnd;
@@ -992,7 +992,7 @@ static bool lcl_PutString(
static const String aSepShortened( RTL_CONSTASCII_USTRINGPARAM( "SEP" ) );
uno::Sequence< i18n::CalendarItem > xMonths;
sal_Int32 i, nMonthCount;
- // first test all month names from local international
+ // first test all month names from local international
xMonths = rCalendar.getMonths();
nMonthCount = xMonths.getLength();
for (i=0; i<nMonthCount && !nMonth; i++)
@@ -1008,7 +1008,7 @@ static bool lcl_PutString(
nMonth = sal::static_int_cast<sal_Int16>( i+1 );
}
}
- // if none found, then test english month names
+ // if none found, then test english month names
if ( !nMonth && pSecondCalendar && pSecondTransliteration )
{
xMonths = pSecondCalendar->getMonths();
@@ -1104,7 +1104,7 @@ static bool lcl_PutString(
aParam.mbSetTextCellFormat = true;
pDoc->SetString( nCol, nRow, nTab, rStr, &aParam );
}
- else
+ else
{
bMultiLine = true;
pDoc->PutCell( nCol, nRow, nTab, new ScEditCell( rStr, pDoc ) );
@@ -1154,14 +1154,14 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
SCROW nStartRow = aRange.aStart.Row();
SCTAB nTab = aRange.aStart.Tab();
- BOOL bFixed = pExtOptions->IsFixedLen();
+ BOOL bFixed = pExtOptions->IsFixedLen();
const String& rSeps = pExtOptions->GetFieldSeps();
const sal_Unicode* pSeps = rSeps.GetBuffer();
- BOOL bMerge = pExtOptions->IsMergeSeps();
- USHORT nInfoCount = pExtOptions->GetInfoCount();
+ BOOL bMerge = pExtOptions->IsMergeSeps();
+ USHORT nInfoCount = pExtOptions->GetInfoCount();
const xub_StrLen* pColStart = pExtOptions->GetColStart();
const BYTE* pColFormat = pExtOptions->GetColFormat();
- long nSkipLines = pExtOptions->GetStartRow();
+ long nSkipLines = pExtOptions->GetStartRow();
LanguageType eDocLang = pExtOptions->GetLanguage();
SvNumberFormatter aNumFormatter(pDoc->GetServiceManager(), eDocLang);
@@ -1200,7 +1200,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
// Determine range for Undo.
// TODO: we don't need this during import of a file to a new sheet or
// document, could set bDetermineRange=false then.
- bool bDetermineRange = true;
+ bool bDetermineRange = true;
// Row heights don't need to be adjusted on the fly if EndPaste() is called
// afterwards, which happens only if bDetermineRange. This variable also
@@ -1210,7 +1210,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
bool bQuotedAsText = pExtOptions && pExtOptions->IsQuotedAsText();
ULONG nOriginalStreamPos = rStrm.Tell();
-
+
do
{
for( ;; )
@@ -1222,7 +1222,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
xub_StrLen nLineLen = aLine.Len();
SCCOL nCol = nStartCol;
bool bMultiLine = false;
- if ( bFixed ) // Feste Satzlaenge
+ if ( bFixed ) // Feste Satzlaenge
{
// Yes, the check is nCol<=MAXCOL+1, +1 because it is only an
// overflow if there is really data following to be put behind
@@ -1244,7 +1244,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
if (bIsQuoted && bQuotedAsText)
nFmt = SC_COL_TEXT;
- bMultiLine |= lcl_PutString(
+ bMultiLine |= lcl_PutString(
pDoc, nCol, nRow, nTab, aCell, nFmt,
&aNumFormatter, bDetectNumFormat, aTransliteration, aCalendar,
pEnglishTransliteration, pEnglishCalendar);
@@ -1253,7 +1253,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
}
}
}
- else // Nach Trennzeichen suchen
+ else // Nach Trennzeichen suchen
{
SCCOL nSourceCol = 0;
USHORT nInfoStart = 0;
@@ -1270,11 +1270,11 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
BYTE nFmt = SC_COL_STANDARD;
for ( i=nInfoStart; i<nInfoCount; i++ )
{
- if ( pColStart[i] == nSourceCol + 1 ) // pColStart ist 1-basiert
+ if ( pColStart[i] == nSourceCol + 1 ) // pColStart ist 1-basiert
{
nFmt = pColFormat[i];
- nInfoStart = i + 1; // ColInfos sind in Reihenfolge
- break; // for
+ nInfoStart = i + 1; // ColInfos sind in Reihenfolge
+ break; // for
}
}
if ( nFmt != SC_COL_SKIP )
@@ -1286,8 +1286,8 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
if (bIsQuoted && bQuotedAsText)
nFmt = SC_COL_TEXT;
- bMultiLine |= lcl_PutString(
- pDoc, nCol, nRow, nTab, aCell, nFmt,
+ bMultiLine |= lcl_PutString(
+ pDoc, nCol, nRow, nTab, aCell, nFmt,
&aNumFormatter, bDetectNumFormat, aTransliteration,
aCalendar, pEnglishTransliteration, pEnglishCalendar);
}
@@ -1315,9 +1315,9 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm )
}
// so far nRow/nEndCol pointed to the next free
if (nRow > nStartRow)
- --nRow;
+ --nRow;
if (nEndCol > nStartCol)
- nEndCol = ::std::min( static_cast<SCCOL>(nEndCol - 1), MAXCOL);
+ nEndCol = ::std::min( static_cast<SCCOL>(nEndCol - 1), MAXCOL);
if (bDetermineRange)
{
@@ -1367,7 +1367,7 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p
{
rbIsQuoted = false;
rField.Erase();
- if ( *p == cStr ) // String in Anfuehrungszeichen
+ if ( *p == cStr ) // String in Anfuehrungszeichen
{
rbIsQuoted = true;
const sal_Unicode* p1;
@@ -1381,7 +1381,7 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p
if( *p )
p++;
}
- else // bis zum Trennzeichen
+ else // bis zum Trennzeichen
{
const sal_Unicode* p0 = p;
while ( *p && !ScGlobal::UnicodeStrChr( pSeps, *p ) )
@@ -1390,7 +1390,7 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p
if( *p )
p++;
}
- if ( bMergeSeps ) // folgende Trennzeichen ueberspringen
+ if ( bMergeSeps ) // folgende Trennzeichen ueberspringen
{
while ( *p && ScGlobal::UnicodeStrChr( pSeps, *p ) )
p++;
@@ -1491,7 +1491,7 @@ BOOL ScImportExport::Doc2Text( SvStream& rStrm )
if( nCol < nEndCol )
lcl_WriteSimpleString( rStrm, String(cSep) );
}
-// if( nRow < nEndRow )
+// if( nRow < nEndRow )
WriteUnicodeOrByteEndl( rStrm );
if( rStrm.GetError() != SVSTREAM_OK )
break;
@@ -1537,7 +1537,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
rStrm.Seek( nOldPos );
for( ;; )
{
- //! allow unicode
+ //! allow unicode
rStrm.ReadLine( aByteLine );
aLine = String( aByteLine, rStrm.GetStreamCharSet() );
if( rStrm.IsEof() )
@@ -1597,7 +1597,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
{ // don't ignore value
if( bText )
{
- pDoc->PutCell( nCol, nRow, aRange.aStart.Tab(),
+ pDoc->PutCell( nCol, nRow, aRange.aStart.Tab(),
ScBaseCell::CreateTextCell( aText, pDoc),
(BOOL) TRUE);
}
@@ -1747,7 +1747,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm )
eVersion = SYLK_SCALC3;
bMyDoc = (eVersion <= SYLK_OWN);
}
- else if( cTag == 'E' ) // Ende
+ else if( cTag == 'E' ) // Ende
break;
}
if( !bData )
@@ -1920,7 +1920,7 @@ BOOL ScImportExport::Doc2HTML( SvStream& rStrm, const String& rBaseURL )
BOOL ScImportExport::Doc2RTF( SvStream& rStrm )
{
- // CharSet is ignored in ScExportRTF
+ // CharSet is ignored in ScExportRTF
ScFormatFilter::Get().ScExportRTF( rStrm, pDoc, aRange, RTL_TEXTENCODING_DONTKNOW );
return BOOL( rStrm.GetError() == SVSTREAM_OK );
}
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx
index dfbe7ed24fe0..866a23453ffe 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.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
@@ -55,14 +55,14 @@ void lcl_InvalidateOutliner( SfxBindings* pBindings )
pBindings->Invalidate( SID_OUTLINE_HIDE );
pBindings->Invalidate( SID_OUTLINE_REMOVE );
- pBindings->Invalidate( SID_STATUS_SUM ); // wegen ein-/ausblenden
+ pBindings->Invalidate( SID_STATUS_SUM ); // wegen ein-/ausblenden
pBindings->Invalidate( SID_ATTR_SIZE );
}
}
//------------------------------------------------------------------------
-//! PaintWidthHeight zur DocShell verschieben?
+//! PaintWidthHeight zur DocShell verschieben?
void lcl_PaintWidthHeight( ScDocShell& rDocShell, SCTAB nTab,
BOOL bColumns, SCCOLROW nStart, SCCOLROW nEnd )
@@ -72,7 +72,7 @@ void lcl_PaintWidthHeight( ScDocShell& rDocShell, SCTAB nTab,
USHORT nParts = PAINT_GRID;
SCCOL nStartCol = 0;
SCROW nStartRow = 0;
- SCCOL nEndCol = MAXCOL; // fuer Test auf Merge
+ SCCOL nEndCol = MAXCOL; // fuer Test auf Merge
SCROW nEndRow = MAXROW;
if ( bColumns )
{
@@ -138,7 +138,7 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b
if (pDoc->IsStreamValid(nTab))
pDoc->SetStreamValid(nTab, FALSE);
- USHORT nParts = 0; // Datenbereich nicht geaendert
+ USHORT nParts = 0; // Datenbereich nicht geaendert
if ( bColumns )
nParts |= PAINT_TOP;
else
@@ -154,7 +154,7 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b
else
{
if (!bApi)
- rDocShell.ErrorMessage(STR_MSSG_MAKEOUTLINE_0); // "Gruppierung nicht moeglich"
+ rDocShell.ErrorMessage(STR_MSSG_MAKEOUTLINE_0); // "Gruppierung nicht moeglich"
delete pUndoTab;
}
@@ -204,7 +204,7 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
if (pDoc->IsStreamValid(nTab))
pDoc->SetStreamValid(nTab, FALSE);
- USHORT nParts = 0; // Datenbereich nicht geaendert
+ USHORT nParts = 0; // Datenbereich nicht geaendert
if ( bColumns )
nParts |= PAINT_TOP;
else
@@ -224,7 +224,7 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
}
if (!bDone && !bApi)
- rDocShell.ErrorMessage(STR_MSSG_REMOVEOUTLINE_0); // "Aufheben nicht moeglich"
+ rDocShell.ErrorMessage(STR_MSSG_REMOVEOUTLINE_0); // "Aufheben nicht moeglich"
return bDone;
}
@@ -359,7 +359,7 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
if (bRecord && !pDoc->IsUndoEnabled())
bRecord = FALSE;
- ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); // ist schon da
+ ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); // ist schon da
if (!pTable)
return FALSE;
ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
@@ -388,29 +388,29 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoOutlineLevel( &rDocShell,
- nStart, nEnd, nTab, //! start und end berechnen
+ nStart, nEnd, nTab, //! start und end berechnen
pUndoDoc, pUndoTab,
bColumns, nLevel ) );
}
pDoc->InitializeNoteCaptions(nTab);
- ScSubOutlineIterator aIter( pArray ); // alle Eintraege
+ ScSubOutlineIterator aIter( pArray ); // alle Eintraege
ScOutlineEntry* pEntry;
while ((pEntry=aIter.GetNext()) != NULL)
{
USHORT nThisLevel = aIter.LastLevel();
BOOL bShow = (nThisLevel < nLevel);
- if (bShow) // einblenden
+ if (bShow) // einblenden
{
pEntry->SetHidden( FALSE );
pEntry->SetVisible( TRUE );
}
- else if ( nThisLevel == nLevel ) // ausblenden
+ else if ( nThisLevel == nLevel ) // ausblenden
{
pEntry->SetHidden( TRUE );
pEntry->SetVisible( TRUE );
}
- else // verdeckt
+ else // verdeckt
{
pEntry->SetVisible( FALSE );
}
@@ -481,7 +481,7 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
pUndoDoc, pUndoTab, TRUE ) );
}
- // Spalten
+ // Spalten
nMin=MAXCOL;
nMax=0;
@@ -502,7 +502,7 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
for ( i=nMin; i<=nMax; i++ )
pDoc->ShowCol( static_cast<SCCOL>(i), nTab, TRUE );
- // Zeilen
+ // Zeilen
nMin=MAXROW;
nMax=0;
@@ -522,7 +522,7 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord,
}
}
for ( i=nMin; i<=nMax; i++ )
- if ( !pDoc->RowFiltered( i,nTab ) ) // weggefilterte nicht einblenden
+ if ( !pDoc->RowFiltered( i,nTab ) ) // weggefilterte nicht einblenden
pDoc->ShowRow( i, nTab, TRUE );
pDoc->SetDrawPageSize(nTab);
@@ -594,7 +594,7 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
pUndoDoc, pUndoTab, FALSE ) );
}
- // Spalten
+ // Spalten
nCount = pColArray->GetCount(nColLevel);
for ( i=0; i<nCount; i++ )
@@ -607,7 +607,7 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord,
HideOutline( nTab, TRUE, nColLevel, i, FALSE, FALSE, bApi );
}
- // Zeilen
+ // Zeilen
nCount = pRowArray->GetCount(nRowLevel);
for ( i=0; i<nCount; i++ )
@@ -669,11 +669,11 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoDoOutline( &rDocShell,
- nStart, nEnd, nTab, pUndoDoc, //! start und end berechnen
+ nStart, nEnd, nTab, pUndoDoc, //! start und end berechnen
bColumns, nLevel, nEntry, TRUE ) );
}
-//! HideCursor();
+//! HideCursor();
pDoc->InitializeNoteCaptions(nTab);
pEntry->SetHidden(FALSE);
@@ -683,7 +683,7 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
if ( bColumns )
pDoc->ShowCol( static_cast<SCCOL>(i), nTab, TRUE );
else
- if ( !pDoc->RowFiltered( i,nTab ) ) // weggefilterte nicht einblenden
+ if ( !pDoc->RowFiltered( i,nTab ) ) // weggefilterte nicht einblenden
pDoc->ShowRow( i, nTab, TRUE );
}
@@ -713,15 +713,15 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
if (bPaint)
lcl_PaintWidthHeight( rDocShell, nTab, bColumns, nStart, nEnd );
-//! ShowCursor();
+//! ShowCursor();
rDocShell.SetDocumentModified();
-//! if (bPaint)
-//! UpdateScrollBars();
+//! if (bPaint)
+//! UpdateScrollBars();
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- return TRUE; //! immer ???
+ return TRUE; //! immer ???
}
BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry,
@@ -735,7 +735,7 @@ BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray();
ScOutlineEntry* pEntry = pArray->GetEntry( nLevel, nEntry );
SCCOLROW nStart = pEntry->GetStart();
- SCCOLROW nEnd = pEntry->GetEnd();
+ SCCOLROW nEnd = pEntry->GetEnd();
if ( bRecord )
{
@@ -759,7 +759,7 @@ BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
bColumns, nLevel, nEntry, FALSE ) );
}
-//! HideCursor();
+//! HideCursor();
pDoc->InitializeNoteCaptions(nTab);
pEntry->SetHidden(TRUE);
@@ -781,15 +781,15 @@ BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
if (bPaint)
lcl_PaintWidthHeight( rDocShell, nTab, bColumns, nStart, nEnd );
-//! ShowCursor();
+//! ShowCursor();
rDocShell.SetDocumentModified();
-//! if (bPaint)
-//! UpdateScrollBars();
+//! if (bPaint)
+//! UpdateScrollBars();
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
- return TRUE; //! immer ???
+ return TRUE; //! immer ???
}
diff --git a/sc/source/ui/docshell/pagedata.cxx b/sc/source/ui/docshell/pagedata.cxx
index e87c2322a228..6bd7ea083203 100644
--- a/sc/source/ui/docshell/pagedata.cxx
+++ b/sc/source/ui/docshell/pagedata.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
@@ -118,7 +118,7 @@ BOOL ScPageBreakData::IsEqual( const ScPageBreakData& rOther ) const
if ( pData[i].GetPrintRange() != rOther.pData[i].GetPrintRange() )
return FALSE;
- //! ScPrintRangeData komplett vergleichen ??
+ //! ScPrintRangeData komplett vergleichen ??
return TRUE;
}
diff --git a/sc/source/ui/docshell/pntlock.cxx b/sc/source/ui/docshell/pntlock.cxx
index 0450f7c67a0d..0b71453b39d7 100644
--- a/sc/source/ui/docshell/pntlock.cxx
+++ b/sc/source/ui/docshell/pntlock.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/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx
index 186b94f3bf83..7aecfb6d0b08 100644
--- a/sc/source/ui/docshell/servobj.cxx
+++ b/sc/source/ui/docshell/servobj.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
@@ -40,7 +40,7 @@
#include "impex.hxx"
#include "brdcst.hxx"
#include "rangenam.hxx"
-#include "sc.hrc" // SC_HINT_AREAS_CHANGED
+#include "sc.hrc" // SC_HINT_AREAS_CHANGED
using namespace formula;
@@ -87,15 +87,15 @@ ScServerObject::ScServerObject( ScDocShell* pShell, const String& rItem ) :
pDocSh( pShell ),
bRefreshListener( FALSE )
{
- // parse item string
+ // parse item string
if ( lcl_FillRangeFromName( aRange, pDocSh, rItem ) )
{
- aItemStr = rItem; // must be parsed again on ref update
+ aItemStr = rItem; // must be parsed again on ref update
}
else
{
- // parse ref
+ // parse ref
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = pDocSh->GetCurTab();
aRange.aStart.SetTab( nTab );
@@ -120,8 +120,8 @@ ScServerObject::ScServerObject( ScDocShell* pShell, const String& rItem ) :
pDocSh->GetDocument()->GetLinkManager()->InsertServer( this );
pDocSh->GetDocument()->StartListeningArea( aRange, &aForwarder );
- StartListening(*pDocSh); // um mitzubekommen, wenn die DocShell geloescht wird
- StartListening(*SFX_APP()); // for SC_HINT_AREAS_CHANGED
+ StartListening(*pDocSh); // um mitzubekommen, wenn die DocShell geloescht wird
+ StartListening(*SFX_APP()); // for SC_HINT_AREAS_CHANGED
}
__EXPORT ScServerObject::~ScServerObject()
@@ -169,7 +169,7 @@ BOOL __EXPORT ScServerObject::GetData(
if ( bRefreshListener )
{
- // refresh the listeners now (this is called from a timer)
+ // refresh the listeners now (this is called from a timer)
EndListeningAll();
pDocSh->GetDocument()->StartListeningArea( aRange, &aForwarder );
@@ -217,15 +217,15 @@ void __EXPORT ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
{
BOOL bDataChanged = FALSE;
- // DocShell can't be tested via type info, because SFX_HINT_DYING comes from the dtor
+ // DocShell can't be tested via type info, because SFX_HINT_DYING comes from the dtor
if ( &rBC == pDocSh )
{
- // from DocShell, only SFX_HINT_DYING is interesting
+ // from DocShell, only SFX_HINT_DYING is interesting
if ( rHint.ISA(SfxSimpleHint) && ((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING )
{
pDocSh = NULL;
EndListening(*SFX_APP());
- // don't access DocShell anymore for EndListening etc.
+ // don't access DocShell anymore for EndListening etc.
}
}
else if (rBC.ISA(SfxApplication))
@@ -233,7 +233,7 @@ void __EXPORT ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
if ( aItemStr.Len() && rHint.ISA(SfxSimpleHint) &&
((const SfxSimpleHint&)rHint).GetId() == SC_HINT_AREAS_CHANGED )
{
- // check if named range was modified
+ // check if named range was modified
ScRange aNew;
if ( lcl_FillRangeFromName( aNew, pDocSh, aItemStr ) && aNew != aRange )
bDataChanged = TRUE;
@@ -241,12 +241,12 @@ void __EXPORT ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
}
else
{
- // must be from Area broadcasters
+ // must be from Area broadcasters
const ScHint* pScHint = PTR_CAST( ScHint, &rHint );
if( pScHint && (pScHint->GetId() & (SC_HINT_DATACHANGED | SC_HINT_DYING)) )
bDataChanged = TRUE;
- else if (rHint.ISA(ScAreaChangedHint)) // position of broadcaster changed
+ else if (rHint.ISA(ScAreaChangedHint)) // position of broadcaster changed
{
ScRange aNewRange = ((const ScAreaChangedHint&)rHint).GetRange();
if ( aRange != aNewRange )
@@ -260,8 +260,8 @@ void __EXPORT ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
ULONG nId = ((const SfxSimpleHint&)rHint).GetId();
if (nId == SFX_HINT_DYING)
{
- // If the range is being deleted, listening must be restarted
- // after the deletion is complete (done in GetData)
+ // If the range is being deleted, listening must be restarted
+ // after the deletion is complete (done in GetData)
bRefreshListener = TRUE;
bDataChanged = TRUE;
}
diff --git a/sc/source/ui/docshell/sizedev.cxx b/sc/source/ui/docshell/sizedev.cxx
index 3171fa8164ae..e2452affd6f0 100644
--- a/sc/source/ui/docshell/sizedev.cxx
+++ b/sc/source/ui/docshell/sizedev.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
@@ -50,7 +50,7 @@ ScSizeDeviceProvider::ScSizeDeviceProvider( ScDocShell* pDocSh )
bOwner = FALSE;
aOldMapMode = pDevice->GetMapMode();
- pDevice->SetMapMode( MAP_PIXEL ); // GetNeededSize needs pixel MapMode
+ pDevice->SetMapMode( MAP_PIXEL ); // GetNeededSize needs pixel MapMode
// printer has right DigitLanguage already
}
else
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index f949b3ffb45c..65f3119009bc 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.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
@@ -129,8 +129,8 @@ __EXPORT ScTableLink::~ScTableLink()
void __EXPORT ScTableLink::Edit( Window* pParent, const Link& rEndEditHdl )
{
- // DefModalDialogParent setzen, weil evtl. aus der DocShell beim ConvertFrom
- // ein Optionen-Dialog kommt...
+ // DefModalDialogParent setzen, weil evtl. aus der DocShell beim ConvertFrom
+ // ein Optionen-Dialog kommt...
pImpl->m_aEndEditLink = rEndEditHdl;
pImpl->m_pOldParent = Application::GetDefDialogParent();
@@ -151,12 +151,12 @@ void __EXPORT ScTableLink::DataChanged( const String&,
String aFilter;
pLinkManager->GetDisplayNames( this,0,&aFile,NULL,&aFilter);
- // the file dialog returns the filter name with the application prefix
- // -> remove prefix
+ // the file dialog returns the filter name with the application prefix
+ // -> remove prefix
ScDocumentLoader::RemoveAppPrefix( aFilter );
if (!bInCreate)
- Refresh( aFile, aFilter, NULL, GetRefreshDelay() ); // don't load twice
+ Refresh( aFile, aFilter, NULL, GetRefreshDelay() ); // don't load twice
}
}
@@ -171,7 +171,7 @@ void __EXPORT ScTableLink::Closed()
pImpl->m_pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoRemoveLink( pImpl->m_pDocSh, aFileName ) );
- bAddUndo = FALSE; // nur einmal
+ bAddUndo = FALSE; // nur einmal
}
// Verbindung wird im dtor aufgehoben
@@ -187,7 +187,7 @@ BOOL ScTableLink::IsUsed() const
BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
const String* pNewOptions, ULONG nNewRefresh )
{
- // Dokument laden
+ // Dokument laden
if (!rNewFile.Len() || !rNewFilter.Len())
return FALSE;
@@ -204,21 +204,21 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
BOOL bUndo(pDoc->IsUndoEnabled());
- // wenn neuer Filter ausgewaehlt wurde, Optionen vergessen
+ // wenn neuer Filter ausgewaehlt wurde, Optionen vergessen
if ( rNewFilter != aFilterName )
aOptions.Erase();
- if ( pNewOptions ) // Optionen hart angegeben?
+ if ( pNewOptions ) // Optionen hart angegeben?
aOptions = *pNewOptions;
- // ItemSet immer anlegen, damit die DocShell die Optionen setzen kann
+ // ItemSet immer anlegen, damit die DocShell die Optionen setzen kann
SfxItemSet* pSet = new SfxAllItemSet( SFX_APP()->GetPool() );
if ( aOptions.Len() )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) );
SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, FALSE, pFilter, pSet);
- if ( bInEdit ) // only if using the edit dialog,
- pMed->UseInteractionHandler( TRUE ); // enable the filter options dialog
+ if ( bInEdit ) // only if using the edit dialog,
+ pMed->UseInteractionHandler( TRUE ); // enable the filter options dialog
ScDocShell* pSrcShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL);
SfxObjectShellRef aRef = pSrcShell;
@@ -229,22 +229,22 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
if (!aNewOpt.Len())
aNewOpt = aOptions;
- // Undo...
+ // Undo...
ScDocument* pUndoDoc = NULL;
BOOL bFirst = TRUE;
if (bAddUndo && bUndo)
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- // Tabellen kopieren
+ // Tabellen kopieren
ScDocShellModificator aModificator( *pImpl->m_pDocSh );
BOOL bNotFound = FALSE;
ScDocument* pSrcDoc = pSrcShell->GetDocument();
- // #74835# from text filters that don't set the table name,
- // use the one table regardless of link table name
+ // #74835# from text filters that don't set the table name,
+ // use the one table regardless of link table name
BOOL bAutoTab = (pSrcDoc->GetTableCount() == 1) &&
ScDocShell::HasAutomaticTableName( rNewFilter );
@@ -256,7 +256,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
{
String aTabName = pDoc->GetLinkTab(nTab);
- // Undo
+ // Undo
if (bAddUndo && bUndo)
{
@@ -272,7 +272,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
aOptions, aTabName, GetRefreshDelay() );
}
- // Tabellenname einer ExtDocRef anpassen
+ // Tabellenname einer ExtDocRef anpassen
if ( bNewUrlName && nMode == SC_LINK_VALUE )
{
@@ -283,11 +283,11 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
{
pDoc->RenameTab( nTab,
ScGlobal::GetDocTabName( aNewUrl, aTabName ),
- FALSE, TRUE ); // kein RefUpdate, kein ValidTabName
+ FALSE, TRUE ); // kein RefUpdate, kein ValidTabName
}
}
- // kopieren
+ // kopieren
SCTAB nSrcTab = 0;
bool bFound = false;
@@ -304,8 +304,8 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
}
if (bFound)
- pDoc->TransferTab( pSrcDoc, nSrcTab, nTab, FALSE, // nicht neu einfuegen
- (nMode == SC_LINK_VALUE) ); // nur Werte?
+ pDoc->TransferTab( pSrcDoc, nSrcTab, nTab, FALSE, // nicht neu einfuegen
+ (nMode == SC_LINK_VALUE) ); // nur Werte?
else
{
pDoc->DeleteAreaTab( 0,0,MAXCOL,MAXROW, nTab, IDF_ALL );
@@ -318,7 +318,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
ScRangeList aErrorCells; // cells on the linked sheets that need error values
- ScCellIterator aCellIter( pDoc, 0,0,0, MAXCOL,MAXROW,MAXTAB ); // all sheets
+ ScCellIterator aCellIter( pDoc, 0,0,0, MAXCOL,MAXROW,MAXTAB ); // all sheets
ScBaseCell* pCell = aCellIter.GetFirst();
while (pCell)
{
@@ -393,7 +393,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
}
}
- // neue Einstellungen merken
+ // neue Einstellungen merken
if ( bNewUrlName )
aFileName = aNewUrl;
@@ -402,18 +402,18 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
if ( aNewOpt != aOptions )
aOptions = aNewOpt;
- // aufraeumen
+ // aufraeumen
-// pSrcShell->DoClose();
+// pSrcShell->DoClose();
aRef->DoClose();
- // Undo
+ // Undo
if (bAddUndo && bUndo)
pImpl->m_pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoRefreshLink( pImpl->m_pDocSh, pUndoDoc ) );
- // Paint (koennen mehrere Tabellen sein)
+ // Paint (koennen mehrere Tabellen sein)
if (bDoPaint)
{
@@ -424,13 +424,13 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
if (bNotFound)
{
- //! Fehler ausgeben ?
+ //! Fehler ausgeben ?
}
pDoc->SetInLinkUpdate( FALSE );
- // notify Uno objects (for XRefreshListener)
- //! also notify Uno objects if file name was changed!
+ // notify Uno objects (for XRefreshListener)
+ //! also notify Uno objects if file name was changed!
ScLinkRefreshedHint aHint;
aHint.SetSheetLink( aFileName );
pDoc->BroadcastUno( aHint );
@@ -455,7 +455,7 @@ IMPL_LINK( ScTableLink, TableEndEditHdl, ::sfx2::SvBaseLink*, pLink )
// === ScDocumentLoader ==================================================
-String ScDocumentLoader::GetOptions( SfxMedium& rMedium ) // static
+String ScDocumentLoader::GetOptions( SfxMedium& rMedium ) // static
{
SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem* pItem;
@@ -491,7 +491,7 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName,
if ( eProt == INET_PROT_NOT_VALID ) // invalid URL?
return FALSE; // abort without creating a medium
- // Filter-Detection
+ // Filter-Detection
const SfxFilter* pSfxFilter = NULL;
SfxMedium* pMedium = new SfxMedium( rFileName, STREAM_STD_READ, FALSE );
@@ -513,7 +513,7 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName,
if ( pSfxFilter )
rFilter = pSfxFilter->GetFilterName();
else
- rFilter = ScDocShell::GetOwnFilterName(); // sonst Calc-Datei
+ rFilter = ScDocShell::GetOwnFilterName(); // sonst Calc-Datei
bOK = (rFilter.Len()>0);
}
@@ -521,7 +521,7 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName,
return bOK;
}
-void ScDocumentLoader::RemoveAppPrefix( String& rFilterName ) // static
+void ScDocumentLoader::RemoveAppPrefix( String& rFilterName ) // static
{
String aAppPrefix = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( STRING_SCAPP ));
aAppPrefix.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ": " ));
@@ -541,7 +541,7 @@ ScDocumentLoader::ScDocumentLoader( const String& rFileName,
const SfxFilter* pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( rFilterName );
- // ItemSet immer anlegen, damit die DocShell die Optionen setzen kann
+ // ItemSet immer anlegen, damit die DocShell die Optionen setzen kann
SfxItemSet* pSet = new SfxAllItemSet( SFX_APP()->GetPool() );
if ( rOptions.Len() )
pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, rOptions ) );
@@ -551,7 +551,7 @@ ScDocumentLoader::ScDocumentLoader( const String& rFileName,
return ;
if ( bWithInteraction )
- pMedium->UseInteractionHandler( TRUE ); // to enable the filter options dialog
+ pMedium->UseInteractionHandler( TRUE ); // to enable the filter options dialog
pDocShell = new ScDocShell( SFX_CREATE_MODE_INTERNAL );
aRef = pDocShell;
@@ -559,7 +559,7 @@ ScDocumentLoader::ScDocumentLoader( const String& rFileName,
ScDocument* pDoc = pDocShell->GetDocument();
if( pDoc )
{
- ScExtDocOptions* pExtDocOpt = pDoc->GetExtDocOptions();
+ ScExtDocOptions* pExtDocOpt = pDoc->GetExtDocOptions();
if( !pExtDocOpt )
{
pExtDocOpt = new ScExtDocOptions;
@@ -570,7 +570,7 @@ ScDocumentLoader::ScDocumentLoader( const String& rFileName,
pDocShell->DoLoad( pMedium );
- String aNew = GetOptions(*pMedium); // Optionen werden beim Laden per Dialog gesetzt
+ String aNew = GetOptions(*pMedium); // Optionen werden beim Laden per Dialog gesetzt
if (aNew.Len() && aNew != rOptions)
rOptions = aNew;
}
@@ -590,8 +590,8 @@ void ScDocumentLoader::ReleaseDocRef()
{
if ( aRef.Is() )
{
- // release reference without calling DoClose - caller must
- // have another reference to the doc and call DoClose later
+ // release reference without calling DoClose - caller must
+ // have another reference to the doc and call DoClose later
pDocShell = NULL;
pMedium = NULL;
diff --git a/sc/source/ui/docshell/tpstat.cxx b/sc/source/ui/docshell/tpstat.cxx
index b5ced9d105a8..640c0a9b6e8b 100644
--- a/sc/source/ui/docshell/tpstat.cxx
+++ b/sc/source/ui/docshell/tpstat.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,17 +53,17 @@ SfxTabPage* __EXPORT ScDocStatPage::Create( Window *pParent, const SfxItemSet& r
//------------------------------------------------------------------------
ScDocStatPage::ScDocStatPage( Window *pParent, const SfxItemSet& rSet )
- : SfxTabPage( pParent, ScResId(RID_SCPAGE_STAT), rSet ),
+ : SfxTabPage( pParent, ScResId(RID_SCPAGE_STAT), rSet ),
aFlInfo ( this, ScResId( FL_INFO ) ),
- aFtTablesLbl ( this, ScResId( FT_TABLES_LBL ) ),
- aFtTables ( this, ScResId( FT_TABLES ) ),
- aFtCellsLbl ( this, ScResId( FT_CELLS_LBL ) ),
- aFtCells ( this, ScResId( FT_CELLS ) ),
- aFtPagesLbl ( this, ScResId( FT_PAGES_LBL ) ),
- aFtPages ( this, ScResId( FT_PAGES ) )
+ aFtTablesLbl ( this, ScResId( FT_TABLES_LBL ) ),
+ aFtTables ( this, ScResId( FT_TABLES ) ),
+ aFtCellsLbl ( this, ScResId( FT_CELLS_LBL ) ),
+ aFtCells ( this, ScResId( FT_CELLS ) ),
+ aFtPagesLbl ( this, ScResId( FT_PAGES_LBL ) ),
+ aFtPages ( this, ScResId( FT_PAGES ) )
{
ScDocShell* pDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
- ScDocStat aDocStat;
+ ScDocStat aDocStat;
if ( pDocSh )
pDocSh->GetDocStat( aDocStat );
@@ -71,9 +71,9 @@ ScDocStatPage::ScDocStatPage( Window *pParent, const SfxItemSet& rSet )
String aInfo = aFlInfo.GetText();
aInfo += aDocStat.aDocName;
aFlInfo .SetText( aInfo );
- aFtTables .SetText( String::CreateFromInt32( aDocStat.nTableCount ) );
- aFtCells .SetText( String::CreateFromInt32( aDocStat.nCellCount ) );
- aFtPages .SetText( String::CreateFromInt32( aDocStat.nPageCount ) );
+ aFtTables .SetText( String::CreateFromInt32( aDocStat.nTableCount ) );
+ aFtCells .SetText( String::CreateFromInt32( aDocStat.nCellCount ) );
+ aFtPages .SetText( String::CreateFromInt32( aDocStat.nPageCount ) );
FreeResource();
}
diff --git a/sc/source/ui/docshell/tpstat.hrc b/sc/source/ui/docshell/tpstat.hrc
index 2b57d20f1a26..67cbea380f9b 100644
--- a/sc/source/ui/docshell/tpstat.hrc
+++ b/sc/source/ui/docshell/tpstat.hrc
@@ -1,7 +1,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
@@ -26,11 +26,11 @@
************************************************************************/
#include "sc.hrc"
-#define FT_TABLES 1
-#define FT_TABLES_LBL 2
-#define FT_CELLS 3
-#define FT_CELLS_LBL 4
-#define FT_PAGES 5
-#define FT_PAGES_LBL 6
+#define FT_TABLES 1
+#define FT_TABLES_LBL 2
+#define FT_CELLS 3
+#define FT_CELLS_LBL 4
+#define FT_PAGES 5
+#define FT_PAGES_LBL 6
#define FL_INFO 1
diff --git a/sc/source/ui/docshell/tpstat.src b/sc/source/ui/docshell/tpstat.src
index 7226da4642c3..b5e338ddc6a8 100644
--- a/sc/source/ui/docshell/tpstat.src
+++ b/sc/source/ui/docshell/tpstat.src
@@ -1,7 +1,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
@@ -28,7 +28,7 @@
#include "tpstat.hrc"
TabPage RID_SCPAGE_STAT
{
- // HelpID = HID_DOC_STAT;
+ // HelpID = HID_DOC_STAT;
Hide = TRUE ;
Size = MAP_APPFONT ( 260 , 185 ) ;
FixedText FT_TABLES_LBL