[Libreoffice-commits] .: 2 commits - sfx2/source svx/source xmloff/source

Caolán McNamara caolan at kemper.freedesktop.org
Sat Dec 18 11:01:24 PST 2010


 sfx2/source/dialog/versdlg.cxx   |    3 
 svx/source/tbxctrls/grafctrl.cxx |  103 --------------------------------
 xmloff/source/text/txtparae.cxx  |  124 ---------------------------------------
 3 files changed, 230 deletions(-)

New commits:
commit 75a13cc2325c883b2a6530abeb0184e7226da973
Author: Anders Jonsson <anders.jonsson at norsjonet.se>
Date:   Sat Dec 18 13:45:43 2010 +0100

    Remove large blocks of commented code

diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 0978976..8914049 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -500,109 +500,6 @@ void ImplGrafModeControl::Update( const SfxPoolItem* pItem )
         SetNoSelection();
 }
 
-// -----------------------
-// - ImplGrafFilterPopup -
-// -----------------------
-/*
-CD!!!
-class ImplGrafFilterPopup : public SfxPopupWindow
-{
-private:
-
-    SvxGrafFilterToolBoxControl*	    mpParent;
-    Reference< XConfigurableUIElement > m_xToolBar;
-//	SfxToolBoxManager				    maTbxMgr;
-    ResId							    maResIdWin;
-    ResId							    maResIdTbx;
-    WindowAlign						    meTbxAlign;
-    Link							    maSelectHdl;
-
-                                    DECL_LINK( TbxSelectHdl, void* );
-
-public:
-                                    ImplGrafFilterPopup( USHORT nId, SvxGrafFilterToolBoxControl* pParent,
-                                                         WindowAlign eAlign,
-                                                         const ResId& rResIdWin, const ResId& rResIdTbx,
-                                                         SfxBindings& rBindings );
-                                    ~ImplGrafFilterPopup();
-
-    virtual SfxPopupWindow*			Clone() const;
-    virtual void					PopupModeEnd();
-
-    void							StartSelection() { maTbxMgr.GetToolBox().StartSelection(); }
-    void							Update();
-};
-
-// -----------------------------------------------------------------------------
-
-ImplGrafFilterPopup::ImplGrafFilterPopup( USHORT nId, SvxGrafFilterToolBoxControl* pParent,
-                                          WindowAlign eAlign,
-                                          const ResId& rResIdWin, const ResId& rResIdTbx ) :
-    SfxPopupWindow	( nId, rResIdWin ),
-    mpParent		( pParent ),
-    maTbxMgr		( this, GetBindings(), rResIdTbx ),
-    maResIdWin		( rResIdWin ),
-    maResIdTbx      ( rResIdTbx ),
-    meTbxAlign		( eAlign )
-{
-    maTbxMgr.UseDefault();
-
-    maSelectHdl = maTbxMgr.GetToolBox().GetSelectHdl();
-    maTbxMgr.GetToolBox().SetSelectHdl( LINK( this, ImplGrafFilterPopup, TbxSelectHdl ) );
-
-    FreeResource();
-
-    const Size aSize( maTbxMgr.CalcWindowSizePixel() );
-    maTbxMgr.SetPosSizePixel( Point(), aSize );
-    SetOutputSizePixel( aSize );
-}
-
-// -----------------------------------------------------------------------------
-
-ImplGrafFilterPopup::~ImplGrafFilterPopup()
-{
-}
-
-// -----------------------------------------------------------------------------
-
-SfxPopupWindow* ImplGrafFilterPopup::Clone() const
-{
-    return( new ImplGrafFilterPopup( GetId(), mpParent, meTbxAlign,
-                                     maResIdWin, maResIdTbx,
-                                     (SfxBindings&) GetBindings() ) );
-}
-
-// -----------------------------------------------------------------------------
-
-void ImplGrafFilterPopup::Update()
-{
-    ToolBox* pBox = &maTbxMgr.GetToolBox();
-    maTbxMgr.Activate( pBox );
-    maTbxMgr.Deactivate( pBox );
-}
-
-// -----------------------------------------------------------------------------
-
-void ImplGrafFilterPopup::PopupModeEnd()
-{
-    maTbxMgr.GetToolBox().EndSelection();
-    SfxPopupWindow::PopupModeEnd();
-}
-
-// -----------------------------------------------------------------------------
-
-IMPL_LINK( ImplGrafFilterPopup, TbxSelectHdl, void*, EMPTYARG )
-{
-    const USHORT nSlotId = maTbxMgr.GetToolBox().GetCurItemId();
-
-    if( IsInPopupMode() )
-        EndPopupMode();
-
-    GetBindings().GetDispatcher()->Execute( nSlotId, SFX_CALLMODE_ASYNCHRON );
-
-    return 0;
-}
-*/
 // -------------------------------
 // - SvxGrafFilterToolBoxControl -
 // -------------------------------
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index f2e9742..f4acc10 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3120,130 +3120,6 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes(
     OUString sHRef, sName, sTargetFrame, sUStyleName, sVStyleName;
     sal_Bool bServerMap = sal_False;
 
-/*    bool bHyperLinkURL = false;
-    bool bHyperLinkName = false;
-    bool bHyperLinkTarget = false;
-    bool bServer = false;
-    bool bUnvisitedCharStyleName = false;
-    bool bVisitedCharStyleName = false;
-
-    const Reference< XMultiPropertySet > xMultiPropertySet( rPropSet, UNO_QUERY );
-    if ( xMultiPropertySet.is() )
-    {
-    sal_uInt32 nCount = 0;
-    Sequence< OUString > aPropertyNames( 6 );
-      OUString* pArray = aPropertyNames.getArray();
-
-    if ( rPropSetInfo->hasPropertyByName( sServerMap ) )
-    {
-        bServer = true;
-        pArray[ nCount++ ] = sServerMap;
-    }
-    if ( rPropSetInfo->hasPropertyByName( sHyperLinkName ) )
-    {
-        bHyperLinkName = true;
-        pArray[ nCount++ ] = sHyperLinkName;
-    }
-    if ( rPropSetInfo->hasPropertyByName( sHyperLinkTarget ) )
-    {
-        bHyperLinkTarget = true;
-        pArray[ nCount++ ] = sHyperLinkTarget;
-    }
-    if ( rPropSetInfo->hasPropertyByName( sHyperLinkURL ) )
-    {
-        bHyperLinkURL = true;
-        pArray[ nCount++ ] = sHyperLinkURL;
-    }
-    if ( rPropSetInfo->hasPropertyByName( sUnvisitedCharStyleName ) )
-    {
-        bUnvisitedCharStyleName = true;
-        pArray[ nCount++ ] = sUnvisitedCharStyleName;
-    }
-    if ( rPropSetInfo->hasPropertyByName( sVisitedCharStyleName ) )
-    {
-        bVisitedCharStyleName = true;
-        pArray[ nCount++ ] = sVisitedCharStyleName;
-    }
-
-    aPropertyNames.realloc( nCount );
-
-    if ( nCount )
-    {
-        Sequence< PropertyState > aPropertyStates( nCount );
-          PropertyState* pStateArray = aPropertyStates.getArray();
-
-        if ( rPropState.is() )
-            aPropertyStates = rPropState->getPropertyStates( aPropertyNames );
-
-        Sequence< Any > aPropertyValues ( xMultiPropertySet->getPropertyValues( aPropertyNames ) );
-        Any* pValueArray = aPropertyValues.getArray();
-
-        sal_uInt32 nIdx = 0;
-
-        if ( bServer )
-        {
-            if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] )
-            {
-                bServerMap = *(sal_Bool *)pValueArray[ nIdx ].getValue();
-                if( bServerMap  )
-                    bExport = sal_True;
-            }
-            ++nIdx;
-        }
-        if ( bHyperLinkName )
-        {
-            if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] )
-            {
-                pValueArray[ nIdx ] >>= sName;
-                if( sName.getLength() > 0 )
-                    bExport = sal_True;
-            }
-            ++nIdx;
-        }
-        if ( bHyperLinkTarget )
-        {
-            if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] )
-            {
-                pValueArray[ nIdx ] >>= sTargetFrame;
-                if( sTargetFrame.getLength() )
-                    bExport = sal_True;
-            }
-            ++nIdx;
-        }
-        if ( bHyperLinkURL )
-        {
-            if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] )
-            {
-                pValueArray[ nIdx ] >>= sHRef;
-                if( sHRef.getLength() > 0 )
-                    bExport = sal_True;
-            }
-            ++nIdx;
-        }
-        if ( bUnvisitedCharStyleName )
-        {
-            if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] )
-            {
-                pValueArray[ nIdx ] >>= sUStyleName;
-                if( sUStyleName.getLength() )
-                    bExport = sal_True;
-            }
-            ++nIdx;
-        }
-        if ( bVisitedCharStyleName )
-        {
-            if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] )
-            {
-                pValueArray[ nIdx ] >>= sVStyleName;
-                if( sVStyleName.getLength() )
-                    bExport = sal_True;
-            }
-            ++nIdx;
-        }
-    }
-    }
-    else
-    {*/
     if( rPropSetInfo->hasPropertyByName( sHyperLinkURL ) &&
         ( !rPropState.is() || PropertyState_DIRECT_VALUE ==
                     rPropState->getPropertyState( sHyperLinkURL ) ) )
commit 6fa7b0993796dc9ac12fe2271c2af3b803bee7d2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 18 18:54:46 2010 +0000

    This ctor doesn't do anything anymore.
    
    Arguably the first arg could be used as input to "reserve" on the vector

diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 37ed635..9a7d487 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -87,9 +87,6 @@ class SfxVersionTableDtor
 private:
     _SfxVersionTable        aTableList;
 public:
-                            SfxVersionTableDtor( const sal_uInt16 nInitSz=0, const sal_uInt16 nReSz=1 )
-                            {}
-
                             SfxVersionTableDtor( const SfxVersionTableDtor &rCpy )
                             { *this = rCpy; }
 


More information about the Libreoffice-commits mailing list