Kaydet (Commit) ad1e2d08 authored tarafından Caolán McNamara's avatar Caolán McNamara

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
üst 9394499a
......@@ -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 \
......
......@@ -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"
......
......@@ -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;
......
......@@ -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 ),
......
......@@ -21,78 +21,6 @@
#include "numpages.hrc"
#include <svx/dialogs.hrc>
/**************************************************************************/
/* */
/* 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 */
......
<?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>
......
......@@ -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 ;};
......
......@@ -109,145 +109,7 @@
</packing>
</child>
<child>
<object class="GtkFrame" id="frame6">
<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="alignment6">
<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="grid8">
<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="image9">
<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="image10">
<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="image11">
<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="image12">
<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="image13">
<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="image14">
<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="image15">
<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="image16">
<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="label23">
<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>
<packing>
<property name="position">1</property>
</packing>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="label22">
......
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