LibreOffice Module sw (master)  1
envfmt.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 #include <hintids.hxx>
21 
22 #include <editeng/paperinf.hxx>
23 #include <editeng/tstpitem.hxx>
24 #include <editeng/lrspitem.hxx>
25 #include <svtools/unitconv.hxx>
26 
27 #include <cmdid.h>
28 #include <wrtsh.hxx>
29 #include <view.hxx>
30 #include "envfmt.hxx"
31 #include <fmtcol.hxx>
32 #include <swuipardlg.hxx>
33 #include <chrdlgmodes.hxx>
34 #include <pardlg.hxx>
35 #include <poolfmt.hxx>
36 #include <uitool.hxx>
37 
38 #include <vector>
39 #include <algorithm>
40 
41 #include <memory>
42 
43 #include <swabstdlg.hxx>
44 #include <swuiexp.hxx>
45 
46 namespace {
56  std::vector<sal_uInt16> lcl_convertRangesToList(const sal_uInt16 aRanges[]) {
57  std::vector<sal_uInt16> aVec;
58  int i = 0;
59  while (aRanges[i])
60  {
61  for (sal_uInt16 n = aRanges[i]; n <= aRanges[i+1]; ++n)
62  {
63  aVec.push_back(n);
64  }
65  i += 2;
66  }
67  return aVec;
68  }
69 
79  sal_uInt16* lcl_convertListToRanges(std::vector<sal_uInt16> &rElements) {
80  std::sort(rElements.begin(), rElements.end());
81  std::vector<sal_uInt16> aRanges;
82  size_t i;
83  for (i = 0; i < rElements.size(); ++i)
84  {
85  //Push the start of the this range.
86  aRanges.push_back(rElements[i]);
87  //Seek to the end of this range.
88  while (i + 1 < rElements.size() && rElements[i+1] - rElements[i] <= 1)
89  {
90  ++i;
91  }
92  //Push the end of this range (may be the same as the start).
93  aRanges.push_back( rElements[i] );
94  }
95 
96  // Convert the vector to an array with terminating zero
97  sal_uInt16 *pNewRanges = new sal_uInt16[aRanges.size() + 1];
98  for (i = 0; i < aRanges.size(); ++i)
99  {
100  pNewRanges[i] = aRanges[i];
101  }
102  pNewRanges[i] = 0;
103  return pNewRanges;
104  }
105 
106 }
107 
108 static tools::Long lUserW = 5669; // 10 cm
109 static tools::Long lUserH = 5669; // 10 cm
110 
112  : SfxTabPage(pPage, pController, "modules/swriter/ui/envformatpage.ui", "EnvFormatPage", &rSet)
113  , m_pDialog(nullptr)
114  , m_xAddrLeftField(m_xBuilder->weld_metric_spin_button("leftaddr", FieldUnit::CM))
115  , m_xAddrTopField(m_xBuilder->weld_metric_spin_button("topaddr", FieldUnit::CM))
116  , m_xAddrEditButton(m_xBuilder->weld_menu_button("addredit"))
117  , m_xSendLeftField(m_xBuilder->weld_metric_spin_button("leftsender", FieldUnit::CM))
118  , m_xSendTopField(m_xBuilder->weld_metric_spin_button("topsender", FieldUnit::CM))
119  , m_xSendEditButton(m_xBuilder->weld_menu_button("senderedit"))
120  , m_xSizeFormatBox(m_xBuilder->weld_combo_box("format"))
121  , m_xSizeWidthField(m_xBuilder->weld_metric_spin_button("width", FieldUnit::CM))
122  , m_xSizeHeightField(m_xBuilder->weld_metric_spin_button("height", FieldUnit::CM))
123  , m_xPreview(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreview))
124 {
126 
127  // Metrics
128  FieldUnit aMetric = ::GetDfltMetric(false);
129  ::SetFieldUnit(*m_xAddrLeftField, aMetric);
130  ::SetFieldUnit(*m_xAddrTopField, aMetric);
131  ::SetFieldUnit(*m_xSendLeftField, aMetric);
132  ::SetFieldUnit(*m_xSendTopField, aMetric);
133  ::SetFieldUnit(*m_xSizeWidthField, aMetric);
134  ::SetFieldUnit(*m_xSizeHeightField, aMetric);
135 
136  // Install handlers
138  m_xAddrLeftField->connect_value_changed( aLk );
139  m_xAddrTopField->connect_value_changed( aLk );
140  m_xSendLeftField->connect_value_changed( aLk );
141  m_xSendTopField->connect_value_changed( aLk );
142  m_xSizeWidthField->connect_value_changed( aLk );
143  m_xSizeHeightField->connect_value_changed( aLk );
144 
145  m_xAddrEditButton->connect_selected(LINK(this, SwEnvFormatPage, AddrEditHdl));
146  m_xSendEditButton->connect_selected(LINK(this, SwEnvFormatPage, SendEditHdl));
147 
148  m_xSizeFormatBox->connect_changed(LINK(this, SwEnvFormatPage, FormatHdl));
149 
150  // m_xSizeFormatBox
151  for (sal_uInt16 i = PAPER_A3; i <= PAPER_KAI32BIG; i++)
152  {
153  if (i != PAPER_USER)
154  {
155  const OUString aPaperName = SvxPaperInfo::GetName(static_cast<Paper>(i));
156 
157  if (aPaperName.isEmpty())
158  continue;
159 
160  sal_Int32 nPos = 0;
161  while (nPos < m_xSizeFormatBox->get_count() &&
162  m_xSizeFormatBox->get_text(nPos) < aPaperName)
163  {
164  ++nPos;
165  }
166  m_xSizeFormatBox->insert_text(nPos, aPaperName);
167  m_aIDs.insert( m_aIDs.begin() + nPos, i);
168  }
169  }
171  m_aIDs.push_back( sal_uInt16(PAPER_USER) );
172 }
173 
175 {
176  m_pDialog = pDialog;
178 }
179 
181 {
182 }
183 
185 {
186  int lWVal = getfieldval(*m_xSizeWidthField);
187  int lHVal = getfieldval(*m_xSizeHeightField);
188 
189  int lWidth = std::max(lWVal, lHVal);
190  int lHeight = std::min(lWVal, lHVal);
191 
192  if (&rEdit == m_xSizeWidthField.get() || &rEdit == m_xSizeHeightField.get())
193  {
194  int nRotatedWidth = lHeight;
195  int nRotatedHeight = lWidth;
197  Size(nRotatedWidth, nRotatedHeight), MapUnit::MapTwip);
198  for (size_t i = 0; i < m_aIDs.size(); ++i)
199  if (m_aIDs[i] == static_cast<sal_uInt16>(ePaper))
200  m_xSizeFormatBox->set_active(i);
201 
202  // remember user size
203  if (m_aIDs[m_xSizeFormatBox->get_active()] == sal_uInt16(PAPER_USER))
204  {
205  lUserW = lWidth ;
206  lUserH = lHeight;
207  }
208 
209  FormatHdl(*m_xSizeFormatBox);
210  }
211  else
212  {
213  FillItem(GetParentSwEnvDlg()->aEnvItem);
214  SetMinMax();
215  m_xPreview->queue_draw();
216  }
217 }
218 
219 IMPL_LINK(SwEnvFormatPage, AddrEditHdl, const OString&, rIdent, void)
220 {
221  Edit(rIdent, false);
222 }
223 
224 IMPL_LINK(SwEnvFormatPage, SendEditHdl, const OString&, rIdent, void)
225 {
226  Edit(rIdent, true);
227 }
228 
229 void SwEnvFormatPage::Edit(const OString& rIdent, bool bSender)
230 {
231  SwWrtShell* pSh = GetParentSwEnvDlg()->pSh;
232  OSL_ENSURE(pSh, "Shell missing");
233 
234  SwTextFormatColl* pColl = pSh->GetTextCollFromPool( static_cast< sal_uInt16 >(
236  OSL_ENSURE(pColl, "Text collection missing");
237 
238  if (rIdent.startsWith("character"))
239  {
240  SfxItemSet *pCollSet = GetCollItemSet(pColl, bSender);
241 
242  // In order for the background color not to get ironed over:
243  SfxAllItemSet aTmpSet(*pCollSet);
244  ::ConvertAttrCharToGen(aTmpSet);
245 
247 
248  const OUString sFormatStr = pColl->GetName();
249  ScopedVclPtr<SfxAbstractTabDialog> pDlg(rFact.CreateSwCharDlg(GetFrameWeld(), pSh->GetView(), aTmpSet, SwCharDlgMode::Env, &sFormatStr));
250  if (pDlg->Execute() == RET_OK)
251  {
252  SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() );
253  ::ConvertAttrGenToChar(aOutputSet, aTmpSet);
254  pCollSet->Put(aOutputSet);
255  }
256  }
257  else if (rIdent.startsWith("paragraph"))
258  {
259  SfxItemSet *pCollSet = GetCollItemSet(pColl, bSender);
260 
261  // In order for the tabulators not to get ironed over:
262  SfxAllItemSet aTmpSet(*pCollSet);
263 
264  // Insert tabs, default tabs into ItemSet
265  const SvxTabStopItem& rDefTabs =
267 
268  const sal_uInt16 nDefDist = static_cast<sal_uInt16>(::GetTabDist( rDefTabs ));
269  SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
270  aTmpSet.Put( aDefDistItem );
271 
272  // Current tab
273  SfxUInt16Item aTabPos( SID_ATTR_TABSTOP_POS, 0 );
274  aTmpSet.Put( aTabPos );
275 
276  // left border as offset
277  const tools::Long nOff = aTmpSet.Get( RES_LR_SPACE ).GetTextLeft();
278  SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff );
279  aTmpSet.Put( aOff );
280 
281  // set BoxInfo
282  ::PrepareBoxInfo( aTmpSet, *pSh );
283 
284  const OUString sFormatStr = pColl->GetName();
285  SwParaDlg aDlg(GetFrameWeld(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFormatStr);
286 
287  if (aDlg.run() == RET_OK)
288  {
289  // maybe relocate defaults
290  const SfxPoolItem* pItem = nullptr;
291  SfxItemSet* pOutputSet = const_cast<SfxItemSet*>(aDlg.GetOutputItemSet());
292  sal_uInt16 nNewDist;
293 
294  if( SfxItemState::SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS,
295  false, &pItem ) &&
296  nDefDist != (nNewDist = static_cast<const SfxUInt16Item*>(pItem)->GetValue()) )
297  {
298  SvxTabStopItem aDefTabs( 0, 0, SvxTabAdjust::Default, RES_PARATR_TABSTOP );
299  MakeDefTabs( nNewDist, aDefTabs );
300  pSh->SetDefault( aDefTabs );
301  pOutputSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS );
302  }
303  if( pOutputSet->Count() )
304  {
305  pCollSet->Put(*pOutputSet);
306  }
307  }
308  }
309 }
310 
311 // A temporary Itemset that gets discarded at abort
313 {
314  std::unique_ptr<SfxItemSet>& pAddrSet = bSender ? GetParentSwEnvDlg()->pSenderSet : GetParentSwEnvDlg()->pAddresseeSet;
315  if (!pAddrSet)
316  {
317  // determine range (merge both Itemsets' ranges)
318  const sal_uInt16 *pRanges = pColl->GetAttrSet().GetRanges();
319 
320  static sal_uInt16 const aRanges[] =
321  {
326  SID_ATTR_TABSTOP_POS, SID_ATTR_TABSTOP_POS,
327  SID_ATTR_TABSTOP_DEFAULTS, SID_ATTR_TABSTOP_DEFAULTS,
328  SID_ATTR_TABSTOP_OFFSET, SID_ATTR_TABSTOP_OFFSET,
329  SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
330  0, 0
331  };
332 
333  // BruteForce merge because MergeRange in SvTools is buggy:
334  std::vector<sal_uInt16> aVec2 = ::lcl_convertRangesToList(pRanges);
335  std::vector<sal_uInt16> aVec = ::lcl_convertRangesToList(aRanges);
336  aVec2.insert(aVec2.end(), aVec.begin(), aVec.end());
337  std::unique_ptr<sal_uInt16[]> pNewRanges(::lcl_convertListToRanges(aVec2));
338 
339  pAddrSet.reset(new SfxItemSet(GetParentSwEnvDlg()->pSh->GetView().GetCurShell()->GetPool(),
340  pNewRanges.get()));
341  pAddrSet->Put(pColl->GetAttrSet());
342  }
343 
344  return pAddrSet.get();
345 }
346 
348 {
349  tools::Long lWidth;
350  tools::Long lHeight;
351  tools::Long lSendFromLeft;
352  tools::Long lSendFromTop;
353  tools::Long lAddrFromLeft;
354  tools::Long lAddrFromTop;
355 
356  const sal_uInt16 nPaper = m_aIDs[m_xSizeFormatBox->get_active()];
357  if (nPaper != sal_uInt16(PAPER_USER))
358  {
359  Size aSz = SvxPaperInfo::GetPaperSize(static_cast<Paper>(nPaper));
360  lWidth = std::max(aSz.Width(), aSz.Height());
361  lHeight = std::min(aSz.Width(), aSz.Height());
362  }
363  else
364  {
365  lWidth = lUserW;
366  lHeight = lUserH;
367  }
368 
369  lSendFromLeft = 566; // 1cm
370  lSendFromTop = 566; // 1cm
371  lAddrFromLeft = lWidth / 2;
372  lAddrFromTop = lHeight / 2;
373 
374  setfieldval(*m_xAddrLeftField, lAddrFromLeft);
375  setfieldval(*m_xAddrTopField , lAddrFromTop );
376  setfieldval(*m_xSendLeftField, lSendFromLeft);
377  setfieldval(*m_xSendTopField , lSendFromTop );
378 
379  setfieldval(*m_xSizeWidthField , lWidth );
380  setfieldval(*m_xSizeHeightField, lHeight);
381 
382  SetMinMax();
383 
384  FillItem(GetParentSwEnvDlg()->aEnvItem);
385  m_xPreview->queue_draw();
386 }
387 
389 {
390  tools::Long lWVal = static_cast< tools::Long >(getfieldval(*m_xSizeWidthField ));
391  tools::Long lHVal = static_cast< tools::Long >(getfieldval(*m_xSizeHeightField));
392 
393  tools::Long lWidth = std::max(lWVal, lHVal),
394  lHeight = std::min(lWVal, lHVal);
395 
396  // Min and Max
397  m_xAddrLeftField->set_range(100 * (getfieldval(*m_xSendLeftField) + 566),
398  100 * (lWidth - 2 * 566), FieldUnit::TWIP);
399  m_xAddrTopField->set_range(100 * (getfieldval(*m_xSendTopField ) + 2 * 566),
400  100 * (lHeight - 2 * 566), FieldUnit::TWIP);
401  m_xSendLeftField->set_range(100 * 566,
402  100 * (getfieldval(*m_xAddrLeftField) - 566), FieldUnit::TWIP);
403  m_xSendTopField->set_range(100 * 566,
404  100 * (getfieldval(*m_xAddrTopField ) - 2 * 566), FieldUnit::TWIP);
405 }
406 
407 std::unique_ptr<SfxTabPage> SwEnvFormatPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet)
408 {
409  return std::make_unique<SwEnvFormatPage>(pPage, pController, *rSet);
410 }
411 
413 {
414  SfxItemSet aSet(rSet);
415  aSet.Put(GetParentSwEnvDlg()->aEnvItem);
416  Reset(&aSet);
417 }
418 
420 {
421  if( _pSet )
422  FillItemSet(_pSet);
423  return DeactivateRC::LeavePage;
424 }
425 
427 {
428  rItem.m_nAddrFromLeft = static_cast< sal_Int32 >(getfieldval(*m_xAddrLeftField));
429  rItem.m_nAddrFromTop = static_cast< sal_Int32 >(getfieldval(*m_xAddrTopField ));
430  rItem.m_nSendFromLeft = static_cast< sal_Int32 >(getfieldval(*m_xSendLeftField));
431  rItem.m_nSendFromTop = static_cast< sal_Int32 >(getfieldval(*m_xSendTopField ));
432 
433  const sal_uInt16 nPaper = m_aIDs[m_xSizeFormatBox->get_active()];
434  if (nPaper == sal_uInt16(PAPER_USER))
435  {
436  tools::Long lWVal = static_cast< tools::Long >(getfieldval(*m_xSizeWidthField ));
437  tools::Long lHVal = static_cast< tools::Long >(getfieldval(*m_xSizeHeightField));
438  rItem.m_nWidth = std::max(lWVal, lHVal);
439  rItem.m_nHeight = std::min(lWVal, lHVal);
440  }
441  else
442  {
443  tools::Long lWVal = SvxPaperInfo::GetPaperSize(static_cast<Paper>(nPaper)).Width ();
444  tools::Long lHVal = SvxPaperInfo::GetPaperSize(static_cast<Paper>(nPaper)).Height();
445  rItem.m_nWidth = std::max(lWVal, lHVal);
446  rItem.m_nHeight = std::min(lWVal, lHVal);
447  }
448 }
449 
451 {
452  FillItem(GetParentSwEnvDlg()->aEnvItem);
453  rSet->Put(GetParentSwEnvDlg()->aEnvItem);
454  return true;
455 }
456 
458 {
459  const SwEnvItem& rItem = static_cast<const SwEnvItem&>( rSet->Get(FN_ENVELOP));
460 
462  Size( std::min(rItem.m_nWidth, rItem.m_nHeight),
463  std::max(rItem.m_nWidth, rItem.m_nHeight)), MapUnit::MapTwip);
464  for (size_t i = 0; i < m_aIDs.size(); ++i)
465  if (m_aIDs[i] == static_cast<sal_uInt16>(ePaper))
466  m_xSizeFormatBox->set_active(i);
467 
468  // Metric fields
473  setfieldval(*m_xSizeWidthField , std::max(rItem.m_nWidth, rItem.m_nHeight));
474  setfieldval(*m_xSizeHeightField , std::min(rItem.m_nWidth, rItem.m_nHeight));
475  SetMinMax();
476 
477  GetParentSwEnvDlg()->pSenderSet.reset();
478  GetParentSwEnvDlg()->pAddresseeSet.reset();
479 }
480 
481 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetDefault(const SfxPoolItem &)
Set attribute as new default attribute in document.
Definition: edatmisc.cxx:84
FieldUnit
Represents the style of a paragraph.
Definition: fmtcol.hxx:56
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: envfmt.cxx:450
constexpr TypedWhichId< SvxTabStopItem > RES_PARATR_TABSTOP(68)
SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId)
Definition: edfmt.cxx:123
IMPL_LINK_NOARG(SwEnvFormatPage, FormatHdl, weld::ComboBox &, void)
Definition: envfmt.cxx:347
std::unique_ptr< weld::ComboBox > m_xSizeFormatBox
Definition: envfmt.hxx:39
#define FN_ENVELOP
Definition: cmdid.h:746
virtual const SfxItemSet * GetOutputItemSet() const =0
std::string GetValue
sal_Int32 m_nHeight
Definition: envimg.hxx:50
std::unique_ptr< weld::MetricSpinButton > m_xSizeWidthField
Definition: envfmt.hxx:40
long Long
SW_DLLPUBLIC void ConvertAttrCharToGen(SfxItemSet &rSet, bool bPara=false)
Convert character specific attributes to general ones used by tab pages.
Definition: uitool.cxx:104
SfxItemSet * GetCollItemSet(SwTextFormatColl const *pColl, bool bSender)
Definition: envfmt.cxx:312
sal_Int64 n
sal_Int32 m_nWidth
Definition: envimg.hxx:49
sal_Int32 m_nAddrFromLeft
Definition: envimg.hxx:45
SW_DLLPUBLIC SwTwips GetTabDist(const SvxTabStopItem &rTabs)
Definition: uitool.cxx:588
std::unique_ptr< weld::MetricSpinButton > m_xAddrLeftField
Definition: envfmt.hxx:33
std::unique_ptr< weld::MetricSpinButton > m_xSendTopField
Definition: envfmt.hxx:37
sal_Int32 m_nSendFromLeft
Definition: envimg.hxx:47
virtual void Reset(const SfxItemSet *rSet) override
Definition: envfmt.cxx:457
SwEnvDlg * m_pDialog
Definition: envfmt.hxx:29
void Edit(const OString &rIdent, bool bSender)
Definition: envfmt.cxx:229
SfxShell * GetCurShell()
Definition: view.hxx:562
void Init(SwEnvDlg *pDialog)
Definition: envfmt.cxx:174
Used by the UI to modify the document model.
Definition: wrtsh.hxx:91
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: envfmt.cxx:407
const SwView & GetView() const
Definition: wrtsh.hxx:429
std::unique_ptr< weld::MenuButton > m_xAddrEditButton
Definition: envfmt.hxx:35
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
std::unique_ptr< SfxItemSet > pAddresseeSet
Definition: envlop.hxx:69
const OUString & GetName() const
Definition: format.hxx:115
void SetExchangeSupport()
sal_Int32 m_nAddrFromTop
Definition: envimg.hxx:46
void FillItem(SwEnvItem &rItem)
Definition: envfmt.cxx:426
static tools::Long lUserH
Definition: envfmt.cxx:109
PAPER_KAI32BIG
SfxItemPool & GetPool() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
std::unique_ptr< weld::MetricSpinButton > m_xSendLeftField
Definition: envfmt.hxx:36
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
SwEnvPreview m_aPreview
Definition: envfmt.hxx:32
SW_DLLPUBLIC FieldUnit GetDfltMetric(bool bWeb)
Definition: uitool.cxx:695
int i
std::vector< sal_uInt16 > m_aIDs
Definition: envfmt.hxx:30
SwAbstractDialogFactory & GetFactory()
Definition: swuiexp.cxx:26
std::unique_ptr< SfxItemSet > pSenderSet
Definition: envlop.hxx:70
IMPL_LINK(SwEnvFormatPage, ModifyHdl, weld::MetricSpinButton &, rEdit, void)
Definition: envfmt.cxx:184
void SetDialog(SwEnvDlg *pDialog)
Definition: envlop.hxx:56
sal_uInt16 Count() const
tools::Long Width() const
#define DLG_ENVELOP
Definition: pardlg.hxx:24
SwWrtShell * pSh
Definition: envlop.hxx:67
static OUString GetName(Paper ePaper)
Paper
static Size GetPaperSize(Paper ePaper, MapUnit eUnit=MapUnit::MapTwip)
SW_DLLPUBLIC void ConvertAttrGenToChar(SfxItemSet &rSet, const SfxItemSet &rOrigSet, bool bPara=false)
Convert general attributes to the corresponding character attributes.
Definition: uitool.cxx:141
SwEnvFormatPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: envfmt.cxx:111
SW_DLLPUBLIC void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem &rTabs)
Definition: uitool.cxx:576
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
PAPER_USER
weld::Window * GetFrameWeld() const
weld::Entry & rEdit
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
std::unique_ptr< weld::MenuButton > m_xSendEditButton
Definition: envfmt.hxx:38
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual ~SwEnvFormatPage() override
Definition: envfmt.cxx:180
RET_OK
constexpr sal_uInt16 RES_PARATR_END(82)
tools::Long Height() const
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: envfmt.cxx:412
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
PAPER_A3
DeactivateRC
SW_DLLPUBLIC void PrepareBoxInfo(SfxItemSet &rSet, const SwWrtShell &rSh)
Definition: uitool.cxx:79
const sal_uInt16 * GetRanges() const
std::unique_ptr< weld::MetricSpinButton > m_xSizeHeightField
Definition: envfmt.hxx:41
static tools::Long lUserW
Definition: envfmt.cxx:108
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:120
sal_Int32 m_nSendFromTop
Definition: envimg.hxx:48
int getfieldval(const weld::MetricSpinButton &rField)
Definition: envlop.hxx:30
virtual VclPtr< SfxAbstractTabDialog > CreateSwCharDlg(weld::Window *pParent, SwView &pVw, const SfxItemSet &rCoreSet, SwCharDlgMode nDialogMode, const OUString *pFormatStr=nullptr)=0
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
constexpr TypedWhichId< SvxAdjustItem > RES_PARATR_ADJUST(64)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(107)
void SetMinMax()
Definition: envfmt.cxx:388
sal_uInt16 nPos
std::unique_ptr< weld::MetricSpinButton > m_xAddrTopField
Definition: envfmt.hxx:34
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: envfmt.cxx:419
SwEnvDlg * GetParentSwEnvDlg()
Definition: envfmt.hxx:55
static Paper GetSvxPaper(const Size &rSize, MapUnit eUnit)
void setfieldval(weld::MetricSpinButton &rField, int lValue)
Definition: envlop.hxx:35