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