summaryrefslogtreecommitdiff
path: root/cui
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 /cui
parent6eb461ed4861a735663c5ca7f7e6423b3a076a5b (diff)
split out pick bullet page to cui and adapt code
Change-Id: I6fa93885f1ce51fb0e3d69265784340614146636
Diffstat (limited to 'cui')
-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
4 files changed, 60 insertions, 24 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>