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

split out numbering position page to cui and adapt code

and move SvxNumberingPreview from svx to cui where its
::Paint impl already lives

Change-Id: I2b7bebeb9914d74d0f391d3b178b0ad3d778c479
üst 2088176d
......@@ -18,7 +18,8 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/insertplugin \
cui/uiconfig/ui/insertrowcolumn \
cui/uiconfig/ui/macroselectordialog \
cui/uiconfig/ui/numberformatpage \
cui/uiconfig/ui/numberingformatpage \
cui/uiconfig/ui/numberingpositionpage \
cui/uiconfig/ui/personalization_tab \
cui/uiconfig/ui/pickbulletpage \
cui/uiconfig/ui/pickgraphicpage \
......
......@@ -296,7 +296,6 @@
#define HID_VALUESET_NUM "CUI_HID_VALUESET_NUM"
#define HID_VALUESET_NUMBMP "CUI_HID_VALUESET_NUMBMP"
#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"
#define HID_FORMAT_PARAGRAPH_EXT "CUI_HID_FORMAT_PARAGRAPH_EXT"
#define HID_FORMAT_PARAGRAPH_ALIGN "CUI_HID_FORMAT_PARAGRAPH_ALIGN"
......
......@@ -36,9 +36,35 @@
class SvxNumRule;
class SvxBmpNumValueSet;
class SvxNumValueSet;
class SvxNumberingPreview;
class SvxBrushItem;
class SvxNumberingPreview : public Window
{
const SvxNumRule* pActNum;
Font aStdFont;
long nPageWidth;
const String* pOutlineNames;
sal_Bool bPosition;
sal_uInt16 nActLevel;
protected:
virtual void Paint( const Rectangle& rRect );
public:
SvxNumberingPreview(Window* pParent, const ResId& rResId );
SvxNumberingPreview(Window* pParent, WinBits nWinBits = WB_BORDER);
void SetNumRule(const SvxNumRule* pNum)
{pActNum = pNum; Invalidate();};
void SetPageWidth(long nPgWidth)
{nPageWidth = nPgWidth;}
void SetOutlineNames(const String* pNames)
{pOutlineNames = pNames;}
void SetPositionMode()
{ bPosition = sal_True;}
void SetLevel(sal_uInt16 nSet) {nActLevel = nSet;}
};
//------------------------------------------------
......@@ -362,41 +388,36 @@ class SvxNumPositionTabPage : public SfxTabPage
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
FixedLine aPositionFL;
FixedText aLevelFT;
MultiListBox aLevelLB;
ListBox* m_pLevelLB;
// former set of controls shown for numbering rules containing list level
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
FixedText aDistBorderFT;
MetricField aDistBorderMF;
CheckBox aRelativeCB;
FixedText aIndentFT;
MetricField aIndentMF;
FixedText aDistNumFT;
MetricField aDistNumMF;
FixedText aAlignFT;
ListBox aAlignLB;
FixedText* m_pDistBorderFT;
MetricField* m_pDistBorderMF;
CheckBox* m_pRelativeCB;
FixedText* m_pIndentFT;
MetricField* m_pIndentMF;
FixedText* m_pDistNumFT;
MetricField* m_pDistNumMF;
FixedText* m_pAlignFT;
ListBox* m_pAlignLB;
// new set of controls shown for numbering rules containing list level
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
FixedText aLabelFollowedByFT;
ListBox aLabelFollowedByLB;
FixedText aListtabFT;
MetricField aListtabMF;
FixedText aAlign2FT;
ListBox aAlign2LB;
FixedText aAlignedAtFT;
MetricField aAlignedAtMF;
FixedText aIndentAtFT;
MetricField aIndentAtMF;
PushButton aStandardPB;
#if OSL_DEBUG_LEVEL > 1
FixedText* pDebugFixedText;
#endif
SvxNumberingPreview* pPreviewWIN;
FixedText* m_pLabelFollowedByFT;
ListBox* m_pLabelFollowedByLB;
FixedText* m_pListtabFT;
MetricField* m_pListtabMF;
FixedText* m_pAlign2FT;
ListBox* m_pAlign2LB;
FixedText* m_pAlignedAtFT;
MetricField* m_pAlignedAtMF;
FixedText* m_pIndentAtFT;
MetricField* m_pIndentAtMF;
PushButton* m_pStandardPB;
SvxNumberingPreview* m_pPreviewWIN;
SvxNumRule* pActNum;
SvxNumRule* pSaveNum;
......
......@@ -222,8 +222,8 @@ void SvxNumberPreview::DataChanged( const DataChangedEvent& rDCEvt )
SvxNumberFormatTabPage::SvxNumberFormatTabPage(Window* pParent,
const SfxItemSet& rCoreAttrs)
: SfxTabPage(pParent, "NumberFormatPage",
"cui/ui/numberformatpage.ui", rCoreAttrs)
: SfxTabPage(pParent, "NumberingFormatPage",
"cui/ui/numberingformatpage.ui", rCoreAttrs)
, pNumItem(NULL)
, pNumFmtShell(NULL)
, nInitFormat(ULONG_MAX)
......
......@@ -37,10 +37,6 @@
#define LB_FMT 158
#define FT_SUFFIX 159
#define ED_SUFFIX 160
#define FT_BORDERDIST 161
#define MF_BORDERDIST 162
#define FT_NUMDIST 163
#define MF_NUMDIST 164
#define FT_INDENT 165
#define MF_INDENT 166
#define FT_CHARFMT 167
......@@ -60,9 +56,7 @@
#define FT_ORIENT 182
#define LB_ORIENT 183
#define MB_BITMAP 184
#define CB_RELATIVE 185
#define FT_ALL_LEVEL 186
#define PB_STANDARD 187
#define CB_SAME_LEVEL 188
#define FL_SAME_LEVEL 189
#define FT_BUL_COLOR 190
......
......@@ -415,265 +415,6 @@ TabPage RID_SVXPAGE_NUM_OPTIONS
};
};
/**************************************************************************/
/* */
/* TabPage Positionen */
/* */
/**************************************************************************/
TabPage RID_SVXPAGE_NUM_POSITION
{
HelpID = HID_SVXPAGE_NUM_POSITION ;
SVLook = TRUE ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
Hide = TRUE;
FixedText FT_LEVEL
{
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 50, 8 ) ;
Text [ en-US ] = "Level" ;
};
MultiListBox LB_LEVEL
{
HelpID = "cui:MultiListBox:RID_SVXPAGE_NUM_POSITION:LB_LEVEL";
Pos = MAP_APPFONT ( 12 , 25 ) ;
Size = MAP_APPFONT ( 26 , 154 ) ;
TabStop = TRUE ;
DropDown = FALSE ;
Border = TRUE ;
SimpleMode = TRUE ;
};
FixedLine FL_POSITION
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Group = TRUE ;
Text [ en-US ] = "Position and spacing" ;
};
FixedText FT_BORDERDIST
{
Pos = MAP_APPFONT ( 50 , 27 ) ;
Size = MAP_APPFONT ( 105 , 10 ) ;
Text [ en-US ] = "Indent" ;
};
MetricField MF_BORDERDIST
{
HelpID = "cui:MetricField:RID_SVXPAGE_NUM_POSITION:MF_BORDERDIST";
Pos = MAP_APPFONT ( 198 , 25 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = -1999 ;
Maximum = 1999 ;
DecimalDigits = 2 ;
Value = 0 ;
Unit = FUNIT_CM ;
First = 0 ;
Last = 1999 ;
SpinSize = 5 ;
};
CheckBox CB_RELATIVE
{
HelpID = "cui:CheckBox:RID_SVXPAGE_NUM_POSITION:CB_RELATIVE";
Pos = MAP_APPFONT ( 198 , 41 ) ;
Size = MAP_APPFONT ( 52 , 10 ) ;
Text [ en-US ] = "Relati~ve" ;
};
FixedText FT_INDENT
{
Pos = MAP_APPFONT ( 50 , 59 ) ;
Size = MAP_APPFONT ( 105 , 8 ) ;
Text [ en-US ] = "Width of numbering" ;
};
MetricField MF_INDENT
{
HelpID = "cui:MetricField:RID_SVXPAGE_NUM_POSITION:MF_INDENT";
Pos = MAP_APPFONT ( 198 , 57 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
Maximum = 1999 ;
DecimalDigits = 2 ;
Value = 0 ;
Unit = FUNIT_CM ;
First = 0 ;
Last = 1999 ;
SpinSize = 5 ;
};
FixedText FT_NUMDIST
{
Pos = MAP_APPFONT ( 50 , 75 ) ;
Size = MAP_APPFONT ( 105 , 8 ) ;
Text [ en-US ] = "Minimum space numbering <-> text" ;
};
MetricField MF_NUMDIST
{
HelpID = "cui:MetricField:RID_SVXPAGE_NUM_POSITION:MF_NUMDIST";
Pos = MAP_APPFONT ( 198 , 73 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
Maximum = 1999 ;
DecimalDigits = 2 ;
Value = 0 ;
Unit = FUNIT_CM ;
First = 0 ;
Last = 1999 ;
SpinSize = 5 ;
Border = TRUE ;
TabStop = TRUE ;
};
FixedText FT_ALIGN
{
Pos = MAP_APPFONT ( 50 , 91 ) ;
Size = MAP_APPFONT ( 105 , 8 ) ;
Text [ en-US ] = "N~umbering alignment" ;
};
ListBox LB_ALIGN
{
HelpID = "cui:ListBox:RID_SVXPAGE_NUM_POSITION:LB_ALIGN";
Pos = MAP_APPFONT ( 198 , 89 ) ;
Size = MAP_APPFONT ( 40 , 40 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "Left" ; > ;
< "Centered" ; > ;
< "Right" ; > ;
};
};
FixedText FT_LABEL_FOLLOWED_BY
{
Pos = MAP_APPFONT ( 50 , 27 ) ;
Size = MAP_APPFONT ( 105 , 10 ) ;
Text [ en-US ] = "Numbering followed by" ;
};
ListBox LB_LABEL_FOLLOWED_BY
{
HelpID = "cui:ListBox:RID_SVXPAGE_NUM_POSITION:LB_LABEL_FOLLOWED_BY";
Pos = MAP_APPFONT ( 198 , 25 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "Tab stop" ; > ;
< "Space" ; > ;
< "Nothing" ; > ;
};
};
FixedText FT_LISTTAB
{
Pos = MAP_APPFONT ( 50 , 43 ) ;
Size = MAP_APPFONT ( 143 , 10 ) ;
Right = TRUE ;
Text [ en-US ] = "at" ;
};
MetricField MF_LISTTAB
{
HelpID = "cui:MetricField:RID_SVXPAGE_NUM_POSITION:MF_LISTTAB";
Pos = MAP_APPFONT ( 198 , 41 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
Maximum = 1999 ;
DecimalDigits = 2 ;
Value = 0 ;
Unit = FUNIT_CM ;
First = 0 ;
Last = 1999 ;
SpinSize = 5 ;
};
FixedText FT_ALIGN_2
{
Pos = MAP_APPFONT ( 50 , 59 ) ;
Size = MAP_APPFONT ( 105 , 8 ) ;
};
ListBox LB_ALIGN_2
{
HelpID = "cui:ListBox:RID_SVXPAGE_NUM_POSITION:LB_ALIGN_2";
Pos = MAP_APPFONT ( 198 , 57 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
};
FixedText FT_ALIGNED_AT
{
Pos = MAP_APPFONT ( 50 , 75 ) ;
Size = MAP_APPFONT ( 105 , 8 ) ;
Text [ en-US ] = "Aligned at" ;
};
MetricField MF_ALIGNED_AT
{
HelpID = "cui:MetricField:RID_SVXPAGE_NUM_POSITION:MF_ALIGNED_AT";
Pos = MAP_APPFONT ( 198 , 73 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = -1999 ;
Maximum = 1999 ;
DecimalDigits = 2 ;
Value = 0 ;
Unit = FUNIT_CM ;
First = 0 ;
Last = 1999 ;
SpinSize = 5 ;
Border = TRUE ;
TabStop = TRUE ;
};
FixedText FT_INDENT_AT
{
Pos = MAP_APPFONT ( 50 , 91 ) ;
Size = MAP_APPFONT ( 105 , 8 ) ;
Text [ en-US ] = "Indent at" ;
};
MetricField MF_INDENT_AT
{
HelpID = "cui:MetricField:RID_SVXPAGE_NUM_POSITION:MF_INDENT_AT";
Pos = MAP_APPFONT ( 198 , 89 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = -1999 ;
Maximum = 1999 ;
DecimalDigits = 2 ;
Value = 0 ;
Unit = FUNIT_CM ;
First = 0 ;
Last = 1999 ;
SpinSize = 5 ;
Border = TRUE ;
TabStop = TRUE ;
};
PushButton PB_STANDARD
{
HelpID = "cui:PushButton:RID_SVXPAGE_NUM_POSITION:PB_STANDARD";
Pos = MAP_APPFONT ( 198 , 165 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "Default" ;
};
Window WIN_PREVIEW
{
Pos = MAP_APPFONT ( 50 , 113 ) ;
Size = MAP_APPFONT ( 143 , 67 ) ;
Border = TRUE ;
};
};
String RID_STR_EDIT_GRAPHIC
{
......
......@@ -6,7 +6,7 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkGrid" id="NumberFormatPage">
<object class="GtkGrid" id="NumberingFormatPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">10</property>
......
This diff is collapsed.
......@@ -553,6 +553,8 @@
<property name="height_request">100</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
</child>
</object>
......
......@@ -26,7 +26,7 @@
# i88330 -o sc.ScAccessibleDocument
# i91045 -o sc.ScAccessibleDocumentPagePreview
-o sc.ScAccessiblePageHeader
-o sc.ScAccessiblePageHeaderArea
# fdo#FOO -o sc.ScAccessiblePageHeaderArea
-o sc.ScAccessiblePreviewCell
-o sc.ScAccessiblePreviewHeaderCell
-o sc.ScAccessiblePreviewTable
......
......@@ -112,37 +112,6 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
};
class SvxNumberingPreview : public Window
{
const SvxNumRule* pActNum;
Font aStdFont;
long nPageWidth;
const String* pOutlineNames;
sal_Bool bPosition;
sal_uInt16 nActLevel;
protected:
virtual void Paint( const Rectangle& rRect );
public:
SvxNumberingPreview(Window* pParent, const ResId& rResId ) :
Window(pParent, rResId),
pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(sal_False), nActLevel(USHRT_MAX)
{ SetBorderStyle( WINDOW_BORDER_MONO ); }
void SetNumRule(const SvxNumRule* pNum)
{pActNum = pNum; Invalidate();};
void SetPageWidth(long nPgWidth)
{nPageWidth = nPgWidth;}
void SetOutlineNames(const String* pNames)
{pOutlineNames = pNames;}
void SetPositionMode()
{ bPosition = sal_True;}
void SetLevel(sal_uInt16 nSet) {nActLevel = nSet;}
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -57,6 +57,10 @@
static sal_Bool bLastRelative = sal_False;
//See cui/uiconfig/ui/numberingpositionpage.ui for effectively a duplicate
//dialog to this one, except with a different preview window impl.
//TODO, determine if SwNumPositionTabPage and SvxNumPositionTabPage can be
//merged
SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
const SfxItemSet& rSet)
: SfxTabPage(pParent, "OutlinePositionPage",
......
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