include/sfx2/mgetempl.hxx | 1 + sfx2/source/dialog/mgetempl.cxx | 17 +++++++++++++++++ 2 files changed, 18 insertions(+)
New commits: commit fecdbcab90c0373e0c172835f237d86baed6d1bb Author: Heena Gupta <[email protected]> Date: Tue Feb 17 13:45:17 2015 +0530 Related: tdf#87675 Edit Linked Style Button is nonclickable on None Entry Conflicts: sfx2/source/dialog/mgetempl.cxx Change-Id: Ieac16f9cd6063e38c6d8dee0a1f0dba29e1adc6f Reviewed-on: https://gerrit.libreoffice.org/14516 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx index 818243b..eded8ba 100644 --- a/include/sfx2/mgetempl.hxx +++ b/include/sfx2/mgetempl.hxx @@ -73,6 +73,7 @@ friend class SfxStyleDialog; DECL_LINK( LoseFocusHdl, Edit * ); DECL_LINK( EditStyleSelectHdl_Impl, void * ); DECL_LINK( EditStyleHdl_Impl, void * ); + DECL_LINK( EditLinkStyleSelectHdl_Impl, void * ); DECL_LINK( EditLinkStyleHdl_Impl, void * ); void UpdateName_Impl(ListBox *, const OUString &rNew); diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index fdd626d..fc1d7db 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -88,6 +88,12 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx else m_pEditStyleBtn->Enable(); + sal_Int32 linkSelectPos = m_pBaseLb->GetSelectEntryPos(); + if ( linkSelectPos == 0 ) + m_pEditLinkStyleBtn->Disable(); + else + m_pEditLinkStyleBtn->Enable(); + ResMgr* pResMgr = SfxGetpApp()->GetModule_Impl()->GetResMgr(); OSL_ENSURE( pResMgr, "No ResMgr in Module" ); pFamilies = new SfxStyleFamilies( ResId( DLG_STYLE_DESIGNER, *pResMgr ) ); @@ -235,6 +241,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx if(SfxItemState::SET == rAttrSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE)) m_pAutoCB->Show(); m_pFollowLb->SetSelectHdl( LINK( this, SfxManageStyleSheetPage, EditStyleSelectHdl_Impl ) ); + m_pBaseLb->SetSelectHdl( LINK( this, SfxManageStyleSheetPage, EditLinkStyleSelectHdl_Impl ) ); m_pEditStyleBtn->SetClickHdl( LINK( this, SfxManageStyleSheetPage, EditStyleHdl_Impl ) ); m_pEditLinkStyleBtn->SetClickHdl( LINK( this, SfxManageStyleSheetPage, EditLinkStyleHdl_Impl ) ); } @@ -346,6 +353,16 @@ IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleHdl_Impl ) } +IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleSelectHdl_Impl ) +{ + sal_Int32 linkSelectPos = m_pBaseLb->GetSelectEntryPos(); + if ( linkSelectPos == 0 ) + m_pEditLinkStyleBtn->Disable(); + else + m_pEditLinkStyleBtn->Enable(); + return 0; +} + IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleHdl_Impl ) { OUString aTemplName(m_pBaseLb->GetSelectEntry());
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
