[Libreoffice-commits] core.git: svx/source

Samuel Mehrbrodt Samuel.Mehrbrodt at cib.de
Tue Feb 27 07:17:10 UTC 2018


 svx/source/dialog/rubydialog.cxx |    3 ---
 1 file changed, 3 deletions(-)

New commits:
commit c13f401798c2d9ffb89835378e39bb424220685a
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date:   Mon Feb 26 15:02:24 2018 +0100

    Styles dialog no longer gives any status
    
    So always enable the button to activate the styles sidebar.
    
    Found by UBSAN:
    test_asian_phonetic_guide (asianPhoneticGuide.asianPhoneticGuide) ... /svx/source/dialog/rubydialog.cxx:322:68: runtime error: downcast of address 0x602000635e30 which does not point to an object of type 'SfxBoolItem'
    0x602000635e30: note: object is of type 'SfxVoidItem'
    
    Change-Id: I6ff20c76b4a45189d78707cd258ed2aff80c50a5
    Reviewed-on: https://gerrit.libreoffice.org/50367
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 6527d8fdb6f2..0a9ce357a91d 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -318,9 +318,6 @@ void SvxRubyDialog::Activate()
 {
     SfxModelessDialog::Activate();
     std::unique_ptr<SfxPoolItem> pState;
-    SfxItemState    eState = pBindings->QueryState( SID_STYLE_DESIGNER, pState );
-    bool bEnable = (eState < SfxItemState::DEFAULT) || !pState || !static_cast<SfxBoolItem*>(pState.get())->GetValue();
-    m_pStylistPB->Enable(bEnable);
     //get selection from current view frame
     SfxViewFrame* pCurFrm = SfxViewFrame::Current();
     Reference< XController > xCtrl = pCurFrm->GetFrame().GetController();


More information about the Libreoffice-commits mailing list