Hi, First time I send code to any project :) Some dead code I found in the project, of course, LGPLv3+ / MPL will love to hunt some more... Regards Ricardo
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 626d65b..9d92f61 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -132,37 +132,6 @@ OutlineView::OutlineView( DrawDocShell* pDocSh, ::Window* pWindow, OutlineViewSh // Outliner initialisieren: Referenz-Device setzen bInitOutliner = TRUE; mpOutliner->Init( OUTLINERMODE_OUTLINEVIEW ); -/* - SfxStyleSheet* pTitleSheet = mpDoc->GetSdPage( 0, PK_STANDARD )->GetStyleSheetForPresObj( PRESOBJ_TITLE ); - - if ( pTitleSheet ) - { - // set title symbol (level 0) - SvxNumBulletItem aNumBulletItem( (const SvxNumBulletItem&) pTitleSheet->GetItemSet().Get(EE_PARA_NUMBULLET) ); - SvxNumRule aNumRule(* aNumBulletItem.GetNumRule()); - SvxNumberFormat aFormat( aNumRule.GetLevel(0)); - Font aBulletFont; - const Font* pFont = aFormat.GetBulletFont(); - if ( pFont ) // if available take font size and color from style - aBulletFont = *pFont; - else - { - aBulletFont.SetColor( COL_AUTO ); - aBulletFont.SetHeight( 1552 ); - } - aBulletFont.SetCharSet(RTL_TEXTENCODING_MS_1252); // and replacing other values by standard - aBulletFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "StarSymbol" )) ); - aBulletFont.SetWeight(WEIGHT_NORMAL); - aBulletFont.SetUnderline(UNDERLINE_NONE); - aBulletFont.SetStrikeout(STRIKEOUT_NONE); - aBulletFont.SetItalic(ITALIC_NONE); - aBulletFont.SetOutline(FALSE); - aBulletFont.SetShadow(FALSE); - aFormat.SetBulletFont( &aBulletFont ); - aFormat.SetBulletChar( 0xE011 ); // StarBats: 0xF000 + 114 - mpOutliner->OverwriteLevel0Bullet( aFormat ); - } -*/ mpOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *pDocSh ) ); ULONG nWidth = OUTLINE_PAPERWIDTH; mpOutliner->SetPaperSize(Size(nWidth, 400000000)); @@ -303,46 +272,6 @@ void OutlineView::Paint(const Rectangle& rRect, ::sd::Window* pWin) pOlView->ShowCursor(mbFirstPaint); -/* - if( mnPageNumberWidthPixel == 0 ) - GetPageNumberWidthPixel(); - - const ULONG nParaCount = pOlView->GetOutliner()->GetParagraphCount(); - EditView& rEditView = pOlView->GetEditView(); - - Font aOldFont( pWin->GetFont() ); - - const String aBulletStr( sal_Unicode( 0xE011 ) ); - pWin->SetFont( maBulletFont); - sal_Int32 nBulletWidth = pWin->GetTextWidth(aBulletStr); - - sal_Int32 nPage = 1; - for( ULONG nPara = 0; nPara < nParaCount; nPara++ ) - { - Paragraph* pPara = pOlView->GetOutliner()->GetParagraph( nPara ); - if( pPara->HasFlag( PARAFLAG_ISPAGE ) ) - { - pWin->SetFont( maPageNumberFont ); - const String aStr( String::CreateFromInt32( nPage++ ) ); - Point aPos( rEditView.GetWindowPosTopLeft( (USHORT)nPara ) ); - - sal_Int32 nNumberOffset = pWin->PixelToLogic( Point(mnPageNumberWidthPixel, 0) ).X() - nBulletWidth; - sal_Int32 nLineHeight = pOlView->GetOutliner()->GetLineHeight( nPara, 0 ); - - aPos.X() = nNumberOffset; - - Point aPoint( aPos.X() - pWin->GetTextWidth( aStr ), aPos.Y() + ( nLineHeight - maPageNumberFont.GetHeight()) / 2 ); - pWin->DrawText( aPoint, aStr ); - - aPoint.X() = aPos.X(); - aPoint.Y() = aPos.Y() +( nLineHeight - maBulletFont.GetHeight()) / 2; - pWin->SetFont( maBulletFont ); - pWin->DrawText( aPoint, aBulletStr ); - } - } - - pWin->SetFont( aOldFont ); -*/ mbFirstPaint = FALSE; } } @@ -970,8 +899,6 @@ IMPL_LINK( OutlineView, StatusEventHdl, EditStatus *, EMPTYARG ) ::sd::Window* pWin = mpOutlineViewShell->GetActiveWindow(); OutlinerView* pOutlinerView = GetViewByWindow(pWin); Rectangle aVis = pOutlinerView->GetVisArea(); - -// ULONG nWidth = ((SdPage*)mpDoc->GetSdPage(0, PK_STANDARD))->GetSize().Width(); ULONG nWidth = OUTLINE_PAPERWIDTH; Rectangle aText = Rectangle(Point(0,0), Size(nWidth, @@ -1973,14 +1900,10 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo) long nFontHeight = 0; if ( !rEditEngine.IsFlatMode() ) { -// const SvxFontHeightItem& rFH = (const SvxFontHeightItem&)rEditEngine.GetParaAttrib( pInfo->mnPara, EE_CHAR_FONTHEIGHT ); -// nBulletHeight = rFH.GetHeight(); nFontHeight = nBulletHeight / 5; } else { -// const SvxFontHeightItem& rFH = (const SvxFontHeightItem&)rEditEngine.GetEmptyItemSet().Get( EE_CHAR_FONTHEIGHT ); - // nBulletHeight = rFH.GetHeight(); nFontHeight = (nBulletHeight * 10) / 25; } @@ -2007,7 +1930,6 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo) Point aTextPos( aImagePos.X() - aOffset.Width(), pInfo->mrStartPos.Y() ); Font aNewFont( OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE, eLang, 0 ) ); aNewFont.SetSize( aFontSz ); -// aNewFont.SetAlign( aBulletFont.GetAlign() ); aNewFont.SetVertical( bVertical ); aNewFont.SetOrientation( bVertical ? 2700 : 0 ); aNewFont.SetColor( COL_AUTO ); @@ -2016,7 +1938,6 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo) Size aTextSz; aTextSz.Width() = pInfo->mpOutDev->GetTextWidth( aPageText ); aTextSz.Height() = pInfo->mpOutDev->GetTextHeight(); -// long nBulletHeight = !bVertical ? aBulletArea.GetHeight() : aBulletArea.GetWidth(); if ( !bVertical ) { aTextPos.Y() += (aOutSize.Height() - aTextSz.Height()) / 2; diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 2f874a7..c23892f 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -165,30 +165,6 @@ bool View::InsertMetaFile( TransferableDataHelper& rDataHelper, const Point& rPo if( !rDataHelper.GetGDIMetaFile( FORMAT_GDIMETAFILE, aMtf ) ) return false; -/* -SvFileStream aSvOutputStream( String( RTL_CONSTASCII_USTRINGPARAM( "/tmp/test.png" ) ), STREAM_WRITE | STREAM_TRUNC ); -Graphic aMtfGraphic( aMtf ); -Size aPreviewSizePixel( OutputDevice::LogicToLogic( aMtf.GetPrefSize(), aMtf.GetPrefMapMode(), MAP_PIXEL ) ); - -if( aPreviewSizePixel.Width() && aPreviewSizePixel.Height() ) -{ - const double fWH = static_cast< double >( aPreviewSizePixel.Width() ) / static_cast< double >( aPreviewSizePixel.Height() ); - - if( fWH <= 1.0 ) - aPreviewSizePixel.Width() = static_cast< long >( 128.0 * fWH ), aPreviewSizePixel.Height() = 128; - else - aPreviewSizePixel.Width() = 128, aPreviewSizePixel.Height() = static_cast< long >( 128.0 / fWH ); - - if( GraphicConverter::Export( aSvOutputStream, aMtfGraphic.GetBitmapEx( &aPreviewSizePixel ), CVT_PNG ) ) - { - // handle errror case here - } - else - { - // Success - } -} -*/ bool bVector = false; Graphic aGraphic;
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice