28#include <com/sun/star/chart/MissingValueTreatment.hpp>
34 :
SfxTabPage(pPage, pController,
"modules/schart/ui/tp_SeriesToAxis.ui",
"TP_OPTIONS", &rInAttrs)
35 , m_nAllSeriesAxisIndex(0)
36 , m_bProvidesSecondaryYAxis(true)
37 , m_bProvidesOverlapAndGapWidth(false)
38 , m_bProvidesBarConnectors(false)
39 , m_xGrpAxis(m_xBuilder->weld_widget(
"frameGrpAxis"))
40 , m_xRbtAxis1(m_xBuilder->weld_radio_button(
"RBT_OPT_AXIS_1"))
41 , m_xRbtAxis2(m_xBuilder->weld_radio_button(
"RBT_OPT_AXIS_2"))
42 , m_xGrpBar(m_xBuilder->weld_widget(
"frameSettings"))
43 , m_xMTGap(m_xBuilder->weld_metric_spin_button(
"MT_GAP",
FieldUnit::
PERCENT))
44 , m_xMTOverlap(m_xBuilder->weld_metric_spin_button(
"MT_OVERLAP",
FieldUnit::
PERCENT))
45 , m_xCBConnect(m_xBuilder->weld_check_button(
"CB_CONNECTOR"))
46 , m_xCBAxisSideBySide(m_xBuilder->weld_check_button(
"CB_BARS_SIDE_BY_SIDE"))
47 , m_xGrpPlotOptions(m_xBuilder->weld_widget(
"frameFL_PLOT_OPTIONS"))
48 , m_xGridPlotOptions(m_xBuilder->weld_widget(
"gridPLOT_OPTIONS"))
49 , m_xRB_DontPaint(m_xBuilder->weld_radio_button(
"RB_DONT_PAINT"))
50 , m_xRB_AssumeZero(m_xBuilder->weld_radio_button(
"RB_ASSUME_ZERO"))
51 , m_xRB_ContinueLine(m_xBuilder->weld_radio_button(
"RB_CONTINUE_LINE"))
52 , m_xCBIncludeHiddenCells(m_xBuilder->weld_check_button(
"CB_INCLUDE_HIDDEN_CELLS"))
53 , m_xCBHideLegendEntry(m_xBuilder->weld_check_button(
"CB_LEGEND_ENTRY_HIDDEN"))
65 if( m_nAllSeriesAxisIndex == 0 )
66 m_xCBAxisSideBySide->set_sensitive( m_xRbtAxis2->get_active());
67 else if( m_nAllSeriesAxisIndex == 1 )
68 m_xCBAxisSideBySide->set_sensitive( m_xRbtAxis1->get_active());
74 return std::make_unique<SchOptionTabPage>(pPage, pController, *rOutAttrs);
131 nTmp =
static_cast<tools::Long>(pGapWidthItem->GetValue());
132 m_xMTGap->set_value(nTmp, FieldUnit::PERCENT);
137 nTmp =
static_cast<tools::Long>(pOverlapItem->GetValue());
143 bool bCheck = pConnectItem->GetValue();
156 bool bCheck = ! pPerAxisItem->GetValue();
166 std::vector< sal_Int32 > aMissingValueTreatments;
168 aMissingValueTreatments = pValueTreatmentsItem->GetList();
171 if ( aMissingValueTreatments.size()>1 &&
178 for(
int nVal : aMissingValueTreatments)
180 if(nVal==css::chart::MissingValueTreatment::LEAVE_GAP)
182 else if(nVal==css::chart::MissingValueTreatment::USE_ZERO)
184 else if(nVal==css::chart::MissingValueTreatment::CONTINUE)
189 if(nVal==css::chart::MissingValueTreatment::LEAVE_GAP)
191 else if(nVal==css::chart::MissingValueTreatment::USE_ZERO)
193 else if(nVal==css::chart::MissingValueTreatment::CONTINUE)
205 bool bVal = pHiddenCellsItem->GetValue();
220 bool bVal = pEntryItem->GetValue();
227void SchOptionTabPage::Init(
bool bProvidesSecondaryYAxis,
bool bProvidesOverlapAndGapWidth,
bool bProvidesBarConnectors )
#define CHART_AXIS_PRIMARY_Y
constexpr TypedWhichId< SfxInt32Item > SCHATTR_MISSING_VALUE_TREATMENT(SCHATTR_CHARTTYPE_START+9)
constexpr TypedWhichId< SfxInt32Item > SCHATTR_AXIS(SCHATTR_STYLE_END+1)
constexpr TypedWhichId< SfxIntegerListItem > SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS(SCHATTR_CHARTTYPE_START+10)
constexpr TypedWhichId< SfxBoolItem > SCHATTR_HIDE_LEGEND_ENTRY(SCHATTR_CHARTTYPE_START+12)
constexpr TypedWhichId< SfxInt32Item > SCHATTR_BAR_GAPWIDTH(SCHATTR_CHARTTYPE_START+1)
constexpr TypedWhichId< SfxBoolItem > SCHATTR_BAR_CONNECT(SCHATTR_CHARTTYPE_START+2)
#define CHART_AXIS_SECONDARY_Y
constexpr TypedWhichId< SfxBoolItem > SCHATTR_GROUP_BARS_PER_AXIS(SCHATTR_CHARTTYPE_START+6)
constexpr TypedWhichId< SfxBoolItem > SCHATTR_INCLUDE_HIDDEN_CELLS(SCHATTR_CHARTTYPE_START+11)
constexpr TypedWhichId< SfxInt32Item > SCHATTR_AXIS_FOR_ALL_SERIES(SCHATTR_MISC_START)
constexpr TypedWhichId< SfxInt32Item > SCHATTR_BAR_OVERLAP(SCHATTR_CHARTTYPE_START)
sal_Int32 GetValue() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
std::unique_ptr< weld::RadioButton > m_xRbtAxis2
sal_Int32 m_nAllSeriesAxisIndex
virtual void Reset(const SfxItemSet *rInAttrs) override
std::unique_ptr< weld::RadioButton > m_xRB_DontPaint
SchOptionTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
virtual ~SchOptionTabPage() override
bool m_bProvidesOverlapAndGapWidth
std::unique_ptr< weld::Widget > m_xGrpAxis
virtual bool FillItemSet(SfxItemSet *rOutAttrs) override
std::unique_ptr< weld::Widget > m_xGridPlotOptions
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
std::unique_ptr< weld::Widget > m_xGrpPlotOptions
void Init(bool bProvidesSecondaryYAxis, bool bProvidesOverlapAndGapWidth, bool bProvidesBarConnectors)
std::unique_ptr< weld::CheckButton > m_xCBConnect
void AdaptControlPositionsAndVisibility()
std::unique_ptr< weld::CheckButton > m_xCBIncludeHiddenCells
std::unique_ptr< weld::RadioButton > m_xRB_ContinueLine
std::unique_ptr< weld::CheckButton > m_xCBAxisSideBySide
std::unique_ptr< weld::CheckButton > m_xCBHideLegendEntry
std::unique_ptr< weld::MetricSpinButton > m_xMTOverlap
std::unique_ptr< weld::RadioButton > m_xRB_AssumeZero
bool m_bProvidesSecondaryYAxis
std::unique_ptr< weld::RadioButton > m_xRbtAxis1
bool m_bProvidesBarConnectors
std::unique_ptr< weld::MetricSpinButton > m_xMTGap
std::unique_ptr< weld::Widget > m_xGrpBar
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(SplinePropertiesDialog, SplineTypeListBoxHdl, weld::ComboBox &, void)
constexpr OUStringLiteral PERCENT(u"Percent")