summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-01-01 20:30:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-01-07 16:17:51 +0000
commit9394499a9b814e387fd7c9f937adb497a9e94560 (patch)
tree4405cba84e962507d2a30a2633f888c83f858ac0
parent6eb461ed4861a735663c5ca7f7e6423b3a076a5b (diff)
split out pick bullet page to cui and adapt code
Change-Id: I6fa93885f1ce51fb0e3d69265784340614146636
-rw-r--r--cui/UI_cui.mk1
-rw-r--r--cui/source/inc/numpages.hxx3
-rw-r--r--cui/source/tabpages/numpages.cxx40
-rw-r--r--cui/uiconfig/ui/pickbulletpage.ui40
-rw-r--r--svx/inc/svx/numvset.hxx8
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx10
-rw-r--r--sw/uiconfig/swriter/ui/bulletsandnumbering.ui179
7 files changed, 87 insertions, 194 deletions
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index 764f1cef1b19..9caf54a7c1a3 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/macroselectordialog \
cui/uiconfig/ui/numberformatpage \
cui/uiconfig/ui/personalization_tab \
+ cui/uiconfig/ui/pickbulletpage \
cui/uiconfig/ui/positionpage \
cui/uiconfig/ui/scriptorganizer \
cui/uiconfig/ui/select_persona_dialog \
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 79dbb382ae78..b5f134c33a51 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -105,8 +105,7 @@ class SvxBulletPickTabPage : public SfxTabPage
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
- FixedLine aValuesFL;
- SvxNumValueSet* pExamplesVS;
+ SvxNumValueSet* m_pExamplesVS;
SvxNumRule* pActNum;
SvxNumRule* pSaveNum;
sal_uInt16 nActNumLvl;
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index cff24374844e..833358deccb5 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -375,29 +375,25 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, DoubleClickHdl_Impl)
SvxBulletPickTabPage::SvxBulletPickTabPage(Window* pParent,
- const SfxItemSet& rSet) :
- SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_PICK_BULLET ), rSet ),
- aValuesFL( this, CUI_RES(FL_VALUES) ),
- pExamplesVS( new SvxNumValueSet(this, CUI_RES(VS_VALUES), NUM_PAGETYPE_BULLET )),
- pActNum(0),
- pSaveNum(0),
- nActNumLvl( USHRT_MAX ),
- bModified(sal_False),
- bPreset(sal_False),
- nNumItemId(SID_ATTR_NUMBERING_RULE)
+ const SfxItemSet& rSet)
+ : SfxTabPage(pParent, "PickBulletPage", "cui/ui/pickbulletpage.ui", rSet)
+ , pActNum(0)
+ , pSaveNum(0)
+ , nActNumLvl(USHRT_MAX)
+ , bModified(false)
+ , bPreset(false)
+ , nNumItemId(SID_ATTR_NUMBERING_RULE)
{
- FreeResource();
SetExchangeSupport();
- pExamplesVS->SetSelectHdl(LINK(this, SvxBulletPickTabPage, NumSelectHdl_Impl));
- pExamplesVS->SetDoubleClickHdl(LINK(this, SvxBulletPickTabPage, DoubleClickHdl_Impl));
- pExamplesVS->SetHelpId(HID_VALUESET_BULLET );
-
+ get(m_pExamplesVS, "valueset");
+ m_pExamplesVS->init(NUM_PAGETYPE_BULLET),
+ m_pExamplesVS->SetSelectHdl(LINK(this, SvxBulletPickTabPage, NumSelectHdl_Impl));
+ m_pExamplesVS->SetDoubleClickHdl(LINK(this, SvxBulletPickTabPage, DoubleClickHdl_Impl));
}
- SvxBulletPickTabPage::~SvxBulletPickTabPage()
+SvxBulletPickTabPage::~SvxBulletPickTabPage()
{
delete pActNum;
- delete pExamplesVS;
delete pSaveNum;
}
@@ -439,13 +435,13 @@ void SvxBulletPickTabPage::ActivatePage(const SfxItemSet& rSet)
if(*pSaveNum != *pActNum)
{
*pActNum = *pSaveNum;
- pExamplesVS->SetNoSelection();
+ m_pExamplesVS->SetNoSelection();
}
if(pActNum && (!lcl_IsNumFmtSet(pActNum, nActNumLvl) || bIsPreset))
{
- pExamplesVS->SelectItem(1);
- NumSelectHdl_Impl(pExamplesVS);
+ m_pExamplesVS->SelectItem(1);
+ NumSelectHdl_Impl(m_pExamplesVS);
bPreset = sal_True;
}
bPreset |= bIsPreset;
@@ -492,7 +488,7 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl)
{
bPreset = sal_False;
bModified = sal_True;
- sal_Unicode cChar = aBulletTypes[pExamplesVS->GetSelectItemId() - 1];
+ sal_Unicode cChar = aBulletTypes[m_pExamplesVS->GetSelectItemId() - 1];
Font& rActBulletFont = lcl_GetDefaultBulletFont();
sal_uInt16 nMask = 1;
@@ -522,7 +518,7 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl)
IMPL_LINK_NOARG(SvxBulletPickTabPage, DoubleClickHdl_Impl)
{
- NumSelectHdl_Impl(pExamplesVS);
+ NumSelectHdl_Impl(m_pExamplesVS);
OKButton& rOk = GetTabDialog()->GetOKButton();
rOk.GetClickHdl().Call(&rOk);
return 0;
diff --git a/cui/uiconfig/ui/pickbulletpage.ui b/cui/uiconfig/ui/pickbulletpage.ui
new file mode 100644
index 000000000000..8f7bdce1144f
--- /dev/null
+++ b/cui/uiconfig/ui/pickbulletpage.ui
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkFrame" id="PickBulletPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="cuilo:SvxNumValueSet" id="valueset">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Selection</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/svx/inc/svx/numvset.hxx b/svx/inc/svx/numvset.hxx
index ce392797ff0e..a0608b05f568 100644
--- a/svx/inc/svx/numvset.hxx
+++ b/svx/inc/svx/numvset.hxx
@@ -65,11 +65,11 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
com::sun::star::uno::Reference<
com::sun::star::container::XIndexAccess> > aOutlineSettings;
- void init(sal_uInt16 nType);
-
public:
- SvxNumValueSet( Window* pParent, const ResId& rResId, sal_uInt16 nType );
- ~SvxNumValueSet();
+ SvxNumValueSet( Window* pParent, const ResId& rResId, sal_uInt16 nType );
+ SvxNumValueSet(Window* pParent, WinBits nWinBits = WB_TABSTOP);
+ void init(sal_uInt16 nType);
+ ~SvxNumValueSet();
virtual void UserDraw( const UserDrawEvent& rUDEvt );
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index d521773d55e6..9fbdbd1b740a 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -399,6 +399,16 @@ SvxNumValueSet::SvxNumValueSet( Window* pParent, const ResId& rResId, sal_uInt16
init(nType);
}
+SvxNumValueSet::SvxNumValueSet(Window* pParent, WinBits nWinBits)
+ : ValueSet(pParent, nWinBits)
+{
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxNumValueSet(Window *pParent, VclBuilder::stringmap &)
+{
+ return new SvxNumValueSet(pParent, WB_TABSTOP);
+}
+
void SvxNumValueSet::init(sal_uInt16 nType)
{
aLineColor = COL_LIGHTGRAY;
diff --git a/sw/uiconfig/swriter/ui/bulletsandnumbering.ui b/sw/uiconfig/swriter/ui/bulletsandnumbering.ui
index 35324491c324..7a5e35219dfb 100644
--- a/sw/uiconfig/swriter/ui/bulletsandnumbering.ui
+++ b/sw/uiconfig/swriter/ui/bulletsandnumbering.ui
@@ -18,11 +18,9 @@
<child>
<object class="GtkButton" id="button2">
<property name="label">gtk-ok</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -34,11 +32,9 @@
<child>
<object class="GtkButton" id="button3">
<property name="label" translatable="yes">Remove</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="expand">False</property>
@@ -49,11 +45,9 @@
<child>
<object class="GtkButton" id="button4">
<property name="label">gtk-cancel</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -65,11 +59,9 @@
<child>
<object class="GtkButton" id="button5">
<property name="label">gtk-help</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -81,11 +73,9 @@
<child>
<object class="GtkButton" id="button6">
<property name="label" translatable="yes">Reset</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="expand">False</property>
@@ -106,142 +96,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
- <object class="GtkFrame" id="frame7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">10</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkGrid" id="grid9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">2</property>
- <child>
- <object class="GtkImage" id="image17">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkImage" id="image18">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkImage" id="image19">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkImage" id="image20">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkImage" id="image21">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkImage" id="image22">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkImage" id="image23">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkImage" id="image24">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label25">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Selection</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
+ <placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="label24">
@@ -579,11 +434,9 @@
<child>
<object class="GtkCheckButton" id="checkbutton3">
<property name="label" translatable="yes">Link graphics</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
@@ -688,9 +541,6 @@
</packing>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<object class="GtkGrid" id="grid5">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -837,11 +687,9 @@
<child>
<object class="GtkButton" id="button1">
<property name="label" translatable="yes">Default</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -870,6 +718,9 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -918,12 +769,6 @@
<property name="row_spacing">10</property>
<property name="column_spacing">4</property>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -1032,9 +877,6 @@
</packing>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<object class="GtkComboBoxText" id="comboboxtext1">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -1078,11 +920,9 @@
<child>
<object class="GtkCheckButton" id="checkbutton1">
<property name="label" translatable="yes">Keep ratio</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
@@ -1120,6 +960,9 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -1142,11 +985,9 @@
<child>
<object class="GtkCheckButton" id="checkbutton2">
<property name="label" translatable="yes">Consecutive numbering</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="yalign">0.44999998807907104</property>
<property name="draw_indicator">True</property>
@@ -1189,6 +1030,12 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>