[Libreoffice-commits] core.git: 4 commits - cui/source dbaccess/source forms/source reportdesign/source sc/source starmath/source svtools/source sw/source

Michael Meeks michael.meeks at collabora.com
Fri May 1 15:43:29 PDT 2015


 cui/source/dialogs/hangulhanjadlg.cxx               |   15 ++++++-
 cui/source/inc/hangulhanjadlg.hxx                   |    1 
 dbaccess/source/ui/control/FieldDescControl.cxx     |    1 
 dbaccess/source/ui/querydesign/TableWindowTitle.cxx |    7 ++-
 dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx  |    3 -
 forms/source/richtext/richtextviewport.cxx          |   14 ++++--
 reportdesign/source/ui/report/propbrw.cxx           |    3 -
 sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx      |    3 -
 sc/source/ui/dbgui/csvcontrol.cxx                   |   41 +++++++++-----------
 sc/source/ui/inc/csvcontrol.hxx                     |    7 +--
 sc/source/ui/pagedlg/tphfedit.cxx                   |    3 +
 sc/source/ui/view/gridwin.cxx                       |    3 -
 sc/source/ui/view/preview.cxx                       |    6 +-
 starmath/source/view.cxx                            |    5 +-
 svtools/source/contnr/svimpbox.cxx                  |    2 
 svtools/source/contnr/treelistbox.cxx               |   12 ++++-
 svtools/source/control/toolbarmenu.cxx              |    4 +
 svtools/source/table/tablecontrol.cxx               |    4 -
 svtools/source/toolpanel/paneltabbar.cxx            |    9 ++--
 sw/source/uibase/misc/redlndlg.cxx                  |    5 --
 20 files changed, 93 insertions(+), 55 deletions(-)

New commits:
commit 393c51cee8bc3de5a2a9f4e04161c59e8712f631
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri May 1 16:33:01 2015 +0200

    Audit LoseFocus - forms, reportdesign, sc, starmath, svtools.
    
    Change-Id: If7068e59c88e8c3c3bafc70f64899a26d739e331

diff --git a/forms/source/richtext/richtextviewport.cxx b/forms/source/richtext/richtextviewport.cxx
index 6862f75..9a206b7 100644
--- a/forms/source/richtext/richtextviewport.cxx
+++ b/forms/source/richtext/richtextviewport.cxx
@@ -48,15 +48,21 @@ namespace frm
     void RichTextViewPort::GetFocus()
     {
         Control::GetFocus();
-        m_pView->SetSelectionMode( EE_SELMODE_STD );
-        m_pView->ShowCursor( true );
+        if (m_pView)
+        {
+            m_pView->SetSelectionMode( EE_SELMODE_STD );
+            m_pView->ShowCursor( true );
+        }
     }
 
 
     void RichTextViewPort::LoseFocus()
     {
-        m_pView->HideCursor();
-        m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD );
+        if (m_pView)
+        {
+            m_pView->HideCursor();
+            m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD );
+        }
         Control::LoseFocus();
     }
 
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index 0fb2b0e..9419791 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -579,7 +579,8 @@ IMPL_LINK( PropBrw, OnAsyncGetFocus, void*,  )
 void PropBrw::LoseFocus()
 {
     DockingWindow::LoseFocus();
-    m_pDesignView->getController().InvalidateAll();
+    if (m_pDesignView)
+        m_pDesignView->getController().InvalidateAll();
 }
 
 }
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
index 99bb77b..c3927578c 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
@@ -144,6 +144,7 @@ void ScPivotLayoutTreeListBase::GetFocus()
 void ScPivotLayoutTreeListBase::LoseFocus()
 {
     SvTreeListBox::LoseFocus();
-    mpParent->mpPreviouslyFocusedListBox = this;
+    if (mpParent)
+        mpParent->mpPreviouslyFocusedListBox = this;
 }
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 69dc943..c087920 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -291,6 +291,8 @@ void ScEditWindow::GetFocus()
     }
     else
         pAcc = NULL;
+
+    Control::GetFocus();
 }
 
 void ScEditWindow::LoseFocus()
@@ -302,6 +304,7 @@ void ScEditWindow::LoseFocus()
     }
     else
         pAcc = NULL;
+    Control::LoseFocus();
 }
 
 ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > ScEditWindow::CreateAccessible()
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 69fd520..8cf05b2 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -286,6 +286,7 @@ void ScFilterListBox::LoseFocus()
 #ifndef UNX
     Hide();
 #endif
+    vcl::Window::LoseFocus();
 }
 
 bool ScFilterListBox::PreNotify( NotifyEvent& rNEvt )
@@ -4871,7 +4872,7 @@ void ScGridWindow::LoseFocus()
 {
     ScTabViewShell* pViewShell = pViewData->GetViewShell();
 
-    if (pViewShell->HasAccessibilityObjects())
+    if (pViewShell && pViewShell->HasAccessibilityObjects())
         pViewShell->BroadcastAccessibility(ScAccGridWinFocusLostHint(eWhich, GetAccessible()));
 
     Window::LoseFocus();
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 5a59c2c..d4adc42 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -1506,14 +1506,16 @@ void ScPreview::InvalidateLocationData(sal_uLong nId)
 
 void ScPreview::GetFocus()
 {
-    if (pViewShell->HasAccessibilityObjects())
+    Window::GetFocus();
+    if (pViewShell && pViewShell->HasAccessibilityObjects())
         pViewShell->BroadcastAccessibility( ScAccWinFocusGotHint(GetAccessible()) );
 }
 
 void ScPreview::LoseFocus()
 {
-    if (pViewShell->HasAccessibilityObjects())
+    if (pViewShell && pViewShell->HasAccessibilityObjects())
         pViewShell->BroadcastAccessibility( ScAccWinFocusLostHint(GetAccessible()) );
+    Window::LoseFocus();
 }
 
 com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> ScPreview::CreateAccessible()
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 829b6af..304327b 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -268,8 +268,9 @@ void SmGraphicWindow::LoseFocus()
 
 void SmGraphicWindow::RepaintViewShellDoc()
 {
-    SmDocShell &rDoc = *pViewShell->GetDoc();
-    rDoc.Repaint();
+    SmDocShell *pDoc = pViewShell->GetDoc();
+    if (pDoc)
+        pDoc->Repaint();
 }
 
 IMPL_LINK_NOARG(SmGraphicWindow, CaretBlinkTimerHdl)
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 7818856..784efbc 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2623,7 +2623,7 @@ void SvImpLBox::LoseFocus()
 
     if( m_nStyle & WB_HIDESELECTION )
     {
-        SvTreeListEntry* pEntry = pView->FirstSelected();
+        SvTreeListEntry* pEntry = pView ?  pView->FirstSelected() : NULL;
         while( pEntry )
         {
             InvalidateEntry( pEntry );
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 039b669..6d98310 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -62,6 +62,8 @@ class MyEdit_Impl : public Edit
     SvInplaceEdit2* pOwner;
 public:
                  MyEdit_Impl( vcl::Window* pParent, SvInplaceEdit2* pOwner );
+    virtual     ~MyEdit_Impl() { disposeOnce(); }
+    virtual void dispose() SAL_OVERRIDE { pOwner = NULL; Edit::dispose(); }
     virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
     virtual void LoseFocus() SAL_OVERRIDE;
 };
@@ -71,6 +73,8 @@ class MyMultiEdit_Impl : public MultiLineEdit
     SvInplaceEdit2* pOwner;
 public:
                  MyMultiEdit_Impl( vcl::Window* pParent, SvInplaceEdit2* pOwner );
+    virtual     ~MyMultiEdit_Impl() { disposeOnce(); }
+    virtual void dispose() SAL_OVERRIDE { pOwner = NULL; MultiLineEdit::dispose(); }
     virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
     virtual void LoseFocus() SAL_OVERRIDE;
 };
@@ -92,7 +96,8 @@ void MyEdit_Impl::KeyInput( const KeyEvent& rKEvt )
 
 void MyEdit_Impl::LoseFocus()
 {
-    pOwner->LoseFocus();
+    if (pOwner)
+        pOwner->LoseFocus();
 }
 
 MyMultiEdit_Impl::MyMultiEdit_Impl( vcl::Window* pParent, SvInplaceEdit2* _pOwner )
@@ -110,7 +115,8 @@ void MyMultiEdit_Impl::KeyInput( const KeyEvent& rKEvt )
 
 void MyMultiEdit_Impl::LoseFocus()
 {
-    pOwner->LoseFocus();
+    if (pOwner)
+        pOwner->LoseFocus();
 }
 
 
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 8051265..2172448 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -483,6 +483,8 @@ void ToolbarMenu::dispose()
     }
 
     delete mpImpl;
+    mpImpl = NULL;
+
     DockingWindow::dispose();
 }
 
@@ -774,7 +776,7 @@ void ToolbarMenu::GetFocus()
 
 void ToolbarMenu::LoseFocus()
 {
-    if( mpImpl->mnHighlightedEntry != -1 )
+    if( mpImpl && mpImpl->mnHighlightedEntry != -1 )
         implChangeHighlightEntry( -1 );
 
     DockingWindow::LoseFocus();
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index 5c887c3..0c1bdb3 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -80,14 +80,14 @@ namespace svt { namespace table
 
     void TableControl::GetFocus()
     {
-        if ( !m_pImpl->getInputHandler()->GetFocus( *m_pImpl ) )
+        if ( !m_pImpl || !m_pImpl->getInputHandler()->GetFocus( *m_pImpl ) )
             Control::GetFocus();
     }
 
 
     void TableControl::LoseFocus()
     {
-        if ( !m_pImpl->getInputHandler()->LoseFocus( *m_pImpl ) )
+        if ( !m_pImpl || !m_pImpl->getInputHandler()->LoseFocus( *m_pImpl ) )
             Control::LoseFocus();
     }
 
diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx
index 47aa133..069211c 100644
--- a/svtools/source/toolpanel/paneltabbar.cxx
+++ b/svtools/source/toolpanel/paneltabbar.cxx
@@ -1199,12 +1199,13 @@ namespace svt
     {
         Control::LoseFocus();
 
-        if ( !!m_pImpl->m_aFocusedItem )
+        if ( m_pImpl )
         {
-            m_pImpl->InvalidateItem( *m_pImpl->m_aFocusedItem );
-        }
+            if ( !!m_pImpl->m_aFocusedItem )
+                m_pImpl->InvalidateItem( *m_pImpl->m_aFocusedItem );
 
-        m_pImpl->m_aFocusedItem.reset();
+            m_pImpl->m_aFocusedItem.reset();
+        }
     }
 
 
commit 526d192333615e8b3b10f144faad987519be1044
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri May 1 15:55:01 2015 +0200

    Unwind odd reference handling with csvcontrol.
    
    Change-Id: I5002ae13455825b0b7516e228b1e3bad7adc669a

diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index 72a4377..b53b5bc 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -59,7 +59,7 @@ ScCsvDiff ScCsvLayoutData::GetDiff( const ScCsvLayoutData& rData ) const
 ScCsvControl::ScCsvControl( ScCsvControl& rParent ) :
     Control( &rParent, WB_TABSTOP | WB_NODIALOGCONTROL ),
     mrData( rParent.GetLayoutData() ),
-    mpAccessible( NULL ),
+    mxAccessible( NULL ),
     mbValidGfx( false )
 {
 }
@@ -67,7 +67,7 @@ ScCsvControl::ScCsvControl( ScCsvControl& rParent ) :
 ScCsvControl::ScCsvControl( vcl::Window* pParent, const ScCsvLayoutData& rData, WinBits nBits ) :
     Control( pParent, nBits ),
     mrData( rData ),
-    mpAccessible( NULL ),
+    mxAccessible( NULL ),
     mbValidGfx( false )
 {
 }
@@ -79,8 +79,8 @@ ScCsvControl::~ScCsvControl()
 
 void ScCsvControl::dispose()
 {
-    if( mpAccessible )
-        mpAccessible->dispose();
+    if( mxAccessible.is() )
+        mxAccessible->dispose();
     Control::dispose();
 }
 
@@ -100,44 +100,44 @@ void ScCsvControl::LoseFocus()
 
 void ScCsvControl::AccSendFocusEvent( bool bFocused )
 {
-    if( mpAccessible )
-        mpAccessible->SendFocusEvent( bFocused );
+    if( mxAccessible.is() )
+        mxAccessible->SendFocusEvent( bFocused );
 }
 
 void ScCsvControl::AccSendCaretEvent()
 {
-    if( mpAccessible )
-        mpAccessible->SendCaretEvent();
+    if( mxAccessible.is() )
+        mxAccessible->SendCaretEvent();
 }
 
 void ScCsvControl::AccSendVisibleEvent()
 {
-    if( mpAccessible )
-        mpAccessible->SendVisibleEvent();
+    if( mxAccessible.is() )
+        mxAccessible->SendVisibleEvent();
 }
 
 void ScCsvControl::AccSendSelectionEvent()
 {
-    if( mpAccessible )
-        mpAccessible->SendSelectionEvent();
+    if( mxAccessible.is() )
+        mxAccessible->SendSelectionEvent();
 }
 
 void ScCsvControl::AccSendTableUpdateEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows )
 {
-    if( mpAccessible )
-        mpAccessible->SendTableUpdateEvent( nFirstColumn, nLastColumn, bAllRows );
+    if( mxAccessible.is() )
+        mxAccessible->SendTableUpdateEvent( nFirstColumn, nLastColumn, bAllRows );
 }
 
 void ScCsvControl::AccSendInsertColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn )
 {
-    if( mpAccessible )
-        mpAccessible->SendInsertColumnEvent( nFirstColumn, nLastColumn );
+    if( mxAccessible.is() )
+        mxAccessible->SendInsertColumnEvent( nFirstColumn, nLastColumn );
 }
 
 void ScCsvControl::AccSendRemoveColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn )
 {
-    if( mpAccessible )
-        mpAccessible->SendRemoveColumnEvent( nFirstColumn, nLastColumn );
+    if( mxAccessible.is() )
+        mxAccessible->SendRemoveColumnEvent( nFirstColumn, nLastColumn );
 }
 
 // repaint helpers ------------------------------------------------------------
@@ -300,9 +300,8 @@ ScMoveMode ScCsvControl::GetVertDirection( sal_uInt16 nCode, bool bHomeEnd )
 
 ScCsvControl::XAccessibleRef ScCsvControl::CreateAccessible()
 {
-    mpAccessible = ImplCreateAccessible();
-    mxAccessible = mpAccessible;
-    return mxAccessible;
+    mxAccessible = ImplCreateAccessible();
+    return XAccessibleRef(mxAccessible.get());
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/csvcontrol.hxx b/sc/source/ui/inc/csvcontrol.hxx
index 3639d6f..e2fbc49 100644
--- a/sc/source/ui/inc/csvcontrol.hxx
+++ b/sc/source/ui/inc/csvcontrol.hxx
@@ -225,16 +225,15 @@ protected:
     typedef ::std::vector< OUString >   StringVec;
     typedef ::std::vector< StringVec >  StringVecVec;
 
-    typedef ::com::sun::star::uno::Reference<
-        ::com::sun::star::accessibility::XAccessible > XAccessibleRef;
+    typedef ::css::uno::Reference<
+        ::css::accessibility::XAccessible > XAccessibleRef;
 
 private:
     Link<>                      maCmdHdl;           /// External command handler.
     ScCsvCmd                    maCmd;              /// Data of last command.
     const ScCsvLayoutData&      mrData;             /// Shared layout data.
 
-    XAccessibleRef              mxAccessible;       /// The accessible object of the control.
-    ScAccessibleCsvControl*     mpAccessible;       /// Pointer to the accessible implementation object.
+    rtl::Reference<ScAccessibleCsvControl> mxAccessible; /// Reference to the accessible implementation object.
     bool                        mbValidGfx;         /// Content of virtual devices valid?
 
 public:
commit 9d17e1250acb7c5c60cdf8d71476c5873b8b4a9b
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri May 1 14:34:23 2015 +0100

    Audit LoseFocus - basctl, cui, dbaccess.
    
    Change-Id: If61b45f28f30e3ab00dbf071198233d59899d719

diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 8e55eda..8fbb243 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -420,6 +420,11 @@ namespace svx
             implUpdateDisplay();
     }
 
+    bool SuggestionDisplay::hasCurrentControl()
+    {
+        return m_bDisplayListBox || m_aValueSet;
+    }
+
     Control& SuggestionDisplay::implGetCurrentControl()
     {
         if( m_bDisplayListBox )
@@ -445,11 +450,17 @@ namespace svx
     }
     void SuggestionDisplay::GetFocus()
     {
-        implGetCurrentControl().GetFocus();
+        if (hasCurrentControl())
+            implGetCurrentControl().GetFocus();
+        else
+            Control::LoseFocus();
     }
     void SuggestionDisplay::LoseFocus()
     {
-        implGetCurrentControl().LoseFocus();
+        if (hasCurrentControl())
+            implGetCurrentControl().LoseFocus();
+        else
+            Control::LoseFocus();
     }
     void SuggestionDisplay::Command( const CommandEvent& rCEvt )
     {
diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx
index 3e7f383..3b88a7b 100644
--- a/cui/source/inc/hangulhanjadlg.hxx
+++ b/cui/source/inc/hangulhanjadlg.hxx
@@ -85,6 +85,7 @@ namespace svx
 
     private:
         void implUpdateDisplay();
+        bool hasCurrentControl();
         Control& implGetCurrentControl();
 
     private:
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index a6fb6d7..3cce597 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1594,7 +1594,6 @@ void OFieldDescControl::implFocusLost(vcl::Window* _pWhich)
 
 void OFieldDescControl::LoseFocus()
 {
-
     implFocusLost(NULL);
 
     TabPage::LoseFocus();
diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
index a0fba53..f1f3149 100644
--- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
@@ -68,11 +68,16 @@ void OTableWindowTitle::GetFocus()
 {
     if(m_pTabWin)
         m_pTabWin->GetFocus();
+    else
+        FixedText::GetFocus();
 }
 
 void OTableWindowTitle::LoseFocus()
 {
-    m_pTabWin->LoseFocus();
+    if (m_pTabWin)
+        m_pTabWin->LoseFocus();
+    else
+        FixedText::LoseFocus();
 }
 
 void OTableWindowTitle::RequestHelp( const HelpEvent& rHEvt )
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
index 3252a5d..7931fee 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
@@ -106,7 +106,8 @@ void OFieldDescGenWin::GetFocus()
 
 void OFieldDescGenWin::LoseFocus()
 {
-    m_pFieldControl->LoseFocus();
+    if (m_pFieldControl)
+        m_pFieldControl->LoseFocus();
     TabPage::LoseFocus();
 }
 
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 9203d56..039b669 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -2832,7 +2832,7 @@ SvTreeListEntry* SvTreeListBox::GetEntry( const Point& rPos, bool bHit ) const
 
 SvTreeListEntry* SvTreeListBox::GetCurEntry() const
 {
-    return pImp->GetCurEntry();
+    return pImp ? pImp->GetCurEntry() : NULL;
 }
 
 void SvTreeListBox::ImplInitStyle()
commit c6f0b726e605df49074e2ddc668fa4c6f070c170
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri May 1 07:51:04 2015 +0100

    redline dialog handle post-dispose event bits.
    
    Change-Id: I5739c0ac6529b1c51866d81c30df4a185ffa6ecd

diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 49be7d8..411febaea 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -1258,16 +1258,15 @@ SwRedlineAcceptPanel::~SwRedlineAcceptPanel()
 void SwRedlineAcceptPanel::dispose()
 {
     delete mpImplDlg;
+    mpImplDlg = NULL;
     PanelLayout::dispose();
 }
 
 void SwRedlineAcceptPanel::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
 {
     const SfxSimpleHint *pHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
-    if (pHint && pHint->GetId() == SFX_HINT_DOCCHANGED)
-    {
+    if (mpImplDlg && pHint && pHint->GetId() == SFX_HINT_DOCCHANGED)
         mpImplDlg->Activate();
-    }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list