Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2773
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/73/2773/1
Widget UI for Calc cell alignment page
Format - cell, alignment tab
Change-Id: I78e4252064671720d41ad3af086b41d2efe06ac1
---
M cui/UI_cui.mk
M cui/source/inc/align.hxx
M cui/source/tabpages/align.cxx
M cui/source/tabpages/align.hrc
M cui/source/tabpages/align.src
A cui/uiconfig/ui/cellalignment.ui
M extras/source/glade/libreoffice-catalog.xml.in
M svx/inc/svx/dialcontrol.hxx
M svx/inc/svx/wrapfield.hxx
M svx/source/dialog/dialcontrol.cxx
M svx/source/dialog/wrapfield.cxx
11 files changed, 721 insertions(+), 334 deletions(-)
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index d5bde91..e8a352c 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -13,6 +13,7 @@
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 \
diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
index c47afae..1b2ee61 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -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 @@
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,26 @@
DECL_LINK( UpdateEnableHdl, void* );
private:
- FixedLine maFlAlignment;
- FixedText maFtHorAlign;
- ListBox maLbHorAlign;
- FixedText maFtIndent;
- MetricField maEdIndent;
- FixedText maFtVerAlign;
- ListBox maLbVerAlign;
+ ListBox* m_pLbHorAlign;
+ FixedText* m_pFtIndent;
+ MetricField* m_pEdIndent;
+ ListBox* m_pLbVerAlign;
- FixedLine maFlOrient;
- DialControl maCtrlDial;
- FixedText maFtRotate;
- WrapField maNfRotate;
- FixedText maFtRefEdge;
- ValueSet maVsRefEdge;
- TriStateBox maCbStacked;
- TriStateBox maCbAsianMode;
- OrientationHelper maOrientHlp;
+ DialControl* m_pCtrlDial;
+ FixedText* m_pFtRotate;
+ WrapField* m_pNfRotate;
+ FixedText* m_pFtRefEdge;
+ ValueSet* m_pVsRefEdge;
+ TriStateBox* m_pCbStacked;
+ TriStateBox* m_pCbAsianMode;
+ OrientationHelper* m_pOrientHlp;
- FixedLine maFlProperties;
- TriStateBox maBtnWrap;
- TriStateBox maBtnHyphen;
- TriStateBox maBtnShrink;
- FixedText maFtFrameDir;
- FrameDirListBox maLbFrameDir;
+ VclHBox* m_pBoxDirection;
+ TriStateBox* m_pBtnWrap;
+ TriStateBox* m_pBtnHyphen;
+ TriStateBox* m_pBtnShrink;
+ FrameDirListBox* m_pLbFrameDir;
+
};
// ============================================================================
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index b2aa8a4..96d9942 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -147,97 +147,97 @@
rSet.Put(aItem);
}
-}
+}//namespace
// ============================================================================
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");
+
InitVsRefEgde();
// windows to be disabled, if stacked text is turned ON
- maOrientHlp.AddDependentWindow( maFtRotate, STATE_CHECK );
- maOrientHlp.AddDependentWindow( maFtRefEdge, STATE_CHECK );
- maOrientHlp.AddDependentWindow( maVsRefEdge, STATE_CHECK );
+ m_pOrientHlp->AddDependentWindow( *m_pFtRotate, STATE_CHECK );
+ m_pOrientHlp->AddDependentWindow( *m_pFtRefEdge, STATE_CHECK );
+ m_pOrientHlp->AddDependentWindow( *m_pVsRefEdge, STATE_CHECK );
// 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 );
- maLbHorAlign.SetSelectHdl( aLink );
- maBtnWrap.SetClickHdl( aLink );
+ m_pLbHorAlign->SetSelectHdl( aLink );
+ m_pBtnWrap->SetClickHdl( aLink );
// 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() )
{
- maFtFrameDir.Hide();
- maLbFrameDir.Hide();
+ m_pBoxDirection->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.
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::UInt16MetricConnection( SID_ATTR_ALIGN_INDENT, *m_pEdIndent,
FUNIT_TWIP, sfx::ITEMCONN_HIDE_UNKNOWN ) );
+ AddItemConnection( new VerJustConnection( SID_ATTR_ALIGN_VER_JUSTIFY, *m_pLbVerAlign,
s_pVerJustMap, sfx::ITEMCONN_HIDE_UNKNOWN ) );
+ AddItemConnection( new DialControlConnection( SID_ATTR_ALIGN_DEGREES, *m_pCtrlDial,
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_LOCKPOS, *m_pFtRefEdge,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
+ AddItemConnection( new RotateModeConnection( SID_ATTR_ALIGN_LOCKPOS, *m_pVsRefEdge,
s_pRotateModeMap, sfx::ITEMCONN_HIDE_UNKNOWN ) );
+ AddItemConnection( new OrientStackedConnection( SID_ATTR_ALIGN_STACKED, *m_pOrientHlp ) );
+ AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_STACKED, *m_pCbStacked,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
+ AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_ASIANVERTICAL, *m_pCbAsianMode,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
+ AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_LINEBREAK, *m_pBtnWrap,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
+ AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_HYPHENATION, *m_pBtnHyphen,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
+ AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_SHRINKTOFIT, *m_pBtnShrink,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
+ AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_FRAMEDIRECTION, *m_pBoxDirection,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
+ AddItemConnection( new FrameDirListBoxConnection( SID_ATTR_FRAMEDIRECTION, *m_pLbFrameDir,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
- AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_HOR_JUSTIFY, maFtHorAlign,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
- AddItemConnection( new HorJustConnection( SID_ATTR_ALIGN_HOR_JUSTIFY, maLbHorAlign,
s_pHorJustMap, sfx::ITEMCONN_HIDE_UNKNOWN ) );
- AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_INDENT, maFtIndent,
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_VER_JUSTIFY, maFtVerAlign,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
- AddItemConnection( new VerJustConnection( SID_ATTR_ALIGN_VER_JUSTIFY, maLbVerAlign,
s_pVerJustMap, sfx::ITEMCONN_HIDE_UNKNOWN ) );
- AddItemConnection( new DialControlConnection( SID_ATTR_ALIGN_DEGREES, maCtrlDial,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
- AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_DEGREES, maFtRotate,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
- AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_LOCKPOS, maFtRefEdge,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
- AddItemConnection( new RotateModeConnection( SID_ATTR_ALIGN_LOCKPOS, maVsRefEdge,
s_pRotateModeMap, sfx::ITEMCONN_HIDE_UNKNOWN ) );
- AddItemConnection( new OrientStackedConnection( SID_ATTR_ALIGN_STACKED, maOrientHlp ) );
- AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_STACKED, maCbStacked,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
- AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_ASIANVERTICAL, maCbAsianMode,
sfx::ITEMCONN_HIDE_UNKNOWN ) );
- AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_LINEBREAK, maBtnWrap,
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()
{
+ delete m_pOrientHlp;
}
SfxTabPage* AlignmentTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet )
@@ -258,12 +258,12 @@
// method to 'distribute' to distinguish from the normal justification.
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)
bChanged = HasAlignmentChanged(rSet, nWhichHorJM);
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)
bChanged = HasAlignmentChanged(rSet, nWhichVerJM);
@@ -278,12 +278,12 @@
// method to 'distribute' to distinguish from the normal justification.
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),
SVX_HOR_JUSTIFY_BLOCK);
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),
SVX_VER_JUSTIFY_BLOCK);
@@ -310,50 +310,46 @@
void AlignmentTabPage::InitVsRefEgde()
{
// 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() );
ImageList aImageList( aResId );
Size aItemSize( aImageList.GetImage( IID_BOTTOMLOCK ).GetSizePixel() );
- maVsRefEdge.Clear();
- maVsRefEdge.SetStyle( maVsRefEdge.GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER );
+ m_pVsRefEdge->Clear();
+ m_pVsRefEdge->SetStyle( m_pVsRefEdge->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER );
- maVsRefEdge.SetColCount( 3 );
- maVsRefEdge.InsertItem( IID_BOTTOMLOCK, aImageList.GetImage( IID_BOTTOMLOCK ), String(
CUI_RES( STR_BOTTOMLOCK ) ) );
- maVsRefEdge.InsertItem( IID_TOPLOCK, aImageList.GetImage( IID_TOPLOCK ), String(
CUI_RES( STR_TOPLOCK ) ) );
- maVsRefEdge.InsertItem( IID_CELLLOCK, aImageList.GetImage( IID_CELLLOCK ), String(
CUI_RES( STR_CELLLOCK ) ) );
+ m_pVsRefEdge->SetColCount( 3 );
+ m_pVsRefEdge->InsertItem( IID_BOTTOMLOCK, aImageList.GetImage( IID_BOTTOMLOCK ), OUString(
CUI_RES( STR_BOTTOMLOCK ) ) );
+ m_pVsRefEdge->InsertItem( IID_TOPLOCK, aImageList.GetImage( IID_TOPLOCK ), OUString(
CUI_RES( STR_TOPLOCK ) ) );
+ m_pVsRefEdge->InsertItem( IID_CELLLOCK, aImageList.GetImage( IID_CELLLOCK ), OUString(
CUI_RES( STR_CELLLOCK ) ) );
- maVsRefEdge.SetSizePixel( maVsRefEdge.CalcWindowSizePixel( aItemSize ) );
+ m_pVsRefEdge->SetSizePixel( m_pVsRefEdge->CalcWindowSizePixel( aItemSize ) );
- maVsRefEdge.SelectItem( nSel );
+ m_pVsRefEdge->SelectItem( nSel );
}
void AlignmentTabPage::UpdateEnableControls()
{
- sal_uInt16 nHorAlign = maLbHorAlign.GetSelectEntryPos();
+ sal_uInt16 nHorAlign = m_pLbHorAlign->GetSelectEntryPos();
bool bHorLeft = (nHorAlign == ALIGNDLG_HORALIGN_LEFT);
bool bHorBlock = (nHorAlign == ALIGNDLG_HORALIGN_BLOCK);
bool bHorFill = (nHorAlign == ALIGNDLG_HORALIGN_FILL);
bool bHorDist = (nHorAlign == ALIGNDLG_HORALIGN_DISTRIBUTED);
// indent edit field only for left alignment
- maFtIndent.Enable( bHorLeft );
- maEdIndent.Enable( bHorLeft );
+ m_pFtIndent->Enable( bHorLeft );
+ m_pEdIndent->Enable( bHorLeft );
// rotation/stacked disabled for fill alignment
- maOrientHlp.Enable( !bHorFill );
+ m_pOrientHlp->Enable( !bHorFill );
// 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.
- 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
diff --git a/cui/source/tabpages/align.hrc b/cui/source/tabpages/align.hrc
index 4f7b79b..6bc68ad 100644
--- a/cui/source/tabpages/align.hrc
+++ b/cui/source/tabpages/align.hrc
@@ -16,51 +16,8 @@
* 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
@@ -72,6 +29,5 @@
#define STR_TOPLOCK 2
#define STR_CELLLOCK 3
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/align.src b/cui/source/tabpages/align.src
index 958af09..de47a39 100644
--- a/cui/source/tabpages/align.src
+++ b/cui/source/tabpages/align.src
@@ -30,188 +30,6 @@
// 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
{
Prefix = "lo";
diff --git a/cui/uiconfig/ui/cellalignment.ui b/cui/uiconfig/ui/cellalignment.ui
new file mode 100644
index 0000000..8b42771
--- /dev/null
+++ b/cui/uiconfig/ui/cellalignment.ui
@@ -0,0 +1,564 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <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>
+ </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="label" translatable="yes">ABCD</property>
+ <property name="justify">center</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </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>
+ </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>
+ </object>
+ <object class="GtkAdjustment" id="adjustmentSpinDegrees">
+ <property name="upper">359</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </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"/>
+ </widgets>
+ </object>
+</interface>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in
b/extras/source/glade/libreoffice-catalog.xml.in
index f69393d..654ff41 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -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="GtkLabel"
+ icon-name="widget-gtk-label"/>
+ <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"
diff --git a/svx/inc/svx/dialcontrol.hxx b/svx/inc/svx/dialcontrol.hxx
index 0f37a2f..578695d 100644
--- a/svx/inc/svx/dialcontrol.hxx
+++ b/svx/inc/svx/dialcontrol.hxx
@@ -51,6 +51,8 @@
{
public:
explicit DialControl( Window* pParent, const ResId& rResId );
+ explicit DialControl( Window* pParent, WinBits nBits );
+
virtual ~DialControl();
virtual void Paint( const Rectangle& rRect );
diff --git a/svx/inc/svx/wrapfield.hxx b/svx/inc/svx/wrapfield.hxx
index d79185f..c8fa94e 100644
--- a/svx/inc/svx/wrapfield.hxx
+++ b/svx/inc/svx/wrapfield.hxx
@@ -33,6 +33,7 @@
{
public:
explicit WrapField( Window* pParent, const ResId& rResId );
+ explicit WrapField( Window* pParent, WinBits nBits );
protected:
/** Up event with wrap-around functionality. */
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx
index 95f67de..2adb5a5 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -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 @@
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_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP);
+}
+
void DialControl::Paint( const Rectangle& )
{
Point aPos;
diff --git a/svx/source/dialog/wrapfield.cxx b/svx/source/dialog/wrapfield.cxx
index 0df7da55..1af54f8 100644
--- a/svx/source/dialog/wrapfield.cxx
+++ b/svx/source/dialog/wrapfield.cxx
@@ -18,6 +18,7 @@
*/
#include "svx/wrapfield.hxx"
+#include <vcl/builder.hxx>
namespace svx {
@@ -26,6 +27,22 @@
{
}
+WrapField::WrapField( Window* pParent, WinBits nBits ) :
+ NumericField( pParent, nBits )
+{
+}
+
+//WrapField::~WrapField()
+//{
+//}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeWrapField(Window *pParent,
VclBuilder::stringmap &)
+{
+ return new WrapField(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP);
+}
+
+
+
void WrapField::Up()
{
SetValue( ((GetValue() + GetSpinSize() - GetMin()) % (GetMax() + 1)) + GetMin() );
--
To view, visit https://gerrit.libreoffice.org/2773
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I78e4252064671720d41ad3af086b41d2efe06ac1
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Olivier Hallot <olivier.hallot@alta.org.br>
Context
- [PATCH] Widget UI for Calc cell alignment page · Olivier Hallot (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.