LCOV - code coverage report
Current view: top level - xmloff/source/style - PageMasterExportPropMapper.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 227 0.0 %
Date: 2014-04-14 Functions: 0 13 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "PageMasterExportPropMapper.hxx"
      21             : #include <xmloff/xmltoken.hxx>
      22             : #include <comphelper/types.hxx>
      23             : #include <com/sun/star/table/BorderLine2.hpp>
      24             : #include <xmloff/PageMasterStyleMap.hxx>
      25             : #include <tools/debug.hxx>
      26             : #include <rtl/ustrbuf.hxx>
      27             : #include <comphelper/extract.hxx>
      28             : 
      29             : using namespace ::com::sun::star;
      30             : using namespace ::com::sun::star::uno;
      31             : using namespace ::com::sun::star::beans;
      32             : using namespace ::comphelper;
      33             : using namespace ::xmloff::token;
      34             : 
      35           0 : static inline bool lcl_HasSameLineWidth( const table::BorderLine2& rLine1, const table::BorderLine2& rLine2 )
      36             : {
      37           0 :     return  (rLine1.InnerLineWidth == rLine2.InnerLineWidth) &&
      38           0 :             (rLine1.OuterLineWidth == rLine2.OuterLineWidth) &&
      39           0 :             (rLine1.LineDistance == rLine2.LineDistance) &&
      40           0 :             (rLine1.LineWidth == rLine2.LineWidth);
      41             : }
      42             : 
      43           0 : inline bool operator==( const table::BorderLine2& rLine1, const table::BorderLine2& rLine2 )
      44             : {
      45           0 :     return  (rLine1.Color == rLine2.Color) &&
      46           0 :             lcl_HasSameLineWidth( rLine1, rLine2 ) &&
      47           0 :             ( rLine1.LineStyle == rLine2.LineStyle );
      48             : }
      49             : 
      50           0 : static inline void lcl_RemoveState( XMLPropertyState* pState )
      51             : {
      52           0 :     pState->mnIndex = -1;
      53           0 :     pState->maValue.clear();
      54           0 : }
      55             : 
      56           0 : static void lcl_RemoveStateIfZero16( XMLPropertyState* pState )
      57             : {
      58           0 :     sal_Int16   nValue = sal_Int16();
      59           0 :     if( (pState->maValue >>= nValue) && !nValue )
      60           0 :         lcl_RemoveState( pState );
      61           0 : }
      62             : 
      63           0 : static void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int32 nIndex, const OUString& rProperty, uno::Reference< beans::XPropertySet >& xProps)
      64             : {
      65           0 :     if(::cppu::any2bool(xProps->getPropertyValue(rProperty)))
      66           0 :         rPropState.push_back(XMLPropertyState (nIndex, css::uno::Any(true)));
      67           0 : }
      68             : 
      69             : // helper struct to handle equal XMLPropertyState's for page, header and footer
      70             : 
      71             : struct XMLPropertyStateBuffer
      72             : {
      73             :     XMLPropertyState*       pPMMarginAll;
      74             :     XMLPropertyState*       pPMMarginTop;
      75             :     XMLPropertyState*       pPMMarginBottom;
      76             :     XMLPropertyState*       pPMMarginLeft;
      77             :     XMLPropertyState*       pPMMarginRight;
      78             : 
      79             :     XMLPropertyState*       pPMBorderAll;
      80             :     XMLPropertyState*       pPMBorderTop;
      81             :     XMLPropertyState*       pPMBorderBottom;
      82             :     XMLPropertyState*       pPMBorderLeft;
      83             :     XMLPropertyState*       pPMBorderRight;
      84             : 
      85             :     XMLPropertyState*       pPMBorderWidthAll;
      86             :     XMLPropertyState*       pPMBorderWidthTop;
      87             :     XMLPropertyState*       pPMBorderWidthBottom;
      88             :     XMLPropertyState*       pPMBorderWidthLeft;
      89             :     XMLPropertyState*       pPMBorderWidthRight;
      90             : 
      91             :     XMLPropertyState*       pPMPaddingAll;
      92             :     XMLPropertyState*       pPMPaddingTop;
      93             :     XMLPropertyState*       pPMPaddingBottom;
      94             :     XMLPropertyState*       pPMPaddingLeft;
      95             :     XMLPropertyState*       pPMPaddingRight;
      96             : 
      97             :                             XMLPropertyStateBuffer();
      98             :     void                    ContextFilter( ::std::vector< XMLPropertyState >& rPropState );
      99             : };
     100             : 
     101           0 : XMLPropertyStateBuffer::XMLPropertyStateBuffer()
     102             :     :   pPMMarginAll( NULL )
     103             :     ,   pPMMarginTop( NULL )
     104             :     ,   pPMMarginBottom( NULL )
     105             :     ,   pPMMarginLeft( NULL )
     106             :     ,   pPMMarginRight( NULL )
     107             :     ,
     108             :         pPMBorderAll( NULL ),
     109             :         pPMBorderTop( NULL ),
     110             :         pPMBorderBottom( NULL ),
     111             :         pPMBorderLeft( NULL ),
     112             :         pPMBorderRight( NULL ),
     113             : 
     114             :         pPMBorderWidthAll( NULL ),
     115             :         pPMBorderWidthTop( NULL ),
     116             :         pPMBorderWidthBottom( NULL ),
     117             :         pPMBorderWidthLeft( NULL ),
     118             :         pPMBorderWidthRight( NULL ),
     119             : 
     120             :         pPMPaddingAll( NULL ),
     121             :         pPMPaddingTop( NULL ),
     122             :         pPMPaddingBottom( NULL ),
     123             :         pPMPaddingLeft( NULL ),
     124           0 :         pPMPaddingRight( NULL )
     125             : {
     126           0 : }
     127             : 
     128           0 : void XMLPropertyStateBuffer::ContextFilter( ::std::vector< XMLPropertyState >& )
     129             : {
     130           0 :     if (pPMMarginAll)
     131             :     {
     132           0 :         lcl_RemoveState(pPMMarginAll); // #i117696# do not write fo:margin
     133             :     }
     134             : 
     135           0 :     if( pPMBorderAll )
     136             :     {
     137           0 :         if( pPMBorderTop && pPMBorderBottom && pPMBorderLeft && pPMBorderRight )
     138             :         {
     139           0 :             table::BorderLine2 aLineTop, aLineBottom, aLineLeft, aLineRight;
     140             : 
     141           0 :             pPMBorderTop->maValue >>= aLineTop;
     142           0 :             pPMBorderBottom->maValue >>= aLineBottom;
     143           0 :             pPMBorderLeft->maValue >>= aLineLeft;
     144           0 :             pPMBorderRight->maValue >>= aLineRight;
     145             : 
     146           0 :             if( (aLineTop == aLineBottom) && (aLineBottom == aLineLeft) && (aLineLeft == aLineRight) )
     147             :             {
     148           0 :                 lcl_RemoveState( pPMBorderTop );
     149           0 :                 lcl_RemoveState( pPMBorderBottom );
     150           0 :                 lcl_RemoveState( pPMBorderLeft );
     151           0 :                 lcl_RemoveState( pPMBorderRight );
     152             :             }
     153             :             else
     154           0 :                 lcl_RemoveState( pPMBorderAll );
     155             :         }
     156             :         else
     157           0 :             lcl_RemoveState( pPMBorderAll );
     158             :     }
     159             : 
     160           0 :     if( pPMBorderWidthAll )
     161             :     {
     162           0 :         if( pPMBorderWidthTop && pPMBorderWidthBottom && pPMBorderWidthLeft && pPMBorderWidthRight )
     163             :         {
     164           0 :             table::BorderLine2 aLineTop, aLineBottom, aLineLeft, aLineRight;
     165             : 
     166           0 :             pPMBorderWidthTop->maValue >>= aLineTop;
     167           0 :             pPMBorderWidthBottom->maValue >>= aLineBottom;
     168           0 :             pPMBorderWidthLeft->maValue >>= aLineLeft;
     169           0 :             pPMBorderWidthRight->maValue >>= aLineRight;
     170             : 
     171           0 :             if( lcl_HasSameLineWidth( aLineTop, aLineBottom ) &&
     172           0 :                 lcl_HasSameLineWidth( aLineBottom, aLineLeft ) &&
     173           0 :                 lcl_HasSameLineWidth( aLineLeft, aLineRight ) )
     174             :             {
     175           0 :                 lcl_RemoveState( pPMBorderWidthTop );
     176           0 :                 lcl_RemoveState( pPMBorderWidthBottom );
     177           0 :                 lcl_RemoveState( pPMBorderWidthLeft );
     178           0 :                 lcl_RemoveState( pPMBorderWidthRight );
     179             :             }
     180             :             else
     181           0 :                 lcl_RemoveState( pPMBorderWidthAll );
     182             :         }
     183             :         else
     184           0 :             lcl_RemoveState( pPMBorderWidthAll );
     185             :     }
     186             : 
     187           0 :     if( pPMPaddingAll )
     188             :     {
     189           0 :         if( pPMPaddingTop && pPMPaddingBottom && pPMPaddingLeft && pPMPaddingRight )
     190             :         {
     191           0 :             sal_Int32 nTop = 0, nBottom = 0, nLeft = 0, nRight = 0;
     192             : 
     193           0 :             pPMPaddingTop->maValue >>= nTop;
     194           0 :             pPMPaddingBottom->maValue >>= nBottom;
     195           0 :             pPMPaddingLeft->maValue >>= nLeft;
     196           0 :             pPMPaddingRight->maValue >>= nRight;
     197             : 
     198           0 :             if( (nTop == nBottom) && (nBottom == nLeft) && (nLeft == nRight) )
     199             :             {
     200           0 :                 lcl_RemoveState( pPMPaddingTop );
     201           0 :                 lcl_RemoveState( pPMPaddingBottom );
     202           0 :                 lcl_RemoveState( pPMPaddingLeft );
     203           0 :                 lcl_RemoveState( pPMPaddingRight );
     204             :             }
     205             :             else
     206           0 :                 lcl_RemoveState( pPMPaddingAll );
     207             :         }
     208             :         else
     209           0 :             lcl_RemoveState( pPMPaddingAll );
     210             :     }
     211           0 : }
     212             : 
     213           0 : XMLPageMasterExportPropMapper::XMLPageMasterExportPropMapper(
     214             :         const UniReference< XMLPropertySetMapper >& rMapper,
     215             :         SvXMLExport& rExport ) :
     216             :     SvXMLExportPropertyMapper( rMapper ),
     217             :     aBackgroundImageExport( rExport ),
     218             :     aTextColumnsExport( rExport ),
     219           0 :     aFootnoteSeparatorExport( rExport )
     220             : {
     221           0 : }
     222             : 
     223           0 : XMLPageMasterExportPropMapper::~XMLPageMasterExportPropMapper()
     224             : {
     225           0 : }
     226             : 
     227           0 : void XMLPageMasterExportPropMapper::handleElementItem(
     228             :         SvXMLExport&,
     229             :         const XMLPropertyState& rProperty,
     230             :         sal_uInt16 /*nFlags*/,
     231             :         const ::std::vector< XMLPropertyState >* pProperties,
     232             :         sal_uInt32 nIdx ) const
     233             : {
     234           0 :     XMLPageMasterExportPropMapper* pThis = const_cast<XMLPageMasterExportPropMapper*>(this);
     235             : 
     236           0 :     sal_uInt32 nContextId = getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex );
     237           0 :     switch( nContextId )
     238             :     {
     239             :         case CTF_PM_GRAPHICURL:
     240             :         case CTF_PM_HEADERGRAPHICURL:
     241             :         case CTF_PM_FOOTERGRAPHICURL:
     242             :             {
     243             :                 DBG_ASSERT( pProperties && (nIdx >= 2), "property vector missing" );
     244             :                 sal_Int32 nPos;
     245             :                 sal_Int32 nFilter;
     246           0 :                 switch( nContextId  )
     247             :                 {
     248             :                 case CTF_PM_GRAPHICURL:
     249           0 :                     nPos = CTF_PM_GRAPHICPOSITION;
     250           0 :                     nFilter = CTF_PM_GRAPHICFILTER;
     251           0 :                     break;
     252             :                 case CTF_PM_HEADERGRAPHICURL:
     253           0 :                     nPos = CTF_PM_HEADERGRAPHICPOSITION;
     254           0 :                     nFilter = CTF_PM_HEADERGRAPHICFILTER;
     255           0 :                     break;
     256             :                 case CTF_PM_FOOTERGRAPHICURL:
     257           0 :                     nPos = CTF_PM_FOOTERGRAPHICPOSITION;
     258           0 :                     nFilter = CTF_PM_FOOTERGRAPHICFILTER;
     259           0 :                     break;
     260             :                 default:
     261           0 :                     nPos = 0;  // TODO What values should this be?
     262           0 :                     nFilter = 0;
     263             :                 }
     264           0 :                 const Any*  pPos    = NULL;
     265           0 :                 const Any*  pFilter = NULL;
     266           0 :                 if( pProperties && (nIdx >= 2) )
     267             :                 {
     268           0 :                     const XMLPropertyState& rPos = (*pProperties)[nIdx - 2];
     269             :                     DBG_ASSERT( getPropertySetMapper()->GetEntryContextId( rPos.mnIndex ) == nPos,
     270             :                                 "invalid property map: pos expected" );
     271           0 :                     if( getPropertySetMapper()->GetEntryContextId( rPos.mnIndex ) == nPos )
     272           0 :                         pPos = &rPos.maValue;
     273             : 
     274           0 :                     const XMLPropertyState& rFilter = (*pProperties)[nIdx - 1];
     275             :                     DBG_ASSERT( getPropertySetMapper()->GetEntryContextId( rFilter.mnIndex ) == nFilter,
     276             :                                 "invalid property map: filter expected" );
     277           0 :                     if( getPropertySetMapper()->GetEntryContextId( rFilter.mnIndex ) == nFilter )
     278           0 :                         pFilter = &rFilter.maValue;
     279             :                 }
     280           0 :                 sal_uInt32 nPropIndex = rProperty.mnIndex;
     281             :                 pThis->aBackgroundImageExport.exportXML( rProperty.maValue, pPos, pFilter, NULL,
     282           0 :                     getPropertySetMapper()->GetEntryNameSpace( nPropIndex ),
     283           0 :                     getPropertySetMapper()->GetEntryXMLName( nPropIndex ) );
     284             :             }
     285           0 :             break;
     286             :         case CTF_PM_TEXTCOLUMNS:
     287           0 :             pThis->aTextColumnsExport.exportXML( rProperty.maValue );
     288           0 :             break;
     289             :         case CTF_PM_FTN_LINE_WEIGHT:
     290             :             pThis->aFootnoteSeparatorExport.exportXML( pProperties, nIdx,
     291           0 :                                                        getPropertySetMapper());
     292           0 :             break;
     293             :     }
     294           0 : }
     295             : 
     296           0 : void XMLPageMasterExportPropMapper::handleSpecialItem(
     297             :         SvXMLAttributeList&,
     298             :         const XMLPropertyState&,
     299             :         const SvXMLUnitConverter&,
     300             :         const SvXMLNamespaceMap&,
     301             :         const ::std::vector< XMLPropertyState >*,
     302             :         sal_uInt32 /*nIdx*/) const
     303             : {
     304           0 : }
     305             : 
     306           0 : void XMLPageMasterExportPropMapper::ContextFilter(
     307             :         bool bEnableFoFontFamily,
     308             :         ::std::vector< XMLPropertyState >& rPropState,
     309             :         Reference< XPropertySet > rPropSet ) const
     310             : {
     311           0 :     XMLPropertyStateBuffer  aPageBuffer;
     312           0 :     XMLPropertyStateBuffer  aHeaderBuffer;
     313           0 :     XMLPropertyStateBuffer  aFooterBuffer;
     314             : 
     315           0 :     XMLPropertyState*       pPMHeaderHeight     = NULL;
     316           0 :     XMLPropertyState*       pPMHeaderMinHeight  = NULL;
     317           0 :     XMLPropertyState*       pPMHeaderDynamic    = NULL;
     318             : 
     319           0 :     XMLPropertyState*       pPMFooterHeight     = NULL;
     320           0 :     XMLPropertyState*       pPMFooterMinHeight  = NULL;
     321           0 :     XMLPropertyState*       pPMFooterDynamic    = NULL;
     322             : 
     323           0 :     XMLPropertyState*       pPMScaleTo          = NULL;
     324           0 :     XMLPropertyState*       pPMScaleToPages     = NULL;
     325           0 :     XMLPropertyState*       pPMScaleToX         = NULL;
     326           0 :     XMLPropertyState*       pPMScaleToY         = NULL;
     327           0 :     XMLPropertyState*       pPMStandardMode     = NULL;
     328           0 :     XMLPropertyState*       pPMGridBaseWidth    = NULL;
     329             :     // same as pPMGridSnapTo but for backward compatibility only
     330           0 :     XMLPropertyState*       pPMGridSnapToChars  = NULL;
     331           0 :     XMLPropertyState*       pPMGridSnapTo       = NULL;
     332             : 
     333           0 :     XMLPropertyState*       pPrint              = NULL;
     334             : 
     335           0 :     UniReference < XMLPropertySetMapper > aPropMapper(getPropertySetMapper());
     336             : 
     337           0 :     for( ::std::vector< XMLPropertyState >::iterator aIter = rPropState.begin(); aIter != rPropState.end(); ++aIter )
     338             :     {
     339           0 :         XMLPropertyState *pProp = &(*aIter);
     340           0 :         sal_Int16 nContextId    = aPropMapper->GetEntryContextId( pProp->mnIndex );
     341           0 :         sal_Int16 nFlag         = nContextId & CTF_PM_FLAGMASK;
     342           0 :         sal_Int16 nSimpleId     = nContextId & (~CTF_PM_FLAGMASK | XML_PM_CTF_START);
     343           0 :         sal_Int16 nPrintId      = nContextId & CTF_PM_PRINTMASK;
     344             : 
     345             :         XMLPropertyStateBuffer* pBuffer;
     346           0 :         switch( nFlag )
     347             :         {
     348           0 :             case CTF_PM_HEADERFLAG:         pBuffer = &aHeaderBuffer;   break;
     349           0 :             case CTF_PM_FOOTERFLAG:         pBuffer = &aFooterBuffer;   break;
     350           0 :             default:                        pBuffer = &aPageBuffer;     break;
     351             :         }
     352             : 
     353           0 :         switch( nSimpleId )
     354             :         {
     355           0 :             case CTF_PM_MARGINALL:          pBuffer->pPMMarginAll           = pProp;    break;
     356           0 :             case CTF_PM_MARGINTOP:          pBuffer->pPMMarginTop           = pProp;    break;
     357           0 :             case CTF_PM_MARGINBOTTOM:       pBuffer->pPMMarginBottom        = pProp;    break;
     358           0 :             case CTF_PM_MARGINLEFT:         pBuffer->pPMMarginLeft          = pProp;    break;
     359           0 :             case CTF_PM_MARGINRIGHT:        pBuffer->pPMMarginRight         = pProp;    break;
     360           0 :             case CTF_PM_BORDERALL:          pBuffer->pPMBorderAll           = pProp;    break;
     361           0 :             case CTF_PM_BORDERTOP:          pBuffer->pPMBorderTop           = pProp;    break;
     362           0 :             case CTF_PM_BORDERBOTTOM:       pBuffer->pPMBorderBottom        = pProp;    break;
     363           0 :             case CTF_PM_BORDERLEFT:         pBuffer->pPMBorderLeft          = pProp;    break;
     364           0 :             case CTF_PM_BORDERRIGHT:        pBuffer->pPMBorderRight         = pProp;    break;
     365           0 :             case CTF_PM_BORDERWIDTHALL:     pBuffer->pPMBorderWidthAll      = pProp;    break;
     366           0 :             case CTF_PM_BORDERWIDTHTOP:     pBuffer->pPMBorderWidthTop      = pProp;    break;
     367           0 :             case CTF_PM_BORDERWIDTHBOTTOM:  pBuffer->pPMBorderWidthBottom   = pProp;    break;
     368           0 :             case CTF_PM_BORDERWIDTHLEFT:    pBuffer->pPMBorderWidthLeft     = pProp;    break;
     369           0 :             case CTF_PM_BORDERWIDTHRIGHT:   pBuffer->pPMBorderWidthRight    = pProp;    break;
     370           0 :             case CTF_PM_PADDINGALL:         pBuffer->pPMPaddingAll          = pProp;    break;
     371           0 :             case CTF_PM_PADDINGTOP:         pBuffer->pPMPaddingTop          = pProp;    break;
     372           0 :             case CTF_PM_PADDINGBOTTOM:      pBuffer->pPMPaddingBottom       = pProp;    break;
     373           0 :             case CTF_PM_PADDINGLEFT:        pBuffer->pPMPaddingLeft         = pProp;    break;
     374           0 :             case CTF_PM_PADDINGRIGHT:       pBuffer->pPMPaddingRight        = pProp;    break;
     375             :         }
     376             : 
     377           0 :         switch( nContextId )
     378             :         {
     379           0 :             case CTF_PM_HEADERHEIGHT:       pPMHeaderHeight     = pProp;    break;
     380           0 :             case CTF_PM_HEADERMINHEIGHT:    pPMHeaderMinHeight  = pProp;    break;
     381           0 :             case CTF_PM_HEADERDYNAMIC:      pPMHeaderDynamic    = pProp;    break;
     382           0 :             case CTF_PM_FOOTERHEIGHT:       pPMFooterHeight     = pProp;    break;
     383           0 :             case CTF_PM_FOOTERMINHEIGHT:    pPMFooterMinHeight  = pProp;    break;
     384           0 :             case CTF_PM_FOOTERDYNAMIC:      pPMFooterDynamic    = pProp;    break;
     385           0 :             case CTF_PM_SCALETO:            pPMScaleTo          = pProp;    break;
     386           0 :             case CTF_PM_SCALETOPAGES:       pPMScaleToPages     = pProp;    break;
     387           0 :             case CTF_PM_SCALETOX:           pPMScaleToX         = pProp;    break;
     388           0 :             case CTF_PM_SCALETOY:           pPMScaleToY         = pProp;    break;
     389           0 :             case CTF_PM_STANDARD_MODE:      pPMStandardMode     = pProp;    break;
     390           0 :             case CTP_PM_GRID_BASE_WIDTH:        pPMGridBaseWidth    = pProp;    break;
     391           0 :             case CTP_PM_GRID_SNAP_TO_CHARS:     pPMGridSnapToChars  = pProp;    break;
     392           0 :             case CTP_PM_GRID_SNAP_TO:       pPMGridSnapTo = pProp;    break;
     393             :         }
     394           0 :         if (nPrintId == CTF_PM_PRINTMASK)
     395             :         {
     396           0 :             pPrint = pProp;
     397           0 :             lcl_RemoveState(pPrint);
     398             :         }
     399             :     }
     400             : 
     401           0 :     if( pPMStandardMode && !getBOOL(pPMStandardMode->maValue) )
     402             :     {
     403           0 :         lcl_RemoveState(pPMStandardMode);
     404           0 :         if( pPMGridBaseWidth )
     405           0 :             lcl_RemoveState(pPMGridBaseWidth);
     406           0 :         if( pPMGridSnapToChars )
     407           0 :             lcl_RemoveState(pPMGridSnapToChars);
     408           0 :         if (pPMGridSnapTo)
     409             :         {
     410           0 :             lcl_RemoveState(pPMGridSnapTo);
     411             :         }
     412             :     }
     413             : 
     414           0 :     if( pPMGridBaseWidth && pPMStandardMode )
     415           0 :         lcl_RemoveState(pPMStandardMode);
     416             : 
     417           0 :     aPageBuffer.ContextFilter( rPropState );
     418           0 :     aHeaderBuffer.ContextFilter( rPropState );
     419           0 :     aFooterBuffer.ContextFilter( rPropState );
     420             : 
     421           0 :     if( pPMHeaderHeight && (!pPMHeaderDynamic || (pPMHeaderDynamic && getBOOL( pPMHeaderDynamic->maValue ))) )
     422           0 :         lcl_RemoveState( pPMHeaderHeight );
     423           0 :     if( pPMHeaderMinHeight && pPMHeaderDynamic && !getBOOL( pPMHeaderDynamic->maValue ) )
     424           0 :         lcl_RemoveState( pPMHeaderMinHeight );
     425           0 :     if( pPMHeaderDynamic )
     426           0 :         lcl_RemoveState( pPMHeaderDynamic );
     427             : 
     428           0 :     if( pPMFooterHeight && (!pPMFooterDynamic || (pPMFooterDynamic && getBOOL( pPMFooterDynamic->maValue ))) )
     429           0 :         lcl_RemoveState( pPMFooterHeight );
     430           0 :     if( pPMFooterMinHeight && pPMFooterDynamic && !getBOOL( pPMFooterDynamic->maValue ) )
     431           0 :         lcl_RemoveState( pPMFooterMinHeight );
     432           0 :     if( pPMFooterDynamic )
     433           0 :         lcl_RemoveState( pPMFooterDynamic );
     434             : 
     435           0 :     if( pPMScaleTo )
     436           0 :         lcl_RemoveStateIfZero16( pPMScaleTo );
     437           0 :     if( pPMScaleToPages )
     438           0 :         lcl_RemoveStateIfZero16( pPMScaleToPages );
     439           0 :     if( pPMScaleToX )
     440           0 :         lcl_RemoveStateIfZero16( pPMScaleToX );
     441           0 :     if( pPMScaleToY )
     442           0 :         lcl_RemoveStateIfZero16( pPMScaleToY );
     443             : 
     444           0 :     if (pPrint)
     445             :     {
     446           0 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_ANNOTATIONS), "PrintAnnotations", rPropSet);
     447           0 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_CHARTS), "PrintCharts", rPropSet);
     448           0 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_DRAWING), "PrintDrawing", rPropSet);
     449           0 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_FORMULAS), "PrintFormulas", rPropSet);
     450           0 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_GRID), "PrintGrid", rPropSet);
     451           0 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_HEADERS), "PrintHeaders", rPropSet);
     452           0 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_OBJECTS), "PrintObjects", rPropSet);
     453           0 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_ZEROVALUES), "PrintZeroValues", rPropSet);
     454             :     }
     455             : 
     456           0 :     SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rPropState, rPropSet);
     457           0 : }
     458             : 
     459             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10