20#undef SC_DLLIMPLEMENTATION
36 :
SfxTabPage(pPage, pController,
"modules/scalc/ui/tpviewpage.ui",
"TpViewPage", &rArgSet)
37 , m_xGridLB(m_xBuilder->weld_combo_box(
"grid"))
38 , m_xBreakCB(m_xBuilder->weld_check_button(
"break"))
39 , m_xGuideLineCB(m_xBuilder->weld_check_button(
"guideline"))
40 , m_xFormulaCB(m_xBuilder->weld_check_button(
"formula"))
41 , m_xNilCB(m_xBuilder->weld_check_button(
"nil"))
42 , m_xAnnotCB(m_xBuilder->weld_check_button(
"annot"))
43 , m_xFormulaMarkCB(m_xBuilder->weld_check_button(
"formulamark"))
44 , m_xValueCB(m_xBuilder->weld_check_button(
"value"))
45 , m_xAnchorCB(m_xBuilder->weld_check_button(
"anchor"))
46 , m_xRangeFindCB(m_xBuilder->weld_check_button(
"rangefind"))
47 , m_xObjGrfLB(m_xBuilder->weld_combo_box(
"objgrf"))
48 , m_xDiagramLB(m_xBuilder->weld_combo_box(
"diagram"))
49 , m_xDrawLB(m_xBuilder->weld_combo_box(
"draw"))
50 , m_xSyncZoomCB(m_xBuilder->weld_check_button(
"synczoom"))
51 , m_xRowColHeaderCB(m_xBuilder->weld_check_button(
"rowcolheader"))
52 , m_xHScrollCB(m_xBuilder->weld_check_button(
"hscroll"))
53 , m_xVScrollCB(m_xBuilder->weld_check_button(
"vscroll"))
54 , m_xTblRegCB(m_xBuilder->weld_check_button(
"tblreg"))
55 , m_xOutlineCB(m_xBuilder->weld_check_button(
"outline"))
56 , m_xSummaryCB(m_xBuilder->weld_check_button(
"cbSummary"))
57 , m_xThemedCursorRB(m_xBuilder->weld_radio_button(
"rbThemedCursor"))
58 , m_xSystemCursorRB(m_xBuilder->weld_radio_button(
"rbSystemCursor"))
94 return std::make_unique<ScTpContentOptions>(pPage, pController, *rCoreSet);
101 m_xNilCB->get_state_changed_from_saved() ||
108 m_xDrawLB->get_value_changed_from_saved() ||
109 m_xGridLB->get_value_changed_from_saved() ||
209 return DeactivateRC::LeavePage;
214 const sal_Int32 nSelPos = rLb.get_active();
218 if ( &rLb == m_xDiagramLB.get() )
220 else if ( &rLb == m_xDrawLB.get() )
229 bool bChecked = rBtn.get_active();
233 else if ( m_xAnnotCB.get() == &rBtn ) eOption =
VOPT_NOTES;
235 else if ( m_xValueCB.get() == &rBtn ) eOption =
VOPT_SYNTAX;
236 else if ( m_xAnchorCB.get() == &rBtn ) eOption =
VOPT_ANCHOR;
237 else if ( m_xVScrollCB.get() == &rBtn ) eOption =
VOPT_VSCROLL;
238 else if ( m_xHScrollCB.get() == &rBtn ) eOption =
VOPT_HSCROLL;
240 else if ( m_xOutlineCB.get() == &rBtn ) eOption =
VOPT_OUTLINER;
242 else if ( m_xGuideLineCB.get() == &rBtn ) eOption =
VOPT_HELPLINES;
243 else if ( m_xRowColHeaderCB.get() == &rBtn ) eOption =
VOPT_HEADER;
244 else if ( m_xSummaryCB.get() == &rBtn ) eOption =
VOPT_SUMMARY;
247 m_xLocalOptions->SetOption( eOption, bChecked );
254 sal_Int32 nSelPos = 0;
256 if ( bGrid || bGridOnTop )
271 sal_Int32 nSelPos = rLb.get_active();
272 bool bGrid = ( nSelPos <= 1 );
273 bool bGridOnTop = ( nSelPos == 1 );
275 m_xLocalOptions->SetOption(
VOPT_GRID, bGrid );
280 :
SfxTabPage(pPage, pController,
"modules/scalc/ui/scgeneralpage.ui",
"ScGeneralPage", &rArgSet)
282 , m_xUnitLB(m_xBuilder->weld_combo_box(
"unitlb"))
283 , m_xTabMF(m_xBuilder->weld_metric_spin_button(
"tabmf",
FieldUnit::
CM))
284 , m_xAlwaysRB(m_xBuilder->weld_radio_button(
"alwaysrb"))
285 , m_xRequestRB(m_xBuilder->weld_radio_button(
"requestrb"))
286 , m_xNeverRB(m_xBuilder->weld_radio_button(
"neverrb"))
287 , m_xAlignCB(m_xBuilder->weld_check_button(
"aligncb"))
288 , m_xAlignLB(m_xBuilder->weld_combo_box(
"alignlb"))
289 , m_xEditModeCB(m_xBuilder->weld_check_button(
"editmodecb"))
290 , m_xFormatCB(m_xBuilder->weld_check_button(
"formatcb"))
291 , m_xExpRefCB(m_xBuilder->weld_check_button(
"exprefcb"))
292 , m_xSortRefUpdateCB(m_xBuilder->weld_check_button(
"sortrefupdatecb"))
293 , m_xMarkHdrCB(m_xBuilder->weld_check_button(
"markhdrcb"))
294 , m_xReplWarnCB(m_xBuilder->weld_check_button(
"replwarncb"))
295 , m_xLegacyCellSelectionCB(m_xBuilder->weld_check_button(
"legacy_cell_selection_cb"))
296 , m_xEnterPasteModeCB(m_xBuilder->weld_check_button(
"enter_paste_mode_cb"))
312 case FieldUnit::POINT:
313 case FieldUnit::PICA:
314 case FieldUnit::INCH:
317 m_xUnitLB->append(OUString::number(
static_cast<sal_uInt32
>(eFUnit)), sMetric);
335 auto xNew = std::make_unique<ScTpLayoutOptions>(pPage, pController, *rCoreSet);
346 if (
m_xUnitLB->get_value_changed_from_saved())
348 const sal_Int32 nMPos =
m_xUnitLB->get_active();
349 sal_uInt16 nFieldUnit =
m_xUnitLB->get_id(nMPos).toUInt32();
354 if (
m_xTabMF->get_value_changed_from_saved())
357 sal::static_int_cast<sal_uInt16>(
m_xTabMF->denormalize(
m_xTabMF->get_value(FieldUnit::TWIP)) )));
379 SC_MOD()->SetAppOptions(aAppOptions);
382 if (
m_xAlignCB->get_state_changed_from_saved())
388 if (
m_xAlignLB->get_value_changed_from_saved())
448 if ( rCoreSet->
GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT )
453 for (sal_Int32
i = 0, nEntryCount =
m_xUnitLB->get_count();
i < nEntryCount; ++
i)
455 if (
m_xUnitLB->get_id(
i).toUInt32() ==
static_cast<sal_uInt32
>(eFieldUnit))
461 ::SetFieldUnit(*
m_xTabMF, eFieldUnit);
466 m_xTabMF->set_value(
m_xTabMF->normalize(pTabStopItem->GetValue()), FieldUnit::TWIP);
496 m_xAlignCB->set_active(pSelectionItem->GetValue());
553 return DeactivateRC::LeavePage;
558 const sal_Int32 nMPos = m_xUnitLB->get_active();
563 m_xTabMF->denormalize( m_xTabMF->get_value( FieldUnit::TWIP ) );
564 ::SetFieldUnit( *m_xTabMF, eFieldUnit );
565 m_xTabMF->set_value( m_xTabMF->normalize( nVal ), FieldUnit::TWIP );
571 m_xAlignLB->set_sensitive(rBox.get_active());
sal_uInt16 GetValue() const
ScLkUpdMode GetLinkMode() const
void SetLinkMode(ScLkUpdMode nSet)
const ScDocument & GetDocument() const
SC_DLLPUBLIC ScLinkMode GetLinkMode(SCTAB nTab) const
void SetLinkMode(ScLkUpdMode nSet)
std::unique_ptr< ScViewOptions > m_xLocalOptions
ScTpContentOptions(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rArgSet)
std::unique_ptr< weld::CheckButton > m_xRangeFindCB
std::unique_ptr< weld::CheckButton > m_xGuideLineCB
std::unique_ptr< weld::CheckButton > m_xOutlineCB
std::unique_ptr< weld::CheckButton > m_xValueCB
std::unique_ptr< weld::ComboBox > m_xGridLB
std::unique_ptr< weld::CheckButton > m_xVScrollCB
virtual ~ScTpContentOptions() override
std::unique_ptr< weld::CheckButton > m_xNilCB
std::unique_ptr< weld::CheckButton > m_xFormulaMarkCB
std::unique_ptr< weld::ComboBox > m_xDiagramLB
std::unique_ptr< weld::CheckButton > m_xRowColHeaderCB
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::CheckButton > m_xFormulaCB
std::unique_ptr< weld::CheckButton > m_xHScrollCB
std::unique_ptr< weld::CheckButton > m_xSummaryCB
virtual void Reset(const SfxItemSet *rCoreSet) override
std::unique_ptr< weld::CheckButton > m_xBreakCB
std::unique_ptr< weld::RadioButton > m_xThemedCursorRB
virtual void ActivatePage(const SfxItemSet &) override
std::unique_ptr< weld::CheckButton > m_xTblRegCB
std::unique_ptr< weld::ComboBox > m_xDrawLB
std::unique_ptr< weld::RadioButton > m_xSystemCursorRB
std::unique_ptr< weld::CheckButton > m_xAnnotCB
std::unique_ptr< weld::ComboBox > m_xObjGrfLB
std::unique_ptr< weld::CheckButton > m_xSyncZoomCB
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rCoreSet)
virtual bool FillItemSet(SfxItemSet *rCoreSet) override
std::unique_ptr< weld::CheckButton > m_xAnchorCB
std::unique_ptr< weld::RadioButton > m_xAlwaysRB
std::unique_ptr< weld::CheckButton > m_xExpRefCB
ScTpLayoutOptions(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rArgSet)
std::unique_ptr< weld::RadioButton > m_xRequestRB
virtual void ActivatePage(const SfxItemSet &) override
std::unique_ptr< weld::MetricSpinButton > m_xTabMF
std::unique_ptr< weld::CheckButton > m_xFormatCB
std::unique_ptr< weld::CheckButton > m_xReplWarnCB
std::unique_ptr< weld::CheckButton > m_xAlignCB
std::unique_ptr< weld::CheckButton > m_xLegacyCellSelectionCB
std::unique_ptr< weld::CheckButton > m_xSortRefUpdateCB
virtual bool FillItemSet(SfxItemSet *rCoreSet) override
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
virtual ~ScTpLayoutOptions() override
std::unique_ptr< weld::CheckButton > m_xEnterPasteModeCB
virtual void Reset(const SfxItemSet *rCoreSet) override
std::unique_ptr< weld::CheckButton > m_xEditModeCB
std::unique_ptr< weld::CheckButton > m_xMarkHdrCB
std::unique_ptr< weld::ComboBox > m_xUnitLB
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rCoreSet)
std::unique_ptr< weld::ComboBox > m_xAlignLB
std::unique_ptr< weld::RadioButton > m_xNeverRB
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
void SetExchangeSupport()
#define LINK(Instance, Class, Member)
#define SAL_N_ELEMENTS(arr)
constexpr OUStringLiteral first
OUString ScResId(TranslateId aId)
IMPL_LINK_NOARG(ScTpLayoutOptions, MetricHdl, weld::ComboBox &, void)
IMPL_LINK(ScTpContentOptions, SelLbObjHdl, weld::ComboBox &, rLb, void)