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