[Libreoffice-commits] .: 2 commits - sc/source
Takeshi Abe
tabe at kemper.freedesktop.org
Fri Feb 25 05:05:06 PST 2011
sc/source/core/data/attrib.cxx | 4 -
sc/source/core/data/column.cxx | 3 -
sc/source/core/data/stlsheet.cxx | 4 -
sc/source/core/data/table2.cxx | 2
sc/source/core/tool/compiler.cxx | 5 --
sc/source/filter/excel/excimp8.cxx | 3 -
sc/source/filter/excel/xltoolbar.cxx | 3 -
sc/source/ui/view/viewfun2.cxx | 83 -----------------------------------
8 files changed, 5 insertions(+), 102 deletions(-)
New commits:
commit 79fb331ca724cf70300c486df8f64e8c194c14ae
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Fri Feb 25 22:04:36 2011 +0900
Removed dead code
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 70b605e..d47adbc 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -969,9 +969,6 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
}
}
- // mitsortiert werden nur noch relative Referenzen
-// long dy = (long)nRow2 - (long)nRow1;
-
/* Create clone of pCell1 at position of pCell2 (pCell1 exists always, see
variable swapping above). Do not clone the note, but move pointer of
old note to new cell. */
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 221fbf3..c1b54cf 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -245,7 +245,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
break;
}
bMySet = TRUE;
- } // if ( !pSet )
+ }
if ( nHelpId == HID_SC_SHEET_CELL_ERG1 )
{
if ( !pSet->Count() )
@@ -255,7 +255,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
{
ULONG nNumFmt = pDoc->GetFormatTable()->GetStandardFormat( NUMBERFORMAT_CURRENCY,ScGlobal::eLnge );
pSet->Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumFmt ) );
- } // if ( pDoc && pDoc->IsLoadingDone() )
+ }
}
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 9c12248..ec03370 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -378,8 +378,6 @@ void ScTable::DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, USH
if (nRow2 > MAXROW) nRow2 = MAXROW;
if (ValidColRow(nCol1, nRow1) && ValidColRow(nCol2, nRow2))
{
-// IncRecalcLevel();
-
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM());
for (SCCOL i = nCol1; i <= nCol2; i++)
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index e98fcff..f262693 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2918,7 +2918,6 @@ bool ScCompiler::IsExternalNamedRange( const String& rSymbol )
* spec first. Until then don't pretend to support external names that
* wouldn't survive a save and reload cycle, return false instead. */
-#if 1
if (!pConv)
return false;
@@ -2941,10 +2940,6 @@ bool ScCompiler::IsExternalNamedRange( const String& rSymbol )
aToken.SetExternalName(nFileId, pRealName ? *pRealName : aName);
pRawToken = aToken.Clone();
return true;
-#else
- (void)rSymbol;
- return false;
-#endif
}
BOOL ScCompiler::IsDBRange( const String& rName )
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index e148492..643e108 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -338,7 +338,6 @@ void ImportExcel8::ReadBasic( void )
if ( !bAsComment )
{
-#if 1
// see if we have the XCB stream
SvStorageStreamRef xXCB = xRootStrg->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "XCB" ) ), STREAM_STD_READ | STREAM_NOCREATE );
if ( xXCB.Is()|| SVSTREAM_OK == xXCB->GetError() )
@@ -352,8 +351,6 @@ void ImportExcel8::ReadBasic( void )
wrapper.ImportCustomToolBar( *pShell );
}
}
-#endif
-
}
}
try
diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx
index 86fc1fb..749cb48 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -197,13 +197,12 @@ bool CTB::ImportCustomToolBar( CTBWrapper& rWrapper, CustomToolBarImportHelper&
helper.getCfgManager()->insertSettings( sToolBarName, xIndexAccess );
helper.applyIcons();
-#if 1
+
uno::Reference< ui::XUIConfigurationPersistence > xPersistence( helper.getCfgManager()->getImageManager(), uno::UNO_QUERY_THROW );
xPersistence->store();
xPersistence.set( helper.getCfgManager(), uno::UNO_QUERY_THROW );
xPersistence->store();
-#endif
bRes = true;
}
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 9a918b5..a0d2277 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1572,8 +1572,6 @@ ScAutoFormatData* ScViewFunc::CreateAutoFormatData()
void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord )
{
-#if 1
-
ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{
@@ -1586,87 +1584,6 @@ void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord )
}
else
ErrorMessage(STR_NOMULTISELECT);
-
-#else
-
- // Not editable only due to a matrix? Attribute is ok anyhow
- BOOL bOnlyNotBecauseOfMatrix;
- if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix )
- {
- ErrorMessage(STR_PROTECTIONERR);
- return;
- }
-
- SCCOL nStartCol;
- SCROW nStartRow;
- SCTAB nStartTab;
- SCCOL nEndCol;
- SCROW nEndRow;
- SCTAB nEndTab;
-
- if (GetViewData()->GetSimpleArea(nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab) == SC_MARK_SIMPLE)
- {
- ScDocShell* pDocSh = GetViewData()->GetDocShell();
- ScDocument* pDoc = pDocSh->GetDocument();
- ScMarkData& rMark = GetViewData()->GetMarkData();
- BOOL bSize = (*ScGlobal::GetAutoFormat())[nFormatNo]->GetIncludeWidthHeight();
- if (bRecord && !pDoc->IsUndoEnabled())
- bRecord = FALSE;
-
- ScDocument* pUndoDoc = NULL;
- if ( bRecord )
- {
- pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab, bSize, bSize );
- pDoc->CopyToDocument( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab,
- IDF_ATTRIB, FALSE, pUndoDoc );
- if (bSize)
- {
- pDoc->CopyToDocument( nStartCol,0,nStartTab, nEndCol,MAXROW,nEndTab,
- IDF_NONE, FALSE, pUndoDoc );
- pDoc->CopyToDocument( 0,nStartRow,nStartTab, MAXCOL,nEndRow,nEndTab,
- IDF_NONE, FALSE, pUndoDoc );
- }
- pDoc->BeginDrawUndo();
- }
-
- GetFrameWin()->EnterWait();
- pDoc->AutoFormat( nStartCol, nStartRow, nEndCol, nEndRow, nFormatNo, rMark );
- GetFrameWin()->LeaveWait();
-
- if (bSize)
- {
- SetMarkedWidthOrHeight( TRUE, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, FALSE, FALSE );
- SetMarkedWidthOrHeight( FALSE, SC_SIZE_VISOPT, 0, FALSE, FALSE );
- pDocSh->PostPaint( 0,0,nStartTab, MAXCOL,MAXROW,nStartTab,
- PAINT_GRID | PAINT_LEFT | PAINT_TOP );
- }
- else
- {
- BOOL bAdj = AdjustBlockHeight( FALSE );
- if (bAdj)
- pDocSh->PostPaint( 0,nStartRow,nStartTab, MAXCOL,MAXROW,nStartTab,
- PAINT_GRID | PAINT_LEFT );
- else
- pDocSh->PostPaint( nStartCol, nStartRow, nStartTab,
- nEndCol, nEndRow, nEndTab, PAINT_GRID );
- }
-
- if ( bRecord ) // Draw-Undo isn't available until now
- {
- pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoAutoFormat( pDocSh,
- ScRange(nStartCol,nStartRow,nStartTab, nEndCol,nEndRow,nEndTab),
- pUndoDoc, rMark, bSize, nFormatNo ) );
- }
-
- pDocSh->UpdateOle(GetViewData());
- pDocSh->SetDocumentModified();
- }
- else
- ErrorMessage(STR_NOMULTISELECT);
-
-#endif
}
commit 2b4814eb792d665644b32ad3d62f45304f390eb8
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Fri Feb 25 22:00:35 2011 +0900
Mark fall-through
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index f690d00..3035f2c 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -478,7 +478,7 @@ SfxItemPresentation ScRangeItem::GetPresentation
case SFX_ITEM_PRESENTATION_COMPLETE:
rText = ScGlobal::GetRscString(STR_AREA);
rText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ": " ));
-// break;// Durchfallen !!!
+ /* !!! fall-through !!! */
case SFX_ITEM_PRESENTATION_NAMELESS:
{
@@ -988,7 +988,7 @@ SfxItemPresentation ScViewObjectModeItem::GetPresentation
ePres = SFX_ITEM_PRESENTATION_NAMELESS;//das geht immer!
break;
}
-// break; // DURCHFALLEN!!!
+ /* !!! fall-through !!! */
case SFX_ITEM_PRESENTATION_NAMELESS:
rText += ScGlobal::GetRscString(STR_VOBJ_MODE_SHOW+GetValue());
More information about the Libreoffice-commits
mailing list