summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-13 20:27:41 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-14 15:02:41 +0200
commitc3c02d012006f38519a4eeb64f306d7f3a4edbaa (patch)
tree53a3df58275df6ee5bd1943792dc985de7a4e614
parent5487df9cf7c9d14de9b855f178b5d1194b4ae869 (diff)
weld SchAxisLabelTabPage
Change-Id: I499162c6c2327a6c0d635382defea7e0bae068cd Reviewed-on: https://gerrit.libreoffice.org/61747 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.cxx222
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.hxx51
-rw-r--r--chart2/uiconfig/ui/tp_axisLabel.ui47
-rw-r--r--include/svx/dialcontrol.hxx2
-rw-r--r--svx/source/dialog/dialcontrol.cxx5
5 files changed, 157 insertions, 170 deletions
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index f715259c75ca..d6526884188d 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -30,43 +30,41 @@
namespace chart
{
-SchAxisLabelTabPage::SchAxisLabelTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ) :
- SfxTabPage( pParent, "AxisLabelTabPage","modules/schart/ui/tp_axisLabel.ui", &rInAttrs ),
-
- m_bShowStaggeringControls( true ),
-
- m_nInitialDegrees( 0 ),
- m_bHasInitialDegrees( true ),
- m_bInitialStacking( false ),
- m_bHasInitialStacking( true ),
- m_bComplexCategories( false )
+SchAxisLabelTabPage::SchAxisLabelTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs)
+ : SfxTabPage(pParent, "modules/schart/ui/tp_axisLabel.ui", "AxisLabelTabPage", &rInAttrs)
+ , m_bShowStaggeringControls( true )
+ , m_nInitialDegrees( 0 )
+ , m_bHasInitialDegrees( true )
+ , m_bInitialStacking( false )
+ , m_bHasInitialStacking( true )
+ , m_bComplexCategories( false )
+ , m_xCbShowDescription(m_xBuilder->weld_check_button("showlabelsCB"))
+ , m_xFlOrder(m_xBuilder->weld_label("orderL"))
+ , m_xRbSideBySide(m_xBuilder->weld_radio_button("tile"))
+ , m_xRbUpDown(m_xBuilder->weld_radio_button("odd"))
+ , m_xRbDownUp(m_xBuilder->weld_radio_button("even"))
+ , m_xRbAuto(m_xBuilder->weld_radio_button("auto"))
+ , m_xFlTextFlow(m_xBuilder->weld_label("textflowL"))
+ , m_xCbTextOverlap(m_xBuilder->weld_check_button("overlapCB"))
+ , m_xCbTextBreak(m_xBuilder->weld_check_button("breakCB"))
+ , m_xFtABCD(m_xBuilder->weld_label("labelABCD"))
+ , m_xFlOrient(m_xBuilder->weld_label("labelTextOrient"))
+ , m_xFtRotate(m_xBuilder->weld_label("degreeL"))
+ , m_xNfRotate(m_xBuilder->weld_spin_button("OrientDegree"))
+ , m_xCbStacked(m_xBuilder->weld_check_button("stackedCB"))
+ , m_xFtTextDirection(m_xBuilder->weld_label("textdirL"))
+ , m_xLbTextDirection(new SchTextDirectionListBox(m_xBuilder->weld_combo_box("textdirLB")))
+ , m_xCtrlDial(new weld::CustomWeld(*m_xBuilder, "dialCtrl", m_aCtrlDial))
{
- get(m_pCbShowDescription, "showlabelsCB");
- get(m_pFlOrder, "orderL");
- get(m_pRbSideBySide, "tile");
- get(m_pRbUpDown, "odd");
- get(m_pRbDownUp, "even");
- get(m_pRbAuto, "auto");
- get(m_pFlTextFlow, "textflowL");
- get(m_pCbTextOverlap, "overlapCB");
- get(m_pCbTextBreak, "breakCB");
- get(m_pFlOrient, "labelTextOrient");
- get(m_pCtrlDial,"dialCtrl");
- get(m_pFtRotate,"degreeL");
- get(m_pNfRotate,"OrientDegree");
- get(m_pCbStacked,"stackedCB");
- get(m_pFtTextDirection,"textdirL");
- get(m_pLbTextDirection,"textdirLB");
- get(m_pFtABCD,"labelABCD");
- m_pCtrlDial->SetText(m_pFtABCD->GetText());
- m_pOrientHlp.reset(new svx::OrientationHelper(*m_pCtrlDial, *m_pNfRotate, *m_pCbStacked));
- m_pOrientHlp->Enable();
-
- m_pCbStacked->EnableTriState( false );
- m_pOrientHlp->AddDependentWindow( *m_pFlOrient );
- m_pOrientHlp->AddDependentWindow( *m_pFtRotate, TRISTATE_TRUE );
-
- m_pCbShowDescription->SetClickHdl( LINK( this, SchAxisLabelTabPage, ToggleShowLabel ) );
+ m_aCtrlDial.SetText(m_xFtABCD->get_label());
+ m_aCtrlDial.SetLinkedField(m_xNfRotate.get());
+ m_xCtrlDial->set_sensitive(true);
+ m_xNfRotate->set_sensitive(true);
+ m_xCbStacked->set_sensitive(true);
+ m_xFtRotate->set_sensitive(true);
+
+ m_xCbStacked->connect_toggled(LINK(this, SchAxisLabelTabPage, StackedToggleHdl));
+ m_xCbShowDescription->connect_toggled(LINK(this, SchAxisLabelTabPage, ToggleShowLabel));
}
SchAxisLabelTabPage::~SchAxisLabelTabPage()
@@ -76,45 +74,29 @@ SchAxisLabelTabPage::~SchAxisLabelTabPage()
void SchAxisLabelTabPage::dispose()
{
- m_pOrientHlp.reset();
- m_pCbShowDescription.clear();
- m_pFlOrder.clear();
- m_pRbSideBySide.clear();
- m_pRbUpDown.clear();
- m_pRbDownUp.clear();
- m_pRbAuto.clear();
- m_pFlTextFlow.clear();
- m_pCbTextOverlap.clear();
- m_pCbTextBreak.clear();
- m_pFtABCD.clear();
- m_pFlOrient.clear();
- m_pCtrlDial.clear();
- m_pFtRotate.clear();
- m_pNfRotate.clear();
- m_pCbStacked.clear();
- m_pFtTextDirection.clear();
- m_pLbTextDirection.clear();
+ m_xCtrlDial.reset();
+ m_xLbTextDirection.reset();
SfxTabPage::dispose();
}
-VclPtr<SfxTabPage> SchAxisLabelTabPage::Create( TabPageParent pParent, const SfxItemSet* rAttrs )
+VclPtr<SfxTabPage> SchAxisLabelTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrs)
{
- return VclPtr<SchAxisLabelTabPage>::Create( pParent.pParent, *rAttrs );
+ return VclPtr<SchAxisLabelTabPage>::Create(pParent, *rAttrs);
}
bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs )
{
bool bStacked = false;
- if( m_pOrientHlp->GetStackedState() != TRISTATE_INDET )
+ if (m_xCbStacked->get_state() != TRISTATE_INDET )
{
- bStacked = m_pOrientHlp->GetStackedState() == TRISTATE_TRUE;
+ bStacked = m_xCbStacked->get_state() == TRISTATE_TRUE;
if( !m_bHasInitialStacking || (bStacked != m_bInitialStacking) )
rOutAttrs->Put( SfxBoolItem( SCHATTR_TEXT_STACKED, bStacked ) );
}
- if( m_pCtrlDial->HasRotation() )
+ if( m_aCtrlDial.HasRotation() )
{
- sal_Int32 nDegrees = bStacked ? 0 : m_pCtrlDial->GetRotation();
+ sal_Int32 nDegrees = bStacked ? 0 : m_aCtrlDial.GetRotation();
if( !m_bHasInitialDegrees || (nDegrees != m_nInitialDegrees) )
rOutAttrs->Put( SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) );
}
@@ -124,13 +106,13 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs )
SvxChartTextOrder eOrder = SvxChartTextOrder::SideBySide;
bool bRadioButtonChecked = true;
- if( m_pRbUpDown->IsChecked())
+ if( m_xRbUpDown->get_active())
eOrder = SvxChartTextOrder::UpDown;
- else if( m_pRbDownUp->IsChecked())
+ else if( m_xRbDownUp->get_active())
eOrder = SvxChartTextOrder::DownUp;
- else if( m_pRbAuto->IsChecked())
+ else if( m_xRbAuto->get_active())
eOrder = SvxChartTextOrder::Auto;
- else if( m_pRbSideBySide->IsChecked())
+ else if( m_xRbSideBySide->get_active())
eOrder = SvxChartTextOrder::SideBySide;
else
bRadioButtonChecked = false;
@@ -139,15 +121,15 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs )
rOutAttrs->Put( SvxChartTextOrderItem( eOrder, SCHATTR_AXIS_LABEL_ORDER ));
}
- if( m_pCbTextOverlap->GetState() != TRISTATE_INDET )
- rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_LABEL_OVERLAP, m_pCbTextOverlap->IsChecked() ) );
- if( m_pCbTextBreak->GetState() != TRISTATE_INDET )
- rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_LABEL_BREAK, m_pCbTextBreak->IsChecked() ) );
- if( m_pCbShowDescription->GetState() != TRISTATE_INDET )
- rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, m_pCbShowDescription->IsChecked() ) );
+ if( m_xCbTextOverlap->get_state() != TRISTATE_INDET )
+ rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_LABEL_OVERLAP, m_xCbTextOverlap->get_active() ) );
+ if( m_xCbTextBreak->get_state() != TRISTATE_INDET )
+ rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_LABEL_BREAK, m_xCbTextBreak->get_active() ) );
+ if( m_xCbShowDescription->get_state() != TRISTATE_INDET )
+ rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, m_xCbShowDescription->get_active() ) );
- if( m_pLbTextDirection->GetSelectedEntryCount() > 0 )
- rOutAttrs->Put( SvxFrameDirectionItem( m_pLbTextDirection->GetSelectEntryValue(), EE_PARA_WRITINGDIR ) );
+ if (m_xLbTextDirection->get_active() != -1)
+ rOutAttrs->Put( SvxFrameDirectionItem( m_xLbTextDirection->get_active_id(), EE_PARA_WRITINGDIR ) );
return true;
}
@@ -160,19 +142,17 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
SfxItemState aState = rInAttrs->GetItemState( SCHATTR_AXIS_SHOWDESCR, false, &pPoolItem );
if( aState == SfxItemState::DONTCARE )
{
- m_pCbShowDescription->EnableTriState();
- m_pCbShowDescription->SetState( TRISTATE_INDET );
+ m_xCbShowDescription->set_state( TRISTATE_INDET );
}
else
{
- m_pCbShowDescription->EnableTriState( false );
bool bCheck = false;
if( aState == SfxItemState::SET )
bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
- m_pCbShowDescription->Check( bCheck );
+ m_xCbShowDescription->set_active( bCheck );
if( aState != SfxItemState::DEFAULT && aState != SfxItemState::SET )
- m_pCbShowDescription->Hide();
+ m_xCbShowDescription->hide();
}
// Rotation as orient item or in degrees ----------
@@ -185,9 +165,9 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
m_bHasInitialDegrees = aState != SfxItemState::DONTCARE;
if( m_bHasInitialDegrees )
- m_pCtrlDial->SetRotation( m_nInitialDegrees );
+ m_aCtrlDial.SetRotation( m_nInitialDegrees );
else
- m_pCtrlDial->SetNoRotation();
+ m_aCtrlDial.SetNoRotation();
// check stacked item
m_bInitialStacking = false;
@@ -197,52 +177,49 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
m_bHasInitialStacking = aState != SfxItemState::DONTCARE;
if( m_bHasInitialDegrees )
- m_pOrientHlp->SetStackedState( m_bInitialStacking ? TRISTATE_TRUE : TRISTATE_FALSE );
+ m_xCbStacked->set_state(m_bInitialStacking ? TRISTATE_TRUE : TRISTATE_FALSE);
else
- m_pOrientHlp->SetStackedState( TRISTATE_INDET );
+ m_xCbStacked->set_state(TRISTATE_INDET);
+ StackedToggleHdl(*m_xCbStacked);
if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
- m_pLbTextDirection->SelectEntryValue( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() );
+ m_xLbTextDirection->set_active_id( static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue() );
// Text overlap ----------
aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_OVERLAP, false, &pPoolItem );
if( aState == SfxItemState::DONTCARE )
{
- m_pCbTextOverlap->EnableTriState();
- m_pCbTextOverlap->SetState( TRISTATE_INDET );
+ m_xCbTextOverlap->set_state( TRISTATE_INDET );
}
else
{
- m_pCbTextOverlap->EnableTriState( false );
bool bCheck = false;
if( aState == SfxItemState::SET )
bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
- m_pCbTextOverlap->Check( bCheck );
+ m_xCbTextOverlap->set_active( bCheck );
if( aState != SfxItemState::DEFAULT && aState != SfxItemState::SET )
- m_pCbTextOverlap->Hide();
+ m_xCbTextOverlap->hide();
}
// text break ----------
aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_BREAK, false, &pPoolItem );
if( aState == SfxItemState::DONTCARE )
{
- m_pCbTextBreak->EnableTriState();
- m_pCbTextBreak->SetState( TRISTATE_INDET );
+ m_xCbTextBreak->set_state( TRISTATE_INDET );
}
else
{
- m_pCbTextBreak->EnableTriState( false );
bool bCheck = false;
if( aState == SfxItemState::SET )
bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
- m_pCbTextBreak->Check( bCheck );
+ m_xCbTextBreak->set_active( bCheck );
if( aState != SfxItemState::DEFAULT && aState != SfxItemState::SET )
{
- m_pCbTextBreak->Hide();
- if( ! m_pCbTextOverlap->IsVisible() )
- m_pFlTextFlow->Hide();
+ m_xCbTextBreak->hide();
+ if( ! m_xCbTextOverlap->get_visible() )
+ m_xFlTextFlow->hide();
}
}
@@ -257,22 +234,22 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
switch( eOrder )
{
case SvxChartTextOrder::SideBySide:
- m_pRbSideBySide->Check();
+ m_xRbSideBySide->set_active(true);
break;
case SvxChartTextOrder::UpDown:
- m_pRbUpDown->Check();
+ m_xRbUpDown->set_active(true);
break;
case SvxChartTextOrder::DownUp:
- m_pRbDownUp->Check();
+ m_xRbDownUp->set_active(true);
break;
case SvxChartTextOrder::Auto:
- m_pRbAuto->Check();
+ m_xRbAuto->set_active(true);
break;
}
}
}
- ToggleShowLabel( nullptr );
+ ToggleShowLabel(*m_xCbShowDescription);
}
void SchAxisLabelTabPage::ShowStaggeringControls( bool bShowStaggeringControls )
@@ -281,11 +258,11 @@ void SchAxisLabelTabPage::ShowStaggeringControls( bool bShowStaggeringControls )
if( !m_bShowStaggeringControls )
{
- m_pRbSideBySide->Hide();
- m_pRbUpDown->Hide();
- m_pRbDownUp->Hide();
- m_pRbAuto->Hide();
- m_pFlOrder->Hide();
+ m_xRbSideBySide->hide();
+ m_xRbUpDown->hide();
+ m_xRbDownUp->hide();
+ m_xRbAuto->hide();
+ m_xFlOrder->hide();
}
}
@@ -296,23 +273,34 @@ void SchAxisLabelTabPage::SetComplexCategories( bool bComplexCategories )
// event handling routines
-IMPL_LINK_NOARG(SchAxisLabelTabPage, ToggleShowLabel, Button*, void)
+IMPL_LINK_NOARG(SchAxisLabelTabPage, StackedToggleHdl, weld::ToggleButton&, void)
+{
+ bool bActive = m_xCbStacked->get_active() && m_xCbStacked->get_sensitive();
+ m_xNfRotate->set_sensitive(bActive);
+ m_xCtrlDial->set_sensitive(bActive);
+ m_aCtrlDial.StyleUpdated();
+ m_xFtRotate->set_sensitive(bActive);
+}
+
+IMPL_LINK_NOARG(SchAxisLabelTabPage, ToggleShowLabel, weld::ToggleButton&, void)
{
- bool bEnable = ( m_pCbShowDescription->GetState() != TRISTATE_FALSE );
+ bool bEnable = ( m_xCbShowDescription->get_state() != TRISTATE_FALSE );
+
+ m_xCbStacked->set_sensitive(bEnable);
+ StackedToggleHdl(*m_xCbStacked);
- m_pOrientHlp->Enable( bEnable );
- m_pFlOrder->Enable( bEnable );
- m_pRbSideBySide->Enable( bEnable );
- m_pRbUpDown->Enable( bEnable );
- m_pRbDownUp->Enable( bEnable );
- m_pRbAuto->Enable( bEnable );
+ m_xFlOrder->set_sensitive( bEnable );
+ m_xRbSideBySide->set_sensitive( bEnable );
+ m_xRbUpDown->set_sensitive( bEnable );
+ m_xRbDownUp->set_sensitive( bEnable );
+ m_xRbAuto->set_sensitive( bEnable );
- m_pFlTextFlow->Enable( bEnable );
- m_pCbTextOverlap->Enable( bEnable && !m_bComplexCategories );
- m_pCbTextBreak->Enable( bEnable );
+ m_xFlTextFlow->set_sensitive( bEnable );
+ m_xCbTextOverlap->set_sensitive( bEnable && !m_bComplexCategories );
+ m_xCbTextBreak->set_sensitive( bEnable );
- m_pFtTextDirection->Enable( bEnable );
- m_pLbTextDirection->Enable( bEnable );
+ m_xFtTextDirection->set_sensitive( bEnable );
+ m_xLbTextDirection->set_sensitive( bEnable );
}
} //namespace chart
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
index 52137a80f5b5..619e099bd889 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
@@ -20,10 +20,9 @@
#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_AXISLABEL_HXX
#include <sfx2/tabdlg.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
#include <svx/dialcontrol.hxx>
-#include <svx/orienthelper.hxx>
+#include <vcl/customweld.hxx>
+#include <vcl/weld.hxx>
#include <TextDirectionListBox.hxx>
namespace chart
@@ -32,28 +31,6 @@ namespace chart
class SchAxisLabelTabPage : public SfxTabPage
{
private:
- VclPtr<CheckBox> m_pCbShowDescription;
-
- VclPtr<FixedText> m_pFlOrder;
- VclPtr<RadioButton> m_pRbSideBySide;
- VclPtr<RadioButton> m_pRbUpDown;
- VclPtr<RadioButton> m_pRbDownUp;
- VclPtr<RadioButton> m_pRbAuto;
-
- VclPtr<FixedText> m_pFlTextFlow;
- VclPtr<CheckBox> m_pCbTextOverlap;
- VclPtr<CheckBox> m_pCbTextBreak;
- VclPtr<FixedText> m_pFtABCD;
- VclPtr<FixedText> m_pFlOrient;
- VclPtr<svx::DialControl> m_pCtrlDial;
- VclPtr<FixedText> m_pFtRotate;
- VclPtr<NumericField> m_pNfRotate;
- VclPtr<TriStateBox> m_pCbStacked;
- std::unique_ptr<svx::OrientationHelper> m_pOrientHlp;
-
- VclPtr<FixedText> m_pFtTextDirection;
- VclPtr<TextDirectionListBox> m_pLbTextDirection;
-
bool m_bShowStaggeringControls;
sal_Int32 m_nInitialDegrees;
@@ -62,10 +39,30 @@ private:
bool m_bHasInitialStacking; /// false = checkbox in tristate
bool m_bComplexCategories;
- DECL_LINK ( ToggleShowLabel, Button*, void );
+ svx::SvxDialControl m_aCtrlDial;
+ std::unique_ptr<weld::CheckButton> m_xCbShowDescription;
+ std::unique_ptr<weld::Label> m_xFlOrder;
+ std::unique_ptr<weld::RadioButton> m_xRbSideBySide;
+ std::unique_ptr<weld::RadioButton> m_xRbUpDown;
+ std::unique_ptr<weld::RadioButton> m_xRbDownUp;
+ std::unique_ptr<weld::RadioButton> m_xRbAuto;
+ std::unique_ptr<weld::Label> m_xFlTextFlow;
+ std::unique_ptr<weld::CheckButton> m_xCbTextOverlap;
+ std::unique_ptr<weld::CheckButton> m_xCbTextBreak;
+ std::unique_ptr<weld::Label> m_xFtABCD;
+ std::unique_ptr<weld::Label> m_xFlOrient;
+ std::unique_ptr<weld::Label> m_xFtRotate;
+ std::unique_ptr<weld::SpinButton> m_xNfRotate;
+ std::unique_ptr<weld::CheckButton> m_xCbStacked;
+ std::unique_ptr<weld::Label> m_xFtTextDirection;
+ std::unique_ptr<SchTextDirectionListBox> m_xLbTextDirection;
+ std::unique_ptr<weld::CustomWeld> m_xCtrlDial;
+
+ DECL_LINK(StackedToggleHdl, weld::ToggleButton&, void);
+ DECL_LINK(ToggleShowLabel, weld::ToggleButton&, void);
public:
- SchAxisLabelTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
+ SchAxisLabelTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
virtual ~SchAxisLabelTabPage() override;
virtual void dispose() override;
diff --git a/chart2/uiconfig/ui/tp_axisLabel.ui b/chart2/uiconfig/ui/tp_axisLabel.ui
index 3ef28bf10942..972805ba3e15 100644
--- a/chart2/uiconfig/ui/tp_axisLabel.ui
+++ b/chart2/uiconfig/ui/tp_axisLabel.ui
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="chart">
<requires lib="gtk+" version="3.18"/>
- <!-- interface-requires LibreOffice 1.0 -->
<object class="GtkAdjustment" id="adjustmentSpinDegrees">
<property name="upper">359</property>
<property name="step_increment">5</property>
@@ -68,7 +67,6 @@
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
- <property name="group">odd</property>
</object>
<packing>
<property name="expand">False</property>
@@ -85,7 +83,7 @@
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
- <property name="group">even</property>
+ <property name="group">tile</property>
</object>
<packing>
<property name="expand">False</property>
@@ -102,7 +100,7 @@
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
- <property name="group">auto</property>
+ <property name="group">tile</property>
</object>
<packing>
<property name="expand">False</property>
@@ -260,6 +258,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_top">40</property>
+ <property name="activates_default">True</property>
<property name="progress_pulse_step">1</property>
<property name="adjustment">adjustmentSpinDegrees</property>
<property name="wrap">True</property>
@@ -267,8 +266,6 @@
<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>
@@ -282,8 +279,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -302,23 +297,32 @@
<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="dialCtrl">
+ <object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="active">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkViewport">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkDrawingArea" id="dialCtrl">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
+ </object>
+ </child>
+ </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>
@@ -341,8 +345,6 @@
<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>
@@ -353,16 +355,12 @@
<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>
<child>
@@ -375,12 +373,10 @@
<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="chartcontrollerlo-TextDirectionListBox" id="textdirLB">
+ <object class="GtkComboBoxText" id="textdirLB">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -388,7 +384,6 @@
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">2</property>
- <property name="height">1</property>
</packing>
</child>
</object>
diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx
index ae3205d3b8c1..f5c1769d9811 100644
--- a/include/svx/dialcontrol.hxx
+++ b/include/svx/dialcontrol.hxx
@@ -179,6 +179,8 @@ public:
sal_Int32 GetRotation() const;
/** Sets the rotation to the passed value (in 1/100 degrees). */
void SetRotation( sal_Int32 nAngle );
+ /** Returns true, if the control is not in "don't care" state. */
+ bool HasRotation() const;
/** Sets the control to "don't care" state. */
void SetNoRotation();
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx
index 73674cb5c66e..59b5d60a0f55 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -621,6 +621,11 @@ void SvxDialControl::LoseFocus()
HandleEscapeEvent();
}
+bool SvxDialControl::HasRotation() const
+{
+ return !mpImpl->mbNoRot;
+}
+
void SvxDialControl::SetNoRotation()
{
if( !mpImpl->mbNoRot )