Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Hi,

Removing dead codes from sd.

Cheers,
-- Takeshi Abe
From 11834378cb34a21be9e80740718d74251725717b Mon Sep 17 00:00:00 2001
From: Takeshi Abe <tabe@fixedpoint.jp>
Date: Sun, 5 Dec 2010 22:42:19 +0900
Subject: [PATCH] Remove dead codes from sd

---
 sd/source/filter/eppt/pptx-epptooxml.cxx           |    4 ---
 sd/source/ui/annotations/annotationwindow.cxx      |   25 --------------------
 sd/source/ui/dlg/animobjs.cxx                      |    9 -------
 sd/source/ui/dlg/dlgass.cxx                        |    4 ---
 sd/source/ui/dlg/sdpreslt.cxx                      |    9 -------
 sd/source/ui/dlg/tpoption.cxx                      |    7 -----
 .../ui/framework/factories/BasicPaneFactory.cxx    |    7 -----
 sd/source/ui/func/fuconstr.cxx                     |    4 ---
 sd/source/ui/func/fuinsert.cxx                     |    4 ---
 .../controller/SlideSorterController.cxx           |    3 --
 sd/source/ui/view/ViewShellBase.cxx                |   15 ------------
 sd/source/ui/view/WindowUpdater.cxx                |    8 ------
 12 files changed, 0 insertions(+), 99 deletions(-)

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 541c6dc..ff85aac 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -288,10 +288,6 @@ void PowerPointExport::ImplWriteBackground( FSHelperPtr pFS, Reference< 
XPropert
     if ( ImplGetPropertyValue( rXPropSet, S( "FillStyle" ) ) )
         mAny >>= aFillStyle;
 
-    if( aFillStyle == FillStyle_BITMAP ) {
-
-    }
-
     if( aFillStyle == FillStyle_NONE ||
         aFillStyle == FillStyle_GRADIENT ||
         aFillStyle == FillStyle_HATCH )
diff --git a/sd/source/ui/annotations/annotationwindow.cxx 
b/sd/source/ui/annotations/annotationwindow.cxx
index 7295e71..6294209 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -243,9 +243,6 @@ void AnnotationTextWindow::GetFocus()
 
 void AnnotationTextWindow::LoseFocus()
 {
-//    if ( mpAnnotationWindow )
-//        mpAnnotationWindow->UpdateAnnotation();
-
     Window::LoseFocus();
 }
 
@@ -324,9 +321,6 @@ void AnnotationWindow::InitControls()
     mpMeta->AlwaysDisableInput(true);
     mpMeta->SetCallHandlersOnInputDisabled(true);
 
-//     mpMeta->AddEventListener( LINK( mpPostItTxt, PostItTxt, WindowEventListener ) );
-//     AddEventListener( LINK( mpTextWindow, PostItTxt, WindowEventListener ) );
-
     // we should leave this setting alone, but for this we need a better layout algo
     // with variable meta size height
     AllSettings aSettings = mpMeta->GetSettings();
@@ -353,10 +347,6 @@ void AnnotationWindow::InitControls()
     mpTextWindow->SetOutlinerView(mpOutlinerView);
     mpOutlinerView->SetOutputArea( PixelToLogic( Rectangle(0,0,1,1) ) );
 
-//     SfxItemSet item(DocShell()->GetPool());
-//     item.Put(SvxFontHeightItem(352,100,EE_CHAR_FONTHEIGHT));
-//     mpOutlinerView->SetAttribs(item);
-
     // TODO: ??
     EEHorizontalTextDirection aDefHoriTextDir = Application::GetSettings().GetLayoutRTL() ? 
EE_HTEXTDIR_R2L : EE_HTEXTDIR_L2R;
     mpOutliner->SetDefaultHorizontalTextDirection( aDefHoriTextDir );
@@ -367,22 +357,10 @@ void AnnotationWindow::InitControls()
     mpVScrollbar->EnableRTL( false );
     mpVScrollbar->SetScrollHdl(LINK(this, AnnotationWindow, ScrollHdl));
     mpVScrollbar->EnableDrag();
-//     mpVScrollbar->AddEventListener( LINK( this, AnnotationWindow, WindowEventListener ) );
 
     ULONG nCntrl = mpOutliner->GetControlWord();
     nCntrl |= EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT  | EV_CNTRL_AUTOSCROLL | 
EE_CNTRL_NOCOLORS;
-/*
-    if (pVOpt->IsFieldShadings())
-        nCntrl |= EE_CNTRL_MARKFIELDS;
-    else
-        nCntrl &= ~EE_CNTRL_MARKFIELDS;
-    if (pVOpt->IsOnlineSpell())
-        nCntrl |= EE_CNTRL_ONLINESPELLING;
-    else
-        nCntrl &= ~EE_CNTRL_ONLINESPELLING;
-*/
     mpOutliner->SetControlWord(nCntrl);
-//     mpOutliner->SetFlatMode( TRUE );
 
     Engine()->SetModifyHdl( Link() );
     Engine()->EnableUndo( FALSE );
@@ -411,8 +389,6 @@ void AnnotationWindow::Rescale()
 {
     MapMode aMode(MAP_100TH_MM);
     aMode.SetOrigin( Point() );
-    //aMode.SetScaleX( aMode.GetScaleX() * Fraction( 8, 10 ) );
-    //aMode.SetScaleY( aMode.GetScaleY() * Fraction( 8, 10 ) );
     mpOutliner->SetRefMapMode( aMode );
     SetMapMode( aMode );
     mpTextWindow->SetMapMode( aMode );
@@ -552,7 +528,6 @@ IMPL_LINK(AnnotationWindow, ModifyHdl, void*, EMPTYARG)
 sal_Int32 AnnotationWindow::GetScrollbarWidth()
 {
     return 16;
-//     return mpView->GetWrtShell().GetViewOptions()->GetZoom() / 10;
 }
 
 SvxLanguageItem AnnotationWindow::GetLanguage(void)
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 7033b21..aaa5b36 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -116,7 +116,6 @@ void SdDisplay::Paint( const Rectangle& )
         aPt.Y() = ( aSize.Height() - aBmpSize.Height() ) / 2;
 
     aBitmapEx.Draw( this, aPt, aBmpSize );
-    //DrawBitmap( aPt, aBmpSize, *pBitmap );
 }
 
 // -----------------------------------------------------------------------
@@ -629,8 +628,6 @@ void AnimationWindow::UpdateControl( ULONG nListPos, BOOL bDisableCtrls )
     }
     else
     {
-        //aFiCount.SetText( String( SdResId( STR_NULL ) ) );
-
         // Wenn kein Objekt in der Liste ist
         aBtnFirst.Enable( FALSE );
         aBtnReverse.Enable( FALSE );
@@ -738,7 +735,6 @@ Fraction AnimationWindow::GetScale()
 
 void AnimationWindow::Resize()
 {
-    //if( !IsZoomedIn() )
     if ( !IsFloatingMode() ||
          !GetFloatingWindow()->IsRollUp() )
     {
@@ -754,7 +750,6 @@ void AnimationWindow::Resize()
         aCtlDisplay.SetOutputSizePixel( aDisplaySize );
 
         Point aPt;
-        // aPt.X() = aDiffSize.Width() / 2;
         aPt.Y() = aDiffSize.Height();
 
         // Verschieben der anderen Controls
@@ -832,8 +827,6 @@ void AnimationWindow::Resize()
         aGrpAnimation.Show();
 
         aSize = aWinSize;
-
-        //aFltWinSize = GetSizePixel();
     }
     SfxDockingWindow::Resize();
 }
@@ -1218,8 +1211,6 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
                 break;
 
             }
-            //aRect.SetPos(aWindowCenter + Point(aOffset.Width(), aOffset.Height()));
-            //pClone->SetSnapRect( aRect );
             // SetSnapRect ist fuer Ellipsen leider nicht implementiert !!!
             Point aMovePt( aWindowCenter + Point( aOffset.Width(), aOffset.Height() ) - 
aRect.TopLeft() );
             Size aMoveSize( aMovePt.X(), aMovePt.Y() );
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 5d7a7cd..0ab9b87 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -752,14 +752,11 @@ void AssistentDlgImpl::CloseDocShell()
 {
     if(xDocShell.Is())
     {
-        //uno::Reference< lang::XComponent > xModel( xDocShell->GetModel(), uno::UNO_QUERY );
         uno::Reference< util::XCloseable > xCloseable( xDocShell->GetModel(), uno::UNO_QUERY );
-        //if( xModel.is() )
         if( xCloseable.is() )
         {
             xCloseable->close( sal_True );
             xDocShell = NULL;
-            //xModel->dispose();
         }
         else
         {
@@ -1039,7 +1036,6 @@ String AssistentDlgImpl::GetLayoutFileName()
 
 SfxObjectShellLock AssistentDlgImpl::GetDocument()
 {
-//     mbPreview = FALSE;              // Document nicht anzeigen
     UpdatePreview(FALSE);      // aber komplett laden
     UpdatePageList();
 
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index 3af5f19..db829c5 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -272,9 +272,6 @@ IMPL_LINK(SdPresLayoutDlg, ClickLoadHdl, void *, EMPTYARG)
     }
     delete pDlg;
 
-//    if (!bCancel)
-//        EndDialog(RET_OK);
-
     if( !bCancel )
     {
         // Pruefen, ob Vorlage schon vorhanden
@@ -309,12 +306,6 @@ IMPL_LINK(SdPresLayoutDlg, ClickLoadHdl, void *, EMPTYARG)
                 {
                     ::sd::DrawDocShell*  pTemplDocSh= pTemplDoc->GetDocSh();
 
-/*                                     SdPage* pMaster = pTemplDoc->GetMasterSdPage( 0, 
PK_STANDARD );
-                    mpLayoutNames->Insert( new String( maName ), LIST_APPEND );
-
-                    Bitmap aBitmap( pTemplDocSh->GetPagePreviewBitmap( pMaster, 90 ) );
-                    maVS.InsertItem( (USHORT) mpLayoutNames->Count(), aBitmap, maName);
-*/
                     USHORT nCount = pTemplDoc->GetMasterPageCount();
 
                     for (USHORT nLayout = 0; nLayout < nCount; nLayout++)
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 4efd283..71044c3 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -101,9 +101,6 @@ BOOL SdTpOptionsSnap::FillItemSet( SfxItemSet& rAttrs )
 {
     SvxGridTabPage::FillItemSet(rAttrs);
     SdOptionsSnapItem* pOptsItem = NULL;
-//    if(SFX_ITEM_SET != rAttrs.GetItemState( ATTR_OPTIONS_SNAP, FALSE, (const 
SfxPoolItem**)&pOptsItem ))
-//        pExampleSet->GetItemState( ATTR_OPTIONS_SNAP, FALSE, (const SfxPoolItem**)&pOptsItem );
-
     SdOptionsSnapItem aOptsItem( ATTR_OPTIONS_SNAP );
 
     aOptsItem.GetOptionsSnap().SetSnapHelplines( aCbxSnapHelplines.IsChecked() );
@@ -188,7 +185,6 @@ BOOL SdTpOptionsContents::FillItemSet( SfxItemSet& rAttrs )
     if( aCbxRuler.GetSavedValue()           != aCbxRuler.IsChecked() ||
         aCbxMoveOutline.GetSavedValue()                != aCbxMoveOutline.IsChecked() ||
         aCbxDragStripes.GetSavedValue()                != aCbxDragStripes.IsChecked() ||
-        //aCbxHelplines.GetSavedValue()                != aCbxHelplines.IsChecked() ||
         aCbxHandlesBezier.GetSavedValue()      != aCbxHandlesBezier.IsChecked() )
     {
         SdOptionsLayoutItem aOptsItem( ATTR_OPTIONS_LAYOUT );
@@ -197,7 +193,6 @@ BOOL SdTpOptionsContents::FillItemSet( SfxItemSet& rAttrs )
         aOptsItem.GetOptionsLayout().SetMoveOutline( aCbxMoveOutline.IsChecked() );
         aOptsItem.GetOptionsLayout().SetDragStripes( aCbxDragStripes.IsChecked() );
         aOptsItem.GetOptionsLayout().SetHandlesBezier( aCbxHandlesBezier.IsChecked() );
-        //aOptsItem.GetOptionsLayout().SetHelplines( aCbxHelplines.IsChecked() );
 
         rAttrs.Put( aOptsItem );
         bModified = TRUE;
@@ -219,13 +214,11 @@ void SdTpOptionsContents::Reset( const SfxItemSet& rAttrs )
     aCbxMoveOutline.Check( aLayoutItem.GetOptionsLayout().IsMoveOutline() );
     aCbxDragStripes.Check( aLayoutItem.GetOptionsLayout().IsDragStripes() );
     aCbxHandlesBezier.Check( aLayoutItem.GetOptionsLayout().IsHandlesBezier() );
-    //aCbxHelplines.Check( aLayoutItem.GetOptionsLayout().IsHelplines() );
 
     aCbxRuler.SaveValue();
     aCbxMoveOutline.SaveValue();
     aCbxDragStripes.SaveValue();
     aCbxHandlesBezier.SaveValue();
-    //aCbxHelplines.SaveValue();
 }
 
 // -----------------------------------------------------------------------
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx 
b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
index f6f6912..331bc7d 100644
--- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
@@ -414,11 +414,6 @@ void SAL_CALL BasicPaneFactory::notifyConfigurationChange (
             // problems after reload (missing resizes for the side panes).
             if (mbFirstUpdateSeen)
             {
-                if (mpUpdateLockManager.get()!=NULL)
-                {
-                    //                    ::osl::Guard< ::osl::Mutex > aGuard 
(::osl::Mutex::getGlobalMutex());
-                    //                    mpUpdateLockManager->Lock();
-                }
             }
             else
                 mbFirstUpdateSeen = true;
@@ -432,8 +427,6 @@ void SAL_CALL BasicPaneFactory::notifyConfigurationChange (
             if (mpUpdateLockManager.get() != NULL)
             {
                 ::osl::Guard< ::osl::Mutex > aGuard (::osl::Mutex::getGlobalMutex());
-                //                if (mpUpdateLockManager->IsLocked())
-                //                    mpUpdateLockManager->Unlock();
             }
             break;
     }
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 641c868..408cf87 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -93,10 +93,6 @@ BOOL FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
 
     if ( mpView->IsAction() )
     {
-        // #90235# this extra triggering is an error and leads to
-        // erasing the last two points when creating a polygon.
-        // if ( rMEvt.IsRight() )
-        //     mpView->BckAction();
         return TRUE;
     }
 
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 6ef693e..2756579 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -394,7 +394,6 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
                     pOleObj->SetProgName( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( 
"StarMath" ) ) );
                 }
 
-                //HMHmpView->HideMarkHdl();
                 pOleObj->SetLogicRect(aRect);
                 Size aTmp( OutputDevice::LogicToLogic( aRect.GetSize(), MAP_100TH_MM, aUnit ) );
                 awt::Size aVisualSize;
@@ -599,8 +598,6 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
                                 ( (SdrOle2Obj*) pObj)->SetAspect(nAspect);
                                 Rectangle aRect = ( (SdrOle2Obj*) pObj)->GetLogicRect();
 
-                                //HMHmpView->HideMarkHdl();
-
                                 if ( nAspect == embed::Aspects::MSOLE_ICON )
                                 {
                                     if( xIconMetaFile.is() )
@@ -666,7 +663,6 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
 
                         if (bCreateNew)
                         {
-                            //HMHmpView->HideMarkHdl();
                             pObj->SetLogicRect(aRect);
 
                             if ( nAspect != embed::Aspects::MSOLE_ICON )
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx 
b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 4dc8258..cd74d84 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -298,8 +298,6 @@ void SlideSorterController::Paint (
     const Rectangle& rBBox,
     ::Window* pWindow)
 {
-    //    if (mnPaintEntranceCount == 0)
-    {
         ++mnPaintEntranceCount;
 
         try
@@ -316,7 +314,6 @@ void SlideSorterController::Paint (
         }
 
         --mnPaintEntranceCount;
-    }
 }
 
 
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 04034da..0aae6fc 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -492,10 +492,6 @@ void ViewShellBase::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
                             SID_PRESENTATION, SFX_CALLMODE_ASYNCHRON );
                     }
                 }
-                else
-                {
-                    //                    mpPaneManager->InitPanes();
-                }
                 break;
 
             default:
@@ -658,7 +654,6 @@ PrintDialog* ViewShellBase::CreatePrintDialog (::Window *pParent)
 {
     (void)pParent;
     return NULL;
-    //    return mpImpl->mpPrintManager->CreatePrintDialog (pParent);
 }
 
 
@@ -671,7 +666,6 @@ SfxTabPage*  ViewShellBase::CreatePrintOptionsPage(
     (void)pParent;
     (void)rOptions;
     return NULL;
-    //    return mpImpl->mpPrintManager->CreatePrintOptionsPage (pParent, rOptions);
 }
 
 
@@ -682,7 +676,6 @@ USHORT  ViewShellBase::Print(SfxProgress&, BOOL bIsAPI, PrintDialog* pDlg)
     (void)bIsAPI;
     (void)pDlg;
     return 0;
-    //    return mpImpl->mpPrintManager->Print (rProgress, bIsAPI, pDlg);
 }
 
 
@@ -698,7 +691,6 @@ ErrCode ViewShellBase::DoPrint (
     (void)bSilent;
     (void)bIsAPI;
     return 0;
-    //return mpImpl->mpPrintManager->DoPrint (pPrinter, pPrintDialog, bSilent, bIsAPI );
 }
 
 
@@ -707,7 +699,6 @@ ErrCode ViewShellBase::DoPrint (
 void ViewShellBase::PreparePrint (PrintDialog* pPrintDialog)
 {
     SfxViewShell::PreparePrint (pPrintDialog);
-    //mpImpl->mpPrintManager->PreparePrint (pPrintDialog);
 }
 
 
@@ -826,12 +817,6 @@ void ViewShellBase::Execute (SfxRequest& rRequest)
 
 void ViewShellBase::GetState (SfxItemSet& rSet)
 {
-    // The full screen mode is not supported.  Disable the the slot so that
-    // it appears grayed out when somebody uses configures the menu to show
-    // an menu item for it.
-    //    if (rSet.GetItemState(SID_WIN_FULLSCREEN) == SFX_ITEM_AVAILABLE)
-    //        rSet.DisableItem(SID_WIN_FULLSCREEN);
-
     mpImpl->GetSlotState(rSet);
 
     FuBullet::GetSlotState( rSet, 0, GetViewFrame() );
diff --git a/sd/source/ui/view/WindowUpdater.cxx b/sd/source/ui/view/WindowUpdater.cxx
index b52960a..9c5397e 100644
--- a/sd/source/ui/view/WindowUpdater.cxx
+++ b/sd/source/ui/view/WindowUpdater.cxx
@@ -161,14 +161,6 @@ void WindowUpdater::UpdateWindow (OutputDevice* pDevice) const
 
 void WindowUpdater::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 )
 {
-    // #110094#-7
-    // Clear the master page cache so that master pages will be redrawn.
-    //if (mpViewShell != NULL)
-    //{
-    //    SdView* pView = mpViewShell->GetView();
-    //    if (pView != NULL)
-    //        pView->ReleaseMasterPagePaintCache ();
-    //}
     // Set the current state at all registered output devices.
     tWindowList::iterator aWindowIterator (maWindowList.begin());
     while (aWindowIterator != maWindowList.end())
-- 
1.7.2.3


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.