merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0338-writerfilter-docx-numbering.diff
blobf09c826babb9a3db2191e73d1faaa6b1463c8573
1 diff --git writerfilter/inc/dmapper/DomainMapper.hxx writerfilter/inc/dmapper/DomainMapper.hxx
2 index 3f2ad51..cbf314a 100644
3 --- writerfilter/inc/dmapper/DomainMapper.hxx
4 +++ writerfilter/inc/dmapper/DomainMapper.hxx
5 @@ -66,7 +66,8 @@ using namespace std;
7 class PropertyMap;
8 class DomainMapper_Impl;
9 -class ListTable;
10 +class ListsManager;
11 +class StyleSheetTable;
13 // different context types require different sprm handling (e.g. names)
14 enum SprmType
15 @@ -137,7 +138,8 @@ public:
16 ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > GetCurrentTextRange();
18 ::rtl::OUString getOrCreateCharStyle( PropertyValueVector_t& rCharProperties );
19 - boost::shared_ptr< ListTable > GetListTable( );
20 + boost::shared_ptr< ListsManager > GetListTable( );
21 + boost::shared_ptr< StyleSheetTable > GetStyleSheetTable( );
23 private:
24 void handleUnderlineType(const sal_Int32 nIntValue, const ::boost::shared_ptr<PropertyMap> pContext);
25 diff --git writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/DomainMapper.cxx
26 index 4115846..dadd45e 100644
27 --- writerfilter/source/dmapper/DomainMapper.cxx
28 +++ writerfilter/source/dmapper/DomainMapper.cxx
29 @@ -33,7 +33,7 @@
30 #include <dmapper/DomainMapper.hxx>
31 #include <DomainMapper_Impl.hxx>
32 #include <ConversionHelper.hxx>
33 -#include <ListTable.hxx>
34 +#include <NumberingManager.hxx>
35 #include <ThemeTable.hxx>
36 #include <ModelEventListener.hxx>
37 #include <MeasureHandler.hxx>
38 @@ -1651,7 +1651,9 @@ void DomainMapper::attribute(Id nName, Value & val)
39 case NS_ooxml::LN_CT_TabStop_val:
40 /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
41 if (sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_ST_TabJc_clear)
42 + {
43 m_pImpl->m_aCurrentTabStop.bDeleted = true;
44 + }
45 else
47 m_pImpl->m_aCurrentTabStop.bDeleted = false;
48 @@ -1778,8 +1780,11 @@ void DomainMapper::attribute(Id nName, Value & val)
49 case NS_ooxml::LN_CT_Ind_hanging:
50 /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
51 if (m_pImpl->GetTopContext())
52 + {
53 + sal_Int32 nValue = ConversionHelper::convertTwipToMM100( nIntValue );
54 m_pImpl->GetTopContext()->Insert(
55 - PROP_PARA_FIRST_LINE_INDENT, true, uno::makeAny( - ConversionHelper::convertTwipToMM100(nIntValue ) ));
56 + PROP_PARA_FIRST_LINE_INDENT, true, uno::makeAny( - nValue ));
57 + }
58 break;
59 case NS_ooxml::LN_CT_Ind_firstLine:
60 /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
61 @@ -2268,20 +2273,26 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
62 /* WRITERFILTERSTATUS: comment: */
64 //convert the ListTable entry to a NumberingRules propery and apply it
65 - sal_Int32 nListId = m_pImpl->GetLFOTable()->GetListID( nIntValue );
66 - if(nListId >= 0)
67 + ListsManager::Pointer pListTable = m_pImpl->GetListTable();
68 + ListDef::Pointer pList = pListTable->GetList( nIntValue );
69 + if( pList.get( ) )
71 - ListTablePtr pListTable = m_pImpl->GetListTable();
72 if( m_pImpl->IsStyleSheetImport() )
74 //style sheets cannot have a numbering rule attached
75 StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() );
76 - pStyleSheetPropertyMap->SetListId( nListId );
77 + pStyleSheetPropertyMap->SetListId( nIntValue );
79 else
80 - rContext->Insert( PROP_NUMBERING_RULES, true,
81 - uno::makeAny(pListTable->GetNumberingRules(nListId)));
82 - //TODO: Merge overwrittern numbering levels from LFO table
83 + {
84 + uno::Any aRules = uno::makeAny( pList->GetNumberingRules( ) );
85 + rContext->Insert( PROP_NUMBERING_RULES, true, aRules );
86 + }
87 + }
88 + else if ( !m_pImpl->IsStyleSheetImport( ) )
89 + {
90 + rtl::OUString sNone;
91 + rContext->Insert( PROP_NUMBERING_STYLE_NAME, true, uno::makeAny( sNone ) );
94 break;
95 @@ -3915,7 +3926,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
97 if( pStyleSheetProperties && pStyleSheetProperties->GetListId() >= 0 )
98 rContext->Insert( PROP_NUMBERING_STYLE_NAME, true, uno::makeAny(
99 - m_pImpl->GetListTable( )->GetStyleName( pStyleSheetProperties->GetListId( ) ) ), false);
100 + ListDef::GetStyleName( pStyleSheetProperties->GetListId( ) ) ), false);
102 if( pStyleSheetProperties && pStyleSheetProperties->GetListLevel() >= 0 )
103 rContext->Insert( PROP_NUMBERING_LEVEL, true, uno::makeAny(pStyleSheetProperties->GetListLevel()), false);
104 @@ -4136,9 +4147,6 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp
105 break;
106 case NS_ooxml::LN_EG_SectPrContents_formProt: //section protection, only form editing is enabled - unsupported
107 break;
108 - case NS_ooxml::LN_CT_Lvl_pStyle:
109 - //TODO: numbering style should apply current numbering level - not yet supported
110 - break;
111 default:
113 #if OSL_DEBUG_LEVEL > 0
114 @@ -4528,9 +4536,12 @@ void DomainMapper::table(Id name, writerfilter::Reference<Table>::Pointer_t ref)
116 break;
117 case NS_rtf::LN_LFOTABLE:
118 - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */
120 - ref->resolve( *m_pImpl->GetLFOTable() );
122 + m_pImpl->GetListTable( )->SetLFOImport( true );
123 + ref->resolve( *m_pImpl->GetListTable() );
124 + m_pImpl->GetListTable( )->CreateNumberingRules( );
125 + m_pImpl->GetListTable( )->SetLFOImport( false );
127 break;
128 case NS_ooxml::LN_THEMETABLE:
129 ref->resolve ( *m_pImpl->GetThemeTable() );
130 @@ -4793,6 +4804,7 @@ com::sun::star::style::TabAlign DomainMapper::getTabAlignFromValue(const sal_Int
132 case 0:
133 case 4: // bar not supported
134 + case 5: // num not supported
135 return com::sun::star::style::TabAlign_LEFT;
136 case 1:
137 return com::sun::star::style::TabAlign_CENTER;
138 @@ -4800,8 +4812,6 @@ com::sun::star::style::TabAlign DomainMapper::getTabAlignFromValue(const sal_Int
139 return com::sun::star::style::TabAlign_RIGHT;
140 case 3:
141 return com::sun::star::style::TabAlign_DECIMAL;
142 - default:
143 - return com::sun::star::style::TabAlign_DEFAULT;
145 return com::sun::star::style::TabAlign_LEFT;
147 @@ -4841,10 +4851,6 @@ uno::Reference < lang::XMultiServiceFactory > DomainMapper::GetTextFactory() con
148 /*-- 12.11.2007 10:41:01---------------------------------------------------
150 -----------------------------------------------------------------------*/
151 -void DomainMapper::AddListIDToLFOTable( sal_Int32 nAbstractNumId )
153 - m_pImpl->GetLFOTable()->AddListID( nAbstractNumId );
155 /*-- 31.01.2008 18:19:44---------------------------------------------------
157 -----------------------------------------------------------------------*/
158 @@ -4862,10 +4868,15 @@ uno::Reference< text::XTextRange > DomainMapper::GetCurrentTextRange()
159 return pStyleSheets->getOrCreateCharStyle( rCharProperties );
162 -ListTablePtr DomainMapper::GetListTable( )
163 +ListsManager::Pointer DomainMapper::GetListTable( )
165 return m_pImpl->GetListTable( );
168 +StyleSheetTablePtr DomainMapper::GetStyleSheetTable( )
170 + return m_pImpl->GetStyleSheetTable( );
173 } //namespace dmapper
174 } //namespace writerfilter
175 diff --git writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx
176 index f460109..586b002 100644
177 --- writerfilter/source/dmapper/DomainMapper_Impl.cxx
178 +++ writerfilter/source/dmapper/DomainMapper_Impl.cxx
179 @@ -82,6 +82,7 @@
181 #if DEBUG
182 #include <com/sun/star/lang/XServiceInfo.hpp>
183 +#include <com/sun/star/style/TabStop.hpp>
184 #endif
186 #include <map>
187 @@ -704,7 +705,7 @@ void DomainMapper_Impl::IncorporateTabStop( const DeletableTabStop & rTabStop )
188 -----------------------------------------------------------------------*/
189 uno::Sequence< style::TabStop > DomainMapper_Impl::GetCurrentTabStopAndClear()
191 - uno::Sequence< style::TabStop > aRet( m_aCurrentTabStops.size() );
192 + uno::Sequence< style::TabStop > aRet( sal_Int32( m_aCurrentTabStops.size() ) );
193 style::TabStop* pArray = aRet.getArray();
194 ::std::vector<DeletableTabStop>::const_iterator aIt = m_aCurrentTabStops.begin();
195 ::std::vector<DeletableTabStop>::const_iterator aEndIt = m_aCurrentTabStops.end();
196 @@ -757,11 +758,11 @@ uno::Any DomainMapper_Impl::GetPropertyFromStyleSheet(PropertyIds eId)
197 /*-------------------------------------------------------------------------
199 -----------------------------------------------------------------------*/
200 -ListTablePtr DomainMapper_Impl::GetListTable()
201 +ListsManager::Pointer DomainMapper_Impl::GetListTable()
203 if(!m_pListTable)
204 m_pListTable.reset(
205 - new ListTable( m_rDMapper, m_xTextFactory ));
206 + new ListsManager( m_rDMapper, m_xTextFactory ));
207 return m_pListTable;
210 @@ -1092,6 +1093,18 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
211 aProperties[nLength].Value <<= aDrop;
212 aProperties[nLength].Name = rPropNameSupplier.GetName(PROP_DROP_CAP_FORMAT);
214 +#if DEBUG
215 + sal_Int32 nLen = aProperties.getLength();
216 + for ( sal_Int32 i = 0; i < nLen; i++ )
218 + uno::Any aValue = aProperties[i].Value;
219 + uno::Sequence< style::TabStop > aTabs;
220 + if ( aValue >>= aTabs )
222 + fprintf( stderr, "Found tab stops\n" );
225 +#endif
226 uno::Reference< text::XTextRange > xTextRange =
227 xTextAppend->finishParagraph( aProperties );
228 getTableManager( ).handle(xTextRange);
229 diff --git writerfilter/source/dmapper/DomainMapper_Impl.hxx writerfilter/source/dmapper/DomainMapper_Impl.hxx
230 index 5f33e30..8dbfa4e 100644
231 --- writerfilter/source/dmapper/DomainMapper_Impl.hxx
232 +++ writerfilter/source/dmapper/DomainMapper_Impl.hxx
233 @@ -48,8 +48,7 @@
234 #include <DomainMapperTableManager.hxx>
235 #include <PropertyMap.hxx>
236 #include <FontTable.hxx>
237 -#include <ListTable.hxx>
238 -#include <LFOTable.hxx>
239 +#include <NumberingManager.hxx>
240 #include <StyleSheetTable.hxx>
241 #include <ThemeTable.hxx>
242 #include <SettingsTable.hxx>
243 @@ -306,8 +305,7 @@ private:
244 PropertyStack m_aPropertyStacks[NUMBER_OF_CONTEXTS];
245 ContextStack m_aContextStack;
246 FontTablePtr m_pFontTable;
247 - ListTablePtr m_pListTable;
248 - LFOTablePtr m_pLFOTable;
249 + ListsManager::Pointer m_pListTable;
250 StyleSheetTablePtr m_pStyleSheetTable;
251 ThemeTablePtr m_pThemeTable;
252 GraphicImportPtr m_pGraphicImport;
253 @@ -434,13 +432,7 @@ public:
254 m_pStyleSheetTable.reset(new StyleSheetTable( m_rDMapper, m_xTextDocument ));
255 return m_pStyleSheetTable;
257 - ListTablePtr GetListTable();
258 - LFOTablePtr GetLFOTable()
260 - if(!m_pLFOTable)
261 - m_pLFOTable.reset( new LFOTable );
262 - return m_pLFOTable;
264 + ListsManager::Pointer GetListTable();
265 ThemeTablePtr GetThemeTable()
267 if(!m_pThemeTable)
268 diff --git writerfilter/source/dmapper/LFOTable.cxx writerfilter/source/dmapper/LFOTable.cxx
269 deleted file mode 100644
270 index 8008f2a..0000000
271 --- writerfilter/source/dmapper/LFOTable.cxx
272 +++ /dev/null
273 @@ -1,609 +0,0 @@
274 -/*************************************************************************
276 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
277 - *
278 - * Copyright 2008 by Sun Microsystems, Inc.
280 - * OpenOffice.org - a multi-platform office productivity suite
282 - * $RCSfile: LFOTable.cxx,v $
283 - * $Revision: 1.5 $
285 - * This file is part of OpenOffice.org.
287 - * OpenOffice.org is free software: you can redistribute it and/or modify
288 - * it under the terms of the GNU Lesser General Public License version 3
289 - * only, as published by the Free Software Foundation.
291 - * OpenOffice.org is distributed in the hope that it will be useful,
292 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
293 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
294 - * GNU Lesser General Public License version 3 for more details
295 - * (a copy is included in the LICENSE file that accompanied this code).
297 - * You should have received a copy of the GNU Lesser General Public License
298 - * version 3 along with OpenOffice.org. If not, see
299 - * <http://www.openoffice.org/license.html>
300 - * for a copy of the LGPLv3 License.
302 - ************************************************************************/
303 -#include <LFOTable.hxx>
304 -#include <doctok/resourceids.hxx>
305 -#include <vector>
307 -namespace writerfilter {
308 -namespace dmapper
310 -using namespace std;
311 -using namespace writerfilter;
313 -struct LFOLevel
315 - sal_Int32 nIStartAt;
316 - sal_Int32 nFStartAt;
317 - sal_Int32 nFFormatting;
318 - ::rtl::OUString sILevel;
320 - LFOLevel() :
321 - nIStartAt(-1)
322 - ,nFStartAt(-1)
323 - ,nFFormatting(-1)
324 - {}
326 -typedef ::boost::shared_ptr< LFOLevel > LFOLevelPtr;
327 -struct LFOEntry
329 - sal_Int32 nListId;
330 - sal_Int32 nCLFOLevel;
331 - vector< LFOLevelPtr > aLFOLevels; //usually empty
333 - LFOEntry() :
334 - nListId(-1)
335 - ,nCLFOLevel(-1)
336 - {}
338 -typedef ::boost::shared_ptr<LFOEntry> LFOEntryPtr;
340 -struct LFOTable_Impl
342 - ::std::vector< LFOEntryPtr > m_aLFOEntries; //properties of each level
343 - LFOEntryPtr m_pCurrentEntry;
346 -/*-- 27.06.2006 15:13:03---------------------------------------------------
348 - -----------------------------------------------------------------------*/
349 -LFOTable::LFOTable() :
350 - m_pImpl( new LFOTable_Impl )
353 -/*-- 27.06.2006 15:13:03---------------------------------------------------
355 - -----------------------------------------------------------------------*/
356 -LFOTable::~LFOTable()
359 -/*-- 27.06.2006 15:13:04---------------------------------------------------
361 - -----------------------------------------------------------------------*/
362 -void LFOTable::attribute(Id Name, Value & val)
364 - OSL_ENSURE(m_pImpl->m_pCurrentEntry, "no current entry to write to");
365 - if(!m_pImpl->m_pCurrentEntry)
366 - return;
368 - int nIntValue = val.getInt();
369 - /* WRITERFILTERSTATUS: table: LFOTable_attributedata */
370 - switch( Name )
372 -// case NS_rtf::LN_ISTD: break;//index of applied style
373 - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
374 - case NS_rtf::LN_ISTARTAT:
375 - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
376 - case NS_rtf::LN_ILVL:
377 - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
378 - case NS_rtf::LN_FSTARTAT:
379 - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
380 - case NS_rtf::LN_FFORMATTING:
381 - if(m_pImpl->m_pCurrentEntry->aLFOLevels.size())
383 - vector< LFOLevelPtr >::reverse_iterator aEndIter = m_pImpl->m_pCurrentEntry->aLFOLevels.rbegin();
384 - switch( Name )
386 - case NS_rtf::LN_ISTARTAT:
387 - (*aEndIter)->nIStartAt = nIntValue;
388 - break;
389 - case NS_rtf::LN_ILVL:
390 - (*aEndIter)->sILevel = val.getString();
391 - break;
392 - case NS_rtf::LN_FSTARTAT:
393 - (*aEndIter)->nFStartAt = nIntValue;
394 - break;
395 - case NS_rtf::LN_FFORMATTING:
396 - (*aEndIter)->nFFormatting = nIntValue;
397 - break;
398 - default:;
401 - break;
402 -// case NS_rtf::LN_NFC: break;
403 -// case NS_rtf::LN_JC: break;
404 -// case NS_rtf::LN_FLEGAL: break;
405 -// case NS_rtf::LN_FNORESTART: break;
406 -// case NS_rtf::LN_FPREV: break;
407 -// case NS_rtf::LN_FPREVSPACE: break;
408 -// case NS_rtf::LN_FWORD6: break;
409 -// case NS_rtf::LN_UNUSED5_7: break;
410 -// case NS_rtf::LN_RGBXCHNUMS: break;
411 -// case NS_rtf::LN_IXCHFOLLOW: break;
412 -// case NS_rtf::LN_DXASPACE: break;
413 -// case NS_rtf::LN_DXAINDENT: break;
414 -// case NS_rtf::LN_CBGRPPRLCHPX: break;
415 -// case NS_rtf::LN_CBGRPPRLPAPX: break;
416 - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
417 - case NS_rtf::LN_LSID:
418 - m_pImpl->m_pCurrentEntry->nListId = nIntValue;
419 - break;
420 -// case NS_rtf::LN_TPLC: break;
421 -// case NS_rtf::LN_RGISTD: break;
422 -// case NS_rtf::LN_FSIMPLELIST: break;
423 -// case NS_rtf::LN_FRESTARTHDN: break;
424 -// case NS_rtf::LN_UNSIGNED26_2: break;
425 -// case NS_rtf::LN_UNSIGNED4_6: break;
426 - /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */
427 - case NS_rtf::LN_UNUSED4:
428 - /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */
429 - case NS_rtf::LN_UNUSED8:
430 - // as the names state they are unused
431 - break;
432 - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
433 - case NS_rtf::LN_CLFOLVL:
434 - m_pImpl->m_pCurrentEntry->nCLFOLevel = nIntValue;
435 - break;
436 -// case NS_rtf::LN_CBFFNM1: break;
437 -// case NS_rtf::LN_PRQ: break;
438 -// case NS_rtf::LN_FTRUETYPE: break;
439 -// case NS_rtf::LN_UNUSED1_3: break;
440 -// case NS_rtf::LN_FF: break;
441 -// case NS_rtf::LN_UNUSED1_7: break;
442 -// case NS_rtf::LN_WWEIGHT: break;
443 -// case NS_rtf::LN_CHS: break;
444 -// case NS_rtf::LN_IXCHSZALT: break;
445 -// case NS_rtf::LN_PANOSE: break;
446 -// case NS_rtf::LN_FS: break;
447 -// case NS_rtf::LN_STI: break;
448 -// case NS_rtf::LN_FSCRATCH: break;
449 -// case NS_rtf::LN_FINVALHEIGHT: break;
450 -// case NS_rtf::LN_FHASUPE: break;
451 -// case NS_rtf::LN_FMASSCOPY: break;
452 -// case NS_rtf::LN_SGC: break;
453 -// case NS_rtf::LN_ISTDBASE: break;
454 -// case NS_rtf::LN_CUPX: break;
455 -// case NS_rtf::LN_ISTDNEXT: break;
456 -// case NS_rtf::LN_BCHUPE: break;
457 -// case NS_rtf::LN_FAUTOREDEF: break;
458 -// case NS_rtf::LN_FHIDDEN: break;
459 -// case NS_rtf::LN_UNUSED8_3: break;
460 -// case NS_rtf::LN_CSTD: break;
461 -// case NS_rtf::LN_CBSTDBASEINFILE: break;
462 -// case NS_rtf::LN_FSTDSTYLENAMESWRITTEN: break;
463 -// case NS_rtf::LN_UNUSED4_2: break;
464 -// case NS_rtf::LN_STIMAXWHENSAVED: break;
465 -// case NS_rtf::LN_ISTDMAXFIXEDWHENSAVED: break;
466 -// case NS_rtf::LN_NVERBUILTINNAMESWHENSAVED: break;
467 -// case NS_rtf::LN_RGFTCSTANDARDCHPSTSH: break;
468 -// case NS_rtf::LN_WIDENT: break;
469 -// case NS_rtf::LN_NFIB: break;
470 -// case NS_rtf::LN_NPRODUCT: break;
471 -// case NS_rtf::LN_LID: break;
472 -// case NS_rtf::LN_PNNEXT: break;
473 -// case NS_rtf::LN_FDOT: break;
474 -// case NS_rtf::LN_FGLSY: break;
475 -// case NS_rtf::LN_FCOMPLEX: break;
476 -// case NS_rtf::LN_FHASPIC: break;
477 -// case NS_rtf::LN_CQUICKSAVES: break;
478 -// case NS_rtf::LN_FENCRYPTED: break;
479 -// case NS_rtf::LN_FWHICHTBLSTM: break;
480 -// case NS_rtf::LN_FREADONLYRECOMMENDED: break;
481 -// case NS_rtf::LN_FWRITERESERVATION: break;
482 -// case NS_rtf::LN_FEXTCHAR: break;
483 -// case NS_rtf::LN_FLOADOVERRIDE: break;
484 -// case NS_rtf::LN_FFAREAST: break;
485 -// case NS_rtf::LN_FCRYPTO: break;
486 -// case NS_rtf::LN_NFIBBACK: break;
487 -// case NS_rtf::LN_LKEY: break;
488 -// case NS_rtf::LN_ENVR: break;
489 -// case NS_rtf::LN_FMAC: break;
490 -// case NS_rtf::LN_FEMPTYSPECIAL: break;
491 -// case NS_rtf::LN_FLOADOVERRIDEPAGE: break;
492 -// case NS_rtf::LN_FFUTURESAVEDUNDO: break;
493 -// case NS_rtf::LN_FWORD97SAVED: break;
494 -// case NS_rtf::LN_FSPARE0: break;
495 -// case NS_rtf::LN_CHSTABLES: break;
496 -// case NS_rtf::LN_FCMIN: break;
497 -// case NS_rtf::LN_FCMAC: break;
498 -// case NS_rtf::LN_CSW: break;
499 -// case NS_rtf::LN_WMAGICCREATED: break;
500 -// case NS_rtf::LN_WMAGICREVISED: break;
501 -// case NS_rtf::LN_WMAGICCREATEDPRIVATE: break;
502 -// case NS_rtf::LN_WMAGICREVISEDPRIVATE: break;
503 -// case NS_rtf::LN_PNFBPCHPFIRST_W6: break;
504 -// case NS_rtf::LN_PNCHPFIRST_W6: break;
505 -// case NS_rtf::LN_CPNBTECHP_W6: break;
506 -// case NS_rtf::LN_PNFBPPAPFIRST_W6: break;
507 -// case NS_rtf::LN_PNPAPFIRST_W6: break;
508 -// case NS_rtf::LN_CPNBTEPAP_W6: break;
509 -// case NS_rtf::LN_PNFBPLVCFIRST_W6: break;
510 -// case NS_rtf::LN_PNLVCFIRST_W6: break;
511 -// case NS_rtf::LN_CPNBTELVC_W6: break;
512 -// case NS_rtf::LN_LIDFE: break;
513 -// case NS_rtf::LN_CLW: break;
514 -// case NS_rtf::LN_CBMAC: break;
515 -// case NS_rtf::LN_LPRODUCTCREATED: break;
516 -// case NS_rtf::LN_LPRODUCTREVISED: break;
517 -// case NS_rtf::LN_CCPTEXT: break;
518 -// case NS_rtf::LN_CCPFTN: break;
519 -// case NS_rtf::LN_CCPHDD: break;
520 -// case NS_rtf::LN_CCPMCR: break;
521 -// case NS_rtf::LN_CCPATN: break;
522 -// case NS_rtf::LN_CCPEDN: break;
523 -// case NS_rtf::LN_CCPTXBX: break;
524 -// case NS_rtf::LN_CCPHDRTXBX: break;
525 -// case NS_rtf::LN_PNFBPCHPFIRST: break;
526 -// case NS_rtf::LN_PNCHPFIRST: break;
527 -// case NS_rtf::LN_CPNBTECHP: break;
528 -// case NS_rtf::LN_PNFBPPAPFIRST: break;
529 -// case NS_rtf::LN_PNPAPFIRST: break;
530 -// case NS_rtf::LN_CPNBTEPAP: break;
531 -// case NS_rtf::LN_PNFBPLVCFIRST: break;
532 -// case NS_rtf::LN_PNLVCFIRST: break;
533 -// case NS_rtf::LN_CPNBTELVC: break;
534 -// case NS_rtf::LN_FCISLANDFIRST: break;
535 -// case NS_rtf::LN_FCISLANDLIM: break;
536 -// case NS_rtf::LN_CFCLCB: break;
537 -// case NS_rtf::LN_FCSTSHFORIG: break;
538 -// case NS_rtf::LN_LCBSTSHFORIG: break;
539 -// case NS_rtf::LN_FCSTSHF: break;
540 -// case NS_rtf::LN_LCBSTSHF: break;
541 -// case NS_rtf::LN_FCPLCFFNDREF: break;
542 -// case NS_rtf::LN_LCBPLCFFNDREF: break;
543 -// case NS_rtf::LN_FCPLCFFNDTXT: break;
544 -// case NS_rtf::LN_LCBPLCFFNDTXT: break;
545 -// case NS_rtf::LN_FCPLCFANDREF: break;
546 -// case NS_rtf::LN_LCBPLCFANDREF: break;
547 -// case NS_rtf::LN_FCPLCFANDTXT: break;
548 -// case NS_rtf::LN_LCBPLCFANDTXT: break;
549 -// case NS_rtf::LN_FCPLCFSED: break;
550 -// case NS_rtf::LN_LCBPLCFSED: break;
551 -// case NS_rtf::LN_FCPLCFPAD: break;
552 -// case NS_rtf::LN_LCBPLCFPAD: break;
553 -// case NS_rtf::LN_FCPLCFPHE: break;
554 -// case NS_rtf::LN_LCBPLCFPHE: break;
555 -// case NS_rtf::LN_FCSTTBFGLSY: break;
556 -// case NS_rtf::LN_LCBSTTBFGLSY: break;
557 -// case NS_rtf::LN_FCPLCFGLSY: break;
558 -// case NS_rtf::LN_LCBPLCFGLSY: break;
559 -// case NS_rtf::LN_FCPLCFHDD: break;
560 -// case NS_rtf::LN_LCBPLCFHDD: break;
561 -// case NS_rtf::LN_FCPLCFBTECHPX: break;
562 -// case NS_rtf::LN_LCBPLCFBTECHPX: break;
563 -// case NS_rtf::LN_FCPLCFBTEPAPX: break;
564 -// case NS_rtf::LN_LCBPLCFBTEPAPX: break;
565 -// case NS_rtf::LN_FCPLCFSEA: break;
566 -// case NS_rtf::LN_LCBPLCFSEA: break;
567 -// case NS_rtf::LN_FCSTTBFFFN: break;
568 -// case NS_rtf::LN_LCBSTTBFFFN: break;
569 -// case NS_rtf::LN_FCPLCFFLDMOM: break;
570 -// case NS_rtf::LN_LCBPLCFFLDMOM: break;
571 -// case NS_rtf::LN_FCPLCFFLDHDR: break;
572 -// case NS_rtf::LN_LCBPLCFFLDHDR: break;
573 -// case NS_rtf::LN_FCPLCFFLDFTN: break;
574 -// case NS_rtf::LN_LCBPLCFFLDFTN: break;
575 -// case NS_rtf::LN_FCPLCFFLDATN: break;
576 -// case NS_rtf::LN_LCBPLCFFLDATN: break;
577 -// case NS_rtf::LN_FCPLCFFLDMCR: break;
578 -// case NS_rtf::LN_LCBPLCFFLDMCR: break;
579 -// case NS_rtf::LN_FCSTTBFBKMK: break;
580 -// case NS_rtf::LN_LCBSTTBFBKMK: break;
581 -// case NS_rtf::LN_FCPLCFBKF: break;
582 -// case NS_rtf::LN_LCBPLCFBKF: break;
583 -// case NS_rtf::LN_FCPLCFBKL: break;
584 -// case NS_rtf::LN_LCBPLCFBKL: break;
585 -// case NS_rtf::LN_FCCMDS: break;
586 -// case NS_rtf::LN_LCBCMDS: break;
587 -// case NS_rtf::LN_FCPLCMCR: break;
588 -// case NS_rtf::LN_LCBPLCMCR: break;
589 -// case NS_rtf::LN_FCSTTBFMCR: break;
590 -// case NS_rtf::LN_LCBSTTBFMCR: break;
591 -// case NS_rtf::LN_FCPRDRVR: break;
592 -// case NS_rtf::LN_LCBPRDRVR: break;
593 -// case NS_rtf::LN_FCPRENVPORT: break;
594 -// case NS_rtf::LN_LCBPRENVPORT: break;
595 -// case NS_rtf::LN_FCPRENVLAND: break;
596 -// case NS_rtf::LN_LCBPRENVLAND: break;
597 -// case NS_rtf::LN_FCWSS: break;
598 -// case NS_rtf::LN_LCBWSS: break;
599 -// case NS_rtf::LN_FCDOP: break;
600 -// case NS_rtf::LN_LCBDOP: break;
601 -// case NS_rtf::LN_FCSTTBFASSOC: break;
602 -// case NS_rtf::LN_LCBSTTBFASSOC: break;
603 -// case NS_rtf::LN_FCCLX: break;
604 -// case NS_rtf::LN_LCBCLX: break;
605 -// case NS_rtf::LN_FCPLCFPGDFTN: break;
606 -// case NS_rtf::LN_LCBPLCFPGDFTN: break;
607 -// case NS_rtf::LN_FCAUTOSAVESOURCE: break;
608 -// case NS_rtf::LN_LCBAUTOSAVESOURCE: break;
609 -// case NS_rtf::LN_FCGRPXSTATNOWNERS: break;
610 -// case NS_rtf::LN_LCBGRPXSTATNOWNERS: break;
611 -// case NS_rtf::LN_FCSTTBFATNBKMK: break;
612 -// case NS_rtf::LN_LCBSTTBFATNBKMK: break;
613 -// case NS_rtf::LN_FCPLCDOAMOM: break;
614 -// case NS_rtf::LN_LCBPLCDOAMOM: break;
615 -// case NS_rtf::LN_FCPLCDOAHDR: break;
616 -// case NS_rtf::LN_LCBPLCDOAHDR: break;
617 -// case NS_rtf::LN_FCPLCSPAMOM: break;
618 -// case NS_rtf::LN_LCBPLCSPAMOM: break;
619 -// case NS_rtf::LN_FCPLCSPAHDR: break;
620 -// case NS_rtf::LN_LCBPLCSPAHDR: break;
621 -// case NS_rtf::LN_FCPLCFATNBKF: break;
622 -// case NS_rtf::LN_LCBPLCFATNBKF: break;
623 -// case NS_rtf::LN_FCPLCFATNBKL: break;
624 -// case NS_rtf::LN_LCBPLCFATNBKL: break;
625 -// case NS_rtf::LN_FCPMS: break;
626 -// case NS_rtf::LN_LCBPMS: break;
627 -// case NS_rtf::LN_FCFORMFLDSTTBF: break;
628 -// case NS_rtf::LN_LCBFORMFLDSTTBF: break;
629 -// case NS_rtf::LN_FCPLCFENDREF: break;
630 -// case NS_rtf::LN_LCBPLCFENDREF: break;
631 -// case NS_rtf::LN_FCPLCFENDTXT: break;
632 -// case NS_rtf::LN_LCBPLCFENDTXT: break;
633 -// case NS_rtf::LN_FCPLCFFLDEDN: break;
634 -// case NS_rtf::LN_LCBPLCFFLDEDN: break;
635 -// case NS_rtf::LN_FCPLCFPGDEDN: break;
636 -// case NS_rtf::LN_LCBPLCFPGDEDN: break;
637 -// case NS_rtf::LN_FCDGGINFO: break;
638 -// case NS_rtf::LN_LCBDGGINFO: break;
639 -// case NS_rtf::LN_FCSTTBFRMARK: break;
640 -// case NS_rtf::LN_LCBSTTBFRMARK: break;
641 -// case NS_rtf::LN_FCSTTBFCAPTION: break;
642 -// case NS_rtf::LN_LCBSTTBFCAPTION: break;
643 -// case NS_rtf::LN_FCSTTBFAUTOCAPTION: break;
644 -// case NS_rtf::LN_LCBSTTBFAUTOCAPTION: break;
645 -// case NS_rtf::LN_FCPLCFWKB: break;
646 -// case NS_rtf::LN_LCBPLCFWKB: break;
647 -// case NS_rtf::LN_FCPLCFSPL: break;
648 -// case NS_rtf::LN_LCBPLCFSPL: break;
649 -// case NS_rtf::LN_FCPLCFTXBXTXT: break;
650 -// case NS_rtf::LN_LCBPLCFTXBXTXT: break;
651 -// case NS_rtf::LN_FCPLCFFLDTXBX: break;
652 -// case NS_rtf::LN_LCBPLCFFLDTXBX: break;
653 -// case NS_rtf::LN_FCPLCFHDRTXBXTXT: break;
654 -// case NS_rtf::LN_LCBPLCFHDRTXBXTXT: break;
655 -// case NS_rtf::LN_FCPLCFFLDHDRTXBX: break;
656 -// case NS_rtf::LN_LCBPLCFFLDHDRTXBX: break;
657 -// case NS_rtf::LN_FCSTWUSER: break;
658 -// case NS_rtf::LN_LCBSTWUSER: break;
659 -// case NS_rtf::LN_FCSTTBTTMBD: break;
660 -// case NS_rtf::LN_LCBSTTBTTMBD: break;
661 -// case NS_rtf::LN_FCUNUSED: break;
662 -// case NS_rtf::LN_LCBUNUSED: break;
663 -// case NS_rtf::LN_FCPGDMOTHER: break;
664 -// case NS_rtf::LN_LCBPGDMOTHER: break;
665 -// case NS_rtf::LN_FCBKDMOTHER: break;
666 -// case NS_rtf::LN_LCBBKDMOTHER: break;
667 -// case NS_rtf::LN_FCPGDFTN: break;
668 -// case NS_rtf::LN_LCBPGDFTN: break;
669 -// case NS_rtf::LN_FCBKDFTN: break;
670 -// case NS_rtf::LN_LCBBKDFTN: break;
671 -// case NS_rtf::LN_FCPGDEDN: break;
672 -// case NS_rtf::LN_LCBPGDEDN: break;
673 -// case NS_rtf::LN_FCBKDEDN: break;
674 -// case NS_rtf::LN_LCBBKDEDN: break;
675 -// case NS_rtf::LN_FCSTTBFINTLFLD: break;
676 -// case NS_rtf::LN_LCBSTTBFINTLFLD: break;
677 -// case NS_rtf::LN_FCROUTESLIP: break;
678 -// case NS_rtf::LN_LCBROUTESLIP: break;
679 -// case NS_rtf::LN_FCSTTBSAVEDBY: break;
680 -// case NS_rtf::LN_LCBSTTBSAVEDBY: break;
681 -// case NS_rtf::LN_FCSTTBFNM: break;
682 -// case NS_rtf::LN_LCBSTTBFNM: break;
683 -// case NS_rtf::LN_FCPLCFLST: break;
684 -// case NS_rtf::LN_LCBPLCFLST: break;
685 -// case NS_rtf::LN_FCPLFLFO: break;
686 -// case NS_rtf::LN_LCBPLFLFO: break;
687 -// case NS_rtf::LN_FCPLCFTXBXBKD: break;
688 -// case NS_rtf::LN_LCBPLCFTXBXBKD: break;
689 -// case NS_rtf::LN_FCPLCFTXBXHDRBKD: break;
690 -// case NS_rtf::LN_LCBPLCFTXBXHDRBKD: break;
691 -// case NS_rtf::LN_FCDOCUNDO: break;
692 -// case NS_rtf::LN_LCBDOCUNDO: break;
693 -// case NS_rtf::LN_FCRGBUSE: break;
694 -// case NS_rtf::LN_LCBRGBUSE: break;
695 -// case NS_rtf::LN_FCUSP: break;
696 -// case NS_rtf::LN_LCBUSP: break;
697 -// case NS_rtf::LN_FCUSKF: break;
698 -// case NS_rtf::LN_LCBUSKF: break;
699 -// case NS_rtf::LN_FCPLCUPCRGBUSE: break;
700 -// case NS_rtf::LN_LCBPLCUPCRGBUSE: break;
701 -// case NS_rtf::LN_FCPLCUPCUSP: break;
702 -// case NS_rtf::LN_LCBPLCUPCUSP: break;
703 -// case NS_rtf::LN_FCSTTBGLSYSTYLE: break;
704 -// case NS_rtf::LN_LCBSTTBGLSYSTYLE: break;
705 -// case NS_rtf::LN_FCPLGOSL: break;
706 -// case NS_rtf::LN_LCBPLGOSL: break;
707 -// case NS_rtf::LN_FCPLCOCX: break;
708 -// case NS_rtf::LN_LCBPLCOCX: break;
709 -// case NS_rtf::LN_FCPLCFBTELVC: break;
710 -// case NS_rtf::LN_LCBPLCFBTELVC: break;
711 -// case NS_rtf::LN_DWLOWDATETIME: break;
712 -// case NS_rtf::LN_DWHIGHDATETIME: break;
713 -// case NS_rtf::LN_FCPLCFLVC: break;
714 -// case NS_rtf::LN_LCBPLCFLVC: break;
715 -// case NS_rtf::LN_FCPLCASUMY: break;
716 -// case NS_rtf::LN_LCBPLCASUMY: break;
717 -// case NS_rtf::LN_FCPLCFGRAM: break;
718 -// case NS_rtf::LN_LCBPLCFGRAM: break;
719 -// case NS_rtf::LN_FCSTTBLISTNAMES: break;
720 -// case NS_rtf::LN_LCBSTTBLISTNAMES: break;
721 -// case NS_rtf::LN_FCSTTBFUSSR: break;
722 -// case NS_rtf::LN_LCBSTTBFUSSR: break;
723 -// case NS_rtf::LN_FN: break;
724 -// case NS_rtf::LN_FCSEPX: break;
725 -// case NS_rtf::LN_FNMPR: break;
726 -// case NS_rtf::LN_FCMPR: break;
727 -// case NS_rtf::LN_ICOFORE: break;
728 -// case NS_rtf::LN_ICOBACK: break;
729 -// case NS_rtf::LN_IPAT: break;
730 -// case NS_rtf::LN_SHDFORECOLOR: break;
731 -// case NS_rtf::LN_SHDBACKCOLOR: break;
732 -// case NS_rtf::LN_SHDPATTERN: break;
733 -// case NS_rtf::LN_DPTLINEWIDTH: break;
734 -// case NS_rtf::LN_BRCTYPE: break;
735 -// case NS_rtf::LN_ICO: break;
736 -// case NS_rtf::LN_DPTSPACE: break;
737 -// case NS_rtf::LN_FSHADOW: break;
738 -// case NS_rtf::LN_FFRAME: break;
739 -// case NS_rtf::LN_UNUSED2_15: break;
740 -// case NS_rtf::LN_FFIRSTMERGED: break;
741 -// case NS_rtf::LN_FMERGED: break;
742 -// case NS_rtf::LN_FVERTICAL: break;
743 -// case NS_rtf::LN_FBACKWARD: break;
744 -// case NS_rtf::LN_FROTATEFONT: break;
745 -// case NS_rtf::LN_FVERTMERGE: break;
746 -// case NS_rtf::LN_FVERTRESTART: break;
747 -// case NS_rtf::LN_VERTALIGN: break;
748 -// case NS_rtf::LN_FUNUSED: break;
749 -// case NS_rtf::LN_WUNUSED: break;
750 -// case NS_rtf::LN_BRCTOP: break;
751 -// case NS_rtf::LN_BRCLEFT: break;
752 -// case NS_rtf::LN_BRCBOTTOM: break;
753 -// case NS_rtf::LN_BRCRIGHT: break;
754 -// case NS_rtf::LN_IBKL: break;
755 -// case NS_rtf::LN_ITCFIRST: break;
756 -// case NS_rtf::LN_FPUB: break;
757 -// case NS_rtf::LN_ITCLIM: break;
758 -// case NS_rtf::LN_FCOL: break;
759 -// case NS_rtf::LN_LINECOLOR: break;
760 -// case NS_rtf::LN_LINEWIDTH: break;
761 -// case NS_rtf::LN_LINETYPE: break;
762 -// case NS_rtf::LN_MM: break;
763 -// case NS_rtf::LN_XEXT: break;
764 -// case NS_rtf::LN_YEXT: break;
765 -// case NS_rtf::LN_HMF: break;
766 -// case NS_rtf::LN_LCB: break;
767 -// case NS_rtf::LN_CBHEADER: break;
768 -// case NS_rtf::LN_MFP: break;
769 -// case NS_rtf::LN_BM_RCWINMF: break;
770 -// case NS_rtf::LN_DXAGOAL: break;
771 -// case NS_rtf::LN_DYAGOAL: break;
772 -// case NS_rtf::LN_MX: break;
773 -// case NS_rtf::LN_MY: break;
774 -// case NS_rtf::LN_DXACROPLEFT: break;
775 -// case NS_rtf::LN_DYACROPTOP: break;
776 -// case NS_rtf::LN_DXACROPRIGHT: break;
777 -// case NS_rtf::LN_DYACROPBOTTOM: break;
778 -// case NS_rtf::LN_BRCL: break;
779 -// case NS_rtf::LN_FFRAMEEMPTY: break;
780 -// case NS_rtf::LN_FBITMAP: break;
781 -// case NS_rtf::LN_FDRAWHATCH: break;
782 -// case NS_rtf::LN_FERROR: break;
783 -// case NS_rtf::LN_BPP: break;
784 -// case NS_rtf::LN_DXAORIGIN: break;
785 -// case NS_rtf::LN_DYAORIGIN: break;
786 -// case NS_rtf::LN_CPROPS: break;
787 -// case NS_rtf::LN_LINEPROPSTOP: break;
788 -// case NS_rtf::LN_LINEPROPSLEFT: break;
789 -// case NS_rtf::LN_LINEPROPSBOTTOM: break;
790 -// case NS_rtf::LN_LINEPROPSRIGHT: break;
791 -// case NS_rtf::LN_LINEPROPSHORIZONTAL: break;
792 -// case NS_rtf::LN_LINEPROPSVERTICAL: break;
793 -// case NS_rtf::LN_headerr: break;
794 -// case NS_rtf::LN_footerr: break;
795 -// case NS_rtf::LN_endnote: break;
796 -// case NS_rtf::LN_BOOKMARKNAME: break;
798 -// case NS_rtf::LN_LISTLEVEL: break;
799 - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
800 - case NS_rtf::LN_LFO:
802 - writerfilter::Reference<Properties>::Pointer_t pProperties;
803 - if(m_pImpl->m_pCurrentEntry && (pProperties = val.getProperties()).get())
805 - LFOLevelPtr pLevel( new LFOLevel );
806 - m_pImpl->m_pCurrentEntry->aLFOLevels.push_back(pLevel);
809 - break;
810 -// case NS_rtf::LN_F: break;
811 -// case NS_rtf::LN_ALTFONTNAME: break;
812 -// case NS_rtf::LN_XSZFFN: break;
813 -// case NS_rtf::LN_XSTZNAME: break;
814 -// case NS_rtf::LN_XSTZNAME1: break;
815 -// case NS_rtf::LN_UPXSTART: break;
816 -// case NS_rtf::LN_UPX: break;
817 -// case NS_rtf::LN_sed: break;
818 -// case NS_rtf::LN_picf: break;
819 -// case NS_rtf::LN_rgbrc: break;
820 -// case NS_rtf::LN_shd: break;
821 -// case NS_rtf::LN_cellShd: break;
822 -// case NS_rtf::LN_cellTopColor: break;
823 -// case NS_rtf::LN_cellLeftColor: break;
824 -// case NS_rtf::LN_cellBottomColor: break;
825 -// case NS_rtf::LN_cellRightColor: break;
827 -// case NS_rtf::LN_LISTTABLE: break;
828 -// case NS_rtf::LN_LFOTABLE: break;
829 -// case NS_rtf::LN_FONTTABLE: break;
830 -// case NS_rtf::LN_STYLESHEET: break;
831 - default:
833 - OSL_ENSURE( false, "LFOTable::attribute: default statement");
834 - //---->debug
835 - int nVal = val.getInt();
836 - ++nVal;
837 - //<----debug
841 -/*-- 27.06.2006 15:13:04---------------------------------------------------
843 - -----------------------------------------------------------------------*/
844 -void LFOTable::sprm(Sprm& )
846 - OSL_ENSURE( false, "Which sprm should be handled here?");
848 -/*-- 27.06.2006 15:13:04---------------------------------------------------
850 - -----------------------------------------------------------------------*/
851 -void LFOTable::entry(int, writerfilter::Reference<Properties>::Pointer_t ref)
853 - //create a new LFO entry
854 - OSL_ENSURE( !m_pImpl->m_pCurrentEntry.get(), "current entry has to be NULL here");
855 - m_pImpl->m_pCurrentEntry.reset( new LFOEntry );
856 - ref->resolve(*this);
857 - //append it to the table
858 - m_pImpl->m_aLFOEntries.push_back( m_pImpl->m_pCurrentEntry );
859 - m_pImpl->m_pCurrentEntry = LFOEntryPtr();
861 -/*-- 27.06.2006 15:13:05---------------------------------------------------
862 - 1 based access to the LFO table
863 - -----------------------------------------------------------------------*/
864 -sal_Int32 LFOTable::GetListID(sal_uInt32 nLFO)
866 - sal_Int32 nRet = -1;
867 - if( nLFO > 0 && nLFO <= m_pImpl->m_aLFOEntries.size())
868 - nRet = m_pImpl->m_aLFOEntries[nLFO - 1]->nListId;
869 - return nRet;
871 -/*-- 12.11.2007 10:31:23---------------------------------------------------
873 - -----------------------------------------------------------------------*/
874 -void LFOTable::AddListID( sal_Int32 nAbstractNumId )
876 - LFOEntryPtr pNew( new LFOEntry );
877 - pNew->nListId = nAbstractNumId;
878 - m_pImpl->m_aLFOEntries.push_back( pNew );
881 -}//namespace dmapper
882 -}//namespace writerfilter
883 diff --git writerfilter/source/dmapper/LFOTable.hxx writerfilter/source/dmapper/LFOTable.hxx
884 deleted file mode 100644
885 index 856f033..0000000
886 --- writerfilter/source/dmapper/LFOTable.hxx
887 +++ /dev/null
888 @@ -1,68 +0,0 @@
889 -/*************************************************************************
891 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
892 - *
893 - * Copyright 2008 by Sun Microsystems, Inc.
895 - * OpenOffice.org - a multi-platform office productivity suite
897 - * $RCSfile: LFOTable.hxx,v $
898 - * $Revision: 1.4 $
900 - * This file is part of OpenOffice.org.
902 - * OpenOffice.org is free software: you can redistribute it and/or modify
903 - * it under the terms of the GNU Lesser General Public License version 3
904 - * only, as published by the Free Software Foundation.
906 - * OpenOffice.org is distributed in the hope that it will be useful,
907 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
908 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
909 - * GNU Lesser General Public License version 3 for more details
910 - * (a copy is included in the LICENSE file that accompanied this code).
912 - * You should have received a copy of the GNU Lesser General Public License
913 - * version 3 along with OpenOffice.org. If not, see
914 - * <http://www.openoffice.org/license.html>
915 - * for a copy of the LGPLv3 License.
917 - ************************************************************************/
918 -#ifndef INCLUDED_LFOTABLE_HXX
919 -#define INCLUDED_LFOTABLE_HXX
921 -#include <WriterFilterDllApi.hxx>
922 -#include <resourcemodel/WW8ResourceModel.hxx>
923 -#include <com/sun/star/lang/XComponent.hpp>
924 -//#ifndef INCLUDED_DMAPPER_PROPERTYMAP_HXX
925 -//#include <PropertyMap.hxx>
926 -//#endif
927 -//#include <vector>
929 -namespace writerfilter {
930 -namespace dmapper
933 -struct LFOTable_Impl;
934 -class WRITERFILTER_DLLPRIVATE LFOTable : public Properties, public Table
936 - LFOTable_Impl *m_pImpl;
937 -public:
938 - LFOTable();
939 - virtual ~LFOTable();
941 - // Properties
942 - virtual void attribute(Id Name, Value & val);
943 - virtual void sprm(Sprm & sprm);
945 - // Table
946 - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref);
948 -// sal_uInt32 size();
949 - sal_Int32 GetListID(sal_uInt32 nLFO);
950 - //direct access in ooxml import
951 - void AddListID( sal_Int32 nAbstractNumId );
953 -typedef boost::shared_ptr< LFOTable > LFOTablePtr;
956 -#endif //
957 diff --git writerfilter/source/dmapper/ListTable.cxx writerfilter/source/dmapper/ListTable.cxx
958 deleted file mode 100644
959 index 3cee1f8..0000000
960 --- writerfilter/source/dmapper/ListTable.cxx
961 +++ /dev/null
962 @@ -1,1303 +0,0 @@
963 -/*************************************************************************
965 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
966 - *
967 - * Copyright 2008 by Sun Microsystems, Inc.
969 - * OpenOffice.org - a multi-platform office productivity suite
971 - * $RCSfile: ListTable.cxx,v $
972 - * $Revision: 1.8 $
974 - * This file is part of OpenOffice.org.
976 - * OpenOffice.org is free software: you can redistribute it and/or modify
977 - * it under the terms of the GNU Lesser General Public License version 3
978 - * only, as published by the Free Software Foundation.
980 - * OpenOffice.org is distributed in the hope that it will be useful,
981 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
982 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
983 - * GNU Lesser General Public License version 3 for more details
984 - * (a copy is included in the LICENSE file that accompanied this code).
986 - * You should have received a copy of the GNU Lesser General Public License
987 - * version 3 along with OpenOffice.org. If not, see
988 - * <http://www.openoffice.org/license.html>
989 - * for a copy of the LGPLv3 License.
991 - ************************************************************************/
992 -#include <ListTable.hxx>
993 -#include <dmapper/DomainMapper.hxx>
994 -#include <PropertyIds.hxx>
995 -#include <doctok/resourceids.hxx>
996 -#include <doctok/sprmids.hxx>
997 -#include <ooxml/resourceids.hxx>
998 -#include <ConversionHelper.hxx>
999 -#ifndef INCLUDED_WW8_RESOURCE_MODEL_HXX
1000 -#include <resourcemodel/WW8ResourceModel.hxx>
1001 -#endif
1002 -#include <com/sun/star/container/XIndexReplace.hpp>
1003 -#include <com/sun/star/container/XNameContainer.hpp>
1004 -#include <com/sun/star/lang/XMultiServiceFactory.hpp>
1005 -#include <com/sun/star/style/NumberingType.hpp>
1006 -#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
1007 -#include <com/sun/star/text/HoriOrientation.hpp>
1008 -#include <com/sun/star/text/PositionAndSpaceMode.hpp>
1009 -#include <vector>
1011 -#define NUMBERING_MAX_LEVELS 10
1012 -namespace writerfilter {
1013 -namespace dmapper
1015 -using namespace com::sun::star;
1016 -/*-- 12.11.2007 11:38:57---------------------------------------------------
1018 - -----------------------------------------------------------------------*/
1019 -class WRITERFILTER_DLLPRIVATE Numbering_numHdl : public Properties
1021 - ListTable& m_rListTable;
1022 - sal_Int32 m_nAbstractNumId;
1023 - ::rtl::OUString m_sNumId;
1024 -public:
1025 - Numbering_numHdl( ListTable& rListTable ) :
1026 - m_rListTable( rListTable ),
1027 - m_nAbstractNumId( -1 )
1028 - {}
1029 - virtual ~Numbering_numHdl();
1031 - // Properties
1032 - virtual void attribute(Id Name, Value & val);
1033 - virtual void sprm(Sprm & sprm);
1035 - sal_Int32 GetAbstractNumId() const { return m_nAbstractNumId;}
1036 - sal_Int32 GetNumId() const { return m_sNumId.toInt32(); }
1039 -typedef boost::shared_ptr< Numbering_numHdl > Numbering_numHdlPtr;
1040 -/*-- 12.11.2007 11:42:04---------------------------------------------------
1042 - -----------------------------------------------------------------------*/
1043 -Numbering_numHdl::~Numbering_numHdl()
1046 -/*-- 12.11.2007 11:42:22---------------------------------------------------
1048 - -----------------------------------------------------------------------*/
1049 -void Numbering_numHdl::attribute(Id nName, Value & rVal)
1051 - switch( nName )
1053 - case NS_ooxml::LN_CT_Num_numId:
1054 - m_sNumId = rVal.getString();
1055 - break;
1056 - case NS_ooxml::LN_CT_NumLvl_ilvl :
1057 - m_rListTable.setOverwriteLevel(m_nAbstractNumId, rVal.getInt());
1058 - break;
1059 - default:;
1062 -/*-- 12.11.2007 11:42:22---------------------------------------------------
1064 - -----------------------------------------------------------------------*/
1065 -void Numbering_numHdl::sprm(Sprm & rSprm)
1067 - sal_uInt32 nSprmId = rSprm.getId();
1068 - switch( nSprmId )
1070 - case NS_ooxml::LN_CT_Num_abstractNumId:
1072 - m_nAbstractNumId = rSprm.getValue()->getInt();
1074 - break;
1075 - case NS_ooxml::LN_CT_Num_lvlOverride:
1077 - //contains a list override
1078 - writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
1079 - if(pProperties.get())
1080 - pProperties->resolve(*this);
1081 - m_rListTable.resetOverwrite();
1083 - case NS_ooxml::LN_CT_NumLvl_lvl:
1084 - m_rListTable.sprm( rSprm );
1085 - break;
1086 - default:;
1089 -/*-- 26.06.2006 13:14:29---------------------------------------------------
1091 - -----------------------------------------------------------------------*/
1092 -class ListPropertyMap : public PropertyMap
1094 - friend class ListTable;
1096 - sal_Int32 nIStartAt; //LN_ISTARTAT
1097 - sal_Int32 nNFC; //LN_NFC
1098 - sal_Int32 nJC; //LN_JC
1099 - sal_Int32 nFLegal; //LN_FLEGAL
1100 - sal_Int32 nFNoRestart; //LN_FNORESTART
1101 - sal_Int32 nFPrev; //LN_FPREV
1102 - sal_Int32 nFPrevSpace; //LN_FPREVSPACE
1103 - sal_Int32 nFWord6; //LN_FWORD6
1104 - ::rtl::OUString sRGBXchNums; //LN_RGBXCHNUMS
1105 - sal_Int32 nXChFollow; //LN_IXCHFOLLOW
1106 - ::rtl::OUString sBulletChar;
1107 - sal_Int32 nTabstop;
1108 -public:
1109 - ListPropertyMap() :
1110 - nIStartAt(-1)
1111 - ,nNFC(-1)
1112 - ,nJC(-1)
1113 - ,nFLegal(-1)
1114 - ,nFNoRestart(-1)
1115 - ,nFPrev(-1)
1116 - ,nFPrevSpace(-1)
1117 - ,nFWord6(-1)
1118 - ,nXChFollow(-1)
1119 - ,nTabstop( 0 )
1120 - {}
1121 - ~ListPropertyMap(){}
1123 - uno::Sequence< beans::PropertyValue > GetPropertyValuesList( PropertyValueVector_t& rCharStyleProperties );
1125 -/*-- 26.06.2006 13:44:57---------------------------------------------------
1127 - -----------------------------------------------------------------------*/
1128 -#define MAKE_PROPVAL(NameId, Value) \
1129 - beans::PropertyValue(aPropNameSupplier.GetName(NameId), 0, uno::makeAny(Value), beans::PropertyState_DIRECT_VALUE )
1131 -uno::Sequence< beans::PropertyValue > ListPropertyMap::GetPropertyValuesList( PropertyValueVector_t& rCharStyleProperties )
1133 - const sal_Int16 aWWToUnoAdjust[] =
1135 - text::HoriOrientation::LEFT,
1136 - text::HoriOrientation::CENTER,
1137 - text::HoriOrientation::RIGHT,
1138 - };
1140 - PropertyNameSupplier& aPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
1141 - PropertyValueVector_t aNumberingProperties;
1143 - if( nIStartAt >= 0)
1144 - aNumberingProperties.push_back( MAKE_PROPVAL(PROP_START_WITH, (sal_Int16)nIStartAt) );
1146 - sal_Int16 nNumberFormat = ConversionHelper::ConvertNumberingType(nNFC);
1147 - if( nNFC >= 0)
1148 - aNumberingProperties.push_back( MAKE_PROPVAL(PROP_NUMBERING_TYPE, nNumberFormat ));
1150 - if( nJC >= 0 && nJC <= sal::static_int_cast<sal_Int32>(sizeof(aWWToUnoAdjust) / sizeof(sal_Int16)) )
1151 - aNumberingProperties.push_back( MAKE_PROPVAL(PROP_ADJUST, aWWToUnoAdjust[nJC]));
1153 - // todo: this is not the bullet char
1154 - if( nNumberFormat == style::NumberingType::CHAR_SPECIAL && sBulletChar.getLength() )
1155 - aNumberingProperties.push_back( MAKE_PROPVAL(PROP_BULLET_CHAR, sBulletChar.copy(0,1)));
1157 - aNumberingProperties.push_back( MAKE_PROPVAL( PROP_LISTTAB_STOP_POSITION, nTabstop ) );
1159 - //TODO: handling of nFLegal?
1160 - //TODO: nFNoRestart lower levels do not restart when higher levels are incremented, like:
1161 - //1.
1162 - //1.1
1163 - //2.2
1164 - //2.3
1165 - //3.4
1166 - //
1168 - if( nFWord6 > 0) //Word 6 compatibility
1170 - if( nFPrev == 1)
1171 - aNumberingProperties.push_back( MAKE_PROPVAL( PROP_PARENT_NUMBERING, (sal_Int16) NUMBERING_MAX_LEVELS ));
1172 - //TODO: prefixing space nFPrevSpace; - has not been used in WW8 filter
1175 -// TODO: sRGBXchNums; array of inherited numbers
1177 -// TODO: nXChFollow; following character 0 - tab, 1 - space, 2 - nothing
1178 -// if(pProperties)
1179 -// {
1181 - _PropertyMap::const_iterator aMapIter = /*pProperties->*/begin();
1182 - _PropertyMap::const_iterator aEndIter = /*pProperties->*/end();
1183 - for( ; aMapIter != aEndIter; ++aMapIter )
1185 - switch( aMapIter->first.eId )
1187 - case PROP_ADJUST:
1188 - case PROP_INDENT_AT:
1189 - case PROP_FIRST_LINE_INDENT:
1190 - case PROP_FIRST_LINE_OFFSET:
1191 - case PROP_LEFT_MARGIN:
1192 - aNumberingProperties.push_back(
1193 - beans::PropertyValue( aPropNameSupplier.GetName( aMapIter->first.eId ), 0, aMapIter->second, beans::PropertyState_DIRECT_VALUE ));
1194 - break;
1195 - case PROP_CHAR_FONT_NAME:
1196 - aNumberingProperties.push_back(
1197 - beans::PropertyValue( aPropNameSupplier.GetName( PROP_BULLET_FONT_NAME ), 0, aMapIter->second, beans::PropertyState_DIRECT_VALUE ));
1198 - break;
1199 - default:
1201 - rCharStyleProperties.push_back(beans::PropertyValue( aPropNameSupplier.GetName( aMapIter->first.eId ), 0, aMapIter->second, beans::PropertyState_DIRECT_VALUE ));
1206 -// }
1207 - uno::Sequence< beans::PropertyValue > aRet(aNumberingProperties.size());
1208 - beans::PropertyValue* pValues = aRet.getArray();
1209 - PropertyValueVector_t::const_iterator aIt = aNumberingProperties.begin();
1210 - PropertyValueVector_t::const_iterator aEndIt = aNumberingProperties.end();
1211 - for(sal_uInt32 nIndex = 0; aIt != aEndIt; ++aIt,++nIndex)
1213 - pValues[nIndex] = *aIt;
1215 - return aRet;
1217 -typedef boost::shared_ptr<ListPropertyMap> ListPropertyMapPtr;
1219 -struct ListEntry
1221 - sal_Int32 nListId; //LN_LSID
1222 - sal_Int32 nTPLC; //LN_TPLC
1223 - ::rtl::OUString sRGISTD; //LN_RGISTD
1224 - sal_Int32 nSimpleList; //LN_FSIMPLELIST
1225 - sal_Int32 nRestart; //LN_FRESTARTHDN
1226 - sal_Int32 nUnsigned; //LN_UNSIGNED26_2
1227 - sal_Int32 nAbstractNumId;
1229 - ::std::vector< ListPropertyMapPtr > aLevelProperties; //properties of each level
1231 - ListPropertyMapPtr pCurrentProperties;
1232 - uno::Reference< container::XIndexReplace > m_xNumRules;
1234 - ListEntry();
1237 -typedef boost::shared_ptr<ListEntry> ListEntryPtr;
1238 -/*-- 23.06.2006 13:58:51---------------------------------------------------
1240 - -----------------------------------------------------------------------*/
1241 -ListEntry::ListEntry() :
1242 - nListId(-1)
1243 - ,nTPLC(-1)
1244 - ,nSimpleList(-1)
1245 - ,nRestart(-1)
1246 - ,nUnsigned(-1)
1247 - ,nAbstractNumId(-1)
1250 -/*-- 23.06.2006 13:58:51---------------------------------------------------
1252 - -----------------------------------------------------------------------*/
1253 -struct ListTable_Impl
1255 - DomainMapper& m_rDMapper;
1256 - uno::Reference< lang::XMultiServiceFactory > m_xFactory;
1258 - std::vector< ListEntryPtr > m_aListEntries;
1259 - ListEntryPtr m_pCurrentEntry;
1262 - ListTable_Impl(DomainMapper& rDMapper, uno::Reference< lang::XMultiServiceFactory > xFactory) :
1263 - m_rDMapper( rDMapper )
1264 - ,m_xFactory( xFactory )
1265 - {}
1267 - void AddLevel();
1269 -/*-- 26.06.2006 14:23:19---------------------------------------------------
1271 - -----------------------------------------------------------------------*/
1272 -void ListTable_Impl::AddLevel()
1274 - ListPropertyMapPtr pLevel( new ListPropertyMap );
1275 - m_pCurrentEntry->pCurrentProperties = pLevel;
1276 - m_pCurrentEntry->aLevelProperties.push_back(pLevel);
1278 -/*-- 23.06.2006 12:04:32---------------------------------------------------
1280 - -----------------------------------------------------------------------*/
1281 -ListTable::ListTable(
1282 - DomainMapper& rDMapper,
1283 - const uno::Reference< lang::XMultiServiceFactory > xFactory) :
1284 - m_pImpl( new ListTable_Impl(rDMapper, xFactory) ),
1285 - m_nOverwriteListId( -1 ),
1286 - m_nOverwriteLevel( -1 )
1289 -/*-- 23.06.2006 12:04:33---------------------------------------------------
1291 - -----------------------------------------------------------------------*/
1292 -ListTable::~ListTable()
1294 - delete m_pImpl;
1296 -/*-- 23.06.2006 12:04:33---------------------------------------------------
1298 - -----------------------------------------------------------------------*/
1299 -void ListTable::attribute(Id nName, Value & rVal)
1301 - OSL_ENSURE( m_pImpl->m_pCurrentEntry.get(), "current entry has to be set here");
1302 - if(!m_pImpl->m_pCurrentEntry.get())
1303 - return ;
1304 - int nIntValue = rVal.getInt();
1305 - /* WRITERFILTERSTATUS: table: ListTable_attributedata */
1306 - switch(nName)
1308 - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
1309 - case NS_rtf::LN_RGBXCHNUMS:
1310 - if(m_pImpl->m_pCurrentEntry->pCurrentProperties.get())
1311 - m_pImpl->m_pCurrentEntry->pCurrentProperties->sRGBXchNums += rVal.getString();
1312 - break;
1313 - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
1314 - case NS_ooxml::LN_CT_LevelText_val:
1315 - {
1316 - //this strings contains the definition of the level
1317 - //the level number is marked as %n
1318 - //these numbers can be mixed randomly toghether with seperators pre- and suffixes
1319 - //the Writer supports only a number of upper levels to show, separators is always a dot
1320 - //and each level can have a prefix and a suffix
1321 - if(m_pImpl->m_pCurrentEntry->pCurrentProperties.get())
1323 - m_pImpl->m_pCurrentEntry->pCurrentProperties->sBulletChar = rVal.getString();
1326 - break;
1327 -// case NS_rtf::LN_ISTD: break;
1328 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1329 - case NS_rtf::LN_ISTARTAT:
1330 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1331 - case NS_rtf::LN_NFC:
1332 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1333 - case NS_rtf::LN_JC:
1334 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1335 - case NS_rtf::LN_FLEGAL:
1336 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1337 - case NS_rtf::LN_FNORESTART:
1338 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1339 - case NS_rtf::LN_FPREV:
1340 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1341 - case NS_rtf::LN_FPREVSPACE:
1342 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1343 - case NS_rtf::LN_FWORD6:
1344 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1345 - case NS_rtf::LN_IXCHFOLLOW:
1346 - ApplyLevelValues( nName, nIntValue);
1347 - break;
1348 - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
1349 - case NS_rtf::LN_UNUSED5_7:
1350 - //unused
1351 - break;
1352 -// case NS_rtf::LN_DXASPACE: break;
1353 -// case NS_rtf::LN_DXAINDENT: break;
1354 -// case NS_rtf::LN_CBGRPPRLCHPX: break;
1355 -// case NS_rtf::LN_CBGRPPRLPAPX: break;
1356 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1357 - case NS_rtf::LN_LSID:
1358 - m_pImpl->m_pCurrentEntry->nListId = nIntValue;
1359 - break;
1360 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1361 - case NS_rtf::LN_TPLC:
1362 - m_pImpl->m_pCurrentEntry->nTPLC = nIntValue;
1363 - break;
1364 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1365 - case NS_rtf::LN_RGISTD:
1366 - m_pImpl->m_pCurrentEntry->sRGISTD += rVal.getString();
1367 - break;
1368 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1369 - case NS_rtf::LN_FSIMPLELIST:
1370 - m_pImpl->m_pCurrentEntry->nSimpleList = nIntValue;
1371 - break;
1372 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1373 - case NS_rtf::LN_FRESTARTHDN:
1374 - m_pImpl->m_pCurrentEntry->nRestart = nIntValue;
1375 - break;
1376 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1377 - case NS_rtf::LN_UNSIGNED26_2:
1378 - m_pImpl->m_pCurrentEntry->nUnsigned = nIntValue;
1379 - break;
1380 -// case NS_rtf::LN_ILVL: break;
1381 -// case NS_rtf::LN_FSTARTAT: break;
1382 -// case NS_rtf::LN_FFORMATTING: break;
1383 -// case NS_rtf::LN_UNSIGNED4_6: break;
1384 -// case NS_rtf::LN_UNUSED4: break;
1385 -// case NS_rtf::LN_UNUSED8: break;
1386 -// case NS_rtf::LN_CLFOLVL: break;
1387 -// case NS_rtf::LN_CBFFNM1: break;
1388 -// case NS_rtf::LN_PRQ: break;
1389 -// case NS_rtf::LN_FTRUETYPE: break;
1390 -// case NS_rtf::LN_UNUSED1_3: break;
1391 -// case NS_rtf::LN_FF: break;
1392 -// case NS_rtf::LN_UNUSED1_7: break;
1393 -// case NS_rtf::LN_WWEIGHT: break;
1394 -// case NS_rtf::LN_CHS: break;
1395 -// case NS_rtf::LN_IXCHSZALT: break;
1396 -// case NS_rtf::LN_PANOSE: break;
1397 -// case NS_rtf::LN_FS: break;
1398 -// case NS_rtf::LN_STI: break;
1399 -// case NS_rtf::LN_FSCRATCH: break;
1400 -// case NS_rtf::LN_FINVALHEIGHT: break;
1401 -// case NS_rtf::LN_FHASUPE: break;
1402 -// case NS_rtf::LN_FMASSCOPY: break;
1403 -// case NS_rtf::LN_SGC: break;
1404 -// case NS_rtf::LN_ISTDBASE: break;
1405 -// case NS_rtf::LN_CUPX: break;
1406 -// case NS_rtf::LN_ISTDNEXT: break;
1407 -// case NS_rtf::LN_BCHUPE: break;
1408 -// case NS_rtf::LN_FAUTOREDEF: break;
1409 -// case NS_rtf::LN_FHIDDEN: break;
1410 -// case NS_rtf::LN_UNUSED8_3: break;
1411 -// case NS_rtf::LN_CSTD: break;
1412 -// case NS_rtf::LN_CBSTDBASEINFILE: break;
1413 -// case NS_rtf::LN_FSTDSTYLENAMESWRITTEN: break;
1414 -// case NS_rtf::LN_UNUSED4_2: break;
1415 -// case NS_rtf::LN_STIMAXWHENSAVED: break;
1416 -// case NS_rtf::LN_ISTDMAXFIXEDWHENSAVED: break;
1417 -// case NS_rtf::LN_NVERBUILTINNAMESWHENSAVED: break;
1418 -// case NS_rtf::LN_RGFTCSTANDARDCHPSTSH: break;
1419 -// case NS_rtf::LN_WIDENT: break;
1420 -// case NS_rtf::LN_NFIB: break;
1421 -// case NS_rtf::LN_NPRODUCT: break;
1422 -// case NS_rtf::LN_LID: break;
1423 -// case NS_rtf::LN_PNNEXT: break;
1424 -// case NS_rtf::LN_FDOT: break;
1425 -// case NS_rtf::LN_FGLSY: break;
1426 -// case NS_rtf::LN_FCOMPLEX: break;
1427 -// case NS_rtf::LN_FHASPIC: break;
1428 -// case NS_rtf::LN_CQUICKSAVES: break;
1429 -// case NS_rtf::LN_FENCRYPTED: break;
1430 -// case NS_rtf::LN_FWHICHTBLSTM: break;
1431 -// case NS_rtf::LN_FREADONLYRECOMMENDED: break;
1432 -// case NS_rtf::LN_FWRITERESERVATION: break;
1433 -// case NS_rtf::LN_FEXTCHAR: break;
1434 -// case NS_rtf::LN_FLOADOVERRIDE: break;
1435 -// case NS_rtf::LN_FFAREAST: break;
1436 -// case NS_rtf::LN_FCRYPTO: break;
1437 -// case NS_rtf::LN_NFIBBACK: break;
1438 -// case NS_rtf::LN_LKEY: break;
1439 -// case NS_rtf::LN_ENVR: break;
1440 -// case NS_rtf::LN_FMAC: break;
1441 -// case NS_rtf::LN_FEMPTYSPECIAL: break;
1442 -// case NS_rtf::LN_FLOADOVERRIDEPAGE: break;
1443 -// case NS_rtf::LN_FFUTURESAVEDUNDO: break;
1444 -// case NS_rtf::LN_FWORD97SAVED: break;
1445 -// case NS_rtf::LN_FSPARE0: break;
1446 -// case NS_rtf::LN_CHSTABLES: break;
1447 -// case NS_rtf::LN_FCMIN: break;
1448 -// case NS_rtf::LN_FCMAC: break;
1449 -// case NS_rtf::LN_CSW: break;
1450 -// case NS_rtf::LN_WMAGICCREATED: break;
1451 -// case NS_rtf::LN_WMAGICREVISED: break;
1452 -// case NS_rtf::LN_WMAGICCREATEDPRIVATE: break;
1453 -// case NS_rtf::LN_WMAGICREVISEDPRIVATE: break;
1454 -// case NS_rtf::LN_PNFBPCHPFIRST_W6: break;
1455 -// case NS_rtf::LN_PNCHPFIRST_W6: break;
1456 -// case NS_rtf::LN_CPNBTECHP_W6: break;
1457 -// case NS_rtf::LN_PNFBPPAPFIRST_W6: break;
1458 -// case NS_rtf::LN_PNPAPFIRST_W6: break;
1459 -// case NS_rtf::LN_CPNBTEPAP_W6: break;
1460 -// case NS_rtf::LN_PNFBPLVCFIRST_W6: break;
1461 -// case NS_rtf::LN_PNLVCFIRST_W6: break;
1462 -// case NS_rtf::LN_CPNBTELVC_W6: break;
1463 -// case NS_rtf::LN_LIDFE: break;
1464 -// case NS_rtf::LN_CLW: break;
1465 -// case NS_rtf::LN_CBMAC: break;
1466 -// case NS_rtf::LN_LPRODUCTCREATED: break;
1467 -// case NS_rtf::LN_LPRODUCTREVISED: break;
1468 -// case NS_rtf::LN_CCPTEXT: break;
1469 -// case NS_rtf::LN_CCPFTN: break;
1470 -// case NS_rtf::LN_CCPHDD: break;
1471 -// case NS_rtf::LN_CCPMCR: break;
1472 -// case NS_rtf::LN_CCPATN: break;
1473 -// case NS_rtf::LN_CCPEDN: break;
1474 -// case NS_rtf::LN_CCPTXBX: break;
1475 -// case NS_rtf::LN_CCPHDRTXBX: break;
1476 -// case NS_rtf::LN_PNFBPCHPFIRST: break;
1477 -// case NS_rtf::LN_PNCHPFIRST: break;
1478 -// case NS_rtf::LN_CPNBTECHP: break;
1479 -// case NS_rtf::LN_PNFBPPAPFIRST: break;
1480 -// case NS_rtf::LN_PNPAPFIRST: break;
1481 -// case NS_rtf::LN_CPNBTEPAP: break;
1482 -// case NS_rtf::LN_PNFBPLVCFIRST: break;
1483 -// case NS_rtf::LN_PNLVCFIRST: break;
1484 -// case NS_rtf::LN_CPNBTELVC: break;
1485 -// case NS_rtf::LN_FCISLANDFIRST: break;
1486 -// case NS_rtf::LN_FCISLANDLIM: break;
1487 -// case NS_rtf::LN_CFCLCB: break;
1488 -// case NS_rtf::LN_FCSTSHFORIG: break;
1489 -// case NS_rtf::LN_LCBSTSHFORIG: break;
1490 -// case NS_rtf::LN_FCSTSHF: break;
1491 -// case NS_rtf::LN_LCBSTSHF: break;
1492 -// case NS_rtf::LN_FCPLCFFNDREF: break;
1493 -// case NS_rtf::LN_LCBPLCFFNDREF: break;
1494 -// case NS_rtf::LN_FCPLCFFNDTXT: break;
1495 -// case NS_rtf::LN_LCBPLCFFNDTXT: break;
1496 -// case NS_rtf::LN_FCPLCFANDREF: break;
1497 -// case NS_rtf::LN_LCBPLCFANDREF: break;
1498 -// case NS_rtf::LN_FCPLCFANDTXT: break;
1499 -// case NS_rtf::LN_LCBPLCFANDTXT: break;
1500 -// case NS_rtf::LN_FCPLCFSED: break;
1501 -// case NS_rtf::LN_LCBPLCFSED: break;
1502 -// case NS_rtf::LN_FCPLCFPAD: break;
1503 -// case NS_rtf::LN_LCBPLCFPAD: break;
1504 -// case NS_rtf::LN_FCPLCFPHE: break;
1505 -// case NS_rtf::LN_LCBPLCFPHE: break;
1506 -// case NS_rtf::LN_FCSTTBFGLSY: break;
1507 -// case NS_rtf::LN_LCBSTTBFGLSY: break;
1508 -// case NS_rtf::LN_FCPLCFGLSY: break;
1509 -// case NS_rtf::LN_LCBPLCFGLSY: break;
1510 -// case NS_rtf::LN_FCPLCFHDD: break;
1511 -// case NS_rtf::LN_LCBPLCFHDD: break;
1512 -// case NS_rtf::LN_FCPLCFBTECHPX: break;
1513 -// case NS_rtf::LN_LCBPLCFBTECHPX: break;
1514 -// case NS_rtf::LN_FCPLCFBTEPAPX: break;
1515 -// case NS_rtf::LN_LCBPLCFBTEPAPX: break;
1516 -// case NS_rtf::LN_FCPLCFSEA: break;
1517 -// case NS_rtf::LN_LCBPLCFSEA: break;
1518 -// case NS_rtf::LN_FCSTTBFFFN: break;
1519 -// case NS_rtf::LN_LCBSTTBFFFN: break;
1520 -// case NS_rtf::LN_FCPLCFFLDMOM: break;
1521 -// case NS_rtf::LN_LCBPLCFFLDMOM: break;
1522 -// case NS_rtf::LN_FCPLCFFLDHDR: break;
1523 -// case NS_rtf::LN_LCBPLCFFLDHDR: break;
1524 -// case NS_rtf::LN_FCPLCFFLDFTN: break;
1525 -// case NS_rtf::LN_LCBPLCFFLDFTN: break;
1526 -// case NS_rtf::LN_FCPLCFFLDATN: break;
1527 -// case NS_rtf::LN_LCBPLCFFLDATN: break;
1528 -// case NS_rtf::LN_FCPLCFFLDMCR: break;
1529 -// case NS_rtf::LN_LCBPLCFFLDMCR: break;
1530 -// case NS_rtf::LN_FCSTTBFBKMK: break;
1531 -// case NS_rtf::LN_LCBSTTBFBKMK: break;
1532 -// case NS_rtf::LN_FCPLCFBKF: break;
1533 -// case NS_rtf::LN_LCBPLCFBKF: break;
1534 -// case NS_rtf::LN_FCPLCFBKL: break;
1535 -// case NS_rtf::LN_LCBPLCFBKL: break;
1536 -// case NS_rtf::LN_FCCMDS: break;
1537 -// case NS_rtf::LN_LCBCMDS: break;
1538 -// case NS_rtf::LN_FCPLCMCR: break;
1539 -// case NS_rtf::LN_LCBPLCMCR: break;
1540 -// case NS_rtf::LN_FCSTTBFMCR: break;
1541 -// case NS_rtf::LN_LCBSTTBFMCR: break;
1542 -// case NS_rtf::LN_FCPRDRVR: break;
1543 -// case NS_rtf::LN_LCBPRDRVR: break;
1544 -// case NS_rtf::LN_FCPRENVPORT: break;
1545 -// case NS_rtf::LN_LCBPRENVPORT: break;
1546 -// case NS_rtf::LN_FCPRENVLAND: break;
1547 -// case NS_rtf::LN_LCBPRENVLAND: break;
1548 -// case NS_rtf::LN_FCWSS: break;
1549 -// case NS_rtf::LN_LCBWSS: break;
1550 -// case NS_rtf::LN_FCDOP: break;
1551 -// case NS_rtf::LN_LCBDOP: break;
1552 -// case NS_rtf::LN_FCSTTBFASSOC: break;
1553 -// case NS_rtf::LN_LCBSTTBFASSOC: break;
1554 -// case NS_rtf::LN_FCCLX: break;
1555 -// case NS_rtf::LN_LCBCLX: break;
1556 -// case NS_rtf::LN_FCPLCFPGDFTN: break;
1557 -// case NS_rtf::LN_LCBPLCFPGDFTN: break;
1558 -// case NS_rtf::LN_FCAUTOSAVESOURCE: break;
1559 -// case NS_rtf::LN_LCBAUTOSAVESOURCE: break;
1560 -// case NS_rtf::LN_FCGRPXSTATNOWNERS: break;
1561 -// case NS_rtf::LN_LCBGRPXSTATNOWNERS: break;
1562 -// case NS_rtf::LN_FCSTTBFATNBKMK: break;
1563 -// case NS_rtf::LN_LCBSTTBFATNBKMK: break;
1564 -// case NS_rtf::LN_FCPLCDOAMOM: break;
1565 -// case NS_rtf::LN_LCBPLCDOAMOM: break;
1566 -// case NS_rtf::LN_FCPLCDOAHDR: break;
1567 -// case NS_rtf::LN_LCBPLCDOAHDR: break;
1568 -// case NS_rtf::LN_FCPLCSPAMOM: break;
1569 -// case NS_rtf::LN_LCBPLCSPAMOM: break;
1570 -// case NS_rtf::LN_FCPLCSPAHDR: break;
1571 -// case NS_rtf::LN_LCBPLCSPAHDR: break;
1572 -// case NS_rtf::LN_FCPLCFATNBKF: break;
1573 -// case NS_rtf::LN_LCBPLCFATNBKF: break;
1574 -// case NS_rtf::LN_FCPLCFATNBKL: break;
1575 -// case NS_rtf::LN_LCBPLCFATNBKL: break;
1576 -// case NS_rtf::LN_FCPMS: break;
1577 -// case NS_rtf::LN_LCBPMS: break;
1578 -// case NS_rtf::LN_FCFORMFLDSTTBF: break;
1579 -// case NS_rtf::LN_LCBFORMFLDSTTBF: break;
1580 -// case NS_rtf::LN_FCPLCFENDREF: break;
1581 -// case NS_rtf::LN_LCBPLCFENDREF: break;
1582 -// case NS_rtf::LN_FCPLCFENDTXT: break;
1583 -// case NS_rtf::LN_LCBPLCFENDTXT: break;
1584 -// case NS_rtf::LN_FCPLCFFLDEDN: break;
1585 -// case NS_rtf::LN_LCBPLCFFLDEDN: break;
1586 -// case NS_rtf::LN_FCPLCFPGDEDN: break;
1587 -// case NS_rtf::LN_LCBPLCFPGDEDN: break;
1588 -// case NS_rtf::LN_FCDGGINFO: break;
1589 -// case NS_rtf::LN_LCBDGGINFO: break;
1590 -// case NS_rtf::LN_FCSTTBFRMARK: break;
1591 -// case NS_rtf::LN_LCBSTTBFRMARK: break;
1592 -// case NS_rtf::LN_FCSTTBFCAPTION: break;
1593 -// case NS_rtf::LN_LCBSTTBFCAPTION: break;
1594 -// case NS_rtf::LN_FCSTTBFAUTOCAPTION: break;
1595 -// case NS_rtf::LN_LCBSTTBFAUTOCAPTION: break;
1596 -// case NS_rtf::LN_FCPLCFWKB: break;
1597 -// case NS_rtf::LN_LCBPLCFWKB: break;
1598 -// case NS_rtf::LN_FCPLCFSPL: break;
1599 -// case NS_rtf::LN_LCBPLCFSPL: break;
1600 -// case NS_rtf::LN_FCPLCFTXBXTXT: break;
1601 -// case NS_rtf::LN_LCBPLCFTXBXTXT: break;
1602 -// case NS_rtf::LN_FCPLCFFLDTXBX: break;
1603 -// case NS_rtf::LN_LCBPLCFFLDTXBX: break;
1604 -// case NS_rtf::LN_FCPLCFHDRTXBXTXT: break;
1605 -// case NS_rtf::LN_LCBPLCFHDRTXBXTXT: break;
1606 -// case NS_rtf::LN_FCPLCFFLDHDRTXBX: break;
1607 -// case NS_rtf::LN_LCBPLCFFLDHDRTXBX: break;
1608 -// case NS_rtf::LN_FCSTWUSER: break;
1609 -// case NS_rtf::LN_LCBSTWUSER: break;
1610 -// case NS_rtf::LN_FCSTTBTTMBD: break;
1611 -// case NS_rtf::LN_LCBSTTBTTMBD: break;
1612 -// case NS_rtf::LN_FCUNUSED: break;
1613 -// case NS_rtf::LN_LCBUNUSED: break;
1614 -// case NS_rtf::LN_FCPGDMOTHER: break;
1615 -// case NS_rtf::LN_LCBPGDMOTHER: break;
1616 -// case NS_rtf::LN_FCBKDMOTHER: break;
1617 -// case NS_rtf::LN_LCBBKDMOTHER: break;
1618 -// case NS_rtf::LN_FCPGDFTN: break;
1619 -// case NS_rtf::LN_LCBPGDFTN: break;
1620 -// case NS_rtf::LN_FCBKDFTN: break;
1621 -// case NS_rtf::LN_LCBBKDFTN: break;
1622 -// case NS_rtf::LN_FCPGDEDN: break;
1623 -// case NS_rtf::LN_LCBPGDEDN: break;
1624 -// case NS_rtf::LN_FCBKDEDN: break;
1625 -// case NS_rtf::LN_LCBBKDEDN: break;
1626 -// case NS_rtf::LN_FCSTTBFINTLFLD: break;
1627 -// case NS_rtf::LN_LCBSTTBFINTLFLD: break;
1628 -// case NS_rtf::LN_FCROUTESLIP: break;
1629 -// case NS_rtf::LN_LCBROUTESLIP: break;
1630 -// case NS_rtf::LN_FCSTTBSAVEDBY: break;
1631 -// case NS_rtf::LN_LCBSTTBSAVEDBY: break;
1632 -// case NS_rtf::LN_FCSTTBFNM: break;
1633 -// case NS_rtf::LN_LCBSTTBFNM: break;
1634 -// case NS_rtf::LN_FCPLCFLST: break;
1635 -// case NS_rtf::LN_LCBPLCFLST: break;
1636 -// case NS_rtf::LN_FCPLFLFO: break;
1637 -// case NS_rtf::LN_LCBPLFLFO: break;
1638 -// case NS_rtf::LN_FCPLCFTXBXBKD: break;
1639 -// case NS_rtf::LN_LCBPLCFTXBXBKD: break;
1640 -// case NS_rtf::LN_FCPLCFTXBXHDRBKD: break;
1641 -// case NS_rtf::LN_LCBPLCFTXBXHDRBKD: break;
1642 -// case NS_rtf::LN_FCDOCUNDO: break;
1643 -// case NS_rtf::LN_LCBDOCUNDO: break;
1644 -// case NS_rtf::LN_FCRGBUSE: break;
1645 -// case NS_rtf::LN_LCBRGBUSE: break;
1646 -// case NS_rtf::LN_FCUSP: break;
1647 -// case NS_rtf::LN_LCBUSP: break;
1648 -// case NS_rtf::LN_FCUSKF: break;
1649 -// case NS_rtf::LN_LCBUSKF: break;
1650 -// case NS_rtf::LN_FCPLCUPCRGBUSE: break;
1651 -// case NS_rtf::LN_LCBPLCUPCRGBUSE: break;
1652 -// case NS_rtf::LN_FCPLCUPCUSP: break;
1653 -// case NS_rtf::LN_LCBPLCUPCUSP: break;
1654 -// case NS_rtf::LN_FCSTTBGLSYSTYLE: break;
1655 -// case NS_rtf::LN_LCBSTTBGLSYSTYLE: break;
1656 -// case NS_rtf::LN_FCPLGOSL: break;
1657 -// case NS_rtf::LN_LCBPLGOSL: break;
1658 -// case NS_rtf::LN_FCPLCOCX: break;
1659 -// case NS_rtf::LN_LCBPLCOCX: break;
1660 -// case NS_rtf::LN_FCPLCFBTELVC: break;
1661 -// case NS_rtf::LN_LCBPLCFBTELVC: break;
1662 -// case NS_rtf::LN_DWLOWDATETIME: break;
1663 -// case NS_rtf::LN_DWHIGHDATETIME: break;
1664 -// case NS_rtf::LN_FCPLCFLVC: break;
1665 -// case NS_rtf::LN_LCBPLCFLVC: break;
1666 -// case NS_rtf::LN_FCPLCASUMY: break;
1667 -// case NS_rtf::LN_LCBPLCASUMY: break;
1668 -// case NS_rtf::LN_FCPLCFGRAM: break;
1669 -// case NS_rtf::LN_LCBPLCFGRAM: break;
1670 -// case NS_rtf::LN_FCSTTBLISTNAMES: break;
1671 -// case NS_rtf::LN_LCBSTTBLISTNAMES: break;
1672 -// case NS_rtf::LN_FCSTTBFUSSR: break;
1673 -// case NS_rtf::LN_LCBSTTBFUSSR: break;
1674 -// case NS_rtf::LN_FN: break;
1675 -// case NS_rtf::LN_FCSEPX: break;
1676 -// case NS_rtf::LN_FNMPR: break;
1677 -// case NS_rtf::LN_FCMPR: break;
1678 -// case NS_rtf::LN_ICOFORE: break;
1679 -// case NS_rtf::LN_ICOBACK: break;
1680 -// case NS_rtf::LN_IPAT: break;
1681 -// case NS_rtf::LN_SHDFORECOLOR: break;
1682 -// case NS_rtf::LN_SHDBACKCOLOR: break;
1683 -// case NS_rtf::LN_SHDPATTERN: break;
1684 -// case NS_rtf::LN_DPTLINEWIDTH: break;
1685 -// case NS_rtf::LN_BRCTYPE: break;
1686 -// case NS_rtf::LN_ICO: break;
1687 -// case NS_rtf::LN_DPTSPACE: break;
1688 -// case NS_rtf::LN_FSHADOW: break;
1689 -// case NS_rtf::LN_FFRAME: break;
1690 -// case NS_rtf::LN_UNUSED2_15: break;
1691 -// case NS_rtf::LN_FFIRSTMERGED: break;
1692 -// case NS_rtf::LN_FMERGED: break;
1693 -// case NS_rtf::LN_FVERTICAL: break;
1694 -// case NS_rtf::LN_FBACKWARD: break;
1695 -// case NS_rtf::LN_FROTATEFONT: break;
1696 -// case NS_rtf::LN_FVERTMERGE: break;
1697 -// case NS_rtf::LN_FVERTRESTART: break;
1698 -// case NS_rtf::LN_VERTALIGN: break;
1699 -// case NS_rtf::LN_FUNUSED: break;
1700 -// case NS_rtf::LN_WUNUSED: break;
1701 -// case NS_rtf::LN_BRCTOP: break;
1702 -// case NS_rtf::LN_BRCLEFT: break;
1703 -// case NS_rtf::LN_BRCBOTTOM: break;
1704 -// case NS_rtf::LN_BRCRIGHT: break;
1705 -// case NS_rtf::LN_IBKL: break;
1706 -// case NS_rtf::LN_ITCFIRST: break;
1707 -// case NS_rtf::LN_FPUB: break;
1708 -// case NS_rtf::LN_ITCLIM: break;
1709 -// case NS_rtf::LN_FCOL: break;
1710 -// case NS_rtf::LN_LINECOLOR: break;
1711 -// case NS_rtf::LN_LINEWIDTH: break;
1712 -// case NS_rtf::LN_LINETYPE: break;
1713 -// case NS_rtf::LN_MM: break;
1714 -// case NS_rtf::LN_XEXT: break;
1715 -// case NS_rtf::LN_YEXT: break;
1716 -// case NS_rtf::LN_HMF: break;
1717 -// case NS_rtf::LN_LCB: break;
1718 -// case NS_rtf::LN_CBHEADER: break;
1719 -// case NS_rtf::LN_MFP: break;
1720 -// case NS_rtf::LN_BM_RCWINMF: break;
1721 -// case NS_rtf::LN_DXAGOAL: break;
1722 -// case NS_rtf::LN_DYAGOAL: break;
1723 -// case NS_rtf::LN_MX: break;
1724 -// case NS_rtf::LN_MY: break;
1725 -// case NS_rtf::LN_DXACROPLEFT: break;
1726 -// case NS_rtf::LN_DYACROPTOP: break;
1727 -// case NS_rtf::LN_DXACROPRIGHT: break;
1728 -// case NS_rtf::LN_DYACROPBOTTOM: break;
1729 -// case NS_rtf::LN_BRCL: break;
1730 -// case NS_rtf::LN_FFRAMEEMPTY: break;
1731 -// case NS_rtf::LN_FBITMAP: break;
1732 -// case NS_rtf::LN_FDRAWHATCH: break;
1733 -// case NS_rtf::LN_FERROR: break;
1734 -// case NS_rtf::LN_BPP: break;
1735 -// case NS_rtf::LN_DXAORIGIN: break;
1736 -// case NS_rtf::LN_DYAORIGIN: break;
1737 -// case NS_rtf::LN_CPROPS: break;
1738 -// case NS_rtf::LN_LINEPROPSTOP: break;
1739 -// case NS_rtf::LN_LINEPROPSLEFT: break;
1740 -// case NS_rtf::LN_LINEPROPSBOTTOM: break;
1741 -// case NS_rtf::LN_LINEPROPSRIGHT: break;
1742 -// case NS_rtf::LN_LINEPROPSHORIZONTAL: break;
1743 -// case NS_rtf::LN_LINEPROPSVERTICAL: break;
1744 -// case NS_rtf::LN_headerr: break;
1745 -// case NS_rtf::LN_footerr: break;
1746 -// case NS_rtf::LN_endnote: break;
1747 -// case NS_rtf::LN_BOOKMARKNAME: break;
1749 - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
1750 - case NS_rtf::LN_LISTLEVEL:
1752 - //add a new level to the level vector and make it the current one
1753 - m_pImpl->AddLevel();
1755 - writerfilter::Reference<Properties>::Pointer_t pProperties;
1756 - if((pProperties = rVal.getProperties()).get())
1757 - pProperties->resolve(*this);
1759 - break;
1760 -// case NS_rtf::LN_LFO: break;
1761 -// case NS_rtf::LN_F: break;
1762 -// case NS_rtf::LN_ALTFONTNAME: break;
1763 -// case NS_rtf::LN_XSZFFN: break;
1764 -// case NS_rtf::LN_XSTZNAME: break;
1765 -// case NS_rtf::LN_XSTZNAME1: break;
1766 -// case NS_rtf::LN_UPXSTART: break;
1767 -// case NS_rtf::LN_UPX: break;
1768 -// case NS_rtf::LN_sed: break;
1769 -// case NS_rtf::LN_picf: break;
1770 -// case NS_rtf::LN_rgbrc: break;
1771 -// case NS_rtf::LN_shd: break;
1772 -// case NS_rtf::LN_cellShd: break;
1773 -// case NS_rtf::LN_cellTopColor: break;
1774 -// case NS_rtf::LN_cellLeftColor: break;
1775 -// case NS_rtf::LN_cellBottomColor: break;
1776 -// case NS_rtf::LN_cellRightColor: break;
1778 -// case NS_rtf::LN_LISTTABLE: break;
1779 -// case NS_rtf::LN_LFOTABLE: break;
1780 -// case NS_rtf::LN_FONTTABLE: break;
1781 -// case NS_rtf::LN_STYLESHEET: break;
1782 - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
1783 - case NS_ooxml::LN_CT_AbstractNum_abstractNumId:
1784 - {
1785 - sal_Int32 nVal = rVal.getString().toInt32();
1786 - m_pImpl->m_pCurrentEntry->nAbstractNumId = nVal;
1787 - m_pImpl->m_pCurrentEntry->nListId = nVal;
1789 - break;
1790 - case NS_ooxml::LN_CT_Ind_left:
1791 - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1792 - m_pImpl->m_pCurrentEntry->pCurrentProperties->Insert(
1793 - PROP_INDENT_AT, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
1794 - break;
1795 - case NS_ooxml::LN_CT_Ind_hanging:
1796 - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1797 - m_pImpl->m_pCurrentEntry->pCurrentProperties->Insert(
1798 - PROP_FIRST_LINE_INDENT, true, uno::makeAny( - ConversionHelper::convertTwipToMM100( nIntValue ) ));
1799 - break;
1800 - case NS_ooxml::LN_CT_Ind_firstLine:
1801 - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
1802 - m_pImpl->m_pCurrentEntry->pCurrentProperties->Insert(
1803 - PROP_FIRST_LINE_INDENT, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
1804 - break;
1805 - case NS_ooxml::LN_CT_Lvl_ilvl: //overrides previous level - unsupported
1806 - case NS_ooxml::LN_CT_Lvl_tplc: //template code - unsupported
1807 - case NS_ooxml::LN_CT_Lvl_tentative: //marks level as unused in the document - unsupported
1808 - break;
1809 - case NS_ooxml::LN_CT_TabStop_pos:
1811 - //no paragraph attributes in ListTable char style sheets
1812 - m_pImpl->m_pCurrentEntry->pCurrentProperties->nTabstop = ConversionHelper::convertTwipToMM100( nIntValue );
1814 - break;
1815 - default:
1817 -#if OSL_DEBUG_LEVEL > 0
1818 - ::rtl::OString sMessage( "ListTable::attribute() - Id: ");
1819 - sMessage += ::rtl::OString::valueOf( sal_Int32( nName ), 10 );
1820 - sMessage += ::rtl::OString(" / 0x");
1821 - sMessage += ::rtl::OString::valueOf( sal_Int32( nName ), 16 );
1822 - sMessage += ::rtl::OString(" value: ");
1823 - sMessage += ::rtl::OString::valueOf( sal_Int32( nIntValue ), 10 );
1824 - sMessage += ::rtl::OString(" / 0x");
1825 - sMessage += ::rtl::OString::valueOf( sal_Int32( nIntValue ), 16 );
1826 - OSL_ENSURE( false, sMessage.getStr()); //
1827 -#endif
1831 -/*-- 23.06.2006 12:04:33---------------------------------------------------
1833 - -----------------------------------------------------------------------*/
1834 -void ListTable::sprm(Sprm & rSprm)
1836 - //fill the attributes of the style sheet
1837 - sal_uInt32 nSprmId = rSprm.getId();
1838 - if( m_pImpl->m_pCurrentEntry.get() ||
1839 - nSprmId == NS_ooxml::LN_CT_Numbering_abstractNum ||
1840 - nSprmId == NS_ooxml::LN_CT_Numbering_num )
1842 - sal_Int32 nIntValue = rSprm.getValue()->getInt();
1843 - /* WRITERFILTERSTATUS: table: ListTable_sprm */
1844 - switch( nSprmId )
1846 - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
1847 - case NS_ooxml::LN_CT_Numbering_abstractNum:
1849 - writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
1850 - if(pProperties.get())
1852 - //create a new list entry
1853 - OSL_ENSURE( !m_pImpl->m_pCurrentEntry.get(), "current entry has to be NULL here");
1854 - m_pImpl->m_pCurrentEntry.reset( new ListEntry );
1855 - pProperties->resolve( *this );
1856 - //append it to the table
1857 - m_pImpl->m_aListEntries.push_back( m_pImpl->m_pCurrentEntry );
1858 - m_pImpl->m_pCurrentEntry = ListEntryPtr();
1861 - break;
1862 - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
1863 - case NS_ooxml::LN_CT_Numbering_num:
1865 - writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
1866 - if(pProperties.get())
1868 - Numbering_numHdlPtr pNumHdl( new Numbering_numHdl( *this ) );
1869 - pProperties->resolve(*pNumHdl);
1870 - //todo: is the order of numberings guaranteed?
1871 - //sal_Int32 pNumhdl->GetNumId();
1872 - m_pImpl->m_rDMapper.AddListIDToLFOTable( pNumHdl->GetAbstractNumId() );
1875 - break;
1876 - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
1877 - case NS_ooxml::LN_CT_AbstractNum_multiLevelType:
1878 - break;
1879 - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
1880 - case NS_rtf::LN_TPLC:
1881 - m_pImpl->m_pCurrentEntry->nTPLC = nIntValue;
1882 - break;
1883 - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
1884 - case NS_ooxml::LN_CT_AbstractNum_lvl:
1886 - m_pImpl->AddLevel();
1887 - writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
1888 - if(pProperties.get())
1889 - pProperties->resolve(*this);
1891 - break;
1892 -// not a useful number in ooxml
1893 -// case NS_rtf::LN_LSID:
1894 -// m_pImpl->m_pCurrentEntry->nListId = nIntValue;
1895 -// break;
1896 - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
1897 - case NS_rtf::LN_RGBXCHNUMS: break;
1898 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1899 - case NS_rtf::LN_ISTARTAT:
1900 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1901 - case NS_rtf::LN_NFC:
1902 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1903 - case NS_rtf::LN_JC:
1904 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1905 - case NS_rtf::LN_FLEGAL:
1906 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1907 - case NS_rtf::LN_FNORESTART:
1908 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1909 - case NS_rtf::LN_FPREV:
1910 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1911 - case NS_rtf::LN_FPREVSPACE:
1912 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1913 - case NS_rtf::LN_FWORD6:
1914 - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
1915 - case NS_rtf::LN_IXCHFOLLOW:
1916 - ApplyLevelValues( nSprmId, nIntValue );
1917 - break;
1918 - case NS_ooxml::LN_CT_Lvl_lvlText:
1919 - case NS_ooxml::LN_CT_Lvl_rPr : //contains LN_EG_RPrBase_rFonts
1920 - {
1921 - writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
1922 - if(pProperties.get())
1923 - pProperties->resolve(*this);
1925 - break;
1926 - case NS_ooxml::LN_CT_NumLvl_lvl:
1927 - {
1928 - // overwrite level
1929 - writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
1930 - if(pProperties.get())
1931 - pProperties->resolve(*this);
1933 - break;
1934 - case NS_ooxml::LN_CT_Lvl_lvlJc:
1936 - static sal_Int16 aWWAlignments[ ] =
1938 - text::HoriOrientation::LEFT,
1939 - text::HoriOrientation::CENTER,
1940 - text::HoriOrientation::RIGHT
1941 - };
1942 - m_pImpl->m_pCurrentEntry->pCurrentProperties->Insert(
1943 - PROP_ADJUST, true, uno::makeAny( aWWAlignments[ nIntValue ] ) );
1944 - writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
1946 - break;
1947 - case NS_ooxml::LN_CT_Lvl_pPr:
1948 - case NS_ooxml::LN_CT_PPrBase_ind:
1949 - {
1950 - //todo: how to handle paragraph properties within numbering levels (except LeftIndent and FirstLineIndent)?
1951 - writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
1952 - if(pProperties.get())
1953 - pProperties->resolve(*this);
1955 - break;
1956 - case NS_ooxml::LN_CT_PPrBase_tabs:
1957 - case NS_ooxml::LN_CT_Tabs_tab:
1959 - writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
1960 - if(pProperties.get())
1961 - pProperties->resolve(*this);
1963 - break;
1964 - case NS_ooxml::LN_CT_Lvl_suff:
1965 - //todo: currently unsupported suffix
1966 - //can be: "none", "space", "tab"
1967 - break;
1968 - case NS_ooxml::LN_EG_RPrBase_rFonts: //contains font properties
1969 - case NS_ooxml::LN_EG_RPrBase_color:
1970 - case NS_ooxml::LN_EG_RPrBase_u:
1971 - case NS_sprm::LN_CHps: // sprmCHps
1972 - case NS_ooxml::LN_EG_RPrBase_lang:
1973 - case NS_ooxml::LN_EG_RPrBase_eastAsianLayout:
1974 - //no break!
1975 - default:
1976 - if(m_pImpl->m_pCurrentEntry->pCurrentProperties.get())
1978 - m_pImpl->m_rDMapper.PushListProperties( m_pImpl->m_pCurrentEntry->pCurrentProperties );
1979 - m_pImpl->m_rDMapper.sprm( rSprm );
1980 - m_pImpl->m_rDMapper.PopListProperties();
1982 - }
1985 -/*-- 12.11.2007 09:36:09---------------------------------------------------
1987 - -----------------------------------------------------------------------*/
1988 -void ListTable::ApplyLevelValues( sal_Int32 nId, sal_Int32 nIntValue)
1990 - if(m_pImpl->m_pCurrentEntry->pCurrentProperties.get())
1991 - switch(nId)
1993 - case NS_rtf::LN_ISTARTAT:
1994 - m_pImpl->m_pCurrentEntry->pCurrentProperties->nIStartAt = nIntValue;
1995 - break;
1996 - case NS_rtf::LN_NFC:
1997 - m_pImpl->m_pCurrentEntry->pCurrentProperties->nNFC = nIntValue;
1998 - break;
1999 - case NS_rtf::LN_JC:
2000 - m_pImpl->m_pCurrentEntry->pCurrentProperties->nJC = nIntValue;
2001 - break;
2002 - case NS_rtf::LN_FLEGAL:
2003 - m_pImpl->m_pCurrentEntry->pCurrentProperties->nFLegal = nIntValue;
2004 - break;
2005 - case NS_rtf::LN_FNORESTART:
2006 - m_pImpl->m_pCurrentEntry->pCurrentProperties->nFNoRestart = nIntValue;
2007 - break;
2008 - case NS_rtf::LN_FPREV:
2009 - m_pImpl->m_pCurrentEntry->pCurrentProperties->nFPrev = nIntValue;
2010 - break;
2011 - case NS_rtf::LN_FPREVSPACE:
2012 - m_pImpl->m_pCurrentEntry->pCurrentProperties->nFPrevSpace = nIntValue;
2013 - break;
2014 - case NS_rtf::LN_FWORD6:
2015 - m_pImpl->m_pCurrentEntry->pCurrentProperties->nFWord6 = nIntValue;
2016 - break;
2017 - case NS_rtf::LN_IXCHFOLLOW:
2018 - m_pImpl->m_pCurrentEntry->pCurrentProperties->nXChFollow = nIntValue;
2019 - break;
2020 - default:
2021 - OSL_ENSURE( false, "this line should never be reached");
2024 -/*-- 23.06.2006 12:04:33---------------------------------------------------
2026 - -----------------------------------------------------------------------*/
2027 -void ListTable::entry(int, writerfilter::Reference<Properties>::Pointer_t ref)
2030 - if( m_pImpl->m_rDMapper.IsOOXMLImport() )
2032 - ref->resolve(*this);
2034 - else
2036 - //create a new list entry
2037 - OSL_ENSURE( !m_pImpl->m_pCurrentEntry.get(), "current entry has to be NULL here");
2038 - m_pImpl->m_pCurrentEntry.reset( new ListEntry );
2039 - ref->resolve(*this);
2040 - //append it to the table
2041 - m_pImpl->m_aListEntries.push_back( m_pImpl->m_pCurrentEntry );
2042 - m_pImpl->m_pCurrentEntry = ListEntryPtr();
2045 -/*-- 26.06.2006 10:27:55---------------------------------------------------
2047 - -----------------------------------------------------------------------*/
2048 -sal_uInt32 ListTable::size() const
2050 - return m_pImpl->m_aListEntries.size();
2053 -rtl::OUString ListTable::GetStyleName( sal_Int32 nListId )
2055 - rtl::OUString sStyleName( rtl::OUString::createFromAscii( "WWNum" ) );
2056 - sStyleName += rtl::OUString::valueOf( nListId + 1 );
2058 - return sStyleName;
2061 -void ListTable::CreateNumberingRules( )
2063 - uno::Reference< container::XIndexReplace > xRet;
2064 - std::vector< ListEntryPtr >::const_iterator aIt = m_pImpl->m_aListEntries.begin();
2065 - std::vector< ListEntryPtr >::const_iterator aEndIt = m_pImpl->m_aListEntries.end();
2067 - uno::Reference< container::XNameContainer > xStyles;
2069 - try
2071 - uno::Reference< style::XStyleFamiliesSupplier > xFamilies( m_pImpl->m_xFactory, uno::UNO_QUERY_THROW );
2072 - uno::Any oFamily = xFamilies->getStyleFamilies( )->getByName( rtl::OUString::createFromAscii( "NumberingStyles" ) );
2074 - oFamily >>= xStyles;
2076 - catch ( const uno::Exception )
2080 - for(; aIt != aEndIt; ++aIt)
2082 - if( !(*aIt)->m_xNumRules.is() && m_pImpl->m_xFactory.is() && xStyles.is( ) )
2084 - try
2086 - // Create the numbering style
2087 - uno::Reference< beans::XPropertySet > xStyle (
2088 - m_pImpl->m_xFactory->createInstance(
2089 - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.NumberingStyle"))),
2090 - uno::UNO_QUERY_THROW );
2092 - rtl::OUString sStyleName = GetStyleName( ( *aIt )->nListId );
2093 -#if DEBUG
2094 - clog << "Creating numbering style: ";
2095 - clog << rtl::OUStringToOString( sStyleName, RTL_TEXTENCODING_UTF8 ).getStr( );
2096 - clog << endl;
2097 -#endif
2099 - xStyles->insertByName( sStyleName, makeAny( xStyle ) );
2101 - uno::Any oStyle = xStyles->getByName( sStyleName );
2102 - xStyle.set( oStyle, uno::UNO_QUERY_THROW );
2104 - PropertyNameSupplier& aPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
2105 - uno::Any aRules = xStyle->getPropertyValue( aPropNameSupplier.GetName( PROP_NUMBERING_RULES ) );
2106 - aRules >>= ( *aIt )->m_xNumRules;
2108 - //now fill the numbering levels appropriately
2109 - ::std::vector< ListPropertyMapPtr >::const_iterator aIter = (*aIt)->aLevelProperties.begin();
2110 - ::std::vector< ListPropertyMapPtr >::const_iterator aEnd = (*aIt)->aLevelProperties.end();
2111 - sal_Int32 nLevel = 0;
2112 - while(aIter != aEnd)
2114 - PropertyValueVector_t aCharStyleProperties;
2115 - uno::Sequence< beans::PropertyValue> aValues = (*aIter)->GetPropertyValuesList(aCharStyleProperties);
2116 - if( aCharStyleProperties.size() )
2118 - //create (or find) a character style containing the character attributes of the symbol
2119 - //and apply it to the numbering level
2120 - ::rtl::OUString sStyle = m_pImpl->m_rDMapper.getOrCreateCharStyle( aCharStyleProperties );
2121 - aValues.realloc( aValues.getLength() + 1);
2122 - aValues[aValues.getLength() - 1].Name = aPropNameSupplier.GetName( PROP_CHAR_STYLE_NAME );
2123 - aValues[aValues.getLength() - 1].Value <<= sStyle;
2124 - }
2125 - //now parse the text to find %n from %1 to %nLevel+1
2126 - //everything before the first % and the last %x is prefix and suffix
2127 - ::rtl::OUString sLevelText( (*aIter)->sBulletChar );
2128 - sal_Int32 nCurrentIndex = 0;
2129 - sal_Int32 nFound = sLevelText.indexOf( '%', nCurrentIndex );
2130 - if( nFound > 0 )
2132 - ::rtl::OUString sPrefix = sLevelText.copy( 0, nFound );
2133 - aValues.realloc( aValues.getLength() + 1 );
2134 - aValues[ aValues.getLength() - 1 ] = MAKE_PROPVAL(PROP_PREFIX, sPrefix);
2135 - sLevelText = sLevelText.copy( nFound );
2136 - }
2137 - sal_Int32 nMinLevel = nLevel;
2138 - //now the text should either be empty or start with %
2139 - nFound = 0;
2140 - while( nFound >= 0 )
2142 - if( sLevelText.getLength() > 1 )
2144 - sal_Unicode cLevel = sLevelText.getStr()[1];
2145 - if( cLevel >= '1' && cLevel <= '9' )
2147 - if( cLevel - '1' < nMinLevel )
2148 - nMinLevel = cLevel - '1';
2149 - //remove first char - next char is removed later
2150 - sLevelText = sLevelText.copy( 1 );
2152 - }
2153 - //remove old '%' or number
2154 - sLevelText = sLevelText.copy( 1 );
2155 - nCurrentIndex = 0;
2156 - nFound = sLevelText.indexOf( '%', nCurrentIndex );
2157 - //remove the text before the next %
2158 - if(nFound > 0)
2159 - sLevelText = sLevelText.copy( nFound -1 );
2161 - if( nMinLevel < nLevel )
2163 - aValues.realloc( aValues.getLength() + 1);
2164 - aValues[ aValues.getLength() - 1 ] =
2165 - MAKE_PROPVAL(PROP_PARENT_NUMBERING, sal_Int16( nLevel - nMinLevel + 1));
2167 - aValues.realloc( aValues.getLength() + 1);
2168 - aValues[ aValues.getLength() - 1 ] = MAKE_PROPVAL(PROP_SUFFIX, sLevelText);
2170 - aValues.realloc( aValues.getLength() + 1);
2171 - aValues[ aValues.getLength() - 1 ] = MAKE_PROPVAL( PROP_POSITION_AND_SPACE_MODE,
2172 - sal_Int16( text::PositionAndSpaceMode::LABEL_ALIGNMENT ) );
2174 -#if DEBUG
2175 - clog << endl << "Numbering rule properties - " << nLevel << endl;
2176 - for ( sal_Int32 i = 0, len = aValues.getLength( ); i < len; i++ )
2178 - beans::PropertyValue aVal = aValues[i];
2179 - clog << " " << rtl::OUStringToOString( aVal.Name, RTL_TEXTENCODING_UTF8 ).getStr( );
2180 - clog << ": ";
2181 - rtl::OUString sVal;
2182 - sal_Int32 nVal;
2183 - if ( aVal.Value >>= sVal )
2185 - clog << rtl::OUStringToOString( sVal, RTL_TEXTENCODING_UTF8 ).getStr( );
2187 - else if ( aVal.Value >>= nVal )
2189 - clog << nVal;
2191 - clog << endl;
2193 -#endif
2195 - (*aIt)->m_xNumRules->replaceByIndex(nLevel, uno::makeAny(aValues));
2196 - ++aIter;
2197 - ++nLevel;
2200 - // Create the numbering style for these rules
2201 - rtl::OUString sNumRulesName = aPropNameSupplier.GetName( PROP_NUMBERING_RULES );
2202 - xStyle->setPropertyValue(
2203 - sNumRulesName,
2204 - uno::makeAny( ( *aIt )->m_xNumRules ) );
2206 - catch( const uno::Exception& rEx)
2208 - (void)rEx;
2209 - OSL_ENSURE( false, "ListTable::CreateNumberingRules");
2215 -/*-- 26.06.2006 10:33:56---------------------------------------------------
2217 - -----------------------------------------------------------------------*/
2218 -uno::Reference< container::XIndexReplace > ListTable::GetNumberingRules(sal_Int32 nListId)
2220 - uno::Reference< container::XIndexReplace > xRet;
2221 - std::vector< ListEntryPtr >::const_iterator aIt = m_pImpl->m_aListEntries.begin();
2222 - std::vector< ListEntryPtr >::const_iterator aEndIt = m_pImpl->m_aListEntries.end();
2223 - for(; aIt != aEndIt; ++aIt)
2225 - if((*aIt)->nListId == nListId)
2227 - xRet = (*aIt)->m_xNumRules;
2228 - break;
2231 - return xRet;
2233 -/*-- 19.11.2007 13:25:32---------------------------------------------------
2235 - -----------------------------------------------------------------------*/
2236 -void ListTable::setOverwriteLevel(sal_Int32 nAbstractNumId, sal_Int32 nLevel)
2238 - m_nOverwriteListId = nAbstractNumId;
2239 - m_nOverwriteLevel = nLevel;
2240 - OSL_ENSURE(!m_pImpl->m_pCurrentEntry.get(), "where to put the overwrite level");
2241 - std::vector< ListEntryPtr >::const_iterator aIt = m_pImpl->m_aListEntries.begin();
2242 - std::vector< ListEntryPtr >::const_iterator aEndIt = m_pImpl->m_aListEntries.end();
2243 - for(; aIt != aEndIt; ++aIt)
2245 - if( (*aIt)->nListId == nAbstractNumId )
2247 - m_pImpl->m_pCurrentEntry = *aIt;
2248 - break;
2251 - OSL_ENSURE( m_pImpl->m_pCurrentEntry.get(), "list not found");
2253 -/*-- 19.11.2007 13:25:32---------------------------------------------------
2255 - -----------------------------------------------------------------------*/
2256 -void ListTable::resetOverwrite()
2258 - m_nOverwriteListId = -1;
2259 - m_nOverwriteLevel = -1;
2260 - m_pImpl->m_pCurrentEntry.reset();
2263 -}//namespace dmapper
2264 -}//namespace writerfilter
2266 diff --git writerfilter/source/dmapper/ListTable.hxx writerfilter/source/dmapper/ListTable.hxx
2267 deleted file mode 100644
2268 index 65cc216..0000000
2269 --- writerfilter/source/dmapper/ListTable.hxx
2270 +++ /dev/null
2271 @@ -1,92 +0,0 @@
2272 -/*************************************************************************
2274 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2275 - *
2276 - * Copyright 2008 by Sun Microsystems, Inc.
2278 - * OpenOffice.org - a multi-platform office productivity suite
2280 - * $RCSfile: ListTable.hxx,v $
2281 - * $Revision: 1.5 $
2283 - * This file is part of OpenOffice.org.
2285 - * OpenOffice.org is free software: you can redistribute it and/or modify
2286 - * it under the terms of the GNU Lesser General Public License version 3
2287 - * only, as published by the Free Software Foundation.
2289 - * OpenOffice.org is distributed in the hope that it will be useful,
2290 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
2291 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2292 - * GNU Lesser General Public License version 3 for more details
2293 - * (a copy is included in the LICENSE file that accompanied this code).
2295 - * You should have received a copy of the GNU Lesser General Public License
2296 - * version 3 along with OpenOffice.org. If not, see
2297 - * <http://www.openoffice.org/license.html>
2298 - * for a copy of the LGPLv3 License.
2300 - ************************************************************************/
2301 -#ifndef INCLUDED_LISTTABLE_HXX
2302 -#define INCLUDED_LISTTABLE_HXX
2304 -#include <WriterFilterDllApi.hxx>
2305 -#include <PropertyMap.hxx>
2306 -#include <resourcemodel/WW8ResourceModel.hxx>
2308 -namespace com{ namespace sun { namespace star {
2309 - namespace text{
2310 - class XTextDocument;
2312 - namespace container{
2313 - class XIndexReplace;
2315 - namespace lang{
2316 - class XMultiServiceFactory;
2318 -}}}
2320 -namespace writerfilter {
2321 -namespace dmapper
2323 -class DomainMapper;
2324 -struct ListTable_Impl;
2325 -class WRITERFILTER_DLLPRIVATE ListTable :
2326 - public Properties,
2327 - public Table
2329 - ListTable_Impl *m_pImpl;
2330 - sal_Int32 m_nOverwriteListId;
2331 - sal_Int32 m_nOverwriteLevel;
2333 - void ApplyLevelValues( sal_Int32 nId, sal_Int32 nIntValue);
2334 -public:
2335 - ListTable(
2336 - DomainMapper& rDMapper,
2337 - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory);
2338 - virtual ~ListTable();
2340 - // Properties
2341 - virtual void attribute(Id Name, Value & val);
2342 - virtual void sprm(Sprm & sprm);
2344 - // Table
2345 - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref);
2347 - // BinaryObj
2348 -// virtual void data(const sal_Int8* buf, size_t len,
2349 -// writerfilter::Reference<Properties>::Pointer_t ref);
2351 - sal_uInt32 size() const;
2352 - rtl::OUString GetStyleName( sal_Int32 nListId );
2353 - void CreateNumberingRules( );
2354 - ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace >
2355 - GetNumberingRules(sal_Int32 nListId);
2357 - void setOverwriteLevel(sal_Int32 nAbstractNumId, sal_Int32 nLevel);
2358 - void resetOverwrite();
2360 -typedef boost::shared_ptr< ListTable > ListTablePtr;
2363 -#endif //
2364 diff --git writerfilter/source/dmapper/NumberingManager.cxx writerfilter/source/dmapper/NumberingManager.cxx
2365 new file mode 100644
2366 index 0000000..65788d0
2367 --- /dev/null
2368 +++ writerfilter/source/dmapper/NumberingManager.cxx
2369 @@ -0,0 +1,995 @@
2370 +#include "ConversionHelper.hxx"
2371 +#include "NumberingManager.hxx"
2372 +#include "StyleSheetTable.hxx"
2373 +#include "PropertyIds.hxx"
2375 +#include <doctok/resourceids.hxx>
2376 +#include <doctok/sprmids.hxx>
2377 +#include <ooxml/resourceids.hxx>
2379 +#include <com/sun/star/lang/XMultiServiceFactory.hpp>
2380 +#include <com/sun/star/container/XNameContainer.hpp>
2381 +#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
2382 +#include <com/sun/star/style/NumberingType.hpp>
2383 +#include <com/sun/star/text/HoriOrientation.hpp>
2384 +#include <com/sun/star/text/PositionAndSpaceMode.hpp>
2385 +#include <com/sun/star/text/XChapterNumberingSupplier.hpp>
2387 +using namespace rtl;
2388 +using namespace com::sun::star;
2390 +#define MAKE_PROPVAL(NameId, Value) \
2391 + beans::PropertyValue(aPropNameSupplier.GetName(NameId), 0, uno::makeAny(Value), beans::PropertyState_DIRECT_VALUE )
2393 +#define OUSTR_TO_C( x ) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr( )
2395 +#define NUMBERING_MAX_LEVELS 10
2398 +namespace writerfilter {
2399 +namespace dmapper {
2401 +//--------------------------------------------------- Utility functions
2403 +void lcl_printProperties( uno::Sequence< beans::PropertyValue > aProps )
2405 + sal_Int32 nLen = aProps.getLength( );
2406 + for ( sal_Int32 i = 0; i < nLen; i++ )
2408 + uno::Any aValue = aProps[i].Value;
2409 + sal_Int32 nValue;
2410 + OUString sValue;
2412 + if ( !( aValue >>= sValue ) && ( aValue >>= nValue ) )
2413 + sValue = OUString::valueOf( nValue );
2415 + fprintf( stderr, "Property %s: %s\n",
2416 + OUSTR_TO_C( aProps[i].Name ),
2417 + OUSTR_TO_C( sValue ) );
2421 +sal_Int32 lcl_findProperty( uno::Sequence< beans::PropertyValue > aProps, OUString sName )
2423 + sal_Int32 i = 0;
2424 + sal_Int32 nLen = aProps.getLength( );
2425 + sal_Int32 nPos = -1;
2427 + while ( nPos == -1 && i < nLen )
2429 + if ( aProps[i].Name.equals( sName ) )
2430 + nPos = i;
2431 + else
2432 + i++;
2435 + return nPos;
2438 +void lcl_mergeProperties( uno::Sequence< beans::PropertyValue >& aSrc,
2439 + uno::Sequence< beans::PropertyValue >& aDst )
2441 + for ( sal_Int32 i = 0, nSrcLen = aSrc.getLength( ); i < nSrcLen; i++ )
2443 + // Look for the same property in aDst
2444 + sal_Int32 nPos = lcl_findProperty( aDst, aSrc[i].Name );
2445 + if ( nPos >= 0 )
2447 + // Replace the property value by the one in aSrc
2448 + aDst[nPos] = aSrc[i];
2450 + else
2452 + // Simply add the new value
2453 + aDst.realloc( aDst.getLength( ) + 1 );
2454 + aDst[ aDst.getLength( ) - 1 ] = aSrc[i];
2459 +//-------------------------------------------- ListLevel implementation
2460 +void ListLevel::SetValue( Id nId, sal_Int32 nValue )
2462 + switch( nId )
2464 + case NS_rtf::LN_ISTARTAT:
2465 + m_nIStartAt = nValue;
2466 + break;
2467 + case NS_rtf::LN_NFC:
2468 + m_nNFC = nValue;
2469 + break;
2470 + case NS_rtf::LN_JC:
2471 + m_nJC = nValue;
2472 + break;
2473 + case NS_rtf::LN_FLEGAL:
2474 + m_nFLegal = nValue;
2475 + break;
2476 + case NS_rtf::LN_FNORESTART:
2477 + m_nFNoRestart = nValue;
2478 + break;
2479 + case NS_rtf::LN_FPREV:
2480 + m_nFPrev = nValue;
2481 + break;
2482 + case NS_rtf::LN_FPREVSPACE:
2483 + m_nFPrevSpace = nValue;
2484 + break;
2485 + case NS_rtf::LN_FWORD6:
2486 + m_nFWord6 = nValue;
2487 + break;
2488 + case NS_rtf::LN_IXCHFOLLOW:
2489 + m_nXChFollow = nValue;
2490 + break;
2491 + case NS_ooxml::LN_CT_TabStop_pos:
2492 + m_nTabstop = nValue;
2493 + break;
2494 + default:
2495 + OSL_ENSURE( false, "this line should never be reached");
2499 +sal_Int16 ListLevel::GetParentNumbering( OUString sText, sal_Int16 nLevel,
2500 + OUString& rPrefix, OUString& rSuffix )
2502 + sal_Int16 nParentNumbering = nLevel;
2504 + //now parse the text to find %n from %1 to %nLevel+1
2505 + //everything before the first % and the last %x is prefix and suffix
2506 + OUString sLevelText( sText );
2507 + sal_Int32 nCurrentIndex = 0;
2508 + sal_Int32 nFound = sLevelText.indexOf( '%', nCurrentIndex );
2509 + if( nFound > 0 )
2511 + rPrefix = sLevelText.copy( 0, nFound );
2512 + sLevelText = sLevelText.copy( nFound );
2513 + }
2514 + sal_Int32 nMinLevel = nLevel;
2515 + //now the text should either be empty or start with %
2516 + nFound = 0;
2517 + while( nFound >= 0 )
2519 + if( sLevelText.getLength() > 1 )
2521 + sal_Unicode cLevel = sLevelText.getStr()[1];
2522 + if( cLevel >= '1' && cLevel <= '9' )
2524 + if( cLevel - '1' < nMinLevel )
2525 + nMinLevel = cLevel - '1';
2526 + //remove first char - next char is removed later
2527 + sLevelText = sLevelText.copy( 1 );
2529 + }
2530 + //remove old '%' or number
2531 + sLevelText = sLevelText.copy( 1 );
2532 + nCurrentIndex = 0;
2533 + nFound = sLevelText.indexOf( '%', nCurrentIndex );
2534 + //remove the text before the next %
2535 + if(nFound > 0)
2536 + sLevelText = sLevelText.copy( nFound -1 );
2538 + if( nMinLevel < nLevel )
2540 + nParentNumbering = sal_Int16( nLevel - nMinLevel + 1);
2543 + rSuffix = sLevelText;
2545 + return nParentNumbering;
2548 +uno::Sequence< beans::PropertyValue > ListLevel::GetProperties( )
2550 + uno::Sequence< beans::PropertyValue > aLevelProps = GetLevelProperties( );
2551 + if ( m_pParaStyle.get( ) )
2553 + // Merge with the paragraph properties
2554 + uno::Sequence< beans::PropertyValue > aParaProps = GetParaProperties( );
2555 + lcl_mergeProperties( aParaProps, aLevelProps );
2557 + return aLevelProps;
2560 +uno::Sequence< beans::PropertyValue > ListLevel::GetCharStyleProperties( )
2562 + PropertyValueVector_t rProperties;
2563 + PropertyNameSupplier& aPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
2565 + _PropertyMap::const_iterator aMapIter = begin();
2566 + _PropertyMap::const_iterator aEndIter = end();
2567 + for( ; aMapIter != aEndIter; ++aMapIter )
2569 + switch( aMapIter->first.eId )
2571 + case PROP_ADJUST:
2572 + case PROP_INDENT_AT:
2573 + case PROP_FIRST_LINE_INDENT:
2574 + case PROP_FIRST_LINE_OFFSET:
2575 + case PROP_LEFT_MARGIN:
2576 + case PROP_CHAR_FONT_NAME:
2577 + // Do nothing: handled in the GetPropertyValues method
2578 + break;
2579 + default:
2581 + rProperties.push_back(
2582 + beans::PropertyValue(
2583 + aPropNameSupplier.GetName( aMapIter->first.eId ), 0,
2584 + aMapIter->second, beans::PropertyState_DIRECT_VALUE ));
2589 + uno::Sequence< beans::PropertyValue > aRet( rProperties.size() );
2590 + beans::PropertyValue* pValues = aRet.getArray();
2591 + PropertyValueVector_t::const_iterator aIt = rProperties.begin();
2592 + PropertyValueVector_t::const_iterator aEndIt = rProperties.end();
2593 + for(sal_uInt32 nIndex = 0; aIt != aEndIt; ++aIt,++nIndex)
2595 + pValues[nIndex] = *aIt;
2597 + return aRet;
2600 +uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
2602 + const sal_Int16 aWWToUnoAdjust[] =
2604 + text::HoriOrientation::LEFT,
2605 + text::HoriOrientation::CENTER,
2606 + text::HoriOrientation::RIGHT,
2607 + };
2609 + PropertyNameSupplier& aPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
2610 + PropertyValueVector_t aNumberingProperties;
2612 + if( m_nIStartAt >= 0)
2613 + aNumberingProperties.push_back( MAKE_PROPVAL(PROP_START_WITH, (sal_Int16)m_nIStartAt) );
2615 + sal_Int16 nNumberFormat = ConversionHelper::ConvertNumberingType(m_nNFC);
2616 + if( m_nNFC >= 0)
2617 + aNumberingProperties.push_back( MAKE_PROPVAL(PROP_NUMBERING_TYPE, nNumberFormat ));
2619 + if( m_nJC >= 0 && m_nJC <= sal::static_int_cast<sal_Int32>(sizeof(aWWToUnoAdjust) / sizeof(sal_Int16)) )
2620 + aNumberingProperties.push_back( MAKE_PROPVAL(PROP_ADJUST, aWWToUnoAdjust[m_nJC]));
2622 + // todo: this is not the bullet char
2623 + if( nNumberFormat == style::NumberingType::CHAR_SPECIAL && m_sBulletChar.getLength() )
2624 + aNumberingProperties.push_back( MAKE_PROPVAL(PROP_BULLET_CHAR, m_sBulletChar.copy(0,1)));
2626 + aNumberingProperties.push_back( MAKE_PROPVAL( PROP_LISTTAB_STOP_POSITION, m_nTabstop ) );
2628 + //TODO: handling of nFLegal?
2629 + //TODO: nFNoRestart lower levels do not restart when higher levels are incremented, like:
2630 + //1.
2631 + //1.1
2632 + //2.2
2633 + //2.3
2634 + //3.4
2635 + //
2637 + if( m_nFWord6 > 0) //Word 6 compatibility
2639 + if( m_nFPrev == 1)
2640 + aNumberingProperties.push_back( MAKE_PROPVAL( PROP_PARENT_NUMBERING, (sal_Int16) NUMBERING_MAX_LEVELS ));
2641 + //TODO: prefixing space nFPrevSpace; - has not been used in WW8 filter
2644 +// TODO: sRGBXchNums; array of inherited numbers
2646 +// TODO: nXChFollow; following character 0 - tab, 1 - space, 2 - nothing
2648 + _PropertyMap::const_iterator aMapIter = begin();
2649 + _PropertyMap::const_iterator aEndIter = end();
2650 + for( ; aMapIter != aEndIter; ++aMapIter )
2652 + switch( aMapIter->first.eId )
2654 + case PROP_ADJUST:
2655 + case PROP_INDENT_AT:
2656 + case PROP_FIRST_LINE_INDENT:
2657 + case PROP_FIRST_LINE_OFFSET:
2658 + case PROP_LEFT_MARGIN:
2659 + aNumberingProperties.push_back(
2660 + beans::PropertyValue( aPropNameSupplier.GetName( aMapIter->first.eId ), 0, aMapIter->second, beans::PropertyState_DIRECT_VALUE ));
2661 + break;
2662 + case PROP_CHAR_FONT_NAME:
2663 + aNumberingProperties.push_back(
2664 + beans::PropertyValue( aPropNameSupplier.GetName( PROP_BULLET_FONT_NAME ), 0, aMapIter->second, beans::PropertyState_DIRECT_VALUE ));
2665 + break;
2666 + default:
2668 + // Handled in GetCharStyleProperties method
2674 + uno::Sequence< beans::PropertyValue > aRet(aNumberingProperties.size());
2675 + beans::PropertyValue* pValues = aRet.getArray();
2676 + PropertyValueVector_t::const_iterator aIt = aNumberingProperties.begin();
2677 + PropertyValueVector_t::const_iterator aEndIt = aNumberingProperties.end();
2678 + for(sal_uInt32 nIndex = 0; aIt != aEndIt; ++aIt,++nIndex)
2680 + pValues[nIndex] = *aIt;
2682 + return aRet;
2685 +uno::Sequence< beans::PropertyValue > ListLevel::GetParaProperties( )
2687 + PropertyNameSupplier& aPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
2689 + uno::Sequence< beans::PropertyValue > aParaProps = m_pParaStyle->pProperties->GetPropertyValues( );
2690 + uno::Sequence< beans::PropertyValue > aProps;
2692 + // ParaFirstLineIndent -> FirstLineIndent
2693 + // ParaLeftMargin -> IndentAt
2695 + OUString sParaIndent = aPropNameSupplier.GetName(
2696 + PROP_PARA_FIRST_LINE_INDENT );
2697 + OUString sFirstLineIndent = aPropNameSupplier.GetName(
2698 + PROP_FIRST_LINE_INDENT );
2699 + OUString sParaLeftMargin = aPropNameSupplier.GetName(
2700 + PROP_PARA_LEFT_MARGIN );
2701 + OUString sIndentAt = aPropNameSupplier.GetName(
2702 + PROP_INDENT_AT );
2704 + sal_Int32 nLen = aParaProps.getLength( );
2705 + for ( sal_Int32 i = 0; i < nLen; i++ )
2707 + if ( aParaProps[i].Name.equals( sParaIndent ) )
2709 + aProps.realloc( aProps.getLength() + 1 );
2710 + aProps[aProps.getLength( ) - 1] = aParaProps[i];
2711 + aProps[aProps.getLength( ) - 1].Name = sFirstLineIndent;
2713 + else if ( aParaProps[i].Name.equals( sParaLeftMargin ) )
2715 + aProps.realloc( aProps.getLength() + 1 );
2716 + aProps[aProps.getLength( ) - 1] = aParaProps[i];
2717 + aProps[aProps.getLength( ) - 1].Name = sIndentAt;
2722 + return aProps;
2725 +//--------------------------------------- AbstractListDef implementation
2727 +AbstractListDef::AbstractListDef( ) :
2728 + m_nTPLC( -1 )
2729 + ,m_nSimpleList( -1 )
2730 + ,m_nRestart( -1 )
2731 + ,m_nUnsigned( -1 )
2732 + ,m_nId( -1 )
2736 +AbstractListDef::~AbstractListDef( )
2740 +void AbstractListDef::SetValue( sal_uInt32 nSprmId, sal_Int32 nValue )
2742 + switch( nSprmId )
2744 + case NS_rtf::LN_TPLC:
2745 + m_nTPLC = nValue;
2746 + break;
2747 + case NS_rtf::LN_FSIMPLELIST:
2748 + m_nSimpleList = nValue;
2749 + break;
2750 + case NS_rtf::LN_FRESTARTHDN:
2751 + m_nRestart = nValue;
2752 + break;
2753 + case NS_rtf::LN_UNSIGNED26_2:
2754 + m_nUnsigned = nValue;
2755 + break;
2756 + default:
2757 + OSL_ENSURE( false, "this line should never be reached");
2761 +ListLevel::Pointer AbstractListDef::GetLevel( sal_uInt16 nLvl )
2763 + ListLevel::Pointer pLevel;
2764 + if ( m_aLevels.size( ) > nLvl )
2765 + pLevel = m_aLevels[ nLvl ];
2766 + return pLevel;
2769 +void AbstractListDef::AddLevel( )
2771 + ListLevel::Pointer pLevel( new ListLevel );
2772 + m_pCurrentLevel = pLevel;
2773 + m_aLevels.push_back( pLevel );
2776 +uno::Sequence< uno::Sequence< beans::PropertyValue > > AbstractListDef::GetPropertyValues( )
2778 + uno::Sequence< uno::Sequence< beans::PropertyValue > > result( sal_Int32( m_aLevels.size( ) ) );
2779 + uno::Sequence< beans::PropertyValue >* aResult = result.getArray( );
2781 + int nLevels = m_aLevels.size( );
2782 + for ( int i = 0; i < nLevels; i++ )
2784 + aResult[i] = m_aLevels[i]->GetProperties( );
2787 + return result;
2790 +//---------------------------------------------- ListDef implementation
2792 +ListDef::ListDef( ) : AbstractListDef( )
2796 +ListDef::~ListDef( )
2800 +OUString ListDef::GetStyleName( sal_Int32 nId )
2802 + OUString sStyleName( OUString::createFromAscii( "WWNum" ) );
2803 + sStyleName += OUString::valueOf( nId );
2805 + return sStyleName;
2808 +uno::Sequence< uno::Sequence< beans::PropertyValue > > ListDef::GetPropertyValues( )
2810 + // [1] Call the same method on the abstract list
2811 + uno::Sequence< uno::Sequence< beans::PropertyValue > > aAbstract = m_pAbstractDef->GetPropertyValues( );
2813 + // [2] Call the upper class method
2814 + uno::Sequence< uno::Sequence< beans::PropertyValue > > aThis = AbstractListDef::GetPropertyValues( );
2816 + // Merge the results of [2] in [1]
2817 + sal_Int32 nThisCount = aThis.getLength( );
2818 + for ( sal_Int32 i = 0; i < nThisCount; i++ )
2820 + uno::Sequence< beans::PropertyValue > level = aThis[i];
2821 + if ( level.getLength( ) == 0 )
2823 + // If the the element contains something, merge it
2824 + lcl_mergeProperties( level, aAbstract[i] );
2828 + return aAbstract;
2831 +uno::Reference< container::XNameContainer > lcl_getUnoNumberingStyles(
2832 + uno::Reference< lang::XMultiServiceFactory > xFactory )
2834 + uno::Reference< container::XNameContainer > xStyles;
2836 + try
2838 + uno::Reference< style::XStyleFamiliesSupplier > xFamilies( xFactory, uno::UNO_QUERY_THROW );
2839 + uno::Any oFamily = xFamilies->getStyleFamilies( )->getByName( OUString::createFromAscii( "NumberingStyles" ) );
2841 + oFamily >>= xStyles;
2843 + catch ( const uno::Exception )
2847 + return xStyles;
2850 +void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
2851 + uno::Reference< lang::XMultiServiceFactory> xFactory )
2853 + // Get the UNO Numbering styles
2854 + uno::Reference< container::XNameContainer > xStyles = lcl_getUnoNumberingStyles( xFactory );
2856 + // Do the whole thing
2857 + if( !m_xNumRules.is() && xFactory.is() && xStyles.is( ) )
2859 + try
2861 + // Create the numbering style
2862 + uno::Reference< beans::XPropertySet > xStyle (
2863 + xFactory->createInstance(
2864 + OUString::createFromAscii("com.sun.star.style.NumberingStyle")),
2865 + uno::UNO_QUERY_THROW );
2867 + rtl::OUString sStyleName = GetStyleName( GetId( ) );
2868 +#if DEBUG
2869 + fprintf( stderr, "Creating numbering style: %s\n", OUSTR_TO_C( sStyleName ) );
2870 +#endif
2872 + xStyles->insertByName( sStyleName, makeAny( xStyle ) );
2874 + uno::Any oStyle = xStyles->getByName( sStyleName );
2875 + xStyle.set( oStyle, uno::UNO_QUERY_THROW );
2877 + PropertyNameSupplier& aPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
2879 + // Get the default OOo Numbering style rules
2880 + uno::Any aRules = xStyle->getPropertyValue( aPropNameSupplier.GetName( PROP_NUMBERING_RULES ) );
2881 + aRules >>= m_xNumRules;
2883 + uno::Sequence< uno::Sequence< beans::PropertyValue > > aProps = GetPropertyValues( );
2885 + sal_Int32 nAbstLevels = m_pAbstractDef->Size( );
2886 + sal_Int16 nLevel = 0;
2887 + while ( nLevel < nAbstLevels )
2889 + ListLevel::Pointer pAbsLevel = m_pAbstractDef->GetLevel( nLevel );
2890 + ListLevel::Pointer pLevel = GetLevel( nLevel );
2892 + // Get the merged level properties
2893 + uno::Sequence< beans::PropertyValue > aLvlProps = aProps[sal_Int32( nLevel )];
2895 + // Get the char style
2896 + uno::Sequence< beans::PropertyValue > aAbsCharStyleProps = pAbsLevel->GetCharStyleProperties( );
2897 + uno::Sequence< beans::PropertyValue >& rAbsCharStyleProps = aAbsCharStyleProps;
2898 + if ( pLevel.get( ) )
2900 + uno::Sequence< beans::PropertyValue > aCharStyleProps =
2901 + pLevel->GetCharStyleProperties( );
2902 + uno::Sequence< beans::PropertyValue >& rCharStyleProps = aCharStyleProps;
2903 + lcl_mergeProperties( rAbsCharStyleProps, rCharStyleProps );
2906 + if( aAbsCharStyleProps.getLength() )
2908 + // Change the sequence into a vector
2909 + PropertyValueVector_t aStyleProps;
2910 + for ( sal_Int32 i = 0, nLen = aAbsCharStyleProps.getLength() ; i < nLen; i++ )
2912 + aStyleProps.push_back( aAbsCharStyleProps[i] );
2915 + //create (or find) a character style containing the character
2916 + // attributes of the symbol and apply it to the numbering level
2917 + OUString sStyle = rDMapper.getOrCreateCharStyle( aStyleProps );
2918 + aLvlProps.realloc( aLvlProps.getLength() + 1);
2919 + aLvlProps[aLvlProps.getLength() - 1].Name = aPropNameSupplier.GetName( PROP_CHAR_STYLE_NAME );
2920 + aLvlProps[aLvlProps.getLength() - 1].Value <<= sStyle;
2921 + }
2923 + // Get the prefix / suffix / Parent numbering
2924 + // and add them to the level properties
2925 + OUString sText = pAbsLevel->GetBulletChar( );
2926 + if ( pLevel.get( ) )
2927 + sText = pLevel->GetBulletChar( );
2929 + OUString sPrefix;
2930 + OUString sSuffix;
2931 + OUString& rPrefix = sPrefix;
2932 + OUString& rSuffix = sSuffix;
2933 + sal_Int16 nParentNum = ListLevel::GetParentNumbering(
2934 + sText, nLevel, rPrefix, rSuffix );
2936 + aLvlProps.realloc( aLvlProps.getLength( ) + 4 );
2937 + aLvlProps[ aLvlProps.getLength( ) - 4 ] = MAKE_PROPVAL( PROP_PREFIX, rPrefix );
2938 + aLvlProps[ aLvlProps.getLength( ) - 3 ] = MAKE_PROPVAL( PROP_SUFFIX, rSuffix );
2939 + aLvlProps[ aLvlProps.getLength( ) - 2 ] = MAKE_PROPVAL( PROP_PARENT_NUMBERING, nParentNum );
2941 + aLvlProps[ aLvlProps.getLength( ) - 1 ] = MAKE_PROPVAL( PROP_POSITION_AND_SPACE_MODE,
2942 + sal_Int16( text::PositionAndSpaceMode::LABEL_ALIGNMENT ) );
2943 + // Replace the numbering rules for the level
2944 + m_xNumRules->replaceByIndex( nLevel, uno::makeAny( aLvlProps ) );
2946 + // Handle the outline level here
2947 + StyleSheetEntryPtr pParaStyle = pAbsLevel->GetParaStyle( );
2948 + if ( pParaStyle.get( ) )
2950 + uno::Reference< text::XChapterNumberingSupplier > xOutlines (
2951 + xFactory, uno::UNO_QUERY_THROW );
2952 + uno::Reference< container::XIndexReplace > xOutlineRules =
2953 + xOutlines->getChapterNumberingRules( );
2955 + aLvlProps.realloc( aLvlProps.getLength() + 1 );
2956 + aLvlProps[aLvlProps.getLength( ) - 1] = MAKE_PROPVAL( PROP_HEADING_STYLE_NAME, pParaStyle->sConvertedStyleName );
2958 + xOutlineRules->replaceByIndex( nLevel, uno::makeAny( aLvlProps ) );
2961 + nLevel++;
2964 + // Create the numbering style for these rules
2965 + OUString sNumRulesName = aPropNameSupplier.GetName( PROP_NUMBERING_RULES );
2966 + xStyle->setPropertyValue( sNumRulesName, uno::makeAny( m_xNumRules ) );
2968 + catch( const uno::Exception& rEx)
2970 + OSL_ENSURE( false, "ListTable::CreateNumberingRules");
2976 +//------------------------------------- NumberingManager implementation
2979 +ListsManager::ListsManager( DomainMapper& rDMapper,
2980 + const uno::Reference< lang::XMultiServiceFactory > xFactory ) :
2981 + m_rDMapper( rDMapper ),
2982 + m_xFactory( xFactory )
2986 +ListsManager::~ListsManager( )
2990 +void ListsManager::attribute( Id nName, Value& rVal )
2992 + OSL_ENSURE( m_pCurrentDefinition.get(), "current entry has to be set here");
2993 + if(!m_pCurrentDefinition.get())
2994 + return ;
2995 + int nIntValue = rVal.getInt();
2997 + ListLevel::Pointer pCurrentLvl = m_pCurrentDefinition->GetCurrentLevel( );
3000 + /* WRITERFILTERSTATUS: table: ListTable_attributedata */
3001 + switch(nName)
3003 + /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
3004 + case NS_rtf::LN_RGBXCHNUMS:
3005 + if(pCurrentLvl.get())
3006 + pCurrentLvl->AddRGBXchNums( rVal.getString( ) );
3007 + break;
3008 + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
3009 + case NS_ooxml::LN_CT_LevelText_val:
3010 + {
3011 + //this strings contains the definition of the level
3012 + //the level number is marked as %n
3013 + //these numbers can be mixed randomly toghether with seperators pre- and suffixes
3014 + //the Writer supports only a number of upper levels to show, separators is always a dot
3015 + //and each level can have a prefix and a suffix
3016 + if(pCurrentLvl.get())
3017 + pCurrentLvl->SetBulletChar( rVal.getString() );
3019 + break;
3020 +// case NS_rtf::LN_ISTD: break;
3021 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3022 + case NS_rtf::LN_ISTARTAT:
3023 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3024 + case NS_rtf::LN_NFC:
3025 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3026 + case NS_rtf::LN_JC:
3027 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3028 + case NS_rtf::LN_FLEGAL:
3029 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3030 + case NS_rtf::LN_FNORESTART:
3031 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3032 + case NS_rtf::LN_FPREV:
3033 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3034 + case NS_rtf::LN_FPREVSPACE:
3035 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3036 + case NS_rtf::LN_FWORD6:
3037 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3038 + case NS_rtf::LN_IXCHFOLLOW:
3039 + if ( pCurrentLvl.get( ) )
3040 + pCurrentLvl->SetValue( nName, sal_Int32( nIntValue ) );
3041 + break;
3042 + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
3043 + case NS_rtf::LN_UNUSED5_7:
3044 + //unused
3045 + break;
3046 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3047 + case NS_rtf::LN_RGISTD:
3048 + m_pCurrentDefinition->AddRGISTD( rVal.getString() );
3049 + break;
3050 + case NS_ooxml::LN_CT_Num_numId:
3051 + m_pCurrentDefinition->SetId( rVal.getString().toInt32( ) );
3052 + break;
3053 + case NS_rtf::LN_LSID:
3054 + m_pCurrentDefinition->SetId( nIntValue );
3055 + break;
3056 + case NS_rtf::LN_TPLC:
3057 + case NS_rtf::LN_FSIMPLELIST:
3058 + case NS_rtf::LN_FRESTARTHDN:
3059 + case NS_rtf::LN_UNSIGNED26_2:
3060 + m_pCurrentDefinition->SetValue( nName, nIntValue );
3061 + break;
3062 + case NS_ooxml::LN_CT_NumLvl_ilvl:
3063 + case NS_rtf::LN_LISTLEVEL:
3065 + //add a new level to the level vector and make it the current one
3066 + m_pCurrentDefinition->AddLevel();
3068 + writerfilter::Reference<Properties>::Pointer_t pProperties;
3069 + if((pProperties = rVal.getProperties()).get())
3070 + pProperties->resolve(*this);
3072 + break;
3073 + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
3074 + case NS_ooxml::LN_CT_AbstractNum_abstractNumId:
3075 + {
3076 + // This one corresponds to the AbstractNum Id definition
3077 + // The reference to the abstract num is in the sprm method
3078 + sal_Int32 nVal = rVal.getString().toInt32();
3079 + m_pCurrentDefinition->SetId( nVal );
3081 + break;
3082 + case NS_ooxml::LN_CT_Ind_left:
3083 + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3084 + pCurrentLvl->Insert(
3085 + PROP_INDENT_AT, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
3086 + break;
3087 + case NS_ooxml::LN_CT_Ind_hanging:
3088 + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3089 + pCurrentLvl->Insert(
3090 + PROP_FIRST_LINE_INDENT, true, uno::makeAny( - ConversionHelper::convertTwipToMM100( nIntValue ) ));
3091 + break;
3092 + case NS_ooxml::LN_CT_Ind_firstLine:
3093 + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */
3094 + pCurrentLvl->Insert(
3095 + PROP_FIRST_LINE_INDENT, true, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ));
3096 + break;
3097 + case NS_ooxml::LN_CT_Lvl_ilvl: //overrides previous level - unsupported
3098 + case NS_ooxml::LN_CT_Lvl_tplc: //template code - unsupported
3099 + case NS_ooxml::LN_CT_Lvl_tentative: //marks level as unused in the document - unsupported
3100 + break;
3101 + case NS_ooxml::LN_CT_TabStop_pos:
3103 + //no paragraph attributes in ListTable char style sheets
3104 + if ( pCurrentLvl.get( ) )
3105 + pCurrentLvl->SetValue( nName,
3106 + ConversionHelper::convertTwipToMM100( nIntValue ) );
3108 + break;
3109 + case NS_ooxml::LN_CT_TabStop_val:
3111 + // TODO Do something of that
3113 + break;
3114 + default:
3116 +#if OSL_DEBUG_LEVEL > 0
3117 + ::rtl::OString sMessage( "ListTable::attribute() - Id: ");
3118 + sMessage += ::rtl::OString::valueOf( sal_Int32( nName ), 10 );
3119 + sMessage += ::rtl::OString(" / 0x");
3120 + sMessage += ::rtl::OString::valueOf( sal_Int32( nName ), 16 );
3121 + sMessage += ::rtl::OString(" value: ");
3122 + sMessage += ::rtl::OString::valueOf( sal_Int32( nIntValue ), 10 );
3123 + sMessage += ::rtl::OString(" / 0x");
3124 + sMessage += ::rtl::OString::valueOf( sal_Int32( nIntValue ), 16 );
3125 + OSL_ENSURE( false, sMessage.getStr()); //
3126 +#endif
3131 +void ListsManager::sprm( Sprm& rSprm )
3133 + //fill the attributes of the style sheet
3134 + sal_uInt32 nSprmId = rSprm.getId();
3135 + if( m_pCurrentDefinition.get() ||
3136 + nSprmId == NS_ooxml::LN_CT_Numbering_abstractNum ||
3137 + nSprmId == NS_ooxml::LN_CT_Numbering_num )
3139 + sal_Int32 nIntValue = rSprm.getValue()->getInt();
3140 + /* WRITERFILTERSTATUS: table: ListTable_sprm */
3141 + switch( nSprmId )
3143 + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
3144 + case NS_ooxml::LN_CT_Numbering_abstractNum:
3146 + writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
3147 + if(pProperties.get())
3149 + //create a new Abstract list entry
3150 + OSL_ENSURE( !m_pCurrentDefinition.get(), "current entry has to be NULL here");
3151 + m_pCurrentDefinition.reset( new AbstractListDef );
3152 + pProperties->resolve( *this );
3153 + //append it to the table
3154 + m_aAbstractLists.push_back( m_pCurrentDefinition );
3155 + m_pCurrentDefinition = AbstractListDef::Pointer();
3158 + break;
3159 + /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
3160 + case NS_ooxml::LN_CT_Numbering_num:
3162 + writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
3163 + if(pProperties.get())
3165 + // Create a new list entry
3166 + OSL_ENSURE( !m_pCurrentDefinition.get(), "current entry has to be NULL here");
3167 + ListDef::Pointer listDef( new ListDef );
3168 + m_pCurrentDefinition = listDef;
3169 + pProperties->resolve( *this );
3170 + //append it to the table
3171 + m_aLists.push_back( listDef );
3173 + m_pCurrentDefinition = AbstractListDef::Pointer();
3176 + break;
3177 + case NS_ooxml::LN_CT_Num_abstractNumId:
3179 + sal_Int32 nAbstractNumId = rSprm.getValue()->getInt();
3180 + ListDef* pListDef = dynamic_cast< ListDef* >( m_pCurrentDefinition.get( ) );
3181 + if ( pListDef != NULL )
3183 + // The current def should be a ListDef
3184 + pListDef->SetAbstractDefinition(
3185 + m_aAbstractLists[ nAbstractNumId ] );
3188 + break;
3189 + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
3190 + case NS_ooxml::LN_CT_AbstractNum_multiLevelType:
3191 + break;
3192 + /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */
3193 + case NS_rtf::LN_TPLC:
3194 + m_pCurrentDefinition->SetValue( nSprmId, nIntValue );
3195 + break;
3196 + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */
3197 + case NS_ooxml::LN_CT_AbstractNum_lvl:
3199 + m_pCurrentDefinition->AddLevel();
3200 + writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
3201 + if(pProperties.get())
3202 + pProperties->resolve(*this);
3204 + break;
3205 + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
3206 + case NS_rtf::LN_RGBXCHNUMS: break;
3207 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3208 + case NS_rtf::LN_ISTARTAT:
3209 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3210 + case NS_rtf::LN_NFC:
3211 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3212 + case NS_rtf::LN_JC:
3213 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3214 + case NS_rtf::LN_FLEGAL:
3215 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3216 + case NS_rtf::LN_FNORESTART:
3217 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3218 + case NS_rtf::LN_FPREV:
3219 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3220 + case NS_rtf::LN_FPREVSPACE:
3221 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3222 + case NS_rtf::LN_FWORD6:
3223 + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */
3224 + case NS_rtf::LN_IXCHFOLLOW:
3225 + m_pCurrentDefinition->GetCurrentLevel( )->SetValue( nSprmId, nIntValue );
3226 + break;
3227 + case NS_ooxml::LN_CT_Lvl_lvlText:
3228 + case NS_ooxml::LN_CT_Lvl_rPr : //contains LN_EG_RPrBase_rFonts
3229 + {
3230 + writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
3231 + if(pProperties.get())
3232 + pProperties->resolve(*this);
3234 + break;
3235 + case NS_ooxml::LN_CT_NumLvl_lvl:
3236 + {
3237 + // overwrite level
3238 + writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
3239 + if(pProperties.get())
3240 + pProperties->resolve(*this);
3242 + break;
3243 + case NS_ooxml::LN_CT_Lvl_lvlJc:
3245 + static sal_Int16 aWWAlignments[ ] =
3247 + text::HoriOrientation::LEFT,
3248 + text::HoriOrientation::CENTER,
3249 + text::HoriOrientation::RIGHT
3250 + };
3251 + m_pCurrentDefinition->GetCurrentLevel( )->Insert(
3252 + PROP_ADJUST, true, uno::makeAny( aWWAlignments[ nIntValue ] ) );
3253 + writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
3255 + break;
3256 + case NS_ooxml::LN_CT_Lvl_pPr:
3257 + case NS_ooxml::LN_CT_PPrBase_ind:
3258 + {
3259 + //todo: how to handle paragraph properties within numbering levels (except LeftIndent and FirstLineIndent)?
3260 + writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
3261 + if(pProperties.get())
3262 + pProperties->resolve(*this);
3264 + break;
3265 + case NS_ooxml::LN_CT_PPrBase_tabs:
3266 + case NS_ooxml::LN_CT_Tabs_tab:
3268 + writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
3269 + if(pProperties.get())
3270 + pProperties->resolve(*this);
3272 + break;
3273 + case NS_ooxml::LN_CT_Lvl_suff:
3274 + //todo: currently unsupported suffix
3275 + //can be: "none", "space", "tab"
3276 + break;
3277 + case NS_ooxml::LN_CT_Lvl_pStyle:
3279 + OUString sStyleName = rSprm.getValue( )->getString( );
3280 + ListLevel::Pointer pLevel = m_pCurrentDefinition->GetCurrentLevel( );
3281 + StyleSheetTablePtr pStylesTable = m_rDMapper.GetStyleSheetTable( );
3282 + const StyleSheetEntryPtr pStyle = pStylesTable->FindStyleSheetByISTD( sStyleName );
3283 + pLevel->SetParaStyle( pStyle );
3285 + break;
3286 + case NS_ooxml::LN_EG_RPrBase_rFonts: //contains font properties
3287 + case NS_ooxml::LN_EG_RPrBase_color:
3288 + case NS_ooxml::LN_EG_RPrBase_u:
3289 + case NS_sprm::LN_CHps: // sprmCHps
3290 + case NS_ooxml::LN_EG_RPrBase_lang:
3291 + case NS_ooxml::LN_EG_RPrBase_eastAsianLayout:
3292 + //no break!
3293 + default:
3294 + if( m_pCurrentDefinition->GetCurrentLevel( ).get())
3296 + m_rDMapper.PushListProperties( m_pCurrentDefinition->GetCurrentLevel( ) );
3297 + m_rDMapper.sprm( rSprm );
3298 + m_rDMapper.PopListProperties();
3300 + }
3304 +void ListsManager::entry( int /* pos */,
3305 + writerfilter::Reference<Properties>::Pointer_t ref )
3307 + if( m_rDMapper.IsOOXMLImport() )
3309 + ref->resolve(*this);
3311 + else
3313 + if ( m_bIsLFOImport )
3315 + // Create ListDef's
3316 + OSL_ENSURE( !m_pCurrentDefinition.get(), "current entry has to be NULL here");
3317 + ListDef::Pointer pList( new ListDef() );
3318 + m_pCurrentDefinition = pList;
3319 + ref->resolve(*this);
3320 + //append it to the table
3321 + m_aLists.push_back( pList );
3322 + m_pCurrentDefinition = AbstractListDef::Pointer();
3324 + else
3326 + // Create AbstractListDef's
3327 + OSL_ENSURE( !m_pCurrentDefinition.get(), "current entry has to be NULL here");
3328 + m_pCurrentDefinition.reset( new AbstractListDef( ) );
3329 + ref->resolve(*this);
3330 + //append it to the table
3331 + m_aAbstractLists.push_back( m_pCurrentDefinition );
3332 + m_pCurrentDefinition = AbstractListDef::Pointer();
3338 +ListDef::Pointer ListsManager::GetList( sal_Int32 nId )
3340 + ListDef::Pointer pList;
3342 + int nLen = m_aLists.size( );
3343 + int i = 0;
3344 + while ( !pList.get( ) && i < nLen )
3346 + if ( m_aLists[i]->GetId( ) == nId )
3347 + pList = m_aLists[i];
3348 + i++;
3351 + return pList;
3354 +void ListsManager::CreateNumberingRules( )
3356 + // Loop over the definitions
3357 + std::vector< ListDef::Pointer >::iterator listIt = m_aLists.begin( );
3358 + for ( ; listIt != m_aLists.end( ); listIt++ )
3360 + (*listIt)->CreateNumberingRules( m_rDMapper, m_xFactory );
3364 +} }
3365 diff --git writerfilter/source/dmapper/NumberingManager.hxx writerfilter/source/dmapper/NumberingManager.hxx
3366 new file mode 100644
3367 index 0000000..0f93c27
3368 --- /dev/null
3369 +++ writerfilter/source/dmapper/NumberingManager.hxx
3370 @@ -0,0 +1,224 @@
3371 +#ifndef INCLUDED_NUMBERINGMANAGER_HXX
3372 +#define INCLUDED_NUMBERINGMANAGER_HXX
3374 +#include "PropertyMap.hxx"
3376 +#include <WriterFilterDllApi.hxx>
3377 +#include <dmapper/DomainMapper.hxx>
3378 +#include <resourcemodel/WW8ResourceModel.hxx>
3380 +#include <com/sun/star/container/XIndexReplace.hpp>
3382 +namespace writerfilter {
3383 +namespace dmapper {
3385 +class DomainMapper;
3386 +class StyleSheetEntry;
3389 +/** Class representing the numbering level properties.
3390 + */
3391 +class ListLevel : public PropertyMap
3393 + sal_Int32 m_nIStartAt; //LN_ISTARTAT
3394 + sal_Int32 m_nNFC; //LN_NFC
3395 + sal_Int32 m_nJC; //LN_JC
3396 + sal_Int32 m_nFLegal; //LN_FLEGAL
3397 + sal_Int32 m_nFNoRestart; //LN_FNORESTART
3398 + sal_Int32 m_nFPrev; //LN_FPREV
3399 + sal_Int32 m_nFPrevSpace; //LN_FPREVSPACE
3400 + sal_Int32 m_nFWord6; //LN_FWORD6
3401 + ::rtl::OUString m_sRGBXchNums; //LN_RGBXCHNUMS
3402 + sal_Int32 m_nXChFollow; //LN_IXCHFOLLOW
3403 + ::rtl::OUString m_sBulletChar;
3404 + sal_Int32 m_nTabstop;
3405 + boost::shared_ptr< StyleSheetEntry > m_pParaStyle;
3407 +public:
3409 + typedef boost::shared_ptr< ListLevel > Pointer;
3411 + ListLevel() :
3412 + m_nIStartAt(-1)
3413 + ,m_nNFC(-1)
3414 + ,m_nJC(-1)
3415 + ,m_nFLegal(-1)
3416 + ,m_nFNoRestart(-1)
3417 + ,m_nFPrev(-1)
3418 + ,m_nFPrevSpace(-1)
3419 + ,m_nFWord6(-1)
3420 + ,m_nXChFollow(-1)
3421 + ,m_nTabstop( 0 )
3422 + {}
3424 + ~ListLevel( ){ }
3426 + // Setters for the import
3427 + void SetValue( Id nId, sal_Int32 nValue );
3428 + void SetBulletChar( rtl::OUString sValue ) { m_sBulletChar = sValue; };
3429 + void SetParaStyle( boost::shared_ptr< StyleSheetEntry > pStyle )
3430 + {
3431 + m_pParaStyle = pStyle;
3432 + };
3433 + void AddRGBXchNums( rtl::OUString sValue ) { m_sRGBXchNums += sValue; };
3435 + // Getters
3436 + rtl::OUString GetBulletChar( ) { return m_sBulletChar; };
3437 + boost::shared_ptr< StyleSheetEntry > GetParaStyle( ) { return m_pParaStyle; };
3439 + // UNO mapping functions
3441 + // rPrefix and rSuffix are out parameters
3442 + static sal_Int16 GetParentNumbering( rtl::OUString sText, sal_Int16 nLevel,
3443 + rtl::OUString& rPrefix, rtl::OUString& rSuffix );
3445 + com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >
3446 + GetProperties( );
3448 + com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue>
3449 + GetCharStyleProperties( );
3450 +private:
3452 + com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >
3453 + GetLevelProperties( );
3455 + com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >
3456 + GetParaProperties( );
3459 +class AbstractListDef
3461 +private:
3462 + sal_Int32 m_nTPLC; //LN_TPLC
3463 + ::rtl::OUString m_sRGISTD; //LN_RGISTD
3464 + sal_Int32 m_nSimpleList; //LN_FSIMPLELIST
3465 + sal_Int32 m_nRestart; //LN_FRESTARTHDN
3466 + sal_Int32 m_nUnsigned; //LN_UNSIGNED26_2
3468 + // The ID member reflects either the abstractNumId or the numId
3469 + // depending on the use of the class
3470 + sal_Int32 m_nId;
3472 + // Properties of each level. This can also reflect the overridden
3473 + // levels of a numbering.
3474 + ::std::vector< ListLevel::Pointer > m_aLevels;
3476 + // Only used during the numberings import
3477 + ListLevel::Pointer m_pCurrentLevel;
3479 +public:
3480 + typedef boost::shared_ptr< AbstractListDef > Pointer;
3482 + AbstractListDef( );
3483 + ~AbstractListDef( );
3485 + // Setters using during the import
3486 + void SetId( sal_Int32 nId ) { m_nId = nId; };
3487 + void SetValue( sal_uInt32 nSprmId, sal_Int32 nValue );
3488 + void AddRGISTD( rtl::OUString sValue ) { m_sRGISTD += sValue; };
3490 + // Accessors
3491 + sal_Int32 GetId( ) { return m_nId; };
3493 + sal_Int16 Size( ) { return sal_Int16( m_aLevels.size( ) ); };
3494 + ListLevel::Pointer GetLevel( sal_uInt16 nLvl );
3495 + void AddLevel( );
3497 + ListLevel::Pointer GetCurrentLevel( ) { return m_pCurrentLevel; };
3499 + virtual com::sun::star::uno::Sequence<
3500 + com::sun::star::uno::Sequence<
3501 + com::sun::star::beans::PropertyValue > > GetPropertyValues( );
3504 +class ListDef : public AbstractListDef
3506 +private:
3507 + // Pointer to the abstract numbering
3508 + AbstractListDef::Pointer m_pAbstractDef;
3510 + // Cache for the UNO numbering rules
3511 + uno::Reference< container::XIndexReplace > m_xNumRules;
3513 +public:
3514 + typedef boost::shared_ptr< ListDef > Pointer;
3516 + ListDef( );
3517 + ~ListDef( );
3519 + // Accessors
3520 + void SetAbstractDefinition( AbstractListDef::Pointer pAbstract ) { m_pAbstractDef = pAbstract; };
3521 + AbstractListDef::Pointer GetAbstractDefinition( ) { return m_pAbstractDef; };
3523 + // Mapping functions
3524 + static rtl::OUString GetStyleName( sal_Int32 nId );
3526 + com::sun::star::uno::Sequence<
3527 + com::sun::star::uno::Sequence<
3528 + com::sun::star::beans::PropertyValue > > GetPropertyValues( );
3530 + void CreateNumberingRules(
3531 + DomainMapper& rDMapper,
3532 + com::sun::star::uno::Reference<
3533 + com::sun::star::lang::XMultiServiceFactory> xFactory );
3535 + ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace >
3536 + GetNumberingRules( ) { return m_xNumRules; };
3540 +/** This class provides access to the defined numbering styles.
3541 + */
3542 +class WRITERFILTER_DLLPRIVATE ListsManager :
3543 + public Properties,
3544 + public Table
3546 +private:
3548 + DomainMapper& m_rDMapper;
3549 + com::sun::star::uno::Reference<
3550 + com::sun::star::lang::XMultiServiceFactory > m_xFactory;
3552 + // The numbering entries
3553 + std::vector< AbstractListDef::Pointer > m_aAbstractLists;
3554 + std::vector< ListDef::Pointer > m_aLists;
3557 + // These members are used for import only
3558 + AbstractListDef::Pointer m_pCurrentDefinition;
3559 + bool m_bIsLFOImport;
3561 +public:
3563 + ListsManager(
3564 + DomainMapper& rDMapper,
3565 + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory);
3566 + virtual ~ListsManager();
3568 + typedef boost::shared_ptr< ListsManager > Pointer;
3570 + // Properties
3571 + virtual void attribute( Id nName, Value & rVal );
3572 + virtual void sprm(Sprm & sprm);
3574 + // Table
3575 + virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref);
3577 + // Config methods
3578 + void SetLFOImport( bool bLFOImport ) { m_bIsLFOImport = bLFOImport; };
3580 + // Numberings accessors
3581 + AbstractListDef::Pointer GetCurrentDef( ) { return m_pCurrentDefinition; };
3583 + sal_uInt32 Size() const
3584 + { return sal_uInt32( m_aLists.size( ) ); };
3585 + ListDef::Pointer GetList( sal_Int32 nId );
3587 + // Mapping methods
3588 + void CreateNumberingRules( );
3591 +} }
3593 +#endif
3595 diff --git writerfilter/source/dmapper/PropertyIds.cxx writerfilter/source/dmapper/PropertyIds.cxx
3596 index 9e54c06..74c6f5d 100644
3597 --- writerfilter/source/dmapper/PropertyIds.cxx
3598 +++ writerfilter/source/dmapper/PropertyIds.cxx
3599 @@ -322,7 +322,7 @@ const rtl::OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const
3600 case PROP_OUTLINE_LEVEL : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OutlineLevel")); break;
3601 case PROP_LISTTAB_STOP_POSITION : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ListtabStopPosition")); break;
3602 case PROP_POSITION_AND_SPACE_MODE : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PositionAndSpaceMode")); break;
3603 -// case : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break;
3604 + case PROP_HEADING_STYLE_NAME: sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")); break;
3605 // case : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break;
3606 // case : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break;
3607 // case : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break;
3608 diff --git writerfilter/source/dmapper/PropertyIds.hxx writerfilter/source/dmapper/PropertyIds.hxx
3609 index b46e502..f0c52ba 100644
3610 --- writerfilter/source/dmapper/PropertyIds.hxx
3611 +++ writerfilter/source/dmapper/PropertyIds.hxx
3612 @@ -285,6 +285,7 @@ enum PropertyIds
3613 /*246*/ ,PROP_OUTLINE_LEVEL
3614 /*247*/ ,PROP_LISTTAB_STOP_POSITION
3615 /*248*/ ,PROP_POSITION_AND_SPACE_MODE
3616 +/*249*/ ,PROP_HEADING_STYLE_NAME
3618 struct PropertyNameSupplier_Impl;
3619 class PropertyNameSupplier
3620 diff --git writerfilter/source/dmapper/StyleSheetTable.cxx writerfilter/source/dmapper/StyleSheetTable.cxx
3621 index 2d200c4..69a551b 100644
3622 --- writerfilter/source/dmapper/StyleSheetTable.cxx
3623 +++ writerfilter/source/dmapper/StyleSheetTable.cxx
3624 @@ -29,7 +29,7 @@
3625 ************************************************************************/
3626 #include <StyleSheetTable.hxx>
3627 #include <dmapper/DomainMapper.hxx>
3628 -#include <ListTable.hxx>
3629 +#include <NumberingManager.hxx>
3630 #include <ConversionHelper.hxx>
3631 #include <TblStylePrHandler.hxx>
3632 #include <BorderHandler.hxx>
3633 @@ -1235,44 +1235,6 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
3637 - if ( pStyleSheetProperties && pStyleSheetProperties->GetOutlineLevel( ) >= 0 )
3639 - ListTablePtr pListTable = m_pImpl->m_rDMapper.GetListTable( );
3640 - sal_Int32 nNumId = pStyleSheetProperties->GetListId( );
3641 - uno::Reference< container::XIndexReplace> xStyleRules = pListTable->GetNumberingRules( nNumId );
3642 - sal_Int16 nLvl = pStyleSheetProperties->GetOutlineLevel( );
3643 - uno::Reference< text::XChapterNumberingSupplier > xOutlines ( m_pImpl->m_xTextDocument,
3644 - uno::UNO_QUERY_THROW );
3646 - uno::Reference< container::XIndexReplace > xRules = xOutlines->getChapterNumberingRules( );
3647 - if ( xStyleRules.is( ) )
3649 - for ( sal_Int32 i = 0, nCount = xStyleRules->getCount( ); i < nCount; i++ )
3651 - xRules->replaceByIndex( i, xStyleRules->getByIndex( i ) );
3655 - uno::Any aLevel = xRules->getByIndex( nLvl );
3656 - uno::Sequence< beans::PropertyValue > aLevelProps;
3657 - aLevel >>= aLevelProps;
3659 - sal_Int32 nLen = aLevelProps.getLength( );
3660 - sal_Int32 i = 0;
3661 - bool bPropFound = false;
3662 - rtl::OUString sPropName( rtl::OUString::createFromAscii( "HeadingStyleName" ) );
3663 - while ( i < nLen && !bPropFound )
3665 - if ( aLevelProps[i].Name.equals( sPropName ) )
3667 - aLevelProps[i].Value = uno::makeAny( ConvertStyleName( pEntry->sStyleName ) );
3668 - bPropFound = true;
3670 - i++;
3672 - xRules->replaceByIndex( nLvl, uno::makeAny( aLevelProps ) );
3675 uno::Reference< beans::XPropertyState >xState( xStyle, uno::UNO_QUERY_THROW );
3676 if( sConvertedStyleName.equalsAscii( "Contents Heading" ) ||
3677 sConvertedStyleName.equalsAscii( "User Index Heading" ) ||
3678 diff --git writerfilter/source/dmapper/makefile.mk writerfilter/source/dmapper/makefile.mk
3679 index 5f42164..7a040d1 100644
3680 --- writerfilter/source/dmapper/makefile.mk
3681 +++ writerfilter/source/dmapper/makefile.mk
3682 @@ -56,8 +56,7 @@ SLOFILES= $(SLO)$/BorderHandler.obj \
3683 $(SLO)$/DomainMapperTableManager.obj \
3684 $(SLO)$/FontTable.obj \
3685 $(SLO)$/GraphicImport.obj \
3686 - $(SLO)$/LFOTable.obj \
3687 - $(SLO)$/ListTable.obj \
3688 + $(SLO)$/NumberingManager.obj \
3689 $(SLO)$/MeasureHandler.obj \
3690 $(SLO)$/PropertyMap.obj \
3691 $(SLO)$/PropertyIds.obj \
3692 diff --git writerfilter/source/doctok/WW8DocumentImpl.cxx writerfilter/source/doctok/WW8DocumentImpl.cxx
3693 index 87e08e5..3bdca2d 100644
3694 --- writerfilter/source/doctok/WW8DocumentImpl.cxx
3695 +++ writerfilter/source/doctok/WW8DocumentImpl.cxx
3696 @@ -1688,19 +1688,8 @@ void WW8DocumentImpl::resolve(Stream & rStream)
3698 #endif
3701 - writerfilter::Reference<Table>::Pointer_t pListTable = getListTable();
3703 - if (pListTable.get() != NULL)
3704 - rStream.table(NS_rtf::LN_LISTTABLE, pListTable);
3706 - writerfilter::Reference<Table>::Pointer_t pLFOTable = getLFOTable();
3708 - if (pLFOTable.get() != NULL)
3709 - rStream.table(NS_rtf::LN_LFOTABLE, pLFOTable);
3711 writerfilter::Reference<Table>::Pointer_t pFontTable = getFontTable();
3714 if (pFontTable.get() != NULL)
3715 rStream.table(NS_rtf::LN_FONTTABLE, pFontTable);
3717 @@ -1715,6 +1704,16 @@ void WW8DocumentImpl::resolve(Stream & rStream)
3719 clog << e.getText() << endl;
3722 + writerfilter::Reference<Table>::Pointer_t pListTable = getListTable();
3724 + if (pListTable.get() != NULL)
3725 + rStream.table(NS_rtf::LN_LISTTABLE, pListTable);
3727 + writerfilter::Reference<Table>::Pointer_t pLFOTable = getLFOTable();
3729 + if (pLFOTable.get() != NULL)
3730 + rStream.table(NS_rtf::LN_LFOTABLE, pLFOTable);
3733 WW8DocumentIterator::Pointer_t pIt = begin();
3734 diff --git writerfilter/source/ooxml/OOXMLDocumentImpl.cxx writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
3735 index df80785..4ae36eb 100644
3736 --- writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
3737 +++ writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
3738 @@ -326,9 +326,9 @@ void OOXMLDocumentImpl::resolve(Stream & rStream)
3740 resolveFastSubStream(rStream, OOXMLStream::SETTINGS);
3741 resolveFastSubStream(rStream, OOXMLStream::THEME);
3742 - resolveFastSubStream(rStream, OOXMLStream::NUMBERING);
3743 resolveFastSubStream(rStream, OOXMLStream::FONTTABLE);
3744 resolveFastSubStream(rStream, OOXMLStream::STYLES);
3745 + resolveFastSubStream(rStream, OOXMLStream::NUMBERING);
3747 xParser->setFastDocumentHandler( xDocumentHandler );
3748 xParser->setTokenHandler( xTokenHandler );