xref: /aoo42x/main/xmloff/source/text/txtexppr.cxx (revision 56b35d86)
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 
22cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
23cdf0e10cSrcweir #include "precompiled_xmloff.hxx"
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #include "txtexppr.hxx"
26cdf0e10cSrcweir #include <com/sun/star/table/BorderLine.hpp>
27cdf0e10cSrcweir #include <com/sun/star/text/SizeType.hpp>
28cdf0e10cSrcweir #include <com/sun/star/text/WrapTextMode.hpp>
29cdf0e10cSrcweir #include <com/sun/star/text/TextContentAnchorType.hpp>
30cdf0e10cSrcweir #include <com/sun/star/awt/FontFamily.hpp>
31cdf0e10cSrcweir #include <com/sun/star/awt/FontPitch.hpp>
32cdf0e10cSrcweir #include <com/sun/star/awt/FontUnderline.hpp>
33cdf0e10cSrcweir #include <com/sun/star/text/XChapterNumberingSupplier.hpp>
34cdf0e10cSrcweir #include <tools/debug.hxx>
35cdf0e10cSrcweir #include <xmloff/txtprmap.hxx>
36cdf0e10cSrcweir #include <xmloff/xmlexp.hxx>
37cdf0e10cSrcweir #include "XMLSectionFootnoteConfigExport.hxx"
38cdf0e10cSrcweir 
39*56b35d86SArmin Le Grand //UUUU
40*56b35d86SArmin Le Grand #include <xmlsdtypes.hxx>
41*56b35d86SArmin Le Grand 
42cdf0e10cSrcweir using ::rtl::OUString;
43cdf0e10cSrcweir using ::rtl::OUStringBuffer;
44cdf0e10cSrcweir 
45cdf0e10cSrcweir using namespace ::com::sun::star;
46cdf0e10cSrcweir using namespace ::com::sun::star::uno;
47cdf0e10cSrcweir using namespace ::com::sun::star::style;
48cdf0e10cSrcweir using namespace ::com::sun::star::beans;
49cdf0e10cSrcweir using namespace ::com::sun::star::text;
50cdf0e10cSrcweir using namespace ::com::sun::star::awt;
51cdf0e10cSrcweir 
52cdf0e10cSrcweir void XMLTextExportPropertySetMapper::handleElementItem(
53cdf0e10cSrcweir         SvXMLExport& rExp,
54cdf0e10cSrcweir 		const XMLPropertyState& rProperty,
55cdf0e10cSrcweir 		sal_uInt16 nFlags,
56cdf0e10cSrcweir 		const ::std::vector< XMLPropertyState > *pProperties,
57cdf0e10cSrcweir 		sal_uInt32 nIdx ) const
58cdf0e10cSrcweir {
59cdf0e10cSrcweir 	XMLTextExportPropertySetMapper *pThis =
60cdf0e10cSrcweir 	   	((XMLTextExportPropertySetMapper *)this);
61cdf0e10cSrcweir 
62cdf0e10cSrcweir 	switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
63cdf0e10cSrcweir 	{
64cdf0e10cSrcweir 	case CTF_DROPCAPFORMAT:
65cdf0e10cSrcweir 		pThis->maDropCapExport.exportXML( rProperty.maValue, bDropWholeWord,
66cdf0e10cSrcweir 										  sDropCharStyle );
67cdf0e10cSrcweir 		pThis->bDropWholeWord = sal_False;
68cdf0e10cSrcweir 		pThis->sDropCharStyle = OUString();
69cdf0e10cSrcweir 		break;
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 	case CTF_TABSTOP:
72cdf0e10cSrcweir 		pThis->maTabStopExport.Export( rProperty.maValue );
73cdf0e10cSrcweir 		break;
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 	case CTF_TEXTCOLUMNS:
76cdf0e10cSrcweir 		pThis->maTextColumnsExport.exportXML( rProperty.maValue );
77cdf0e10cSrcweir 		break;
78cdf0e10cSrcweir 
79cdf0e10cSrcweir 	case CTF_BACKGROUND_URL:
80cdf0e10cSrcweir 		{
81cdf0e10cSrcweir 			DBG_ASSERT( pProperties && nIdx >= 3,
82cdf0e10cSrcweir 						"property vector missing" );
83cdf0e10cSrcweir 			const Any *pPos = 0, *pFilter = 0, *pTrans = 0;
84cdf0e10cSrcweir 			if( pProperties && nIdx >= 3 )
85cdf0e10cSrcweir 			{
86cdf0e10cSrcweir 				const XMLPropertyState& rTrans = (*pProperties)[nIdx-3];
87cdf0e10cSrcweir                 // #99657# transparency may be there, but doesn't have to be.
88cdf0e10cSrcweir                 // If it's there, it must be in the right position.
89cdf0e10cSrcweir 				if( CTF_BACKGROUND_TRANSPARENCY == getPropertySetMapper()
90cdf0e10cSrcweir                       ->GetEntryContextId( rTrans.mnIndex ) )
91cdf0e10cSrcweir 					pTrans = &rTrans.maValue;
92cdf0e10cSrcweir 
93cdf0e10cSrcweir 				const XMLPropertyState& rPos = (*pProperties)[nIdx-2];
94cdf0e10cSrcweir 				DBG_ASSERT( CTF_BACKGROUND_POS == getPropertySetMapper()
95cdf0e10cSrcweir 						->GetEntryContextId( rPos.mnIndex ),
96cdf0e10cSrcweir 						 "invalid property map: pos expected" );
97cdf0e10cSrcweir 				if( CTF_BACKGROUND_POS == getPropertySetMapper()
98cdf0e10cSrcweir 						->GetEntryContextId( rPos.mnIndex ) )
99cdf0e10cSrcweir 					pPos = &rPos.maValue;
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 				const XMLPropertyState& rFilter = (*pProperties)[nIdx-1];
102cdf0e10cSrcweir 				DBG_ASSERT( CTF_BACKGROUND_FILTER == getPropertySetMapper()
103cdf0e10cSrcweir 						->GetEntryContextId( rFilter.mnIndex ),
104cdf0e10cSrcweir 						 "invalid property map: filter expected" );
105cdf0e10cSrcweir 				if( CTF_BACKGROUND_FILTER == getPropertySetMapper()
106cdf0e10cSrcweir 						->GetEntryContextId( rFilter.mnIndex ) )
107cdf0e10cSrcweir 					pFilter = &rFilter.maValue;
108cdf0e10cSrcweir 			}
109cdf0e10cSrcweir 			sal_uInt32 nPropIndex = rProperty.mnIndex;
110cdf0e10cSrcweir 			pThis->maBackgroundImageExport.exportXML(
111cdf0e10cSrcweir 					rProperty.maValue, pPos, pFilter, pTrans,
112cdf0e10cSrcweir 					getPropertySetMapper()->GetEntryNameSpace( nPropIndex ),
113cdf0e10cSrcweir 					getPropertySetMapper()->GetEntryXMLName( nPropIndex ) );
114cdf0e10cSrcweir 		}
115cdf0e10cSrcweir 		break;
116cdf0e10cSrcweir 
117cdf0e10cSrcweir 	case CTF_SECTION_FOOTNOTE_END:
118cdf0e10cSrcweir 		XMLSectionFootnoteConfigExport::exportXML(rExp, sal_False,
119cdf0e10cSrcweir 												  pProperties, nIdx,
120cdf0e10cSrcweir 												  getPropertySetMapper());
121cdf0e10cSrcweir 		break;
122cdf0e10cSrcweir 
123cdf0e10cSrcweir 	case CTF_SECTION_ENDNOTE_END:
124cdf0e10cSrcweir 		XMLSectionFootnoteConfigExport::exportXML(rExp, sal_True,
125cdf0e10cSrcweir 												  pProperties, nIdx,
126cdf0e10cSrcweir 												  getPropertySetMapper());
127cdf0e10cSrcweir 		break;
128cdf0e10cSrcweir 
129cdf0e10cSrcweir 	default:
130cdf0e10cSrcweir 		SvXMLExportPropertyMapper::handleElementItem( rExp, rProperty, nFlags, pProperties, nIdx );
131cdf0e10cSrcweir 		break;
132cdf0e10cSrcweir 	}
133cdf0e10cSrcweir }
134cdf0e10cSrcweir 
135cdf0e10cSrcweir void XMLTextExportPropertySetMapper::handleSpecialItem(
136cdf0e10cSrcweir 		SvXMLAttributeList& rAttrList,
137cdf0e10cSrcweir 		const XMLPropertyState& rProperty,
138cdf0e10cSrcweir 		const SvXMLUnitConverter& rUnitConverter,
139cdf0e10cSrcweir 		const SvXMLNamespaceMap& rNamespaceMap,
140cdf0e10cSrcweir 		const ::std::vector< XMLPropertyState > *pProperties,
141cdf0e10cSrcweir 		sal_uInt32 nIdx ) const
142cdf0e10cSrcweir {
143cdf0e10cSrcweir 	XMLTextExportPropertySetMapper *pThis =
144cdf0e10cSrcweir 	   	((XMLTextExportPropertySetMapper *)this);
145cdf0e10cSrcweir 
146cdf0e10cSrcweir 	switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
147cdf0e10cSrcweir 	{
148cdf0e10cSrcweir 	case CTF_DROPCAPWHOLEWORD:
149cdf0e10cSrcweir 		DBG_ASSERT( !bDropWholeWord, "drop whole word is set already!" );
150cdf0e10cSrcweir 		pThis->bDropWholeWord = *(sal_Bool *)rProperty.maValue.getValue();
151cdf0e10cSrcweir 		break;
152cdf0e10cSrcweir 	case CTF_DROPCAPCHARSTYLE:
153cdf0e10cSrcweir 		DBG_ASSERT( !sDropCharStyle.getLength(),
154cdf0e10cSrcweir 					"drop char style is set already!" );
155cdf0e10cSrcweir 		rProperty.maValue >>= pThis->sDropCharStyle;
156cdf0e10cSrcweir 		break;
157cdf0e10cSrcweir 	case CTF_NUMBERINGSTYLENAME:
158cdf0e10cSrcweir 	case CTF_PAGEDESCNAME:
159cdf0e10cSrcweir 	case CTF_OLDTEXTBACKGROUND:
160cdf0e10cSrcweir 	case CTF_BACKGROUND_POS:
161cdf0e10cSrcweir 	case CTF_BACKGROUND_FILTER:
162cdf0e10cSrcweir     case CTF_BACKGROUND_TRANSPARENCY:
163cdf0e10cSrcweir 	case CTF_SECTION_FOOTNOTE_NUM_OWN:
164cdf0e10cSrcweir 	case CTF_SECTION_FOOTNOTE_NUM_RESTART:
165cdf0e10cSrcweir 	case CTF_SECTION_FOOTNOTE_NUM_RESTART_AT:
166cdf0e10cSrcweir 	case CTF_SECTION_FOOTNOTE_NUM_TYPE:
167cdf0e10cSrcweir 	case CTF_SECTION_FOOTNOTE_NUM_PREFIX:
168cdf0e10cSrcweir 	case CTF_SECTION_FOOTNOTE_NUM_SUFFIX:
169cdf0e10cSrcweir 	case CTF_SECTION_ENDNOTE_NUM_OWN:
170cdf0e10cSrcweir 	case CTF_SECTION_ENDNOTE_NUM_RESTART:
171cdf0e10cSrcweir 	case CTF_SECTION_ENDNOTE_NUM_RESTART_AT:
172cdf0e10cSrcweir 	case CTF_SECTION_ENDNOTE_NUM_TYPE:
173cdf0e10cSrcweir 	case CTF_SECTION_ENDNOTE_NUM_PREFIX:
174cdf0e10cSrcweir 	case CTF_SECTION_ENDNOTE_NUM_SUFFIX:
175cdf0e10cSrcweir 	case CTF_DEFAULT_OUTLINE_LEVEL:
176cdf0e10cSrcweir     case CTF_OLD_FLOW_WITH_TEXT:
177cdf0e10cSrcweir 		// There's nothing to do here!
178cdf0e10cSrcweir 		break;
179cdf0e10cSrcweir 	default:
180cdf0e10cSrcweir 		SvXMLExportPropertyMapper::handleSpecialItem(rAttrList, rProperty, rUnitConverter, rNamespaceMap, pProperties, nIdx );
181cdf0e10cSrcweir 		break;
182cdf0e10cSrcweir 	}
183cdf0e10cSrcweir }
184cdf0e10cSrcweir 
185cdf0e10cSrcweir XMLTextExportPropertySetMapper::XMLTextExportPropertySetMapper(
186cdf0e10cSrcweir 		const UniReference< XMLPropertySetMapper >& rMapper,
187cdf0e10cSrcweir 		SvXMLExport& rExp ) :
188cdf0e10cSrcweir 	SvXMLExportPropertyMapper( rMapper ),
189cdf0e10cSrcweir 	rExport( rExp ),
190cdf0e10cSrcweir 	bDropWholeWord( sal_False ),
191cdf0e10cSrcweir 	maDropCapExport( rExp ),
192cdf0e10cSrcweir 	maTabStopExport( rExp ),
193cdf0e10cSrcweir 	maTextColumnsExport( rExp ),
194cdf0e10cSrcweir 	maBackgroundImageExport( rExp )
195cdf0e10cSrcweir {
196cdf0e10cSrcweir }
197cdf0e10cSrcweir 
198cdf0e10cSrcweir XMLTextExportPropertySetMapper::~XMLTextExportPropertySetMapper()
199cdf0e10cSrcweir {
200cdf0e10cSrcweir }
201cdf0e10cSrcweir 
202cdf0e10cSrcweir void XMLTextExportPropertySetMapper::ContextFontFilter(
203cdf0e10cSrcweir 	XMLPropertyState *pFontNameState,
204cdf0e10cSrcweir 	XMLPropertyState *pFontFamilyNameState,
205cdf0e10cSrcweir 	XMLPropertyState *pFontStyleNameState,
206cdf0e10cSrcweir 	XMLPropertyState *pFontFamilyState,
207cdf0e10cSrcweir 	XMLPropertyState *pFontPitchState,
208cdf0e10cSrcweir 	XMLPropertyState *pFontCharsetState ) const
209cdf0e10cSrcweir {
210cdf0e10cSrcweir 	OUString sFamilyName;
211cdf0e10cSrcweir 	OUString sStyleName;
212cdf0e10cSrcweir 	sal_Int16 nFamily = FontFamily::DONTKNOW;
213cdf0e10cSrcweir 	sal_Int16 nPitch = FontPitch::DONTKNOW;
214cdf0e10cSrcweir 	rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
215cdf0e10cSrcweir 
216cdf0e10cSrcweir 	OUString sTmp;
217cdf0e10cSrcweir 	if( pFontFamilyNameState && (pFontFamilyNameState->maValue >>= sTmp ) )
218cdf0e10cSrcweir 		sFamilyName = sTmp;
219cdf0e10cSrcweir 	if( pFontStyleNameState && (pFontStyleNameState->maValue >>= sTmp ) )
220cdf0e10cSrcweir 		sStyleName = sTmp;
221cdf0e10cSrcweir 
222cdf0e10cSrcweir 	sal_Int16 nTmp = sal_Int16();
223cdf0e10cSrcweir 	if( pFontFamilyState && (pFontFamilyState->maValue >>= nTmp ) )
224cdf0e10cSrcweir 		nFamily = nTmp;
225cdf0e10cSrcweir 	if( pFontPitchState && (pFontPitchState->maValue >>= nTmp ) )
226cdf0e10cSrcweir 		nPitch = nTmp;
227cdf0e10cSrcweir 	if( pFontCharsetState && (pFontCharsetState->maValue >>= nTmp ) )
228cdf0e10cSrcweir 		eEnc = (rtl_TextEncoding)nTmp;
229cdf0e10cSrcweir 
230cdf0e10cSrcweir 	OUString sName( ((SvXMLExport&)GetExport()).GetFontAutoStylePool()->Find(
231cdf0e10cSrcweir 						sFamilyName, sStyleName, nFamily, nPitch, eEnc ) );
232cdf0e10cSrcweir 	if( sName.getLength() )
233cdf0e10cSrcweir 	{
234cdf0e10cSrcweir 		pFontNameState->maValue <<= sName;
235cdf0e10cSrcweir 		if( pFontFamilyNameState )
236cdf0e10cSrcweir 			pFontFamilyNameState->mnIndex = -1;
237cdf0e10cSrcweir 		if( pFontStyleNameState )
238cdf0e10cSrcweir 			pFontStyleNameState->mnIndex = -1;
239cdf0e10cSrcweir 		if( pFontFamilyState )
240cdf0e10cSrcweir 			pFontFamilyState->mnIndex = -1;
241cdf0e10cSrcweir 		if( pFontPitchState )
242cdf0e10cSrcweir 			pFontPitchState->mnIndex = -1;
243cdf0e10cSrcweir 		if( pFontCharsetState )
244cdf0e10cSrcweir 			pFontCharsetState->mnIndex = -1;
245cdf0e10cSrcweir 	}
246cdf0e10cSrcweir 	else
247cdf0e10cSrcweir 	{
248cdf0e10cSrcweir 		pFontNameState->mnIndex = -1;
249cdf0e10cSrcweir 	}
250cdf0e10cSrcweir 
251cdf0e10cSrcweir 	if( pFontFamilyNameState && (0 == sFamilyName.getLength()) )
252cdf0e10cSrcweir 	{
253cdf0e10cSrcweir 		pFontFamilyNameState->mnIndex = -1;
254cdf0e10cSrcweir 	}
255cdf0e10cSrcweir 
256cdf0e10cSrcweir 	if( pFontStyleNameState && (0 == sStyleName.getLength()) )
257cdf0e10cSrcweir 	{
258cdf0e10cSrcweir 		pFontStyleNameState->mnIndex = -1;
259cdf0e10cSrcweir 	}
260cdf0e10cSrcweir }
261cdf0e10cSrcweir 
262cdf0e10cSrcweir void XMLTextExportPropertySetMapper::ContextFontHeightFilter(
263cdf0e10cSrcweir 	XMLPropertyState* pCharHeightState,
264cdf0e10cSrcweir 	XMLPropertyState* pCharPropHeightState,
265cdf0e10cSrcweir 	XMLPropertyState* pCharDiffHeightState ) const
266cdf0e10cSrcweir {
267cdf0e10cSrcweir 	if( pCharPropHeightState )
268cdf0e10cSrcweir 	{
269cdf0e10cSrcweir 		sal_Int32 nTemp = 0;
270cdf0e10cSrcweir 		pCharPropHeightState->maValue >>= nTemp;
271cdf0e10cSrcweir 		if( nTemp == 100 )
272cdf0e10cSrcweir 		{
273cdf0e10cSrcweir 			pCharPropHeightState->mnIndex = -1;
274cdf0e10cSrcweir 			pCharPropHeightState->maValue.clear();
275cdf0e10cSrcweir 		}
276cdf0e10cSrcweir 		else
277cdf0e10cSrcweir 		{
278cdf0e10cSrcweir 			pCharHeightState->mnIndex = -1;
279cdf0e10cSrcweir 			pCharHeightState->maValue.clear();
280cdf0e10cSrcweir 		}
281cdf0e10cSrcweir 	}
282cdf0e10cSrcweir 	if( pCharDiffHeightState )
283cdf0e10cSrcweir 	{
284cdf0e10cSrcweir 		float nTemp = 0;
285cdf0e10cSrcweir 		pCharDiffHeightState->maValue >>= nTemp;
286cdf0e10cSrcweir 		if( nTemp == 0. )
287cdf0e10cSrcweir 		{
288cdf0e10cSrcweir 			pCharDiffHeightState->mnIndex = -1;
289cdf0e10cSrcweir 			pCharDiffHeightState->maValue.clear();
290cdf0e10cSrcweir 		}
291cdf0e10cSrcweir 		else
292cdf0e10cSrcweir 		{
293cdf0e10cSrcweir 			pCharHeightState->mnIndex = -1;
294cdf0e10cSrcweir 			pCharHeightState->maValue.clear();
295cdf0e10cSrcweir 		}
296cdf0e10cSrcweir 	}
297cdf0e10cSrcweir 
298cdf0e10cSrcweir }
299cdf0e10cSrcweir 
300cdf0e10cSrcweir // helper method; implementation below
301cdf0e10cSrcweir bool lcl_IsOutlineStyle(const SvXMLExport&, const OUString&);
302cdf0e10cSrcweir 
303cdf0e10cSrcweir static void
304cdf0e10cSrcweir lcl_checkMultiProperty(XMLPropertyState *const pState,
305cdf0e10cSrcweir                        XMLPropertyState *const pRelState)
306cdf0e10cSrcweir {
307cdf0e10cSrcweir     if (pState && pRelState)
308cdf0e10cSrcweir     {
309cdf0e10cSrcweir         sal_Int32 nTemp = 0;
310cdf0e10cSrcweir         pRelState->maValue >>= nTemp;
311cdf0e10cSrcweir         if (100 == nTemp)
312cdf0e10cSrcweir         {
313cdf0e10cSrcweir             pRelState->mnIndex = -1;
314cdf0e10cSrcweir             pRelState->maValue.clear();
315cdf0e10cSrcweir         }
316cdf0e10cSrcweir         else
317cdf0e10cSrcweir         {
318cdf0e10cSrcweir             pState->mnIndex = -1;
319cdf0e10cSrcweir             pState->maValue.clear();
320cdf0e10cSrcweir         }
321cdf0e10cSrcweir     }
322cdf0e10cSrcweir }
323cdf0e10cSrcweir 
324cdf0e10cSrcweir void XMLTextExportPropertySetMapper::ContextFilter(
325cdf0e10cSrcweir 	::std::vector< XMLPropertyState >& rProperties,
326cdf0e10cSrcweir 	Reference< XPropertySet > rPropSet ) const
327cdf0e10cSrcweir {
328cdf0e10cSrcweir 	// filter font
329cdf0e10cSrcweir 	XMLPropertyState *pFontNameState = 0;
330cdf0e10cSrcweir 	XMLPropertyState *pFontFamilyNameState = 0;
331cdf0e10cSrcweir 	XMLPropertyState *pFontStyleNameState = 0;
332cdf0e10cSrcweir 	XMLPropertyState *pFontFamilyState = 0;
333cdf0e10cSrcweir 	XMLPropertyState *pFontPitchState = 0;
334cdf0e10cSrcweir 	XMLPropertyState *pFontCharsetState = 0;
335cdf0e10cSrcweir 	XMLPropertyState *pFontNameCJKState = 0;
336cdf0e10cSrcweir 	XMLPropertyState *pFontFamilyNameCJKState = 0;
337cdf0e10cSrcweir 	XMLPropertyState *pFontStyleNameCJKState = 0;
338cdf0e10cSrcweir 	XMLPropertyState *pFontFamilyCJKState = 0;
339cdf0e10cSrcweir 	XMLPropertyState *pFontPitchCJKState = 0;
340cdf0e10cSrcweir 	XMLPropertyState *pFontCharsetCJKState = 0;
341cdf0e10cSrcweir 	XMLPropertyState *pFontNameCTLState = 0;
342cdf0e10cSrcweir 	XMLPropertyState *pFontFamilyNameCTLState = 0;
343cdf0e10cSrcweir 	XMLPropertyState *pFontStyleNameCTLState = 0;
344cdf0e10cSrcweir 	XMLPropertyState *pFontFamilyCTLState = 0;
345cdf0e10cSrcweir 	XMLPropertyState *pFontPitchCTLState = 0;
346cdf0e10cSrcweir 	XMLPropertyState *pFontCharsetCTLState = 0;
347cdf0e10cSrcweir 
348cdf0e10cSrcweir 	// filter char height point/percent
349cdf0e10cSrcweir 	XMLPropertyState* pCharHeightState = NULL;
350cdf0e10cSrcweir 	XMLPropertyState* pCharPropHeightState = NULL;
351cdf0e10cSrcweir 	XMLPropertyState* pCharDiffHeightState = NULL;
352cdf0e10cSrcweir 	XMLPropertyState* pCharHeightCJKState = NULL;
353cdf0e10cSrcweir 	XMLPropertyState* pCharPropHeightCJKState = NULL;
354cdf0e10cSrcweir 	XMLPropertyState* pCharDiffHeightCJKState = NULL;
355cdf0e10cSrcweir 	XMLPropertyState* pCharHeightCTLState = NULL;
356cdf0e10cSrcweir 	XMLPropertyState* pCharPropHeightCTLState = NULL;
357cdf0e10cSrcweir 	XMLPropertyState* pCharDiffHeightCTLState = NULL;
358cdf0e10cSrcweir 
359cdf0e10cSrcweir 	// filter left margin measure/percent
360cdf0e10cSrcweir 	XMLPropertyState* pParaLeftMarginState = NULL;
361cdf0e10cSrcweir 	XMLPropertyState* pParaLeftMarginRelState = NULL;
362cdf0e10cSrcweir 
363cdf0e10cSrcweir 	// filter right margin measure/percent
364cdf0e10cSrcweir 	XMLPropertyState* pParaRightMarginState = NULL;
365cdf0e10cSrcweir 	XMLPropertyState* pParaRightMarginRelState = NULL;
366cdf0e10cSrcweir 
367cdf0e10cSrcweir 	// filter first line indent measure/percent
368cdf0e10cSrcweir 	XMLPropertyState* pParaFirstLineState = NULL;
369cdf0e10cSrcweir 	XMLPropertyState* pParaFirstLineRelState = NULL;
370cdf0e10cSrcweir 
371cdf0e10cSrcweir 	// filter ParaTopMargin/Relative
372cdf0e10cSrcweir 	XMLPropertyState* pParaTopMarginState = NULL;
373cdf0e10cSrcweir 	XMLPropertyState* pParaTopMarginRelState = NULL;
374cdf0e10cSrcweir 
375cdf0e10cSrcweir 	// filter ParaTopMargin/Relative
376cdf0e10cSrcweir 	XMLPropertyState* pParaBottomMarginState = NULL;
377cdf0e10cSrcweir 	XMLPropertyState* pParaBottomMarginRelState = NULL;
378cdf0e10cSrcweir 
379cdf0e10cSrcweir 	// filter (Left|Right|Top|Bottom|)BorderWidth
380cdf0e10cSrcweir 	XMLPropertyState* pAllBorderWidthState = NULL;
381cdf0e10cSrcweir 	XMLPropertyState* pLeftBorderWidthState = NULL;
382cdf0e10cSrcweir 	XMLPropertyState* pRightBorderWidthState = NULL;
383cdf0e10cSrcweir 	XMLPropertyState* pTopBorderWidthState = NULL;
384cdf0e10cSrcweir 	XMLPropertyState* pBottomBorderWidthState = NULL;
385cdf0e10cSrcweir 
386cdf0e10cSrcweir 	// filter (Left|Right|Top|)BorderDistance
387cdf0e10cSrcweir 	XMLPropertyState* pAllBorderDistanceState = NULL;
388cdf0e10cSrcweir 	XMLPropertyState* pLeftBorderDistanceState = NULL;
389cdf0e10cSrcweir 	XMLPropertyState* pRightBorderDistanceState = NULL;
390cdf0e10cSrcweir 	XMLPropertyState* pTopBorderDistanceState = NULL;
391cdf0e10cSrcweir 	XMLPropertyState* pBottomBorderDistanceState = NULL;
392cdf0e10cSrcweir 
393cdf0e10cSrcweir 	// filter (Left|Right|Top|Bottom|)Border
394cdf0e10cSrcweir 	XMLPropertyState* pAllBorderState = NULL;
395cdf0e10cSrcweir 	XMLPropertyState* pLeftBorderState = NULL;
396cdf0e10cSrcweir 	XMLPropertyState* pRightBorderState = NULL;
397cdf0e10cSrcweir 	XMLPropertyState* pTopBorderState = NULL;
398cdf0e10cSrcweir 	XMLPropertyState* pBottomBorderState = NULL;
399cdf0e10cSrcweir 
400cdf0e10cSrcweir 	// filter height properties
401cdf0e10cSrcweir 	XMLPropertyState* pHeightMinAbsState = NULL;
402cdf0e10cSrcweir 	XMLPropertyState* pHeightMinRelState = NULL;
403cdf0e10cSrcweir 	XMLPropertyState* pHeightAbsState = NULL;
404cdf0e10cSrcweir 	XMLPropertyState* pHeightRelState = NULL;
405cdf0e10cSrcweir 	XMLPropertyState* pSizeTypeState = NULL;
406cdf0e10cSrcweir 
407cdf0e10cSrcweir     // filter width properties
408cdf0e10cSrcweir 	XMLPropertyState* pWidthMinAbsState = NULL;
409cdf0e10cSrcweir 	XMLPropertyState* pWidthMinRelState = NULL;
410cdf0e10cSrcweir 	XMLPropertyState* pWidthAbsState = NULL;
411cdf0e10cSrcweir 	XMLPropertyState* pWidthRelState = NULL;
412cdf0e10cSrcweir 	XMLPropertyState* pWidthTypeState = NULL;
413cdf0e10cSrcweir 
414cdf0e10cSrcweir 	// wrap
415cdf0e10cSrcweir 	XMLPropertyState* pWrapState = NULL;
416cdf0e10cSrcweir 	XMLPropertyState* pWrapContourState = NULL;
417cdf0e10cSrcweir 	XMLPropertyState* pWrapContourModeState = NULL;
418cdf0e10cSrcweir 	XMLPropertyState* pWrapParagraphOnlyState = NULL;
419cdf0e10cSrcweir 
420cdf0e10cSrcweir 	// anchor
421cdf0e10cSrcweir 	XMLPropertyState* pAnchorTypeState = NULL;
422cdf0e10cSrcweir 
423cdf0e10cSrcweir 	// horizontal position and relation
424cdf0e10cSrcweir 	XMLPropertyState* pHoriOrientState = NULL;
425cdf0e10cSrcweir 	XMLPropertyState* pHoriOrientMirroredState = NULL;
426cdf0e10cSrcweir 	XMLPropertyState* pHoriOrientRelState = NULL;
427cdf0e10cSrcweir 	XMLPropertyState* pHoriOrientRelFrameState = NULL;
428cdf0e10cSrcweir 	XMLPropertyState* pHoriOrientMirrorState = NULL;
429cdf0e10cSrcweir     // --> OD 2004-08-09 #i28749# - horizontal position and relation for shapes
430cdf0e10cSrcweir     XMLPropertyState* pShapeHoriOrientState = NULL;
431cdf0e10cSrcweir     XMLPropertyState* pShapeHoriOrientMirroredState = NULL;
432cdf0e10cSrcweir     XMLPropertyState* pShapeHoriOrientRelState = NULL;
433cdf0e10cSrcweir     XMLPropertyState* pShapeHoriOrientRelFrameState = NULL;
434cdf0e10cSrcweir     XMLPropertyState* pShapeHoriOrientMirrorState = NULL;
435cdf0e10cSrcweir     // <--
436cdf0e10cSrcweir 
437cdf0e10cSrcweir 	// vertical position and relation
438cdf0e10cSrcweir 	XMLPropertyState* pVertOrientState = NULL;
439cdf0e10cSrcweir 	XMLPropertyState* pVertOrientAtCharState = NULL;
440cdf0e10cSrcweir 	XMLPropertyState* pVertOrientRelState = NULL;
441cdf0e10cSrcweir 	XMLPropertyState* pVertOrientRelPageState = NULL;
442cdf0e10cSrcweir 	XMLPropertyState* pVertOrientRelFrameState = NULL;
443cdf0e10cSrcweir 	XMLPropertyState* pVertOrientRelAsCharState = NULL;
444cdf0e10cSrcweir 
445cdf0e10cSrcweir     // --> OD 2004-08-09 #i28749# - vertical position and relation for shapes
446cdf0e10cSrcweir     XMLPropertyState* pShapeVertOrientState = NULL;
447cdf0e10cSrcweir     XMLPropertyState* pShapeVertOrientAtCharState = NULL;
448cdf0e10cSrcweir     XMLPropertyState* pShapeVertOrientRelState = NULL;
449cdf0e10cSrcweir     XMLPropertyState* pShapeVertOrientRelPageState = NULL;
450cdf0e10cSrcweir     XMLPropertyState* pShapeVertOrientRelFrameState = NULL;
451cdf0e10cSrcweir     // <--
452cdf0e10cSrcweir 
453cdf0e10cSrcweir 	// filter underline color
454cdf0e10cSrcweir 	XMLPropertyState* pUnderlineState = NULL;
455cdf0e10cSrcweir 	XMLPropertyState* pUnderlineColorState = NULL;
456cdf0e10cSrcweir 	XMLPropertyState* pUnderlineHasColorState = NULL;
457cdf0e10cSrcweir 
458cdf0e10cSrcweir 	// filter list style name
459cdf0e10cSrcweir     XMLPropertyState* pListStyleName = NULL;
460cdf0e10cSrcweir 
461cdf0e10cSrcweir 	// filter fo:clip
462cdf0e10cSrcweir 	XMLPropertyState* pClip11State = NULL;
463cdf0e10cSrcweir 	XMLPropertyState* pClipState = NULL;
464cdf0e10cSrcweir 
465cdf0e10cSrcweir     XMLPropertyState* pAllParaMargin = NULL;
466cdf0e10cSrcweir     XMLPropertyState* pAllMargin = NULL;
467cdf0e10cSrcweir 
46864b14621SArmin Le Grand     //UUUU
46964b14621SArmin Le Grand 	XMLPropertyState* pRepeatOffsetX = NULL;
47064b14621SArmin Le Grand 	XMLPropertyState* pRepeatOffsetY = NULL;
47164b14621SArmin Le Grand 
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;
589cdf0e10cSrcweir         case CTF_MARGINALL:             pAllMargin = propertie; break;
59064b14621SArmin Le Grand 
59164b14621SArmin Le Grand         //UUUU
592*56b35d86SArmin Le Grand         case CTF_REPEAT_OFFSET_X:
59364b14621SArmin Le Grand             pRepeatOffsetX = propertie;
59464b14621SArmin Le Grand             break;
59564b14621SArmin Le Grand 
59664b14621SArmin Le Grand         //UUUU
597*56b35d86SArmin Le Grand         case CTF_REPEAT_OFFSET_Y:
59864b14621SArmin Le Grand             pRepeatOffsetY = propertie;
59964b14621SArmin Le Grand             break;
60064b14621SArmin Le Grand 
60164b14621SArmin Le Grand         //UUUU
602*56b35d86SArmin Le Grand         case CTF_FILLGRADIENTNAME:
603*56b35d86SArmin Le Grand         case CTF_FILLHATCHNAME:
604*56b35d86SArmin Le Grand         case CTF_FILLBITMAPNAME:
605*56b35d86SArmin Le Grand         case CTF_FILLTRANSNAME:
60664b14621SArmin Le Grand             {
60764b14621SArmin Le Grand                 OUString aStr;
60864b14621SArmin Le Grand                 if( (propertie->maValue >>= aStr) && 0 == aStr.getLength() )
60964b14621SArmin Le Grand                     propertie->mnIndex = -1;
61064b14621SArmin Le Grand             }
61164b14621SArmin Le Grand             break;
612cdf0e10cSrcweir 		}
613cdf0e10cSrcweir 	}
614cdf0e10cSrcweir 
61564b14621SArmin Le Grand     //UUUU
61664b14621SArmin Le Grand     if( pRepeatOffsetX && pRepeatOffsetY )
61764b14621SArmin Le Grand     {
61864b14621SArmin Le Grand         sal_Int32 nOffset = 0;
61964b14621SArmin Le Grand         if( ( pRepeatOffsetX->maValue >>= nOffset ) && ( nOffset == 0 ) )
62064b14621SArmin Le Grand             pRepeatOffsetX->mnIndex = -1;
62164b14621SArmin Le Grand         else
62264b14621SArmin Le Grand             pRepeatOffsetY->mnIndex = -1;
62364b14621SArmin Le Grand     }
62464b14621SArmin Le Grand 
625cdf0e10cSrcweir 	if( pFontNameState )
626cdf0e10cSrcweir 		ContextFontFilter( pFontNameState, pFontFamilyNameState,
627cdf0e10cSrcweir 						   pFontStyleNameState, pFontFamilyState,
628cdf0e10cSrcweir 						   pFontPitchState, pFontCharsetState );
629cdf0e10cSrcweir 	if( pFontNameCJKState )
630cdf0e10cSrcweir 		ContextFontFilter( pFontNameCJKState, pFontFamilyNameCJKState,
631cdf0e10cSrcweir 						   pFontStyleNameCJKState, pFontFamilyCJKState,
632cdf0e10cSrcweir 						   pFontPitchCJKState, pFontCharsetCJKState );
633cdf0e10cSrcweir 	if( pFontNameCTLState )
634cdf0e10cSrcweir 		ContextFontFilter( pFontNameCTLState, pFontFamilyNameCTLState,
635cdf0e10cSrcweir 						   pFontStyleNameCTLState, pFontFamilyCTLState,
636cdf0e10cSrcweir 						   pFontPitchCTLState, pFontCharsetCTLState );
637cdf0e10cSrcweir 
638cdf0e10cSrcweir 	if( pCharHeightState && (pCharPropHeightState || pCharDiffHeightState ) )
639cdf0e10cSrcweir 		ContextFontHeightFilter( pCharHeightState, pCharPropHeightState,
640cdf0e10cSrcweir 								 pCharDiffHeightState  );
641cdf0e10cSrcweir 	if( pCharHeightCJKState &&
642cdf0e10cSrcweir 		(pCharPropHeightCJKState || pCharDiffHeightCJKState ) )
643cdf0e10cSrcweir 		ContextFontHeightFilter( pCharHeightCJKState, pCharPropHeightCJKState,
644cdf0e10cSrcweir 								 pCharDiffHeightCJKState  );
645cdf0e10cSrcweir 	if( pCharHeightCTLState &&
646cdf0e10cSrcweir 		(pCharPropHeightCTLState || pCharDiffHeightCTLState ) )
647cdf0e10cSrcweir 		ContextFontHeightFilter( pCharHeightCTLState, pCharPropHeightCTLState,
648cdf0e10cSrcweir 								 pCharDiffHeightCTLState  );
649cdf0e10cSrcweir 	if( pUnderlineColorState || pUnderlineHasColorState )
650cdf0e10cSrcweir 	{
651cdf0e10cSrcweir 		sal_Bool bClear = !pUnderlineState;
652cdf0e10cSrcweir 		if( !bClear )
653cdf0e10cSrcweir 		{
654cdf0e10cSrcweir 			sal_Int16 nUnderline = 0;
655cdf0e10cSrcweir 			pUnderlineState->maValue >>= nUnderline;
656cdf0e10cSrcweir 			bClear = FontUnderline::NONE == nUnderline;
657cdf0e10cSrcweir 		}
658cdf0e10cSrcweir 		if( bClear )
659cdf0e10cSrcweir 		{
660cdf0e10cSrcweir 			if( pUnderlineColorState )
661cdf0e10cSrcweir 				pUnderlineColorState->mnIndex = -1;
662cdf0e10cSrcweir 			if( pUnderlineHasColorState )
663cdf0e10cSrcweir 				pUnderlineHasColorState->mnIndex = -1;
664cdf0e10cSrcweir 		}
665cdf0e10cSrcweir 	}
666cdf0e10cSrcweir 
667cdf0e10cSrcweir     lcl_checkMultiProperty(pParaLeftMarginState, pParaLeftMarginRelState);
668cdf0e10cSrcweir     lcl_checkMultiProperty(pParaRightMarginState, pParaRightMarginRelState);
669cdf0e10cSrcweir     lcl_checkMultiProperty(pParaTopMarginState, pParaTopMarginRelState);
670cdf0e10cSrcweir     lcl_checkMultiProperty(pParaBottomMarginState, pParaBottomMarginRelState);
671cdf0e10cSrcweir     lcl_checkMultiProperty(pParaFirstLineState, pParaFirstLineRelState);
672cdf0e10cSrcweir 
673cdf0e10cSrcweir     if (pAllParaMargin)
674cdf0e10cSrcweir     {
675cdf0e10cSrcweir         pAllParaMargin->mnIndex = -1; // just export individual attributes...
676cdf0e10cSrcweir         pAllParaMargin->maValue.clear();
677cdf0e10cSrcweir     }
678cdf0e10cSrcweir     if (pAllMargin)
679cdf0e10cSrcweir     {
680cdf0e10cSrcweir         pAllMargin->mnIndex = -1; // just export individual attributes...
681cdf0e10cSrcweir         pAllMargin->maValue.clear();
682cdf0e10cSrcweir     }
683cdf0e10cSrcweir 
684cdf0e10cSrcweir 	if( pAllBorderWidthState )
685cdf0e10cSrcweir 	{
686cdf0e10cSrcweir 		if( pLeftBorderWidthState && pRightBorderWidthState && pTopBorderWidthState && pBottomBorderWidthState )
687cdf0e10cSrcweir 		{
688cdf0e10cSrcweir 			table::BorderLine aLeft, aRight, aTop, aBottom;
689cdf0e10cSrcweir 
690cdf0e10cSrcweir 			pLeftBorderWidthState->maValue >>= aLeft;
691cdf0e10cSrcweir 			pRightBorderWidthState->maValue >>= aRight;
692cdf0e10cSrcweir 			pTopBorderWidthState->maValue >>= aTop;
693cdf0e10cSrcweir 			pBottomBorderWidthState->maValue >>= aBottom;
694cdf0e10cSrcweir 			if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth &&
695cdf0e10cSrcweir 				aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance &&
696cdf0e10cSrcweir 				aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth &&
697cdf0e10cSrcweir 				aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance &&
698cdf0e10cSrcweir 				aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth &&
699cdf0e10cSrcweir 				aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance )
700cdf0e10cSrcweir 			{
701cdf0e10cSrcweir 				pLeftBorderWidthState->mnIndex = -1;
702cdf0e10cSrcweir 				pLeftBorderWidthState->maValue.clear();
703cdf0e10cSrcweir 				pRightBorderWidthState->mnIndex = -1;
704cdf0e10cSrcweir 				pRightBorderWidthState->maValue.clear();
705cdf0e10cSrcweir 				pTopBorderWidthState->mnIndex = -1;
706cdf0e10cSrcweir 				pTopBorderWidthState->maValue.clear();
707cdf0e10cSrcweir 				pBottomBorderWidthState->mnIndex = -1;
708cdf0e10cSrcweir 				pBottomBorderWidthState->maValue.clear();
709cdf0e10cSrcweir 			}
710cdf0e10cSrcweir 			else
711cdf0e10cSrcweir 			{
712cdf0e10cSrcweir 				pAllBorderWidthState->mnIndex = -1;
713cdf0e10cSrcweir 				pAllBorderWidthState->maValue.clear();
714cdf0e10cSrcweir 			}
715cdf0e10cSrcweir 		}
716cdf0e10cSrcweir 		else
717cdf0e10cSrcweir 		{
718cdf0e10cSrcweir 			pAllBorderWidthState->mnIndex = -1;
719cdf0e10cSrcweir 			pAllBorderWidthState->maValue.clear();
720cdf0e10cSrcweir 		}
721cdf0e10cSrcweir 	}
722cdf0e10cSrcweir 
723cdf0e10cSrcweir 	if( pAllBorderDistanceState )
724cdf0e10cSrcweir 	{
725cdf0e10cSrcweir 		if( pLeftBorderDistanceState && pRightBorderDistanceState && pTopBorderDistanceState && pBottomBorderDistanceState )
726cdf0e10cSrcweir 		{
727cdf0e10cSrcweir 			sal_Int32 aLeft = 0, aRight = 0, aTop = 0, aBottom = 0;
728cdf0e10cSrcweir 
729cdf0e10cSrcweir 			pLeftBorderDistanceState->maValue >>= aLeft;
730cdf0e10cSrcweir 			pRightBorderDistanceState->maValue >>= aRight;
731cdf0e10cSrcweir 			pTopBorderDistanceState->maValue >>= aTop;
732cdf0e10cSrcweir 			pBottomBorderDistanceState->maValue >>= aBottom;
733cdf0e10cSrcweir 			if( aLeft == aRight && aLeft == aTop && aLeft == aBottom )
734cdf0e10cSrcweir 			{
735cdf0e10cSrcweir 				pLeftBorderDistanceState->mnIndex = -1;
736cdf0e10cSrcweir 				pLeftBorderDistanceState->maValue.clear();
737cdf0e10cSrcweir 				pRightBorderDistanceState->mnIndex = -1;
738cdf0e10cSrcweir 				pRightBorderDistanceState->maValue.clear();
739cdf0e10cSrcweir 				pTopBorderDistanceState->mnIndex = -1;
740cdf0e10cSrcweir 				pTopBorderDistanceState->maValue.clear();
741cdf0e10cSrcweir 				pBottomBorderDistanceState->mnIndex = -1;
742cdf0e10cSrcweir 				pBottomBorderDistanceState->maValue.clear();
743cdf0e10cSrcweir 			}
744cdf0e10cSrcweir 			else
745cdf0e10cSrcweir 			{
746cdf0e10cSrcweir 				pAllBorderDistanceState->mnIndex = -1;
747cdf0e10cSrcweir 				pAllBorderDistanceState->maValue.clear();
748cdf0e10cSrcweir 			}
749cdf0e10cSrcweir 		}
750cdf0e10cSrcweir 		else
751cdf0e10cSrcweir 		{
752cdf0e10cSrcweir 			pAllBorderDistanceState->mnIndex = -1;
753cdf0e10cSrcweir 			pAllBorderDistanceState->maValue.clear();
754cdf0e10cSrcweir 		}
755cdf0e10cSrcweir 	}
756cdf0e10cSrcweir 
757cdf0e10cSrcweir 	if( pAllBorderState )
758cdf0e10cSrcweir 	{
759cdf0e10cSrcweir 		if( pLeftBorderState && pRightBorderState && pTopBorderState && pBottomBorderState )
760cdf0e10cSrcweir 		{
761cdf0e10cSrcweir 			table::BorderLine aLeft, aRight, aTop, aBottom;
762cdf0e10cSrcweir 
763cdf0e10cSrcweir 			pLeftBorderState->maValue >>= aLeft;
764cdf0e10cSrcweir 			pRightBorderState->maValue >>= aRight;
765cdf0e10cSrcweir 			pTopBorderState->maValue >>= aTop;
766cdf0e10cSrcweir 			pBottomBorderState->maValue >>= aBottom;
767cdf0e10cSrcweir 			if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth &&
768cdf0e10cSrcweir 				aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance &&
769cdf0e10cSrcweir 				aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth &&
770cdf0e10cSrcweir 				aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance &&
771cdf0e10cSrcweir 				aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth &&
772cdf0e10cSrcweir 				aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance )
773cdf0e10cSrcweir 			{
774cdf0e10cSrcweir 				pLeftBorderState->mnIndex = -1;
775cdf0e10cSrcweir 				pLeftBorderState->maValue.clear();
776cdf0e10cSrcweir 				pRightBorderState->mnIndex = -1;
777cdf0e10cSrcweir 				pRightBorderState->maValue.clear();
778cdf0e10cSrcweir 				pTopBorderState->mnIndex = -1;
779cdf0e10cSrcweir 				pTopBorderState->maValue.clear();
780cdf0e10cSrcweir 				pBottomBorderState->mnIndex = -1;
781cdf0e10cSrcweir 				pBottomBorderState->maValue.clear();
782cdf0e10cSrcweir 			}
783cdf0e10cSrcweir 			else
784cdf0e10cSrcweir 			{
785cdf0e10cSrcweir 				pAllBorderState->mnIndex = -1;
786cdf0e10cSrcweir 				pAllBorderState->maValue.clear();
787cdf0e10cSrcweir 			}
788cdf0e10cSrcweir 		}
789cdf0e10cSrcweir 		else
790cdf0e10cSrcweir 		{
791cdf0e10cSrcweir 			pAllBorderState->mnIndex = -1;
792cdf0e10cSrcweir 			pAllBorderState->maValue.clear();
793cdf0e10cSrcweir 		}
794cdf0e10cSrcweir 	}
795cdf0e10cSrcweir 
796cdf0e10cSrcweir 	sal_Int16 nSizeType = SizeType::FIX;
797cdf0e10cSrcweir 	if( pSizeTypeState )
798cdf0e10cSrcweir 	{
799cdf0e10cSrcweir 		pSizeTypeState->maValue >>= nSizeType;
800cdf0e10cSrcweir 		pSizeTypeState->mnIndex = -1;
801cdf0e10cSrcweir 	}
802cdf0e10cSrcweir 
803cdf0e10cSrcweir 	if( pHeightMinAbsState )
804cdf0e10cSrcweir 	{
805cdf0e10cSrcweir 		sal_Int16 nRel = sal_Int16();
806cdf0e10cSrcweir 		if( (SizeType::FIX == nSizeType) ||
807cdf0e10cSrcweir 			( pHeightMinRelState &&
808cdf0e10cSrcweir 			  ( !(pHeightMinRelState->maValue >>= nRel) || nRel > 0 ) ) )
809cdf0e10cSrcweir 		{
810cdf0e10cSrcweir 			pHeightMinAbsState->mnIndex = -1;
811cdf0e10cSrcweir 		}
812cdf0e10cSrcweir 
813cdf0e10cSrcweir         // export SizeType::VARIABLE als min-width="0"
814cdf0e10cSrcweir         if( SizeType::VARIABLE == nSizeType )
815cdf0e10cSrcweir             pHeightMinAbsState->maValue <<= static_cast<sal_Int32>( 0 );
816cdf0e10cSrcweir 	}
817cdf0e10cSrcweir 	if( pHeightMinRelState  && SizeType::MIN != nSizeType)
818cdf0e10cSrcweir 		pHeightMinRelState->mnIndex = -1;
819cdf0e10cSrcweir 	if( pHeightAbsState && pHeightMinAbsState &&
820cdf0e10cSrcweir 		-1 != pHeightMinAbsState->mnIndex )
821cdf0e10cSrcweir 		pHeightAbsState->mnIndex = -1;
822cdf0e10cSrcweir 	if( pHeightRelState && SizeType::FIX != nSizeType)
823cdf0e10cSrcweir 		pHeightRelState->mnIndex = -1;
824cdf0e10cSrcweir 
825cdf0e10cSrcweir     // frame width
826cdf0e10cSrcweir     nSizeType = SizeType::FIX;
827cdf0e10cSrcweir     if( pWidthTypeState )
828cdf0e10cSrcweir     {
829cdf0e10cSrcweir         pWidthTypeState->maValue >>= nSizeType;
830cdf0e10cSrcweir         pWidthTypeState->mnIndex = -1;
831cdf0e10cSrcweir     }
832cdf0e10cSrcweir     if( pWidthMinAbsState )
833cdf0e10cSrcweir     {
834cdf0e10cSrcweir         sal_Int16 nRel = sal_Int16();
835cdf0e10cSrcweir         if( (SizeType::FIX == nSizeType) ||
836cdf0e10cSrcweir             ( pWidthMinRelState &&
837cdf0e10cSrcweir               ( !(pWidthMinRelState->maValue >>= nRel) || nRel > 0 ) ) )
838cdf0e10cSrcweir         {
839cdf0e10cSrcweir             pWidthMinAbsState->mnIndex = -1;
840cdf0e10cSrcweir         }
841cdf0e10cSrcweir 
842cdf0e10cSrcweir         // export SizeType::VARIABLE als min-width="0"
843cdf0e10cSrcweir         if( SizeType::VARIABLE == nSizeType )
844cdf0e10cSrcweir             pWidthMinAbsState->maValue <<= static_cast<sal_Int32>( 0 );
845cdf0e10cSrcweir     }
846cdf0e10cSrcweir 	if( pWidthMinRelState  && SizeType::MIN != nSizeType)
847cdf0e10cSrcweir 		pWidthMinRelState->mnIndex = -1;
848cdf0e10cSrcweir 	if( pWidthAbsState && pWidthMinAbsState &&
849cdf0e10cSrcweir 		-1 != pWidthMinAbsState->mnIndex )
850cdf0e10cSrcweir 		pWidthAbsState->mnIndex = -1;
851cdf0e10cSrcweir 	if( pWidthRelState && SizeType::FIX != nSizeType)
852cdf0e10cSrcweir 		pWidthRelState->mnIndex = -1;
853cdf0e10cSrcweir 
854cdf0e10cSrcweir 	if( pWrapState )
855cdf0e10cSrcweir 	{
856cdf0e10cSrcweir 		WrapTextMode eVal;
857cdf0e10cSrcweir 		pWrapState->maValue >>= eVal;
858cdf0e10cSrcweir 		switch( eVal )
859cdf0e10cSrcweir 		{
860cdf0e10cSrcweir 		case WrapTextMode_NONE:
861cdf0e10cSrcweir             // no wrapping: disable para-only and contour
862cdf0e10cSrcweir 			if( pWrapParagraphOnlyState )
863cdf0e10cSrcweir 				pWrapParagraphOnlyState->mnIndex = -1;
864cdf0e10cSrcweir             // no break
865cdf0e10cSrcweir 		case WrapTextMode_THROUGHT:
866cdf0e10cSrcweir             // wrap through: disable only contour
867cdf0e10cSrcweir 			if( pWrapContourState )
868cdf0e10cSrcweir 				pWrapContourState->mnIndex = -1;
869cdf0e10cSrcweir 			break;
870cdf0e10cSrcweir 		default:
871cdf0e10cSrcweir 			break;
872cdf0e10cSrcweir 		}
873cdf0e10cSrcweir 		if( pWrapContourModeState  &&
874cdf0e10cSrcweir 			(!pWrapContourState ||
875cdf0e10cSrcweir 			 !*(sal_Bool *)pWrapContourState ->maValue.getValue() ) )
876cdf0e10cSrcweir 			pWrapContourModeState->mnIndex = -1;
877cdf0e10cSrcweir 	}
878cdf0e10cSrcweir 
879cdf0e10cSrcweir 	TextContentAnchorType eAnchor = TextContentAnchorType_AT_PARAGRAPH;
880cdf0e10cSrcweir 	if( pAnchorTypeState )
881cdf0e10cSrcweir 		pAnchorTypeState->maValue >>= eAnchor;
882cdf0e10cSrcweir 	else if( bNeedsAnchor )
883cdf0e10cSrcweir 	{
884cdf0e10cSrcweir 		Any aAny = rPropSet->getPropertyValue(
885cdf0e10cSrcweir 					::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AnchorType") ) );
886cdf0e10cSrcweir 		aAny >>= eAnchor;
887cdf0e10cSrcweir 	}
888cdf0e10cSrcweir 
889cdf0e10cSrcweir     // states for frame positioning attributes
890cdf0e10cSrcweir     {
891cdf0e10cSrcweir         if( pHoriOrientState && pHoriOrientMirroredState )
892cdf0e10cSrcweir         {
893cdf0e10cSrcweir             if( pHoriOrientMirrorState &&
894cdf0e10cSrcweir                 *(sal_Bool *)pHoriOrientMirrorState->maValue.getValue() )
895cdf0e10cSrcweir                 pHoriOrientState->mnIndex = -1;
896cdf0e10cSrcweir             else
897cdf0e10cSrcweir                 pHoriOrientMirroredState->mnIndex = -1;
898cdf0e10cSrcweir         }
899cdf0e10cSrcweir         if( pHoriOrientMirrorState )
900cdf0e10cSrcweir             pHoriOrientMirrorState->mnIndex = -1;
901cdf0e10cSrcweir 
902cdf0e10cSrcweir         if( pHoriOrientRelState && TextContentAnchorType_AT_FRAME == eAnchor )
903cdf0e10cSrcweir             pHoriOrientRelState->mnIndex = -1;
904cdf0e10cSrcweir         if( pHoriOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
905cdf0e10cSrcweir             pHoriOrientRelFrameState->mnIndex = -1;;
906cdf0e10cSrcweir 
907cdf0e10cSrcweir         if( pVertOrientState && TextContentAnchorType_AT_CHARACTER == eAnchor )
908cdf0e10cSrcweir             pVertOrientState->mnIndex = -1;
909cdf0e10cSrcweir         if( pVertOrientAtCharState && TextContentAnchorType_AT_CHARACTER != eAnchor )
910cdf0e10cSrcweir             pVertOrientAtCharState->mnIndex = -1;
911cdf0e10cSrcweir         if( pVertOrientRelState && TextContentAnchorType_AT_PARAGRAPH != eAnchor &&
912cdf0e10cSrcweir             TextContentAnchorType_AT_CHARACTER != eAnchor )
913cdf0e10cSrcweir             pVertOrientRelState->mnIndex = -1;
914cdf0e10cSrcweir         if( pVertOrientRelPageState && TextContentAnchorType_AT_PAGE != eAnchor )
915cdf0e10cSrcweir             pVertOrientRelPageState->mnIndex = -1;
916cdf0e10cSrcweir         if( pVertOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
917cdf0e10cSrcweir             pVertOrientRelFrameState->mnIndex = -1;
918cdf0e10cSrcweir         if( pVertOrientRelAsCharState && TextContentAnchorType_AS_CHARACTER != eAnchor )
919cdf0e10cSrcweir             pVertOrientRelAsCharState->mnIndex = -1;
920cdf0e10cSrcweir     }
921cdf0e10cSrcweir 
922cdf0e10cSrcweir     // --> OD 2004-08-09 #i28749# - states for shape positioning properties
923cdf0e10cSrcweir     if ( eAnchor != TextContentAnchorType_AS_CHARACTER &&
924cdf0e10cSrcweir          ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 )
925cdf0e10cSrcweir     {
926cdf0e10cSrcweir         // no export of shape positioning properties,
927cdf0e10cSrcweir         // if shape isn't anchored as-character and
928cdf0e10cSrcweir         // destination file format is OpenOffice.org file format
929cdf0e10cSrcweir         if ( pShapeHoriOrientState )
930cdf0e10cSrcweir             pShapeHoriOrientState->mnIndex = -1;
931cdf0e10cSrcweir         if ( pShapeHoriOrientMirroredState )
932cdf0e10cSrcweir             pShapeHoriOrientMirroredState->mnIndex = -1;
933cdf0e10cSrcweir         if ( pShapeHoriOrientRelState )
934cdf0e10cSrcweir             pShapeHoriOrientRelState->mnIndex = -1;
935cdf0e10cSrcweir         if ( pShapeHoriOrientRelFrameState )
936cdf0e10cSrcweir             pShapeHoriOrientRelFrameState->mnIndex = -1;
937cdf0e10cSrcweir         if ( pShapeHoriOrientMirrorState )
938cdf0e10cSrcweir             pShapeHoriOrientMirrorState->mnIndex = -1;
939cdf0e10cSrcweir         if ( pShapeVertOrientState )
940cdf0e10cSrcweir             pShapeVertOrientState->mnIndex = -1;
941cdf0e10cSrcweir         if ( pShapeVertOrientAtCharState )
942cdf0e10cSrcweir             pShapeVertOrientAtCharState->mnIndex = -1;
943cdf0e10cSrcweir         if ( pShapeVertOrientRelState )
944cdf0e10cSrcweir             pShapeVertOrientRelState->mnIndex = -1;
945cdf0e10cSrcweir         if ( pShapeVertOrientRelPageState )
946cdf0e10cSrcweir             pShapeVertOrientRelPageState->mnIndex = -1;
947cdf0e10cSrcweir         if ( pShapeVertOrientRelFrameState )
948cdf0e10cSrcweir             pShapeVertOrientRelFrameState->mnIndex = -1;
949cdf0e10cSrcweir     }
950cdf0e10cSrcweir     else
951cdf0e10cSrcweir     {
952cdf0e10cSrcweir         // handling of shape positioning property states as for frames - see above
953cdf0e10cSrcweir         if( pShapeHoriOrientState && pShapeHoriOrientMirroredState )
954cdf0e10cSrcweir         {
955cdf0e10cSrcweir             if( pShapeHoriOrientMirrorState &&
956cdf0e10cSrcweir                 *(sal_Bool *)pShapeHoriOrientMirrorState->maValue.getValue() )
957cdf0e10cSrcweir                 pShapeHoriOrientState->mnIndex = -1;
958cdf0e10cSrcweir             else
959cdf0e10cSrcweir                 pShapeHoriOrientMirroredState->mnIndex = -1;
960cdf0e10cSrcweir         }
961cdf0e10cSrcweir         if( pShapeHoriOrientMirrorState )
962cdf0e10cSrcweir             pShapeHoriOrientMirrorState->mnIndex = -1;
963cdf0e10cSrcweir 
964cdf0e10cSrcweir         if( pShapeHoriOrientRelState && TextContentAnchorType_AT_FRAME == eAnchor )
965cdf0e10cSrcweir             pShapeHoriOrientRelState->mnIndex = -1;
966cdf0e10cSrcweir         if( pShapeHoriOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
967cdf0e10cSrcweir             pShapeHoriOrientRelFrameState->mnIndex = -1;;
968cdf0e10cSrcweir 
969cdf0e10cSrcweir         if( pShapeVertOrientState && TextContentAnchorType_AT_CHARACTER == eAnchor )
970cdf0e10cSrcweir             pShapeVertOrientState->mnIndex = -1;
971cdf0e10cSrcweir         if( pShapeVertOrientAtCharState && TextContentAnchorType_AT_CHARACTER != eAnchor )
972cdf0e10cSrcweir             pShapeVertOrientAtCharState->mnIndex = -1;
973cdf0e10cSrcweir         if( pShapeVertOrientRelState && TextContentAnchorType_AT_PARAGRAPH != eAnchor &&
974cdf0e10cSrcweir             TextContentAnchorType_AT_CHARACTER != eAnchor )
975cdf0e10cSrcweir             pShapeVertOrientRelState->mnIndex = -1;
976cdf0e10cSrcweir         if( pShapeVertOrientRelPageState && TextContentAnchorType_AT_PAGE != eAnchor )
977cdf0e10cSrcweir             pShapeVertOrientRelPageState->mnIndex = -1;
978cdf0e10cSrcweir         if( pShapeVertOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
979cdf0e10cSrcweir             pShapeVertOrientRelFrameState->mnIndex = -1;
980cdf0e10cSrcweir     }
981cdf0e10cSrcweir     // <--
982cdf0e10cSrcweir 
983cdf0e10cSrcweir     // list style name: remove list style if it is the default outline style
984cdf0e10cSrcweir     if( pListStyleName != NULL )
985cdf0e10cSrcweir     {
986cdf0e10cSrcweir         OUString sListStyleName;
987cdf0e10cSrcweir         pListStyleName->maValue >>= sListStyleName;
988cdf0e10cSrcweir         if( lcl_IsOutlineStyle( GetExport(), sListStyleName ) )
989cdf0e10cSrcweir             pListStyleName->mnIndex = -1;
990cdf0e10cSrcweir     }
991cdf0e10cSrcweir 
992cdf0e10cSrcweir 	if( pClipState != NULL && pClip11State != NULL  )
993cdf0e10cSrcweir 		pClip11State->mnIndex = -1;
994cdf0e10cSrcweir 
995cdf0e10cSrcweir 	SvXMLExportPropertyMapper::ContextFilter(rProperties,rPropSet);
996cdf0e10cSrcweir }
997cdf0e10cSrcweir 
998cdf0e10cSrcweir 
999cdf0e10cSrcweir bool lcl_IsOutlineStyle(const SvXMLExport &rExport, const OUString & rName)
1000cdf0e10cSrcweir {
1001cdf0e10cSrcweir     Reference< XChapterNumberingSupplier >
1002cdf0e10cSrcweir         xCNSupplier(rExport.GetModel(), UNO_QUERY);
1003cdf0e10cSrcweir 
1004cdf0e10cSrcweir     OUString sOutlineName;
1005cdf0e10cSrcweir     OUString sName(RTL_CONSTASCII_USTRINGPARAM("Name"));
1006cdf0e10cSrcweir 
1007cdf0e10cSrcweir     if (xCNSupplier.is())
1008cdf0e10cSrcweir     {
1009cdf0e10cSrcweir         Reference<XPropertySet> xNumRule(
1010cdf0e10cSrcweir             xCNSupplier->getChapterNumberingRules(), UNO_QUERY );
1011cdf0e10cSrcweir         DBG_ASSERT( xNumRule.is(), "no chapter numbering rules" );
1012cdf0e10cSrcweir         if (xNumRule.is())
1013cdf0e10cSrcweir         {
1014cdf0e10cSrcweir             xNumRule->getPropertyValue(sName) >>= sOutlineName;
1015cdf0e10cSrcweir         }
1016cdf0e10cSrcweir     }
1017cdf0e10cSrcweir 
1018cdf0e10cSrcweir     return rName == sOutlineName;
1019cdf0e10cSrcweir }
1020