27#include <com/sun/star/beans/PropertyState.hpp>
28#include <com/sun/star/beans/PropertyValue.hpp>
29#include <officecfg/Office/Common.hxx>
30#include <osl/diagnose.h>
34 void lcl_ShowChooserButton(
60using ::com::sun::star::uno::Sequence;
64 bool bHideDescription )
65 : OWizardPage(pPage, pController,
"modules/schart/ui/tp_RangeChooser.ui",
"tp_RangeChooser")
66 , m_nChangingControlCalls(0)
68 , m_pTemplateProvider(pTemplateProvider)
69 , m_rDialogModel( rDialogModel )
70 , m_pTabPageNotifiable(dynamic_cast<TabPageNotifiable*>(pController))
71 , m_xFT_Caption(m_xBuilder->weld_label(
"FT_CAPTION_FOR_WIZARD"))
72 , m_xED_Range(m_xBuilder->weld_entry(
"ED_RANGE"))
73 , m_xIB_Range(m_xBuilder->weld_button(
"IB_RANGE"))
74 , m_xRB_Rows(m_xBuilder->weld_radio_button(
"RB_DATAROWS"))
75 , m_xRB_Columns(m_xBuilder->weld_radio_button(
"RB_DATACOLS"))
76 , m_xCB_FirstRowAsLabel(m_xBuilder->weld_check_button(
"CB_FIRST_ROW_ASLABELS"))
77 , m_xCB_FirstColumnAsLabel(m_xBuilder->weld_check_button(
"CB_FIRST_COLUMN_ASLABELS"))
78 , m_xFTTitle(m_xBuilder->weld_label(
"STR_PAGE_DATA_RANGE"))
79 , m_xFL_TimeBased(m_xBuilder->weld_widget(
"separator1"))
80 , m_xCB_TimeBased(m_xBuilder->weld_check_button(
"CB_TIME_BASED"))
81 , m_xFT_TimeStart(m_xBuilder->weld_label(
"label1"))
82 , m_xEd_TimeStart(m_xBuilder->weld_entry(
"ED_TIME_BASED_START"))
83 , m_xFT_TimeEnd(m_xBuilder->weld_label(
"label2"))
84 , m_xEd_TimeEnd(m_xBuilder->weld_entry(
"ED_TIME_BASED_END"))
111 if ( !officecfg::Office::Common::Misc::ExperimentalMode::get() )
128 OWizardPage::Activate();
197 OSL_FAIL(
"Need a template to change data source" );
213 m_xRB_Columns->get_active(), bFirstCellAsLabel, bHasCategories ) );
219 beans::PropertyValue(
"TimeBased", -1,
uno::Any(bTimeBased),
220 beans::PropertyState_DIRECT_VALUE );
230 beans::PropertyValue(
"CellRangeRepresentation" , -1,
232 beans::PropertyState_DIRECT_VALUE );
254 bool bIsValid = ( aRange.isEmpty() ) ||
282 m_xRB_Rows->set_sensitive( bIsSwappedRangeValid );
289 bDataInColumns ? ! bFirstCellAsLabel : bFirstCellAsLabel,
290 bDataInColumns ? bHasCategories : ! bHasCategories )));
295 bDataInColumns ? bFirstCellAsLabel : ! bFirstCellAsLabel,
296 bDataInColumns ? ! bHasCategories : bHasCategories )));
320 ControlChangedHdl(*m_xED_Range);
325 ControlChangedHdl(*m_xED_Range);
332 changeDialogModelAccordingToControls();
337 OUString aRange = m_xED_Range->get_text();
338 OUString aTitle = m_xFTTitle->get_label();
340 lcl_enableRangeChoosing(
true, m_pDialogController);
341 m_rDialogModel.getRangeSelectionHelper()->chooseRange( aRange, aTitle, *
this );
349 OUString aRange( rNewRange );
void SetPageTitle(const OUString &rPageTitle)
virtual void Deactivate()
weld::DialogController * m_pDialogController
virtual rtl::Reference<::chart::ChartTypeTemplate > getCurrentTemplate() const =0
static css::uno::Sequence< css::beans::PropertyValue > createArguments(bool bUseColumns, bool bFirstCellAsLabel, bool bHasCategories)
void setData(const css::uno::Sequence< css::beans::PropertyValue > &rArguments)
void detectArguments(OUString &rOutRangeString, bool &rOutUseColumns, bool &rOutFirstCellAsLabel, bool &rOutHasCategories) const
void setTemplate(const rtl::Reference< ::chart::ChartTypeTemplate > &xTemplate)
void setTimeBasedRange(bool bTimeBased, sal_Int32 nStart, sal_Int32 nEnd) const
bool allArgumentsForRectRangeDetected() const
std::shared_ptr< RangeSelectionHelper > const & getRangeSelectionHelper() const
void startControllerLockTimer()
void initControlsFromModel()
std::unique_ptr< weld::RadioButton > m_xRB_Rows
std::unique_ptr< weld::Label > m_xFT_Caption
TabPageNotifiable * m_pTabPageNotifiable
virtual void disposingRangeSelection() override
void changeDialogModelAccordingToControls()
std::unique_ptr< weld::Entry > m_xED_Range
virtual void listeningFinished(const OUString &rNewRange) override
ChartTypeTemplateProvider * m_pTemplateProvider
std::unique_ptr< weld::Label > m_xFTTitle
std::unique_ptr< weld::CheckButton > m_xCB_FirstRowAsLabel
std::unique_ptr< weld::Widget > m_xFL_TimeBased
RangeChooserTabPage(weld::Container *pPage, weld::DialogController *pController, DialogModel &rDialogModel, ChartTypeTemplateProvider *pTemplateProvider, bool bHideDescription=false)
rtl::Reference< ::chart::ChartTypeTemplate > m_xCurrentChartTypeTemplate
sal_Int32 m_nChangingControlCalls
std::unique_ptr< weld::Entry > m_xEd_TimeEnd
virtual void Deactivate() override
std::unique_ptr< weld::Entry > m_xEd_TimeStart
std::unique_ptr< weld::Label > m_xFT_TimeStart
virtual ~RangeChooserTabPage() override
std::unique_ptr< weld::Label > m_xFT_TimeEnd
std::unique_ptr< weld::CheckButton > m_xCB_TimeBased
virtual void Activate() override
std::unique_ptr< weld::RadioButton > m_xRB_Columns
OUString m_aLastValidRangeString
DialogModel & m_rDialogModel
std::unique_ptr< weld::CheckButton > m_xCB_FirstColumnAsLabel
std::unique_ptr< weld::Button > m_xIB_Range
virtual Dialog * getDialog()=0
virtual void set_modal(bool bModal)=0
Sequence< PropertyValue > aArguments
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(SplinePropertiesDialog, SplineTypeListBoxHdl, weld::ComboBox &, void)