summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas.kanapickas@gmail.com>2010-10-20 11:21:22 +0200
committerKohei Yoshida <kyoshida@novell.com>2010-10-20 11:21:55 +0200
commitee9befa313473b8530ba2ab21c3b8ded1e599c90 (patch)
tree427ffbb0c2938fb33bb6cf8313a96d5e9e2c05e4 /sc
parent9b05409ff7bf1e6bb52b288852a506b764ed6f76 (diff)
Removed lots of dead code.
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/compiler.hxx2
-rw-r--r--sc/inc/drwlayer.hxx3
-rw-r--r--sc/source/core/data/attarray.cxx106
-rw-r--r--sc/source/core/data/column.cxx30
-rw-r--r--sc/source/core/data/column3.cxx10
-rw-r--r--sc/source/core/data/documen5.cxx9
-rw-r--r--sc/source/core/data/documen9.cxx5
-rw-r--r--sc/source/core/data/drwlayer.cxx38
-rw-r--r--sc/source/core/data/table4.cxx8
-rw-r--r--sc/source/core/data/validat.cxx10
-rw-r--r--sc/source/core/tool/addincol.cxx15
-rw-r--r--sc/source/core/tool/addinlis.cxx14
-rw-r--r--sc/source/core/tool/address.cxx28
-rw-r--r--sc/source/core/tool/autoform.cxx25
-rw-r--r--sc/source/core/tool/chgviset.cxx11
-rw-r--r--sc/source/core/tool/compiler.cxx15
-rw-r--r--sc/source/core/tool/interpr1.cxx8
-rw-r--r--sc/source/core/tool/interpr3.cxx17
-rw-r--r--sc/source/core/tool/reftokenhelper.cxx20
-rw-r--r--sc/source/filter/excel/excdoc.cxx6
-rw-r--r--sc/source/filter/excel/excform.cxx57
-rw-r--r--sc/source/filter/excel/excform8.cxx5
-rw-r--r--sc/source/filter/excel/tokstack.cxx6
-rw-r--r--sc/source/filter/excel/xeformula.cxx7
-rw-r--r--sc/source/filter/excel/xepivot.cxx3
-rw-r--r--sc/source/filter/excel/xestyle.cxx63
-rw-r--r--sc/source/filter/excel/xicontent.cxx17
-rw-r--r--sc/source/filter/excel/xiescher.cxx6
-rw-r--r--sc/source/filter/html/htmlexp.cxx7
-rw-r--r--sc/source/filter/inc/excform.hxx4
-rw-r--r--sc/source/filter/inc/xestyle.hxx24
-rw-r--r--sc/source/filter/rtf/rtfexp.cxx31
-rw-r--r--sc/source/filter/xml/xmlbodyi.cxx36
-rw-r--r--sc/source/ui/app/inputhdl.cxx25
-rw-r--r--sc/source/ui/dbgui/asciiopt.cxx76
-rw-r--r--sc/source/ui/docshell/docfunc.cxx11
-rw-r--r--sc/source/ui/docshell/docsh4.cxx4
-rw-r--r--sc/source/ui/docshell/impex.cxx45
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx27
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx24
-rw-r--r--sc/source/ui/drawfunc/futext3.cxx51
-rw-r--r--sc/source/ui/navipi/navipi.cxx58
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx1
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx7
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx47
-rw-r--r--sc/source/ui/unoobj/docuno.cxx71
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx16
-rw-r--r--sc/source/ui/unoobj/textuno.cxx7
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx83
-rw-r--r--sc/source/ui/view/cellsh2.cxx27
-rw-r--r--sc/source/ui/view/drawvie4.cxx38
-rw-r--r--sc/source/ui/view/gridwin.cxx26
-rw-r--r--sc/source/ui/view/gridwin4.cxx32
-rw-r--r--sc/source/ui/view/hdrcont.cxx9
-rw-r--r--sc/source/ui/view/output.cxx40
-rw-r--r--sc/source/ui/view/output2.cxx35
-rw-r--r--sc/source/ui/view/preview.cxx7
-rw-r--r--sc/source/ui/view/select.cxx27
-rw-r--r--sc/source/ui/view/tabview.cxx48
-rw-r--r--sc/source/ui/view/tabview5.cxx26
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx32
-rw-r--r--sc/source/ui/view/tabvwshf.cxx14
-rw-r--r--sc/source/ui/view/viewfun5.cxx19
-rw-r--r--sc/workben/test.cxx104
64 files changed, 15 insertions, 1668 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index d2fa4dddfcf6..5547d97b61d9 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -100,14 +100,12 @@ class ScTokenArray;
// constants and data types internal to compiler
-#if 0
/*
OpCode eOp; // OpCode
formula::StackVar eType; // type of data
USHORT nRefCnt; // reference count
BOOL bRaw; // not cloned yet and trimmed to real size
*/
-#endif
#define SC_TOKEN_FIX_MEMBERS \
OpCode eOp; \
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 602c28235f73..442d4810fd17 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -164,9 +164,6 @@ public:
void DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1,
SCCOL nCol2,SCROW nRow2 );
void DeleteObjectsInSelection( const ScMarkData& rMark );
-#if 0
- void DeleteObjects( SCTAB nTab );
-#endif
void CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const Rectangle& rRange );
void CopyFromClip( ScDrawLayer* pClipModel,
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 9c3840db8100..d64420626ad9 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -2478,110 +2478,4 @@ BOOL ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
return FALSE;
}
-//------------------------------------------------------------------------
-//
-// Laden / Speichern
-//
-
-
-#if 0
-void ScAttrArray::Save( SvStream& /* rStream */ ) const
-{
-#if SC_ROWLIMIT_STREAM_ACCESS
-#error address types changed!
- ScWriteHeader aHdr( rStream, 8 );
-
- ScDocumentPool* pDocPool = pDocument->GetPool();
-
- USHORT nSaveCount = nCount;
- SCROW nSaveMaxRow = pDocument->GetSrcMaxRow();
- if ( nSaveMaxRow != MAXROW )
- {
- if ( nSaveCount > 1 && pData[nSaveCount-2].nRow >= nSaveMaxRow )
- {
- pDocument->SetLostData(); // Warnung ausgeben
- do
- --nSaveCount;
- while ( nSaveCount > 1 && pData[nSaveCount-2].nRow >= nSaveMaxRow );
- }
- }
-
- rStream << nSaveCount;
-
- const SfxPoolItem* pItem;
- for (SCSIZE i=0; i<nSaveCount; i++)
- {
- rStream << Min( pData[i].nRow, nSaveMaxRow );
-
- const ScPatternAttr* pPattern = pData[i].pPattern;
- pDocPool->StoreSurrogate( rStream, pPattern );
-
- // FALSE, weil ATTR_CONDITIONAL (noch) nicht in Vorlagen:
- if (pPattern->GetItemSet().GetItemState(ATTR_CONDITIONAL,FALSE,&pItem) == SFX_ITEM_SET)
- pDocument->SetConditionalUsed( ((const SfxUInt32Item*)pItem)->GetValue() );
-
- if (pPattern->GetItemSet().GetItemState(ATTR_VALIDDATA,FALSE,&pItem) == SFX_ITEM_SET)
- pDocument->SetValidationUsed( ((const SfxUInt32Item*)pItem)->GetValue() );
- }
-#endif // SC_ROWLIMIT_STREAM_ACCESS
-}
-
-
-void ScAttrArray::Load( SvStream& /* rStream */ )
-{
-#if SC_ROWLIMIT_STREAM_ACCESS
-#error address types changed!
- ScDocumentPool* pDocPool = pDocument->GetPool();
-
- ScReadHeader aHdr( rStream );
-
- USHORT nNewCount;
- rStream >> nNewCount;
- if ( nNewCount > MAXROW+1 ) // wuerde das Array zu gross?
- {
- pDocument->SetLostData();
- rStream.SetError( SVSTREAM_FILEFORMAT_ERROR );
- return;
- }
-
- Reset( pDocument->GetDefPattern(), FALSE ); // loeschen
- pData = new ScAttrEntry[nNewCount]; // neu anlegen
- for (SCSIZE i=0; i<nNewCount; i++)
- {
- rStream >> pData[i].nRow;
-
- USHORT nWhich = ATTR_PATTERN;
- const ScPatternAttr* pNewPattern = (const ScPatternAttr*)
- pDocPool->LoadSurrogate( rStream, nWhich, ATTR_PATTERN );
- if (!pNewPattern)
- {
- // da is was schiefgelaufen
- DBG_ERROR("ScAttrArray::Load: Surrogat nicht im Pool");
- pNewPattern = pDocument->GetDefPattern();
- }
- ScDocumentPool::CheckRef( *pNewPattern );
- pData[i].pPattern = pNewPattern;
-
- // LoadSurrogate erhoeht auch die Ref
- }
- nCount = nLimit = nNewCount;
-
- if ( nCount > 1 && pData[nCount-2].nRow >= MAXROW ) // faengt ein Attribut hinter MAXROW an?
- {
- pDocument->SetLostData();
- rStream.SetError( SVSTREAM_FILEFORMAT_ERROR );
- return;
- }
-
- if ( pDocument->GetSrcMaxRow() != MAXROW ) // Ende anpassen?
- {
- // Ende immer auf MAXROW umsetzen (nur auf 32 Bit)
-
- DBG_ASSERT( pData[nCount-1].nRow == pDocument->GetSrcMaxRow(), "Attribut-Ende ?!?" );
- pData[nCount-1].nRow = MAXROW;
- }
-#endif // SC_ROWLIMIT_STREAM_ACCESS
-}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index c36ff0dfe61b..27dce7c8f414 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -689,20 +689,6 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr )
delete pTemp;
// alte Version mit SfxItemPoolCache:
-#if 0
- SfxItemPoolCache aCache( pDocument->GetPool(), &rAttr );
-
- const ScPatternAttr* pPattern = pAttrArray->GetPattern( nRow );
-
- // TRUE = alten Eintrag behalten
-
- ScPatternAttr* pNewPattern = (ScPatternAttr*) &aCache.ApplyTo( *pPattern, TRUE );
- ScDocumentPool::CheckRef( *pPattern );
- ScDocumentPool::CheckRef( *pNewPattern );
-
- if (pNewPattern != pPattern)
- pAttrArray->SetPattern( nRow, pNewPattern );
-#endif
}
#ifdef _MSC_VER
@@ -1123,22 +1109,6 @@ BOOL ScColumn::TestInsertRow( SCSIZE nSize ) const
pItems[nCount-1].nRow <= MAXROW-(SCROW)nSize && pAttrArray->TestInsertRow( nSize ) );
else
return pAttrArray->TestInsertRow( nSize );
-
-#if 0
- //! rausgeschobene Attribute bei Undo beruecksichtigen
-
- if ( nSize > static_cast<SCSIZE>(MAXROW) )
- return FALSE;
-
- SCSIZE nVis = nCount;
- while ( nVis && pItems[nVis-1].pCell->IsBlank() )
- --nVis;
-
- if ( nVis )
- return ( pItems[nVis-1].nRow <= MAXROW-nSize );
- else
- return TRUE;
-#endif
}
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 298b979dcdd2..b34e764a11a7 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1558,16 +1558,6 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollec
pData = new TypedStrData( aString, nValue, SC_STRTYPE_VALUE );
}
-#if 0 // DR
- ScPostIt aCellNote( ScPostIt::UNINITIALIZED );
- // Hide visible notes during Filtering.
- if(pCell->GetNote(aCellNote) && aCellNote.IsCaptionShown())
- {
- ScDetectiveFunc( pDocument, nTab ).HideComment( nCol, nRow );
- aCellNote.SetShown( false );
- pCell->SetNote(aCellNote);
- }
-#endif
if ( !rStrings.Insert( pData ) )
delete pData; // doppelt
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index ffd6dce73d27..2732a6e3251f 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -559,15 +559,6 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
}
if ( bChanged )
{
-#if 0
- if ( nDz != 0 )
- { // #81844# sheet to be deleted or inserted or moved
- // => no valid sheet names for references right now
- pChartListener->ChangeListening( aNewRLR, bDataChanged );
- pChartListener->ScheduleSeriesRanges();
- }
- else
-#endif
{
// SetChartRangeList( pChartListener->GetString(), aNewRLR );
// pChartListener->ChangeListening( aNewRLR, bDataChanged );
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index feadd4f7fd23..0e1d4be1e3d6 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -170,11 +170,6 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell )
pDrawLayer->ScRenamePage( nTab, aTabName );
pTab[nTab]->SetDrawPageSize(false,false); // #54782# set the right size immediately
-#if 0
- ULONG nx = (ULONG) ((double) (MAXCOL+1) * STD_COL_WIDTH * HMM_PER_TWIPS );
- ULONG ny = (ULONG) ((double) (MAXROW+1) * ScGlobal::nStdRowHeight * HMM_PER_TWIPS );
- pDrawLayer->SetPageSize( nTab, Size( nx, ny ) );
-#endif
}
}
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 450ae369e81d..31b2291c1ef8 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1200,44 +1200,6 @@ BOOL ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow )
return bFound;
}
-#if 0
-void ScDrawLayer::DeleteObjects( SCTAB nTab )
-{
- SdrPage* pPage = GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage,"Page ?");
- if (!pPage)
- return;
-
- pPage->RecalcObjOrdNums();
-
- long nDelCount = 0;
- ULONG nObjCount = pPage->GetObjCount();
- if (nObjCount)
- {
- SdrObject** ppObj = new SdrObject*[nObjCount];
-
- SdrObjListIter aIter( *pPage, IM_FLAT );
- SdrObject* pObject = aIter.Next();
- while (pObject)
- {
- // alle loeschen
- ppObj[nDelCount++] = pObject;
- pObject = aIter.Next();
- }
-
- long i;
- if (bRecording)
- for (i=1; i<=nDelCount; i++)
- AddCalcUndo( new SdrUndoRemoveObj( *ppObj[nDelCount-i] ) );
-
- for (i=1; i<=nDelCount; i++)
- pPage->RemoveObject( ppObj[nDelCount-i]->GetOrdNum() );
-
- delete[] ppObj;
- }
-}
-#endif
-
void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1,
SCCOL nCol2,SCROW nRow2 )
{
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index a523827ad940..42b655532757 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -461,13 +461,7 @@ void ScTable::FillFormula(ULONG& /* nFormulaCounter */, BOOL /* bFirst */, ScFor
ScAddress aAddr( nDestCol, nDestRow, nTab );
ScFormulaCell* pDestCell = new ScFormulaCell( *pSrcCell, *pDocument, aAddr );
aCol[nDestCol].Insert(nDestRow, pDestCell);
-#if 0
-// mit RelRefs unnoetig
- pDestCell->UpdateReference(URM_COPY,
- ScRange( aAddr, aAddr ),
- nDestCol - pSrcCell->aPos.Col(),
- nDestRow - pSrcCell->aPos.Row(), 0);
-#endif
+
if ( bLast && pDestCell->GetMatrixFlag() )
{
ScAddress aOrg;
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 8a81b75ec343..1891c3a92b23 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -298,16 +298,6 @@ BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
// keine Sicherheitsabfrage mehr vorneweg (nur CheckMacroWarn), das passiert im CallBasic
-#if 0
- // Makro-Name liegt in folgender Form vor:
- // "Macroname.Modulname.Libname.Dokumentname" oder
- // "Macroname.Modulname.Libname.Applikationsname"
- String aMacroName = aErrorTitle.GetToken(0, '.');
- String aModulName = aErrorTitle.GetToken(1, '.');
- String aLibName = aErrorTitle.GetToken(2, '.');
- String aDocName = aErrorTitle.GetToken(3, '.');
-#endif
-
// Funktion ueber den einfachen Namen suchen,
// dann aBasicStr, aMacroStr fuer SfxObjectShell::CallBasic zusammenbauen
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 18d17bd9a6e6..6d3d202325ab 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -1228,14 +1228,6 @@ String ScUnoAddInCollection::FindFunction( const String& rUpperName, BOOL bLocal
ScAddInHashMap::const_iterator iLook( pLocalHashMap->find( rUpperName ) );
if ( iLook != pLocalHashMap->end() )
return iLook->second->GetOriginalName();
-
-#if 0
- // after that, scan international names (really?)
-
- iLook = pNameHashMap->find( rUpperName );
- if ( iLook != pNameHashMap->end() )
- return iLook->second->GetOriginalName();
-#endif
}
else
{
@@ -1573,12 +1565,7 @@ void ScUnoAddInCall::ExecuteCallWithArgs(uno::Sequence<uno::Any>& rCallArgs)
{
nErrCode = errIllegalArgument;
}
-#if 0
- catch(FloatingPointException&)
- {
- nErrCode = errIllegalFPOperation;
- }
-#endif
+
catch(reflection::InvocationTargetException& rWrapped)
{
if ( rWrapped.TargetException.getValueType().equals(
diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx
index 36430d9fa2cf..8a4e992b5119 100644
--- a/sc/source/core/tool/addinlis.cxx
+++ b/sc/source/core/tool/addinlis.cxx
@@ -140,20 +140,6 @@ void SAL_CALL ScAddInListener::modified( const ::com::sun::star::sheet::ResultEv
aResult = aEvent.Value; // store result
- if ( !HasListeners() )
- {
- //! remove from list and removeListener, as in RemoveDocument ???
-
-#if 0
- //! this will crash if called before first StartListening !!!
- aAllListeners.Remove( this );
- if ( xVolRes.is() )
- xVolRes->removeResultListener( this );
- release(); // Ref for aAllListeners - this may be deleted here
- return;
-#endif
- }
-
// notify document of changes
Broadcast( ScHint( SC_HINT_DATACHANGED, ScAddress(), NULL ) );
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 0039892b2c18..f09812526a0c 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -632,13 +632,6 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
// Keep in mind that nFlags2 gets left-shifted by 4 bits before being merged.
USHORT nFlags2 = SCA_VALID_TAB;
-#if 0
- {
- ByteString aStr(p, RTL_TEXTENCODING_UTF8);
- aStr.Append(static_cast< char >(0));
- std::cerr << "parse::XL::R1C1 \'" << aStr.GetBuffer() << '\'' << std::endl;
- }
-#endif
p = r.Parse_XL_Header( p, pDoc, aExternDocName, aStartTabName,
aEndTabName, nFlags, bOnlyAcceptSingle, NULL );
@@ -814,13 +807,6 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
String aExternDocName, aStartTabName, aEndTabName; // for external link table
USHORT nFlags = SCA_VALID | SCA_VALID_TAB, nFlags2 = SCA_VALID_TAB;
-#if 0
- {
- ByteString aStr(p, RTL_TEXTENCODING_UTF8);
- aStr.Append(static_cast< char >(0));
- std::cerr << "parse::XL::A1 \'" << aStr.GetBuffer() << '\'' << std::endl;
- }
-#endif
p = r.Parse_XL_Header( p, pDoc, aExternDocName, aStartTabName,
aEndTabName, nFlags, bOnlyAcceptSingle, pExternalLinks );
@@ -1622,13 +1608,6 @@ getFileNameFromDoc( const ScDocument* pDoc )
sFileName = pShell->GetTitle();
}
}
-#if 0
- {
- ByteString aStr( sFileName, RTL_TEXTENCODING_UTF8 );
- aStr.Append(static_cast< char >(0));
- std::cerr << "docname \'" << aStr.GetBuffer() << '\'' << std::endl;
- }
-#endif
return sFileName;
}
@@ -1726,13 +1705,6 @@ lcl_Split_DocTab( const ScDocument* pDoc, SCTAB nTab,
{
pDoc->GetName( nTab, rTabName );
rDocName.Erase();
-#if 0
- {
- ByteString aStr(rTabName, RTL_TEXTENCODING_UTF8);
- aStr.Append(static_cast< char >(0));
- std::cerr << "tabname \'" << aStr.GetBuffer() << '\'' << std::endl;
- }
-#endif
// External reference, same as in ScCompiler::MakeTabStr()
if ( rTabName.GetChar(0) == '\'' )
{ // "'Doc'#Tab"
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index ba8daad319a3..bf89efebeaa5 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -870,31 +870,6 @@ BOOL ScAutoFormatData::Save(SvStream& rStream)
// --- from 680/dr25 on: #21549# store strings as UTF-8
rStream.WriteByteString( aName, RTL_TEXTENCODING_UTF8 );
-#if 0
- // This was an internal flag to allow creating AutoFormats with localized names
-
- if ( USHRT_MAX == nStrResId )
- {
- String aIniVal( SFX_APP()->GetIniManager()->Get(
- SFX_GROUP_WORKINGSET_IMPL,
- String( RTL_CONSTASCII_USTRINGPARAM( "SaveTableAutoFmtNameId" ))));
- if( 0 != aIniVal.ToInt32() )
- {
- // check Name for ResId
- for( USHORT nId = RID_SVXSTR_TBLAFMT_BEGIN;
- RID_SVXSTR_TBLAFMT_END > nId; ++nId )
- {
- String s( SVX_RES( nId ) );
- if( s == aName )
- {
- nStrResId = nId - RID_SVXSTR_TBLAFMT_BEGIN;
- break;
- }
- }
- }
- }
-#endif
-
rStream << nStrResId;
rStream << ( b = bIncludeFont );
rStream << ( b = bIncludeJustify );
diff --git a/sc/source/core/tool/chgviset.cxx b/sc/source/core/tool/chgviset.cxx
index df7ea28feb77..514336368797 100644
--- a/sc/source/core/tool/chgviset.cxx
+++ b/sc/source/core/tool/chgviset.cxx
@@ -143,22 +143,13 @@ void ScChangeViewSettings::AdjustDateMode( const ScDocument& rDoc )
if ( pLast )
{
aFirstDateTime = pLast->GetDateTime();
-#if 0
-// This would be the proper handling. But since the SvxTPFilter dialog uses
-// DateField/TimeField, and the filter dialog is used in ScAcceptChgDlg as the
-// controlling instance, and the TimeFields are used there without seconds or
-// 100ths, we'd display some extra entries between the floor of the minute and
-// the start of the next minute.
- // add one 100th second to point past last saved
- aFirstDateTime += Time( 0, 0, 0, 1 );
-#else
+
// Set the next minute as the start time and assume that
// the document isn't saved, reloaded, edited and filter set
// all together during the gap between those two times.
aFirstDateTime += Time( 0, 1 );
aFirstDateTime.SetSec(0);
aFirstDateTime.Set100Sec(0);
-#endif
}
}
if ( !pLast )
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index d5f22a5cc9c9..ee578a82a32a 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3568,11 +3568,6 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
bool bAllowBooleans = bInArray;
xub_StrLen nSpaces = NextSymbol(bInArray);
-#if 0
- fprintf( stderr, "NextNewToken '%s' (spaces = %d)\n",
- rtl::OUStringToOString( cSymbol, RTL_TEXTENCODING_UTF8 ).getStr(), nSpaces );
-#endif
-
if (!cSymbol[0])
return false;
@@ -3646,11 +3641,6 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
bMayBeFuncName = ( *p == '(' );
}
-#if 0
- fprintf( stderr, "Token '%s'\n",
- rtl::OUStringToOString( aUpper, RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
-
// #42016# Italian ARCTAN.2 resulted in #REF! => IsOpcode() before
// IsReference().
@@ -3751,11 +3741,6 @@ void ScCompiler::CreateStringFromXMLTokenArray( String& rFormula, String& rFormu
ScTokenArray* ScCompiler::CompileString( const String& rFormula )
{
-#if 0
- fprintf( stderr, "CompileString '%s'\n",
- rtl::OUStringToOString( rFormula, RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
-
OSL_ENSURE( meGrammar != FormulaGrammar::GRAM_EXTERNAL, "ScCompiler::CompileString - unexpected grammar GRAM_EXTERNAL" );
if( meGrammar == FormulaGrammar::GRAM_EXTERNAL )
SetGrammar( FormulaGrammar::GRAM_PODF );
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index abfad9c44dab..f9fc261788a4 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6459,17 +6459,11 @@ void ScInterpreter::ScIndirect()
rData->ValidateTabRefs();
ScRange aRange;
-#if 0
- // This is some really odd Excel behavior and renders named
- // ranges containing relative references totally useless.
- if (!rData->IsReference(aRange, ScAddress( aPos.Tab(), 0, 0)))
- break;
-#else
+
// This is the usual way to treat named ranges containing
// relative references.
if (!rData->IsReference( aRange, aPos))
break;
-#endif
if (aRange.aStart == aRange.aEnd)
PushSingleRef( aRange.aStart.Col(), aRange.aStart.Row(),
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 92899399429d..0b702777d8e8 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -3339,22 +3339,7 @@ void ScInterpreter::ScPercentrank()
BYTE nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2 ) )
return;
-#if 0
-/* wird nicht unterstuetzt
- double fPrec;
- if (nParamCount == 3)
- {
- fPrec = ::rtl::math::approxFloor(GetDouble());
- if (fPrec < 1.0)
- {
- PushIllegalArgument();
- return;
- }
- }
- else
- fPrec = 3.0;
-*/
-#endif
+
double fNum = GetDouble();
vector<double> aSortArray;
GetSortArray(1, aSortArray);
diff --git a/sc/source/core/tool/reftokenhelper.cxx b/sc/source/core/tool/reftokenhelper.cxx
index e7255f91911b..eaf4b8134490 100644
--- a/sc/source/core/tool/reftokenhelper.cxx
+++ b/sc/source/core/tool/reftokenhelper.cxx
@@ -113,26 +113,6 @@ void ScRefTokenHelper::compileRangeRepresentation(
}
}
-#if 0
- switch (p->GetType())
- {
- case svSingleRef:
- fprintf(stdout, "ScChart2DataProvider::compileRangeRepresentation: single ref\n");
- break;
- case svDoubleRef:
- fprintf(stdout, "ScChart2DataProvider::compileRangeRepresentation: double ref\n");
- break;
- case svExternalSingleRef:
- fprintf(stdout, "ScChart2DataProvider::compileRangeRepresentation: external single ref\n");
- break;
- case svExternalDoubleRef:
- fprintf(stdout, "ScChart2DataProvider::compileRangeRepresentation: external double ref\n");
- break;
- default:
- ;
- }
-#endif
-
}
if (bFailure)
rRefTokens.clear();
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index b366f3a413d5..085f38129c33 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -812,12 +812,6 @@ void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
for( size_t nTab = 0, nTabCount = maTableList.GetSize(); nTab < nTabCount; ++nTab )
{
- // set current stream position in BOUNDSHEET record
-#if 0
- ExcBoundsheetRef xBoundsheet = maBoundsheetList.GetRecord( nTab );
- if( xBoundsheet.get() )
- xBoundsheet->SetStreamPos( aXclStrm.GetSvStreamPos() );
-#endif
// write the table
maTableList.GetRecord( nTab )->WriteXml( rStrm );
}
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index 73de780b7237..16807b7bf4ad 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -161,12 +161,7 @@ void ImportExcel::Formula( const XclAddress& rXclPos,
{
if( eErr != ConvOK )
ExcelToSc::SetError( *pZelle, eErr );
-#if 0
- else
- ExcelToSc::SetCurVal( *pZelle, rCurVal );
-#else
(void)rCurVal;
-#endif
}
GetXFRangeBuffer().SetXF( aScPos, nXF );
@@ -427,9 +422,6 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
case 0x1C: // Error Value [314 266]
{
aIn >> nByte;
-#if 0 // erAck
- aPool.StoreError( XclTools::GetScErrorCode( nByte ) );
-#else
DefTokenId eOc;
switch( nByte )
{
@@ -445,7 +437,6 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
aPool << eOc;
if( eOc != ocStop )
aPool << ocOpen << ocClose;
-#endif
aPool >> aStack;
}
break;
@@ -1777,54 +1768,6 @@ BOOL ExcelToSc::GetShrFmla( const ScTokenArray*& rpErgebnis, XclImpStream& aIn,
}
-#if 0
-BOOL ExcelToSc::SetCurVal( ScFormulaCell &rCell, double &rfCurVal )
-{
- UINT16 nInd;
- BYTE nType;
- BYTE nVal;
- BOOL bString = FALSE;
-
-#ifdef OSL_BIGENDIAN
- // Code fuer alle anstaendigen Prozessoren
- nType = *( ( ( BYTE * ) &rfCurVal ) + 7 );
- nVal = *( ( ( BYTE * ) &rfCurVal ) + 5 );
- nInd = *( ( UINT16 * ) &rfCurVal );
-#else
- // fuer Schund-Prozessoren
- nType = *( ( BYTE * ) &rfCurVal );
- nVal = *( ( ( BYTE * ) &rfCurVal ) + 2 );
- nInd = *( ( ( UINT16 * ) &rfCurVal ) + 3 );
-#endif
-
- if( ( UINT16 ) ~nInd )
- // Wert ist Float
- rCell.SetHybridDouble( rfCurVal );
- else
- {
- switch( nType )
- {
- case 0: // String
- bString = TRUE;
- break;
- case 1: // Bool
- if( nVal )
- rfCurVal = 1.0;
- else
- rfCurVal = 0.0;
- rCell.SetHybridDouble( rfCurVal );
- break;
- case 2: // Error
- rCell.SetErrCode( XclTools::GetScErrorCode( nVal ) );
- break;
- }
- }
-
- return bString;
-}
-#endif
-
-
void ExcelToSc::SetError( ScFormulaCell &rCell, const ConvErr eErr )
{
UINT16 nInd;
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index 6f4887841431..b542a9bdd580 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -348,9 +348,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x1C: // Error Value [314 266]
{
aIn >> nByte;
-#if 0 // erAck
- aPool.StoreError( XclTools::GetScErrorCode( nByte ) );
-#else
+
DefTokenId eOc;
switch( nByte )
{
@@ -366,7 +364,6 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
aPool << eOc;
if( eOc != ocStop )
aPool << ocOpen << ocClose;
-#endif
aPool >> aStack;
}
break;
diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx
index 52dced0c63ad..785162d7ab53 100644
--- a/sc/source/filter/excel/tokstack.cxx
+++ b/sc/source/filter/excel/tokstack.cxx
@@ -332,9 +332,6 @@ void TokenPool::GetElement( const UINT16 nId )
pScToken->AddDouble( pP_Dbl[ pElement[ nId ] ] );
break;
case T_Err:
-#if 0 // erAck
- pScToken->AddError( pP_Err[ pElement[ nId ] ] );
-#endif
break;
case T_RefC:
pScToken->AddSingleReference( *ppP_RefTr[ pElement[ (UINT16) nId ] ] );
@@ -447,9 +444,6 @@ void TokenPool::GetElementRek( const UINT16 nId )
pScToken->AddDouble( pP_Dbl[ pElement[ *pAkt ] ] );
break;
case T_Err:
-#if 0 // erAck
- pScToken->AddError( pP_Err[ pElement[ *pAkt ] ] );
-#endif
break;
case T_RefC:
pScToken->AddSingleReference( *ppP_RefTr[ pElement[ *pAkt ] ] );
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index 0cacc055c341..9e2b69f33bb0 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -1171,9 +1171,6 @@ XclExpScToken XclExpFmlaCompImpl::Factor( XclExpScToken aTokData )
case svUnknown: mxData->mbOk = false; break;
case svDouble: ProcessDouble( aTokData ); break;
case svString: ProcessString( aTokData ); break;
-#if 0 // erAck
- case svError: ProcessError( aTokData ); break;
-#endif
case svSingleRef: ProcessCellRef( aTokData ); break;
case svDoubleRef: ProcessRangeRef( aTokData ); break;
case svExternalSingleRef: ProcessExternalCellRef( aTokData ); break;
@@ -1221,11 +1218,7 @@ void XclExpFmlaCompImpl::ProcessString( const XclExpScToken& rTokData )
void XclExpFmlaCompImpl::ProcessError( const XclExpScToken& rTokData )
{
-#if 0 // erAck
- AppendErrorToken( XclTools::GetXclErrorCode( rTokData.mpScToken->GetError() ), rTokData.mnSpaces );
-#else
(void)rTokData; // compiler warning
-#endif
}
void XclExpFmlaCompImpl::ProcessMissing( const XclExpScToken& rTokData )
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 797317d9524e..9d22422e7f4a 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -1402,9 +1402,6 @@ void XclExpPivotTable::SaveXml( XclExpXmlStream& rStrm )
XML_enableDrill, XclXmlUtils::ToPsz( maPTExtInfo.mnFlags & EXC_SXEX_DRILLDOWN ), // ???
// OOXTODO: XML_enableFieldProperties, [ SXEx fEnableFieldDialog (maPTExtInfo.mnFlags) ]
// OOXTODO: XML_preserveFormatting, [ SXEx fPreserveFormatting (maPTExtInfo.mnFlags) ]
-#if 0
- // XML_useAutoFormatting, [???],
-#endif
// OOXTODO: XML_pageWrap, [ SXEx cWrapPage (maPTExtInfo.mnFlags) ]
// OOXTODO: XML_pageOverThenDown, [ SXEx fAcrossPageLay (maPTExtInfo.mnFlags) ]
// OOXTODO: XML_subtotalHiddenItems, [ SXEx fSubtotalHiddenPageItems (maPTExtInfo.mnFlags) ]
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 1ea725a45acb..e4ec2131ba6e 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -1353,14 +1353,6 @@ bool XclExpCellProt::FillFromItemSet( const SfxItemSet& rItemSet, bool bStyle )
return ScfTools::CheckItem( rItemSet, ATTR_PROTECTION, bStyle );
}
-#if 0
-void XclExpCellProt::FillToXF2( sal_uInt8& rnNumFmt ) const
-{
- ::set_flag( rnNumFmt, EXC_XF2_LOCKED, mbLocked );
- ::set_flag( rnNumFmt, EXC_XF2_HIDDEN, mbHidden );
-}
-#endif
-
void XclExpCellProt::FillToXF3( sal_uInt16& rnProt ) const
{
::set_flag( rnProt, EXC_XF_LOCKED, mbLocked );
@@ -1470,26 +1462,6 @@ bool XclExpCellAlign::FillFromItemSet(
return bUsed;
}
-#if 0
-void XclExpCellAlign::FillToXF2( sal_uInt8& rnFlags ) const
-{
- ::insert_value( rnFlags, mnHorAlign, 0, 3 );
-}
-
-void XclExpCellAlign::FillToXF3( sal_uInt16& rnAlign ) const
-{
- ::insert_value( rnAlign, mnHorAlign, 0, 3 );
- ::set_flag( rnAlign, EXC_XF_LINEBREAK, mbLineBreak );
-}
-
-void XclExpCellAlign::FillToXF4( sal_uInt16& rnAlign ) const
-{
- FillToXF3( rnAlign );
- ::insert_value( rnAlign, mnVerAlign, 4, 2 );
- ::insert_value( rnAlign, mnOrient, 6, 2 );
-}
-#endif
-
void XclExpCellAlign::FillToXF5( sal_uInt16& rnAlign ) const
{
::insert_value( rnAlign, mnHorAlign, 0, 3 );
@@ -1684,27 +1656,6 @@ void XclExpCellBorder::SetFinalColors( const XclExpPalette& rPalette )
mnDiagColor = rPalette.GetColorIndex( mnDiagColorId );
}
-#if 0
-void XclExpCellBorder::FillToXF2( sal_uInt8& rnFlags ) const
-{
- ::set_flag( rnFlags, EXC_XF2_LEFTLINE, mnLeftLine != EXC_LINE_NONE );
- ::set_flag( rnFlags, EXC_XF2_RIGHTLINE, mnRightLine != EXC_LINE_NONE );
- ::set_flag( rnFlags, EXC_XF2_TOPLINE, mnTopLine != EXC_LINE_NONE );
- ::set_flag( rnFlags, EXC_XF2_BOTTOMLINE, mnBottomLine != EXC_LINE_NONE );
-}
-
-void XclExpCellBorder::FillToXF3( sal_uInt32& rnBorder ) const
-{
- ::insert_value( rnBorder, mnTopLine, 0, 3 );
- ::insert_value( rnBorder, mnLeftLine, 8, 3 );
- ::insert_value( rnBorder, mnBottomLine, 16, 3 );
- ::insert_value( rnBorder, mnRightLine, 24, 3 );
- ::insert_value( rnBorder, mnTopColor, 3, 5 );
- ::insert_value( rnBorder, mnLeftColor, 11, 5 );
- ::insert_value( rnBorder, mnBottomColor, 19, 5 );
- ::insert_value( rnBorder, mnRightColor, 27, 5 );
-}
-#endif
void XclExpCellBorder::FillToXF5( sal_uInt32& rnBorder, sal_uInt32& rnArea ) const
{
@@ -1835,20 +1786,6 @@ void XclExpCellArea::SetFinalColors( const XclExpPalette& rPalette )
rPalette.GetMixedColors( mnForeColor, mnBackColor, mnPattern, mnForeColorId, mnBackColorId );
}
-#if 0
-void XclExpCellArea::FillToXF2( sal_uInt8& rnFlags ) const
-{
- ::set_flag( rnFlags, EXC_XF2_BACKGROUND, mnPattern != EXC_PATT_NONE );
-}
-
-void XclExpCellArea::FillToXF3( sal_uInt16& rnArea ) const
-{
- ::insert_value( rnArea, mnPattern, 0, 6 );
- ::insert_value( rnArea, mnForeColor, 6, 5 );
- ::insert_value( rnArea, mnBackColor, 11, 5 );
-}
-#endif
-
void XclExpCellArea::FillToXF5( sal_uInt32& rnArea ) const
{
::insert_value( rnArea, mnPattern, 16, 6 );
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 3ccf71e8e243..3b7f3e0f29fd 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -213,23 +213,6 @@ void lclInsertUrl( const XclImpRoot& rRoot, const String& rUrl, SCCOL nScCol, SC
}
break;
- // fix for #i31050# disabled, HYPERLINK is not able to return numeric value (#i91351#)
-#if 0
- case CELLTYPE_VALUE:
- {
- // #i31050# replace number with HYPERLINK function
- ScTokenArray aTokenArray;
- aTokenArray.AddOpCode( ocHyperLink );
- aTokenArray.AddOpCode( ocOpen );
- aTokenArray.AddString( rUrl );
- aTokenArray.AddOpCode( ocSep );
- aTokenArray.AddDouble( rDoc.GetValue( aScPos ) );
- aTokenArray.AddOpCode( ocClose );
- rDoc.PutCell( aScPos, new ScFormulaCell( &rDoc, aScPos, &aTokenArray ) );
- }
- break;
-#endif
-
default:;
}
}
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 7e89bb0ff8db..58bb6e4d2055 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1568,9 +1568,6 @@ void XclImpChartObj::DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize )
ReadFrameData( rStrm );
rStrm.Ignore( 18 );
ReadMacro3( rStrm, nMacroSize );
-#if 0
- ReadChartSubStream( rStrm );
-#endif
// set frame format from OBJ record, it is used if chart itself is transparent
if( mxChart.is() )
mxChart->UpdateObjFrame( maLineData, maFillData );
@@ -1582,9 +1579,6 @@ void XclImpChartObj::DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize )
ReadFrameData( rStrm );
rStrm.Ignore( 18 );
ReadMacro4( rStrm, nMacroSize );
-#if 0
- ReadChartSubStream( rStrm );
-#endif
// set frame format from OBJ record, it is used if chart itself is transparent
if( mxChart.is() )
mxChart->UpdateObjFrame( maLineData, maFillData );
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 5b4707e61ace..3b656448af39 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -973,11 +973,6 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
BOOL bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() );
BOOL bUnderline = ( UNDERLINE_NONE != rUnderlineItem.GetLineStyle() );
BOOL bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // #97650# default is AUTO now
-#if 0
-// keine StyleSheet-Fontangaben: hart fuer jede Zelle
- BOOL bSetFontName = TRUE;
- USHORT nSetFontSizeNumber = GetFontSizeNumber( (USHORT)rFontHeightItem.GetHeight() );
-#else
BOOL bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() );
USHORT nSetFontSizeNumber = 0;
UINT32 nFontHeight = rFontHeightItem.GetHeight();
@@ -987,7 +982,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
if ( nSetFontSizeNumber == aHTMLStyle.nFontSizeNumber )
nSetFontSizeNumber = 0; // no difference, don't set
}
-#endif
+
BOOL bSetFont = (bSetFontColor || bSetFontName || nSetFontSizeNumber);
//! TODO: we could entirely use CSS1 here instead, but that would exclude
diff --git a/sc/source/filter/inc/excform.hxx b/sc/source/filter/inc/excform.hxx
index 5d6041923a37..1a2e72635398 100644
--- a/sc/source/filter/inc/excform.hxx
+++ b/sc/source/filter/inc/excform.hxx
@@ -72,10 +72,6 @@ public:
const ScTokenArray* GetBoolErr( XclBoolError );
BOOL GetShrFmla( const ScTokenArray*&, XclImpStream& rStrm, sal_Size nFormulaLen );
-#if 0
- // return = TRUE -> String-Record folgt!
- static BOOL SetCurVal( ScFormulaCell& rCell, double& rCurVal );
-#endif
static void SetError( ScFormulaCell& rCell, const ConvErr eErr );
static inline BOOL IsComplColRange( const UINT16 nCol1, const UINT16 nCol2 );
diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx
index 2a17d09a57fc..4f9cb409aab2 100644
--- a/sc/source/filter/inc/xestyle.hxx
+++ b/sc/source/filter/inc/xestyle.hxx
@@ -335,10 +335,6 @@ struct XclExpCellProt : public XclCellProt
@return true = At least one protection item is set. */
bool FillFromItemSet( const SfxItemSet& rItemSet, bool bStyle = false );
-#if 0
- /** Fills the data to the passed fields of a BIFF2 XF record. */
- void FillToXF2( sal_uInt8& rnNumFmt ) const;
-#endif
/** Fills the data to the passed fields of a BIFF3-BIFF8 XF record. */
void FillToXF3( sal_uInt16& rnProt ) const;
@@ -358,14 +354,6 @@ struct XclExpCellAlign : public XclCellAlign
bool FillFromItemSet( const SfxItemSet& rItemSet,
bool bForceLineBreak, XclBiff eBiff, bool bStyle = false );
-#if 0
- /** Fills the data to the passed fields of a BIFF2 XF record. */
- void FillToXF2( sal_uInt8& rnFlags ) const;
- /** Fills the data to the passed fields of a BIFF3 XF record. */
- void FillToXF3( sal_uInt16& rnAlign ) const;
- /** Fills the data to the passed fields of a BIFF4 XF record. */
- void FillToXF4( sal_uInt16& rnAlign ) const;
-#endif
/** Fills the data to the passed fields of a BIFF5/BIFF7 XF record. */
void FillToXF5( sal_uInt16& rnAlign ) const;
/** Fills the data to the passed fields of a BIFF8 XF record. */
@@ -396,12 +384,6 @@ struct XclExpCellBorder : public XclCellBorder
/** Fills the mn***Color base members from the mn***ColorId members. */
void SetFinalColors( const XclExpPalette& rPalette );
-#if 0
- /** Fills the data to the passed fields of a BIFF2 XF record. */
- void FillToXF2( sal_uInt8& rnFlags ) const;
- /** Fills the data to the passed fields of a BIFF3/BIFF4 XF record. */
- void FillToXF3( sal_uInt32& rnBorder ) const;
-#endif
/** Fills the data to the passed fields of a BIFF5/BIFF7 XF record. */
void FillToXF5( sal_uInt32& rnBorder, sal_uInt32& rnArea ) const;
/** Fills the data to the passed fields of a BIFF8 XF record. */
@@ -432,12 +414,6 @@ struct XclExpCellArea : public XclCellArea
/** Fills the mn***Color base members from the mn***ColorId members. */
void SetFinalColors( const XclExpPalette& rPalette );
-#if 0
- /** Fills the data to the passed fields of a BIFF2 XF record. */
- void FillToXF2( sal_uInt8& rnFlags ) const;
- /** Fills the data to the passed fields of a BIFF3/BIFF4 XF record. */
- void FillToXF3( sal_uInt16& rnArea ) const;
-#endif
/** Fills the data to the passed fields of a BIFF5/BIFF7 XF record. */
void FillToXF5( sal_uInt32& rnArea ) const;
/** Fills the data to the passed fields of a BIFF8 XF record. */
diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx
index c92d26d80197..f03a37ecdf5b 100644
--- a/sc/source/filter/rtf/rtfexp.cxx
+++ b/sc/source/filter/rtf/rtfexp.cxx
@@ -86,37 +86,6 @@ ULONG ScRTFExport::Write()
rStrm << '{' << OOO_STRING_SVTOOLS_RTF_RTF;
rStrm << OOO_STRING_SVTOOLS_RTF_ANSI << sNewLine;
-#if 0
-// das ist noch nicht ausgegoren
-/*
- SfxStyleSheetBasePool* pStylePool = pDoc->GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = NULL;
- DBG_ASSERT( pStylePool, "StylePool not found! :-(" );
- pStylePool->SetSearchMask( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL );
- pStyleSheet = pStylePool->Find( STRING_STANDARD, SFX_STYLE_FAMILY_PARA );
- DBG_ASSERT( pStyleSheet, "ParaStyle not found! :-(" );
- const SfxItemSet& rSetPara = pStyleSheet->GetItemSet();
-
- // fonttbl
- String aFontFamilyName(
- ((const SvxFontItem&)(rSetPara.Get( ATTR_FONT ))).GetFamilyName() );
- rStrm << OOO_STRING_SVTOOLS_RTF_DEFF << '0'
- << '{' << OOO_STRING_SVTOOLS_RTF_FONTTBL
- << '{' << OOO_STRING_SVTOOLS_RTF_F << '0' << OOO_STRING_SVTOOLS_RTF_FNIL << ' ' << aFontFamilyName.GetStr() << ";}"
- << '}' << sNewLine;
-
- // hier kaeme die colortbl
-
- // stylesheet
- UINT32 nFontHeight =
- ((const SvxFontHeightItem&)(rSetPara.Get( ATTR_FONT_HEIGHT ))).GetHeight();
- rStrm << '{' << OOO_STRING_SVTOOLS_RTF_STYLESHEET
- << '{' << OOO_STRING_SVTOOLS_RTF_FS << String( UINT32(nFontHeight / TWIPS_PER_POINT) ).GetStr()
- << ' ' << pStyleSheet->GetName().GetStr() << ";}"
- << '}' << sNewLine;
-*/
-#endif
-
// Daten
for ( SCTAB nTab = aRange.aStart.Tab(); nTab <= aRange.aEnd.Tab(); nTab++ )
{
diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx
index 1048952c29c3..7f92f82aa1a6 100644
--- a/sc/source/filter/xml/xmlbodyi.cxx
+++ b/sc/source/filter/xml/xmlbodyi.cxx
@@ -288,42 +288,6 @@ void ScXMLBodyContext::EndElement()
if (pChangeTrackingImportHelper)
pChangeTrackingImportHelper->CreateChangeTrack(GetScImport().GetDocument());
-#if 0
- // #i57869# table styles are applied before the contents now
-
- std::vector<rtl::OUString> aTableStyleNames(GetScImport().GetTableStyle());
- uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( GetScImport().GetModel(), uno::UNO_QUERY );
- if ( xSpreadDoc.is() && !aTableStyleNames.empty())
- {
- uno::Reference <container::XIndexAccess> xIndex( xSpreadDoc->getSheets(), uno::UNO_QUERY );
- if ( xIndex.is() )
- {
- sal_Int32 nTableCount = xIndex->getCount();
- sal_Int32 nSize(aTableStyleNames.size());
- DBG_ASSERT(nTableCount == nSize, "every table should have a style name");
- for(sal_uInt32 i = 0; i < nTableCount; i++)
- {
- if (i < nSize)
- {
- uno::Reference <beans::XPropertySet> xProperties(xIndex->getByIndex(i), uno::UNO_QUERY);
- if (xProperties.is())
- {
- rtl::OUString sTableStyleName(aTableStyleNames[i]);
- XMLTableStylesContext *pStyles = (XMLTableStylesContext *)GetScImport().GetAutoStyles();
- if ( pStyles && sTableStyleName.getLength() )
- {
- XMLTableStyleContext* pStyle = (XMLTableStyleContext *)pStyles->FindStyleChildContext(
- XML_STYLE_FAMILY_TABLE_TABLE, sTableStyleName, sal_True);
- if (pStyle)
- pStyle->FillPropertySet(xProperties);
- }
- }
- }
- }
- }
- }
-#endif
-
// #i37959# handle document protection after the sheet settings
if (bProtected)
{
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index bf4707ae137f..a292e70f8a83 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1806,23 +1806,6 @@ void ScInputHandler::RemoveAdjust()
if ( bUndo )
pEngine->EnableUndo( FALSE );
- // RemoveParaAttribs removes all paragraph attributes, including EE_PARA_JUST
-#if 0
- BOOL bChange = FALSE;
- USHORT nCount = pEngine->GetParagraphCount();
- for (USHORT i=0; i<nCount; i++)
- {
- const SfxItemSet& rOld = pEngine->GetParaAttribs( i );
- if ( rOld.GetItemState( EE_PARA_JUST ) == SFX_ITEM_SET )
- {
- SfxItemSet aNew( rOld );
- aNew.ClearItem( EE_PARA_JUST );
- pEngine->SetParaAttribs( i, aNew );
- bChange = TRUE;
- }
- }
-#endif
-
// #89403# non-default paragraph attributes (e.g. from clipboard)
// must be turned into character attributes
pEngine->RemoveParaAttribs();
@@ -1830,14 +1813,6 @@ void ScInputHandler::RemoveAdjust()
if ( bUndo )
pEngine->EnableUndo( TRUE );
- // ER 31.08.00 Only called in EnterHandler, don't change view anymore.
-#if 0
- if (bChange)
- {
- EditView* pActiveView = pTopView ? pTopView : pTableView;
- pActiveView->ShowCursor( FALSE, TRUE );
- }
-#endif
}
void ScInputHandler::RemoveRangeFinder()
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 157d6c4d2e4c..f101809552c9 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -403,80 +403,4 @@ String ScAsciiOptions::WriteToString() const
return aOutStr;
}
-#if 0
-// Code, um die Spalten-Liste aus einem Excel-kompatiblen String zu erzeugen:
-// (im Moment nicht benutzt)
-
-void ScAsciiOptions::InterpretColumnList( const String& rString )
-{
- // Eingabe ist 1-basiert, pColStart fuer FixedLen ist 0-basiert
-
- // Kommas durch Semikolon ersetzen
-
- String aSemiStr = rString;
- USHORT nPos = 0;
- do
- nPos = aSemiStr.SearchAndReplace( ',', ';', nPos );
- while ( nPos != STRING_NOTFOUND );
-
- // Eintraege sortieren
-
- USHORT nCount = aSemiStr.GetTokenCount();
- USHORT* pTemp = new USHORT[nCount+1];
- pTemp[0] = 1; // erste Spalte faengt immer bei 1 an
- USHORT nFound = 1;
- USHORT i,j;
- for (i=0; i<nCount; i++)
- {
- USHORT nVal = (USHORT) aSemiStr.GetToken(i);
- if (nVal)
- {
- BOOL bThere = FALSE;
- nPos = 0;
- for (j=0; j<nFound; j++)
- {
- if ( pTemp[j] == nVal )
- bThere = TRUE;
- else if ( pTemp[j] < nVal )
- nPos = j+1;
- }
- if ( !bThere )
- {
- if ( nPos < nFound )
- memmove( &pTemp[nPos+1], &pTemp[nPos], (nFound-nPos)*sizeof(USHORT) );
- pTemp[nPos] = nVal;
- ++nFound;
- }
- }
- }
-
- // Eintraege uebernehmen
-
- delete[] pColStart;
- delete[] pColFormat;
- nInfoCount = nFound;
- if (nInfoCount)
- {
- pColStart = new USHORT[nInfoCount];
- pColFormat = new BYTE[nInfoCount];
- for (i=0; i<nInfoCount; i++)
- {
- pColStart[i] = pTemp[i] - 1;
- pColFormat[i] = SC_COL_STANDARD;
- }
- }
- else
- {
- pColStart = NULL;
- pColFormat = NULL;
- }
-
- bFixedLen = TRUE; // sonst macht's keinen Sinn
-
- // aufraeumen
-
- delete[] pTemp;
-}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 4ee20c186299..d4cff7090706 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -705,17 +705,6 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
//! CellContentChanged();
//! ShowAllCursors();
-#if 0
- //! muss an der View bleiben !!!!
- if ( nFlags & IDF_ATTRIB )
- {
- if ( nFlags & IDF_CONTENTS )
- ForgetFormatArea();
- else
- StartFormatArea(); // Attribute loeschen ist auch Attributierung
- }
-#endif
-
return TRUE;
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index bc9681e2aaeb..6abc194aa105 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2128,6 +2128,7 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
}
}
+#if 0
if ( n+1 < nCollateCopies &&
(pPrinter->GetDuplexMode() == DUPLEX_SHORTEDGE || pPrinter->GetDuplexMode() == DUPLEX_LONGEDGE) &&
( nPrinted % 2 ) == 1 )
@@ -2138,11 +2139,10 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
// (same as in Writer ViewShell::Prt)
// FIXME: needs to be adapted to XRenderable interface
- #if 0
pPrinter->StartPage();
pPrinter->EndPage();
- #endif
}
+#endif
}
}
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index b3c202d4bc40..1e85d17bd741 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -295,51 +295,6 @@ void ScImportExport::EndPaste()
/////////////////////////////////////////////////////////////////////////////
-
-#if 0
-BOOL ScImportExport::ImportData( SvData& rData )
-{
- ULONG nFmt = rData.GetFormat();
- if ( nFmt == SOT_FORMATSTR_ID_HTML_SIMPLE )
- {
- MSE40HTMLClipFormatObj aMSE40ClpObj;
- if ( aMSE40ClpObj.GetData( rData ) )
- {
- SvStream* pStream = aMSE40ClpObj.GetStream();
- return ImportStream( *pStream, nFmt );
- }
- return FALSE;
- }
- else
- {
- void* pMem;
- ULONG nSize = rData.GetMinMemorySize();
- rData.GetData( &pMem, TRANSFER_REFERENCE );
- if( nFmt == FORMAT_STRING
- || nFmt == FORMAT_RTF
- || nFmt == SOT_FORMATSTR_ID_SYLK
- || nFmt == SOT_FORMATSTR_ID_HTML
- || nFmt == SOT_FORMATSTR_ID_DIF )
- {
- //! String? Unicode??
-
- // Stringende ermitteln!
- sal_Char* pBegin = (sal_Char*) pMem;
- sal_Char* pEnd = (sal_Char*) pMem + nSize;
-
- nSize = 0;
- while( pBegin != pEnd && *pBegin != '\0' )
- pBegin++, nSize++;
- // #72909# MT says only STRING has to be zero-terminated
- DBG_ASSERT( pBegin != pEnd || nFmt != FORMAT_STRING, "non zero-terminated String" )
- }
- SvMemoryStream aStrm( pMem, nSize, STREAM_READ );
- return ImportStream( aStrm, nFmt );
- }
-}
-
-#endif
-
BOOL ScImportExport::ImportData( const String& /* rMimeType */,
const ::com::sun::star::uno::Any & /* rValue */ )
{
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 5f4297fa42e7..aba4cfa8eabe 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -347,32 +347,11 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq )
case SID_ENABLE_HYPHENATION:
case SID_TEXTDIRECTION_LEFT_TO_RIGHT:
case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
-#if 0 // DR
- if (IsNoteEdit())
- {
- pView->CaptionTextDirection( rReq.GetSlot()); // process Notes before we end the text edit.
- ExecuteGlobal( rReq );
- pViewData->GetDispatcher().Execute(pViewData->GetView()->GetDrawFuncPtr()->GetSlotID(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
- }
- else
-#endif
- {
- pView->ScEndTextEdit(); // end text edit before switching direction
- ExecuteGlobal( rReq );
- // restore consistent state between shells and functions:
- pViewData->GetDispatcher().Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
- }
- break;
-
-#if 0
- // Hyphenation is handled above - text edit is ended
- case SID_ENABLE_HYPHENATION:
- // force loading of hyphenator (object is skipped in repaint)
- ((ScDrawLayer*)pView->GetModel())->UseHyphenator();
- pOutliner->SetHyphenator( LinguMgr::GetHyphenator() );
+ pView->ScEndTextEdit(); // end text edit before switching direction
ExecuteGlobal( rReq );
+ // restore consistent state between shells and functions:
+ pViewData->GetDispatcher().Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
break;
-#endif
case SID_THES:
{
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index bf1dc7abd133..41501905fe61 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -311,30 +311,6 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
else
{
// error is handled in SvxOpenGraphicDialog::GetGraphic
-
-#if 0
- USHORT nRes = 0;
- switch ( nError )
- {
- case GRFILTER_OPENERROR: nRes = SCSTR_GRFILTER_OPENERROR; break;
- case GRFILTER_IOERROR: nRes = SCSTR_GRFILTER_IOERROR; break;
- case GRFILTER_FORMATERROR: nRes = SCSTR_GRFILTER_FORMATERROR; break;
- case GRFILTER_VERSIONERROR: nRes = SCSTR_GRFILTER_VERSIONERROR; break;
- case GRFILTER_FILTERERROR: nRes = SCSTR_GRFILTER_FILTERERROR; break;
- case GRFILTER_TOOBIG: nRes = SCSTR_GRFILTER_TOOBIG; break;
- }
- if ( nRes )
- {
- InfoBox aInfoBox( pWindow, String(ScResId(nRes)) );
- aInfoBox.Execute();
- }
- else
- {
- ULONG nStreamError = GetGrfFilter()->GetLastError().nStreamError;
- if( ERRCODE_NONE != nStreamError )
- ErrorHandler::HandleError( nStreamError );
- }
-#endif
}
}
}
diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx
index b1fad759a9ec..09a4240c0678 100644
--- a/sc/source/ui/drawfunc/futext3.cxx
+++ b/sc/source/ui/drawfunc/futext3.cxx
@@ -195,57 +195,6 @@ void FuText::StopEditMode(BOOL /*bTextDirection*/)
// Called following an EndDragObj() to update the new note rectangle position
void FuText::StopDragMode(SdrObject* /*pObject*/)
{
-#if 0 // DR
- ScViewData& rViewData = *pViewShell->GetViewData();
- if( ScDrawObjData* pData = ScDrawLayer::GetNoteCaptionData( pObject, rViewData.GetTabNo() ) )
- {
- ScDocument& rDoc = *rViewData.GetDocument();
- const ScAddress& rPos = pData->maStart;
- ScPostIt* pNote = rDoc.GetNote( rPos );
- DBG_ASSERT( pNote && (pNote->GetCaption() == pObject), "FuText::StopDragMode - missing or invalid cell note" );
- if( pNote )
- {
- Rectangle aOldRect = pNote->CalcRectangle( rDoc, rPos );
- Rectangle aNewRect = pObject->GetLogicRect();
- if( aOldRect != aNewRect )
- {
- pNote->UpdateFromRectangle( rDoc, rPos, aNewRect );
- OutlinerParaObject* pPObj = pCaption->GetOutlinerParaObject();
- bool bVertical = (pPObj && pPObj->IsVertical());
- // The new height/width is honoured if property item is reset.
- if(!bVertical && aNewRect.Bottom() - aNewRect.Top() > aOldRect.Bottom() - aOldRect.Top())
- {
- if(pCaption->IsAutoGrowHeight() && !bVertical)
- {
- pCaption->SetMergedItem( SdrTextAutoGrowHeightItem( false ) );
- aNote.SetItemSet( *pDoc, pCaption->GetMergedItemSet() );
- }
- }
- else if(bVertical && aNewRect.Right() - aNewRect.Left() > aOldRect.Right() - aOldRect.Left())
- {
- if(pCaption->IsAutoGrowWidth() && bVertical)
- {
- pCaption->SetMergedItem( SdrTextAutoGrowWidthItem( false ) );
- aNote.SetItemSet( *pDoc, pCaption->GetMergedItemSet() );
- }
- }
- pViewShell->SetNote( aTabPos.Col(), aTabPos.Row(), aTabPos.Tab(), aNote );
-
- // This repaint should not be necessary but it cleans
- // up the 'marks' left behind by the note handles
- // now that notes can simultaineously have handles and edit active.
- ScRange aDrawRange = rDoc.GetRange( rPos.Tab(), aOldRect );
- // Set Start/End Row to previous/next row to allow for handles.
- if( aDrawRange.aStart.Row() > 0 )
- aDrawRange.aStart.IncRow( -1 );
- if( aDrawRange.aEnd.Row() < MAXROW )
- aDrawRange.aEnd.IncRow( 1 );
- ScDocShell* pDocSh = rViewData.GetDocShell();
- pDocSh->PostPaint( aDrawRange, PAINT_GRID| PAINT_EXTRAS);
- }
- }
- }
-#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 399cc85638c0..f3b53f5818a6 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -1505,62 +1505,4 @@ SfxChildAlignment __EXPORT ScNavigatorDlg::CheckAlignment(
return eRetAlign;
}
-//------------------------------------------------------------------------
-//
-// Drop auf den Navigator - andere Datei laden (File oder Bookmark)
-//
-//------------------------------------------------------------------------
-
-#if 0
-BOOL __EXPORT ScNavigatorDlg::Drop( const DropEvent& rEvt )
-{
- BOOL bReturn = FALSE;
-
- if ( !aLbEntries.IsInDrag() ) // kein Verschieben innerhalb der TreeListBox
- {
- String aFileName;
-
- SvScDataObjectRef pObject = SvScDataObject::PasteDragServer(rEvt);
-
- ULONG nFormat = INetBookmark::HasFormat(*pObject);
- INetBookmark aBookmark;
- if (aBookmark.Paste(*pObject,nFormat))
- aFileName = aBookmark.GetURL();
- else
- {
- // FORMAT_FILE direkt aus DragServer
-
- USHORT nCount = DragServer::GetItemCount();
- for ( USHORT i = 0; i < nCount && !aFileName.Len(); ++i )
- if (DragServer::HasFormat( i, FORMAT_FILE ))
- aFileName = DragServer::PasteFile( i );
- }
-
- if ( aFileName.Len() )
- bReturn = aLbEntries.LoadFile( aFileName );
- }
- return bReturn;
-}
-
-BOOL __EXPORT ScNavigatorDlg::QueryDrop( DropEvent& rEvt )
-{
- BOOL bReturn = FALSE;
-
- if ( !aLbEntries.IsInDrag() ) // kein Verschieben innerhalb der TreeListBox
- {
- SvScDataObjectRef pObject = SvScDataObject::PasteDragServer(rEvt);
- if ( pObject->HasFormat(FORMAT_FILE)
- || INetBookmark::HasFormat(*pObject) )
- {
- rEvt.SetAction(DROP_COPY); // Kopier-Cursor anzeigen
- bReturn = TRUE;
- }
- }
-
- return bReturn;
-}
-#endif
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 2391d426073e..d80e5062f2e9 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -80,6 +80,7 @@ bool lcl_CheckRepeatString( const String& rStr, ScDocument* pDoc, bool bIsRow
void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIsRow, String& rStr );
#if 0
+// this method is useful when debugging address flags.
static void printAddressFlags(USHORT nFlag)
{
if ((nFlag & SCA_COL_ABSOLUTE ) == SCA_COL_ABSOLUTE ) printf("SCA_COL_ABSOLUTE \n");
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index cdb958f0ddf0..640d1f0b53d1 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -6372,13 +6372,6 @@ void SAL_CALL ScCellObj::insertTextContent( const uno::Reference<text::XTextRang
ScCellFieldObj* pCellField = ScCellFieldObj::getImplementation( xContent );
SvxUnoTextRangeBase* pTextRange = ScCellTextCursor::getImplementation( xRange );
-#if 0
- if (!pTextRange)
- pTextRange = SvxUnoTextRangeBase::getImplementation( xRange );
-
- //! bei SvxUnoTextRange testen, ob in passendem Objekt !!!
-#endif
-
if ( pCellField && !pCellField->IsInserted() && pTextRange )
{
SvxEditSource* pEditSource = pTextRange->GetEditSource();
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index a841c852f6ed..05eef6153963 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1310,53 +1310,6 @@ bool lcl_addUpperLeftCornerIfMissing(vector<ScSharedTokenRef>& rRefTokens,
// Not all the adjacent cells are included. Bail out.
return false;
-#if 0 // Do we really need to do this ???
- if (rRefTokens.size() == 2)
- {
- // Make a simple rectangular range if possible.
- ScRange aRightPart(ScAddress(nMinCol+1, nMinRow, nTab), ScAddress(nMaxCol, nMaxRow, nTab));
- ScRange aBottomPart(ScAddress(nMinCol, nMinRow+1, nTab), ScAddress(nMaxCol, nMaxRow, nTab));
- vector<ScRange> aRanges;
- aRanges.reserve(2);
- aRanges.push_back(aRightPart);
- aRanges.push_back(aBottomPart);
- if (lcl_isRangeContained(rRefTokens, aRanges))
- {
- // Consolidate them into a single rectangle.
- ScComplexRefData aData;
- aData.InitFlags();
- aData.Ref1.SetFlag3D(true);
- aData.Ref1.SetColRel(false);
- aData.Ref1.SetRowRel(false);
- aData.Ref1.SetTabRel(false);
- aData.Ref2.SetColRel(false);
- aData.Ref2.SetRowRel(false);
- aData.Ref2.SetTabRel(false);
- aData.Ref1.nCol = nMinCol;
- aData.Ref1.nRow = nMinRow;
- aData.Ref1.nTab = nTab;
- aData.Ref2.nCol = nMaxCol;
- aData.Ref2.nRow = nMaxRow;
- aData.Ref2.nTab = nTab;
- vector<ScSharedTokenRef> aNewTokens;
- aNewTokens.reserve(1);
- if (bExternal)
- {
- ScSharedTokenRef p(
- new ScExternalDoubleRefToken(nFileId, aExtTabName, aData));
- aNewTokens.push_back(p);
- }
- else
- {
- ScSharedTokenRef p(new ScDoubleRefToken(aData));
- aNewTokens.push_back(p);
- }
- rRefTokens.swap(aNewTokens);
- return true;
- }
- }
-#endif
-
ScSingleRefData aData;
aData.InitFlags();
aData.SetFlag3D(true);
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 8a403beb8be2..feb4c048e952 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -301,19 +301,6 @@ ScPrintUIOptions::ScPrintUIOptions()
rtl::OUString(),
aPageRangeOpt
);
-
- // "Print only selected sheets" isn't needed because of the "Selected Sheets" choice in "Print content"
-#if 0
- // create subgroup for sheets
- m_aUIProperties[8].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 3 ) ), rtl::OUString() );
-
- // create a bool option for selected pages only
- m_aUIProperties[9].Value = getBoolControlOpt( rtl::OUString( aStrings.GetString( 4 ) ),
- rtl::OUString( aStrings.GetString( 5 ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsOnlySelectedSheets" ) ),
- i_bSelectedOnly
- );
-#endif
}
void ScPrintUIOptions::SetDefaults()
@@ -1061,9 +1048,6 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
pArray[2].Value <<= aRangeAddress;
}
- #if 0
- const ScPrintOptions& rPrintOpt =
- #endif
// FIXME: is this for side effects ?
SC_MOD()->GetPrintOptions();
if( ! pPrinterOptions )
@@ -1447,61 +1431,6 @@ uno::Reference<drawing::XDrawPages> SAL_CALL ScModelObj::getDrawPages() throw(un
return NULL;
}
-#if 0
-// XPrintable
-
-rtl::OUString ScModelObj::getPrinterName(void) const
-{
- ScUnoGuard aGuard;
- if (pDocShell)
- {
- SfxPrinter* pPrinter = pDocShell->GetPrinter();
- if (pPrinter)
- return pPrinter->GetName();
- }
-
- DBG_ERROR("getPrinterName: keine DocShell oder kein Printer");
- return rtl::OUString();
-}
-
-void ScModelObj::setPrinterName(const rtl::OUString& PrinterName)
-{
- ScUnoGuard aGuard;
- // Drucker setzen - wie in SfxViewShell::ExecPrint_Impl
-
- if (pDocShell)
- {
- SfxPrinter* pPrinter = pDocShell->GetPrinter();
- if (pPrinter)
- {
- String aString(PrinterName);
- SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aString );
- if (pNewPrinter->IsKnown())
- pDocShell->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER );
- else
- delete pNewPrinter;
- }
- }
-}
-
-XPropertySetRef ScModelObj::createPrintOptions(void)
-{
- ScUnoGuard aGuard;
- return new ScPrintSettingsObj; //! ScPrintSettingsObj implementieren!
-}
-
-void ScModelObj::print(const XPropertySetRef& xOptions)
-{
- ScUnoGuard aGuard;
- if (pDocShell)
- {
- //! xOptions auswerten (wie denn?)
-
- //! muss noch
- }
-}
-#endif
-
// XGoalSeek
sheet::GoalResult SAL_CALL ScModelObj::seekGoal(
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 15f6a39db04a..9772bdbea5d5 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -210,22 +210,6 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
return ( 0x0d == nEndFlag );
}
-#if 0
-static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter )
-{
- if ( !pFilter )
- return FALSE;
-
- // TRUE for XML file or template
- // (template filter has no internal name -> allow configuration key names)
-
- String aName(pFilter->GetFilterName());
- return aName.EqualsAscii(pFilterXML) ||
- aName.EqualsAscii("calc_StarOffice_XML_Calc") ||
- aName.EqualsAscii("calc_StarOffice_XML_Calc_Template");
-}
-#endif
-
::rtl::OUString SAL_CALL ScFilterDetect::detect( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lDescriptor ) throw( ::com::sun::star::uno::RuntimeException )
{
REFERENCE< XInputStream > xStream;
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index e24637d179ea..d64b4ad66061 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -473,13 +473,6 @@ void SAL_CALL ScHeaderFooterTextObj::insertTextContent(
SvxUnoTextRangeBase* pTextRange =
ScHeaderFooterTextCursor::getImplementation( xRange );
-#if 0
- if (!pTextRange)
- pTextRange = (SvxUnoTextRange*)xRange->getImplementation(
- SvxUnoTextRange_getReflection() );
- //! bei SvxUnoTextRange testen, ob in passendem Objekt !!!
-#endif
-
if ( pHeaderField && !pHeaderField->IsInserted() && pTextRange )
{
SvxEditSource* pEditSource = pTextRange->GetEditSource();
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index d939018b707a..bcb6dc6e2f07 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -1087,66 +1087,6 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
return uno::makeAny(uno::Reference<uno::XInterface>(static_cast<cppu::OWeakObject*>(pObj)));
}
-
-#if 0
-// XPrintable
-
-rtl::OUString ScTabViewObj::getPrinterName(void) const
-{
- ScUnoGuard aGuard;
- ScTabViewShell* pViewSh = GetViewShell();
- if (pViewSh)
- {
- SfxPrinter* pPrinter = pViewSh->GetPrinter(TRUE);
- if (pPrinter)
- return pPrinter->GetName();
- }
-
- DBG_ERROR("getPrinterName: keine View oder kein Printer");
- return rtl::OUString();
-}
-
-void ScTabViewObj::setPrinterName(const rtl::OUString& PrinterName)
-{
- ScUnoGuard aGuard;
- // Drucker setzen - wie in SfxViewShell::ExecPrint_Impl
-
- ScTabViewShell* pViewSh = GetViewShell();
- if (pViewSh)
- {
- SfxPrinter* pPrinter = pViewSh->GetPrinter(TRUE);
- if (pPrinter)
- {
- String aString(PrinterName);
- SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aString );
- if (pNewPrinter->IsKnown())
- pViewSh->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER );
- else
- delete pNewPrinter;
- }
- }
-}
-
-XPropertySetRef ScTabViewObj::createPrintOptions(void)
-{
- ScUnoGuard aGuard;
- return new ScPrintSettingsObj; //! ScPrintSettingsObj implementieren!
-}
-
-void ScTabViewObj::print(const XPropertySetRef& xOptions)
-{
- ScUnoGuard aGuard;
- ScTabViewShell* pViewSh = GetViewShell();
- if (pViewSh)
- {
- //! xOptions auswerten (wie denn?)
-
- SfxRequest aReq( SID_PRINTDOCDIRECT, SFX_CALLMODE_SYNCHRON, pViewSh->GetPool() );
- pViewSh->ExecuteSlot( aReq );
- }
-}
-#endif
-
// XEnumerationAccess
uno::Reference<container::XEnumeration> SAL_CALL ScTabViewObj::createEnumeration()
@@ -1606,29 +1546,6 @@ void SAL_CALL ScTabViewObj::removeActivationEventListener( const uno::Reference<
EndActivationListening();
}
-// PageBreakMode / Zoom sind Properties
-
-#if 0
-
-BOOL ScTabViewObj::getPagebreakMode(void) const
-{
- ScUnoGuard aGuard;
- ScTabViewShell* pViewSh = GetViewShell();
- if (pViewSh)
- return pViewSh->GetViewData()->IsPagebreakMode();
- return FALSE;
-}
-
-void ScTabViewObj::setPagebreakMode(BOOL PagebreakMode)
-{
- ScUnoGuard aGuard;
- ScTabViewShell* pViewSh = GetViewShell();
- if (pViewSh)
- pViewSh->SetPagebreakMode(PagebreakMode);
-}
-
-#endif
-
INT16 ScTabViewObj::GetZoom(void) const
{
ScTabViewShell* pViewSh = GetViewShell();
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index c619e34309fe..a74a73c85721 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -869,33 +869,6 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if ( pNewDPObject )
pNewDPObject->SetOutRange( aDestPos );
-
-#if 0
- ScDBData* pDBData = pTabViewShell->GetDBData();
- String aErrMsg;
-
- pDBData->GetArea( nTab, nCol1, nRow1, nCol2, nRow2 );
-
- bAreaOk = TRUE;
- if ( nRow2-nRow1 < 1 )
- {
- // "mindestens eine Datenzeile"
- pTabViewShell->ErrorMessage(STR_PIVOT_INVALID_DBAREA);
- bAreaOk = FALSE;
- }
- else if (!pDBData->HasHeader())
- {
- if ( MessBox( pTabViewShell->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES),
- ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), // "StarCalc"
- ScGlobal::GetRscString( STR_MSSG_MAKEAUTOFILTER_0 ) // Koepfe aus erster Zeile?
- ).Execute() == RET_YES )
- {
- pDBData->SetHeader( TRUE ); //! Undo ??
- }
- else
- bAreaOk = FALSE;
- }
-#endif
}
pTabViewShell->SetDialogDPObject( pNewDPObject ); // is copied
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index c88274d65dab..c2340aa0a474 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -105,44 +105,6 @@ void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle )
}
}
-#if 0
-void lcl_RefreshChartData( SdrModel* pModel, ScDocument* pSourceDoc )
-{
- USHORT nPages = pModel->GetPageCount();
- for (SCTAB nTab=0; nTab<nPages; nTab++)
- {
- SdrPage* pPage = pModel->GetPage(nTab);
- SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
- SdrObject* pObject = aIter.Next();
- while (pObject)
- {
- if ( pObject->GetObjIdentifier() == OBJ_OLE2 )
- {
- SvInPlaceObjectRef aIPObj = ((SdrOle2Obj*)pObject)->GetObjRef();
- if ( aIPObj.Is() && SotExchange::IsChart( aIPObj->GetStorage()->GetClassName() ) )
- {
- SchMemChart* pOldData = SchDLL::GetChartData(aIPObj);
- if ( pOldData )
- {
- // create data from source document
- ScChartArray aArray( pSourceDoc, *pOldData );
- if ( aArray.IsValid() )
- {
- SchMemChart* pNewData = aArray.CreateMemChart();
- SchDLL::Update( aIPObj, pNewData );
- delete pNewData;
- ((SdrOle2Obj*)pObject)->GetNewReplacement();
- }
- }
- }
- }
- pObject = aIter.Next();
- }
- }
-}
-#endif
-
-
BOOL ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos )
{
BOOL bReturn = FALSE;
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 3d11b21e26ec..1f21e93d28d3 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1512,17 +1512,6 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
// Filter-Popup beendet sich mit eigenem Mausklick, nicht erst beim Klick
// in das GridWindow, darum ist die folgende Abfrage nicht mehr noetig:
-#if 0
- // merken, dass FilterBox geloescht wird, damit sichergestellt
- // ist, dass in diesem Handler nicht an gleicher Stelle wieder
- // eine neue geoeffnet wird.
- BOOL bWasFilterBox = ( pFilterBox != NULL &&
- ((Window*)pFilterBox)->IsVisible() &&
- !pFilterBox->IsDataSelect() );
- SCCOL nOldColFBox = bWasFilterBox ? pFilterBox->GetCol() : 0;
- SCROW nOldRowFBox = bWasFilterBox ? pFilterBox->GetRow() : 0;
-#endif
-
ClickExtern(); // loescht FilterBox, wenn vorhanden
HideNoteMarker(); // Notiz-Anzeige
@@ -3544,21 +3533,6 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
// pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich );
UpdateDragRectOverlay();
-
- // show target position as tip help
-#if 0
- if (Help::IsQuickHelpEnabled())
- {
- ScRange aRange( nDragStartX, nDragStartY, nTab, nDragEndX, nDragEndY, nTab );
- String aHelpStr;
- aRange.Format( aHelpStr, SCA_VALID ); // non-3D
-
- Point aPos = Pointer::GetPosPixel();
- USHORT nAlign = QUICKHELP_BOTTOM|QUICKHELP_RIGHT;
- Rectangle aRect( aPos, aPos );
- Help::ShowQuickHelp(aRect, aHelpStr, nAlign);
- }
-#endif
}
}
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index f86f79a1d25a..a39216177922 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -826,38 +826,6 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
if ( pViewData->IsRefMode() && nTab >= pViewData->GetRefStartZ() && nTab <= pViewData->GetRefEndZ() )
{
- // The AutoFill shrink area has an own overlay now
-#if 0
- // Schraffur beim Loeschen per AutoFill
- if ( pViewData->GetRefType() == SC_REFTYPE_FILL )
- {
- ScRange aRange;
- if ( pViewData->GetDelMark( aRange ) )
- {
- if ( aRange.aStart.Col() < nX1 ) aRange.aStart.SetCol(nX1);
- if ( aRange.aEnd.Col() > nX2 ) aRange.aEnd.SetCol(nX2);
- if ( aRange.aStart.Row() < nY1 ) aRange.aStart.SetRow(nY1);
- if ( aRange.aEnd.Row() > nY2 ) aRange.aEnd.SetRow(nY2);
- if ( aRange.aStart.Col() <= aRange.aEnd.Col() &&
- aRange.aStart.Row() <= aRange.aEnd.Row() )
- {
- Point aStart = pViewData->GetScrPos( aRange.aStart.Col(),
- aRange.aStart.Row(), eWhich );
- Point aEnd = pViewData->GetScrPos( aRange.aEnd.Col()+1,
- aRange.aEnd.Row()+1, eWhich );
- aEnd.X() -= 1;
- aEnd.Y() -= 1;
-
- // Markierung aufheben - roter Rahmen bleibt stehen
- Rectangle aRect( aStart,aEnd );
- Invert( aRect, INVERT_HIGHLIGHT );
-
- //! Delete-Bereich extra kennzeichnen?!?!?
- }
- }
- }
-#endif
-
Color aRefColor( rColorCfg.GetColorValue(svtools::CALCREFERENCE).nColor );
aOutputData.DrawRefMark( pViewData->GetRefStartX(), pViewData->GetRefStartY(),
pViewData->GetRefEndX(), pViewData->GetRefEndY(),
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index f4a9fd4ddac2..1e2d45e4c091 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -422,15 +422,6 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
}
}
-#if 0
- // 3D border is no longer used
- SetLineColor( rStyleSettings.GetLightColor() );
- if (bVertical)
- DrawLine( Point( 0, nPStart ), Point( 0, nLineEnd ) );
- else
- DrawLine( Point( nPStart, 0 ), Point( nLineEnd, 0 ) );
-#endif
-
SetLineColor( rStyleSettings.GetDarkShadowColor() );
if (bVertical)
{
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 2cf8bab95e61..fceb71a335db 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -402,20 +402,6 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
BOOL bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt
- //! Mit dieser Abfrage wird zuviel weggelassen, wenn ein automatischer
- //! Umbruch mitten in den Wiederholungsspalten liegt.
- //! Dann lieber den aeusseren Rahmen zweimal ausgeben...
-#if 0
- // auf dem Drucker die Aussen-Linien weglassen (werden getrennt ausgegeben)
- if ( eType == OUTTYPE_PRINTER && !bMetaFile )
- {
- if ( nX == MAXCOL )
- bDraw = FALSE;
- else if (pDoc->HasColBreak(nXplus1, nTab))
- bDraw = FALSE;
- }
-#endif
-
USHORT nWidthXplus2 = pRowInfo[0].pCellInfo[nXplus2].nWidth;
bSingle = bSingleGrid; //! in Fillinfo holen !!!!!
if ( nX<MAXCOL && !bSingle )
@@ -531,20 +517,6 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
BOOL bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt
- //! Mit dieser Abfrage wird zuviel weggelassen, wenn ein automatischer
- //! Umbruch mitten in den Wiederholungszeilen liegt.
- //! Dann lieber den aeusseren Rahmen zweimal ausgeben...
-#if 0
- // auf dem Drucker die Aussen-Linien weglassen (werden getrennt ausgegeben)
- if ( eType == OUTTYPE_PRINTER && !bMetaFile )
- {
- if ( nY == MAXROW )
- bDraw = FALSE;
- else if (pDoc->HasRowBreak(nYplus1, nTab))
- bDraw = FALSE;
- }
-#endif
-
BOOL bNextYisNextRow = (pRowInfo[nArrYplus1].nRowNo == nYplus1);
bSingle = !bNextYisNextRow; // Hidden
for (SCCOL i=nX1; i<=nX2 && !bSingle; i++)
@@ -2447,12 +2419,6 @@ void ScOutputData::DrawClipMarks()
// visually left
Rectangle aMarkRect = aCellRect;
aMarkRect.Right() = aCellRect.Left()+nMarkPixel-1;
-#if 0
- //! Test
- pDev->SetLineColor(); pDev->SetFillColor(COL_YELLOW);
- pDev->DrawRect(aMarkRect);
- //! Test
-#endif
SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, TRUE );
}
if ( pInfo->nClipMark & ( bLayoutRTL ? SC_CLIPMARK_LEFT : SC_CLIPMARK_RIGHT ) )
@@ -2460,12 +2426,6 @@ void ScOutputData::DrawClipMarks()
// visually right
Rectangle aMarkRect = aCellRect;
aMarkRect.Left() = aCellRect.Right()-nMarkPixel+1;
-#if 0
- //! Test
- pDev->SetLineColor(); pDev->SetFillColor(COL_LIGHTGREEN);
- pDev->DrawRect(aMarkRect);
- //! Test
-#endif
SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, FALSE );
}
}
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 32e3c6d9e0ab..7f9c1a00deef 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1331,17 +1331,6 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
rParam.maAlignRect.Justify();
rParam.maClipRect.Justify();
-
-#if 0
- //! Test !!!
- pDev->Push();
- pDev->SetLineColor();
- pDev->SetFillColor( COL_LIGHTGREEN );
- pDev->DrawRect( pDev->PixelToLogic(rParam.maClipRect) );
- pDev->DrawRect( rParam.maClipRect ); // print preview
- pDev->Pop();
- //! Test !!!
-#endif
}
void ScOutputData::DrawStrings( BOOL bPixelToLogic )
@@ -2403,11 +2392,6 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
long nInitPosX = nScrX;
if ( bLayoutRTL )
{
-#if 0
- Size aOnePixel = pDev->PixelToLogic(Size(1,1));
- long nOneX = aOnePixel.Width();
- nInitPosX += nMirrorW - nOneX;
-#endif
nInitPosX += nMirrorW - 1;
}
long nLayoutSign = bLayoutRTL ? -1 : 1;
@@ -2935,20 +2919,6 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
}
}
-#if 0
- long nClipStartY = nStartY;
- if (nArrY==0 || bVisChanged)
- {
- if ( nClipStartY < nRowPosY )
- {
- long nDif = nRowPosY - nClipStartY;
- bClip = TRUE;
- nClipStartY = nRowPosY;
- aClipSize.Height() -= nDif;
- }
- }
-#endif
-
Rectangle aLogicClip;
if (bClip || bSimClip)
{
@@ -3225,11 +3195,6 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
long nInitPosX = nScrX;
if ( bLayoutRTL )
{
-#if 0
- Size aOnePixel = pDev->PixelToLogic(Size(1,1));
- long nOneX = aOnePixel.Width();
- nInitPosX += nMirrorW - nOneX;
-#endif
nInitPosX += nMirrorW - 1;
}
long nLayoutSign = bLayoutRTL ? -1 : 1;
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 8a504720ea0a..8317d9df747c 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -175,13 +175,6 @@ void ScPreview::UpdateDrawView() // nTab muss richtig sein
pDrawView->SetPrintPreview( TRUE );
pDrawView->ShowSdrPage(pPage);
}
-#if 0
- else if ( !pDrawView->GetSdrPageView()) // angezeigte Page umstellen
- {
- pDrawView->HideSdrPage();
- pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
- }
-#endif
}
else if ( pDrawView )
{
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index 292e155c132b..52139ccb8f04 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -423,25 +423,8 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
nEndX,nEndY,nTab ) );
pViewData->GetView()->UpdateShrinkOverlay();
-#if 0
- if ( bOldDelMark )
- {
- ScUpdateRect aRect( aDelRange.aStart.Col(), aDelRange.aStart.Row(),
- aDelRange.aEnd.Col(), aDelRange.aEnd.Row() );
- aRect.SetNew( nDelStartX,nDelStartY, nEndX,nEndY );
- SCCOL nPaintStartX;
- SCROW nPaintStartY;
- SCCOL nPaintEndX;
- SCROW nPaintEndY;
- if (aRect.GetDiff( nPaintStartX, nPaintStartY, nPaintEndX, nPaintEndY ))
- pViewData->GetView()->
- PaintArea( nPaintStartX, nPaintStartY,
- nPaintEndX, nPaintEndY, SC_UPDATE_MARKS );
- }
- else
-#endif
- pViewData->GetView()->
- PaintArea( nStartX,nDelStartY, nEndX,nEndY, SC_UPDATE_MARKS );
+ pViewData->GetView()->
+ PaintArea( nStartX,nDelStartY, nEndX,nEndY, SC_UPDATE_MARKS );
nPosX = nEndX; // roten Rahmen um ganzen Bereich lassen
nPosY = nEndY;
@@ -459,12 +442,6 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
{
pViewData->ResetDelMark();
pViewData->GetView()->UpdateShrinkOverlay();
-
-#if 0
- pViewData->GetView()->
- PaintArea( aDelRange.aStart.Col(), aDelRange.aStart.Row(),
- aDelRange.aEnd.Col(), aDelRange.aEnd.Row(), SC_UPDATE_MARKS );
-#endif
}
BOOL bNegX = ( nPosX < (SCsCOL) nStartX );
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index d988338eb62a..01877252b078 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -31,36 +31,6 @@
//------------------------------------------------------------------
-
-#if 0
-#define _MACRODLG_HXX
-#define _BIGINT_HXX
-#define _SVCONTNR_HXX
-#define BASIC_NODIALOGS
-#define _SFXMNUITEM_HXX
-#define _SVDXOUT_HXX
-#define _SVDATTR_HXX
-#define _SFXMNUITEM_HXX
-#define _DLGCFG_HXX
-#define _SFXMNUMGR_HXX
-#define _SFXBASIC_HXX
-#define _MODALDLG_HXX
-#define _SFX_TEMPLDLG_HXX
-#define _SFXSTBMGR_HXX
-#define _SFXTBXMGR_HXX
-#define _BASE_DLGS_HXX
-#define _SFXIMGMGR_HXX
-#define _SFXMNUMGR_HXX
-#define _SFXSTBITEM_HXX
-#define _SFXTBXCTRL_HXX
-#define _PASSWD_HXX
-//#define _SFXFILEDLG_HXX
-//#define _SFXREQUEST_HXX
-#define _SFXOBJFACE_HXX
-
-#define _SDR_NOTRANSFORM
-#define _SVDXOUT_HXX
-#endif
#include <vcl/svapp.hxx>
///////////////////////////////////////////////////////////////////////////
@@ -69,24 +39,6 @@
// Die u.a. Aenderungen nehmen vorgeschlagene Konstante vorweg
///////////////////////////////////////////////////////////////////////////
-#if 0
-#define _SDR_NOTRANSFORM // Transformationen, selten verwendet
-#define _SDR_NOTOUCH // Hit-Tests, selten verwendet
-
-#define _SDR_NOUNDO // Undo-Objekte
-#define _SDR_NOPAGEOBJ // SdrPageObj
-#define _SDR_NOVIRTOBJ // SdrVirtObj
-#define _SDR_NOGROUPOBJ // SdrGroupObj
-#define _SDR_NOTEXTOBJ // SdrTextObj
-#define _SDR_NOPATHOBJ // SdrPathObj
-#define _SDR_NOEDGEOBJ // SdrEdgeObj
-#define _SDR_NORECTOBJ // SdrRectObj
-#define _SDR_NOCAPTIONOBJ // SdrCaptionObj
-#define _SDR_NOCIRCLEOBJ // SdrCircleObj
-#define _SDR_NOGRAFOBJ // SdrGrafObj
-#define _SDR_NOOLE2OBJ // SdrOle2Obj
-#endif
-
// Dieses define entfernt die VCControls aus SI.HXX
#define _SI_HXX // VCControls
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index b23d252248b2..c77034366c85 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -299,32 +299,6 @@ void ScTabView::TabChanged()
// (fuer disablete Slots auf geschuetzten Tabellen), darum hier einfach alles...
rBindings.InvalidateAll(FALSE);
-#if 0
- rBindings.Invalidate( SID_SELECT_SCENARIO );
- rBindings.Invalidate( FID_PROTECT_TABLE );
- rBindings.Invalidate( FID_DELETE_TABLE );
- rBindings.Invalidate( FID_TABLE_SHOW );
- rBindings.Invalidate( FID_TABLE_HIDE );
-
- // Auswirkungen von geschuetzten Tabellen.
- rBindings.Invalidate( FID_TAB_RENAME );
- rBindings.Invalidate( FID_TAB_MOVE );
- rBindings.Invalidate( SID_DEL_ROWS );
- rBindings.Invalidate( SID_DEL_COLS );
- rBindings.Invalidate( FID_INS_ROW );
- rBindings.Invalidate( FID_INS_COLUMN );
- rBindings.Invalidate( FID_INS_CELL );
- rBindings.Invalidate( FID_INS_CELLSDOWN );
- rBindings.Invalidate( FID_INS_CELLSRIGHT );
- rBindings.Invalidate( FID_DELETE_CELL );
-
- rBindings.Invalidate( SID_OPENDLG_CHART );
- rBindings.Invalidate( SID_INSERT_OBJECT );
- rBindings.Invalidate( SID_INSERT_DIAGRAM );
- rBindings.Invalidate( SID_INSERT_SMATH );
- rBindings.Invalidate( SID_INSERT_GRAPHIC );
-#endif
-
if (aViewData.GetViewShell()->HasAccessibilityObjects())
{
SfxSimpleHint aAccHint(SC_HINT_ACC_TABLECHANGED);
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 56e51c591466..493f45341ff4 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -281,13 +281,6 @@ void ScTabViewShell::SetActive()
// Die Sfx-View moechte sich gerne selbst aktivieren, weil dabei noch
// magische Dinge geschehen (z.B. stuerzt sonst evtl. der Gestalter ab)
ActiveGrabFocus();
-
-#if 0
- SfxViewFrame* pFrame = GetViewFrame();
- pFrame->GetFrame().Appear();
-
- SFX_APP()->SetViewFrame( pFrame ); // immer erst Appear, dann SetViewFrame (#29290#)
-#endif
}
USHORT __EXPORT ScTabViewShell::PrepareClose(BOOL bUI, BOOL bForBrowsing)
@@ -492,31 +485,6 @@ void __EXPORT ScTabViewShell::QueryObjAreaPixel( Rectangle& rRect ) const
pDoc->SnapVisArea( aLogicRect );
rRect.SetSize( pWin->LogicToPixel( aLogicRect.GetSize() ) );
-
-#if 0
- // auf ganze Zellen anpassen (in Pixeln)
-
- ScViewData* pViewData = ((ScTabViewShell*)this)->GetViewData();
- Size aSize = rRect.GetSize();
-
- ScSplitPos ePos = pViewData->GetActivePart();
- Window* pWin = ((ScTabViewShell*)this)->GetActiveWin();
-
- Point aTest( aSize.Width(), aSize.Height() );
- SCsCOL nPosX;
- SCsROW nPosY;
- pViewData->GetPosFromPixel( aTest.X(), aTest.Y(), ePos, nPosX, nPosY );
- BOOL bLeft;
- BOOL bTop;
- pViewData->GetMouseQuadrant( aTest, ePos, nPosX, nPosY, bLeft, bTop );
- if (!bLeft)
- ++nPosX;
- if (!bTop)
- ++nPosY;
- aTest = pViewData->GetScrPos( (SCCOL)nPosX, (SCROW)nPosY, ePos, TRUE );
-
- rRect.SetSize(Size(aTest.X(),aTest.Y()));
-#endif
}
//------------------------------------------------------------------
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index f9cd0eb20637..3baa549f2932 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -366,20 +366,6 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
( pDoc->IsTabProtected( nTabNr ) || nTabSelCount > 1 ) )
break; // kein Rename
-#if 0
- // ScSbxObject wird nicht mehr benutzt, stattdessen aus dem
- // ScSbxTable::Notify die richtige Tabelle an der Basic-View eingestellt
- if( rReq.IsAPI() )
- {
- SbxObject* pObj = GetScSbxObject();
- ScSbxTable* pSbxTab = PTR_CAST( ScSbxTable, pObj );
- DBG_ASSERT( pSbxTab, "pSbxTab???" );
-
- if( pSbxTab )
- nTabNr = pSbxTab->GetTableNr();
- }
-#endif
-
if( pReqArgs != NULL )
{
BOOL bDone = FALSE;
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 08d2e633a241..5ab159cf7dbc 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -326,12 +326,6 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
{
// Do CSV dialog if more than one line.
sal_Int32 nDelim = aStr.indexOf('\n');
-#if 0
- ::rtl::OString tmpStr = OUStringToOString( aStr,
- RTL_TEXTENCODING_UTF8 );
- fprintf( stderr, "String is '%s' (%d) [%d]\n", tmpStr.getStr(),
- tmpStr.getLength(), nDelim);
-#endif
if (nDelim >= 0 && nDelim != aStr.getLength () - 1)
{
ScImportStringStream aStrm( aStr);
@@ -540,10 +534,6 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
uno::Reference < io::XInputStream > xStm;
if( aDataHelper.GetInputStream( nFormatId, xStm ) )
{
-#if 0
- SotStorage aDest( "d:\\test.xls" ); // to see the file
- pStor->CopyTo( &aDest );
-#endif
ScDocument* pInsDoc = new ScDocument( SCDOCMODE_CLIP );
SCTAB nSrcTab = 0; // Biff5 in clipboard: always sheet 0
pInsDoc->ResetClip( pDoc, nSrcTab );
@@ -615,15 +605,6 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
String aFile = aFileList.GetFile( i );
PasteFile( aPos, aFile, bLink );
-#if 0
- SfxStringItem aNameItem( FID_INSERT_FILE, aFile );
- SfxPointItem aPosItem( FN_PARAM_1, aPos );
- SfxDispatcher* pDisp =
- GetViewData()->GetViewShell()->GetViewFrame()->GetDispatcher();
- if (pDisp)
- pDisp->Execute( FID_INSERT_FILE, SFX_CALLMODE_ASYNCHRON,
- &aNameItem, &aPosItem, (void*)0 );
-#endif
aPos.X() += 400;
aPos.Y() += 400;
diff --git a/sc/workben/test.cxx b/sc/workben/test.cxx
index 01b7587bda08..11886115e2dc 100644
--- a/sc/workben/test.cxx
+++ b/sc/workben/test.cxx
@@ -769,13 +769,6 @@ void lcl_Sheets( FixedText& aTimeText )
XSpreadsheetsRef xSheets = xDoc->getSheets();
if (!xSheets) return;
-#if 0
- xSheets->insertSheet( "hinten", 100 );
- xSheets->insertSheet( "vorne", 0 );
- xSheets->removeSheetByName( "hinten" );
- xSheets->removeSheetByName( "vorne" );
-#endif
-
xSheets->moveSheet(0, 1, TRUE);
xSheets->moveSheet(0, 2, FALSE);
}
@@ -1011,21 +1004,6 @@ void lcl_Filter( FixedText& aTimeText )
XFilterableRef xFilter = (XFilterable*)xSelInt->queryInterface(XFilterable::getSmartUik());
if (!xFilter) return;
-#if 0
- XTableFilterDescriptorRef xDesc = xFilter->createFilterDescriptor(FALSE);
- if (!xDesc) return;
- Sequence<TableFilterField> aFields = xDesc->getFilterFields();
- if (aFields.getLen())
- {
- // 1.Feld zwischen 1. und 2. Spalte toggeln
- TableFilterField* pAry = aFields.getArray();
- if (!pAry) return;
- pAry[0].Field = pAry[0].Field ? 0 : 1;
- }
- xDesc->setFilterFields(aFields);
- xFilter->filter(xDesc);
-#endif
-
XSpreadsheetDocumentRef xDoc = lcl_GetDocument(); // Calc-Model
if (!xDoc) return;
CellRangeAddress aAddress;
@@ -1482,14 +1460,6 @@ void lcl_AutoForm( FixedText& aTimeText ) // 29
XInterfaceRef xInt = lcl_GetView();
if (!xInt) return;
-#if 0
- //! Test - AutoFormat muss von der App kommen
- XStarCalcViewRef xView = (XStarCalcView*)xInt->queryInterface(XStarCalcView::getSmartUik());
- if (!xView) return;
- XTableAutoFormatsRef xFormats = xView->getTableAutoFormats();
- if (!xFormats) return;
- //! Test
-#endif
XTableAutoFormatsRef xFormats;
XTableAutoFormatRef xFormat = xFormats->getAutoFormatByName(L"gaga");
@@ -1567,19 +1537,6 @@ void lcl_Pivot( FixedText& aTimeText ) // 30
IMPL_LINK(MyWindow, CountHdl, PushButton*, EMPTYARG)
{
-#if 0
-
- long nCount = aCountField.GetValue();
- if (nCount < 1)
- nCount = 1;
-
- ULONG nStart = Time::GetSystemTicks();
- for (long i=0; i<nCount; i++)
- lcl_DoCount();
- ULONG nEnd = Time::GetSystemTicks();
- aTimeText.SetText(String(nCount)+String(" x Count: ")+String(nEnd-nStart)+String(" ms"));
-
-#else
long nCount = aCountField.GetValue();
switch ( nCount )
@@ -1684,8 +1641,6 @@ IMPL_LINK(MyWindow, CountHdl, PushButton*, EMPTYARG)
break;
}
-#endif
-
return 0;
}
@@ -1767,29 +1722,6 @@ IMPL_LINK(MyWindow, BlaHdl, PushButton*, EMPTYARG)
XTextCursorRef xCursor = xText->createTextCursor();
if ( xCursor && xType )
{
-#if 0
- // Feld einfuegen
- XTextPositionRef xPos = (XTextPosition*)
- xCursor->queryInterface(XTextPosition::getSmartUik());
- if ( xPos )
- {
- xCursor->gotoEnd(FALSE);
- XTextFieldRef xField = xTypes->insertTextField( xType, xPos );
- if (xField)
- {
- // Eigenschaften setzen
- XPropertySetRef xProp = (XPropertySet*)xField->
- queryInterface(XPropertySet::getSmartUik());
- if ( xProp )
- {
- xProp->setPropertyValue(L"URL",
- UsrAny(String("http://www.mopo.de/")));
- xProp->setPropertyValue(L"Representation",
- UsrAny(String("ein Hyperlink")));
- }
- }
- }
-#endif
// letztes Feld loeschen
XIndexAccessRef xIndex = (XIndexAccess*)
@@ -1941,27 +1873,6 @@ IMPL_LINK(MyWindow, ViewHdl, PushButton*, EMPTYARG)
XInterfaceRef xSelInt = xView->getSelection();
if (!xSelInt) return 0;
-#if 0
- XPropertySetRef xProp = (XPropertySet*)xSelInt->queryInterface(XPropertySet::getSmartUik());
- if ( xProp )
- {
- UsrAny aAny;
-
- aAny = xProp->getPropertyValue(L"TransparentBackground");
- aAny.setBOOL(FALSE);
- xProp->setPropertyValue(L"TransparentBackground", aAny);
-
- aAny = xProp->getPropertyValue(L"BackgroundColor");
- aAny.setUINT32(0xffff00);
- xProp->setPropertyValue(L"BackgroundColor", aAny);
- }
- XIndentRef xInd = (XIndent*)xSelInt->queryInterface(XIndent::getSmartUik());
- if ( xInd )
- {
- xInd->incrementIndent();
- }
-#endif
-
XAutoFormattableRef xAuto = (XAutoFormattable*)xSelInt->
queryInterface(XAutoFormattable::getSmartUik());
if ( xAuto )
@@ -1985,21 +1896,6 @@ IMPL_LINK(MyWindow, ViewHdl, PushButton*, EMPTYARG)
xText->setText(StringToOUString(aStr, CHARSET_SYSTEM));
}
- // Zelle selektieren
-
-#if 0
- if (xDoc)
- {
- CellAddress aPos;
- aPos.Sheet = 0;
- aPos.Column = 1;
- aPos.Row = 2;
- XCellRef xCell = xDoc->getCell(aPos);
- if ( xCell )
- xView->select( xCell );
- }
-#endif
-
XPrintableRef xPrint = (XPrintable*)xInt->queryInterface(XPrintable::getSmartUik());
String aName = OUStringToString( xPrint->getPrinterName(), CHARSET_SYSTEM );
// aTimeText.SetText(aName);