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