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