[Libreoffice-commits] .: 3 commits - framework/source svx/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Feb 10 01:53:12 PST 2011


 framework/source/layoutmanager/layoutmanager.cxx |   18 ++++--------------
 svx/source/svdraw/svdedtv2.cxx                   |    4 +---
 2 files changed, 5 insertions(+), 17 deletions(-)

New commits:
commit 9745fccacaa88bded763cc31c9aa7c04a5186a48
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 10 09:51:46 2011 +0000

    Resolves: rhbz#676539 handle missing pWindows from xWindows

diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index a67c71d..2905f03 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -130,13 +130,13 @@ bool lcl_checkUIElement(const Reference< XUIElement >& xUIElement,css::awt::Rect
         _rPosSize = _xWindow->getPosSize();
 
         Window* pWindow = VCLUnoHelper::GetWindow( _xWindow );
-        if ( pWindow->GetType() == WINDOW_TOOLBOX )
+        if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
         {
             ::Size aSize = ((ToolBox*)pWindow)->CalcWindowSizePixel( 1 );
             _rPosSize.Width = aSize.Width();
             _rPosSize.Height = aSize.Height();
         }
-    } // if ( xUIElement.is() )
+    }
     return bRet;
 }
 
@@ -1007,9 +1007,9 @@ void LayoutManager::implts_createAddonsToolBars()
                     // Set generic title for add-on toolbar
                     SolarMutexGuard aGuard;
                     Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
-                    if ( pWindow->GetText().Len() == 0 )
+                    if ( pWindow && pWindow->GetText().Len() == 0 )
                         pWindow->SetText( aGenericAddonTitle );
-                    if ( pWindow->GetType() == WINDOW_TOOLBOX )
+                    if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
                     {
                         ToolBox* pToolbar = (ToolBox *)pWindow;
                         pToolbar->SetMenuType();
commit 8366378563baef5070bc86c2f85ac1937c520551
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 9 16:38:50 2011 +0000

    WaE: value set but unused

diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 9bcee46..2ab41a9 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1983,7 +1983,6 @@ SdrObject* SdrEditView::ImpConvertOneObj(SdrObject* pObj, BOOL bPath, BOOL bLine
 void SdrEditView::ImpConvertTo(BOOL bPath, BOOL bLineToArea)
 {
     BOOL bMrkChg=FALSE;
-    BOOL bModChg=FALSE;
     if (AreObjectsMarked()) {
         ULONG nMarkAnz=GetMarkedObjectCount();
         USHORT nDscrID=0;
@@ -2018,12 +2017,11 @@ void SdrEditView::ImpConvertTo(BOOL bPath, BOOL bLineToArea)
                 SdrObjListIter aIter(*pGrp,IM_DEEPNOGROUPS);
                 while (aIter.IsMore()) {
                     pObj=aIter.Next();
-                    if (ImpConvertOneObj(pObj,bPath,bLineToArea)) bModChg=TRUE;
+                    ImpConvertOneObj(pObj,bPath,bLineToArea);
                 }
             } else {
                 SdrObject* pNewObj=ImpConvertOneObj(pObj,bPath,bLineToArea);
                 if (pNewObj!=NULL) {
-                    bModChg=TRUE;
                     bMrkChg=TRUE;
                     GetMarkedObjectListWriteAccess().ReplaceMark(SdrMark(pNewObj,pPV),nm);
                 }
commit ac20bc2c609e40a9357ca118495cab6a05447392
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 9 16:28:16 2011 +0000

    Remove meaningless code
    
    Its possible that it was intended to set m_bComponentAttached to false. But if
    that was the case it should also have been a WriteLock not a ReadLock.

diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index bde2e9d..a67c71d 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -3672,21 +3672,11 @@ throw (::com::sun::star::uno::RuntimeException)
     WriteGuard aWriteLock( m_aLock );
     m_xFrame = xFrame;
     aWriteLock.unlock();
-    /* SAFE AREA ----------------------------------------------------------------------------------------------- */
-    // if ( xFrame.is() )
-    //    xFrame->getContainerWindow()->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
 }
 
 void SAL_CALL LayoutManager::reset()
 throw (RuntimeException)
 {
-    sal_Bool bComponentAttached( sal_False );
-
-    /* SAFE AREA ----------------------------------------------------------------------------------------------- */
-    ReadGuard aReadLock( m_aLock );
-    bComponentAttached = m_bComponentAttached;
-    aReadLock.unlock();
-
     implts_reset( sal_True );
 }
 


More information about the Libreoffice-commits mailing list