163bba73cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
363bba73cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
463bba73cSAndrew Rist * or more contributor license agreements. See the NOTICE file
563bba73cSAndrew Rist * distributed with this work for additional information
663bba73cSAndrew Rist * regarding copyright ownership. The ASF licenses this file
763bba73cSAndrew Rist * to you under the Apache License, Version 2.0 (the
863bba73cSAndrew Rist * "License"); you may not use this file except in compliance
963bba73cSAndrew Rist * with the License. You may obtain a copy of the License at
1063bba73cSAndrew Rist *
1163bba73cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
1263bba73cSAndrew Rist *
1363bba73cSAndrew Rist * Unless required by applicable law or agreed to in writing,
1463bba73cSAndrew Rist * software distributed under the License is distributed on an
1563bba73cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1663bba73cSAndrew Rist * KIND, either express or implied. See the License for the
1763bba73cSAndrew Rist * specific language governing permissions and limitations
1863bba73cSAndrew Rist * under the License.
1963bba73cSAndrew Rist *
2063bba73cSAndrew Rist *************************************************************/
2163bba73cSAndrew Rist
2263bba73cSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_xmloff.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir #include "txtexppr.hxx"
28cdf0e10cSrcweir
29cdf0e10cSrcweir #include <com/sun/star/table/BorderLine.hpp>
30cdf0e10cSrcweir #include <com/sun/star/text/SizeType.hpp>
31cdf0e10cSrcweir #include <com/sun/star/text/WrapTextMode.hpp>
32cdf0e10cSrcweir #include <com/sun/star/text/TextContentAnchorType.hpp>
33cdf0e10cSrcweir #include <com/sun/star/awt/FontFamily.hpp>
34cdf0e10cSrcweir #include <com/sun/star/awt/FontPitch.hpp>
35cdf0e10cSrcweir #include <com/sun/star/awt/FontUnderline.hpp>
36cdf0e10cSrcweir #include <com/sun/star/text/XChapterNumberingSupplier.hpp>
37cdf0e10cSrcweir
38cdf0e10cSrcweir #include <tools/debug.hxx>
39cdf0e10cSrcweir
40cdf0e10cSrcweir #include <xmloff/txtprmap.hxx>
41cdf0e10cSrcweir #include <xmloff/xmlexp.hxx>
42cdf0e10cSrcweir #include "XMLSectionFootnoteConfigExport.hxx"
43cdf0e10cSrcweir
44cdf0e10cSrcweir using ::rtl::OUString;
45cdf0e10cSrcweir using ::rtl::OUStringBuffer;
46cdf0e10cSrcweir
47cdf0e10cSrcweir using namespace ::com::sun::star;
48cdf0e10cSrcweir using namespace ::com::sun::star::uno;
49cdf0e10cSrcweir using namespace ::com::sun::star::style;
50cdf0e10cSrcweir using namespace ::com::sun::star::beans;
51cdf0e10cSrcweir using namespace ::com::sun::star::text;
52cdf0e10cSrcweir using namespace ::com::sun::star::awt;
53cdf0e10cSrcweir
handleElementItem(SvXMLExport & rExp,const XMLPropertyState & rProperty,sal_uInt16 nFlags,const::std::vector<XMLPropertyState> * pProperties,sal_uInt32 nIdx) const54cdf0e10cSrcweir void XMLTextExportPropertySetMapper::handleElementItem(
55cdf0e10cSrcweir SvXMLExport& rExp,
56cdf0e10cSrcweir const XMLPropertyState& rProperty,
57cdf0e10cSrcweir sal_uInt16 nFlags,
58cdf0e10cSrcweir const ::std::vector< XMLPropertyState > *pProperties,
59cdf0e10cSrcweir sal_uInt32 nIdx ) const
60cdf0e10cSrcweir {
61cdf0e10cSrcweir XMLTextExportPropertySetMapper *pThis =
62cdf0e10cSrcweir ((XMLTextExportPropertySetMapper *)this);
63cdf0e10cSrcweir
64cdf0e10cSrcweir switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
65cdf0e10cSrcweir {
66cdf0e10cSrcweir case CTF_DROPCAPFORMAT:
67cdf0e10cSrcweir pThis->maDropCapExport.exportXML( rProperty.maValue, bDropWholeWord,
68cdf0e10cSrcweir sDropCharStyle );
69cdf0e10cSrcweir pThis->bDropWholeWord = sal_False;
70cdf0e10cSrcweir pThis->sDropCharStyle = OUString();
71cdf0e10cSrcweir break;
72cdf0e10cSrcweir
73cdf0e10cSrcweir case CTF_TABSTOP:
74cdf0e10cSrcweir pThis->maTabStopExport.Export( rProperty.maValue );
75cdf0e10cSrcweir break;
76cdf0e10cSrcweir
77cdf0e10cSrcweir case CTF_TEXTCOLUMNS:
78cdf0e10cSrcweir pThis->maTextColumnsExport.exportXML( rProperty.maValue );
79cdf0e10cSrcweir break;
80cdf0e10cSrcweir
81cdf0e10cSrcweir case CTF_BACKGROUND_URL:
82cdf0e10cSrcweir {
83cdf0e10cSrcweir DBG_ASSERT( pProperties && nIdx >= 3,
84cdf0e10cSrcweir "property vector missing" );
85cdf0e10cSrcweir const Any *pPos = 0, *pFilter = 0, *pTrans = 0;
86cdf0e10cSrcweir if( pProperties && nIdx >= 3 )
87cdf0e10cSrcweir {
88cdf0e10cSrcweir const XMLPropertyState& rTrans = (*pProperties)[nIdx-3];
89cdf0e10cSrcweir // #99657# transparency may be there, but doesn't have to be.
90cdf0e10cSrcweir // If it's there, it must be in the right position.
91cdf0e10cSrcweir if( CTF_BACKGROUND_TRANSPARENCY == getPropertySetMapper()
92cdf0e10cSrcweir ->GetEntryContextId( rTrans.mnIndex ) )
93cdf0e10cSrcweir pTrans = &rTrans.maValue;
94cdf0e10cSrcweir
95cdf0e10cSrcweir const XMLPropertyState& rPos = (*pProperties)[nIdx-2];
96cdf0e10cSrcweir DBG_ASSERT( CTF_BACKGROUND_POS == getPropertySetMapper()
97cdf0e10cSrcweir ->GetEntryContextId( rPos.mnIndex ),
98cdf0e10cSrcweir "invalid property map: pos expected" );
99cdf0e10cSrcweir if( CTF_BACKGROUND_POS == getPropertySetMapper()
100cdf0e10cSrcweir ->GetEntryContextId( rPos.mnIndex ) )
101cdf0e10cSrcweir pPos = &rPos.maValue;
102cdf0e10cSrcweir
103cdf0e10cSrcweir const XMLPropertyState& rFilter = (*pProperties)[nIdx-1];
104cdf0e10cSrcweir DBG_ASSERT( CTF_BACKGROUND_FILTER == getPropertySetMapper()
105cdf0e10cSrcweir ->GetEntryContextId( rFilter.mnIndex ),
106cdf0e10cSrcweir "invalid property map: filter expected" );
107cdf0e10cSrcweir if( CTF_BACKGROUND_FILTER == getPropertySetMapper()
108cdf0e10cSrcweir ->GetEntryContextId( rFilter.mnIndex ) )
109cdf0e10cSrcweir pFilter = &rFilter.maValue;
110cdf0e10cSrcweir }
111cdf0e10cSrcweir sal_uInt32 nPropIndex = rProperty.mnIndex;
112cdf0e10cSrcweir pThis->maBackgroundImageExport.exportXML(
113cdf0e10cSrcweir rProperty.maValue, pPos, pFilter, pTrans,
114cdf0e10cSrcweir getPropertySetMapper()->GetEntryNameSpace( nPropIndex ),
115cdf0e10cSrcweir getPropertySetMapper()->GetEntryXMLName( nPropIndex ) );
116cdf0e10cSrcweir }
117cdf0e10cSrcweir break;
118cdf0e10cSrcweir
119cdf0e10cSrcweir case CTF_SECTION_FOOTNOTE_END:
120cdf0e10cSrcweir XMLSectionFootnoteConfigExport::exportXML(rExp, sal_False,
121cdf0e10cSrcweir pProperties, nIdx,
122cdf0e10cSrcweir getPropertySetMapper());
123cdf0e10cSrcweir break;
124cdf0e10cSrcweir
125cdf0e10cSrcweir case CTF_SECTION_ENDNOTE_END:
126cdf0e10cSrcweir XMLSectionFootnoteConfigExport::exportXML(rExp, sal_True,
127cdf0e10cSrcweir pProperties, nIdx,
128cdf0e10cSrcweir getPropertySetMapper());
129cdf0e10cSrcweir break;
130cdf0e10cSrcweir
131cdf0e10cSrcweir default:
132cdf0e10cSrcweir SvXMLExportPropertyMapper::handleElementItem( rExp, rProperty, nFlags, pProperties, nIdx );
133cdf0e10cSrcweir break;
134cdf0e10cSrcweir }
135cdf0e10cSrcweir }
136cdf0e10cSrcweir
handleSpecialItem(SvXMLAttributeList & rAttrList,const XMLPropertyState & rProperty,const SvXMLUnitConverter & rUnitConverter,const SvXMLNamespaceMap & rNamespaceMap,const::std::vector<XMLPropertyState> * pProperties,sal_uInt32 nIdx) const137cdf0e10cSrcweir void XMLTextExportPropertySetMapper::handleSpecialItem(
138cdf0e10cSrcweir SvXMLAttributeList& rAttrList,
139cdf0e10cSrcweir const XMLPropertyState& rProperty,
140cdf0e10cSrcweir const SvXMLUnitConverter& rUnitConverter,
141cdf0e10cSrcweir const SvXMLNamespaceMap& rNamespaceMap,
142cdf0e10cSrcweir const ::std::vector< XMLPropertyState > *pProperties,
143cdf0e10cSrcweir sal_uInt32 nIdx ) const
144cdf0e10cSrcweir {
145cdf0e10cSrcweir XMLTextExportPropertySetMapper *pThis =
146cdf0e10cSrcweir ((XMLTextExportPropertySetMapper *)this);
147cdf0e10cSrcweir
148cdf0e10cSrcweir switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
149cdf0e10cSrcweir {
150cdf0e10cSrcweir case CTF_DROPCAPWHOLEWORD:
151cdf0e10cSrcweir DBG_ASSERT( !bDropWholeWord, "drop whole word is set already!" );
152cdf0e10cSrcweir pThis->bDropWholeWord = *(sal_Bool *)rProperty.maValue.getValue();
153cdf0e10cSrcweir break;
154cdf0e10cSrcweir case CTF_DROPCAPCHARSTYLE:
155cdf0e10cSrcweir DBG_ASSERT( !sDropCharStyle.getLength(),
156cdf0e10cSrcweir "drop char style is set already!" );
157cdf0e10cSrcweir rProperty.maValue >>= pThis->sDropCharStyle;
158cdf0e10cSrcweir break;
159cdf0e10cSrcweir case CTF_NUMBERINGSTYLENAME:
160cdf0e10cSrcweir case CTF_PAGEDESCNAME:
161cdf0e10cSrcweir case CTF_OLDTEXTBACKGROUND:
162cdf0e10cSrcweir case CTF_BACKGROUND_POS:
163cdf0e10cSrcweir case CTF_BACKGROUND_FILTER:
164cdf0e10cSrcweir case CTF_BACKGROUND_TRANSPARENCY:
165cdf0e10cSrcweir case CTF_SECTION_FOOTNOTE_NUM_OWN:
166cdf0e10cSrcweir case CTF_SECTION_FOOTNOTE_NUM_RESTART:
167cdf0e10cSrcweir case CTF_SECTION_FOOTNOTE_NUM_RESTART_AT:
168cdf0e10cSrcweir case CTF_SECTION_FOOTNOTE_NUM_TYPE:
169cdf0e10cSrcweir case CTF_SECTION_FOOTNOTE_NUM_PREFIX:
170cdf0e10cSrcweir case CTF_SECTION_FOOTNOTE_NUM_SUFFIX:
171cdf0e10cSrcweir case CTF_SECTION_ENDNOTE_NUM_OWN:
172cdf0e10cSrcweir case CTF_SECTION_ENDNOTE_NUM_RESTART:
173cdf0e10cSrcweir case CTF_SECTION_ENDNOTE_NUM_RESTART_AT:
174cdf0e10cSrcweir case CTF_SECTION_ENDNOTE_NUM_TYPE:
175cdf0e10cSrcweir case CTF_SECTION_ENDNOTE_NUM_PREFIX:
176cdf0e10cSrcweir case CTF_SECTION_ENDNOTE_NUM_SUFFIX:
177cdf0e10cSrcweir case CTF_DEFAULT_OUTLINE_LEVEL:
178cdf0e10cSrcweir case CTF_OLD_FLOW_WITH_TEXT:
179cdf0e10cSrcweir // There's nothing to do here!
180cdf0e10cSrcweir break;
181cdf0e10cSrcweir default:
182cdf0e10cSrcweir SvXMLExportPropertyMapper::handleSpecialItem(rAttrList, rProperty, rUnitConverter, rNamespaceMap, pProperties, nIdx );
183cdf0e10cSrcweir break;
184cdf0e10cSrcweir }
185cdf0e10cSrcweir }
186cdf0e10cSrcweir
XMLTextExportPropertySetMapper(const UniReference<XMLPropertySetMapper> & rMapper,SvXMLExport & rExp)187cdf0e10cSrcweir XMLTextExportPropertySetMapper::XMLTextExportPropertySetMapper(
188cdf0e10cSrcweir const UniReference< XMLPropertySetMapper >& rMapper,
189cdf0e10cSrcweir SvXMLExport& rExp ) :
190cdf0e10cSrcweir SvXMLExportPropertyMapper( rMapper ),
191cdf0e10cSrcweir rExport( rExp ),
192cdf0e10cSrcweir bDropWholeWord( sal_False ),
193cdf0e10cSrcweir maDropCapExport( rExp ),
194cdf0e10cSrcweir maTabStopExport( rExp ),
195cdf0e10cSrcweir maTextColumnsExport( rExp ),
196cdf0e10cSrcweir maBackgroundImageExport( rExp )
197cdf0e10cSrcweir {
198cdf0e10cSrcweir }
199cdf0e10cSrcweir
~XMLTextExportPropertySetMapper()200cdf0e10cSrcweir XMLTextExportPropertySetMapper::~XMLTextExportPropertySetMapper()
201cdf0e10cSrcweir {
202cdf0e10cSrcweir }
203cdf0e10cSrcweir
ContextFontFilter(XMLPropertyState * pFontNameState,XMLPropertyState * pFontFamilyNameState,XMLPropertyState * pFontStyleNameState,XMLPropertyState * pFontFamilyState,XMLPropertyState * pFontPitchState,XMLPropertyState * pFontCharsetState) const204cdf0e10cSrcweir void XMLTextExportPropertySetMapper::ContextFontFilter(
205cdf0e10cSrcweir XMLPropertyState *pFontNameState,
206cdf0e10cSrcweir XMLPropertyState *pFontFamilyNameState,
207cdf0e10cSrcweir XMLPropertyState *pFontStyleNameState,
208cdf0e10cSrcweir XMLPropertyState *pFontFamilyState,
209cdf0e10cSrcweir XMLPropertyState *pFontPitchState,
210cdf0e10cSrcweir XMLPropertyState *pFontCharsetState ) const
211cdf0e10cSrcweir {
212cdf0e10cSrcweir OUString sFamilyName;
213cdf0e10cSrcweir OUString sStyleName;
214cdf0e10cSrcweir sal_Int16 nFamily = FontFamily::DONTKNOW;
215cdf0e10cSrcweir sal_Int16 nPitch = FontPitch::DONTKNOW;
216cdf0e10cSrcweir rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
217cdf0e10cSrcweir
218cdf0e10cSrcweir OUString sTmp;
219cdf0e10cSrcweir if( pFontFamilyNameState && (pFontFamilyNameState->maValue >>= sTmp ) )
220cdf0e10cSrcweir sFamilyName = sTmp;
221cdf0e10cSrcweir if( pFontStyleNameState && (pFontStyleNameState->maValue >>= sTmp ) )
222cdf0e10cSrcweir sStyleName = sTmp;
223cdf0e10cSrcweir
224cdf0e10cSrcweir sal_Int16 nTmp = sal_Int16();
225cdf0e10cSrcweir if( pFontFamilyState && (pFontFamilyState->maValue >>= nTmp ) )
226cdf0e10cSrcweir nFamily = nTmp;
227cdf0e10cSrcweir if( pFontPitchState && (pFontPitchState->maValue >>= nTmp ) )
228cdf0e10cSrcweir nPitch = nTmp;
229cdf0e10cSrcweir if( pFontCharsetState && (pFontCharsetState->maValue >>= nTmp ) )
230cdf0e10cSrcweir eEnc = (rtl_TextEncoding)nTmp;
231cdf0e10cSrcweir
232cdf0e10cSrcweir OUString sName( ((SvXMLExport&)GetExport()).GetFontAutoStylePool()->Find(
233cdf0e10cSrcweir sFamilyName, sStyleName, nFamily, nPitch, eEnc ) );
234cdf0e10cSrcweir if( sName.getLength() )
235cdf0e10cSrcweir {
236cdf0e10cSrcweir pFontNameState->maValue <<= sName;
237cdf0e10cSrcweir if( pFontFamilyNameState )
238cdf0e10cSrcweir pFontFamilyNameState->mnIndex = -1;
239cdf0e10cSrcweir if( pFontStyleNameState )
240cdf0e10cSrcweir pFontStyleNameState->mnIndex = -1;
241cdf0e10cSrcweir if( pFontFamilyState )
242cdf0e10cSrcweir pFontFamilyState->mnIndex = -1;
243cdf0e10cSrcweir if( pFontPitchState )
244cdf0e10cSrcweir pFontPitchState->mnIndex = -1;
245cdf0e10cSrcweir if( pFontCharsetState )
246cdf0e10cSrcweir pFontCharsetState->mnIndex = -1;
247cdf0e10cSrcweir }
248cdf0e10cSrcweir else
249cdf0e10cSrcweir {
250cdf0e10cSrcweir pFontNameState->mnIndex = -1;
251cdf0e10cSrcweir }
252cdf0e10cSrcweir
253cdf0e10cSrcweir if( pFontFamilyNameState && (0 == sFamilyName.getLength()) )
254cdf0e10cSrcweir {
255cdf0e10cSrcweir pFontFamilyNameState->mnIndex = -1;
256cdf0e10cSrcweir }
257cdf0e10cSrcweir
258cdf0e10cSrcweir if( pFontStyleNameState && (0 == sStyleName.getLength()) )
259cdf0e10cSrcweir {
260cdf0e10cSrcweir pFontStyleNameState->mnIndex = -1;
261cdf0e10cSrcweir }
262cdf0e10cSrcweir }
263cdf0e10cSrcweir
ContextFontHeightFilter(XMLPropertyState * pCharHeightState,XMLPropertyState * pCharPropHeightState,XMLPropertyState * pCharDiffHeightState) const264cdf0e10cSrcweir void XMLTextExportPropertySetMapper::ContextFontHeightFilter(
265cdf0e10cSrcweir XMLPropertyState* pCharHeightState,
266cdf0e10cSrcweir XMLPropertyState* pCharPropHeightState,
267cdf0e10cSrcweir XMLPropertyState* pCharDiffHeightState ) const
268cdf0e10cSrcweir {
269cdf0e10cSrcweir if( pCharPropHeightState )
270cdf0e10cSrcweir {
271cdf0e10cSrcweir sal_Int32 nTemp = 0;
272cdf0e10cSrcweir pCharPropHeightState->maValue >>= nTemp;
273cdf0e10cSrcweir if( nTemp == 100 )
274cdf0e10cSrcweir {
275cdf0e10cSrcweir pCharPropHeightState->mnIndex = -1;
276cdf0e10cSrcweir pCharPropHeightState->maValue.clear();
277cdf0e10cSrcweir }
278cdf0e10cSrcweir else
279cdf0e10cSrcweir {
280cdf0e10cSrcweir pCharHeightState->mnIndex = -1;
281cdf0e10cSrcweir pCharHeightState->maValue.clear();
282cdf0e10cSrcweir }
283cdf0e10cSrcweir }
284cdf0e10cSrcweir if( pCharDiffHeightState )
285cdf0e10cSrcweir {
286cdf0e10cSrcweir float nTemp = 0;
287cdf0e10cSrcweir pCharDiffHeightState->maValue >>= nTemp;
288cdf0e10cSrcweir if( nTemp == 0. )
289cdf0e10cSrcweir {
290cdf0e10cSrcweir pCharDiffHeightState->mnIndex = -1;
291cdf0e10cSrcweir pCharDiffHeightState->maValue.clear();
292cdf0e10cSrcweir }
293cdf0e10cSrcweir else
294cdf0e10cSrcweir {
295cdf0e10cSrcweir pCharHeightState->mnIndex = -1;
296cdf0e10cSrcweir pCharHeightState->maValue.clear();
297cdf0e10cSrcweir }
298cdf0e10cSrcweir }
299cdf0e10cSrcweir
300cdf0e10cSrcweir }
301cdf0e10cSrcweir
302cdf0e10cSrcweir // helper method; implementation below
303cdf0e10cSrcweir bool lcl_IsOutlineStyle(const SvXMLExport&, const OUString&);
304cdf0e10cSrcweir
305cdf0e10cSrcweir static void
lcl_checkMultiProperty(XMLPropertyState * const pState,XMLPropertyState * const pRelState)306cdf0e10cSrcweir lcl_checkMultiProperty(XMLPropertyState *const pState,
307cdf0e10cSrcweir XMLPropertyState *const pRelState)
308cdf0e10cSrcweir {
309cdf0e10cSrcweir if (pState && pRelState)
310cdf0e10cSrcweir {
311cdf0e10cSrcweir sal_Int32 nTemp = 0;
312cdf0e10cSrcweir pRelState->maValue >>= nTemp;
313cdf0e10cSrcweir if (100 == nTemp)
314cdf0e10cSrcweir {
315cdf0e10cSrcweir pRelState->mnIndex = -1;
316cdf0e10cSrcweir pRelState->maValue.clear();
317cdf0e10cSrcweir }
318cdf0e10cSrcweir else
319cdf0e10cSrcweir {
320cdf0e10cSrcweir pState->mnIndex = -1;
321cdf0e10cSrcweir pState->maValue.clear();
322cdf0e10cSrcweir }
323cdf0e10cSrcweir }
324cdf0e10cSrcweir }
325cdf0e10cSrcweir
ContextFilter(::std::vector<XMLPropertyState> & rProperties,Reference<XPropertySet> rPropSet) const326cdf0e10cSrcweir void XMLTextExportPropertySetMapper::ContextFilter(
327cdf0e10cSrcweir ::std::vector< XMLPropertyState >& rProperties,
328cdf0e10cSrcweir Reference< XPropertySet > rPropSet ) const
329cdf0e10cSrcweir {
330cdf0e10cSrcweir // filter font
331cdf0e10cSrcweir XMLPropertyState *pFontNameState = 0;
332cdf0e10cSrcweir XMLPropertyState *pFontFamilyNameState = 0;
333cdf0e10cSrcweir XMLPropertyState *pFontStyleNameState = 0;
334cdf0e10cSrcweir XMLPropertyState *pFontFamilyState = 0;
335cdf0e10cSrcweir XMLPropertyState *pFontPitchState = 0;
336cdf0e10cSrcweir XMLPropertyState *pFontCharsetState = 0;
337cdf0e10cSrcweir XMLPropertyState *pFontNameCJKState = 0;
338cdf0e10cSrcweir XMLPropertyState *pFontFamilyNameCJKState = 0;
339cdf0e10cSrcweir XMLPropertyState *pFontStyleNameCJKState = 0;
340cdf0e10cSrcweir XMLPropertyState *pFontFamilyCJKState = 0;
341cdf0e10cSrcweir XMLPropertyState *pFontPitchCJKState = 0;
342cdf0e10cSrcweir XMLPropertyState *pFontCharsetCJKState = 0;
343cdf0e10cSrcweir XMLPropertyState *pFontNameCTLState = 0;
344cdf0e10cSrcweir XMLPropertyState *pFontFamilyNameCTLState = 0;
345cdf0e10cSrcweir XMLPropertyState *pFontStyleNameCTLState = 0;
346cdf0e10cSrcweir XMLPropertyState *pFontFamilyCTLState = 0;
347cdf0e10cSrcweir XMLPropertyState *pFontPitchCTLState = 0;
348cdf0e10cSrcweir XMLPropertyState *pFontCharsetCTLState = 0;
349cdf0e10cSrcweir
350cdf0e10cSrcweir // filter char height point/percent
351cdf0e10cSrcweir XMLPropertyState* pCharHeightState = NULL;
352cdf0e10cSrcweir XMLPropertyState* pCharPropHeightState = NULL;
353cdf0e10cSrcweir XMLPropertyState* pCharDiffHeightState = NULL;
354cdf0e10cSrcweir XMLPropertyState* pCharHeightCJKState = NULL;
355cdf0e10cSrcweir XMLPropertyState* pCharPropHeightCJKState = NULL;
356cdf0e10cSrcweir XMLPropertyState* pCharDiffHeightCJKState = NULL;
357cdf0e10cSrcweir XMLPropertyState* pCharHeightCTLState = NULL;
358cdf0e10cSrcweir XMLPropertyState* pCharPropHeightCTLState = NULL;
359cdf0e10cSrcweir XMLPropertyState* pCharDiffHeightCTLState = NULL;
360cdf0e10cSrcweir
361cdf0e10cSrcweir // filter left margin measure/percent
362cdf0e10cSrcweir XMLPropertyState* pParaLeftMarginState = NULL;
363cdf0e10cSrcweir XMLPropertyState* pParaLeftMarginRelState = NULL;
364cdf0e10cSrcweir
365cdf0e10cSrcweir // filter right margin measure/percent
366cdf0e10cSrcweir XMLPropertyState* pParaRightMarginState = NULL;
367cdf0e10cSrcweir XMLPropertyState* pParaRightMarginRelState = NULL;
368cdf0e10cSrcweir
369cdf0e10cSrcweir // filter first line indent measure/percent
370cdf0e10cSrcweir XMLPropertyState* pParaFirstLineState = NULL;
371cdf0e10cSrcweir XMLPropertyState* pParaFirstLineRelState = NULL;
372cdf0e10cSrcweir
373cdf0e10cSrcweir // filter ParaTopMargin/Relative
374cdf0e10cSrcweir XMLPropertyState* pParaTopMarginState = NULL;
375cdf0e10cSrcweir XMLPropertyState* pParaTopMarginRelState = NULL;
376cdf0e10cSrcweir
377cdf0e10cSrcweir // filter ParaTopMargin/Relative
378cdf0e10cSrcweir XMLPropertyState* pParaBottomMarginState = NULL;
379cdf0e10cSrcweir XMLPropertyState* pParaBottomMarginRelState = NULL;
380cdf0e10cSrcweir
381cdf0e10cSrcweir // filter (Left|Right|Top|Bottom|)BorderWidth
382cdf0e10cSrcweir XMLPropertyState* pAllBorderWidthState = NULL;
383cdf0e10cSrcweir XMLPropertyState* pLeftBorderWidthState = NULL;
384cdf0e10cSrcweir XMLPropertyState* pRightBorderWidthState = NULL;
385cdf0e10cSrcweir XMLPropertyState* pTopBorderWidthState = NULL;
386cdf0e10cSrcweir XMLPropertyState* pBottomBorderWidthState = NULL;
387cdf0e10cSrcweir
388cdf0e10cSrcweir // filter (Left|Right|Top|)BorderDistance
389cdf0e10cSrcweir XMLPropertyState* pAllBorderDistanceState = NULL;
390cdf0e10cSrcweir XMLPropertyState* pLeftBorderDistanceState = NULL;
391cdf0e10cSrcweir XMLPropertyState* pRightBorderDistanceState = NULL;
392cdf0e10cSrcweir XMLPropertyState* pTopBorderDistanceState = NULL;
393cdf0e10cSrcweir XMLPropertyState* pBottomBorderDistanceState = NULL;
394cdf0e10cSrcweir
395cdf0e10cSrcweir // filter (Left|Right|Top|Bottom|)Border
396cdf0e10cSrcweir XMLPropertyState* pAllBorderState = NULL;
397cdf0e10cSrcweir XMLPropertyState* pLeftBorderState = NULL;
398cdf0e10cSrcweir XMLPropertyState* pRightBorderState = NULL;
399cdf0e10cSrcweir XMLPropertyState* pTopBorderState = NULL;
400cdf0e10cSrcweir XMLPropertyState* pBottomBorderState = NULL;
401cdf0e10cSrcweir
402cdf0e10cSrcweir // filter height properties
403cdf0e10cSrcweir XMLPropertyState* pHeightMinAbsState = NULL;
404cdf0e10cSrcweir XMLPropertyState* pHeightMinRelState = NULL;
405cdf0e10cSrcweir XMLPropertyState* pHeightAbsState = NULL;
406cdf0e10cSrcweir XMLPropertyState* pHeightRelState = NULL;
407cdf0e10cSrcweir XMLPropertyState* pSizeTypeState = NULL;
408cdf0e10cSrcweir
409cdf0e10cSrcweir // filter width properties
410cdf0e10cSrcweir XMLPropertyState* pWidthMinAbsState = NULL;
411cdf0e10cSrcweir XMLPropertyState* pWidthMinRelState = NULL;
412cdf0e10cSrcweir XMLPropertyState* pWidthAbsState = NULL;
413cdf0e10cSrcweir XMLPropertyState* pWidthRelState = NULL;
414cdf0e10cSrcweir XMLPropertyState* pWidthTypeState = NULL;
415cdf0e10cSrcweir
416cdf0e10cSrcweir // wrap
417cdf0e10cSrcweir XMLPropertyState* pWrapState = NULL;
418cdf0e10cSrcweir XMLPropertyState* pWrapContourState = NULL;
419cdf0e10cSrcweir XMLPropertyState* pWrapContourModeState = NULL;
420cdf0e10cSrcweir XMLPropertyState* pWrapParagraphOnlyState = NULL;
421cdf0e10cSrcweir
422cdf0e10cSrcweir // anchor
423cdf0e10cSrcweir XMLPropertyState* pAnchorTypeState = NULL;
424cdf0e10cSrcweir
425cdf0e10cSrcweir // horizontal position and relation
426cdf0e10cSrcweir XMLPropertyState* pHoriOrientState = NULL;
427cdf0e10cSrcweir XMLPropertyState* pHoriOrientMirroredState = NULL;
428cdf0e10cSrcweir XMLPropertyState* pHoriOrientRelState = NULL;
429cdf0e10cSrcweir XMLPropertyState* pHoriOrientRelFrameState = NULL;
430cdf0e10cSrcweir XMLPropertyState* pHoriOrientMirrorState = NULL;
431cdf0e10cSrcweir // --> OD 2004-08-09 #i28749# - horizontal position and relation for shapes
432cdf0e10cSrcweir XMLPropertyState* pShapeHoriOrientState = NULL;
433cdf0e10cSrcweir XMLPropertyState* pShapeHoriOrientMirroredState = NULL;
434cdf0e10cSrcweir XMLPropertyState* pShapeHoriOrientRelState = NULL;
435cdf0e10cSrcweir XMLPropertyState* pShapeHoriOrientRelFrameState = NULL;
436cdf0e10cSrcweir XMLPropertyState* pShapeHoriOrientMirrorState = NULL;
437cdf0e10cSrcweir // <--
438cdf0e10cSrcweir
439cdf0e10cSrcweir // vertical position and relation
440cdf0e10cSrcweir XMLPropertyState* pVertOrientState = NULL;
441cdf0e10cSrcweir XMLPropertyState* pVertOrientAtCharState = NULL;
442cdf0e10cSrcweir XMLPropertyState* pVertOrientRelState = NULL;
443cdf0e10cSrcweir XMLPropertyState* pVertOrientRelPageState = NULL;
444cdf0e10cSrcweir XMLPropertyState* pVertOrientRelFrameState = NULL;
445cdf0e10cSrcweir XMLPropertyState* pVertOrientRelAsCharState = NULL;
446cdf0e10cSrcweir
447cdf0e10cSrcweir // --> OD 2004-08-09 #i28749# - vertical position and relation for shapes
448cdf0e10cSrcweir XMLPropertyState* pShapeVertOrientState = NULL;
449cdf0e10cSrcweir XMLPropertyState* pShapeVertOrientAtCharState = NULL;
450cdf0e10cSrcweir XMLPropertyState* pShapeVertOrientRelState = NULL;
451cdf0e10cSrcweir XMLPropertyState* pShapeVertOrientRelPageState = NULL;
452cdf0e10cSrcweir XMLPropertyState* pShapeVertOrientRelFrameState = NULL;
453cdf0e10cSrcweir // <--
454cdf0e10cSrcweir
455cdf0e10cSrcweir // filter underline color
456cdf0e10cSrcweir XMLPropertyState* pUnderlineState = NULL;
457cdf0e10cSrcweir XMLPropertyState* pUnderlineColorState = NULL;
458cdf0e10cSrcweir XMLPropertyState* pUnderlineHasColorState = NULL;
459cdf0e10cSrcweir
460cdf0e10cSrcweir // filter list style name
461cdf0e10cSrcweir XMLPropertyState* pListStyleName = NULL;
462cdf0e10cSrcweir
463cdf0e10cSrcweir // filter fo:clip
464cdf0e10cSrcweir XMLPropertyState* pClip11State = NULL;
465cdf0e10cSrcweir XMLPropertyState* pClipState = NULL;
466cdf0e10cSrcweir
467*1bbddb8dSOliver-Rainer Wittmann // filter fo:margin
468cdf0e10cSrcweir XMLPropertyState* pAllParaMargin = NULL;
469*1bbddb8dSOliver-Rainer Wittmann XMLPropertyState* pAllParaMarginRel = NULL;
470cdf0e10cSrcweir XMLPropertyState* pAllMargin = NULL;
471cdf0e10cSrcweir
472cdf0e10cSrcweir sal_Bool bNeedsAnchor = sal_False;
473cdf0e10cSrcweir
474cdf0e10cSrcweir for( ::std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
475cdf0e10cSrcweir aIter != rProperties.end();
476cdf0e10cSrcweir ++aIter )
477cdf0e10cSrcweir {
478cdf0e10cSrcweir XMLPropertyState *propertie = &(*aIter);
479cdf0e10cSrcweir if( propertie->mnIndex == -1 )
480cdf0e10cSrcweir continue;
481cdf0e10cSrcweir
482cdf0e10cSrcweir switch( getPropertySetMapper()->GetEntryContextId( propertie->mnIndex ) )
483cdf0e10cSrcweir {
484cdf0e10cSrcweir case CTF_CHARHEIGHT: pCharHeightState = propertie; break;
485cdf0e10cSrcweir case CTF_CHARHEIGHT_REL: pCharPropHeightState = propertie; break;
486cdf0e10cSrcweir case CTF_CHARHEIGHT_DIFF: pCharDiffHeightState = propertie; break;
487cdf0e10cSrcweir case CTF_CHARHEIGHT_CJK: pCharHeightCJKState = propertie; break;
488cdf0e10cSrcweir case CTF_CHARHEIGHT_REL_CJK: pCharPropHeightCJKState = propertie; break;
489cdf0e10cSrcweir case CTF_CHARHEIGHT_DIFF_CJK: pCharDiffHeightCJKState = propertie; break;
490cdf0e10cSrcweir case CTF_CHARHEIGHT_CTL: pCharHeightCTLState = propertie; break;
491cdf0e10cSrcweir case CTF_CHARHEIGHT_REL_CTL: pCharPropHeightCTLState = propertie; break;
492cdf0e10cSrcweir case CTF_CHARHEIGHT_DIFF_CTL: pCharDiffHeightCTLState = propertie; break;
493cdf0e10cSrcweir case CTF_PARALEFTMARGIN: pParaLeftMarginState = propertie; break;
494cdf0e10cSrcweir case CTF_PARALEFTMARGIN_REL: pParaLeftMarginRelState = propertie; break;
495cdf0e10cSrcweir case CTF_PARARIGHTMARGIN: pParaRightMarginState = propertie; break;
496cdf0e10cSrcweir case CTF_PARARIGHTMARGIN_REL: pParaRightMarginRelState = propertie; break;
497cdf0e10cSrcweir case CTF_PARAFIRSTLINE: pParaFirstLineState = propertie; break;
498cdf0e10cSrcweir case CTF_PARAFIRSTLINE_REL: pParaFirstLineRelState = propertie; break;
499cdf0e10cSrcweir case CTF_PARATOPMARGIN: pParaTopMarginState = propertie; break;
500cdf0e10cSrcweir case CTF_PARATOPMARGIN_REL: pParaTopMarginRelState = propertie; break;
501cdf0e10cSrcweir case CTF_PARABOTTOMMARGIN: pParaBottomMarginState = propertie; break;
502cdf0e10cSrcweir case CTF_PARABOTTOMMARGIN_REL: pParaBottomMarginRelState = propertie; break;
503cdf0e10cSrcweir case CTF_ALLBORDERWIDTH: pAllBorderWidthState = propertie; break;
504cdf0e10cSrcweir case CTF_LEFTBORDERWIDTH: pLeftBorderWidthState = propertie; break;
505cdf0e10cSrcweir case CTF_RIGHTBORDERWIDTH: pRightBorderWidthState = propertie; break;
506cdf0e10cSrcweir case CTF_TOPBORDERWIDTH: pTopBorderWidthState = propertie; break;
507cdf0e10cSrcweir case CTF_BOTTOMBORDERWIDTH: pBottomBorderWidthState = propertie; break;
508cdf0e10cSrcweir case CTF_ALLBORDERDISTANCE: pAllBorderDistanceState = propertie; break;
509cdf0e10cSrcweir case CTF_LEFTBORDERDISTANCE: pLeftBorderDistanceState = propertie; break;
510cdf0e10cSrcweir case CTF_RIGHTBORDERDISTANCE: pRightBorderDistanceState = propertie; break;
511cdf0e10cSrcweir case CTF_TOPBORDERDISTANCE: pTopBorderDistanceState = propertie; break;
512cdf0e10cSrcweir case CTF_BOTTOMBORDERDISTANCE: pBottomBorderDistanceState = propertie; break;
513cdf0e10cSrcweir case CTF_ALLBORDER: pAllBorderState = propertie; break;
514cdf0e10cSrcweir case CTF_LEFTBORDER: pLeftBorderState = propertie; break;
515cdf0e10cSrcweir case CTF_RIGHTBORDER: pRightBorderState = propertie; break;
516cdf0e10cSrcweir case CTF_TOPBORDER: pTopBorderState = propertie; break;
517cdf0e10cSrcweir case CTF_BOTTOMBORDER: pBottomBorderState = propertie; break;
518cdf0e10cSrcweir
519cdf0e10cSrcweir case CTF_FRAMEHEIGHT_MIN_ABS: pHeightMinAbsState = propertie; break;
520cdf0e10cSrcweir case CTF_FRAMEHEIGHT_MIN_REL: pHeightMinRelState = propertie; break;
521cdf0e10cSrcweir case CTF_FRAMEHEIGHT_ABS: pHeightAbsState = propertie; break;
522cdf0e10cSrcweir case CTF_FRAMEHEIGHT_REL: pHeightRelState = propertie; break;
523cdf0e10cSrcweir case CTF_SIZETYPE: pSizeTypeState = propertie; break;
524cdf0e10cSrcweir
525cdf0e10cSrcweir case CTF_FRAMEWIDTH_MIN_ABS: pWidthMinAbsState = propertie; break;
526cdf0e10cSrcweir case CTF_FRAMEWIDTH_MIN_REL: pWidthMinRelState = propertie; break;
527cdf0e10cSrcweir case CTF_FRAMEWIDTH_ABS: pWidthAbsState = propertie; break;
528cdf0e10cSrcweir case CTF_FRAMEWIDTH_REL: pWidthRelState = propertie; break;
529cdf0e10cSrcweir case CTF_FRAMEWIDTH_TYPE: pWidthTypeState = propertie; break;
530cdf0e10cSrcweir
531cdf0e10cSrcweir case CTF_WRAP: pWrapState = propertie; break;
532cdf0e10cSrcweir case CTF_WRAP_CONTOUR: pWrapContourState = propertie; break;
533cdf0e10cSrcweir case CTF_WRAP_CONTOUR_MODE: pWrapContourModeState = propertie; break;
534cdf0e10cSrcweir case CTF_WRAP_PARAGRAPH_ONLY: pWrapParagraphOnlyState = propertie; break;
535cdf0e10cSrcweir case CTF_ANCHORTYPE: pAnchorTypeState = propertie; break;
536cdf0e10cSrcweir
537cdf0e10cSrcweir case CTF_HORIZONTALPOS: pHoriOrientState = propertie; bNeedsAnchor = sal_True; break;
538cdf0e10cSrcweir case CTF_HORIZONTALPOS_MIRRORED: pHoriOrientMirroredState = propertie; bNeedsAnchor = sal_True; break;
539cdf0e10cSrcweir case CTF_HORIZONTALREL: pHoriOrientRelState = propertie; bNeedsAnchor = sal_True; break;
540cdf0e10cSrcweir case CTF_HORIZONTALREL_FRAME: pHoriOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
541cdf0e10cSrcweir case CTF_HORIZONTALMIRROR: pHoriOrientMirrorState = propertie; bNeedsAnchor = sal_True; break;
542cdf0e10cSrcweir case CTF_VERTICALPOS: pVertOrientState = propertie; bNeedsAnchor = sal_True; break;
543cdf0e10cSrcweir case CTF_VERTICALPOS_ATCHAR: pVertOrientAtCharState = propertie; bNeedsAnchor = sal_True; break;
544cdf0e10cSrcweir case CTF_VERTICALREL: pVertOrientRelState = propertie; bNeedsAnchor = sal_True; break;
545cdf0e10cSrcweir case CTF_VERTICALREL_PAGE: pVertOrientRelPageState = propertie; bNeedsAnchor = sal_True; break;
546cdf0e10cSrcweir case CTF_VERTICALREL_FRAME: pVertOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
547cdf0e10cSrcweir case CTF_VERTICALREL_ASCHAR: pVertOrientRelAsCharState = propertie; bNeedsAnchor = sal_True; break;
548cdf0e10cSrcweir
549cdf0e10cSrcweir // --> OD 2004-08-09 #i28749# - handle new CTFs for shape positioning properties
550cdf0e10cSrcweir case CTF_SHAPE_HORIZONTALPOS: pShapeHoriOrientState = propertie; bNeedsAnchor = sal_True; break;
551cdf0e10cSrcweir case CTF_SHAPE_HORIZONTALPOS_MIRRORED: pShapeHoriOrientMirroredState = propertie; bNeedsAnchor = sal_True; break;
552cdf0e10cSrcweir case CTF_SHAPE_HORIZONTALREL: pShapeHoriOrientRelState = propertie; bNeedsAnchor = sal_True; break;
553cdf0e10cSrcweir case CTF_SHAPE_HORIZONTALREL_FRAME: pShapeHoriOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
554cdf0e10cSrcweir case CTF_SHAPE_HORIZONTALMIRROR: pShapeHoriOrientMirrorState = propertie; bNeedsAnchor = sal_True; break;
555cdf0e10cSrcweir case CTF_SHAPE_VERTICALPOS: pShapeVertOrientState = propertie; bNeedsAnchor = sal_True; break;
556cdf0e10cSrcweir case CTF_SHAPE_VERTICALPOS_ATCHAR: pShapeVertOrientAtCharState = propertie; bNeedsAnchor = sal_True; break;
557cdf0e10cSrcweir case CTF_SHAPE_VERTICALREL: pShapeVertOrientRelState = propertie; bNeedsAnchor = sal_True; break;
558cdf0e10cSrcweir case CTF_SHAPE_VERTICALREL_PAGE: pShapeVertOrientRelPageState = propertie; bNeedsAnchor = sal_True; break;
559cdf0e10cSrcweir case CTF_SHAPE_VERTICALREL_FRAME: pShapeVertOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
560cdf0e10cSrcweir // <--
561cdf0e10cSrcweir
562cdf0e10cSrcweir case CTF_FONTNAME: pFontNameState = propertie; break;
563cdf0e10cSrcweir case CTF_FONTFAMILYNAME: pFontFamilyNameState = propertie; break;
564cdf0e10cSrcweir case CTF_FONTSTYLENAME: pFontStyleNameState = propertie; break;
565cdf0e10cSrcweir case CTF_FONTFAMILY: pFontFamilyState = propertie; break;
566cdf0e10cSrcweir case CTF_FONTPITCH: pFontPitchState = propertie; break;
567cdf0e10cSrcweir case CTF_FONTCHARSET: pFontCharsetState = propertie; break;
568cdf0e10cSrcweir
569cdf0e10cSrcweir case CTF_FONTNAME_CJK: pFontNameCJKState = propertie; break;
570cdf0e10cSrcweir case CTF_FONTFAMILYNAME_CJK: pFontFamilyNameCJKState = propertie; break;
571cdf0e10cSrcweir case CTF_FONTSTYLENAME_CJK: pFontStyleNameCJKState = propertie; break;
572cdf0e10cSrcweir case CTF_FONTFAMILY_CJK: pFontFamilyCJKState = propertie; break;
573cdf0e10cSrcweir case CTF_FONTPITCH_CJK: pFontPitchCJKState = propertie; break;
574cdf0e10cSrcweir case CTF_FONTCHARSET_CJK: pFontCharsetCJKState = propertie; break;
575cdf0e10cSrcweir
576cdf0e10cSrcweir case CTF_FONTNAME_CTL: pFontNameCTLState = propertie; break;
577cdf0e10cSrcweir case CTF_FONTFAMILYNAME_CTL: pFontFamilyNameCTLState = propertie; break;
578cdf0e10cSrcweir case CTF_FONTSTYLENAME_CTL: pFontStyleNameCTLState = propertie; break;
579cdf0e10cSrcweir case CTF_FONTFAMILY_CTL: pFontFamilyCTLState = propertie; break;
580cdf0e10cSrcweir case CTF_FONTPITCH_CTL: pFontPitchCTLState = propertie; break;
581cdf0e10cSrcweir case CTF_FONTCHARSET_CTL: pFontCharsetCTLState = propertie; break;
582cdf0e10cSrcweir case CTF_UNDERLINE: pUnderlineState = propertie; break;
583cdf0e10cSrcweir case CTF_UNDERLINE_COLOR: pUnderlineColorState = propertie; break;
584cdf0e10cSrcweir case CTF_UNDERLINE_HASCOLOR: pUnderlineHasColorState = propertie; break;
585cdf0e10cSrcweir case CTF_NUMBERINGSTYLENAME: pListStyleName = propertie; break;
586cdf0e10cSrcweir case CTF_TEXT_CLIP11: pClip11State = propertie; break;
587cdf0e10cSrcweir case CTF_TEXT_CLIP: pClipState = propertie; break;
588cdf0e10cSrcweir case CTF_PARAMARGINALL: pAllParaMargin = propertie; break;
589*1bbddb8dSOliver-Rainer Wittmann case CTF_PARAMARGINALL_REL: pAllParaMarginRel = propertie; break;
590cdf0e10cSrcweir case CTF_MARGINALL: pAllMargin = propertie; break;
591cdf0e10cSrcweir }
592cdf0e10cSrcweir }
593cdf0e10cSrcweir
594cdf0e10cSrcweir if( pFontNameState )
595cdf0e10cSrcweir ContextFontFilter( pFontNameState, pFontFamilyNameState,
596cdf0e10cSrcweir pFontStyleNameState, pFontFamilyState,
597cdf0e10cSrcweir pFontPitchState, pFontCharsetState );
598cdf0e10cSrcweir if( pFontNameCJKState )
599cdf0e10cSrcweir ContextFontFilter( pFontNameCJKState, pFontFamilyNameCJKState,
600cdf0e10cSrcweir pFontStyleNameCJKState, pFontFamilyCJKState,
601cdf0e10cSrcweir pFontPitchCJKState, pFontCharsetCJKState );
602cdf0e10cSrcweir if( pFontNameCTLState )
603cdf0e10cSrcweir ContextFontFilter( pFontNameCTLState, pFontFamilyNameCTLState,
604cdf0e10cSrcweir pFontStyleNameCTLState, pFontFamilyCTLState,
605cdf0e10cSrcweir pFontPitchCTLState, pFontCharsetCTLState );
606cdf0e10cSrcweir
607cdf0e10cSrcweir if( pCharHeightState && (pCharPropHeightState || pCharDiffHeightState ) )
608cdf0e10cSrcweir ContextFontHeightFilter( pCharHeightState, pCharPropHeightState,
609cdf0e10cSrcweir pCharDiffHeightState );
610cdf0e10cSrcweir if( pCharHeightCJKState &&
611cdf0e10cSrcweir (pCharPropHeightCJKState || pCharDiffHeightCJKState ) )
612cdf0e10cSrcweir ContextFontHeightFilter( pCharHeightCJKState, pCharPropHeightCJKState,
613cdf0e10cSrcweir pCharDiffHeightCJKState );
614cdf0e10cSrcweir if( pCharHeightCTLState &&
615cdf0e10cSrcweir (pCharPropHeightCTLState || pCharDiffHeightCTLState ) )
616cdf0e10cSrcweir ContextFontHeightFilter( pCharHeightCTLState, pCharPropHeightCTLState,
617cdf0e10cSrcweir pCharDiffHeightCTLState );
618cdf0e10cSrcweir if( pUnderlineColorState || pUnderlineHasColorState )
619cdf0e10cSrcweir {
620cdf0e10cSrcweir sal_Bool bClear = !pUnderlineState;
621cdf0e10cSrcweir if( !bClear )
622cdf0e10cSrcweir {
623cdf0e10cSrcweir sal_Int16 nUnderline = 0;
624cdf0e10cSrcweir pUnderlineState->maValue >>= nUnderline;
625cdf0e10cSrcweir bClear = FontUnderline::NONE == nUnderline;
626cdf0e10cSrcweir }
627cdf0e10cSrcweir if( bClear )
628cdf0e10cSrcweir {
629cdf0e10cSrcweir if( pUnderlineColorState )
630cdf0e10cSrcweir pUnderlineColorState->mnIndex = -1;
631cdf0e10cSrcweir if( pUnderlineHasColorState )
632cdf0e10cSrcweir pUnderlineHasColorState->mnIndex = -1;
633cdf0e10cSrcweir }
634cdf0e10cSrcweir }
635cdf0e10cSrcweir
636cdf0e10cSrcweir lcl_checkMultiProperty(pParaLeftMarginState, pParaLeftMarginRelState);
637cdf0e10cSrcweir lcl_checkMultiProperty(pParaRightMarginState, pParaRightMarginRelState);
638cdf0e10cSrcweir lcl_checkMultiProperty(pParaTopMarginState, pParaTopMarginRelState);
639cdf0e10cSrcweir lcl_checkMultiProperty(pParaBottomMarginState, pParaBottomMarginRelState);
640cdf0e10cSrcweir lcl_checkMultiProperty(pParaFirstLineState, pParaFirstLineRelState);
641cdf0e10cSrcweir
642cdf0e10cSrcweir if (pAllParaMargin)
643cdf0e10cSrcweir {
644cdf0e10cSrcweir pAllParaMargin->mnIndex = -1; // just export individual attributes...
645cdf0e10cSrcweir pAllParaMargin->maValue.clear();
646cdf0e10cSrcweir }
647*1bbddb8dSOliver-Rainer Wittmann if (pAllParaMarginRel)
648*1bbddb8dSOliver-Rainer Wittmann {
649*1bbddb8dSOliver-Rainer Wittmann pAllParaMarginRel->mnIndex = -1; // just export individual attributes...
650*1bbddb8dSOliver-Rainer Wittmann pAllParaMarginRel->maValue.clear();
651*1bbddb8dSOliver-Rainer Wittmann }
652cdf0e10cSrcweir if (pAllMargin)
653cdf0e10cSrcweir {
654cdf0e10cSrcweir pAllMargin->mnIndex = -1; // just export individual attributes...
655cdf0e10cSrcweir pAllMargin->maValue.clear();
656cdf0e10cSrcweir }
657cdf0e10cSrcweir
658cdf0e10cSrcweir if( pAllBorderWidthState )
659cdf0e10cSrcweir {
660cdf0e10cSrcweir if( pLeftBorderWidthState && pRightBorderWidthState && pTopBorderWidthState && pBottomBorderWidthState )
661cdf0e10cSrcweir {
662cdf0e10cSrcweir table::BorderLine aLeft, aRight, aTop, aBottom;
663cdf0e10cSrcweir
664cdf0e10cSrcweir pLeftBorderWidthState->maValue >>= aLeft;
665cdf0e10cSrcweir pRightBorderWidthState->maValue >>= aRight;
666cdf0e10cSrcweir pTopBorderWidthState->maValue >>= aTop;
667cdf0e10cSrcweir pBottomBorderWidthState->maValue >>= aBottom;
668cdf0e10cSrcweir if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth &&
669cdf0e10cSrcweir aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance &&
670cdf0e10cSrcweir aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth &&
671cdf0e10cSrcweir aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance &&
672cdf0e10cSrcweir aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth &&
673cdf0e10cSrcweir aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance )
674cdf0e10cSrcweir {
675cdf0e10cSrcweir pLeftBorderWidthState->mnIndex = -1;
676cdf0e10cSrcweir pLeftBorderWidthState->maValue.clear();
677cdf0e10cSrcweir pRightBorderWidthState->mnIndex = -1;
678cdf0e10cSrcweir pRightBorderWidthState->maValue.clear();
679cdf0e10cSrcweir pTopBorderWidthState->mnIndex = -1;
680cdf0e10cSrcweir pTopBorderWidthState->maValue.clear();
681cdf0e10cSrcweir pBottomBorderWidthState->mnIndex = -1;
682cdf0e10cSrcweir pBottomBorderWidthState->maValue.clear();
683cdf0e10cSrcweir }
684cdf0e10cSrcweir else
685cdf0e10cSrcweir {
686cdf0e10cSrcweir pAllBorderWidthState->mnIndex = -1;
687cdf0e10cSrcweir pAllBorderWidthState->maValue.clear();
688cdf0e10cSrcweir }
689cdf0e10cSrcweir }
690cdf0e10cSrcweir else
691cdf0e10cSrcweir {
692cdf0e10cSrcweir pAllBorderWidthState->mnIndex = -1;
693cdf0e10cSrcweir pAllBorderWidthState->maValue.clear();
694cdf0e10cSrcweir }
695cdf0e10cSrcweir }
696cdf0e10cSrcweir
697cdf0e10cSrcweir if( pAllBorderDistanceState )
698cdf0e10cSrcweir {
699cdf0e10cSrcweir if( pLeftBorderDistanceState && pRightBorderDistanceState && pTopBorderDistanceState && pBottomBorderDistanceState )
700cdf0e10cSrcweir {
701cdf0e10cSrcweir sal_Int32 aLeft = 0, aRight = 0, aTop = 0, aBottom = 0;
702cdf0e10cSrcweir
703cdf0e10cSrcweir pLeftBorderDistanceState->maValue >>= aLeft;
704cdf0e10cSrcweir pRightBorderDistanceState->maValue >>= aRight;
705cdf0e10cSrcweir pTopBorderDistanceState->maValue >>= aTop;
706cdf0e10cSrcweir pBottomBorderDistanceState->maValue >>= aBottom;
707cdf0e10cSrcweir if( aLeft == aRight && aLeft == aTop && aLeft == aBottom )
708cdf0e10cSrcweir {
709cdf0e10cSrcweir pLeftBorderDistanceState->mnIndex = -1;
710cdf0e10cSrcweir pLeftBorderDistanceState->maValue.clear();
711cdf0e10cSrcweir pRightBorderDistanceState->mnIndex = -1;
712cdf0e10cSrcweir pRightBorderDistanceState->maValue.clear();
713cdf0e10cSrcweir pTopBorderDistanceState->mnIndex = -1;
714cdf0e10cSrcweir pTopBorderDistanceState->maValue.clear();
715cdf0e10cSrcweir pBottomBorderDistanceState->mnIndex = -1;
716cdf0e10cSrcweir pBottomBorderDistanceState->maValue.clear();
717cdf0e10cSrcweir }
718cdf0e10cSrcweir else
719cdf0e10cSrcweir {
720cdf0e10cSrcweir pAllBorderDistanceState->mnIndex = -1;
721cdf0e10cSrcweir pAllBorderDistanceState->maValue.clear();
722cdf0e10cSrcweir }
723cdf0e10cSrcweir }
724cdf0e10cSrcweir else
725cdf0e10cSrcweir {
726cdf0e10cSrcweir pAllBorderDistanceState->mnIndex = -1;
727cdf0e10cSrcweir pAllBorderDistanceState->maValue.clear();
728cdf0e10cSrcweir }
729cdf0e10cSrcweir }
730cdf0e10cSrcweir
731cdf0e10cSrcweir if( pAllBorderState )
732cdf0e10cSrcweir {
733cdf0e10cSrcweir if( pLeftBorderState && pRightBorderState && pTopBorderState && pBottomBorderState )
734cdf0e10cSrcweir {
735cdf0e10cSrcweir table::BorderLine aLeft, aRight, aTop, aBottom;
736cdf0e10cSrcweir
737cdf0e10cSrcweir pLeftBorderState->maValue >>= aLeft;
738cdf0e10cSrcweir pRightBorderState->maValue >>= aRight;
739cdf0e10cSrcweir pTopBorderState->maValue >>= aTop;
740cdf0e10cSrcweir pBottomBorderState->maValue >>= aBottom;
741cdf0e10cSrcweir if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth &&
742cdf0e10cSrcweir aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance &&
743cdf0e10cSrcweir aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth &&
744cdf0e10cSrcweir aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance &&
745cdf0e10cSrcweir aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth &&
746cdf0e10cSrcweir aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance )
747cdf0e10cSrcweir {
748cdf0e10cSrcweir pLeftBorderState->mnIndex = -1;
749cdf0e10cSrcweir pLeftBorderState->maValue.clear();
750cdf0e10cSrcweir pRightBorderState->mnIndex = -1;
751cdf0e10cSrcweir pRightBorderState->maValue.clear();
752cdf0e10cSrcweir pTopBorderState->mnIndex = -1;
753cdf0e10cSrcweir pTopBorderState->maValue.clear();
754cdf0e10cSrcweir pBottomBorderState->mnIndex = -1;
755cdf0e10cSrcweir pBottomBorderState->maValue.clear();
756cdf0e10cSrcweir }
757cdf0e10cSrcweir else
758cdf0e10cSrcweir {
759cdf0e10cSrcweir pAllBorderState->mnIndex = -1;
760cdf0e10cSrcweir pAllBorderState->maValue.clear();
761cdf0e10cSrcweir }
762cdf0e10cSrcweir }
763cdf0e10cSrcweir else
764cdf0e10cSrcweir {
765cdf0e10cSrcweir pAllBorderState->mnIndex = -1;
766cdf0e10cSrcweir pAllBorderState->maValue.clear();
767cdf0e10cSrcweir }
768cdf0e10cSrcweir }
769cdf0e10cSrcweir
770cdf0e10cSrcweir sal_Int16 nSizeType = SizeType::FIX;
771cdf0e10cSrcweir if( pSizeTypeState )
772cdf0e10cSrcweir {
773cdf0e10cSrcweir pSizeTypeState->maValue >>= nSizeType;
774cdf0e10cSrcweir pSizeTypeState->mnIndex = -1;
775cdf0e10cSrcweir }
776cdf0e10cSrcweir
777cdf0e10cSrcweir if( pHeightMinAbsState )
778cdf0e10cSrcweir {
779cdf0e10cSrcweir sal_Int16 nRel = sal_Int16();
780cdf0e10cSrcweir if( (SizeType::FIX == nSizeType) ||
781cdf0e10cSrcweir ( pHeightMinRelState &&
782cdf0e10cSrcweir ( !(pHeightMinRelState->maValue >>= nRel) || nRel > 0 ) ) )
783cdf0e10cSrcweir {
784cdf0e10cSrcweir pHeightMinAbsState->mnIndex = -1;
785cdf0e10cSrcweir }
786cdf0e10cSrcweir
787cdf0e10cSrcweir // export SizeType::VARIABLE als min-width="0"
788cdf0e10cSrcweir if( SizeType::VARIABLE == nSizeType )
789cdf0e10cSrcweir pHeightMinAbsState->maValue <<= static_cast<sal_Int32>( 0 );
790cdf0e10cSrcweir }
791cdf0e10cSrcweir if( pHeightMinRelState && SizeType::MIN != nSizeType)
792cdf0e10cSrcweir pHeightMinRelState->mnIndex = -1;
793cdf0e10cSrcweir if( pHeightAbsState && pHeightMinAbsState &&
794cdf0e10cSrcweir -1 != pHeightMinAbsState->mnIndex )
795cdf0e10cSrcweir pHeightAbsState->mnIndex = -1;
796cdf0e10cSrcweir if( pHeightRelState && SizeType::FIX != nSizeType)
797cdf0e10cSrcweir pHeightRelState->mnIndex = -1;
798cdf0e10cSrcweir
799cdf0e10cSrcweir // frame width
800cdf0e10cSrcweir nSizeType = SizeType::FIX;
801cdf0e10cSrcweir if( pWidthTypeState )
802cdf0e10cSrcweir {
803cdf0e10cSrcweir pWidthTypeState->maValue >>= nSizeType;
804cdf0e10cSrcweir pWidthTypeState->mnIndex = -1;
805cdf0e10cSrcweir }
806cdf0e10cSrcweir if( pWidthMinAbsState )
807cdf0e10cSrcweir {
808cdf0e10cSrcweir sal_Int16 nRel = sal_Int16();
809cdf0e10cSrcweir if( (SizeType::FIX == nSizeType) ||
810cdf0e10cSrcweir ( pWidthMinRelState &&
811cdf0e10cSrcweir ( !(pWidthMinRelState->maValue >>= nRel) || nRel > 0 ) ) )
812cdf0e10cSrcweir {
813cdf0e10cSrcweir pWidthMinAbsState->mnIndex = -1;
814cdf0e10cSrcweir }
815cdf0e10cSrcweir
816cdf0e10cSrcweir // export SizeType::VARIABLE als min-width="0"
817cdf0e10cSrcweir if( SizeType::VARIABLE == nSizeType )
818cdf0e10cSrcweir pWidthMinAbsState->maValue <<= static_cast<sal_Int32>( 0 );
819cdf0e10cSrcweir }
820cdf0e10cSrcweir if( pWidthMinRelState && SizeType::MIN != nSizeType)
821cdf0e10cSrcweir pWidthMinRelState->mnIndex = -1;
822cdf0e10cSrcweir if( pWidthAbsState && pWidthMinAbsState &&
823cdf0e10cSrcweir -1 != pWidthMinAbsState->mnIndex )
824cdf0e10cSrcweir pWidthAbsState->mnIndex = -1;
825cdf0e10cSrcweir if( pWidthRelState && SizeType::FIX != nSizeType)
826cdf0e10cSrcweir pWidthRelState->mnIndex = -1;
827cdf0e10cSrcweir
828cdf0e10cSrcweir if( pWrapState )
829cdf0e10cSrcweir {
830cdf0e10cSrcweir WrapTextMode eVal;
831cdf0e10cSrcweir pWrapState->maValue >>= eVal;
832cdf0e10cSrcweir switch( eVal )
833cdf0e10cSrcweir {
834cdf0e10cSrcweir case WrapTextMode_NONE:
835cdf0e10cSrcweir // no wrapping: disable para-only and contour
836cdf0e10cSrcweir if( pWrapParagraphOnlyState )
837cdf0e10cSrcweir pWrapParagraphOnlyState->mnIndex = -1;
838cdf0e10cSrcweir // no break
839cdf0e10cSrcweir case WrapTextMode_THROUGHT:
840cdf0e10cSrcweir // wrap through: disable only contour
841cdf0e10cSrcweir if( pWrapContourState )
842cdf0e10cSrcweir pWrapContourState->mnIndex = -1;
843cdf0e10cSrcweir break;
844cdf0e10cSrcweir default:
845cdf0e10cSrcweir break;
846cdf0e10cSrcweir }
847cdf0e10cSrcweir if( pWrapContourModeState &&
848cdf0e10cSrcweir (!pWrapContourState ||
849cdf0e10cSrcweir !*(sal_Bool *)pWrapContourState ->maValue.getValue() ) )
850cdf0e10cSrcweir pWrapContourModeState->mnIndex = -1;
851cdf0e10cSrcweir }
852cdf0e10cSrcweir
853cdf0e10cSrcweir TextContentAnchorType eAnchor = TextContentAnchorType_AT_PARAGRAPH;
854cdf0e10cSrcweir if( pAnchorTypeState )
855cdf0e10cSrcweir pAnchorTypeState->maValue >>= eAnchor;
856cdf0e10cSrcweir else if( bNeedsAnchor )
857cdf0e10cSrcweir {
858cdf0e10cSrcweir Any aAny = rPropSet->getPropertyValue(
859cdf0e10cSrcweir ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AnchorType") ) );
860cdf0e10cSrcweir aAny >>= eAnchor;
861cdf0e10cSrcweir }
862cdf0e10cSrcweir
863cdf0e10cSrcweir // states for frame positioning attributes
864cdf0e10cSrcweir {
865cdf0e10cSrcweir if( pHoriOrientState && pHoriOrientMirroredState )
866cdf0e10cSrcweir {
867cdf0e10cSrcweir if( pHoriOrientMirrorState &&
868cdf0e10cSrcweir *(sal_Bool *)pHoriOrientMirrorState->maValue.getValue() )
869cdf0e10cSrcweir pHoriOrientState->mnIndex = -1;
870cdf0e10cSrcweir else
871cdf0e10cSrcweir pHoriOrientMirroredState->mnIndex = -1;
872cdf0e10cSrcweir }
873cdf0e10cSrcweir if( pHoriOrientMirrorState )
874cdf0e10cSrcweir pHoriOrientMirrorState->mnIndex = -1;
875cdf0e10cSrcweir
876cdf0e10cSrcweir if( pHoriOrientRelState && TextContentAnchorType_AT_FRAME == eAnchor )
877cdf0e10cSrcweir pHoriOrientRelState->mnIndex = -1;
878cdf0e10cSrcweir if( pHoriOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
879cdf0e10cSrcweir pHoriOrientRelFrameState->mnIndex = -1;;
880cdf0e10cSrcweir
881cdf0e10cSrcweir if( pVertOrientState && TextContentAnchorType_AT_CHARACTER == eAnchor )
882cdf0e10cSrcweir pVertOrientState->mnIndex = -1;
883cdf0e10cSrcweir if( pVertOrientAtCharState && TextContentAnchorType_AT_CHARACTER != eAnchor )
884cdf0e10cSrcweir pVertOrientAtCharState->mnIndex = -1;
885cdf0e10cSrcweir if( pVertOrientRelState && TextContentAnchorType_AT_PARAGRAPH != eAnchor &&
886cdf0e10cSrcweir TextContentAnchorType_AT_CHARACTER != eAnchor )
887cdf0e10cSrcweir pVertOrientRelState->mnIndex = -1;
888cdf0e10cSrcweir if( pVertOrientRelPageState && TextContentAnchorType_AT_PAGE != eAnchor )
889cdf0e10cSrcweir pVertOrientRelPageState->mnIndex = -1;
890cdf0e10cSrcweir if( pVertOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
891cdf0e10cSrcweir pVertOrientRelFrameState->mnIndex = -1;
892cdf0e10cSrcweir if( pVertOrientRelAsCharState && TextContentAnchorType_AS_CHARACTER != eAnchor )
893cdf0e10cSrcweir pVertOrientRelAsCharState->mnIndex = -1;
894cdf0e10cSrcweir }
895cdf0e10cSrcweir
896cdf0e10cSrcweir // --> OD 2004-08-09 #i28749# - states for shape positioning properties
897cdf0e10cSrcweir if ( eAnchor != TextContentAnchorType_AS_CHARACTER &&
898cdf0e10cSrcweir ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 )
899cdf0e10cSrcweir {
900cdf0e10cSrcweir // no export of shape positioning properties,
901cdf0e10cSrcweir // if shape isn't anchored as-character and
902cdf0e10cSrcweir // destination file format is OpenOffice.org file format
903cdf0e10cSrcweir if ( pShapeHoriOrientState )
904cdf0e10cSrcweir pShapeHoriOrientState->mnIndex = -1;
905cdf0e10cSrcweir if ( pShapeHoriOrientMirroredState )
906cdf0e10cSrcweir pShapeHoriOrientMirroredState->mnIndex = -1;
907cdf0e10cSrcweir if ( pShapeHoriOrientRelState )
908cdf0e10cSrcweir pShapeHoriOrientRelState->mnIndex = -1;
909cdf0e10cSrcweir if ( pShapeHoriOrientRelFrameState )
910cdf0e10cSrcweir pShapeHoriOrientRelFrameState->mnIndex = -1;
911cdf0e10cSrcweir if ( pShapeHoriOrientMirrorState )
912cdf0e10cSrcweir pShapeHoriOrientMirrorState->mnIndex = -1;
913cdf0e10cSrcweir if ( pShapeVertOrientState )
914cdf0e10cSrcweir pShapeVertOrientState->mnIndex = -1;
915cdf0e10cSrcweir if ( pShapeVertOrientAtCharState )
916cdf0e10cSrcweir pShapeVertOrientAtCharState->mnIndex = -1;
917cdf0e10cSrcweir if ( pShapeVertOrientRelState )
918cdf0e10cSrcweir pShapeVertOrientRelState->mnIndex = -1;
919cdf0e10cSrcweir if ( pShapeVertOrientRelPageState )
920cdf0e10cSrcweir pShapeVertOrientRelPageState->mnIndex = -1;
921cdf0e10cSrcweir if ( pShapeVertOrientRelFrameState )
922cdf0e10cSrcweir pShapeVertOrientRelFrameState->mnIndex = -1;
923cdf0e10cSrcweir }
924cdf0e10cSrcweir else
925cdf0e10cSrcweir {
926cdf0e10cSrcweir // handling of shape positioning property states as for frames - see above
927cdf0e10cSrcweir if( pShapeHoriOrientState && pShapeHoriOrientMirroredState )
928cdf0e10cSrcweir {
929cdf0e10cSrcweir if( pShapeHoriOrientMirrorState &&
930cdf0e10cSrcweir *(sal_Bool *)pShapeHoriOrientMirrorState->maValue.getValue() )
931cdf0e10cSrcweir pShapeHoriOrientState->mnIndex = -1;
932cdf0e10cSrcweir else
933cdf0e10cSrcweir pShapeHoriOrientMirroredState->mnIndex = -1;
934cdf0e10cSrcweir }
935cdf0e10cSrcweir if( pShapeHoriOrientMirrorState )
936cdf0e10cSrcweir pShapeHoriOrientMirrorState->mnIndex = -1;
937cdf0e10cSrcweir
938cdf0e10cSrcweir if( pShapeHoriOrientRelState && TextContentAnchorType_AT_FRAME == eAnchor )
939cdf0e10cSrcweir pShapeHoriOrientRelState->mnIndex = -1;
940cdf0e10cSrcweir if( pShapeHoriOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
941cdf0e10cSrcweir pShapeHoriOrientRelFrameState->mnIndex = -1;;
942cdf0e10cSrcweir
943cdf0e10cSrcweir if( pShapeVertOrientState && TextContentAnchorType_AT_CHARACTER == eAnchor )
944cdf0e10cSrcweir pShapeVertOrientState->mnIndex = -1;
945cdf0e10cSrcweir if( pShapeVertOrientAtCharState && TextContentAnchorType_AT_CHARACTER != eAnchor )
946cdf0e10cSrcweir pShapeVertOrientAtCharState->mnIndex = -1;
947cdf0e10cSrcweir if( pShapeVertOrientRelState && TextContentAnchorType_AT_PARAGRAPH != eAnchor &&
948cdf0e10cSrcweir TextContentAnchorType_AT_CHARACTER != eAnchor )
949cdf0e10cSrcweir pShapeVertOrientRelState->mnIndex = -1;
950cdf0e10cSrcweir if( pShapeVertOrientRelPageState && TextContentAnchorType_AT_PAGE != eAnchor )
951cdf0e10cSrcweir pShapeVertOrientRelPageState->mnIndex = -1;
952cdf0e10cSrcweir if( pShapeVertOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
953cdf0e10cSrcweir pShapeVertOrientRelFrameState->mnIndex = -1;
954cdf0e10cSrcweir }
955cdf0e10cSrcweir // <--
956cdf0e10cSrcweir
957cdf0e10cSrcweir // list style name: remove list style if it is the default outline style
958cdf0e10cSrcweir if( pListStyleName != NULL )
959cdf0e10cSrcweir {
960cdf0e10cSrcweir OUString sListStyleName;
961cdf0e10cSrcweir pListStyleName->maValue >>= sListStyleName;
962cdf0e10cSrcweir if( lcl_IsOutlineStyle( GetExport(), sListStyleName ) )
963cdf0e10cSrcweir pListStyleName->mnIndex = -1;
964cdf0e10cSrcweir }
965cdf0e10cSrcweir
966cdf0e10cSrcweir if( pClipState != NULL && pClip11State != NULL )
967cdf0e10cSrcweir pClip11State->mnIndex = -1;
968cdf0e10cSrcweir
969cdf0e10cSrcweir SvXMLExportPropertyMapper::ContextFilter(rProperties,rPropSet);
970cdf0e10cSrcweir }
971cdf0e10cSrcweir
972cdf0e10cSrcweir
lcl_IsOutlineStyle(const SvXMLExport & rExport,const OUString & rName)973cdf0e10cSrcweir bool lcl_IsOutlineStyle(const SvXMLExport &rExport, const OUString & rName)
974cdf0e10cSrcweir {
975cdf0e10cSrcweir Reference< XChapterNumberingSupplier >
976cdf0e10cSrcweir xCNSupplier(rExport.GetModel(), UNO_QUERY);
977cdf0e10cSrcweir
978cdf0e10cSrcweir OUString sOutlineName;
979cdf0e10cSrcweir OUString sName(RTL_CONSTASCII_USTRINGPARAM("Name"));
980cdf0e10cSrcweir
981cdf0e10cSrcweir if (xCNSupplier.is())
982cdf0e10cSrcweir {
983cdf0e10cSrcweir Reference<XPropertySet> xNumRule(
984cdf0e10cSrcweir xCNSupplier->getChapterNumberingRules(), UNO_QUERY );
985cdf0e10cSrcweir DBG_ASSERT( xNumRule.is(), "no chapter numbering rules" );
986cdf0e10cSrcweir if (xNumRule.is())
987cdf0e10cSrcweir {
988cdf0e10cSrcweir xNumRule->getPropertyValue(sName) >>= sOutlineName;
989cdf0e10cSrcweir }
990cdf0e10cSrcweir }
991cdf0e10cSrcweir
992cdf0e10cSrcweir return rName == sOutlineName;
993cdf0e10cSrcweir }
994