summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-André Jacquod <pjacquod@alumni.ethz.ch>2010-11-20 21:25:42 +0100
committerDavid Tardon <dtardon@redhat.com>2010-11-21 10:28:10 +0100
commit9ba31053f4aaf1da7f6862518839af5664e1608d (patch)
treebbed0b459b940939b65e7d549e2c0af99c26f999
parent8eda3dc9f99a8c8ac07f75fa480bd6d8dcb34d37 (diff)
removing dead code in calc docshell
-rw-r--r--sc/source/ui/docshell/docfunc.cxx7
-rw-r--r--sc/source/ui/docshell/docsh2.cxx33
-rw-r--r--sc/source/ui/docshell/docsh4.cxx24
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx4
-rw-r--r--sc/source/ui/docshell/tablink.cxx4
5 files changed, 0 insertions, 72 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index b83d809b96cd..98490351dd13 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3745,13 +3745,6 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
if (bSize)
{
-/* SCCOL nCols[2];
- nCols[0] = nStartCol;
- nCols[1] = nEndCol;
- SCROW nRows[2];
- nRows[0] = nStartRow;
- nRows[1] = nEndRow;
-*/
SCCOLROW nCols[2] = { nStartCol, nEndCol };
SCCOLROW nRows[2] = { nStartRow, nEndRow };
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index ab567f7d23df..a9bf1e2975f0 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -57,11 +57,6 @@
#include <sfx2/app.hxx>
// INCLUDE ---------------------------------------------------------------
-/*
-#include <svdrwetc.hxx>
-#include <svdrwobx.hxx>
-#include <sostor.hxx>
-*/
#include "drwlayer.hxx"
#include "stlpool.hxx"
#include "docsh.hxx"
@@ -103,27 +98,6 @@ BOOL __EXPORT ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xSt
InitItems();
CalcOutputFactor();
-#if 0
- uno::Any aGlobs;
- uno::Sequence< uno::Any > aArgs(1);
- 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 ),
- // a) if another document is opened then in theory ThisComponent
- // 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
- // I could be wrong though
- // There may be implications setting the current component
- // too early :-/ so I will just manually set the Basic Variables
- BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
- if ( pAppMgr )
- pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] );
-#endif
return bRet;
}
@@ -147,13 +121,8 @@ void ScDocShell::InitItems()
{
// AllItemSet fuer Controller mit benoetigten Items fuellen:
- // if ( pImpl->pFontList )
- // delete pImpl->pFontList;
-
// 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 ) );
UpdateFontList();
ScDrawLayer* pDrawLayer = aDocument.GetDrawLayer();
@@ -170,7 +139,6 @@ void ScDocShell::InitItems()
pDrawLayer->SetNotifyUndoActionHdl( LINK( pDocFunc, ScDocFunc, NotifyDrawUndo ) );
- //if (SfxObjectShell::HasSbxObject())
pDrawLayer->UpdateBasic(); // DocShell-Basic in DrawPages setzen
}
else
@@ -200,7 +168,6 @@ void ScDocShell::InitItems()
i18n::ForbiddenCharacters aForbidden;
aAsian.GetStartEndChars( pLocales[i], aForbidden.beginLine, aForbidden.endLine );
LanguageType eLang = SvxLocaleToLanguage(pLocales[i]);
- //pDoc->SetForbiddenCharacters( eLang, aForbidden );
xForbiddenTable->SetForbiddenCharacters( eLang, aForbidden );
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index bc1ef1a40cfa..5ca0e9e7dd1a 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -309,7 +309,6 @@ void ScDocShell::Execute( SfxRequest& rReq )
if (pReqArgs)
{
ScDocument* pDoc = GetDocument();
-// BOOL bUndo (pDoc->IsUndoEnabled());
const SfxPoolItem* pItem;
String aChartName, aRangeName;
@@ -459,7 +458,6 @@ void ScDocShell::Execute( SfxRequest& rReq )
if (pBindings)
{
pBindings->Invalidate( FID_AUTO_CALC );
-// pBindings->Invalidate( FID_RECALC ); // jetzt immer enabled
}
rReq.AppendItem( SfxBoolItem( FID_AUTO_CALC, bNewVal ) );
rReq.Done();
@@ -2127,22 +2125,6 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
delete pDrawView;
}
}
-
-#if 0
- if ( n+1 < nCollateCopies &&
- (pPrinter->GetDuplexMode() == DUPLEX_SHORTEDGE || pPrinter->GetDuplexMode() == DUPLEX_LONGEDGE) &&
- ( nPrinted % 2 ) == 1 )
- {
- // #105584# when several collated copies are printed in duplex mode, and there is
- // 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();
- }
-#endif
}
}
@@ -2223,10 +2205,6 @@ void ScDocShell::GetState( SfxItemSet &rSet )
// 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() ) );
@@ -2276,7 +2254,6 @@ void ScDocShell::GetSbxState( SfxItemSet &rSet )
void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, USHORT nAspect )
{
-// bIsOle = TRUE; // jetzt ueber den CreateMode
SCTAB nVisTab = aDocument.GetVisibleTab();
if (!aDocument.HasTable(nVisTab))
@@ -2319,7 +2296,6 @@ Rectangle __EXPORT ScDocShell::GetVisArea( USHORT nAspect ) const
if( nAspect == ASPECT_THUMBNAIL )
{
-// 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 )
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index e1a9f3703914..47e2378ca36f 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1323,20 +1323,17 @@ static FormulaToken* lcl_convertToToken(ScBaseCell* pCell)
static_cast<ScEditCell*>(pCell)->GetString(aStr);
return new formula::FormulaStringToken(aStr);
}
- //break;
case CELLTYPE_STRING:
{
String aStr;
static_cast<ScStringCell*>(pCell)->GetString(aStr);
return new formula::FormulaStringToken(aStr);
}
- //break;
case CELLTYPE_VALUE:
{
double fVal = static_cast<ScValueCell*>(pCell)->GetValue();
return new formula::FormulaDoubleToken(fVal);
}
- //break;
case CELLTYPE_FORMULA:
{
ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
@@ -1355,7 +1352,6 @@ static FormulaToken* lcl_convertToToken(ScBaseCell* pCell)
return new formula::FormulaStringToken(aStr);
}
}
- //break;
default:
DBG_ERROR("attempted to convert an unknown cell type.");
}
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index f949b3ffb45c..40b3678762fe 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -404,7 +404,6 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter,
// aufraeumen
-// pSrcShell->DoClose();
aRef->DoClose();
// Undo
@@ -577,9 +576,6 @@ ScDocumentLoader::ScDocumentLoader( const String& rFileName,
ScDocumentLoader::~ScDocumentLoader()
{
-/* if ( pDocShell )
- pDocShell->DoClose();
-*/
if ( aRef.Is() )
aRef->DoClose();
else if ( pMedium )