Kaydet (Commit) df311b82 authored tarafından Olivier Hallot's avatar Olivier Hallot Kaydeden (comit) Caolán McNamara

Widget UI for Calc cell alignment page

Format - cell, alignment tab

Change-Id: I78e4252064671720d41ad3af086b41d2efe06ac1
Reviewed-on: https://gerrit.libreoffice.org/2773Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 299586c9
......@@ -13,6 +13,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/asiantypography \
cui/uiconfig/ui/backgroundpage \
cui/uiconfig/ui/borderpage \
cui/uiconfig/ui/cellalignment \
cui/uiconfig/ui/charnamepage \
cui/uiconfig/ui/colorpage \
cui/uiconfig/ui/comment \
......
......@@ -19,6 +19,23 @@
#ifndef _SVX_ALIGN_HXX
#define _SVX_ALIGN_HXX
// list box indexes
#define ALIGNDLG_HORALIGN_STD 0
#define ALIGNDLG_HORALIGN_LEFT 1
#define ALIGNDLG_HORALIGN_CENTER 2
#define ALIGNDLG_HORALIGN_RIGHT 3
#define ALIGNDLG_HORALIGN_BLOCK 4
#define ALIGNDLG_HORALIGN_FILL 5
#define ALIGNDLG_HORALIGN_DISTRIBUTED 6
#define ALIGNDLG_VERALIGN_STD 0
#define ALIGNDLG_VERALIGN_TOP 1
#define ALIGNDLG_VERALIGN_MID 2
#define ALIGNDLG_VERALIGN_BOTTOM 3
#define ALIGNDLG_VERALIGN_BLOCK 4
#define ALIGNDLG_VERALIGN_DISTRIBUTED 5
#include <svx/orienthelper.hxx>
#include <vcl/field.hxx>
#include <vcl/button.hxx>
......@@ -42,7 +59,7 @@ public:
virtual ~AlignmentTabPage();
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
static sal_uInt16* GetRanges();
static sal_uInt16* GetRanges();
virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
......@@ -60,30 +77,32 @@ private:
DECL_LINK( UpdateEnableHdl, void* );
private:
FixedLine maFlAlignment;
FixedText maFtHorAlign;
ListBox maLbHorAlign;
FixedText maFtIndent;
MetricField maEdIndent;
FixedText maFtVerAlign;
ListBox maLbVerAlign;
FixedLine maFlOrient;
DialControl maCtrlDial;
FixedText maFtRotate;
WrapField maNfRotate;
FixedText maFtRefEdge;
ValueSet maVsRefEdge;
TriStateBox maCbStacked;
TriStateBox maCbAsianMode;
OrientationHelper maOrientHlp;
FixedLine maFlProperties;
TriStateBox maBtnWrap;
TriStateBox maBtnHyphen;
TriStateBox maBtnShrink;
FixedText maFtFrameDir;
FrameDirListBox maLbFrameDir;
ListBox* m_pLbHorAlign;
FixedText* m_pFtIndent;
MetricField* m_pEdIndent;
ListBox* m_pLbVerAlign;
DialControl* m_pCtrlDial;
FixedText* m_pFtRotate;
WrapField* m_pNfRotate;
FixedText* m_pFtRefEdge;
ValueSet* m_pVsRefEdge;
TriStateBox* m_pCbStacked;
TriStateBox* m_pCbAsianMode;
OrientationHelper* m_pOrientHlp;
VclHBox* m_pBoxDirection;
TriStateBox* m_pBtnWrap;
TriStateBox* m_pBtnHyphen;
TriStateBox* m_pBtnShrink;
FrameDirListBox* m_pLbFrameDir;
// hidden labels/string
FixedText* m_pFtBotLock;
FixedText* m_pFtTopLock;
FixedText* m_pFtCelLock;
FixedText* m_pFtABCD;
};
// ============================================================================
......
This diff is collapsed.
......@@ -16,52 +16,10 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef _SVX_ALIGN_HRC
#define _SVX_ALIGN_HRC
// defines ------------------------------------------------------------------
// resource id's
#define FL_ALIGNMENT 10
#define FT_HORALIGN 11
#define LB_HORALIGN 12
#define FT_INDENT 13
#define ED_INDENT 14
#define FT_VERALIGN 15
#define LB_VERALIGN 16
#define FL_ORIENTATION 20
#define BTN_TXTSTACKED 21
#define CTR_DIAL 22
#define FT_DEGREES 23
#define NF_DEGREES 24
#define FT_BORDER_LOCK 25
#define CTR_BORDER_LOCK 26
#define BTN_ASIAN_VERTICAL 27
#define FL_WRAP 40
#define BTN_WRAP 41
#define BTN_HYPH 42
#define FT_TEXTFLOW 43
#define LB_FRAMEDIR 44
#define BTN_SHRINK 45
// list box indexes
#define ALIGNDLG_HORALIGN_STD 0
#define ALIGNDLG_HORALIGN_LEFT 1
#define ALIGNDLG_HORALIGN_CENTER 2
#define ALIGNDLG_HORALIGN_RIGHT 3
#define ALIGNDLG_HORALIGN_BLOCK 4
#define ALIGNDLG_HORALIGN_FILL 5
#define ALIGNDLG_HORALIGN_DISTRIBUTED 6
#define ALIGNDLG_VERALIGN_STD 0
#define ALIGNDLG_VERALIGN_TOP 1
#define ALIGNDLG_VERALIGN_MID 2
#define ALIGNDLG_VERALIGN_BOTTOM 3
#define ALIGNDLG_VERALIGN_BLOCK 4
#define ALIGNDLG_VERALIGN_DISTRIBUTED 5
// image list for ValueSets:
#define IL_LOCK_BMPS 1100
#define IID_BOTTOMLOCK 1
......
......@@ -17,202 +17,15 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <cuires.hrc>
#include "helpid.hrc"
#include "align.hrc"
#include <svx/dialogs.hrc>
#define MASKCOLOR \
MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }
// define ---------------------------------------------------------------
#define IL_LOCK_MCOL Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; }
// RID_SVXPAGE_ALIGNMENT -------------------------------------------------
TabPage RID_SVXPAGE_ALIGNMENT
{
HelpId = HID_ALIGNMENT ;
Hide = TRUE ;
Text [ en-US ] = "Alignment" ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
SVLook = TRUE ;
FixedLine FL_ALIGNMENT
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Text alignment";
};
FixedText FT_HORALIGN
{
Pos = MAP_APPFONT ( 12 ,14 ) ;
Size = MAP_APPFONT ( 100 , 8 ) ;
Text [ en-US ] = "Hori~zontal";
};
ListBox LB_HORALIGN
{
HelpID = "cui:ListBox:RID_SVXPAGE_ALIGNMENT:LB_HORALIGN";
Border = TRUE;
Pos = MAP_APPFONT ( 12 , 25 );
Size = MAP_APPFONT ( 100 , 60 );
TabStop = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
{
< "Default" ; ALIGNDLG_HORALIGN_STD ; > ;
< "Left" ; ALIGNDLG_HORALIGN_LEFT ; > ;
< "Center" ; ALIGNDLG_HORALIGN_CENTER ; > ;
< "Right" ; ALIGNDLG_HORALIGN_RIGHT ; > ;
< "Justified" ; ALIGNDLG_HORALIGN_BLOCK ; > ;
< "Filled" ; ALIGNDLG_HORALIGN_FILL ; > ;
< "Distributed" ; ALIGNDLG_HORALIGN_DISTRIBUTED ; > ;
};
};
FixedText FT_INDENT
{
Pos = MAP_APPFONT ( 118 , 14 ) ;
Size = MAP_APPFONT ( 40 , 8 ) ;
Text [ en-US ] = "I~ndent" ;
};
MetricField ED_INDENT
{
HelpID = "cui:MetricField:RID_SVXPAGE_ALIGNMENT:ED_INDENT";
Border = TRUE ;
Pos = MAP_APPFONT ( 118 , 25 ) ;
Size = MAP_APPFONT ( 36 , 12 ) ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
Maximum = 990 ;
SpinSize = 10 ;
Unit = FUNIT_POINT ;
};
FixedText FT_VERALIGN
{
Pos = MAP_APPFONT ( 160 , 14 ) ;
Size = MAP_APPFONT ( 88 , 8 ) ;
Text [ en-US ] = "~Vertical";
};
ListBox LB_VERALIGN
{
HelpID = "cui:ListBox:RID_SVXPAGE_ALIGNMENT:LB_VERALIGN";
Border = TRUE;
Pos = MAP_APPFONT ( 160 , 25 );
Size = MAP_APPFONT ( 88 , 60 );
TabStop = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
{
< "Default" ; ALIGNDLG_VERALIGN_STD ; > ;
< "Top" ; ALIGNDLG_VERALIGN_TOP ; > ;
< "Middle" ; ALIGNDLG_VERALIGN_MID ; > ;
< "Bottom" ; ALIGNDLG_VERALIGN_BOTTOM ; > ;
< "Justified" ; ALIGNDLG_VERALIGN_BLOCK ; > ;
< "Distributed" ; ALIGNDLG_VERALIGN_DISTRIBUTED ; > ;
};
};
FixedLine FL_ORIENTATION
{
Pos = MAP_APPFONT ( 6 , 43 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Text orientation" ;
};
TriStateBox BTN_TXTSTACKED
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_ALIGNMENT:BTN_TXTSTACKED";
Pos = MAP_APPFONT ( 133 , 54 ) ;
Size = MAP_APPFONT ( 115 , 10 ) ;
TabStop = TRUE ;
Text[ en-US ] = "Ve~rtically stacked";
};
Control CTR_DIAL
{
HelpId = HID_ALIGNMENT_CTR_DIAL ;
Pos = MAP_APPFONT ( 12 , 60 ) ;
Size = MAP_APPFONT ( 42 , 43 ) ;
Text = "ABCD" ;
};
FixedText FT_DEGREES
{
Pos = MAP_APPFONT ( 72 , 54 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "De~grees";
};
NumericField NF_DEGREES
{
HelpID = "cui:NumericField:RID_SVXPAGE_ALIGNMENT:NF_DEGREES";
Border = TRUE ;
Pos = MAP_APPFONT ( 72 , 65 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
Maximum = 359 ;
SpinSize = 5 ;
StrictFormat = TRUE ;
};
FixedText FT_BORDER_LOCK
{
Pos = MAP_APPFONT ( 72 , 83 ) ;
Size = MAP_APPFONT ( 70 , 8 ) ;
Text [ en-US ] = "Re~ference edge" ;
};
Control CTR_BORDER_LOCK
{
HelpId = HID_ALIGNMENT_CTR_BORDER_LOCK ;
Pos = MAP_APPFONT ( 72 , 94 ) ;
Size = MAP_APPFONT ( 50 , 15 ) ;
TabStop = TRUE ;
};
TriStateBox BTN_ASIAN_VERTICAL
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_ALIGNMENT:BTN_ASIAN_VERTICAL";
Pos = MAP_APPFONT ( 143 , 68 ) ;
Size = MAP_APPFONT ( 105 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Asian layout ~mode" ;
};
FixedLine FL_WRAP
{
Pos = MAP_APPFONT ( 6 , 115 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Properties" ;
};
TriStateBox BTN_WRAP
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_ALIGNMENT:BTN_WRAP";
Pos = MAP_APPFONT ( 12 , 126 ) ;
Size = MAP_APPFONT ( 236 , 10 ) ;
Text [ en-US ] = "~Wrap text automatically" ;
};
TriStateBox BTN_HYPH
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_ALIGNMENT:BTN_HYPH";
Pos = MAP_APPFONT ( 22 , 139 ) ;
Size = MAP_APPFONT ( 226 , 10 ) ;
Text [ en-US ] = "Hyphenation ~active";
};
TriStateBox BTN_SHRINK
{
HelpID = "cui:TriStateBox:RID_SVXPAGE_ALIGNMENT:BTN_SHRINK";
Pos = MAP_APPFONT( 12, 152 );
Size = MAP_APPFONT( 236, 10 );
Text [ en-US ] = "~Shrink to fit cell size";
};
FixedText FT_TEXTFLOW
{
Pos = MAP_APPFONT( 12 , 170 );
Size = MAP_APPFONT( 64 , 8 );
Text [ en-US ] = "Te~xt direction";
};
ListBox LB_FRAMEDIR
{
HelpID = "cui:ListBox:RID_SVXPAGE_ALIGNMENT:LB_FRAMEDIR";
Pos = MAP_APPFONT( 78 , 168 );
Size = MAP_APPFONT( 170 , 50 );
Border = TRUE;
DropDown = TRUE;
};
ImageList IL_LOCK_BMPS
ImageList IL_LOCK_BMPS
{
Prefix = "lo";
MaskColor = IL_LOCK_MCOL ;
......@@ -224,19 +37,6 @@ TabPage RID_SVXPAGE_ALIGNMENT
};
IdCount = { 3 ; };
};
String STR_BOTTOMLOCK
{
Text [ en-US ] = "Text Extension From Lower Cell Border" ;
};
String STR_TOPLOCK
{
Text [ en-US ] = "Text Extension From Upper Cell Border" ;
};
String STR_CELLLOCK
{
Text [ en-US ] = "Text Extension Inside Cell" ;
};
};
// ********************************************************************** EOF
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
......@@ -123,6 +123,12 @@
<glade-widget-class title="Tree List" name="svtlo-SvTreeListBox"
generic-name="Tree List" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="Dial Control" name="svxlo-DialControl"
generic-name="Dial Control" parent="GtkSpinner"
icon-name="widget-gtk-spinner"/>
<glade-widget-class title="Wrap Field" name="svxlo-WrapField"
generic-name="Wrap Field" parent="GtkSpinButton"
icon-name="widget-gtk-spinbutton"/>
<glade-widget-class title="VclComboBoxText" name="VclComboBoxText"
generic-name="ComboBoxText" parent="GtkComboBoxText"
......
......@@ -51,6 +51,8 @@ class SVX_DLLPUBLIC DialControl : public Control
{
public:
explicit DialControl( Window* pParent, const ResId& rResId );
explicit DialControl( Window* pParent, WinBits nBits );
virtual ~DialControl();
virtual void Paint( const Rectangle& rRect );
......
......@@ -33,6 +33,7 @@ class SVX_DLLPUBLIC WrapField : public NumericField
{
public:
explicit WrapField( Window* pParent, const ResId& rResId );
explicit WrapField( Window* pParent, WinBits nBits );
protected:
/** Up event with wrap-around functionality. */
......
......@@ -25,6 +25,7 @@
#include <vcl/bitmap.hxx>
#include <vcl/field.hxx>
#include <svtools/colorcfg.hxx>
#include <vcl/builder.hxx>
namespace svx {
......@@ -289,10 +290,22 @@ DialControl::DialControl( Window* pParent, const ResId& rResId ) :
Init( GetOutputSizePixel() );
}
DialControl::DialControl( Window* pParent, WinBits nBits ) :
Control( pParent, nBits ),
mpImpl( new DialControl_Impl( *this ) )
{
Init( GetOutputSizePixel() );
}
DialControl::~DialControl()
{
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeDialControl(Window *pParent, VclBuilder::stringmap &)
{
return new DialControl(pParent, WB_BORDER | WB_TABSTOP);
}
void DialControl::Paint( const Rectangle& )
{
Point aPos;
......
......@@ -18,6 +18,7 @@
*/
#include "svx/wrapfield.hxx"
#include <vcl/builder.hxx>
namespace svx {
......@@ -26,6 +27,16 @@ WrapField::WrapField( Window* pParent, const ResId& rResId ) :
{
}
WrapField::WrapField( Window* pParent, WinBits nBits ) :
NumericField( pParent, nBits )
{
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeWrapField(Window *pParent, VclBuilder::stringmap &)
{
return new WrapField(pParent, WB_SPIN|WB_REPEAT|WB_BORDER|WB_TABSTOP);
}
void WrapField::Up()
{
SetValue( ((GetValue() + GetSpinSize() - GetMin()) % (GetMax() + 1)) + GetMin() );
......
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