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,\ ...@@ -13,6 +13,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/asiantypography \ cui/uiconfig/ui/asiantypography \
cui/uiconfig/ui/backgroundpage \ cui/uiconfig/ui/backgroundpage \
cui/uiconfig/ui/borderpage \ cui/uiconfig/ui/borderpage \
cui/uiconfig/ui/cellalignment \
cui/uiconfig/ui/charnamepage \ cui/uiconfig/ui/charnamepage \
cui/uiconfig/ui/colorpage \ cui/uiconfig/ui/colorpage \
cui/uiconfig/ui/comment \ cui/uiconfig/ui/comment \
......
...@@ -19,6 +19,23 @@ ...@@ -19,6 +19,23 @@
#ifndef _SVX_ALIGN_HXX #ifndef _SVX_ALIGN_HXX
#define _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 <svx/orienthelper.hxx>
#include <vcl/field.hxx> #include <vcl/field.hxx>
#include <vcl/button.hxx> #include <vcl/button.hxx>
...@@ -42,7 +59,7 @@ public: ...@@ -42,7 +59,7 @@ public:
virtual ~AlignmentTabPage(); virtual ~AlignmentTabPage();
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
static sal_uInt16* GetRanges(); static sal_uInt16* GetRanges();
virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet );
...@@ -60,30 +77,32 @@ private: ...@@ -60,30 +77,32 @@ private:
DECL_LINK( UpdateEnableHdl, void* ); DECL_LINK( UpdateEnableHdl, void* );
private: private:
FixedLine maFlAlignment; ListBox* m_pLbHorAlign;
FixedText maFtHorAlign; FixedText* m_pFtIndent;
ListBox maLbHorAlign; MetricField* m_pEdIndent;
FixedText maFtIndent; ListBox* m_pLbVerAlign;
MetricField maEdIndent;
FixedText maFtVerAlign; DialControl* m_pCtrlDial;
ListBox maLbVerAlign; FixedText* m_pFtRotate;
WrapField* m_pNfRotate;
FixedLine maFlOrient; FixedText* m_pFtRefEdge;
DialControl maCtrlDial; ValueSet* m_pVsRefEdge;
FixedText maFtRotate; TriStateBox* m_pCbStacked;
WrapField maNfRotate; TriStateBox* m_pCbAsianMode;
FixedText maFtRefEdge; OrientationHelper* m_pOrientHlp;
ValueSet maVsRefEdge;
TriStateBox maCbStacked; VclHBox* m_pBoxDirection;
TriStateBox maCbAsianMode; TriStateBox* m_pBtnWrap;
OrientationHelper maOrientHlp; TriStateBox* m_pBtnHyphen;
TriStateBox* m_pBtnShrink;
FixedLine maFlProperties; FrameDirListBox* m_pLbFrameDir;
TriStateBox maBtnWrap;
TriStateBox maBtnHyphen; // hidden labels/string
TriStateBox maBtnShrink; FixedText* m_pFtBotLock;
FixedText maFtFrameDir; FixedText* m_pFtTopLock;
FrameDirListBox maLbFrameDir; FixedText* m_pFtCelLock;
FixedText* m_pFtABCD;
}; };
// ============================================================================ // ============================================================================
......
...@@ -147,97 +147,105 @@ void lcl_SetJustifyMethodToItemSet(SfxItemSet& rSet, sal_uInt16 nWhichJM, const ...@@ -147,97 +147,105 @@ void lcl_SetJustifyMethodToItemSet(SfxItemSet& rSet, sal_uInt16 nWhichJM, const
rSet.Put(aItem); rSet.Put(aItem);
} }
} }//namespace
// ============================================================================ // ============================================================================
AlignmentTabPage::AlignmentTabPage( Window* pParent, const SfxItemSet& rCoreAttrs ) : AlignmentTabPage::AlignmentTabPage( Window* pParent, const SfxItemSet& rCoreAttrs ) :
SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_ALIGNMENT ), rCoreAttrs ), SfxTabPage( pParent, "CellAlignPage","cui/ui/cellalignment.ui", rCoreAttrs )
maFlAlignment ( this, CUI_RES( FL_ALIGNMENT ) ),
maFtHorAlign ( this, CUI_RES( FT_HORALIGN ) ),
maLbHorAlign ( this, CUI_RES( LB_HORALIGN ) ),
maFtIndent ( this, CUI_RES( FT_INDENT ) ),
maEdIndent ( this, CUI_RES( ED_INDENT ) ),
maFtVerAlign ( this, CUI_RES( FT_VERALIGN ) ),
maLbVerAlign ( this, CUI_RES( LB_VERALIGN ) ),
maFlOrient ( this, CUI_RES( FL_ORIENTATION ) ),
maCtrlDial ( this, CUI_RES( CTR_DIAL ) ),
maFtRotate ( this, CUI_RES( FT_DEGREES ) ),
maNfRotate ( this, CUI_RES( NF_DEGREES ) ),
maFtRefEdge ( this, CUI_RES( FT_BORDER_LOCK ) ),
maVsRefEdge ( this, CUI_RES( CTR_BORDER_LOCK ) ),
maCbStacked ( this, CUI_RES( BTN_TXTSTACKED ) ),
maCbAsianMode ( this, CUI_RES( BTN_ASIAN_VERTICAL ) ),
maOrientHlp ( maCtrlDial, maNfRotate, maCbStacked ),
maFlProperties ( this, CUI_RES( FL_WRAP ) ),
maBtnWrap ( this, CUI_RES( BTN_WRAP ) ),
maBtnHyphen ( this, CUI_RES( BTN_HYPH ) ),
maBtnShrink ( this, CUI_RES( BTN_SHRINK ) ),
maFtFrameDir ( this, CUI_RES( FT_TEXTFLOW ) ),
maLbFrameDir ( this, CUI_RES( LB_FRAMEDIR ) )
{ {
// text alignment
get(m_pLbHorAlign,"comboboxHorzAlign");
get(m_pFtIndent,"labelIndent");
get(m_pEdIndent,"spinIndentFrom");
get(m_pLbVerAlign,"comboboxVertAlign");
//text rotation
get(m_pNfRotate,"spinDegrees");
get(m_pCtrlDial,"dialcontrol");
get(m_pFtRotate,"labelDegrees");
get(m_pFtRefEdge,"labelRefEdge");
get(m_pVsRefEdge,"references");
get(m_pBoxDirection,"boxDirection");
//Asian mode
get(m_pCbStacked,"checkVertStack");
get(m_pCbAsianMode,"checkAsianMode");
m_pOrientHlp = new OrientationHelper(*m_pCtrlDial, *m_pNfRotate, *m_pCbStacked);
// Properties
get(m_pBtnWrap,"checkWrapTextAuto");
get(m_pBtnHyphen,"checkHyphActive");
get(m_pBtnShrink,"checkShrinkFitCellSize");
get(m_pLbFrameDir,"comboTextDirBox");
//ValueSet hover strings
get(m_pFtBotLock,"labelSTR_BOTTOMLOCK");
get(m_pFtTopLock,"labelSTR_TOPLOCK");
get(m_pFtCelLock,"labelSTR_CELLLOCK");
get(m_pFtABCD,"labelABCD");
m_pCtrlDial->SetText(m_pFtABCD->GetText());
InitVsRefEgde(); InitVsRefEgde();
// windows to be disabled, if stacked text is turned ON // windows to be disabled, if stacked text is turned ON
maOrientHlp.AddDependentWindow( maFtRotate, STATE_CHECK ); m_pOrientHlp->AddDependentWindow( *m_pFtRotate, STATE_CHECK );
maOrientHlp.AddDependentWindow( maFtRefEdge, STATE_CHECK ); m_pOrientHlp->AddDependentWindow( *m_pFtRefEdge, STATE_CHECK );
maOrientHlp.AddDependentWindow( maVsRefEdge, STATE_CHECK ); m_pOrientHlp->AddDependentWindow( *m_pVsRefEdge, STATE_CHECK );
// windows to be disabled, if stacked text is turned OFF // windows to be disabled, if stacked text is turned OFF
maOrientHlp.AddDependentWindow( maCbAsianMode, STATE_NOCHECK ); m_pOrientHlp->AddDependentWindow( *m_pCbAsianMode, STATE_NOCHECK );
Link aLink = LINK( this, AlignmentTabPage, UpdateEnableHdl ); Link aLink = LINK( this, AlignmentTabPage, UpdateEnableHdl );
maLbHorAlign.SetSelectHdl( aLink ); m_pLbHorAlign->SetSelectHdl( aLink );
maBtnWrap.SetClickHdl( aLink ); m_pBtnWrap->SetClickHdl( aLink );
// Asian vertical mode // Asian vertical mode
maCbAsianMode.Show( SvtCJKOptions().IsVerticalTextEnabled() ); m_pCbAsianMode->Show( SvtCJKOptions().IsVerticalTextEnabled() );
// CTL frame direction
maLbFrameDir.InsertEntryValue( CUI_RESSTR( RID_SVXSTR_FRAMEDIR_LTR ), FRMDIR_HORI_LEFT_TOP );
maLbFrameDir.InsertEntryValue( CUI_RESSTR( RID_SVXSTR_FRAMEDIR_RTL ), FRMDIR_HORI_RIGHT_TOP );
maLbFrameDir.InsertEntryValue( CUI_RESSTR( RID_SVXSTR_FRAMEDIR_SUPER ), FRMDIR_ENVIRONMENT );
if( !SvtLanguageOptions().IsCTLFontEnabled() ) if( !SvtLanguageOptions().IsCTLFontEnabled() )
{ {
maFtFrameDir.Hide(); m_pBoxDirection->Hide();
maLbFrameDir.Hide(); }
else
{
// CTL frame direction
m_pLbFrameDir->InsertEntryValue( CUI_RESSTR( RID_SVXSTR_FRAMEDIR_LTR ), FRMDIR_HORI_LEFT_TOP );
m_pLbFrameDir->InsertEntryValue( CUI_RESSTR( RID_SVXSTR_FRAMEDIR_RTL ), FRMDIR_HORI_RIGHT_TOP );
m_pLbFrameDir->InsertEntryValue( CUI_RESSTR( RID_SVXSTR_FRAMEDIR_SUPER ), FRMDIR_ENVIRONMENT );
m_pBoxDirection->Show();
} }
// This page needs ExchangeSupport. // This page needs ExchangeSupport.
SetExchangeSupport(); SetExchangeSupport();
FreeResource(); AddItemConnection( new HorJustConnection( SID_ATTR_ALIGN_HOR_JUSTIFY, *m_pLbHorAlign, s_pHorJustMap, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_INDENT, *m_pFtIndent, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_HOR_JUSTIFY, maFtHorAlign, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new sfx::UInt16MetricConnection( SID_ATTR_ALIGN_INDENT, *m_pEdIndent, FUNIT_TWIP, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new HorJustConnection( SID_ATTR_ALIGN_HOR_JUSTIFY, maLbHorAlign, s_pHorJustMap, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new VerJustConnection( SID_ATTR_ALIGN_VER_JUSTIFY, *m_pLbVerAlign, s_pVerJustMap, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_INDENT, maFtIndent, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new DialControlConnection( SID_ATTR_ALIGN_DEGREES, *m_pCtrlDial, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::UInt16MetricConnection( SID_ATTR_ALIGN_INDENT, maEdIndent, FUNIT_TWIP, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_DEGREES, *m_pFtRotate, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_VER_JUSTIFY, maFtVerAlign, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_LOCKPOS, *m_pFtRefEdge, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new VerJustConnection( SID_ATTR_ALIGN_VER_JUSTIFY, maLbVerAlign, s_pVerJustMap, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new RotateModeConnection( SID_ATTR_ALIGN_LOCKPOS, *m_pVsRefEdge, s_pRotateModeMap, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new DialControlConnection( SID_ATTR_ALIGN_DEGREES, maCtrlDial, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new OrientStackedConnection( SID_ATTR_ALIGN_STACKED, *m_pOrientHlp ) );
AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_DEGREES, maFtRotate, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_STACKED, *m_pCbStacked, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_LOCKPOS, maFtRefEdge, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_ASIANVERTICAL, *m_pCbAsianMode, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new RotateModeConnection( SID_ATTR_ALIGN_LOCKPOS, maVsRefEdge, s_pRotateModeMap, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_LINEBREAK, *m_pBtnWrap, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new OrientStackedConnection( SID_ATTR_ALIGN_STACKED, maOrientHlp ) ); AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_HYPHENATION, *m_pBtnHyphen, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_STACKED, maCbStacked, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_SHRINKTOFIT, *m_pBtnShrink, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_ASIANVERTICAL, maCbAsianMode, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_FRAMEDIRECTION, *m_pBoxDirection, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_LINEBREAK, maBtnWrap, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new FrameDirListBoxConnection( SID_ATTR_FRAMEDIRECTION, *m_pLbFrameDir, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_HYPHENATION, maBtnHyphen, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_SHRINKTOFIT, maBtnShrink, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_FRAMEDIRECTION, maFtFrameDir, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new FrameDirListBoxConnection( SID_ATTR_FRAMEDIRECTION, maLbFrameDir, sfx::ITEMCONN_HIDE_UNKNOWN ) );
maLbHorAlign.SetAccessibleRelationMemberOf( &maFlAlignment );
maEdIndent.SetAccessibleRelationMemberOf( &maFlAlignment );
maLbVerAlign.SetAccessibleRelationMemberOf( &maFlAlignment );
} }
AlignmentTabPage::~AlignmentTabPage() AlignmentTabPage::~AlignmentTabPage()
{ {
delete m_pOrientHlp;
} }
SfxTabPage* AlignmentTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet ) SfxTabPage* AlignmentTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet )
...@@ -258,12 +266,12 @@ sal_Bool AlignmentTabPage::FillItemSet( SfxItemSet& rSet ) ...@@ -258,12 +266,12 @@ sal_Bool AlignmentTabPage::FillItemSet( SfxItemSet& rSet )
// method to 'distribute' to distinguish from the normal justification. // method to 'distribute' to distinguish from the normal justification.
sal_uInt16 nWhichHorJM = GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY_METHOD); sal_uInt16 nWhichHorJM = GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY_METHOD);
lcl_SetJustifyMethodToItemSet(rSet, nWhichHorJM, maLbHorAlign, ALIGNDLG_HORALIGN_DISTRIBUTED); lcl_SetJustifyMethodToItemSet(rSet, nWhichHorJM, *m_pLbHorAlign, ALIGNDLG_HORALIGN_DISTRIBUTED);
if (!bChanged) if (!bChanged)
bChanged = HasAlignmentChanged(rSet, nWhichHorJM); bChanged = HasAlignmentChanged(rSet, nWhichHorJM);
sal_uInt16 nWhichVerJM = GetWhich(SID_ATTR_ALIGN_VER_JUSTIFY_METHOD); sal_uInt16 nWhichVerJM = GetWhich(SID_ATTR_ALIGN_VER_JUSTIFY_METHOD);
lcl_SetJustifyMethodToItemSet(rSet, nWhichVerJM, maLbVerAlign, ALIGNDLG_VERALIGN_DISTRIBUTED); lcl_SetJustifyMethodToItemSet(rSet, nWhichVerJM, *m_pLbVerAlign, ALIGNDLG_VERALIGN_DISTRIBUTED);
if (!bChanged) if (!bChanged)
bChanged = HasAlignmentChanged(rSet, nWhichVerJM); bChanged = HasAlignmentChanged(rSet, nWhichVerJM);
...@@ -278,12 +286,12 @@ void AlignmentTabPage::Reset( const SfxItemSet& rCoreAttrs ) ...@@ -278,12 +286,12 @@ void AlignmentTabPage::Reset( const SfxItemSet& rCoreAttrs )
// method to 'distribute' to distinguish from the normal justification. // method to 'distribute' to distinguish from the normal justification.
lcl_MaybeResetAlignToDistro<SvxCellHorJustify, SvxCellHorJustify>( lcl_MaybeResetAlignToDistro<SvxCellHorJustify, SvxCellHorJustify>(
maLbHorAlign, ALIGNDLG_HORALIGN_DISTRIBUTED, rCoreAttrs, *m_pLbHorAlign, ALIGNDLG_HORALIGN_DISTRIBUTED, rCoreAttrs,
GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY), GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY_METHOD), GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY), GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY_METHOD),
SVX_HOR_JUSTIFY_BLOCK); SVX_HOR_JUSTIFY_BLOCK);
lcl_MaybeResetAlignToDistro<SvxCellVerJustify, SvxCellVerJustify>( lcl_MaybeResetAlignToDistro<SvxCellVerJustify, SvxCellVerJustify>(
maLbVerAlign, ALIGNDLG_VERALIGN_DISTRIBUTED, rCoreAttrs, *m_pLbVerAlign, ALIGNDLG_VERALIGN_DISTRIBUTED, rCoreAttrs,
GetWhich(SID_ATTR_ALIGN_VER_JUSTIFY), GetWhich(SID_ATTR_ALIGN_VER_JUSTIFY_METHOD), GetWhich(SID_ATTR_ALIGN_VER_JUSTIFY), GetWhich(SID_ATTR_ALIGN_VER_JUSTIFY_METHOD),
SVX_VER_JUSTIFY_BLOCK); SVX_VER_JUSTIFY_BLOCK);
...@@ -310,50 +318,46 @@ void AlignmentTabPage::DataChanged( const DataChangedEvent& rDCEvt ) ...@@ -310,50 +318,46 @@ void AlignmentTabPage::DataChanged( const DataChangedEvent& rDCEvt )
void AlignmentTabPage::InitVsRefEgde() void AlignmentTabPage::InitVsRefEgde()
{ {
// remember selection - is deleted in call to ValueSet::Clear() // remember selection - is deleted in call to ValueSet::Clear()
sal_uInt16 nSel = maVsRefEdge.GetSelectItemId(); sal_uInt16 nSel = m_pVsRefEdge->GetSelectItemId();
ResId aResId( IL_LOCK_BMPS, CUI_MGR() ); ResId aResId( IL_LOCK_BMPS, CUI_MGR() );
ImageList aImageList( aResId ); ImageList aImageList( aResId );
Size aItemSize( aImageList.GetImage( IID_BOTTOMLOCK ).GetSizePixel() ); Size aItemSize( aImageList.GetImage( IID_BOTTOMLOCK ).GetSizePixel() );
maVsRefEdge.Clear(); m_pVsRefEdge->Clear();
maVsRefEdge.SetStyle( maVsRefEdge.GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER ); m_pVsRefEdge->SetStyle( m_pVsRefEdge->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER );
maVsRefEdge.SetColCount( 3 ); m_pVsRefEdge->SetColCount( 3 );
maVsRefEdge.InsertItem( IID_BOTTOMLOCK, aImageList.GetImage( IID_BOTTOMLOCK ), String( CUI_RES( STR_BOTTOMLOCK ) ) ); m_pVsRefEdge->InsertItem( IID_BOTTOMLOCK, aImageList.GetImage( IID_BOTTOMLOCK ), m_pFtBotLock->GetText() );
maVsRefEdge.InsertItem( IID_TOPLOCK, aImageList.GetImage( IID_TOPLOCK ), String( CUI_RES( STR_TOPLOCK ) ) ); m_pVsRefEdge->InsertItem( IID_TOPLOCK, aImageList.GetImage( IID_TOPLOCK ), m_pFtTopLock->GetText() );
maVsRefEdge.InsertItem( IID_CELLLOCK, aImageList.GetImage( IID_CELLLOCK ), String( CUI_RES( STR_CELLLOCK ) ) ); m_pVsRefEdge->InsertItem( IID_CELLLOCK, aImageList.GetImage( IID_CELLLOCK ), m_pFtCelLock->GetText() );
maVsRefEdge.SetSizePixel( maVsRefEdge.CalcWindowSizePixel( aItemSize ) ); m_pVsRefEdge->SetSizePixel( m_pVsRefEdge->CalcWindowSizePixel( aItemSize ) );
maVsRefEdge.SelectItem( nSel ); m_pVsRefEdge->SelectItem( nSel );
} }
void AlignmentTabPage::UpdateEnableControls() void AlignmentTabPage::UpdateEnableControls()
{ {
sal_uInt16 nHorAlign = maLbHorAlign.GetSelectEntryPos(); sal_uInt16 nHorAlign = m_pLbHorAlign->GetSelectEntryPos();
bool bHorLeft = (nHorAlign == ALIGNDLG_HORALIGN_LEFT); bool bHorLeft = (nHorAlign == ALIGNDLG_HORALIGN_LEFT);
bool bHorBlock = (nHorAlign == ALIGNDLG_HORALIGN_BLOCK); bool bHorBlock = (nHorAlign == ALIGNDLG_HORALIGN_BLOCK);
bool bHorFill = (nHorAlign == ALIGNDLG_HORALIGN_FILL); bool bHorFill = (nHorAlign == ALIGNDLG_HORALIGN_FILL);
bool bHorDist = (nHorAlign == ALIGNDLG_HORALIGN_DISTRIBUTED); bool bHorDist = (nHorAlign == ALIGNDLG_HORALIGN_DISTRIBUTED);
// indent edit field only for left alignment // indent edit field only for left alignment
maFtIndent.Enable( bHorLeft ); m_pFtIndent->Enable( bHorLeft );
maEdIndent.Enable( bHorLeft ); m_pEdIndent->Enable( bHorLeft );
// rotation/stacked disabled for fill alignment // rotation/stacked disabled for fill alignment
maOrientHlp.Enable( !bHorFill ); m_pOrientHlp->Enable( !bHorFill );
// hyphenation only for automatic line breaks or for block alignment // hyphenation only for automatic line breaks or for block alignment
maBtnHyphen.Enable( maBtnWrap.IsChecked() || bHorBlock ); m_pBtnHyphen->Enable( m_pBtnWrap->IsChecked() || bHorBlock );
// shrink only without automatic line break, and not for block, fill or distribute. // shrink only without automatic line break, and not for block, fill or distribute.
maBtnShrink.Enable( (maBtnWrap.GetState() == STATE_NOCHECK) && !bHorBlock && !bHorFill && !bHorDist ); m_pBtnShrink->Enable( (m_pBtnWrap->GetState() == STATE_NOCHECK) && !bHorBlock && !bHorFill && !bHorDist );
// visibility of fixed lines
maFlAlignment.Show( maLbHorAlign.IsVisible() || maEdIndent.IsVisible() || maLbVerAlign.IsVisible() );
maFlOrient.Show( maCtrlDial.IsVisible() || maVsRefEdge.IsVisible() || maCbStacked.IsVisible() || maCbAsianMode.IsVisible() );
maFlProperties.Show( maBtnWrap.IsVisible() || maBtnHyphen.IsVisible() || maBtnShrink.IsVisible() || maLbFrameDir.IsVisible() );
} }
bool AlignmentTabPage::HasAlignmentChanged( const SfxItemSet& rNew, sal_uInt16 nWhich ) const bool AlignmentTabPage::HasAlignmentChanged( const SfxItemSet& rNew, sal_uInt16 nWhich ) const
......
...@@ -16,52 +16,10 @@ ...@@ -16,52 +16,10 @@
* except in compliance with the License. You may obtain a copy of * except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#ifndef _SVX_ALIGN_HRC #ifndef _SVX_ALIGN_HRC
#define _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: // image list for ValueSets:
#define IL_LOCK_BMPS 1100 #define IL_LOCK_BMPS 1100
#define IID_BOTTOMLOCK 1 #define IID_BOTTOMLOCK 1
......
...@@ -17,202 +17,15 @@ ...@@ -17,202 +17,15 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <cuires.hrc>
#include "helpid.hrc"
#include "align.hrc" #include "align.hrc"
#include <svx/dialogs.hrc>
#define MASKCOLOR \ #define MASKCOLOR \
MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; } MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }
// define --------------------------------------------------------------- // define ---------------------------------------------------------------
#define IL_LOCK_MCOL Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; } #define IL_LOCK_MCOL Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; }
// RID_SVXPAGE_ALIGNMENT -------------------------------------------------
TabPage RID_SVXPAGE_ALIGNMENT ImageList IL_LOCK_BMPS
{
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
{ {
Prefix = "lo"; Prefix = "lo";
MaskColor = IL_LOCK_MCOL ; MaskColor = IL_LOCK_MCOL ;
...@@ -224,19 +37,6 @@ TabPage RID_SVXPAGE_ALIGNMENT ...@@ -224,19 +37,6 @@ TabPage RID_SVXPAGE_ALIGNMENT
}; };
IdCount = { 3 ; }; 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 // ********************************************************************** EOF
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkAdjustment" id="adjustmentIndent">
<property name="upper">990</property>
<property name="step_increment">10</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustmentSpinDegrees">
<property name="upper">359</property>
<property name="step_increment">5</property>
</object>
<object class="GtkGrid" id="CellAlignPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="row_spacing">12</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkFrame" id="orientation">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="labelDegrees">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Degrees</property>
<property name="use_underline">True</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="GtkLabel" id="labelRefEdge">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Reference edge</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">references</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="svtlo-ValueSet" id="references">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="svxlo-WrapField" id="spinDegrees">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
<property name="progress_pulse_step">1</property>
<property name="adjustment">adjustmentSpinDegrees</property>
<property name="wrap">True</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>
</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="svxlo-DialControl" id="dialcontrol">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="active">True</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="GtkGrid" id="grid4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkCheckButton" id="checkVertStack">
<property name="label" translatable="yes">Vertically s_tacked</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0.019999999552965164</property>
<property name="inconsistent">True</property>
<property name="draw_indicator">True</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="GtkCheckButton" id="checkAsianMode">
<property name="label" translatable="yes">Asian layout _mode</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="margin_left">25</property>
<property name="use_underline">True</property>
<property name="xalign">0.5</property>
<property name="inconsistent">True</property>
<property name="draw_indicator">True</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>
</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>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="labelTextOrient">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Text orientation</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</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="GtkFrame" id="properties">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</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">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkCheckButton" id="checkWrapTextAuto">
<property name="label" translatable="yes">_Wrap text automatically</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="inconsistent">True</property>
<property name="draw_indicator">True</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="GtkCheckButton" id="checkShrinkFitCellSize">
<property name="label" translatable="yes">_Shrink to fit cell size</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="inconsistent">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="checkHyphActive">
<property name="label" translatable="yes">Hyphenation _active</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="margin_left">25</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="inconsistent">True</property>
<property name="draw_indicator">True</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>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="labelPropeties">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Properties</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="alignment">
<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="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkSpinButton" id="spinIndentFrom:0.00pt">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustmentIndent</property>
<property name="climb_rate">1</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="GtkLabel" id="labelHorzAlign">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Hori_zontal</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">comboboxHorzAlign</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="GtkLabel" id="labelVertAlign">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Vertical</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">comboboxVertAlign</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="GtkLabel" id="labelIndent">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">I_ndent</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">spinIndentFrom:0.00pt</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="GtkComboBox" id="comboboxHorzAlign">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">liststoreHorzAlign</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="GtkComboBox" id="comboboxVertAlign">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">liststoreVertAlign</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>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="LabelTextAlig">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Text alignment</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</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="GtkHBox" id="boxDirection">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="LabelTxtDir">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Te_xt direction</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">comboTextDirBox</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="svxlo-FrameDirectionListBox" id="comboTextDirBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="boxStrings">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="labelSTR_BOTTOMLOCK">
<property name="can_focus">False</property>
<property name="label" translatable="yes">Text Extension From Lower Cell Border</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="labelSTR_TOPLOCK">
<property name="can_focus">False</property>
<property name="label" translatable="yes">Text Extension From Upper Cell Border</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="labelSTR_CELLLOCK">
<property name="can_focus">False</property>
<property name="label" translatable="yes">Text Extension Inside Cell</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="labelABCD">
<property name="can_focus">False</property>
<property name="label" translatable="yes">ABCD</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<object class="GtkListStore" id="liststoreHorzAlign">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gint1 -->
<column type="gint"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Default</col>
<col id="1">0</col>
</row>
<row>
<col id="0" translatable="yes">Left</col>
<col id="1">1</col>
</row>
<row>
<col id="0" translatable="yes">Center</col>
<col id="1">2</col>
</row>
<row>
<col id="0" translatable="yes">Right</col>
<col id="1">3</col>
</row>
<row>
<col id="0" translatable="yes">Justified</col>
<col id="1">4</col>
</row>
<row>
<col id="0" translatable="yes">Filled</col>
<col id="1">5</col>
</row>
<row>
<col id="0" translatable="yes">Distributed</col>
<col id="1">6</col>
</row>
</data>
</object>
<object class="GtkListStore" id="liststoreVertAlign">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gint1 -->
<column type="gint"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Default</col>
<col id="1">0</col>
</row>
<row>
<col id="0" translatable="yes">Top</col>
<col id="1">1</col>
</row>
<row>
<col id="0" translatable="yes">Middle</col>
<col id="1">2</col>
</row>
<row>
<col id="0" translatable="yes">Bottom</col>
<col id="1">3</col>
</row>
<row>
<col id="0" translatable="yes">Justified</col>
<col id="1">4</col>
</row>
<row>
<col id="0" translatable="yes">Distributed</col>
<col id="1">5</col>
</row>
</data>
</object>
<object class="GtkSizeGroup" id="sizegroup1">
<property name="mode">both</property>
<property name="ignore_hidden">True</property>
<widgets>
<widget name="spinIndentFrom:0.00pt"/>
<widget name="labelHorzAlign"/>
<widget name="labelVertAlign"/>
<widget name="labelIndent"/>
<widget name="comboboxHorzAlign"/>
<widget name="comboboxVertAlign"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="sizegroup2">
<property name="ignore_hidden">True</property>
<widgets>
<widget name="checkWrapTextAuto"/>
<widget name="checkShrinkFitCellSize"/>
<widget name="checkHyphActive"/>
<widget name="LabelTxtDir"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="sizegroup3">
<widgets>
<widget name="orientation"/>
<widget name="properties"/>
<widget name="alignment"/>
<widget name="boxDirection"/>
</widgets>
</object>
</interface>
...@@ -123,6 +123,12 @@ ...@@ -123,6 +123,12 @@
<glade-widget-class title="Tree List" name="svtlo-SvTreeListBox" <glade-widget-class title="Tree List" name="svtlo-SvTreeListBox"
generic-name="Tree List" parent="GtkTreeView" generic-name="Tree List" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/> 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" <glade-widget-class title="VclComboBoxText" name="VclComboBoxText"
generic-name="ComboBoxText" parent="GtkComboBoxText" generic-name="ComboBoxText" parent="GtkComboBoxText"
......
...@@ -51,6 +51,8 @@ class SVX_DLLPUBLIC DialControl : public Control ...@@ -51,6 +51,8 @@ class SVX_DLLPUBLIC DialControl : public Control
{ {
public: public:
explicit DialControl( Window* pParent, const ResId& rResId ); explicit DialControl( Window* pParent, const ResId& rResId );
explicit DialControl( Window* pParent, WinBits nBits );
virtual ~DialControl(); virtual ~DialControl();
virtual void Paint( const Rectangle& rRect ); virtual void Paint( const Rectangle& rRect );
......
...@@ -33,6 +33,7 @@ class SVX_DLLPUBLIC WrapField : public NumericField ...@@ -33,6 +33,7 @@ class SVX_DLLPUBLIC WrapField : public NumericField
{ {
public: public:
explicit WrapField( Window* pParent, const ResId& rResId ); explicit WrapField( Window* pParent, const ResId& rResId );
explicit WrapField( Window* pParent, WinBits nBits );
protected: protected:
/** Up event with wrap-around functionality. */ /** Up event with wrap-around functionality. */
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <vcl/bitmap.hxx> #include <vcl/bitmap.hxx>
#include <vcl/field.hxx> #include <vcl/field.hxx>
#include <svtools/colorcfg.hxx> #include <svtools/colorcfg.hxx>
#include <vcl/builder.hxx>
namespace svx { namespace svx {
...@@ -289,10 +290,22 @@ DialControl::DialControl( Window* pParent, const ResId& rResId ) : ...@@ -289,10 +290,22 @@ DialControl::DialControl( Window* pParent, const ResId& rResId ) :
Init( GetOutputSizePixel() ); Init( GetOutputSizePixel() );
} }
DialControl::DialControl( Window* pParent, WinBits nBits ) :
Control( pParent, nBits ),
mpImpl( new DialControl_Impl( *this ) )
{
Init( GetOutputSizePixel() );
}
DialControl::~DialControl() 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& ) void DialControl::Paint( const Rectangle& )
{ {
Point aPos; Point aPos;
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
#include "svx/wrapfield.hxx" #include "svx/wrapfield.hxx"
#include <vcl/builder.hxx>
namespace svx { namespace svx {
...@@ -26,6 +27,16 @@ WrapField::WrapField( Window* pParent, const ResId& rResId ) : ...@@ -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() void WrapField::Up()
{ {
SetValue( ((GetValue() + GetSpinSize() - GetMin()) % (GetMax() + 1)) + GetMin() ); 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