[Libreoffice-commits] core.git: chart2/AllLangResTarget_chartcontroller.mk chart2/source chart2/uiconfig chart2/UIConfig_chart2.mk extras/source svtools/source

Olivier Hallot olivier.hallot at edx.srv.br
Wed Nov 20 02:28:16 PST 2013


 chart2/AllLangResTarget_chartcontroller.mk     |    1 
 chart2/UIConfig_chart2.mk                      |    1 
 chart2/source/controller/dialogs/tp_Scale.cxx  |  576 ++++++++----------------
 chart2/source/controller/dialogs/tp_Scale.hrc  |   55 --
 chart2/source/controller/dialogs/tp_Scale.hxx  |   57 +-
 chart2/source/controller/dialogs/tp_Scale.src  |  328 -------------
 chart2/uiconfig/ui/tp_Scale.ui                 |  596 +++++++++++++++++++++++++
 extras/source/glade/libreoffice-catalog.xml.in |    3 
 svtools/source/control/fmtfield.cxx            |    6 
 9 files changed, 830 insertions(+), 793 deletions(-)

New commits:
commit 19956d09e0e97aa7357edf14fef2b79c2af11dc1
Author: Olivier Hallot <olivier.hallot at edx.srv.br>
Date:   Wed Nov 20 06:40:17 2013 -0200

    Convert chart axis scale tab page to widget UI.
    
    Obs:
    -Several widget positioning methods turned useless and were deleted
    -Corner case related to axis origin untested (couldn't find where it is used)
    
    Change-Id: I6a563c89ddcfbff62494ce7726f3e7d6089e6b57
    Reviewed-on: https://gerrit.libreoffice.org/6730
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/chart2/AllLangResTarget_chartcontroller.mk b/chart2/AllLangResTarget_chartcontroller.mk
index 4c94128..beffd0c 100644
--- a/chart2/AllLangResTarget_chartcontroller.mk
+++ b/chart2/AllLangResTarget_chartcontroller.mk
@@ -59,7 +59,6 @@ $(eval $(call gb_SrsTarget_add_files,chart2/res,\
     chart2/source/controller/dialogs/tp_PointGeometry.src \
     chart2/source/controller/dialogs/tp_PolarOptions.src \
     chart2/source/controller/dialogs/tp_RangeChooser.src \
-    chart2/source/controller/dialogs/tp_Scale.src \
     chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.src \
 ))
 
diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk
index a1e6b3c..f425f09 100644
--- a/chart2/UIConfig_chart2.mk
+++ b/chart2/UIConfig_chart2.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
 	chart2/uiconfig/ui/titlerotationtabpage \
 	chart2/uiconfig/ui/tp_axisLabel \
 	chart2/uiconfig/ui/tp_SeriesToAxis \
+	chart2/uiconfig/ui/tp_Scale \
 	chart2/uiconfig/ui/tp_Trendline \
 ))
 
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index d0d0c6c..ee34d0c 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -18,7 +18,6 @@
  */
 
 #include "tp_Scale.hxx"
-#include "tp_Scale.hrc"
 
 #include "ResId.hxx"
 #include "Strings.hrc"
@@ -52,37 +51,6 @@ namespace chart
 namespace
 {
 
-void lcl_placeControlAtX( Control& rControl, long nNewXPos )
-{
-    Point aPos( rControl.GetPosPixel() );
-    aPos.X() = nNewXPos;
-    rControl.SetPosPixel(aPos);
-}
-
-void lcl_placeControlAtY( Control& rControl, long nNewYPos )
-{
-    Point aPos( rControl.GetPosPixel() );
-    aPos.Y() = nNewYPos;
-    rControl.SetPosPixel(aPos);
-}
-
-void lcl_shiftControls( Control& rEdit, Control& rAuto, long nNewXPos )
-{
-    Point aPos( rEdit.GetPosPixel() );
-    long nShift = nNewXPos - aPos.X();
-    aPos.X() = nNewXPos;
-    rEdit.SetPosPixel(aPos);
-
-    aPos = rAuto.GetPosPixel();
-    aPos.X() += nShift;
-    rAuto.SetPosPixel(aPos);
-}
-
-long lcl_getLabelDistance( Control& rControl )
-{
-    return rControl.LogicToPixel( Size(RSC_SP_CTRL_DESC_X, 0), MapMode(MAP_APPFONT) ).Width();
-}
-
 void lcl_setValue( FormattedField& rFmtField, double fValue )
 {
     rFmtField.SetValue( fValue );
@@ -92,44 +60,10 @@ void lcl_setValue( FormattedField& rFmtField, double fValue )
 }
 
 ScaleTabPage::ScaleTabPage(Window* pWindow,const SfxItemSet& rInAttrs) :
-    SfxTabPage(pWindow, SchResId(TP_SCALE), rInAttrs),
-
-    aFlScale(this, SchResId(FL_SCALE)),
-
-    aCbxReverse(this, SchResId(CBX_REVERSE)),
-    aCbxLogarithm(this, SchResId(CBX_LOGARITHM)),
-
-    m_aTxt_AxisType(this, SchResId (TXT_AXIS_TYPE)),
-    m_aLB_AxisType(this, SchResId(LB_AXIS_TYPE)),
-
-    aTxtMin (this, SchResId (TXT_MIN)),
-    aFmtFldMin(this, SchResId(EDT_MIN)),
-    aCbxAutoMin(this, SchResId(CBX_AUTO_MIN)),
-
-    aTxtMax(this, SchResId (TXT_MAX)),
-    aFmtFldMax(this, SchResId(EDT_MAX)),
-    aCbxAutoMax(this, SchResId(CBX_AUTO_MAX)),
-
-    m_aTxt_TimeResolution(this, SchResId (TXT_TIME_RESOLUTION)),
-    m_aLB_TimeResolution(this, SchResId(LB_TIME_RESOLUTION)),
-    m_aCbx_AutoTimeResolution(this, SchResId(CBX_AUTO_TIME_RESOLUTION)),
-
-    aTxtMain (this, SchResId (TXT_STEP_MAIN)),
-    aFmtFldStepMain(this, SchResId(EDT_STEP_MAIN)),
-    m_aMt_MainDateStep(this, SchResId(MT_MAIN_DATE_STEP)),
-    m_aLB_MainTimeUnit(this, SchResId(LB_MAIN_TIME_UNIT)),
-    aCbxAutoStepMain(this, SchResId(CBX_AUTO_STEP_MAIN)),
-
-    aTxtHelpCount (this, SchResId (TXT_STEP_HELP_COUNT)),
-    aTxtHelp (this, SchResId (TXT_STEP_HELP)),
-    aMtStepHelp (this, SchResId (MT_STEPHELP)),
-    m_aLB_HelpTimeUnit(this, SchResId(LB_HELP_TIME_UNIT)),
-    aCbxAutoStepHelp(this, SchResId(CBX_AUTO_STEP_HELP)),
-
-    aTxtOrigin (this, SchResId (TXT_ORIGIN)),
-    aFmtFldOrigin(this, SchResId(EDT_ORIGIN)),
-    aCbxAutoOrigin(this, SchResId(CBX_AUTO_ORIGIN)),
-
+    SfxTabPage(pWindow
+               , "tp_Scale"
+               , "modules/schart/ui/tp_Scale.ui"
+               , rInAttrs),
     fMin(0.0),
     fMax(0.0),
     fStepMain(0.0),
@@ -143,27 +77,56 @@ ScaleTabPage::ScaleTabPage(Window* pWindow,const SfxItemSet& rInAttrs) :
     pNumFormatter(NULL),
     m_bShowAxisOrigin(false)
 {
-    FreeResource();
-    SetExchangeSupport();
-
-    aCbxAutoMin.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl));
-    aCbxAutoMax.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl));
-    aCbxAutoStepMain.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl));
-    aCbxAutoStepHelp.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl));
-    aCbxAutoOrigin.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl));
-    m_aCbx_AutoTimeResolution.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl));
-
-    m_aLB_AxisType.SetDropDownLineCount(3);
-    m_aLB_AxisType.SetSelectHdl(LINK(this, ScaleTabPage, SelectAxisTypeHdl));
-
-    m_aLB_TimeResolution.SetDropDownLineCount(3);
-    m_aLB_MainTimeUnit.SetDropDownLineCount(3);
-    m_aLB_HelpTimeUnit.SetDropDownLineCount(3);
-
-    aFmtFldMin.SetModifyHdl(LINK(this, ScaleTabPage, FmtFieldModifiedHdl));
-    aFmtFldMax.SetModifyHdl(LINK(this, ScaleTabPage, FmtFieldModifiedHdl));
-    aFmtFldStepMain.SetModifyHdl(LINK(this, ScaleTabPage, FmtFieldModifiedHdl));
-    aFmtFldOrigin.SetModifyHdl(LINK(this, ScaleTabPage, FmtFieldModifiedHdl));
+    get(m_pCbxReverse, "CBX_REVERSE");
+    get(m_pCbxLogarithm, "CBX_LOGARITHM");
+    get(m_pLB_AxisType, "LB_AXIS_TYPE");
+    get(m_pBxType,"boxTYPE");
+
+    get(m_pBxMinMax, "gridMINMAX");
+    get(m_pFmtFldMin, "EDT_MIN");
+    get(m_pCbxAutoMin, "CBX_AUTO_MIN");
+    get(m_pFmtFldMax, "EDT_MAX");
+    get(m_pCbxAutoMax, "CBX_AUTO_MAX");
+
+    get(m_pBxResolution, "boxRESOLUTION");
+    get(m_pLB_TimeResolution, "LB_TIME_RESOLUTION");
+    get(m_pCbx_AutoTimeResolution, "CBX_AUTO_TIME_RESOLUTION");
+
+    get(m_pBxMain, "boxMAIN");
+    get(m_pFmtFldStepMain, "EDT_STEP_MAIN");
+    get(m_pMt_MainDateStep, "MT_MAIN_DATE_STEP");
+    get(m_pLB_MainTimeUnit, "LB_MAIN_TIME_UNIT");
+    get(m_pCbxAutoStepMain, "CBX_AUTO_STEP_MAIN");
+
+    get(m_pBxMinor, "boxMINOR");
+    get(m_pMtStepHelp, "MT_STEPHELP");
+    get(m_pLB_HelpTimeUnit, "LB_HELP_TIME_UNIT");
+    get(m_pCbxAutoStepHelp, "CBX_AUTO_STEP_HELP");
+    get(m_pTxtHelpCount,"TXT_STEP_HELP_COUNT");
+    get(m_pTxtHelp,"TXT_STEP_HELP");
+
+    get(m_pBxOrigin,"boxORIGIN");
+    get(m_pFmtFldOrigin, "EDT_ORIGIN");
+    get(m_pCbxAutoOrigin, "CBX_AUTO_ORIGIN");
+
+    m_pCbxAutoMin->SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl));
+    m_pCbxAutoMax->SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl));
+    m_pCbxAutoStepMain->SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl));
+    m_pCbxAutoStepHelp->SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl));
+    m_pCbxAutoOrigin->SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl));
+    m_pCbx_AutoTimeResolution->SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl));
+
+    m_pLB_AxisType->SetDropDownLineCount(3);
+    m_pLB_AxisType->SetSelectHdl(LINK(this, ScaleTabPage, SelectAxisTypeHdl));
+
+    m_pLB_TimeResolution->SetDropDownLineCount(3);
+    m_pLB_MainTimeUnit->SetDropDownLineCount(3);
+    m_pLB_HelpTimeUnit->SetDropDownLineCount(3);
+
+    m_pFmtFldMin->SetModifyHdl(LINK(this, ScaleTabPage, FmtFieldModifiedHdl));
+    m_pFmtFldMax->SetModifyHdl(LINK(this, ScaleTabPage, FmtFieldModifiedHdl));
+    m_pFmtFldStepMain->SetModifyHdl(LINK(this, ScaleTabPage, FmtFieldModifiedHdl));
+    m_pFmtFldOrigin->SetModifyHdl(LINK(this, ScaleTabPage, FmtFieldModifiedHdl));
 
     HideAllControls();
 }
@@ -178,195 +141,81 @@ IMPL_LINK( ScaleTabPage, FmtFieldModifiedHdl, FormattedField*, pFmtFied )
 void ScaleTabPage::StateChanged( StateChangedType nType )
 {
     TabPage::StateChanged( nType );
-
-    if( nType == STATE_CHANGE_INITSHOW )
-        AdjustControlPositions();
 }
 
-void ScaleTabPage::AdjustControlPositions()
-{
-    //optimize position of the controls
-    long nLabelWidth = ::std::max( aTxtMin.CalcMinimumSize().Width(), aTxtMax.CalcMinimumSize().Width() );
-    nLabelWidth = ::std::max( aTxtMain.CalcMinimumSize().Width(), nLabelWidth );
-    nLabelWidth = ::std::max( aTxtHelp.CalcMinimumSize().Width(), nLabelWidth );
-    nLabelWidth = ::std::max( aTxtHelpCount.CalcMinimumSize().Width(), nLabelWidth );
-    nLabelWidth = ::std::max( aTxtOrigin.CalcMinimumSize().Width(), nLabelWidth );
-    nLabelWidth = ::std::max( m_aTxt_TimeResolution.CalcMinimumSize().Width(), nLabelWidth );
-    nLabelWidth = ::std::max( m_aTxt_AxisType.CalcMinimumSize().Width(), nLabelWidth );
-    nLabelWidth+=1;
-
-    long nLabelDistance = lcl_getLabelDistance(aTxtMin);
-    long nNewXPos = aTxtMin.GetPosPixel().X() + nLabelWidth + nLabelDistance;
-
-    //ensure that the auto checkboxes are wide enough and have correct size for calculation
-    aCbxAutoMin.SetSizePixel( aCbxAutoMin.CalcMinimumSize() );
-    aCbxAutoMax.SetSizePixel( aCbxAutoMax.CalcMinimumSize() );
-    aCbxAutoStepMain.SetSizePixel( aCbxAutoStepMain.CalcMinimumSize() );
-    aCbxAutoStepHelp.SetSizePixel( aCbxAutoStepHelp.CalcMinimumSize() );
-    aCbxAutoOrigin.SetSizePixel( aCbxAutoOrigin.CalcMinimumSize() );
-    m_aCbx_AutoTimeResolution.SetSizePixel( m_aCbx_AutoTimeResolution.CalcMinimumSize() );
-
-    //ensure new pos is ok
-    long nWidthOfOtherControls = m_aLB_MainTimeUnit.GetPosPixel().X() + m_aLB_MainTimeUnit.GetSizePixel().Width() - aFmtFldMin.GetPosPixel().X();
-    long nDialogWidth = GetSizePixel().Width();
-
-    long nLeftSpace = nDialogWidth - nNewXPos - nWidthOfOtherControls;
-    if(nLeftSpace>=0)
-    {
-        Size aSize( aTxtMin.GetSizePixel() );
-        aSize.Width() = nLabelWidth;
-        aTxtMin.SetSizePixel(aSize);
-        aTxtMax.SetSizePixel(aSize);
-        aTxtMain.SetSizePixel(aSize);
-        aTxtHelp.SetSizePixel(aSize);
-        aTxtHelpCount.SetSizePixel(aSize);
-        aTxtOrigin.SetSizePixel(aSize);
-        m_aTxt_TimeResolution.SetSizePixel(aSize);
-        m_aTxt_AxisType.SetSizePixel(aSize);
-
-        long nOrgAutoCheckX = aCbxAutoMin.GetPosPixel().X();
-        lcl_placeControlAtX( aCbxAutoStepMain, nOrgAutoCheckX );
-        lcl_placeControlAtX( aCbxAutoStepHelp, nOrgAutoCheckX );
-
-        lcl_shiftControls( aFmtFldMin, aCbxAutoMin, nNewXPos );
-        lcl_shiftControls( aFmtFldMax, aCbxAutoMax, nNewXPos );
-        lcl_shiftControls( aFmtFldStepMain, aCbxAutoStepMain, nNewXPos );
-        lcl_placeControlAtX( m_aMt_MainDateStep, aFmtFldStepMain.GetPosPixel().X() );
-        lcl_shiftControls( aMtStepHelp, aCbxAutoStepHelp, nNewXPos );
-        lcl_shiftControls( aFmtFldOrigin, aCbxAutoOrigin, nNewXPos );
-        lcl_shiftControls( m_aLB_TimeResolution, m_aCbx_AutoTimeResolution, nNewXPos );
-        lcl_placeControlAtX( m_aLB_AxisType, nNewXPos );
-
-        nNewXPos = aCbxAutoStepMain.GetPosPixel().X() + aCbxAutoStepMain.GetSizePixel().Width() + nLabelDistance;
-        lcl_placeControlAtX( m_aLB_MainTimeUnit, nNewXPos );
-        lcl_placeControlAtX( m_aLB_HelpTimeUnit, nNewXPos );
-    }
-    PlaceIntervalControlsAccordingToAxisType();
-}
-
-void ScaleTabPage::PlaceIntervalControlsAccordingToAxisType()
+void ScaleTabPage::EnableControls()
 {
-    long nMinX = std::min( aCbxAutoStepMain.GetPosPixel().X(), m_aLB_MainTimeUnit.GetPosPixel().X() );
-    long nLabelDistance = lcl_getLabelDistance(aTxtMin);
-    long nListWidth = m_aLB_MainTimeUnit.GetSizePixel().Width();
+    bool bValueAxis = chart2::AxisType::REALNUMBER == m_nAxisType
+                   || chart2::AxisType::PERCENT == m_nAxisType
+                   || chart2::AxisType::DATE == m_nAxisType;
+    bool bDateAxis = chart2::AxisType::DATE == m_nAxisType;
 
-    if( chart2::AxisType::DATE == m_nAxisType )
-    {
-        lcl_placeControlAtX( m_aLB_MainTimeUnit, nMinX );
-        lcl_placeControlAtX( m_aLB_HelpTimeUnit, nMinX );
-        long nSecondX = nMinX + nListWidth + nLabelDistance;
-        lcl_placeControlAtX( aCbxAutoStepMain, nSecondX );
-        lcl_placeControlAtX( aCbxAutoStepHelp, nSecondX );
+    m_pBxType->Show(m_bAllowDateAxis);
 
-        long nOne = m_aMt_MainDateStep.LogicToPixel( Size(0, 1), MapMode(MAP_APPFONT) ).Height();
+    m_pCbxLogarithm->Show( bValueAxis && !bDateAxis );
 
-        long nYMajor = m_aMt_MainDateStep.GetPosPixel().Y();
-        lcl_placeControlAtY( aCbxAutoStepMain , nYMajor+(3*nOne));
-        lcl_placeControlAtY( aTxtMain , nYMajor+nOne+nOne);
+    m_pBxMinMax->Show(bValueAxis);
+    m_pBxMain->Show( bValueAxis );
+    m_pBxMinor->Show( bValueAxis );
+    m_pBxOrigin->Show( m_bShowAxisOrigin && bValueAxis );
 
-        long nYMinor = m_aLB_HelpTimeUnit.GetPosPixel().Y();
-        lcl_placeControlAtY( aMtStepHelp , nYMinor );
-        lcl_placeControlAtY( aCbxAutoStepHelp , nYMinor+(3*nOne));
-    }
-    else
-    {
-        lcl_placeControlAtX( aCbxAutoStepMain, nMinX );
-        lcl_placeControlAtX( aCbxAutoStepHelp, nMinX );
-        long nSecondX = nMinX + aCbxAutoStepMain.GetSizePixel().Width() + nLabelDistance;
-        long nSecondXMax = GetSizePixel().Width() - nListWidth;
-        if( nSecondX > nSecondXMax )
-            nSecondX = nSecondXMax;
-        lcl_placeControlAtX( m_aLB_MainTimeUnit, nSecondX );
-        lcl_placeControlAtX( m_aLB_HelpTimeUnit, nSecondX );
-    }
-}
+    m_pTxtHelpCount->Show( bValueAxis && !bDateAxis );
+    m_pTxtHelp->Show( bDateAxis );
 
-void ScaleTabPage::EnableControls()
-{
-    bool bValueAxis = chart2::AxisType::REALNUMBER == m_nAxisType || chart2::AxisType::PERCENT == m_nAxisType || chart2::AxisType::DATE == m_nAxisType;
-    bool bDateAxis = chart2::AxisType::DATE == m_nAxisType;
+    m_pBxResolution->Show( bDateAxis );
 
-    m_aTxt_AxisType.Show(m_bAllowDateAxis);
-    m_aLB_AxisType.Show(m_bAllowDateAxis);
-
-    aCbxLogarithm.Show( bValueAxis && !bDateAxis );
-    aTxtMin.Show( bValueAxis );
-    aFmtFldMin.Show( bValueAxis );
-    aCbxAutoMin.Show( bValueAxis );
-    aTxtMax.Show( bValueAxis );
-    aFmtFldMax.Show( bValueAxis );
-    aCbxAutoMax.Show( bValueAxis );
-    aTxtMain.Show( bValueAxis );
-    aFmtFldStepMain.Show( bValueAxis );
-    aCbxAutoStepMain.Show( bValueAxis );
-    aTxtHelp.Show( bValueAxis );
-    aTxtHelpCount.Show( bValueAxis );
-    aMtStepHelp.Show( bValueAxis );
-    aCbxAutoStepHelp.Show( bValueAxis );
-
-    aTxtOrigin.Show( m_bShowAxisOrigin && bValueAxis );
-    aFmtFldOrigin.Show( m_bShowAxisOrigin && bValueAxis );
-    aCbxAutoOrigin.Show( m_bShowAxisOrigin && bValueAxis );
-
-    aTxtHelpCount.Show( bValueAxis && !bDateAxis );
-    aTxtHelp.Show( bDateAxis );
-
-    m_aTxt_TimeResolution.Show( bDateAxis );
-    m_aLB_TimeResolution.Show( bDateAxis );
-    m_aCbx_AutoTimeResolution.Show( bDateAxis );
-
-    bool bWasDateAxis = m_aMt_MainDateStep.IsVisible();
+    bool bWasDateAxis = m_pMt_MainDateStep->IsVisible();
     if( bWasDateAxis != bDateAxis )
     {
         //transport value from one to other control
         if( bWasDateAxis )
-            lcl_setValue( aFmtFldStepMain, m_aMt_MainDateStep.GetValue() );
+            lcl_setValue( *m_pFmtFldStepMain, m_pMt_MainDateStep->GetValue() );
         else
-            m_aMt_MainDateStep.SetValue( static_cast<sal_Int32>(aFmtFldStepMain.GetValue()) );
+            m_pMt_MainDateStep->SetValue( static_cast<sal_Int32>(m_pFmtFldStepMain->GetValue()) );
     }
-    aFmtFldStepMain.Show( bValueAxis && !bDateAxis );
-    m_aMt_MainDateStep.Show( bDateAxis );
-
-    m_aLB_MainTimeUnit.Show( bDateAxis );
-    m_aLB_HelpTimeUnit.Show( bDateAxis );
-
-    EnableValueHdl(&aCbxAutoMin);
-    EnableValueHdl(&aCbxAutoMax);
-    EnableValueHdl(&aCbxAutoStepMain);
-    EnableValueHdl(&aCbxAutoStepHelp);
-    EnableValueHdl(&aCbxAutoOrigin);
-    EnableValueHdl(&m_aCbx_AutoTimeResolution);
+    m_pFmtFldStepMain->Show( bValueAxis && !bDateAxis );
+    m_pMt_MainDateStep->Show( bDateAxis );
+
+    m_pLB_MainTimeUnit->Show( bDateAxis );
+    m_pLB_HelpTimeUnit->Show( bDateAxis );
+
+    EnableValueHdl(m_pCbxAutoMin);
+    EnableValueHdl(m_pCbxAutoMax);
+    EnableValueHdl(m_pCbxAutoStepMain);
+    EnableValueHdl(m_pCbxAutoStepHelp);
+    EnableValueHdl(m_pCbxAutoOrigin);
+    EnableValueHdl(m_pCbx_AutoTimeResolution);
 }
 
 IMPL_LINK( ScaleTabPage, EnableValueHdl, CheckBox *, pCbx )
 {
     bool bEnable = pCbx && !pCbx->IsChecked() && pCbx->IsEnabled();
-    if (pCbx == &aCbxAutoMin)
+    if (pCbx == m_pCbxAutoMin)
     {
-        aFmtFldMin.Enable( bEnable );
+        m_pFmtFldMin->Enable( bEnable );
     }
-    else if (pCbx == &aCbxAutoMax)
+    else if (pCbx == m_pCbxAutoMax)
     {
-        aFmtFldMax.Enable( bEnable );
+        m_pFmtFldMax->Enable( bEnable );
     }
-    else if (pCbx == &aCbxAutoStepMain)
+    else if (pCbx == m_pCbxAutoStepMain)
     {
-        aFmtFldStepMain.Enable( bEnable );
-        m_aMt_MainDateStep.Enable( bEnable );
-        m_aLB_MainTimeUnit.Enable( bEnable );
+        m_pFmtFldStepMain->Enable( bEnable );
+        m_pMt_MainDateStep->Enable( bEnable );
+        m_pLB_MainTimeUnit->Enable( bEnable );
     }
-    else if (pCbx == &aCbxAutoStepHelp)
+    else if (pCbx == m_pCbxAutoStepHelp)
     {
-        aMtStepHelp.Enable( bEnable );
-        m_aLB_HelpTimeUnit.Enable( bEnable );
+        m_pMtStepHelp->Enable( bEnable );
+        m_pLB_HelpTimeUnit->Enable( bEnable );
     }
-    else if (pCbx == &m_aCbx_AutoTimeResolution)
+    else if (pCbx == m_pCbx_AutoTimeResolution)
     {
-        m_aLB_TimeResolution.Enable( bEnable );
+        m_pLB_TimeResolution->Enable( bEnable );
     }
-    else if (pCbx == &aCbxAutoOrigin)
+    else if (pCbx == m_pCbxAutoOrigin)
     {
-        aFmtFldOrigin.Enable( bEnable );
+        m_pFmtFldOrigin->Enable( bEnable );
     }
     return 0;
 }
@@ -380,15 +229,14 @@ enum AxisTypeListBoxEntry
 
 IMPL_LINK_NOARG(ScaleTabPage, SelectAxisTypeHdl)
 {
-    sal_uInt16 nPos = m_aLB_AxisType.GetSelectEntryPos();
+    sal_uInt16 nPos = m_pLB_AxisType->GetSelectEntryPos();
     if( nPos==TYPE_DATE )
         m_nAxisType = chart2::AxisType::DATE;
     else
         m_nAxisType = chart2::AxisType::CATEGORY;
     if( chart2::AxisType::DATE == m_nAxisType )
-        aCbxLogarithm.Check(false);
+        m_pCbxLogarithm->Check(false);
     EnableControls();
-    PlaceIntervalControlsAccordingToAxisType();
     SetNumFormat();
     return 0;
 }
@@ -404,27 +252,27 @@ sal_Bool ScaleTabPage::FillItemSet(SfxItemSet& rOutAttrs)
 
     rOutAttrs.Put(SfxInt32Item(SCHATTR_AXISTYPE, m_nAxisType));
     if(m_bAllowDateAxis)
-        rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_DATEAXIS, TYPE_AUTO==m_aLB_AxisType.GetSelectEntryPos()));
+        rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_DATEAXIS, TYPE_AUTO==m_pLB_AxisType->GetSelectEntryPos()));
 
     bool bAutoScale = false;
     if( m_nAxisType==chart2::AxisType::CATEGORY )
         bAutoScale = true;//reset scaling for category charts
 
-    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_MIN      ,bAutoScale || aCbxAutoMin.IsChecked()));
-    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_MAX      ,bAutoScale || aCbxAutoMax.IsChecked()));
-    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_HELP,bAutoScale || aCbxAutoStepHelp.IsChecked()));
-    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_ORIGIN   ,bAutoScale || aCbxAutoOrigin.IsChecked()));
-    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_LOGARITHM     ,aCbxLogarithm.IsChecked()));
-    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_REVERSE       ,aCbxReverse.IsChecked()));
+    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_MIN      ,bAutoScale || m_pCbxAutoMin->IsChecked()));
+    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_MAX      ,bAutoScale || m_pCbxAutoMax->IsChecked()));
+    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_HELP,bAutoScale || m_pCbxAutoStepHelp->IsChecked()));
+    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_ORIGIN   ,bAutoScale || m_pCbxAutoOrigin->IsChecked()));
+    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_LOGARITHM     ,m_pCbxLogarithm->IsChecked()));
+    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_REVERSE       ,m_pCbxReverse->IsChecked()));
     rOutAttrs.Put(SvxDoubleItem(fMax     , SCHATTR_AXIS_MAX));
     rOutAttrs.Put(SvxDoubleItem(fMin     , SCHATTR_AXIS_MIN));
     rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_STEP_HELP, nStepHelp));
     rOutAttrs.Put(SvxDoubleItem(fOrigin  , SCHATTR_AXIS_ORIGIN));
 
-    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_MAIN,bAutoScale || aCbxAutoStepMain.IsChecked()));
+    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_MAIN,bAutoScale || m_pCbxAutoStepMain->IsChecked()));
     rOutAttrs.Put(SvxDoubleItem(fStepMain,SCHATTR_AXIS_STEP_MAIN));
 
-    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_TIME_RESOLUTION,bAutoScale || m_aCbx_AutoTimeResolution.IsChecked()));
+    rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_TIME_RESOLUTION,bAutoScale || m_pCbx_AutoTimeResolution->IsChecked()));
     rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_TIME_RESOLUTION,m_nTimeResolution));
 
     rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_MAIN_TIME_UNIT,m_nMainTimeUnit));
@@ -460,86 +308,85 @@ void ScaleTabPage::Reset(const SfxItemSet& rInAttrs)
             nPos=TYPE_AUTO;
         else
             nPos=TYPE_TEXT;
-        m_aLB_AxisType.SelectEntryPos( nPos );
+        m_pLB_AxisType->SelectEntryPos( nPos );
     }
 
     if( m_bAllowDateAxis )
-        aCbxReverse.SetHelpId("chart2:CheckBox:TP_SCALE:CBX_REVERSE:MayBeDateAxis");
+        m_pCbxReverse->SetHelpId("chart2:CheckBox:TP_SCALE:CBX_REVERSE:MayBeDateAxis");
     else if( m_nAxisType==chart2::AxisType::CATEGORY || m_nAxisType==chart2::AxisType::SERIES )
-        aCbxReverse.SetHelpId("chart2:CheckBox:TP_SCALE:CBX_REVERSE:Category");
+        m_pCbxReverse->SetHelpId("chart2:CheckBox:TP_SCALE:CBX_REVERSE:Category");
 
-    PlaceIntervalControlsAccordingToAxisType();
 
-    aCbxAutoMin.Check( true );
-    aCbxAutoMax.Check( true );
-    aCbxAutoStepMain.Check( true );
-    aCbxAutoStepHelp.Check( true );
-    aCbxAutoOrigin.Check( true );
-    m_aCbx_AutoTimeResolution.Check( true );
+    m_pCbxAutoMin->Check( true );
+    m_pCbxAutoMax->Check( true );
+    m_pCbxAutoStepMain->Check( true );
+    m_pCbxAutoStepHelp->Check( true );
+    m_pCbxAutoOrigin->Check( true );
+    m_pCbx_AutoTimeResolution->Check( true );
 
     if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_MIN,sal_True,&pPoolItem) == SFX_ITEM_SET)
-        aCbxAutoMin.Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+        m_pCbxAutoMin->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
 
     if (rInAttrs.GetItemState(SCHATTR_AXIS_MIN,sal_True, &pPoolItem) == SFX_ITEM_SET)
     {
         fMin = ((const SvxDoubleItem*)pPoolItem)->GetValue();
-        lcl_setValue( aFmtFldMin, fMin );
+        lcl_setValue( *m_pFmtFldMin, fMin );
     }
 
     if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_MAX,sal_True, &pPoolItem) == SFX_ITEM_SET)
-        aCbxAutoMax.Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+        m_pCbxAutoMax->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
 
     if (rInAttrs.GetItemState(SCHATTR_AXIS_MAX,sal_True, &pPoolItem) == SFX_ITEM_SET)
     {
         fMax = ((const SvxDoubleItem*)pPoolItem)->GetValue();
-        lcl_setValue( aFmtFldMax, fMax );
+        lcl_setValue( *m_pFmtFldMax, fMax );
     }
 
     if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_STEP_MAIN,sal_True, &pPoolItem) == SFX_ITEM_SET)
-        aCbxAutoStepMain.Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+        m_pCbxAutoStepMain->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
 
     if (rInAttrs.GetItemState(SCHATTR_AXIS_STEP_MAIN,sal_True, &pPoolItem) == SFX_ITEM_SET)
     {
         fStepMain = ((const SvxDoubleItem*)pPoolItem)->GetValue();
-        lcl_setValue( aFmtFldStepMain, fStepMain );
-        m_aMt_MainDateStep.SetValue( static_cast<sal_Int32>(fStepMain) );
+        lcl_setValue( *m_pFmtFldStepMain, fStepMain );
+        m_pMt_MainDateStep->SetValue( static_cast<sal_Int32>(fStepMain) );
     }
     if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_STEP_HELP,sal_True, &pPoolItem) == SFX_ITEM_SET)
-        aCbxAutoStepHelp.Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+        m_pCbxAutoStepHelp->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
     if (rInAttrs.GetItemState(SCHATTR_AXIS_LOGARITHM,sal_True, &pPoolItem) == SFX_ITEM_SET)
-        aCbxLogarithm.Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+        m_pCbxLogarithm->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
     if (rInAttrs.GetItemState(SCHATTR_AXIS_REVERSE,sal_True, &pPoolItem) == SFX_ITEM_SET)
-        aCbxReverse.Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+        m_pCbxReverse->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
     if (rInAttrs.GetItemState(SCHATTR_AXIS_STEP_HELP,sal_True, &pPoolItem) == SFX_ITEM_SET)
     {
         nStepHelp = ((const SfxInt32Item*)pPoolItem)->GetValue();
-        aMtStepHelp.SetValue( nStepHelp );
+        m_pMtStepHelp->SetValue( nStepHelp );
     }
     if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_ORIGIN,sal_True, &pPoolItem) == SFX_ITEM_SET)
-        aCbxAutoOrigin.Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+        m_pCbxAutoOrigin->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
     if (rInAttrs.GetItemState(SCHATTR_AXIS_ORIGIN,sal_True, &pPoolItem) == SFX_ITEM_SET)
     {
         fOrigin = ((const SvxDoubleItem*)pPoolItem)->GetValue();
-        lcl_setValue( aFmtFldOrigin, fOrigin );
+        lcl_setValue( *m_pFmtFldOrigin, fOrigin );
     }
 
     if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_TIME_RESOLUTION,sal_True, &pPoolItem) == SFX_ITEM_SET)
-        m_aCbx_AutoTimeResolution.Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+        m_pCbx_AutoTimeResolution->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
     if (rInAttrs.GetItemState(SCHATTR_AXIS_TIME_RESOLUTION,sal_True, &pPoolItem) == SFX_ITEM_SET)
     {
         m_nTimeResolution = ((const SfxInt32Item*)pPoolItem)->GetValue();
-        m_aLB_TimeResolution.SelectEntryPos( m_nTimeResolution );
+        m_pLB_TimeResolution->SelectEntryPos( m_nTimeResolution );
     }
 
     if (rInAttrs.GetItemState(SCHATTR_AXIS_MAIN_TIME_UNIT,sal_True, &pPoolItem) == SFX_ITEM_SET)
     {
         m_nMainTimeUnit = ((const SfxInt32Item*)pPoolItem)->GetValue();
-        m_aLB_MainTimeUnit.SelectEntryPos( m_nMainTimeUnit );
+        m_pLB_MainTimeUnit->SelectEntryPos( m_nMainTimeUnit );
     }
     if (rInAttrs.GetItemState(SCHATTR_AXIS_HELP_TIME_UNIT,sal_True, &pPoolItem) == SFX_ITEM_SET)
     {
         m_nHelpTimeUnit = ((const SfxInt32Item*)pPoolItem)->GetValue();
-        m_aLB_HelpTimeUnit.SelectEntryPos( m_nHelpTimeUnit );
+        m_pLB_HelpTimeUnit->SelectEntryPos( m_nHelpTimeUnit );
     }
 
     EnableControls();
@@ -556,11 +403,11 @@ int ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet)
 
     bool bDateAxis = chart2::AxisType::DATE == m_nAxisType;
 
-    sal_uInt32 nMinMaxOriginFmt = aFmtFldMax.GetFormatKey();
+    sal_uInt32 nMinMaxOriginFmt = m_pFmtFldMax->GetFormatKey();
     if ((pNumFormatter->GetType(nMinMaxOriginFmt) &~ NUMBERFORMAT_DEFINED) == NUMBERFORMAT_TEXT)
         nMinMaxOriginFmt = 0;
     // numberformat_text cause numbers to fail being numbers...  Shouldn't happen, but can.
-    sal_uInt32 nStepFmt = aFmtFldStepMain.GetFormatKey();
+    sal_uInt32 nStepFmt = m_pFmtFldStepMain->GetFormatKey();
     if ((pNumFormatter->GetType(nStepFmt) &~NUMBERFORMAT_DEFINED) == NUMBERFORMAT_TEXT)
         nStepFmt = 0;
 
@@ -568,89 +415,89 @@ int ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet)
     sal_uInt16 nErrStrId = 0;
     double fDummy;
 
-    fMax = aFmtFldMax.GetValue();
-    fMin = aFmtFldMin.GetValue();
-    fOrigin = aFmtFldOrigin.GetValue();
-    fStepMain = bDateAxis ? m_aMt_MainDateStep.GetValue() : aFmtFldStepMain.GetValue();
-    nStepHelp = static_cast< sal_Int32 >( aMtStepHelp.GetValue());
-    m_nTimeResolution = m_aLB_TimeResolution.GetSelectEntryPos();
-    m_nMainTimeUnit = m_aLB_MainTimeUnit.GetSelectEntryPos();
-    m_nHelpTimeUnit = m_aLB_HelpTimeUnit.GetSelectEntryPos();
+    fMax = m_pFmtFldMax->GetValue();
+    fMin = m_pFmtFldMin->GetValue();
+    fOrigin = m_pFmtFldOrigin->GetValue();
+    fStepMain = bDateAxis ? m_pMt_MainDateStep->GetValue() : m_pFmtFldStepMain->GetValue();
+    nStepHelp = static_cast< sal_Int32 >( m_pMtStepHelp->GetValue());
+    m_nTimeResolution = m_pLB_TimeResolution->GetSelectEntryPos();
+    m_nMainTimeUnit = m_pLB_MainTimeUnit->GetSelectEntryPos();
+    m_nHelpTimeUnit = m_pLB_HelpTimeUnit->GetSelectEntryPos();
 
     if( chart2::AxisType::REALNUMBER != m_nAxisType )
-        aCbxLogarithm.Show( false );
+        m_pCbxLogarithm->Show( false );
 
     //check which entries need user action
 
-    if ( aCbxLogarithm.IsChecked() &&
-            ( ( !aCbxAutoMin.IsChecked() && fMin <= 0.0 )
-             || ( !aCbxAutoMax.IsChecked() && fMax <= 0.0 ) ) )
+    if ( m_pCbxLogarithm->IsChecked() &&
+            ( ( !m_pCbxAutoMin->IsChecked() && fMin <= 0.0 )
+             || ( !m_pCbxAutoMax->IsChecked() && fMax <= 0.0 ) ) )
     {
-        pControl = &aFmtFldMin;
+        pControl = m_pFmtFldMin;
         nErrStrId = STR_BAD_LOGARITHM;
     }
     // check for entries that cannot be parsed for the current number format
-    else if ( aFmtFldMin.IsModified()
-              && !aCbxAutoMin.IsChecked()
-              && !pNumFormatter->IsNumberFormat( aFmtFldMin.GetText(), nMinMaxOriginFmt, fDummy))
+    else if ( m_pFmtFldMin->IsModified()
+              && !m_pCbxAutoMin->IsChecked()
+              && !pNumFormatter->IsNumberFormat( m_pFmtFldMin->GetText(), nMinMaxOriginFmt, fDummy))
     {
-        pControl = &aFmtFldMin;
+        pControl = m_pFmtFldMin;
         nErrStrId = STR_INVALID_NUMBER;
     }
-    else if ( aFmtFldMax.IsModified()
-              && !aCbxAutoMax.IsChecked()
-              && !pNumFormatter->IsNumberFormat( aFmtFldMax.GetText(), nMinMaxOriginFmt, fDummy))
+    else if ( m_pFmtFldMax->IsModified()
+              && !m_pCbxAutoMax->IsChecked()
+              && !pNumFormatter->IsNumberFormat( m_pFmtFldMax->GetText(), nMinMaxOriginFmt, fDummy))
     {
-        pControl = &aFmtFldMax;
+        pControl = m_pFmtFldMax;
         nErrStrId = STR_INVALID_NUMBER;
     }
-    else if ( !bDateAxis && aFmtFldStepMain.IsModified()
-              && !aCbxAutoStepMain.IsChecked()
-              && !pNumFormatter->IsNumberFormat( aFmtFldStepMain.GetText(), nStepFmt, fDummy))
+    else if ( !bDateAxis && m_pFmtFldStepMain->IsModified()
+              && !m_pCbxAutoStepMain->IsChecked()
+              && !pNumFormatter->IsNumberFormat( m_pFmtFldStepMain->GetText(), nStepFmt, fDummy))
     {
-        pControl = &aFmtFldStepMain;
+        pControl = m_pFmtFldStepMain;
         nErrStrId = STR_INVALID_NUMBER;
     }
-    else if (aFmtFldOrigin.IsModified() && !aCbxAutoOrigin.IsChecked() &&
-             !pNumFormatter->IsNumberFormat( aFmtFldOrigin.GetText(), nMinMaxOriginFmt, fDummy))
+    else if (m_pFmtFldOrigin->IsModified() && !m_pCbxAutoOrigin->IsChecked() &&
+             !pNumFormatter->IsNumberFormat( m_pFmtFldOrigin->GetText(), nMinMaxOriginFmt, fDummy))
     {
-        pControl = &aFmtFldOrigin;
+        pControl = m_pFmtFldOrigin;
         nErrStrId = STR_INVALID_NUMBER;
     }
-    else if (!aCbxAutoStepMain.IsChecked() && fStepMain <= 0.0)
+    else if (!m_pCbxAutoStepMain->IsChecked() && fStepMain <= 0.0)
     {
-        pControl = &aFmtFldStepMain;
+        pControl = m_pFmtFldStepMain;
         nErrStrId = STR_STEP_GT_ZERO;
     }
-    else if (!aCbxAutoMax.IsChecked() && !aCbxAutoMin.IsChecked() &&
+    else if (!m_pCbxAutoMax->IsChecked() && !m_pCbxAutoMin->IsChecked() &&
              fMin >= fMax)
     {
-        pControl = &aFmtFldMin;
+        pControl = m_pFmtFldMin;
         nErrStrId = STR_MIN_GREATER_MAX;
     }
     else if( bDateAxis )
     {
-        if( !aCbxAutoStepMain.IsChecked() && !aCbxAutoStepHelp.IsChecked() )
+        if( !m_pCbxAutoStepMain->IsChecked() && !m_pCbxAutoStepHelp->IsChecked() )
         {
             if( m_nHelpTimeUnit > m_nMainTimeUnit )
             {
-                pControl = &m_aLB_MainTimeUnit;
+                pControl = m_pLB_MainTimeUnit;
                 nErrStrId = STR_INVALID_INTERVALS;
             }
             else if( m_nHelpTimeUnit == m_nMainTimeUnit && nStepHelp > fStepMain )
             {
-                pControl = &m_aLB_MainTimeUnit;
+                pControl = m_pLB_MainTimeUnit;
                 nErrStrId = STR_INVALID_INTERVALS;
             }
         }
-        if( !nErrStrId && !m_aCbx_AutoTimeResolution.IsChecked() )
+        if( !nErrStrId && !m_pCbx_AutoTimeResolution->IsChecked() )
         {
-            if( (!aCbxAutoStepMain.IsChecked() && m_nTimeResolution > m_nMainTimeUnit )
+            if( (!m_pCbxAutoStepMain->IsChecked() && m_nTimeResolution > m_nMainTimeUnit )
                 ||
-                (!aCbxAutoStepHelp.IsChecked() && m_nTimeResolution > m_nHelpTimeUnit )
+                (!m_pCbxAutoStepHelp->IsChecked() && m_nTimeResolution > m_nHelpTimeUnit )
                 )
             {
-                pControl = &m_aLB_TimeResolution;
+                pControl = m_pLB_TimeResolution;
                 nErrStrId = STR_INVALID_TIME_UNIT;
             }
         }
@@ -668,19 +515,19 @@ int ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet)
 void ScaleTabPage::SetNumFormatter( SvNumberFormatter* pFormatter )
 {
     pNumFormatter = pFormatter;
-    aFmtFldMax.SetFormatter( pNumFormatter );
-    aFmtFldMin.SetFormatter( pNumFormatter );
-    aFmtFldStepMain.SetFormatter( pNumFormatter );
-    aFmtFldOrigin.SetFormatter( pNumFormatter );
+    m_pFmtFldMax->SetFormatter( pNumFormatter );
+    m_pFmtFldMin->SetFormatter( pNumFormatter );
+    m_pFmtFldStepMain->SetFormatter( pNumFormatter );
+    m_pFmtFldOrigin->SetFormatter( pNumFormatter );
 
     // #i6278# allow more decimal places than the output format.  As
     // the numbers shown in the edit fields are used for input, it makes more
     // sense to display the values in the input format rather than the output
     // format.
-    aFmtFldMax.UseInputStringForFormatting();
-    aFmtFldMin.UseInputStringForFormatting();
-    aFmtFldStepMain.UseInputStringForFormatting();
-    aFmtFldOrigin.UseInputStringForFormatting();
+    m_pFmtFldMax->UseInputStringForFormatting();
+    m_pFmtFldMin->UseInputStringForFormatting();
+    m_pFmtFldStepMain->UseInputStringForFormatting();
+    m_pFmtFldOrigin->UseInputStringForFormatting();
 
     SetNumFormat();
 }
@@ -693,9 +540,9 @@ void ScaleTabPage::SetNumFormat()
     {
         sal_uLong nFmt = (sal_uLong)((const SfxInt32Item*)pPoolItem)->GetValue();
 
-        aFmtFldMax.SetFormatKey( nFmt );
-        aFmtFldMin.SetFormatKey( nFmt );
-        aFmtFldOrigin.SetFormatKey( nFmt );
+        m_pFmtFldMax->SetFormatKey( nFmt );
+        m_pFmtFldMin->SetFormatKey( nFmt );
+        m_pFmtFldOrigin->SetFormatKey( nFmt );
 
         if( pNumFormatter )
         {
@@ -727,13 +574,13 @@ void ScaleTabPage::SetNumFormat()
                 else
                     nFmt = pNumFormatter->GetStandardFormat( NUMBERFORMAT_DATE );
 
-                aFmtFldMax.SetFormatKey( nFmt );
-                aFmtFldMin.SetFormatKey( nFmt );
-                aFmtFldOrigin.SetFormatKey( nFmt );
+                m_pFmtFldMax->SetFormatKey( nFmt );
+                m_pFmtFldMin->SetFormatKey( nFmt );
+                m_pFmtFldOrigin->SetFormatKey( nFmt );
             }
         }
 
-        aFmtFldStepMain.SetFormatKey( nFmt );
+        m_pFmtFldStepMain->SetFormatKey( nFmt );
     }
 }
 
@@ -767,40 +614,13 @@ void ScaleTabPage::HideAllControls()
     // visibility of these controls depend on axis data type, and are
     // set in EnableControls().
 
-    m_aTxt_AxisType.Hide();
-    m_aLB_AxisType.Hide();
-
-    aCbxLogarithm.Hide();
-    aTxtMin.Hide();
-    aFmtFldMin.Hide();
-    aCbxAutoMin.Hide();
-    aTxtMax.Hide();
-    aFmtFldMax.Hide();
-    aCbxAutoMax.Hide();
-    aTxtMain.Hide();
-    aFmtFldStepMain.Hide();
-    aCbxAutoStepMain.Hide();
-    aTxtHelp.Hide();
-    aTxtHelpCount.Hide();
-    aMtStepHelp.Hide();
-    aCbxAutoStepHelp.Hide();
-
-    aTxtOrigin.Hide();
-    aFmtFldOrigin.Hide();
-    aCbxAutoOrigin.Hide();
-
-    aTxtHelpCount.Hide();
-    aTxtHelp.Hide();
-
-    m_aTxt_TimeResolution.Hide();
-    m_aLB_TimeResolution.Hide();
-    m_aCbx_AutoTimeResolution.Hide();
-
-    aFmtFldStepMain.Hide();
-    m_aMt_MainDateStep.Hide();
-
-    m_aLB_MainTimeUnit.Hide();
-    m_aLB_HelpTimeUnit.Hide();
+    m_pBxType->Hide();
+    m_pCbxLogarithm->Hide();
+    m_pBxMinMax->Hide();
+    m_pBxMain->Hide();
+    m_pBxMinor->Hide();
+    m_pBxOrigin->Hide();
+    m_pBxResolution->Hide();
 }
 
 } //namespace chart
diff --git a/chart2/source/controller/dialogs/tp_Scale.hrc b/chart2/source/controller/dialogs/tp_Scale.hrc
deleted file mode 100644
index 642db53..0000000
--- a/chart2/source/controller/dialogs/tp_Scale.hrc
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "ResourceIds.hrc"
-
-#define FL_SCALE            1
-
-#define TXT_MIN             1
-#define TXT_MAX             2
-#define TXT_STEP_MAIN       3
-#define TXT_STEP_HELP_COUNT 4
-#define TXT_ORIGIN          5
-#define TXT_TIME_RESOLUTION 6
-#define TXT_AXIS_TYPE       7
-#define TXT_STEP_HELP       8
-
-#define CBX_AUTO_MIN        1
-#define CBX_AUTO_MAX        2
-#define CBX_AUTO_STEP_MAIN  3
-#define CBX_AUTO_STEP_HELP  4
-#define CBX_AUTO_ORIGIN     5
-#define CBX_LOGARITHM       6
-#define CBX_REVERSE         7
-#define CBX_AUTO_TIME_RESOLUTION 8
-
-#define EDT_STEP_MAIN       1
-#define EDT_MAX             2
-#define EDT_MIN             3
-#define EDT_ORIGIN          4
-
-#define MT_STEPHELP         10
-#define MT_MAIN_DATE_STEP   11
-
-#define LB_AXIS_TYPE        1
-#define LB_MAIN_TIME_UNIT   2
-#define LB_HELP_TIME_UNIT   3
-#define LB_TIME_RESOLUTION  4
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx
index 002cc6e..deaa75d 100644
--- a/chart2/source/controller/dialogs/tp_Scale.hxx
+++ b/chart2/source/controller/dialogs/tp_Scale.hxx
@@ -54,42 +54,39 @@ public:
     virtual void StateChanged( StateChangedType nType );
 
 private:
-    FixedLine           aFlScale;
+    CheckBox*            m_pCbxReverse;
+    CheckBox*            m_pCbxLogarithm;
 
-    CheckBox            aCbxReverse;
+    VclBox*              m_pBxType;
+    ListBox*             m_pLB_AxisType;
 
-    CheckBox            aCbxLogarithm;
+    VclGrid*              m_pBxMinMax;
+    FormattedField*      m_pFmtFldMin;
+    CheckBox*            m_pCbxAutoMin;
 
-    FixedText           m_aTxt_AxisType;
-    ListBox             m_aLB_AxisType;
+    FormattedField*      m_pFmtFldMax;
+    CheckBox*            m_pCbxAutoMax;
 
-    FixedText           aTxtMin;
-    FormattedField      aFmtFldMin;
-    CheckBox            aCbxAutoMin;
+    VclBox*              m_pBxResolution;
+    ListBox*             m_pLB_TimeResolution;
+    CheckBox*            m_pCbx_AutoTimeResolution;
 
-    FixedText           aTxtMax;
-    FormattedField      aFmtFldMax;
-    CheckBox            aCbxAutoMax;
+    VclBox*              m_pBxMain;
+    FormattedField*      m_pFmtFldStepMain;
+    MetricField*         m_pMt_MainDateStep;
+    ListBox*             m_pLB_MainTimeUnit;
+    CheckBox*            m_pCbxAutoStepMain;
 
-    FixedText           m_aTxt_TimeResolution;
-    ListBox             m_aLB_TimeResolution;
-    CheckBox            m_aCbx_AutoTimeResolution;
+    VclBox*              m_pBxMinor;
+    FixedText*           m_pTxtHelpCount;
+    FixedText*           m_pTxtHelp;
+    MetricField*         m_pMtStepHelp;
+    ListBox*             m_pLB_HelpTimeUnit;
+    CheckBox*            m_pCbxAutoStepHelp;
 
-    FixedText           aTxtMain;
-    FormattedField      aFmtFldStepMain;
-    MetricField         m_aMt_MainDateStep;
-    ListBox             m_aLB_MainTimeUnit;
-    CheckBox            aCbxAutoStepMain;
-
-    FixedText           aTxtHelpCount;
-    FixedText           aTxtHelp;
-    MetricField         aMtStepHelp;
-    ListBox             m_aLB_HelpTimeUnit;
-    CheckBox            aCbxAutoStepHelp;
-
-    FixedText           aTxtOrigin;
-    FormattedField      aFmtFldOrigin;
-    CheckBox            aCbxAutoOrigin;
+    FormattedField*      m_pFmtFldOrigin;
+    CheckBox*            m_pCbxAutoOrigin;
+    VclBox*              m_pBxOrigin;
 
     double              fMin;
     double              fMax;
@@ -105,9 +102,7 @@ private:
 
     bool                m_bShowAxisOrigin;
 
-    void AdjustControlPositions();
     void EnableControls();
-    void PlaceIntervalControlsAccordingToAxisType();
 
     DECL_LINK( SelectAxisTypeHdl, void* );
     DECL_LINK( EnableValueHdl, CheckBox* );
diff --git a/chart2/source/controller/dialogs/tp_Scale.src b/chart2/source/controller/dialogs/tp_Scale.src
deleted file mode 100644
index 8cf91a9..0000000
--- a/chart2/source/controller/dialogs/tp_Scale.src
+++ /dev/null
@@ -1,328 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <sfx2/tabpage.hrc>
-
-#include "HelpIds.hrc"
-#include "tp_Scale.hrc"
-
-#define YLine1 3
-#define Y1 (YLine1+13)
-#define Y2 (Y1+16)
-#define Y3 (Y2+16)
-#define Y4 (Y3+16)
-#define Y5 (Y4+16)
-#define Y6 (Y5+16)
-#define Y7 (Y6+16)
-#define Y8 (Y7+16)
-
-#define LABELWIDTH 88
-#define AUTOCHECKWIDTH 41
-#define EDITWIDTH 50
-#define X1 6
-#define X2 11
-#define X3 (X2+LABELWIDTH+4)
-#define X4 (X3+EDITWIDTH+5)
-#define X5 (X4+AUTOCHECKWIDTH+5)
-
-#define STR_LIST_TIME_UNIT  \
-    StringList [ en-US ] = \
-    { \
-        "Days" ; \
-        "Months" ; \
-        "Years" ; \
-    };
-
-TabPage TP_SCALE
-{
-    HelpID = "chart2:TabPage:TP_SCALE";
-    Hide = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-
-    FixedLine FL_SCALE
-    {
-        Pos = MAP_APPFONT ( X1 , YLine1  ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Scale" ;
-    };
-
-    CheckBox CBX_REVERSE
-    {
-        HelpID = "chart2:CheckBox:TP_SCALE:CBX_REVERSE:ValueAxis";
-        Pos = MAP_APPFONT ( X2 , Y1  ) ;
-        Size = MAP_APPFONT ( 244 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Reverse direction" ;
-    };
-    //---------------------------
-    CheckBox CBX_LOGARITHM
-    {
-        HelpID = "chart2:CheckBox:TP_SCALE:CBX_LOGARITHM";
-        Pos = MAP_APPFONT ( X2 , Y2  ) ;
-        Size = MAP_APPFONT ( 244 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Logarithmic scale" ;
-    };
-    //---------------------------
-    FixedText TXT_AXIS_TYPE
-    {
-        Pos = MAP_APPFONT ( X2 , Y2  ) ;
-        Size = MAP_APPFONT ( LABELWIDTH , 8 ) ;
-        Text [ en-US ] = "T~ype" ;
-    };
-    ListBox LB_AXIS_TYPE
-    {
-        HelpID = "chart2:ListBox:TP_SCALE:LB_AXIS_TYPE";
-        Border = TRUE ;
-        AutoHScroll = TRUE ;
-        Pos = MAP_APPFONT ( X3 , Y2-2  ) ;
-        Size = MAP_APPFONT ( EDITWIDTH , 12 ) ;
-        TabStop = TRUE ;
-        Group = TRUE ;
-        DropDown=TRUE;
-        DDExtraWidth = TRUE ;
-
-        StringList [ en-US ] =
-        {
-            "Automatic" ;
-            "Text" ;
-            "Date" ;
-        };
-    };
-    //---------------------------
-    FixedText TXT_MIN
-    {
-        Pos = MAP_APPFONT ( X2 , Y3  ) ;
-        Size = MAP_APPFONT ( LABELWIDTH , 8 ) ;
-        Text [ en-US ] = "~Minimum" ;
-    };
-
-    SpinField EDT_MIN
-    {
-        HelpID = "chart2:SpinField:TP_SCALE:EDT_MIN";
-        Border = TRUE ;
-        SVLook = TRUE ;
-        Pos = MAP_APPFONT ( X3 , Y3-2 ) ;
-        Size = MAP_APPFONT ( EDITWIDTH , 12 ) ;
-        TabStop = TRUE ;
-    };
-
-    CheckBox CBX_AUTO_MIN
-    {
-        HelpID = "chart2:CheckBox:TP_SCALE:CBX_AUTO_MIN";
-        Pos = MAP_APPFONT ( X4 , Y3+1  ) ;
-        Size = MAP_APPFONT ( AUTOCHECKWIDTH , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Automatic" ;
-    };
-
-    FixedText TXT_MAX
-    {
-        Pos = MAP_APPFONT ( X2 , Y4  ) ;
-        Size = MAP_APPFONT ( LABELWIDTH , 8 ) ;
-        Text [ en-US ] = "Ma~ximum" ;
-    };
-
-    SpinField EDT_MAX
-    {
-        HelpID = "chart2:SpinField:TP_SCALE:EDT_MAX";
-        Border = TRUE ;
-        SVLook = TRUE ;
-        Pos = MAP_APPFONT ( X3 , Y4-2  ) ;
-        Size = MAP_APPFONT ( EDITWIDTH , 12 ) ;
-        TabStop = TRUE ;
-    };
-
-    CheckBox CBX_AUTO_MAX
-    {
-        HelpID = "chart2:CheckBox:TP_SCALE:CBX_AUTO_MAX";
-        Pos = MAP_APPFONT ( X4 , Y4+1  ) ;
-        Size = MAP_APPFONT ( AUTOCHECKWIDTH , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "A~utomatic" ;
-    };
-    //---------------------------
-    FixedText TXT_TIME_RESOLUTION
-    {
-        Pos = MAP_APPFONT ( X2 , Y5  ) ;
-        Size = MAP_APPFONT ( LABELWIDTH , 8 ) ;
-        Text [ en-US ] = "R~esolution" ;
-    };
-    ListBox LB_TIME_RESOLUTION
-    {
-        HelpID = "chart2:ListBox:TP_SCALE:LB_TIME_RESOLUTION";
-        Border = TRUE ;
-        AutoHScroll = TRUE ;
-        Pos = MAP_APPFONT ( X3 , Y5-2  ) ;
-        Size = MAP_APPFONT ( EDITWIDTH , 12 ) ;
-        TabStop = TRUE ;
-        Group = TRUE ;
-        DropDown=TRUE;
-        DDExtraWidth = TRUE ;
-
-        STR_LIST_TIME_UNIT
-    };
-    CheckBox CBX_AUTO_TIME_RESOLUTION
-    {
-        HelpID = "chart2:CheckBox:TP_SCALE:CBX_AUTO_TIME_RESOLUTION";
-        Pos = MAP_APPFONT ( X4 , Y5+1  ) ;
-        Size = MAP_APPFONT ( AUTOCHECKWIDTH , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Automat~ic" ;
-    };
-    //---------------------------
-    FixedText TXT_STEP_MAIN
-    {
-        Pos = MAP_APPFONT ( X2 , Y5  ) ;
-        Size = MAP_APPFONT ( LABELWIDTH , 8 ) ;
-        Text [ en-US ] = "Ma~jor interval" ;
-    };
-
-    SpinField EDT_STEP_MAIN
-    {
-        HelpID = "chart2:SpinField:TP_SCALE:EDT_STEP_MAIN";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( X3 , Y5-2  ) ;
-        Size = MAP_APPFONT ( EDITWIDTH , 12 ) ;
-        TabStop = TRUE ;
-    };
-    MetricField MT_MAIN_DATE_STEP
-    {
-        HelpID = "chart2:MetricField:TP_SCALE:MT_MAIN_DATE_STEP";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( X3 , Y6-2  ) ;
-        Size = MAP_APPFONT ( EDITWIDTH , 12 ) ;
-        TabStop = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 1 ;
-        Maximum = 100000 ;
-        StrictFormat = TRUE ;
-        Unit = FUNIT_CUSTOM ;
-        First = 1 ;
-        Last = 100000 ;
-        SpinSize = 1 ;
-    };
-
-    ListBox LB_MAIN_TIME_UNIT
-    {
-        HelpID = "chart2:ListBox:TP_SCALE:LB_MAIN_TIME_UNIT";
-        Border = TRUE ;
-        AutoHScroll = TRUE ;
-        Pos = MAP_APPFONT ( X5 , Y6-2  ) ;
-        Size = MAP_APPFONT ( EDITWIDTH , 12 ) ;
-        TabStop = TRUE ;
-        Group = TRUE ;
-        DropDown=TRUE;
-        DDExtraWidth = TRUE ;
-
-        STR_LIST_TIME_UNIT
-    };
-
-    CheckBox CBX_AUTO_STEP_MAIN
-    {
-        HelpID = "chart2:CheckBox:TP_SCALE:CBX_AUTO_STEP_MAIN";
-        Pos = MAP_APPFONT ( X4 , Y5+1  ) ;
-        Size = MAP_APPFONT ( AUTOCHECKWIDTH , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Au~tomatic" ;
-    };
-    //---------------------------
-    FixedText TXT_STEP_HELP_COUNT
-    {
-        Pos = MAP_APPFONT ( X2 , Y6  ) ;
-        Size = MAP_APPFONT ( LABELWIDTH , 8 ) ;
-        Text [ en-US ] = "Minor inter~val count" ;
-    };
-    FixedText TXT_STEP_HELP
-    {
-        Pos = MAP_APPFONT ( X2 , Y7  ) ;
-        Size = MAP_APPFONT ( LABELWIDTH , 8 ) ;
-        Text [ en-US ] = "Minor inter~val" ;
-    };
-
-    MetricField MT_STEPHELP
-    {
-        HelpID = "chart2:MetricField:TP_SCALE:MT_STEPHELP";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( X3 , Y6-2  ) ;
-        Size = MAP_APPFONT ( EDITWIDTH , 12 ) ;
-        TabStop = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 1 ;
-        Maximum = 100 ;
-        StrictFormat = TRUE ;
-        Unit = FUNIT_CUSTOM ;
-        First = 1 ;
-        Last = 100 ;
-        SpinSize = 1 ;
-    };
-    ListBox LB_HELP_TIME_UNIT
-    {
-        HelpID = "chart2:ListBox:TP_SCALE:LB_HELP_TIME_UNIT";
-        Border = TRUE ;
-        AutoHScroll = TRUE ;
-        Pos = MAP_APPFONT ( X5 , Y7-2  ) ;
-        Size = MAP_APPFONT ( EDITWIDTH , 12 ) ;
-        TabStop = TRUE ;
-        Group = TRUE ;
-        DropDown=TRUE;
-        DDExtraWidth = TRUE ;
-
-        STR_LIST_TIME_UNIT
-    };
-    CheckBox CBX_AUTO_STEP_HELP
-    {
-        HelpID = "chart2:CheckBox:TP_SCALE:CBX_AUTO_STEP_HELP";
-        Pos = MAP_APPFONT ( X4 , Y6+1  ) ;
-        Size = MAP_APPFONT ( AUTOCHECKWIDTH , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Aut~omatic" ;
-    };
-
-    FixedText TXT_ORIGIN
-    {
-        Pos = MAP_APPFONT ( X2 , Y7  ) ;
-        Size = MAP_APPFONT ( LABELWIDTH , 8 ) ;
-        Text [ en-US ] = "Re~ference value" ;
-    };
-
-    SpinField EDT_ORIGIN
-    {
-        HelpID = "chart2:SpinField:TP_SCALE:EDT_ORIGIN";
-        Border = TRUE ;
-        SVLook = TRUE ;
-        Pos = MAP_APPFONT ( X3 , Y7-2  ) ;
-        Size = MAP_APPFONT ( EDITWIDTH , 12 ) ;
-        TabStop = TRUE ;
-    };
-    CheckBox CBX_AUTO_ORIGIN
-    {
-        HelpID = "chart2:CheckBox:TP_SCALE:CBX_AUTO_ORIGIN";
-        Pos = MAP_APPFONT ( X4 , Y7+1  ) ;
-        Size = MAP_APPFONT ( AUTOCHECKWIDTH , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "Automat~ic" ;
-    };
-    //---------------------------
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/uiconfig/ui/tp_Scale.ui b/chart2/uiconfig/ui/tp_Scale.ui
new file mode 100644
index 0000000..286b6df
--- /dev/null
+++ b/chart2/uiconfig/ui/tp_Scale.ui
@@ -0,0 +1,596 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkAdjustment" id="adjustmentINTERVAL">
+    <property name="lower">1</property>
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkListStore" id="liststoreDATE">
+    <columns>
+      <!-- column-name gchararray1 -->
+      <column type="gchararray"/>
+      <!-- column-name guint1 -->
+      <column type="guint"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Days</col>
+        <col id="1">0</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Months</col>
+        <col id="1">1</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Years</col>
+        <col id="1">2</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkFrame" id="tp_Scale">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">6</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="GtkBox" id="box1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkBox" id="box2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkCheckButton" id="CBX_REVERSE">
+                    <property name="label" translatable="yes">_Reverse direction</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="CBX_LOGARITHM">
+                    <property name="label" translatable="yes">_Logarithmic scale</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox" id="boxTYPE">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">12</property>
+                    <child>
+                      <object class="GtkLabel" id="TXT_AXIS_TYPE">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">T_ype</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">LB_AXIS_TYPE</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkComboBoxText" id="LB_AXIS_TYPE">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="entry_text_column">0</property>
+                        <property name="id_column">1</property>
+                        <items>
+                          <item translatable="yes">Automatic</item>
+                          <item translatable="yes">Text</item>
+                          <item translatable="yes">Date</item>
+                        </items>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkGrid" id="gridMINMAX">
+                <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="TXT_MIN">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">_Minimum</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">EDT_MIN</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="TXT_MAX">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Ma_ximum</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">EDT_MAX</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="GtkCheckButton" id="CBX_AUTO_MIN">
+                    <property name="label" translatable="yes">_Automatic</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</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="GtkCheckButton" id="CBX_AUTO_MAX">
+                    <property name="label" translatable="yes">A_utomatic</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</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>
+                <child>
+                  <object class="svtlo-FormattedField" id="EDT_MIN">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="invisible_char">•</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="svtlo-FormattedField" id="EDT_MAX">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="invisible_char">•</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>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="boxRESOLUTION">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkLabel" id="TXT_TIME_RESOLUTION">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">R_esolution</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">LB_TIME_RESOLUTION</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBox" id="LB_TIME_RESOLUTION">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="model">liststoreDATE</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="CBX_AUTO_TIME_RESOLUTION">
+                    <property name="label" translatable="yes">Automat_ic</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="boxMAIN">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkLabel" id="TXT_STEP_MAIN">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Ma_jor interval</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox" id="box5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkBox" id="box9">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">12</property>
+                        <child>
+                          <object class="GtkSpinButton" id="MT_MAIN_DATE_STEP:0">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="invisible_char">•</property>
+                            <property name="adjustment">adjustmentINTERVAL</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkComboBox" id="LB_MAIN_TIME_UNIT">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="model">liststoreDATE</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="svtlo-FormattedField" id="EDT_STEP_MAIN">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="invisible_char">•</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="CBX_AUTO_STEP_MAIN">
+                    <property name="label" translatable="yes">Au_tomatic</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="boxMINOR">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkBox" id="box4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkLabel" id="TXT_STEP_HELP">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Minor inter_val</property>
+                        <property name="use_underline">True</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="TXT_STEP_HELP_COUNT">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Minor inter_val count</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="MT_STEPHELP:0">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="invisible_char">•</property>
+                    <property name="invisible_char_set">True</property>
+                    <property name="adjustment">adjustmentINTERVAL</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBox" id="LB_HELP_TIME_UNIT">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="model">liststoreDATE</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="CBX_AUTO_STEP_HELP">
+                    <property name="label" translatable="yes">Aut_omatic</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">3</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="boxORIGIN">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkLabel" id="TXT_ORIGIN">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Re_ference value</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="svtlo-FormattedField" id="EDT_ORIGIN:0">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="invisible_char">•</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="CBX_AUTO_ORIGIN">
+                    <property name="label" translatable="yes">Automat_ic</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+    <child type="label">
+      <object class="GtkLabel" id="FL_SCALE">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">Scale</property>
+        <attributes>
+          <attribute name="weight" value="bold"/>
+        </attributes>
+      </object>
+    </child>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroupCOMBO">
+    <widgets>
+      <widget name="LB_AXIS_TYPE"/>
+      <widget name="EDT_MIN"/>
+      <widget name="EDT_MAX"/>
+      <widget name="MT_MAIN_DATE_STEP:0"/>
+      <widget name="EDT_STEP_MAIN"/>
+      <widget name="MT_STEPHELP:0"/>
+      <widget name="EDT_ORIGIN:0"/>
+      <widget name="LB_TIME_RESOLUTION"/>
+      <widget name="LB_MAIN_TIME_UNIT"/>
+      <widget name="LB_HELP_TIME_UNIT"/>
+    </widgets>
+  </object>
+  <object class="GtkSizeGroup" id="sizegroupLABELS">
+    <widgets>
+      <widget name="TXT_STEP_HELP_COUNT"/>
+      <widget name="TXT_STEP_HELP"/>
+      <widget name="TXT_STEP_MAIN"/>
+      <widget name="TXT_TIME_RESOLUTION"/>
+      <widget name="TXT_MAX"/>
+      <widget name="TXT_MIN"/>
+      <widget name="TXT_AXIS_TYPE"/>
+      <widget name="CBX_LOGARITHM"/>
+      <widget name="CBX_REVERSE"/>
+      <widget name="TXT_ORIGIN"/>
+    </widgets>
+  </object>
+</interface>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index a9c74e6..55da1eb 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -269,6 +269,9 @@
     <glade-widget-class title="MultiLine Edit" name="svtlo-MultiLineEditSyntaxHighlight"
                         generic-name="MultiLineEdit" parent="GtkTextView"
                         icon-name="widget-gtk-textview"/>
+    <glade-widget-class title="SvtFormattedField" name="svtlo-FormattedField"
+                        generic-name="Formatted Field" parent="GtkSpinButton"
+                        icon-name="widget-gtk-textentry"/>
     <glade-widget-class title="Address MultiLine Edit" name="swuilo-AddressMultiLineEdit"
                         generic-name="AddressMultiLineEdit" parent="GtkTextView"
                         icon-name="widget-gtk-textview"/>
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 233ff2e..551da37 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -23,6 +23,7 @@
 #include <comphelper/string.hxx>
 #include <unotools/localedatawrapper.hxx>
 #include <vcl/svapp.hxx>
+#include <vcl/builder.hxx>
 #include <svl/zformat.hxx>
 #include <svtools/fmtfield.hxx>
 #include <i18nlangtag/languagetag.hxx>
@@ -343,6 +344,11 @@ FormattedField::FormattedField(Window* pParent, const ResId& rResId, SvNumberFor
         m_nFormatKey = nFormatKey;
     }
 }
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeFormattedField(Window *pParent, VclBuilder::stringmap &)
+{
+    WinBits nWinBits = WB_BORDER;
+    return new FormattedField(pParent, nWinBits);
+}
 
 FormattedField::~FormattedField()
 {


More information about the Libreoffice-commits mailing list