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