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