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 
33 const sal_uInt16 ScTablePage::pPageTableRanges[] =
34 {
36  0
37 };
38 
39 static bool lcl_PutVObjModeItem(sal_uInt16 nWhich,
40  SfxItemSet& rCoreSet,
41  const SfxItemSet& rOldSet,
42  const weld::ToggleButton& rBtn);
43 
44 static bool lcl_PutScaleItem( sal_uInt16 nWhich,
45  SfxItemSet& rCoreSet,
46  const SfxItemSet& rOldSet,
47  const weld::ComboBox& rListBox,
48  sal_uInt16 nLBEntry,
49  const weld::MetricSpinButton& rEd,
50  sal_uInt16 nValue );
51 
52 static bool lcl_PutScaleItem2( sal_uInt16 nWhich,
53  SfxItemSet& rCoreSet,
54  const SfxItemSet& rOldSet,
55  const weld::ComboBox& rListBox,
56  sal_uInt16 nLBEntry,
57  const weld::SpinButton& rEd1,
58  sal_uInt16 nOrigScalePageWidth,
59  const weld::SpinButton& rEd2,
60  sal_uInt16 nOrigScalePageHeight );
61 
62 static bool lcl_PutScaleItem3( sal_uInt16 nWhich,
63  SfxItemSet& rCoreSet,
64  const SfxItemSet& rOldSet,
65  const weld::ComboBox& rListBox,
66  sal_uInt16 nLBEntry,
67  const weld::SpinButton& rEd,
68  sal_uInt16 nValue );
69 
70 static bool lcl_PutBoolItem( sal_uInt16 nWhich,
71  SfxItemSet& rCoreSet,
72  const SfxItemSet& rOldSet,
73  bool bIsChecked,
74  bool bSavedValue );
75 
76 namespace {
77 
78 bool WAS_DEFAULT(sal_uInt16 w, SfxItemSet const & s)
79 { return SfxItemState::DEFAULT==s.GetItemState(w); }
80 
81 }
82 
83 #define GET_BOOL(sid,set) static_cast<const SfxBoolItem&>((set).Get(GetWhich((sid)))).GetValue()
84 #define GET_USHORT(sid,set) static_cast<const SfxUInt16Item&>((set).Get(GetWhich((sid)))).GetValue()
85 #define GET_SHOW(sid,set) ( static_cast<const ScViewObjectModeItem&>((set).Get(GetWhich((sid)))).GetValue() \
86  == VOBJ_MODE_SHOW )
87 // List box entries "Scaling mode"
88 #define SC_TPTABLE_SCALE_PERCENT 0
89 #define SC_TPTABLE_SCALE_TO 1
90 #define SC_TPTABLE_SCALE_TO_PAGES 2
91 
93  : SfxTabPage(pPage, pController, "modules/scalc/ui/sheetprintpage.ui", "SheetPrintPage", &rCoreAttrs)
94  , m_nOrigScalePageWidth(0)
95  , m_nOrigScalePageHeight(0)
96  , m_xBtnTopDown(m_xBuilder->weld_radio_button("radioBTN_TOPDOWN"))
97  , m_xBtnLeftRight(m_xBuilder->weld_radio_button("radioBTN_LEFTRIGHT"))
98  , m_xBmpPageDir(m_xBuilder->weld_image("imageBMP_PAGEDIR"))
99  , m_xBtnPageNo(m_xBuilder->weld_check_button("checkBTN_PAGENO"))
100  , m_xEdPageNo(m_xBuilder->weld_spin_button("spinED_PAGENO"))
101  , m_xBtnHeaders(m_xBuilder->weld_check_button("checkBTN_HEADER"))
102  , m_xBtnGrid(m_xBuilder->weld_check_button("checkBTN_GRID"))
103  , m_xBtnNotes(m_xBuilder->weld_check_button("checkBTN_NOTES"))
104  , m_xBtnObjects(m_xBuilder->weld_check_button("checkBTN_OBJECTS"))
105  , m_xBtnCharts(m_xBuilder->weld_check_button("checkBTN_CHARTS"))
106  , m_xBtnDrawings(m_xBuilder->weld_check_button("checkBTN_DRAWINGS"))
107  , m_xBtnFormulas(m_xBuilder->weld_check_button("checkBTN_FORMULAS"))
108  , m_xBtnNullVals(m_xBuilder->weld_check_button("checkBTN_NULLVALS"))
109  , m_xLbScaleMode(m_xBuilder->weld_combo_box("comboLB_SCALEMODE"))
110  , m_xBxScaleAll(m_xBuilder->weld_widget("boxSCALEALL"))
111  , m_xEdScaleAll(m_xBuilder->weld_metric_spin_button("spinED_SCALEALL", FieldUnit::PERCENT))
112  , m_xGrHeightWidth(m_xBuilder->weld_widget("gridWH"))
113  , m_xEdScalePageWidth(m_xBuilder->weld_spin_button("spinED_SCALEPAGEWIDTH"))
114  , m_xCbScalePageWidth(m_xBuilder->weld_check_button("labelWP"))
115  , m_xEdScalePageHeight(m_xBuilder->weld_spin_button("spinED_SCALEPAGEHEIGHT"))
116  , m_xCbScalePageHeight(m_xBuilder->weld_check_button("labelHP"))
117  , m_xBxScalePageNum(m_xBuilder->weld_widget("boxNP"))
118  , m_xEdScalePageNum(m_xBuilder->weld_spin_button("spinED_SCALEPAGENUM"))
119 {
121 
122  m_xBtnPageNo->connect_toggled(LINK(this,ScTablePage,PageNoHdl));
123  m_xBtnTopDown->connect_toggled(LINK(this,ScTablePage,PageDirHdl));
124  m_xBtnLeftRight->connect_toggled(LINK(this,ScTablePage,PageDirHdl));
125  m_xLbScaleMode->connect_changed(LINK(this,ScTablePage,ScaleHdl));
126  m_xCbScalePageWidth->connect_toggled(LINK(this, ScTablePage, ToggleHdl));
127  m_xCbScalePageHeight->connect_toggled(LINK(this, ScTablePage, ToggleHdl));
128 }
129 
131 {
132  OUString aImg(m_xBtnLeftRight->get_active() ? OUString(BMP_LEFTRIGHT) : OUString(BMP_TOPDOWN));
133  m_xBmpPageDir->set_from_icon_name(aImg);
134 }
135 
137 {
138 }
139 
140 std::unique_ptr<SfxTabPage> ScTablePage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet)
141 {
142  return std::make_unique<ScTablePage>(pPage, pController, *rCoreSet);
143 }
144 
145 void ScTablePage::Reset( const SfxItemSet* rCoreSet )
146 {
147  bool bTopDown = GET_BOOL( SID_SCATTR_PAGE_TOPDOWN, *rCoreSet );
148  sal_uInt16 nWhich = 0;
149 
150  // sal_Bool flags
151  m_xBtnNotes->set_active( GET_BOOL(SID_SCATTR_PAGE_NOTES,*rCoreSet) );
152  m_xBtnGrid->set_active( GET_BOOL(SID_SCATTR_PAGE_GRID,*rCoreSet) );
153  m_xBtnHeaders->set_active( GET_BOOL(SID_SCATTR_PAGE_HEADERS,*rCoreSet) );
154  m_xBtnFormulas->set_active( GET_BOOL(SID_SCATTR_PAGE_FORMULAS,*rCoreSet) );
155  m_xBtnNullVals->set_active( GET_BOOL(SID_SCATTR_PAGE_NULLVALS,*rCoreSet) );
156  m_xBtnTopDown->set_active( bTopDown );
157  m_xBtnLeftRight->set_active( !bTopDown );
158 
159  // first printed page:
160  sal_uInt16 nPage = GET_USHORT(SID_SCATTR_PAGE_FIRSTPAGENO,*rCoreSet);
161  m_xBtnPageNo->set_active( nPage != 0 );
162  m_xEdPageNo->set_value( (nPage != 0) ? nPage : 1 );
163  PageNoHdl(nullptr);
164 
165  // object representation:
166  m_xBtnCharts->set_active( GET_SHOW( SID_SCATTR_PAGE_CHARTS, *rCoreSet ) );
167  m_xBtnObjects->set_active( GET_SHOW( SID_SCATTR_PAGE_OBJECTS, *rCoreSet ) );
168  m_xBtnDrawings->set_active( GET_SHOW( SID_SCATTR_PAGE_DRAWINGS, *rCoreSet ) );
169 
170  // scaling:
172  if ( rCoreSet->GetItemState( nWhich ) >= SfxItemState::DEFAULT )
173  {
174  sal_uInt16 nScale = static_cast<const SfxUInt16Item&>(rCoreSet->Get(nWhich)).GetValue();
175  if( nScale > 0 )
177  m_xEdScaleAll->set_value((nScale > 0) ? nScale : 100, FieldUnit::PERCENT);
178  }
179 
181  if ( rCoreSet->GetItemState( nWhich ) >= SfxItemState::DEFAULT )
182  {
183  const ScPageScaleToItem& rItem = static_cast< const ScPageScaleToItem& >( rCoreSet->Get( nWhich ) );
184  sal_uInt16 nWidth = rItem.GetWidth();
185  sal_uInt16 nHeight = rItem.GetHeight();
186 
187  /* width==0 and height==0 is invalid state, used as "not selected".
188  Dialog shows width=height=1 then. */
189  if (nWidth || nHeight)
190  m_xLbScaleMode->set_active(SC_TPTABLE_SCALE_TO);
191  else
192  nWidth = nHeight = 1;
193 
194  if (nWidth)
195  m_xEdScalePageWidth->set_value(nWidth);
196  else
197  m_xEdScalePageWidth->set_text(OUString());
198 
199  m_xEdScalePageWidth->set_sensitive(nWidth != 0);
200  m_xCbScalePageWidth->set_active(nWidth != 0);
201 
202  if(nHeight)
203  m_xEdScalePageHeight->set_value(nHeight);
204  else
205  m_xEdScalePageHeight->set_text(OUString());
206 
207  m_xEdScalePageHeight->set_sensitive(nHeight != 0);
208  m_xCbScalePageHeight->set_active(nHeight != 0);
209  }
210 
212  if ( rCoreSet->GetItemState( nWhich ) >= SfxItemState::DEFAULT )
213  {
214  sal_uInt16 nPages = static_cast<const SfxUInt16Item&>(rCoreSet->Get(nWhich)).GetValue();
215  if( nPages > 0 )
217  m_xEdScalePageNum->set_value( (nPages > 0) ? nPages : 1 );
218  }
219 
220  if (m_xLbScaleMode->get_active() == -1)
221  {
222  // fall back to 100%
223  OSL_FAIL( "ScTablePage::Reset - missing scaling item" );
225  m_xEdScaleAll->set_value(100, FieldUnit::PERCENT);
226  }
227 
228  PageDirHdl(*m_xBtnTopDown);
229  ScaleHdl(*m_xLbScaleMode);
230 
231  // remember for FillItemSet
232  m_xBtnFormulas->save_state();
233  m_xBtnNullVals->save_state();
234  m_xBtnNotes->save_state();
235  m_xBtnGrid->save_state();
236  m_xBtnHeaders->save_state();
237  m_xBtnTopDown->save_state();
238  m_xBtnLeftRight->save_state();
239  m_xLbScaleMode->save_value();
240  m_xBtnCharts->save_state();
241  m_xBtnObjects->save_state();
242  m_xBtnDrawings->save_state();
243  m_xBtnPageNo->save_state();
244  m_xEdPageNo->save_value();
245  m_xEdScaleAll->save_value();
246  m_nOrigScalePageWidth = m_xEdScalePageWidth->get_sensitive() ? m_xEdScalePageWidth->get_value() : 0;
247  m_nOrigScalePageHeight = m_xEdScalePageHeight->get_sensitive() ? m_xEdScalePageHeight->get_value() : 0;
248  m_xEdScalePageNum->save_value();
249 }
250 
252 {
253  const SfxItemSet& rOldSet = GetItemSet();
254  sal_uInt16 nWhichPageNo = GetWhich(SID_SCATTR_PAGE_FIRSTPAGENO);
255  bool bDataChanged = false;
256 
257  // sal_Bool flags
259  *rCoreSet, rOldSet,
260  m_xBtnNotes->get_active(),
261  m_xBtnNotes->get_saved_state() != TRISTATE_FALSE );
262 
264  *rCoreSet, rOldSet,
265  m_xBtnGrid->get_active(),
266  m_xBtnGrid->get_saved_state() != TRISTATE_FALSE );
267 
269  *rCoreSet, rOldSet,
270  m_xBtnHeaders->get_active(),
271  m_xBtnHeaders->get_saved_state() != TRISTATE_FALSE );
272 
274  *rCoreSet, rOldSet,
275  m_xBtnTopDown->get_active(),
276  m_xBtnTopDown->get_saved_state() != TRISTATE_FALSE );
277 
279  *rCoreSet, rOldSet,
280  m_xBtnFormulas->get_active(),
281  m_xBtnFormulas->get_saved_state() != TRISTATE_FALSE );
282 
284  *rCoreSet, rOldSet,
285  m_xBtnNullVals->get_active(),
286  m_xBtnNullVals->get_saved_state() != TRISTATE_FALSE );
287 
288  // first printed page:
289  bool bUseValue = m_xBtnPageNo->get_active();
290 
291  if ( WAS_DEFAULT(nWhichPageNo,rOldSet)
292  && ( (!bUseValue && 0 == m_xBtnPageNo->get_saved_state())
293  || ( bUseValue && 1 == m_xBtnPageNo->get_saved_state()
294  && ! m_xEdPageNo->get_value_changed_from_saved() ) ) )
295  {
296  rCoreSet->ClearItem( nWhichPageNo );
297  }
298  else
299  {
300  sal_uInt16 nPage = static_cast<sal_uInt16>( m_xBtnPageNo->get_active()
301  ? m_xEdPageNo->get_value()
302  : 0 );
303 
304  rCoreSet->Put( SfxUInt16Item( nWhichPageNo, nPage ) );
305  bDataChanged = true;
306  }
307 
308  // object representation:
310  *rCoreSet, rOldSet, *m_xBtnCharts );
311 
313  *rCoreSet, rOldSet, *m_xBtnObjects );
314 
316  *rCoreSet, rOldSet, *m_xBtnDrawings );
317 
318  // scaling:
319  if( !m_xEdScalePageWidth->get_sensitive() && !m_xEdScalePageHeight->get_sensitive() )
320  {
322  m_xEdScaleAll->set_value(100, FieldUnit::PERCENT);
323  }
324 
326  *rCoreSet, rOldSet,
328  *m_xEdScaleAll, static_cast<sal_uInt16>(m_xEdScaleAll->get_value(FieldUnit::PERCENT)) );
329 
331  *rCoreSet, rOldSet,
335 
337  *rCoreSet, rOldSet,
339  *m_xEdScalePageNum, static_cast<sal_uInt16>(m_xEdScalePageNum->get_value()) );
340 
341  return bDataChanged;
342 }
343 
345 {
346  if ( pSetP )
347  FillItemSet( pSetP );
348 
349  return DeactivateRC::LeavePage;
350 }
351 
352 // Handler:
353 
355 {
356  ShowImage();
357 }
358 
359 IMPL_LINK(ScTablePage, PageNoHdl, weld::ToggleButton&, rBtn, void)
360 {
361  PageNoHdl(&rBtn);
362 }
363 
365 {
366  if (m_xBtnPageNo->get_active())
367  {
368  m_xEdPageNo->set_sensitive(true);
369  if (pBtn)
370  m_xEdPageNo->grab_focus();
371  }
372  else
373  m_xEdPageNo->set_sensitive(false);
374 }
375 
377 {
378  // controls for Box "Reduce/enlarge"
379  m_xBxScaleAll->set_visible(m_xLbScaleMode->get_active() == SC_TPTABLE_SCALE_PERCENT);
380 
381  // controls for Grid "Scale to width/height"
382  m_xGrHeightWidth->set_visible(m_xLbScaleMode->get_active() == SC_TPTABLE_SCALE_TO);
383 
384  // controls for Box "Scale to pages"
385  m_xBxScalePageNum->set_visible(m_xLbScaleMode->get_active() == SC_TPTABLE_SCALE_TO_PAGES);
386 }
387 
388 IMPL_LINK(ScTablePage, ToggleHdl, weld::ToggleButton&, rBox, void)
389 {
390  if (&rBox == m_xCbScalePageWidth.get())
391  {
392  if (!rBox.get_active())
393  {
394  m_xEdScalePageWidth->set_text(OUString());
395  m_xEdScalePageWidth->set_sensitive(false);
396  }
397  else
398  {
399  m_xEdScalePageWidth->set_value(1);
400  m_xEdScalePageWidth->set_sensitive(true);
401  }
402  }
403  else
404  {
405  if (!rBox.get_active())
406  {
407  m_xEdScalePageHeight->set_text(OUString());
408  m_xEdScalePageHeight->set_sensitive(false);
409  }
410  else
411  {
412  m_xEdScalePageHeight->set_value(1);
413  m_xEdScalePageHeight->set_sensitive(true);
414  }
415  }
416 }
417 
418 // Helper functions for FillItemSet:
419 
420 static bool lcl_PutBoolItem( sal_uInt16 nWhich,
421  SfxItemSet& rCoreSet,
422  const SfxItemSet& rOldSet,
423  bool bIsChecked,
424  bool bSavedValue )
425 {
426  bool bDataChanged = ( bSavedValue == bIsChecked
427  && WAS_DEFAULT(nWhich,rOldSet) );
428 
429  if ( bDataChanged )
430  rCoreSet.ClearItem(nWhich);
431  else
432  rCoreSet.Put( SfxBoolItem( nWhich, bIsChecked ) );
433 
434  return bDataChanged;
435 }
436 
437 static bool lcl_PutVObjModeItem( sal_uInt16 nWhich,
438  SfxItemSet& rCoreSet,
439  const SfxItemSet& rOldSet,
440  const weld::ToggleButton& rBtn )
441 {
442  bool bIsChecked = rBtn.get_active();
443  bool bDataChanged = rBtn.get_saved_state() == (bIsChecked ? 1 : 0)
444  && WAS_DEFAULT(nWhich,rOldSet);
445 
446  if ( bDataChanged )
447  rCoreSet.ClearItem( nWhich );
448 
449  else
450  rCoreSet.Put( ScViewObjectModeItem( nWhich, bIsChecked
452  : VOBJ_MODE_HIDE ) );
453  return bDataChanged;
454 }
455 
456 static bool lcl_PutScaleItem( sal_uInt16 nWhich,
457  SfxItemSet& rCoreSet,
458  const SfxItemSet& rOldSet,
459  const weld::ComboBox& rListBox,
460  sal_uInt16 nLBEntry,
461  const weld::MetricSpinButton& rEd,
462  sal_uInt16 nValue )
463 {
464  bool bIsSel = (rListBox.get_active() == nLBEntry);
465  bool bDataChanged = (rListBox.get_value_changed_from_saved()) ||
467  !WAS_DEFAULT( nWhich, rOldSet );
468 
469  if( bDataChanged )
470  rCoreSet.Put( SfxUInt16Item( nWhich, bIsSel ? nValue : 0 ) );
471  else
472  rCoreSet.ClearItem( nWhich );
473 
474  return bDataChanged;
475 }
476 
477 static bool lcl_PutScaleItem2( sal_uInt16 nWhich,
478  SfxItemSet& rCoreSet,
479  const SfxItemSet& rOldSet,
480  const weld::ComboBox& rListBox,
481  sal_uInt16 nLBEntry,
482  const weld::SpinButton& rEd1,
483  sal_uInt16 nOrigScalePageWidth,
484  const weld::SpinButton& rEd2,
485  sal_uInt16 nOrigScalePageHeight )
486 {
487  sal_uInt16 nValue1 = rEd1.get_sensitive() ? rEd1.get_value() : 0;
488  sal_uInt16 nValue2 = rEd2.get_sensitive() ? rEd2.get_value() : 0;
489  bool bIsSel = (rListBox.get_active() == nLBEntry);
490  bool bDataChanged = (rListBox.get_value_changed_from_saved()) ||
491  nValue1 != nOrigScalePageWidth ||
492  nValue1 != nOrigScalePageHeight ||
493  !WAS_DEFAULT( nWhich, rOldSet );
494 
495  if( bDataChanged )
496  {
497  ScPageScaleToItem aItem;
498  if( bIsSel )
499  aItem.Set( nValue1, nValue2 );
500  rCoreSet.Put( aItem );
501  }
502  else
503  rCoreSet.ClearItem( nWhich );
504 
505  return bDataChanged;
506 }
507 
508 static bool lcl_PutScaleItem3( sal_uInt16 nWhich,
509  SfxItemSet& rCoreSet,
510  const SfxItemSet& rOldSet,
511  const weld::ComboBox& rListBox,
512  sal_uInt16 nLBEntry,
513  const weld::SpinButton& rEd,
514  sal_uInt16 nValue )
515 {
516  bool bIsSel = (rListBox.get_active() == nLBEntry);
517  bool bDataChanged = (rListBox.get_value_changed_from_saved()) ||
519  !WAS_DEFAULT( nWhich, rOldSet );
520 
521  if( bDataChanged )
522  rCoreSet.Put( SfxUInt16Item( nWhich, bIsSel ? nValue : 0 ) );
523  else
524  rCoreSet.ClearItem( nWhich );
525 
526  return bDataChanged;
527 }
528 
529 
530 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 GetHeight() const
Definition: attrib.hxx:242
std::unique_ptr< weld::CheckButton > m_xBtnPageNo
Definition: tptable.hxx:48
std::unique_ptr< weld::CheckButton > m_xBtnHeaders
Definition: tptable.hxx:51
FieldUnit
#define SID_SCATTR_PAGE_FIRSTPAGENO
Definition: scitems.hxx:218
std::unique_ptr< weld::SpinButton > m_xEdScalePageNum
Definition: tptable.hxx:69
static bool lcl_PutVObjModeItem(sal_uInt16 nWhich, SfxItemSet &rCoreSet, const SfxItemSet &rOldSet, const weld::ToggleButton &rBtn)
Definition: tptable.cxx:437
std::string GetValue
std::unique_ptr< weld::SpinButton > m_xEdPageNo
Definition: tptable.hxx:49
std::unique_ptr< weld::CheckButton > m_xBtnFormulas
Definition: tptable.hxx:57
bool get_value_changed_from_saved() const
std::unique_ptr< weld::ComboBox > m_xLbScaleMode
Definition: tptable.hxx:60
#define SC_TPTABLE_SCALE_TO_PAGES
Definition: tptable.cxx:90
virtual bool FillItemSet(SfxItemSet *rCoreSet) override
Definition: tptable.cxx:251
constexpr OUStringLiteral PERCENT(u"Percent")
#define SC_TPTABLE_SCALE_TO
Definition: tptable.cxx:89
sal_uInt16 m_nOrigScalePageHeight
Definition: tptable.hxx:43
virtual int get_active() const =0
virtual bool get_active() const =0
static bool lcl_PutScaleItem3(sal_uInt16 nWhich, SfxItemSet &rCoreSet, const SfxItemSet &rOldSet, const weld::ComboBox &rListBox, sal_uInt16 nLBEntry, const weld::SpinButton &rEd, sal_uInt16 nValue)
Definition: tptable.cxx:508
#define SID_SCATTR_PAGE_SCALE
Definition: scitems.hxx:216
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rCoreSet)
Definition: tptable.cxx:140
#define GET_USHORT(sid, set)
Definition: tptable.cxx:84
std::unique_ptr< weld::MetricSpinButton > m_xEdScaleAll
Definition: tptable.hxx:62
#define SID_SCATTR_PAGE_TOPDOWN
Definition: scitems.hxx:215
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: tptable.cxx:344
#define SID_SCATTR_PAGE_SCALETO
Definition: scitems.hxx:225
std::unique_ptr< weld::SpinButton > m_xEdScalePageWidth
Definition: tptable.hxx:64
std::unique_ptr< weld::CheckButton > m_xBtnObjects
Definition: tptable.hxx:54
void SetExchangeSupport()
std::unique_ptr< weld::CheckButton > m_xBtnNotes
Definition: tptable.hxx:53
virtual int get_value() const =0
#define SID_SCATTR_PAGE_NULLVALS
Definition: scitems.hxx:224
#define SID_SCATTR_PAGE_OBJECTS
Definition: scitems.hxx:213
std::unique_ptr< weld::RadioButton > m_xBtnTopDown
Definition: tptable.hxx:45
void Set(sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: attrib.hxx:247
std::unique_ptr< weld::RadioButton > m_xBtnLeftRight
Definition: tptable.hxx:46
const SfxItemSet & GetItemSet() const
#define SID_SCATTR_PAGE_NOTES
Definition: scitems.hxx:209
static const sal_uInt16 pPageTableRanges[]
Definition: tptable.hxx:27
sal_uInt16 GetWidth() const
Definition: attrib.hxx:241
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:42
std::unique_ptr< weld::CheckButton > m_xCbScalePageHeight
Definition: tptable.hxx:67
TriState get_saved_state() const
#define SID_SCATTR_PAGE_HEADERS
Definition: scitems.hxx:211
TRISTATE_FALSE
virtual void Reset(const SfxItemSet *rCoreSet) override
Definition: tptable.cxx:145
std::unique_ptr< weld::CheckButton > m_xBtnNullVals
Definition: tptable.hxx:58
static bool lcl_PutBoolItem(sal_uInt16 nWhich, SfxItemSet &rCoreSet, const SfxItemSet &rOldSet, bool bIsChecked, bool bSavedValue)
Definition: tptable.cxx:420
IMPL_LINK_NOARG(ScTablePage, PageDirHdl, weld::ToggleButton &, void)
Definition: tptable.cxx:354
virtual ~ScTablePage() override
Definition: tptable.cxx:136
#define SC_TPTABLE_SCALE_PERCENT
Definition: tptable.cxx:88
ScTablePage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreSet)
Definition: tptable.cxx:92
bool get_value_changed_from_saved() const
IMPL_LINK(ScTablePage, PageNoHdl, weld::ToggleButton &, rBtn, void)
Definition: tptable.cxx:359
std::unique_ptr< weld::CheckButton > m_xBtnCharts
Definition: tptable.hxx:55
virtual bool get_sensitive() const =0
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
#define SID_SCATTR_PAGE_FORMULAS
Definition: scitems.hxx:223
#define GET_SHOW(sid, set)
Definition: tptable.cxx:85
Contains the "scale to width/height" attribute in page styles.
Definition: attrib.hxx:223
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
#define SID_SCATTR_PAGE_DRAWINGS
Definition: scitems.hxx:214
bool get_value_changed_from_saved() const
std::unique_ptr< weld::CheckButton > m_xBtnGrid
Definition: tptable.hxx:52
#define SID_SCATTR_PAGE_SCALETOPAGES
Definition: scitems.hxx:217
#define GET_BOOL(sid, set)
Definition: tptable.cxx:83
void PageNoHdl(const weld::ToggleButton *pBtn)
Definition: tptable.cxx:364
DeactivateRC
#define SID_SCATTR_PAGE_GRID
Definition: scitems.hxx:210
static bool lcl_PutScaleItem2(sal_uInt16 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:477
std::unique_ptr< weld::CheckButton > m_xBtnDrawings
Definition: tptable.hxx:56
#define SID_SCATTR_PAGE_CHARTS
Definition: scitems.hxx:212
static bool lcl_PutScaleItem(sal_uInt16 nWhich, SfxItemSet &rCoreSet, const SfxItemSet &rOldSet, const weld::ComboBox &rListBox, sal_uInt16 nLBEntry, const weld::MetricSpinButton &rEd, sal_uInt16 nValue)
Definition: tptable.cxx:456
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_NOTES(167)
std::unique_ptr< weld::SpinButton > m_xEdScalePageHeight
Definition: tptable.hxx:66
std::unique_ptr< weld::Image > m_xBmpPageDir
Definition: tptable.hxx:47
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_FIRSTPAGENO(176)
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
std::unique_ptr< weld::CheckButton > m_xCbScalePageWidth
Definition: tptable.hxx:65
void ShowImage()
Definition: tptable.cxx:130