update dev300-m58
[ooovba.git] / sw / source / ui / config / modcfg.cxx
blob3f004af14306bbe2366e7e416be4b0669bfb7f04
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: modcfg.cxx,v $
10 * $Revision: 1.32 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sw.hxx"
35 #include <hintids.hxx>
36 #include <sot/clsids.hxx>
37 #include <tools/stream.hxx>
38 #include <vcl/svapp.hxx>
39 #include <goodies/mailenum.hxx>
40 #ifndef _SVX_SVXIDS_HRC //autogen
41 #include <svx/svxids.hrc>
42 #endif
43 #include <svx/svxenum.hxx>
44 #include <tools/debug.hxx>
46 #include <tools/globname.hxx>
47 #include <swtypes.hxx>
48 #include <itabenum.hxx>
49 #ifndef _MODCFG_HXX
50 #include <modcfg.hxx>
51 #endif
52 #include <fldupde.hxx>
53 #include <svtools/syslocaleoptions.hxx>
54 #include <caption.hxx>
55 #include <com/sun/star/uno/Any.hxx>
57 #include <unomid.h>
59 using namespace utl;
60 using rtl::OUString;
61 using namespace com::sun::star::uno;
63 #define GLOB_NAME_CALC 0
64 #define GLOB_NAME_IMPRESS 1
65 #define GLOB_NAME_DRAW 2
66 #define GLOB_NAME_MATH 3
67 #define GLOB_NAME_CHART 4
69 SV_IMPL_PTRARR_SORT(InsCapOptArr, InsCaptionOptPtr)
70 /* -----------------03.11.98 13:46-------------------
72 * --------------------------------------------------*/
73 InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalName *pOleId) const
75 for (USHORT i = 0; i < Count(); i++ )
77 InsCaptionOpt* pObj = GetObject(i);
78 if (pObj->GetObjType() == eType &&
79 (eType != OLE_CAP ||
80 (pOleId &&
81 pObj->GetOleId() == *pOleId)))
82 return pObj;
85 return 0;
88 /* -----------------03.11.98 15:05-------------------
90 * --------------------------------------------------*/
92 const InsCaptionOpt* SwModuleOptions::GetCapOption(
93 BOOL bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
95 if(bHTML)
97 DBG_ERROR("no caption option in sw/web!");
98 return 0;
100 else
102 sal_Bool bFound = FALSE;
103 if(eType == OLE_CAP && pOleId)
105 for( USHORT nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
106 bFound = *pOleId == aInsertConfig.aGlobalNames[nId ];
107 if(!bFound)
108 return aInsertConfig.pOLEMiscOpt;
110 return aInsertConfig.pCapOptions->Find(eType, pOleId);
114 /* -----------------03.11.98 15:05-------------------
116 * --------------------------------------------------*/
118 BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
120 BOOL bRet = FALSE;
122 if(bHTML)
124 DBG_ERROR("no caption option in sw/web!");
126 else if (pOpt)
128 sal_Bool bFound = FALSE;
129 if(pOpt->GetObjType() == OLE_CAP && &pOpt->GetOleId())
131 for( USHORT nId = 0; nId <= GLOB_NAME_CHART; nId++)
132 bFound = pOpt->GetOleId() == aInsertConfig.aGlobalNames[nId ];
133 if(!bFound)
135 if(aInsertConfig.pOLEMiscOpt)
136 *aInsertConfig.pOLEMiscOpt = *pOpt;
137 else
138 aInsertConfig.pOLEMiscOpt = new InsCaptionOpt(*pOpt);
142 InsCaptionOptArr& rArr = *aInsertConfig.pCapOptions;
143 InsCaptionOpt *pObj = rArr.Find(pOpt->GetObjType(), &pOpt->GetOleId());
145 if (pObj)
147 *pObj = *pOpt;
149 else
150 rArr.Insert(new InsCaptionOpt(*pOpt));
152 aInsertConfig.SetModified();
153 bRet = TRUE;
156 return bRet;
158 /*-----------------13.01.97 12.44-------------------
160 --------------------------------------------------*/
161 SwModuleOptions::SwModuleOptions() :
162 aInsertConfig(FALSE),
163 aWebInsertConfig(TRUE),
164 aTableConfig(FALSE),
165 aWebTableConfig(TRUE),
166 bHideFieldTips(FALSE)
169 /* -----------------------------19.01.01 12:26--------------------------------
171 ---------------------------------------------------------------------------*/
172 String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI)
174 String sReturn;
175 if(bFromUI)
177 String sChar;
179 xub_StrLen i = 0;
180 sal_Unicode c;
182 while (i < rDelim.Len())
184 c = rDelim.GetChar(i++);
186 if (c == '\\')
188 c = rDelim.GetChar(i++);
190 switch (c)
192 case 'n': sReturn += '\n'; break;
193 case 't': sReturn += '\t'; break;
194 case '\\': sReturn += '\\'; break;
196 case 'x':
198 sal_Unicode nVal, nChar;
199 BOOL bValidData = TRUE;
200 xub_StrLen n;
201 for( n = 0, nChar = 0; n < 2 && i < rDelim.Len(); ++n, ++i )
203 if( ((nVal = rDelim.GetChar( i )) >= '0') && ( nVal <= '9') )
204 nVal -= '0';
205 else if( (nVal >= 'A') && (nVal <= 'F') )
206 nVal -= 'A' - 10;
207 else if( (nVal >= 'a') && (nVal <= 'f') )
208 nVal -= 'a' - 10;
209 else
211 DBG_ERROR( "ungueltiger Hex-Wert" );
212 bValidData = FALSE;
213 break;
216 (nChar <<= 4 );
217 nChar = nChar + nVal;
219 if( bValidData )
220 sReturn += nChar;
221 break;
224 default: // Unbekannt, daher nur Backslash einfuegen
225 sReturn += '\\';
226 i--;
227 break;
230 else
231 sReturn += c;
234 else
236 for (xub_StrLen i = 0; i < rDelim.Len(); i++)
238 sal_Unicode c = rDelim.GetChar(i);
240 switch (c)
242 case '\n': sReturn.AppendAscii(RTL_CONSTASCII_STRINGPARAM("\\n")); break;
243 case '\t': sReturn.AppendAscii(RTL_CONSTASCII_STRINGPARAM("\\t")); break;
244 case '\\': sReturn.AppendAscii(RTL_CONSTASCII_STRINGPARAM("\\\\")); break;
246 default:
247 if( c <= 0x1f || c >= 0x7f )
249 sReturn.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\\x" ))
250 += String::CreateFromInt32( c, 16 );
252 else
253 sReturn += c;
257 return sReturn;
259 /* -----------------------------10.10.00 16:22--------------------------------
261 ---------------------------------------------------------------------------*/
262 const Sequence<OUString>& SwRevisionConfig::GetPropertyNames()
264 static Sequence<OUString> aNames;
265 if(!aNames.getLength())
267 const int nCount = 8;
268 aNames.realloc(nCount);
269 static const char* aPropNames[] =
271 "TextDisplay/Insert/Attribute", // 0
272 "TextDisplay/Insert/Color", // 1
273 "TextDisplay/Delete/Attribute", // 2
274 "TextDisplay/Delete/Color", // 3
275 "TextDisplay/ChangedAttribute/Attribute", // 4
276 "TextDisplay/ChangedAttribute/Color", // 5
277 "LinesChanged/Mark", // 6
278 "LinesChanged/Color" // 7
280 OUString* pNames = aNames.getArray();
281 for(int i = 0; i < nCount; i++)
282 pNames[i] = OUString::createFromAscii(aPropNames[i]);
284 return aNames;
286 /*-- 10.10.00 16:22:22---------------------------------------------------
288 -----------------------------------------------------------------------*/
289 SwRevisionConfig::SwRevisionConfig() :
290 ConfigItem(C2U("Office.Writer/Revision"),
291 CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE)
293 aInsertAttr.nItemId = SID_ATTR_CHAR_UNDERLINE;
294 aInsertAttr.nAttr = UNDERLINE_SINGLE;
295 aInsertAttr.nColor = COL_TRANSPARENT;
296 aDeletedAttr.nItemId = SID_ATTR_CHAR_STRIKEOUT;
297 aDeletedAttr.nAttr = STRIKEOUT_SINGLE;
298 aDeletedAttr.nColor = COL_TRANSPARENT;
299 aFormatAttr.nItemId = SID_ATTR_CHAR_WEIGHT;
300 aFormatAttr.nAttr = WEIGHT_BOLD;
301 aFormatAttr.nColor = COL_BLACK;
303 Load();
305 /*-- 10.10.00 16:22:23---------------------------------------------------
307 -----------------------------------------------------------------------*/
308 SwRevisionConfig::~SwRevisionConfig()
311 /*-- 10.10.00 16:22:56---------------------------------------------------
313 -----------------------------------------------------------------------*/
314 sal_Int32 lcl_ConvertAttrToCfg(const AuthorCharAttr& rAttr)
316 sal_Int32 nRet = 0;
317 switch(rAttr.nItemId)
319 case SID_ATTR_CHAR_WEIGHT: nRet = 1; break;
320 case SID_ATTR_CHAR_POSTURE: nRet = 2; break;
321 case SID_ATTR_CHAR_UNDERLINE: nRet = UNDERLINE_SINGLE == rAttr.nAttr ? 3 : 4; break;
322 case SID_ATTR_CHAR_STRIKEOUT: nRet = 3; break;
323 case SID_ATTR_CHAR_CASEMAP:
325 switch(rAttr.nAttr)
327 case SVX_CASEMAP_VERSALIEN : nRet = 5;break;
328 case SVX_CASEMAP_GEMEINE : nRet = 6;break;
329 case SVX_CASEMAP_KAPITAELCHEN: nRet = 7;break;
330 case SVX_CASEMAP_TITEL : nRet = 8;break;
333 break;
334 case SID_ATTR_BRUSH : nRet = 9; break;
336 return nRet;
338 //-----------------------------------------------------------------------------
339 void SwRevisionConfig::Commit()
341 const Sequence<OUString>& aNames = GetPropertyNames();
342 Sequence<Any> aValues(aNames.getLength());
343 Any* pValues = aValues.getArray();
345 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
347 sal_Int32 nVal = -1;
348 switch(nProp)
350 case 0 : nVal = lcl_ConvertAttrToCfg(aInsertAttr); break;
351 case 1 : nVal = aInsertAttr.nColor ; break;
352 case 2 : nVal = lcl_ConvertAttrToCfg(aDeletedAttr); break;
353 case 3 : nVal = aDeletedAttr.nColor ; break;
354 case 4 : nVal = lcl_ConvertAttrToCfg(aFormatAttr); break;
355 case 5 : nVal = aFormatAttr.nColor ; break;
356 case 6 : nVal = nMarkAlign ; break;
357 case 7 : nVal = aMarkColor.GetColor(); break;
359 pValues[nProp] <<= nVal;
361 PutProperties(aNames, aValues);
363 /*-- 10.10.00 16:22:56---------------------------------------------------
365 -----------------------------------------------------------------------*/
366 void lcl_ConvertCfgToAttr(sal_Int32 nVal, AuthorCharAttr& rAttr, sal_Bool bDelete = sal_False)
368 rAttr.nItemId = rAttr.nAttr = 0;
369 switch(nVal)
371 case 1: rAttr.nItemId = SID_ATTR_CHAR_WEIGHT; rAttr.nAttr = WEIGHT_BOLD ; break;
372 case 2: rAttr.nItemId = SID_ATTR_CHAR_POSTURE; rAttr.nAttr = ITALIC_NORMAL ; break;
373 case 3: if(bDelete)
375 rAttr.nItemId = SID_ATTR_CHAR_STRIKEOUT;
376 rAttr.nAttr = STRIKEOUT_SINGLE;
378 else
380 rAttr.nItemId = SID_ATTR_CHAR_UNDERLINE;
381 rAttr.nAttr = UNDERLINE_SINGLE;
383 break;
384 case 4: rAttr.nItemId = SID_ATTR_CHAR_UNDERLINE;rAttr.nAttr = UNDERLINE_DOUBLE ; break;
385 case 5: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.nAttr = SVX_CASEMAP_VERSALIEN ; break;
386 case 6: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.nAttr = SVX_CASEMAP_GEMEINE ; break;
387 case 7: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.nAttr = SVX_CASEMAP_KAPITAELCHEN ; break;
388 case 8: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.nAttr = SVX_CASEMAP_TITEL ; break;
389 case 9: rAttr.nItemId = SID_ATTR_BRUSH; break;
392 void SwRevisionConfig::Load()
394 const Sequence<OUString>& aNames = GetPropertyNames();
395 Sequence<Any> aValues = GetProperties(aNames);
396 const Any* pValues = aValues.getConstArray();
397 DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
398 if(aValues.getLength() == aNames.getLength())
400 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
402 if(pValues[nProp].hasValue())
404 sal_Int32 nVal = 0;
405 pValues[nProp] >>= nVal;
406 switch(nProp)
408 case 0 : lcl_ConvertCfgToAttr(nVal, aInsertAttr); break;
409 case 1 : aInsertAttr.nColor = nVal; break;
410 case 2 : lcl_ConvertCfgToAttr(nVal, aDeletedAttr, sal_True); break;
411 case 3 : aDeletedAttr.nColor = nVal; break;
412 case 4 : lcl_ConvertCfgToAttr(nVal, aFormatAttr); break;
413 case 5 : aFormatAttr.nColor = nVal; break;
414 case 6 : nMarkAlign = sal::static_int_cast< sal_uInt16, sal_Int32>(nVal); break;
415 case 7 : aMarkColor.SetColor(nVal); break;
421 /* -----------------------------10.10.00 16:22--------------------------------
423 ---------------------------------------------------------------------------*/
424 enum InsertConfigProp
426 INS_PROP_TABLE_HEADER = 0,
427 INS_PROP_TABLE_REPEATHEADER, // 1
428 INS_PROP_TABLE_BORDER, // 2
429 INS_PROP_TABLE_SPLIT, // 3 from here not in writer/web
430 INS_PROP_CAP_AUTOMATIC, // 4
431 INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST, // 5
432 INS_PROP_CAP_OBJECT_TABLE_ENABLE, // 6
433 INS_PROP_CAP_OBJECT_TABLE_CATEGORY, // 7
434 INS_PROP_CAP_OBJECT_TABLE_NUMBERING, // 8
435 INS_PROP_CAP_OBJECT_TABLE_NUMBERINGSEPARATOR, // 9
436 INS_PROP_CAP_OBJECT_TABLE_CAPTIONTEXT, //10
437 INS_PROP_CAP_OBJECT_TABLE_DELIMITER, //11
438 INS_PROP_CAP_OBJECT_TABLE_LEVEL, //12
439 INS_PROP_CAP_OBJECT_TABLE_POSITION, //13
440 INS_PROP_CAP_OBJECT_TABLE_CHARACTERSTYLE, //14
441 INS_PROP_CAP_OBJECT_FRAME_ENABLE, //15
442 INS_PROP_CAP_OBJECT_FRAME_CATEGORY, //16
443 INS_PROP_CAP_OBJECT_FRAME_NUMBERING, //17
444 INS_PROP_CAP_OBJECT_FRAME_NUMBERINGSEPARATOR, //18
445 INS_PROP_CAP_OBJECT_FRAME_CAPTIONTEXT, //19
446 INS_PROP_CAP_OBJECT_FRAME_DELIMITER, //20
447 INS_PROP_CAP_OBJECT_FRAME_LEVEL, //21
448 INS_PROP_CAP_OBJECT_FRAME_POSITION, //22
449 INS_PROP_CAP_OBJECT_FRAME_CHARACTERSTYLE, //23
450 INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE, //24
451 INS_PROP_CAP_OBJECT_GRAPHIC_CATEGORY, //25
452 INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERING, //26
453 INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERINGSEPARATOR, //27
454 INS_PROP_CAP_OBJECT_GRAPHIC_CAPTIONTEXT, //28
455 INS_PROP_CAP_OBJECT_GRAPHIC_DELIMITER, //29
456 INS_PROP_CAP_OBJECT_GRAPHIC_LEVEL, //30
457 INS_PROP_CAP_OBJECT_GRAPHIC_POSITION, //31
458 INS_PROP_CAP_OBJECT_GRAPHIC_CHARACTERSTYLE, //32
459 INS_PROP_CAP_OBJECT_GRAPHIC_APPLYATTRIBUTES, //33
460 INS_PROP_CAP_OBJECT_CALC_ENABLE, //34
461 INS_PROP_CAP_OBJECT_CALC_CATEGORY, //35
462 INS_PROP_CAP_OBJECT_CALC_NUMBERING, //36
463 INS_PROP_CAP_OBJECT_CALC_NUMBERINGSEPARATOR, //37
464 INS_PROP_CAP_OBJECT_CALC_CAPTIONTEXT, //38
465 INS_PROP_CAP_OBJECT_CALC_DELIMITER, //39
466 INS_PROP_CAP_OBJECT_CALC_LEVEL, //40
467 INS_PROP_CAP_OBJECT_CALC_POSITION, //41
468 INS_PROP_CAP_OBJECT_CALC_CHARACTERSTYLE, //42
469 INS_PROP_CAP_OBJECT_CALC_APPLYATTRIBUTES, //43
470 INS_PROP_CAP_OBJECT_IMPRESS_ENABLE, //44
471 INS_PROP_CAP_OBJECT_IMPRESS_CATEGORY, //45
472 INS_PROP_CAP_OBJECT_IMPRESS_NUMBERING, //46
473 INS_PROP_CAP_OBJECT_IMPRESS_NUMBERINGSEPARATOR, //47
474 INS_PROP_CAP_OBJECT_IMPRESS_CAPTIONTEXT, //48
475 INS_PROP_CAP_OBJECT_IMPRESS_DELIMITER, //49
476 INS_PROP_CAP_OBJECT_IMPRESS_LEVEL, //50
477 INS_PROP_CAP_OBJECT_IMPRESS_POSITION, //51
478 INS_PROP_CAP_OBJECT_IMPRESS_CHARACTERSTYLE, //52
479 INS_PROP_CAP_OBJECT_IMPRESS_APPLYATTRIBUTES, //53
480 INS_PROP_CAP_OBJECT_CHART_ENABLE, //54
481 INS_PROP_CAP_OBJECT_CHART_CATEGORY, //55
482 INS_PROP_CAP_OBJECT_CHART_NUMBERING, //56
483 INS_PROP_CAP_OBJECT_CHART_NUMBERINGSEPARATOR, //57
484 INS_PROP_CAP_OBJECT_CHART_CAPTIONTEXT, //58
485 INS_PROP_CAP_OBJECT_CHART_DELIMITER, //59
486 INS_PROP_CAP_OBJECT_CHART_LEVEL, //60
487 INS_PROP_CAP_OBJECT_CHART_POSITION, //61
488 INS_PROP_CAP_OBJECT_CHART_CHARACTERSTYLE, //62
489 INS_PROP_CAP_OBJECT_CHART_APPLYATTRIBUTES, //63
490 INS_PROP_CAP_OBJECT_FORMULA_ENABLE, //64
491 INS_PROP_CAP_OBJECT_FORMULA_CATEGORY, //65
492 INS_PROP_CAP_OBJECT_FORMULA_NUMBERING, //66
493 INS_PROP_CAP_OBJECT_FORMULA_NUMBERINGSEPARATOR, //67
494 INS_PROP_CAP_OBJECT_FORMULA_CAPTIONTEXT, //68
495 INS_PROP_CAP_OBJECT_FORMULA_DELIMITER, //69
496 INS_PROP_CAP_OBJECT_FORMULA_LEVEL, //70
497 INS_PROP_CAP_OBJECT_FORMULA_POSITION, //71
498 INS_PROP_CAP_OBJECT_FORMULA_CHARACTERSTYLE, //72
499 INS_PROP_CAP_OBJECT_FORMULA_APPLYATTRIBUTES, //73
500 INS_PROP_CAP_OBJECT_DRAW_ENABLE, //74
501 INS_PROP_CAP_OBJECT_DRAW_CATEGORY, //75
502 INS_PROP_CAP_OBJECT_DRAW_NUMBERING, //76
503 INS_PROP_CAP_OBJECT_DRAW_NUMBERINGSEPARATOR, //77
504 INS_PROP_CAP_OBJECT_DRAW_CAPTIONTEXT, //78
505 INS_PROP_CAP_OBJECT_DRAW_DELIMITER, //79
506 INS_PROP_CAP_OBJECT_DRAW_LEVEL, //80
507 INS_PROP_CAP_OBJECT_DRAW_POSITION, //81
508 INS_PROP_CAP_OBJECT_DRAW_CHARACTERSTYLE, //82
509 INS_PROP_CAP_OBJECT_DRAW_APPLYATTRIBUTES, //83
510 INS_PROP_CAP_OBJECT_OLEMISC_ENABLE, //84
511 INS_PROP_CAP_OBJECT_OLEMISC_CATEGORY, //85
512 INS_PROP_CAP_OBJECT_OLEMISC_NUMBERING, //86
513 INS_PROP_CAP_OBJECT_OLEMISC_NUMBERINGSEPARATOR, //87
514 INS_PROP_CAP_OBJECT_OLEMISC_CAPTIONTEXT, //88
515 INS_PROP_CAP_OBJECT_OLEMISC_DELIMITER, //89
516 INS_PROP_CAP_OBJECT_OLEMISC_LEVEL, //90
517 INS_PROP_CAP_OBJECT_OLEMISC_POSITION, //91
518 INS_PROP_CAP_OBJECT_OLEMISC_CHARACTERSTYLE, //92
519 INS_PROP_CAP_OBJECT_OLEMISC_APPLYATTRIBUTES //93
521 const Sequence<OUString>& SwInsertConfig::GetPropertyNames()
523 static Sequence<OUString> aNames;
524 static Sequence<OUString> aWebNames;
525 if(!aNames.getLength())
527 static const char* aPropNames[] =
529 "Table/Header", // 0
530 "Table/RepeatHeader", // 1
531 "Table/Border", // 2
532 "Table/Split", // 3 from here not in writer/web
533 "Caption/Automatic", // 4
534 "Caption/CaptionOrderNumberingFirst", // 5
535 "Caption/WriterObject/Table/Enable", // 6
536 "Caption/WriterObject/Table/Settings/Category", // 7
537 "Caption/WriterObject/Table/Settings/Numbering", // 8
538 "Caption/WriterObject/Table/Settings/NumberingSeparator", // 9
539 "Caption/WriterObject/Table/Settings/CaptionText", //10
540 "Caption/WriterObject/Table/Settings/Delimiter", //11
541 "Caption/WriterObject/Table/Settings/Level", //12
542 "Caption/WriterObject/Table/Settings/Position", //13
543 "Caption/WriterObject/Table/Settings/CharacterStyle", //14
544 "Caption/WriterObject/Frame/Enable", //15
545 "Caption/WriterObject/Frame/Settings/Category", //16
546 "Caption/WriterObject/Frame/Settings/Numbering", //17
547 "Caption/WriterObject/Frame/Settings/NumberingSeparator", //18
548 "Caption/WriterObject/Frame/Settings/CaptionText", //19
549 "Caption/WriterObject/Frame/Settings/Delimiter", //20
550 "Caption/WriterObject/Frame/Settings/Level", //21
551 "Caption/WriterObject/Frame/Settings/Position", //22
552 "Caption/WriterObject/Frame/Settings/CharacterStyle", //23
553 "Caption/WriterObject/Graphic/Enable", //24
554 "Caption/WriterObject/Graphic/Settings/Category", //25
555 "Caption/WriterObject/Graphic/Settings/Numbering", //26
556 "Caption/WriterObject/Graphic/Settings/NumberingSeparator", //27
557 "Caption/WriterObject/Graphic/Settings/CaptionText", //28
558 "Caption/WriterObject/Graphic/Settings/Delimiter", //29
559 "Caption/WriterObject/Graphic/Settings/Level", //30
560 "Caption/WriterObject/Graphic/Settings/Position", //31
561 "Caption/WriterObject/Graphic/Settings/CharacterStyle", //32
562 "Caption/WriterObject/Graphic/Settings/ApplyAttributes", //33
563 "Caption/OfficeObject/Calc/Enable", //34
564 "Caption/OfficeObject/Calc/Settings/Category", //35
565 "Caption/OfficeObject/Calc/Settings/Numbering", //36
566 "Caption/OfficeObject/Calc/Settings/NumberingSeparator", //37
567 "Caption/OfficeObject/Calc/Settings/CaptionText", //38
568 "Caption/OfficeObject/Calc/Settings/Delimiter", //39
569 "Caption/OfficeObject/Calc/Settings/Level", //40
570 "Caption/OfficeObject/Calc/Settings/Position", //41
571 "Caption/OfficeObject/Calc/Settings/CharacterStyle", //42
572 "Caption/OfficeObject/Calc/Settings/ApplyAttributes", //43
573 "Caption/OfficeObject/Impress/Enable", //44
574 "Caption/OfficeObject/Impress/Settings/Category", //45
575 "Caption/OfficeObject/Impress/Settings/Numbering", //46
576 "Caption/OfficeObject/Impress/Settings/NumberingSeparator", //47
577 "Caption/OfficeObject/Impress/Settings/CaptionText", //48
578 "Caption/OfficeObject/Impress/Settings/Delimiter", //49
579 "Caption/OfficeObject/Impress/Settings/Level", //50
580 "Caption/OfficeObject/Impress/Settings/Position", //51
581 "Caption/OfficeObject/Impress/Settings/CharacterStyle", //52
582 "Caption/OfficeObject/Impress/Settings/ApplyAttributes", //53
583 "Caption/OfficeObject/Chart/Enable", //54
584 "Caption/OfficeObject/Chart/Settings/Category", //55
585 "Caption/OfficeObject/Chart/Settings/Numbering", //56
586 "Caption/OfficeObject/Chart/Settings/NumberingSeparator", //57
587 "Caption/OfficeObject/Chart/Settings/CaptionText", //58
588 "Caption/OfficeObject/Chart/Settings/Delimiter", //59
589 "Caption/OfficeObject/Chart/Settings/Level", //60
590 "Caption/OfficeObject/Chart/Settings/Position", //61
591 "Caption/OfficeObject/Chart/Settings/CharacterStyle", //62
592 "Caption/OfficeObject/Chart/Settings/ApplyAttributes", //63
593 "Caption/OfficeObject/Formula/Enable", //64
594 "Caption/OfficeObject/Formula/Settings/Category", //65
595 "Caption/OfficeObject/Formula/Settings/Numbering", //66
596 "Caption/OfficeObject/Formula/Settings/NumberingSeparator", //67
597 "Caption/OfficeObject/Formula/Settings/CaptionText", //68
598 "Caption/OfficeObject/Formula/Settings/Delimiter", //69
599 "Caption/OfficeObject/Formula/Settings/Level", //70
600 "Caption/OfficeObject/Formula/Settings/Position", //71
601 "Caption/OfficeObject/Formula/Settings/CharacterStyle", //72
602 "Caption/OfficeObject/Formula/Settings/ApplyAttributes", //73
603 "Caption/OfficeObject/Draw/Enable", //74
604 "Caption/OfficeObject/Draw/Settings/Category", //75
605 "Caption/OfficeObject/Draw/Settings/Numbering", //76
606 "Caption/OfficeObject/Draw/Settings/NumberingSeparator", //77
607 "Caption/OfficeObject/Draw/Settings/CaptionText", //78
608 "Caption/OfficeObject/Draw/Settings/Delimiter", //79
609 "Caption/OfficeObject/Draw/Settings/Level", //80
610 "Caption/OfficeObject/Draw/Settings/Position", //81
611 "Caption/OfficeObject/Draw/Settings/CharacterStyle", //82
612 "Caption/OfficeObject/Draw/Settings/ApplyAttributes", //83
613 "Caption/OfficeObject/OLEMisc/Enable", //84
614 "Caption/OfficeObject/OLEMisc/Settings/Category", //85
615 "Caption/OfficeObject/OLEMisc/Settings/Numbering", //86
616 "Caption/OfficeObject/OLEMisc/Settings/NumberingSeparator", //87
617 "Caption/OfficeObject/OLEMisc/Settings/CaptionText", //88
618 "Caption/OfficeObject/OLEMisc/Settings/Delimiter", //89
619 "Caption/OfficeObject/OLEMisc/Settings/Level", //90
620 "Caption/OfficeObject/OLEMisc/Settings/Position", //91
621 "Caption/OfficeObject/OLEMisc/Settings/CharacterStyle", //92
622 "Caption/OfficeObject/OLEMisc/Settings/ApplyAttributes" //93
624 const int nCount = INS_PROP_CAP_OBJECT_OLEMISC_APPLYATTRIBUTES + 1;
625 const int nWebCount = INS_PROP_TABLE_BORDER + 1;
626 aNames.realloc(nCount);
627 aWebNames.realloc(nWebCount);
628 OUString* pNames = aNames.getArray();
629 OUString* pWebNames = aWebNames.getArray();
630 int i;
631 for(i = 0; i < nCount; i++)
632 pNames[i] = C2U(aPropNames[i]);
633 for(i = 0; i < nWebCount; i++)
634 pWebNames[i] = C2U(aPropNames[i]);
636 return bIsWeb ? aWebNames : aNames;
638 /*-- 10.10.00 16:22:22---------------------------------------------------
640 -----------------------------------------------------------------------*/
641 SwInsertConfig::SwInsertConfig(sal_Bool bWeb) :
642 ConfigItem(bWeb ? C2U("Office.WriterWeb/Insert") : C2U("Office.Writer/Insert"),
643 CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
644 pCapOptions(0),
645 pOLEMiscOpt(0),
646 bInsWithCaption( sal_False ),
647 bCaptionOrderNumberingFirst( sal_False ),
648 aInsTblOpts(0,0),
649 bIsWeb(bWeb)
651 aGlobalNames[GLOB_NAME_CALC ] = SvGlobalName(SO3_SC_CLASSID);
652 aGlobalNames[GLOB_NAME_IMPRESS] = SvGlobalName(SO3_SIMPRESS_CLASSID);
653 aGlobalNames[GLOB_NAME_DRAW ] = SvGlobalName(SO3_SDRAW_CLASSID);
654 aGlobalNames[GLOB_NAME_MATH ] = SvGlobalName(SO3_SM_CLASSID);
655 aGlobalNames[GLOB_NAME_CHART ] = SvGlobalName(SO3_SCH_CLASSID);
656 if(!bIsWeb)
657 pCapOptions = new InsCaptionOptArr;
659 Load();
661 /*-- 10.10.00 16:22:23---------------------------------------------------
663 -----------------------------------------------------------------------*/
664 SwInsertConfig::~SwInsertConfig()
666 delete pCapOptions;
667 delete pOLEMiscOpt;
669 /*-- 10.10.00 16:22:56---------------------------------------------------
671 -----------------------------------------------------------------------*/
672 void lcl_WriteOpt(const InsCaptionOpt& rOpt, Any* pValues, sal_Int32 nProp, sal_Int32 nOffset)
674 switch(nOffset)
676 case 0:
678 sal_Bool bTemp = rOpt.UseCaption();
679 pValues[nProp].setValue(&bTemp, ::getBooleanCppuType());
681 break;//Enable
682 case 1: pValues[nProp] <<= OUString(rOpt.GetCategory()); break;//Category
683 case 2: pValues[nProp] <<= (sal_Int32)rOpt.GetNumType(); break;//Numbering",
684 case 3: pValues[nProp] <<= rOpt.GetNumSeparator(); break;//NumberingSeparator",
685 case 4: pValues[nProp] <<= OUString(rOpt.GetCaption()); break;//CaptionText",
686 case 5: pValues[nProp] <<= OUString(rOpt.GetSeparator());break;//Delimiter",
687 case 6: pValues[nProp] <<= (sal_Int32)rOpt.GetLevel(); break;//Level",
688 case 7: pValues[nProp] <<= (sal_Int32)rOpt.GetPos(); break;//Position",
689 case 8: pValues[nProp] <<= (::rtl::OUString&)rOpt.GetCharacterStyle(); break; //CharacterStyle
690 case 9: pValues[nProp] <<= rOpt.CopyAttributes(); break; //ApplyAttributes
693 //-----------------------------------------------------------------------------
694 void SwInsertConfig::Commit()
696 const Sequence<OUString>& aNames = GetPropertyNames();
697 Sequence<Any> aValues(aNames.getLength());
698 Any* pValues = aValues.getArray();
700 const Type& rType = ::getBooleanCppuType();
701 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
703 const InsCaptionOpt* pWriterTableOpt = 0;
704 const InsCaptionOpt* pWriterFrameOpt = 0;
705 const InsCaptionOpt* pWriterGraphicOpt = 0;
706 const InsCaptionOpt* pOLECalcOpt = 0;
707 const InsCaptionOpt* pOLEImpressOpt = 0;
708 const InsCaptionOpt* pOLEChartOpt = 0;
709 const InsCaptionOpt* pOLEFormulaOpt = 0;
710 const InsCaptionOpt* pOLEDrawOpt = 0;
711 if(pCapOptions)
713 pWriterTableOpt = pCapOptions->Find(TABLE_CAP, 0);
714 pWriterFrameOpt = pCapOptions->Find(FRAME_CAP, 0);
715 pWriterGraphicOpt = pCapOptions->Find(GRAPHIC_CAP, 0);
716 pOLECalcOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_CALC]);
717 pOLEImpressOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_IMPRESS]);
718 pOLEDrawOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_DRAW ]);
719 pOLEFormulaOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_MATH ]);
720 pOLEChartOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_CHART ]);
722 switch(nProp)
724 case INS_PROP_TABLE_HEADER:
726 sal_Bool bVal = 0 !=(aInsTblOpts.mnInsMode & tabopts::HEADLINE); pValues[nProp].setValue(&bVal, rType);
728 break;//"Table/Header",
729 case INS_PROP_TABLE_REPEATHEADER:
731 sal_Bool bVal = (aInsTblOpts.mnRowsToRepeat>0); pValues[nProp].setValue(&bVal, rType);
733 break;//"Table/RepeatHeader",
734 case INS_PROP_TABLE_BORDER:
736 sal_Bool bVal = 0 !=(aInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER ); pValues[nProp].setValue(&bVal, rType);
738 break;//"Table/Border",
739 case INS_PROP_TABLE_SPLIT:
741 sal_Bool bVal = 0 !=(aInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT); pValues[nProp].setValue(&bVal, rType);
743 break;//"Table/Split",
744 case INS_PROP_CAP_AUTOMATIC: pValues[nProp].setValue(&bInsWithCaption, rType);break;//"Caption/Automatic",
745 case INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST:
746 pValues[nProp] <<= bCaptionOrderNumberingFirst;
747 break;//"Caption/CaptionOrderNumberingFirst"
749 case INS_PROP_CAP_OBJECT_TABLE_ENABLE:
750 case INS_PROP_CAP_OBJECT_TABLE_CATEGORY:
751 case INS_PROP_CAP_OBJECT_TABLE_NUMBERING:
752 case INS_PROP_CAP_OBJECT_TABLE_NUMBERINGSEPARATOR:
753 case INS_PROP_CAP_OBJECT_TABLE_CAPTIONTEXT:
754 case INS_PROP_CAP_OBJECT_TABLE_DELIMITER:
755 case INS_PROP_CAP_OBJECT_TABLE_LEVEL:
756 case INS_PROP_CAP_OBJECT_TABLE_POSITION:
757 case INS_PROP_CAP_OBJECT_TABLE_CHARACTERSTYLE:
758 if(pWriterTableOpt)
759 lcl_WriteOpt(*pWriterTableOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_TABLE_ENABLE);
760 break;
761 case INS_PROP_CAP_OBJECT_FRAME_ENABLE:
762 case INS_PROP_CAP_OBJECT_FRAME_CATEGORY:
763 case INS_PROP_CAP_OBJECT_FRAME_NUMBERING:
764 case INS_PROP_CAP_OBJECT_FRAME_NUMBERINGSEPARATOR:
765 case INS_PROP_CAP_OBJECT_FRAME_CAPTIONTEXT:
766 case INS_PROP_CAP_OBJECT_FRAME_DELIMITER:
767 case INS_PROP_CAP_OBJECT_FRAME_LEVEL:
768 case INS_PROP_CAP_OBJECT_FRAME_POSITION:
769 case INS_PROP_CAP_OBJECT_FRAME_CHARACTERSTYLE:
770 if(pWriterFrameOpt)
771 lcl_WriteOpt(*pWriterFrameOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FRAME_ENABLE);
772 break;
773 case INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE:
774 case INS_PROP_CAP_OBJECT_GRAPHIC_CATEGORY:
775 case INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERING:
776 case INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERINGSEPARATOR:
777 case INS_PROP_CAP_OBJECT_GRAPHIC_CAPTIONTEXT:
778 case INS_PROP_CAP_OBJECT_GRAPHIC_DELIMITER:
779 case INS_PROP_CAP_OBJECT_GRAPHIC_LEVEL:
780 case INS_PROP_CAP_OBJECT_GRAPHIC_POSITION:
781 case INS_PROP_CAP_OBJECT_GRAPHIC_CHARACTERSTYLE:
782 case INS_PROP_CAP_OBJECT_GRAPHIC_APPLYATTRIBUTES:
783 if(pWriterGraphicOpt)
784 lcl_WriteOpt(*pWriterGraphicOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE);
785 break;
786 case INS_PROP_CAP_OBJECT_CALC_ENABLE:
787 case INS_PROP_CAP_OBJECT_CALC_CATEGORY:
788 case INS_PROP_CAP_OBJECT_CALC_NUMBERING:
789 case INS_PROP_CAP_OBJECT_CALC_NUMBERINGSEPARATOR:
790 case INS_PROP_CAP_OBJECT_CALC_CAPTIONTEXT:
791 case INS_PROP_CAP_OBJECT_CALC_DELIMITER:
792 case INS_PROP_CAP_OBJECT_CALC_LEVEL:
793 case INS_PROP_CAP_OBJECT_CALC_POSITION:
794 case INS_PROP_CAP_OBJECT_CALC_CHARACTERSTYLE:
795 case INS_PROP_CAP_OBJECT_CALC_APPLYATTRIBUTES:
796 if(pOLECalcOpt)
797 lcl_WriteOpt(*pOLECalcOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_CALC_ENABLE);
798 break;
799 case INS_PROP_CAP_OBJECT_IMPRESS_ENABLE:
800 case INS_PROP_CAP_OBJECT_IMPRESS_CATEGORY:
801 case INS_PROP_CAP_OBJECT_IMPRESS_NUMBERING:
802 case INS_PROP_CAP_OBJECT_IMPRESS_NUMBERINGSEPARATOR:
803 case INS_PROP_CAP_OBJECT_IMPRESS_CAPTIONTEXT:
804 case INS_PROP_CAP_OBJECT_IMPRESS_DELIMITER:
805 case INS_PROP_CAP_OBJECT_IMPRESS_LEVEL:
806 case INS_PROP_CAP_OBJECT_IMPRESS_POSITION:
807 case INS_PROP_CAP_OBJECT_IMPRESS_CHARACTERSTYLE:
808 case INS_PROP_CAP_OBJECT_IMPRESS_APPLYATTRIBUTES:
809 if(pOLEImpressOpt)
810 lcl_WriteOpt(*pOLEImpressOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_IMPRESS_ENABLE);
811 break;
812 case INS_PROP_CAP_OBJECT_CHART_ENABLE:
813 case INS_PROP_CAP_OBJECT_CHART_CATEGORY:
814 case INS_PROP_CAP_OBJECT_CHART_NUMBERING:
815 case INS_PROP_CAP_OBJECT_CHART_NUMBERINGSEPARATOR:
816 case INS_PROP_CAP_OBJECT_CHART_CAPTIONTEXT:
817 case INS_PROP_CAP_OBJECT_CHART_DELIMITER:
818 case INS_PROP_CAP_OBJECT_CHART_LEVEL:
819 case INS_PROP_CAP_OBJECT_CHART_POSITION:
820 case INS_PROP_CAP_OBJECT_CHART_CHARACTERSTYLE:
821 case INS_PROP_CAP_OBJECT_CHART_APPLYATTRIBUTES:
822 if(pOLEChartOpt)
823 lcl_WriteOpt(*pOLEChartOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_CHART_ENABLE);
824 break;
825 case INS_PROP_CAP_OBJECT_FORMULA_ENABLE:
826 case INS_PROP_CAP_OBJECT_FORMULA_CATEGORY:
827 case INS_PROP_CAP_OBJECT_FORMULA_NUMBERING:
828 case INS_PROP_CAP_OBJECT_FORMULA_NUMBERINGSEPARATOR:
829 case INS_PROP_CAP_OBJECT_FORMULA_CAPTIONTEXT:
830 case INS_PROP_CAP_OBJECT_FORMULA_DELIMITER:
831 case INS_PROP_CAP_OBJECT_FORMULA_LEVEL:
832 case INS_PROP_CAP_OBJECT_FORMULA_POSITION:
833 case INS_PROP_CAP_OBJECT_FORMULA_CHARACTERSTYLE:
834 case INS_PROP_CAP_OBJECT_FORMULA_APPLYATTRIBUTES:
835 if(pOLEFormulaOpt)
836 lcl_WriteOpt(*pOLEFormulaOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FORMULA_ENABLE);
837 break;
838 case INS_PROP_CAP_OBJECT_DRAW_ENABLE:
839 case INS_PROP_CAP_OBJECT_DRAW_CATEGORY:
840 case INS_PROP_CAP_OBJECT_DRAW_NUMBERING:
841 case INS_PROP_CAP_OBJECT_DRAW_NUMBERINGSEPARATOR:
842 case INS_PROP_CAP_OBJECT_DRAW_CAPTIONTEXT:
843 case INS_PROP_CAP_OBJECT_DRAW_DELIMITER:
844 case INS_PROP_CAP_OBJECT_DRAW_LEVEL:
845 case INS_PROP_CAP_OBJECT_DRAW_POSITION:
846 case INS_PROP_CAP_OBJECT_DRAW_CHARACTERSTYLE:
847 case INS_PROP_CAP_OBJECT_DRAW_APPLYATTRIBUTES:
848 if(pOLEDrawOpt)
849 lcl_WriteOpt(*pOLEDrawOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_DRAW_ENABLE);
850 break;
851 case INS_PROP_CAP_OBJECT_OLEMISC_ENABLE:
852 case INS_PROP_CAP_OBJECT_OLEMISC_CATEGORY:
853 case INS_PROP_CAP_OBJECT_OLEMISC_NUMBERING:
854 case INS_PROP_CAP_OBJECT_OLEMISC_NUMBERINGSEPARATOR:
855 case INS_PROP_CAP_OBJECT_OLEMISC_CAPTIONTEXT:
856 case INS_PROP_CAP_OBJECT_OLEMISC_DELIMITER:
857 case INS_PROP_CAP_OBJECT_OLEMISC_LEVEL:
858 case INS_PROP_CAP_OBJECT_OLEMISC_POSITION:
859 case INS_PROP_CAP_OBJECT_OLEMISC_CHARACTERSTYLE:
860 case INS_PROP_CAP_OBJECT_OLEMISC_APPLYATTRIBUTES:
861 if(pOLEMiscOpt)
862 lcl_WriteOpt(*pOLEMiscOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_OLEMISC_ENABLE);
863 break;
867 PutProperties(aNames, aValues);
869 /*-- 10.10.00 16:22:56---------------------------------------------------
871 -----------------------------------------------------------------------*/
872 void lcl_ReadOpt(InsCaptionOpt& rOpt, const Any* pValues, sal_Int32 nProp, sal_Int32 nOffset)
874 switch(nOffset)
876 case 0:
877 rOpt.UseCaption() = *(sal_Bool*)pValues[nProp].getValue();
878 break;//Enable
879 case 1:
881 OUString sTemp; pValues[nProp] >>= sTemp;
882 rOpt.SetCategory(sTemp);
884 break;//Category
885 case 2:
887 sal_Int32 nTemp = 0;
888 pValues[nProp] >>= nTemp;
889 rOpt.SetNumType(sal::static_int_cast< sal_uInt16, sal_Int32>(nTemp));
891 break;//Numbering",
892 case 3:
894 OUString sTemp; pValues[nProp] >>= sTemp;
895 rOpt.SetNumSeparator(sTemp);
897 break;//NumberingSeparator",
898 case 4:
900 OUString sTemp; pValues[nProp] >>= sTemp;
901 rOpt.SetCaption(sTemp);
903 break;//CaptionText",
904 case 5:
906 OUString sTemp;
907 if(pValues[nProp] >>= sTemp)
908 rOpt.SetSeparator(sTemp);
910 break;//Delimiter",
911 case 6:
913 sal_Int32 nTemp = 0;
914 pValues[nProp] >>= nTemp;
915 rOpt.SetLevel(sal::static_int_cast< sal_uInt16, sal_Int32>(nTemp));
917 break;//Level",
918 case 7:
920 sal_Int32 nTemp = 0;
921 pValues[nProp] >>= nTemp;
922 rOpt.SetPos(sal::static_int_cast< sal_uInt16, sal_Int32>(nTemp));
924 break;//Position",
925 case 8 : //CharacterStyle
927 ::rtl::OUString sTemp; pValues[nProp] >>= sTemp;
928 rOpt.SetCharacterStyle( sTemp );
930 break;
931 case 9 : //ApplyAttributes
933 pValues[nProp] >>= rOpt.CopyAttributes();
935 break;
938 //-----------------------------------------------------------------------------
939 void SwInsertConfig::Load()
941 const Sequence<OUString>& aNames = GetPropertyNames();
942 Sequence<Any> aValues = GetProperties(aNames);
943 const Any* pValues = aValues.getConstArray();
944 DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
945 if(aValues.getLength() == aNames.getLength())
947 InsCaptionOpt* pWriterTableOpt = 0;
948 InsCaptionOpt* pWriterFrameOpt = 0;
949 InsCaptionOpt* pWriterGraphicOpt = 0;
950 InsCaptionOpt* pOLECalcOpt = 0;
951 InsCaptionOpt* pOLEImpressOpt = 0;
952 InsCaptionOpt* pOLEChartOpt = 0;
953 InsCaptionOpt* pOLEFormulaOpt = 0;
954 InsCaptionOpt* pOLEDrawOpt = 0;
955 if(pCapOptions)
957 pWriterTableOpt = pCapOptions->Find(TABLE_CAP, 0);
958 pWriterFrameOpt = pCapOptions->Find(FRAME_CAP, 0);
959 pWriterGraphicOpt = pCapOptions->Find(GRAPHIC_CAP, 0);
960 pOLECalcOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_CALC]);
961 pOLEImpressOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_IMPRESS]);
962 pOLEDrawOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_DRAW ]);
963 pOLEFormulaOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_MATH ]);
964 pOLEChartOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_CHART ]);
966 else if(!bIsWeb)
967 return;
969 USHORT nInsTblFlags = 0;
970 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
972 if(pValues[nProp].hasValue())
974 sal_Bool bBool = nProp < INS_PROP_CAP_OBJECT_TABLE_ENABLE ? *(sal_Bool*)pValues[nProp].getValue() : sal_False;
975 switch(nProp)
977 case INS_PROP_TABLE_HEADER:
979 if(bBool)
980 nInsTblFlags|= tabopts::HEADLINE;
982 break;//"Table/Header",
983 case INS_PROP_TABLE_REPEATHEADER:
985 aInsTblOpts.mnRowsToRepeat = bBool? 1 : 0;
988 break;//"Table/RepeatHeader",
989 case INS_PROP_TABLE_BORDER:
991 if(bBool)
992 nInsTblFlags|= tabopts::DEFAULT_BORDER;
994 break;//"Table/Border",
995 case INS_PROP_TABLE_SPLIT:
997 if(bBool)
998 nInsTblFlags|= tabopts::SPLIT_LAYOUT;
1000 break;//"Table/Split",
1001 case INS_PROP_CAP_AUTOMATIC:
1002 bInsWithCaption = bBool;
1003 break;
1004 case INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST: bCaptionOrderNumberingFirst = bBool; break;
1005 case INS_PROP_CAP_OBJECT_TABLE_ENABLE:
1006 case INS_PROP_CAP_OBJECT_TABLE_CATEGORY:
1007 case INS_PROP_CAP_OBJECT_TABLE_NUMBERING:
1008 case INS_PROP_CAP_OBJECT_TABLE_NUMBERINGSEPARATOR:
1009 case INS_PROP_CAP_OBJECT_TABLE_CAPTIONTEXT:
1010 case INS_PROP_CAP_OBJECT_TABLE_DELIMITER:
1011 case INS_PROP_CAP_OBJECT_TABLE_LEVEL:
1012 case INS_PROP_CAP_OBJECT_TABLE_POSITION:
1013 case INS_PROP_CAP_OBJECT_TABLE_CHARACTERSTYLE:
1014 if(!pWriterTableOpt)
1016 pWriterTableOpt = new InsCaptionOpt(TABLE_CAP);
1017 pCapOptions->Insert(pWriterTableOpt);
1019 lcl_ReadOpt(*pWriterTableOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_TABLE_ENABLE);
1020 break;
1021 case INS_PROP_CAP_OBJECT_FRAME_ENABLE:
1022 case INS_PROP_CAP_OBJECT_FRAME_CATEGORY:
1023 case INS_PROP_CAP_OBJECT_FRAME_NUMBERING:
1024 case INS_PROP_CAP_OBJECT_FRAME_NUMBERINGSEPARATOR:
1025 case INS_PROP_CAP_OBJECT_FRAME_CAPTIONTEXT:
1026 case INS_PROP_CAP_OBJECT_FRAME_DELIMITER:
1027 case INS_PROP_CAP_OBJECT_FRAME_LEVEL:
1028 case INS_PROP_CAP_OBJECT_FRAME_POSITION:
1029 case INS_PROP_CAP_OBJECT_FRAME_CHARACTERSTYLE:
1030 if(!pWriterFrameOpt)
1032 pWriterFrameOpt = new InsCaptionOpt(FRAME_CAP);
1033 pCapOptions->Insert(pWriterFrameOpt);
1035 lcl_ReadOpt(*pWriterFrameOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FRAME_ENABLE);
1036 break;
1037 case INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE:
1038 case INS_PROP_CAP_OBJECT_GRAPHIC_CATEGORY:
1039 case INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERING:
1040 case INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERINGSEPARATOR:
1041 case INS_PROP_CAP_OBJECT_GRAPHIC_CAPTIONTEXT:
1042 case INS_PROP_CAP_OBJECT_GRAPHIC_DELIMITER:
1043 case INS_PROP_CAP_OBJECT_GRAPHIC_LEVEL:
1044 case INS_PROP_CAP_OBJECT_GRAPHIC_POSITION:
1045 case INS_PROP_CAP_OBJECT_GRAPHIC_CHARACTERSTYLE:
1046 case INS_PROP_CAP_OBJECT_GRAPHIC_APPLYATTRIBUTES:
1047 if(!pWriterGraphicOpt)
1049 pWriterGraphicOpt = new InsCaptionOpt(GRAPHIC_CAP);
1050 pCapOptions->Insert(pWriterGraphicOpt);
1052 lcl_ReadOpt(*pWriterGraphicOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE);
1053 break;
1054 case INS_PROP_CAP_OBJECT_CALC_ENABLE:
1055 case INS_PROP_CAP_OBJECT_CALC_CATEGORY:
1056 case INS_PROP_CAP_OBJECT_CALC_NUMBERING:
1057 case INS_PROP_CAP_OBJECT_CALC_NUMBERINGSEPARATOR:
1058 case INS_PROP_CAP_OBJECT_CALC_CAPTIONTEXT:
1059 case INS_PROP_CAP_OBJECT_CALC_DELIMITER:
1060 case INS_PROP_CAP_OBJECT_CALC_LEVEL:
1061 case INS_PROP_CAP_OBJECT_CALC_POSITION:
1062 case INS_PROP_CAP_OBJECT_CALC_CHARACTERSTYLE:
1063 case INS_PROP_CAP_OBJECT_CALC_APPLYATTRIBUTES:
1064 if(!pOLECalcOpt)
1066 pOLECalcOpt = new InsCaptionOpt(OLE_CAP, &aGlobalNames[GLOB_NAME_CALC]);
1067 pCapOptions->Insert(pOLECalcOpt);
1069 lcl_ReadOpt(*pOLECalcOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_CALC_ENABLE);
1070 break;
1071 case INS_PROP_CAP_OBJECT_IMPRESS_ENABLE:
1072 case INS_PROP_CAP_OBJECT_IMPRESS_CATEGORY:
1073 case INS_PROP_CAP_OBJECT_IMPRESS_NUMBERING:
1074 case INS_PROP_CAP_OBJECT_IMPRESS_NUMBERINGSEPARATOR:
1075 case INS_PROP_CAP_OBJECT_IMPRESS_CAPTIONTEXT:
1076 case INS_PROP_CAP_OBJECT_IMPRESS_DELIMITER:
1077 case INS_PROP_CAP_OBJECT_IMPRESS_LEVEL:
1078 case INS_PROP_CAP_OBJECT_IMPRESS_POSITION:
1079 case INS_PROP_CAP_OBJECT_IMPRESS_CHARACTERSTYLE:
1080 case INS_PROP_CAP_OBJECT_IMPRESS_APPLYATTRIBUTES:
1081 if(!pOLEImpressOpt)
1083 pOLEImpressOpt = new InsCaptionOpt(OLE_CAP, &aGlobalNames[GLOB_NAME_IMPRESS]);
1084 pCapOptions->Insert(pOLEImpressOpt);
1086 lcl_ReadOpt(*pOLEImpressOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_IMPRESS_ENABLE);
1087 break;
1088 case INS_PROP_CAP_OBJECT_CHART_ENABLE:
1089 case INS_PROP_CAP_OBJECT_CHART_CATEGORY:
1090 case INS_PROP_CAP_OBJECT_CHART_NUMBERING:
1091 case INS_PROP_CAP_OBJECT_CHART_NUMBERINGSEPARATOR:
1092 case INS_PROP_CAP_OBJECT_CHART_CAPTIONTEXT:
1093 case INS_PROP_CAP_OBJECT_CHART_DELIMITER:
1094 case INS_PROP_CAP_OBJECT_CHART_LEVEL:
1095 case INS_PROP_CAP_OBJECT_CHART_POSITION:
1096 case INS_PROP_CAP_OBJECT_CHART_CHARACTERSTYLE:
1097 case INS_PROP_CAP_OBJECT_CHART_APPLYATTRIBUTES:
1098 if(!pOLEChartOpt)
1100 pOLEChartOpt = new InsCaptionOpt(OLE_CAP, &aGlobalNames[GLOB_NAME_CHART]);
1101 pCapOptions->Insert(pOLEChartOpt);
1103 lcl_ReadOpt(*pOLEChartOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_CHART_ENABLE);
1104 break;
1105 case INS_PROP_CAP_OBJECT_FORMULA_ENABLE:
1106 case INS_PROP_CAP_OBJECT_FORMULA_CATEGORY:
1107 case INS_PROP_CAP_OBJECT_FORMULA_NUMBERING:
1108 case INS_PROP_CAP_OBJECT_FORMULA_NUMBERINGSEPARATOR:
1109 case INS_PROP_CAP_OBJECT_FORMULA_CAPTIONTEXT:
1110 case INS_PROP_CAP_OBJECT_FORMULA_DELIMITER:
1111 case INS_PROP_CAP_OBJECT_FORMULA_LEVEL:
1112 case INS_PROP_CAP_OBJECT_FORMULA_POSITION:
1113 case INS_PROP_CAP_OBJECT_FORMULA_CHARACTERSTYLE:
1114 case INS_PROP_CAP_OBJECT_FORMULA_APPLYATTRIBUTES:
1115 if(!pOLEFormulaOpt)
1117 pOLEFormulaOpt = new InsCaptionOpt(OLE_CAP, &aGlobalNames[GLOB_NAME_MATH]);
1118 pCapOptions->Insert(pOLEFormulaOpt);
1120 lcl_ReadOpt(*pOLEFormulaOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FORMULA_ENABLE);
1121 break;
1122 case INS_PROP_CAP_OBJECT_DRAW_ENABLE:
1123 case INS_PROP_CAP_OBJECT_DRAW_CATEGORY:
1124 case INS_PROP_CAP_OBJECT_DRAW_NUMBERING:
1125 case INS_PROP_CAP_OBJECT_DRAW_NUMBERINGSEPARATOR:
1126 case INS_PROP_CAP_OBJECT_DRAW_CAPTIONTEXT:
1127 case INS_PROP_CAP_OBJECT_DRAW_DELIMITER:
1128 case INS_PROP_CAP_OBJECT_DRAW_LEVEL:
1129 case INS_PROP_CAP_OBJECT_DRAW_POSITION:
1130 case INS_PROP_CAP_OBJECT_DRAW_CHARACTERSTYLE:
1131 case INS_PROP_CAP_OBJECT_DRAW_APPLYATTRIBUTES:
1132 if(!pOLEDrawOpt)
1134 pOLEDrawOpt = new InsCaptionOpt(OLE_CAP, &aGlobalNames[GLOB_NAME_DRAW]);
1135 pCapOptions->Insert(pOLEDrawOpt);
1137 lcl_ReadOpt(*pOLEDrawOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_DRAW_ENABLE);
1138 break;
1139 case INS_PROP_CAP_OBJECT_OLEMISC_ENABLE:
1140 case INS_PROP_CAP_OBJECT_OLEMISC_CATEGORY:
1141 case INS_PROP_CAP_OBJECT_OLEMISC_NUMBERING:
1142 case INS_PROP_CAP_OBJECT_OLEMISC_NUMBERINGSEPARATOR:
1143 case INS_PROP_CAP_OBJECT_OLEMISC_CAPTIONTEXT:
1144 case INS_PROP_CAP_OBJECT_OLEMISC_DELIMITER:
1145 case INS_PROP_CAP_OBJECT_OLEMISC_LEVEL:
1146 case INS_PROP_CAP_OBJECT_OLEMISC_POSITION:
1147 case INS_PROP_CAP_OBJECT_OLEMISC_CHARACTERSTYLE:
1148 case INS_PROP_CAP_OBJECT_OLEMISC_APPLYATTRIBUTES:
1149 if(!pOLEMiscOpt)
1151 pOLEMiscOpt = new InsCaptionOpt(OLE_CAP);
1153 lcl_ReadOpt(*pOLEMiscOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_OLEMISC_ENABLE);
1154 break;
1157 else if(nProp == INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST)
1159 //#i61007# initialize caption order, right now only HUNGARIAN seems to need a different order
1160 SvtSysLocaleOptions aSysLocaleOptions;
1161 OUString sLang = aSysLocaleOptions.GetLocaleConfigString();
1162 bCaptionOrderNumberingFirst = ( sLang.getLength() && sLang.matchAsciiL( "hu", 2 )) ? sal_True : sal_False;
1166 aInsTblOpts.mnInsMode = nInsTblFlags;
1169 /* -----------------------------10.10.00 16:22--------------------------------
1171 ---------------------------------------------------------------------------*/
1172 const Sequence<OUString>& SwTableConfig::GetPropertyNames()
1174 const int nCount = 8;
1175 static Sequence<OUString> aNames(nCount);
1176 static const char* aPropNames[] =
1178 "Shift/Row", // 0
1179 "Shift/Column", // 1
1180 "Insert/Row", // 2
1181 "Insert/Column", // 3
1182 "Change/Effect", // 4
1183 "Input/NumberRecognition", // 5
1184 "Input/NumberFormatRecognition",// 6
1185 "Input/Alignment" // 7
1187 OUString* pNames = aNames.getArray();
1188 for(int i = 0; i < nCount; i++)
1189 pNames[i] = OUString::createFromAscii(aPropNames[i]);
1190 return aNames;
1192 /*-- 10.10.00 16:22:22---------------------------------------------------
1194 -----------------------------------------------------------------------*/
1195 SwTableConfig::SwTableConfig(sal_Bool bWeb) :
1196 ConfigItem(bWeb ? C2U("Office.WriterWeb/Table") : C2U("Office.Writer/Table"),
1197 CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE)
1199 Load();
1201 /*-- 10.10.00 16:22:23---------------------------------------------------
1203 -----------------------------------------------------------------------*/
1204 SwTableConfig::~SwTableConfig()
1207 /*-- 10.10.00 16:22:56---------------------------------------------------
1209 -----------------------------------------------------------------------*/
1210 void SwTableConfig::Commit()
1212 const Sequence<OUString>& aNames = GetPropertyNames();
1213 Sequence<Any> aValues(aNames.getLength());
1214 Any* pValues = aValues.getArray();
1216 const Type& rType = ::getBooleanCppuType();
1217 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
1219 switch(nProp)
1221 case 0 : pValues[nProp] <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(nTblHMove); break; //"Shift/Row",
1222 case 1 : pValues[nProp] <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(nTblVMove); break; //"Shift/Column",
1223 case 2 : pValues[nProp] <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(nTblHInsert); break; //"Insert/Row",
1224 case 3 : pValues[nProp] <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(nTblVInsert); break; //"Insert/Column",
1225 case 4 : pValues[nProp] <<= (sal_Int32)eTblChgMode; break; //"Change/Effect",
1226 case 5 : pValues[nProp].setValue(&bInsTblFormatNum, rType); break; //"Input/NumberRecognition",
1227 case 6 : pValues[nProp].setValue(&bInsTblChangeNumFormat, rType); break; //"Input/NumberFormatRecognition",
1228 case 7 : pValues[nProp].setValue(&bInsTblAlignNum, rType); break; //"Input/Alignment"
1231 PutProperties(aNames, aValues);
1233 /*-- 10.10.00 16:22:56---------------------------------------------------
1235 -----------------------------------------------------------------------*/
1236 void SwTableConfig::Load()
1238 const Sequence<OUString>& aNames = GetPropertyNames();
1239 Sequence<Any> aValues = GetProperties(aNames);
1240 const Any* pValues = aValues.getConstArray();
1241 DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
1242 if(aValues.getLength() == aNames.getLength())
1244 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
1246 if(pValues[nProp].hasValue())
1248 sal_Int32 nTemp = 0;
1249 switch(nProp)
1251 case 0 : pValues[nProp] >>= nTemp; nTblHMove = (USHORT)MM100_TO_TWIP(nTemp); break; //"Shift/Row",
1252 case 1 : pValues[nProp] >>= nTemp; nTblVMove = (USHORT)MM100_TO_TWIP(nTemp); break; //"Shift/Column",
1253 case 2 : pValues[nProp] >>= nTemp; nTblHInsert = (USHORT)MM100_TO_TWIP(nTemp); break; //"Insert/Row",
1254 case 3 : pValues[nProp] >>= nTemp; nTblVInsert = (USHORT)MM100_TO_TWIP(nTemp); break; //"Insert/Column",
1255 case 4 : pValues[nProp] >>= nTemp; eTblChgMode = (TblChgMode)nTemp; break; //"Change/Effect",
1256 case 5 : bInsTblFormatNum = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/NumberRecognition",
1257 case 6 : bInsTblChangeNumFormat = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/NumberFormatRecognition",
1258 case 7 : bInsTblAlignNum = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/Alignment"
1264 /*-- 18.01.01 17:02:47---------------------------------------------------
1266 -----------------------------------------------------------------------*/
1267 SwMiscConfig::SwMiscConfig() :
1268 ConfigItem(C2U("Office.Writer"),
1269 CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
1270 bDefaultFontsInCurrDocOnly(sal_False),
1271 bShowIndexPreview(sal_False),
1272 bGrfToGalleryAsLnk(sal_True),
1273 bNumAlignSize(sal_True),
1274 bSinglePrintJob(sal_False),
1275 bIsNameFromColumn(sal_True),
1276 bAskForMailMergeInPrint(sal_True),
1277 nMailingFormats(0)
1279 Load();
1281 /*-- 18.01.01 17:02:47---------------------------------------------------
1283 -----------------------------------------------------------------------*/
1284 SwMiscConfig::~SwMiscConfig()
1287 /*-- 18.01.01 17:02:47---------------------------------------------------
1289 -----------------------------------------------------------------------*/
1290 const Sequence<OUString>& SwMiscConfig::GetPropertyNames()
1292 static Sequence<OUString> aNames;
1293 if(!aNames.getLength())
1295 const int nCount = 12;
1296 aNames.realloc(nCount);
1297 static const char* aPropNames[] =
1299 "Statistics/WordNumber/Delimiter", // 0
1300 "DefaultFont/Document", // 1
1301 "Index/ShowPreview", // 2
1302 "Misc/GraphicToGalleryAsLink", // 3
1303 "Numbering/Graphic/KeepRatio", // 4
1304 "FormLetter/PrintOutput/SinglePrintJobs", // 5
1305 "FormLetter/MailingOutput/Format", // 6
1306 "FormLetter/FileOutput/FileName/FromDatabaseField", // 7
1307 "FormLetter/FileOutput/Path", // 8
1308 "FormLetter/FileOutput/FileName/FromManualSetting", // 9
1309 "FormLetter/FileOutput/FileName/Generation",//10
1310 "FormLetter/PrintOutput/AskForMerge" //11
1312 OUString* pNames = aNames.getArray();
1313 for(int i = 0; i < nCount; i++)
1314 pNames[i] = C2U(aPropNames[i]);
1316 return aNames;
1318 /*-- 18.01.01 17:02:47---------------------------------------------------
1320 -----------------------------------------------------------------------*/
1321 void SwMiscConfig::Commit()
1323 const Sequence<OUString>& aNames = GetPropertyNames();
1324 Sequence<Any> aValues(aNames.getLength());
1325 Any* pValues = aValues.getArray();
1327 const Type& rType = ::getBooleanCppuType();
1328 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
1330 switch(nProp)
1332 case 0 :
1333 pValues[nProp] <<= OUString(
1334 SwModuleOptions::ConvertWordDelimiter(sWordDelimiter, sal_False));
1335 break;
1336 case 1 : pValues[nProp].setValue(&bDefaultFontsInCurrDocOnly, rType); break;
1337 case 2 : pValues[nProp].setValue(&bShowIndexPreview, rType) ; break;
1338 case 3 : pValues[nProp].setValue(&bGrfToGalleryAsLnk, rType); break;
1339 case 4 : pValues[nProp].setValue(&bNumAlignSize, rType); break;
1340 case 5 : pValues[nProp].setValue(&bSinglePrintJob, rType); break;
1341 case 6 : pValues[nProp] <<= nMailingFormats; break;
1342 case 7 : pValues[nProp] <<= OUString(sNameFromColumn); break;
1343 case 8 : pValues[nProp] <<= OUString(sMailingPath); break;
1344 case 9 : pValues[nProp] <<= OUString(sMailName); break;
1345 case 10: pValues[nProp].setValue(&bIsNameFromColumn, rType);break;
1346 case 11: pValues[nProp] <<= bAskForMailMergeInPrint; break;
1349 PutProperties(aNames, aValues);
1351 /*-- 18.01.01 17:02:48---------------------------------------------------
1353 -----------------------------------------------------------------------*/
1354 void SwMiscConfig::Load()
1356 const Sequence<OUString>& aNames = GetPropertyNames();
1357 Sequence<Any> aValues = GetProperties(aNames);
1358 const Any* pValues = aValues.getConstArray();
1359 DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
1360 if(aValues.getLength() == aNames.getLength())
1362 OUString sTmp;
1363 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
1365 if(pValues[nProp].hasValue())
1367 switch(nProp)
1369 case 0 : pValues[nProp] >>= sTmp;
1370 sWordDelimiter = SwModuleOptions::ConvertWordDelimiter(sTmp, sal_True);
1371 break;
1372 case 1 : bDefaultFontsInCurrDocOnly = *(sal_Bool*)pValues[nProp].getValue(); break;
1373 case 2 : bShowIndexPreview = *(sal_Bool*)pValues[nProp].getValue(); break;
1374 case 3 : bGrfToGalleryAsLnk = *(sal_Bool*)pValues[nProp].getValue(); break;
1375 case 4 : bNumAlignSize = *(sal_Bool*)pValues[nProp].getValue(); break;
1376 case 5 : bSinglePrintJob = *(sal_Bool*)pValues[nProp].getValue(); break;
1377 case 6 : pValues[nProp] >>= nMailingFormats; ; break;
1378 case 7 : pValues[nProp] >>= sTmp; sNameFromColumn = sTmp; break;
1379 case 8 : pValues[nProp] >>= sTmp; sMailingPath = sTmp; break;
1380 case 9 : pValues[nProp] >>= sTmp; sMailName = sTmp; break;
1381 case 10: bIsNameFromColumn = *(sal_Bool*)pValues[nProp].getValue(); break;
1382 case 11: pValues[nProp] >>= bAskForMailMergeInPrint; break;