LibreOffice Module cui (master)  1
labdlg.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 <swpossizetabpage.hxx>
21 #include <svtools/unitconv.hxx>
22 
23 #include <svx/svddef.hxx>
24 #include <svx/sxcecitm.hxx>
25 #include <svx/sxcgitm.hxx>
26 #include <svx/sxcllitm.hxx>
27 #include <svx/sxctitm.hxx>
28 
29 #include <svx/dlgutil.hxx>
30 #include <labdlg.hxx>
31 #include <transfrm.hxx>
32 #include <bitmaps.hlst>
33 
34 // define ----------------------------------------------------------------
35 
36 #define EXT_OPTIMAL 0
37 #define EXT_FROM_TOP 1
38 #define EXT_FROM_LEFT 2
39 #define EXT_HORIZONTAL 3
40 #define EXT_VERTICAL 4
41 
42 #define POS_TOP 0
43 #define POS_MIDDLE 1
44 #define POS_BOTTOM 2
45 
46 #define BMP_CAPTTYPE_1 1
47 #define BMP_CAPTTYPE_2 2
48 #define BMP_CAPTTYPE_3 3
49 
50 // static ----------------------------------------------------------------
51 
52 const sal_uInt16 SvxCaptionTabPage::pCaptionRanges[] =
53 {
64  0
65 };
66 
68  : SfxTabPage(pPage, pController, "cui/ui/calloutpage.ui", "CalloutPage", &rInAttrs)
69  , nCaptionType(SdrCaptionType::Type1)
70  , nGap(0)
71  , nEscDir(SdrCaptionEscDir::Horizontal)
72  , bEscRel(false)
73  , nEscAbs(0)
74  , nEscRel(0)
75  , nLineLen(0)
76  , bFitLineLen(false)
77  , nPosition(0)
78  , nExtension(0)
79  , rOutAttrs(rInAttrs)
80  , pView(nullptr)
81  , m_xMF_SPACING(m_xBuilder->weld_metric_spin_button("spacing", FieldUnit::MM))
82  , m_xLB_EXTENSION(m_xBuilder->weld_combo_box("extension"))
83  , m_xFT_BYFT(m_xBuilder->weld_label("byft"))
84  , m_xMF_BY(m_xBuilder->weld_metric_spin_button("by", FieldUnit::MM))
85  , m_xFT_POSITIONFT(m_xBuilder->weld_label("positionft"))
86  , m_xLB_POSITION(m_xBuilder->weld_combo_box("position"))
87  , m_xLineTypes(m_xBuilder->weld_combo_box("linetypes"))
88  , m_xFT_LENGTHFT(m_xBuilder->weld_label("lengthft"))
89  , m_xMF_LENGTH(m_xBuilder->weld_metric_spin_button("length", FieldUnit::MM))
90  , m_xCB_OPTIMAL(m_xBuilder->weld_check_button("optimal"))
91  , m_xCT_CAPTTYPE(new SvtValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
92  , m_xCT_CAPTTYPEWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xCT_CAPTTYPE))
93 {
94  Size aSize(m_xCT_CAPTTYPE->GetDrawingArea()->get_ref_device().LogicToPixel(Size(187, 38), MapMode(MapUnit::MapAppFont)));
95  m_xCT_CAPTTYPEWin->set_size_request(aSize.Width(), aSize.Height());
96 
97  assert(m_xLB_POSITION->get_count() == 6);
98  for (int i = 0; i < 3; ++i)
99  m_aStrHorzList.push_back(m_xLB_POSITION->get_text(i));
100  for (int i = 3; i < 6; ++i)
101  m_aStrVertList.push_back(m_xLB_POSITION->get_text(i));
102  m_xLB_POSITION->clear();
103 
104  assert(m_xLineTypes->get_count() == 3);
105  std::vector<OUString> aLineTypes;
106  aLineTypes.reserve(3);
107  for (int i = 0; i < 3; ++i)
108  aLineTypes.push_back(m_xLineTypes->get_text(i));
109 
110  static_assert(CAPTYPE_BITMAPS_COUNT == 3, "unexpected");
111  m_aBmpCapTypes[0] = Image(StockImage::Yes, RID_SVXBMP_LEGTYP1);
112  m_aBmpCapTypes[1] = Image(StockImage::Yes, RID_SVXBMP_LEGTYP2);
113  m_aBmpCapTypes[2] = Image(StockImage::Yes, RID_SVXBMP_LEGTYP3);
114 
115  //------------install ValueSet--------------------------
117  m_xCT_CAPTTYPE->SetColCount(5);//XXX
118  m_xCT_CAPTTYPE->SetLineCount(1);
119  m_xCT_CAPTTYPE->SetSelectHdl(LINK( this, SvxCaptionTabPage, SelectCaptTypeHdl_Impl));
120 
121  Image aImage;
122  m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_1, aImage, aLineTypes[0]);
123  m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_2, aImage, aLineTypes[1]);
124  m_xCT_CAPTTYPE->InsertItem(BMP_CAPTTYPE_3, aImage, aLineTypes[2]);
125 
126  FillValueSet();
127 
128  m_xLB_EXTENSION->connect_changed(LINK(this, SvxCaptionTabPage, ExtensionSelectHdl_Impl));
129  m_xLB_POSITION->connect_changed(LINK(this, SvxCaptionTabPage, PositionSelectHdl_Impl));
130  m_xCB_OPTIMAL->connect_toggled(LINK(this, SvxCaptionTabPage, LineOptHdl_Impl));
131 }
132 
134 {
135  m_xCT_CAPTTYPEWin.reset();
136  m_xCT_CAPTTYPE.reset();
137 }
138 
140 {
141  // set rectangle and working area
142  DBG_ASSERT( pView, "No valid View transferred!" );
143 }
144 
146 {
147  SfxItemPool* pPool = _rOutAttrs->GetPool();
148  DBG_ASSERT( pPool, "Where is the pool?" );
149 
150  MapUnit eUnit;
151 
152  nCaptionType = static_cast<SdrCaptionType>(m_xCT_CAPTTYPE->GetSelectedItemId()-1);
153 
154  _rOutAttrs->Put( SdrCaptionTypeItem( nCaptionType ) );
155 
156  if (m_xMF_SPACING->get_value_changed_from_saved())
157  {
158  eUnit = pPool->GetMetric( GetWhich( SDRATTR_CAPTIONGAP ) );
159  _rOutAttrs->Put( SdrCaptionGapItem( GetCoreValue(*m_xMF_SPACING, eUnit ) ) );
160  }
161 
162  // special treatment!!! XXX
163  if( nCaptionType==SdrCaptionType::Type1 )
164  {
165  switch( nEscDir )
166  {
167  case SdrCaptionEscDir::Horizontal: nEscDir=SdrCaptionEscDir::Vertical;break;
168  case SdrCaptionEscDir::Vertical: nEscDir=SdrCaptionEscDir::Horizontal;break;
169  default: break;
170  }
171  }
172 
173  _rOutAttrs->Put( SdrCaptionEscDirItem( nEscDir ) );
174 
175  bEscRel = m_xLB_POSITION->get_visible();
176  _rOutAttrs->Put( SdrCaptionEscIsRelItem( bEscRel ) );
177 
178  if( bEscRel )
179  {
180  long nVal = 0;
181 
182  switch (m_xLB_POSITION->get_active())
183  {
184  case POS_TOP: nVal=0;break;
185  case POS_MIDDLE: nVal=5000;break;
186  case POS_BOTTOM: nVal=10000;break;
187  }
188  _rOutAttrs->Put( SdrCaptionEscRelItem( nVal ) );
189  }
190  else
191  {
192  if (m_xMF_BY->get_value_changed_from_saved())
193  {
194  eUnit = pPool->GetMetric( GetWhich( SDRATTR_CAPTIONESCABS ) );
195  _rOutAttrs->Put( SdrCaptionEscAbsItem( GetCoreValue(*m_xMF_BY, eUnit ) ) );
196  }
197  }
198 
199  bFitLineLen = m_xCB_OPTIMAL->get_active();
200  _rOutAttrs->Put( SdrCaptionFitLineLenItem( bFitLineLen ) );
201 
202  if( ! bFitLineLen )
203  {
204  if (m_xMF_LENGTH->get_value_changed_from_saved())
205  {
206  eUnit = pPool->GetMetric( GetWhich( SDRATTR_CAPTIONLINELEN ) );
207  _rOutAttrs->Put( SdrCaptionLineLenItem( GetCoreValue(*m_xMF_LENGTH, eUnit ) ) );
208  }
209  }
210 
211 //NYI-------------the angles have to be added here!!! XXX----------------------
212 
213  return true;
214 }
215 
217 {
218 
219  //------------set metric-----------------------------
220 
222 
223  switch ( eFUnit )
224  {
225  case FieldUnit::CM:
226  case FieldUnit::M:
227  case FieldUnit::KM:
228  eFUnit = FieldUnit::MM;
229  break;
230  default: ;//prevent warning
231  }
232  SetFieldUnit( *m_xMF_SPACING, eFUnit );
233  SetFieldUnit( *m_xMF_BY, eFUnit );
234  SetFieldUnit( *m_xMF_LENGTH, eFUnit );
235 
236  SfxItemPool* pPool = rOutAttrs.GetPool();
237  DBG_ASSERT( pPool, "Where is the pool?" );
238 
239  sal_uInt16 nWhich;
240  MapUnit eUnit;
241 
242  nWhich = GetWhich( SDRATTR_CAPTIONESCABS );
243  eUnit = pPool->GetMetric( nWhich );
244  nEscAbs = static_cast<const SdrCaptionEscAbsItem&>( rOutAttrs.Get( nWhich ) ).GetValue();
245  SetMetricValue( *m_xMF_BY, nEscAbs, eUnit );
246  nEscAbs = m_xMF_BY->get_value(FieldUnit::NONE);
247 
248  nWhich = GetWhich( SDRATTR_CAPTIONESCREL );
249  nEscRel = static_cast<long>(static_cast<const SdrCaptionEscRelItem&>( rOutAttrs.Get( nWhich ) ).GetValue());
250 
251  //------- line length ----------
252  nWhich = GetWhich( SDRATTR_CAPTIONLINELEN );
253  eUnit = pPool->GetMetric( nWhich );
254  nLineLen = static_cast<const SdrCaptionLineLenItem&>( rOutAttrs.Get( nWhich ) ).GetValue();
256  nLineLen = m_xMF_LENGTH->get_value(FieldUnit::NONE);
257 
258  //------- distance to box ----------
259  nWhich = GetWhich( SDRATTR_CAPTIONGAP );
260  eUnit = pPool->GetMetric( nWhich );
261  nGap = static_cast<const SdrCaptionGapItem&>( rOutAttrs.Get( nWhich ) ).GetValue();
262  SetMetricValue( *m_xMF_SPACING, nGap, eUnit );
263  nGap = m_xMF_SPACING->get_value(FieldUnit::NONE);
264 
268  bEscRel = static_cast<const SfxBoolItem&>( rOutAttrs.Get( GetWhich( SDRATTR_CAPTIONESCISREL ) ) ).GetValue();
269 
270  // special treatment!!! XXX
271  if( nCaptionType==SdrCaptionType::Type1 )
272  {
273  switch( nEscDir )
274  {
275  case SdrCaptionEscDir::Horizontal: nEscDir=SdrCaptionEscDir::Vertical;break;
276  case SdrCaptionEscDir::Vertical: nEscDir=SdrCaptionEscDir::Horizontal;break;
277  default: break;
278  }
279  }
280 
283 
284  m_xMF_SPACING->set_value(nGap, FieldUnit::NONE);
285 
286  if( nEscDir == SdrCaptionEscDir::Horizontal )
287  {
288  if( bEscRel )
289  {
290  if( nEscRel < 3333 )
291  nPosition = POS_TOP;
292  if( nEscRel > 6666 )
295  }
296  else
297  {
299  m_xMF_BY->set_value(nEscAbs, FieldUnit::NONE);
300  }
301  }
302  else if( nEscDir == SdrCaptionEscDir::Vertical )
303  {
304  if( bEscRel )
305  {
306  if( nEscRel < 3333 )
307  nPosition = POS_TOP;
308  if( nEscRel > 6666 )
311  }
312  else
313  {
315  m_xMF_BY->set_value(nEscAbs, FieldUnit::NONE);
316  }
317  }
318  else if( nEscDir == SdrCaptionEscDir::BestFit )
319  {
321  }
322 
323  m_xCB_OPTIMAL->set_active(bFitLineLen);
324  m_xMF_LENGTH->set_value(nLineLen, FieldUnit::NONE);
325 
326  m_xLB_EXTENSION->set_active(nExtension);
327 
329  m_xCT_CAPTTYPE->SelectItem( static_cast<int>(nCaptionType)+1 ); // Enum starts at 0!
331 }
332 
333 std::unique_ptr<SfxTabPage> SvxCaptionTabPage::Create(weld::Container* pPage, weld::DialogController* pController,
334  const SfxItemSet* rOutAttrs)
335 {
336  return std::make_unique<SvxCaptionTabPage>(pPage, pController, *rOutAttrs);
337 }
338 
340 {
341  switch( nType )
342  {
343  case EXT_OPTIMAL:
344  m_xMF_BY->show();
345  m_xFT_BYFT->show();
346  m_xFT_POSITIONFT->hide();
347  m_xLB_POSITION->hide();
348  nEscDir = SdrCaptionEscDir::BestFit;
349  break;
350 
351  case EXT_FROM_TOP:
352  m_xMF_BY->show();
353  m_xFT_BYFT->show();
354  m_xFT_POSITIONFT->hide();
355  m_xLB_POSITION->hide();
356  nEscDir = SdrCaptionEscDir::Horizontal;
357  break;
358 
359  case EXT_FROM_LEFT:
360  m_xMF_BY->show();
361  m_xFT_BYFT->show();
362  m_xFT_POSITIONFT->hide();
363  m_xLB_POSITION->hide();
364  nEscDir = SdrCaptionEscDir::Vertical;
365  break;
366 
367  case EXT_HORIZONTAL:
368  m_xLB_POSITION->clear();
369  for (const OUString & i : m_aStrHorzList)
370  m_xLB_POSITION->append_text(i);
371  m_xLB_POSITION->set_active(nPosition);
372 
373  m_xMF_BY->hide();
374  m_xFT_BYFT->hide();
375  m_xFT_POSITIONFT->show();
376  m_xLB_POSITION->show();
377  nEscDir = SdrCaptionEscDir::Horizontal;
378  break;
379 
380  case EXT_VERTICAL:
381  m_xLB_POSITION->clear();
382  for (const OUString & i : m_aStrVertList)
383  m_xLB_POSITION->append_text(i);
384  m_xLB_POSITION->set_active(nPosition);
385 
386  m_xMF_BY->hide();
387  m_xFT_BYFT->hide();
388  m_xFT_POSITIONFT->show();
389  m_xLB_POSITION->show();
390  nEscDir = SdrCaptionEscDir::Vertical;
391  break;
392  }
393 }
394 
395 IMPL_LINK(SvxCaptionTabPage, ExtensionSelectHdl_Impl, weld::ComboBox&, rListBox, void)
396 {
397  if (&rListBox == m_xLB_EXTENSION.get())
398  {
399  SetupExtension_Impl(m_xLB_EXTENSION->get_active());
400  }
401 }
402 
403 IMPL_LINK(SvxCaptionTabPage, PositionSelectHdl_Impl, weld::ComboBox&, rListBox, void)
404 {
405  if (&rListBox == m_xLB_POSITION.get())
406  {
407  nPosition = m_xLB_POSITION->get_active();
408  }
409 }
410 
411 IMPL_LINK( SvxCaptionTabPage, LineOptHdl_Impl, weld::ToggleButton&, rButton, void )
412 {
413  if (&rButton == m_xCB_OPTIMAL.get())
414  {
415  if (m_xCB_OPTIMAL->get_active() || !m_xCB_OPTIMAL->get_sensitive())
416  {
417  m_xFT_LENGTHFT->set_sensitive(false);
418  m_xMF_LENGTH->set_sensitive(false);
419  }
420  else
421  {
422  m_xFT_LENGTHFT->set_sensitive(true);
423  m_xMF_LENGTH->set_sensitive(true);
424  }
425  }
426 }
427 
428 IMPL_LINK_NOARG(SvxCaptionTabPage, SelectCaptTypeHdl_Impl, SvtValueSet*, void)
429 {
430  SetupType_Impl( static_cast<SdrCaptionType>(m_xCT_CAPTTYPE->GetSelectedItemId()) );
431 }
432 
434 {
435  switch( nType )
436  {
437  case SdrCaptionType::Type1:
438  case SdrCaptionType::Type2:
439  m_xFT_LENGTHFT->set_sensitive(false);
440  m_xCB_OPTIMAL->set_sensitive(false);
441  LineOptHdl_Impl(*m_xCB_OPTIMAL);
442  break;
443  case SdrCaptionType::Type3:
444  case SdrCaptionType::Type4:
445  m_xFT_LENGTHFT->set_sensitive(true);
446  m_xCB_OPTIMAL->set_sensitive(true);
447  LineOptHdl_Impl(*m_xCB_OPTIMAL);
448  break;
449  }
450 }
451 
453 {
454  m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_1, m_aBmpCapTypes[0] );
455  m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_2, m_aBmpCapTypes[1] );
456  m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_3, m_aBmpCapTypes[2] );
457 }
458 
460  SvxAnchorIds nAnchorTypes)
461  : SfxTabDialogController(pParent, "cui/ui/calloutdialog.ui", "CalloutDialog")
462  , pView(pSdrView)
463  , nAnchorCtrls(nAnchorTypes)
464 {
465  assert(pView); // No valid View transferred!
466 
467  //different positioning page in Writer
468  if (nAnchorCtrls & (SvxAnchorIds::Paragraph | SvxAnchorIds::Character | SvxAnchorIds::Page | SvxAnchorIds::Fly))
469  {
470  AddTabPage("RID_SVXPAGE_SWPOSSIZE", SvxSwPosSizeTabPage::Create,
472  RemoveTabPage("RID_SVXPAGE_POSITION_SIZE");
473  }
474  else
475  {
476  AddTabPage("RID_SVXPAGE_POSITION_SIZE", SvxPositionSizeTabPage::Create,
478  RemoveTabPage("RID_SVXPAGE_SWPOSSIZE");
479  }
480  AddTabPage("RID_SVXPAGE_CAPTION", SvxCaptionTabPage::Create,
482 }
483 
484 void SvxCaptionTabDialog::PageCreated(const OString& rId, SfxTabPage &rPage)
485 {
486  if (rId == "RID_SVXPAGE_POSITION_SIZE")
487  {
488  static_cast<SvxPositionSizeTabPage&>( rPage ).SetView( pView );
489  static_cast<SvxPositionSizeTabPage&>( rPage ).Construct();
490  if( nAnchorCtrls & SvxAnchorIds::NoResize )
491  static_cast<SvxPositionSizeTabPage&>( rPage ).DisableResize();
492 
493  if( nAnchorCtrls & SvxAnchorIds::NoProtect )
494  static_cast<SvxPositionSizeTabPage&>( rPage ).DisableProtect();
495  }
496  else if (rId == "RID_SVXPAGE_SWPOSSIZE")
497  {
498  SvxSwPosSizeTabPage& rSwPage = static_cast<SvxSwPosSizeTabPage&>(rPage);
501  }
502  else if (rId == "RID_SVXPAGE_CAPTION")
503  {
504  static_cast<SvxCaptionTabPage&>( rPage ).SetView( pView );
505  static_cast<SvxCaptionTabPage&>( rPage ).Construct();
506  }
507 }
508 
510 {
511  aValidateLink = rLink;
512 }
513 
514 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define EXT_FROM_TOP
Definition: labdlg.cxx:37
void SetFieldUnit(weld::MetricSpinButton &rField, FieldUnit eUnit, bool bAll)
std::unique_ptr< weld::MetricSpinButton > m_xMF_SPACING
Definition: labdlg.hxx:60
FieldUnit
void FillValueSet()
Definition: labdlg.cxx:452
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
SvxCaptionTabDialog(weld::Window *pParent, const SdrView *pView, SvxAnchorIds nAnchorTypes)
Definition: labdlg.cxx:459
std::unique_ptr< weld::Label > m_xFT_LENGTHFT
Definition: labdlg.hxx:67
const sal_uInt16 CAPTYPE_BITMAPS_COUNT
Definition: labdlg.hxx:33
std::unique_ptr< SvtValueSet > m_xCT_CAPTTYPE
Definition: labdlg.hxx:70
#define SDRATTR_CAPTIONFIXEDANGLE
#define BMP_CAPTTYPE_2
Definition: labdlg.cxx:47
std::unique_ptr< weld::Label > m_xFT_BYFT
Definition: labdlg.hxx:62
std::string GetValue
#define BMP_CAPTTYPE_1
Definition: labdlg.cxx:46
SvxAnchorIds nAnchorCtrls
Definition: labdlg.hxx:102
std::unique_ptr< weld::MetricSpinButton > m_xMF_BY
Definition: labdlg.hxx:63
void SetValidateFramePosLink(const Link< SvxSwFrameValidation &, void > &rLink)
IMPL_LINK(SvxCaptionTabPage, ExtensionSelectHdl_Impl, weld::ComboBox &, rListBox, void)
Definition: labdlg.cxx:395
void RemoveTabPage(const OString &rName)
sal_Int32 nGap
Definition: labdlg.hxx:46
std::unique_ptr< weld::Label > m_xFT_POSITIONFT
Definition: labdlg.hxx:64
std::unique_ptr< weld::MetricSpinButton > m_xMF_LENGTH
Definition: labdlg.hxx:68
#define POS_TOP
Definition: labdlg.cxx:42
virtual void Reset(const SfxItemSet *) override
Definition: labdlg.cxx:216
SdrCaptionEscDir
Link< SvxSwFrameValidation &, void > aValidateLink
Definition: labdlg.hxx:104
FieldUnit GetModuleFieldUnit(const SfxItemSet &rSet)
std::vector< OUString > m_aStrVertList
Definition: labdlg.hxx:43
virtual bool FillItemSet(SfxItemSet *) override
Definition: labdlg.cxx:145
static const sal_uInt16 * GetRanges()
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
std::unique_ptr< weld::CheckButton > m_xCB_OPTIMAL
Definition: labdlg.hxx:69
#define SDRATTR_CAPTIONESCABS
#define WB_ITEMBORDER
void SetupExtension_Impl(sal_uInt16 nType)
Definition: labdlg.cxx:339
#define POS_BOTTOM
Definition: labdlg.cxx:44
#define SDRATTR_CAPTIONESCISREL
sal_uInt16 nExtension
Definition: labdlg.hxx:55
SdrCaptionType
#define SDRATTR_CAPTIONTYPE
#define SDRATTR_CAPTIONGAP
void SetValidateFramePosLink(const Link< SvxSwFrameValidation &, void > &rLink)
link for the Writer to validate positions
Definition: labdlg.cxx:509
#define SDRATTR_CAPTIONLINELEN
const SdrView * pView
Definition: labdlg.hxx:101
sal_Int32 nEscAbs
Definition: labdlg.hxx:49
static const sal_uInt16 * GetRanges()
Definition: transfrm.hxx:136
void Construct()
Definition: labdlg.cxx:139
#define DBG_ASSERT(sCon, aError)
#define POS_MIDDLE
Definition: labdlg.cxx:43
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: labdlg.cxx:484
#define EXT_FROM_LEFT
Definition: labdlg.cxx:38
#define SDRATTR_CAPTIONESCDIR
int i
int GetCoreValue(const weld::MetricSpinButton &rField, MapUnit eUnit)
std::unique_ptr< weld::ComboBox > m_xLB_EXTENSION
Definition: labdlg.hxx:61
void SetupType_Impl(SdrCaptionType nType)
Definition: labdlg.cxx:433
void SetMetricValue(weld::MetricSpinButton &rField, int nCoreValue, MapUnit eUnit)
#define SDRATTR_CAPTIONFITLINELEN
SfxItemPool * GetPool() const
#define EXT_OPTIMAL
Definition: labdlg.cxx:36
#define SDRATTR_CAPTIONANGLE
IMPL_LINK_NOARG(SvxCaptionTabPage, SelectCaptTypeHdl_Impl, SvtValueSet *, void)
Definition: labdlg.cxx:428
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SvxCaptionTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: labdlg.cxx:67
sal_Int32 nLineLen
Definition: labdlg.hxx:51
SdrCaptionType nCaptionType
Definition: labdlg.hxx:45
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
#define SDRATTR_CAPTIONESCREL
std::vector< OUString > m_aStrHorzList
Definition: labdlg.hxx:42
static const sal_uInt16 * GetRanges()
Definition: labdlg.hxx:85
SvxAnchorIds
void AddTabPage(const OString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
SdrCaptionEscDir nEscDir
Definition: labdlg.hxx:47
std::unique_ptr< weld::CustomWeld > m_xCT_CAPTTYPEWin
Definition: labdlg.hxx:71
std::unique_ptr< weld::ComboBox > m_xLineTypes
Definition: labdlg.hxx:66
const SdrView * pView
Definition: labdlg.hxx:58
#define EXT_HORIZONTAL
Definition: labdlg.cxx:39
#define WB_DOUBLEBORDER
MapUnit
#define EXT_VERTICAL
Definition: labdlg.cxx:40
void EnableAnchorTypes(SvxAnchorIds nAnchorEnable)
static const sal_uInt16 pCaptionRanges[]
Definition: labdlg.hxx:38
std::unique_ptr< weld::ComboBox > m_xLB_POSITION
Definition: labdlg.hxx:65
#define BMP_CAPTTYPE_3
Definition: labdlg.cxx:48
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
Definition: transfrm.cxx:1118
Image m_aBmpCapTypes[CAPTYPE_BITMAPS_COUNT]
Definition: labdlg.hxx:40
virtual ~SvxCaptionTabPage() override
Definition: labdlg.cxx:133
sal_uInt16 nPosition
Definition: labdlg.hxx:54
sal_Int32 nEscRel
Definition: labdlg.hxx:50
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
Definition: labdlg.cxx:333
const SfxItemSet & rOutAttrs
Definition: labdlg.hxx:57
#define WB_NAMEFIELD