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