20 #undef SC_DLLIMPLEMENTATION
30#include <officecfg/Office/Calc.hxx>
36 :
SfxTabPage(pPage, pController,
"modules/scalc/ui/optcalculatepage.ui",
"OptCalculatePage", &rCoreAttrs)
38 rCoreAttrs.
Get(SID_SCDOCOPTIONS).GetDocOptions()))
40 , m_xBtnIterate(m_xBuilder->weld_check_button(
"iterate"))
41 , m_xFtSteps(m_xBuilder->weld_label(
"stepsft"))
42 , m_xEdSteps(m_xBuilder->weld_spin_button(
"steps"))
43 , m_xFtEps(m_xBuilder->weld_label(
"minchangeft"))
44 , m_xEdEps(new
ScDoubleField(m_xBuilder->weld_entry(
"minchange")))
45 , m_xBtnDateStd(m_xBuilder->weld_radio_button(
"datestd"))
46 , m_xBtnDateSc10(m_xBuilder->weld_radio_button(
"datesc10"))
47 , m_xBtnDate1904(m_xBuilder->weld_radio_button(
"date1904"))
48 , m_xBtnCase(m_xBuilder->weld_check_button(
"case"))
49 , m_xBtnCalc(m_xBuilder->weld_check_button(
"calc"))
50 , m_xBtnMatch(m_xBuilder->weld_check_button(
"match"))
51 , m_xBtnWildcards(m_xBuilder->weld_radio_button(
"formulawildcards"))
52 , m_xBtnRegex(m_xBuilder->weld_radio_button(
"formularegex"))
53 , m_xBtnLiteral(m_xBuilder->weld_radio_button(
"formulaliteral"))
54 , m_xBtnLookUp(m_xBuilder->weld_check_button(
"lookup"))
55 , m_xBtnGeneralPrec(m_xBuilder->weld_check_button(
"generalprec"))
56 , m_xFtPrec(m_xBuilder->weld_label(
"precft"))
57 , m_xEdPrec(m_xBuilder->weld_spin_button(
"prec"))
58 , m_xBtnThread(m_xBuilder->weld_check_button(
"threadingenabled"))
80 return std::make_unique<ScTpCalcOptions>( pPage, pController, *rAttrSet );
89 rCoreAttrs->
Get(SID_SCDOCOPTIONS).GetDocOptions()));
94 m_xBtnCase->set_sensitive( !officecfg::Office::Calc::Calculate::Other::CaseSensitive::isReadOnly() );
96 m_xBtnCalc->set_sensitive( !officecfg::Office::Calc::Calculate::Other::Precision::isReadOnly() );
98 m_xBtnMatch->set_sensitive( !officecfg::Office::Calc::Calculate::Other::SearchCriteria::isReadOnly() );
104 if (bWildcards && bRegex)
108 m_xBtnWildcards->set_sensitive( !officecfg::Office::Calc::Calculate::Other::Wildcards::isReadOnly() );
109 m_xBtnRegex->set_sensitive( !officecfg::Office::Calc::Calculate::Other::RegularExpressions::isReadOnly() );
120 m_xBtnLookUp->set_sensitive( !officecfg::Office::Calc::Calculate::Other::FindLabel::isReadOnly() );
156 m_xBtnThread->set_sensitive( !officecfg::Office::Calc::Formula::Calculation::UseThreadedCalculationForFormulaGroups::isReadOnly() );
157 m_xBtnThread->set_active( officecfg::Office::Calc::Formula::Calculation::UseThreadedCalculationForFormulaGroups::get() );
175 static_cast<sal_uInt16
>(
m_xEdPrec->get_value()) );
179 bool bShouldEnableThreading =
m_xBtnThread->get_active();
180 if (bShouldEnableThreading != officecfg::Office::Calc::Formula::Calculation::UseThreadedCalculationForFormulaGroups::get())
183 officecfg::Office::Calc::Formula::Calculation::UseThreadedCalculationForFormulaGroups::set(bShouldEnableThreading, xBatch);
205 if(
m_xEdEps->GetValue( fEps ) && (fEps > 0.0) )
208 nReturn = DeactivateRC::LeavePage;
211 if ( nReturn == DeactivateRC::KeepPage )
214 VclButtonsType::Ok,
ScResId(STR_INVALID_EPS)));
229 if (!rBtn.get_active())
231 if (m_xBtnDateStd->get_active())
233 pLocalOptions->SetDate( 30, 12, 1899 );
235 else if (m_xBtnDateSc10->get_active())
237 pLocalOptions->SetDate( 1, 1, 1900 );
239 else if (m_xBtnDate1904->get_active())
241 pLocalOptions->SetDate( 1, 1, 1904 );
247 if (&rBtn == m_xBtnGeneralPrec.get())
249 if (rBtn.get_active())
251 m_xEdPrec->set_sensitive(
true);
252 m_xFtPrec->set_sensitive(
true);
256 m_xEdPrec->set_sensitive(
false);
257 m_xFtPrec->set_sensitive(
false);
260 else if (&rBtn == m_xBtnIterate.get())
262 if (rBtn.get_active())
264 pLocalOptions->SetIter(
true );
265 m_xFtSteps->set_sensitive(
true); m_xEdSteps->set_sensitive(
true);
266 m_xFtEps->set_sensitive(
true); m_xEdEps->set_sensitive(
true);
270 pLocalOptions->SetIter(
false );
271 m_xFtSteps->set_sensitive(
false); m_xEdSteps->set_sensitive(
false);
272 m_xFtEps->set_sensitive(
false); m_xEdEps->set_sensitive(
false);
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
An edit control that contains a double precision floating-point value.
std::unique_ptr< ScDoubleField > m_xEdEps
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rCoreSet)
std::unique_ptr< weld::CheckButton > m_xBtnThread
std::unique_ptr< weld::RadioButton > m_xBtnDateSc10
std::unique_ptr< ScDocOptions > pLocalOptions
std::unique_ptr< weld::SpinButton > m_xEdPrec
virtual ~ScTpCalcOptions() override
std::unique_ptr< weld::RadioButton > m_xBtnWildcards
std::unique_ptr< weld::RadioButton > m_xBtnDateStd
std::unique_ptr< weld::Label > m_xFtPrec
std::unique_ptr< weld::RadioButton > m_xBtnLiteral
virtual void Reset(const SfxItemSet *rCoreSet) override
std::unique_ptr< weld::CheckButton > m_xBtnIterate
ScTpCalcOptions(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreSet)
std::unique_ptr< weld::CheckButton > m_xBtnGeneralPrec
std::unique_ptr< weld::CheckButton > m_xBtnMatch
std::unique_ptr< weld::CheckButton > m_xBtnCase
std::unique_ptr< weld::RadioButton > m_xBtnDate1904
std::unique_ptr< weld::CheckButton > m_xBtnLookUp
std::unique_ptr< weld::SpinButton > m_xEdSteps
std::unique_ptr< weld::CheckButton > m_xBtnCalc
std::unique_ptr< ScDocOptions > pOldOptions
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::RadioButton > m_xBtnRegex
virtual bool FillItemSet(SfxItemSet *rCoreSet) override
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
SfxOkDialogController * GetDialogController() const
void SetExchangeSupport()
weld::Window * GetFrameWeld() const
static std::shared_ptr< ConfigurationChanges > create()
#define LINK(Instance, Class, Member)
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
Reference< XComponentContext > getProcessComponentContext()
OUString ScResId(TranslateId aId)
IMPL_LINK(ScTpCalcOptions, RadioClickHdl, weld::Toggleable &, rBtn, void)