remove commented-out code in sw/source/core/view

Change-Id: Ib94be6370549c6a71879a5af1eb60808fba762e8
This commit is contained in:
Philipp Riemer
2013-05-05 20:22:31 +02:00
parent b9008dfbef
commit f7fdcc1531
4 changed files with 1 additions and 32 deletions

View File

@@ -529,14 +529,12 @@ void SwPagePreviewLayout::_CalcDocPrevwPaintRect()
Size aSize;
if ( mbDoesLayoutColsFitIntoWindow )
//aSize.Width() = mnPrevwLayoutWidth;
aSize.Width() = std::min( mnPrevwLayoutWidth,
maPreviewDocRect.GetWidth() - aTopLeftPos.X() );
else
aSize.Width() = std::min( maPreviewDocRect.GetWidth() - aTopLeftPos.X(),
maWinSize.Width() - maAdditionalPaintOffset.X() );
if ( mbDoesLayoutRowsFitIntoWindow )
//aSize.Height() = mnPrevwLayoutHeight;
aSize.Height() = std::min( mnPrevwLayoutHeight,
maPreviewDocRect.GetHeight() - aTopLeftPos.Y() );
else

View File

@@ -456,9 +456,6 @@ bool SwPrintUIOptions::IsPrintTables() const
// take care of different property names currently in use for this option.
// for compatibility the old name should win (may still be used for PDF export or via Uno API)
// bool bRes = getBoolValue( "PrintTablesGraphicsAndDiagrams", sal_True );
// bRes = getBoolValue( "PrintTables", bRes );
// return bRes;
// for now it was decided that tables should always be printed
return true;
}

View File

@@ -97,8 +97,6 @@ void ViewShell::PrintProspect(
std::pair< sal_Int32, sal_Int32 > rPagesToPrint =
rPrintData.GetRenderData().GetPagePairsForProspectPrinting()[ nRenderer ];
// const USHORT nPageMax = static_cast< USHORT >(rPagesToPrint.first > rPagesToPrint.second ?
// rPagesToPrint.first : rPagesToPrint.second);
OSL_ENSURE( rPagesToPrint.first == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.first ) == 1, "first Page not valid" );
OSL_ENSURE( rPagesToPrint.second == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.second ) == 1, "second Page not valid" );
@@ -213,7 +211,6 @@ void ViewShell::PrintProspect(
Point aPos( aSttPt );
aPos -= aShell.maVisArea.Pos();
// aPos -= aPrtOff;
aMapMode.SetOrigin( aPos );
pPrinter->SetMapMode( aMapMode );
pStPage->GetUpper()->Paint( pStPage->Frm() );

View File

@@ -293,7 +293,6 @@ void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
SET_CURR_SHELL( this );
SwRootFrm* pMyLayout = GetLayout();
// ULONG nStatMax = pLayout->GetPageNum();
const SwFrm *pPage = pMyLayout->Lower();
SwLayAction aAction( pMyLayout, Imp() );
@@ -314,7 +313,6 @@ void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
maVisArea = aOldVis; //reset due to the paints
Imp()->SetFirstVisPageInvalid();
// SwPaintQueue::Repaint();
}
pMyLayout->EndAllAction();
@@ -324,10 +322,6 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
{
OSL_ENSURE( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
SwFEShell* pFESh = (SwFEShell*)this;
// Let's create a new document
// SwDoc *pPrtDoc = new SwDoc;
// pPrtDoc->acquire();
// pPrtDoc->SetRefForDocShell( (SvEmbeddedObjectRef*)&(long&)rDocShellRef );
pPrtDoc->LockExpFlds();
// use given printer
@@ -392,9 +386,6 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
((SwTxtNode*)pLastNd)->CopyCollFmt( *pTxtNd );
}
// a new one has been created in CORE (copying OLE objects)
// if( aDocShellRef.Is() )
// SwDataExchange::InitOle( aDocShellRef, pPrtDoc );
// fill it with the selected content
pFESh->Copy( pPrtDoc );
@@ -511,18 +502,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
::SetSwVisArea( pViewSh2, pStPage->Frm() );
// FIXME disabled because rPrintData.aOffset is always (0,0)
#if 0
// consider offset when printing an envelope
if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET )
{
Point aNewOrigin = pOutDev->GetMapMode().GetOrigin();
aNewOrigin += rPrintData.aOffset;
MapMode aTmp( pOutDev->GetMapMode() );
aTmp.SetOrigin( aNewOrigin );
pOutDev->SetMapMode( aTmp );
}
#endif
pShell->InitPrt( pOutDev );
::SetSwVisArea( pViewSh2, pStPage->Frm() );
@@ -572,13 +551,11 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
// Removing this gives us a performance gain during saving the
// document because the thumbnail creation will not trigger a complete
// formatting of the document.
// Format pages for printing
// pSh->CalcPagesForPrint( SHRT_MAX );
//#39275# now Meyer wants again a Clipping
pOleOut->Push( PUSH_CLIPREGION );
pOleOut->IntersectClipRegion( aSwRect.SVRect() );
pSh->GetLayout()->Paint( aSwRect );
// SFX_APP()->SpoilDemoOutput( *pOleOut, rRect );
pOleOut->Pop();
// first the CurrShell object needs to be destroyed!