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