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 <comphelper/classids.hxx>
22 #include <o3tl/any.hxx>
23 #include <tools/fontenum.hxx>
24 #include <editeng/svxenum.hxx>
25 #include <editeng/editids.hrc>
26 #include <osl/diagnose.h>
27 
28 #include <tools/mapunit.hxx>
29 #include <tools/globname.hxx>
30 #include <itabenum.hxx>
31 #include <modcfg.hxx>
32 #include <caption.hxx>
33 
34 using namespace com::sun::star::uno;
35 
36 #define GLOB_NAME_CALC 0
37 #define GLOB_NAME_IMPRESS 1
38 #define GLOB_NAME_DRAW 2
39 #define GLOB_NAME_MATH 3
40 #define GLOB_NAME_CHART 4
41 
43 {
44  for (auto const& it : m_InsCapOptArr)
45  {
46  InsCaptionOpt &rObj = *it;
47  if (rObj.GetObjType() == eType && (eType != OLE_CAP || (pOleId && rObj.GetOleId() == *pOleId)))
48  return &rObj;
49  }
50 
51  return nullptr;
52 }
53 
55 {
56  m_InsCapOptArr.push_back(std::unique_ptr<InsCaptionOpt>(pObj)); //takes ownership
57 }
58 
60  bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
61 {
62  if(bHTML)
63  {
64  OSL_FAIL("no caption option in sw/web!");
65  return nullptr;
66  }
67  else
68  {
69  if(eType == OLE_CAP && pOleId)
70  {
71  bool bFound = false;
72  for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
73  bFound = *pOleId == m_aInsertConfig.m_aGlobalNames[nId ];
74  if(!bFound)
75  return m_aInsertConfig.m_pOLEMiscOpt.get();
76  }
77  return m_aInsertConfig.m_pCapOptions->Find(eType, pOleId);
78  }
79 }
80 
81 bool SwModuleOptions::SetCapOption(bool bHTML, const InsCaptionOpt* pOpt)
82 {
83  bool bRet = false;
84 
85  if(bHTML)
86  {
87  OSL_FAIL("no caption option in sw/web!");
88  }
89  else if (pOpt)
90  {
91  if(pOpt->GetObjType() == OLE_CAP)
92  {
93  bool bFound = false;
94  for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++)
95  bFound = pOpt->GetOleId() == m_aInsertConfig.m_aGlobalNames[nId ];
96  if(!bFound)
97  {
98  if(m_aInsertConfig.m_pOLEMiscOpt)
99  *m_aInsertConfig.m_pOLEMiscOpt = *pOpt;
100  else
101  m_aInsertConfig.m_pOLEMiscOpt.reset(new InsCaptionOpt(*pOpt));
102  }
103  }
104 
105  InsCaptionOptArr& rArr = *m_aInsertConfig.m_pCapOptions;
106  InsCaptionOpt *pObj = rArr.Find(pOpt->GetObjType(), &pOpt->GetOleId());
107 
108  if (pObj)
109  {
110  *pObj = *pOpt;
111  }
112  else
113  rArr.Insert(new InsCaptionOpt(*pOpt));
114 
115  m_aInsertConfig.SetModified();
116  bRet = true;
117  }
118 
119  return bRet;
120 }
121 
123  m_aInsertConfig(false),
124  m_aWebInsertConfig(true),
125  m_aTableConfig(false),
126  m_aWebTableConfig(true),
127  m_bHideFieldTips(false)
128 {
129 }
130 
131 OUString SwModuleOptions::ConvertWordDelimiter(const OUString& rDelim, bool bFromUI)
132 {
133  OUStringBuffer sReturn;
134  const sal_Int32 nDelimLen = rDelim.getLength();
135  if(bFromUI)
136  {
137  for (sal_Int32 i = 0; i < nDelimLen; )
138  {
139  const sal_Unicode c = rDelim[i++];
140 
141  if (c == '\\' && i < nDelimLen )
142  {
143  switch (rDelim[i++])
144  {
145  case 'n': sReturn.append("\n"); break;
146  case 't': sReturn.append("\t"); break;
147  case '\\': sReturn.append("\\"); break;
148 
149  case 'x':
150  {
151  sal_Unicode nChar = 0;
152  bool bValidData = true;
153  for( sal_Int32 n = 0; n < 2 && i < nDelimLen; ++n, ++i )
154  {
155  sal_Unicode nVal = rDelim[i];
156  if( (nVal >= '0') && ( nVal <= '9') )
157  nVal -= '0';
158  else if( (nVal >= 'A') && (nVal <= 'F') )
159  nVal -= 'A' - 10;
160  else if( (nVal >= 'a') && (nVal <= 'f') )
161  nVal -= 'a' - 10;
162  else
163  {
164  OSL_FAIL("wrong hex value" );
165  bValidData = false;
166  break;
167  }
168 
169  nChar <<= 4;
170  nChar += nVal;
171  }
172  if( bValidData )
173  sReturn.append(nChar);
174  break;
175  }
176 
177  default: // Unknown, so insert backslash
178  sReturn.append("\\");
179  i--;
180  break;
181  }
182  }
183  else
184  sReturn.append(c);
185  }
186  }
187  else
188  {
189  for (sal_Int32 i = 0; i < nDelimLen; ++i)
190  {
191  const sal_Unicode c = rDelim[i];
192 
193  switch (c)
194  {
195  case '\n': sReturn.append("\\n"); break;
196  case '\t': sReturn.append("\\t"); break;
197  case '\\': sReturn.append("\\\\"); break;
198 
199  default:
200  if( c <= 0x1f || c >= 0x7f )
201  {
202  sReturn.append("\\x").append(OUString::number( c, 16 ));
203  }
204  else
205  {
206  sReturn.append(c);
207  }
208  }
209  }
210  }
211  return sReturn.makeStringAndClear();
212 }
213 
215 {
216  static Sequence<OUString> const aNames
217  {
218  "TextDisplay/Insert/Attribute", // 0
219  "TextDisplay/Insert/Color", // 1
220  "TextDisplay/Delete/Attribute", // 2
221  "TextDisplay/Delete/Color", // 3
222  "TextDisplay/ChangedAttribute/Attribute", // 4
223  "TextDisplay/ChangedAttribute/Color", // 5
224  "LinesChanged/Mark", // 6
225  "LinesChanged/Color" // 7
226  };
227  return aNames;
228 }
229 
231  ConfigItem("Office.Writer/Revision", ConfigItemMode::ReleaseTree)
232 {
233  m_aInsertAttr.m_nItemId = SID_ATTR_CHAR_UNDERLINE;
236  m_aDeletedAttr.m_nItemId = SID_ATTR_CHAR_STRIKEOUT;
237  // coverity[mixed_enums : FALSE] - unhelpfully warns different enum than LINESTYLE_SINGLE above
240  m_aFormatAttr.m_nItemId = SID_ATTR_CHAR_WEIGHT;
241  // coverity[mixed_enums : FALSE] - unhelpfully warns different enum than STRIKEOUT_SINGLE above
244  Load();
245 }
246 
248 {
249 }
250 
251 static sal_Int32 lcl_ConvertAttrToCfg(const AuthorCharAttr& rAttr)
252 {
253  sal_Int32 nRet = 0;
254  switch(rAttr.m_nItemId)
255  {
256  case SID_ATTR_CHAR_WEIGHT: nRet = 1; break;
257  case SID_ATTR_CHAR_POSTURE: nRet = 2; break;
258  case SID_ATTR_CHAR_UNDERLINE: nRet = LINESTYLE_SINGLE == rAttr.m_nAttr ? 3 : 4; break;
259  case SID_ATTR_CHAR_STRIKEOUT: nRet = 3; break;
260  case SID_ATTR_CHAR_CASEMAP:
261  {
262  switch(static_cast<SvxCaseMap>(rAttr.m_nAttr))
263  {
264  case SvxCaseMap::Uppercase : nRet = 5;break;
265  case SvxCaseMap::Lowercase : nRet = 6;break;
266  case SvxCaseMap::SmallCaps : nRet = 7;break;
267  case SvxCaseMap::Capitalize: nRet = 8;break;
268  default: break;
269  }
270  }
271  break;
272  case SID_ATTR_BRUSH : nRet = 9; break;
273  }
274  return nRet;
275 }
276 
277 void SwRevisionConfig::Notify( const css::uno::Sequence< OUString >& ) {}
278 
280 {
281  const Sequence<OUString>& aNames = GetPropertyNames();
282  Sequence<Any> aValues(aNames.getLength());
283  Any* pValues = aValues.getArray();
284 
285  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
286  {
287  switch(nProp)
288  {
289  case 0 : pValues[nProp] <<= lcl_ConvertAttrToCfg(m_aInsertAttr); break;
290  case 1 : pValues[nProp] <<= m_aInsertAttr.m_nColor; break;
291  case 2 : pValues[nProp] <<= lcl_ConvertAttrToCfg(m_aDeletedAttr); break;
292  case 3 : pValues[nProp] <<= m_aDeletedAttr.m_nColor; break;
293  case 4 : pValues[nProp] <<= lcl_ConvertAttrToCfg(m_aFormatAttr); break;
294  case 5 : pValues[nProp] <<= m_aFormatAttr.m_nColor; break;
295  case 6 : pValues[nProp] <<= m_nMarkAlign; break;
296  case 7 : pValues[nProp] <<= m_aMarkColor; break;
297  }
298  }
299  PutProperties(aNames, aValues);
300 }
301 
302 static void lcl_ConvertCfgToAttr(sal_Int32 nVal, AuthorCharAttr& rAttr, bool bDelete = false)
303 {
304  rAttr.m_nItemId = rAttr.m_nAttr = 0;
305  switch(nVal)
306  {
307  case 1: rAttr.m_nItemId = SID_ATTR_CHAR_WEIGHT; rAttr.m_nAttr = WEIGHT_BOLD ; break;
308  case 2: rAttr.m_nItemId = SID_ATTR_CHAR_POSTURE; rAttr.m_nAttr = ITALIC_NORMAL ; break;
309  case 3: if(bDelete)
310  {
311  rAttr.m_nItemId = SID_ATTR_CHAR_STRIKEOUT;
312  rAttr.m_nAttr = STRIKEOUT_SINGLE;
313  }
314  else
315  {
316  rAttr.m_nItemId = SID_ATTR_CHAR_UNDERLINE;
317  rAttr.m_nAttr = LINESTYLE_SINGLE;
318  }
319  break;
320  case 4: rAttr.m_nItemId = SID_ATTR_CHAR_UNDERLINE;rAttr.m_nAttr = LINESTYLE_DOUBLE ; break;
321  case 5: rAttr.m_nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.m_nAttr = sal_uInt16(SvxCaseMap::Uppercase); break;
322  case 6: rAttr.m_nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.m_nAttr = sal_uInt16(SvxCaseMap::Lowercase); break;
323  case 7: rAttr.m_nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.m_nAttr = sal_uInt16(SvxCaseMap::SmallCaps); break;
324  case 8: rAttr.m_nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.m_nAttr = sal_uInt16(SvxCaseMap::Capitalize); break;
325  case 9: rAttr.m_nItemId = SID_ATTR_BRUSH; break;
326  }
327 }
329 {
330  const Sequence<OUString>& aNames = GetPropertyNames();
331  Sequence<Any> aValues = GetProperties(aNames);
332  const Any* pValues = aValues.getConstArray();
333  assert(aValues.getLength() == aNames.getLength());
334  for (sal_Int32 nProp = 0; nProp < aNames.getLength(); ++nProp)
335  {
336  if (pValues[nProp].hasValue())
337  {
338  sal_Int32 nVal = 0;
339  pValues[nProp] >>= nVal;
340  switch (nProp)
341  {
342  case 0 : lcl_ConvertCfgToAttr(nVal, m_aInsertAttr); break;
343  case 1 : m_aInsertAttr.m_nColor = Color(nVal); break;
344  case 2 : lcl_ConvertCfgToAttr(nVal, m_aDeletedAttr, true); break;
345  case 3 : m_aDeletedAttr.m_nColor = Color(nVal); break;
346  case 4 : lcl_ConvertCfgToAttr(nVal, m_aFormatAttr); break;
347  case 5 : m_aFormatAttr.m_nColor = Color(nVal); break;
348  case 6 : m_nMarkAlign = sal::static_int_cast< sal_uInt16, sal_Int32>(nVal); break;
349  case 7 : m_aMarkColor = Color(nVal); break;
350  }
351  }
352  }
353 }
354 
355 namespace {
356 
358 {
359  INS_PROP_TABLE_HEADER = 0,
360  INS_PROP_TABLE_REPEATHEADER, // 1
361  INS_PROP_TABLE_BORDER, // 2
362  INS_PROP_TABLE_SPLIT, // 3 from here not in writer/web
363  INS_PROP_CAP_AUTOMATIC, // 4
364  INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST, // 5
365  INS_PROP_CAP_OBJECT_TABLE_ENABLE, // 6
366  INS_PROP_CAP_OBJECT_TABLE_CATEGORY, // 7
367  INS_PROP_CAP_OBJECT_TABLE_NUMBERING, // 8
368  INS_PROP_CAP_OBJECT_TABLE_NUMBERINGSEPARATOR, // 9
369  INS_PROP_CAP_OBJECT_TABLE_CAPTIONTEXT, //10
370  INS_PROP_CAP_OBJECT_TABLE_DELIMITER, //11
371  INS_PROP_CAP_OBJECT_TABLE_LEVEL, //12
372  INS_PROP_CAP_OBJECT_TABLE_POSITION, //13
373  INS_PROP_CAP_OBJECT_TABLE_CHARACTERSTYLE, //14
374  INS_PROP_CAP_OBJECT_FRAME_ENABLE, //15
375  INS_PROP_CAP_OBJECT_FRAME_CATEGORY, //16
376  INS_PROP_CAP_OBJECT_FRAME_NUMBERING, //17
377  INS_PROP_CAP_OBJECT_FRAME_NUMBERINGSEPARATOR, //18
378  INS_PROP_CAP_OBJECT_FRAME_CAPTIONTEXT, //19
379  INS_PROP_CAP_OBJECT_FRAME_DELIMITER, //20
380  INS_PROP_CAP_OBJECT_FRAME_LEVEL, //21
381  INS_PROP_CAP_OBJECT_FRAME_POSITION, //22
382  INS_PROP_CAP_OBJECT_FRAME_CHARACTERSTYLE, //23
383  INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE, //24
384  INS_PROP_CAP_OBJECT_GRAPHIC_CATEGORY, //25
385  INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERING, //26
386  INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERINGSEPARATOR, //27
387  INS_PROP_CAP_OBJECT_GRAPHIC_CAPTIONTEXT, //28
388  INS_PROP_CAP_OBJECT_GRAPHIC_DELIMITER, //29
389  INS_PROP_CAP_OBJECT_GRAPHIC_LEVEL, //30
390  INS_PROP_CAP_OBJECT_GRAPHIC_POSITION, //31
391  INS_PROP_CAP_OBJECT_GRAPHIC_CHARACTERSTYLE, //32
392  INS_PROP_CAP_OBJECT_GRAPHIC_APPLYATTRIBUTES, //33
393  INS_PROP_CAP_OBJECT_CALC_ENABLE, //34
394  INS_PROP_CAP_OBJECT_CALC_CATEGORY, //35
395  INS_PROP_CAP_OBJECT_CALC_NUMBERING, //36
396  INS_PROP_CAP_OBJECT_CALC_NUMBERINGSEPARATOR, //37
397  INS_PROP_CAP_OBJECT_CALC_CAPTIONTEXT, //38
398  INS_PROP_CAP_OBJECT_CALC_DELIMITER, //39
399  INS_PROP_CAP_OBJECT_CALC_LEVEL, //40
400  INS_PROP_CAP_OBJECT_CALC_POSITION, //41
401  INS_PROP_CAP_OBJECT_CALC_CHARACTERSTYLE, //42
402  INS_PROP_CAP_OBJECT_CALC_APPLYATTRIBUTES, //43
403  INS_PROP_CAP_OBJECT_IMPRESS_ENABLE, //44
404  INS_PROP_CAP_OBJECT_IMPRESS_CATEGORY, //45
405  INS_PROP_CAP_OBJECT_IMPRESS_NUMBERING, //46
406  INS_PROP_CAP_OBJECT_IMPRESS_NUMBERINGSEPARATOR, //47
407  INS_PROP_CAP_OBJECT_IMPRESS_CAPTIONTEXT, //48
408  INS_PROP_CAP_OBJECT_IMPRESS_DELIMITER, //49
409  INS_PROP_CAP_OBJECT_IMPRESS_LEVEL, //50
410  INS_PROP_CAP_OBJECT_IMPRESS_POSITION, //51
411  INS_PROP_CAP_OBJECT_IMPRESS_CHARACTERSTYLE, //52
412  INS_PROP_CAP_OBJECT_IMPRESS_APPLYATTRIBUTES, //53
413  INS_PROP_CAP_OBJECT_CHART_ENABLE, //54
414  INS_PROP_CAP_OBJECT_CHART_CATEGORY, //55
415  INS_PROP_CAP_OBJECT_CHART_NUMBERING, //56
416  INS_PROP_CAP_OBJECT_CHART_NUMBERINGSEPARATOR, //57
417  INS_PROP_CAP_OBJECT_CHART_CAPTIONTEXT, //58
418  INS_PROP_CAP_OBJECT_CHART_DELIMITER, //59
419  INS_PROP_CAP_OBJECT_CHART_LEVEL, //60
420  INS_PROP_CAP_OBJECT_CHART_POSITION, //61
421  INS_PROP_CAP_OBJECT_CHART_CHARACTERSTYLE, //62
422  INS_PROP_CAP_OBJECT_CHART_APPLYATTRIBUTES, //63
423  INS_PROP_CAP_OBJECT_FORMULA_ENABLE, //64
424  INS_PROP_CAP_OBJECT_FORMULA_CATEGORY, //65
425  INS_PROP_CAP_OBJECT_FORMULA_NUMBERING, //66
426  INS_PROP_CAP_OBJECT_FORMULA_NUMBERINGSEPARATOR, //67
427  INS_PROP_CAP_OBJECT_FORMULA_CAPTIONTEXT, //68
428  INS_PROP_CAP_OBJECT_FORMULA_DELIMITER, //69
429  INS_PROP_CAP_OBJECT_FORMULA_LEVEL, //70
430  INS_PROP_CAP_OBJECT_FORMULA_POSITION, //71
431  INS_PROP_CAP_OBJECT_FORMULA_CHARACTERSTYLE, //72
432  INS_PROP_CAP_OBJECT_FORMULA_APPLYATTRIBUTES, //73
433  INS_PROP_CAP_OBJECT_DRAW_ENABLE, //74
434  INS_PROP_CAP_OBJECT_DRAW_CATEGORY, //75
435  INS_PROP_CAP_OBJECT_DRAW_NUMBERING, //76
436  INS_PROP_CAP_OBJECT_DRAW_NUMBERINGSEPARATOR, //77
437  INS_PROP_CAP_OBJECT_DRAW_CAPTIONTEXT, //78
438  INS_PROP_CAP_OBJECT_DRAW_DELIMITER, //79
439  INS_PROP_CAP_OBJECT_DRAW_LEVEL, //80
440  INS_PROP_CAP_OBJECT_DRAW_POSITION, //81
441  INS_PROP_CAP_OBJECT_DRAW_CHARACTERSTYLE, //82
442  INS_PROP_CAP_OBJECT_DRAW_APPLYATTRIBUTES, //83
443  INS_PROP_CAP_OBJECT_OLEMISC_ENABLE, //84
444  INS_PROP_CAP_OBJECT_OLEMISC_CATEGORY, //85
445  INS_PROP_CAP_OBJECT_OLEMISC_NUMBERING, //86
446  INS_PROP_CAP_OBJECT_OLEMISC_NUMBERINGSEPARATOR, //87
447  INS_PROP_CAP_OBJECT_OLEMISC_CAPTIONTEXT, //88
448  INS_PROP_CAP_OBJECT_OLEMISC_DELIMITER, //89
449  INS_PROP_CAP_OBJECT_OLEMISC_LEVEL, //90
450  INS_PROP_CAP_OBJECT_OLEMISC_POSITION, //91
451  INS_PROP_CAP_OBJECT_OLEMISC_CHARACTERSTYLE, //92
452  INS_PROP_CAP_OBJECT_OLEMISC_APPLYATTRIBUTES //93
453 };
454 
455 }
456 
458 {
459  static Sequence<OUString> aNames
460  {
461  "Table/Header", // 0
462  "Table/RepeatHeader", // 1
463  "Table/Border", // 2
464  "Table/Split", // 3 from here not in writer/web
465  "Caption/Automatic", // 4
466  "Caption/CaptionOrderNumberingFirst", // 5
467  "Caption/WriterObject/Table/Enable", // 6
468  "Caption/WriterObject/Table/Settings/Category", // 7
469  "Caption/WriterObject/Table/Settings/Numbering", // 8
470  "Caption/WriterObject/Table/Settings/NumberingSeparator", // 9
471  "Caption/WriterObject/Table/Settings/CaptionText", //10
472  "Caption/WriterObject/Table/Settings/Delimiter", //11
473  "Caption/WriterObject/Table/Settings/Level", //12
474  "Caption/WriterObject/Table/Settings/Position", //13
475  "Caption/WriterObject/Table/Settings/CharacterStyle", //14
476  "Caption/WriterObject/Frame/Enable", //15
477  "Caption/WriterObject/Frame/Settings/Category", //16
478  "Caption/WriterObject/Frame/Settings/Numbering", //17
479  "Caption/WriterObject/Frame/Settings/NumberingSeparator", //18
480  "Caption/WriterObject/Frame/Settings/CaptionText", //19
481  "Caption/WriterObject/Frame/Settings/Delimiter", //20
482  "Caption/WriterObject/Frame/Settings/Level", //21
483  "Caption/WriterObject/Frame/Settings/Position", //22
484  "Caption/WriterObject/Frame/Settings/CharacterStyle", //23
485  "Caption/WriterObject/Graphic/Enable", //24
486  "Caption/WriterObject/Graphic/Settings/Category", //25
487  "Caption/WriterObject/Graphic/Settings/Numbering", //26
488  "Caption/WriterObject/Graphic/Settings/NumberingSeparator", //27
489  "Caption/WriterObject/Graphic/Settings/CaptionText", //28
490  "Caption/WriterObject/Graphic/Settings/Delimiter", //29
491  "Caption/WriterObject/Graphic/Settings/Level", //30
492  "Caption/WriterObject/Graphic/Settings/Position", //31
493  "Caption/WriterObject/Graphic/Settings/CharacterStyle", //32
494  "Caption/WriterObject/Graphic/Settings/ApplyAttributes", //33
495  "Caption/OfficeObject/Calc/Enable", //34
496  "Caption/OfficeObject/Calc/Settings/Category", //35
497  "Caption/OfficeObject/Calc/Settings/Numbering", //36
498  "Caption/OfficeObject/Calc/Settings/NumberingSeparator", //37
499  "Caption/OfficeObject/Calc/Settings/CaptionText", //38
500  "Caption/OfficeObject/Calc/Settings/Delimiter", //39
501  "Caption/OfficeObject/Calc/Settings/Level", //40
502  "Caption/OfficeObject/Calc/Settings/Position", //41
503  "Caption/OfficeObject/Calc/Settings/CharacterStyle", //42
504  "Caption/OfficeObject/Calc/Settings/ApplyAttributes", //43
505  "Caption/OfficeObject/Impress/Enable", //44
506  "Caption/OfficeObject/Impress/Settings/Category", //45
507  "Caption/OfficeObject/Impress/Settings/Numbering", //46
508  "Caption/OfficeObject/Impress/Settings/NumberingSeparator", //47
509  "Caption/OfficeObject/Impress/Settings/CaptionText", //48
510  "Caption/OfficeObject/Impress/Settings/Delimiter", //49
511  "Caption/OfficeObject/Impress/Settings/Level", //50
512  "Caption/OfficeObject/Impress/Settings/Position", //51
513  "Caption/OfficeObject/Impress/Settings/CharacterStyle", //52
514  "Caption/OfficeObject/Impress/Settings/ApplyAttributes", //53
515  "Caption/OfficeObject/Chart/Enable", //54
516  "Caption/OfficeObject/Chart/Settings/Category", //55
517  "Caption/OfficeObject/Chart/Settings/Numbering", //56
518  "Caption/OfficeObject/Chart/Settings/NumberingSeparator", //57
519  "Caption/OfficeObject/Chart/Settings/CaptionText", //58
520  "Caption/OfficeObject/Chart/Settings/Delimiter", //59
521  "Caption/OfficeObject/Chart/Settings/Level", //60
522  "Caption/OfficeObject/Chart/Settings/Position", //61
523  "Caption/OfficeObject/Chart/Settings/CharacterStyle", //62
524  "Caption/OfficeObject/Chart/Settings/ApplyAttributes", //63
525  "Caption/OfficeObject/Formula/Enable", //64
526  "Caption/OfficeObject/Formula/Settings/Category", //65
527  "Caption/OfficeObject/Formula/Settings/Numbering", //66
528  "Caption/OfficeObject/Formula/Settings/NumberingSeparator", //67
529  "Caption/OfficeObject/Formula/Settings/CaptionText", //68
530  "Caption/OfficeObject/Formula/Settings/Delimiter", //69
531  "Caption/OfficeObject/Formula/Settings/Level", //70
532  "Caption/OfficeObject/Formula/Settings/Position", //71
533  "Caption/OfficeObject/Formula/Settings/CharacterStyle", //72
534  "Caption/OfficeObject/Formula/Settings/ApplyAttributes", //73
535  "Caption/OfficeObject/Draw/Enable", //74
536  "Caption/OfficeObject/Draw/Settings/Category", //75
537  "Caption/OfficeObject/Draw/Settings/Numbering", //76
538  "Caption/OfficeObject/Draw/Settings/NumberingSeparator", //77
539  "Caption/OfficeObject/Draw/Settings/CaptionText", //78
540  "Caption/OfficeObject/Draw/Settings/Delimiter", //79
541  "Caption/OfficeObject/Draw/Settings/Level", //80
542  "Caption/OfficeObject/Draw/Settings/Position", //81
543  "Caption/OfficeObject/Draw/Settings/CharacterStyle", //82
544  "Caption/OfficeObject/Draw/Settings/ApplyAttributes", //83
545  "Caption/OfficeObject/OLEMisc/Enable", //84
546  "Caption/OfficeObject/OLEMisc/Settings/Category", //85
547  "Caption/OfficeObject/OLEMisc/Settings/Numbering", //86
548  "Caption/OfficeObject/OLEMisc/Settings/NumberingSeparator", //87
549  "Caption/OfficeObject/OLEMisc/Settings/CaptionText", //88
550  "Caption/OfficeObject/OLEMisc/Settings/Delimiter", //89
551  "Caption/OfficeObject/OLEMisc/Settings/Level", //90
552  "Caption/OfficeObject/OLEMisc/Settings/Position", //91
553  "Caption/OfficeObject/OLEMisc/Settings/CharacterStyle", //92
554  "Caption/OfficeObject/OLEMisc/Settings/ApplyAttributes" //93
555  };
556  static Sequence<OUString> const aWebNames(aNames.getArray(), INS_PROP_TABLE_BORDER + 1);
557  return m_bIsWeb ? aWebNames : aNames;
558 }
559 
561  ConfigItem(bWeb ? OUString("Office.WriterWeb/Insert") : OUString("Office.Writer/Insert"),
563  m_bInsWithCaption( false ),
564  m_bCaptionOrderNumberingFirst( false ),
565  m_aInsTableOpts(SwInsertTableFlags::NONE,0),
566  m_bIsWeb(bWeb)
567 {
573  if(!m_bIsWeb)
574  m_pCapOptions.reset(new InsCaptionOptArr);
575 
576  Load();
577 }
578 
580 {
581  m_pCapOptions.reset();
582  m_pOLEMiscOpt.reset();
583 }
584 
585 static void lcl_WriteOpt(const InsCaptionOpt& rOpt, Any* pValues, sal_Int32 nProp, sal_Int32 nOffset)
586 {
587  switch(nOffset)
588  {
589  case 0: pValues[nProp] <<= rOpt.UseCaption(); break;//Enable
590  case 1: pValues[nProp] <<= rOpt.GetCategory(); break;//Category
591  case 2: pValues[nProp] <<= static_cast<sal_Int32>(rOpt.GetNumType()); break;//Numbering",
592  case 3: pValues[nProp] <<= rOpt.GetNumSeparator(); break;//NumberingSeparator",
593  case 4: pValues[nProp] <<= rOpt.GetCaption(); break;//CaptionText",
594  case 5: pValues[nProp] <<= rOpt.GetSeparator();break;//Delimiter",
595  case 6: pValues[nProp] <<= static_cast<sal_Int32>(rOpt.GetLevel()); break;//Level",
596  case 7: pValues[nProp] <<= static_cast<sal_Int32>(rOpt.GetPos()); break;//Position",
597  case 8: pValues[nProp] <<= rOpt.GetCharacterStyle(); break; //CharacterStyle
598  case 9: pValues[nProp] <<= rOpt.CopyAttributes(); break; //ApplyAttributes
599  }
600 }
601 
602 void SwInsertConfig::Notify( const css::uno::Sequence< OUString >& ) {}
603 
605 {
606  const Sequence<OUString>& aNames = GetPropertyNames();
607  Sequence<Any> aValues(aNames.getLength());
608  Any* pValues = aValues.getArray();
609 
610  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
611  {
612  const InsCaptionOpt* pWriterTableOpt = nullptr;
613  const InsCaptionOpt* pWriterFrameOpt = nullptr;
614  const InsCaptionOpt* pWriterGraphicOpt = nullptr;
615  const InsCaptionOpt* pOLECalcOpt = nullptr;
616  const InsCaptionOpt* pOLEImpressOpt = nullptr;
617  const InsCaptionOpt* pOLEChartOpt = nullptr;
618  const InsCaptionOpt* pOLEFormulaOpt = nullptr;
619  const InsCaptionOpt* pOLEDrawOpt = nullptr;
620  if(m_pCapOptions)
621  {
622  pWriterTableOpt = m_pCapOptions->Find(TABLE_CAP);
623  pWriterFrameOpt = m_pCapOptions->Find(FRAME_CAP);
624  pWriterGraphicOpt = m_pCapOptions->Find(GRAPHIC_CAP);
625  pOLECalcOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_CALC]);
626  pOLEImpressOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_IMPRESS]);
627  pOLEDrawOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_DRAW ]);
628  pOLEFormulaOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_MATH ]);
629  pOLEChartOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_CHART ]);
630  }
631  switch(nProp)
632  {
633  case INS_PROP_TABLE_HEADER:
634  pValues[nProp] <<= bool(m_aInsTableOpts.mnInsMode & SwInsertTableFlags::Headline);
635  break;//"Table/Header",
636  case INS_PROP_TABLE_REPEATHEADER:
637  pValues[nProp] <<= m_aInsTableOpts.mnRowsToRepeat > 0;
638  break;//"Table/RepeatHeader",
639  case INS_PROP_TABLE_BORDER:
641  break;//"Table/Border",
642  case INS_PROP_TABLE_SPLIT:
643  pValues[nProp] <<= bool(m_aInsTableOpts.mnInsMode & SwInsertTableFlags::SplitLayout);
644  break;//"Table/Split",
645  case INS_PROP_CAP_AUTOMATIC:
646  pValues[nProp] <<= m_bInsWithCaption;
647  break;//"Caption/Automatic",
648  case INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST:
649  pValues[nProp] <<= m_bCaptionOrderNumberingFirst;
650  break;//"Caption/CaptionOrderNumberingFirst"
651 
652  case INS_PROP_CAP_OBJECT_TABLE_ENABLE:
653  case INS_PROP_CAP_OBJECT_TABLE_CATEGORY:
654  case INS_PROP_CAP_OBJECT_TABLE_NUMBERING:
655  case INS_PROP_CAP_OBJECT_TABLE_NUMBERINGSEPARATOR:
656  case INS_PROP_CAP_OBJECT_TABLE_CAPTIONTEXT:
657  case INS_PROP_CAP_OBJECT_TABLE_DELIMITER:
658  case INS_PROP_CAP_OBJECT_TABLE_LEVEL:
659  case INS_PROP_CAP_OBJECT_TABLE_POSITION:
660  case INS_PROP_CAP_OBJECT_TABLE_CHARACTERSTYLE:
661  if(pWriterTableOpt)
662  lcl_WriteOpt(*pWriterTableOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_TABLE_ENABLE);
663  break;
664  case INS_PROP_CAP_OBJECT_FRAME_ENABLE:
665  case INS_PROP_CAP_OBJECT_FRAME_CATEGORY:
666  case INS_PROP_CAP_OBJECT_FRAME_NUMBERING:
667  case INS_PROP_CAP_OBJECT_FRAME_NUMBERINGSEPARATOR:
668  case INS_PROP_CAP_OBJECT_FRAME_CAPTIONTEXT:
669  case INS_PROP_CAP_OBJECT_FRAME_DELIMITER:
670  case INS_PROP_CAP_OBJECT_FRAME_LEVEL:
671  case INS_PROP_CAP_OBJECT_FRAME_POSITION:
672  case INS_PROP_CAP_OBJECT_FRAME_CHARACTERSTYLE:
673  if(pWriterFrameOpt)
674  lcl_WriteOpt(*pWriterFrameOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FRAME_ENABLE);
675  break;
676  case INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE:
677  case INS_PROP_CAP_OBJECT_GRAPHIC_CATEGORY:
678  case INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERING:
679  case INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERINGSEPARATOR:
680  case INS_PROP_CAP_OBJECT_GRAPHIC_CAPTIONTEXT:
681  case INS_PROP_CAP_OBJECT_GRAPHIC_DELIMITER:
682  case INS_PROP_CAP_OBJECT_GRAPHIC_LEVEL:
683  case INS_PROP_CAP_OBJECT_GRAPHIC_POSITION:
684  case INS_PROP_CAP_OBJECT_GRAPHIC_CHARACTERSTYLE:
685  case INS_PROP_CAP_OBJECT_GRAPHIC_APPLYATTRIBUTES:
686  if(pWriterGraphicOpt)
687  lcl_WriteOpt(*pWriterGraphicOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE);
688  break;
689  case INS_PROP_CAP_OBJECT_CALC_ENABLE:
690  case INS_PROP_CAP_OBJECT_CALC_CATEGORY:
691  case INS_PROP_CAP_OBJECT_CALC_NUMBERING:
692  case INS_PROP_CAP_OBJECT_CALC_NUMBERINGSEPARATOR:
693  case INS_PROP_CAP_OBJECT_CALC_CAPTIONTEXT:
694  case INS_PROP_CAP_OBJECT_CALC_DELIMITER:
695  case INS_PROP_CAP_OBJECT_CALC_LEVEL:
696  case INS_PROP_CAP_OBJECT_CALC_POSITION:
697  case INS_PROP_CAP_OBJECT_CALC_CHARACTERSTYLE:
698  case INS_PROP_CAP_OBJECT_CALC_APPLYATTRIBUTES:
699  if(pOLECalcOpt)
700  lcl_WriteOpt(*pOLECalcOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_CALC_ENABLE);
701  break;
702  case INS_PROP_CAP_OBJECT_IMPRESS_ENABLE:
703  case INS_PROP_CAP_OBJECT_IMPRESS_CATEGORY:
704  case INS_PROP_CAP_OBJECT_IMPRESS_NUMBERING:
705  case INS_PROP_CAP_OBJECT_IMPRESS_NUMBERINGSEPARATOR:
706  case INS_PROP_CAP_OBJECT_IMPRESS_CAPTIONTEXT:
707  case INS_PROP_CAP_OBJECT_IMPRESS_DELIMITER:
708  case INS_PROP_CAP_OBJECT_IMPRESS_LEVEL:
709  case INS_PROP_CAP_OBJECT_IMPRESS_POSITION:
710  case INS_PROP_CAP_OBJECT_IMPRESS_CHARACTERSTYLE:
711  case INS_PROP_CAP_OBJECT_IMPRESS_APPLYATTRIBUTES:
712  if(pOLEImpressOpt)
713  lcl_WriteOpt(*pOLEImpressOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_IMPRESS_ENABLE);
714  break;
715  case INS_PROP_CAP_OBJECT_CHART_ENABLE:
716  case INS_PROP_CAP_OBJECT_CHART_CATEGORY:
717  case INS_PROP_CAP_OBJECT_CHART_NUMBERING:
718  case INS_PROP_CAP_OBJECT_CHART_NUMBERINGSEPARATOR:
719  case INS_PROP_CAP_OBJECT_CHART_CAPTIONTEXT:
720  case INS_PROP_CAP_OBJECT_CHART_DELIMITER:
721  case INS_PROP_CAP_OBJECT_CHART_LEVEL:
722  case INS_PROP_CAP_OBJECT_CHART_POSITION:
723  case INS_PROP_CAP_OBJECT_CHART_CHARACTERSTYLE:
724  case INS_PROP_CAP_OBJECT_CHART_APPLYATTRIBUTES:
725  if(pOLEChartOpt)
726  lcl_WriteOpt(*pOLEChartOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_CHART_ENABLE);
727  break;
728  case INS_PROP_CAP_OBJECT_FORMULA_ENABLE:
729  case INS_PROP_CAP_OBJECT_FORMULA_CATEGORY:
730  case INS_PROP_CAP_OBJECT_FORMULA_NUMBERING:
731  case INS_PROP_CAP_OBJECT_FORMULA_NUMBERINGSEPARATOR:
732  case INS_PROP_CAP_OBJECT_FORMULA_CAPTIONTEXT:
733  case INS_PROP_CAP_OBJECT_FORMULA_DELIMITER:
734  case INS_PROP_CAP_OBJECT_FORMULA_LEVEL:
735  case INS_PROP_CAP_OBJECT_FORMULA_POSITION:
736  case INS_PROP_CAP_OBJECT_FORMULA_CHARACTERSTYLE:
737  case INS_PROP_CAP_OBJECT_FORMULA_APPLYATTRIBUTES:
738  if(pOLEFormulaOpt)
739  lcl_WriteOpt(*pOLEFormulaOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FORMULA_ENABLE);
740  break;
741  case INS_PROP_CAP_OBJECT_DRAW_ENABLE:
742  case INS_PROP_CAP_OBJECT_DRAW_CATEGORY:
743  case INS_PROP_CAP_OBJECT_DRAW_NUMBERING:
744  case INS_PROP_CAP_OBJECT_DRAW_NUMBERINGSEPARATOR:
745  case INS_PROP_CAP_OBJECT_DRAW_CAPTIONTEXT:
746  case INS_PROP_CAP_OBJECT_DRAW_DELIMITER:
747  case INS_PROP_CAP_OBJECT_DRAW_LEVEL:
748  case INS_PROP_CAP_OBJECT_DRAW_POSITION:
749  case INS_PROP_CAP_OBJECT_DRAW_CHARACTERSTYLE:
750  case INS_PROP_CAP_OBJECT_DRAW_APPLYATTRIBUTES:
751  if(pOLEDrawOpt)
752  lcl_WriteOpt(*pOLEDrawOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_DRAW_ENABLE);
753  break;
754  case INS_PROP_CAP_OBJECT_OLEMISC_ENABLE:
755  case INS_PROP_CAP_OBJECT_OLEMISC_CATEGORY:
756  case INS_PROP_CAP_OBJECT_OLEMISC_NUMBERING:
757  case INS_PROP_CAP_OBJECT_OLEMISC_NUMBERINGSEPARATOR:
758  case INS_PROP_CAP_OBJECT_OLEMISC_CAPTIONTEXT:
759  case INS_PROP_CAP_OBJECT_OLEMISC_DELIMITER:
760  case INS_PROP_CAP_OBJECT_OLEMISC_LEVEL:
761  case INS_PROP_CAP_OBJECT_OLEMISC_POSITION:
762  case INS_PROP_CAP_OBJECT_OLEMISC_CHARACTERSTYLE:
763  case INS_PROP_CAP_OBJECT_OLEMISC_APPLYATTRIBUTES:
764  if(m_pOLEMiscOpt)
765  lcl_WriteOpt(*m_pOLEMiscOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_OLEMISC_ENABLE);
766  break;
767 
768  }
769  }
770  PutProperties(aNames, aValues);
771 }
772 
773 static void lcl_ReadOpt(InsCaptionOpt& rOpt, const Any* pValues, sal_Int32 nProp, sal_Int32 nOffset)
774 {
775  switch(nOffset)
776  {
777  case 0:
778  rOpt.UseCaption() = *o3tl::doAccess<bool>(pValues[nProp]);
779  break;//Enable
780  case 1:
781  {
782  OUString sTemp; pValues[nProp] >>= sTemp;
783  rOpt.SetCategory(sTemp);
784  }
785  break;//Category
786  case 2:
787  {
788  sal_Int32 nTemp = 0;
789  pValues[nProp] >>= nTemp;
790  rOpt.SetNumType(sal::static_int_cast< sal_uInt16, sal_Int32>(nTemp));
791  }
792  break;//Numbering",
793  case 3:
794  {
795  OUString sTemp; pValues[nProp] >>= sTemp;
796  rOpt.SetNumSeparator(sTemp);
797  }
798  break;//NumberingSeparator",
799  case 4:
800  {
801  OUString sTemp; pValues[nProp] >>= sTemp;
802  rOpt.SetCaption(sTemp);
803  }
804  break;//CaptionText",
805  case 5:
806  {
807  OUString sTemp;
808  if(pValues[nProp] >>= sTemp)
809  rOpt.SetSeparator(sTemp);
810  }
811  break;//Delimiter",
812  case 6:
813  {
814  sal_Int32 nTemp = 0;
815  pValues[nProp] >>= nTemp;
816  rOpt.SetLevel(sal::static_int_cast< sal_uInt16, sal_Int32>(nTemp));
817  }
818  break;//Level",
819  case 7:
820  {
821  sal_Int32 nTemp = 0;
822  pValues[nProp] >>= nTemp;
823  rOpt.SetPos(sal::static_int_cast< sal_uInt16, sal_Int32>(nTemp));
824  }
825  break;//Position",
826  case 8 : //CharacterStyle
827  {
828  OUString sTemp; pValues[nProp] >>= sTemp;
829  rOpt.SetCharacterStyle( sTemp );
830  }
831  break;
832  case 9 : //ApplyAttributes
833  {
834  pValues[nProp] >>= rOpt.CopyAttributes();
835  }
836  break;
837  }
838 }
839 
841 {
842  const Sequence<OUString>& aNames = GetPropertyNames();
843  Sequence<Any> aValues = GetProperties(aNames);
844  const Any* pValues = aValues.getConstArray();
845  assert(aValues.getLength() == aNames.getLength());
846  InsCaptionOpt* pWriterTableOpt = nullptr;
847  InsCaptionOpt* pWriterFrameOpt = nullptr;
848  InsCaptionOpt* pWriterGraphicOpt = nullptr;
849  InsCaptionOpt* pOLECalcOpt = nullptr;
850  InsCaptionOpt* pOLEImpressOpt = nullptr;
851  InsCaptionOpt* pOLEChartOpt = nullptr;
852  InsCaptionOpt* pOLEFormulaOpt = nullptr;
853  InsCaptionOpt* pOLEDrawOpt = nullptr;
854  if (m_pCapOptions)
855  {
856  pWriterTableOpt = m_pCapOptions->Find(TABLE_CAP);
857  pWriterFrameOpt = m_pCapOptions->Find(FRAME_CAP);
858  pWriterGraphicOpt = m_pCapOptions->Find(GRAPHIC_CAP);
859  pOLECalcOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_CALC]);
860  pOLEImpressOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_IMPRESS]);
861  pOLEDrawOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_DRAW ]);
862  pOLEFormulaOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_MATH ]);
863  pOLEChartOpt = m_pCapOptions->Find(OLE_CAP, &m_aGlobalNames[GLOB_NAME_CHART ]);
864  }
865  else if (!m_bIsWeb)
866  return;
867 
869  for (sal_Int32 nProp = 0; nProp < aNames.getLength(); ++nProp)
870  {
871  if (pValues[nProp].hasValue())
872  {
873  bool bBool = nProp < INS_PROP_CAP_OBJECT_TABLE_ENABLE && *o3tl::doAccess<bool>(pValues[nProp]);
874  switch (nProp)
875  {
876  case INS_PROP_TABLE_HEADER:
877  {
878  if(bBool)
879  nInsTableFlags |= SwInsertTableFlags::Headline;
880  }
881  break;//"Table/Header",
882  case INS_PROP_TABLE_REPEATHEADER:
883  {
884  m_aInsTableOpts.mnRowsToRepeat = bBool? 1 : 0;
885 
886  }
887  break;//"Table/RepeatHeader",
888  case INS_PROP_TABLE_BORDER:
889  {
890  if(bBool)
891  nInsTableFlags |= SwInsertTableFlags::DefaultBorder;
892  }
893  break;//"Table/Border",
894  case INS_PROP_TABLE_SPLIT:
895  {
896  if(bBool)
897  nInsTableFlags |= SwInsertTableFlags::SplitLayout;
898  }
899  break;//"Table/Split",
900  case INS_PROP_CAP_AUTOMATIC:
901  m_bInsWithCaption = bBool;
902  break;
903  case INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST: m_bCaptionOrderNumberingFirst = bBool; break;
904  case INS_PROP_CAP_OBJECT_TABLE_ENABLE:
905  case INS_PROP_CAP_OBJECT_TABLE_CATEGORY:
906  case INS_PROP_CAP_OBJECT_TABLE_NUMBERING:
907  case INS_PROP_CAP_OBJECT_TABLE_NUMBERINGSEPARATOR:
908  case INS_PROP_CAP_OBJECT_TABLE_CAPTIONTEXT:
909  case INS_PROP_CAP_OBJECT_TABLE_DELIMITER:
910  case INS_PROP_CAP_OBJECT_TABLE_LEVEL:
911  case INS_PROP_CAP_OBJECT_TABLE_POSITION:
912  case INS_PROP_CAP_OBJECT_TABLE_CHARACTERSTYLE:
913  if(!pWriterTableOpt)
914  {
915  pWriterTableOpt = new InsCaptionOpt(TABLE_CAP);
916  m_pCapOptions->Insert(pWriterTableOpt);
917  }
918  lcl_ReadOpt(*pWriterTableOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_TABLE_ENABLE);
919  break;
920  case INS_PROP_CAP_OBJECT_FRAME_ENABLE:
921  case INS_PROP_CAP_OBJECT_FRAME_CATEGORY:
922  case INS_PROP_CAP_OBJECT_FRAME_NUMBERING:
923  case INS_PROP_CAP_OBJECT_FRAME_NUMBERINGSEPARATOR:
924  case INS_PROP_CAP_OBJECT_FRAME_CAPTIONTEXT:
925  case INS_PROP_CAP_OBJECT_FRAME_DELIMITER:
926  case INS_PROP_CAP_OBJECT_FRAME_LEVEL:
927  case INS_PROP_CAP_OBJECT_FRAME_POSITION:
928  case INS_PROP_CAP_OBJECT_FRAME_CHARACTERSTYLE:
929  if(!pWriterFrameOpt)
930  {
931  pWriterFrameOpt = new InsCaptionOpt(FRAME_CAP);
932  m_pCapOptions->Insert(pWriterFrameOpt);
933  }
934  lcl_ReadOpt(*pWriterFrameOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FRAME_ENABLE);
935  break;
936  case INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE:
937  case INS_PROP_CAP_OBJECT_GRAPHIC_CATEGORY:
938  case INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERING:
939  case INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERINGSEPARATOR:
940  case INS_PROP_CAP_OBJECT_GRAPHIC_CAPTIONTEXT:
941  case INS_PROP_CAP_OBJECT_GRAPHIC_DELIMITER:
942  case INS_PROP_CAP_OBJECT_GRAPHIC_LEVEL:
943  case INS_PROP_CAP_OBJECT_GRAPHIC_POSITION:
944  case INS_PROP_CAP_OBJECT_GRAPHIC_CHARACTERSTYLE:
945  case INS_PROP_CAP_OBJECT_GRAPHIC_APPLYATTRIBUTES:
946  if(!pWriterGraphicOpt)
947  {
948  pWriterGraphicOpt = new InsCaptionOpt(GRAPHIC_CAP);
949  m_pCapOptions->Insert(pWriterGraphicOpt);
950  }
951  lcl_ReadOpt(*pWriterGraphicOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE);
952  break;
953  case INS_PROP_CAP_OBJECT_CALC_ENABLE:
954  case INS_PROP_CAP_OBJECT_CALC_CATEGORY:
955  case INS_PROP_CAP_OBJECT_CALC_NUMBERING:
956  case INS_PROP_CAP_OBJECT_CALC_NUMBERINGSEPARATOR:
957  case INS_PROP_CAP_OBJECT_CALC_CAPTIONTEXT:
958  case INS_PROP_CAP_OBJECT_CALC_DELIMITER:
959  case INS_PROP_CAP_OBJECT_CALC_LEVEL:
960  case INS_PROP_CAP_OBJECT_CALC_POSITION:
961  case INS_PROP_CAP_OBJECT_CALC_CHARACTERSTYLE:
962  case INS_PROP_CAP_OBJECT_CALC_APPLYATTRIBUTES:
963  if(!pOLECalcOpt)
964  {
965  pOLECalcOpt = new InsCaptionOpt(OLE_CAP, &m_aGlobalNames[GLOB_NAME_CALC]);
966  m_pCapOptions->Insert(pOLECalcOpt);
967  }
968  lcl_ReadOpt(*pOLECalcOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_CALC_ENABLE);
969  break;
970  case INS_PROP_CAP_OBJECT_IMPRESS_ENABLE:
971  case INS_PROP_CAP_OBJECT_IMPRESS_CATEGORY:
972  case INS_PROP_CAP_OBJECT_IMPRESS_NUMBERING:
973  case INS_PROP_CAP_OBJECT_IMPRESS_NUMBERINGSEPARATOR:
974  case INS_PROP_CAP_OBJECT_IMPRESS_CAPTIONTEXT:
975  case INS_PROP_CAP_OBJECT_IMPRESS_DELIMITER:
976  case INS_PROP_CAP_OBJECT_IMPRESS_LEVEL:
977  case INS_PROP_CAP_OBJECT_IMPRESS_POSITION:
978  case INS_PROP_CAP_OBJECT_IMPRESS_CHARACTERSTYLE:
979  case INS_PROP_CAP_OBJECT_IMPRESS_APPLYATTRIBUTES:
980  if(!pOLEImpressOpt)
981  {
982  pOLEImpressOpt = new InsCaptionOpt(OLE_CAP, &m_aGlobalNames[GLOB_NAME_IMPRESS]);
983  m_pCapOptions->Insert(pOLEImpressOpt);
984  }
985  lcl_ReadOpt(*pOLEImpressOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_IMPRESS_ENABLE);
986  break;
987  case INS_PROP_CAP_OBJECT_CHART_ENABLE:
988  case INS_PROP_CAP_OBJECT_CHART_CATEGORY:
989  case INS_PROP_CAP_OBJECT_CHART_NUMBERING:
990  case INS_PROP_CAP_OBJECT_CHART_NUMBERINGSEPARATOR:
991  case INS_PROP_CAP_OBJECT_CHART_CAPTIONTEXT:
992  case INS_PROP_CAP_OBJECT_CHART_DELIMITER:
993  case INS_PROP_CAP_OBJECT_CHART_LEVEL:
994  case INS_PROP_CAP_OBJECT_CHART_POSITION:
995  case INS_PROP_CAP_OBJECT_CHART_CHARACTERSTYLE:
996  case INS_PROP_CAP_OBJECT_CHART_APPLYATTRIBUTES:
997  if(!pOLEChartOpt)
998  {
999  pOLEChartOpt = new InsCaptionOpt(OLE_CAP, &m_aGlobalNames[GLOB_NAME_CHART]);
1000  m_pCapOptions->Insert(pOLEChartOpt);
1001  }
1002  lcl_ReadOpt(*pOLEChartOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_CHART_ENABLE);
1003  break;
1004  case INS_PROP_CAP_OBJECT_FORMULA_ENABLE:
1005  case INS_PROP_CAP_OBJECT_FORMULA_CATEGORY:
1006  case INS_PROP_CAP_OBJECT_FORMULA_NUMBERING:
1007  case INS_PROP_CAP_OBJECT_FORMULA_NUMBERINGSEPARATOR:
1008  case INS_PROP_CAP_OBJECT_FORMULA_CAPTIONTEXT:
1009  case INS_PROP_CAP_OBJECT_FORMULA_DELIMITER:
1010  case INS_PROP_CAP_OBJECT_FORMULA_LEVEL:
1011  case INS_PROP_CAP_OBJECT_FORMULA_POSITION:
1012  case INS_PROP_CAP_OBJECT_FORMULA_CHARACTERSTYLE:
1013  case INS_PROP_CAP_OBJECT_FORMULA_APPLYATTRIBUTES:
1014  if(!pOLEFormulaOpt)
1015  {
1016  pOLEFormulaOpt = new InsCaptionOpt(OLE_CAP, &m_aGlobalNames[GLOB_NAME_MATH]);
1017  m_pCapOptions->Insert(pOLEFormulaOpt);
1018  }
1019  lcl_ReadOpt(*pOLEFormulaOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FORMULA_ENABLE);
1020  break;
1021  case INS_PROP_CAP_OBJECT_DRAW_ENABLE:
1022  case INS_PROP_CAP_OBJECT_DRAW_CATEGORY:
1023  case INS_PROP_CAP_OBJECT_DRAW_NUMBERING:
1024  case INS_PROP_CAP_OBJECT_DRAW_NUMBERINGSEPARATOR:
1025  case INS_PROP_CAP_OBJECT_DRAW_CAPTIONTEXT:
1026  case INS_PROP_CAP_OBJECT_DRAW_DELIMITER:
1027  case INS_PROP_CAP_OBJECT_DRAW_LEVEL:
1028  case INS_PROP_CAP_OBJECT_DRAW_POSITION:
1029  case INS_PROP_CAP_OBJECT_DRAW_CHARACTERSTYLE:
1030  case INS_PROP_CAP_OBJECT_DRAW_APPLYATTRIBUTES:
1031  if(!pOLEDrawOpt)
1032  {
1033  pOLEDrawOpt = new InsCaptionOpt(OLE_CAP, &m_aGlobalNames[GLOB_NAME_DRAW]);
1034  m_pCapOptions->Insert(pOLEDrawOpt);
1035  }
1036  lcl_ReadOpt(*pOLEDrawOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_DRAW_ENABLE);
1037  break;
1038  case INS_PROP_CAP_OBJECT_OLEMISC_ENABLE:
1039  case INS_PROP_CAP_OBJECT_OLEMISC_CATEGORY:
1040  case INS_PROP_CAP_OBJECT_OLEMISC_NUMBERING:
1041  case INS_PROP_CAP_OBJECT_OLEMISC_NUMBERINGSEPARATOR:
1042  case INS_PROP_CAP_OBJECT_OLEMISC_CAPTIONTEXT:
1043  case INS_PROP_CAP_OBJECT_OLEMISC_DELIMITER:
1044  case INS_PROP_CAP_OBJECT_OLEMISC_LEVEL:
1045  case INS_PROP_CAP_OBJECT_OLEMISC_POSITION:
1046  case INS_PROP_CAP_OBJECT_OLEMISC_CHARACTERSTYLE:
1047  case INS_PROP_CAP_OBJECT_OLEMISC_APPLYATTRIBUTES:
1048  if(!m_pOLEMiscOpt)
1049  {
1050  m_pOLEMiscOpt.reset(new InsCaptionOpt(OLE_CAP));
1051  }
1052  lcl_ReadOpt(*m_pOLEMiscOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_OLEMISC_ENABLE);
1053  break;
1054  }
1055  }
1056  else if (nProp == INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST)
1057  {
1059  }
1060 
1061  }
1062  m_aInsTableOpts.mnInsMode = nInsTableFlags;
1063 }
1064 
1066 {
1067  static Sequence<OUString> const aNames
1068  {
1069  "Shift/Row", // 0
1070  "Shift/Column", // 1
1071  "Insert/Row", // 2
1072  "Insert/Column", // 3
1073  "Change/Effect", // 4
1074  "Input/NumberRecognition", // 5
1075  "Input/NumberFormatRecognition",// 6
1076  "Input/Alignment", // 7
1077  "Input/SplitVerticalByDefault" // 8
1078  };
1079  return aNames;
1080 }
1081 
1083  : ConfigItem(bWeb ? OUString("Office.WriterWeb/Table") : OUString("Office.Writer/Table"),
1085  , m_nTableHMove(0)
1086  , m_nTableVMove(0)
1087  , m_nTableHInsert(0)
1088  , m_nTableVInsert(0)
1089  , m_eTableChgMode(TableChgMode::FixedWidthChangeAbs)
1090  , m_bInsTableFormatNum(false)
1091  , m_bInsTableChangeNumFormat(false)
1092  , m_bInsTableAlignNum(false)
1093  , m_bSplitVerticalByDefault(false)
1094 {
1095  Load();
1096 }
1097 
1099 {
1100 }
1101 
1102 void SwTableConfig::Notify( const css::uno::Sequence< OUString >& ) {}
1103 
1105 {
1106  const Sequence<OUString>& aNames = GetPropertyNames();
1107  Sequence<Any> aValues(aNames.getLength());
1108  Any* pValues = aValues.getArray();
1109 
1110  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
1111  {
1112  switch(nProp)
1113  {
1114  case 0 : pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(m_nTableHMove)); break; //"Shift/Row",
1115  case 1 : pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(m_nTableVMove)); break; //"Shift/Column",
1116  case 2 : pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(m_nTableHInsert)); break; //"Insert/Row",
1117  case 3 : pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(m_nTableVInsert)); break; //"Insert/Column",
1118  case 4 : pValues[nProp] <<= static_cast<sal_Int32>(m_eTableChgMode); break; //"Change/Effect",
1119  case 5 : pValues[nProp] <<= m_bInsTableFormatNum; break; //"Input/NumberRecognition",
1120  case 6 : pValues[nProp] <<= m_bInsTableChangeNumFormat; break; //"Input/NumberFormatRecognition",
1121  case 7 : pValues[nProp] <<= m_bInsTableAlignNum; break; //"Input/Alignment"
1122  case 8 : pValues[nProp] <<= m_bSplitVerticalByDefault; break; //"Input/SplitVerticalByDefault"
1123  }
1124  }
1125  PutProperties(aNames, aValues);
1126 }
1127 
1129 {
1130  const Sequence<OUString>& aNames = GetPropertyNames();
1131  Sequence<Any> aValues = GetProperties(aNames);
1132  const Any* pValues = aValues.getConstArray();
1133  assert(aValues.getLength() == aNames.getLength());
1134  for (sal_Int32 nProp = 0; nProp < aNames.getLength(); ++nProp)
1135  {
1136  if (pValues[nProp].hasValue())
1137  {
1138  sal_Int32 nTemp = 0;
1139  switch (nProp)
1140  {
1141  case 0 : pValues[nProp] >>= nTemp; m_nTableHMove = static_cast<sal_uInt16>(convertMm100ToTwip(nTemp)); break; //"Shift/Row",
1142  case 1 : pValues[nProp] >>= nTemp; m_nTableVMove = static_cast<sal_uInt16>(convertMm100ToTwip(nTemp)); break; //"Shift/Column",
1143  case 2 : pValues[nProp] >>= nTemp; m_nTableHInsert = static_cast<sal_uInt16>(convertMm100ToTwip(nTemp)); break; //"Insert/Row",
1144  case 3 : pValues[nProp] >>= nTemp; m_nTableVInsert = static_cast<sal_uInt16>(convertMm100ToTwip(nTemp)); break; //"Insert/Column",
1145  case 4 : pValues[nProp] >>= nTemp; m_eTableChgMode = static_cast<TableChgMode>(nTemp); break; //"Change/Effect",
1146  case 5 : m_bInsTableFormatNum = *o3tl::doAccess<bool>(pValues[nProp]); break; //"Input/NumberRecognition",
1147  case 6 : m_bInsTableChangeNumFormat = *o3tl::doAccess<bool>(pValues[nProp]); break; //"Input/NumberFormatRecognition",
1148  case 7 : m_bInsTableAlignNum = *o3tl::doAccess<bool>(pValues[nProp]); break; //"Input/Alignment"
1149  case 8 : m_bSplitVerticalByDefault = *o3tl::doAccess<bool>(pValues[nProp]); break; //"Input/SplitVerticalByDefault"
1150  }
1151  }
1152  }
1153 }
1154 
1156  ConfigItem("Office.Writer", ConfigItemMode::ReleaseTree),
1157  m_bDefaultFontsInCurrDocOnly(false),
1158  m_bShowIndexPreview(false),
1159  m_bGrfToGalleryAsLnk(true),
1160  m_bNumAlignSize(true),
1161  m_bSinglePrintJob(false),
1162  m_bIsNameFromColumn(true),
1163  m_bAskForMailMergeInPrint(true),
1164  m_nMailingFormats(MailTextFormats::NONE)
1165 {
1166  Load();
1167 }
1168 
1170 {
1171 }
1172 
1174 {
1175  static Sequence<OUString> const aNames
1176  {
1177  "Statistics/WordNumber/Delimiter", // 0
1178  "DefaultFont/Document", // 1
1179  "Index/ShowPreview", // 2
1180  "Misc/GraphicToGalleryAsLink", // 3
1181  "Numbering/Graphic/KeepRatio", // 4
1182  "FormLetter/PrintOutput/SinglePrintJobs", // 5
1183  "FormLetter/MailingOutput/Format", // 6
1184  "FormLetter/FileOutput/FileName/FromDatabaseField", // 7
1185  "FormLetter/FileOutput/Path", // 8
1186  "FormLetter/FileOutput/FileName/FromManualSetting", // 9
1187  "FormLetter/FileOutput/FileName/Generation",//10
1188  "FormLetter/PrintOutput/AskForMerge" //11
1189  };
1190  return aNames;
1191 }
1192 
1193 void SwMiscConfig::Notify( const css::uno::Sequence< OUString >& ) {}
1194 
1196 {
1197  const Sequence<OUString>& aNames = GetPropertyNames();
1198  Sequence<Any> aValues(aNames.getLength());
1199  Any* pValues = aValues.getArray();
1200 
1201  for(int nProp = 0; nProp < aNames.getLength(); nProp++)
1202  {
1203  switch(nProp)
1204  {
1205  case 0 :
1206  pValues[nProp] <<=
1208  break;
1209  case 1 : pValues[nProp] <<= m_bDefaultFontsInCurrDocOnly; break;
1210  case 2 : pValues[nProp] <<= m_bShowIndexPreview; break;
1211  case 3 : pValues[nProp] <<= m_bGrfToGalleryAsLnk; break;
1212  case 4 : pValues[nProp] <<= m_bNumAlignSize; break;
1213  case 5 : pValues[nProp] <<= m_bSinglePrintJob; break;
1214  case 6 : pValues[nProp] <<= static_cast<sal_Int32>(m_nMailingFormats); break;
1215  case 7 : pValues[nProp] <<= m_sNameFromColumn; break;
1216  case 8 : pValues[nProp] <<= m_sMailingPath; break;
1217  case 9 : pValues[nProp] <<= m_sMailName; break;
1218  case 10: pValues[nProp] <<= m_bIsNameFromColumn; break;
1219  case 11: pValues[nProp] <<= m_bAskForMailMergeInPrint; break;
1220  }
1221  }
1222  PutProperties(aNames, aValues);
1223 }
1224 
1226 {
1227  const Sequence<OUString>& aNames = GetPropertyNames();
1228  Sequence<Any> aValues = GetProperties(aNames);
1229  const Any* pValues = aValues.getConstArray();
1230  assert(aValues.getLength() == aNames.getLength());
1231  OUString sTmp;
1232  for (sal_Int32 nProp = 0; nProp < aNames.getLength(); ++nProp)
1233  {
1234  if (pValues[nProp].hasValue())
1235  {
1236  switch (nProp)
1237  {
1238  case 0 : pValues[nProp] >>= sTmp;
1240  break;
1241  case 1 : m_bDefaultFontsInCurrDocOnly = *o3tl::doAccess<bool>(pValues[nProp]); break;
1242  case 2 : m_bShowIndexPreview = *o3tl::doAccess<bool>(pValues[nProp]); break;
1243  case 3 : m_bGrfToGalleryAsLnk = *o3tl::doAccess<bool>(pValues[nProp]); break;
1244  case 4 : m_bNumAlignSize = *o3tl::doAccess<bool>(pValues[nProp]); break;
1245  case 5 : m_bSinglePrintJob = *o3tl::doAccess<bool>(pValues[nProp]); break;
1246  case 6 : m_nMailingFormats = static_cast<MailTextFormats>(*o3tl::doAccess<sal_Int32>(pValues[nProp])); break;
1247  case 7 : pValues[nProp] >>= sTmp; m_sNameFromColumn = sTmp; break;
1248  case 8 : pValues[nProp] >>= sTmp; m_sMailingPath = sTmp; break;
1249  case 9 : pValues[nProp] >>= sTmp; m_sMailName = sTmp; break;
1250  case 10: m_bIsNameFromColumn = *o3tl::doAccess<bool>(pValues[nProp]); break;
1251  case 11: pValues[nProp] >>= m_bAskForMailMergeInPrint; break;
1252  }
1253  }
1254  }
1255 }
1256 
1258 {
1259  static Sequence<OUString> const aNames
1260  {
1261  "Mode", // 0
1262  "UseRSID", // 1
1263  "IgnorePieces", // 2
1264  "IgnoreLength", // 3
1265  "StoreRSID" // 4
1266  };
1267  return aNames;
1268 }
1269 
1271  ConfigItem("Office.Writer/Comparison", ConfigItemMode::ReleaseTree)
1272  ,m_bStoreRsid(true)
1273 {
1275  m_bUseRsid = false;
1276  m_bIgnorePieces = false;
1277  m_nPieceLen = 1;
1278 
1279  Load();
1280 }
1281 
1283 {
1284 }
1285 
1287 {
1288  const Sequence<OUString>& aNames = GetPropertyNames();
1289  Sequence<Any> aValues(aNames.getLength());
1290  Any* pValues = aValues.getArray();
1291 
1292  pValues[0] <<= static_cast<sal_Int16>(m_eCmpMode);
1293  pValues[1] <<= m_bUseRsid;
1294  pValues[2] <<= m_bIgnorePieces;
1295  pValues[3] <<= static_cast<sal_Int16>(m_nPieceLen);
1296  pValues[4] <<= m_bStoreRsid;
1297 
1298  PutProperties(aNames, aValues);
1299 }
1300 
1302 {
1303  const Sequence<OUString>& aNames = GetPropertyNames();
1304  Sequence<Any> aValues = GetProperties(aNames);
1305  const Any* pValues = aValues.getConstArray();
1306  assert(aValues.getLength() == aNames.getLength());
1307  for (sal_Int32 nProp = 0; nProp < aNames.getLength(); nProp++)
1308  {
1309  if (pValues[nProp].hasValue())
1310  {
1311  sal_Int32 nVal = 0;
1312  pValues[nProp] >>= nVal;
1313 
1314  switch(nProp)
1315  {
1316  case 0 : m_eCmpMode = static_cast<SwCompareMode>(nVal); break;
1317  case 1 : m_bUseRsid = *o3tl::doAccess<bool>(pValues[nProp]); break;
1318  case 2 : m_bIgnorePieces = *o3tl::doAccess<bool>(pValues[nProp]); break;
1319  case 3 : m_nPieceLen = nVal; break;
1320  case 4 : m_bStoreRsid = *o3tl::doAccess<bool>(pValues[nProp]); break;
1321  }
1322  }
1323  }
1324 }
1325 
1326 /* 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:37
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:1173
#define GLOB_NAME_MATH
Definition: modcfg.cxx:39
static sal_Int32 lcl_ConvertAttrToCfg(const AuthorCharAttr &rAttr)
Definition: modcfg.cxx:251
virtual ~SwMiscConfig() override
Definition: modcfg.cxx:1169
ConfigItemMode
#define GLOB_NAME_CHART
Definition: modcfg.cxx:40
#define GLOB_NAME_DRAW
Definition: modcfg.cxx:38
bool & CopyAttributes()
Definition: caption.hxx:83
SwInsertTableFlags mnInsMode
Definition: itabenum.hxx:40
sal_Int64 n
virtual ~SwInsertConfig() override
Definition: modcfg.cxx:579
virtual void ImplCommit() override
Definition: modcfg.cxx:279
sal_Int16 nId
virtual void ImplCommit() override
Definition: modcfg.cxx:604
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:59
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:773
sal_uInt16 sal_Unicode
virtual void ImplCommit() override
Definition: modcfg.cxx:1104
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:277
virtual ~SwTableConfig() override
Definition: modcfg.cxx:1098
SwInsertTableOptions m_aInsTableOpts
Definition: modcfg.hxx:130
STRIKEOUT_SINGLE
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: modcfg.cxx:1193
const css::uno::Sequence< OUString > & GetPropertyNames() const
Definition: modcfg.cxx:457
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:1225
virtual void ImplCommit() override
Definition: modcfg.cxx:1195
OUString m_sMailingPath
Definition: modcfg.hxx:188
SwCapObjType GetObjType() const
Definition: caption.hxx:51
SwInsertConfig(bool bWeb)
Definition: modcfg.cxx:560
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:81
static const css::uno::Sequence< OUString > & GetPropertyNames()
Definition: modcfg.cxx:1065
SvGlobalName m_aGlobalNames[5]
Definition: modcfg.hxx:125
int i
static const css::uno::Sequence< OUString > & GetPropertyNames()
Definition: modcfg.cxx:214
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: modcfg.cxx:602
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:302
LINESTYLE_SINGLE
virtual ~SwCompareConfig() override
Definition: modcfg.cxx:1282
sal_uInt16 m_nTableVMove
Definition: modcfg.hxx:151
virtual void ImplCommit() override
Definition: modcfg.cxx:1286
css::uno::Sequence< css::uno::Any > GetProperties(const css::uno::Sequence< OUString > &rNames)
virtual ~SwRevisionConfig() override
Definition: modcfg.cxx:247
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:131
sal_uInt16 GetPos() const
Definition: caption.hxx:67
InsertConfigProp
Definition: modcfg.cxx:357
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
const PropertyValue * pValues
bool m_bInsTableFormatNum
Definition: modcfg.hxx:156
static const css::uno::Sequence< OUString > & GetPropertyNames()
Definition: modcfg.cxx:1257
MailTextFormats
Definition: modcfg.hxx:38
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: modcfg.cxx:1102
bool m_bIsNameFromColumn
Definition: modcfg.hxx:184
ITALIC_NORMAL
void Load()
Definition: modcfg.cxx:840
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:42
sal_uInt16 m_nMarkAlign
Definition: modcfg.hxx:71
SwTableConfig(bool bWeb)
Definition: modcfg.cxx:1082
void Insert(InsCaptionOpt *pObj)
Definition: modcfg.cxx:54
#define GLOB_NAME_CALC
Definition: modcfg.cxx:36
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:1128
static void lcl_WriteOpt(const InsCaptionOpt &rOpt, Any *pValues, sal_Int32 nProp, sal_Int32 nOffset)
Definition: modcfg.cxx:585
MailTextFormats m_nMailingFormats
Definition: modcfg.hxx:186
#define SO3_SDRAW_CLASSID
OUString m_sNameFromColumn
Definition: modcfg.hxx:187