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_xColorFT(m_xBuilder->weld_label(
"color_label"))
39 , m_xColorLB(new
ColorListBox(m_xBuilder->weld_menu_button(
"color"), pController->getDialog()))
40 , m_xBreakCB(m_xBuilder->weld_check_button(
"break"))
41 , m_xGuideLineCB(m_xBuilder->weld_check_button(
"guideline"))
42 , m_xFormulaCB(m_xBuilder->weld_check_button(
"formula"))
43 , m_xNilCB(m_xBuilder->weld_check_button(
"nil"))
44 , m_xAnnotCB(m_xBuilder->weld_check_button(
"annot"))
45 , m_xValueCB(m_xBuilder->weld_check_button(
"value"))
46 , m_xAnchorCB(m_xBuilder->weld_check_button(
"anchor"))
47 , m_xClipMarkCB(m_xBuilder->weld_check_button(
"clipmark"))
48 , m_xRangeFindCB(m_xBuilder->weld_check_button(
"rangefind"))
49 , m_xObjGrfLB(m_xBuilder->weld_combo_box(
"objgrf"))
50 , m_xDiagramLB(m_xBuilder->weld_combo_box(
"diagram"))
51 , m_xDrawLB(m_xBuilder->weld_combo_box(
"draw"))
52 , m_xSyncZoomCB(m_xBuilder->weld_check_button(
"synczoom"))
53 , m_xRowColHeaderCB(m_xBuilder->weld_check_button(
"rowcolheader"))
54 , m_xHScrollCB(m_xBuilder->weld_check_button(
"hscroll"))
55 , m_xVScrollCB(m_xBuilder->weld_check_button(
"vscroll"))
56 , m_xTblRegCB(m_xBuilder->weld_check_button(
"tblreg"))
57 , m_xOutlineCB(m_xBuilder->weld_check_button(
"outline"))
58 , m_xSummaryCB(m_xBuilder->weld_check_button(
"cbSummary"))
96 return std::make_unique<ScTpContentOptions>(pPage, pController, *rCoreSet);
103 m_xNilCB->get_state_changed_from_saved() ||
110 m_xDrawLB->get_value_changed_from_saved() ||
111 m_xGridLB->get_value_changed_from_saved() ||
126 aNamedColor.second.clear();
149 if(SfxItemState::SET == rCoreSet->
GetItemState(SID_SCVIEWOPTIONS,
false , &pItem))
151 static_cast<const ScTpViewItem*>(pItem)->GetViewOptions() ) );
177 if(SfxItemState::SET == rCoreSet->
GetItemState(SID_SC_INPUT_RANGEFINDER,
false, &pItem))
178 m_xRangeFindCB->set_active(static_cast<const SfxBoolItem*>(pItem)->GetValue());
179 if(SfxItemState::SET == rCoreSet->
GetItemState(SID_SC_OPT_SYNCZOOM,
false, &pItem))
180 m_xSyncZoomCB->set_active(static_cast<const SfxBoolItem*>(pItem)->GetValue());
209 if(SfxItemState::SET == rSet.
GetItemState(SID_SCVIEWOPTIONS,
false , &pItem))
210 *
m_xLocalOptions = static_cast<const ScTpViewItem*>(pItem)->GetViewOptions();
217 return DeactivateRC::LeavePage;
222 const sal_Int32 nSelPos = rLb.get_active();
226 if ( &rLb == m_xDiagramLB.get() )
228 else if ( &rLb == m_xDrawLB.get() )
231 m_xLocalOptions->SetObjMode( eType, eMode );
237 bool bChecked = rBtn.get_active();
241 else if ( m_xAnnotCB.get() == &rBtn ) eOption =
VOPT_NOTES;
242 else if ( m_xValueCB.get() == &rBtn ) eOption =
VOPT_SYNTAX;
243 else if ( m_xAnchorCB.get() == &rBtn ) eOption =
VOPT_ANCHOR;
244 else if ( m_xClipMarkCB.get() == &rBtn ) eOption =
VOPT_CLIPMARKS;
245 else if ( m_xVScrollCB.get() == &rBtn ) eOption =
VOPT_VSCROLL;
246 else if ( m_xHScrollCB.get() == &rBtn ) eOption =
VOPT_HSCROLL;
248 else if ( m_xOutlineCB.get() == &rBtn ) eOption =
VOPT_OUTLINER;
250 else if ( m_xGuideLineCB.get() == &rBtn ) eOption =
VOPT_HELPLINES;
251 else if ( m_xRowColHeaderCB.get() == &rBtn ) eOption =
VOPT_HEADER;
252 else if ( m_xSummaryCB.get() == &rBtn ) eOption =
VOPT_SUMMARY;
254 m_xLocalOptions->SetOption( eOption, bChecked );
261 sal_Int32 nSelPos = 0;
263 if ( bGrid || bGridOnTop )
288 m_xColorLB->SelectEntry(std::make_pair(aCol, aName));
293 sal_Int32 nSelPos = rLb.get_active();
294 bool bGrid = ( nSelPos <= 1 );
295 bool bGridOnTop = ( nSelPos == 1 );
297 m_xColorFT->set_sensitive(bGrid);
298 m_xColorLB->set_sensitive(bGrid);
299 m_xLocalOptions->SetOption(
VOPT_GRID, bGrid );
304 :
SfxTabPage(pPage, pController,
"modules/scalc/ui/scgeneralpage.ui",
"ScGeneralPage", &rArgSet)
306 , m_xUnitLB(m_xBuilder->weld_combo_box(
"unitlb"))
307 , m_xTabMF(m_xBuilder->weld_metric_spin_button(
"tabmf",
FieldUnit::
CM))
308 , m_xAlwaysRB(m_xBuilder->weld_radio_button(
"alwaysrb"))
309 , m_xRequestRB(m_xBuilder->weld_radio_button(
"requestrb"))
310 , m_xNeverRB(m_xBuilder->weld_radio_button(
"neverrb"))
311 , m_xAlignCB(m_xBuilder->weld_check_button(
"aligncb"))
312 , m_xAlignLB(m_xBuilder->weld_combo_box(
"alignlb"))
313 , m_xEditModeCB(m_xBuilder->weld_check_button(
"editmodecb"))
314 , m_xFormatCB(m_xBuilder->weld_check_button(
"formatcb"))
315 , m_xExpRefCB(m_xBuilder->weld_check_button(
"exprefcb"))
316 , m_xSortRefUpdateCB(m_xBuilder->weld_check_button(
"sortrefupdatecb"))
317 , m_xMarkHdrCB(m_xBuilder->weld_check_button(
"markhdrcb"))
318 , m_xTextFmtCB(m_xBuilder->weld_check_button(
"textfmtcb"))
319 , m_xReplWarnCB(m_xBuilder->weld_check_button(
"replwarncb"))
320 , m_xLegacyCellSelectionCB(m_xBuilder->weld_check_button(
"legacy_cell_selection_cb"))
321 , m_xEnterPasteModeCB(m_xBuilder->weld_check_button(
"enter_paste_mode_cb"))
337 case FieldUnit::POINT:
338 case FieldUnit::PICA:
339 case FieldUnit::INCH:
342 m_xUnitLB->append(OUString::number(static_cast<sal_uInt32>(eFUnit)), sMetric);
360 auto xNew = std::make_unique<ScTpLayoutOptions>(pPage, pController, *rCoreSet);
371 if (
m_xUnitLB->get_value_changed_from_saved())
373 const sal_Int32 nMPos =
m_xUnitLB->get_active();
374 sal_uInt16 nFieldUnit =
m_xUnitLB->get_id(nMPos).toUInt32();
379 if (
m_xTabMF->get_value_changed_from_saved())
382 sal::static_int_cast<sal_uInt16>(
m_xTabMF->denormalize(
m_xTabMF->get_value(FieldUnit::TWIP)) )));
404 SC_MOD()->SetAppOptions(aAppOptions);
407 if (
m_xAlignCB->get_state_changed_from_saved())
413 if (
m_xAlignLB->get_value_changed_from_saved())
479 if ( rCoreSet->
GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT )
484 for (sal_Int32
i = 0, nEntryCount =
m_xUnitLB->get_count();
i < nEntryCount; ++
i)
486 if (
m_xUnitLB->get_id(
i).toUInt32() ==
static_cast<sal_uInt32
>(eFieldUnit))
492 ::SetFieldUnit(*
m_xTabMF, eFieldUnit);
497 if(SfxItemState::SET == rCoreSet->
GetItemState(SID_ATTR_DEFTABSTOP,
false, &pItem))
498 m_xTabMF->set_value(
m_xTabMF->normalize(static_cast<const SfxUInt16Item*>(pItem)->GetValue()), FieldUnit::TWIP);
527 if(SfxItemState::SET == rCoreSet->
GetItemState(SID_SC_INPUT_SELECTION,
false, &pItem))
528 m_xAlignCB->set_active(static_cast<const SfxBoolItem*>(pItem)->GetValue());
530 if(SfxItemState::SET == rCoreSet->
GetItemState(SID_SC_INPUT_SELECTIONPOS,
false, &pItem))
531 m_xAlignLB->set_active(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
533 if(SfxItemState::SET == rCoreSet->
GetItemState(SID_SC_INPUT_EDITMODE,
false, &pItem))
534 m_xEditModeCB->set_active(static_cast<const SfxBoolItem*>(pItem)->GetValue());
536 if(SfxItemState::SET == rCoreSet->
GetItemState(SID_SC_INPUT_FMT_EXPAND,
false, &pItem))
537 m_xFormatCB->set_active(static_cast<const SfxBoolItem*>(pItem)->GetValue());
539 if(SfxItemState::SET == rCoreSet->
GetItemState(SID_SC_INPUT_REF_EXPAND,
false, &pItem))
540 m_xExpRefCB->set_active(static_cast<const SfxBoolItem*>(pItem)->GetValue());
542 if (rCoreSet->
HasItem(SID_SC_OPT_SORT_REF_UPDATE, &pItem))
545 if(SfxItemState::SET == rCoreSet->
GetItemState(SID_SC_INPUT_MARK_HEADER,
false, &pItem))
546 m_xMarkHdrCB->set_active(static_cast<const SfxBoolItem*>(pItem)->GetValue());
548 if(SfxItemState::SET == rCoreSet->
GetItemState(SID_SC_INPUT_TEXTWYSIWYG,
false, &pItem))
549 m_xTextFmtCB->set_active(static_cast<const SfxBoolItem*>(pItem)->GetValue());
551 if( SfxItemState::SET == rCoreSet->
GetItemState( SID_SC_INPUT_REPLCELLSWARN,
false, &pItem ) )
552 m_xReplWarnCB->set_active( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
554 if( SfxItemState::SET == rCoreSet->
GetItemState( SID_SC_INPUT_LEGACY_CELL_SELECTION,
false, &pItem ) )
557 if( SfxItemState::SET == rCoreSet->
GetItemState( SID_SC_INPUT_ENTER_PASTE_MODE,
false, &pItem ) )
589 return DeactivateRC::LeavePage;
594 const sal_Int32 nMPos = m_xUnitLB->get_active();
599 m_xTabMF->denormalize( m_xTabMF->get_value( FieldUnit::TWIP ) );
600 ::SetFieldUnit( *m_xTabMF, eFieldUnit );
601 m_xTabMF->set_value( m_xTabMF->normalize( nVal ), FieldUnit::TWIP );
607 m_xAlignLB->set_sensitive(rBox.get_active());
#define LINK(Instance, Class, Member)
std::unique_ptr< weld::ComboBox > m_xObjGrfLB
std::unique_ptr< weld::CheckButton > m_xOutlineCB
std::pair< Color, OUString > NamedColor
virtual void ActivatePage(const SfxItemSet &) override
SC_DLLPUBLIC ScLinkMode GetLinkMode(SCTAB nTab) const
virtual void ActivatePage(const SfxItemSet &) override
ScLkUpdMode GetLinkMode() const
virtual bool FillItemSet(SfxItemSet *rCoreSet) override
virtual void Reset(const SfxItemSet *rCoreSet) override
std::unique_ptr< weld::CheckButton > m_xRowColHeaderCB
std::unique_ptr< weld::CheckButton > m_xSyncZoomCB
sal_uInt16 GetValue() const
std::unique_ptr< weld::CheckButton > m_xTextFmtCB
static SfxObjectShell * Current()
virtual ~ScTpLayoutOptions() override
std::unique_ptr< weld::CheckButton > m_xRangeFindCB
std::unique_ptr< weld::CheckButton > m_xExpRefCB
virtual ~ScTpContentOptions() override
std::unique_ptr< weld::RadioButton > m_xRequestRB
std::unique_ptr< weld::CheckButton > m_xGuideLineCB
std::unique_ptr< weld::CheckButton > m_xMarkHdrCB
std::unique_ptr< weld::CheckButton > m_xHScrollCB
std::unique_ptr< weld::CheckButton > m_xValueCB
virtual bool FillItemSet(SfxItemSet *rCoreSet) override
std::unique_ptr< weld::CheckButton > m_xLegacyCellSelectionCB
constexpr::Color COL_AUTO(0xFF, 0xFF, 0xFF, 0xFF)
std::unique_ptr< weld::ComboBox > m_xUnitLB
std::unique_ptr< weld::CheckButton > m_xClipMarkCB
std::unique_ptr< weld::ComboBox > m_xGridLB
std::unique_ptr< weld::CheckButton > m_xEditModeCB
std::unique_ptr< weld::CheckButton > m_xNilCB
void SetExchangeSupport()
std::unique_ptr< weld::CheckButton > m_xTblRegCB
std::unique_ptr< weld::CheckButton > m_xAnchorCB
IMPL_LINK(ScTpContentOptions, SelLbObjHdl, weld::ComboBox &, rLb, void)
virtual void Reset(const SfxItemSet *rCoreSet) override
std::unique_ptr< ScViewOptions > m_xLocalOptions
#define SAL_N_ELEMENTS(arr)
std::unique_ptr< weld::ComboBox > m_xDiagramLB
ScTpLayoutOptions(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rArgSet)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
std::unique_ptr< weld::CheckButton > m_xSummaryCB
std::unique_ptr< ColorListBox > m_xColorLB
std::unique_ptr< weld::CheckButton > m_xEnterPasteModeCB
std::unique_ptr< weld::CheckButton > m_xReplWarnCB
std::unique_ptr< weld::CheckButton > m_xAnnotCB
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rCoreSet)
std::unique_ptr< weld::CheckButton > m_xSortRefUpdateCB
OUString ScResId(const char *pId)
std::unique_ptr< weld::MetricSpinButton > m_xTabMF
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::CheckButton > m_xVScrollCB
std::unique_ptr< weld::CheckButton > m_xFormatCB
std::unique_ptr< weld::CheckButton > m_xAlignCB
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
IMPL_LINK_NOARG(ScTpLayoutOptions, MetricHdl, weld::ComboBox &, void)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
std::unique_ptr< weld::CheckButton > m_xFormulaCB
const ScDocument & GetDocument() const
void SetLinkMode(ScLkUpdMode nSet)
std::unique_ptr< weld::ComboBox > m_xDrawLB
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rCoreSet)
constexpr OUStringLiteral first
std::unique_ptr< weld::RadioButton > m_xAlwaysRB
void SetLinkMode(ScLkUpdMode nSet)
std::unique_ptr< weld::CheckButton > m_xBreakCB
std::unique_ptr< weld::RadioButton > m_xNeverRB
std::unique_ptr< weld::Label > m_xColorFT
std::unique_ptr< weld::ComboBox > m_xAlignLB
ScTpContentOptions(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rArgSet)