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