Kaydet (Commit) fecdbcab authored tarafından Heena Gupta's avatar Heena Gupta Kaydeden (comit) Caolán McNamara

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/14516Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 0242f4a4
......@@ -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);
......
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment