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,\ ...@@ -18,7 +18,8 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/insertplugin \ cui/uiconfig/ui/insertplugin \
cui/uiconfig/ui/insertrowcolumn \ cui/uiconfig/ui/insertrowcolumn \
cui/uiconfig/ui/macroselectordialog \ cui/uiconfig/ui/macroselectordialog \
cui/uiconfig/ui/numberformatpage \ cui/uiconfig/ui/numberingformatpage \
cui/uiconfig/ui/numberingpositionpage \
cui/uiconfig/ui/personalization_tab \ cui/uiconfig/ui/personalization_tab \
cui/uiconfig/ui/pickbulletpage \ cui/uiconfig/ui/pickbulletpage \
cui/uiconfig/ui/pickgraphicpage \ cui/uiconfig/ui/pickgraphicpage \
......
...@@ -296,7 +296,6 @@ ...@@ -296,7 +296,6 @@
#define HID_VALUESET_NUM "CUI_HID_VALUESET_NUM" #define HID_VALUESET_NUM "CUI_HID_VALUESET_NUM"
#define HID_VALUESET_NUMBMP "CUI_HID_VALUESET_NUMBMP" #define HID_VALUESET_NUMBMP "CUI_HID_VALUESET_NUMBMP"
#define HID_SVXPAGE_NUM_OPTIONS "CUI_HID_SVXPAGE_NUM_OPTIONS" #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_MEASURE_CTL_PREVIEW "CUI_HID_MEASURE_CTL_PREVIEW"
#define HID_FORMAT_PARAGRAPH_EXT "CUI_HID_FORMAT_PARAGRAPH_EXT" #define HID_FORMAT_PARAGRAPH_EXT "CUI_HID_FORMAT_PARAGRAPH_EXT"
#define HID_FORMAT_PARAGRAPH_ALIGN "CUI_HID_FORMAT_PARAGRAPH_ALIGN" #define HID_FORMAT_PARAGRAPH_ALIGN "CUI_HID_FORMAT_PARAGRAPH_ALIGN"
......
...@@ -36,9 +36,35 @@ ...@@ -36,9 +36,35 @@
class SvxNumRule; class SvxNumRule;
class SvxBmpNumValueSet; class SvxBmpNumValueSet;
class SvxNumValueSet; class SvxNumValueSet;
class SvxNumberingPreview;
class SvxBrushItem; 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 ...@@ -362,41 +388,36 @@ class SvxNumPositionTabPage : public SfxTabPage
using TabPage::ActivatePage; using TabPage::ActivatePage;
using TabPage::DeactivatePage; using TabPage::DeactivatePage;
FixedLine aPositionFL; ListBox* m_pLevelLB;
FixedText aLevelFT;
MultiListBox aLevelLB;
// former set of controls shown for numbering rules containing list level // former set of controls shown for numbering rules containing list level
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
FixedText aDistBorderFT; FixedText* m_pDistBorderFT;
MetricField aDistBorderMF; MetricField* m_pDistBorderMF;
CheckBox aRelativeCB; CheckBox* m_pRelativeCB;
FixedText aIndentFT; FixedText* m_pIndentFT;
MetricField aIndentMF; MetricField* m_pIndentMF;
FixedText aDistNumFT; FixedText* m_pDistNumFT;
MetricField aDistNumMF; MetricField* m_pDistNumMF;
FixedText aAlignFT; FixedText* m_pAlignFT;
ListBox aAlignLB; ListBox* m_pAlignLB;
// new set of controls shown for numbering rules containing list level // new set of controls shown for numbering rules containing list level
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
FixedText aLabelFollowedByFT; FixedText* m_pLabelFollowedByFT;
ListBox aLabelFollowedByLB; ListBox* m_pLabelFollowedByLB;
FixedText aListtabFT; FixedText* m_pListtabFT;
MetricField aListtabMF; MetricField* m_pListtabMF;
FixedText aAlign2FT; FixedText* m_pAlign2FT;
ListBox aAlign2LB; ListBox* m_pAlign2LB;
FixedText aAlignedAtFT; FixedText* m_pAlignedAtFT;
MetricField aAlignedAtMF; MetricField* m_pAlignedAtMF;
FixedText aIndentAtFT; FixedText* m_pIndentAtFT;
MetricField aIndentAtMF; MetricField* m_pIndentAtMF;
PushButton aStandardPB; PushButton* m_pStandardPB;
#if OSL_DEBUG_LEVEL > 1 SvxNumberingPreview* m_pPreviewWIN;
FixedText* pDebugFixedText;
#endif
SvxNumberingPreview* pPreviewWIN;
SvxNumRule* pActNum; SvxNumRule* pActNum;
SvxNumRule* pSaveNum; SvxNumRule* pSaveNum;
......
...@@ -222,8 +222,8 @@ void SvxNumberPreview::DataChanged( const DataChangedEvent& rDCEvt ) ...@@ -222,8 +222,8 @@ void SvxNumberPreview::DataChanged( const DataChangedEvent& rDCEvt )
SvxNumberFormatTabPage::SvxNumberFormatTabPage(Window* pParent, SvxNumberFormatTabPage::SvxNumberFormatTabPage(Window* pParent,
const SfxItemSet& rCoreAttrs) const SfxItemSet& rCoreAttrs)
: SfxTabPage(pParent, "NumberFormatPage", : SfxTabPage(pParent, "NumberingFormatPage",
"cui/ui/numberformatpage.ui", rCoreAttrs) "cui/ui/numberingformatpage.ui", rCoreAttrs)
, pNumItem(NULL) , pNumItem(NULL)
, pNumFmtShell(NULL) , pNumFmtShell(NULL)
, nInitFormat(ULONG_MAX) , nInitFormat(ULONG_MAX)
......
...@@ -37,10 +37,6 @@ ...@@ -37,10 +37,6 @@
#define LB_FMT 158 #define LB_FMT 158
#define FT_SUFFIX 159 #define FT_SUFFIX 159
#define ED_SUFFIX 160 #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 FT_INDENT 165
#define MF_INDENT 166 #define MF_INDENT 166
#define FT_CHARFMT 167 #define FT_CHARFMT 167
...@@ -60,9 +56,7 @@ ...@@ -60,9 +56,7 @@
#define FT_ORIENT 182 #define FT_ORIENT 182
#define LB_ORIENT 183 #define LB_ORIENT 183
#define MB_BITMAP 184 #define MB_BITMAP 184
#define CB_RELATIVE 185
#define FT_ALL_LEVEL 186 #define FT_ALL_LEVEL 186
#define PB_STANDARD 187
#define CB_SAME_LEVEL 188 #define CB_SAME_LEVEL 188
#define FL_SAME_LEVEL 189 #define FL_SAME_LEVEL 189
#define FT_BUL_COLOR 190 #define FT_BUL_COLOR 190
......
...@@ -415,265 +415,6 @@ TabPage RID_SVXPAGE_NUM_OPTIONS ...@@ -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 String RID_STR_EDIT_GRAPHIC
{ {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<property name="step_increment">1</property> <property name="step_increment">1</property>
<property name="page_increment">10</property> <property name="page_increment">10</property>
</object> </object>
<object class="GtkGrid" id="NumberFormatPage"> <object class="GtkGrid" id="NumberingFormatPage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="row_spacing">10</property> <property name="row_spacing">10</property>
......
This diff is collapsed.
...@@ -553,6 +553,8 @@ ...@@ -553,6 +553,8 @@
<property name="height_request">100</property> <property name="height_request">100</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object> </object>
</child> </child>
</object> </object>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
# i88330 -o sc.ScAccessibleDocument # i88330 -o sc.ScAccessibleDocument
# i91045 -o sc.ScAccessibleDocumentPagePreview # i91045 -o sc.ScAccessibleDocumentPagePreview
-o sc.ScAccessiblePageHeader -o sc.ScAccessiblePageHeader
-o sc.ScAccessiblePageHeaderArea # fdo#FOO -o sc.ScAccessiblePageHeaderArea
-o sc.ScAccessiblePreviewCell -o sc.ScAccessiblePreviewCell
-o sc.ScAccessiblePreviewHeaderCell -o sc.ScAccessiblePreviewHeaderCell
-o sc.ScAccessiblePreviewTable -o sc.ScAccessiblePreviewTable
......
...@@ -112,37 +112,6 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet ...@@ -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 #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -57,6 +57,10 @@ ...@@ -57,6 +57,10 @@
static sal_Bool bLastRelative = sal_False; 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, SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
const SfxItemSet& rSet) const SfxItemSet& rSet)
: SfxTabPage(pParent, "OutlinePositionPage", : 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