diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-01-01 21:03:05 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-01-07 16:17:51 +0000 |
commit | ad1e2d087b3b313174bdbbc929ace3788074a2f4 (patch) | |
tree | b31be152ab3d5060702f2fb8b653ca129d7706e9 /cui | |
parent | split out pick bullet page to cui and adapt code (diff) | |
download | core-ad1e2d087b3b313174bdbbc929ace3788074a2f4.tar.gz core-ad1e2d087b3b313174bdbbc929ace3788074a2f4.zip |
split out pick single and outline numbering page to cui and adapt code
we can share the pickbulletpage .ui with these ones
Change-Id: Ieaf2c8f2257bfdb36423dc363729b58b465cb250
Diffstat (limited to 'cui')
-rw-r--r-- | cui/UI_cui.mk | 2 | ||||
-rw-r--r-- | cui/source/inc/helpid.hrc | 5 | ||||
-rw-r--r-- | cui/source/inc/numpages.hxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 91 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.src | 72 | ||||
-rw-r--r-- | cui/uiconfig/ui/picknumberingpage.ui (renamed from cui/uiconfig/ui/pickbulletpage.ui) | 2 | ||||
-rw-r--r-- | cui/util/hidother.src | 3 |
7 files changed, 45 insertions, 136 deletions
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk index 9caf54a7c1a3..e12646039772 100644 --- a/cui/UI_cui.mk +++ b/cui/UI_cui.mk @@ -20,7 +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/picknumberingpage \ cui/uiconfig/ui/positionpage \ cui/uiconfig/ui/scriptorganizer \ cui/uiconfig/ui/select_persona_dialog \ diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index f12b152ba758..22993bcb2b6f 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -293,14 +293,9 @@ #define HID_REDLINING_PREV "CUI_HID_REDLINING_PREV" #define HID_REDLINING_NEXT "CUI_HID_REDLINING_NEXT" #define HID_FORMAT_PARAGRAPH_STD "CUI_HID_FORMAT_PARAGRAPH_STD" -#define HID_VALUESET_SINGLENUM "CUI_HID_VALUESET_SINGLENUM" -#define HID_VALUESET_BULLET "CUI_HID_VALUESET_BULLET" #define HID_VALUESET_NUM "CUI_HID_VALUESET_NUM" #define HID_VALUESET_NUMBMP "CUI_HID_VALUESET_NUMBMP" -#define HID_SVXPAGE_PICK_NUM "CUI_HID_SVXPAGE_PICK_NUM" -#define HID_SVXPAGE_PICK_SINGLE_NUM "CUI_HID_SVXPAGE_PICK_SINGLE_NUM" #define HID_SVXPAGE_PICK_BMP "CUI_HID_SVXPAGE_PICK_BMP" -#define HID_SVXPAGE_PICK_BULLET "CUI_HID_SVXPAGE_PICK_BULLET" #define HID_SVXPAGE_NUM_OPTIONS "CUI_HID_SVXPAGE_NUM_OPTIONS" #define HID_SVXPAGE_NUM_POSITION "CUI_HID_SVXPAGE_NUM_POSITION" #define HID_MEASURE_CTL_PREVIEW "CUI_HID_MEASURE_CTL_PREVIEW" diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index b5f134c33a51..6a909c84861e 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -65,8 +65,7 @@ class SvxSingleNumPickTabPage : public SfxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; - FixedLine aValuesFL; - SvxNumValueSet* pExamplesVS; + SvxNumValueSet* m_pExamplesVS; SvxNumSettingsArr_Impl aNumSettingsArr; SvxNumRule* pActNum; SvxNumRule* pSaveNum; @@ -142,8 +141,7 @@ class SvxNumPickTabPage : public SfxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; - FixedLine aValuesFL; - SvxNumValueSet* pExamplesVS; + SvxNumValueSet* m_pExamplesVS; String sNumCharFmtName; String sBulletCharFmtName; diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 833358deccb5..527e9513fd19 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -184,22 +184,20 @@ static Font& lcl_GetDefaultBulletFont() } SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent, - const SfxItemSet& rSet) : - SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_PICK_SINGLE_NUM ), rSet ), - aValuesFL( this, CUI_RES(FL_VALUES) ), - pExamplesVS( new SvxNumValueSet(this, CUI_RES(VS_VALUES), NUM_PAGETYPE_SINGLENUM )), - pActNum(0), - pSaveNum(0), - nActNumLvl( USHRT_MAX ), - bModified(sal_False), - bPreset(sal_False), - nNumItemId(SID_ATTR_NUMBERING_RULE) + const SfxItemSet& rSet) + : SfxTabPage(pParent, "PickNumberingPage", "cui/ui/picknumberingpage.ui", rSet) + , pActNum(0) + , pSaveNum(0) + , nActNumLvl(USHRT_MAX) + , bModified(false) + , bPreset(false) + , nNumItemId(SID_ATTR_NUMBERING_RULE) { - FreeResource(); SetExchangeSupport(); - pExamplesVS->SetSelectHdl(LINK(this, SvxSingleNumPickTabPage, NumSelectHdl_Impl)); - pExamplesVS->SetDoubleClickHdl(LINK(this, SvxSingleNumPickTabPage, DoubleClickHdl_Impl)); - pExamplesVS->SetHelpId(HID_VALUESET_SINGLENUM ); + get(m_pExamplesVS, "valueset"); + m_pExamplesVS->init(NUM_PAGETYPE_SINGLENUM); + m_pExamplesVS->SetSelectHdl(LINK(this, SvxSingleNumPickTabPage, NumSelectHdl_Impl)); + m_pExamplesVS->SetDoubleClickHdl(LINK(this, SvxSingleNumPickTabPage, DoubleClickHdl_Impl)); Reference<XDefaultNumberingProvider> xDefNum = lcl_GetNumberingProvider(); if(xDefNum.is()) @@ -221,18 +219,17 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent, aNumSettingsArr.push_back(pNew); } } - catch(Exception&) + catch(const Exception&) { } Reference<XNumberingFormatter> xFormat(xDefNum, UNO_QUERY); - pExamplesVS->SetNumberingSettings(aNumberings, xFormat, rLocale); + m_pExamplesVS->SetNumberingSettings(aNumberings, xFormat, rLocale); } } - SvxSingleNumPickTabPage::~SvxSingleNumPickTabPage() +SvxSingleNumPickTabPage::~SvxSingleNumPickTabPage() { delete pActNum; - delete pExamplesVS; delete pSaveNum; } @@ -275,13 +272,13 @@ void SvxSingleNumPickTabPage::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; @@ -329,7 +326,7 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, NumSelectHdl_Impl) { bPreset = sal_False; bModified = sal_True; - sal_uInt16 nIdx = pExamplesVS->GetSelectItemId() - 1; + sal_uInt16 nIdx = m_pExamplesVS->GetSelectItemId() - 1; DBG_ASSERT(aNumSettingsArr.size() > nIdx, "wrong index"); if(aNumSettingsArr.size() <= nIdx) return 0; @@ -367,7 +364,7 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, NumSelectHdl_Impl) IMPL_LINK_NOARG(SvxSingleNumPickTabPage, DoubleClickHdl_Impl) { - NumSelectHdl_Impl(pExamplesVS); + NumSelectHdl_Impl(m_pExamplesVS); OKButton& rOk = GetTabDialog()->GetOKButton(); rOk.GetClickHdl().Call(&rOk); return 0; @@ -376,7 +373,7 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, DoubleClickHdl_Impl) SvxBulletPickTabPage::SvxBulletPickTabPage(Window* pParent, const SfxItemSet& rSet) - : SfxTabPage(pParent, "PickBulletPage", "cui/ui/pickbulletpage.ui", rSet) + : SfxTabPage(pParent, "PickNumberingPage", "cui/ui/picknumberingpage.ui", rSet) , pActNum(0) , pSaveNum(0) , nActNumLvl(USHRT_MAX) @@ -538,25 +535,21 @@ void SvxBulletPickTabPage::PageCreated(SfxAllItemSet aSet) SvxNumPickTabPage::SvxNumPickTabPage(Window* pParent, - const SfxItemSet& rSet) : - SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_PICK_NUM ), rSet ), - aValuesFL( this, CUI_RES(FL_VALUES) ), - pExamplesVS( new SvxNumValueSet(this, CUI_RES(VS_VALUES), NUM_PAGETYPE_NUM )), - pActNum(0), - pSaveNum(0), - nActNumLvl( USHRT_MAX ), - nNumItemId(SID_ATTR_NUMBERING_RULE), - bModified(sal_False), - bPreset(sal_False) + const SfxItemSet& rSet) + : SfxTabPage(pParent, "PickNumberingPage", "cui/ui/picknumberingpage.ui", rSet) + , pActNum(0) + , pSaveNum(0) + , nActNumLvl(USHRT_MAX) + , nNumItemId(SID_ATTR_NUMBERING_RULE) + , bModified(false) + , bPreset(false) { - - FreeResource(); - SetExchangeSupport(); - pExamplesVS->SetSelectHdl(LINK(this, SvxNumPickTabPage, NumSelectHdl_Impl)); - pExamplesVS->SetDoubleClickHdl(LINK(this, SvxNumPickTabPage, DoubleClickHdl_Impl)); - pExamplesVS->SetHelpId(HID_VALUESET_NUM ); + get(m_pExamplesVS, "valueset"); + m_pExamplesVS->init(NUM_PAGETYPE_NUM); + m_pExamplesVS->SetSelectHdl(LINK(this, SvxNumPickTabPage, NumSelectHdl_Impl)); + m_pExamplesVS->SetDoubleClickHdl(LINK(this, SvxNumPickTabPage, DoubleClickHdl_Impl)); Reference<XDefaultNumberingProvider> xDefNum = lcl_GetNumberingProvider(); if(xDefNum.is()) @@ -584,18 +577,17 @@ SvxNumPickTabPage::SvxNumPickTabPage(Window* pParent, } } } - catch(Exception&) + catch(const Exception&) { } Reference<XNumberingFormatter> xFormat(xDefNum, UNO_QUERY); - pExamplesVS->SetOutlineNumberingSettings(aOutlineAccess, xFormat, rLocale); + m_pExamplesVS->SetOutlineNumberingSettings(aOutlineAccess, xFormat, rLocale); } } - SvxNumPickTabPage::~SvxNumPickTabPage() +SvxNumPickTabPage::~SvxNumPickTabPage() { delete pActNum; - delete pExamplesVS; delete pSaveNum; } @@ -637,13 +629,13 @@ void SvxNumPickTabPage::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; @@ -695,7 +687,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl) const FontList* pList = 0; - SvxNumSettingsArr_Impl& rItemArr = aNumSettingsArrays[pExamplesVS->GetSelectItemId() - 1]; + SvxNumSettingsArr_Impl& rItemArr = aNumSettingsArrays[m_pExamplesVS->GetSelectItemId() - 1]; Font& rActBulletFont = lcl_GetDefaultBulletFont(); SvxNumSettings_Impl* pLevelSettings = 0; @@ -774,7 +766,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl) IMPL_LINK_NOARG(SvxNumPickTabPage, DoubleClickHdl_Impl) { - NumSelectHdl_Impl(pExamplesVS); + NumSelectHdl_Impl(m_pExamplesVS); OKButton& rOk = GetTabDialog()->GetOKButton(); rOk.GetClickHdl().Call(&rOk); return 0; @@ -790,7 +782,6 @@ void SvxNumPickTabPage::PageCreated(SfxAllItemSet aSet) SetCharFmtNames( pNumCharFmt->GetValue(),pBulletCharFmt->GetValue()); } - SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent, const SfxItemSet& rSet) : SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_PICK_BMP ), rSet ), diff --git a/cui/source/tabpages/numpages.src b/cui/source/tabpages/numpages.src index 48decdcf3b32..335dd794389b 100644 --- a/cui/source/tabpages/numpages.src +++ b/cui/source/tabpages/numpages.src @@ -26,78 +26,6 @@ /* TabPage */ /* */ /**************************************************************************/ -TabPage RID_SVXPAGE_PICK_BULLET -{ - HelpID = HID_SVXPAGE_PICK_BULLET ; - SVLook = TRUE ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - Hide = TRUE; - FixedLine FL_VALUES - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Selection" ; - }; - Control VS_VALUES - { - Pos = MAP_APPFONT ( 9 , 14 ) ; - Size = MAP_APPFONT ( 242 , 167 ) ; - TabStop = TRUE ; - }; -}; -/**************************************************************************/ -/* */ -/* TabPage */ -/* */ -/**************************************************************************/ -TabPage RID_SVXPAGE_PICK_SINGLE_NUM -{ - HelpID = HID_SVXPAGE_PICK_SINGLE_NUM ; - SVLook = TRUE ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - Hide = TRUE; - FixedLine FL_VALUES - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Selection" ; - }; - Control VS_VALUES - { - Pos = MAP_APPFONT ( 9 , 14 ) ; - Size = MAP_APPFONT ( 242 , 167 ) ; - TabStop = TRUE ; - }; -}; -/**************************************************************************/ -/* */ -/* TabPage */ -/* */ -/**************************************************************************/ -TabPage RID_SVXPAGE_PICK_NUM -{ - HelpID = HID_SVXPAGE_PICK_NUM; - SVLook = TRUE ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - Hide = TRUE; - FixedLine FL_VALUES - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Selection" ; - }; - Control VS_VALUES - { - Pos = MAP_APPFONT ( 9 , 14 ) ; - Size = MAP_APPFONT ( 242 , 167 ) ; - TabStop = TRUE ; - }; -}; -/**************************************************************************/ -/* */ -/* TabPage */ -/* */ -/**************************************************************************/ TabPage RID_SVXPAGE_PICK_BMP { HelpID = HID_SVXPAGE_PICK_BMP; diff --git a/cui/uiconfig/ui/pickbulletpage.ui b/cui/uiconfig/ui/picknumberingpage.ui index 8f7bdce1144f..081da688acc3 100644 --- a/cui/uiconfig/ui/pickbulletpage.ui +++ b/cui/uiconfig/ui/picknumberingpage.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> <!-- interface-requires gtk+ 3.0 --> - <object class="GtkFrame" id="PickBulletPage"> + <object class="GtkFrame" id="PickNumberingPage"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> diff --git a/cui/util/hidother.src b/cui/util/hidother.src index 11037a65a0ee..53f1303fb73b 100644 --- a/cui/util/hidother.src +++ b/cui/util/hidother.src @@ -172,10 +172,7 @@ hidspecial HID_TPCOLOR_CMYK_3 { HelpID = HID_TPCOLOR_CMYK_3; }; hidspecial HID_TPCOLOR_RGB_1 { HelpID = HID_TPCOLOR_RGB_1; }; hidspecial HID_TPCOLOR_RGB_2 { HelpID = HID_TPCOLOR_RGB_2; }; hidspecial HID_TPCOLOR_RGB_3 { HelpID = HID_TPCOLOR_RGB_3; }; -hidspecial HID_VALUESET_BULLET { HelpID = HID_VALUESET_BULLET ;}; -hidspecial HID_VALUESET_NUM { HelpID = HID_VALUESET_NUM ;}; hidspecial HID_VALUESET_NUMBMP { HelpID = HID_VALUESET_NUMBMP ;}; -hidspecial HID_VALUESET_SINGLENUM { HelpID = HID_VALUESET_SINGLENUM ;}; hidspecial HID_WARN_NAME_DUPLICATE { HelpID = HID_WARN_NAME_DUPLICATE ;}; hidspecial UID_OFA_CONNPOOL_DRIVERLIST_BACK { HelpId = UID_OFA_CONNPOOL_DRIVERLIST_BACK; }; hidspecial UID_SEARCH_RECORDSTATUS { HelpID = UID_SEARCH_RECORDSTATUS ;}; |