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 #include <osl/diagnose.h>
27 
28 #include <cmdid.h>
29 #include <wrtsh.hxx>
30 #include <view.hxx>
31 #include "envfmt.hxx"
32 #include <fmtcol.hxx>
33 #include <swuipardlg.hxx>
34 #include <chrdlgmodes.hxx>
35 #include <pardlg.hxx>
36 #include <poolfmt.hxx>
37 #include <uitool.hxx>
38 
39 #include <vector>
40 #include <algorithm>
41 
42 #include <memory>
43 
44 #include <swabstdlg.hxx>
45 #include <swuiexp.hxx>
46 
47 static tools::Long lUserW = 5669; // 10 cm
48 static tools::Long lUserH = 5669; // 10 cm
49 
51  : SfxTabPage(pPage, pController, "modules/swriter/ui/envformatpage.ui", "EnvFormatPage", &rSet)
52  , m_pDialog(nullptr)
53  , m_xAddrLeftField(m_xBuilder->weld_metric_spin_button("leftaddr", FieldUnit::CM))
54  , m_xAddrTopField(m_xBuilder->weld_metric_spin_button("topaddr", FieldUnit::CM))
55  , m_xAddrEditButton(m_xBuilder->weld_menu_button("addredit"))
56  , m_xSendLeftField(m_xBuilder->weld_metric_spin_button("leftsender", FieldUnit::CM))
57  , m_xSendTopField(m_xBuilder->weld_metric_spin_button("topsender", FieldUnit::CM))
58  , m_xSendEditButton(m_xBuilder->weld_menu_button("senderedit"))
59  , m_xSizeFormatBox(m_xBuilder->weld_combo_box("format"))
60  , m_xSizeWidthField(m_xBuilder->weld_metric_spin_button("width", FieldUnit::CM))
61  , m_xSizeHeightField(m_xBuilder->weld_metric_spin_button("height", FieldUnit::CM))
62  , m_xPreview(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreview))
63 {
65 
66  // Metrics
67  FieldUnit aMetric = ::GetDfltMetric(false);
68  ::SetFieldUnit(*m_xAddrLeftField, aMetric);
69  ::SetFieldUnit(*m_xAddrTopField, aMetric);
70  ::SetFieldUnit(*m_xSendLeftField, aMetric);
71  ::SetFieldUnit(*m_xSendTopField, aMetric);
72  ::SetFieldUnit(*m_xSizeWidthField, aMetric);
73  ::SetFieldUnit(*m_xSizeHeightField, aMetric);
74 
75  // Install handlers
77  m_xAddrLeftField->connect_value_changed( aLk );
78  m_xAddrTopField->connect_value_changed( aLk );
79  m_xSendLeftField->connect_value_changed( aLk );
80  m_xSendTopField->connect_value_changed( aLk );
81  m_xSizeWidthField->connect_value_changed( aLk );
82  m_xSizeHeightField->connect_value_changed( aLk );
83 
84  m_xAddrEditButton->connect_selected(LINK(this, SwEnvFormatPage, AddrEditHdl));
85  m_xSendEditButton->connect_selected(LINK(this, SwEnvFormatPage, SendEditHdl));
86 
87  m_xSizeFormatBox->connect_changed(LINK(this, SwEnvFormatPage, FormatHdl));
88 
89  // m_xSizeFormatBox
90  for (sal_uInt16 i = PAPER_A3; i <= PAPER_KAI32BIG; i++)
91  {
92  if (i != PAPER_USER)
93  {
94  const OUString aPaperName = SvxPaperInfo::GetName(static_cast<Paper>(i));
95 
96  if (aPaperName.isEmpty())
97  continue;
98 
99  sal_Int32 nPos = 0;
100  while (nPos < m_xSizeFormatBox->get_count() &&
101  m_xSizeFormatBox->get_text(nPos) < aPaperName)
102  {
103  ++nPos;
104  }
105  m_xSizeFormatBox->insert_text(nPos, aPaperName);
106  m_aIDs.insert( m_aIDs.begin() + nPos, i);
107  }
108  }
110  m_aIDs.push_back( sal_uInt16(PAPER_USER) );
111 }
112 
114 {
115  m_pDialog = pDialog;
117 }
118 
120 {
121 }
122 
124 {
125  int lWVal = getfieldval(*m_xSizeWidthField);
126  int lHVal = getfieldval(*m_xSizeHeightField);
127 
128  int lWidth = std::max(lWVal, lHVal);
129  int lHeight = std::min(lWVal, lHVal);
130 
131  if (&rEdit == m_xSizeWidthField.get() || &rEdit == m_xSizeHeightField.get())
132  {
133  int nRotatedWidth = lHeight;
134  int nRotatedHeight = lWidth;
136  Size(nRotatedWidth, nRotatedHeight), MapUnit::MapTwip);
137  for (size_t i = 0; i < m_aIDs.size(); ++i)
138  if (m_aIDs[i] == o3tl::narrowing<sal_uInt16>(ePaper))
139  m_xSizeFormatBox->set_active(i);
140 
141  // remember user size
142  if (m_aIDs[m_xSizeFormatBox->get_active()] == sal_uInt16(PAPER_USER))
143  {
144  lUserW = lWidth ;
145  lUserH = lHeight;
146  }
147 
148  FormatHdl(*m_xSizeFormatBox);
149  }
150  else
151  {
152  FillItem(GetParentSwEnvDlg()->aEnvItem);
153  SetMinMax();
154  m_xPreview->queue_draw();
155  }
156 }
157 
158 IMPL_LINK(SwEnvFormatPage, AddrEditHdl, const OString&, rIdent, void)
159 {
160  Edit(rIdent, false);
161 }
162 
163 IMPL_LINK(SwEnvFormatPage, SendEditHdl, const OString&, rIdent, void)
164 {
165  Edit(rIdent, true);
166 }
167 
168 void SwEnvFormatPage::Edit(const OString& rIdent, bool bSender)
169 {
170  SwWrtShell* pSh = GetParentSwEnvDlg()->pSh;
171  OSL_ENSURE(pSh, "Shell missing");
172 
173  SwTextFormatColl* pColl = pSh->GetTextCollFromPool( static_cast< sal_uInt16 >(
175  OSL_ENSURE(pColl, "Text collection missing");
176 
177  if (rIdent.startsWith("character"))
178  {
179  SfxItemSet *pCollSet = GetCollItemSet(pColl, bSender);
180 
181  // In order for the background color not to get ironed over:
182  SfxAllItemSet aTmpSet(*pCollSet);
183  ::ConvertAttrCharToGen(aTmpSet);
184 
186 
187  const OUString sFormatStr = pColl->GetName();
188  ScopedVclPtr<SfxAbstractTabDialog> pDlg(rFact.CreateSwCharDlg(GetFrameWeld(), pSh->GetView(), aTmpSet, SwCharDlgMode::Env, &sFormatStr));
189  if (pDlg->Execute() == RET_OK)
190  {
191  SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() );
192  ::ConvertAttrGenToChar(aOutputSet, aTmpSet);
193  pCollSet->Put(aOutputSet);
194  }
195  }
196  else if (rIdent.startsWith("paragraph"))
197  {
198  SfxItemSet *pCollSet = GetCollItemSet(pColl, bSender);
199 
200  // In order for the tabulators not to get ironed over:
201  SfxAllItemSet aTmpSet(*pCollSet);
202 
203  // Insert tabs, default tabs into ItemSet
204  const SvxTabStopItem& rDefTabs =
206 
207  const sal_uInt16 nDefDist = o3tl::narrowing<sal_uInt16>(::GetTabDist( rDefTabs ));
208  SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
209  aTmpSet.Put( aDefDistItem );
210 
211  // Current tab
212  SfxUInt16Item aTabPos( SID_ATTR_TABSTOP_POS, 0 );
213  aTmpSet.Put( aTabPos );
214 
215  // left border as offset
216  const tools::Long nOff = aTmpSet.Get( RES_LR_SPACE ).GetTextLeft();
217  SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff );
218  aTmpSet.Put( aOff );
219 
220  // set BoxInfo
221  ::PrepareBoxInfo( aTmpSet, *pSh );
222 
223  const OUString sFormatStr = pColl->GetName();
224  SwParaDlg aDlg(GetFrameWeld(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFormatStr);
225 
226  if (aDlg.run() == RET_OK)
227  {
228  // maybe relocate defaults
229  const SfxPoolItem* pItem = nullptr;
230  SfxItemSet* pOutputSet = const_cast<SfxItemSet*>(aDlg.GetOutputItemSet());
231  sal_uInt16 nNewDist;
232 
233  if( SfxItemState::SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS,
234  false, &pItem ) &&
235  nDefDist != (nNewDist = static_cast<const SfxUInt16Item*>(pItem)->GetValue()) )
236  {
237  SvxTabStopItem aDefTabs( 0, 0, SvxTabAdjust::Default, RES_PARATR_TABSTOP );
238  MakeDefTabs( nNewDist, aDefTabs );
239  pSh->SetDefault( aDefTabs );
240  pOutputSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS );
241  }
242  if( pOutputSet->Count() )
243  {
244  pCollSet->Put(*pOutputSet);
245  }
246  }
247  }
248 }
249 
250 // A temporary Itemset that gets discarded at abort
252 {
253  std::unique_ptr<SfxItemSet>& pAddrSet = bSender ? GetParentSwEnvDlg()->pSenderSet : GetParentSwEnvDlg()->pAddresseeSet;
254  if (!pAddrSet)
255  {
256  // determine range (merge both Itemsets' ranges)
257  const WhichRangesContainer& pRanges = pColl->GetAttrSet().GetRanges();
258 
259  static WhichRangesContainer const aRanges(svl::Items<
264  SID_ATTR_TABSTOP_DEFAULTS, SID_ATTR_TABSTOP_DEFAULTS,
265  SID_ATTR_TABSTOP_POS, SID_ATTR_TABSTOP_POS,
266  SID_ATTR_TABSTOP_OFFSET, SID_ATTR_TABSTOP_OFFSET,
267  SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER
268  >);
269 
270  pAddrSet.reset(new SfxItemSet(GetParentSwEnvDlg()->pSh->GetView().GetCurShell()->GetPool(),
271  pRanges));
272  for (const auto& rPair : aRanges)
273  pAddrSet->MergeRange(rPair.first, rPair.second);
274  pAddrSet->Put(pColl->GetAttrSet());
275  }
276 
277  return pAddrSet.get();
278 }
279 
281 {
282  tools::Long lWidth;
283  tools::Long lHeight;
284  tools::Long lSendFromLeft;
285  tools::Long lSendFromTop;
286  tools::Long lAddrFromLeft;
287  tools::Long lAddrFromTop;
288 
289  const sal_uInt16 nPaper = m_aIDs[m_xSizeFormatBox->get_active()];
290  if (nPaper != sal_uInt16(PAPER_USER))
291  {
292  Size aSz = SvxPaperInfo::GetPaperSize(static_cast<Paper>(nPaper));
293  lWidth = std::max(aSz.Width(), aSz.Height());
294  lHeight = std::min(aSz.Width(), aSz.Height());
295  }
296  else
297  {
298  lWidth = lUserW;
299  lHeight = lUserH;
300  }
301 
302  lSendFromLeft = 566; // 1cm
303  lSendFromTop = 566; // 1cm
304  lAddrFromLeft = lWidth / 2;
305  lAddrFromTop = lHeight / 2;
306 
307  setfieldval(*m_xAddrLeftField, lAddrFromLeft);
308  setfieldval(*m_xAddrTopField , lAddrFromTop );
309  setfieldval(*m_xSendLeftField, lSendFromLeft);
310  setfieldval(*m_xSendTopField , lSendFromTop );
311 
312  setfieldval(*m_xSizeWidthField , lWidth );
313  setfieldval(*m_xSizeHeightField, lHeight);
314 
315  SetMinMax();
316 
317  FillItem(GetParentSwEnvDlg()->aEnvItem);
318  m_xPreview->queue_draw();
319 }
320 
322 {
323  tools::Long lWVal = static_cast< tools::Long >(getfieldval(*m_xSizeWidthField ));
324  tools::Long lHVal = static_cast< tools::Long >(getfieldval(*m_xSizeHeightField));
325 
326  tools::Long lWidth = std::max(lWVal, lHVal),
327  lHeight = std::min(lWVal, lHVal);
328 
329  // Min and Max
330  m_xAddrLeftField->set_range(100 * (getfieldval(*m_xSendLeftField) + 566),
331  100 * (lWidth - 2 * 566), FieldUnit::TWIP);
332  m_xAddrTopField->set_range(100 * (getfieldval(*m_xSendTopField ) + 2 * 566),
333  100 * (lHeight - 2 * 566), FieldUnit::TWIP);
334  m_xSendLeftField->set_range(100 * 566,
335  100 * (getfieldval(*m_xAddrLeftField) - 566), FieldUnit::TWIP);
336  m_xSendTopField->set_range(100 * 566,
337  100 * (getfieldval(*m_xAddrTopField ) - 2 * 566), FieldUnit::TWIP);
338 }
339 
340 std::unique_ptr<SfxTabPage> SwEnvFormatPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet)
341 {
342  return std::make_unique<SwEnvFormatPage>(pPage, pController, *rSet);
343 }
344 
346 {
347  SfxItemSet aSet(rSet);
348  aSet.Put(GetParentSwEnvDlg()->aEnvItem);
349  Reset(&aSet);
350 }
351 
353 {
354  if( _pSet )
355  FillItemSet(_pSet);
356  return DeactivateRC::LeavePage;
357 }
358 
360 {
361  rItem.m_nAddrFromLeft = static_cast< sal_Int32 >(getfieldval(*m_xAddrLeftField));
362  rItem.m_nAddrFromTop = static_cast< sal_Int32 >(getfieldval(*m_xAddrTopField ));
363  rItem.m_nSendFromLeft = static_cast< sal_Int32 >(getfieldval(*m_xSendLeftField));
364  rItem.m_nSendFromTop = static_cast< sal_Int32 >(getfieldval(*m_xSendTopField ));
365 
366  const sal_uInt16 nPaper = m_aIDs[m_xSizeFormatBox->get_active()];
367  if (nPaper == sal_uInt16(PAPER_USER))
368  {
369  tools::Long lWVal = static_cast< tools::Long >(getfieldval(*m_xSizeWidthField ));
370  tools::Long lHVal = static_cast< tools::Long >(getfieldval(*m_xSizeHeightField));
371  rItem.m_nWidth = std::max(lWVal, lHVal);
372  rItem.m_nHeight = std::min(lWVal, lHVal);
373  }
374  else
375  {
376  tools::Long lWVal = SvxPaperInfo::GetPaperSize(static_cast<Paper>(nPaper)).Width ();
377  tools::Long lHVal = SvxPaperInfo::GetPaperSize(static_cast<Paper>(nPaper)).Height();
378  rItem.m_nWidth = std::max(lWVal, lHVal);
379  rItem.m_nHeight = std::min(lWVal, lHVal);
380  }
381 }
382 
384 {
385  FillItem(GetParentSwEnvDlg()->aEnvItem);
386  rSet->Put(GetParentSwEnvDlg()->aEnvItem);
387  return true;
388 }
389 
391 {
392  const SwEnvItem& rItem = static_cast<const SwEnvItem&>( rSet->Get(FN_ENVELOP));
393 
395  Size( std::min(rItem.m_nWidth, rItem.m_nHeight),
396  std::max(rItem.m_nWidth, rItem.m_nHeight)), MapUnit::MapTwip);
397  for (size_t i = 0; i < m_aIDs.size(); ++i)
398  if (m_aIDs[i] == o3tl::narrowing<sal_uInt16>(ePaper))
399  m_xSizeFormatBox->set_active(i);
400 
401  // Metric fields
406  setfieldval(*m_xSizeWidthField , std::max(rItem.m_nWidth, rItem.m_nHeight));
407  setfieldval(*m_xSizeHeightField , std::min(rItem.m_nWidth, rItem.m_nHeight));
408  SetMinMax();
409 
410  GetParentSwEnvDlg()->pSenderSet.reset();
411  GetParentSwEnvDlg()->pAddresseeSet.reset();
412 }
413 
414 /* 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:383
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:280
std::unique_ptr< weld::ComboBox > m_xSizeFormatBox
Definition: envfmt.hxx:39
static constexpr auto Items
#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:106
SfxItemSet * GetCollItemSet(SwTextFormatColl const *pColl, bool bSender)
Definition: envfmt.cxx:251
const WhichRangesContainer & GetRanges() const
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:659
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:390
SwEnvDlg * m_pDialog
Definition: envfmt.hxx:29
void Edit(const OString &rIdent, bool bSender)
Definition: envfmt.cxx:168
SfxShell * GetCurShell()
Definition: view.hxx:575
void Init(SwEnvDlg *pDialog)
Definition: envfmt.cxx:113
Used by the UI to modify the document model.
Definition: wrtsh.hxx:93
constexpr tools::Long Width() const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: envfmt.cxx:340
const SwView & GetView() const
Definition: wrtsh.hxx:431
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:359
static tools::Long lUserH
Definition: envfmt.cxx:48
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:766
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:123
void SetDialog(SwEnvDlg *pDialog)
Definition: envlop.hxx:56
sal_uInt16 Count() 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:146
SwEnvFormatPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: envfmt.cxx:50
SW_DLLPUBLIC void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem &rTabs)
Definition: uitool.cxx:647
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:119
constexpr tools::Long Height() const
RET_OK
constexpr sal_uInt16 RES_PARATR_END(82)
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: envfmt.cxx:345
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
PAPER_A3
DeactivateRC
SW_DLLPUBLIC void PrepareBoxInfo(SfxItemSet &rSet, const SwWrtShell &rSh)
Definition: uitool.cxx:81
std::unique_ptr< weld::MetricSpinButton > m_xSizeHeightField
Definition: envfmt.hxx:41
static tools::Long lUserW
Definition: envfmt.cxx:47
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:321
sal_uInt16 nPos
std::unique_ptr< weld::MetricSpinButton > m_xAddrTopField
Definition: envfmt.hxx:34
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: envfmt.cxx:352
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