LibreOffice Module sw (master)  1
modcfg.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 <memory>
21 #include <hintids.hxx>
22 #include <comphelper/classids.hxx>
23 #include <o3tl/any.hxx>
24 #include <tools/stream.hxx>
25 #include <tools/fontenum.hxx>
26 #include <vcl/svapp.hxx>
27 #include <svx/svxids.hrc>
28 #include <editeng/svxenum.hxx>
29 #include <osl/diagnose.h>
30 
31 #include <tools/mapunit.hxx>
32 #include <tools/globname.hxx>
33 #include <swtypes.hxx>
34 #include <itabenum.hxx>
35 #include <modcfg.hxx>
36 #include <fldupde.hxx>
37 #include <caption.hxx>
38 
39 #include <unomid.h>
40 
41 using namespace com::sun::star::uno;
42 
43 #define GLOB_NAME_CALC 0
44 #define GLOB_NAME_IMPRESS 1
45 #define GLOB_NAME_DRAW 2
46 #define GLOB_NAME_MATH 3
47 #define GLOB_NAME_CHART 4
48 
50 {
51  for (auto const& it : m_InsCapOptArr)
52  {
53  InsCaptionOpt &rObj = *it;
54  if (rObj.GetObjType() == eType && (eType != OLE_CAP || (pOleId && rObj.GetOleId() == *pOleId)))
55  return &rObj;
56  }
57 
58  return nullptr;
59 }
60 
62 {
63  m_InsCapOptArr.push_back(std::unique_ptr<InsCaptionOpt>(pObj)); //takes ownership
64 }
65 
67  bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
68 {
69  if(bHTML)
70  {
71  OSL_FAIL("no caption option in sw/web!");
72  return nullptr;
73  }
74  else
75  {
76  if(eType == OLE_CAP && pOleId)
77  {
78  bool bFound = false;
79  for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
80  bFound = *pOleId == m_aInsertConfig.m_aGlobalNames[nId ];
81  if(!bFound)
82  return m_aInsertConfig.m_pOLEMiscOpt.get();
83  }
84  return m_aInsertConfig.m_pCapOptions->Find(eType, pOleId);
85  }
86 }
87 
88 bool SwModuleOptions::SetCapOption(bool bHTML, const InsCaptionOpt* pOpt)
89 {
90  bool bRet = false;
91 
92  if(bHTML)
93  {
94  OSL_FAIL("no caption option in sw/web!");
95  }
96  else if (pOpt)
97  {
98  if(pOpt->GetObjType() == OLE_CAP)
99  {
100  bool bFound = false;
101  for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++)
102  bFound = pOpt->GetOleId() == m_aInsertConfig.m_aGlobalNames[nId ];
103  if(!bFound)
104  {
105  if(m_aInsertConfig.m_pOLEMiscOpt)
106  *m_aInsertConfig.m_pOLEMiscOpt = *pOpt;
107  else
108  m_aInsertConfig.m_pOLEMiscOpt.reset(new InsCaptionOpt(*pOpt));
109  }
110  }
111 
112  InsCaptionOptArr& rArr = *m_aInsertConfig.m_pCapOptions;
113  InsCaptionOpt *pObj = rArr.Find(pOpt->GetObjType(), &pOpt->GetOleId());
114 
115  if (pObj)
116  {
117  *pObj = *pOpt;
118  }
119  else
120  rArr.Insert(new InsCaptionOpt(*pOpt));
121 
122  m_aInsertConfig.SetModified();
123  bRet = true;
124  }
125 
126  return bRet;
127 }
128 
130  m_aInsertConfig(false),
131  m_aWebInsertConfig(true),
132  m_aTableConfig(false),
133  m_aWebTableConfig(true),
134  m_bHideFieldTips(false)
135 {
136 }
137 
138 OUString SwModuleOptions::ConvertWordDelimiter(const OUString& rDelim, bool bFromUI)
139 {
140  OUStringBuffer sReturn;
141  const sal_Int32 nDelimLen = rDelim.getLength();
142  if(bFromUI)
143  {
144  for (sal_Int32 i = 0; i < nDelimLen; )
145  {
146  const sal_Unicode c = rDelim[i++];
147 
148  if (c == '\\' && i < nDelimLen )
149  {
150  switch (rDelim[i++])
151  {
152  case 'n': sReturn.append("\n"); break;
153  case 't': sReturn.append("\t"); break;
154  case '\\': sReturn.append("\\"); break;
155 
156  case 'x':
157  {
158  sal_Unicode nChar = 0;
159  bool bValidData = true;
160  for( sal_Int32 n = 0; n < 2 && i < nDelimLen; ++n, ++i )
161  {
162  sal_Unicode nVal = rDelim[i];
163  if( (nVal >= '0') && ( nVal <= '9') )
164  nVal -= '0';
165  else if( (nVal >= 'A') && (nVal <= 'F') )
166  nVal -= 'A' - 10;
167  else if( (nVal >= 'a') && (nVal <= 'f') )
168  nVal -= 'a' - 10;
169  else
170  {
171  OSL_FAIL("wrong hex value" );
172  bValidData = false;
173  break;
174  }
175 
176  nChar <<= 4;
177  nChar += nVal;
178  }
179  if( bValidData )
180  sReturn.append(nChar);
181  break;
182  }
183 
184  default: // Unknown, so insert backslash
185  sReturn.append("\\");
186  i--;
187  break;
188  }
189  }
190  else
191  sReturn.append(c);
192  }
193  }
194  else
195  {
196  for (sal_Int32 i = 0; i < nDelimLen; ++i)
197  {
198  const sal_Unicode c = rDelim[i];
199 
200  switch (c)
201  {
202  case '\n': sReturn.append("\\n"); break;
203  case '\t': sReturn.append("\\t"); break;
204  case '\\': sReturn.append("\\\\"); break;
205 
206  default:
207  if( c <= 0x1f || c >= 0x7f )
208  {
209  sReturn.append("\\x").append(OUString::number( c, 16 ));
210  }
211  else
212  {
213  sReturn.append(c);
214  }
215  }
216  }
217  }
218  return sReturn.makeStringAndClear();
219 }
220 
222 {
223  static Sequence<OUString> const aNames
224  {
225  "TextDisplay/Insert/Attribute", // 0
226  "TextDisplay/Insert/Color", // 1
227  "TextDisplay/Delete/Attribute", // 2
228  "TextDisplay/Delete/Color", // 3
229  "TextDisplay/ChangedAttribute/Attribute", // 4
230  "TextDisplay/ChangedAttribute/Color", // 5
231  "LinesChanged/Mark", // 6
232  "LinesChanged/Color" // 7
233  };
234  return aNames;
235 }
236 
238  ConfigItem("Office.Writer/Revision", ConfigItemMode::ReleaseTree)
239 {
240  m_aInsertAttr.m_nItemId = SID_ATTR_CHAR_UNDERLINE;
243  m_aDeletedAttr.m_nItemId = SID_ATTR_CHAR_STRIKEOUT;
244  // coverity[mixed_enums : FALSE] - unhelpfully warns different enum than LINESTYLE_SINGLE above
247  m_aFormatAttr.m_nItemId = SID_ATTR_CHAR_WEIGHT;
248  // coverity[mixed_enums : FALSE] - unhelpfully warns different enum than STRIKEOUT_SINGLE above
251  Load();
252 }
253 
255 {
256 }
257 
258 static sal_Int32 lcl_ConvertAttrToCfg(const AuthorCharAttr& rAttr)
259 {
260  sal_Int32 nRet = 0;
261  switch(rAttr.m_nItemId)
262  {
263  case SID_ATTR_CHAR_WEIGHT: nRet = 1; break;
264  case SID_ATTR_CHAR_POSTURE: nRet = 2; break;
265  case SID_ATTR_CHAR_UNDERLINE: nRet = LINESTYLE_SINGLE == rAttr.m_nAttr ? 3 : 4; break;
266  case SID_ATTR_CHAR_STRIKEOUT: nRet = 3; break;
267  case SID_ATTR_CHAR_CASEMAP:
268  {
269  switch(static_cast<SvxCaseMap>(rAttr.m_nAttr))
270  {
271  case SvxCaseMap::Uppercase : nRet = 5;break;
272  case SvxCaseMap::Lowercase : nRet = 6;break;
273  case SvxCaseMap::SmallCaps : nRet = 7;break;
274  case SvxCaseMap::Capitalize: nRet = 8;break;
275  default: break;
276  }
277  }
278  break;
279  case SID_ATTR_BRUSH : nRet = 9; break;
280  }
281  return nRet;
282 }
283 
284 void SwRevisionConfig::Notify( const css::uno::Sequence< OUString >& ) {}
285 
287 {
288  const Sequence<OUString>& aNames = GetPropertyNames();
289  Sequence<Any> aValues(aNames.getLength());
290  Any* pValues = aValues.getArray();
291 
292  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
293  {
294  switch(nProp)
295  {
296  case 0 : pValues[nProp] <<= lcl_ConvertAttrToCfg(m_aInsertAttr); break;
297  case 1 : pValues[nProp] <<= m_aInsertAttr.m_nColor; break;
298  case 2 : pValues[nProp] <<= lcl_ConvertAttrToCfg(m_aDeletedAttr); break;
299  case 3 : pValues[nProp] <<= m_aDeletedAttr.m_nColor; break;
300  case 4 : pValues[nProp] <<= lcl_ConvertAttrToCfg(m_aFormatAttr); break;
301  case 5 : pValues[nProp] <<= m_aFormatAttr.m_nColor; break;
302  case 6 : pValues[nProp] <<= m_nMarkAlign; break;
303  case 7 : pValues[nProp] <<= m_aMarkColor; break;
304  }
305  }
306  PutProperties(aNames, aValues);
307 }
308 
309 static void lcl_ConvertCfgToAttr(sal_Int32 nVal, AuthorCharAttr& rAttr, bool bDelete = false)
310 {
311  rAttr.m_nItemId = rAttr.m_nAttr = 0;
312  switch(nVal)
313  {
314  case 1: rAttr.m_nItemId = SID_ATTR_CHAR_WEIGHT; rAttr.m_nAttr = WEIGHT_BOLD ; break;
315  case 2: rAttr.m_nItemId = SID_ATTR_CHAR_POSTURE; rAttr.m_nAttr = ITALIC_NORMAL ; break;
316  case 3: if(bDelete)
317  {
318  rAttr.m_nItemId = SID_ATTR_CHAR_STRIKEOUT;
319  rAttr.m_nAttr = STRIKEOUT_SINGLE;
320  }
321  else
322  {
323  rAttr.m_nItemId = SID_ATTR_CHAR_UNDERLINE;
324  rAttr.m_nAttr = LINESTYLE_SINGLE;
325  }
326  break;
327  case 4: rAttr.m_nItemId = SID_ATTR_CHAR_UNDERLINE;rAttr.m_nAttr = LINESTYLE_DOUBLE ; break;
328  case 5: rAttr.m_nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.m_nAttr = sal_uInt16(SvxCaseMap::Uppercase); break;
329  case 6: rAttr.m_nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.m_nAttr = sal_uInt16(SvxCaseMap::Lowercase); break;
330  case 7: rAttr.m_nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.m_nAttr = sal_uInt16(SvxCaseMap::SmallCaps); break;
331  case 8: rAttr.m_nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.m_nAttr = sal_uInt16(SvxCaseMap::Capitalize); break;
332  case 9: rAttr.m_nItemId = SID_ATTR_BRUSH; break;
333  }
334 }
336 {
337  const Sequence<OUString>& aNames = GetPropertyNames();
338  Sequence<Any> aValues = GetProperties(aNames);
339  const Any* pValues = aValues.getConstArray();
340  assert(aValues.getLength() == aNames.getLength());
341  for (sal_Int32 nProp = 0; nProp < aNames.getLength(); ++nProp)
342  {
343  if (pValues[nProp].hasValue())
344  {
345  sal_Int32 nVal = 0;
346  pValues[nProp] >>= nVal;
347  switch (nProp)
348  {
349  case 0 : lcl_ConvertCfgToAttr(nVal, m_aInsertAttr); break;
350  case 1 : m_aInsertAttr.m_nColor = Color(nVal); break;
351  case 2 : lcl_ConvertCfgToAttr(nVal, m_aDeletedAttr, true); break;
352  case 3 : m_aDeletedAttr.m_nColor = Color(nVal); break;
353  case 4 : lcl_ConvertCfgToAttr(nVal, m_aFormatAttr); break;
354  case 5 : m_aFormatAttr.m_nColor = Color(nVal); break;
355  case 6 : m_nMarkAlign = sal::static_int_cast< sal_uInt16, sal_Int32>(nVal); break;
356  case 7 : m_aMarkColor = Color(nVal); break;
357  }
358  }
359  }
360 }
361 
363 {
367  INS_PROP_TABLE_SPLIT, // 3 from here not in writer/web
458 };
460 {
461  static Sequence<OUString> aNames
462  {
463  "Table/Header", // 0
464  "Table/RepeatHeader", // 1
465  "Table/Border", // 2
466  "Table/Split", // 3 from here not in writer/web
467  "Caption/Automatic", // 4
468  "Caption/CaptionOrderNumberingFirst", // 5
469  "Caption/WriterObject/Table/Enable", // 6
470  "Caption/WriterObject/Table/Settings/Category", // 7
471  "Caption/WriterObject/Table/Settings/Numbering", // 8
472  "Caption/WriterObject/Table/Settings/NumberingSeparator", // 9
473  "Caption/WriterObject/Table/Settings/CaptionText", //10
474  "Caption/WriterObject/Table/Settings/Delimiter", //11
475  "Caption/WriterObject/Table/Settings/Level", //12
476  "Caption/WriterObject/Table/Settings/Position", //13
477  "Caption/WriterObject/Table/Settings/CharacterStyle", //14
478  "Caption/WriterObject/Frame/Enable", //15
479  "Caption/WriterObject/Frame/Settings/Category", //16
480  "Caption/WriterObject/Frame/Settings/Numbering", //17
481  "Caption/WriterObject/Frame/Settings/NumberingSeparator", //18
482  "Caption/WriterObject/Frame/Settings/CaptionText", //19
483  "Caption/WriterObject/Frame/Settings/Delimiter", //20
484  "Caption/WriterObject/Frame/Settings/Level", //21
485  "Caption/WriterObject/Frame/Settings/Position", //22
486  "Caption/WriterObject/Frame/Settings/CharacterStyle", //23
487  "Caption/WriterObject/Graphic/Enable", //24
488  "Caption/WriterObject/Graphic/Settings/Category", //25
489  "Caption/WriterObject/Graphic/Settings/Numbering", //26
490  "Caption/WriterObject/Graphic/Settings/NumberingSeparator", //27
491  "Caption/WriterObject/Graphic/Settings/CaptionText", //28
492  "Caption/WriterObject/Graphic/Settings/Delimiter", //29
493  "Caption/WriterObject/Graphic/Settings/Level", //30
494  "Caption/WriterObject/Graphic/Settings/Position", //31
495  "Caption/WriterObject/Graphic/Settings/CharacterStyle", //32
496  "Caption/WriterObject/Graphic/Settings/ApplyAttributes", //33
497  "Caption/OfficeObject/Calc/Enable", //34
498  "Caption/OfficeObject/Calc/Settings/Category", //35
499  "Caption/OfficeObject/Calc/Settings/Numbering", //36
500  "Caption/OfficeObject/Calc/Settings/NumberingSeparator", //37
501  "Caption/OfficeObject/Calc/Settings/CaptionText", //38
502  "Caption/OfficeObject/Calc/Settings/Delimiter", //39
503  "Caption/OfficeObject/Calc/Settings/Level", //40
504  "Caption/OfficeObject/Calc/Settings/Position", //41
505  "Caption/OfficeObject/Calc/Settings/CharacterStyle", //42
506  "Caption/OfficeObject/Calc/Settings/ApplyAttributes", //43
507  "Caption/OfficeObject/Impress/Enable", //44
508  "Caption/OfficeObject/Impress/Settings/Category", //45
509  "Caption/OfficeObject/Impress/Settings/Numbering", //46
510  "Caption/OfficeObject/Impress/Settings/NumberingSeparator", //47
511  "Caption/OfficeObject/Impress/Settings/CaptionText", //48
512  "Caption/OfficeObject/Impress/Settings/Delimiter", //49
513  "Caption/OfficeObject/Impress/Settings/Level", //50
514  "Caption/OfficeObject/Impress/Settings/Position", //51
515  "Caption/OfficeObject/Impress/Settings/CharacterStyle", //52
516  "Caption/OfficeObject/Impress/Settings/ApplyAttributes", //53
517  "Caption/OfficeObject/Chart/Enable", //54
518  "Caption/OfficeObject/Chart/Settings/Category", //55
519  "Caption/OfficeObject/Chart/Settings/Numbering", //56
520  "Caption/OfficeObject/Chart/Settings/NumberingSeparator", //57
521  "Caption/OfficeObject/Chart/Settings/CaptionText", //58
522  "Caption/OfficeObject/Chart/Settings/Delimiter", //59
523  "Caption/OfficeObject/Chart/Settings/Level", //60
524  "Caption/OfficeObject/Chart/Settings/Position", //61
525  "Caption/OfficeObject/Chart/Settings/CharacterStyle", //62
526  "Caption/OfficeObject/Chart/Settings/ApplyAttributes", //63
527  "Caption/OfficeObject/Formula/Enable", //64
528  "Caption/OfficeObject/Formula/Settings/Category", //65
529  "Caption/OfficeObject/Formula/Settings/Numbering", //66
530  "Caption/OfficeObject/Formula/Settings/NumberingSeparator", //67
531  "Caption/OfficeObject/Formula/Settings/CaptionText", //68
532  "Caption/OfficeObject/Formula/Settings/Delimiter", //69
533  "Caption/OfficeObject/Formula/Settings/Level", //70
534  "Caption/OfficeObject/Formula/Settings/Position", //71
535  "Caption/OfficeObject/Formula/Settings/CharacterStyle", //72
536  "Caption/OfficeObject/Formula/Settings/ApplyAttributes", //73
537  "Caption/OfficeObject/Draw/Enable", //74
538  "Caption/OfficeObject/Draw/Settings/Category", //75
539  "Caption/OfficeObject/Draw/Settings/Numbering", //76
540  "Caption/OfficeObject/Draw/Settings/NumberingSeparator", //77
541  "Caption/OfficeObject/Draw/Settings/CaptionText", //78
542  "Caption/OfficeObject/Draw/Settings/Delimiter", //79
543  "Caption/OfficeObject/Draw/Settings/Level", //80
544  "Caption/OfficeObject/Draw/Settings/Position", //81
545  "Caption/OfficeObject/Draw/Settings/CharacterStyle", //82
546  "Caption/OfficeObject/Draw/Settings/ApplyAttributes", //83
547  "Caption/OfficeObject/OLEMisc/Enable", //84
548  "Caption/OfficeObject/OLEMisc/Settings/Category", //85
549  "Caption/OfficeObject/OLEMisc/Settings/Numbering", //86
550  "Caption/OfficeObject/OLEMisc/Settings/NumberingSeparator", //87
551  "Caption/OfficeObject/OLEMisc/Settings/CaptionText", //88
552  "Caption/OfficeObject/OLEMisc/Settings/Delimiter", //89
553  "Caption/OfficeObject/OLEMisc/Settings/Level", //90
554  "Caption/OfficeObject/OLEMisc/Settings/Position", //91
555  "Caption/OfficeObject/OLEMisc/Settings/CharacterStyle", //92
556  "Caption/OfficeObject/OLEMisc/Settings/ApplyAttributes" //93
557  };
558  static Sequence<OUString> const aWebNames(aNames.getArray(), INS_PROP_TABLE_BORDER + 1);
559  return m_bIsWeb ? aWebNames : aNames;
560 }
561 
563  ConfigItem(bWeb ? OUString("Office.WriterWeb/Insert") : OUString("Office.Writer/Insert"),
565  m_bInsWithCaption( false ),
566  m_bCaptionOrderNumberingFirst( false ),
567  m_aInsTableOpts(SwInsertTableFlags::NONE,0),
568  m_bIsWeb(bWeb)
569 {
575  if(!m_bIsWeb)
576  m_pCapOptions.reset(new InsCaptionOptArr);
577 
578  Load();
579 }
580 
582 {
583  m_pCapOptions.reset();
584  m_pOLEMiscOpt.reset();
585 }
586 
587 static void lcl_WriteOpt(const InsCaptionOpt& rOpt, Any* pValues, sal_Int32 nProp, sal_Int32 nOffset)
588 {
589  switch(nOffset)
590  {
591  case 0: pValues[nProp] <<= rOpt.UseCaption(); break;//Enable
592  case 1: pValues[nProp] <<= rOpt.GetCategory(); break;//Category
593  case 2: pValues[nProp] <<= static_cast<sal_Int32>(rOpt.GetNumType()); break;//Numbering",
594  case 3: pValues[nProp] <<= rOpt.GetNumSeparator(); break;//NumberingSeparator",
595  case 4: pValues[nProp] <<= rOpt.GetCaption(); break;//CaptionText",
596  case 5: pValues[nProp] <<= rOpt.GetSeparator();break;//Delimiter",
597  case 6: pValues[nProp] <<= static_cast<sal_Int32>(rOpt.GetLevel()); break;//Level",
598  case 7: pValues[nProp] <<= static_cast<sal_Int32>(rOpt.GetPos()); break;//Position",
599  case 8: pValues[nProp] <<= rOpt.GetCharacterStyle(); break; //CharacterStyle
600  case 9: pValues[nProp] <<= rOpt.CopyAttributes(); break; //ApplyAttributes
601  }
602 }
603 
604 void SwInsertConfig::Notify( const css::uno::Sequence< OUString >& ) {}
605 
607 {
608  const Sequence<OUString>& aNames = GetPropertyNames();
609  Sequence<Any> aValues(aNames.getLength());
610  Any* pValues = aValues.getArray();
611 
612  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
613  {
614  const InsCaptionOpt* pWriterTableOpt = nullptr;
615  const InsCaptionOpt* pWriterFrameOpt = nullptr;
616  const InsCaptionOpt* pWriterGraphicOpt = nullptr;
617  const InsCaptionOpt* pOLECalcOpt = nullptr;
618  const InsCaptionOpt* pOLEImpressOpt = nullptr;
619  const InsCaptionOpt* pOLEChartOpt = nullptr;
620  const InsCaptionOpt* pOLEFormulaOpt = nullptr;
621  const InsCaptionOpt* pOLEDrawOpt = nullptr;
622  if(m_pCapOptions)
623  {
624  pWriterTableOpt = m_pCapOptions->Find(TABLE_CAP);
625  pWriterFrameOpt = m_pCapOptions->Find(FRAME_CAP);
626  pWriterGraphicOpt = m_pCapOptions->Find(GRAPHIC_CAP);
627  pOLECalcOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_CALC]);
628  pOLEImpressOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_IMPRESS]);
629  pOLEDrawOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_DRAW ]);
630  pOLEFormulaOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_MATH ]);
631  pOLEChartOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_CHART ]);
632  }
633  switch(nProp)
634  {
636  pValues[nProp] <<= bool(m_aInsTableOpts.mnInsMode & SwInsertTableFlags::Headline);
637  break;//"Table/Header",
639  pValues[nProp] <<= m_aInsTableOpts.mnRowsToRepeat > 0;
640  break;//"Table/RepeatHeader",
643  break;//"Table/Border",
645  pValues[nProp] <<= bool(m_aInsTableOpts.mnInsMode & SwInsertTableFlags::SplitLayout);
646  break;//"Table/Split",
648  pValues[nProp] <<= m_bInsWithCaption;
649  break;//"Caption/Automatic",
651  pValues[nProp] <<= m_bCaptionOrderNumberingFirst;
652  break;//"Caption/CaptionOrderNumberingFirst"
653 
663  if(pWriterTableOpt)
664  lcl_WriteOpt(*pWriterTableOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_TABLE_ENABLE);
665  break;
675  if(pWriterFrameOpt)
676  lcl_WriteOpt(*pWriterFrameOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FRAME_ENABLE);
677  break;
688  if(pWriterGraphicOpt)
689  lcl_WriteOpt(*pWriterGraphicOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE);
690  break;
701  if(pOLECalcOpt)
702  lcl_WriteOpt(*pOLECalcOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_CALC_ENABLE);
703  break;
714  if(pOLEImpressOpt)
715  lcl_WriteOpt(*pOLEImpressOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_IMPRESS_ENABLE);
716  break;
727  if(pOLEChartOpt)
728  lcl_WriteOpt(*pOLEChartOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_CHART_ENABLE);
729  break;
740  if(pOLEFormulaOpt)
741  lcl_WriteOpt(*pOLEFormulaOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FORMULA_ENABLE);
742  break;
753  if(pOLEDrawOpt)
754  lcl_WriteOpt(*pOLEDrawOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_DRAW_ENABLE);
755  break;
766  if(m_pOLEMiscOpt)
768  break;
769 
770  }
771  }
772  PutProperties(aNames, aValues);
773 }
774 
775 static void lcl_ReadOpt(InsCaptionOpt& rOpt, const Any* pValues, sal_Int32 nProp, sal_Int32 nOffset)
776 {
777  switch(nOffset)
778  {
779  case 0:
780  rOpt.UseCaption() = *o3tl::doAccess<bool>(pValues[nProp]);
781  break;//Enable
782  case 1:
783  {
784  OUString sTemp; pValues[nProp] >>= sTemp;
785  rOpt.SetCategory(sTemp);
786  }
787  break;//Category
788  case 2:
789  {
790  sal_Int32 nTemp = 0;
791  pValues[nProp] >>= nTemp;
792  rOpt.SetNumType(sal::static_int_cast< sal_uInt16, sal_Int32>(nTemp));
793  }
794  break;//Numbering",
795  case 3:
796  {
797  OUString sTemp; pValues[nProp] >>= sTemp;
798  rOpt.SetNumSeparator(sTemp);
799  }
800  break;//NumberingSeparator",
801  case 4:
802  {
803  OUString sTemp; pValues[nProp] >>= sTemp;
804  rOpt.SetCaption(sTemp);
805  }
806  break;//CaptionText",
807  case 5:
808  {
809  OUString sTemp;
810  if(pValues[nProp] >>= sTemp)
811  rOpt.SetSeparator(sTemp);
812  }
813  break;//Delimiter",
814  case 6:
815  {
816  sal_Int32 nTemp = 0;
817  pValues[nProp] >>= nTemp;
818  rOpt.SetLevel(sal::static_int_cast< sal_uInt16, sal_Int32>(nTemp));
819  }
820  break;//Level",
821  case 7:
822  {
823  sal_Int32 nTemp = 0;
824  pValues[nProp] >>= nTemp;
825  rOpt.SetPos(sal::static_int_cast< sal_uInt16, sal_Int32>(nTemp));
826  }
827  break;//Position",
828  case 8 : //CharacterStyle
829  {
830  OUString sTemp; pValues[nProp] >>= sTemp;
831  rOpt.SetCharacterStyle( sTemp );
832  }
833  break;
834  case 9 : //ApplyAttributes
835  {
836  pValues[nProp] >>= rOpt.CopyAttributes();
837  }
838  break;
839  }
840 }
841 
843 {
844  const Sequence<OUString>& aNames = GetPropertyNames();
845  Sequence<Any> aValues = GetProperties(aNames);
846  const Any* pValues = aValues.getConstArray();
847  assert(aValues.getLength() == aNames.getLength());
848  InsCaptionOpt* pWriterTableOpt = nullptr;
849  InsCaptionOpt* pWriterFrameOpt = nullptr;
850  InsCaptionOpt* pWriterGraphicOpt = nullptr;
851  InsCaptionOpt* pOLECalcOpt = nullptr;
852  InsCaptionOpt* pOLEImpressOpt = nullptr;
853  InsCaptionOpt* pOLEChartOpt = nullptr;
854  InsCaptionOpt* pOLEFormulaOpt = nullptr;
855  InsCaptionOpt* pOLEDrawOpt = nullptr;
856  if (m_pCapOptions)
857  {
858  pWriterTableOpt = m_pCapOptions->Find(TABLE_CAP);
859  pWriterFrameOpt = m_pCapOptions->Find(FRAME_CAP);
860  pWriterGraphicOpt = m_pCapOptions->Find(GRAPHIC_CAP);
861  pOLECalcOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_CALC]);
862  pOLEImpressOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_IMPRESS]);
863  pOLEDrawOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_DRAW ]);
864  pOLEFormulaOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_MATH ]);
865  pOLEChartOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_CHART ]);
866  }
867  else if (!m_bIsWeb)
868  return;
869 
871  for (sal_Int32 nProp = 0; nProp < aNames.getLength(); ++nProp)
872  {
873  if (pValues[nProp].hasValue())
874  {
875  bool bBool = nProp < INS_PROP_CAP_OBJECT_TABLE_ENABLE && *o3tl::doAccess<bool>(pValues[nProp]);
876  switch (nProp)
877  {
879  {
880  if(bBool)
881  nInsTableFlags |= SwInsertTableFlags::Headline;
882  }
883  break;//"Table/Header",
885  {
886  m_aInsTableOpts.mnRowsToRepeat = bBool? 1 : 0;
887 
888  }
889  break;//"Table/RepeatHeader",
891  {
892  if(bBool)
893  nInsTableFlags |= SwInsertTableFlags::DefaultBorder;
894  }
895  break;//"Table/Border",
897  {
898  if(bBool)
899  nInsTableFlags |= SwInsertTableFlags::SplitLayout;
900  }
901  break;//"Table/Split",
903  m_bInsWithCaption = bBool;
904  break;
915  if(!pWriterTableOpt)
916  {
917  pWriterTableOpt = new InsCaptionOpt(TABLE_CAP);
918  m_pCapOptions->Insert(pWriterTableOpt);
919  }
920  lcl_ReadOpt(*pWriterTableOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_TABLE_ENABLE);
921  break;
931  if(!pWriterFrameOpt)
932  {
933  pWriterFrameOpt = new InsCaptionOpt(FRAME_CAP);
934  m_pCapOptions->Insert(pWriterFrameOpt);
935  }
936  lcl_ReadOpt(*pWriterFrameOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FRAME_ENABLE);
937  break;
948  if(!pWriterGraphicOpt)
949  {
950  pWriterGraphicOpt = new InsCaptionOpt(GRAPHIC_CAP);
951  m_pCapOptions->Insert(pWriterGraphicOpt);
952  }
953  lcl_ReadOpt(*pWriterGraphicOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE);
954  break;
965  if(!pOLECalcOpt)
966  {
967  pOLECalcOpt = new InsCaptionOpt(OLE_CAP, &m_aGlobalNames[GLOB_NAME_CALC]);
968  m_pCapOptions->Insert(pOLECalcOpt);
969  }
970  lcl_ReadOpt(*pOLECalcOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_CALC_ENABLE);
971  break;
982  if(!pOLEImpressOpt)
983  {
984  pOLEImpressOpt = new InsCaptionOpt(OLE_CAP, &m_aGlobalNames[GLOB_NAME_IMPRESS]);
985  m_pCapOptions->Insert(pOLEImpressOpt);
986  }
987  lcl_ReadOpt(*pOLEImpressOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_IMPRESS_ENABLE);
988  break;
999  if(!pOLEChartOpt)
1000  {
1001  pOLEChartOpt = new InsCaptionOpt(OLE_CAP, &m_aGlobalNames[GLOB_NAME_CHART]);
1002  m_pCapOptions->Insert(pOLEChartOpt);
1003  }
1004  lcl_ReadOpt(*pOLEChartOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_CHART_ENABLE);
1005  break;
1016  if(!pOLEFormulaOpt)
1017  {
1018  pOLEFormulaOpt = new InsCaptionOpt(OLE_CAP, &m_aGlobalNames[GLOB_NAME_MATH]);
1019  m_pCapOptions->Insert(pOLEFormulaOpt);
1020  }
1021  lcl_ReadOpt(*pOLEFormulaOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FORMULA_ENABLE);
1022  break;
1033  if(!pOLEDrawOpt)
1034  {
1035  pOLEDrawOpt = new InsCaptionOpt(OLE_CAP, &m_aGlobalNames[GLOB_NAME_DRAW]);
1036  m_pCapOptions->Insert(pOLEDrawOpt);
1037  }
1038  lcl_ReadOpt(*pOLEDrawOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_DRAW_ENABLE);
1039  break;
1050  if(!m_pOLEMiscOpt)
1051  {
1052  m_pOLEMiscOpt.reset(new InsCaptionOpt(OLE_CAP));
1053  }
1055  break;
1056  }
1057  }
1058  else if (nProp == INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST)
1059  {
1061  }
1062 
1063  }
1064  m_aInsTableOpts.mnInsMode = nInsTableFlags;
1065 }
1066 
1068 {
1069  static Sequence<OUString> const aNames
1070  {
1071  "Shift/Row", // 0
1072  "Shift/Column", // 1
1073  "Insert/Row", // 2
1074  "Insert/Column", // 3
1075  "Change/Effect", // 4
1076  "Input/NumberRecognition", // 5
1077  "Input/NumberFormatRecognition",// 6
1078  "Input/Alignment", // 7
1079  "Input/SplitVerticalByDefault" // 8
1080  };
1081  return aNames;
1082 }
1083 
1085  : ConfigItem(bWeb ? OUString("Office.WriterWeb/Table") : OUString("Office.Writer/Table"),
1087  , m_nTableHMove(0)
1088  , m_nTableVMove(0)
1089  , m_nTableHInsert(0)
1090  , m_nTableVInsert(0)
1091  , m_eTableChgMode(TableChgMode::FixedWidthChangeAbs)
1092  , m_bInsTableFormatNum(false)
1093  , m_bInsTableChangeNumFormat(false)
1094  , m_bInsTableAlignNum(false)
1095  , m_bSplitVerticalByDefault(false)
1096 {
1097  Load();
1098 }
1099 
1101 {
1102 }
1103 
1104 void SwTableConfig::Notify( const css::uno::Sequence< OUString >& ) {}
1105 
1107 {
1108  const Sequence<OUString>& aNames = GetPropertyNames();
1109  Sequence<Any> aValues(aNames.getLength());
1110  Any* pValues = aValues.getArray();
1111 
1112  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
1113  {
1114  switch(nProp)
1115  {
1116  case 0 : pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(m_nTableHMove)); break; //"Shift/Row",
1117  case 1 : pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(m_nTableVMove)); break; //"Shift/Column",
1118  case 2 : pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(m_nTableHInsert)); break; //"Insert/Row",
1119  case 3 : pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(m_nTableVInsert)); break; //"Insert/Column",
1120  case 4 : pValues[nProp] <<= static_cast<sal_Int32>(m_eTableChgMode); break; //"Change/Effect",
1121  case 5 : pValues[nProp] <<= m_bInsTableFormatNum; break; //"Input/NumberRecognition",
1122  case 6 : pValues[nProp] <<= m_bInsTableChangeNumFormat; break; //"Input/NumberFormatRecognition",
1123  case 7 : pValues[nProp] <<= m_bInsTableAlignNum; break; //"Input/Alignment"
1124  case 8 : pValues[nProp] <<= m_bSplitVerticalByDefault; break; //"Input/SplitVerticalByDefault"
1125  }
1126  }
1127  PutProperties(aNames, aValues);
1128 }
1129 
1131 {
1132  const Sequence<OUString>& aNames = GetPropertyNames();
1133  Sequence<Any> aValues = GetProperties(aNames);
1134  const Any* pValues = aValues.getConstArray();
1135  assert(aValues.getLength() == aNames.getLength());
1136  for (sal_Int32 nProp = 0; nProp < aNames.getLength(); ++nProp)
1137  {
1138  if (pValues[nProp].hasValue())
1139  {
1140  sal_Int32 nTemp = 0;
1141  switch (nProp)
1142  {
1143  case 0 : pValues[nProp] >>= nTemp; m_nTableHMove = static_cast<sal_uInt16>(convertMm100ToTwip(nTemp)); break; //"Shift/Row",
1144  case 1 : pValues[nProp] >>= nTemp; m_nTableVMove = static_cast<sal_uInt16>(convertMm100ToTwip(nTemp)); break; //"Shift/Column",
1145  case 2 : pValues[nProp] >>= nTemp; m_nTableHInsert = static_cast<sal_uInt16>(convertMm100ToTwip(nTemp)); break; //"Insert/Row",
1146  case 3 : pValues[nProp] >>= nTemp; m_nTableVInsert = static_cast<sal_uInt16>(convertMm100ToTwip(nTemp)); break; //"Insert/Column",
1147  case 4 : pValues[nProp] >>= nTemp; m_eTableChgMode = static_cast<TableChgMode>(nTemp); break; //"Change/Effect",
1148  case 5 : m_bInsTableFormatNum = *o3tl::doAccess<bool>(pValues[nProp]); break; //"Input/NumberRecognition",
1149  case 6 : m_bInsTableChangeNumFormat = *o3tl::doAccess<bool>(pValues[nProp]); break; //"Input/NumberFormatRecognition",
1150  case 7 : m_bInsTableAlignNum = *o3tl::doAccess<bool>(pValues[nProp]); break; //"Input/Alignment"
1151  case 8 : m_bSplitVerticalByDefault = *o3tl::doAccess<bool>(pValues[nProp]); break; //"Input/SplitVerticalByDefault"
1152  }
1153  }
1154  }
1155 }
1156 
1158  ConfigItem("Office.Writer", ConfigItemMode::ReleaseTree),
1159  m_bDefaultFontsInCurrDocOnly(false),
1160  m_bShowIndexPreview(false),
1161  m_bGrfToGalleryAsLnk(true),
1162  m_bNumAlignSize(true),
1163  m_bSinglePrintJob(false),
1164  m_bIsNameFromColumn(true),
1165  m_bAskForMailMergeInPrint(true),
1166  m_nMailingFormats(MailTextFormats::NONE)
1167 {
1168  Load();
1169 }
1170 
1172 {
1173 }
1174 
1176 {
1177  static Sequence<OUString> const aNames
1178  {
1179  "Statistics/WordNumber/Delimiter", // 0
1180  "DefaultFont/Document", // 1
1181  "Index/ShowPreview", // 2
1182  "Misc/GraphicToGalleryAsLink", // 3
1183  "Numbering/Graphic/KeepRatio", // 4
1184  "FormLetter/PrintOutput/SinglePrintJobs", // 5
1185  "FormLetter/MailingOutput/Format", // 6
1186  "FormLetter/FileOutput/FileName/FromDatabaseField", // 7
1187  "FormLetter/FileOutput/Path", // 8
1188  "FormLetter/FileOutput/FileName/FromManualSetting", // 9
1189  "FormLetter/FileOutput/FileName/Generation",//10
1190  "FormLetter/PrintOutput/AskForMerge" //11
1191  };
1192  return aNames;
1193 }
1194 
1195 void SwMiscConfig::Notify( const css::uno::Sequence< OUString >& ) {}
1196 
1198 {
1199  const Sequence<OUString>& aNames = GetPropertyNames();
1200  Sequence<Any> aValues(aNames.getLength());
1201  Any* pValues = aValues.getArray();
1202 
1203  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
1204  {
1205  switch(nProp)
1206  {
1207  case 0 :
1208  pValues[nProp] <<=
1210  break;
1211  case 1 : pValues[nProp] <<= m_bDefaultFontsInCurrDocOnly; break;
1212  case 2 : pValues[nProp] <<= m_bShowIndexPreview; break;
1213  case 3 : pValues[nProp] <<= m_bGrfToGalleryAsLnk; break;
1214  case 4 : pValues[nProp] <<= m_bNumAlignSize; break;
1215  case 5 : pValues[nProp] <<= m_bSinglePrintJob; break;
1216  case 6 : pValues[nProp] <<= static_cast<sal_Int32>(m_nMailingFormats); break;
1217  case 7 : pValues[nProp] <<= m_sNameFromColumn; break;
1218  case 8 : pValues[nProp] <<= m_sMailingPath; break;
1219  case 9 : pValues[nProp] <<= m_sMailName; break;
1220  case 10: pValues[nProp] <<= m_bIsNameFromColumn; break;
1221  case 11: pValues[nProp] <<= m_bAskForMailMergeInPrint; break;
1222  }
1223  }
1224  PutProperties(aNames, aValues);
1225 }
1226 
1228 {
1229  const Sequence<OUString>& aNames = GetPropertyNames();
1230  Sequence<Any> aValues = GetProperties(aNames);
1231  const Any* pValues = aValues.getConstArray();
1232  assert(aValues.getLength() == aNames.getLength());
1233  OUString sTmp;
1234  for (sal_Int32 nProp = 0; nProp < aNames.getLength(); ++nProp)
1235  {
1236  if (pValues[nProp].hasValue())
1237  {
1238  switch (nProp)
1239  {
1240  case 0 : pValues[nProp] >>= sTmp;
1242  break;
1243  case 1 : m_bDefaultFontsInCurrDocOnly = *o3tl::doAccess<bool>(pValues[nProp]); break;
1244  case 2 : m_bShowIndexPreview = *o3tl::doAccess<bool>(pValues[nProp]); break;
1245  case 3 : m_bGrfToGalleryAsLnk = *o3tl::doAccess<bool>(pValues[nProp]); break;
1246  case 4 : m_bNumAlignSize = *o3tl::doAccess<bool>(pValues[nProp]); break;
1247  case 5 : m_bSinglePrintJob = *o3tl::doAccess<bool>(pValues[nProp]); break;
1248  case 6 : m_nMailingFormats = static_cast<MailTextFormats>(*o3tl::doAccess<sal_Int32>(pValues[nProp])); break;
1249  case 7 : pValues[nProp] >>= sTmp; m_sNameFromColumn = sTmp; break;
1250  case 8 : pValues[nProp] >>= sTmp; m_sMailingPath = sTmp; break;
1251  case 9 : pValues[nProp] >>= sTmp; m_sMailName = sTmp; break;
1252  case 10: m_bIsNameFromColumn = *o3tl::doAccess<bool>(pValues[nProp]); break;
1253  case 11: pValues[nProp] >>= m_bAskForMailMergeInPrint; break;
1254  }
1255  }
1256  }
1257 }
1258 
1260 {
1261  static Sequence<OUString> const aNames
1262  {
1263  "Mode", // 0
1264  "UseRSID", // 1
1265  "IgnorePieces", // 2
1266  "IgnoreLength", // 3
1267  "StoreRSID" // 4
1268  };
1269  return aNames;
1270 }
1271 
1273  ConfigItem("Office.Writer/Comparison", ConfigItemMode::ReleaseTree)
1274  ,m_bStoreRsid(true)
1275 {
1277  m_bUseRsid = false;
1278  m_bIgnorePieces = false;
1279  m_nPieceLen = 1;
1280 
1281  Load();
1282 }
1283 
1285 {
1286 }
1287 
1289 {
1290  const Sequence<OUString>& aNames = GetPropertyNames();
1291  Sequence<Any> aValues(aNames.getLength());
1292  Any* pValues = aValues.getArray();
1293 
1294  pValues[0] <<= static_cast<sal_Int16>(m_eCmpMode);
1295  pValues[1] <<= m_bUseRsid;
1296  pValues[2] <<= m_bIgnorePieces;
1297  pValues[3] <<= static_cast<sal_Int16>(m_nPieceLen);
1298  pValues[4] <<= m_bStoreRsid;
1299 
1300  PutProperties(aNames, aValues);
1301 }
1302 
1304 {
1305  const Sequence<OUString>& aNames = GetPropertyNames();
1306  Sequence<Any> aValues = GetProperties(aNames);
1307  const Any* pValues = aValues.getConstArray();
1308  assert(aValues.getLength() == aNames.getLength());
1309  for (sal_Int32 nProp = 0; nProp < aNames.getLength(); nProp++)
1310  {
1311  if (pValues[nProp].hasValue())
1312  {
1313  sal_Int32 nVal = 0;
1314  pValues[nProp] >>= nVal;
1315 
1316  switch(nProp)
1317  {
1318  case 0 : m_eCmpMode = static_cast<SwCompareMode>(nVal); break;
1319  case 1 : m_bUseRsid = *o3tl::doAccess<bool>(pValues[nProp]); break;
1320  case 2 : m_bIgnorePieces = *o3tl::doAccess<bool>(pValues[nProp]); break;
1321  case 3 : m_nPieceLen = nVal; break;
1322  case 4 : m_bStoreRsid = *o3tl::doAccess<bool>(pValues[nProp]); break;
1323  }
1324  }
1325  }
1326 }
1327 
1328 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetNumSeparator(const OUString &rSet)
Definition: caption.hxx:62
bool m_bNumAlignSize
Definition: modcfg.hxx:182
const OUString & GetCategory() const
Definition: caption.hxx:55
bool m_bInsTableChangeNumFormat
Definition: modcfg.hxx:157
std::unique_ptr< InsCaptionOptArr > m_pCapOptions
Definition: modcfg.hxx:122
const OUString & GetCharacterStyle() const
Definition: caption.hxx:76
constexpr::Color COL_BLACK(0x00, 0x00, 0x00)
const OUString & GetNumSeparator() const
Definition: caption.hxx:61
AuthorCharAttr m_aFormatAttr
Definition: modcfg.hxx:69
bool m_bUseRsid
Definition: modcfg.hxx:99
bool m_bGrfToGalleryAsLnk
Definition: modcfg.hxx:181
std::unique_ptr< InsCaptionOpt > m_pOLEMiscOpt
Definition: modcfg.hxx:123
TableChgMode m_eTableChgMode
Definition: modcfg.hxx:154
#define GLOB_NAME_IMPRESS
Definition: modcfg.cxx:44
bool m_bDefaultFontsInCurrDocOnly
Definition: modcfg.hxx:179
void SetSeparator(const OUString &rSep)
Definition: caption.hxx:74
static const css::uno::Sequence< OUString > & GetPropertyNames()
Definition: modcfg.cxx:1175
#define GLOB_NAME_MATH
Definition: modcfg.cxx:46
static sal_Int32 lcl_ConvertAttrToCfg(const AuthorCharAttr &rAttr)
Definition: modcfg.cxx:258
virtual ~SwMiscConfig() override
Definition: modcfg.cxx:1171
ConfigItemMode
#define GLOB_NAME_CHART
Definition: modcfg.cxx:47
#define GLOB_NAME_DRAW
Definition: modcfg.cxx:45
bool & CopyAttributes()
Definition: caption.hxx:83
SwInsertTableFlags mnInsMode
Definition: itabenum.hxx:40
virtual ~SwInsertConfig() override
Definition: modcfg.cxx:581
virtual void ImplCommit() override
Definition: modcfg.cxx:286
sal_Int16 nId
virtual void ImplCommit() override
Definition: modcfg.cxx:606
void SetPos(const sal_uInt16 nP)
Definition: caption.hxx:68
const SvGlobalName & GetOleId() const
Definition: caption.hxx:53
#define SO3_SM_CLASSID
sal_uInt16 m_nTableHMove
Definition: modcfg.hxx:150
bool m_bSinglePrintJob
Definition: modcfg.hxx:183
sal_uInt16 m_nAttr
Definition: authratr.hxx:30
sal_uInt16 mnRowsToRepeat
Definition: itabenum.hxx:41
SwInsertTableFlags
Definition: itabenum.hxx:25
const InsCaptionOpt * GetCapOption(bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
Definition: modcfg.cxx:66
bool m_bInsWithCaption
Definition: modcfg.hxx:127
WEIGHT_BOLD
SwCompareMode m_eCmpMode
Definition: modcfg.hxx:98
#define SO3_SIMPRESS_CLASSID
static void lcl_ReadOpt(InsCaptionOpt &rOpt, const Any *pValues, sal_Int32 nProp, sal_Int32 nOffset)
Definition: modcfg.cxx:775
sal_uInt16 sal_Unicode
virtual void ImplCommit() override
Definition: modcfg.cxx:1106
constexpr::Color COL_TRANSPARENT(0xFF, 0xFF, 0xFF, 0xFF)
const OUString & GetCaption() const
Definition: caption.hxx:64
bool m_bIgnorePieces
Definition: modcfg.hxx:102
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: modcfg.cxx:284
virtual ~SwTableConfig() override
Definition: modcfg.cxx:1100
SwInsertTableOptions m_aInsTableOpts
Definition: modcfg.hxx:130
STRIKEOUT_SINGLE
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: modcfg.cxx:1195
const css::uno::Sequence< OUString > & GetPropertyNames() const
Definition: modcfg.cxx:459
OUString m_sWordDelimiter
Definition: modcfg.hxx:178
bool m_bAskForMailMergeInPrint
Definition: modcfg.hxx:185
OUString m_sMailName
Definition: modcfg.hxx:189
SwCompareMode
Definition: modcfg.hxx:87
bool m_bShowIndexPreview
Definition: modcfg.hxx:180
void Load()
Definition: modcfg.cxx:1227
virtual void ImplCommit() override
Definition: modcfg.cxx:1197
OUString m_sMailingPath
Definition: modcfg.hxx:188
SwCapObjType GetObjType() const
Definition: caption.hxx:51
SwInsertConfig(bool bWeb)
Definition: modcfg.cxx:562
AuthorCharAttr m_aInsertAttr
Definition: modcfg.hxx:65
sal_uInt16 GetLevel() const
Definition: caption.hxx:70
bool PutProperties(const css::uno::Sequence< OUString > &rNames, const css::uno::Sequence< css::uno::Any > &rValues)
bool m_bSplitVerticalByDefault
Definition: modcfg.hxx:159
bool SetCapOption(bool bHTML, const InsCaptionOpt *pOpt)
Definition: modcfg.cxx:88
static const css::uno::Sequence< OUString > & GetPropertyNames()
Definition: modcfg.cxx:1067
SvGlobalName m_aGlobalNames[5]
Definition: modcfg.hxx:125
int i
static const css::uno::Sequence< OUString > & GetPropertyNames()
Definition: modcfg.cxx:221
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: modcfg.cxx:604
void SetNumType(const sal_uInt16 nNT)
Definition: caption.hxx:59
static void lcl_ConvertCfgToAttr(sal_Int32 nVal, AuthorCharAttr &rAttr, bool bDelete=false)
Definition: modcfg.cxx:309
LINESTYLE_SINGLE
virtual ~SwCompareConfig() override
Definition: modcfg.cxx:1284
sal_uInt16 m_nTableVMove
Definition: modcfg.hxx:151
virtual void ImplCommit() override
Definition: modcfg.cxx:1288
css::uno::Sequence< css::uno::Any > GetProperties(const css::uno::Sequence< OUString > &rNames)
virtual ~SwRevisionConfig() override
Definition: modcfg.cxx:254
bool m_bInsTableAlignNum
Definition: modcfg.hxx:158
sal_uInt16 m_nItemId
Definition: authratr.hxx:29
static OUString ConvertWordDelimiter(const OUString &rDelim, bool bFromUI)
Definition: modcfg.cxx:138
sal_uInt16 GetPos() const
Definition: caption.hxx:67
InsertConfigProp
Definition: modcfg.cxx:362
Color m_nColor
Definition: authratr.hxx:31
bool const m_bIsWeb
Definition: modcfg.hxx:131
#define SO3_SC_CLASSID
sal_uInt16 m_nTableHInsert
Definition: modcfg.hxx:152
sal_uInt16 m_nTableVInsert
Definition: modcfg.hxx:153
bool m_bInsTableFormatNum
Definition: modcfg.hxx:156
static const css::uno::Sequence< OUString > & GetPropertyNames()
Definition: modcfg.cxx:1259
MailTextFormats
Definition: modcfg.hxx:38
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: modcfg.cxx:1104
bool m_bIsNameFromColumn
Definition: modcfg.hxx:184
ITALIC_NORMAL
void Load()
Definition: modcfg.cxx:842
void SetCharacterStyle(const OUString &rStyle)
Definition: caption.hxx:77
void SetLevel(const sal_uInt16 nLvl)
Definition: caption.hxx:71
#define SO3_SCH_CLASSID
InsCaptionOpt * Find(const SwCapObjType eType, const SvGlobalName *pOleId=nullptr)
Definition: modcfg.cxx:49
sal_uInt16 m_nMarkAlign
Definition: modcfg.hxx:71
SwTableConfig(bool bWeb)
Definition: modcfg.cxx:1084
void Insert(InsCaptionOpt *pObj)
Definition: modcfg.cxx:61
#define GLOB_NAME_CALC
Definition: modcfg.cxx:43
bool m_bCaptionOrderNumberingFirst
Definition: modcfg.hxx:128
void SetCaption(const OUString &rCap)
Definition: caption.hxx:65
constexpr sal_Int64 convertTwipToMm100(sal_Int64 n)
Color m_aMarkColor
Definition: modcfg.hxx:72
TableChgMode
Definition: tblenum.hxx:46
sal_uInt16 GetNumType() const
Definition: caption.hxx:58
LINESTYLE_DOUBLE
AuthorCharAttr m_aDeletedAttr
Definition: modcfg.hxx:67
SwCapObjType
constexpr sal_Int64 convertMm100ToTwip(sal_Int64 n)
const OUString & GetSeparator() const
Definition: caption.hxx:73
bool & UseCaption()
Definition: caption.hxx:48
void SetCategory(const OUString &rCat)
Definition: caption.hxx:56
sal_uInt16 m_nPieceLen
Definition: modcfg.hxx:103
bool m_bStoreRsid
Compare/Settings/Store RSID.
Definition: modcfg.hxx:101
void Load()
Definition: modcfg.cxx:1130
static void lcl_WriteOpt(const InsCaptionOpt &rOpt, Any *pValues, sal_Int32 nProp, sal_Int32 nOffset)
Definition: modcfg.cxx:587
MailTextFormats m_nMailingFormats
Definition: modcfg.hxx:186
#define SO3_SDRAW_CLASSID
OUString m_sNameFromColumn
Definition: modcfg.hxx:187