LCOV - code coverage report
Current view: top level - xmloff/source/style - PageMasterExportPropMapper.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 203 227 89.4 %
Date: 2014-04-11 Functions: 13 13 100.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         216 : static inline bool lcl_HasSameLineWidth( const table::BorderLine2& rLine1, const table::BorderLine2& rLine2 )
      36             : {
      37         432 :     return  (rLine1.InnerLineWidth == rLine2.InnerLineWidth) &&
      38         432 :             (rLine1.OuterLineWidth == rLine2.OuterLineWidth) &&
      39         648 :             (rLine1.LineDistance == rLine2.LineDistance) &&
      40         432 :             (rLine1.LineWidth == rLine2.LineWidth);
      41             : }
      42             : 
      43         108 : inline bool operator==( const table::BorderLine2& rLine1, const table::BorderLine2& rLine2 )
      44             : {
      45         216 :     return  (rLine1.Color == rLine2.Color) &&
      46         216 :             lcl_HasSameLineWidth( rLine1, rLine2 ) &&
      47         216 :             ( rLine1.LineStyle == rLine2.LineStyle );
      48             : }
      49             : 
      50         728 : static inline void lcl_RemoveState( XMLPropertyState* pState )
      51             : {
      52         728 :     pState->mnIndex = -1;
      53         728 :     pState->maValue.clear();
      54         728 : }
      55             : 
      56           1 : static void lcl_RemoveStateIfZero16( XMLPropertyState* pState )
      57             : {
      58           1 :     sal_Int16   nValue = sal_Int16();
      59           1 :     if( (pState->maValue >>= nValue) && !nValue )
      60           0 :         lcl_RemoveState( pState );
      61           1 : }
      62             : 
      63           8 : static void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int32 nIndex, const OUString& rProperty, uno::Reference< beans::XPropertySet >& xProps)
      64             : {
      65           8 :     if(::cppu::any2bool(xProps->getPropertyValue(rProperty)))
      66           4 :         rPropState.push_back(XMLPropertyState (nIndex, css::uno::Any(true)));
      67           8 : }
      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         246 : 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         246 :         pPMPaddingRight( NULL )
     125             : {
     126         246 : }
     127             : 
     128         246 : void XMLPropertyStateBuffer::ContextFilter( ::std::vector< XMLPropertyState >& )
     129             : {
     130         246 :     if (pPMMarginAll)
     131             :     {
     132         103 :         lcl_RemoveState(pPMMarginAll); // #i117696# do not write fo:margin
     133             :     }
     134             : 
     135         246 :     if( pPMBorderAll )
     136             :     {
     137          36 :         if( pPMBorderTop && pPMBorderBottom && pPMBorderLeft && pPMBorderRight )
     138             :         {
     139          36 :             table::BorderLine2 aLineTop, aLineBottom, aLineLeft, aLineRight;
     140             : 
     141          36 :             pPMBorderTop->maValue >>= aLineTop;
     142          36 :             pPMBorderBottom->maValue >>= aLineBottom;
     143          36 :             pPMBorderLeft->maValue >>= aLineLeft;
     144          36 :             pPMBorderRight->maValue >>= aLineRight;
     145             : 
     146          36 :             if( (aLineTop == aLineBottom) && (aLineBottom == aLineLeft) && (aLineLeft == aLineRight) )
     147             :             {
     148          36 :                 lcl_RemoveState( pPMBorderTop );
     149          36 :                 lcl_RemoveState( pPMBorderBottom );
     150          36 :                 lcl_RemoveState( pPMBorderLeft );
     151          36 :                 lcl_RemoveState( pPMBorderRight );
     152             :             }
     153             :             else
     154           0 :                 lcl_RemoveState( pPMBorderAll );
     155             :         }
     156             :         else
     157           0 :             lcl_RemoveState( pPMBorderAll );
     158             :     }
     159             : 
     160         246 :     if( pPMBorderWidthAll )
     161             :     {
     162          36 :         if( pPMBorderWidthTop && pPMBorderWidthBottom && pPMBorderWidthLeft && pPMBorderWidthRight )
     163             :         {
     164          36 :             table::BorderLine2 aLineTop, aLineBottom, aLineLeft, aLineRight;
     165             : 
     166          36 :             pPMBorderWidthTop->maValue >>= aLineTop;
     167          36 :             pPMBorderWidthBottom->maValue >>= aLineBottom;
     168          36 :             pPMBorderWidthLeft->maValue >>= aLineLeft;
     169          36 :             pPMBorderWidthRight->maValue >>= aLineRight;
     170             : 
     171         108 :             if( lcl_HasSameLineWidth( aLineTop, aLineBottom ) &&
     172          72 :                 lcl_HasSameLineWidth( aLineBottom, aLineLeft ) &&
     173          36 :                 lcl_HasSameLineWidth( aLineLeft, aLineRight ) )
     174             :             {
     175          36 :                 lcl_RemoveState( pPMBorderWidthTop );
     176          36 :                 lcl_RemoveState( pPMBorderWidthBottom );
     177          36 :                 lcl_RemoveState( pPMBorderWidthLeft );
     178          36 :                 lcl_RemoveState( pPMBorderWidthRight );
     179             :             }
     180             :             else
     181           0 :                 lcl_RemoveState( pPMBorderWidthAll );
     182             :         }
     183             :         else
     184           0 :             lcl_RemoveState( pPMBorderWidthAll );
     185             :     }
     186             : 
     187         246 :     if( pPMPaddingAll )
     188             :     {
     189          36 :         if( pPMPaddingTop && pPMPaddingBottom && pPMPaddingLeft && pPMPaddingRight )
     190             :         {
     191          36 :             sal_Int32 nTop = 0, nBottom = 0, nLeft = 0, nRight = 0;
     192             : 
     193          36 :             pPMPaddingTop->maValue >>= nTop;
     194          36 :             pPMPaddingBottom->maValue >>= nBottom;
     195          36 :             pPMPaddingLeft->maValue >>= nLeft;
     196          36 :             pPMPaddingRight->maValue >>= nRight;
     197             : 
     198          36 :             if( (nTop == nBottom) && (nBottom == nLeft) && (nLeft == nRight) )
     199             :             {
     200          36 :                 lcl_RemoveState( pPMPaddingTop );
     201          36 :                 lcl_RemoveState( pPMPaddingBottom );
     202          36 :                 lcl_RemoveState( pPMPaddingLeft );
     203          36 :                 lcl_RemoveState( pPMPaddingRight );
     204             :             }
     205             :             else
     206           0 :                 lcl_RemoveState( pPMPaddingAll );
     207             :         }
     208             :         else
     209           0 :             lcl_RemoveState( pPMPaddingAll );
     210             :     }
     211         246 : }
     212             : 
     213          39 : XMLPageMasterExportPropMapper::XMLPageMasterExportPropMapper(
     214             :         const UniReference< XMLPropertySetMapper >& rMapper,
     215             :         SvXMLExport& rExport ) :
     216             :     SvXMLExportPropertyMapper( rMapper ),
     217             :     aBackgroundImageExport( rExport ),
     218             :     aTextColumnsExport( rExport ),
     219          39 :     aFootnoteSeparatorExport( rExport )
     220             : {
     221          39 : }
     222             : 
     223          78 : XMLPageMasterExportPropMapper::~XMLPageMasterExportPropMapper()
     224             : {
     225          78 : }
     226             : 
     227          84 : 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          84 :     XMLPageMasterExportPropMapper* pThis = const_cast<XMLPageMasterExportPropMapper*>(this);
     235             : 
     236          84 :     sal_uInt32 nContextId = getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex );
     237          84 :     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          36 :                 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          18 :                     nPos = CTF_PM_HEADERGRAPHICPOSITION;
     254          18 :                     nFilter = CTF_PM_HEADERGRAPHICFILTER;
     255          18 :                     break;
     256             :                 case CTF_PM_FOOTERGRAPHICURL:
     257          18 :                     nPos = CTF_PM_FOOTERGRAPHICPOSITION;
     258          18 :                     nFilter = CTF_PM_FOOTERGRAPHICFILTER;
     259          18 :                     break;
     260             :                 default:
     261           0 :                     nPos = 0;  // TODO What values should this be?
     262           0 :                     nFilter = 0;
     263             :                 }
     264          36 :                 const Any*  pPos    = NULL;
     265          36 :                 const Any*  pFilter = NULL;
     266          36 :                 if( pProperties && (nIdx >= 2) )
     267             :                 {
     268          36 :                     const XMLPropertyState& rPos = (*pProperties)[nIdx - 2];
     269             :                     DBG_ASSERT( getPropertySetMapper()->GetEntryContextId( rPos.mnIndex ) == nPos,
     270             :                                 "invalid property map: pos expected" );
     271          36 :                     if( getPropertySetMapper()->GetEntryContextId( rPos.mnIndex ) == nPos )
     272          36 :                         pPos = &rPos.maValue;
     273             : 
     274          36 :                     const XMLPropertyState& rFilter = (*pProperties)[nIdx - 1];
     275             :                     DBG_ASSERT( getPropertySetMapper()->GetEntryContextId( rFilter.mnIndex ) == nFilter,
     276             :                                 "invalid property map: filter expected" );
     277          36 :                     if( getPropertySetMapper()->GetEntryContextId( rFilter.mnIndex ) == nFilter )
     278          36 :                         pFilter = &rFilter.maValue;
     279             :                 }
     280          36 :                 sal_uInt32 nPropIndex = rProperty.mnIndex;
     281             :                 pThis->aBackgroundImageExport.exportXML( rProperty.maValue, pPos, pFilter, NULL,
     282          36 :                     getPropertySetMapper()->GetEntryNameSpace( nPropIndex ),
     283          72 :                     getPropertySetMapper()->GetEntryXMLName( nPropIndex ) );
     284             :             }
     285          36 :             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          24 :                                                        getPropertySetMapper());
     292          24 :             break;
     293             :     }
     294          84 : }
     295             : 
     296         217 : 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         217 : }
     305             : 
     306          82 : void XMLPageMasterExportPropMapper::ContextFilter(
     307             :         bool bEnableFoFontFamily,
     308             :         ::std::vector< XMLPropertyState >& rPropState,
     309             :         Reference< XPropertySet > rPropSet ) const
     310             : {
     311          82 :     XMLPropertyStateBuffer  aPageBuffer;
     312          82 :     XMLPropertyStateBuffer  aHeaderBuffer;
     313          82 :     XMLPropertyStateBuffer  aFooterBuffer;
     314             : 
     315          82 :     XMLPropertyState*       pPMHeaderHeight     = NULL;
     316          82 :     XMLPropertyState*       pPMHeaderMinHeight  = NULL;
     317          82 :     XMLPropertyState*       pPMHeaderDynamic    = NULL;
     318             : 
     319          82 :     XMLPropertyState*       pPMFooterHeight     = NULL;
     320          82 :     XMLPropertyState*       pPMFooterMinHeight  = NULL;
     321          82 :     XMLPropertyState*       pPMFooterDynamic    = NULL;
     322             : 
     323          82 :     XMLPropertyState*       pPMScaleTo          = NULL;
     324          82 :     XMLPropertyState*       pPMScaleToPages     = NULL;
     325          82 :     XMLPropertyState*       pPMScaleToX         = NULL;
     326          82 :     XMLPropertyState*       pPMScaleToY         = NULL;
     327          82 :     XMLPropertyState*       pPMStandardMode     = NULL;
     328          82 :     XMLPropertyState*       pPMGridBaseWidth    = NULL;
     329             :     // same as pPMGridSnapTo but for backward compatibility only
     330          82 :     XMLPropertyState*       pPMGridSnapToChars  = NULL;
     331          82 :     XMLPropertyState*       pPMGridSnapTo       = NULL;
     332             : 
     333          82 :     XMLPropertyState*       pPrint              = NULL;
     334             : 
     335          82 :     UniReference < XMLPropertySetMapper > aPropMapper(getPropertySetMapper());
     336             : 
     337        2044 :     for( ::std::vector< XMLPropertyState >::iterator aIter = rPropState.begin(); aIter != rPropState.end(); ++aIter )
     338             :     {
     339        1962 :         XMLPropertyState *pProp = &(*aIter);
     340        1962 :         sal_Int16 nContextId    = aPropMapper->GetEntryContextId( pProp->mnIndex );
     341        1962 :         sal_Int16 nFlag         = nContextId & CTF_PM_FLAGMASK;
     342        1962 :         sal_Int16 nSimpleId     = nContextId & (~CTF_PM_FLAGMASK | XML_PM_CTF_START);
     343        1962 :         sal_Int16 nPrintId      = nContextId & CTF_PM_PRINTMASK;
     344             : 
     345             :         XMLPropertyStateBuffer* pBuffer;
     346        1962 :         switch( nFlag )
     347             :         {
     348         627 :             case CTF_PM_HEADERFLAG:         pBuffer = &aHeaderBuffer;   break;
     349         627 :             case CTF_PM_FOOTERFLAG:         pBuffer = &aFooterBuffer;   break;
     350         708 :             default:                        pBuffer = &aPageBuffer;     break;
     351             :         }
     352             : 
     353        1962 :         switch( nSimpleId )
     354             :         {
     355         103 :             case CTF_PM_MARGINALL:          pBuffer->pPMMarginAll           = pProp;    break;
     356          64 :             case CTF_PM_MARGINTOP:          pBuffer->pPMMarginTop           = pProp;    break;
     357          64 :             case CTF_PM_MARGINBOTTOM:       pBuffer->pPMMarginBottom        = pProp;    break;
     358         103 :             case CTF_PM_MARGINLEFT:         pBuffer->pPMMarginLeft          = pProp;    break;
     359         103 :             case CTF_PM_MARGINRIGHT:        pBuffer->pPMMarginRight         = pProp;    break;
     360          36 :             case CTF_PM_BORDERALL:          pBuffer->pPMBorderAll           = pProp;    break;
     361          36 :             case CTF_PM_BORDERTOP:          pBuffer->pPMBorderTop           = pProp;    break;
     362          36 :             case CTF_PM_BORDERBOTTOM:       pBuffer->pPMBorderBottom        = pProp;    break;
     363          36 :             case CTF_PM_BORDERLEFT:         pBuffer->pPMBorderLeft          = pProp;    break;
     364          36 :             case CTF_PM_BORDERRIGHT:        pBuffer->pPMBorderRight         = pProp;    break;
     365          36 :             case CTF_PM_BORDERWIDTHALL:     pBuffer->pPMBorderWidthAll      = pProp;    break;
     366          36 :             case CTF_PM_BORDERWIDTHTOP:     pBuffer->pPMBorderWidthTop      = pProp;    break;
     367          36 :             case CTF_PM_BORDERWIDTHBOTTOM:  pBuffer->pPMBorderWidthBottom   = pProp;    break;
     368          36 :             case CTF_PM_BORDERWIDTHLEFT:    pBuffer->pPMBorderWidthLeft     = pProp;    break;
     369          36 :             case CTF_PM_BORDERWIDTHRIGHT:   pBuffer->pPMBorderWidthRight    = pProp;    break;
     370          36 :             case CTF_PM_PADDINGALL:         pBuffer->pPMPaddingAll          = pProp;    break;
     371          36 :             case CTF_PM_PADDINGTOP:         pBuffer->pPMPaddingTop          = pProp;    break;
     372          36 :             case CTF_PM_PADDINGBOTTOM:      pBuffer->pPMPaddingBottom       = pProp;    break;
     373          36 :             case CTF_PM_PADDINGLEFT:        pBuffer->pPMPaddingLeft         = pProp;    break;
     374          36 :             case CTF_PM_PADDINGRIGHT:       pBuffer->pPMPaddingRight        = pProp;    break;
     375             :         }
     376             : 
     377        1962 :         switch( nContextId )
     378             :         {
     379          39 :             case CTF_PM_HEADERHEIGHT:       pPMHeaderHeight     = pProp;    break;
     380          39 :             case CTF_PM_HEADERMINHEIGHT:    pPMHeaderMinHeight  = pProp;    break;
     381          33 :             case CTF_PM_HEADERDYNAMIC:      pPMHeaderDynamic    = pProp;    break;
     382          39 :             case CTF_PM_FOOTERHEIGHT:       pPMFooterHeight     = pProp;    break;
     383          39 :             case CTF_PM_FOOTERMINHEIGHT:    pPMFooterMinHeight  = pProp;    break;
     384          33 :             case CTF_PM_FOOTERDYNAMIC:      pPMFooterDynamic    = pProp;    break;
     385           1 :             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          33 :             case CTF_PM_STANDARD_MODE:      pPMStandardMode     = pProp;    break;
     390          12 :             case CTP_PM_GRID_BASE_WIDTH:        pPMGridBaseWidth    = pProp;    break;
     391           0 :             case CTP_PM_GRID_SNAP_TO_CHARS:     pPMGridSnapToChars  = pProp;    break;
     392          12 :             case CTP_PM_GRID_SNAP_TO:       pPMGridSnapTo = pProp;    break;
     393             :         }
     394        1962 :         if (nPrintId == CTF_PM_PRINTMASK)
     395             :         {
     396           8 :             pPrint = pProp;
     397           8 :             lcl_RemoveState(pPrint);
     398             :         }
     399             :     }
     400             : 
     401          82 :     if( pPMStandardMode && !getBOOL(pPMStandardMode->maValue) )
     402             :     {
     403          19 :         lcl_RemoveState(pPMStandardMode);
     404          19 :         if( pPMGridBaseWidth )
     405           5 :             lcl_RemoveState(pPMGridBaseWidth);
     406          19 :         if( pPMGridSnapToChars )
     407           0 :             lcl_RemoveState(pPMGridSnapToChars);
     408          19 :         if (pPMGridSnapTo)
     409             :         {
     410           5 :             lcl_RemoveState(pPMGridSnapTo);
     411             :         }
     412             :     }
     413             : 
     414          82 :     if( pPMGridBaseWidth && pPMStandardMode )
     415          12 :         lcl_RemoveState(pPMStandardMode);
     416             : 
     417          82 :     aPageBuffer.ContextFilter( rPropState );
     418          82 :     aHeaderBuffer.ContextFilter( rPropState );
     419          82 :     aFooterBuffer.ContextFilter( rPropState );
     420             : 
     421          82 :     if( pPMHeaderHeight && (!pPMHeaderDynamic || (pPMHeaderDynamic && getBOOL( pPMHeaderDynamic->maValue ))) )
     422          39 :         lcl_RemoveState( pPMHeaderHeight );
     423          82 :     if( pPMHeaderMinHeight && pPMHeaderDynamic && !getBOOL( pPMHeaderDynamic->maValue ) )
     424           0 :         lcl_RemoveState( pPMHeaderMinHeight );
     425          82 :     if( pPMHeaderDynamic )
     426          33 :         lcl_RemoveState( pPMHeaderDynamic );
     427             : 
     428          82 :     if( pPMFooterHeight && (!pPMFooterDynamic || (pPMFooterDynamic && getBOOL( pPMFooterDynamic->maValue ))) )
     429          39 :         lcl_RemoveState( pPMFooterHeight );
     430          82 :     if( pPMFooterMinHeight && pPMFooterDynamic && !getBOOL( pPMFooterDynamic->maValue ) )
     431           0 :         lcl_RemoveState( pPMFooterMinHeight );
     432          82 :     if( pPMFooterDynamic )
     433          33 :         lcl_RemoveState( pPMFooterDynamic );
     434             : 
     435          82 :     if( pPMScaleTo )
     436           1 :         lcl_RemoveStateIfZero16( pPMScaleTo );
     437          82 :     if( pPMScaleToPages )
     438           0 :         lcl_RemoveStateIfZero16( pPMScaleToPages );
     439          82 :     if( pPMScaleToX )
     440           0 :         lcl_RemoveStateIfZero16( pPMScaleToX );
     441          82 :     if( pPMScaleToY )
     442           0 :         lcl_RemoveStateIfZero16( pPMScaleToY );
     443             : 
     444          82 :     if (pPrint)
     445             :     {
     446           1 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_ANNOTATIONS), "PrintAnnotations", rPropSet);
     447           1 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_CHARTS), "PrintCharts", rPropSet);
     448           1 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_DRAWING), "PrintDrawing", rPropSet);
     449           1 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_FORMULAS), "PrintFormulas", rPropSet);
     450           1 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_GRID), "PrintGrid", rPropSet);
     451           1 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_HEADERS), "PrintHeaders", rPropSet);
     452           1 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_OBJECTS), "PrintObjects", rPropSet);
     453           1 :         lcl_AddState(rPropState, aPropMapper->FindEntryIndex(CTF_PM_PRINT_ZEROVALUES), "PrintZeroValues", rPropSet);
     454             :     }
     455             : 
     456          82 :     SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rPropState, rPropSet);
     457          82 : }
     458             : 
     459             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10