LibreOffice Module sc (master)  1
tptable.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #undef SC_DLLIMPLEMENTATION
21 
22 #include <scitems.hxx>
23 
24 #include <osl/diagnose.h>
25 
26 #include <tptable.hxx>
27 #include <global.hxx>
28 #include <attrib.hxx>
29 #include <bitmaps.hlst>
30 
31 // Static Data
32 
34  svl::Items<ATTR_PAGE_NOTES, ATTR_PAGE_FIRSTPAGENO>);
35 
37  SfxItemSet& rCoreSet,
38  const SfxItemSet& rOldSet,
39  const weld::Toggleable& rBtn);
40 
42  SfxItemSet& rCoreSet,
43  const SfxItemSet& rOldSet,
44  const weld::ComboBox& rListBox,
45  sal_uInt16 nLBEntry,
46  const weld::MetricSpinButton& rEd,
47  sal_uInt16 nValue );
48 
50  SfxItemSet& rCoreSet,
51  const SfxItemSet& rOldSet,
52  const weld::ComboBox& rListBox,
53  sal_uInt16 nLBEntry,
54  const weld::SpinButton& rEd1,
55  sal_uInt16 nOrigScalePageWidth,
56  const weld::SpinButton& rEd2,
57  sal_uInt16 nOrigScalePageHeight );
58 
60  SfxItemSet& rCoreSet,
61  const SfxItemSet& rOldSet,
62  const weld::ComboBox& rListBox,
63  sal_uInt16 nLBEntry,
64  const weld::SpinButton& rEd,
65  sal_uInt16 nValue );
66 
67 static bool lcl_PutBoolItem( TypedWhichId<SfxBoolItem> nWhich,
68  SfxItemSet& rCoreSet,
69  const SfxItemSet& rOldSet,
70  bool bIsChecked,
71  bool bSavedValue );
72 
73 namespace {
74 
75 bool WAS_DEFAULT(sal_uInt16 w, SfxItemSet const & s)
76 { return SfxItemState::DEFAULT==s.GetItemState(w); }
77 
78 }
79 
80 // List box entries "Scaling mode"
81 #define SC_TPTABLE_SCALE_PERCENT 0
82 #define SC_TPTABLE_SCALE_TO 1
83 #define SC_TPTABLE_SCALE_TO_PAGES 2
84 
86  : SfxTabPage(pPage, pController, "modules/scalc/ui/sheetprintpage.ui", "SheetPrintPage", &rCoreAttrs)
87  , m_nOrigScalePageWidth(0)
88  , m_nOrigScalePageHeight(0)
89  , m_xBtnTopDown(m_xBuilder->weld_radio_button("radioBTN_TOPDOWN"))
90  , m_xBtnLeftRight(m_xBuilder->weld_radio_button("radioBTN_LEFTRIGHT"))
91  , m_xBmpPageDir(m_xBuilder->weld_image("imageBMP_PAGEDIR"))
92  , m_xBtnPageNo(m_xBuilder->weld_check_button("checkBTN_PAGENO"))
93  , m_xEdPageNo(m_xBuilder->weld_spin_button("spinED_PAGENO"))
94  , m_xBtnHeaders(m_xBuilder->weld_check_button("checkBTN_HEADER"))
95  , m_xBtnGrid(m_xBuilder->weld_check_button("checkBTN_GRID"))
96  , m_xBtnNotes(m_xBuilder->weld_check_button("checkBTN_NOTES"))
97  , m_xBtnObjects(m_xBuilder->weld_check_button("checkBTN_OBJECTS"))
98  , m_xBtnCharts(m_xBuilder->weld_check_button("checkBTN_CHARTS"))
99  , m_xBtnDrawings(m_xBuilder->weld_check_button("checkBTN_DRAWINGS"))
100  , m_xBtnFormulas(m_xBuilder->weld_check_button("checkBTN_FORMULAS"))
101  , m_xBtnNullVals(m_xBuilder->weld_check_button("checkBTN_NULLVALS"))
102  , m_xLbScaleMode(m_xBuilder->weld_combo_box("comboLB_SCALEMODE"))
103  , m_xBxScaleAll(m_xBuilder->weld_widget("boxSCALEALL"))
104  , m_xEdScaleAll(m_xBuilder->weld_metric_spin_button("spinED_SCALEALL", FieldUnit::PERCENT))
105  , m_xGrHeightWidth(m_xBuilder->weld_widget("gridWH"))
106  , m_xEdScalePageWidth(m_xBuilder->weld_spin_button("spinED_SCALEPAGEWIDTH"))
107  , m_xCbScalePageWidth(m_xBuilder->weld_check_button("labelWP"))
108  , m_xEdScalePageHeight(m_xBuilder->weld_spin_button("spinED_SCALEPAGEHEIGHT"))
109  , m_xCbScalePageHeight(m_xBuilder->weld_check_button("labelHP"))
110  , m_xBxScalePageNum(m_xBuilder->weld_widget("boxNP"))
111  , m_xEdScalePageNum(m_xBuilder->weld_spin_button("spinED_SCALEPAGENUM"))
112 {
114 
115  m_xBtnPageNo->connect_toggled(LINK(this,ScTablePage,PageNoHdl));
116  m_xBtnTopDown->connect_toggled(LINK(this,ScTablePage,PageDirHdl));
117  m_xBtnLeftRight->connect_toggled(LINK(this,ScTablePage,PageDirHdl));
118  m_xLbScaleMode->connect_changed(LINK(this,ScTablePage,ScaleHdl));
119  m_xCbScalePageWidth->connect_toggled(LINK(this, ScTablePage, ToggleHdl));
120  m_xCbScalePageHeight->connect_toggled(LINK(this, ScTablePage, ToggleHdl));
121 }
122 
124 {
125  OUString aImg(m_xBtnLeftRight->get_active() ? OUString(BMP_LEFTRIGHT) : OUString(BMP_TOPDOWN));
126  m_xBmpPageDir->set_from_icon_name(aImg);
127 }
128 
130 {
131 }
132 
133 std::unique_ptr<SfxTabPage> ScTablePage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet)
134 {
135  return std::make_unique<ScTablePage>(pPage, pController, *rCoreSet);
136 }
137 
138 void ScTablePage::Reset( const SfxItemSet* rCoreSet )
139 {
140  bool bTopDown = rCoreSet->Get(SID_SCATTR_PAGE_TOPDOWN).GetValue();
141 
142  // sal_Bool flags
143  m_xBtnNotes->set_active( rCoreSet->Get(SID_SCATTR_PAGE_NOTES).GetValue() );
144  m_xBtnGrid->set_active( rCoreSet->Get(SID_SCATTR_PAGE_GRID).GetValue() );
145  m_xBtnHeaders->set_active( rCoreSet->Get(SID_SCATTR_PAGE_HEADERS).GetValue() );
146  m_xBtnFormulas->set_active( rCoreSet->Get(SID_SCATTR_PAGE_FORMULAS).GetValue() );
147  m_xBtnNullVals->set_active( rCoreSet->Get(SID_SCATTR_PAGE_NULLVALS).GetValue() );
148  m_xBtnTopDown->set_active( bTopDown );
149  m_xBtnLeftRight->set_active( !bTopDown );
150 
151  // first printed page:
152  sal_uInt16 nPage = rCoreSet->Get(SID_SCATTR_PAGE_FIRSTPAGENO).GetValue();
153  m_xBtnPageNo->set_active( nPage != 0 );
154  m_xEdPageNo->set_value( (nPage != 0) ? nPage : 1 );
155  PageNoHdl(nullptr);
156 
157  // object representation:
158  m_xBtnCharts->set_active( rCoreSet->Get(SID_SCATTR_PAGE_CHARTS).GetValue() == VOBJ_MODE_SHOW );
159  m_xBtnObjects->set_active( rCoreSet->Get(SID_SCATTR_PAGE_OBJECTS).GetValue() == VOBJ_MODE_SHOW );
160  m_xBtnDrawings->set_active( rCoreSet->Get(SID_SCATTR_PAGE_DRAWINGS).GetValue() == VOBJ_MODE_SHOW );
161 
162  // scaling:
163  constexpr auto nWhichPageScale = SID_SCATTR_PAGE_SCALE;
164  if ( rCoreSet->GetItemState( nWhichPageScale ) >= SfxItemState::DEFAULT )
165  {
166  sal_uInt16 nScale = rCoreSet->Get(nWhichPageScale).GetValue();
167  if( nScale > 0 )
169  m_xEdScaleAll->set_value((nScale > 0) ? nScale : 100, FieldUnit::PERCENT);
170  }
171 
172  constexpr auto nWhichScaleTo = SID_SCATTR_PAGE_SCALETO;
173  if ( rCoreSet->GetItemState( nWhichScaleTo ) >= SfxItemState::DEFAULT )
174  {
175  const ScPageScaleToItem& rItem = rCoreSet->Get( nWhichScaleTo );
176  sal_uInt16 nWidth = rItem.GetWidth();
177  sal_uInt16 nHeight = rItem.GetHeight();
178 
179  /* width==0 and height==0 is invalid state, used as "not selected".
180  Dialog shows width=height=1 then. */
181  if (nWidth || nHeight)
182  m_xLbScaleMode->set_active(SC_TPTABLE_SCALE_TO);
183  else
184  nWidth = nHeight = 1;
185 
186  if (nWidth)
187  m_xEdScalePageWidth->set_value(nWidth);
188  else
189  m_xEdScalePageWidth->set_text(OUString());
190 
191  m_xEdScalePageWidth->set_sensitive(nWidth != 0);
192  m_xCbScalePageWidth->set_active(nWidth != 0);
193 
194  if(nHeight)
195  m_xEdScalePageHeight->set_value(nHeight);
196  else
197  m_xEdScalePageHeight->set_text(OUString());
198 
199  m_xEdScalePageHeight->set_sensitive(nHeight != 0);
200  m_xCbScalePageHeight->set_active(nHeight != 0);
201  }
202 
203  constexpr auto nWhichScale = SID_SCATTR_PAGE_SCALETOPAGES;
204  if ( rCoreSet->GetItemState( nWhichScale ) >= SfxItemState::DEFAULT )
205  {
206  sal_uInt16 nPages = rCoreSet->Get(nWhichScale).GetValue();
207  if( nPages > 0 )
209  m_xEdScalePageNum->set_value( (nPages > 0) ? nPages : 1 );
210  }
211 
212  if (m_xLbScaleMode->get_active() == -1)
213  {
214  // fall back to 100%
215  OSL_FAIL( "ScTablePage::Reset - missing scaling item" );
217  m_xEdScaleAll->set_value(100, FieldUnit::PERCENT);
218  }
219 
220  PageDirHdl(*m_xBtnTopDown);
221  ScaleHdl(*m_xLbScaleMode);
222 
223  // remember for FillItemSet
224  m_xBtnFormulas->save_state();
225  m_xBtnNullVals->save_state();
226  m_xBtnNotes->save_state();
227  m_xBtnGrid->save_state();
228  m_xBtnHeaders->save_state();
229  m_xBtnTopDown->save_state();
230  m_xBtnLeftRight->save_state();
231  m_xLbScaleMode->save_value();
232  m_xBtnCharts->save_state();
233  m_xBtnObjects->save_state();
234  m_xBtnDrawings->save_state();
235  m_xBtnPageNo->save_state();
236  m_xEdPageNo->save_value();
237  m_xEdScaleAll->save_value();
238  m_nOrigScalePageWidth = m_xEdScalePageWidth->get_sensitive() ? m_xEdScalePageWidth->get_value() : 0;
239  m_nOrigScalePageHeight = m_xEdScalePageHeight->get_sensitive() ? m_xEdScalePageHeight->get_value() : 0;
240  m_xEdScalePageNum->save_value();
241 }
242 
244 {
245  const SfxItemSet& rOldSet = GetItemSet();
246  constexpr sal_uInt16 nWhichPageNo = SID_SCATTR_PAGE_FIRSTPAGENO;
247  bool bDataChanged = false;
248 
249  // sal_Bool flags
250  bDataChanged |= lcl_PutBoolItem( SID_SCATTR_PAGE_NOTES,
251  *rCoreSet, rOldSet,
252  m_xBtnNotes->get_active(),
253  m_xBtnNotes->get_saved_state() != TRISTATE_FALSE );
254 
255  bDataChanged |= lcl_PutBoolItem( SID_SCATTR_PAGE_GRID,
256  *rCoreSet, rOldSet,
257  m_xBtnGrid->get_active(),
258  m_xBtnGrid->get_saved_state() != TRISTATE_FALSE );
259 
260  bDataChanged |= lcl_PutBoolItem( SID_SCATTR_PAGE_HEADERS,
261  *rCoreSet, rOldSet,
262  m_xBtnHeaders->get_active(),
263  m_xBtnHeaders->get_saved_state() != TRISTATE_FALSE );
264 
265  bDataChanged |= lcl_PutBoolItem( SID_SCATTR_PAGE_TOPDOWN,
266  *rCoreSet, rOldSet,
267  m_xBtnTopDown->get_active(),
268  m_xBtnTopDown->get_saved_state() != TRISTATE_FALSE );
269 
270  bDataChanged |= lcl_PutBoolItem( SID_SCATTR_PAGE_FORMULAS,
271  *rCoreSet, rOldSet,
272  m_xBtnFormulas->get_active(),
273  m_xBtnFormulas->get_saved_state() != TRISTATE_FALSE );
274 
275  bDataChanged |= lcl_PutBoolItem( SID_SCATTR_PAGE_NULLVALS,
276  *rCoreSet, rOldSet,
277  m_xBtnNullVals->get_active(),
278  m_xBtnNullVals->get_saved_state() != TRISTATE_FALSE );
279 
280  // first printed page:
281  bool bUseValue = m_xBtnPageNo->get_active();
282 
283  if ( WAS_DEFAULT(nWhichPageNo,rOldSet)
284  && ( (!bUseValue && 0 == m_xBtnPageNo->get_saved_state())
285  || ( bUseValue && 1 == m_xBtnPageNo->get_saved_state()
286  && ! m_xEdPageNo->get_value_changed_from_saved() ) ) )
287  {
288  rCoreSet->ClearItem( nWhichPageNo );
289  }
290  else
291  {
292  sal_uInt16 nPage = static_cast<sal_uInt16>( m_xBtnPageNo->get_active()
293  ? m_xEdPageNo->get_value()
294  : 0 );
295 
296  rCoreSet->Put( SfxUInt16Item( nWhichPageNo, nPage ) );
297  bDataChanged = true;
298  }
299 
300  // object representation:
302  *rCoreSet, rOldSet, *m_xBtnCharts );
303 
305  *rCoreSet, rOldSet, *m_xBtnObjects );
306 
308  *rCoreSet, rOldSet, *m_xBtnDrawings );
309 
310  // scaling:
311  if( !m_xEdScalePageWidth->get_sensitive() && !m_xEdScalePageHeight->get_sensitive() )
312  {
314  m_xEdScaleAll->set_value(100, FieldUnit::PERCENT);
315  }
316 
317  bDataChanged |= lcl_PutScaleItem( SID_SCATTR_PAGE_SCALE,
318  *rCoreSet, rOldSet,
320  *m_xEdScaleAll, static_cast<sal_uInt16>(m_xEdScaleAll->get_value(FieldUnit::PERCENT)) );
321 
323  *rCoreSet, rOldSet,
327 
329  *rCoreSet, rOldSet,
331  *m_xEdScalePageNum, static_cast<sal_uInt16>(m_xEdScalePageNum->get_value()) );
332 
333  return bDataChanged;
334 }
335 
337 {
338  if ( pSetP )
339  FillItemSet( pSetP );
340 
341  return DeactivateRC::LeavePage;
342 }
343 
344 // Handler:
345 
347 {
348  ShowImage();
349 }
350 
351 IMPL_LINK(ScTablePage, PageNoHdl, weld::Toggleable&, rBtn, void)
352 {
353  PageNoHdl(&rBtn);
354 }
355 
357 {
358  if (m_xBtnPageNo->get_active())
359  {
360  m_xEdPageNo->set_sensitive(true);
361  if (pBtn)
362  m_xEdPageNo->grab_focus();
363  }
364  else
365  m_xEdPageNo->set_sensitive(false);
366 }
367 
369 {
370  // controls for Box "Reduce/enlarge"
371  m_xBxScaleAll->set_visible(m_xLbScaleMode->get_active() == SC_TPTABLE_SCALE_PERCENT);
372 
373  // controls for Grid "Scale to width/height"
374  m_xGrHeightWidth->set_visible(m_xLbScaleMode->get_active() == SC_TPTABLE_SCALE_TO);
375 
376  // controls for Box "Scale to pages"
377  m_xBxScalePageNum->set_visible(m_xLbScaleMode->get_active() == SC_TPTABLE_SCALE_TO_PAGES);
378 }
379 
380 IMPL_LINK(ScTablePage, ToggleHdl, weld::Toggleable&, rBox, void)
381 {
382  if (&rBox == m_xCbScalePageWidth.get())
383  {
384  if (!rBox.get_active())
385  {
386  m_xEdScalePageWidth->set_text(OUString());
387  m_xEdScalePageWidth->set_sensitive(false);
388  }
389  else
390  {
391  m_xEdScalePageWidth->set_value(1);
392  m_xEdScalePageWidth->set_sensitive(true);
393  }
394  }
395  else
396  {
397  if (!rBox.get_active())
398  {
399  m_xEdScalePageHeight->set_text(OUString());
400  m_xEdScalePageHeight->set_sensitive(false);
401  }
402  else
403  {
404  m_xEdScalePageHeight->set_value(1);
405  m_xEdScalePageHeight->set_sensitive(true);
406  }
407  }
408 }
409 
410 // Helper functions for FillItemSet:
411 
413  SfxItemSet& rCoreSet,
414  const SfxItemSet& rOldSet,
415  bool bIsChecked,
416  bool bSavedValue )
417 {
418  bool bDataChanged = ( bSavedValue == bIsChecked
419  && WAS_DEFAULT(nWhich,rOldSet) );
420 
421  if ( bDataChanged )
422  rCoreSet.ClearItem(nWhich);
423  else
424  rCoreSet.Put( SfxBoolItem( nWhich, bIsChecked ) );
425 
426  return bDataChanged;
427 }
428 
430  SfxItemSet& rCoreSet,
431  const SfxItemSet& rOldSet,
432  const weld::Toggleable& rBtn )
433 {
434  bool bIsChecked = rBtn.get_active();
435  bool bDataChanged = rBtn.get_saved_state() == (bIsChecked ? 1 : 0)
436  && WAS_DEFAULT(nWhich,rOldSet);
437 
438  if ( bDataChanged )
439  rCoreSet.ClearItem( nWhich );
440 
441  else
442  rCoreSet.Put( ScViewObjectModeItem( nWhich, bIsChecked
444  : VOBJ_MODE_HIDE ) );
445  return bDataChanged;
446 }
447 
449  SfxItemSet& rCoreSet,
450  const SfxItemSet& rOldSet,
451  const weld::ComboBox& rListBox,
452  sal_uInt16 nLBEntry,
453  const weld::MetricSpinButton& rEd,
454  sal_uInt16 nValue )
455 {
456  bool bIsSel = (rListBox.get_active() == nLBEntry);
457  bool bDataChanged = (rListBox.get_value_changed_from_saved()) ||
459  !WAS_DEFAULT( nWhich, rOldSet );
460 
461  if( bDataChanged )
462  rCoreSet.Put( SfxUInt16Item( nWhich, bIsSel ? nValue : 0 ) );
463  else
464  rCoreSet.ClearItem( nWhich );
465 
466  return bDataChanged;
467 }
468 
470  SfxItemSet& rCoreSet,
471  const SfxItemSet& rOldSet,
472  const weld::ComboBox& rListBox,
473  sal_uInt16 nLBEntry,
474  const weld::SpinButton& rEd1,
475  sal_uInt16 nOrigScalePageWidth,
476  const weld::SpinButton& rEd2,
477  sal_uInt16 nOrigScalePageHeight )
478 {
479  sal_uInt16 nValue1 = rEd1.get_sensitive() ? rEd1.get_value() : 0;
480  sal_uInt16 nValue2 = rEd2.get_sensitive() ? rEd2.get_value() : 0;
481  bool bIsSel = (rListBox.get_active() == nLBEntry);
482  bool bDataChanged = (rListBox.get_value_changed_from_saved()) ||
483  nValue1 != nOrigScalePageWidth ||
484  nValue1 != nOrigScalePageHeight ||
485  !WAS_DEFAULT( nWhich, rOldSet );
486 
487  if( bDataChanged )
488  {
489  ScPageScaleToItem aItem;
490  if( bIsSel )
491  aItem.Set( nValue1, nValue2 );
492  rCoreSet.Put( aItem );
493  }
494  else
495  rCoreSet.ClearItem( nWhich );
496 
497  return bDataChanged;
498 }
499 
501  SfxItemSet& rCoreSet,
502  const SfxItemSet& rOldSet,
503  const weld::ComboBox& rListBox,
504  sal_uInt16 nLBEntry,
505  const weld::SpinButton& rEd,
506  sal_uInt16 nValue )
507 {
508  bool bIsSel = (rListBox.get_active() == nLBEntry);
509  bool bDataChanged = (rListBox.get_value_changed_from_saved()) ||
511  !WAS_DEFAULT( nWhich, rOldSet );
512 
513  if( bDataChanged )
514  rCoreSet.Put( SfxUInt16Item( nWhich, bIsSel ? nValue : 0 ) );
515  else
516  rCoreSet.ClearItem( nWhich );
517 
518  return bDataChanged;
519 }
520 
521 
522 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 GetHeight() const
Definition: attrib.hxx:243
std::unique_ptr< weld::CheckButton > m_xBtnPageNo
Definition: tptable.hxx:47
std::unique_ptr< weld::CheckButton > m_xBtnHeaders
Definition: tptable.hxx:50
FieldUnit
#define SID_SCATTR_PAGE_FIRSTPAGENO
Definition: scitems.hxx:221
std::unique_ptr< weld::SpinButton > m_xEdScalePageNum
Definition: tptable.hxx:68
std::unique_ptr< weld::SpinButton > m_xEdPageNo
Definition: tptable.hxx:48
std::unique_ptr< weld::CheckButton > m_xBtnFormulas
Definition: tptable.hxx:56
bool get_value_changed_from_saved() const
std::unique_ptr< weld::ComboBox > m_xLbScaleMode
Definition: tptable.hxx:59
#define SC_TPTABLE_SCALE_TO_PAGES
Definition: tptable.cxx:83
virtual bool FillItemSet(SfxItemSet *rCoreSet) override
Definition: tptable.cxx:243
constexpr OUStringLiteral PERCENT(u"Percent")
#define SC_TPTABLE_SCALE_TO
Definition: tptable.cxx:82
sal_uInt16 m_nOrigScalePageHeight
Definition: tptable.hxx:42
TriState get_saved_state() const
virtual int get_active() const =0
#define SID_SCATTR_PAGE_SCALE
Definition: scitems.hxx:219
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rCoreSet)
Definition: tptable.cxx:133
std::unique_ptr< weld::MetricSpinButton > m_xEdScaleAll
Definition: tptable.hxx:61
#define SID_SCATTR_PAGE_TOPDOWN
Definition: scitems.hxx:218
static bool lcl_PutScaleItem2(TypedWhichId< ScPageScaleToItem > nWhich, SfxItemSet &rCoreSet, const SfxItemSet &rOldSet, const weld::ComboBox &rListBox, sal_uInt16 nLBEntry, const weld::SpinButton &rEd1, sal_uInt16 nOrigScalePageWidth, const weld::SpinButton &rEd2, sal_uInt16 nOrigScalePageHeight)
Definition: tptable.cxx:469
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: tptable.cxx:336
#define SID_SCATTR_PAGE_SCALETO
Definition: scitems.hxx:230
static bool lcl_PutScaleItem3(TypedWhichId< SfxUInt16Item > nWhich, SfxItemSet &rCoreSet, const SfxItemSet &rOldSet, const weld::ComboBox &rListBox, sal_uInt16 nLBEntry, const weld::SpinButton &rEd, sal_uInt16 nValue)
Definition: tptable.cxx:500
IMPL_LINK_NOARG(ScTablePage, PageDirHdl, weld::Toggleable &, void)
Definition: tptable.cxx:346
std::unique_ptr< weld::SpinButton > m_xEdScalePageWidth
Definition: tptable.hxx:63
std::unique_ptr< weld::CheckButton > m_xBtnObjects
Definition: tptable.hxx:53
void SetExchangeSupport()
std::unique_ptr< weld::CheckButton > m_xBtnNotes
Definition: tptable.hxx:52
#define SID_SCATTR_PAGE_NULLVALS
Definition: scitems.hxx:229
#define SID_SCATTR_PAGE_OBJECTS
Definition: scitems.hxx:216
std::unique_ptr< weld::RadioButton > m_xBtnTopDown
Definition: tptable.hxx:44
void Set(sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: attrib.hxx:248
std::unique_ptr< weld::RadioButton > m_xBtnLeftRight
Definition: tptable.hxx:45
virtual sal_Int64 get_value() const =0
const SfxItemSet & GetItemSet() const
#define SID_SCATTR_PAGE_NOTES
Definition: scitems.hxx:212
sal_uInt16 GetWidth() const
Definition: attrib.hxx:242
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
sal_uInt16 m_nOrigScalePageWidth
Definition: tptable.hxx:41
static const WhichRangesContainer pPageTableRanges
Definition: tptable.hxx:26
std::unique_ptr< weld::CheckButton > m_xCbScalePageHeight
Definition: tptable.hxx:66
#define SID_SCATTR_PAGE_HEADERS
Definition: scitems.hxx:214
TRISTATE_FALSE
void PageNoHdl(const weld::Toggleable *pBtn)
Definition: tptable.cxx:356
virtual void Reset(const SfxItemSet *rCoreSet) override
Definition: tptable.cxx:138
std::unique_ptr< weld::CheckButton > m_xBtnNullVals
Definition: tptable.hxx:57
virtual ~ScTablePage() override
Definition: tptable.cxx:129
#define SC_TPTABLE_SCALE_PERCENT
Definition: tptable.cxx:81
ScTablePage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreSet)
Definition: tptable.cxx:85
bool get_value_changed_from_saved() const
std::unique_ptr< weld::CheckButton > m_xBtnCharts
Definition: tptable.hxx:54
virtual bool get_sensitive() const =0
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
static bool lcl_PutVObjModeItem(TypedWhichId< ScViewObjectModeItem > nWhich, SfxItemSet &rCoreSet, const SfxItemSet &rOldSet, const weld::Toggleable &rBtn)
Definition: tptable.cxx:429
#define SID_SCATTR_PAGE_FORMULAS
Definition: scitems.hxx:228
Contains the "scale to width/height" attribute in page styles.
Definition: attrib.hxx:224
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
#define SID_SCATTR_PAGE_DRAWINGS
Definition: scitems.hxx:217
bool get_value_changed_from_saved() const
std::unique_ptr< weld::CheckButton > m_xBtnGrid
Definition: tptable.hxx:51
static bool lcl_PutBoolItem(TypedWhichId< SfxBoolItem > nWhich, SfxItemSet &rCoreSet, const SfxItemSet &rOldSet, bool bIsChecked, bool bSavedValue)
Definition: tptable.cxx:412
#define SID_SCATTR_PAGE_SCALETOPAGES
Definition: scitems.hxx:220
DeactivateRC
IMPL_LINK(ScTablePage, PageNoHdl, weld::Toggleable &, rBtn, void)
Definition: tptable.cxx:351
static bool lcl_PutScaleItem(TypedWhichId< SfxUInt16Item > nWhich, SfxItemSet &rCoreSet, const SfxItemSet &rOldSet, const weld::ComboBox &rListBox, sal_uInt16 nLBEntry, const weld::MetricSpinButton &rEd, sal_uInt16 nValue)
Definition: tptable.cxx:448
#define SID_SCATTR_PAGE_GRID
Definition: scitems.hxx:213
std::unique_ptr< weld::CheckButton > m_xBtnDrawings
Definition: tptable.hxx:55
#define SID_SCATTR_PAGE_CHARTS
Definition: scitems.hxx:215
virtual bool get_active() const =0
std::unique_ptr< weld::SpinButton > m_xEdScalePageHeight
Definition: tptable.hxx:65
std::unique_ptr< weld::Image > m_xBmpPageDir
Definition: tptable.hxx:46
std::unique_ptr< weld::CheckButton > m_xCbScalePageWidth
Definition: tptable.hxx:64
void ShowImage()
Definition: tptable.cxx:123