fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / xmloff / source / text / txtexppr.cxx
blob3a881dc490f1137269e9241cf38add6fb735d819
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <com/sun/star/table/BorderLine2.hpp>
22 #include "txtexppr.hxx"
24 #include <com/sun/star/text/SizeType.hpp>
25 #include <com/sun/star/text/WrapTextMode.hpp>
26 #include <com/sun/star/text/TextContentAnchorType.hpp>
27 #include <com/sun/star/awt/FontUnderline.hpp>
28 #include <com/sun/star/text/XChapterNumberingSupplier.hpp>
30 #include <tools/debug.hxx>
32 #include <xmloff/txtprmap.hxx>
33 #include <xmloff/xmlexp.hxx>
34 #include "XMLSectionFootnoteConfigExport.hxx"
37 using namespace ::com::sun::star;
38 using namespace ::com::sun::star::uno;
39 using namespace ::com::sun::star::style;
40 using namespace ::com::sun::star::beans;
41 using namespace ::com::sun::star::text;
43 void XMLTextExportPropertySetMapper::handleElementItem(
44 SvXMLExport& rExp,
45 const XMLPropertyState& rProperty,
46 sal_uInt16 nFlags,
47 const ::std::vector< XMLPropertyState > *pProperties,
48 sal_uInt32 nIdx ) const
50 XMLTextExportPropertySetMapper *pThis =
51 ((XMLTextExportPropertySetMapper *)this);
53 switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
55 case CTF_DROPCAPFORMAT:
56 pThis->maDropCapExport.exportXML( rProperty.maValue, bDropWholeWord,
57 sDropCharStyle );
58 pThis->bDropWholeWord = sal_False;
59 pThis->sDropCharStyle = OUString();
60 break;
62 case CTF_TABSTOP:
63 pThis->maTabStopExport.Export( rProperty.maValue );
64 break;
66 case CTF_TEXTCOLUMNS:
67 pThis->maTextColumnsExport.exportXML( rProperty.maValue );
68 break;
70 case CTF_BACKGROUND_URL:
72 DBG_ASSERT( pProperties && nIdx >= 3,
73 "property vector missing" );
74 const Any *pPos = 0, *pFilter = 0, *pTrans = 0;
75 if( pProperties && nIdx >= 3 )
77 const XMLPropertyState& rTrans = (*pProperties)[nIdx-3];
78 // #99657# transparency may be there, but doesn't have to be.
79 // If it's there, it must be in the right position.
80 if( CTF_BACKGROUND_TRANSPARENCY == getPropertySetMapper()
81 ->GetEntryContextId( rTrans.mnIndex ) )
82 pTrans = &rTrans.maValue;
84 const XMLPropertyState& rPos = (*pProperties)[nIdx-2];
85 DBG_ASSERT( CTF_BACKGROUND_POS == getPropertySetMapper()
86 ->GetEntryContextId( rPos.mnIndex ),
87 "invalid property map: pos expected" );
88 if( CTF_BACKGROUND_POS == getPropertySetMapper()
89 ->GetEntryContextId( rPos.mnIndex ) )
90 pPos = &rPos.maValue;
92 const XMLPropertyState& rFilter = (*pProperties)[nIdx-1];
93 DBG_ASSERT( CTF_BACKGROUND_FILTER == getPropertySetMapper()
94 ->GetEntryContextId( rFilter.mnIndex ),
95 "invalid property map: filter expected" );
96 if( CTF_BACKGROUND_FILTER == getPropertySetMapper()
97 ->GetEntryContextId( rFilter.mnIndex ) )
98 pFilter = &rFilter.maValue;
100 sal_uInt32 nPropIndex = rProperty.mnIndex;
101 pThis->maBackgroundImageExport.exportXML(
102 rProperty.maValue, pPos, pFilter, pTrans,
103 getPropertySetMapper()->GetEntryNameSpace( nPropIndex ),
104 getPropertySetMapper()->GetEntryXMLName( nPropIndex ) );
106 break;
108 case CTF_SECTION_FOOTNOTE_END:
109 XMLSectionFootnoteConfigExport::exportXML(rExp, sal_False,
110 pProperties, nIdx,
111 getPropertySetMapper());
112 break;
114 case CTF_SECTION_ENDNOTE_END:
115 XMLSectionFootnoteConfigExport::exportXML(rExp, sal_True,
116 pProperties, nIdx,
117 getPropertySetMapper());
118 break;
120 default:
121 SvXMLExportPropertyMapper::handleElementItem( rExp, rProperty, nFlags, pProperties, nIdx );
122 break;
126 void XMLTextExportPropertySetMapper::handleSpecialItem(
127 SvXMLAttributeList& rAttrList,
128 const XMLPropertyState& rProperty,
129 const SvXMLUnitConverter& rUnitConverter,
130 const SvXMLNamespaceMap& rNamespaceMap,
131 const ::std::vector< XMLPropertyState > *pProperties,
132 sal_uInt32 nIdx ) const
134 XMLTextExportPropertySetMapper *pThis =
135 ((XMLTextExportPropertySetMapper *)this);
137 switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
139 case CTF_DROPCAPWHOLEWORD:
140 DBG_ASSERT( !bDropWholeWord, "drop whole word is set already!" );
141 pThis->bDropWholeWord = *(sal_Bool *)rProperty.maValue.getValue();
142 break;
143 case CTF_DROPCAPCHARSTYLE:
144 DBG_ASSERT( sDropCharStyle.isEmpty(), "drop char style is set already!" );
145 rProperty.maValue >>= pThis->sDropCharStyle;
146 break;
147 case CTF_NUMBERINGSTYLENAME:
148 case CTF_PAGEDESCNAME:
149 case CTF_OLDTEXTBACKGROUND:
150 case CTF_BACKGROUND_POS:
151 case CTF_BACKGROUND_FILTER:
152 case CTF_BACKGROUND_TRANSPARENCY:
153 case CTF_SECTION_FOOTNOTE_NUM_OWN:
154 case CTF_SECTION_FOOTNOTE_NUM_RESTART:
155 case CTF_SECTION_FOOTNOTE_NUM_RESTART_AT:
156 case CTF_SECTION_FOOTNOTE_NUM_TYPE:
157 case CTF_SECTION_FOOTNOTE_NUM_PREFIX:
158 case CTF_SECTION_FOOTNOTE_NUM_SUFFIX:
159 case CTF_SECTION_ENDNOTE_NUM_OWN:
160 case CTF_SECTION_ENDNOTE_NUM_RESTART:
161 case CTF_SECTION_ENDNOTE_NUM_RESTART_AT:
162 case CTF_SECTION_ENDNOTE_NUM_TYPE:
163 case CTF_SECTION_ENDNOTE_NUM_PREFIX:
164 case CTF_SECTION_ENDNOTE_NUM_SUFFIX:
165 case CTF_DEFAULT_OUTLINE_LEVEL:
166 case CTF_OLD_FLOW_WITH_TEXT:
167 // There's nothing to do here!
168 break;
169 default:
170 SvXMLExportPropertyMapper::handleSpecialItem(rAttrList, rProperty, rUnitConverter, rNamespaceMap, pProperties, nIdx );
171 break;
175 XMLTextExportPropertySetMapper::XMLTextExportPropertySetMapper(
176 const UniReference< XMLPropertySetMapper >& rMapper,
177 SvXMLExport& rExp ) :
178 SvXMLExportPropertyMapper( rMapper ),
179 rExport( rExp ),
180 bDropWholeWord( sal_False ),
181 maDropCapExport( rExp ),
182 maTabStopExport( rExp ),
183 maTextColumnsExport( rExp ),
184 maBackgroundImageExport( rExp )
188 XMLTextExportPropertySetMapper::~XMLTextExportPropertySetMapper()
192 void XMLTextExportPropertySetMapper::ContextFontFilter(
193 bool bEnableFoFontFamily,
194 XMLPropertyState *pFontNameState,
195 XMLPropertyState *pFontFamilyNameState,
196 XMLPropertyState *pFontStyleNameState,
197 XMLPropertyState *pFontFamilyState,
198 XMLPropertyState *pFontPitchState,
199 XMLPropertyState *pFontCharsetState ) const
201 OUString sFamilyName;
202 OUString sStyleName;
203 FontFamily nFamily = FAMILY_DONTKNOW;
204 FontPitch nPitch = PITCH_DONTKNOW;
205 rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
207 OUString sTmp;
208 if( pFontFamilyNameState && (pFontFamilyNameState->maValue >>= sTmp ) )
209 sFamilyName = sTmp;
210 if( pFontStyleNameState && (pFontStyleNameState->maValue >>= sTmp ) )
211 sStyleName = sTmp;
213 sal_Int16 nTmp = sal_Int16();
214 if( pFontFamilyState && (pFontFamilyState->maValue >>= nTmp ) )
215 nFamily = static_cast< FontFamily >( nTmp );
216 if( pFontPitchState && (pFontPitchState->maValue >>= nTmp ) )
217 nPitch = static_cast< FontPitch >( nTmp );
218 if( pFontCharsetState && (pFontCharsetState->maValue >>= nTmp ) )
219 eEnc = (rtl_TextEncoding)nTmp;
221 //Resolves: fdo#67665 The purpose here appears to be to replace
222 //FontFamilyName and FontStyleName etc with a single FontName property. The
223 //problem is that repeated calls to here will first set
224 //pFontFamilyNameState->mnIndex to -1 to indicate it is disabled, so the
225 //next time pFontFamilyNameState is not passed here at all, which gives an
226 //empty sFamilyName resulting in disabling pFontNameState->mnIndex to -1.
227 //That doesn't seem right to me.
229 //So assuming that the main purpose is just to convert the properties in
230 //the main when we can, and to leave them alone when we can't. And with a
231 //secondary purpose to filter out empty font properties, then is would
232 //appear to make sense to base attempting the conversion if we have
233 //both of the major facts of the font description
235 //An alternative solution is to *not* fill the FontAutoStylePool with
236 //every font in the document, but to partition the fonts into the
237 //hard-attribute fonts which go into that pool and the style-attribute
238 //fonts which go into some additional pool which get merged just for
239 //the purposes of writing the embedded fonts but are not queried by
240 //"Find" which restores the original logic.
241 if (pFontFamilyNameState || pFontStyleNameState)
243 OUString sName( ((SvXMLExport&)GetExport()).GetFontAutoStylePool()->Find(
244 sFamilyName, sStyleName, nFamily, nPitch, eEnc ) );
245 if (!sName.isEmpty())
247 pFontNameState->maValue <<= sName;
248 //Resolves: fdo#68431 style:font-name unrecognized by LibreOffice
249 //<= 4.1 in styles (but recognized in autostyles) so add
250 //fo:font-family, etc
251 if (!bEnableFoFontFamily)
253 if( pFontFamilyNameState )
254 pFontFamilyNameState->mnIndex = -1;
255 if( pFontStyleNameState )
256 pFontStyleNameState->mnIndex = -1;
257 if( pFontFamilyState )
258 pFontFamilyState->mnIndex = -1;
259 if( pFontPitchState )
260 pFontPitchState->mnIndex = -1;
261 if( pFontCharsetState )
262 pFontCharsetState->mnIndex = -1;
265 else
267 pFontNameState->mnIndex = -1;
271 if( pFontFamilyNameState && sFamilyName.isEmpty() )
273 pFontFamilyNameState->mnIndex = -1;
276 if( pFontStyleNameState && sStyleName.isEmpty() )
278 pFontStyleNameState->mnIndex = -1;
282 void XMLTextExportPropertySetMapper::ContextFontHeightFilter(
283 XMLPropertyState* pCharHeightState,
284 XMLPropertyState* pCharPropHeightState,
285 XMLPropertyState* pCharDiffHeightState ) const
287 if( pCharPropHeightState )
289 sal_Int32 nTemp = 0;
290 pCharPropHeightState->maValue >>= nTemp;
291 if( nTemp == 100 )
293 pCharPropHeightState->mnIndex = -1;
294 pCharPropHeightState->maValue.clear();
296 else
298 pCharHeightState->mnIndex = -1;
299 pCharHeightState->maValue.clear();
302 if( pCharDiffHeightState )
304 float nTemp = 0;
305 pCharDiffHeightState->maValue >>= nTemp;
306 if( nTemp == 0. )
308 pCharDiffHeightState->mnIndex = -1;
309 pCharDiffHeightState->maValue.clear();
311 else
313 pCharHeightState->mnIndex = -1;
314 pCharHeightState->maValue.clear();
320 // helper method; implementation below
321 static bool lcl_IsOutlineStyle(const SvXMLExport&, const OUString&);
323 static void
324 lcl_checkMultiProperty(XMLPropertyState *const pState,
325 XMLPropertyState *const pRelState)
327 if (pState && pRelState)
329 sal_Int32 nTemp = 0;
330 pRelState->maValue >>= nTemp;
331 if (100 == nTemp)
333 pRelState->mnIndex = -1;
334 pRelState->maValue.clear();
336 else
338 pState->mnIndex = -1;
339 pState->maValue.clear();
344 void XMLTextExportPropertySetMapper::ContextFilter(
345 bool bEnableFoFontFamily,
346 ::std::vector< XMLPropertyState >& rProperties,
347 Reference< XPropertySet > rPropSet ) const
349 // filter font
350 XMLPropertyState *pFontNameState = 0;
351 XMLPropertyState *pFontFamilyNameState = 0;
352 XMLPropertyState *pFontStyleNameState = 0;
353 XMLPropertyState *pFontFamilyState = 0;
354 XMLPropertyState *pFontPitchState = 0;
355 XMLPropertyState *pFontCharsetState = 0;
356 XMLPropertyState *pFontNameCJKState = 0;
357 XMLPropertyState *pFontFamilyNameCJKState = 0;
358 XMLPropertyState *pFontStyleNameCJKState = 0;
359 XMLPropertyState *pFontFamilyCJKState = 0;
360 XMLPropertyState *pFontPitchCJKState = 0;
361 XMLPropertyState *pFontCharsetCJKState = 0;
362 XMLPropertyState *pFontNameCTLState = 0;
363 XMLPropertyState *pFontFamilyNameCTLState = 0;
364 XMLPropertyState *pFontStyleNameCTLState = 0;
365 XMLPropertyState *pFontFamilyCTLState = 0;
366 XMLPropertyState *pFontPitchCTLState = 0;
367 XMLPropertyState *pFontCharsetCTLState = 0;
369 // filter char height point/percent
370 XMLPropertyState* pCharHeightState = NULL;
371 XMLPropertyState* pCharPropHeightState = NULL;
372 XMLPropertyState* pCharDiffHeightState = NULL;
373 XMLPropertyState* pCharHeightCJKState = NULL;
374 XMLPropertyState* pCharPropHeightCJKState = NULL;
375 XMLPropertyState* pCharDiffHeightCJKState = NULL;
376 XMLPropertyState* pCharHeightCTLState = NULL;
377 XMLPropertyState* pCharPropHeightCTLState = NULL;
378 XMLPropertyState* pCharDiffHeightCTLState = NULL;
380 // filter left margin measure/percent
381 XMLPropertyState* pParaLeftMarginState = NULL;
382 XMLPropertyState* pParaLeftMarginRelState = NULL;
384 // filter right margin measure/percent
385 XMLPropertyState* pParaRightMarginState = NULL;
386 XMLPropertyState* pParaRightMarginRelState = NULL;
388 // filter first line indent measure/percent
389 XMLPropertyState* pParaFirstLineState = NULL;
390 XMLPropertyState* pParaFirstLineRelState = NULL;
392 // filter ParaTopMargin/Relative
393 XMLPropertyState* pParaTopMarginState = NULL;
394 XMLPropertyState* pParaTopMarginRelState = NULL;
396 // filter ParaTopMargin/Relative
397 XMLPropertyState* pParaBottomMarginState = NULL;
398 XMLPropertyState* pParaBottomMarginRelState = NULL;
400 // filter (Left|Right|Top|Bottom|)BorderWidth
401 XMLPropertyState* pAllBorderWidthState = NULL;
402 XMLPropertyState* pLeftBorderWidthState = NULL;
403 XMLPropertyState* pRightBorderWidthState = NULL;
404 XMLPropertyState* pTopBorderWidthState = NULL;
405 XMLPropertyState* pBottomBorderWidthState = NULL;
407 // filter (Left|Right|Top|)BorderDistance
408 XMLPropertyState* pAllBorderDistanceState = NULL;
409 XMLPropertyState* pLeftBorderDistanceState = NULL;
410 XMLPropertyState* pRightBorderDistanceState = NULL;
411 XMLPropertyState* pTopBorderDistanceState = NULL;
412 XMLPropertyState* pBottomBorderDistanceState = NULL;
414 // filter (Left|Right|Top|Bottom|)Border
415 XMLPropertyState* pAllBorderState = NULL;
416 XMLPropertyState* pLeftBorderState = NULL;
417 XMLPropertyState* pRightBorderState = NULL;
418 XMLPropertyState* pTopBorderState = NULL;
419 XMLPropertyState* pBottomBorderState = NULL;
421 // filter height properties
422 XMLPropertyState* pHeightMinAbsState = NULL;
423 XMLPropertyState* pHeightMinRelState = NULL;
424 XMLPropertyState* pHeightAbsState = NULL;
425 XMLPropertyState* pHeightRelState = NULL;
426 XMLPropertyState* pSizeTypeState = NULL;
428 // filter width properties
429 XMLPropertyState* pWidthMinAbsState = NULL;
430 XMLPropertyState* pWidthMinRelState = NULL;
431 XMLPropertyState* pWidthAbsState = NULL;
432 XMLPropertyState* pWidthRelState = NULL;
433 XMLPropertyState* pWidthTypeState = NULL;
435 // wrap
436 XMLPropertyState* pWrapState = NULL;
437 XMLPropertyState* pWrapContourState = NULL;
438 XMLPropertyState* pWrapContourModeState = NULL;
439 XMLPropertyState* pWrapParagraphOnlyState = NULL;
441 // anchor
442 XMLPropertyState* pAnchorTypeState = NULL;
444 // horizontal position and relation
445 XMLPropertyState* pHoriOrientState = NULL;
446 XMLPropertyState* pHoriOrientMirroredState = NULL;
447 XMLPropertyState* pHoriOrientRelState = NULL;
448 XMLPropertyState* pHoriOrientRelFrameState = NULL;
449 XMLPropertyState* pHoriOrientMirrorState = NULL;
450 // Horizontal position and relation for shapes (#i28749#)
451 XMLPropertyState* pShapeHoriOrientState = NULL;
452 XMLPropertyState* pShapeHoriOrientMirroredState = NULL;
453 XMLPropertyState* pShapeHoriOrientRelState = NULL;
454 XMLPropertyState* pShapeHoriOrientRelFrameState = NULL;
455 XMLPropertyState* pShapeHoriOrientMirrorState = NULL;
457 // vertical position and relation
458 XMLPropertyState* pVertOrientState = NULL;
459 XMLPropertyState* pVertOrientAtCharState = NULL;
460 XMLPropertyState* pVertOrientRelState = NULL;
461 XMLPropertyState* pVertOrientRelPageState = NULL;
462 XMLPropertyState* pVertOrientRelFrameState = NULL;
463 XMLPropertyState* pVertOrientRelAsCharState = NULL;
465 // Vertical position and relation for shapes (#i28749#)
466 XMLPropertyState* pShapeVertOrientState = NULL;
467 XMLPropertyState* pShapeVertOrientAtCharState = NULL;
468 XMLPropertyState* pShapeVertOrientRelState = NULL;
469 XMLPropertyState* pShapeVertOrientRelPageState = NULL;
470 XMLPropertyState* pShapeVertOrientRelFrameState = NULL;
472 // filter underline color
473 XMLPropertyState* pUnderlineState = NULL;
474 XMLPropertyState* pUnderlineColorState = NULL;
475 XMLPropertyState* pUnderlineHasColorState = NULL;
477 // filter list style name
478 XMLPropertyState* pListStyleName = NULL;
480 // filter fo:clip
481 XMLPropertyState* pClip11State = NULL;
482 XMLPropertyState* pClipState = NULL;
484 // filter fo:margin
485 XMLPropertyState* pAllParaMarginRel = NULL;
486 XMLPropertyState* pAllParaMargin = NULL;
487 XMLPropertyState* pAllMargin = NULL;
489 sal_Bool bNeedsAnchor = sal_False;
491 for( ::std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
492 aIter != rProperties.end();
493 ++aIter )
495 XMLPropertyState *propertie = &(*aIter);
496 if( propertie->mnIndex == -1 )
497 continue;
499 switch( getPropertySetMapper()->GetEntryContextId( propertie->mnIndex ) )
501 case CTF_CHARHEIGHT: pCharHeightState = propertie; break;
502 case CTF_CHARHEIGHT_REL: pCharPropHeightState = propertie; break;
503 case CTF_CHARHEIGHT_DIFF: pCharDiffHeightState = propertie; break;
504 case CTF_CHARHEIGHT_CJK: pCharHeightCJKState = propertie; break;
505 case CTF_CHARHEIGHT_REL_CJK: pCharPropHeightCJKState = propertie; break;
506 case CTF_CHARHEIGHT_DIFF_CJK: pCharDiffHeightCJKState = propertie; break;
507 case CTF_CHARHEIGHT_CTL: pCharHeightCTLState = propertie; break;
508 case CTF_CHARHEIGHT_REL_CTL: pCharPropHeightCTLState = propertie; break;
509 case CTF_CHARHEIGHT_DIFF_CTL: pCharDiffHeightCTLState = propertie; break;
510 case CTF_PARALEFTMARGIN: pParaLeftMarginState = propertie; break;
511 case CTF_PARALEFTMARGIN_REL: pParaLeftMarginRelState = propertie; break;
512 case CTF_PARARIGHTMARGIN: pParaRightMarginState = propertie; break;
513 case CTF_PARARIGHTMARGIN_REL: pParaRightMarginRelState = propertie; break;
514 case CTF_PARAFIRSTLINE: pParaFirstLineState = propertie; break;
515 case CTF_PARAFIRSTLINE_REL: pParaFirstLineRelState = propertie; break;
516 case CTF_PARATOPMARGIN: pParaTopMarginState = propertie; break;
517 case CTF_PARATOPMARGIN_REL: pParaTopMarginRelState = propertie; break;
518 case CTF_PARABOTTOMMARGIN: pParaBottomMarginState = propertie; break;
519 case CTF_PARABOTTOMMARGIN_REL: pParaBottomMarginRelState = propertie; break;
520 case CTF_ALLBORDERWIDTH: pAllBorderWidthState = propertie; break;
521 case CTF_LEFTBORDERWIDTH: pLeftBorderWidthState = propertie; break;
522 case CTF_RIGHTBORDERWIDTH: pRightBorderWidthState = propertie; break;
523 case CTF_TOPBORDERWIDTH: pTopBorderWidthState = propertie; break;
524 case CTF_BOTTOMBORDERWIDTH: pBottomBorderWidthState = propertie; break;
525 case CTF_ALLBORDERDISTANCE: pAllBorderDistanceState = propertie; break;
526 case CTF_LEFTBORDERDISTANCE: pLeftBorderDistanceState = propertie; break;
527 case CTF_RIGHTBORDERDISTANCE: pRightBorderDistanceState = propertie; break;
528 case CTF_TOPBORDERDISTANCE: pTopBorderDistanceState = propertie; break;
529 case CTF_BOTTOMBORDERDISTANCE: pBottomBorderDistanceState = propertie; break;
530 case CTF_ALLBORDER: pAllBorderState = propertie; break;
531 case CTF_LEFTBORDER: pLeftBorderState = propertie; break;
532 case CTF_RIGHTBORDER: pRightBorderState = propertie; break;
533 case CTF_TOPBORDER: pTopBorderState = propertie; break;
534 case CTF_BOTTOMBORDER: pBottomBorderState = propertie; break;
536 case CTF_FRAMEHEIGHT_MIN_ABS: pHeightMinAbsState = propertie; break;
537 case CTF_FRAMEHEIGHT_MIN_REL: pHeightMinRelState = propertie; break;
538 case CTF_FRAMEHEIGHT_ABS: pHeightAbsState = propertie; break;
539 case CTF_FRAMEHEIGHT_REL: pHeightRelState = propertie; break;
540 case CTF_SIZETYPE: pSizeTypeState = propertie; break;
542 case CTF_FRAMEWIDTH_MIN_ABS: pWidthMinAbsState = propertie; break;
543 case CTF_FRAMEWIDTH_MIN_REL: pWidthMinRelState = propertie; break;
544 case CTF_FRAMEWIDTH_ABS: pWidthAbsState = propertie; break;
545 case CTF_FRAMEWIDTH_REL: pWidthRelState = propertie; break;
546 case CTF_FRAMEWIDTH_TYPE: pWidthTypeState = propertie; break;
548 case CTF_WRAP: pWrapState = propertie; break;
549 case CTF_WRAP_CONTOUR: pWrapContourState = propertie; break;
550 case CTF_WRAP_CONTOUR_MODE: pWrapContourModeState = propertie; break;
551 case CTF_WRAP_PARAGRAPH_ONLY: pWrapParagraphOnlyState = propertie; break;
552 case CTF_ANCHORTYPE: pAnchorTypeState = propertie; break;
554 case CTF_HORIZONTALPOS: pHoriOrientState = propertie; bNeedsAnchor = sal_True; break;
555 case CTF_HORIZONTALPOS_MIRRORED: pHoriOrientMirroredState = propertie; bNeedsAnchor = sal_True; break;
556 case CTF_HORIZONTALREL: pHoriOrientRelState = propertie; bNeedsAnchor = sal_True; break;
557 case CTF_HORIZONTALREL_FRAME: pHoriOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
558 case CTF_HORIZONTALMIRROR: pHoriOrientMirrorState = propertie; bNeedsAnchor = sal_True; break;
559 case CTF_VERTICALPOS: pVertOrientState = propertie; bNeedsAnchor = sal_True; break;
560 case CTF_VERTICALPOS_ATCHAR: pVertOrientAtCharState = propertie; bNeedsAnchor = sal_True; break;
561 case CTF_VERTICALREL: pVertOrientRelState = propertie; bNeedsAnchor = sal_True; break;
562 case CTF_VERTICALREL_PAGE: pVertOrientRelPageState = propertie; bNeedsAnchor = sal_True; break;
563 case CTF_VERTICALREL_FRAME: pVertOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
564 case CTF_VERTICALREL_ASCHAR: pVertOrientRelAsCharState = propertie; bNeedsAnchor = sal_True; break;
566 // Handle new CTFs for shape positioning properties (#i28749#)
567 case CTF_SHAPE_HORIZONTALPOS: pShapeHoriOrientState = propertie; bNeedsAnchor = sal_True; break;
568 case CTF_SHAPE_HORIZONTALPOS_MIRRORED: pShapeHoriOrientMirroredState = propertie; bNeedsAnchor = sal_True; break;
569 case CTF_SHAPE_HORIZONTALREL: pShapeHoriOrientRelState = propertie; bNeedsAnchor = sal_True; break;
570 case CTF_SHAPE_HORIZONTALREL_FRAME: pShapeHoriOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
571 case CTF_SHAPE_HORIZONTALMIRROR: pShapeHoriOrientMirrorState = propertie; bNeedsAnchor = sal_True; break;
572 case CTF_SHAPE_VERTICALPOS: pShapeVertOrientState = propertie; bNeedsAnchor = sal_True; break;
573 case CTF_SHAPE_VERTICALPOS_ATCHAR: pShapeVertOrientAtCharState = propertie; bNeedsAnchor = sal_True; break;
574 case CTF_SHAPE_VERTICALREL: pShapeVertOrientRelState = propertie; bNeedsAnchor = sal_True; break;
575 case CTF_SHAPE_VERTICALREL_PAGE: pShapeVertOrientRelPageState = propertie; bNeedsAnchor = sal_True; break;
576 case CTF_SHAPE_VERTICALREL_FRAME: pShapeVertOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
577 case CTF_FONTNAME: pFontNameState = propertie; break;
578 case CTF_FONTFAMILYNAME: pFontFamilyNameState = propertie; break;
579 case CTF_FONTSTYLENAME: pFontStyleNameState = propertie; break;
580 case CTF_FONTFAMILY: pFontFamilyState = propertie; break;
581 case CTF_FONTPITCH: pFontPitchState = propertie; break;
582 case CTF_FONTCHARSET: pFontCharsetState = propertie; break;
584 case CTF_FONTNAME_CJK: pFontNameCJKState = propertie; break;
585 case CTF_FONTFAMILYNAME_CJK: pFontFamilyNameCJKState = propertie; break;
586 case CTF_FONTSTYLENAME_CJK: pFontStyleNameCJKState = propertie; break;
587 case CTF_FONTFAMILY_CJK: pFontFamilyCJKState = propertie; break;
588 case CTF_FONTPITCH_CJK: pFontPitchCJKState = propertie; break;
589 case CTF_FONTCHARSET_CJK: pFontCharsetCJKState = propertie; break;
591 case CTF_FONTNAME_CTL: pFontNameCTLState = propertie; break;
592 case CTF_FONTFAMILYNAME_CTL: pFontFamilyNameCTLState = propertie; break;
593 case CTF_FONTSTYLENAME_CTL: pFontStyleNameCTLState = propertie; break;
594 case CTF_FONTFAMILY_CTL: pFontFamilyCTLState = propertie; break;
595 case CTF_FONTPITCH_CTL: pFontPitchCTLState = propertie; break;
596 case CTF_FONTCHARSET_CTL: pFontCharsetCTLState = propertie; break;
597 case CTF_UNDERLINE: pUnderlineState = propertie; break;
598 case CTF_UNDERLINE_COLOR: pUnderlineColorState = propertie; break;
599 case CTF_UNDERLINE_HASCOLOR: pUnderlineHasColorState = propertie; break;
600 case CTF_NUMBERINGSTYLENAME: pListStyleName = propertie; break;
601 case CTF_TEXT_CLIP11: pClip11State = propertie; break;
602 case CTF_TEXT_CLIP: pClipState = propertie; break;
603 case CTF_PARAMARGINALL_REL: pAllParaMarginRel = propertie; break;
604 case CTF_PARAMARGINALL: pAllParaMargin = propertie; break;
605 case CTF_MARGINALL: pAllMargin = propertie; break;
609 if( pFontNameState )
610 ContextFontFilter( bEnableFoFontFamily, pFontNameState, pFontFamilyNameState,
611 pFontStyleNameState, pFontFamilyState,
612 pFontPitchState, pFontCharsetState );
613 if( pFontNameCJKState )
614 ContextFontFilter( bEnableFoFontFamily, pFontNameCJKState, pFontFamilyNameCJKState,
615 pFontStyleNameCJKState, pFontFamilyCJKState,
616 pFontPitchCJKState, pFontCharsetCJKState );
617 if( pFontNameCTLState )
618 ContextFontFilter( bEnableFoFontFamily, pFontNameCTLState, pFontFamilyNameCTLState,
619 pFontStyleNameCTLState, pFontFamilyCTLState,
620 pFontPitchCTLState, pFontCharsetCTLState );
622 if( pCharHeightState && (pCharPropHeightState || pCharDiffHeightState ) )
623 ContextFontHeightFilter( pCharHeightState, pCharPropHeightState,
624 pCharDiffHeightState );
625 if( pCharHeightCJKState &&
626 (pCharPropHeightCJKState || pCharDiffHeightCJKState ) )
627 ContextFontHeightFilter( pCharHeightCJKState, pCharPropHeightCJKState,
628 pCharDiffHeightCJKState );
629 if( pCharHeightCTLState &&
630 (pCharPropHeightCTLState || pCharDiffHeightCTLState ) )
631 ContextFontHeightFilter( pCharHeightCTLState, pCharPropHeightCTLState,
632 pCharDiffHeightCTLState );
633 if( pUnderlineColorState || pUnderlineHasColorState )
635 sal_Bool bClear = !pUnderlineState;
636 if( !bClear )
638 sal_Int16 nUnderline = 0;
639 pUnderlineState->maValue >>= nUnderline;
640 bClear = awt::FontUnderline::NONE == nUnderline;
642 if( bClear )
644 if( pUnderlineColorState )
645 pUnderlineColorState->mnIndex = -1;
646 if( pUnderlineHasColorState )
647 pUnderlineHasColorState->mnIndex = -1;
651 lcl_checkMultiProperty(pParaLeftMarginState, pParaLeftMarginRelState);
652 lcl_checkMultiProperty(pParaRightMarginState, pParaRightMarginRelState);
653 lcl_checkMultiProperty(pParaTopMarginState, pParaTopMarginRelState);
654 lcl_checkMultiProperty(pParaBottomMarginState, pParaBottomMarginRelState);
655 lcl_checkMultiProperty(pParaFirstLineState, pParaFirstLineRelState);
657 if (pAllParaMarginRel)
658 { // because older OOo/LO versions can't read fo:margin:
659 pAllParaMarginRel->mnIndex = -1; // just export individual attributes...
660 pAllParaMarginRel->maValue.clear();
662 if (pAllParaMargin)
664 pAllParaMargin->mnIndex = -1; // just export individual attributes...
665 pAllParaMargin->maValue.clear();
667 if (pAllMargin)
669 pAllMargin->mnIndex = -1; // just export individual attributes...
670 pAllMargin->maValue.clear();
673 if( pAllBorderWidthState )
675 if( pLeftBorderWidthState && pRightBorderWidthState && pTopBorderWidthState && pBottomBorderWidthState )
677 table::BorderLine2 aLeft, aRight, aTop, aBottom;
679 pLeftBorderWidthState->maValue >>= aLeft;
680 pRightBorderWidthState->maValue >>= aRight;
681 pTopBorderWidthState->maValue >>= aTop;
682 pBottomBorderWidthState->maValue >>= aBottom;
683 if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth &&
684 aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance &&
685 aLeft.LineStyle == aRight.LineStyle &&
686 aLeft.LineWidth == aRight.LineWidth &&
687 aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth &&
688 aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance &&
689 aLeft.LineStyle == aTop.LineStyle &&
690 aLeft.LineWidth == aTop.LineWidth &&
691 aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth &&
692 aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance &&
693 aLeft.LineStyle == aBottom.LineStyle &&
694 aLeft.LineWidth == aBottom.LineWidth )
696 pLeftBorderWidthState->mnIndex = -1;
697 pLeftBorderWidthState->maValue.clear();
698 pRightBorderWidthState->mnIndex = -1;
699 pRightBorderWidthState->maValue.clear();
700 pTopBorderWidthState->mnIndex = -1;
701 pTopBorderWidthState->maValue.clear();
702 pBottomBorderWidthState->mnIndex = -1;
703 pBottomBorderWidthState->maValue.clear();
705 else
707 pAllBorderWidthState->mnIndex = -1;
708 pAllBorderWidthState->maValue.clear();
711 else
713 pAllBorderWidthState->mnIndex = -1;
714 pAllBorderWidthState->maValue.clear();
718 if( pAllBorderDistanceState )
720 if( pLeftBorderDistanceState && pRightBorderDistanceState && pTopBorderDistanceState && pBottomBorderDistanceState )
722 sal_Int32 aLeft = 0, aRight = 0, aTop = 0, aBottom = 0;
724 pLeftBorderDistanceState->maValue >>= aLeft;
725 pRightBorderDistanceState->maValue >>= aRight;
726 pTopBorderDistanceState->maValue >>= aTop;
727 pBottomBorderDistanceState->maValue >>= aBottom;
728 if( aLeft == aRight && aLeft == aTop && aLeft == aBottom )
730 pLeftBorderDistanceState->mnIndex = -1;
731 pLeftBorderDistanceState->maValue.clear();
732 pRightBorderDistanceState->mnIndex = -1;
733 pRightBorderDistanceState->maValue.clear();
734 pTopBorderDistanceState->mnIndex = -1;
735 pTopBorderDistanceState->maValue.clear();
736 pBottomBorderDistanceState->mnIndex = -1;
737 pBottomBorderDistanceState->maValue.clear();
739 else
741 pAllBorderDistanceState->mnIndex = -1;
742 pAllBorderDistanceState->maValue.clear();
745 else
747 pAllBorderDistanceState->mnIndex = -1;
748 pAllBorderDistanceState->maValue.clear();
752 if( pAllBorderState )
754 if( pLeftBorderState && pRightBorderState && pTopBorderState && pBottomBorderState )
756 table::BorderLine2 aLeft, aRight, aTop, aBottom;
758 pLeftBorderState->maValue >>= aLeft;
759 pRightBorderState->maValue >>= aRight;
760 pTopBorderState->maValue >>= aTop;
761 pBottomBorderState->maValue >>= aBottom;
762 if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth &&
763 aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance &&
764 aLeft.LineStyle == aRight.LineStyle &&
765 aLeft.LineWidth == aRight.LineWidth &&
766 aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth &&
767 aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance &&
768 aLeft.LineStyle == aTop.LineStyle &&
769 aLeft.LineWidth == aTop.LineWidth &&
770 aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth &&
771 aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance &&
772 aLeft.LineWidth == aBottom.LineWidth &&
773 aLeft.LineStyle == aBottom.LineStyle )
775 pLeftBorderState->mnIndex = -1;
776 pLeftBorderState->maValue.clear();
777 pRightBorderState->mnIndex = -1;
778 pRightBorderState->maValue.clear();
779 pTopBorderState->mnIndex = -1;
780 pTopBorderState->maValue.clear();
781 pBottomBorderState->mnIndex = -1;
782 pBottomBorderState->maValue.clear();
784 else
786 pAllBorderState->mnIndex = -1;
787 pAllBorderState->maValue.clear();
790 else
792 pAllBorderState->mnIndex = -1;
793 pAllBorderState->maValue.clear();
797 sal_Int16 nSizeType = SizeType::FIX;
798 if( pSizeTypeState )
800 pSizeTypeState->maValue >>= nSizeType;
801 pSizeTypeState->mnIndex = -1;
804 if( pHeightMinAbsState )
806 sal_Int16 nRel = sal_Int16();
807 if( (SizeType::FIX == nSizeType) ||
808 ( pHeightMinRelState &&
809 ( !(pHeightMinRelState->maValue >>= nRel) || nRel > 0 ) ) )
811 pHeightMinAbsState->mnIndex = -1;
814 // export SizeType::VARIABLE als min-width="0"
815 if( SizeType::VARIABLE == nSizeType )
816 pHeightMinAbsState->maValue <<= static_cast<sal_Int32>( 0 );
818 if( pHeightMinRelState && SizeType::MIN != nSizeType)
819 pHeightMinRelState->mnIndex = -1;
820 if( pHeightAbsState && pHeightMinAbsState &&
821 -1 != pHeightMinAbsState->mnIndex )
822 pHeightAbsState->mnIndex = -1;
823 if( pHeightRelState && SizeType::FIX != nSizeType)
824 pHeightRelState->mnIndex = -1;
826 // frame width
827 nSizeType = SizeType::FIX;
828 if( pWidthTypeState )
830 pWidthTypeState->maValue >>= nSizeType;
831 pWidthTypeState->mnIndex = -1;
833 if( pWidthMinAbsState )
835 sal_Int16 nRel = sal_Int16();
836 if( (SizeType::FIX == nSizeType) ||
837 ( pWidthMinRelState &&
838 ( !(pWidthMinRelState->maValue >>= nRel) || nRel > 0 ) ) )
840 pWidthMinAbsState->mnIndex = -1;
843 // export SizeType::VARIABLE als min-width="0"
844 if( SizeType::VARIABLE == nSizeType )
845 pWidthMinAbsState->maValue <<= static_cast<sal_Int32>( 0 );
847 if( pWidthMinRelState && SizeType::MIN != nSizeType)
848 pWidthMinRelState->mnIndex = -1;
849 if( pWidthAbsState && pWidthMinAbsState &&
850 -1 != pWidthMinAbsState->mnIndex )
851 pWidthAbsState->mnIndex = -1;
852 if( pWidthRelState && SizeType::FIX != nSizeType)
853 pWidthRelState->mnIndex = -1;
855 if( pWrapState )
857 WrapTextMode eVal;
858 pWrapState->maValue >>= eVal;
859 switch( eVal )
861 case WrapTextMode_NONE:
862 // no wrapping: disable para-only and contour
863 if( pWrapParagraphOnlyState )
864 pWrapParagraphOnlyState->mnIndex = -1;
865 // no break
866 case WrapTextMode_THROUGHT:
867 // wrap through: disable only contour
868 if( pWrapContourState )
869 pWrapContourState->mnIndex = -1;
870 break;
871 default:
872 break;
874 if( pWrapContourModeState &&
875 (!pWrapContourState ||
876 !*(sal_Bool *)pWrapContourState ->maValue.getValue() ) )
877 pWrapContourModeState->mnIndex = -1;
880 TextContentAnchorType eAnchor = TextContentAnchorType_AT_PARAGRAPH;
881 if( pAnchorTypeState )
882 pAnchorTypeState->maValue >>= eAnchor;
883 else if( bNeedsAnchor )
885 Any aAny = rPropSet->getPropertyValue( OUString( "AnchorType" ) );
886 aAny >>= eAnchor;
889 // states for frame positioning attributes
891 if( pHoriOrientState && pHoriOrientMirroredState )
893 if( pHoriOrientMirrorState &&
894 *(sal_Bool *)pHoriOrientMirrorState->maValue.getValue() )
895 pHoriOrientState->mnIndex = -1;
896 else
897 pHoriOrientMirroredState->mnIndex = -1;
899 if( pHoriOrientMirrorState )
900 pHoriOrientMirrorState->mnIndex = -1;
902 if( pHoriOrientRelState && TextContentAnchorType_AT_FRAME == eAnchor )
903 pHoriOrientRelState->mnIndex = -1;
904 if( pHoriOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
905 pHoriOrientRelFrameState->mnIndex = -1;
907 if( pVertOrientState && TextContentAnchorType_AT_CHARACTER == eAnchor )
908 pVertOrientState->mnIndex = -1;
909 if( pVertOrientAtCharState && TextContentAnchorType_AT_CHARACTER != eAnchor )
910 pVertOrientAtCharState->mnIndex = -1;
911 if( pVertOrientRelState && TextContentAnchorType_AT_PARAGRAPH != eAnchor &&
912 TextContentAnchorType_AT_CHARACTER != eAnchor )
913 pVertOrientRelState->mnIndex = -1;
914 if( pVertOrientRelPageState && TextContentAnchorType_AT_PAGE != eAnchor )
915 pVertOrientRelPageState->mnIndex = -1;
916 if( pVertOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
917 pVertOrientRelFrameState->mnIndex = -1;
918 if( pVertOrientRelAsCharState && TextContentAnchorType_AS_CHARACTER != eAnchor )
919 pVertOrientRelAsCharState->mnIndex = -1;
922 // States for shape positioning properties (#i28749#)
923 if ( eAnchor != TextContentAnchorType_AS_CHARACTER &&
924 ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 )
926 // no export of shape positioning properties,
927 // if shape isn't anchored as-character and
928 // destination file format is OpenOffice.org file format
929 if ( pShapeHoriOrientState )
930 pShapeHoriOrientState->mnIndex = -1;
931 if ( pShapeHoriOrientMirroredState )
932 pShapeHoriOrientMirroredState->mnIndex = -1;
933 if ( pShapeHoriOrientRelState )
934 pShapeHoriOrientRelState->mnIndex = -1;
935 if ( pShapeHoriOrientRelFrameState )
936 pShapeHoriOrientRelFrameState->mnIndex = -1;
937 if ( pShapeHoriOrientMirrorState )
938 pShapeHoriOrientMirrorState->mnIndex = -1;
939 if ( pShapeVertOrientState )
940 pShapeVertOrientState->mnIndex = -1;
941 if ( pShapeVertOrientAtCharState )
942 pShapeVertOrientAtCharState->mnIndex = -1;
943 if ( pShapeVertOrientRelState )
944 pShapeVertOrientRelState->mnIndex = -1;
945 if ( pShapeVertOrientRelPageState )
946 pShapeVertOrientRelPageState->mnIndex = -1;
947 if ( pShapeVertOrientRelFrameState )
948 pShapeVertOrientRelFrameState->mnIndex = -1;
950 else
952 // handling of shape positioning property states as for frames - see above
953 if( pShapeHoriOrientState && pShapeHoriOrientMirroredState )
955 if( pShapeHoriOrientMirrorState &&
956 *(sal_Bool *)pShapeHoriOrientMirrorState->maValue.getValue() )
957 pShapeHoriOrientState->mnIndex = -1;
958 else
959 pShapeHoriOrientMirroredState->mnIndex = -1;
961 if( pShapeHoriOrientMirrorState )
962 pShapeHoriOrientMirrorState->mnIndex = -1;
964 if( pShapeHoriOrientRelState && TextContentAnchorType_AT_FRAME == eAnchor )
965 pShapeHoriOrientRelState->mnIndex = -1;
966 if( pShapeHoriOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
967 pShapeHoriOrientRelFrameState->mnIndex = -1;
969 if( pShapeVertOrientState && TextContentAnchorType_AT_CHARACTER == eAnchor )
970 pShapeVertOrientState->mnIndex = -1;
971 if( pShapeVertOrientAtCharState && TextContentAnchorType_AT_CHARACTER != eAnchor )
972 pShapeVertOrientAtCharState->mnIndex = -1;
973 if( pShapeVertOrientRelState && TextContentAnchorType_AT_PARAGRAPH != eAnchor &&
974 TextContentAnchorType_AT_CHARACTER != eAnchor )
975 pShapeVertOrientRelState->mnIndex = -1;
976 if( pShapeVertOrientRelPageState && TextContentAnchorType_AT_PAGE != eAnchor )
977 pShapeVertOrientRelPageState->mnIndex = -1;
978 if( pShapeVertOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
979 pShapeVertOrientRelFrameState->mnIndex = -1;
982 // list style name: remove list style if it is the default outline style
983 if( pListStyleName != NULL )
985 OUString sListStyleName;
986 pListStyleName->maValue >>= sListStyleName;
987 if( lcl_IsOutlineStyle( GetExport(), sListStyleName ) )
988 pListStyleName->mnIndex = -1;
991 if( pClipState != NULL && pClip11State != NULL )
992 pClip11State->mnIndex = -1;
994 SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rProperties, rPropSet);
998 static bool lcl_IsOutlineStyle(const SvXMLExport &rExport, const OUString & rName)
1000 Reference< XChapterNumberingSupplier >
1001 xCNSupplier(rExport.GetModel(), UNO_QUERY);
1003 OUString sOutlineName;
1004 OUString sName("Name");
1006 if (xCNSupplier.is())
1008 Reference<XPropertySet> xNumRule(
1009 xCNSupplier->getChapterNumberingRules(), UNO_QUERY );
1010 DBG_ASSERT( xNumRule.is(), "no chapter numbering rules" );
1011 if (xNumRule.is())
1013 xNumRule->getPropertyValue(sName) >>= sOutlineName;
1017 return rName == sOutlineName;
1020 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */