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(pPage, pController, "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 }
191 
193 {
194  int lWVal = getfieldval(*m_xSizeWidthField);
195  int lHVal = getfieldval(*m_xSizeHeightField);
196 
197  int lWidth = std::max(lWVal, lHVal);
198  int lHeight = std::min(lWVal, lHVal);
199 
200  if (&rEdit == m_xSizeWidthField.get() || &rEdit == m_xSizeHeightField.get())
201  {
202  int nRotatedWidth = lHeight;
203  int nRotatedHeight = lWidth;
205  Size(nRotatedWidth, nRotatedHeight), MapUnit::MapTwip);
206  for (size_t i = 0; i < m_aIDs.size(); ++i)
207  if (m_aIDs[i] == static_cast<sal_uInt16>(ePaper))
208  m_xSizeFormatBox->set_active(i);
209 
210  // remember user size
211  if (m_aIDs[m_xSizeFormatBox->get_active()] == sal_uInt16(PAPER_USER))
212  {
213  lUserW = lWidth ;
214  lUserH = lHeight;
215  }
216 
217  FormatHdl(*m_xSizeFormatBox);
218  }
219  else
220  {
221  FillItem(GetParentSwEnvDlg()->aEnvItem);
222  SetMinMax();
223  m_xPreview->queue_draw();
224  }
225 }
226 
227 IMPL_LINK(SwEnvFormatPage, AddrEditHdl, const OString&, rIdent, void)
228 {
229  Edit(rIdent, false);
230 }
231 
232 IMPL_LINK(SwEnvFormatPage, SendEditHdl, const OString&, rIdent, void)
233 {
234  Edit(rIdent, true);
235 }
236 
237 void SwEnvFormatPage::Edit(const OString& rIdent, bool bSender)
238 {
239  SwWrtShell* pSh = GetParentSwEnvDlg()->pSh;
240  OSL_ENSURE(pSh, "Shell missing");
241 
242  SwTextFormatColl* pColl = pSh->GetTextCollFromPool( static_cast< sal_uInt16 >(
244  OSL_ENSURE(pColl, "Text collection missing");
245 
246  if (rIdent.startsWith("character"))
247  {
248  SfxItemSet *pCollSet = GetCollItemSet(pColl, bSender);
249 
250  // In order for the background color not to get ironed over:
251  SfxAllItemSet aTmpSet(*pCollSet);
252  ::ConvertAttrCharToGen(aTmpSet);
253 
255 
256  const OUString sFormatStr = pColl->GetName();
257  ScopedVclPtr<SfxAbstractTabDialog> pDlg(rFact.CreateSwCharDlg(GetFrameWeld(), pSh->GetView(), aTmpSet, SwCharDlgMode::Env, &sFormatStr));
258  if (pDlg->Execute() == RET_OK)
259  {
260  SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() );
261  ::ConvertAttrGenToChar(aOutputSet, aTmpSet);
262  pCollSet->Put(aOutputSet);
263  }
264  }
265  else if (rIdent.startsWith("paragraph"))
266  {
267  SfxItemSet *pCollSet = GetCollItemSet(pColl, bSender);
268 
269  // In order for the tabulators not to get ironed over:
270  SfxAllItemSet aTmpSet(*pCollSet);
271 
272  // Insert tabs, default tabs into ItemSet
273  const SvxTabStopItem& rDefTabs =
275 
276  const sal_uInt16 nDefDist = static_cast<sal_uInt16>(::GetTabDist( rDefTabs ));
277  SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
278  aTmpSet.Put( aDefDistItem );
279 
280  // Current tab
281  SfxUInt16Item aTabPos( SID_ATTR_TABSTOP_POS, 0 );
282  aTmpSet.Put( aTabPos );
283 
284  // left border as offset
285  const long nOff = aTmpSet.Get( RES_LR_SPACE ).GetTextLeft();
286  SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff );
287  aTmpSet.Put( aOff );
288 
289  // set BoxInfo
290  ::PrepareBoxInfo( aTmpSet, *pSh );
291 
292  const OUString sFormatStr = pColl->GetName();
293  SwParaDlg aDlg(GetFrameWeld(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFormatStr);
294 
295  if (aDlg.run() == RET_OK)
296  {
297  // maybe relocate defaults
298  const SfxPoolItem* pItem = nullptr;
299  SfxItemSet* pOutputSet = const_cast<SfxItemSet*>(aDlg.GetOutputItemSet());
300  sal_uInt16 nNewDist;
301 
302  if( SfxItemState::SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS,
303  false, &pItem ) &&
304  nDefDist != (nNewDist = static_cast<const SfxUInt16Item*>(pItem)->GetValue()) )
305  {
306  SvxTabStopItem aDefTabs( 0, 0, SvxTabAdjust::Default, RES_PARATR_TABSTOP );
307  MakeDefTabs( nNewDist, aDefTabs );
308  pSh->SetDefault( aDefTabs );
309  pOutputSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS );
310  }
311  if( pOutputSet->Count() )
312  {
313  pCollSet->Put(*pOutputSet);
314  }
315  }
316  }
317 }
318 
319 // A temporary Itemset that gets discarded at abort
321 {
322  std::unique_ptr<SfxItemSet>& pAddrSet = bSender ? GetParentSwEnvDlg()->pSenderSet : GetParentSwEnvDlg()->pAddresseeSet;
323  if (!pAddrSet)
324  {
325  // determine range (merge both Itemsets' ranges)
326  const sal_uInt16 *pRanges = pColl->GetAttrSet().GetRanges();
327 
328  static sal_uInt16 const aRanges[] =
329  {
334  SID_ATTR_TABSTOP_POS, SID_ATTR_TABSTOP_POS,
335  SID_ATTR_TABSTOP_DEFAULTS, SID_ATTR_TABSTOP_DEFAULTS,
336  SID_ATTR_TABSTOP_OFFSET, SID_ATTR_TABSTOP_OFFSET,
337  SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
338  0, 0
339  };
340 
341  // BruteForce merge because MergeRange in SvTools is buggy:
342  std::vector<sal_uInt16> aVec2 = ::lcl_convertRangesToList(pRanges);
343  std::vector<sal_uInt16> aVec = ::lcl_convertRangesToList(aRanges);
344  aVec2.insert(aVec2.end(), aVec.begin(), aVec.end());
345  std::unique_ptr<sal_uInt16[]> pNewRanges(::lcl_convertListToRanges(aVec2));
346 
347  pAddrSet.reset(new SfxItemSet(GetParentSwEnvDlg()->pSh->GetView().GetCurShell()->GetPool(),
348  pNewRanges.get()));
349  pAddrSet->Put(pColl->GetAttrSet());
350  }
351 
352  return pAddrSet.get();
353 }
354 
356 {
357  long lWidth;
358  long lHeight;
359  long lSendFromLeft;
360  long lSendFromTop;
361  long lAddrFromLeft;
362  long lAddrFromTop;
363 
364  const sal_uInt16 nPaper = m_aIDs[m_xSizeFormatBox->get_active()];
365  if (nPaper != sal_uInt16(PAPER_USER))
366  {
367  Size aSz = SvxPaperInfo::GetPaperSize(static_cast<Paper>(nPaper));
368  lWidth = std::max(aSz.Width(), aSz.Height());
369  lHeight = std::min(aSz.Width(), aSz.Height());
370  }
371  else
372  {
373  lWidth = lUserW;
374  lHeight = lUserH;
375  }
376 
377  lSendFromLeft = 566; // 1cm
378  lSendFromTop = 566; // 1cm
379  lAddrFromLeft = lWidth / 2;
380  lAddrFromTop = lHeight / 2;
381 
382  setfieldval(*m_xAddrLeftField, lAddrFromLeft);
383  setfieldval(*m_xAddrTopField , lAddrFromTop );
384  setfieldval(*m_xSendLeftField, lSendFromLeft);
385  setfieldval(*m_xSendTopField , lSendFromTop );
386 
387  setfieldval(*m_xSizeWidthField , lWidth );
388  setfieldval(*m_xSizeHeightField, lHeight);
389 
390  SetMinMax();
391 
392  FillItem(GetParentSwEnvDlg()->aEnvItem);
393  m_xPreview->queue_draw();
394 }
395 
397 {
398  long lWVal = static_cast< long >(getfieldval(*m_xSizeWidthField ));
399  long lHVal = static_cast< long >(getfieldval(*m_xSizeHeightField));
400 
401  long lWidth = std::max(lWVal, lHVal),
402  lHeight = std::min(lWVal, lHVal);
403 
404  // Min and Max
405  m_xAddrLeftField->set_range(100 * (getfieldval(*m_xSendLeftField) + 566),
406  100 * (lWidth - 2 * 566), FieldUnit::TWIP);
407  m_xAddrTopField->set_range(100 * (getfieldval(*m_xSendTopField ) + 2 * 566),
408  100 * (lHeight - 2 * 566), FieldUnit::TWIP);
409  m_xSendLeftField->set_range(100 * 566,
410  100 * (getfieldval(*m_xAddrLeftField) - 566), FieldUnit::TWIP);
411  m_xSendTopField->set_range(100 * 566,
412  100 * (getfieldval(*m_xAddrTopField ) - 2 * 566), FieldUnit::TWIP);
413 }
414 
415 std::unique_ptr<SfxTabPage> SwEnvFormatPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet)
416 {
417  return std::make_unique<SwEnvFormatPage>(pPage, pController, *rSet);
418 }
419 
421 {
422  SfxItemSet aSet(rSet);
423  aSet.Put(GetParentSwEnvDlg()->aEnvItem);
424  Reset(&aSet);
425 }
426 
428 {
429  if( _pSet )
430  FillItemSet(_pSet);
431  return DeactivateRC::LeavePage;
432 }
433 
435 {
436  rItem.m_nAddrFromLeft = static_cast< sal_Int32 >(getfieldval(*m_xAddrLeftField));
437  rItem.m_nAddrFromTop = static_cast< sal_Int32 >(getfieldval(*m_xAddrTopField ));
438  rItem.m_nSendFromLeft = static_cast< sal_Int32 >(getfieldval(*m_xSendLeftField));
439  rItem.m_nSendFromTop = static_cast< sal_Int32 >(getfieldval(*m_xSendTopField ));
440 
441  const sal_uInt16 nPaper = m_aIDs[m_xSizeFormatBox->get_active()];
442  if (nPaper == sal_uInt16(PAPER_USER))
443  {
444  long lWVal = static_cast< long >(getfieldval(*m_xSizeWidthField ));
445  long lHVal = static_cast< long >(getfieldval(*m_xSizeHeightField));
446  rItem.m_nWidth = std::max(lWVal, lHVal);
447  rItem.m_nHeight = std::min(lWVal, lHVal);
448  }
449  else
450  {
451  long lWVal = SvxPaperInfo::GetPaperSize(static_cast<Paper>(nPaper)).Width ();
452  long lHVal = SvxPaperInfo::GetPaperSize(static_cast<Paper>(nPaper)).Height();
453  rItem.m_nWidth = std::max(lWVal, lHVal);
454  rItem.m_nHeight = std::min(lWVal, lHVal);
455  }
456 }
457 
459 {
460  FillItem(GetParentSwEnvDlg()->aEnvItem);
461  rSet->Put(GetParentSwEnvDlg()->aEnvItem);
462  return true;
463 }
464 
466 {
467  const SwEnvItem& rItem = static_cast<const SwEnvItem&>( rSet->Get(FN_ENVELOP));
468 
470  Size( std::min(rItem.m_nWidth, rItem.m_nHeight),
471  std::max(rItem.m_nWidth, rItem.m_nHeight)), MapUnit::MapTwip);
472  for (size_t i = 0; i < m_aIDs.size(); ++i)
473  if (m_aIDs[i] == static_cast<sal_uInt16>(ePaper))
474  m_xSizeFormatBox->set_active(i);
475 
476  // Metric fields
481  setfieldval(*m_xSizeWidthField , std::max(rItem.m_nWidth, rItem.m_nHeight));
482  setfieldval(*m_xSizeHeightField , std::min(rItem.m_nWidth, rItem.m_nHeight));
483  SetMinMax();
484 
485  GetParentSwEnvDlg()->pSenderSet.reset();
486  GetParentSwEnvDlg()->pAddresseeSet.reset();
487 }
488 
489 /* 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:458
SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId)
Definition: edfmt.cxx:125
IMPL_LINK_NOARG(SwEnvFormatPage, FormatHdl, weld::ComboBox &, void)
Definition: envfmt.cxx:355
std::unique_ptr< weld::ComboBox > m_xSizeFormatBox
Definition: envfmt.hxx:39
PAPER_KAI32BIG
#define FN_ENVELOP
Definition: cmdid.h:724
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:214
std::unique_ptr< weld::MetricSpinButton > m_xSizeWidthField
Definition: envfmt.hxx:40
SfxItemSet * GetCollItemSet(SwTextFormatColl const *pColl, bool bSender)
Definition: envfmt.cxx:320
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:465
SwEnvDlg * m_pDialog
Definition: envfmt.hxx:29
void Edit(const OString &rIdent, bool bSender)
Definition: envfmt.cxx:237
SfxShell * GetCurShell()
Definition: view.hxx:562
void Init(SwEnvDlg *pDialog)
Definition: envfmt.cxx:182
Used by the UI to modify the document model.
Definition: wrtsh.hxx:88
Paper
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: envfmt.cxx:415
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:167
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:434
#define RES_UL_SPACE
Definition: hintids.hxx:199
#define RES_PARATR_BEGIN
Definition: hintids.hxx:161
SfxItemPool & GetPool() const
#define RES_BACKGROUND
Definition: hintids.hxx:212
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: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:192
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)
SwEnvFormatPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: envfmt.cxx:119
SW_DLLPUBLIC void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem &rTabs)
Definition: uitool.cxx:593
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
#define RES_LR_SPACE
Definition: hintids.hxx:198
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
weld::Window * GetFrameWeld() const
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
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: envfmt.cxx:420
#define RES_PARATR_ADJUST
Definition: hintids.hxx:163
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:396
std::unique_ptr< weld::MetricSpinButton > m_xAddrTopField
Definition: envfmt.hxx:34
#define RES_PARATR_END
Definition: hintids.hxx:181
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: envfmt.cxx:427
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