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
3956b35d86SArmin Le Grand //UUUU
4056b35d86SArmin Le Grand #include <xmlsdtypes.hxx>
4156b35d86SArmin 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
handleElementItem(SvXMLExport & rExp,const XMLPropertyState & rProperty,sal_uInt16 nFlags,const::std::vector<XMLPropertyState> * pProperties,sal_uInt32 nIdx) const52cdf0e10cSrcweir 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
handleSpecialItem(SvXMLAttributeList & rAttrList,const XMLPropertyState & rProperty,const SvXMLUnitConverter & rUnitConverter,const SvXMLNamespaceMap & rNamespaceMap,const::std::vector<XMLPropertyState> * pProperties,sal_uInt32 nIdx) const135cdf0e10cSrcweir 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
XMLTextExportPropertySetMapper(const UniReference<XMLPropertySetMapper> & rMapper,SvXMLExport & rExp)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
~XMLTextExportPropertySetMapper()198cdf0e10cSrcweir XMLTextExportPropertySetMapper::~XMLTextExportPropertySetMapper()
199cdf0e10cSrcweir {
200cdf0e10cSrcweir }
201cdf0e10cSrcweir
ContextFontFilter(XMLPropertyState * pFontNameState,XMLPropertyState * pFontFamilyNameState,XMLPropertyState * pFontStyleNameState,XMLPropertyState * pFontFamilyState,XMLPropertyState * pFontPitchState,XMLPropertyState * pFontCharsetState) const202cdf0e10cSrcweir 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
ContextFontHeightFilter(XMLPropertyState * pCharHeightState,XMLPropertyState * pCharPropHeightState,XMLPropertyState * pCharDiffHeightState) const262cdf0e10cSrcweir 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
lcl_checkMultiProperty(XMLPropertyState * const pState,XMLPropertyState * const pRelState)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
ContextFilter(::std::vector<XMLPropertyState> & rProperties,Reference<XPropertySet> rPropSet) const324cdf0e10cSrcweir 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
465*339d2e3dSOliver-Rainer Wittmann // filter fo:margin
466cdf0e10cSrcweir XMLPropertyState* pAllParaMargin = NULL;
467*339d2e3dSOliver-Rainer Wittmann XMLPropertyState* pAllParaMarginRel = NULL;
468cdf0e10cSrcweir XMLPropertyState* pAllMargin = NULL;
469cdf0e10cSrcweir
47064b14621SArmin Le Grand //UUUU
47164b14621SArmin Le Grand XMLPropertyState* pRepeatOffsetX = NULL;
47264b14621SArmin Le Grand XMLPropertyState* pRepeatOffsetY = NULL;
47364b14621SArmin Le Grand
474cdf0e10cSrcweir sal_Bool bNeedsAnchor = sal_False;
475cdf0e10cSrcweir
476cdf0e10cSrcweir for( ::std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
477cdf0e10cSrcweir aIter != rProperties.end();
478cdf0e10cSrcweir ++aIter )
479cdf0e10cSrcweir {
480cdf0e10cSrcweir XMLPropertyState *propertie = &(*aIter);
481cdf0e10cSrcweir if( propertie->mnIndex == -1 )
482cdf0e10cSrcweir continue;
483cdf0e10cSrcweir
484cdf0e10cSrcweir switch( getPropertySetMapper()->GetEntryContextId( propertie->mnIndex ) )
485cdf0e10cSrcweir {
486cdf0e10cSrcweir case CTF_CHARHEIGHT: pCharHeightState = propertie; break;
487cdf0e10cSrcweir case CTF_CHARHEIGHT_REL: pCharPropHeightState = propertie; break;
488cdf0e10cSrcweir case CTF_CHARHEIGHT_DIFF: pCharDiffHeightState = propertie; break;
489cdf0e10cSrcweir case CTF_CHARHEIGHT_CJK: pCharHeightCJKState = propertie; break;
490cdf0e10cSrcweir case CTF_CHARHEIGHT_REL_CJK: pCharPropHeightCJKState = propertie; break;
491cdf0e10cSrcweir case CTF_CHARHEIGHT_DIFF_CJK: pCharDiffHeightCJKState = propertie; break;
492cdf0e10cSrcweir case CTF_CHARHEIGHT_CTL: pCharHeightCTLState = propertie; break;
493cdf0e10cSrcweir case CTF_CHARHEIGHT_REL_CTL: pCharPropHeightCTLState = propertie; break;
494cdf0e10cSrcweir case CTF_CHARHEIGHT_DIFF_CTL: pCharDiffHeightCTLState = propertie; break;
495cdf0e10cSrcweir case CTF_PARALEFTMARGIN: pParaLeftMarginState = propertie; break;
496cdf0e10cSrcweir case CTF_PARALEFTMARGIN_REL: pParaLeftMarginRelState = propertie; break;
497cdf0e10cSrcweir case CTF_PARARIGHTMARGIN: pParaRightMarginState = propertie; break;
498cdf0e10cSrcweir case CTF_PARARIGHTMARGIN_REL: pParaRightMarginRelState = propertie; break;
499cdf0e10cSrcweir case CTF_PARAFIRSTLINE: pParaFirstLineState = propertie; break;
500cdf0e10cSrcweir case CTF_PARAFIRSTLINE_REL: pParaFirstLineRelState = propertie; break;
501cdf0e10cSrcweir case CTF_PARATOPMARGIN: pParaTopMarginState = propertie; break;
502cdf0e10cSrcweir case CTF_PARATOPMARGIN_REL: pParaTopMarginRelState = propertie; break;
503cdf0e10cSrcweir case CTF_PARABOTTOMMARGIN: pParaBottomMarginState = propertie; break;
504cdf0e10cSrcweir case CTF_PARABOTTOMMARGIN_REL: pParaBottomMarginRelState = propertie; break;
505cdf0e10cSrcweir case CTF_ALLBORDERWIDTH: pAllBorderWidthState = propertie; break;
506cdf0e10cSrcweir case CTF_LEFTBORDERWIDTH: pLeftBorderWidthState = propertie; break;
507cdf0e10cSrcweir case CTF_RIGHTBORDERWIDTH: pRightBorderWidthState = propertie; break;
508cdf0e10cSrcweir case CTF_TOPBORDERWIDTH: pTopBorderWidthState = propertie; break;
509cdf0e10cSrcweir case CTF_BOTTOMBORDERWIDTH: pBottomBorderWidthState = propertie; break;
510cdf0e10cSrcweir case CTF_ALLBORDERDISTANCE: pAllBorderDistanceState = propertie; break;
511cdf0e10cSrcweir case CTF_LEFTBORDERDISTANCE: pLeftBorderDistanceState = propertie; break;
512cdf0e10cSrcweir case CTF_RIGHTBORDERDISTANCE: pRightBorderDistanceState = propertie; break;
513cdf0e10cSrcweir case CTF_TOPBORDERDISTANCE: pTopBorderDistanceState = propertie; break;
514cdf0e10cSrcweir case CTF_BOTTOMBORDERDISTANCE: pBottomBorderDistanceState = propertie; break;
515cdf0e10cSrcweir case CTF_ALLBORDER: pAllBorderState = propertie; break;
516cdf0e10cSrcweir case CTF_LEFTBORDER: pLeftBorderState = propertie; break;
517cdf0e10cSrcweir case CTF_RIGHTBORDER: pRightBorderState = propertie; break;
518cdf0e10cSrcweir case CTF_TOPBORDER: pTopBorderState = propertie; break;
519cdf0e10cSrcweir case CTF_BOTTOMBORDER: pBottomBorderState = propertie; break;
520cdf0e10cSrcweir
521cdf0e10cSrcweir case CTF_FRAMEHEIGHT_MIN_ABS: pHeightMinAbsState = propertie; break;
522cdf0e10cSrcweir case CTF_FRAMEHEIGHT_MIN_REL: pHeightMinRelState = propertie; break;
523cdf0e10cSrcweir case CTF_FRAMEHEIGHT_ABS: pHeightAbsState = propertie; break;
524cdf0e10cSrcweir case CTF_FRAMEHEIGHT_REL: pHeightRelState = propertie; break;
525cdf0e10cSrcweir case CTF_SIZETYPE: pSizeTypeState = propertie; break;
526cdf0e10cSrcweir
527cdf0e10cSrcweir case CTF_FRAMEWIDTH_MIN_ABS: pWidthMinAbsState = propertie; break;
528cdf0e10cSrcweir case CTF_FRAMEWIDTH_MIN_REL: pWidthMinRelState = propertie; break;
529cdf0e10cSrcweir case CTF_FRAMEWIDTH_ABS: pWidthAbsState = propertie; break;
530cdf0e10cSrcweir case CTF_FRAMEWIDTH_REL: pWidthRelState = propertie; break;
531cdf0e10cSrcweir case CTF_FRAMEWIDTH_TYPE: pWidthTypeState = propertie; break;
532cdf0e10cSrcweir
533cdf0e10cSrcweir case CTF_WRAP: pWrapState = propertie; break;
534cdf0e10cSrcweir case CTF_WRAP_CONTOUR: pWrapContourState = propertie; break;
535cdf0e10cSrcweir case CTF_WRAP_CONTOUR_MODE: pWrapContourModeState = propertie; break;
536cdf0e10cSrcweir case CTF_WRAP_PARAGRAPH_ONLY: pWrapParagraphOnlyState = propertie; break;
537cdf0e10cSrcweir case CTF_ANCHORTYPE: pAnchorTypeState = propertie; break;
538cdf0e10cSrcweir
539cdf0e10cSrcweir case CTF_HORIZONTALPOS: pHoriOrientState = propertie; bNeedsAnchor = sal_True; break;
540cdf0e10cSrcweir case CTF_HORIZONTALPOS_MIRRORED: pHoriOrientMirroredState = propertie; bNeedsAnchor = sal_True; break;
541cdf0e10cSrcweir case CTF_HORIZONTALREL: pHoriOrientRelState = propertie; bNeedsAnchor = sal_True; break;
542cdf0e10cSrcweir case CTF_HORIZONTALREL_FRAME: pHoriOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
543cdf0e10cSrcweir case CTF_HORIZONTALMIRROR: pHoriOrientMirrorState = propertie; bNeedsAnchor = sal_True; break;
544cdf0e10cSrcweir case CTF_VERTICALPOS: pVertOrientState = propertie; bNeedsAnchor = sal_True; break;
545cdf0e10cSrcweir case CTF_VERTICALPOS_ATCHAR: pVertOrientAtCharState = propertie; bNeedsAnchor = sal_True; break;
546cdf0e10cSrcweir case CTF_VERTICALREL: pVertOrientRelState = propertie; bNeedsAnchor = sal_True; break;
547cdf0e10cSrcweir case CTF_VERTICALREL_PAGE: pVertOrientRelPageState = propertie; bNeedsAnchor = sal_True; break;
548cdf0e10cSrcweir case CTF_VERTICALREL_FRAME: pVertOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
549cdf0e10cSrcweir case CTF_VERTICALREL_ASCHAR: pVertOrientRelAsCharState = propertie; bNeedsAnchor = sal_True; break;
550cdf0e10cSrcweir
551cdf0e10cSrcweir // --> OD 2004-08-09 #i28749# - handle new CTFs for shape positioning properties
552cdf0e10cSrcweir case CTF_SHAPE_HORIZONTALPOS: pShapeHoriOrientState = propertie; bNeedsAnchor = sal_True; break;
553cdf0e10cSrcweir case CTF_SHAPE_HORIZONTALPOS_MIRRORED: pShapeHoriOrientMirroredState = propertie; bNeedsAnchor = sal_True; break;
554cdf0e10cSrcweir case CTF_SHAPE_HORIZONTALREL: pShapeHoriOrientRelState = propertie; bNeedsAnchor = sal_True; break;
555cdf0e10cSrcweir case CTF_SHAPE_HORIZONTALREL_FRAME: pShapeHoriOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
556cdf0e10cSrcweir case CTF_SHAPE_HORIZONTALMIRROR: pShapeHoriOrientMirrorState = propertie; bNeedsAnchor = sal_True; break;
557cdf0e10cSrcweir case CTF_SHAPE_VERTICALPOS: pShapeVertOrientState = propertie; bNeedsAnchor = sal_True; break;
558cdf0e10cSrcweir case CTF_SHAPE_VERTICALPOS_ATCHAR: pShapeVertOrientAtCharState = propertie; bNeedsAnchor = sal_True; break;
559cdf0e10cSrcweir case CTF_SHAPE_VERTICALREL: pShapeVertOrientRelState = propertie; bNeedsAnchor = sal_True; break;
560cdf0e10cSrcweir case CTF_SHAPE_VERTICALREL_PAGE: pShapeVertOrientRelPageState = propertie; bNeedsAnchor = sal_True; break;
561cdf0e10cSrcweir case CTF_SHAPE_VERTICALREL_FRAME: pShapeVertOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
562cdf0e10cSrcweir // <--
563cdf0e10cSrcweir
564cdf0e10cSrcweir case CTF_FONTNAME: pFontNameState = propertie; break;
565cdf0e10cSrcweir case CTF_FONTFAMILYNAME: pFontFamilyNameState = propertie; break;
566cdf0e10cSrcweir case CTF_FONTSTYLENAME: pFontStyleNameState = propertie; break;
567cdf0e10cSrcweir case CTF_FONTFAMILY: pFontFamilyState = propertie; break;
568cdf0e10cSrcweir case CTF_FONTPITCH: pFontPitchState = propertie; break;
569cdf0e10cSrcweir case CTF_FONTCHARSET: pFontCharsetState = propertie; break;
570cdf0e10cSrcweir
571cdf0e10cSrcweir case CTF_FONTNAME_CJK: pFontNameCJKState = propertie; break;
572cdf0e10cSrcweir case CTF_FONTFAMILYNAME_CJK: pFontFamilyNameCJKState = propertie; break;
573cdf0e10cSrcweir case CTF_FONTSTYLENAME_CJK: pFontStyleNameCJKState = propertie; break;
574cdf0e10cSrcweir case CTF_FONTFAMILY_CJK: pFontFamilyCJKState = propertie; break;
575cdf0e10cSrcweir case CTF_FONTPITCH_CJK: pFontPitchCJKState = propertie; break;
576cdf0e10cSrcweir case CTF_FONTCHARSET_CJK: pFontCharsetCJKState = propertie; break;
577cdf0e10cSrcweir
578cdf0e10cSrcweir case CTF_FONTNAME_CTL: pFontNameCTLState = propertie; break;
579cdf0e10cSrcweir case CTF_FONTFAMILYNAME_CTL: pFontFamilyNameCTLState = propertie; break;
580cdf0e10cSrcweir case CTF_FONTSTYLENAME_CTL: pFontStyleNameCTLState = propertie; break;
581cdf0e10cSrcweir case CTF_FONTFAMILY_CTL: pFontFamilyCTLState = propertie; break;
582cdf0e10cSrcweir case CTF_FONTPITCH_CTL: pFontPitchCTLState = propertie; break;
583cdf0e10cSrcweir case CTF_FONTCHARSET_CTL: pFontCharsetCTLState = propertie; break;
584cdf0e10cSrcweir case CTF_UNDERLINE: pUnderlineState = propertie; break;
585cdf0e10cSrcweir case CTF_UNDERLINE_COLOR: pUnderlineColorState = propertie; break;
586cdf0e10cSrcweir case CTF_UNDERLINE_HASCOLOR: pUnderlineHasColorState = propertie; break;
587cdf0e10cSrcweir case CTF_NUMBERINGSTYLENAME: pListStyleName = propertie; break;
588cdf0e10cSrcweir case CTF_TEXT_CLIP11: pClip11State = propertie; break;
589cdf0e10cSrcweir case CTF_TEXT_CLIP: pClipState = propertie; break;
590cdf0e10cSrcweir case CTF_PARAMARGINALL: pAllParaMargin = propertie; break;
591*339d2e3dSOliver-Rainer Wittmann case CTF_PARAMARGINALL_REL: pAllParaMarginRel = propertie; break;
592cdf0e10cSrcweir case CTF_MARGINALL: pAllMargin = propertie; break;
59364b14621SArmin Le Grand
59464b14621SArmin Le Grand //UUUU
59556b35d86SArmin Le Grand case CTF_REPEAT_OFFSET_X:
59664b14621SArmin Le Grand pRepeatOffsetX = propertie;
59764b14621SArmin Le Grand break;
59864b14621SArmin Le Grand
59964b14621SArmin Le Grand //UUUU
60056b35d86SArmin Le Grand case CTF_REPEAT_OFFSET_Y:
60164b14621SArmin Le Grand pRepeatOffsetY = propertie;
60264b14621SArmin Le Grand break;
60364b14621SArmin Le Grand
60464b14621SArmin Le Grand //UUUU
60556b35d86SArmin Le Grand case CTF_FILLGRADIENTNAME:
60656b35d86SArmin Le Grand case CTF_FILLHATCHNAME:
60756b35d86SArmin Le Grand case CTF_FILLBITMAPNAME:
60856b35d86SArmin Le Grand case CTF_FILLTRANSNAME:
60964b14621SArmin Le Grand {
61064b14621SArmin Le Grand OUString aStr;
61164b14621SArmin Le Grand if( (propertie->maValue >>= aStr) && 0 == aStr.getLength() )
61264b14621SArmin Le Grand propertie->mnIndex = -1;
61364b14621SArmin Le Grand }
61464b14621SArmin Le Grand break;
615cdf0e10cSrcweir }
616cdf0e10cSrcweir }
617cdf0e10cSrcweir
61864b14621SArmin Le Grand //UUUU
61964b14621SArmin Le Grand if( pRepeatOffsetX && pRepeatOffsetY )
62064b14621SArmin Le Grand {
62164b14621SArmin Le Grand sal_Int32 nOffset = 0;
62264b14621SArmin Le Grand if( ( pRepeatOffsetX->maValue >>= nOffset ) && ( nOffset == 0 ) )
62364b14621SArmin Le Grand pRepeatOffsetX->mnIndex = -1;
62464b14621SArmin Le Grand else
62564b14621SArmin Le Grand pRepeatOffsetY->mnIndex = -1;
62664b14621SArmin Le Grand }
62764b14621SArmin Le Grand
628cdf0e10cSrcweir if( pFontNameState )
629cdf0e10cSrcweir ContextFontFilter( pFontNameState, pFontFamilyNameState,
630cdf0e10cSrcweir pFontStyleNameState, pFontFamilyState,
631cdf0e10cSrcweir pFontPitchState, pFontCharsetState );
632cdf0e10cSrcweir if( pFontNameCJKState )
633cdf0e10cSrcweir ContextFontFilter( pFontNameCJKState, pFontFamilyNameCJKState,
634cdf0e10cSrcweir pFontStyleNameCJKState, pFontFamilyCJKState,
635cdf0e10cSrcweir pFontPitchCJKState, pFontCharsetCJKState );
636cdf0e10cSrcweir if( pFontNameCTLState )
637cdf0e10cSrcweir ContextFontFilter( pFontNameCTLState, pFontFamilyNameCTLState,
638cdf0e10cSrcweir pFontStyleNameCTLState, pFontFamilyCTLState,
639cdf0e10cSrcweir pFontPitchCTLState, pFontCharsetCTLState );
640cdf0e10cSrcweir
641cdf0e10cSrcweir if( pCharHeightState && (pCharPropHeightState || pCharDiffHeightState ) )
642cdf0e10cSrcweir ContextFontHeightFilter( pCharHeightState, pCharPropHeightState,
643cdf0e10cSrcweir pCharDiffHeightState );
644cdf0e10cSrcweir if( pCharHeightCJKState &&
645cdf0e10cSrcweir (pCharPropHeightCJKState || pCharDiffHeightCJKState ) )
646cdf0e10cSrcweir ContextFontHeightFilter( pCharHeightCJKState, pCharPropHeightCJKState,
647cdf0e10cSrcweir pCharDiffHeightCJKState );
648cdf0e10cSrcweir if( pCharHeightCTLState &&
649cdf0e10cSrcweir (pCharPropHeightCTLState || pCharDiffHeightCTLState ) )
650cdf0e10cSrcweir ContextFontHeightFilter( pCharHeightCTLState, pCharPropHeightCTLState,
651cdf0e10cSrcweir pCharDiffHeightCTLState );
652cdf0e10cSrcweir if( pUnderlineColorState || pUnderlineHasColorState )
653cdf0e10cSrcweir {
654cdf0e10cSrcweir sal_Bool bClear = !pUnderlineState;
655cdf0e10cSrcweir if( !bClear )
656cdf0e10cSrcweir {
657cdf0e10cSrcweir sal_Int16 nUnderline = 0;
658cdf0e10cSrcweir pUnderlineState->maValue >>= nUnderline;
659cdf0e10cSrcweir bClear = FontUnderline::NONE == nUnderline;
660cdf0e10cSrcweir }
661cdf0e10cSrcweir if( bClear )
662cdf0e10cSrcweir {
663cdf0e10cSrcweir if( pUnderlineColorState )
664cdf0e10cSrcweir pUnderlineColorState->mnIndex = -1;
665cdf0e10cSrcweir if( pUnderlineHasColorState )
666cdf0e10cSrcweir pUnderlineHasColorState->mnIndex = -1;
667cdf0e10cSrcweir }
668cdf0e10cSrcweir }
669cdf0e10cSrcweir
670cdf0e10cSrcweir lcl_checkMultiProperty(pParaLeftMarginState, pParaLeftMarginRelState);
671cdf0e10cSrcweir lcl_checkMultiProperty(pParaRightMarginState, pParaRightMarginRelState);
672cdf0e10cSrcweir lcl_checkMultiProperty(pParaTopMarginState, pParaTopMarginRelState);
673cdf0e10cSrcweir lcl_checkMultiProperty(pParaBottomMarginState, pParaBottomMarginRelState);
674cdf0e10cSrcweir lcl_checkMultiProperty(pParaFirstLineState, pParaFirstLineRelState);
675cdf0e10cSrcweir
676cdf0e10cSrcweir if (pAllParaMargin)
677cdf0e10cSrcweir {
678cdf0e10cSrcweir pAllParaMargin->mnIndex = -1; // just export individual attributes...
679cdf0e10cSrcweir pAllParaMargin->maValue.clear();
680cdf0e10cSrcweir }
681*339d2e3dSOliver-Rainer Wittmann if (pAllParaMarginRel)
682*339d2e3dSOliver-Rainer Wittmann {
683*339d2e3dSOliver-Rainer Wittmann pAllParaMarginRel->mnIndex = -1; // just export individual attributes...
684*339d2e3dSOliver-Rainer Wittmann pAllParaMarginRel->maValue.clear();
685*339d2e3dSOliver-Rainer Wittmann }
686cdf0e10cSrcweir if (pAllMargin)
687cdf0e10cSrcweir {
688cdf0e10cSrcweir pAllMargin->mnIndex = -1; // just export individual attributes...
689cdf0e10cSrcweir pAllMargin->maValue.clear();
690cdf0e10cSrcweir }
691cdf0e10cSrcweir
692cdf0e10cSrcweir if( pAllBorderWidthState )
693cdf0e10cSrcweir {
694cdf0e10cSrcweir if( pLeftBorderWidthState && pRightBorderWidthState && pTopBorderWidthState && pBottomBorderWidthState )
695cdf0e10cSrcweir {
696cdf0e10cSrcweir table::BorderLine aLeft, aRight, aTop, aBottom;
697cdf0e10cSrcweir
698cdf0e10cSrcweir pLeftBorderWidthState->maValue >>= aLeft;
699cdf0e10cSrcweir pRightBorderWidthState->maValue >>= aRight;
700cdf0e10cSrcweir pTopBorderWidthState->maValue >>= aTop;
701cdf0e10cSrcweir pBottomBorderWidthState->maValue >>= aBottom;
702cdf0e10cSrcweir if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth &&
703cdf0e10cSrcweir aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance &&
704cdf0e10cSrcweir aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth &&
705cdf0e10cSrcweir aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance &&
706cdf0e10cSrcweir aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth &&
707cdf0e10cSrcweir aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance )
708cdf0e10cSrcweir {
709cdf0e10cSrcweir pLeftBorderWidthState->mnIndex = -1;
710cdf0e10cSrcweir pLeftBorderWidthState->maValue.clear();
711cdf0e10cSrcweir pRightBorderWidthState->mnIndex = -1;
712cdf0e10cSrcweir pRightBorderWidthState->maValue.clear();
713cdf0e10cSrcweir pTopBorderWidthState->mnIndex = -1;
714cdf0e10cSrcweir pTopBorderWidthState->maValue.clear();
715cdf0e10cSrcweir pBottomBorderWidthState->mnIndex = -1;
716cdf0e10cSrcweir pBottomBorderWidthState->maValue.clear();
717cdf0e10cSrcweir }
718cdf0e10cSrcweir else
719cdf0e10cSrcweir {
720cdf0e10cSrcweir pAllBorderWidthState->mnIndex = -1;
721cdf0e10cSrcweir pAllBorderWidthState->maValue.clear();
722cdf0e10cSrcweir }
723cdf0e10cSrcweir }
724cdf0e10cSrcweir else
725cdf0e10cSrcweir {
726cdf0e10cSrcweir pAllBorderWidthState->mnIndex = -1;
727cdf0e10cSrcweir pAllBorderWidthState->maValue.clear();
728cdf0e10cSrcweir }
729cdf0e10cSrcweir }
730cdf0e10cSrcweir
731cdf0e10cSrcweir if( pAllBorderDistanceState )
732cdf0e10cSrcweir {
733cdf0e10cSrcweir if( pLeftBorderDistanceState && pRightBorderDistanceState && pTopBorderDistanceState && pBottomBorderDistanceState )
734cdf0e10cSrcweir {
735cdf0e10cSrcweir sal_Int32 aLeft = 0, aRight = 0, aTop = 0, aBottom = 0;
736cdf0e10cSrcweir
737cdf0e10cSrcweir pLeftBorderDistanceState->maValue >>= aLeft;
738cdf0e10cSrcweir pRightBorderDistanceState->maValue >>= aRight;
739cdf0e10cSrcweir pTopBorderDistanceState->maValue >>= aTop;
740cdf0e10cSrcweir pBottomBorderDistanceState->maValue >>= aBottom;
741cdf0e10cSrcweir if( aLeft == aRight && aLeft == aTop && aLeft == aBottom )
742cdf0e10cSrcweir {
743cdf0e10cSrcweir pLeftBorderDistanceState->mnIndex = -1;
744cdf0e10cSrcweir pLeftBorderDistanceState->maValue.clear();
745cdf0e10cSrcweir pRightBorderDistanceState->mnIndex = -1;
746cdf0e10cSrcweir pRightBorderDistanceState->maValue.clear();
747cdf0e10cSrcweir pTopBorderDistanceState->mnIndex = -1;
748cdf0e10cSrcweir pTopBorderDistanceState->maValue.clear();
749cdf0e10cSrcweir pBottomBorderDistanceState->mnIndex = -1;
750cdf0e10cSrcweir pBottomBorderDistanceState->maValue.clear();
751cdf0e10cSrcweir }
752cdf0e10cSrcweir else
753cdf0e10cSrcweir {
754cdf0e10cSrcweir pAllBorderDistanceState->mnIndex = -1;
755cdf0e10cSrcweir pAllBorderDistanceState->maValue.clear();
756cdf0e10cSrcweir }
757cdf0e10cSrcweir }
758cdf0e10cSrcweir else
759cdf0e10cSrcweir {
760cdf0e10cSrcweir pAllBorderDistanceState->mnIndex = -1;
761cdf0e10cSrcweir pAllBorderDistanceState->maValue.clear();
762cdf0e10cSrcweir }
763cdf0e10cSrcweir }
764cdf0e10cSrcweir
765cdf0e10cSrcweir if( pAllBorderState )
766cdf0e10cSrcweir {
767cdf0e10cSrcweir if( pLeftBorderState && pRightBorderState && pTopBorderState && pBottomBorderState )
768cdf0e10cSrcweir {
769cdf0e10cSrcweir table::BorderLine aLeft, aRight, aTop, aBottom;
770cdf0e10cSrcweir
771cdf0e10cSrcweir pLeftBorderState->maValue >>= aLeft;
772cdf0e10cSrcweir pRightBorderState->maValue >>= aRight;
773cdf0e10cSrcweir pTopBorderState->maValue >>= aTop;
774cdf0e10cSrcweir pBottomBorderState->maValue >>= aBottom;
775cdf0e10cSrcweir if( aLeft.Color == aRight.Color && aLeft.InnerLineWidth == aRight.InnerLineWidth &&
776cdf0e10cSrcweir aLeft.OuterLineWidth == aRight.OuterLineWidth && aLeft.LineDistance == aRight.LineDistance &&
777cdf0e10cSrcweir aLeft.Color == aTop.Color && aLeft.InnerLineWidth == aTop.InnerLineWidth &&
778cdf0e10cSrcweir aLeft.OuterLineWidth == aTop.OuterLineWidth && aLeft.LineDistance == aTop.LineDistance &&
779cdf0e10cSrcweir aLeft.Color == aBottom.Color && aLeft.InnerLineWidth == aBottom.InnerLineWidth &&
780cdf0e10cSrcweir aLeft.OuterLineWidth == aBottom.OuterLineWidth && aLeft.LineDistance == aBottom.LineDistance )
781cdf0e10cSrcweir {
782cdf0e10cSrcweir pLeftBorderState->mnIndex = -1;
783cdf0e10cSrcweir pLeftBorderState->maValue.clear();
784cdf0e10cSrcweir pRightBorderState->mnIndex = -1;
785cdf0e10cSrcweir pRightBorderState->maValue.clear();
786cdf0e10cSrcweir pTopBorderState->mnIndex = -1;
787cdf0e10cSrcweir pTopBorderState->maValue.clear();
788cdf0e10cSrcweir pBottomBorderState->mnIndex = -1;
789cdf0e10cSrcweir pBottomBorderState->maValue.clear();
790cdf0e10cSrcweir }
791cdf0e10cSrcweir else
792cdf0e10cSrcweir {
793cdf0e10cSrcweir pAllBorderState->mnIndex = -1;
794cdf0e10cSrcweir pAllBorderState->maValue.clear();
795cdf0e10cSrcweir }
796cdf0e10cSrcweir }
797cdf0e10cSrcweir else
798cdf0e10cSrcweir {
799cdf0e10cSrcweir pAllBorderState->mnIndex = -1;
800cdf0e10cSrcweir pAllBorderState->maValue.clear();
801cdf0e10cSrcweir }
802cdf0e10cSrcweir }
803cdf0e10cSrcweir
804cdf0e10cSrcweir sal_Int16 nSizeType = SizeType::FIX;
805cdf0e10cSrcweir if( pSizeTypeState )
806cdf0e10cSrcweir {
807cdf0e10cSrcweir pSizeTypeState->maValue >>= nSizeType;
808cdf0e10cSrcweir pSizeTypeState->mnIndex = -1;
809cdf0e10cSrcweir }
810cdf0e10cSrcweir
811cdf0e10cSrcweir if( pHeightMinAbsState )
812cdf0e10cSrcweir {
813cdf0e10cSrcweir sal_Int16 nRel = sal_Int16();
814cdf0e10cSrcweir if( (SizeType::FIX == nSizeType) ||
815cdf0e10cSrcweir ( pHeightMinRelState &&
816cdf0e10cSrcweir ( !(pHeightMinRelState->maValue >>= nRel) || nRel > 0 ) ) )
817cdf0e10cSrcweir {
818cdf0e10cSrcweir pHeightMinAbsState->mnIndex = -1;
819cdf0e10cSrcweir }
820cdf0e10cSrcweir
821cdf0e10cSrcweir // export SizeType::VARIABLE als min-width="0"
822cdf0e10cSrcweir if( SizeType::VARIABLE == nSizeType )
823cdf0e10cSrcweir pHeightMinAbsState->maValue <<= static_cast<sal_Int32>( 0 );
824cdf0e10cSrcweir }
825cdf0e10cSrcweir if( pHeightMinRelState && SizeType::MIN != nSizeType)
826cdf0e10cSrcweir pHeightMinRelState->mnIndex = -1;
827cdf0e10cSrcweir if( pHeightAbsState && pHeightMinAbsState &&
828cdf0e10cSrcweir -1 != pHeightMinAbsState->mnIndex )
829cdf0e10cSrcweir pHeightAbsState->mnIndex = -1;
830cdf0e10cSrcweir if( pHeightRelState && SizeType::FIX != nSizeType)
831cdf0e10cSrcweir pHeightRelState->mnIndex = -1;
832cdf0e10cSrcweir
833cdf0e10cSrcweir // frame width
834cdf0e10cSrcweir nSizeType = SizeType::FIX;
835cdf0e10cSrcweir if( pWidthTypeState )
836cdf0e10cSrcweir {
837cdf0e10cSrcweir pWidthTypeState->maValue >>= nSizeType;
838cdf0e10cSrcweir pWidthTypeState->mnIndex = -1;
839cdf0e10cSrcweir }
840cdf0e10cSrcweir if( pWidthMinAbsState )
841cdf0e10cSrcweir {
842cdf0e10cSrcweir sal_Int16 nRel = sal_Int16();
843cdf0e10cSrcweir if( (SizeType::FIX == nSizeType) ||
844cdf0e10cSrcweir ( pWidthMinRelState &&
845cdf0e10cSrcweir ( !(pWidthMinRelState->maValue >>= nRel) || nRel > 0 ) ) )
846cdf0e10cSrcweir {
847cdf0e10cSrcweir pWidthMinAbsState->mnIndex = -1;
848cdf0e10cSrcweir }
849cdf0e10cSrcweir
850cdf0e10cSrcweir // export SizeType::VARIABLE als min-width="0"
851cdf0e10cSrcweir if( SizeType::VARIABLE == nSizeType )
852cdf0e10cSrcweir pWidthMinAbsState->maValue <<= static_cast<sal_Int32>( 0 );
853cdf0e10cSrcweir }
854cdf0e10cSrcweir if( pWidthMinRelState && SizeType::MIN != nSizeType)
855cdf0e10cSrcweir pWidthMinRelState->mnIndex = -1;
856cdf0e10cSrcweir if( pWidthAbsState && pWidthMinAbsState &&
857cdf0e10cSrcweir -1 != pWidthMinAbsState->mnIndex )
858cdf0e10cSrcweir pWidthAbsState->mnIndex = -1;
859cdf0e10cSrcweir if( pWidthRelState && SizeType::FIX != nSizeType)
860cdf0e10cSrcweir pWidthRelState->mnIndex = -1;
861cdf0e10cSrcweir
862cdf0e10cSrcweir if( pWrapState )
863cdf0e10cSrcweir {
864cdf0e10cSrcweir WrapTextMode eVal;
865cdf0e10cSrcweir pWrapState->maValue >>= eVal;
866cdf0e10cSrcweir switch( eVal )
867cdf0e10cSrcweir {
868cdf0e10cSrcweir case WrapTextMode_NONE:
869cdf0e10cSrcweir // no wrapping: disable para-only and contour
870cdf0e10cSrcweir if( pWrapParagraphOnlyState )
871cdf0e10cSrcweir pWrapParagraphOnlyState->mnIndex = -1;
872cdf0e10cSrcweir // no break
873cdf0e10cSrcweir case WrapTextMode_THROUGHT:
874cdf0e10cSrcweir // wrap through: disable only contour
875cdf0e10cSrcweir if( pWrapContourState )
876cdf0e10cSrcweir pWrapContourState->mnIndex = -1;
877cdf0e10cSrcweir break;
878cdf0e10cSrcweir default:
879cdf0e10cSrcweir break;
880cdf0e10cSrcweir }
881cdf0e10cSrcweir if( pWrapContourModeState &&
882cdf0e10cSrcweir (!pWrapContourState ||
883cdf0e10cSrcweir !*(sal_Bool *)pWrapContourState ->maValue.getValue() ) )
884cdf0e10cSrcweir pWrapContourModeState->mnIndex = -1;
885cdf0e10cSrcweir }
886cdf0e10cSrcweir
887cdf0e10cSrcweir TextContentAnchorType eAnchor = TextContentAnchorType_AT_PARAGRAPH;
888cdf0e10cSrcweir if( pAnchorTypeState )
889cdf0e10cSrcweir pAnchorTypeState->maValue >>= eAnchor;
890cdf0e10cSrcweir else if( bNeedsAnchor )
891cdf0e10cSrcweir {
892cdf0e10cSrcweir Any aAny = rPropSet->getPropertyValue(
893cdf0e10cSrcweir ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AnchorType") ) );
894cdf0e10cSrcweir aAny >>= eAnchor;
895cdf0e10cSrcweir }
896cdf0e10cSrcweir
897cdf0e10cSrcweir // states for frame positioning attributes
898cdf0e10cSrcweir {
899cdf0e10cSrcweir if( pHoriOrientState && pHoriOrientMirroredState )
900cdf0e10cSrcweir {
901cdf0e10cSrcweir if( pHoriOrientMirrorState &&
902cdf0e10cSrcweir *(sal_Bool *)pHoriOrientMirrorState->maValue.getValue() )
903cdf0e10cSrcweir pHoriOrientState->mnIndex = -1;
904cdf0e10cSrcweir else
905cdf0e10cSrcweir pHoriOrientMirroredState->mnIndex = -1;
906cdf0e10cSrcweir }
907cdf0e10cSrcweir if( pHoriOrientMirrorState )
908cdf0e10cSrcweir pHoriOrientMirrorState->mnIndex = -1;
909cdf0e10cSrcweir
910cdf0e10cSrcweir if( pHoriOrientRelState && TextContentAnchorType_AT_FRAME == eAnchor )
911cdf0e10cSrcweir pHoriOrientRelState->mnIndex = -1;
912cdf0e10cSrcweir if( pHoriOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
913cdf0e10cSrcweir pHoriOrientRelFrameState->mnIndex = -1;;
914cdf0e10cSrcweir
915cdf0e10cSrcweir if( pVertOrientState && TextContentAnchorType_AT_CHARACTER == eAnchor )
916cdf0e10cSrcweir pVertOrientState->mnIndex = -1;
917cdf0e10cSrcweir if( pVertOrientAtCharState && TextContentAnchorType_AT_CHARACTER != eAnchor )
918cdf0e10cSrcweir pVertOrientAtCharState->mnIndex = -1;
919cdf0e10cSrcweir if( pVertOrientRelState && TextContentAnchorType_AT_PARAGRAPH != eAnchor &&
920cdf0e10cSrcweir TextContentAnchorType_AT_CHARACTER != eAnchor )
921cdf0e10cSrcweir pVertOrientRelState->mnIndex = -1;
922cdf0e10cSrcweir if( pVertOrientRelPageState && TextContentAnchorType_AT_PAGE != eAnchor )
923cdf0e10cSrcweir pVertOrientRelPageState->mnIndex = -1;
924cdf0e10cSrcweir if( pVertOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
925cdf0e10cSrcweir pVertOrientRelFrameState->mnIndex = -1;
926cdf0e10cSrcweir if( pVertOrientRelAsCharState && TextContentAnchorType_AS_CHARACTER != eAnchor )
927cdf0e10cSrcweir pVertOrientRelAsCharState->mnIndex = -1;
928cdf0e10cSrcweir }
929cdf0e10cSrcweir
930cdf0e10cSrcweir // --> OD 2004-08-09 #i28749# - states for shape positioning properties
931cdf0e10cSrcweir if ( eAnchor != TextContentAnchorType_AS_CHARACTER &&
932cdf0e10cSrcweir ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 )
933cdf0e10cSrcweir {
934cdf0e10cSrcweir // no export of shape positioning properties,
935cdf0e10cSrcweir // if shape isn't anchored as-character and
936cdf0e10cSrcweir // destination file format is OpenOffice.org file format
937cdf0e10cSrcweir if ( pShapeHoriOrientState )
938cdf0e10cSrcweir pShapeHoriOrientState->mnIndex = -1;
939cdf0e10cSrcweir if ( pShapeHoriOrientMirroredState )
940cdf0e10cSrcweir pShapeHoriOrientMirroredState->mnIndex = -1;
941cdf0e10cSrcweir if ( pShapeHoriOrientRelState )
942cdf0e10cSrcweir pShapeHoriOrientRelState->mnIndex = -1;
943cdf0e10cSrcweir if ( pShapeHoriOrientRelFrameState )
944cdf0e10cSrcweir pShapeHoriOrientRelFrameState->mnIndex = -1;
945cdf0e10cSrcweir if ( pShapeHoriOrientMirrorState )
946cdf0e10cSrcweir pShapeHoriOrientMirrorState->mnIndex = -1;
947cdf0e10cSrcweir if ( pShapeVertOrientState )
948cdf0e10cSrcweir pShapeVertOrientState->mnIndex = -1;
949cdf0e10cSrcweir if ( pShapeVertOrientAtCharState )
950cdf0e10cSrcweir pShapeVertOrientAtCharState->mnIndex = -1;
951cdf0e10cSrcweir if ( pShapeVertOrientRelState )
952cdf0e10cSrcweir pShapeVertOrientRelState->mnIndex = -1;
953cdf0e10cSrcweir if ( pShapeVertOrientRelPageState )
954cdf0e10cSrcweir pShapeVertOrientRelPageState->mnIndex = -1;
955cdf0e10cSrcweir if ( pShapeVertOrientRelFrameState )
956cdf0e10cSrcweir pShapeVertOrientRelFrameState->mnIndex = -1;
957cdf0e10cSrcweir }
958cdf0e10cSrcweir else
959cdf0e10cSrcweir {
960cdf0e10cSrcweir // handling of shape positioning property states as for frames - see above
961cdf0e10cSrcweir if( pShapeHoriOrientState && pShapeHoriOrientMirroredState )
962cdf0e10cSrcweir {
963cdf0e10cSrcweir if( pShapeHoriOrientMirrorState &&
964cdf0e10cSrcweir *(sal_Bool *)pShapeHoriOrientMirrorState->maValue.getValue() )
965cdf0e10cSrcweir pShapeHoriOrientState->mnIndex = -1;
966cdf0e10cSrcweir else
967cdf0e10cSrcweir pShapeHoriOrientMirroredState->mnIndex = -1;
968cdf0e10cSrcweir }
969cdf0e10cSrcweir if( pShapeHoriOrientMirrorState )
970cdf0e10cSrcweir pShapeHoriOrientMirrorState->mnIndex = -1;
971cdf0e10cSrcweir
972cdf0e10cSrcweir if( pShapeHoriOrientRelState && TextContentAnchorType_AT_FRAME == eAnchor )
973cdf0e10cSrcweir pShapeHoriOrientRelState->mnIndex = -1;
974cdf0e10cSrcweir if( pShapeHoriOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
975cdf0e10cSrcweir pShapeHoriOrientRelFrameState->mnIndex = -1;;
976cdf0e10cSrcweir
977cdf0e10cSrcweir if( pShapeVertOrientState && TextContentAnchorType_AT_CHARACTER == eAnchor )
978cdf0e10cSrcweir pShapeVertOrientState->mnIndex = -1;
979cdf0e10cSrcweir if( pShapeVertOrientAtCharState && TextContentAnchorType_AT_CHARACTER != eAnchor )
980cdf0e10cSrcweir pShapeVertOrientAtCharState->mnIndex = -1;
981cdf0e10cSrcweir if( pShapeVertOrientRelState && TextContentAnchorType_AT_PARAGRAPH != eAnchor &&
982cdf0e10cSrcweir TextContentAnchorType_AT_CHARACTER != eAnchor )
983cdf0e10cSrcweir pShapeVertOrientRelState->mnIndex = -1;
984cdf0e10cSrcweir if( pShapeVertOrientRelPageState && TextContentAnchorType_AT_PAGE != eAnchor )
985cdf0e10cSrcweir pShapeVertOrientRelPageState->mnIndex = -1;
986cdf0e10cSrcweir if( pShapeVertOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
987cdf0e10cSrcweir pShapeVertOrientRelFrameState->mnIndex = -1;
988cdf0e10cSrcweir }
989cdf0e10cSrcweir // <--
990cdf0e10cSrcweir
991cdf0e10cSrcweir // list style name: remove list style if it is the default outline style
992cdf0e10cSrcweir if( pListStyleName != NULL )
993cdf0e10cSrcweir {
994cdf0e10cSrcweir OUString sListStyleName;
995cdf0e10cSrcweir pListStyleName->maValue >>= sListStyleName;
996cdf0e10cSrcweir if( lcl_IsOutlineStyle( GetExport(), sListStyleName ) )
997cdf0e10cSrcweir pListStyleName->mnIndex = -1;
998cdf0e10cSrcweir }
999cdf0e10cSrcweir
1000cdf0e10cSrcweir if( pClipState != NULL && pClip11State != NULL )
1001cdf0e10cSrcweir pClip11State->mnIndex = -1;
1002cdf0e10cSrcweir
1003cdf0e10cSrcweir SvXMLExportPropertyMapper::ContextFilter(rProperties,rPropSet);
1004cdf0e10cSrcweir }
1005cdf0e10cSrcweir
1006cdf0e10cSrcweir
lcl_IsOutlineStyle(const SvXMLExport & rExport,const OUString & rName)1007cdf0e10cSrcweir bool lcl_IsOutlineStyle(const SvXMLExport &rExport, const OUString & rName)
1008cdf0e10cSrcweir {
1009cdf0e10cSrcweir Reference< XChapterNumberingSupplier >
1010cdf0e10cSrcweir xCNSupplier(rExport.GetModel(), UNO_QUERY);
1011cdf0e10cSrcweir
1012cdf0e10cSrcweir OUString sOutlineName;
1013cdf0e10cSrcweir OUString sName(RTL_CONSTASCII_USTRINGPARAM("Name"));
1014cdf0e10cSrcweir
1015cdf0e10cSrcweir if (xCNSupplier.is())
1016cdf0e10cSrcweir {
1017cdf0e10cSrcweir Reference<XPropertySet> xNumRule(
1018cdf0e10cSrcweir xCNSupplier->getChapterNumberingRules(), UNO_QUERY );
1019cdf0e10cSrcweir DBG_ASSERT( xNumRule.is(), "no chapter numbering rules" );
1020cdf0e10cSrcweir if (xNumRule.is())
1021cdf0e10cSrcweir {
1022cdf0e10cSrcweir xNumRule->getPropertyValue(sName) >>= sOutlineName;
1023cdf0e10cSrcweir }
1024cdf0e10cSrcweir }
1025cdf0e10cSrcweir
1026cdf0e10cSrcweir return rName == sOutlineName;
1027cdf0e10cSrcweir }
1028