LibreOffice Module sw (master)  1
cption.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 <view.hxx>
21 #include <wrtsh.hxx>
22 #include <cption.hxx>
23 #include <fldmgr.hxx>
24 #include <expfld.hxx>
25 #include <numrule.hxx>
26 #include <poolfmt.hxx>
27 #include <docsh.hxx>
28 #include <frmfmt.hxx>
29 #include <calc.hxx>
30 #include <uitool.hxx>
31 #include <doc.hxx>
32 #include <modcfg.hxx>
33 #include <swmodule.hxx>
34 #include <com/sun/star/text/GraphicCrop.hpp>
35 #include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
36 #include <com/sun/star/text/XTextTableCursor.hpp>
37 #include <com/sun/star/text/XTextTablesSupplier.hpp>
38 #include <com/sun/star/text/TableColumnSeparator.hpp>
39 #include <com/sun/star/text/XTextTable.hpp>
40 #include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
41 #include <com/sun/star/text/XTextFramesSupplier.hpp>
42 #include <com/sun/star/text/XTextFrame.hpp>
43 #include <comphelper/string.hxx>
44 #include <vcl/weld.hxx>
45 #include <initui.hxx>
46 #include <globals.hrc>
47 #include <strings.hrc>
48 #include <SwStyleNameMapper.hxx>
49 
50 using namespace ::com::sun::star;
51 
53 {
55  OUString const m_aFieldTypeName;
56 
57  std::unique_ptr<weld::ComboBox> m_xLbLevel;
58  std::unique_ptr<weld::Entry> m_xEdDelim;
59 
60  std::unique_ptr<weld::ComboBox> m_xLbCharStyle;
61  std::unique_ptr<weld::CheckButton> m_xApplyBorderAndShadowCB;
62 
63  //#i61007# order of captions
64  std::unique_ptr<weld::ComboBox> m_xLbCaptionOrder;
65 
66 public:
67  SwSequenceOptionDialog(weld::Window *pParent, SwView &rV, const OUString& rSeqFieldType);
68  void Apply();
69 
70  bool IsApplyBorderAndShadow() { return m_xApplyBorderAndShadowCB->get_active(); }
71  void SetApplyBorderAndShadow( bool bSet ) { m_xApplyBorderAndShadowCB->set_active(bSet); }
72 
73  //#i61007# order of captions
74  bool IsOrderNumberingFirst() const { return m_xLbCaptionOrder->get_active() == 1; }
75  void SetOrderNumberingFirst(bool bSet) { m_xLbCaptionOrder->set_active(bSet ? 1 : 0); }
76 
77  void SetCharacterStyle(const OUString& rStyle);
78  OUString GetCharacterStyle() const;
79 
80  virtual short run() override
81  {
82  int nRet = GenericDialogController::run();
83  if (nRet == RET_OK)
84  Apply();
85  return nRet;
86  }
87 };
88 
89 OUString SwCaptionDialog::our_aSepTextSave(": "); // Caption separator text
90 
91 //Resolves: tdf#47427 disallow typing *or* pasting invalid content into the category box
92 OUString TextFilterAutoConvert::filter(const OUString &rText)
93 {
94  if (!rText.isEmpty() && rText != m_sNone && !SwCalc::IsValidVarName(rText))
95  return m_sLastGoodText;
96  m_sLastGoodText = rText;
97  return rText;
98 }
99 
100 IMPL_LINK(SwCaptionDialog, TextFilterHdl, OUString&, rTest, bool)
101 {
102  rTest = m_aTextFilter.filter(rTest);
103  return true;
104 }
105 
107  : SfxDialogController(pParent, "modules/swriter/ui/insertcaption.ui", "InsertCaptionDialog")
108  , m_sNone(SwResId(SW_STR_NONE))
109  , m_aTextFilter(m_sNone)
110  , rView(rV)
111  , pMgr(new SwFieldMgr(rView.GetWrtShellPtr()))
112  , bCopyAttributes(false)
113  , bOrderNumberingFirst(SW_MOD()->GetModuleConfig()->IsCaptionOrderNumberingFirst())
114  , m_xTextEdit(m_xBuilder->weld_entry("caption_edit"))
115  , m_xCategoryBox(m_xBuilder->weld_combo_box("category"))
116  , m_xFormatText(m_xBuilder->weld_label("numbering_label"))
117  , m_xFormatBox(m_xBuilder->weld_combo_box("numbering"))
118  , m_xNumberingSeparatorFT(m_xBuilder->weld_label("num_separator"))
119  , m_xNumberingSeparatorED(m_xBuilder->weld_entry("num_separator_edit"))
120  , m_xSepText(m_xBuilder->weld_label("separator_label"))
121  , m_xSepEdit(m_xBuilder->weld_entry("separator_edit"))
122  , m_xPosText(m_xBuilder->weld_label("position_label"))
123  , m_xPosBox(m_xBuilder->weld_combo_box("position"))
124  , m_xOKButton(m_xBuilder->weld_button("ok"))
125  , m_xAutoCaptionButton(m_xBuilder->weld_button("auto"))
126  , m_xOptionButton(m_xBuilder->weld_button("options"))
127  , m_xPreview(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreview))
128 {
129  m_xCategoryBox->connect_entry_insert_text(LINK(this, SwCaptionDialog, TextFilterHdl));
130 
131  //#i61007# order of captions
133  SwWrtShell &rSh = rView.GetWrtShell();
134  uno::Reference< frame::XModel > xModel = rView.GetDocShell()->GetBaseModel();
135 
137  if ( eType & SelectionType::Ole )
138  {
139  eType = SelectionType::Graphic;
140  uno::Reference< text::XTextEmbeddedObjectsSupplier > xObjs(xModel, uno::UNO_QUERY);
141  xNameAccess = xObjs->getEmbeddedObjects();
142  }
143 
144  m_xCategoryBox->connect_changed(LINK(this, SwCaptionDialog, ModifyComboHdl));
145  Link<weld::Entry&,void> aLk = LINK(this, SwCaptionDialog, ModifyEntryHdl);
146  m_xTextEdit->connect_changed(aLk);
147  m_xNumberingSeparatorED->connect_changed(aLk);
148  m_xSepEdit->connect_changed(aLk);
149 
150  m_xFormatBox->connect_changed(LINK(this, SwCaptionDialog, SelectListBoxHdl));
151  m_xOptionButton->connect_clicked(LINK(this, SwCaptionDialog, OptionHdl));
152  m_xAutoCaptionButton->connect_clicked(LINK(this, SwCaptionDialog, CaptionHdl));
153 
154  m_xCategoryBox->append_text(m_sNone);
155  size_t nCount = pMgr->GetFieldTypeCount();
156  for (size_t i = 0; i < nCount; ++i)
157  {
158  SwFieldType *pType = pMgr->GetFieldType( SwFieldIds::Unknown, i );
159  if( pType->Which() == SwFieldIds::SetExp &&
160  static_cast<SwSetExpFieldType *>( pType)->GetType() & nsSwGetSetExpType::GSE_SEQ )
161  m_xCategoryBox->append_text(pType->GetName());
162  }
163 
164  OUString sString;
165  sal_uInt16 nPoolId = 0;
166  if (eType & SelectionType::Graphic)
167  {
168  nPoolId = RES_POOLCOLL_LABEL_FIGURE;
169 
170  SwSetExpFieldType* pTypeIll= static_cast<SwSetExpFieldType*>(rSh.GetFieldType(SwFieldIds::SetExp, SwResId(STR_POOLCOLL_LABEL_ABB)));
171  if(rSh.IsUsed(*pTypeIll)) //default to illustration for legacy docs
172  {
173  nPoolId = RES_POOLCOLL_LABEL_ABB;
174 
175  }
176 
177  sString = rView.GetOldGrfCat();
178  bCopyAttributes = true;
179  //if not OLE
180  if(!xNameAccess.is())
181  {
182  uno::Reference< text::XTextGraphicObjectsSupplier > xGraphics(xModel, uno::UNO_QUERY);
183  xNameAccess = xGraphics->getGraphicObjects();
184  }
185 
186  }
187  else if( eType & SelectionType::Table )
188  {
189  nPoolId = RES_POOLCOLL_LABEL_TABLE;
190  sString = rView.GetOldTabCat();
191  uno::Reference< text::XTextTablesSupplier > xTables(xModel, uno::UNO_QUERY);
192  xNameAccess = xTables->getTextTables();
193  }
194  else if( eType & SelectionType::Frame )
195  {
196  nPoolId = RES_POOLCOLL_LABEL_FRAME;
197  sString = rView.GetOldFrameCat();
198  uno::Reference< text::XTextFramesSupplier > xFrames(xModel, uno::UNO_QUERY);
199  xNameAccess = xFrames->getTextFrames();
200  }
201  else if( eType == SelectionType::Text )
202  {
203  nPoolId = RES_POOLCOLL_LABEL_FRAME;
204  sString = rView.GetOldFrameCat();
205  }
206  else if( eType & SelectionType::DrawObject )
207  {
208  nPoolId = RES_POOLCOLL_LABEL_DRAWING;
209  sString = rView.GetOldDrwCat();
210  }
211  if( nPoolId )
212  {
213  if (sString.isEmpty())
214  sString = SwStyleNameMapper::GetUIName(nPoolId, OUString());
215  auto nIndex = m_xCategoryBox->find_text(sString);
216  if (nIndex != -1)
217  m_xCategoryBox->set_active(nIndex);
218  else
219  m_xCategoryBox->set_entry_text(sString);
220  }
221 
222  // aFormatBox
223  sal_uInt16 nSelFormat = SVX_NUM_ARABIC;
224  nCount = pMgr->GetFieldTypeCount();
225  for ( size_t i = nCount; i; )
226  {
227  SwFieldType* pFieldType = pMgr->GetFieldType(SwFieldIds::Unknown, --i);
228  if (pFieldType->GetName() == m_xCategoryBox->get_active_text())
229  {
230  nSelFormat = static_cast<sal_uInt16>(static_cast<SwSetExpFieldType*>(pFieldType)->GetSeqFormat());
231  break;
232  }
233  }
234 
235  sal_uInt16 nFormatCount = pMgr->GetFormatCount(TYP_SEQFLD, false);
236  for ( sal_uInt16 i = 0; i < nFormatCount; ++i )
237  {
238  const sal_uInt16 nFormatId = pMgr->GetFormatId(TYP_SEQFLD, i);
239  m_xFormatBox->append(OUString::number(nFormatId), pMgr->GetFormatStr(TYP_SEQFLD, i));
240  if (nFormatId == nSelFormat)
241  m_xFormatBox->set_active(i);
242  }
243 
244  // aPosBox
245  if (eType == SelectionType::Graphic
246  || eType == SelectionType::Table
247  || eType == (SelectionType::Table | SelectionType::NumberList)
248  || eType == (SelectionType::Table | SelectionType::Text)
249  || eType == (SelectionType::Table | SelectionType::NumberList | SelectionType::Text)
250  || eType == SelectionType::DrawObject
251  || eType == (SelectionType::DrawObject | SelectionType::Ornament))
252  {
253  m_xPosBox->append_text(SwResId(STR_CAPTION_ABOVE));
254  m_xPosBox->append_text(SwResId(STR_CAPTION_BELOW));
255  }
256  else if(eType == SelectionType::Frame
257  || eType == SelectionType::Text)
258  {
259  m_xPosBox->append_text(SwResId(STR_CAPTION_BEGINNING));
260  m_xPosBox->append_text(SwResId(STR_CAPTION_END));
261  }
262 
263  if (eType & SelectionType::Table)
264  {
265  m_xPosBox->set_active(0);
266  }
267  else
268  {
269  m_xPosBox->set_active(1);
270  }
271 
272  ModifyHdl();
273 
274  m_xSepEdit->set_text(our_aSepTextSave);
275  m_xTextEdit->grab_focus();
276  DrawSample();
277 }
278 
280 {
281  InsCaptionOpt aOpt;
282  aOpt.UseCaption() = true;
283  OUString aName(m_xCategoryBox->get_active_text());
284  if ( aName == m_sNone )
285  {
286  aOpt.SetCategory( OUString() );
287  aOpt.SetNumSeparator( OUString() );
288  }
289  else
290  {
292  aOpt.SetNumSeparator(m_xNumberingSeparatorED->get_text());
293  }
294  aOpt.SetNumType(m_xFormatBox->get_active_id().toUInt32());
295  aOpt.SetSeparator(m_xSepEdit->get_sensitive() ? m_xSepEdit->get_text() : OUString());
296  aOpt.SetCaption(m_xTextEdit->get_text());
297  aOpt.SetPos(m_xPosBox->get_active());
298  aOpt.IgnoreSeqOpts() = true;
301  rView.InsertCaption( &aOpt );
302  our_aSepTextSave = m_xSepEdit->get_text();
303 }
304 
306 {
307  short nRet = SfxDialogController::run();
308  if (nRet == RET_OK)
309  Apply();
310  return nRet;
311 }
312 
314 {
315  OUString sFieldTypeName = m_xCategoryBox->get_active_text();
316  if(sFieldTypeName == m_sNone)
317  sFieldTypeName.clear();
318  SwSequenceOptionDialog aDlg(m_xDialog.get(), rView, sFieldTypeName);
319  aDlg.SetApplyBorderAndShadow(bCopyAttributes);
320  aDlg.SetCharacterStyle( sCharacterStyle );
321  aDlg.SetOrderNumberingFirst( bOrderNumberingFirst );
322  aDlg.run();
323  bCopyAttributes = aDlg.IsApplyBorderAndShadow();
324  sCharacterStyle = aDlg.GetCharacterStyle();
325  //#i61007# order of captions
326  if( bOrderNumberingFirst != aDlg.IsOrderNumberingFirst() )
327  {
328  bOrderNumberingFirst = aDlg.IsOrderNumberingFirst();
329  SW_MOD()->GetModuleConfig()->SetCaptionOrderNumberingFirst(bOrderNumberingFirst);
330  ApplyCaptionOrder();
331  }
332  DrawSample();
333 }
334 
336 {
337  DrawSample();
338 }
339 
341 {
342  SwWrtShell &rSh = rView.GetWrtShell();
343  OUString sFieldTypeName = m_xCategoryBox->get_active_text();
344  bool bCorrectFieldName = !sFieldTypeName.isEmpty();
345  bool bNone = sFieldTypeName == m_sNone;
346  SwFieldType* pType = (bCorrectFieldName && !bNone)
347  ? rSh.GetFieldType( SwFieldIds::SetExp, sFieldTypeName )
348  : nullptr;
349  m_xOKButton->set_sensitive( bCorrectFieldName &&
350  (!pType ||
351  static_cast<SwSetExpFieldType*>(pType)->GetType() == nsSwGetSetExpType::GSE_SEQ) );
352  m_xOptionButton->set_sensitive(m_xOKButton->get_sensitive() && !bNone);
353  m_xNumberingSeparatorFT->set_sensitive(bOrderNumberingFirst && !bNone);
354  m_xNumberingSeparatorED->set_sensitive(bOrderNumberingFirst && !bNone);
355  m_xFormatText->set_sensitive(!bNone);
356  m_xFormatBox->set_sensitive(!bNone);
357  m_xSepText->set_sensitive(!bNone);
358  m_xSepEdit->set_sensitive(!bNone);
359  DrawSample();
360 }
361 
363 {
364  ModifyHdl();
365 }
366 
368 {
369  ModifyHdl();
370 }
371 
373 {
374  SfxItemSet aSet(rView.GetDocShell()->GetDoc()->GetAttrPool());
375  SwCaptionOptDlg aDlg(m_xDialog.get(), aSet);
376  aDlg.run();
377 }
378 
380 {
381  OUString aStr;
382  OUString sCaption = m_xTextEdit->get_text();
383 
384  // number
385  OUString sFieldTypeName = m_xCategoryBox->get_active_text();
386  bool bNone = sFieldTypeName == m_sNone;
387  if( !bNone )
388  {
389  const sal_uInt16 nNumFormat = m_xFormatBox->get_active_id().toUInt32();
390  if (SVX_NUM_NUMBER_NONE != nNumFormat)
391  {
392  // category
393  //#i61007# order of captions
394  if( !bOrderNumberingFirst )
395  {
396  aStr = sFieldTypeName;
397  if ( !aStr.isEmpty() )
398  aStr += " ";
399  }
400 
401  SwWrtShell &rSh = rView.GetWrtShell();
402  SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(rSh.GetFieldType(
403  SwFieldIds::SetExp, sFieldTypeName ));
404  if( pFieldType && pFieldType->GetOutlineLvl() < MAXLEVEL )
405  {
406  SwNumberTree::tNumberVector aNumVector;
407  aNumVector.insert(aNumVector.end(), pFieldType->GetOutlineLvl() + 1, 1);
408 
409  OUString sNumber( rSh.GetOutlineNumRule()->
410  MakeNumString(aNumVector, false ));
411  if( !sNumber.isEmpty() )
412  aStr += sNumber + pFieldType->GetDelimiter();
413  }
414 
415  switch( nNumFormat )
416  {
417  case SVX_NUM_CHARS_UPPER_LETTER: aStr += "A"; break;
418  case SVX_NUM_CHARS_UPPER_LETTER_N: aStr += "A"; break;
419  case SVX_NUM_CHARS_LOWER_LETTER: aStr += "a"; break;
420  case SVX_NUM_CHARS_LOWER_LETTER_N: aStr += "a"; break;
421  case SVX_NUM_ROMAN_UPPER: aStr += "I"; break;
422  case SVX_NUM_ROMAN_LOWER: aStr += "i"; break;
423  default: aStr += "1"; break;
424  }
425  //#i61007# order of captions
427  {
428  aStr += m_xNumberingSeparatorED->get_text() + sFieldTypeName;
429  }
430 
431  }
432  if( !sCaption.isEmpty() )
433  {
434  aStr += m_xSepEdit->get_text();
435  }
436  }
437  aStr += sCaption;
438  // do preview!
440 }
441 
443 {
444 }
445 
446 SwSequenceOptionDialog::SwSequenceOptionDialog(weld::Window *pParent, SwView &rV, const OUString& rSeqFieldType )
447  : GenericDialogController(pParent, "modules/swriter/ui/captionoptions.ui", "CaptionOptionsDialog")
448  , m_rView(rV)
449  , m_aFieldTypeName(rSeqFieldType)
450  , m_xLbLevel(m_xBuilder->weld_combo_box("level"))
451  , m_xEdDelim(m_xBuilder->weld_entry("separator"))
452  , m_xLbCharStyle(m_xBuilder->weld_combo_box("style"))
453  , m_xApplyBorderAndShadowCB(m_xBuilder->weld_check_button("border_and_shadow"))
454  , m_xLbCaptionOrder(m_xBuilder->weld_combo_box("caption_order"))
455 {
456  SwWrtShell &rSh = m_rView.GetWrtShell();
457 
458  const OUString sNone(SwResId(SW_STR_NONE));
459 
460  m_xLbLevel->append_text(sNone);
461  for (sal_uInt16 n = 0; n < MAXLEVEL; ++n)
462  m_xLbLevel->append_text(OUString::number(n + 1));
463 
464  SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(rSh.GetFieldType(
466 
467  sal_Unicode nLvl = MAXLEVEL;
468  OUString sDelim(": ");
469  if( pFieldType )
470  {
471  sDelim = pFieldType->GetDelimiter();
472  nLvl = pFieldType->GetOutlineLvl();
473  }
474 
475  m_xLbLevel->set_active(nLvl < MAXLEVEL ? nLvl + 1 : 0);
476  m_xEdDelim->set_text(sDelim);
477 
478  m_xLbCharStyle->append_text(sNone);
480  m_xLbCharStyle->set_active(0);
481 }
482 
484 {
485  SwWrtShell &rSh = m_rView.GetWrtShell();
486  SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(rSh.GetFieldType(
488 
489  sal_Int8 nLvl = static_cast<sal_Int8>(m_xLbLevel->get_active() - 1);
490  sal_Unicode cDelim = m_xEdDelim->get_text()[0];
491 
492  bool bUpdate = true;
493  if( pFieldType )
494  {
495  pFieldType->SetDelimiter( OUString(cDelim) );
496  pFieldType->SetOutlineLvl( nLvl );
497  }
498  else if( !m_aFieldTypeName.isEmpty() && nLvl < MAXLEVEL )
499  {
500  // then we have to insert that
502  aFieldType.SetDelimiter( OUString(cDelim) );
503  aFieldType.SetOutlineLvl( nLvl );
504  rSh.InsertFieldType( aFieldType );
505  }
506  else
507  bUpdate = false;
508 
509  if( bUpdate )
510  rSh.UpdateExpFields();
511 }
512 
514 {
515  if (m_xLbCharStyle->get_active() != -1)
516  return m_xLbCharStyle->get_active_text();
517  return OUString();
518 }
519 
520 void SwSequenceOptionDialog::SetCharacterStyle(const OUString& rStyle)
521 {
522  const int nPos = m_xLbCharStyle->find_text(rStyle);
523  if (nPos == -1)
524  m_xLbCharStyle->set_active(0);
525  else
526  m_xLbCharStyle->set_active(nPos);
527 }
528 
529 // #i61007# order of captions
531 {
534 }
535 
536 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwFieldType * GetFieldType(size_t nField, SwFieldIds nResId=SwFieldIds::Unknown) const
get field types with a ResId, if 0 get all
Definition: edfld.cxx:68
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:233
void SetNumSeparator(const OUString &rSet)
Definition: caption.hxx:62
void SetDelimiter(const OUString &s)
Definition: expfld.hxx:179
SVX_NUM_CHARS_UPPER_LETTER_N
const OUString & GetOldGrfCat()
Definition: view2.cxx:2494
SwCaptionDialog(weld::Window *pParent, SwView &rV)
Definition: cption.cxx:106
std::unique_ptr< weld::Label > m_xNumberingSeparatorFT
Definition: cption.hxx:51
css::uno::Reference< css::container::XNameAccess > xNameAccess
Definition: cption.hxx:43
SW_DLLPUBLIC void FillCharStyleListBox(weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted=false, bool bWithDefault=false)
Definition: uitool.cxx:735
std::unique_ptr< weld::ComboBox > m_xLbCaptionOrder
Definition: cption.cxx:64
void SetSeparator(const OUString &rSep)
Definition: caption.hxx:74
signed char sal_Int8
virtual short run() override
Definition: cption.cxx:80
std::unique_ptr< weld::CheckButton > m_xApplyBorderAndShadowCB
Definition: cption.cxx:61
void SetOutlineLvl(sal_uInt8 n)
Definition: expfld.hxx:181
SVX_NUM_NUMBER_NONE
SVX_NUM_CHARS_UPPER_LETTER
bool & CopyAttributes()
Definition: caption.hxx:83
std::unique_ptr< weld::Button > m_xOptionButton
Definition: cption.hxx:59
IMPL_LINK(SwCaptionDialog, TextFilterHdl, OUString &, rTest, bool)
Definition: cption.cxx:100
void SetPos(const sal_uInt16 nP)
Definition: caption.hxx:68
const OUString & GetOldFrameCat()
Definition: view2.cxx:2514
OUString GetCharacterStyle() const
Definition: cption.cxx:513
SwSequenceOptionDialog(weld::Window *pParent, SwView &rV, const OUString &rSeqFieldType)
Definition: cption.cxx:446
void SetApplyBorderAndShadow(bool bSet)
Definition: cption.cxx:71
SwWrtShell & GetWrtShell() const
Definition: view.hxx:400
Used by the UI to modify the document model.
Definition: wrtsh.hxx:88
bool IsOrderNumberingFirst() const
Definition: cption.cxx:74
sal_uInt16 sal_Unicode
virtual OUString filter(const OUString &rText) override
Definition: cption.cxx:92
std::unique_ptr< weld::ComboBox > m_xLbCharStyle
Definition: cption.cxx:60
SVX_NUM_ARABIC
std::unique_ptr< weld::Entry > m_xNumberingSeparatorED
Definition: cption.hxx:52
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
SVX_NUM_ROMAN_UPPER
OUString const m_sNone
Definition: optload.hxx:48
SVX_NUM_ROMAN_LOWER
SwDoc * GetDoc() const
Definition: viewsh.hxx:284
OUString const m_aFieldTypeName
Definition: cption.cxx:55
void InsertCaption(const InsCaptionOpt *pOpt)
Definition: viewdlg2.cxx:180
OString strip(const OString &rIn, sal_Char c)
const sal_Unicode cDelim
css::uno::Reference< css::frame::XModel > GetBaseModel() const
const OUString & GetOldTabCat()
Definition: view2.cxx:2504
void SetCharacterStyle(const OUString &rStyle)
Definition: cption.cxx:520
const OUString & GetOldDrwCat()
Definition: view2.cxx:2524
OUString m_sLastGoodText
Definition: optload.hxx:47
std::unique_ptr< weld::ComboBox > m_xFormatBox
Definition: cption.hxx:49
void SetOrderNumberingFirst(bool bSet)
Definition: cption.cxx:75
void ModifyHdl()
Definition: cption.cxx:340
SVX_NUM_CHARS_LOWER_LETTER
#define SW_MOD()
Definition: swmodule.hxx:256
SwFieldType * InsertFieldType(const SwFieldType &)
insert field type
Definition: edfld.cxx:350
int i
void ApplyCaptionOrder()
Definition: cption.cxx:530
void SetNumType(const sal_uInt16 nNT)
Definition: caption.hxx:59
bool IsUsed(const SwModify &) const
Query if the paragraph-/character-/frame-/page-style is used.
Definition: edfmt.cxx:141
std::unique_ptr< weld::Entry > m_xSepEdit
Definition: cption.hxx:54
static OUString our_aSepTextSave
Definition: cption.hxx:75
Label drawing objects.
Definition: poolfmt.hxx:358
std::unique_ptr< weld::Entry > m_xTextEdit
Definition: cption.hxx:46
OUString SwResId(const char *pId)
Definition: swmodule.cxx:191
void Apply()
Definition: cption.cxx:279
std::unique_ptr< weld::ComboBox > m_xPosBox
Definition: cption.hxx:56
DocumentType const eType
std::unique_ptr< weld::Label > m_xFormatText
Definition: cption.hxx:48
const SwNumRule * GetOutlineNumRule() const
Definition: ednumber.cxx:120
sal_uInt8 GetOutlineLvl() const
Definition: expfld.hxx:180
SVX_NUM_CHARS_LOWER_LETTER_N
SwDocShell * GetDocShell()
Definition: view.cxx:1127
static SW_DLLPUBLIC bool IsValidVarName(const OUString &rStr, OUString *pValidName=nullptr)
Definition: calc.cxx:1364
std::vector< tSwNumTreeNumber > tNumberVector
SelectionType
Definition: wrtsh.hxx:58
void UpdateExpFields(bool bCloseDB=false)
only every expression fields update
Definition: edfld.cxx:326
virtual short run() override
Definition: cption.cxx:305
const SwGetSetExpType GSE_SEQ
Sequence.
Definition: fldbas.hxx:197
virtual OUString GetName() const
Only in derived classes.
Definition: fldbas.cxx:145
void SetCharacterStyle(const OUString &rStyle)
Definition: caption.hxx:77
bool bOrderNumberingFirst
Definition: cption.hxx:41
RET_OK
bool & IgnoreSeqOpts()
Definition: caption.hxx:80
std::unique_ptr< weld::Entry > m_xEdDelim
Definition: cption.cxx:58
std::unique_ptr< weld::Label > m_xSepText
Definition: cption.hxx:53
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
Label illustration.
Definition: poolfmt.hxx:346
SwView & rView
Definition: cption.hxx:36
OString const aName
void SetCaption(const OUString &rCap)
Definition: caption.hxx:65
void SetPreviewText(const OUString &rText)
Definition: optload.cxx:405
Reference< XModel > xModel
OUString const m_sNone
Definition: cption.hxx:34
std::unique_ptr< weld::ComboBox > m_xCategoryBox
Definition: cption.hxx:47
std::unique_ptr< SwFieldMgr > pMgr
Definition: cption.hxx:37
const OUString & GetDelimiter() const
Number sequence fields chapterwise if required.
Definition: expfld.hxx:178
bool bCopyAttributes
Definition: cption.hxx:40
std::unique_ptr< weld::Button > m_xOKButton
Definition: cption.hxx:57
void DrawSample()
Definition: cption.cxx:379
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1387
std::unique_ptr< weld::Button > m_xAutoCaptionButton
Definition: cption.hxx:58
bool & UseCaption()
Definition: caption.hxx:48
void SetCategory(const OUString &rCat)
Definition: caption.hxx:56
sal_Int32 nPos
SwFieldIds Which() const
Definition: fldbas.hxx:265
aStr
virtual ~SwCaptionDialog() override
Definition: cption.cxx:442
SwCaptionPreview m_aPreview
Definition: cption.hxx:45
IMPL_LINK_NOARG(SwCaptionDialog, OptionHdl, weld::Button &, void)
Definition: cption.cxx:313
bool IsApplyBorderAndShadow()
Definition: cption.cxx:70
Definition: view.hxx:146
OUString sCharacterStyle
Definition: cption.hxx:39
std::unique_ptr< weld::ComboBox > m_xLbLevel
Definition: cption.cxx:57