1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #include "PageBordersHandler.hxx"
24 
25 #include <dmapper/DomainMapper.hxx>
26 #include <resourcemodel/ResourceModelHelper.hxx>
27 #include <DomainMapper_Impl.hxx>
28 #include <ConversionHelper.hxx>
29 #include <NumberingManager.hxx>
30 #include <ThemeTable.hxx>
31 #include <ModelEventListener.hxx>
32 #include <MeasureHandler.hxx>
33 #include <OLEHandler.hxx>
34 #include <i18npool/mslangid.hxx>
35 #include <i18npool/paper.hxx>
36 #include <ooxml/OOXMLFastTokens.hxx>
37 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
38 #include <com/sun/star/document/XOOXMLDocumentPropertiesImporter.hpp>
39 #include <com/sun/star/text/HoriOrientation.hpp>
40 #include <com/sun/star/text/RelOrientation.hpp>
41 #include <com/sun/star/text/VertOrientation.hpp>
42 #include <com/sun/star/text/WrapTextMode.hpp>
43 #include <com/sun/star/text/SizeType.hpp>
44 #include <com/sun/star/text/XEndnotesSupplier.hpp>
45 #include <com/sun/star/text/XFootnotesSupplier.hpp>
46 #include <com/sun/star/text/XLineNumberingProperties.hpp>
47 #include <com/sun/star/text/XTextDocument.hpp>
48 #include <com/sun/star/text/XTextCursor.hpp>
49 #include <com/sun/star/text/XTextPortionAppend.hpp>
50 #include <com/sun/star/text/XParagraphAppend.hpp>
51 #include <com/sun/star/text/FontEmphasis.hpp>
52 #include <com/sun/star/awt/FontRelief.hpp>
53 #include <com/sun/star/awt/FontWeight.hpp>
54 #include <com/sun/star/awt/FontUnderline.hpp>
55 #include <com/sun/star/awt/FontStrikeout.hpp>
56 #include <com/sun/star/awt/FontSlant.hpp>
57 #include <com/sun/star/container/XIndexReplace.hpp>
58 #include <com/sun/star/drawing/XShape.hpp>
59 #include <com/sun/star/document/XEventBroadcaster.hpp>
60 #include <com/sun/star/style/ParagraphAdjust.hpp>
61 #include <com/sun/star/style/BreakType.hpp>
62 #include <com/sun/star/style/CaseMap.hpp>
63 #include <com/sun/star/style/LineSpacing.hpp>
64 #include <com/sun/star/style/LineSpacingMode.hpp>
65 #include <com/sun/star/table/BorderLine.hpp>
66 #include <com/sun/star/text/TextGridMode.hpp>
67 #include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
68 #include <com/sun/star/text/WritingMode.hpp>
69 #include <com/sun/star/text/WritingMode2.hpp>
70 #include <com/sun/star/text/XFootnote.hpp>
71 #include <com/sun/star/style/NumberingType.hpp>
72 #include <comphelper/types.hxx>
73 #include <comphelper/storagehelper.hxx>
74 
75 #include <rtl/ustrbuf.hxx>
76 #include <boost/shared_ptr.hpp>
77 #include <com/sun/star/uno/Any.hxx>
78 #include <tools/color.hxx>
79 #include <BorderHandler.hxx>
80 #include <CellColorHandler.hxx>
81 #include <SectionColumnHandler.hxx>
82 #include <vector>
83 #include <iostream>
84 
85 #if OSL_DEBUG_LEVEL > 0
86 #include <resourcemodel/QNameToString.hxx>
87 #endif
88 
89 #include <resourcemodel/TagLogger.hxx>
90 
91 using namespace ::com::sun::star;
92 using namespace ::rtl;
93 
94 namespace writerfilter {
95 
96 using resourcemodel::resolveSprmProps;
97 using resourcemodel::resolveAttributeProperties;
98 
99 namespace dmapper{
100 
101 TagLogger::Pointer_t dmapper_logger(TagLogger::getInstance("DOMAINMAPPER"));
102 
103 /* ---- Fridrich's mess begins here ---- */
104 struct _PageSz
105 {
106     sal_Int32 code;
107     sal_Int32 h;
108     bool      orient;
109     sal_Int32 w;
110 } CT_PageSz;
111 
112 
113 /* ---- Fridrich's mess (hopefully) ends here ---- */
114 
115 /*-- 09.06.2006 09:52:11---------------------------------------------------
116 
117   -----------------------------------------------------------------------*/
DomainMapper(const uno::Reference<uno::XComponentContext> & xContext,uno::Reference<io::XInputStream> xInputStream,uno::Reference<lang::XComponent> xModel,SourceDocumentType eDocumentType)118 DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xContext,
119                             uno::Reference< io::XInputStream > xInputStream,
120                             uno::Reference< lang::XComponent > xModel,
121                             SourceDocumentType eDocumentType) :
122     LoggedProperties(dmapper_logger, "DomainMapper"),
123     LoggedTable(dmapper_logger, "DomainMapper"),
124     LoggedStream(dmapper_logger, "DomainMapper"),
125     m_pImpl( new DomainMapper_Impl( *this, xContext, xModel, eDocumentType )),
126     mnBackgroundColor(0), mbIsHighlightSet(false)
127 {
128     // #i24363# tab stops relative to indent
129     m_pImpl->SetDocumentSettingsProperty(
130         PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_TABS_RELATIVE_TO_INDENT ),
131         uno::makeAny( false ) );
132 
133     m_pImpl->SetDocumentSettingsProperty(
134         PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_ADD_PARA_TABLE_SPACING ),
135         uno::makeAny( false ) );
136 
137 	//import document properties
138 
139 	try
140 	{
141 	    uno::Reference< lang::XMultiServiceFactory > xFactory(xContext->getServiceManager(), uno::UNO_QUERY_THROW);
142         uno::Reference< embed::XStorage > xDocumentStorage =
143             (comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(OFOPXML_STORAGE_FORMAT_STRING, xInputStream));
144 
145         uno::Reference< uno::XInterface > xTemp = xContext->getServiceManager()->createInstanceWithContext(
146                                 ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.OOXMLDocumentPropertiesImporter")),
147                                 xContext);
148 
149         uno::Reference< document::XOOXMLDocumentPropertiesImporter > xImporter( xTemp, uno::UNO_QUERY_THROW );
150         uno::Reference< document::XDocumentPropertiesSupplier > xPropSupplier( xModel, uno::UNO_QUERY_THROW);
151         xImporter->importProperties( xDocumentStorage, xPropSupplier->getDocumentProperties() );
152 	}
153 	catch( const uno::Exception& rEx )
154 	{
155 	    (void)rEx;
156 	}
157 }
158 /*-- 09.06.2006 09:52:12---------------------------------------------------
159 
160 -----------------------------------------------------------------------*/
~DomainMapper()161 DomainMapper::~DomainMapper()
162 {
163     try
164     {
165         uno::Reference< text::XDocumentIndexesSupplier> xIndexesSupplier( m_pImpl->GetTextDocument(), uno::UNO_QUERY );
166         uno::Reference< container::XIndexAccess > xIndexes = xIndexesSupplier->getDocumentIndexes();
167         sal_Int32 nIndexes = xIndexes->getCount();
168         if( nIndexes )
169         {
170             //index update has to wait until first view is created
171             uno::Reference< document::XEventBroadcaster > xBroadcaster(xIndexesSupplier, uno::UNO_QUERY);
172             xBroadcaster->addEventListener(uno::Reference< document::XEventListener >(new ModelEventListener));
173         }
174 
175 
176         // Apply the document settings after everything else
177         m_pImpl->GetSettingsTable()->ApplyProperties( m_pImpl->GetTextDocument( ) );
178     }
179     catch( const uno::Exception& rEx )
180     {
181         (void)rEx;
182     }
183 
184     delete m_pImpl;
185 }
186 /*-- 09.06.2006 09:52:12---------------------------------------------------
187 
188 -----------------------------------------------------------------------*/
lcl_attribute(Id nName,Value & val)189 void DomainMapper::lcl_attribute(Id nName, Value & val)
190 {
191     static ::rtl::OUString sLocalBookmarkName;
192     sal_Int32 nIntValue = val.getInt();
193     rtl::OUString sStringValue = val.getString();
194 
195     SectionPropertyMap * pSectionContext = m_pImpl->GetSectionContext();
196 
197     if( nName >= NS_rtf::LN_WIDENT && nName <= NS_rtf::LN_LCBSTTBFUSSR )
198         m_pImpl->GetFIB().SetData( nName, nIntValue );
199     else //if( !m_pImpl->getTableManager().attribute( nName, val) )
200     {
201 
202 
203         /* WRITERFILTERSTATUS: table: attributedata */
204         switch( nName )
205         {
206             /* attributes to be ignored */
207         case NS_rtf::LN_UNUSED1_3:
208             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
209 
210         case NS_rtf::LN_UNUSED1_7:
211             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
212 
213         case NS_rtf::LN_UNUSED8_3:
214             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
215 
216         case NS_rtf::LN_FWRITERESERVATION:
217             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
218 
219         case NS_rtf::LN_FLOADOVERRIDE:
220             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
221 
222         case NS_rtf::LN_FFAREAST:
223             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
224 
225         case NS_rtf::LN_FCRYPTO:
226             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
227 
228         case NS_rtf::LN_NFIBBACK:
229             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
230 
231         case NS_rtf::LN_LKEY:
232             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
233 
234         case NS_rtf::LN_ENVR:
235             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
236 
237         case NS_rtf::LN_FMAC:
238             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
239 
240         case NS_rtf::LN_FWORD97SAVED:
241             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
242 
243         case NS_rtf::LN_FCMAC:
244             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
245 
246         case NS_rtf::LN_PNFBPCHPFIRST_W6:
247             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
248 
249         case NS_rtf::LN_PNCHPFIRST_W6:
250             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
251 
252         case NS_rtf::LN_CPNBTECHP_W6:
253             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
254 
255         case NS_rtf::LN_PNFBPPAPFIRST_W6:
256             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
257 
258         case NS_rtf::LN_PNPAPFIRST_W6:
259             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
260 
261         case NS_rtf::LN_CPNBTEPAP_W6:
262             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
263 
264         case NS_rtf::LN_PNFBPLVCFIRST_W6:
265             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
266 
267         case NS_rtf::LN_PNLVCFIRST_W6:
268             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
269 
270         case NS_rtf::LN_CPNBTELVC_W6:
271             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
272 
273         case NS_rtf::LN_CBMAC:
274             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
275 
276         case NS_rtf::LN_LPRODUCTCREATED:
277             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
278 
279         case NS_rtf::LN_LPRODUCTREVISED:
280             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
281 
282         case NS_rtf::LN_CCPMCR:
283             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
284 
285         case NS_rtf::LN_PNFBPCHPFIRST:
286             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
287 
288         case NS_rtf::LN_PNFBPPAPFIRST:
289             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
290 
291         case NS_rtf::LN_PNFBPLVCFIRST:
292             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
293 
294         case NS_rtf::LN_FCISLANDFIRST:
295             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
296 
297         case NS_rtf::LN_FCISLANDLIM:
298             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
299 
300         case NS_rtf::LN_FCSTSHFORIG:
301             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
302 
303         case NS_rtf::LN_LCBSTSHFORIG:
304             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
305 
306         case NS_rtf::LN_FCPLCFPAD:
307             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
308 
309         case NS_rtf::LN_LCBPLCFPAD:
310             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
311 
312         case NS_rtf::LN_FCSTTBFGLSY:
313             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
314 
315         case NS_rtf::LN_LCBSTTBFGLSY:
316             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
317 
318         case NS_rtf::LN_FCPLCFGLSY:
319             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
320 
321         case NS_rtf::LN_LCBPLCFGLSY:
322             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
323 
324         case NS_rtf::LN_FCPLCFSEA:
325             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
326 
327         case NS_rtf::LN_LCBPLCFSEA:
328             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
329 
330         case NS_rtf::LN_FCPLCFFLDMCR:
331             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
332 
333         case NS_rtf::LN_LCBPLCFFLDMCR:
334             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
335 
336         case NS_rtf::LN_FCCMDS:
337             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
338 
339         case NS_rtf::LN_LCBCMDS:
340             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
341 
342         case NS_rtf::LN_FCPLCMCR:
343             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
344 
345         case NS_rtf::LN_LCBPLCMCR:
346             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
347 
348         case NS_rtf::LN_FCSTTBFMCR:
349             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
350 
351         case NS_rtf::LN_LCBSTTBFMCR:
352             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
353 
354         case NS_rtf::LN_FCPRDRVR:
355             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
356 
357         case NS_rtf::LN_LCBPRDRVR:
358             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
359 
360         case NS_rtf::LN_FCPRENVPORT:
361             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
362 
363         case NS_rtf::LN_LCBPRENVPORT:
364             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
365 
366         case NS_rtf::LN_FCPRENVLAND:
367             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
368 
369         case NS_rtf::LN_LCBPRENVLAND:
370             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
371 
372         case NS_rtf::LN_FCWSS:
373             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
374 
375         case NS_rtf::LN_LCBWSS:
376             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
377 
378         case NS_rtf::LN_FCPLCFPGDFTN:
379             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
380 
381         case NS_rtf::LN_LCBPLCFPGDFTN:
382             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
383 
384         case NS_rtf::LN_FCAUTOSAVESOURCE:
385             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
386 
387         case NS_rtf::LN_LCBAUTOSAVESOURCE:
388             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
389 
390         case NS_rtf::LN_FCPLCDOAMOM:
391             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
392 
393         case NS_rtf::LN_LCBPLCDOAMOM:
394             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
395 
396         case NS_rtf::LN_FCPLCDOAHDR:
397             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
398 
399         case NS_rtf::LN_LCBPLCDOAHDR:
400             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
401 
402         case NS_rtf::LN_FCPMS:
403             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
404 
405         case NS_rtf::LN_LCBPMS:
406             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
407 
408         case NS_rtf::LN_FCPLCFPGDEDN:
409             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
410 
411         case NS_rtf::LN_LCBPLCFPGDEDN:
412             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
413 
414         case NS_rtf::LN_FCPLCFWKB:
415             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
416 
417         case NS_rtf::LN_LCBPLCFWKB:
418             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
419 
420         case NS_rtf::LN_FCPLCFSPL:
421             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
422 
423         case NS_rtf::LN_LCBPLCFSPL:
424             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
425 
426         case NS_rtf::LN_FCSTWUSER:
427             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
428 
429         case NS_rtf::LN_LCBSTWUSER:
430             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
431 
432         case NS_rtf::LN_FCUNUSED:
433             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
434 
435         case NS_rtf::LN_LCBUNUSED:
436             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
437 
438         case NS_rtf::LN_FCSTTBFINTLFLD:
439             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
440 
441         case NS_rtf::LN_LCBSTTBFINTLFLD:
442             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
443 
444         case NS_rtf::LN_FCROUTESLIP:
445             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
446 
447         case NS_rtf::LN_LCBROUTESLIP:
448             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
449 
450         case NS_rtf::LN_FCSTTBSAVEDBY:
451             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
452 
453         case NS_rtf::LN_LCBSTTBSAVEDBY:
454             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
455 
456         case NS_rtf::LN_FCSTTBFNM:
457             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
458 
459         case NS_rtf::LN_LCBSTTBFNM:
460             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
461 
462         case NS_rtf::LN_FCDOCUNDO:
463             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
464 
465         case NS_rtf::LN_LCBDOCUNDO:
466             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
467 
468         case NS_rtf::LN_FCRGBUSE:
469             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
470 
471         case NS_rtf::LN_LCBRGBUSE:
472             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
473 
474         case NS_rtf::LN_FCUSP:
475             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
476 
477         case NS_rtf::LN_LCBUSP:
478             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
479 
480         case NS_rtf::LN_FCUSKF:
481             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
482 
483         case NS_rtf::LN_LCBUSKF:
484             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
485 
486         case NS_rtf::LN_FCPLCUPCRGBUSE:
487             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
488 
489         case NS_rtf::LN_LCBPLCUPCRGBUSE:
490             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
491 
492         case NS_rtf::LN_FCPLCUPCUSP:
493             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
494 
495         case NS_rtf::LN_LCBPLCUPCUSP:
496             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
497 
498         case NS_rtf::LN_FCPLGOSL:
499             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
500 
501         case NS_rtf::LN_LCBPLGOSL:
502             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
503 
504         case NS_rtf::LN_FCPLCOCX:
505             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
506 
507         case NS_rtf::LN_LCBPLCOCX:
508             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
509 
510         case NS_rtf::LN_DWLOWDATETIME:
511             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
512 
513         case NS_rtf::LN_DWHIGHDATETIME:
514             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
515 
516         case NS_rtf::LN_FCPLCASUMY:
517             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
518 
519         case NS_rtf::LN_LCBPLCASUMY:
520             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
521 
522         case NS_rtf::LN_FCPLCFGRAM:
523             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
524 
525         case NS_rtf::LN_LCBPLCFGRAM:
526             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
527 
528         case NS_rtf::LN_FCSTTBFUSSR:
529             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
530             break;
531 
532         case NS_rtf::LN_ISTD: //index of applied style
533             /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
534             {
535             //search for the style with the given id and apply it
536             //as CharStyleName or ParaStyleName
537             //if the style is a user defined style then it must have an ISTD - built-in styles might not have it
538             StyleSheetTablePtr pStyleSheets = m_pImpl->GetStyleSheetTable();
539             ::rtl::OUString sValue = ::rtl::OUString::valueOf(nIntValue, 16);
540             const StyleSheetEntryPtr pEntry = pStyleSheets->FindStyleSheetByISTD(sValue);
541             if( pEntry.get( ) )
542             {
543                 bool bParaStyle = (pEntry->nStyleTypeCode == STYLE_TYPE_PARA);
544                 if(bParaStyle)
545                     m_pImpl->SetCurrentParaStyleId(::rtl::OUString::valueOf(static_cast<sal_Int32>(nIntValue), 16));
546                 if (m_pImpl->GetTopContext() && m_pImpl->GetTopContextType() != CONTEXT_SECTION)
547 	                m_pImpl->GetTopContext()->Insert(
548                                                  bParaStyle ?
549                                                  PROP_PARA_STYLE_NAME  : PROP_CHAR_STYLE_NAME,
550                                                  true,
551                                                  uno::makeAny(
552                                                  m_pImpl->GetStyleSheetTable()->ConvertStyleName( pEntry->sStyleName ) ) );
553             }
554         }
555         break;
556         case NS_rtf::LN_ISTARTAT:
557             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
558             break;
559         case NS_rtf::LN_NFC:
560             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
561             break;
562         case NS_rtf::LN_FLEGAL:
563             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
564             break;
565         case NS_rtf::LN_FNORESTART:
566             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
567             break;
568         case NS_rtf::LN_FIDENTSAV:
569             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
570             break;
571         case NS_rtf::LN_FCONVERTED:
572             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
573             break;
574         case NS_rtf::LN_FTENTATIVE:
575             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
576             break;
577         case NS_rtf::LN_RGBXCHNUMS:
578             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
579             break;
580         case NS_rtf::LN_IXCHFOLLOW:
581             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
582             break;
583         case NS_rtf::LN_DXASPACE:
584             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
585             break;
586         case NS_rtf::LN_DXAINDENT:
587             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
588             break;
589         case NS_rtf::LN_CBGRPPRLCHPX:
590             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
591             break;
592         case NS_rtf::LN_CBGRPPRLPAPX:
593             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
594             break;
595         case NS_rtf::LN_LSID:
596             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
597             break;
598         case NS_rtf::LN_TPLC:
599             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
600             break;
601         case NS_rtf::LN_RGISTD:
602             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
603             break;
604         case NS_rtf::LN_FSIMPLELIST:
605             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
606             break;
607         case NS_rtf::LN_fAutoNum:
608             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
609             break;
610         case NS_rtf::LN_fHybrid:
611             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
612             break;
613         case NS_rtf::LN_ILVL:
614             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
615             break;
616         case NS_rtf::LN_FSTARTAT:
617             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
618             break;
619         case NS_rtf::LN_FFORMATTING:
620             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
621             break;
622         case NS_rtf::LN_UNSIGNED4_6:
623             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
624             break;
625         case NS_rtf::LN_clfolvl:
626             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
627             break;
628         case NS_rtf::LN_CBFFNM1:
629             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
630             break;
631         case NS_rtf::LN_PRQ:
632             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
633             break;
634         case NS_rtf::LN_FTRUETYPE:
635             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
636             break;
637         case NS_rtf::LN_FF:
638             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
639             break;
640         case NS_rtf::LN_WWEIGHT:
641             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
642             break;
643         case NS_rtf::LN_CHS:
644             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
645 
646             {
647                 m_pImpl->GetFIB().SetLNCHS( nIntValue );
648             }
649             break;
650         case NS_rtf::LN_IXCHSZALT:
651             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
652             break;
653         case NS_rtf::LN_PANOSE:
654             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
655             break;
656         case NS_rtf::LN_FS:
657             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
658             break;
659         case NS_rtf::LN_STI:
660             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
661             break;
662         case NS_rtf::LN_FSCRATCH:
663             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
664             break;
665         case NS_rtf::LN_FINVALHEIGHT:
666             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
667             break;
668         case NS_rtf::LN_FHASUPE:
669             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
670             break;
671         case NS_rtf::LN_FMASSCOPY:
672             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
673             break;
674         case NS_rtf::LN_SGC:
675             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
676             break;
677         case NS_rtf::LN_ISTDBASE:
678             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
679             break;
680         case NS_rtf::LN_CUPX:
681             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
682             break;
683         case NS_rtf::LN_ISTDNEXT:
684             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
685             break;
686         case NS_rtf::LN_BCHUPE:
687             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
688             break;
689         case NS_rtf::LN_FAUTOREDEF:
690             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
691             break;
692         case NS_rtf::LN_FHIDDEN:
693             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
694             break;
695         case NS_rtf::LN_CSTD:
696             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
697             break;
698         case NS_rtf::LN_CBSTDBASEINFILE:
699             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
700             break;
701         case NS_rtf::LN_FSTDSTYLENAMESWRITTEN:
702             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
703             break;
704         case NS_rtf::LN_UNUSED4_2:
705             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
706             break;
707         case NS_rtf::LN_STIMAXWHENSAVED:
708             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
709             break;
710         case NS_rtf::LN_ISTDMAXFIXEDWHENSAVED:
711             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
712             break;
713         case NS_rtf::LN_NVERBUILTINNAMESWHENSAVED:
714             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
715             break;
716         case NS_rtf::LN_RGFTCSTANDARDCHPSTSH:
717             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
718             break;
719         case NS_rtf::LN_WIDENT:
720             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
721 
722         case NS_rtf::LN_NFIB:
723             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
724 
725         case NS_rtf::LN_NPRODUCT:
726             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
727         case NS_rtf::LN_LID:
728             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
729         case NS_rtf::LN_PNNEXT:
730             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
731         case NS_rtf::LN_FDOT:
732             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
733         case NS_rtf::LN_FGLSY:
734             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
735         case NS_rtf::LN_FCOMPLEX:
736             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
737         case NS_rtf::LN_FHASPIC:
738             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
739 
740         case NS_rtf::LN_CQUICKSAVES:
741             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
742 
743         case NS_rtf::LN_FENCRYPTED:
744             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
745 
746         case NS_rtf::LN_FWHICHTBLSTM:
747             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
748 
749         case NS_rtf::LN_FREADONLYRECOMMENDED:
750             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
751 
752         case NS_rtf::LN_FEXTCHAR:
753             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
754 
755         case NS_rtf::LN_FEMPTYSPECIAL:
756             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
757 
758         case NS_rtf::LN_FLOADOVERRIDEPAGE:
759             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
760 
761         case NS_rtf::LN_FFUTURESAVEDUNDO:
762             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
763 
764         case NS_rtf::LN_FSPARE0:
765             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
766 
767         case NS_rtf::LN_CHSTABLES:
768             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
769 
770         case NS_rtf::LN_FCMIN:
771             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
772 
773         case NS_rtf::LN_CSW:
774             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
775 
776         case NS_rtf::LN_WMAGICCREATED:
777             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
778 
779         case NS_rtf::LN_WMAGICREVISED:
780             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
781 
782         case NS_rtf::LN_WMAGICCREATEDPRIVATE:
783             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
784 
785 
786         case NS_rtf::LN_WMAGICREVISEDPRIVATE:
787             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
788 
789         case NS_rtf::LN_LIDFE:
790             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
791 
792         case NS_rtf::LN_CLW:
793             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
794 
795         case NS_rtf::LN_CCPTEXT:
796             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
797 
798 
799         case NS_rtf::LN_CCPFTN:
800             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
801 
802         case NS_rtf::LN_CCPHDD:
803             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
804 
805         case NS_rtf::LN_CCPATN:
806             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
807 
808         case NS_rtf::LN_CCPEDN:
809             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
810 
811         case NS_rtf::LN_CCPTXBX:
812             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
813 
814         case NS_rtf::LN_CCPHDRTXBX:
815             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
816 
817         case NS_rtf::LN_PNCHPFIRST:
818             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
819 
820         case NS_rtf::LN_CPNBTECHP:
821             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
822 
823         case NS_rtf::LN_PNPAPFIRST:
824             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
825 
826         case NS_rtf::LN_CPNBTEPAP:
827             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
828 
829         case NS_rtf::LN_PNLVCFIRST:
830             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
831 
832         case NS_rtf::LN_CPNBTELVC:
833             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
834 
835         case NS_rtf::LN_CFCLCB:
836             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
837 
838         case NS_rtf::LN_FCSTSHF:
839             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
840 
841         case NS_rtf::LN_LCBSTSHF:
842             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
843 
844         case NS_rtf::LN_FCPLCFFNDREF:
845             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
846 
847         case NS_rtf::LN_LCBPLCFFNDREF:
848             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
849 
850         case NS_rtf::LN_FCPLCFFNDTXT:
851             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
852 
853         case NS_rtf::LN_LCBPLCFFNDTXT:
854             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
855 
856         case NS_rtf::LN_FCPLCFANDREF:
857             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
858 
859         case NS_rtf::LN_LCBPLCFANDREF:
860             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
861 
862         case NS_rtf::LN_FCPLCFANDTXT:
863             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
864 
865         case NS_rtf::LN_LCBPLCFANDTXT:
866             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
867 
868         case NS_rtf::LN_FCPLCFSED:
869             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
870 
871         case NS_rtf::LN_LCBPLCFSED:
872             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
873 
874         case NS_rtf::LN_FCPLCFPHE:
875             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
876 
877         case NS_rtf::LN_LCBPLCFPHE:
878             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
879 
880         case NS_rtf::LN_FCPLCFHDD:
881             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
882 
883         case NS_rtf::LN_LCBPLCFHDD:
884             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
885 
886         case NS_rtf::LN_FCPLCFBTECHPX:
887             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
888 
889         case NS_rtf::LN_LCBPLCFBTECHPX:
890             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
891 
892 
893         case NS_rtf::LN_FCPLCFBTEPAPX:
894             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
895 
896         case NS_rtf::LN_LCBPLCFBTEPAPX:
897             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
898 
899         case NS_rtf::LN_FCSTTBFFFN:
900             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
901 
902         case NS_rtf::LN_LCBSTTBFFFN:
903             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
904 
905         case NS_rtf::LN_FCPLCFFLDMOM:
906             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
907 
908         case NS_rtf::LN_LCBPLCFFLDMOM:
909             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
910 
911         case NS_rtf::LN_FCPLCFFLDHDR:
912             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
913 
914         case NS_rtf::LN_LCBPLCFFLDHDR:
915             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
916 
917 
918         case NS_rtf::LN_FCPLCFFLDFTN:
919             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
920 
921         case NS_rtf::LN_LCBPLCFFLDFTN:
922             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
923 
924         case NS_rtf::LN_FCPLCFFLDATN:
925             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
926 
927         case NS_rtf::LN_LCBPLCFFLDATN:
928             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
929 
930         case NS_rtf::LN_FCSTTBFBKMK:
931             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
932 
933         case NS_rtf::LN_LCBSTTBFBKMK:
934             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
935 
936         case NS_rtf::LN_FCPLCFBKF:
937             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
938 
939         case NS_rtf::LN_LCBPLCFBKF:
940             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
941 
942         case NS_rtf::LN_FCPLCFBKL:
943             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
944 
945         case NS_rtf::LN_LCBPLCFBKL:
946             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
947 
948         case NS_rtf::LN_FCDOP:
949             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
950 
951         case NS_rtf::LN_LCBDOP:
952             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
953 
954         case NS_rtf::LN_FCSTTBFASSOC:
955             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
956 
957         case NS_rtf::LN_LCBSTTBFASSOC:
958             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
959 
960         case NS_rtf::LN_FCCLX:
961             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
962 
963         case NS_rtf::LN_LCBCLX:
964             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
965 
966         case NS_rtf::LN_FCGRPXSTATNOWNERS:
967             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
968 
969         case NS_rtf::LN_LCBGRPXSTATNOWNERS:
970             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
971 
972         case NS_rtf::LN_FCSTTBFATNBKMK:
973             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
974 
975         case NS_rtf::LN_LCBSTTBFATNBKMK:
976             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
977 
978         case NS_rtf::LN_FCPLCSPAMOM:
979             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
980 
981         case NS_rtf::LN_LCBPLCSPAMOM:
982             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
983 
984         case NS_rtf::LN_FCPLCSPAHDR:
985             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
986 
987 
988         case NS_rtf::LN_LCBPLCSPAHDR:
989             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
990 
991         case NS_rtf::LN_FCPLCFATNBKF:
992             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
993 
994         case NS_rtf::LN_LCBPLCFATNBKF:
995             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
996 
997         case NS_rtf::LN_FCPLCFATNBKL:
998             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
999 
1000         case NS_rtf::LN_LCBPLCFATNBKL:
1001             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1002 
1003         case NS_rtf::LN_FCFORMFLDSTTBF:
1004             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1005 
1006         case NS_rtf::LN_LCBFORMFLDSTTBF:
1007             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1008 
1009         case NS_rtf::LN_FCPLCFENDREF:
1010             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1011 
1012 
1013         case NS_rtf::LN_LCBPLCFENDREF:
1014             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1015 
1016         case NS_rtf::LN_FCPLCFENDTXT:
1017             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1018 
1019         case NS_rtf::LN_LCBPLCFENDTXT:
1020             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1021 
1022         case NS_rtf::LN_FCPLCFFLDEDN:
1023             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1024 
1025         case NS_rtf::LN_LCBPLCFFLDEDN:
1026             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1027 
1028         case NS_rtf::LN_FCDGGINFO:
1029             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1030 
1031         case NS_rtf::LN_LCBDGGINFO:
1032             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1033 
1034         case NS_rtf::LN_FCSTTBFRMARK:
1035             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1036 
1037 
1038         case NS_rtf::LN_LCBSTTBFRMARK:
1039             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1040 
1041         case NS_rtf::LN_FCSTTBFCAPTION:
1042             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1043 
1044         case NS_rtf::LN_LCBSTTBFCAPTION:
1045             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1046 
1047         case NS_rtf::LN_FCSTTBFAUTOCAPTION:
1048             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1049 
1050         case NS_rtf::LN_LCBSTTBFAUTOCAPTION:
1051             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1052 
1053         case NS_rtf::LN_LCBPLCFTXBXTXT:
1054             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1055 
1056         case NS_rtf::LN_FCPLCFFLDTXBX:
1057             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1058 
1059         case NS_rtf::LN_LCBPLCFFLDTXBX:
1060             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1061 
1062         case NS_rtf::LN_FCPLCFHDRTXBXTXT:
1063             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1064 
1065         case NS_rtf::LN_LCBPLCFHDRTXBXTXT:
1066             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1067 
1068         case NS_rtf::LN_FCPLCFFLDHDRTXBX:
1069             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1070 
1071         case NS_rtf::LN_LCBPLCFFLDHDRTXBX:
1072             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1073 
1074         case NS_rtf::LN_FCSTTBTTMBD:
1075             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1076 
1077         case NS_rtf::LN_LCBSTTBTTMBD:
1078             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1079 
1080         case NS_rtf::LN_FCPGDMOTHER:
1081             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1082 
1083         case NS_rtf::LN_LCBPGDMOTHER:
1084             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1085 
1086         case NS_rtf::LN_FCBKDMOTHER:
1087             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1088 
1089         case NS_rtf::LN_LCBBKDMOTHER:
1090             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1091 
1092         case NS_rtf::LN_FCPGDFTN:
1093             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1094 
1095         case NS_rtf::LN_LCBPGDFTN:
1096             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1097 
1098         case NS_rtf::LN_FCBKDFTN:
1099             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1100 
1101         case NS_rtf::LN_LCBBKDFTN:
1102             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1103 
1104         case NS_rtf::LN_FCPGDEDN:
1105             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1106 
1107         case NS_rtf::LN_LCBPGDEDN:
1108             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1109 
1110 
1111         case NS_rtf::LN_FCBKDEDN:
1112             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1113 
1114         case NS_rtf::LN_LCBBKDEDN:
1115             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1116 
1117         case NS_rtf::LN_FCPLCFLST:
1118             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1119 
1120 
1121         case NS_rtf::LN_LCBPLCFLST:
1122             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1123 
1124         case NS_rtf::LN_FCPLFLFO:
1125             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1126 
1127         case NS_rtf::LN_LCBPLFLFO:
1128             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1129 
1130         case NS_rtf::LN_FCPLCFTXBXBKD:
1131             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1132 
1133         case NS_rtf::LN_LCBPLCFTXBXBKD:
1134             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1135 
1136         case NS_rtf::LN_FCPLCFTXBXHDRBKD:
1137             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1138 
1139         case NS_rtf::LN_LCBPLCFTXBXHDRBKD:
1140             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1141 
1142         case NS_rtf::LN_FCSTTBGLSYSTYLE:
1143             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1144 
1145 
1146         case NS_rtf::LN_LCBSTTBGLSYSTYLE:
1147             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1148 
1149         case NS_rtf::LN_FCPLCFBTELVC:
1150             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1151 
1152         case NS_rtf::LN_LCBPLCFBTELVC:
1153             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1154 
1155         case NS_rtf::LN_FCPLCFLVC:
1156             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1157 
1158         case NS_rtf::LN_LCBPLCFLVC:
1159             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1160 
1161         case NS_rtf::LN_FCSTTBLISTNAMES:
1162             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1163 
1164         case NS_rtf::LN_LCBSTTBLISTNAMES:
1165             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1166 
1167         case NS_rtf::LN_LCBSTTBFUSSR:
1168             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1169             {
1170                 m_pImpl->GetFIB().SetData( nName, nIntValue );
1171             }
1172             break;
1173         case NS_rtf::LN_FN:
1174             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1175 
1176         case NS_rtf::LN_FCSEPX:
1177             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1178 
1179         case NS_rtf::LN_FNMPR:
1180             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1181 
1182         case NS_rtf::LN_FCMPR:
1183             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1184 
1185             //section descriptor, unused or internally used
1186             break;
1187         case NS_rtf::LN_ICOFORE:
1188             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1189             break;
1190         case NS_rtf::LN_ICOBACK:
1191             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1192             break;
1193         case NS_rtf::LN_IPAT:
1194             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1195             break;
1196         case NS_rtf::LN_SHDFORECOLOR:
1197             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1198             break;
1199         case NS_rtf::LN_SHDBACKCOLOR:
1200             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1201             break;
1202         case NS_rtf::LN_SHDPATTERN:
1203             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1204             break;
1205         case NS_rtf::LN_DPTLINEWIDTH:
1206             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1207             break;
1208         case NS_rtf::LN_BRCTYPE:
1209             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1210             break;
1211         case NS_rtf::LN_ICO:
1212             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1213             break;
1214         case NS_rtf::LN_DPTSPACE:
1215             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1216             break;
1217         case NS_rtf::LN_FSHADOW:
1218             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1219             break;
1220         case NS_rtf::LN_FFRAME:
1221             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1222             break;
1223         case NS_rtf::LN_UNUSED2_15:
1224             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1225             break;
1226         case NS_rtf::LN_FFIRSTMERGED:
1227             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1228             break;
1229         case NS_rtf::LN_FMERGED:
1230             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1231             break;
1232         case NS_rtf::LN_FVERTICAL:
1233             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1234             break;
1235         case NS_rtf::LN_FBACKWARD:
1236             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1237             break;
1238         case NS_rtf::LN_FROTATEFONT:
1239             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1240             break;
1241         case NS_rtf::LN_FVERTMERGE:
1242             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1243             break;
1244         case NS_rtf::LN_FVERTRESTART:
1245             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1246             break;
1247         case NS_rtf::LN_VERTALIGN:
1248             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1249             break;
1250         case NS_rtf::LN_FUNUSED:
1251             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1252             break;
1253         case NS_rtf::LN_BRCTOP:
1254             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1255         case NS_rtf::LN_BRCLEFT:
1256             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1257         case NS_rtf::LN_BRCBOTTOM:
1258             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1259         case NS_rtf::LN_BRCRIGHT:
1260             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1261         {
1262             table::BorderLine aBorderLine;
1263             sal_Int32 nLineDistance = ConversionHelper::MakeBorderLine( nIntValue, aBorderLine );
1264             (void)nLineDistance;
1265             PropertyIds eBorderId = PROP_LEFT_BORDER;
1266             PropertyIds eBorderDistId = PROP_LEFT_BORDER_DISTANCE  ;
1267             switch( nName )
1268             {
1269                 case NS_rtf::LN_BRCTOP:
1270                     eBorderId = PROP_TOP_BORDER            ;
1271                     eBorderDistId = PROP_TOP_BORDER_DISTANCE;
1272                 break;
1273                 case NS_rtf::LN_BRCLEFT:
1274 //                    eBorderId = PROP_LEFT_BORDER;
1275 //                    eBorderDistId = PROP_LEFT_BORDER_DISTANCE  ;
1276                 break;
1277                 case NS_rtf::LN_BRCBOTTOM:
1278                     eBorderId = PROP_BOTTOM_BORDER         ;
1279                     eBorderDistId = PROP_BOTTOM_BORDER_DISTANCE;
1280                 break;
1281                 case NS_rtf::LN_BRCRIGHT:
1282                     eBorderId = PROP_RIGHT_BORDER          ;
1283                     eBorderDistId = PROP_RIGHT_BORDER_DISTANCE ;
1284                 break;
1285                 default:;
1286             }
1287             //todo: where to put the border properties
1288             //rContext->Insert(eBorderId, uno::makeAny( aBorderLine ));
1289             //rContext->Insert(eBorderDistId, uno::makeAny( nLineDistance ));
1290         }
1291         break;
1292         case NS_rtf::LN_ITCFIRST:
1293             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1294             break;
1295         case NS_rtf::LN_FPUB:
1296             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1297             break;
1298         case NS_rtf::LN_ITCLIM:
1299             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1300             break;
1301         case NS_rtf::LN_FCOL:
1302             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1303             break;
1304         case NS_rtf::LN_LINECOLOR:
1305             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1306             break;
1307         case NS_rtf::LN_LINEWIDTH:
1308             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1309             break;
1310         case NS_rtf::LN_LINETYPE:
1311             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1312             break;
1313         case NS_rtf::LN_MM:
1314             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1315             break;
1316         case NS_rtf::LN_XEXT:
1317             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1318             break;
1319         case NS_rtf::LN_YEXT:
1320             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1321             break;
1322         case NS_rtf::LN_HMF:
1323             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1324             break;
1325         case NS_rtf::LN_LCB:
1326             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1327             break;
1328         case NS_rtf::LN_CBHEADER:
1329             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1330             break;
1331         case NS_rtf::LN_MFP:
1332             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1333             break;
1334         case NS_rtf::LN_BM_RCWINMF:
1335             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1336             break;
1337         case NS_rtf::LN_DXAGOAL:
1338             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1339             break;
1340         case NS_rtf::LN_DYAGOAL:
1341             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1342             break;
1343         case NS_rtf::LN_MX:
1344             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1345             break;
1346         case NS_rtf::LN_MY:
1347             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1348             break;
1349         case NS_rtf::LN_DXACROPLEFT:
1350             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1351             break;
1352         case NS_rtf::LN_DYACROPTOP:
1353             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1354             break;
1355         case NS_rtf::LN_DXACROPRIGHT:
1356             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1357             break;
1358         case NS_rtf::LN_DYACROPBOTTOM:
1359             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1360             break;
1361         case NS_rtf::LN_BRCL:
1362             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1363             break;
1364         case NS_rtf::LN_FFRAMEEMPTY:
1365             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1366             break;
1367         case NS_rtf::LN_FBITMAP:
1368             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1369             break;
1370         case NS_rtf::LN_FDRAWHATCH:
1371             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1372             break;
1373         case NS_rtf::LN_FERROR:
1374             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1375             break;
1376         case NS_rtf::LN_BPP:
1377             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1378             break;
1379         case NS_rtf::LN_DXAORIGIN:
1380             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1381             break;
1382         case NS_rtf::LN_DYAORIGIN:
1383             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1384             break;
1385         case NS_rtf::LN_CPROPS:
1386             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1387             break;
1388         case NS_rtf::LN_LINEPROPSTOP:
1389             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1390             break;
1391         case NS_rtf::LN_LINEPROPSLEFT:
1392             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1393             break;
1394         case NS_rtf::LN_LINEPROPSBOTTOM:
1395             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1396             break;
1397         case NS_rtf::LN_LINEPROPSRIGHT:
1398             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1399             break;
1400         case NS_rtf::LN_LINEPROPSHORIZONTAL:
1401             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1402             break;
1403         case NS_rtf::LN_LINEPROPSVERTICAL:
1404             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1405             break;
1406         case NS_rtf::LN_headerr:
1407             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1408             break;
1409         case NS_rtf::LN_footerr:
1410             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1411             break;
1412         case NS_rtf::LN_endnote:
1413             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1414             break;
1415 
1416         case NS_rtf::LN_BOOKMARKNAME:
1417             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1418             // sStringValue contains the bookmark name
1419             sLocalBookmarkName = sStringValue;
1420         break;
1421 
1422         case NS_rtf::LN_IBKL:
1423             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0.5 */
1424             //contains the bookmark identifier - has to be added to the bookmark name imported before
1425             //if it is already available then the bookmark should be inserted
1426             m_pImpl->AddBookmark( sLocalBookmarkName, nIntValue );
1427             sLocalBookmarkName = ::rtl::OUString();
1428         break;
1429 
1430         case NS_rtf::LN_LISTLEVEL:
1431             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1432             break;
1433         case NS_rtf::LN_LFOData:
1434             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1435             break;
1436         case NS_rtf::LN_F:
1437             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1438             break;
1439         case NS_rtf::LN_ALTFONTNAME:
1440             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1441             break;
1442         case NS_rtf::LN_XSZFFN:
1443             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1444             break;
1445         case NS_rtf::LN_XSTZNAME:
1446             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1447             break;
1448         case NS_rtf::LN_XSTZNAME1:
1449             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1450             break;
1451         case NS_rtf::LN_UPXSTART:
1452             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1453             break;
1454         case NS_rtf::LN_UPX:
1455             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1456             break;
1457         case NS_rtf::LN_sed:
1458             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1459             //section properties
1460             resolveAttributeProperties(*this, val);
1461             break;
1462         case NS_rtf::LN_tbdAdd:
1463             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1464             //
1465             {
1466                 writerfilter::Reference<Properties>::Pointer_t pProperties = val.getProperties();
1467                 if( pProperties.get())
1468                 {
1469                     pProperties->resolve(*this);
1470                     //increment to the next tab stop
1471                     m_pImpl->NextTabStop();
1472                 }
1473             }
1474             break;
1475         case NS_rtf::LN_dxaDel:
1476             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1477             //deleted tab
1478         case NS_rtf::LN_dxaAdd:
1479             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1480             //set tab
1481         case NS_rtf::LN_TLC:
1482             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1483             //tab leading characters - for decimal tabs
1484         case NS_rtf::LN_JC:
1485             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1486             //tab justification
1487             m_pImpl->ModifyCurrentTabStop(nName, nIntValue);
1488             break;
1489         case NS_rtf::LN_UNUSED0_6:
1490             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
1491             // really unused
1492             break;
1493         case NS_rtf::LN_rgbrc:
1494             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1495             break;
1496         case NS_rtf::LN_shd:
1497             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1498             break;
1499         case NS_rtf::LN_cellShd:
1500             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1501             break;
1502         case NS_rtf::LN_cellTopColor:
1503         case NS_rtf::LN_cellLeftColor:
1504         case NS_rtf::LN_cellBottomColor:
1505         case NS_rtf::LN_cellRightColor:
1506             OSL_ASSERT("handled by DomainMapperTableManager");
1507         break;
1508 
1509         case NS_rtf::LN_LISTTABLE:
1510             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1511             break;
1512         case NS_rtf::LN_LFOTABLE:
1513             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1514             break;
1515         case NS_rtf::LN_FONTTABLE:
1516             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1517             break;
1518         case NS_rtf::LN_STYLESHEET:
1519             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1520             break;
1521 
1522         case NS_rtf::LN_fcEastAsianLayout:
1523             /* WRITERFILTERSTATUS: done: 50, planned: 0.5, spent: 0 */
1524         /*  it seems that the value is following:
1525                 ???? XX YYYY ZZ
1526             where
1527                 XX seems to be the run id
1528                 ZZ is the length of the function that is normally 6
1529                 Lower byte of YYYY determines whether it is
1530                     vertical text flow (0x01), or
1531                     two lines in one layout (0x02).
1532                 For 0x01, if the higher byte of YYYY is zero, the text is not scaled to fit the line height,
1533                     in opposite case, it is to be scaled.
1534                 For 0x02, the higher byte of YYYY is determinig the prefix and suffix of the run:
1535                     no brackets (0x00) ,
1536                     () round brackets (0x01),
1537                     [] square backets (0x02),
1538                     <> angle brackets (0x03) and
1539                     {} curly brackets (0x04).
1540                 ???? is different and we do not know its signification
1541           */
1542 
1543             if ((nIntValue & 0x000000FF) == 6)
1544             {
1545                 switch ((nIntValue & 0x0000FF00) >> 8)
1546                 {
1547                 case 1: // vertical text
1548 					if (m_pImpl->GetTopContext())
1549 					{
1550 	                    m_pImpl->GetTopContext()->Insert(PROP_CHAR_ROTATION, true, uno::makeAny ( sal_Int16(900) ));
1551     	                m_pImpl->GetTopContext()->Insert(PROP_CHAR_ROTATION_IS_FIT_TO_LINE, true, uno::makeAny (((nIntValue & 0x00FF0000) >> 16) != 0));
1552 					}
1553                     break;
1554                 case 2: // two lines in one
1555 					if (m_pImpl->GetTopContext())
1556 					{
1557 	                    m_pImpl->GetTopContext()->Insert(PROP_CHAR_COMBINE_IS_ON, true, uno::makeAny ( true ));
1558 	                    m_pImpl->GetTopContext()->Insert(PROP_CHAR_COMBINE_PREFIX, true, uno::makeAny ( getBracketStringFromEnum((nIntValue & 0x00FF0000) >> 16)));
1559 	                    m_pImpl->GetTopContext()->Insert(PROP_CHAR_COMBINE_SUFFIX, true, uno::makeAny ( getBracketStringFromEnum((nIntValue & 0x00FF0000) >> 16, false)));
1560 					}
1561                     break;
1562                 default:
1563                     break;
1564                 }
1565             }
1566             break;
1567         case NS_rtf::LN_FRD :
1568             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1569             //footnote reference descriptor, if nIntValue > 0 then automatic, custom otherwise
1570             //ignored
1571         break;
1572         case NS_rtf::LN_FONT: //font of footnote symbol
1573             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1574 			if (m_pImpl->GetTopContext())
1575 	            m_pImpl->GetTopContext()->SetFootnoteFontId( nIntValue );
1576         break;
1577         case NS_ooxml::LN_CT_Sym_char:
1578             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1579         if( m_pImpl->GetTopContext() && m_pImpl->GetTopContext()->GetFootnote().is())
1580         {
1581             m_pImpl->GetTopContext()->GetFootnote()->setLabel(::rtl::OUString( sal_Unicode(nIntValue)));
1582             break;
1583         }
1584         else //it's a _real_ symbol
1585         {
1586             utext( reinterpret_cast < const sal_uInt8 * >( &nIntValue ), 1 );
1587         }
1588         break;
1589         case NS_rtf::LN_CHAR: //footnote symbol character
1590             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1591 			if (m_pImpl->GetTopContext())
1592 	            m_pImpl->GetTopContext()->SetFootnoteSymbol( sal_Unicode(nIntValue));
1593         break;
1594         case NS_ooxml::LN_CT_Sym_font:
1595             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1596             //the footnote symbol and font are provided after the footnote is already inserted
1597         if( m_pImpl->GetTopContext() && m_pImpl->GetTopContext()->GetFootnote().is())
1598         {
1599             uno::Reference< beans::XPropertySet > xAnchorProps( m_pImpl->GetTopContext()->GetFootnote()->getAnchor(), uno::UNO_QUERY );
1600             xAnchorProps->setPropertyValue(
1601                 PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_CHAR_FONT_NAME),
1602                 uno::makeAny( sStringValue ));
1603         }
1604         else //a real symbol
1605 			if (m_pImpl->GetTopContext())
1606 	            m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME, true, uno::makeAny( sStringValue ));
1607         break;
1608         case NS_ooxml::LN_CT_Underline_val:
1609             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1610             handleUnderlineType(nIntValue, m_pImpl->GetTopContext());
1611             break;
1612         case NS_ooxml::LN_CT_Color_val:
1613             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1614 			if (m_pImpl->GetTopContext())
1615 	            m_pImpl->GetTopContext()->Insert(PROP_CHAR_COLOR, true, uno::makeAny( nIntValue ) );
1616             break;
1617         case NS_ooxml::LN_CT_Underline_color:
1618             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1619 			if (m_pImpl->GetTopContext())
1620 			{
1621 	            m_pImpl->GetTopContext()->Insert(PROP_CHAR_UNDERLINE_HAS_COLOR, true, uno::makeAny( true ) );
1622 	            m_pImpl->GetTopContext()->Insert(PROP_CHAR_UNDERLINE_COLOR, true, uno::makeAny( nIntValue ) );
1623 			}
1624             break;
1625 
1626         case NS_ooxml::LN_CT_TabStop_val:
1627             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1628             if (sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_ST_TabJc_clear)
1629             {
1630                 m_pImpl->m_aCurrentTabStop.bDeleted = true;
1631             }
1632             else
1633             {
1634                 m_pImpl->m_aCurrentTabStop.bDeleted = false;
1635                 m_pImpl->m_aCurrentTabStop.Alignment = getTabAlignFromValue(nIntValue);
1636             }
1637             break;
1638         case NS_ooxml::LN_CT_TabStop_leader:
1639             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1640             m_pImpl->m_aCurrentTabStop.FillChar = getFillCharFromValue(nIntValue);
1641             break;
1642         case NS_ooxml::LN_CT_TabStop_pos:
1643             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1644             m_pImpl->m_aCurrentTabStop.Position = ConversionHelper::convertTwipToMM100(nIntValue);
1645             break;
1646 
1647         case NS_ooxml::LN_CT_Fonts_ascii:
1648             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1649 			if (m_pImpl->GetTopContext())
1650 	            m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME, true, uno::makeAny( sStringValue ));
1651             break;
1652         case NS_ooxml::LN_CT_Fonts_asciiTheme:
1653             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1654 			if (m_pImpl->GetTopContext())
1655 	            m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME, true, uno::makeAny( m_pImpl->GetThemeTable()->getFontNameForTheme(nIntValue) ));
1656             break;
1657         case NS_ooxml::LN_CT_Fonts_hAnsi:
1658             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1659             break;//unsupported
1660         case NS_ooxml::LN_CT_Fonts_hAnsiTheme:
1661             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1662             break; //unsupported
1663         case NS_ooxml::LN_CT_Fonts_eastAsia:
1664             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1665 			if (m_pImpl->GetTopContext())
1666 	            m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME_ASIAN, true, uno::makeAny( sStringValue ));
1667             break;
1668     case NS_ooxml::LN_CT_Fonts_eastAsiaTheme:
1669         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1670 		if (m_pImpl->GetTopContext())
1671         	m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME_COMPLEX, true, uno::makeAny( m_pImpl->GetThemeTable()->getFontNameForTheme(nIntValue) ) );
1672         break;
1673         case NS_ooxml::LN_CT_Fonts_cs:
1674             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1675 			if (m_pImpl->GetTopContext())
1676 	            m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME_COMPLEX, true, uno::makeAny( sStringValue ));
1677             break;
1678         case NS_ooxml::LN_CT_Fonts_cstheme:
1679             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1680 			if (m_pImpl->GetTopContext())
1681 	            m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME_COMPLEX, true, uno::makeAny( m_pImpl->GetThemeTable()->getFontNameForTheme(nIntValue) ));
1682         break;
1683         case NS_ooxml::LN_CT_Spacing_before:
1684             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1685 			if (m_pImpl->GetTopContext())
1686 	            m_pImpl->GetTopContext()->Insert(PROP_PARA_TOP_MARGIN, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
1687             break;
1688         case NS_ooxml::LN_CT_Spacing_beforeLines:
1689             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1690             break;
1691         case NS_ooxml::LN_CT_Spacing_after:
1692             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1693 			if (m_pImpl->GetTopContext())
1694 	            m_pImpl->GetTopContext()->Insert(PROP_PARA_BOTTOM_MARGIN, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
1695             break;
1696         case NS_ooxml::LN_CT_Spacing_afterLines:
1697             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1698             break;
1699         case NS_ooxml::LN_CT_Spacing_line: //91434
1700             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1701         case NS_ooxml::LN_CT_Spacing_lineRule: //91435
1702             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1703         {
1704 #define SINGLE_LINE_SPACING 240
1705             style::LineSpacing aSpacing;
1706             PropertyMapPtr pTopContext = m_pImpl->GetTopContext();
1707             PropertyMap::iterator aLineSpacingIter = pTopContext->find(PropertyDefinition( PROP_PARA_LINE_SPACING, true ) );
1708             if( aLineSpacingIter != pTopContext->end())
1709             {
1710                 aLineSpacingIter->second >>= aSpacing;
1711             }
1712             else
1713             {
1714                 //default to single line spacing
1715                 aSpacing.Mode = style::LineSpacingMode::FIX;
1716                 aSpacing.Height = sal_Int16(ConversionHelper::convertTwipToMM100( SINGLE_LINE_SPACING ));
1717             }
1718             if( nName == NS_ooxml::LN_CT_Spacing_line )
1719             {
1720                 //now set the value depending on the Mode
1721                 if( aSpacing.Mode == style::LineSpacingMode::PROP )
1722                     aSpacing.Height = sal_Int16(sal_Int32(nIntValue) * 100 / SINGLE_LINE_SPACING );
1723                 else
1724                     aSpacing.Height = sal_Int16(ConversionHelper::convertTwipToMM100( nIntValue ));
1725             }
1726             else //NS_ooxml::LN_CT_Spacing_lineRule:
1727             {
1728                     // exactly, atLeast, auto
1729                     if( sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_LineSpacingRule_auto)
1730                     {
1731                         aSpacing.Mode = style::LineSpacingMode::PROP;
1732                         //reinterpret the already set value
1733                         aSpacing.Height = sal_Int16( aSpacing.Height * 100 /  ConversionHelper::convertTwipToMM100( SINGLE_LINE_SPACING ));
1734                     }
1735                     else if( sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_LineSpacingRule_atLeast)
1736                         aSpacing.Mode = style::LineSpacingMode::MINIMUM;
1737                     else // NS_ooxml::LN_Value_wordprocessingml_ST_LineSpacingRule_exact
1738                         aSpacing.Mode = style::LineSpacingMode::FIX;
1739             }
1740             pTopContext->Insert(PROP_PARA_LINE_SPACING, true, uno::makeAny( aSpacing ));
1741         }
1742         break;
1743         case NS_ooxml::LN_CT_Ind_left:
1744             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1745 			if (m_pImpl->GetTopContext())
1746 	            m_pImpl->GetTopContext()->Insert(
1747     	            PROP_PARA_LEFT_MARGIN, true, uno::makeAny( ConversionHelper::convertTwipToMM100(nIntValue ) ));
1748             break;
1749         case NS_ooxml::LN_CT_Ind_right:
1750             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1751 			if (m_pImpl->GetTopContext())
1752 	            m_pImpl->GetTopContext()->Insert(
1753     	            PROP_PARA_RIGHT_MARGIN, true, uno::makeAny( ConversionHelper::convertTwipToMM100(nIntValue ) ));
1754             break;
1755         case NS_ooxml::LN_CT_Ind_hanging:
1756             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1757 			if (m_pImpl->GetTopContext())
1758             {
1759                 sal_Int32 nValue = ConversionHelper::convertTwipToMM100( nIntValue );
1760 	            m_pImpl->GetTopContext()->Insert(
1761                     PROP_PARA_FIRST_LINE_INDENT, true, uno::makeAny( - nValue ));
1762             }
1763             break;
1764         case NS_ooxml::LN_CT_Ind_firstLine:
1765             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1766 			if (m_pImpl->GetTopContext())
1767 	            m_pImpl->GetTopContext()->Insert(
1768     	            PROP_PARA_FIRST_LINE_INDENT, true, uno::makeAny( ConversionHelper::convertTwipToMM100(nIntValue ) ));
1769             break;
1770 
1771         case NS_ooxml::LN_CT_EastAsianLayout_id:
1772             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1773             break;
1774         case NS_ooxml::LN_CT_EastAsianLayout_combine:
1775             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1776 			if (m_pImpl->GetTopContext())
1777 	            m_pImpl->GetTopContext()->Insert(PROP_CHAR_COMBINE_IS_ON, true, uno::makeAny ( nIntValue ? true : false ));
1778             break;
1779         case NS_ooxml::LN_CT_EastAsianLayout_combineBrackets:
1780             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1781 			if (m_pImpl->GetTopContext())
1782             {
1783                 rtl::OUString sCombinePrefix = getBracketStringFromEnum(nIntValue);
1784                 rtl::OUString sCombineSuffix = getBracketStringFromEnum(nIntValue, false);
1785                 m_pImpl->GetTopContext()->Insert(PROP_CHAR_COMBINE_PREFIX, true, uno::makeAny ( sCombinePrefix ));
1786                 m_pImpl->GetTopContext()->Insert(PROP_CHAR_COMBINE_SUFFIX, true, uno::makeAny ( sCombineSuffix ));
1787             }
1788             break;
1789         case NS_ooxml::LN_CT_EastAsianLayout_vert:
1790             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1791 			if (m_pImpl->GetTopContext())
1792             {
1793                 sal_Int16 nRotationAngle = (nIntValue ? 900 : 0);
1794                 m_pImpl->GetTopContext()->Insert(PROP_CHAR_ROTATION, true, uno::makeAny ( nRotationAngle ));
1795             }
1796             break;
1797         case NS_ooxml::LN_CT_EastAsianLayout_vertCompress:
1798             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1799 			if (m_pImpl->GetTopContext())
1800 	            m_pImpl->GetTopContext()->Insert(PROP_CHAR_ROTATION_IS_FIT_TO_LINE, true, uno::makeAny ( nIntValue ? true : false));
1801             break;
1802 
1803         case NS_ooxml::LN_CT_PageSz_code:
1804             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1805             CT_PageSz.code = nIntValue;
1806             break;
1807         case NS_ooxml::LN_CT_PageSz_h:
1808             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1809             {
1810                 sal_Int32 nHeight = ConversionHelper::convertTwipToMM100(nIntValue);
1811                 CT_PageSz.h = PaperInfo::sloppyFitPageDimension(nHeight);
1812             }
1813             break;
1814         case NS_ooxml::LN_CT_PageSz_orient:
1815             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1816             CT_PageSz.orient = (nIntValue != 0);
1817             break;
1818         case NS_ooxml::LN_CT_PageSz_w:
1819             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1820             {
1821                 sal_Int32 nWidth = ConversionHelper::convertTwipToMM100(nIntValue);
1822                 CT_PageSz.w = PaperInfo::sloppyFitPageDimension(nWidth);
1823             }
1824             break;
1825 
1826         case NS_ooxml::LN_CT_PageMar_top:
1827             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1828             m_pImpl->SetPageMarginTwip( PAGE_MAR_TOP, nIntValue );
1829         break;
1830         case NS_ooxml::LN_CT_PageMar_right:
1831             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1832             m_pImpl->SetPageMarginTwip( PAGE_MAR_RIGHT, nIntValue );
1833         break;
1834         case NS_ooxml::LN_CT_PageMar_bottom:
1835             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1836             m_pImpl->SetPageMarginTwip( PAGE_MAR_BOTTOM, nIntValue );
1837         break;
1838         case NS_ooxml::LN_CT_PageMar_left:
1839             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1840             m_pImpl->SetPageMarginTwip( PAGE_MAR_LEFT, nIntValue );
1841         break;
1842         case NS_ooxml::LN_CT_PageMar_header:
1843             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1844             m_pImpl->SetPageMarginTwip( PAGE_MAR_HEADER, nIntValue );
1845         break;
1846         case NS_ooxml::LN_CT_PageMar_footer:
1847             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1848             m_pImpl->SetPageMarginTwip( PAGE_MAR_FOOTER, nIntValue );
1849         break;
1850         case NS_ooxml::LN_CT_PageMar_gutter:
1851             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1852             m_pImpl->SetPageMarginTwip( PAGE_MAR_GUTTER, nIntValue );
1853         break;
1854         case NS_ooxml::LN_CT_Language_val: //90314
1855             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1856         case NS_ooxml::LN_CT_Language_eastAsia: //90315
1857             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1858         case NS_ooxml::LN_CT_Language_bidi: //90316
1859             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1860         {
1861             LanguageType eLang = MsLangId::convertIsoStringToLanguage( sStringValue );
1862             lang::Locale aLocale = MsLangId::convertLanguageToLocale( eLang );
1863 			if (m_pImpl->GetTopContext())
1864 	            m_pImpl->GetTopContext()->Insert(NS_ooxml::LN_CT_Language_val== nName ? PROP_CHAR_LOCALE :
1865                              NS_ooxml::LN_CT_Language_eastAsia == nName ? PROP_CHAR_LOCALE_ASIAN : PROP_CHAR_LOCALE_COMPLEX,
1866                              true,
1867                              uno::makeAny( aLocale ) );
1868         }
1869         break;
1870 #define AUTO_PARA_SPACING sal_Int32(49)
1871         case NS_ooxml::LN_CT_Spacing_beforeAutospacing:
1872             /* WRITERFILTERSTATUS: done: 80, planned: 0.5, spent: 0.2 */
1873             //TODO: autospacing depends on some document property (called fDontUseHTMLAutoSpacing in old ww8 filter) 100 or 280 twip
1874             //and should be set to 0 on start of page
1875             m_pImpl->GetTopContext()->Insert( PROP_PARA_TOP_MARGIN, false, uno::makeAny( AUTO_PARA_SPACING ) );
1876         break;
1877         case NS_ooxml::LN_CT_Spacing_afterAutospacing:
1878             /* WRITERFILTERSTATUS: done: 80, planned: 0.5, spent: 0.2 */
1879             //TODO: autospacing depends on some document property (called fDontUseHTMLAutoSpacing in old ww8 filter) 100 or 280 twip
1880             m_pImpl->GetTopContext()->Insert( PROP_PARA_BOTTOM_MARGIN, false, uno::makeAny( AUTO_PARA_SPACING ) );
1881         break;
1882         case NS_ooxml::LN_CT_SmartTagRun_uri:
1883         case NS_ooxml::LN_CT_SmartTagRun_element:
1884             /* WRITERFILTERSTATUS: done: 0, planned: 1, spent: 0 */
1885             //TODO: add handling of SmartTags
1886         break;
1887         case NS_ooxml::LN_CT_Br_type :
1888             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
1889             //TODO: attributes for break (0x12) are not supported
1890         break;
1891         case NS_ooxml::LN_CT_Fonts_hint :
1892             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
1893             /*  assigns script type to ambigous characters, values can be:
1894                 NS_ooxml::LN_Value_ST_Hint_default
1895                 NS_ooxml::LN_Value_ST_Hint_eastAsia
1896                 NS_ooxml::LN_Value_ST_Hint_cs
1897              */
1898             //TODO: unsupported?
1899         break;
1900         case NS_ooxml::LN_CT_TblCellMar_right: // 92375;
1901             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1902         case NS_ooxml::LN_CT_TblBorders_top: // 92377;
1903             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1904         case NS_ooxml::LN_CT_TblBorders_left: // 92378;
1905             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1906         case NS_ooxml::LN_CT_TblBorders_bottom: // 92379;
1907             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
1908         //todo: handle cell mar
1909         break;
1910         case NS_rtf::LN_blip: // contains the binary graphic
1911             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1912         case NS_ooxml::LN_shape:
1913             /* WRITERFILTERSTATUS: done: 50, planned: 0.5, spent: 0 */
1914         {
1915             //looks a bit like a hack - and it is. The graphic import is split into the inline_inline part and
1916             //afterwards the adding of the binary data.
1917             m_pImpl->GetGraphicImport( IMPORT_AS_DETECTED_INLINE )->attribute(nName, val);
1918             m_pImpl->ImportGraphic( val.getProperties(), IMPORT_AS_DETECTED_INLINE );
1919         }
1920         break;
1921         case NS_ooxml::LN_CT_FramePr_dropCap:
1922         case NS_ooxml::LN_CT_FramePr_lines:
1923         case NS_ooxml::LN_CT_FramePr_hAnchor:
1924         case NS_ooxml::LN_CT_FramePr_vAnchor:
1925         case NS_ooxml::LN_CT_FramePr_x:
1926         case NS_ooxml::LN_CT_FramePr_xAlign:
1927         case NS_ooxml::LN_CT_FramePr_y:
1928         case NS_ooxml::LN_CT_FramePr_yAlign:
1929         case NS_ooxml::LN_CT_FramePr_hRule:
1930         case NS_sprm::LN_PWr:
1931         case NS_sprm::LN_PDxaWidth:
1932         case NS_sprm::LN_PWHeightAbs:
1933         case NS_sprm::LN_PDxaFromText:
1934         case NS_sprm::LN_PDyaFromText:
1935         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1936         {
1937             ParagraphProperties* pParaProperties = dynamic_cast< ParagraphProperties*>(m_pImpl->GetTopContext().get());
1938             if( pParaProperties )
1939             {
1940                 switch( nName )
1941                 {
1942                     case NS_ooxml::LN_CT_FramePr_dropCap:
1943                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1944                         pParaProperties->SetDropCap( nIntValue );
1945                     break;
1946                     case NS_ooxml::LN_CT_FramePr_lines:
1947                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1948                         pParaProperties->SetLines( nIntValue );
1949                     break;
1950                     case NS_ooxml::LN_CT_FramePr_hAnchor:
1951                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1952                         switch(nIntValue)
1953                         {
1954                             case  NS_ooxml::LN_Value_wordprocessingml_ST_HAnchor_text:   //relative to column
1955                                 nIntValue = text::RelOrientation::FRAME; break;
1956                             case  NS_ooxml::LN_Value_wordprocessingml_ST_HAnchor_margin: nIntValue = text::RelOrientation::PAGE_PRINT_AREA; break;
1957                             case  NS_ooxml::LN_Value_wordprocessingml_ST_HAnchor_page:   nIntValue = text::RelOrientation::PAGE_FRAME; break;
1958                             default:;
1959                         }
1960                         pParaProperties->SethAnchor( nIntValue );
1961                     break;
1962                     case NS_ooxml::LN_CT_FramePr_vAnchor:
1963                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1964                         switch(nIntValue)
1965                         {
1966                             case  NS_ooxml::LN_Value_wordprocessingml_ST_VAnchor_text:  //relative to paragraph
1967                                     nIntValue = text::RelOrientation::FRAME; break;
1968                             case  NS_ooxml::LN_Value_wordprocessingml_ST_VAnchor_margin:nIntValue = text::RelOrientation::PAGE_PRINT_AREA ; break;
1969                             case  NS_ooxml::LN_Value_wordprocessingml_ST_VAnchor_page: nIntValue = text::RelOrientation::PAGE_FRAME; break;
1970                             default:;
1971                         }
1972                         pParaProperties->SetvAnchor( nIntValue );
1973                     break;
1974                     case NS_ooxml::LN_CT_FramePr_x:
1975                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1976                         pParaProperties->Setx( ConversionHelper::convertTwipToMM100(nIntValue ));
1977                     break;
1978                     case NS_ooxml::LN_CT_FramePr_xAlign:
1979                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1980                         switch( nIntValue )
1981                         {
1982                             case  NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_center  : nIntValue = text::HoriOrientation::CENTER; break;
1983                             case  NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_right   : nIntValue = text::HoriOrientation::RIGHT; break;
1984                             case  NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_inside  : nIntValue = text::HoriOrientation::INSIDE; break;
1985                             case  NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_outside : nIntValue = text::HoriOrientation::OUTSIDE; break;
1986                             case  NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_left    : nIntValue = text::HoriOrientation::LEFT; break;
1987                             default:    nIntValue = text::HoriOrientation::NONE;
1988                         }
1989                         pParaProperties->SetxAlign( nIntValue );
1990                     break;
1991                     case NS_ooxml::LN_CT_FramePr_y:
1992                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1993                         pParaProperties->Sety( ConversionHelper::convertTwipToMM100(nIntValue ));
1994                     break;
1995                     case NS_ooxml::LN_CT_FramePr_yAlign:
1996                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1997                         switch( nIntValue )
1998                         {
1999                             case  NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_top     :
2000                             case  NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_inside  :nIntValue = text::VertOrientation::TOP; break;
2001                             case  NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_center  :nIntValue = text::VertOrientation::CENTER;break;
2002                             case  NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_bottom  :
2003                             case  NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_outside :nIntValue = text::VertOrientation::BOTTOM;break;
2004                             case  NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_inline  ://todo: what to do with inline - no avail. in WW97 and WW2007
2005                             //no break;
2006                             default:nIntValue = text::VertOrientation::NONE;
2007                         }
2008                         pParaProperties->SetyAlign( nIntValue );
2009                     break;
2010                     case NS_ooxml::LN_CT_FramePr_hRule:
2011                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2012                          switch( nIntValue )
2013                          {
2014                             case NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_exact:
2015                                 nIntValue = text::SizeType::FIX;
2016                             break;
2017                             case NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_atLeast:
2018                                 nIntValue = text::SizeType::MIN;
2019                             break;
2020                             case NS_ooxml::LN_Value_wordprocessingml_ST_HeightRule_auto:
2021                             //no break;
2022                             default:;
2023                                 nIntValue = text::SizeType::VARIABLE;
2024                          }
2025                         pParaProperties->SethRule( nIntValue );
2026                     break;
2027                     case NS_sprm::LN_PWr:
2028                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2029                     {
2030                         //should be either LN_Value_wordprocessingml_ST_Wrap_notBeside or LN_Value_wordprocessingml_ST_Wrap_around
2031                         OSL_ENSURE( sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_Wrap_around ||
2032                                     sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_Wrap_notBeside,
2033                             "wrap not around or not_Beside?");
2034                         pParaProperties->SetWrap(sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_Wrap_around ?
2035                                                  text::WrapTextMode_DYNAMIC : text::WrapTextMode_NONE );
2036                     }
2037                     break;
2038                     case NS_sprm::LN_PDxaWidth:
2039                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2040                         pParaProperties->Setw(ConversionHelper::convertTwipToMM100(nIntValue));
2041                     break;
2042                     case NS_sprm::LN_PWHeightAbs:
2043                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2044                         pParaProperties->Seth(ConversionHelper::convertTwipToMM100(nIntValue));
2045                     break;
2046                     case NS_sprm::LN_PDxaFromText:
2047                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2048                         pParaProperties->SethSpace( ConversionHelper::convertTwipToMM100(nIntValue ));
2049                     break;
2050                     case NS_sprm::LN_PDyaFromText:
2051                         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2052                         pParaProperties->SetvSpace( ConversionHelper::convertTwipToMM100(nIntValue ));
2053                     break;
2054                     default:;
2055                 }
2056             }
2057             else
2058             {
2059                 //TODO: how to handle frame properties at styles
2060             }
2061         }
2062         break;
2063         case NS_ooxml::LN_CT_LineNumber_start:
2064         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
2065         case NS_ooxml::LN_CT_LineNumber_distance:
2066         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
2067         case NS_ooxml::LN_CT_TrackChange_author:
2068             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2069             m_pImpl->SetCurrentRedlineAuthor( sStringValue );
2070         break;
2071         case NS_ooxml::LN_CT_TrackChange_date:
2072             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2073             m_pImpl->SetCurrentRedlineDate( sStringValue );
2074         break;
2075         case NS_ooxml::LN_CT_Markup_id:
2076             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2077             m_pImpl->SetCurrentRedlineId( nIntValue );
2078         break;
2079         case NS_ooxml::LN_CT_Comment_initials:
2080             m_pImpl->SetCurrentRedlineInitials(sStringValue);
2081         break;
2082         case NS_ooxml::LN_EG_RangeMarkupElements_commentRangeStart:
2083             m_pImpl->AddAnnotationPosition( true, nIntValue );
2084         break;
2085         case NS_ooxml::LN_EG_RangeMarkupElements_commentRangeEnd:
2086             m_pImpl->AddAnnotationPosition( false, nIntValue );
2087         break;
2088         case NS_ooxml::LN_token:
2089             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2090             m_pImpl->SetCurrentRedlineToken( nIntValue );
2091         break;
2092         case NS_ooxml::LN_CT_LineNumber_countBy:
2093         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
2094         case NS_ooxml::LN_CT_LineNumber_restart:
2095         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
2096         {
2097             //line numbering in Writer is a global document setting
2098             //in Word is a section setting
2099             //if line numbering is switched on anywhere in the document it's set at the global settings
2100             LineNumberSettings aSettings = m_pImpl->GetLineNumberSettings();
2101             switch( nName )
2102             {
2103                 case NS_ooxml::LN_CT_LineNumber_countBy:
2104                     /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2105                     aSettings.nInterval = nIntValue;
2106                 break;
2107                 case NS_ooxml::LN_CT_LineNumber_start:
2108                     /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2109                     aSettings.nStartValue = nIntValue; // todo: has to be set at (each) first paragraph
2110                 break;
2111                 case NS_ooxml::LN_CT_LineNumber_distance:
2112                     /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2113                     aSettings.nDistance = ConversionHelper::convertTwipToMM100( nIntValue );
2114                 break;
2115                 case NS_ooxml::LN_CT_LineNumber_restart:
2116                     /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2117                     //page:empty, probably 0,section:1,continuous:2;
2118                     aSettings.bRestartAtEachPage = nIntValue < 1;
2119                 break;
2120                 default:;
2121             }
2122             m_pImpl->SetLineNumberSettings( aSettings );
2123         }
2124         break;
2125         case NS_ooxml::LN_CT_FtnEdnRef_customMarkFollows:
2126             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2127             m_pImpl->SetCustomFtnMark( true );
2128         break;
2129         case NS_ooxml::LN_CT_FtnEdnRef_id:
2130             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
2131             // footnote or endnote reference id - not needed
2132         case NS_ooxml::LN_CT_Color_themeColor:
2133             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
2134         case NS_ooxml::LN_CT_Color_themeTint:
2135             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
2136         case NS_ooxml::LN_CT_Color_themeShade:
2137             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
2138             //unsupported
2139         break;
2140     case NS_ooxml::LN_endtrackchange:
2141         m_pImpl->RemoveCurrentRedline( );
2142     break;
2143     case NS_ooxml::LN_CT_DocGrid_linePitch:
2144             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
2145             {
2146                 //see SwWW8ImplReader::SetDocumentGrid
2147                 OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
2148                 if(pSectionContext)
2149                 {
2150                     pSectionContext->SetGridLinePitch( ConversionHelper::convertTwipToMM100( nIntValue ) );
2151                 }
2152             }
2153         break;
2154             case NS_ooxml::LN_CT_DocGrid_charSpace:
2155                 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2156             {
2157                 OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
2158                 if(pSectionContext)
2159                 {
2160                     pSectionContext->SetDxtCharSpace( nIntValue );
2161                 }
2162             }
2163             break;
2164             case NS_ooxml::LN_CT_DocGrid_type:
2165                 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2166             {
2167                 if (pSectionContext != NULL)
2168                 {
2169                     pSectionContext->SetGridType(nIntValue);
2170                 }
2171             }
2172             break;
2173         default:
2174             {
2175 #if OSL_DEBUG_LEVEL > 0
2176             ::rtl::OString sMessage( "DomainMapper::attribute() - Id: ");
2177             sMessage += ::rtl::OString::valueOf( sal_Int32( nName ), 10 );
2178             sMessage += ::rtl::OString(" / 0x");
2179             sMessage += ::rtl::OString::valueOf( sal_Int32( nName ), 16 );
2180 //            sMessage += ::rtl::OString(" / ");
2181 //            sMessage += ::rtl::OString
2182 //                ((*QNameToString::Instance())(nName).c_str());
2183             sMessage += ::rtl::OString(" value: ");
2184             sMessage += ::rtl::OString::valueOf( sal_Int32( nIntValue ), 10 );
2185             sMessage += ::rtl::OString(" / 0x");
2186             sMessage += ::rtl::OString::valueOf( sal_Int32( nIntValue ), 16 );
2187             OSL_ENSURE( false, sMessage.getStr()); //
2188 #endif
2189             }
2190         }
2191     }
2192 }
2193 /*-- 09.06.2006 09:52:12---------------------------------------------------
2194 
2195 -----------------------------------------------------------------------*/
lcl_sprm(Sprm & rSprm)2196 void DomainMapper::lcl_sprm(Sprm & rSprm)
2197 {
2198     if( !m_pImpl->getTableManager().sprm(rSprm))
2199         sprmWithProps( rSprm, m_pImpl->GetTopContext() );
2200 }
2201 /*-- 20.06.2006 09:58:33---------------------------------------------------
2202 
2203   -----------------------------------------------------------------------*/
sprmWithProps(Sprm & rSprm,PropertyMapPtr rContext,SprmType eSprmType)2204 void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmType )
2205 {
2206     OSL_ENSURE(rContext.get(), "PropertyMap has to be valid!");
2207     if(!rContext.get())
2208         return ;
2209 
2210     sal_uInt32 nSprmId = rSprm.getId();
2211     //needed for page properties
2212     SectionPropertyMap * pSectionContext = m_pImpl->GetSectionContext();
2213 
2214     //TODO: In rtl-paragraphs the meaning of left/right are to be exchanged
2215     bool bExchangeLeftRight = false;
2216     // if( nSprmId == NS_sprm::LN_PJcExtra && AlreadyInRTLPara() )
2217     //      bExchangeLeftRight = true;
2218     Value::Pointer_t pValue = rSprm.getValue();
2219     sal_Int32 nIntValue = pValue->getInt();
2220     const rtl::OUString sStringValue = pValue->getString();
2221     /* WRITERFILTERSTATUS: table: sprmdata */
2222 
2223     switch(nSprmId)
2224     {
2225     case 2:  // sprmPIstd
2226         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2227     case 0x4600:
2228         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2229         break;  // sprmPIstd - style code
2230     case 3: // "sprmPIstdPermute
2231     case NS_sprm::LN_PIstdPermute:
2232         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2233         break;  // sprmPIstdPermute
2234     case NS_sprm::LN_PIncLvl:
2235         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2236         break;  // sprmPIncLvl
2237     case NS_sprm::LN_PJcExtra: // sprmPJc Asian (undocumented)
2238         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2239     case NS_sprm::LN_PJc: // sprmPJc
2240         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2241         handleParaJustification(nIntValue, rContext, bExchangeLeftRight);
2242         break;
2243     case NS_sprm::LN_PFSideBySide:
2244         /* WRITERFILTERSTATUS: done: 0, planned: 3, spent: 0 */
2245         /* WRITERFILTERSTATUS: comment: */
2246         break;  // sprmPFSideBySide
2247 
2248     case NS_sprm::LN_PFKeep:   // sprmPFKeep
2249         /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
2250         /* WRITERFILTERSTATUS: comment: */
2251         rContext->Insert(PROP_PARA_SPLIT, true, uno::makeAny(nIntValue ? false : true));
2252         break;
2253     case NS_sprm::LN_PFKeepFollow:   // sprmPFKeepFollow
2254         /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */
2255         /* WRITERFILTERSTATUS: comment:  */
2256         rContext->Insert(PROP_PARA_KEEP_TOGETHER, true, uno::makeAny( nIntValue ? true : false) );
2257         break;
2258 
2259     case NS_sprm::LN_PFPageBreakBefore:
2260         if ( nIntValue == 1 )
2261         {
2262             rContext->Insert( PROP_BREAK_TYPE, true, uno::makeAny( com::sun::star::style::BreakType_PAGE_BEFORE ) );
2263         }
2264     break;  // sprmPFPageBreakBefore
2265 
2266     case NS_sprm::LN_PBrcl:
2267         break;  // sprmPBrcl
2268     case NS_sprm::LN_PBrcp:
2269         break;  // sprmPBrcp
2270 
2271     case NS_sprm::LN_PIlvl: // sprmPIlvl
2272         /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */
2273         /* WRITERFILTERSTATUS: comment:  */
2274         {
2275             StyleSheetPropertyMap* pStyleSheetPropertyMap = NULL;
2276             if ( m_pImpl->IsStyleSheetImport() )
2277             {
2278                 pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() );
2279             }
2280 
2281             if ( pStyleSheetPropertyMap != NULL )
2282             {
2283                 pStyleSheetPropertyMap->SetListLevel( (sal_Int16)nIntValue );
2284             }
2285             else
2286             {
2287                 rContext->Insert( PROP_NUMBERING_LEVEL, true, uno::makeAny( (sal_Int16)nIntValue ));
2288             }
2289         }
2290         break;
2291 
2292     case NS_sprm::LN_PIlfo: // sprmPIlfo
2293         /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 1 */
2294         /* WRITERFILTERSTATUS: comment:  */
2295         {
2296             //convert the ListTable entry to a NumberingRules propery and apply it
2297             StyleSheetPropertyMap* pStyleSheetPropertyMap = NULL;
2298             if ( m_pImpl->IsStyleSheetImport() )
2299             {
2300                 pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() );
2301             }
2302 
2303             ListsManager::Pointer pListTable = m_pImpl->GetListTable();
2304             ListDef::Pointer pList = pListTable->GetList( nIntValue );
2305             if( pList.get( ) )
2306             {
2307                 if ( pStyleSheetPropertyMap != NULL )
2308                 {
2309                     pStyleSheetPropertyMap->SetListId( nIntValue );
2310                 }
2311                 else
2312                 {
2313                     uno::Any aRules = uno::makeAny( pList->GetNumberingRules( ) );
2314                     rContext->Insert( PROP_NUMBERING_RULES, true, aRules );
2315                 }
2316             }
2317             else
2318             {
2319                 if ( pStyleSheetPropertyMap != NULL )
2320                 {
2321                     // set the number id for AbstractNum references
2322                     pStyleSheetPropertyMap->SetNumId( nIntValue );
2323                 }
2324                 else
2325                 {
2326                     rtl::OUString sNone;
2327                     rContext->Insert( PROP_NUMBERING_STYLE_NAME, true, uno::makeAny( sNone ) );
2328                 }
2329             }
2330         }
2331         break;
2332 
2333     case NS_sprm::LN_PFNoLineNumb:   // sprmPFNoLineNumb
2334         rContext->Insert(PROP_PARA_LINE_NUMBER_COUNT, true, uno::makeAny( nIntValue != 0 ? false : true) );
2335         break;
2336 
2337     case NS_sprm::LN_PChgTabsPapx:   // sprmPChgTabsPapx
2338         /* WRITERFILTERSTATUS: done: 90, planned: 8, spent: 8 */
2339         /* WRITERFILTERSTATUS: comment: bar tab stops a unavailable */
2340         {
2341             // Initialize tab stop vector from style sheet
2342             uno::Any aValue = m_pImpl->GetPropertyFromStyleSheet(PROP_PARA_TAB_STOPS);
2343             uno::Sequence< style::TabStop > aStyleTabStops;
2344             if(aValue >>= aStyleTabStops)
2345             {
2346                 m_pImpl->InitTabStopFromStyle( aStyleTabStops );
2347             }
2348 
2349             //create a new tab stop property - this is done with the contained properties
2350             resolveSprmProps(*this, rSprm);
2351             //add this property
2352             rContext->Insert(PROP_PARA_TAB_STOPS, true, uno::makeAny( m_pImpl->GetCurrentTabStopAndClear()));
2353         }
2354         break;
2355     case 0x845d:    //right margin Asian - undocumented
2356     case 0x845e:    //left margin Asian - undocumented
2357     case 16:      // sprmPDxaRight - right margin
2358     case NS_sprm::LN_PDxaRight:   // sprmPDxaRight - right margin
2359     case 17:
2360     case NS_sprm::LN_PDxaLeft:   // sprmPDxaLeft
2361         /* WRITERFILTERSTATUS: done: 50, planned: 5, spent: 1 */
2362         if( NS_sprm::LN_PDxaLeft == nSprmId || 0x17 == nSprmId|| (bExchangeLeftRight && nSprmId == 0x845d) || ( !bExchangeLeftRight && nSprmId == 0x845e))
2363             rContext->Insert(
2364                              eSprmType == SPRM_DEFAULT ? PROP_PARA_LEFT_MARGIN : PROP_LEFT_MARGIN,
2365                              true,
2366                              uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
2367         else if(eSprmType == SPRM_DEFAULT)
2368             rContext->Insert(
2369                              PROP_PARA_RIGHT_MARGIN, true,
2370                              uno::makeAny( ConversionHelper::convertTwipToMM100(nIntValue ) ));
2371         //TODO: what happens to the right margins in numberings?
2372         break;
2373     case 18: // sprmPNest
2374     case NS_sprm::LN_PNest: // sprmPNest
2375         //not handled in the old WW8 filter
2376         break;
2377     case NS_sprm::LN_PDxaLeft1:    // sprmPDxaLeft1
2378     case 19:
2379     case NS_sprm::LN_PDxaLeft180:   // sprmPDxaLeft180
2380         /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */
2381         rContext->Insert(
2382                          eSprmType == SPRM_DEFAULT ? PROP_PARA_FIRST_LINE_INDENT : PROP_FIRST_LINE_OFFSET,
2383                          true,
2384                          uno::makeAny( ConversionHelper::convertTwipToMM100(nIntValue ) ));
2385         break;
2386     case 20 : // sprmPDyaLine
2387     case NS_sprm::LN_PDyaLine:   // sprmPDyaLine
2388         /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */
2389         {
2390             style::LineSpacing aSpacing;
2391             sal_Int16 nDistance = sal_Int16(nIntValue & 0xffff);
2392             if(nIntValue & 0xffff0000)
2393             {
2394                 // single line in Writer is 100, in Word it is 240
2395                 aSpacing.Mode = style::LineSpacingMode::PROP;
2396                 aSpacing.Height = sal_Int16(sal_Int32(nDistance) * 100 /240);
2397             }
2398             else
2399             {
2400                 if(nDistance < 0)
2401                 {
2402                     aSpacing.Mode = style::LineSpacingMode::FIX;
2403                     aSpacing.Height = sal_Int16(ConversionHelper::convertTwipToMM100(-nDistance));
2404                 }
2405                 else if(nDistance >0)
2406                 {
2407                     aSpacing.Mode = style::LineSpacingMode::MINIMUM;
2408                     aSpacing.Height = sal_Int16(ConversionHelper::convertTwipToMM100(nDistance));
2409                 }
2410             }
2411             rContext->Insert(PROP_PARA_LINE_SPACING, true, uno::makeAny( aSpacing ));
2412         }
2413         break;
2414     case 21 : // legacy version
2415     case NS_sprm::LN_PDyaBefore:   // sprmPDyaBefore
2416         /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */
2417         rContext->Insert(PROP_PARA_TOP_MARGIN, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
2418         break;
2419     case 22 :
2420     case NS_sprm::LN_PDyaAfter:   // sprmPDyaAfter
2421         /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */
2422         rContext->Insert(PROP_PARA_BOTTOM_MARGIN, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
2423         break;
2424 
2425     case  23: //sprmPChgTabs
2426     case NS_sprm::LN_PChgTabs: // sprmPChgTabs
2427         /* WRITERFILTERSTATUS: done: 0, planned: 3, spent: 0 */
2428         OSL_ENSURE( false, "unhandled");
2429         //tabs of list level?
2430         break;
2431     case 24: // "sprmPFInTable"
2432     case NS_sprm::LN_PFInTable:
2433         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2434         break;  // sprmPFInTable
2435     case NS_sprm::LN_PTableDepth: //sprmPTableDepth
2436         /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
2437         //not handled via sprm but via text( 0x07 )
2438     break;
2439     case 25: // "sprmPTtp" pap.fTtp
2440     case NS_sprm::LN_PFTtp:   // sprmPFTtp  was: Read_TabRowEnd
2441         break;
2442     case 26:  // "sprmPDxaAbs
2443     case NS_sprm::LN_PDxaAbs:
2444         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2445         break;  // sprmPDxaAbs
2446     case 27: //sprmPDyaAbs
2447     case NS_sprm::LN_PDyaAbs:
2448         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2449         break;  // sprmPDyaAbs
2450     case NS_sprm::LN_PDxaWidth:
2451         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2452         break;  // sprmPDxaWidth
2453     case NS_sprm::LN_PPc:
2454         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2455         break;  // sprmPPc
2456     case NS_sprm::LN_PBrcTop10:
2457         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2458         break;  // sprmPBrcTop10
2459     case NS_sprm::LN_PBrcLeft10:
2460         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2461         break;  // sprmPBrcLeft10
2462     case NS_sprm::LN_PBrcBottom10:
2463         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2464         break;  // sprmPBrcBottom10
2465     case NS_sprm::LN_PBrcRight10:
2466         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2467         break;  // sprmPBrcRight10
2468     case NS_sprm::LN_PBrcBetween10:
2469         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2470         break;  // sprmPBrcBetween10
2471     case NS_sprm::LN_PBrcBar10:
2472         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2473         break;  // sprmPBrcBar10
2474     case NS_sprm::LN_PDxaFromText10:
2475         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2476         break;  // sprmPDxaFromText10
2477     case NS_sprm::LN_PWr:
2478         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2479         break;  // sprmPWr
2480 
2481     case NS_ooxml::LN_CT_PrBase_pBdr: //paragraph border
2482         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2483         resolveSprmProps(*this, rSprm);
2484     break;
2485         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2486     case NS_sprm::LN_PBrcTop:   // sprmPBrcTop
2487         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2488         /* WRITERFILTERSTATUS: comment: page borders are no handled yet, conversion incomplete */
2489     case NS_sprm::LN_PBrcLeft:   // sprmPBrcLeft
2490         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2491         /* WRITERFILTERSTATUS: comment: page borders are no handled yet, conversion incomplete */
2492     case NS_sprm::LN_PBrcBottom:   // sprmPBrcBottom
2493         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2494         /* WRITERFILTERSTATUS: comment: page borders are no handled yet, conversion incomplete */
2495     case NS_sprm::LN_PBrcRight:   // sprmPBrcRight
2496         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2497         /* WRITERFILTERSTATUS: comment: page borders are no handled yet, conversion incomplete */
2498     case NS_sprm::LN_PBrcBetween:   // sprmPBrcBetween
2499         /* WRITERFILTERSTATUS: done: 0, planned: 8, spent: 0 */
2500         /* WRITERFILTERSTATUS: comment:  */
2501         {
2502             //in binary format the borders are directly provided in OOXML they are inside of properties
2503             if( IsOOXMLImport() )
2504             {
2505                 writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
2506                 if( pProperties.get())
2507                 {
2508                     BorderHandlerPtr pBorderHandler( new BorderHandler( true ) );
2509                     pProperties->resolve(*pBorderHandler);
2510                     PropertyIds eBorderId = PropertyIds( 0 );
2511                     PropertyIds eBorderDistId = PropertyIds( 0 );
2512                     switch( nSprmId )
2513                     {
2514                         case NS_sprm::LN_PBrcTop:
2515                             /* WRITERFILTERSTATUS: */
2516                             eBorderId = PROP_TOP_BORDER;
2517                             eBorderDistId = PROP_TOP_BORDER_DISTANCE;
2518                         break;
2519                         case NS_sprm::LN_PBrcLeft:
2520                             /* WRITERFILTERSTATUS: */
2521                             eBorderId = PROP_LEFT_BORDER;
2522                             eBorderDistId = PROP_LEFT_BORDER_DISTANCE;
2523                         break;
2524                         case NS_sprm::LN_PBrcBottom:
2525                             /* WRITERFILTERSTATUS: */
2526                             eBorderId = PROP_BOTTOM_BORDER         ;
2527                             eBorderDistId = PROP_BOTTOM_BORDER_DISTANCE;
2528                         break;
2529                         case NS_sprm::LN_PBrcRight:
2530                             /* WRITERFILTERSTATUS: */
2531                             eBorderId = PROP_RIGHT_BORDER;
2532                             eBorderDistId = PROP_RIGHT_BORDER_DISTANCE ;
2533                         break;
2534                         case NS_sprm::LN_PBrcBetween:
2535                             /* WRITERFILTERSTATUS: */
2536                             //not supported
2537                         break;
2538                         default:;
2539                     }
2540                     if( eBorderId )
2541                         rContext->Insert( eBorderId, true, uno::makeAny( pBorderHandler->getBorderLine()) , true);
2542                     if(eBorderDistId)
2543                         rContext->Insert(eBorderDistId, true, uno::makeAny( pBorderHandler->getLineDistance()), true);
2544                 }
2545             }
2546             else
2547             {
2548                 table::BorderLine aBorderLine;
2549                 sal_Int32 nLineDistance = ConversionHelper::MakeBorderLine( nIntValue, aBorderLine );
2550                 PropertyIds eBorderId = PROP_LEFT_BORDER;
2551                 PropertyIds eBorderDistId = PROP_LEFT_BORDER_DISTANCE  ;
2552                 switch( nSprmId )
2553                 {
2554                 case NS_sprm::LN_PBrcBetween:   // sprmPBrcBetween
2555                     /* WRITERFILTERSTATUS: */
2556                     OSL_ENSURE( false, "TODO: inner border is not handled");
2557                     break;
2558                 case NS_sprm::LN_PBrcLeft:   // sprmPBrcLeft
2559                     /* WRITERFILTERSTATUS: */
2560                     eBorderId = PROP_LEFT_BORDER;
2561                     eBorderDistId = PROP_LEFT_BORDER_DISTANCE  ;
2562                     break;
2563                 case NS_sprm::LN_PBrcRight:   // sprmPBrcRight
2564                     /* WRITERFILTERSTATUS: */
2565                     eBorderId = PROP_RIGHT_BORDER          ;
2566                     eBorderDistId = PROP_RIGHT_BORDER_DISTANCE ;
2567                     break;
2568                 case NS_sprm::LN_PBrcTop:   // sprmPBrcTop
2569                     /* WRITERFILTERSTATUS: */
2570                     eBorderId = PROP_TOP_BORDER            ;
2571                     eBorderDistId = PROP_TOP_BORDER_DISTANCE;
2572                     break;
2573                 case NS_sprm::LN_PBrcBottom:   // sprmPBrcBottom
2574                     /* WRITERFILTERSTATUS: */
2575                 default:
2576                     eBorderId = PROP_BOTTOM_BORDER         ;
2577                     eBorderDistId = PROP_BOTTOM_BORDER_DISTANCE;
2578                 }
2579                 rContext->Insert(eBorderId, true, uno::makeAny( aBorderLine ));
2580                 rContext->Insert(eBorderDistId, true, uno::makeAny( nLineDistance ));
2581             }
2582         }
2583     break;
2584     case NS_sprm::LN_PBorderTop:
2585         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2586         /* WRITERFILTERSTATUS: comment: probably _real_ border colors, unhandled */
2587     case NS_sprm::LN_PBorderLeft:
2588         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2589         /* WRITERFILTERSTATUS: comment: probably _real_ border colors, unhandled */
2590     case NS_sprm::LN_PBorderBottom:
2591         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2592         /* WRITERFILTERSTATUS: comment: probably _real_ border colors, unhandled */
2593     case NS_sprm::LN_PBorderRight:
2594         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2595         /* WRITERFILTERSTATUS: comment: probably _real_ border colors, unhandled */
2596         OSL_ENSURE( false, "TODO: border color definition");
2597         break;
2598     case NS_sprm::LN_PBrcBar:
2599         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2600         break;  // sprmPBrcBar
2601 
2602     case NS_sprm::LN_PFNoAutoHyph:   // sprmPFNoAutoHyph
2603         rContext->Insert(PROP_PARA_IS_HYPHENATION, true, uno::makeAny( nIntValue != 0 ? false : true ));
2604         break;
2605 
2606     case NS_sprm::LN_PWHeightAbs:
2607         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2608         break;  // sprmPWHeightAbs
2609     case NS_sprm::LN_PDcs:
2610         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2611         break;  // sprmPDcs
2612 
2613     case NS_sprm::LN_PShd: // sprmPShd
2614         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 2 */
2615     {
2616         //contains fore color, back color and shadow percentage, results in a brush
2617         writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
2618         if( pProperties.get())
2619         {
2620             CellColorHandlerPtr pCellColorHandler( new CellColorHandler );
2621 			pCellColorHandler->setType(CellColorHandler::P);
2622             pProperties->resolve(*pCellColorHandler);
2623             rContext->insert( pCellColorHandler->getProperties(), true );
2624         }
2625     }
2626     break;
2627     case NS_sprm::LN_PDyaFromText:
2628         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2629         break;  // sprmPDyaFromText
2630     case NS_sprm::LN_PDxaFromText:
2631         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2632         break;  // sprmPDxaFromText
2633     case NS_sprm::LN_PFLocked:
2634         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2635         break;  // sprmPFLocked
2636 
2637     case NS_sprm::LN_PFWidowControl:
2638     case NS_ooxml::LN_CT_PPrBase_widowControl:
2639     {
2640         uno::Any aVal( uno::makeAny( sal_Int8(nIntValue != 0 ? 2 : 0 )));
2641         rContext->Insert( PROP_PARA_WIDOWS, true, aVal );
2642         rContext->Insert( PROP_PARA_ORPHANS, true, aVal );
2643     }
2644     break;  // sprmPFWidowControl
2645 
2646     case NS_sprm::LN_PRuler:
2647         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2648         break;  // sprmPRuler
2649     case NS_sprm::LN_PFKinsoku:
2650         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2651         break;  // sprmPFKinsoku
2652     case NS_sprm::LN_PFWordWrap:
2653         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2654         break;  // sprmPFWordWrap
2655     case NS_sprm::LN_PFOverflowPunct: ;  // sprmPFOverflowPunct - hanging punctuation
2656         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2657         rContext->Insert(PROP_PARA_IS_HANGING_PUNCTUATION, true, uno::makeAny( nIntValue ? false : true ));
2658         break;
2659     case NS_sprm::LN_PFTopLinePunct:
2660         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2661         break;  // sprmPFTopLinePunct
2662     case NS_sprm::LN_PFAutoSpaceDE:
2663         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2664         break;  // sprmPFAutoSpaceDE
2665     case NS_sprm::LN_PFAutoSpaceDN:
2666         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2667         break;  // sprmPFAutoSpaceDN
2668     case NS_sprm::LN_PWAlignFont:
2669         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2670         break;  // sprmPWAlignFont
2671     case NS_sprm::LN_PFrameTextFlow:
2672         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2673         break;  // sprmPFrameTextFlow
2674     case NS_sprm::LN_PISnapBaseLine:
2675         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2676         break;  // sprmPISnapBaseLine
2677     case NS_sprm::LN_PAnld:
2678         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2679         break;  // sprmPAnld
2680     case NS_sprm::LN_PPropRMark:
2681         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2682         break;  // sprmPPropRMark
2683 
2684     case NS_sprm::LN_POutLvl:
2685         {
2686             // - nIntValue == WW_OUTLINE_MAX --> no outline level
2687             // - WW_OUTLINE_MIN <= nIntValue < WW_OUTLINE_MAX --> outline level = nIntValue+1
2688             // - nIntValue > WW_OUTLINE_MAX are treated as no outline level
2689             const sal_Int16 nOutlineLevel = nIntValue >= WW_OUTLINE_MIN && nIntValue < WW_OUTLINE_MAX
2690                                             ? static_cast< sal_Int16 >(nIntValue+1)
2691                                             : 0;
2692             StyleSheetPropertyMap* pStyleSheetPropertyMap = NULL;
2693             if ( m_pImpl->IsStyleSheetImport() )
2694             {
2695                 pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() );
2696             }
2697             if ( pStyleSheetPropertyMap != 0 )
2698             {
2699                 pStyleSheetPropertyMap->SetOutlineLevel( nOutlineLevel );
2700             }
2701             else
2702             {
2703                 rContext->Insert(PROP_OUTLINE_LEVEL, true, uno::makeAny ( nOutlineLevel ));
2704             }
2705         }
2706         break;  // sprmPOutLvl
2707 
2708     case NS_sprm::LN_PFBiDi:
2709         if ( nIntValue == 1 )
2710         {
2711             rContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( text::WritingMode2::RL_TB ));
2712             rContext->Insert(PROP_PARA_ADJUST, false, uno::makeAny( style::ParagraphAdjust_RIGHT ));
2713         }
2714         break;  // sprmPFBiDi
2715 
2716     case NS_ooxml::LN_EG_SectPrContents_bidi:
2717         if ( nIntValue == 1 )
2718         {
2719             if ( pSectionContext != NULL )
2720                 pSectionContext->Insert( PROP_WRITING_MODE, false, uno::makeAny( text::WritingMode2::RL_TB ) );
2721         }
2722         break;
2723 
2724     case NS_sprm::LN_PFNumRMIns:
2725         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2726         break;  // sprmPFNumRMIns
2727     case NS_sprm::LN_PCrLf:
2728         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2729         break;  // sprmPCrLf
2730     case NS_sprm::LN_PNumRM:
2731         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2732         break;  // sprmPNumRM
2733     case NS_sprm::LN_PHugePapx:
2734         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2735         break;  // sprmPHugePapx
2736     case NS_sprm::LN_PFUsePgsuSettings:
2737         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2738         break;  // sprmPFUsePgsuSettings
2739     case NS_sprm::LN_PFAdjustRight:
2740         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2741         break;  // sprmPFAdjustRight
2742     case NS_sprm::LN_CFRMarkDel:
2743         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2744         break;  // sprmCFRMarkDel
2745     case NS_sprm::LN_CFRMark:
2746         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2747         break;  // sprmCFRMark
2748     case NS_sprm::LN_CFFldVanish:
2749         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2750         break;  // sprmCFFldVanish
2751     case NS_sprm::LN_CFSpec:   // sprmCFSpec
2752         break;
2753     case NS_sprm::LN_CPicLocation:   // sprmCPicLocation
2754             //is being resolved on the tokenizer side
2755         break;
2756     case NS_sprm::LN_CIbstRMark:
2757         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2758         break;  // sprmCIbstRMark
2759     case NS_sprm::LN_CDttmRMark:
2760         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2761         break;  // sprmCDttmRMark
2762     case NS_sprm::LN_CFData:
2763         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2764         break;  // sprmCFData
2765     case NS_sprm::LN_CIdslRMark:
2766         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2767         break;  // sprmCIdslRMark
2768     case NS_sprm::LN_CChs:
2769         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2770         break;  // sprmCChs
2771     case NS_sprm::LN_CSymbol: // sprmCSymbol
2772         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2773         resolveSprmProps(*this, rSprm); //resolves LN_FONT and LN_CHAR
2774     break;
2775     case NS_sprm::LN_CFOle2:
2776         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2777         break;  // sprmCFOle2
2778     case NS_sprm::LN_CIdCharType:
2779         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2780         break;  // sprmCIdCharType
2781     case NS_sprm::LN_CHighlight:
2782         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2783         {
2784             sal_Int32 nColor = 0;
2785             if(true ==( mbIsHighlightSet = getColorFromIndex(nIntValue, nColor)))
2786                 rContext->Insert(PROP_CHAR_BACK_COLOR, true, uno::makeAny( nColor ));
2787             else if (mnBackgroundColor)
2788                 rContext->Insert(PROP_CHAR_BACK_COLOR, true, uno::makeAny( mnBackgroundColor ));
2789         }
2790         break;  // sprmCHighlight
2791     case NS_sprm::LN_CObjLocation:
2792         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2793         break;  // sprmCObjLocation
2794     case NS_sprm::LN_CFFtcAsciSymb:
2795         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2796         break;  // sprmCFFtcAsciSymb
2797     case NS_sprm::LN_CIstd:
2798         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2799         break;  // sprmCIstd
2800     case NS_sprm::LN_CIstdPermute:
2801         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2802         break;  // sprmCIstdPermute
2803     case NS_sprm::LN_CDefault:
2804         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2805         break;  // sprmCDefault
2806     case NS_sprm::LN_CPlain:
2807         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2808         break;  // sprmCPlain
2809     case NS_sprm::LN_CKcd:
2810         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2811         rContext->Insert(PROP_CHAR_EMPHASIS, true, uno::makeAny ( getEmphasisValue (nIntValue)));
2812         break;  // sprmCKcd
2813 
2814     case NS_sprm::LN_CFEmboss:// sprmCFEmboss
2815     case 60:// sprmCFBold
2816     case NS_sprm::LN_CFBoldBi:// sprmCFBoldBi    (offset 0x27 to normal bold)
2817     case NS_sprm::LN_CFItalicBi:// sprmCFItalicBi  (offset 0x27 to normal italic)
2818     case NS_sprm::LN_CFBold: //sprmCFBold
2819     case 61: /*sprmCFItalic*/
2820     case NS_sprm::LN_CFItalic: //sprmCFItalic
2821     case NS_sprm::LN_CFStrike: //sprmCFStrike
2822     case NS_sprm::LN_CFOutline: //sprmCFOutline
2823     case NS_sprm::LN_CFShadow: //sprmCFShadow
2824     case NS_sprm::LN_CFSmallCaps: //sprmCFSmallCaps
2825     case NS_sprm::LN_CFCaps: //sprmCFCaps
2826     case NS_sprm::LN_CFVanish: //sprmCFVanish
2827     case NS_sprm::LN_CFDStrike:   // sprmCFDStrike
2828         {
2829             PropertyIds ePropertyId = PROP_CHAR_WEIGHT; //initialized to prevent warning!
2830             switch( nSprmId )
2831             {
2832             case 60:// sprmCFBold
2833             case NS_sprm::LN_CFBold: /*sprmCFBold*/
2834                 ePropertyId = PROP_CHAR_WEIGHT;
2835                 break;
2836             case NS_sprm::LN_CFBoldBi: // sprmCFBoldBi
2837                 ePropertyId = PROP_CHAR_WEIGHT_COMPLEX;
2838                 break;
2839 
2840             case 61: /*sprmCFItalic*/
2841             case NS_sprm::LN_CFItalicBi: // sprmCFItalicBi
2842             case NS_sprm::LN_CFItalic: /*sprmCFItalic*/
2843                 ePropertyId = nSprmId == 0x836 ? PROP_CHAR_POSTURE : PROP_CHAR_POSTURE_COMPLEX;
2844                 break;
2845 
2846             case NS_sprm::LN_CFStrike: /*sprmCFStrike*/
2847             case NS_sprm::LN_CFDStrike : /*sprmCFDStrike double strike through*/
2848                 ePropertyId = PROP_CHAR_STRIKEOUT;
2849                 break;
2850 
2851             case NS_sprm::LN_CFOutline: /*sprmCFOutline*/
2852                 ePropertyId = PROP_CHAR_CONTOURED;
2853                 break;
2854 
2855             case NS_sprm::LN_CFShadow: /*sprmCFShadow*/
2856                 ePropertyId = PROP_CHAR_SHADOWED;
2857                 break;
2858 
2859             case NS_sprm::LN_CFSmallCaps: /*sprmCFSmallCaps*/
2860             case NS_sprm::LN_CFCaps: /*sprmCFCaps*/
2861                 ePropertyId = PROP_CHAR_CASE_MAP;
2862                 break;
2863 
2864             case NS_sprm::LN_CFVanish: /*sprmCFVanish*/
2865                 ePropertyId = PROP_CHAR_HIDDEN;
2866                 break;
2867 
2868             case NS_sprm::LN_CFEmboss: /*sprmCFEmboss*/
2869                 ePropertyId = PROP_CHAR_RELIEF;
2870                 break;
2871             }
2872             //expected: 0,1,128,129
2873             if(nIntValue != 128) //inherited from paragraph - ignore
2874             {
2875                 if( nIntValue == 129) //inverted style sheet value
2876                 {
2877                     //get value from style sheet and invert it
2878                     sal_Int16 nStyleValue = 0;
2879                     double fDoubleValue = 0;
2880                     uno::Any aStyleVal = m_pImpl->GetPropertyFromStyleSheet(ePropertyId);
2881                     if( !aStyleVal.hasValue() )
2882                     {
2883                         nIntValue = 0x83a == nSprmId ?
2884                             4 : 1;
2885                     }
2886                     else if(aStyleVal.getValueTypeClass() == uno::TypeClass_FLOAT )
2887                     {
2888                         //only in case of awt::FontWeight
2889                         aStyleVal >>= fDoubleValue;
2890                         nIntValue = fDoubleValue  > 100. ?  0 : 1;
2891                     }
2892                     else if((aStyleVal >>= nStyleValue) ||
2893                             (nStyleValue = (sal_Int16)comphelper::getEnumAsINT32(aStyleVal)) >= 0 )
2894                     {
2895                         nIntValue = 0x83a == nSprmId ?
2896                             nStyleValue ? 0 : 4 :
2897                             nStyleValue ? 0 : 1;
2898                     }
2899                     else
2900                     {
2901                         OSL_ENSURE( false, "what type was it");
2902                     }
2903                 }
2904 
2905                 switch( nSprmId )
2906                 {
2907                     case 60:/*sprmCFBold*/
2908                     case NS_sprm::LN_CFBold: /*sprmCFBold*/
2909                     case NS_sprm::LN_CFBoldBi: // sprmCFBoldBi
2910                     {
2911                         uno::Any aBold( uno::makeAny( nIntValue != 0 ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL ) );
2912 
2913                         rContext->Insert(ePropertyId, true, aBold );
2914                         if( nSprmId != NS_sprm::LN_CFBoldBi ) // sprmCFBoldBi
2915                             rContext->Insert(PROP_CHAR_WEIGHT_ASIAN, true, aBold );
2916                     }
2917                     break;
2918 
2919                     case 61: /*sprmCFItalic*/
2920                     case NS_sprm::LN_CFItalic: /*sprmCFItalic*/
2921                     case NS_sprm::LN_CFItalicBi: // sprmCFItalicBi
2922                     {
2923                         uno::Any aPosture( uno::makeAny( nIntValue != 0 ? awt::FontSlant_ITALIC : awt::FontSlant_NONE ) );
2924                         rContext->Insert( ePropertyId, true, aPosture );
2925                         if( nSprmId != NS_sprm::LN_CFItalicBi ) // sprmCFItalicBi
2926                             rContext->Insert(PROP_CHAR_POSTURE_ASIAN, true, aPosture );
2927                     }
2928                     break;
2929 
2930                     case NS_sprm::LN_CFStrike: /*sprmCFStrike*/
2931                         rContext->Insert(ePropertyId, true,
2932                                          uno::makeAny( nIntValue != 0 ? awt::FontStrikeout::SINGLE : awt::FontStrikeout::NONE ) );
2933                     break;
2934 
2935                     case NS_sprm::LN_CFDStrike : /*sprmCFDStrike double strike through*/
2936                         rContext->Insert(ePropertyId, true,
2937                                          uno::makeAny( nIntValue != 0 ? awt::FontStrikeout::DOUBLE : awt::FontStrikeout::NONE ) );
2938                     break;
2939 
2940                     case NS_sprm::LN_CFOutline: /*sprmCFOutline*/
2941                     case NS_sprm::LN_CFShadow: /*sprmCFShadow*/
2942                     case NS_sprm::LN_CFVanish: /*sprmCFVanish*/
2943                         rContext->Insert(ePropertyId, true, uno::makeAny( nIntValue != 0 ? true : false ));
2944                     break;
2945 
2946                     case NS_sprm::LN_CFSmallCaps: /*sprmCFSmallCaps*/
2947                         rContext->Insert(ePropertyId, true,
2948                                          uno::makeAny( nIntValue != 0 ? style::CaseMap::SMALLCAPS : style::CaseMap::NONE));
2949                     break;
2950 
2951                     case NS_sprm::LN_CFCaps: /*sprmCFCaps*/
2952                         rContext->Insert(ePropertyId, true,
2953                                          uno::makeAny( nIntValue != 0 ? style::CaseMap::UPPERCASE : style::CaseMap::NONE));
2954                     break;
2955 
2956                     case NS_sprm::LN_CFEmboss: /*sprmCFEmboss*/
2957                         rContext->Insert(ePropertyId, true,
2958                                          uno::makeAny( nIntValue != 0 ? awt::FontRelief::EMBOSSED : awt::FontRelief::NONE ));
2959                     break;
2960 
2961                 }
2962             }
2963         }
2964         break;
2965     case NS_sprm::LN_CFtcDefault:
2966         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2967         break;  // sprmCFtcDefault
2968     case NS_sprm::LN_CKul: // sprmCKul
2969         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2970         {
2971             // Parameter:  0 = none,    1 = single,  2 = by Word,
2972             // 3 = double,  4 = dotted,  5 = hidden
2973             // 6 = thick,   7 = dash,    8 = dot(not used)
2974             // 9 = dotdash 10 = dotdotdash 11 = wave
2975             handleUnderlineType(nIntValue, rContext);
2976         }
2977         break;
2978     case NS_sprm::LN_CSizePos:
2979         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2980         break;  // sprmCSizePos
2981     case NS_sprm::LN_CLid:
2982         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2983         break;  // sprmCLid
2984     case NS_sprm::LN_CIco:
2985         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
2986         {
2987             sal_Int32 nColor = 0;
2988             if (getColorFromIndex(nIntValue, nColor))
2989                 rContext->Insert(PROP_CHAR_COLOR, true, uno::makeAny( nColor ) );
2990         }
2991         break;  // sprmCIco
2992     case NS_sprm::LN_CHpsBi:    // sprmCHpsBi
2993     case NS_sprm::LN_CHps:    // sprmCHps
2994         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
2995         {
2996             //multiples of half points (12pt == 24)
2997             double fVal = double(nIntValue) / 2.;
2998             uno::Any aVal = uno::makeAny( fVal );
2999             if( NS_sprm::LN_CHpsBi == nSprmId )
3000                 rContext->Insert( PROP_CHAR_HEIGHT_COMPLEX, true, aVal );
3001             else
3002             {
3003                 //Asian get the same value as Western
3004                 rContext->Insert( PROP_CHAR_HEIGHT, true, aVal );
3005                 rContext->Insert( PROP_CHAR_HEIGHT_ASIAN, true, aVal );
3006             }
3007         }
3008         break;
3009     case NS_sprm::LN_CHpsInc:
3010         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3011         break;  // sprmCHpsInc
3012 
3013     case NS_sprm::LN_CHpsPos:
3014         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3015         {
3016         // FIXME: ww8 filter in ww8par6.cxx has a Read_SubSuperProp function
3017         // that counts the escapement from this value and font size. So it will be
3018         // on our TODO list
3019             sal_Int16 nEscapement = 0;
3020             sal_Int8 nProp  = 100;
3021             if (nIntValue < 0)
3022                 nEscapement = -58;
3023             else if (nIntValue > 0)
3024                 nEscapement = 58;
3025             else /* (nIntValue == 0) */
3026                 nProp = 0;
3027             rContext->Insert(PROP_CHAR_ESCAPEMENT,         true, uno::makeAny( nEscapement ) );
3028             rContext->Insert(PROP_CHAR_ESCAPEMENT_HEIGHT,  true, uno::makeAny( nProp ) );
3029         }
3030         break;  // sprmCHpsPos
3031 
3032     case NS_sprm::LN_CHpsPosAdj:
3033         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3034         break;  // sprmCHpsPosAdj
3035     case NS_sprm::LN_CMajority:
3036         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3037         break;  // sprmCMajority
3038     case NS_sprm::LN_CIss:   // sprmCIss
3039         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3040         {
3041             //sub/super script 1: super, 2: sub, 0: normal
3042             sal_Int16 nEscapement = 0;
3043             sal_Int8 nProp  = 58;
3044             switch(nIntValue)
3045             {
3046             case 1: //super
3047                 nEscapement = 101;
3048                 break;
3049             case 2: //sub
3050                 nEscapement = -101;
3051                 break;
3052             case 0: nProp = 0;break; //none
3053             }
3054             rContext->Insert(PROP_CHAR_ESCAPEMENT,         true, uno::makeAny( nEscapement ) );
3055             rContext->Insert(PROP_CHAR_ESCAPEMENT_HEIGHT,  true, uno::makeAny( nProp ) );
3056         }
3057         break;
3058     case NS_sprm::LN_CHpsNew50:
3059         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3060         break;  // sprmCHpsNew50
3061     case NS_sprm::LN_CHpsInc1:
3062         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3063         break;  // sprmCHpsInc1
3064     case 71 : //"sprmCDxaSpace"
3065     case 96 : //"sprmCDxaSpace"
3066     case NS_sprm::LN_CDxaSpace:  // sprmCDxaSpace
3067         {
3068             /* WRITERFILTERSTATUS: done: 50, planned: 2, spent: 0 */
3069             //Kerning half point values
3070             //TODO: there are two kerning values -
3071             // in ww8par6.cxx NS_sprm::LN_CHpsKern is used as boolean AutoKerning
3072             sal_Int16 nResult = static_cast<sal_Int16>(ConversionHelper::convertTwipToMM100(nIntValue));
3073             if (m_pImpl->IsInComments())
3074             {
3075                 nResult = static_cast<sal_Int16>(nIntValue);
3076             }
3077             rContext->Insert(PROP_CHAR_CHAR_KERNING, true, uno::makeAny(nResult));
3078         }
3079         break;
3080 
3081     case NS_sprm::LN_CHpsKern:  // sprmCHpsKern    auto kerning is bound to a minimum font size in Word - but not in Writer :-(
3082         rContext->Insert(PROP_CHAR_AUTO_KERNING, true, uno::makeAny( true ) );
3083         break;
3084 
3085     case NS_sprm::LN_CMajority50:
3086         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3087         break;  // sprmCMajority50
3088     case NS_sprm::LN_CHpsMul:
3089         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3090         break;  // sprmCHpsMul
3091     case NS_sprm::LN_CYsri:
3092         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3093         break;  // sprmCYsri
3094     case NS_sprm::LN_CRgFtc0:  // sprmCRgFtc0     //ascii font index
3095         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3096     case NS_sprm::LN_CRgFtc1:  // sprmCRgFtc1     //Asian font index
3097         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3098     case NS_sprm::LN_CRgFtc2:  // sprmCRgFtc2     //CTL font index
3099         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3100     case NS_sprm::LN_CFtcBi: // sprmCFtcBi      //font index of a CTL font
3101         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3102         {
3103             FontTablePtr pFontTable = m_pImpl->GetFontTable();
3104             if(nIntValue >= 0 && pFontTable->size() > sal_uInt32(nIntValue))
3105             {
3106                 PropertyIds eFontName    = PROP_CHAR_FONT_NAME;
3107                 PropertyIds eFontStyle   = PROP_CHAR_FONT_STYLE;
3108                 PropertyIds eFontFamily  = PROP_CHAR_FONT_FAMILY;
3109                 PropertyIds eFontCharSet = PROP_CHAR_FONT_CHAR_SET;
3110                 PropertyIds eFontPitch   = PROP_CHAR_FONT_PITCH;
3111                 switch(nSprmId)
3112                 {
3113                 case NS_sprm::LN_CRgFtc0:
3114                     //already initialized
3115                     break;
3116                 case NS_sprm::LN_CRgFtc1:
3117                     eFontName =     PROP_CHAR_FONT_NAME_ASIAN;
3118                     eFontStyle =    PROP_CHAR_FONT_STYLE_ASIAN;
3119                     eFontFamily =   PROP_CHAR_FONT_FAMILY_ASIAN;
3120                     eFontCharSet =  PROP_CHAR_FONT_CHAR_SET_ASIAN;
3121                     eFontPitch =    PROP_CHAR_FONT_PITCH_ASIAN;
3122                     break;
3123                 case NS_sprm::LN_CRgFtc2:
3124                 case NS_sprm::LN_CFtcBi:
3125                     eFontName =     PROP_CHAR_FONT_NAME_COMPLEX;
3126                     eFontStyle =    PROP_CHAR_FONT_STYLE_COMPLEX;
3127                     eFontFamily =   PROP_CHAR_FONT_FAMILY_COMPLEX;
3128                     eFontCharSet =  PROP_CHAR_FONT_CHAR_SET_COMPLEX;
3129                     eFontPitch =    PROP_CHAR_FONT_PITCH_COMPLEX;
3130                     break;
3131                 }
3132                 const FontEntry::Pointer_t pFontEntry(pFontTable->getFontEntry(sal_uInt32(nIntValue)));
3133                 rContext->Insert(eFontName, true, uno::makeAny( pFontEntry->sFontName  ));
3134                 //                rContext->Insert(eFontStyle, uno::makeAny( pFontEntry->  ));
3135                 //                rContext->Insert(eFontFamily, uno::makeAny( pFontEntry->  ));
3136                 rContext->Insert(eFontCharSet, true, uno::makeAny( (sal_Int16)pFontEntry->nTextEncoding  ));
3137                 rContext->Insert(eFontPitch, true, uno::makeAny( pFontEntry->nPitchRequest  ));
3138             }
3139         }
3140         break;
3141 
3142     case NS_sprm::LN_CCharScale:  // sprmCCharScale
3143         rContext->Insert( PROP_CHAR_SCALE_WIDTH, true, uno::makeAny( sal_Int16(nIntValue) ));
3144         break;
3145 
3146     case NS_sprm::LN_CFImprint: // sprmCFImprint   1 or 0
3147         // FontRelief: NONE, EMBOSSED, ENGRAVED
3148         rContext->Insert(PROP_CHAR_RELIEF, true,
3149                          uno::makeAny( nIntValue != 0 ? awt::FontRelief::ENGRAVED : awt::FontRelief::NONE ));
3150         break;
3151 
3152     case NS_sprm::LN_CFObj:
3153         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3154         break;  // sprmCFObj
3155     case NS_sprm::LN_CPropRMark:
3156         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3157         break;  // sprmCPropRMark
3158     case NS_sprm::LN_CSfxText:
3159         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3160         // The file-format has many character animations. We have only
3161         // one, so we use it always. Suboptimal solution though.
3162         if (nIntValue)
3163             rContext->Insert(PROP_CHAR_FLASH, true, uno::makeAny( true ));
3164         else
3165             rContext->Insert(PROP_CHAR_FLASH, true, uno::makeAny( false ));
3166         break;  // sprmCSfxText
3167     case NS_sprm::LN_CFBiDi:
3168         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3169         break;  // sprmCFBiDi
3170     case NS_sprm::LN_CFDiacColor:
3171         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3172         break;  // sprmCFDiacColor
3173     case NS_sprm::LN_CIcoBi:
3174         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3175         break;  // sprmCIcoBi
3176     case NS_sprm::LN_CDispFldRMark:
3177         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3178         break;  // sprmCDispFldRMark
3179     case NS_sprm::LN_CIbstRMarkDel:
3180         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3181         break;  // sprmCIbstRMarkDel
3182     case NS_sprm::LN_CDttmRMarkDel:
3183         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3184         break;  // sprmCDttmRMarkDel
3185     case NS_sprm::LN_CBrc:
3186         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3187         break;  // sprmCBrc
3188     case NS_sprm::LN_CShd:
3189         /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
3190 		{
3191 			writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
3192 			if( pProperties.get())
3193 			{
3194 				CellColorHandlerPtr pCellColorHandler( new CellColorHandler );
3195 				pCellColorHandler->setType(CellColorHandler::C);
3196 				pProperties->resolve(*pCellColorHandler);
3197 				rContext->insert( pCellColorHandler->getProperties(), true );
3198 			}
3199         }
3200         break;  // sprmCShd
3201     case NS_sprm::LN_CIdslRMarkDel:
3202         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3203         break;  // sprmCIdslRMarkDel
3204     case NS_sprm::LN_CFUsePgsuSettings:
3205         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3206         break;  // sprmCFUsePgsuSettings
3207     case NS_sprm::LN_CCpg:
3208         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3209         break;  // sprmCCpg
3210     case NS_sprm::LN_CLidBi:  // sprmCLidBi      language complex
3211         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3212     case NS_sprm::LN_CRgLid0_80: //sprmCRgLid0_80
3213         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 1 */
3214         //undocumented but interpreted as western language
3215     case NS_sprm::LN_CRgLid0:   // sprmCRgLid0    language Western
3216         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3217     case NS_sprm::LN_CRgLid1:   // sprmCRgLid1    language Asian
3218         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3219         {
3220             lang::Locale aLocale;
3221             MsLangId::convertLanguageToLocale( (LanguageType)nIntValue, aLocale );
3222             rContext->Insert(NS_sprm::LN_CRgLid0 == nSprmId ? PROP_CHAR_LOCALE :
3223                              NS_sprm::LN_CRgLid1 == nSprmId ? PROP_CHAR_LOCALE_ASIAN : PROP_CHAR_LOCALE_COMPLEX,
3224                              true,
3225                              uno::makeAny( aLocale ) );
3226         }
3227         break;
3228 
3229     case NS_sprm::LN_CIdctHint:   // sprmCIdctHint
3230         //list table - text offset???
3231         break;
3232     case NS_sprm::LN_PicBrcl:
3233         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3234         break;  // sprmPicBrcl
3235     case NS_sprm::LN_PicScale:
3236         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3237         break;  // sprmPicScale
3238     case NS_sprm::LN_PicBrcTop:
3239         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3240         break;  // sprmPicBrcTop
3241     case NS_sprm::LN_PicBrcLeft:
3242         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3243         break;  // sprmPicBrcLeft
3244     case NS_sprm::LN_PicBrcBottom:
3245         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3246         break;  // sprmPicBrcBoConversionHelper::convertTwipToMM100ttom
3247     case NS_sprm::LN_PicBrcRight:
3248         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3249         break;  // sprmPicBrcRight
3250     case NS_sprm::LN_ScnsPgn:
3251         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3252         break;  // sprmScnsPgn
3253     case NS_sprm::LN_SiHeadingPgn:
3254         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3255         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3256         if(pSectionContext)
3257             pSectionContext->SetEvenlySpaced( nIntValue > 0 );
3258 
3259         break;  // sprmSiHeadingPgn
3260     case NS_sprm::LN_SOlstAnm:
3261         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3262         break;  // sprmSOlstAnm
3263     case 136:
3264     case NS_sprm::LN_SDxaColWidth: // sprmSDxaColWidth
3265         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3266         // contains the twip width of the column as 3-byte-code
3267         // the lowet byte contains the index
3268         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3269         if(pSectionContext)
3270             pSectionContext->AppendColumnWidth( ConversionHelper::convertTwipToMM100( (nIntValue & 0xffff00) >> 8 ));
3271         break;
3272     case NS_sprm::LN_SDxaColSpacing: // sprmSDxaColSpacing
3273         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3274         // the lowet byte contains the index
3275         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3276         if(pSectionContext)
3277             pSectionContext->AppendColumnSpacing( ConversionHelper::convertTwipToMM100( (nIntValue & 0xffff00) >> 8 ));
3278         break;
3279     case 138:
3280     case NS_sprm::LN_SFEvenlySpaced:
3281         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3282         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3283         if(pSectionContext)
3284             pSectionContext->SetEvenlySpaced( nIntValue > 0 );
3285         break;  // sprmSFEvenlySpaced
3286     case NS_sprm::LN_SFProtected: // sprmSFProtected
3287         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3288         //todo: missing feature - unlocked sections in protected documents
3289         break;
3290     case NS_sprm::LN_SDmBinFirst: // sprmSDmBinFirst
3291         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3292         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3293         if(pSectionContext)
3294             pSectionContext->SetFirstPaperBin(nIntValue);
3295         break;
3296     case NS_sprm::LN_SDmBinOther: // sprmSDmBinOther
3297         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3298         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3299         if(pSectionContext)
3300             pSectionContext->SetPaperBin( nIntValue );
3301         break;
3302     case NS_sprm::LN_SBkc: // sprmSBkc
3303         /* WRITERFILTERSTATUS: done: 50, planned: 2, spent: 0 */
3304         /* break type
3305           0 - No break
3306           1 - New Column
3307           2 - New page
3308           3 - Even page
3309           4 - odd page
3310         */
3311         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3312         if(pSectionContext)
3313             pSectionContext->SetBreakType( nIntValue );
3314         break;
3315     case 143:
3316     case NS_sprm::LN_SFTitlePage: // sprmSFTitlePage
3317     case NS_ooxml::LN_EG_SectPrContents_titlePg:
3318         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3319     {
3320         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3321         if(pSectionContext)
3322             pSectionContext->SetTitlePage( nIntValue > 0 ? true : false );//section has title page
3323     }
3324     break;
3325     case 144:
3326     case NS_sprm::LN_SCcolumns: // sprmSCcolumns
3327         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3328         //no of columns - 1
3329         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3330         if(pSectionContext)
3331             pSectionContext->SetColumnCount( (sal_Int16) nIntValue );
3332     break;
3333     case 145:
3334     case NS_sprm::LN_SDxaColumns:           // sprmSDxaColumns
3335         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3336         //column distance - default 708 twip
3337         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3338         if(pSectionContext)
3339             pSectionContext->SetColumnDistance( ConversionHelper::convertTwipToMM100( nIntValue ) );
3340         break;
3341     case NS_sprm::LN_SFAutoPgn:
3342         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3343         break;  // sprmSFAutoPgn
3344     case 147:
3345     case NS_sprm::LN_SNfcPgn: // sprmSNfcPgn
3346         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3347         //page numbering 0 - Arab, 1 - ROMAN, 2 - roman, 3 - ABC, 4 abc
3348         sal_Int16 nNumbering;
3349         switch( nIntValue )
3350         {
3351             case 1:  nNumbering = style::NumberingType::ROMAN_UPPER;
3352             case 2:  nNumbering = style::NumberingType::ROMAN_LOWER;
3353             case 3:  nNumbering = style::NumberingType::CHARS_UPPER_LETTER;
3354             case 4:  nNumbering = style::NumberingType::CHARS_LOWER_LETTER;
3355             case 0:
3356             default:
3357                     nNumbering = style::NumberingType::ARABIC;
3358         }
3359         rContext->Insert( PROP_NUMBERING_TYPE, false, uno::makeAny( nNumbering ) );
3360     break;
3361     case NS_sprm::LN_SDyaPgn:
3362         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3363         break;  // sprmSDyaPgn
3364     case NS_sprm::LN_SDxaPgn:
3365         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3366         break;  // sprmSDxaPgn
3367     case 150:
3368     case NS_sprm::LN_SFPgnRestart: // sprmSFPgnRestart
3369     {
3370         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3371         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3372         if(pSectionContext)
3373             pSectionContext->SetPageNoRestart( nIntValue > 0 );
3374     }
3375     break;
3376     case NS_sprm::LN_SFEndnote:
3377         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3378         break;  // sprmSFEndnote
3379     case 154:
3380     case NS_sprm::LN_SNLnnMod:// sprmSNLnnMod
3381         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3382         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3383         if( pSectionContext )
3384             pSectionContext->SetLnnMod( nIntValue );
3385     break;
3386     case 155:
3387     case NS_sprm::LN_SDxaLnn: // sprmSDxaLnn
3388         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3389         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3390         if( pSectionContext )
3391             pSectionContext->SetdxaLnn( nIntValue );
3392     break;
3393     case 152:
3394     case NS_sprm::LN_SLnc:// sprmSLnc
3395         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3396         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3397         if( pSectionContext )
3398             pSectionContext->SetLnc( nIntValue );
3399     break;
3400     case 160:
3401     case NS_sprm::LN_SLnnMin: // sprmSLnnMin
3402         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3403         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3404         if( pSectionContext )
3405             pSectionContext->SetLnnMin( nIntValue );
3406     break;
3407 
3408     case NS_sprm::LN_SGprfIhdt:
3409         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3410         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3411         //flags about header/footer sharing and footnotes?
3412         /* ww8scan.hxx:
3413          * WW8_HEADER_EVEN = 0x01, WW8_HEADER_ODD = 0x02, WW8_FOOTER_EVEN = 0x04,
3414          * WW8_FOOTER_ODD = 0x08, WW8_HEADER_FIRST = 0x10, WW8_FOOTER_FIRST = 0x20
3415          */
3416 
3417 //        if(pSectionContext)
3418     break;  // sprmSGprfIhdt
3419     case NS_sprm::LN_SDyaHdrTop: // sprmSDyaHdrTop
3420         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3421         // default 720 twip
3422         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3423         if(pSectionContext)
3424             pSectionContext->SetHeaderTop( ConversionHelper::convertTwipToMM100( nIntValue ));
3425     break;
3426     case NS_sprm::LN_SDyaHdrBottom: // sprmSDyaHdrBottom
3427         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3428         // default 720 twip
3429         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3430         if(pSectionContext)
3431             pSectionContext->SetHeaderBottom( ConversionHelper::convertTwipToMM100( nIntValue ) );
3432     break;
3433     case 158:
3434     case NS_sprm::LN_SLBetween: // sprmSLBetween
3435         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3436         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3437         if(pSectionContext)
3438             pSectionContext->SetSeparatorLine( nIntValue > 0 );
3439     break;
3440     case NS_sprm::LN_SVjc:
3441         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3442         break;  // sprmSVjc
3443     case 161:
3444     case NS_sprm::LN_SPgnStart: // sprmSPgnStart
3445         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3446         //page number
3447         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3448         if(pSectionContext)
3449             pSectionContext->SetPageNumber( nIntValue );
3450     break;
3451     case 162:
3452     case NS_sprm::LN_SBOrientation:
3453         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3454         //todo: the old filter assumed that a value of 2 points to double-pages layout
3455         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3456         if(pSectionContext)
3457             pSectionContext->SetLandscape( nIntValue > 0 );
3458         rContext->Insert( PROP_IS_LANDSCAPE , false, uno::makeAny( nIntValue > 0 ));
3459     break;  // sprmSBOrientation
3460     case NS_sprm::LN_SBCustomize:
3461         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3462         break;  // sprmSBCustomize
3463     case 165:
3464     case NS_sprm::LN_SYaPage: // sprmSYaPage
3465     {
3466         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3467         //page height, rounded to default values, default: 0x3dc0 twip
3468         sal_Int32 nHeight = ConversionHelper::convertTwipToMM100( nIntValue );
3469         rContext->Insert( PROP_HEIGHT, false, uno::makeAny( PaperInfo::sloppyFitPageDimension( nHeight ) ) );
3470     }
3471     break;
3472     case NS_sprm::LN_SXaPage:   // sprmSXaPage
3473     {
3474         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3475         //page width, rounded to default values, default 0x2fd0 twip
3476         sal_Int32 nWidth = ConversionHelper::convertTwipToMM100( nIntValue );
3477         rContext->Insert( PROP_WIDTH, false, uno::makeAny( PaperInfo::sloppyFitPageDimension( nWidth ) ) );
3478     }
3479     break;
3480     case 166:
3481     case NS_sprm::LN_SDxaLeft:  // sprmSDxaLeft
3482     {
3483         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3484         //left page margin default 0x708 twip
3485         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3486         sal_Int32 nConverted = ConversionHelper::convertTwipToMM100( nIntValue );
3487         if(pSectionContext)
3488             pSectionContext->SetLeftMargin( nConverted );
3489         rContext->Insert( PROP_LEFT_MARGIN, false, uno::makeAny( nConverted ));
3490     }
3491     break;
3492     case 167:
3493     case NS_sprm::LN_SDxaRight: // sprmSDxaRight
3494     {
3495         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3496         //right page margin default 0x708 twip
3497         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3498         sal_Int32 nConverted = ConversionHelper::convertTwipToMM100( nIntValue );
3499         if(pSectionContext)
3500             pSectionContext->SetRightMargin( nConverted );
3501         rContext->Insert( PROP_RIGHT_MARGIN, false, uno::makeAny( nConverted ));
3502     }
3503     break;
3504     case 168:
3505     case NS_sprm::LN_SDyaTop: // sprmSDyaTop
3506     {
3507         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3508         //top page margin default 1440 twip
3509         //todo: check cast of SVBT16
3510         sal_Int32 nConverted = ConversionHelper::convertTwipToMM100( static_cast< sal_Int16 >( nIntValue ) );
3511         rContext->Insert( PROP_TOP_MARGIN, false, uno::makeAny( nConverted ) );
3512         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3513         if(pSectionContext)
3514             pSectionContext->SetTopMargin( nConverted );
3515     }
3516     break;
3517     case 169:
3518     case NS_sprm::LN_SDyaBottom: // sprmSDyaBottom
3519     {
3520         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3521         //bottom page margin default 1440 twip
3522         //todo: check cast of SVBT16
3523         sal_Int32 nConverted = ConversionHelper::convertTwipToMM100( static_cast< sal_Int16 >( nIntValue ) );
3524         rContext->Insert( PROP_BOTTOM_MARGIN, false, uno::makeAny( nConverted) );
3525         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3526         if(pSectionContext)
3527             pSectionContext->SetBottomMargin( nConverted );
3528     }
3529     break;
3530     case 170:
3531     case NS_sprm::LN_SDzaGutter:   // sprmSDzaGutter
3532     {
3533         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3534         // gutter is added to one of the margins of a section depending on RTL, can be placed on top either
3535         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3536         if(pSectionContext)
3537         {
3538             pSectionContext->SetDzaGutter( ConversionHelper::convertTwipToMM100( nIntValue  ) );
3539         }
3540     }
3541     break;
3542     case NS_sprm::LN_SDmPaperReq:   // sprmSDmPaperReq
3543         /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
3544         //paper code - no handled in old filter
3545         break;
3546     case NS_sprm::LN_SPropRMark:
3547         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3548         break;  // sprmSPropRMark
3549     case NS_sprm::LN_SFBiDi:// sprmSFBiDi
3550     {
3551         /* WRITERFILTERSTATUS: done: 50, planned: 2, spent: 0 */
3552         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3553         if(pSectionContext)
3554             pSectionContext->SetSFBiDi( nIntValue > 0 );
3555     }
3556     break;
3557     case NS_sprm::LN_SFFacingCol:
3558         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3559         break;  // sprmSFFacingCol
3560     case NS_sprm::LN_SFRTLGutter: // sprmSFRTLGutter
3561     {
3562         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3563         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3564         if(pSectionContext)
3565             pSectionContext->SetGutterRTL( nIntValue > 0 );
3566     }
3567     break;
3568     case NS_sprm::LN_SBrcTop:   // sprmSBrcTop
3569         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3570     case NS_sprm::LN_SBrcLeft:   // sprmSBrcLeft
3571         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3572     case NS_sprm::LN_SBrcBottom:  // sprmSBrcBottom
3573         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3574     case NS_sprm::LN_SBrcRight:  // sprmSBrcRight
3575         /* WRITERFILTERSTATUS: Sectiondone: 100, planned: 0.5, spent: 0 */
3576         {
3577             table::BorderLine aBorderLine;
3578             sal_Int32 nLineDistance = ConversionHelper::MakeBorderLine( nIntValue, aBorderLine );
3579             OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3580             if(pSectionContext)
3581             {
3582                 static const BorderPosition aPositions[4] =
3583                     {
3584                         BORDER_TOP,
3585                         BORDER_LEFT,
3586                         BORDER_BOTTOM,
3587                         BORDER_RIGHT
3588                     };
3589                 pSectionContext->SetBorder( aPositions[nSprmId - NS_sprm::LN_SBrcTop], nLineDistance, aBorderLine );
3590             }
3591         }
3592         break;
3593 
3594     case NS_sprm::LN_SPgbProp:  // sprmSPgbProp
3595         {
3596             OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3597             if(pSectionContext)
3598             {
3599                 pSectionContext->ApplyBorderToPageStyles( m_pImpl->GetPageStyles(), m_pImpl->GetTextFactory(), nIntValue );
3600             }
3601         }
3602         break;
3603     case NS_sprm::LN_SDxtCharSpace:
3604     {
3605         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3606         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3607         if(pSectionContext)
3608         {
3609             pSectionContext->SetDxtCharSpace( nIntValue );
3610         }
3611     }
3612     break;  // sprmSDxtCharSpace
3613     case NS_sprm::LN_SDyaLinePitch:   // sprmSDyaLinePitch
3614     {
3615         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3616         //see SwWW8ImplReader::SetDocumentGrid
3617         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3618         if(pSectionContext)
3619         {
3620             pSectionContext->SetGridLinePitch( ConversionHelper::convertTwipToMM100( nIntValue ) );
3621         }
3622     }
3623     break;
3624     case 0x703a: //undocumented, grid related?
3625         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3626         OSL_ENSURE( false, "TODO: not handled yet"); //nIntValue like 0x008a2373 ?
3627         break;
3628     case NS_sprm::LN_SClm:
3629     {
3630         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3631         sal_Int16 nGridType = text::TextGridMode::NONE;
3632         switch( nIntValue )
3633         {
3634             case 0:
3635                 nGridType = text::TextGridMode::NONE;
3636             break;
3637             case 3:
3638                 //Text snaps to char grid, this doesn't make a lot of sense to
3639                 //me. This is closer than LINES_CHARS
3640                 nGridType = text::TextGridMode::LINES;
3641             break;
3642             case 1:
3643                 nGridType = text::TextGridMode::LINES_AND_CHARS;
3644             break;
3645             case 2:
3646                 nGridType = text::TextGridMode::LINES;
3647             break;
3648             default:;
3649         }
3650         rContext->Insert( PROP_GRID_MODE, false, uno::makeAny( nGridType ) );
3651 
3652     //Seems to force this behaviour in word ?
3653     if(nGridType != text::TextGridMode::NONE)
3654         m_pImpl->SetDocumentSettingsProperty(
3655             PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_ADD_EXTERNAL_LEADING ),
3656             uno::makeAny( true ) );
3657     }
3658     break;  // sprmSClm
3659     case NS_sprm::LN_STextFlow:
3660     case NS_ooxml::LN_EG_SectPrContents_textDirection:
3661         /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
3662     {
3663         /* 0 HoriLR 1 Vert TR 2 Vert TR 3 Vert TT 4 HoriLT
3664             only 0 and 1 can be imported correctly
3665           */
3666         sal_Int16 nDirection = text::WritingMode_LR_TB;
3667         switch( nIntValue )
3668         {
3669             case 0:
3670             case 4:
3671                 nDirection = text::WritingMode_LR_TB;
3672             break;
3673             case 1:
3674             case 2:
3675             case 3:
3676                 nDirection = text::WritingMode_TB_RL;
3677             break;
3678             default:;
3679         }
3680 
3681         PropertyMap * pTargetContext = rContext.get();
3682 
3683         if (pSectionContext != NULL &&
3684             nSprmId == NS_ooxml::LN_EG_SectPrContents_textDirection)
3685         {
3686             pTargetContext = pSectionContext;
3687         }
3688 
3689         pTargetContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( nDirection ) );
3690     }
3691     break;  // sprmSTextFlow
3692     case NS_sprm::LN_TJc: // sprmTJc
3693     case NS_sprm::LN_TDxaLeft:
3694     case NS_sprm::LN_TDxaGapHalf:
3695     case NS_sprm::LN_TFCantSplit:
3696     case NS_sprm::LN_TTableHeader:
3697     case NS_sprm::LN_TTableBorders: // sprmTTableBorders
3698     {
3699         OSL_ENSURE( false, "table propeties should be handled by the table manager");
3700     }
3701     break;
3702     case NS_sprm::LN_TDefTable10:
3703         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3704         break;  // sprmTDefTable10
3705     case NS_sprm::LN_TDyaRowHeight:
3706         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3707         break;  // sprmTDyaRowHeight
3708     case NS_sprm::LN_TDefTable:
3709         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3710         break;  // sprmTDefTable
3711     case NS_sprm::LN_TDefTableShd:
3712         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3713         break;  // sprmTDefTableShd
3714     case NS_sprm::LN_TTlp:
3715         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3716         break;  // sprmTTlp
3717     case NS_sprm::LN_TFBiDi:
3718         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3719         break;  // sprmTFBiDi
3720     case NS_sprm::LN_THTMLProps:
3721         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3722         break;  // sprmTHTMLProps
3723     case NS_sprm::LN_TSetBrc:
3724         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3725         break;  // sprmTSetBrc
3726     case NS_sprm::LN_TInsert:
3727         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3728         break;  // sprmTInsert
3729     case NS_sprm::LN_TDelete:
3730         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3731         break;  // sprmTDelete
3732     case NS_sprm::LN_TDxaCol:
3733         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3734         break;  // sprmTDxaCol
3735     case NS_sprm::LN_TMerge:
3736         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3737         break;  // sprmTMerge
3738     case NS_sprm::LN_TSplit:
3739         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3740         break;  // sprmTSplit
3741     case NS_sprm::LN_TSetBrc10:
3742         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3743         break;  // sprmTSetBrc10
3744     case 164: // sprmTSetShd
3745     case NS_sprm::LN_TSetShd:
3746         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3747         break;  // sprmTSetShd
3748     case NS_sprm::LN_TSetShdOdd:
3749         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3750         break;  // sprmTSetShdOdd
3751     case NS_sprm::LN_TTextFlow:
3752         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3753         break;  // sprmTTextFlow
3754     case NS_sprm::LN_TDiagLine:
3755         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3756         break;  // sprmTDiagLine
3757     case NS_sprm::LN_TVertMerge:
3758         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3759         break;  // sprmTVertMerge
3760     case NS_sprm::LN_TVertAlign:
3761         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3762         break;  // sprmTVertAlign
3763         // the following are not part of the official documentation
3764     case 0x6870: //TxtForeColor
3765         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3766         {
3767             //contains a color as 0xTTRRGGBB while SO uses 0xTTRRGGBB
3768             sal_Int32 nColor = ConversionHelper::ConvertColor(nIntValue);
3769             rContext->Insert(PROP_CHAR_COLOR, true, uno::makeAny( nColor ) );
3770         }
3771         break;
3772     case 0x4874:
3773         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3774         break; //seems to be a language id for Asian text - undocumented
3775     case 0x6877: //underlining color
3776         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3777         {
3778             sal_Int32 nColor = ConversionHelper::ConvertColor(nIntValue);
3779             rContext->Insert(PROP_CHAR_UNDERLINE_HAS_COLOR, true, uno::makeAny( true ) );
3780             rContext->Insert(PROP_CHAR_UNDERLINE_COLOR, true, uno::makeAny( nColor ) );
3781         }
3782         break;
3783     case 0x6815:
3784         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3785         break; //undocumented
3786     case NS_sprm::LN_CIndrsid:
3787         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3788         break; //undocumented
3789     case 0x6467:
3790         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3791         break; //undocumented
3792     case 0xF617:
3793         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3794         break; //undocumented
3795     case 0xd634: // sprmTNewSpacing - table spacing ( see WW8TabBandDesc::ProcessSpacing() )
3796         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3797         break;
3798     case NS_sprm::LN_TTRLeft:
3799         /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
3800         break; //undocumented
3801     case 0x4888:
3802         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3803     case 0x6887:
3804         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3805         //properties of list levels - undocumented
3806         break;
3807     case 0xd234:
3808         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3809     case 0xd235:
3810         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3811     case 0xd236:
3812         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3813     case 0xd237:
3814         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3815         break;//undocumented section properties
3816     case NS_sprm::LN_CEastAsianLayout:
3817         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3818         resolveSprmProps(*this, rSprm);
3819         break;
3820     case NS_ooxml::LN_CT_Tabs_tab:
3821         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3822         resolveSprmProps(*this, rSprm);
3823         m_pImpl->IncorporateTabStop(m_pImpl->m_aCurrentTabStop);
3824         m_pImpl->m_aCurrentTabStop = DeletableTabStop();
3825     break;
3826     case NS_ooxml::LN_CT_PPrBase_tabs:
3827         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3828     {
3829         // Initialize tab stop vector from style sheet
3830         if( !m_pImpl->IsStyleSheetImport() )
3831         {
3832             uno::Any aValue = m_pImpl->GetPropertyFromStyleSheet(PROP_PARA_TAB_STOPS);
3833             uno::Sequence< style::TabStop > aStyleTabStops;
3834             if(aValue >>= aStyleTabStops)
3835             {
3836                 m_pImpl->InitTabStopFromStyle( aStyleTabStops );
3837             }
3838         }
3839         resolveSprmProps(*this, rSprm);
3840         rContext->Insert(PROP_PARA_TAB_STOPS, true, uno::makeAny( m_pImpl->GetCurrentTabStopAndClear()));
3841     }
3842     break;
3843 
3844     case NS_ooxml::LN_CT_PPr_sectPr:
3845         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3846     case NS_ooxml::LN_EG_RPrBase_color:
3847         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3848     case NS_ooxml::LN_EG_RPrBase_rFonts:
3849         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3850     case NS_ooxml::LN_EG_RPrBase_bdr:
3851         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3852     case NS_ooxml::LN_EG_RPrBase_eastAsianLayout:
3853         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3854     case NS_ooxml::LN_EG_RPrBase_u:
3855         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3856     case NS_ooxml::LN_EG_RPrBase_lang:
3857         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3858     case NS_ooxml::LN_CT_PPrBase_spacing:
3859         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3860     case NS_ooxml::LN_CT_PPrBase_ind:
3861         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3862     case NS_ooxml::LN_CT_RPrDefault_rPr:
3863         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3864     case NS_ooxml::LN_CT_PPrDefault_pPr:
3865         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3866     case NS_ooxml::LN_CT_DocDefaults_pPrDefault:
3867         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3868     case NS_ooxml::LN_CT_DocDefaults_rPrDefault:
3869         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3870     case NS_ooxml::LN_CT_Style_pPr:
3871         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3872     case NS_ooxml::LN_CT_Style_rPr:
3873         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3874     case NS_ooxml::LN_CT_PPr_rPr:
3875         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3876     case NS_ooxml::LN_CT_PPrBase_numPr:
3877         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3878         resolveSprmProps(*this, rSprm);
3879     break;
3880 
3881     case NS_ooxml::LN_EG_SectPrContents_footnotePr:
3882         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3883     case NS_ooxml::LN_EG_SectPrContents_endnotePr:
3884         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3885         m_pImpl->SetInFootnoteProperties( NS_ooxml::LN_EG_SectPrContents_footnotePr == nSprmId );
3886         resolveSprmProps(*this, rSprm);
3887     break;
3888 
3889     case NS_ooxml::LN_EG_SectPrContents_lnNumType:
3890         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
3891     {
3892         resolveSprmProps(*this, rSprm);
3893         LineNumberSettings aSettings = m_pImpl->GetLineNumberSettings();
3894         aSettings.bIsOn = true;
3895         m_pImpl->SetLineNumberSettings( aSettings );
3896         //apply settings at XLineNumberingProperties
3897         try
3898         {
3899             uno::Reference< text::XLineNumberingProperties > xLineNumberingProperties( m_pImpl->GetTextDocument(), uno::UNO_QUERY_THROW );
3900             uno::Reference< beans::XPropertySet > xLineNumberingPropSet = xLineNumberingProperties->getLineNumberingProperties();
3901             PropertyNameSupplier& rNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
3902             xLineNumberingPropSet->setPropertyValue(rNameSupplier.GetName( PROP_IS_ON ), uno::makeAny(true) );
3903             if( aSettings.nInterval )
3904                 xLineNumberingPropSet->setPropertyValue(rNameSupplier.GetName( PROP_INTERVAL ), uno::makeAny((sal_Int16)aSettings.nInterval) );
3905             if( aSettings.nDistance )
3906                 xLineNumberingPropSet->setPropertyValue(rNameSupplier.GetName( PROP_DISTANCE ), uno::makeAny(aSettings.nDistance) );
3907             xLineNumberingPropSet->setPropertyValue(rNameSupplier.GetName( PROP_RESTART_AT_EACH_PAGE ), uno::makeAny(aSettings.bRestartAtEachPage) );
3908         }
3909         catch( const uno::Exception& e)
3910         {
3911             (void) e;
3912         }
3913 
3914     }
3915     break;
3916     case NS_ooxml::LN_CT_PPrBase_framePr:
3917         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3918     {
3919         PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH);
3920         if( pContext.get() )
3921         {
3922             ParagraphPropertyMap* pParaContext = dynamic_cast< ParagraphPropertyMap* >( pContext.get() );
3923             pParaContext->SetFrameMode();
3924 
3925         }
3926         else
3927         {
3928             //TODO: What about style sheet import of frame properties
3929         }
3930         resolveSprmProps(*this, rSprm);
3931     }
3932     break;
3933     case NS_ooxml::LN_EG_SectPrContents_pgSz:
3934         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3935         CT_PageSz.code = 0;
3936         {
3937             PaperInfo aLetter(PAPER_LETTER);
3938             CT_PageSz.w = aLetter.getWidth();
3939             CT_PageSz.h = aLetter.getHeight();
3940         }
3941         CT_PageSz.orient = false;
3942         resolveSprmProps(*this, rSprm);
3943         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3944         if(pSectionContext)
3945         {
3946             pSectionContext->Insert( PROP_HEIGHT, false, uno::makeAny( CT_PageSz.h ) );
3947             pSectionContext->Insert( PROP_IS_LANDSCAPE, false, uno::makeAny( CT_PageSz.orient ));
3948             pSectionContext->Insert( PROP_WIDTH, false, uno::makeAny( CT_PageSz.w ) );
3949             pSectionContext->SetLandscape( CT_PageSz.orient );
3950         }
3951         break;
3952 
3953     case NS_ooxml::LN_EG_SectPrContents_pgMar:
3954         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3955         m_pImpl->InitPageMargins();
3956         resolveSprmProps(*this, rSprm);
3957         OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
3958         if(pSectionContext)
3959         {
3960             const _PageMar& rPageMar = m_pImpl->GetPageMargins();
3961             pSectionContext->SetTopMargin( rPageMar.top );
3962             pSectionContext->SetRightMargin( rPageMar.right );
3963             pSectionContext->SetBottomMargin( rPageMar.bottom );
3964             pSectionContext->SetLeftMargin( rPageMar.left );
3965             pSectionContext->SetHeaderTop( rPageMar.header );
3966             pSectionContext->SetHeaderBottom( rPageMar.footer );
3967         }
3968         break;
3969 
3970     case NS_ooxml::LN_EG_SectPrContents_cols:
3971         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3972     {
3973         writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
3974         if( pProperties.get())
3975         {
3976 
3977             SectionColumnHandlerPtr pSectHdl( new SectionColumnHandler );
3978             pProperties->resolve(*pSectHdl);
3979             if(pSectionContext)
3980             {
3981                 if( pSectHdl->IsEqualWidth() )
3982                 {
3983                     pSectionContext->SetEvenlySpaced( true );
3984                     pSectionContext->SetColumnCount( (sal_Int16) (pSectHdl->GetNum() - 1) );
3985                     pSectionContext->SetColumnDistance( pSectHdl->GetSpace() );
3986                     pSectionContext->SetSeparatorLine( pSectHdl->IsSeparator() );
3987                 }
3988                 else if( !pSectHdl->GetColumns().empty() )
3989                 {
3990                     pSectionContext->SetEvenlySpaced( false );
3991                     pSectionContext->SetColumnDistance( pSectHdl->GetSpace() );
3992                     pSectionContext->SetColumnCount( (sal_Int16)(pSectHdl->GetColumns().size() -1));
3993                     std::vector<_Column>::const_iterator tmpIter = pSectHdl->GetColumns().begin();
3994                     for (; tmpIter != pSectHdl->GetColumns().end(); tmpIter++)
3995                     {
3996                         pSectionContext->AppendColumnWidth( tmpIter->nWidth );
3997                         if ((tmpIter != pSectHdl->GetColumns().end() - 1) || (tmpIter->nSpace > 0))
3998                             pSectionContext->AppendColumnSpacing( tmpIter->nSpace );
3999                     }
4000                     pSectionContext->SetSeparatorLine( pSectHdl->IsSeparator() );
4001                 }
4002                 else if( pSectHdl->GetNum() > 0 )
4003                 {
4004                     pSectionContext->SetColumnCount( (sal_Int16)pSectHdl->GetNum() - 1 );
4005                     pSectionContext->SetColumnDistance( pSectHdl->GetSpace() );
4006                 }
4007             }
4008         }
4009     }
4010     break;
4011     case NS_ooxml::LN_EG_SectPrContents_docGrid:
4012         resolveSprmProps(*this, rSprm);
4013     break;
4014     case NS_ooxml::LN_EG_SectPrContents_pgBorders:
4015     {
4016         writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
4017         if( pProperties.get( ) && pSectionContext )
4018         {
4019             PageBordersHandlerPtr pHandler( new PageBordersHandler );
4020             pProperties->resolve( *pHandler );
4021 
4022             // Set the borders to the context and apply them to the styles
4023             pHandler->SetBorders( pSectionContext );
4024             pSectionContext->SetBorderParams( pHandler->GetDisplayOffset( ) );
4025         }
4026     }
4027     break;
4028 
4029     case NS_ooxml::LN_CT_PPrBase_pStyle:
4030         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
4031     {
4032         m_pImpl->SetCurrentParaStyleId( sStringValue );
4033         StyleSheetTablePtr pStyleTable = m_pImpl->GetStyleSheetTable();
4034         const ::rtl::OUString sConvertedStyleName = pStyleTable->ConvertStyleName( sStringValue, true );
4035 		if (m_pImpl->GetTopContext() && m_pImpl->GetTopContextType() != CONTEXT_SECTION)
4036 	        m_pImpl->GetTopContext()->Insert( PROP_PARA_STYLE_NAME, true, uno::makeAny( sConvertedStyleName ));
4037         const StyleSheetEntryPtr pEntry = pStyleTable->FindStyleSheetByISTD(sStringValue);
4038         //apply numbering to paragraph if it was set at the style
4039         OSL_ENSURE( pEntry.get(), "no style sheet found" );
4040         const StyleSheetPropertyMap* pStyleSheetProperties = dynamic_cast<const StyleSheetPropertyMap*>(pEntry ? pEntry->pProperties.get() : 0);
4041 
4042         if( pStyleSheetProperties && pStyleSheetProperties->GetListId() >= 0 )
4043             rContext->Insert( PROP_NUMBERING_STYLE_NAME, true, uno::makeAny(
4044                         ListDef::GetStyleName( pStyleSheetProperties->GetListId( ) ) ), false);
4045 
4046         if( pStyleSheetProperties && pStyleSheetProperties->GetListLevel() >= 0 )
4047             rContext->Insert( PROP_NUMBERING_LEVEL, true, uno::makeAny(pStyleSheetProperties->GetListLevel()), false);
4048     }
4049     break;
4050     case NS_ooxml::LN_EG_RPrBase_rStyle:
4051         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
4052         {
4053             rtl::OUString sConvertedName( m_pImpl->GetStyleSheetTable()->ConvertStyleName( sStringValue, true ) );
4054             // First check if the style exists in the document.
4055             StyleSheetEntryPtr pEntry = m_pImpl->GetStyleSheetTable( )->FindStyleSheetByStyleName( sConvertedName );
4056             bool bExists = pEntry.get( ) && ( pEntry->nStyleTypeCode == STYLE_TYPE_CHAR );
4057 
4058             // Add the property if the style exists
4059             if ( bExists && m_pImpl->GetTopContext() )
4060                 m_pImpl->GetTopContext()->Insert( PROP_CHAR_STYLE_NAME, true, uno::makeAny( sConvertedName ) );
4061         }
4062     break;
4063     case NS_ooxml::LN_CT_TblPrBase_tblCellMar: //cell margins
4064         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
4065     {
4066         resolveSprmProps(*this, rSprm);//contains LN_CT_TblCellMar_top, LN_CT_TblCellMar_left, LN_CT_TblCellMar_bottom, LN_CT_TblCellMar_right
4067     }
4068     break;
4069     case NS_ooxml::LN_CT_TblCellMar_top:
4070             /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
4071     case NS_ooxml::LN_CT_TblCellMar_left:
4072             /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
4073     case NS_ooxml::LN_CT_TblCellMar_bottom:
4074             /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
4075     case NS_ooxml::LN_CT_TblCellMar_right:
4076             /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
4077     {
4078         writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
4079         if( pProperties.get())
4080         {
4081             MeasureHandlerPtr pMeasureHandler( new MeasureHandler );
4082             pProperties->resolve(*pMeasureHandler);
4083             sal_Int32 nMeasureValue = pMeasureHandler->getMeasureValue();
4084             PropertyIds eId = META_PROP_CELL_MAR_TOP;
4085             switch(nSprmId)
4086             {
4087                 case NS_ooxml::LN_CT_TblCellMar_top:
4088                     /* WRITERFILTERSTATUS: */
4089                 break;
4090                 case NS_ooxml::LN_CT_TblCellMar_left:
4091                     /* WRITERFILTERSTATUS: */
4092                     eId = META_PROP_CELL_MAR_LEFT;
4093                 break;
4094                 case NS_ooxml::LN_CT_TblCellMar_bottom:
4095                     /* WRITERFILTERSTATUS: */
4096                     eId = META_PROP_CELL_MAR_BOTTOM;
4097                 break;
4098                 case NS_ooxml::LN_CT_TblCellMar_right:
4099                     /* WRITERFILTERSTATUS: */
4100                     eId = META_PROP_CELL_MAR_RIGHT;
4101                 break;
4102                 default:;
4103             }
4104             rContext->Insert( eId, false, uno::makeAny(nMeasureValue), false);
4105         }
4106     }
4107     break;
4108     case NS_sprm::LN_CFNoProof: //0x875 no grammar and spell checking, unsupported
4109         /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
4110     break;
4111     case NS_ooxml::LN_anchor_anchor: // at_character drawing
4112         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
4113     case NS_ooxml::LN_inline_inline: // as_character drawing
4114         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
4115     {
4116         writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
4117         if( pProperties.get())
4118         {
4119             GraphicImportType eGraphicType =
4120                 (NS_ooxml::LN_anchor_anchor ==
4121                  sal::static_int_cast<Id>(nSprmId)) ?
4122                 IMPORT_AS_DETECTED_ANCHOR :
4123                 IMPORT_AS_DETECTED_INLINE;
4124             GraphicImportPtr pGraphicImport =
4125                 m_pImpl->GetGraphicImport(eGraphicType);
4126             pProperties->resolve(*pGraphicImport);
4127             m_pImpl->ImportGraphic(pProperties, eGraphicType);
4128             if( !pGraphicImport->IsGraphic() )
4129             {
4130                 m_pImpl->ResetGraphicImport();
4131                 // todo: It's a shape, now start shape import
4132             }
4133         }
4134     }
4135     break;
4136 
4137     case NS_ooxml::LN_EG_RPrBase_vertAlign:
4138         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
4139     {
4140         sal_Int16 nEscapement = 0;
4141         sal_Int8 nProp  = 58;
4142         if( sStringValue.equalsAscii( "superscript" ))
4143                 nEscapement = 101;
4144         else if( sStringValue.equalsAscii( "subscript" ))
4145                 nEscapement = -101;
4146         else
4147             nProp = 100;
4148 
4149         rContext->Insert(PROP_CHAR_ESCAPEMENT,         true, uno::makeAny( nEscapement ) );
4150         rContext->Insert(PROP_CHAR_ESCAPEMENT_HEIGHT,  true, uno::makeAny( nProp ) );
4151     }
4152     break;
4153 
4154 //    case NS_ooxml::LN_CT_FtnEdn_type
4155         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
4156 //    case NS_ooxml::LN_CT_FtnEdn_id
4157         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
4158 //    case NS_ooxml::LN_EG_FtnEdnNumProps_numRestart
4159     case NS_ooxml::LN_CT_FtnProps_pos:
4160             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
4161     //footnotes in word can be at page end or beneath text - writer supports only the first
4162     //endnotes in word can be at section end or document end - writer supports only the latter
4163     // -> so this property can be ignored
4164     break;
4165     case NS_ooxml::LN_EG_FtnEdnNumProps_numStart:
4166             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
4167     case NS_ooxml::LN_CT_FtnProps_numFmt:
4168             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
4169     case NS_ooxml::LN_CT_EdnProps_numFmt:
4170             /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
4171     {
4172         try
4173         {
4174             uno::Reference< beans::XPropertySet >  xFtnEdnSettings;
4175             if( m_pImpl->IsInFootnoteProperties() )
4176             {
4177                 uno::Reference< text::XFootnotesSupplier> xFootnotesSupplier( m_pImpl->GetTextDocument(), uno::UNO_QUERY );
4178                 xFtnEdnSettings = xFootnotesSupplier->getFootnoteSettings();
4179             }
4180             else
4181             {
4182                 uno::Reference< text::XEndnotesSupplier> xEndnotesSupplier( m_pImpl->GetTextDocument(), uno::UNO_QUERY );
4183                 xFtnEdnSettings = xEndnotesSupplier->getEndnoteSettings();
4184             }
4185             if( NS_ooxml::LN_EG_FtnEdnNumProps_numStart == nSprmId )
4186             {
4187                 xFtnEdnSettings->setPropertyValue(
4188                     PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_START_AT),
4189                                                                     uno::makeAny( sal_Int16( nIntValue - 1 )));
4190             }
4191             else
4192             {
4193                 sal_Int16 nNumType = ConversionHelper::ConvertNumberingType( nIntValue );
4194                 xFtnEdnSettings->setPropertyValue(
4195                     PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_NUMBERING_TYPE),
4196                                                                     uno::makeAny( nNumType ));
4197             }
4198         }
4199         catch( const uno::Exception& e)
4200         {
4201             (void) e;
4202         }
4203     }
4204     break;
4205     case NS_ooxml::LN_paratrackchange:
4206         m_pImpl->StartParaChange( );
4207     case NS_ooxml::LN_trackchange:
4208         /* WRITERFILTERSTATUS: done: 100, planned: 5, spent: 0 */
4209     case NS_ooxml::LN_EG_RPrContent_rPrChange:
4210         /* WRITERFILTERSTATUS: done: 100, planned: 5, spent: 0 */
4211     {
4212         m_pImpl->AddNewRedline( );
4213         resolveSprmProps(*this, rSprm );
4214         // now the properties author, date and id should be available
4215         sal_Int32 nToken = m_pImpl->GetCurrentRedlineToken();
4216         switch( nToken & 0xffff )
4217         {
4218             case ooxml::OOXML_mod :
4219             case ooxml::OOXML_ins :
4220             case ooxml::OOXML_del : break;
4221             default: OSL_ENSURE( false, "redline token other than mod, ins or del" );
4222         }
4223         m_pImpl->EndParaChange( );
4224     }
4225     break;
4226     case NS_ooxml::LN_CT_RPrChange_rPr:
4227         /* WRITERFILTERSTATUS: done: 100, planned: 5, spent: 0 */
4228     break;
4229     /* WRITERFILTERSTATUS: done: 0, planned: 4, spent: 0 */
4230     case NS_ooxml::LN_object:
4231     {
4232         writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
4233         if( pProperties.get( ) )
4234         {
4235             OLEHandlerPtr pOLEHandler( new OLEHandler );
4236             pProperties->resolve(*pOLEHandler);
4237             if ( pOLEHandler->isOLEObject( ) )
4238             {
4239                 ::rtl::OUString sStreamName = pOLEHandler->copyOLEOStream( m_pImpl->GetTextDocument() );
4240                 if( sStreamName.getLength() )
4241                 {
4242                     m_pImpl->appendOLE( sStreamName, pOLEHandler );
4243                 }
4244             }
4245         }
4246     }
4247     break;
4248 //    case NS_ooxml::LN_CT_EdnProps_pos
4249         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
4250 //    case NS_ooxml::LN_CT_EdnProps_numFmt
4251         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
4252 //    case NS_ooxml::LN_CT_FtnDocProps_footnote
4253         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
4254 //    case NS_ooxml::LN_CT_EdnDocProps_endnote
4255         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
4256     //break;
4257     case NS_ooxml::LN_EG_HdrFtrReferences_headerReference: // header reference - not needed
4258         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
4259     case NS_ooxml::LN_EG_HdrFtrReferences_footerReference: // footer reference - not needed
4260         /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
4261     break;
4262     case NS_ooxml::LN_EG_RPrBase_snapToGrid: // "Use document grid  settings for inter-paragraph spacing"
4263             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
4264     break;
4265     case NS_sprm::LN_PContextualSpacing:
4266         //TODO: determines whether top/bottom paragraph spacing is added if equal styles are following - unsupported
4267     break;
4268     case NS_ooxml::LN_EG_SectPrContents_formProt: //section protection, only form editing is enabled - unsupported
4269     case NS_ooxml::LN_EG_SectPrContents_vAlign:
4270     case NS_ooxml::LN_EG_RPrBase_fitText:
4271             /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
4272     break;
4273     case NS_ooxml::LN_ffdata:
4274     {
4275         writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
4276         if (pProperties.get() != NULL)
4277         {
4278             FFDataHandler::Pointer_t pFFDataHandler(new FFDataHandler());
4279 
4280             pProperties->resolve(*pFFDataHandler);
4281             m_pImpl->SetFieldFFData(pFFDataHandler);
4282         }
4283     }
4284     break;
4285     default:
4286         {
4287 #ifdef DEBUG_DOMAINMAPPER
4288             dmapper_logger->startElement("unhandled");
4289             dmapper_logger->attribute("id", nSprmId);
4290             dmapper_logger->endElement("unhandled");
4291 #endif
4292         }
4293     }
4294 }
4295 /*-- 09.06.2006 09:52:13---------------------------------------------------
4296 
4297 -----------------------------------------------------------------------*/
lcl_entry(int,writerfilter::Reference<Properties>::Pointer_t ref)4298 void DomainMapper::lcl_entry(int /*pos*/,
4299                          writerfilter::Reference<Properties>::Pointer_t ref)
4300 {
4301     ref->resolve(*this);
4302 }
4303 /*-- 09.06.2006 09:52:13---------------------------------------------------
4304 
4305 -----------------------------------------------------------------------*/
data(const sal_uInt8 *,size_t,writerfilter::Reference<Properties>::Pointer_t)4306 void DomainMapper::data(const sal_uInt8* /*buf*/, size_t /*len*/,
4307                         writerfilter::Reference<Properties>::Pointer_t /*ref*/)
4308 {
4309 }
4310 /*-- 09.06.2006 09:52:13---------------------------------------------------
4311 
4312 -----------------------------------------------------------------------*/
lcl_startSectionGroup()4313 void DomainMapper::lcl_startSectionGroup()
4314 {
4315     m_pImpl->PushProperties(CONTEXT_SECTION);
4316 }
4317 /*-- 09.06.2006 09:52:13---------------------------------------------------
4318 
4319 -----------------------------------------------------------------------*/
lcl_endSectionGroup()4320 void DomainMapper::lcl_endSectionGroup()
4321 {
4322     PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_SECTION);
4323     SectionPropertyMap* pSectionContext = dynamic_cast< SectionPropertyMap* >( pContext.get() );
4324     OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
4325     if(pSectionContext)
4326         pSectionContext->CloseSectionGroup( *m_pImpl );
4327     m_pImpl->PopProperties(CONTEXT_SECTION);
4328 }
4329 /*-- 09.06.2006 09:52:13---------------------------------------------------
4330 
4331 -----------------------------------------------------------------------*/
lcl_startParagraphGroup()4332 void DomainMapper::lcl_startParagraphGroup()
4333 {
4334     m_pImpl->getTableManager().startParagraphGroup();
4335     m_pImpl->PushProperties(CONTEXT_PARAGRAPH);
4336     static ::rtl::OUString sDefault( ::rtl::OUString::createFromAscii("Standard") );
4337 	if (m_pImpl->GetTopContext())
4338 	{
4339 	    m_pImpl->GetTopContext()->Insert( PROP_PARA_STYLE_NAME, true, uno::makeAny( sDefault ) );
4340     	if (m_pImpl->isBreakDeferred(PAGE_BREAK))
4341        		m_pImpl->GetTopContext()->Insert( PROP_BREAK_TYPE, true, uno::makeAny( com::sun::star::style::BreakType_PAGE_BEFORE) );
4342     	else if (m_pImpl->isBreakDeferred(COLUMN_BREAK))
4343         	m_pImpl->GetTopContext()->Insert( PROP_BREAK_TYPE, true, uno::makeAny( com::sun::star::style::BreakType_COLUMN_BEFORE) );
4344 	}
4345     m_pImpl->clearDeferredBreaks();
4346 }
4347 /*-- 09.06.2006 09:52:14---------------------------------------------------
4348 
4349 -----------------------------------------------------------------------*/
lcl_endParagraphGroup()4350 void DomainMapper::lcl_endParagraphGroup()
4351 {
4352     m_pImpl->PopProperties(CONTEXT_PARAGRAPH);
4353     m_pImpl->getTableManager().endParagraphGroup();
4354     //frame conversion has to be executed after table conversion
4355     m_pImpl->ExecuteFrameConversion();
4356 }
4357 
markLastParagraphInSection()4358 void DomainMapper::markLastParagraphInSection( )
4359 {
4360     m_pImpl->SetIsLastParagraphInSection( true );
4361 }
4362 
lcl_startShape(uno::Reference<drawing::XShape> xShape)4363 void DomainMapper::lcl_startShape( uno::Reference< drawing::XShape > xShape )
4364 {
4365     m_pImpl->PushShapeContext( xShape );
4366 }
4367 
lcl_endShape()4368 void DomainMapper::lcl_endShape( )
4369 {
4370     m_pImpl->PopShapeContext( );
4371 }
4372 
4373 /*-- 13.06.2007 16:15:55---------------------------------------------------
4374 
4375   -----------------------------------------------------------------------*/
PushStyleSheetProperties(PropertyMapPtr pStyleProperties,bool bAffectTableMngr)4376 void DomainMapper::PushStyleSheetProperties( PropertyMapPtr pStyleProperties, bool bAffectTableMngr )
4377 {
4378     m_pImpl->PushStyleProperties( pStyleProperties );
4379     if ( bAffectTableMngr )
4380         m_pImpl->getTableManager( ).SetStyleProperties( pStyleProperties );
4381 }
4382 /*-- 13.06.2007 16:15:55---------------------------------------------------
4383 
4384   -----------------------------------------------------------------------*/
PopStyleSheetProperties(bool bAffectTableMngr)4385 void DomainMapper::PopStyleSheetProperties( bool bAffectTableMngr )
4386 {
4387     m_pImpl->PopProperties( CONTEXT_STYLESHEET );
4388     if ( bAffectTableMngr )
4389     {
4390         PropertyMapPtr emptyPtr;
4391         m_pImpl->getTableManager( ).SetStyleProperties( emptyPtr );
4392     }
4393 }
4394 /*-- 28.01.2008 14:52:33---------------------------------------------------
4395 
4396   -----------------------------------------------------------------------*/
PushListProperties(::boost::shared_ptr<PropertyMap> pListProperties)4397 void DomainMapper::PushListProperties( ::boost::shared_ptr<PropertyMap> pListProperties )
4398 {
4399     m_pImpl->PushListProperties( pListProperties );
4400 }
4401 /*-- 28.01.2008 14:52:33---------------------------------------------------
4402 
4403   -----------------------------------------------------------------------*/
PopListProperties()4404 void DomainMapper::PopListProperties()
4405 {
4406     m_pImpl->PopProperties( CONTEXT_LIST );
4407 }
4408 /*-- 09.06.2006 09:52:14---------------------------------------------------
4409 
4410 -----------------------------------------------------------------------*/
4411 
lcl_startCharacterGroup()4412 void DomainMapper::lcl_startCharacterGroup()
4413 {
4414     m_pImpl->PushProperties(CONTEXT_CHARACTER);
4415 }
4416 /*-- 09.06.2006 09:52:14---------------------------------------------------
4417 
4418 -----------------------------------------------------------------------*/
lcl_endCharacterGroup()4419 void DomainMapper::lcl_endCharacterGroup()
4420 {
4421     m_pImpl->PopProperties(CONTEXT_CHARACTER);
4422 }
4423 /*-- 09.06.2006 09:52:14---------------------------------------------------
4424 
4425 -----------------------------------------------------------------------*/
lcl_text(const sal_uInt8 * data_,size_t len)4426 void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len)
4427 {
4428     //TODO: Determine the right text encoding (FIB?)
4429     ::rtl::OUString sText( (const sal_Char*) data_, len, RTL_TEXTENCODING_MS_1252 );
4430 #ifdef DEBUG_DOMAINMAPPER
4431     dmapper_logger->startElement("text");
4432     dmapper_logger->chars(sText);
4433     dmapper_logger->endElement("text");
4434 #endif
4435 
4436     try
4437     {
4438         if(len == 1)
4439         {
4440             switch(*data_)
4441             {
4442                 case 0x02: return; //footnote character
4443                 case 0x0c: //page break
4444                     m_pImpl->deferBreak(PAGE_BREAK);
4445                     return;
4446                 case 0x0e: //column break
4447                     m_pImpl->deferBreak(COLUMN_BREAK);
4448                     return;
4449                 case 0x07:
4450                     m_pImpl->getTableManager().text(data_, len);
4451                 case 0x0d:
4452                     m_pImpl->finishParagraph(m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH));
4453                     return;
4454                 case 0x13:
4455                     m_pImpl->PushFieldContext();
4456                     return;
4457                 case 0x14:
4458                     // delimiter not necessarily available
4459                     // appears only if field contains further content
4460                     m_pImpl->CloseFieldCommand();
4461                     return;
4462                 case 0x15: /* end of field */
4463                     m_pImpl->PopFieldContext();
4464                     return;
4465                 default:
4466                     break;
4467             }
4468         }
4469 
4470         PropertyMapPtr pContext = m_pImpl->GetTopContext();
4471 	if ( pContext && !pContext->GetFootnote().is() )
4472 	{
4473 	    if (m_pImpl->isBreakDeferred(PAGE_BREAK))
4474                 m_pImpl->GetTopContext()->Insert( PROP_BREAK_TYPE, true, uno::makeAny( com::sun::star::style::BreakType_PAGE_BEFORE) );
4475             else if (m_pImpl->isBreakDeferred(COLUMN_BREAK))
4476                 m_pImpl->GetTopContext()->Insert( PROP_BREAK_TYPE, true, uno::makeAny( com::sun::star::style::BreakType_COLUMN_BEFORE) );
4477             m_pImpl->clearDeferredBreaks();
4478         }
4479 
4480         if( pContext->GetFootnote().is() && m_pImpl->IsCustomFtnMark() )
4481         {
4482             pContext->GetFootnote()->setLabel( sText );
4483             m_pImpl->SetCustomFtnMark( false );
4484             //otherwise ignore sText
4485         }
4486         else if( m_pImpl->IsOpenFieldCommand() )
4487             m_pImpl->AppendFieldCommand(sText);
4488         else if( m_pImpl->IsOpenField() && m_pImpl->IsFieldResultAsString())
4489              /*depending on the success of the field insert operation this result will be
4490               set at the field or directly inserted into the text*/
4491             m_pImpl->SetFieldResult( sText );
4492         else
4493         {
4494             //--> debug
4495             //sal_uInt32 nSize = pContext->size();
4496             //<--
4497 
4498             if( !bool(pContext))
4499                 pContext.reset(new PropertyMap());
4500 
4501             m_pImpl->appendTextPortion( sText, pContext );
4502         }
4503     }
4504     catch( const uno::RuntimeException& )
4505     {
4506 #ifdef DEBUG_DOMAINMAPPER
4507         dmapper_logger->startElement("exception");
4508         dmapper_logger->attribute("file", __FILE__);
4509         dmapper_logger->attribute("line", __LINE__);
4510         dmapper_logger->endElement("exception");
4511 #endif
4512     }
4513 }
4514 /*-- 09.06.2006 09:52:15---------------------------------------------------
4515 
4516 -----------------------------------------------------------------------*/
lcl_utext(const sal_uInt8 * data_,size_t len)4517 void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
4518 {
4519     OUString sText;
4520     OUStringBuffer aBuffer = OUStringBuffer(len);
4521     aBuffer.append( (const sal_Unicode *) data_, len);
4522     sText = aBuffer.makeStringAndClear();
4523 
4524     try
4525     {
4526         m_pImpl->getTableManager().utext(data_, len);
4527 
4528         if ( len == 1
4529              && ( (*(const sal_Unicode*)data_) == 0x0d
4530                     || (*(const sal_Unicode*)data_) == 0x07 ) )
4531         {
4532             m_pImpl->finishParagraph(m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH));
4533         }
4534         else
4535         {
4536 
4537             PropertyMapPtr pContext = m_pImpl->GetTopContext();
4538             if ( pContext && !pContext->GetFootnote().is() )
4539             {
4540                 if (m_pImpl->isBreakDeferred(PAGE_BREAK))
4541                     m_pImpl->GetTopContext()->Insert( PROP_BREAK_TYPE, true, uno::makeAny( com::sun::star::style::BreakType_PAGE_BEFORE) );
4542                 else if (m_pImpl->isBreakDeferred(COLUMN_BREAK))
4543                     m_pImpl->GetTopContext()->Insert( PROP_BREAK_TYPE, true, uno::makeAny( com::sun::star::style::BreakType_COLUMN_BEFORE) );
4544                 m_pImpl->clearDeferredBreaks();
4545             }
4546 
4547             /* doesn't seem to be working
4548             if( pContext->GetFootnote().is() )
4549             {
4550                 //todo: the check for 0x0a is a hack!
4551                 if( *data_ != 0x0a && !pContext->GetFootnoteSymbol() )
4552                     pContext->GetFootnote()->setLabel( sText );
4553                 //otherwise ignore sText
4554             }
4555             else */
4556             if( pContext && pContext->GetFootnote().is() )
4557             {
4558                 if( !pContext->GetFootnoteSymbol() )
4559                     pContext->GetFootnote()->setLabel( sText );
4560                 //otherwise ignore sText
4561             }
4562             else if( m_pImpl->IsOpenFieldCommand() )
4563                 m_pImpl->AppendFieldCommand(sText);
4564             else if( m_pImpl->IsOpenField() && m_pImpl->IsFieldResultAsString())
4565                 /*depending on the success of the field insert operation this result will be
4566                   set at the field or directly inserted into the text*/
4567                 m_pImpl->SetFieldResult( sText );
4568             else
4569             {
4570                 if( !bool(pContext))
4571                     pContext.reset(new PropertyMap());
4572 
4573                 m_pImpl->appendTextPortion( sText, pContext );
4574             }
4575 
4576         }
4577     }
4578     catch( const uno::RuntimeException& e)
4579     {
4580         (void) e;
4581     }
4582 }
4583 /*-- 09.06.2006 09:52:15---------------------------------------------------
4584 
4585 -----------------------------------------------------------------------*/
lcl_props(writerfilter::Reference<Properties>::Pointer_t ref)4586 void DomainMapper::lcl_props(writerfilter::Reference<Properties>::Pointer_t ref)
4587 {
4588     string sType = ref->getType();
4589     if( sType == "PICF" )
4590     {
4591         m_pImpl->ImportGraphic(ref, IMPORT_AS_GRAPHIC);
4592     }
4593     else if( sType == "FSPA" )
4594     {
4595         m_pImpl->ImportGraphic(ref, IMPORT_AS_SHAPE);
4596     }
4597     else
4598         ref->resolve(*this);
4599 }
4600 /*-- 09.06.2006 09:52:15---------------------------------------------------
4601 
4602 -----------------------------------------------------------------------*/
lcl_table(Id name,writerfilter::Reference<Table>::Pointer_t ref)4603 void DomainMapper::lcl_table(Id name, writerfilter::Reference<Table>::Pointer_t ref)
4604 {
4605     m_pImpl->SetAnyTableImport(true);
4606     /* WRITERFILTERSTATUS: table: attributedata */
4607     switch(name)
4608     {
4609     case NS_rtf::LN_FONTTABLE:
4610         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
4611 
4612         // create a font table object that listens to the attributes
4613         // each entry call inserts a new font entry
4614         ref->resolve( *m_pImpl->GetFontTable() );
4615         break;
4616     case NS_rtf::LN_STYLESHEET:
4617         /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
4618         //same as above to import style sheets
4619         m_pImpl->SetStyleSheetImport( true );
4620         ref->resolve( *m_pImpl->GetStyleSheetTable() );
4621         m_pImpl->GetStyleSheetTable()->ApplyStyleSheets(m_pImpl->GetFontTable());
4622         m_pImpl->SetStyleSheetImport( false );
4623         break;
4624     case NS_ooxml::LN_NUMBERING:
4625     case NS_rtf::LN_LISTTABLE:
4626         {
4627             /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
4628 
4629             //the same for list tables
4630             ref->resolve( *m_pImpl->GetListTable() );
4631             m_pImpl->GetListTable( )->CreateNumberingRules( );
4632         }
4633         break;
4634     case NS_rtf::LN_LFOTABLE:
4635         {
4636             m_pImpl->GetListTable( )->SetLFOImport( true );
4637             ref->resolve( *m_pImpl->GetListTable() );
4638             m_pImpl->GetListTable( )->CreateNumberingRules( );
4639             m_pImpl->GetListTable( )->SetLFOImport( false );
4640         }
4641         break;
4642     case NS_ooxml::LN_THEMETABLE:
4643         ref->resolve ( *m_pImpl->GetThemeTable() );
4644     break;
4645     case NS_ooxml::LN_settings_settings:
4646         ref->resolve ( *m_pImpl->GetSettingsTable() );
4647         m_pImpl->ApplySettingsTable();
4648     break;
4649     default:
4650         OSL_ENSURE( false, "which table is to be filled here?");
4651     }
4652     m_pImpl->SetAnyTableImport(false);
4653 }
4654 /*-- 09.06.2006 09:52:16---------------------------------------------------
4655 
4656 -----------------------------------------------------------------------*/
lcl_substream(Id rName,::writerfilter::Reference<Stream>::Pointer_t ref)4657 void DomainMapper::lcl_substream(Id rName, ::writerfilter::Reference<Stream>::Pointer_t ref)
4658 {
4659     m_pImpl->appendTableManager( );
4660     m_pImpl->getTableManager().startLevel();
4661 
4662     //->debug
4663     //string sName = (*QNameToString::Instance())(rName);
4664     //--<debug
4665     //import of page header/footer
4666 
4667     /* WRITERFILTERSTATUS: table: attributedata */
4668     switch( rName )
4669     {
4670     case NS_rtf::LN_headerl:
4671         /* WRITERFILTERSTATUS: done: 50, planned: 2, spent: 0 */
4672 
4673         m_pImpl->PushPageHeader(SectionPropertyMap::PAGE_LEFT);
4674         break;
4675     case NS_rtf::LN_headerr:
4676         /* WRITERFILTERSTATUS: done: 50, planned: 2, spent: 0 */
4677 
4678         m_pImpl->PushPageHeader(SectionPropertyMap::PAGE_RIGHT);
4679         break;
4680     case NS_rtf::LN_headerf:
4681         /* WRITERFILTERSTATUS: done: 50, planned: 2, spent: 0 */
4682 
4683         m_pImpl->PushPageHeader(SectionPropertyMap::PAGE_FIRST);
4684         break;
4685     case NS_rtf::LN_footerl:
4686         /* WRITERFILTERSTATUS: done: 50, planned: 2, spent: 0 */
4687 
4688         m_pImpl->PushPageFooter(SectionPropertyMap::PAGE_LEFT);
4689         break;
4690     case NS_rtf::LN_footerr:
4691         /* WRITERFILTERSTATUS: done: 50, planned: 2, spent: 0 */
4692 
4693         m_pImpl->PushPageFooter(SectionPropertyMap::PAGE_RIGHT);
4694         break;
4695     case NS_rtf::LN_footerf:
4696         /* WRITERFILTERSTATUS: done: 50, planned: 2, spent: 0 */
4697 
4698         m_pImpl->PushPageFooter(SectionPropertyMap::PAGE_FIRST);
4699         break;
4700     case NS_rtf::LN_footnote:
4701     case NS_rtf::LN_endnote:
4702         m_pImpl->PushFootOrEndnote( NS_rtf::LN_footnote == rName );
4703     break;
4704     case NS_rtf::LN_annotation :
4705         m_pImpl->PushAnnotation();
4706     break;
4707     }
4708     ref->resolve(*this);
4709     switch( rName )
4710     {
4711     case NS_rtf::LN_headerl:
4712     case NS_rtf::LN_headerr:
4713     case NS_rtf::LN_headerf:
4714     case NS_rtf::LN_footerl:
4715     case NS_rtf::LN_footerr:
4716     case NS_rtf::LN_footerf:
4717         m_pImpl->PopPageHeaderFooter();
4718     break;
4719     case NS_rtf::LN_footnote:
4720     case NS_rtf::LN_endnote:
4721         m_pImpl->PopFootOrEndnote();
4722     break;
4723     case NS_rtf::LN_annotation :
4724         m_pImpl->PopAnnotation();
4725     break;
4726     }
4727 
4728     m_pImpl->getTableManager().endLevel();
4729     m_pImpl->popTableManager( );
4730 }
4731 /*-- 09.06.2006 09:52:16---------------------------------------------------
4732 
4733 -----------------------------------------------------------------------*/
lcl_info(const string &)4734 void DomainMapper::lcl_info(const string & /*info_*/)
4735 {
4736 }
4737 
handleUnderlineType(const sal_Int32 nIntValue,const::boost::shared_ptr<PropertyMap> pContext)4738 void DomainMapper::handleUnderlineType(const sal_Int32 nIntValue, const ::boost::shared_ptr<PropertyMap> pContext)
4739 {
4740     sal_Int16 eUnderline = awt::FontUnderline::NONE;
4741 
4742     switch(nIntValue)
4743     {
4744     case 0: eUnderline = awt::FontUnderline::NONE; break;
4745     case 2: pContext->Insert(PROP_CHAR_WORD_MODE, true, uno::makeAny( true ) ); // TODO: how to get rid of it?
4746     case 1: eUnderline = awt::FontUnderline::SINGLE;       break;
4747     case 3: eUnderline = awt::FontUnderline::DOUBLE;       break;
4748     case 4: eUnderline = awt::FontUnderline::DOTTED;       break;
4749     case 7: eUnderline = awt::FontUnderline::DASH;         break;
4750     case 9: eUnderline = awt::FontUnderline::DASHDOT;      break;
4751     case 10:eUnderline = awt::FontUnderline::DASHDOTDOT;   break;
4752     case 6: eUnderline = awt::FontUnderline::BOLD;         break;
4753     case 11:eUnderline = awt::FontUnderline::WAVE;         break;
4754     case 20:eUnderline = awt::FontUnderline::BOLDDOTTED;   break;
4755     case 23:eUnderline = awt::FontUnderline::BOLDDASH;     break;
4756     case 39:eUnderline = awt::FontUnderline::LONGDASH;     break;
4757     case 55:eUnderline = awt::FontUnderline::BOLDLONGDASH; break;
4758     case 25:eUnderline = awt::FontUnderline::BOLDDASHDOT;  break;
4759     case 26:eUnderline = awt::FontUnderline::BOLDDASHDOTDOT;break;
4760     case 27:eUnderline = awt::FontUnderline::BOLDWAVE;     break;
4761     case 43:eUnderline = awt::FontUnderline::DOUBLEWAVE;   break;
4762     default: ;
4763     }
4764     pContext->Insert(PROP_CHAR_UNDERLINE, true, uno::makeAny( eUnderline ) );
4765 }
4766 
handleParaJustification(const sal_Int32 nIntValue,const::boost::shared_ptr<PropertyMap> pContext,const bool bExchangeLeftRight)4767 void DomainMapper::handleParaJustification(const sal_Int32 nIntValue, const ::boost::shared_ptr<PropertyMap> pContext, const bool bExchangeLeftRight)
4768 {
4769     sal_Int16 nAdjust = 0;
4770     sal_Int16 nLastLineAdjust = 0;
4771     switch(nIntValue)
4772     {
4773     case 1:
4774         nAdjust = style::ParagraphAdjust_CENTER;
4775         break;
4776     case 2:
4777         nAdjust = static_cast< sal_Int16 > (bExchangeLeftRight ? style::ParagraphAdjust_LEFT : style::ParagraphAdjust_RIGHT);
4778         break;
4779     case 4:
4780         nLastLineAdjust = style::ParagraphAdjust_BLOCK;
4781         //no break;
4782     case 3:
4783         nAdjust = style::ParagraphAdjust_BLOCK;
4784         break;
4785     case 0:
4786     default:
4787         nAdjust = static_cast< sal_Int16 > (bExchangeLeftRight ? style::ParagraphAdjust_RIGHT : style::ParagraphAdjust_LEFT);
4788         break;
4789     }
4790     pContext->Insert( PROP_PARA_ADJUST, true, uno::makeAny( nAdjust ) );
4791     pContext->Insert( PROP_PARA_LAST_LINE_ADJUST, true, uno::makeAny( nLastLineAdjust ) );
4792 }
4793 
getColorFromIndex(const sal_Int32 nIndex,sal_Int32 & nColor)4794 bool DomainMapper::getColorFromIndex(const sal_Int32 nIndex, sal_Int32 &nColor)
4795 {
4796     nColor = 0;
4797     if ((nIndex < 1) || (nIndex > 16))
4798         return false;
4799 
4800     switch (nIndex)
4801     {
4802     case 1: nColor=0x000000; break; //black
4803     case 2: nColor=0x0000ff; break; //blue
4804     case 3: nColor=0x00ffff; break; //cyan
4805     case 4: nColor=0x00ff00; break; //green
4806     case 5: nColor=0xff00ff; break; //magenta
4807     case 6: nColor=0xff0000; break; //red
4808     case 7: nColor=0xffff00; break; //yellow
4809     case 8: nColor=0xffffff; break; //white
4810     case 9: nColor=0x000080;  break;//dark blue
4811     case 10: nColor=0x008080; break; //dark cyan
4812     case 11: nColor=0x008000; break; //dark green
4813     case 12: nColor=0x800080; break; //dark magenta
4814     case 13: nColor=0x800000; break; //dark red
4815     case 14: nColor=0x808000; break; //dark yellow
4816     case 15: nColor=0x808080; break; //dark gray
4817     case 16: nColor=0xC0C0C0; break; //light gray
4818     default:
4819         return false;
4820     }
4821     return true;
4822 }
4823 
getEmphasisValue(const sal_Int32 nIntValue)4824 sal_Int16 DomainMapper::getEmphasisValue(const sal_Int32 nIntValue)
4825 {
4826     switch (nIntValue)
4827     {
4828     case 1:
4829         return com::sun::star::text::FontEmphasis::DOT_ABOVE;
4830     case 2:
4831         return com::sun::star::text::FontEmphasis::ACCENT_ABOVE;
4832     case 3:
4833         return com::sun::star::text::FontEmphasis::CIRCLE_ABOVE;
4834     case 4:
4835         return com::sun::star::text::FontEmphasis::DOT_BELOW;
4836     default:
4837         return com::sun::star::text::FontEmphasis::NONE;
4838     }
4839 }
4840 
getBracketStringFromEnum(const sal_Int32 nIntValue,const bool bIsPrefix)4841 rtl::OUString DomainMapper::getBracketStringFromEnum(const sal_Int32 nIntValue, const bool bIsPrefix)
4842 {
4843     switch(nIntValue)
4844     {
4845     case 1:
4846         if (bIsPrefix)
4847             return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "(" ));
4848         return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( ")" ));
4849 
4850     case 2:
4851         if (bIsPrefix)
4852             return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "[" ));
4853         return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "]" ));
4854 
4855     case 3:
4856         if (bIsPrefix)
4857             return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "<" ));
4858         return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( ">" ));
4859 
4860     case 4:
4861         if (bIsPrefix)
4862             return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "{" ));
4863         return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "}" ));
4864 
4865     case 0:
4866     default:
4867         return rtl::OUString();
4868     }
4869 }
4870 
getTabAlignFromValue(const sal_Int32 nIntValue)4871 com::sun::star::style::TabAlign DomainMapper::getTabAlignFromValue(const sal_Int32 nIntValue)
4872 {
4873     switch (nIntValue)
4874     {
4875     case 0:
4876     case 4: // bar not supported
4877     case 5: // num not supported
4878         return com::sun::star::style::TabAlign_LEFT;
4879     case 1:
4880         return com::sun::star::style::TabAlign_CENTER;
4881     case 2:
4882         return com::sun::star::style::TabAlign_RIGHT;
4883     case 3:
4884         return com::sun::star::style::TabAlign_DECIMAL;
4885     }
4886     return com::sun::star::style::TabAlign_LEFT;
4887 }
4888 
getFillCharFromValue(const sal_Int32 nIntValue)4889 sal_Unicode DomainMapper::getFillCharFromValue(const sal_Int32 nIntValue)
4890 {
4891     switch (nIntValue)
4892     {
4893     case 1: // dot
4894         return sal_Unicode(0x002e);
4895     case 2: // hyphen
4896         return sal_Unicode(0x002d);
4897     case 3: // underscore
4898     case 4: // heavy FIXME ???
4899         return sal_Unicode(0x005f);
4900     case NS_ooxml::LN_Value_ST_TabTlc_middleDot: // middleDot
4901         return sal_Unicode(0x00b7);
4902     case 0: // none
4903     default:
4904         return sal_Unicode(0x0020); // blank space
4905     }
4906 }
4907 /*-- 18.07.2007 14:59:00---------------------------------------------------
4908 
4909   -----------------------------------------------------------------------*/
IsOOXMLImport() const4910 bool DomainMapper::IsOOXMLImport() const
4911 {
4912     return m_pImpl->IsOOXMLImport();
4913 }
4914 /*-- 18.07.2007 16:03:14---------------------------------------------------
4915 
4916   -----------------------------------------------------------------------*/
GetTextFactory() const4917 uno::Reference < lang::XMultiServiceFactory > DomainMapper::GetTextFactory() const
4918 {
4919     return m_pImpl->GetTextFactory();
4920 }
4921 /*-- 12.11.2007 10:41:01---------------------------------------------------
4922 
4923   -----------------------------------------------------------------------*/
4924 /*-- 31.01.2008 18:19:44---------------------------------------------------
4925 
4926   -----------------------------------------------------------------------*/
GetCurrentTextRange()4927 uno::Reference< text::XTextRange > DomainMapper::GetCurrentTextRange()
4928 {
4929     return m_pImpl->GetTopTextAppend()->getEnd();
4930 }
4931 
4932 /*-- 05.02.2008 10:26:26---------------------------------------------------
4933 
4934   -----------------------------------------------------------------------*/
getOrCreateCharStyle(PropertyValueVector_t & rCharProperties)4935 ::rtl::OUString DomainMapper::getOrCreateCharStyle( PropertyValueVector_t& rCharProperties )
4936 {
4937     StyleSheetTablePtr pStyleSheets = m_pImpl->GetStyleSheetTable();
4938     return pStyleSheets->getOrCreateCharStyle( rCharProperties );
4939 }
4940 
GetListTable()4941 ListsManager::Pointer DomainMapper::GetListTable( )
4942 {
4943     return m_pImpl->GetListTable( );
4944 }
4945 
GetStyleSheetTable()4946 StyleSheetTablePtr DomainMapper::GetStyleSheetTable( )
4947 {
4948     return m_pImpl->GetStyleSheetTable( );
4949 }
4950 
4951 } //namespace dmapper
4952 } //namespace writerfilter
4953