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