Line data Source code
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 <tools/stream.hxx>
21 : #include <tools/resid.hxx>
22 : #include <com/sun/star/uno/Any.hxx>
23 : #include <com/sun/star/uno/Sequence.hxx>
24 : #include <unotools/useroptions.hxx>
25 : #include <swmodule.hxx>
26 : #include "labimg.hxx"
27 : #include "cmdid.h"
28 : #include "swtypes.hxx"
29 : #include <unomid.h>
30 :
31 : using namespace utl;
32 : using namespace ::com::sun::star::uno;
33 :
34 0 : SwLabItem::SwLabItem() :
35 :
36 : SfxPoolItem(FN_LABEL),
37 : lLeft (0),
38 : lUpper(0),
39 : nCols (1),
40 : nRows (1),
41 : nCol (1),
42 0 : nRow (1)
43 : {
44 : bAddr =
45 : bCont =
46 0 : bSynchron = false;
47 0 : bPage = true;
48 : lHDist =
49 : lVDist =
50 : lWidth =
51 : lHeight =
52 : lPWidth =
53 0 : lPHeight = 5669; // 10 cm
54 0 : }
55 :
56 0 : SwLabItem::SwLabItem(const SwLabItem& rItem) :
57 0 : SfxPoolItem(FN_LABEL)
58 : {
59 0 : *this = rItem;
60 0 : }
61 :
62 0 : SwLabItem& SwLabItem::operator =(const SwLabItem& rItem)
63 : {
64 0 : bAddr = rItem.bAddr;
65 0 : aWriting = rItem.aWriting;
66 0 : bCont = rItem.bCont;
67 0 : sDBName = rItem.sDBName;
68 0 : aLstMake = rItem.aLstMake;
69 0 : aLstType = rItem.aLstType;
70 0 : aMake = rItem.aMake;
71 0 : aType = rItem.aType;
72 0 : bPage = rItem.bPage;
73 0 : bSynchron = rItem.bSynchron;
74 0 : aBin = rItem.aBin;
75 0 : nCol = rItem.nCol;
76 0 : nRow = rItem.nRow;
77 0 : lHDist = rItem.lHDist;
78 0 : lVDist = rItem.lVDist;
79 0 : lWidth = rItem.lWidth;
80 0 : lHeight = rItem.lHeight;
81 0 : lLeft = rItem.lLeft;
82 0 : lUpper = rItem.lUpper;
83 0 : nCols = rItem.nCols;
84 0 : nRows = rItem.nRows;
85 0 : lPWidth = rItem.lPWidth;
86 0 : lPHeight = rItem.lPHeight;
87 0 : aPrivFirstName = rItem.aPrivFirstName;
88 0 : aPrivName = rItem.aPrivName;
89 0 : aPrivShortCut = rItem.aPrivShortCut;
90 0 : aPrivFirstName2 = rItem.aPrivFirstName2;
91 0 : aPrivName2 = rItem.aPrivName2;
92 0 : aPrivShortCut2 = rItem.aPrivShortCut2;
93 0 : aPrivStreet = rItem.aPrivStreet;
94 0 : aPrivZip = rItem.aPrivZip;
95 0 : aPrivCity = rItem.aPrivCity;
96 0 : aPrivCountry = rItem.aPrivCountry;
97 0 : aPrivState = rItem.aPrivState;
98 0 : aPrivTitle = rItem.aPrivTitle;
99 0 : aPrivProfession = rItem.aPrivProfession;
100 0 : aPrivPhone = rItem.aPrivPhone;
101 0 : aPrivMobile = rItem.aPrivMobile;
102 0 : aPrivFax = rItem.aPrivFax;
103 0 : aPrivWWW = rItem.aPrivWWW;
104 0 : aPrivMail = rItem.aPrivMail;
105 0 : aCompCompany = rItem.aCompCompany;
106 0 : aCompCompanyExt = rItem.aCompCompanyExt;
107 0 : aCompSlogan = rItem.aCompSlogan;
108 0 : aCompStreet = rItem.aCompStreet;
109 0 : aCompZip = rItem.aCompZip;
110 0 : aCompCity = rItem.aCompCity;
111 0 : aCompCountry = rItem.aCompCountry;
112 0 : aCompState = rItem.aCompState;
113 0 : aCompPosition = rItem.aCompPosition;
114 0 : aCompPhone = rItem.aCompPhone;
115 0 : aCompMobile = rItem.aCompMobile;
116 0 : aCompFax = rItem.aCompFax;
117 0 : aCompWWW = rItem.aCompWWW;
118 0 : aCompMail = rItem.aCompMail;
119 0 : sGlossaryGroup = rItem.sGlossaryGroup;
120 0 : sGlossaryBlockName = rItem.sGlossaryBlockName;
121 0 : return *this;
122 : }
123 :
124 0 : bool SwLabItem::operator ==(const SfxPoolItem& rItem) const
125 : {
126 0 : const SwLabItem& rLab = (const SwLabItem&) rItem;
127 :
128 0 : return bAddr == rLab.bAddr &&
129 0 : bCont == rLab.bCont &&
130 0 : bPage == rLab.bPage &&
131 0 : bSynchron == rLab.bSynchron &&
132 0 : aBin == rLab.aBin &&
133 0 : nCol == rLab.nCol &&
134 0 : nRow == rLab.nRow &&
135 0 : lHDist == rLab.lHDist &&
136 0 : lVDist == rLab.lVDist &&
137 0 : lWidth == rLab.lWidth &&
138 0 : lHeight == rLab.lHeight &&
139 0 : lLeft == rLab.lLeft &&
140 0 : lUpper == rLab.lUpper &&
141 0 : nCols == rLab.nCols &&
142 0 : nRows == rLab.nRows &&
143 0 : lPWidth == rLab.lPWidth &&
144 0 : lPHeight == rLab.lPHeight&&
145 0 : aWriting == rLab.aWriting&&
146 0 : aMake == rLab.aMake &&
147 0 : aType == rLab.aType &&
148 0 : aLstMake == rLab.aLstMake&&
149 0 : aLstType == rLab.aLstType&&
150 0 : sDBName == rLab.sDBName &&
151 0 : aPrivFirstName == rLab.aPrivFirstName&&
152 0 : aPrivName == rLab.aPrivName&&
153 0 : aPrivShortCut == rLab.aPrivShortCut&&
154 0 : aPrivFirstName2 == rLab.aPrivFirstName2&&
155 0 : aPrivName2 == rLab.aPrivName2&&
156 0 : aPrivShortCut2 == rLab.aPrivShortCut2&&
157 0 : aPrivStreet == rLab.aPrivStreet&&
158 0 : aPrivZip == rLab.aPrivZip&&
159 0 : aPrivCity == rLab.aPrivCity&&
160 0 : aPrivCountry == rLab.aPrivCountry&&
161 0 : aPrivState == rLab.aPrivState&&
162 0 : aPrivTitle == rLab.aPrivTitle&&
163 0 : aPrivProfession == rLab.aPrivProfession&&
164 0 : aPrivPhone == rLab.aPrivPhone&&
165 0 : aPrivMobile == rLab.aPrivMobile&&
166 0 : aPrivFax == rLab.aPrivFax&&
167 0 : aPrivWWW == rLab.aPrivWWW&&
168 0 : aPrivMail == rLab.aPrivMail&&
169 0 : aCompCompany == rLab.aCompCompany&&
170 0 : aCompCompanyExt == rLab.aCompCompanyExt&&
171 0 : aCompSlogan == rLab.aCompSlogan&&
172 0 : aCompStreet == rLab.aCompStreet&&
173 0 : aCompZip == rLab.aCompZip&&
174 0 : aCompCity == rLab.aCompCity&&
175 0 : aCompCountry == rLab.aCompCountry&&
176 0 : aCompState == rLab.aCompState&&
177 0 : aCompPosition == rLab.aCompPosition&&
178 0 : aCompPhone == rLab.aCompPhone&&
179 0 : aCompMobile == rLab.aCompMobile&&
180 0 : aCompFax == rLab.aCompFax&&
181 0 : aCompWWW == rLab.aCompWWW&&
182 0 : aCompMail == rLab.aCompMail &&
183 0 : sGlossaryGroup == rLab.sGlossaryGroup &&
184 0 : sGlossaryBlockName == rLab.sGlossaryBlockName;
185 : }
186 :
187 0 : SfxPoolItem* SwLabItem::Clone(SfxItemPool*) const
188 : {
189 0 : return new SwLabItem(*this);
190 : }
191 :
192 0 : Sequence<OUString> SwLabCfgItem::GetPropertyNames()
193 : {
194 : static const char* aLabelPropNames[] =
195 : {
196 : "Medium/Continuous", // 0
197 : "Medium/Brand", // 1
198 : "Medium/Type", // 2
199 : "Format/Column", // 3
200 : "Format/Row", // 4
201 : "Format/HorizontalDistance",// 5
202 : "Format/VerticalDistance", // 6
203 : "Format/Width", // 7
204 : "Format/Height", // 8
205 : "Format/LeftMargin", // 9
206 : "Format/TopMargin", //10
207 : "Format/PageWidth", //11
208 : "Format/PageHeight", //12
209 : "Option/Synchronize", //13
210 : "Option/Page", //14
211 : "Option/Column", //15
212 : "Option/Row", //16
213 : "Inscription/UseAddress", //17
214 : "Inscription/Address", //18
215 : "Inscription/Database" //19
216 : };
217 : static const char* aBusinessPropNames[] =
218 : {
219 : "PrivateAddress/FirstName", // 0
220 : "PrivateAddress/Name", // 1
221 : "PrivateAddress/ShortCut", // 2
222 : "PrivateAddress/SecondFirstName", // 3
223 : "PrivateAddress/SecondName", // 4
224 : "PrivateAddress/SecondShortCut", // 5
225 : "PrivateAddress/Street", // 6
226 : "PrivateAddress/Zip", // 7
227 : "PrivateAddress/City", // 8
228 : "PrivateAddress/Country", // 9
229 : "PrivateAddress/State", // 10
230 : "PrivateAddress/Title", // 11
231 : "PrivateAddress/Profession", // 12
232 : "PrivateAddress/Phone", // 13
233 : "PrivateAddress/Mobile", // 14
234 : "PrivateAddress/Fax", // 15
235 : "PrivateAddress/WebAddress", // 16
236 : "PrivateAddress/Email", // 17
237 : "BusinessAddress/Company", // 18
238 : "BusinessAddress/CompanyExt", // 19
239 : "BusinessAddress/Slogan", // 20
240 : "BusinessAddress/Street", // 21
241 : "BusinessAddress/Zip", // 22
242 : "BusinessAddress/City", // 23
243 : "BusinessAddress/Country", // 24
244 : "BusinessAddress/State", // 25
245 : "BusinessAddress/Position", // 26
246 : "BusinessAddress/Phone", // 27
247 : "BusinessAddress/Mobile", // 28
248 : "BusinessAddress/Fax", // 29
249 : "BusinessAddress/WebAddress", // 30
250 : "BusinessAddress/Email", // 31
251 : "AutoText/Group", // 32
252 : "AutoText/Block" // 33
253 : };
254 0 : const int nBusinessCount = bIsLabel ? 0 : 34;
255 0 : const int nLabelCount = bIsLabel ? 20 : 17;
256 0 : Sequence<OUString> aNames(nBusinessCount + nLabelCount);
257 0 : OUString* pNames = aNames.getArray();
258 0 : int nIndex = 0;
259 0 : for(int nLabel = 0; nLabel < nLabelCount; nLabel++)
260 0 : pNames[nIndex++] = OUString::createFromAscii(aLabelPropNames[nLabel]);
261 0 : for(int nBusiness = 0; nBusiness < nBusinessCount; nBusiness++)
262 0 : pNames[nIndex++] = OUString::createFromAscii(aBusinessPropNames[nBusiness]);
263 0 : return aNames;
264 : }
265 :
266 0 : SwLabCfgItem::SwLabCfgItem(bool bLabel) :
267 : ConfigItem(bLabel ? OUString("Office.Writer/Label") : OUString("Office.Writer/BusinessCard")),
268 0 : bIsLabel(bLabel)
269 : {
270 0 : Sequence<OUString> aNames = GetPropertyNames();
271 0 : Sequence<Any> aValues = GetProperties(aNames);
272 0 : EnableNotification(aNames);
273 0 : const Any* pValues = aValues.getConstArray();
274 : OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
275 0 : bool bNoConfigValues = true;
276 0 : if(aValues.getLength() == aNames.getLength())
277 : {
278 0 : for(int nProp = 0, nProperty = 0; nProp < aNames.getLength(); nProp++, nProperty++)
279 : {
280 :
281 0 : if(pValues[nProp].hasValue())
282 : {
283 : //to have a contiuous switch an offset is added
284 0 : if(nProp == 17 && !bIsLabel)
285 0 : nProperty += 3;
286 0 : if(nProperty >= 20)
287 0 : bNoConfigValues = false;
288 0 : switch(nProperty)
289 : {
290 0 : case 0: aItem.bCont = *(sal_Bool*)pValues[nProp].getValue(); break;// "Medium/Continuous",
291 0 : case 1: pValues[nProp] >>= aItem.aMake; break;// "Medium/Brand",
292 0 : case 2: pValues[nProp] >>= aItem.aType; break;// "Medium/Type",
293 0 : case 3: pValues[nProp] >>= aItem.nCols; break;// "Format/Column",
294 0 : case 4: pValues[nProp] >>= aItem.nRows; break;// "Format/Row",
295 : case 5:
296 0 : pValues[nProp] >>= aItem.lHDist;
297 0 : aItem.lHDist = convertMm100ToTwip(aItem.lHDist);
298 0 : break;// "Format/HorizontalDistance",
299 : case 6:
300 0 : pValues[nProp] >>= aItem.lVDist;
301 0 : aItem.lVDist = convertMm100ToTwip(aItem.lVDist);
302 0 : break;// "Format/VerticalDistance",
303 : case 7:
304 0 : pValues[nProp] >>= aItem.lWidth;
305 0 : aItem.lWidth = convertMm100ToTwip(aItem.lWidth);
306 0 : break;// "Format/Width",
307 : case 8:
308 0 : pValues[nProp] >>= aItem.lHeight;
309 0 : aItem.lHeight = convertMm100ToTwip(aItem.lHeight);
310 0 : break;// "Format/Height",
311 : case 9:
312 0 : pValues[nProp] >>= aItem.lLeft;
313 0 : aItem.lLeft = convertMm100ToTwip(aItem.lLeft);
314 0 : break;// "Format/LeftMargin",
315 : case 10:
316 0 : pValues[nProp] >>= aItem.lUpper;
317 0 : aItem.lUpper = convertMm100ToTwip(aItem.lUpper);
318 0 : break;// "Format/TopMargin",
319 : case 11:
320 0 : pValues[nProp] >>= aItem.lPWidth;
321 0 : aItem.lPWidth = convertMm100ToTwip(aItem.lPWidth);
322 0 : break;// "Format/PageWidth",
323 : case 12:
324 0 : pValues[nProp] >>= aItem.lPHeight;
325 0 : aItem.lPHeight = convertMm100ToTwip(aItem.lPHeight);
326 0 : break;// "Format/PageHeight",
327 0 : case 13: aItem.bSynchron = *(sal_Bool*)pValues[nProp].getValue(); break;// "Option/Synchronize",
328 0 : case 14: aItem.bPage = *(sal_Bool*)pValues[nProp].getValue(); break;// "Option/Page",
329 0 : case 15: pValues[nProp] >>= aItem.nCol; break;// "Option/Column",
330 0 : case 16: pValues[nProp] >>= aItem.nRow; break;// "Option/Row"
331 0 : case 17: aItem.bAddr = *(sal_Bool*)pValues[nProp].getValue(); break;// "Inscription/UseAddress",
332 0 : case 18: pValues[nProp] >>= aItem.aWriting; break;// "Inscription/Address",
333 0 : case 19: pValues[nProp] >>= aItem.sDBName; break;// "Inscription/Database"
334 0 : case 20: pValues[nProp] >>= aItem.aPrivFirstName; break;// "PrivateAddress/FirstName",
335 0 : case 21: pValues[nProp] >>= aItem.aPrivName; break;// "PrivateAddress/Name",
336 0 : case 22: pValues[nProp] >>= aItem.aPrivShortCut; break;// "PrivateAddress/ShortCut",
337 0 : case 23: pValues[nProp] >>= aItem.aPrivFirstName2; break;// "PrivateAddress/SecondFirstName",
338 0 : case 24: pValues[nProp] >>= aItem.aPrivName2; break;// "PrivateAddress/SecondName",
339 0 : case 25: pValues[nProp] >>= aItem.aPrivShortCut2; break;// "PrivateAddress/SecondShortCut",
340 0 : case 26: pValues[nProp] >>= aItem.aPrivStreet; break;// "PrivateAddress/Street",
341 0 : case 27: pValues[nProp] >>= aItem.aPrivZip; break;// "PrivateAddress/Zip",
342 0 : case 28: pValues[nProp] >>= aItem.aPrivCity; break;// "PrivateAddress/City",
343 0 : case 29: pValues[nProp] >>= aItem.aPrivCountry; break;// "PrivateAddress/Country",
344 0 : case 30: pValues[nProp] >>= aItem.aPrivState; break;// "PrivateAddress/State",
345 0 : case 31: pValues[nProp] >>= aItem.aPrivTitle; break;// "PrivateAddress/Title",
346 0 : case 32: pValues[nProp] >>= aItem.aPrivProfession; break;// "PrivateAddress/Profession",
347 0 : case 33: pValues[nProp] >>= aItem.aPrivPhone; break;// "PrivateAddress/Phone",
348 0 : case 34: pValues[nProp] >>= aItem.aPrivMobile; break;// "PrivateAddress/Mobile",
349 0 : case 35: pValues[nProp] >>= aItem.aPrivFax; break;// "PrivateAddress/Fax",
350 0 : case 36: pValues[nProp] >>= aItem.aPrivWWW; break;// "PrivateAddress/WebAddress",
351 0 : case 37: pValues[nProp] >>= aItem.aPrivMail; break;// "PrivateAddress/Email",
352 0 : case 38: pValues[nProp] >>= aItem.aCompCompany; break;// "BusinessAddress/Company",
353 0 : case 39: pValues[nProp] >>= aItem.aCompCompanyExt; break;// "BusinessAddress/CompanyExt",
354 0 : case 40: pValues[nProp] >>= aItem.aCompSlogan; break;// "BusinessAddress/Slogan",
355 0 : case 41: pValues[nProp] >>= aItem.aCompStreet; break;// "BusinessAddress/Street",
356 0 : case 42: pValues[nProp] >>= aItem.aCompZip; break;// "BusinessAddress/Zip",
357 0 : case 43: pValues[nProp] >>= aItem.aCompCity; break;// "BusinessAddress/City",
358 0 : case 44: pValues[nProp] >>= aItem.aCompCountry; break;// "BusinessAddress/Country",
359 0 : case 45: pValues[nProp] >>= aItem.aCompState; break;// "BusinessAddress/State",
360 0 : case 46: pValues[nProp] >>= aItem.aCompPosition; break;// "BusinessAddress/Position",
361 0 : case 47: pValues[nProp] >>= aItem.aCompPhone; break;// "BusinessAddress/Phone",
362 0 : case 48: pValues[nProp] >>= aItem.aCompMobile; break;// "BusinessAddress/Mobile",
363 0 : case 49: pValues[nProp] >>= aItem.aCompFax; break;// "BusinessAddress/Fax",
364 0 : case 50: pValues[nProp] >>= aItem.aCompWWW; break;// "BusinessAddress/WebAddress",
365 0 : case 51: pValues[nProp] >>= aItem.aCompMail; break;// "BusinessAddress/Email",
366 0 : case 52: pValues[nProp] >>= aItem.sGlossaryGroup; break;// "AutoText/Group"
367 0 : case 53: pValues[nProp] >>= aItem.sGlossaryBlockName; break;// "AutoText/Block"
368 : }
369 : }
370 : }
371 : }
372 0 : if(!bIsLabel && bNoConfigValues)
373 : {
374 :
375 0 : SvtUserOptions& rUserOpt = SW_MOD()->GetUserOptions();
376 0 : aItem.aPrivFirstName = rUserOpt.GetFirstName();
377 0 : aItem.aPrivName = rUserOpt.GetLastName();
378 0 : aItem.aPrivShortCut = rUserOpt.GetID();
379 0 : aItem.aCompCompany = rUserOpt.GetCompany();
380 0 : aItem.aCompStreet = aItem.aPrivStreet = rUserOpt.GetStreet();
381 :
382 0 : aItem.aCompCountry = aItem.aPrivCountry = rUserOpt.GetCountry();
383 0 : aItem.aCompZip = aItem.aPrivZip= rUserOpt.GetZip();
384 0 : aItem.aCompCity = aItem.aPrivCity = rUserOpt.GetCity();
385 0 : aItem.aPrivTitle = rUserOpt.GetTitle();
386 0 : aItem.aCompPosition = rUserOpt.GetPosition();
387 0 : aItem.aPrivPhone = rUserOpt.GetTelephoneHome();
388 0 : aItem.aCompPhone = rUserOpt.GetTelephoneWork();
389 0 : aItem.aCompFax = aItem.aPrivFax = rUserOpt.GetFax();
390 0 : aItem.aCompMail = aItem.aPrivMail = rUserOpt.GetEmail();
391 0 : aItem.aCompState = aItem.aPrivState = rUserOpt.GetState();
392 0 : aItem.bSynchron = true;
393 0 : SetModified();
394 0 : }
395 0 : }
396 :
397 0 : void SwLabCfgItem::Notify( const ::com::sun::star::uno::Sequence< OUString >& ) {}
398 :
399 0 : void SwLabCfgItem::Commit()
400 : {
401 0 : Sequence<OUString> aNames = GetPropertyNames();
402 0 : Sequence<Any> aValues(aNames.getLength());
403 0 : Any* pValues = aValues.getArray();
404 :
405 0 : const Type& rType = ::getBooleanCppuType();
406 0 : for(int nProp = 0, nProperty = 0; nProp < aNames.getLength(); nProp++, nProperty++)
407 : {
408 : //to have a contiuous switch an offset is added
409 0 : if(nProp == 17 && !bIsLabel)
410 0 : nProperty += 3;
411 0 : switch(nProperty)
412 : {
413 0 : case 0: pValues[nProp].setValue(&aItem.bCont, rType); break;// "Medium/Continuous",
414 0 : case 1: pValues[nProp] <<= aItem.aMake; break;// "Medium/Brand",
415 0 : case 2: pValues[nProp] <<= aItem.aType; break;// "Medium/Type",
416 0 : case 3: pValues[nProp] <<= aItem.nCols; break;// "Format/Column",
417 0 : case 4: pValues[nProp] <<= aItem.nRows; break;// "Format/Row",
418 0 : case 5: pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(aItem.lHDist));break;// "Format/HorizontalDistance",
419 0 : case 6: pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(aItem.lVDist));break;// "Format/VerticalDistance",
420 0 : case 7: pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(aItem.lWidth)); break;// "Format/Width",
421 0 : case 8: pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(aItem.lHeight)); break;// "Format/Height",
422 0 : case 9: pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(aItem.lLeft)); break;// "Format/LeftMargin",
423 0 : case 10: pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(aItem.lUpper)); break;// "Format/TopMargin",
424 0 : case 11: pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(aItem.lPWidth)); break;// "Format/Page Width",
425 0 : case 12: pValues[nProp] <<= static_cast<sal_Int32>(convertTwipToMm100(aItem.lPHeight)); break;// "Format/PageHeight",
426 0 : case 13: pValues[nProp].setValue(&aItem.bSynchron, rType); break;// "Option/Synchronize",
427 0 : case 14: pValues[nProp].setValue(&aItem.bPage, rType); break;// "Option/Page",
428 0 : case 15: pValues[nProp] <<= aItem.nCol; break;// "Option/Column",
429 0 : case 16: pValues[nProp] <<= aItem.nRow; break;// "Option/Row"
430 0 : case 17: pValues[nProp].setValue(&aItem.bAddr, rType); break;// "Inscription/UseAddress",
431 0 : case 18: pValues[nProp] <<= aItem.aWriting; break;// "Inscription/Address",
432 0 : case 19: pValues[nProp] <<= aItem.sDBName; break;// "Inscription/Database"
433 0 : case 20: pValues[nProp] <<= aItem.aPrivFirstName; break;// "PrivateAddress/FirstName",
434 0 : case 21: pValues[nProp] <<= aItem.aPrivName; break;// "PrivateAddress/Name",
435 0 : case 22: pValues[nProp] <<= aItem.aPrivShortCut; break;// "PrivateAddress/ShortCut",
436 0 : case 23: pValues[nProp] <<= aItem.aPrivFirstName2; break;// "PrivateAddress/SecondFirstName",
437 0 : case 24: pValues[nProp] <<= aItem.aPrivName2; break;// "PrivateAddress/SecondName",
438 0 : case 25: pValues[nProp] <<= aItem.aPrivShortCut2; break;// "PrivateAddress/SecondShortCut",
439 0 : case 26: pValues[nProp] <<= aItem.aPrivStreet; break;// "PrivateAddress/Street",
440 0 : case 27: pValues[nProp] <<= aItem.aPrivZip; break;// "PrivateAddress/Zip",
441 0 : case 28: pValues[nProp] <<= aItem.aPrivCity; break;// "PrivateAddress/City",
442 0 : case 29: pValues[nProp] <<= aItem.aPrivCountry; break;// "PrivateAddress/Country",
443 0 : case 30: pValues[nProp] <<= aItem.aPrivState; break;// "PrivateAddress/State",
444 0 : case 31: pValues[nProp] <<= aItem.aPrivTitle; break;// "PrivateAddress/Title",
445 0 : case 32: pValues[nProp] <<= aItem.aPrivProfession; break;// "PrivateAddress/Profession",
446 0 : case 33: pValues[nProp] <<= aItem.aPrivPhone; break;// "PrivateAddress/Phone",
447 0 : case 34: pValues[nProp] <<= aItem.aPrivMobile; break;// "PrivateAddress/Mobile",
448 0 : case 35: pValues[nProp] <<= aItem.aPrivFax; break;// "PrivateAddress/Fax",
449 0 : case 36: pValues[nProp] <<= aItem.aPrivWWW; break;// "PrivateAddress/WebAddress",
450 0 : case 37: pValues[nProp] <<= aItem.aPrivMail; break;// "PrivateAddress/Email",
451 0 : case 38: pValues[nProp] <<= aItem.aCompCompany; break;// "BusinessAddress/Company",
452 0 : case 39: pValues[nProp] <<= aItem.aCompCompanyExt; break;// "BusinessAddress/CompanyExt",
453 0 : case 40: pValues[nProp] <<= aItem.aCompSlogan; break;// "BusinessAddress/Slogan",
454 0 : case 41: pValues[nProp] <<= aItem.aCompStreet; break;// "BusinessAddress/Street",
455 0 : case 42: pValues[nProp] <<= aItem.aCompZip; break;// "BusinessAddress/Zip",
456 0 : case 43: pValues[nProp] <<= aItem.aCompCity; break;// "BusinessAddress/City",
457 0 : case 44: pValues[nProp] <<= aItem.aCompCountry; break;// "BusinessAddress/Country",
458 0 : case 45: pValues[nProp] <<= aItem.aCompState; break;// "BusinessAddress/State",
459 0 : case 46: pValues[nProp] <<= aItem.aCompPosition; break;// "BusinessAddress/Position",
460 0 : case 47: pValues[nProp] <<= aItem.aCompPhone; break;// "BusinessAddress/Phone",
461 0 : case 48: pValues[nProp] <<= aItem.aCompMobile; break;// "BusinessAddress/Mobile",
462 0 : case 49: pValues[nProp] <<= aItem.aCompFax; break;// "BusinessAddress/Fax",
463 0 : case 50: pValues[nProp] <<= aItem.aCompWWW; break;// "BusinessAddress/WebAddress",
464 0 : case 51: pValues[nProp] <<= aItem.aCompMail; break;// "BusinessAddress/Email",
465 0 : case 52: pValues[nProp] <<= aItem.sGlossaryGroup; break;// "AutoText/Group"
466 0 : case 53: pValues[nProp] <<= aItem.sGlossaryBlockName; break;// "AutoText/Block"
467 : }
468 : }
469 0 : PutProperties(aNames, aValues);
470 270 : }
471 :
472 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|