summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeena Gupta <heena.h.gupta@ericsson.com>2015-01-07 12:25:26 +0530
committerCaolán McNamara <caolanm@redhat.com>2015-04-09 09:29:49 +0000
commit0242f4a41e40ab5a458b51657319b95ef19b05e1 (patch)
treed90286253fee940ce7cb56e4c1623f716edcbead
parente38f63d861715fb56f41af82b897c2128ea20b38 (diff)
Related: tdf#87675 "Edit" Button for linked style in edit paragraph style
Change-Id: Ibb80d88865048e178a8d3e93cb9737881dd9f102 Reviewed-on: https://gerrit.libreoffice.org/13785 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--include/sfx2/mgetempl.hxx2
-rw-r--r--sfx2/source/dialog/mgetempl.cxx10
-rw-r--r--sfx2/uiconfig/ui/managestylepage.ui11
3 files changed, 23 insertions, 0 deletions
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index fc6aefc8bdf6..818243b0999f 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -47,6 +47,7 @@ class SfxManageStyleSheetPage : public SfxTabPage
FixedText* m_pBaseFt;
ListBox* m_pBaseLb;
+ PushButton* m_pEditLinkStyleBtn;
FixedText* m_pFilterFt;
ListBox* m_pFilterLb;
@@ -72,6 +73,7 @@ friend class SfxStyleDialog;
DECL_LINK( LoseFocusHdl, Edit * );
DECL_LINK( EditStyleSelectHdl_Impl, void * );
DECL_LINK( EditStyleHdl_Impl, void * );
+ DECL_LINK( EditLinkStyleHdl_Impl, void * );
void UpdateName_Impl(ListBox *, const OUString &rNew);
void SetDescriptionText_Impl();
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 06e531afd637..fdd626da9f1f 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -69,6 +69,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx
get(m_pEditStyleBtn, "editstyle");
get(m_pBaseFt, "linkedwithft");
get(m_pBaseLb, "linkedwith");
+ get(m_pEditLinkStyleBtn, "editlinkstyle");
m_pBaseLb->SetStyle(m_pBaseLb->GetStyle() | WB_SORT);
m_pBaseLb->setMaxWidthChars(nMaxWidth);
get(m_pFilterFt, "categoryft");
@@ -235,6 +236,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx
m_pAutoCB->Show();
m_pFollowLb->SetSelectHdl( LINK( this, SfxManageStyleSheetPage, EditStyleSelectHdl_Impl ) );
m_pEditStyleBtn->SetClickHdl( LINK( this, SfxManageStyleSheetPage, EditStyleHdl_Impl ) );
+ m_pEditLinkStyleBtn->SetClickHdl( LINK( this, SfxManageStyleSheetPage, EditLinkStyleHdl_Impl ) );
}
@@ -344,6 +346,14 @@ IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleHdl_Impl )
}
+IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleHdl_Impl )
+{
+ OUString aTemplName(m_pBaseLb->GetSelectEntry());
+ if (aTemplName != SfxResId(STR_NONE))
+ Execute_Impl( SID_STYLE_EDIT, aTemplName, OUString(),(sal_uInt16)pStyle->GetFamily(), 0 );
+ return 0;
+}
+
// Internal: Perform functions through the Dispatcher
bool SfxManageStyleSheetPage::Execute_Impl(
sal_uInt16 nId, const OUString &rStr, const OUString& rRefStr, sal_uInt16 nFamily,
diff --git a/sfx2/uiconfig/ui/managestylepage.ui b/sfx2/uiconfig/ui/managestylepage.ui
index 0569c5fd0090..ec7b0262a194 100644
--- a/sfx2/uiconfig/ui/managestylepage.ui
+++ b/sfx2/uiconfig/ui/managestylepage.ui
@@ -122,6 +122,17 @@
</packing>
</child>
<child>
+ <object class="GtkButton" id="editlinkstyle">
+ <property name="label" translatable="yes">Edit Style</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkComboBoxText" id="category">
<property name="visible">True</property>
<property name="can_focus">False</property>