LCOV - code coverage report
Current view: top level - xmloff/source/text - txtprhdl.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 315 463 68.0 %
Date: 2014-04-11 Functions: 68 88 77.3 %
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 <tools/debug.hxx>
      21             : #include <rtl/ustrbuf.hxx>
      22             : #include <tools/fontenum.hxx>
      23             : #include <com/sun/star/uno/Any.hxx>
      24             : #include <com/sun/star/drawing/FillStyle.hpp>
      25             : #include <com/sun/star/style/DropCapFormat.hpp>
      26             : #include <com/sun/star/text/FontRelief.hpp>
      27             : #include <com/sun/star/text/WrapTextMode.hpp>
      28             : #include <com/sun/star/text/XTextColumns.hpp>
      29             : #include <com/sun/star/text/TextColumn.hpp>
      30             : #include <com/sun/star/text/RelOrientation.hpp>
      31             : #include <com/sun/star/text/HoriOrientation.hpp>
      32             : #include <com/sun/star/text/VertOrientation.hpp>
      33             : #include <com/sun/star/text/RubyAdjust.hpp>
      34             : #include <com/sun/star/text/FontEmphasis.hpp>
      35             : #include <com/sun/star/text/ParagraphVertAlign.hpp>
      36             : #include <sax/tools/converter.hxx>
      37             : #include <xmloff/xmltypes.hxx>
      38             : #include <xmloff/xmluconv.hxx>
      39             : #include <xmloff/xmltoken.hxx>
      40             : #include "XMLAnchorTypePropHdl.hxx"
      41             : #include <xmloff/XMLConstantsPropertyHandler.hxx>
      42             : #include "XMLClipPropertyHandler.hxx"
      43             : #include "XMLTextColumnsPropertyHandler.hxx"
      44             : #include <xmloff/NamedBoolPropertyHdl.hxx>
      45             : #include "txtprhdl.hxx"
      46             : // OD 2004-05-05 #i28701#
      47             : #include <com/sun/star/text/WrapInfluenceOnPosition.hpp>
      48             : #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
      49             : 
      50             : using namespace ::com::sun::star;
      51             : using namespace ::com::sun::star::uno;
      52             : using namespace ::com::sun::star::style;
      53             : using namespace ::com::sun::star::text;
      54             : using namespace ::xmloff::token;
      55             : //UUUU
      56             : using namespace ::com::sun::star::drawing;
      57             : 
      58             : static SvXMLEnumMapEntry const pXML_HoriPos_Enum[] =
      59             : {
      60             :     { XML_FROM_LEFT,        HoriOrientation::NONE   },
      61             :     { XML_FROM_INSIDE,      HoriOrientation::NONE   },  // import only
      62             :     { XML_LEFT,             HoriOrientation::LEFT   },
      63             :     { XML_INSIDE,           HoriOrientation::LEFT   },  // import only
      64             :     { XML_CENTER,           HoriOrientation::CENTER },
      65             :     { XML_RIGHT,            HoriOrientation::RIGHT  },
      66             :     { XML_OUTSIDE,          HoriOrientation::RIGHT  },  // import only
      67             :     { XML_TOKEN_INVALID, 0 }
      68             : };
      69             : 
      70             : static SvXMLEnumMapEntry const pXML_HoriPosMirrored_Enum[] =
      71             : {
      72             :     { XML_FROM_INSIDE,      HoriOrientation::NONE   },
      73             :     { XML_INSIDE,           HoriOrientation::LEFT   },
      74             :     { XML_CENTER,           HoriOrientation::CENTER },
      75             :     { XML_OUTSIDE,          HoriOrientation::RIGHT  },
      76             :     { XML_TOKEN_INVALID, 0 }
      77             : };
      78             : 
      79             : static SvXMLEnumMapEntry const pXML_HoriRel_Enum[] =
      80             : {
      81             :     { XML_PARAGRAPH,            RelOrientation::FRAME   },
      82             :     { XML_PARAGRAPH_CONTENT,    RelOrientation::PRINT_AREA  },
      83             :     { XML_PAGE,                 RelOrientation::PAGE_FRAME  },
      84             :     { XML_PAGE_CONTENT,         RelOrientation::PAGE_PRINT_AREA },
      85             :     { XML_PARAGRAPH_START_MARGIN,   RelOrientation::FRAME_LEFT  },
      86             :     { XML_PARAGRAPH_END_MARGIN, RelOrientation::FRAME_RIGHT },
      87             :     { XML_PAGE_START_MARGIN,    RelOrientation::PAGE_LEFT   },
      88             :     { XML_PAGE_END_MARGIN,      RelOrientation::PAGE_RIGHT  },
      89             :     { XML_CHAR,                 RelOrientation::CHAR    },
      90             :     { XML_FRAME,                RelOrientation::FRAME   },      // import only
      91             :     { XML_FRAME_CONTENT,        RelOrientation::PRINT_AREA  },  // import only
      92             :     { XML_FRAME_START_MARGIN,   RelOrientation::FRAME_LEFT  },  // import only
      93             :     { XML_FRAME_END_MARGIN,     RelOrientation::FRAME_RIGHT },  // import only
      94             :     { XML_TOKEN_INVALID, 0 }
      95             : };
      96             : 
      97             : static SvXMLEnumMapEntry const pXML_HoriRelFrame_Enum[] =
      98             : {
      99             :     { XML_FRAME,                RelOrientation::FRAME   },
     100             :     { XML_FRAME_CONTENT,        RelOrientation::PRINT_AREA  },
     101             :     { XML_PAGE,                 RelOrientation::PAGE_FRAME  },
     102             :     { XML_PAGE_CONTENT,         RelOrientation::PAGE_PRINT_AREA },
     103             :     { XML_FRAME_START_MARGIN,   RelOrientation::FRAME_LEFT  },
     104             :     { XML_FRAME_END_MARGIN,     RelOrientation::FRAME_RIGHT },
     105             :     { XML_PAGE_START_MARGIN,    RelOrientation::PAGE_LEFT   },
     106             :     { XML_PAGE_END_MARGIN,      RelOrientation::PAGE_RIGHT  },
     107             :     { XML_CHAR,                 RelOrientation::CHAR    },
     108             :     { XML_TOKEN_INVALID, 0 }
     109             : };
     110             : 
     111             : static SvXMLEnumMapEntry const pXML_HoriMirror_Enum[] =
     112             : {
     113             :     { XML_FROM_LEFT,        sal_False   },
     114             :     { XML_FROM_INSIDE,      sal_True    },
     115             :     { XML_LEFT,             sal_False   },
     116             :     { XML_INSIDE,           sal_True    },
     117             :     { XML_CENTER,           sal_False   },
     118             :     { XML_RIGHT,            sal_False   },
     119             :     { XML_OUTSIDE,          sal_True    },
     120             :     { XML_TOKEN_INVALID, 0 }
     121             : };
     122             : 
     123             : static SvXMLEnumMapEntry const pXML_VertPos_Enum[] =
     124             : {
     125             :     { XML_FROM_TOP,         VertOrientation::NONE       },
     126             :     { XML_TOP,              VertOrientation::TOP        },
     127             :     { XML_TOP,              VertOrientation::CHAR_TOP   },  // export only
     128             :     { XML_TOP,              VertOrientation::LINE_TOP   },  // export only
     129             :     { XML_MIDDLE,           VertOrientation::CENTER     },
     130             :     { XML_MIDDLE,           VertOrientation::CHAR_CENTER    },  // export only
     131             :     { XML_MIDDLE,           VertOrientation::LINE_CENTER    },  // export only
     132             :     { XML_BOTTOM,           VertOrientation::BOTTOM     },
     133             :     { XML_BOTTOM,           VertOrientation::CHAR_BOTTOM    },  // export only
     134             :     { XML_BOTTOM,           VertOrientation::LINE_BOTTOM    },  // export only
     135             :     { XML_BELOW,            VertOrientation::CHAR_BOTTOM    },  // import only
     136             :     { XML_TOKEN_INVALID, 0 }
     137             : };
     138             : 
     139             : static SvXMLEnumMapEntry const pXML_VertPosAtChar_Enum[] =
     140             : {
     141             :     { XML_FROM_TOP,         VertOrientation::NONE       },
     142             :     { XML_TOP,              VertOrientation::TOP        },
     143             :     { XML_TOP,              VertOrientation::CHAR_TOP   },  // export only
     144             :     { XML_TOP,              VertOrientation::LINE_TOP   },  // export only
     145             :     { XML_MIDDLE,           VertOrientation::CENTER     },
     146             :     { XML_MIDDLE,           VertOrientation::CHAR_CENTER    },  // export only
     147             :     { XML_MIDDLE,           VertOrientation::LINE_CENTER    },  // export only
     148             :     { XML_BOTTOM,           VertOrientation::BOTTOM     },
     149             :     { XML_BELOW,            VertOrientation::CHAR_BOTTOM    },  // export only
     150             :     { XML_BOTTOM,           VertOrientation::LINE_BOTTOM    },  // export only
     151             :     { XML_TOKEN_INVALID, 0 }
     152             : };
     153             : 
     154             : static SvXMLEnumMapEntry const pXML_VertRel_Enum[] =
     155             : {
     156             :     { XML_PARAGRAPH,            RelOrientation::FRAME   },
     157             :     { XML_PARAGRAPH_CONTENT,    RelOrientation::PRINT_AREA  },
     158             :     { XML_CHAR,                 RelOrientation::CHAR    },
     159             :     // DVO, OD 17.09.2003 #i18732# - allow vertical alignment at page
     160             :     { XML_PAGE,                 RelOrientation::PAGE_FRAME  },
     161             :     { XML_PAGE_CONTENT,         RelOrientation::PAGE_PRINT_AREA },
     162             :     { XML_FRAME,                RelOrientation::FRAME   },      // import only
     163             :     { XML_FRAME_CONTENT,        RelOrientation::PRINT_AREA  },  // import only
     164             :     // OD 13.11.2003 #i22341# - new vertical alignment at top of line
     165             :     { XML_LINE,                 RelOrientation::TEXT_LINE },
     166             :     { XML_TOKEN_INVALID, 0 }
     167             : };
     168             : 
     169             : static SvXMLEnumMapEntry const pXML_VertRelPage_Enum[] =
     170             : {
     171             :     { XML_PAGE,         RelOrientation::FRAME   },
     172             :     { XML_PAGE_CONTENT, RelOrientation::PRINT_AREA  },
     173             :     { XML_PAGE,         RelOrientation::PAGE_FRAME  },
     174             :     { XML_PAGE_CONTENT, RelOrientation::PAGE_PRINT_AREA },
     175             :     { XML_TOKEN_INVALID, 0 }
     176             : };
     177             : 
     178             : static SvXMLEnumMapEntry const pXML_VertRelFrame_Enum[] =
     179             : {
     180             :     { XML_FRAME,            RelOrientation::FRAME   },
     181             :     { XML_FRAME_CONTENT,    RelOrientation::PRINT_AREA  },
     182             :     { XML_TOKEN_INVALID, 0 }
     183             : };
     184             : 
     185             : static SvXMLEnumMapEntry const pXML_VertRelAsChar_Enum[] =
     186             : {
     187             :     { XML_BASELINE,     VertOrientation::TOP        },
     188             :     { XML_BASELINE,     VertOrientation::CENTER     },  // export only
     189             :     { XML_BASELINE,     VertOrientation::BOTTOM     },  // export only
     190             :     { XML_TEXT,         VertOrientation::CHAR_TOP   },
     191             :     { XML_TEXT,         VertOrientation::CHAR_CENTER    },  // export only
     192             :     { XML_TEXT,         VertOrientation::CHAR_BOTTOM    },  // export only
     193             :     { XML_LINE,         VertOrientation::LINE_TOP   },
     194             :     { XML_LINE,         VertOrientation::LINE_CENTER    },  // export only
     195             :     { XML_LINE,         VertOrientation::LINE_BOTTOM    },  // export only
     196             :     { XML_TOKEN_INVALID, 0 }
     197             : };
     198             : 
     199             : static SvXMLEnumMapEntry const pXML_RubyAdjust_Enum[] =
     200             : {
     201             :     { XML_LEFT,                 RubyAdjust_LEFT },
     202             :     { XML_CENTER,               RubyAdjust_CENTER },
     203             :     { XML_RIGHT,                RubyAdjust_RIGHT },
     204             :     { XML_DISTRIBUTE_LETTER,    RubyAdjust_BLOCK },
     205             :     { XML_DISTRIBUTE_SPACE,     RubyAdjust_INDENT_BLOCK },
     206             :     { XML_TOKEN_INVALID, 0 }
     207             : };
     208             : 
     209             : static SvXMLEnumMapEntry const pXML_FontRelief_Enum[] =
     210             : {
     211             :     { XML_NONE,             FontRelief::NONE        },
     212             :     { XML_ENGRAVED,         FontRelief::ENGRAVED    },
     213             :     { XML_EMBOSSED,         FontRelief::EMBOSSED    },
     214             :     { XML_TOKEN_INVALID, 0 }
     215             : };
     216             : 
     217             : static SvXMLEnumMapEntry const pXML_ParaVerticalAlign_Enum[] =
     218             : {
     219             :     { XML_TOP,          ParagraphVertAlign::TOP     },
     220             :     { XML_MIDDLE,       ParagraphVertAlign::CENTER  },
     221             :     { XML_BOTTOM,       ParagraphVertAlign::BOTTOM  },
     222             :     { XML_BASELINE,     ParagraphVertAlign::BASELINE    },
     223             :     { XML_AUTO,         ParagraphVertAlign::AUTOMATIC   },
     224             :     { XML_TOKEN_INVALID, 0 }
     225             : };
     226             : 
     227             : // OD 2004-05-05 #i28701#
     228             : static SvXMLEnumMapEntry const pXML_WrapInfluenceOnPosition_Enum[] =
     229             : {
     230             :     // Tokens have been renamed and <XML_ITERATIVE> has been added (#i35017#)
     231             :     { XML_ONCE_SUCCESSIVE, WrapInfluenceOnPosition::ONCE_SUCCESSIVE },
     232             :     { XML_ONCE_CONCURRENT, WrapInfluenceOnPosition::ONCE_CONCURRENT },
     233             :     { XML_ITERATIVE,       WrapInfluenceOnPosition::ITERATIVE },
     234             :     { XML_TOKEN_INVALID, 0 }
     235             : };
     236             : 
     237             : static SvXMLEnumMapEntry const pXML_VerticalAlign_Enum[] =
     238             : {
     239             :     { XML_TOP,          drawing::TextVerticalAdjust_TOP },
     240             :     { XML_MIDDLE,       drawing::TextVerticalAdjust_CENTER },
     241             :     { XML_BOTTOM,       drawing::TextVerticalAdjust_BOTTOM },
     242             :     { XML_JUSTIFY,      drawing::TextVerticalAdjust_BLOCK },
     243             :     { XML_TOKEN_INVALID, 0 }
     244             : };
     245             : 
     246        4110 : class XMLDropCapPropHdl_Impl : public XMLPropertyHandler
     247             : {
     248             : public:
     249             :     virtual ~XMLDropCapPropHdl_Impl ();
     250             : 
     251             :     virtual bool equals(
     252             :             const ::com::sun::star::uno::Any& r1,
     253             :             const ::com::sun::star::uno::Any& r2 ) const SAL_OVERRIDE;
     254             : 
     255             :     /// TabStops will be imported/exported as XML-Elements. So the Import/Export-work must be done at another place.
     256             :     virtual bool importXML(
     257             :             const OUString& rStrImpValue,
     258             :             ::com::sun::star::uno::Any& rValue,
     259             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     260             :     virtual bool exportXML(
     261             :             OUString& rStrExpValue,
     262             :             const ::com::sun::star::uno::Any& rValue,
     263             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     264             : };
     265             : 
     266        8198 : XMLDropCapPropHdl_Impl::~XMLDropCapPropHdl_Impl ()
     267             : {
     268        8198 : }
     269             : 
     270           2 : bool XMLDropCapPropHdl_Impl::equals(
     271             :         const Any& r1,
     272             :         const Any& r2 ) const
     273             : {
     274           2 :     DropCapFormat aFormat1, aFormat2;
     275           2 :     r1 >>= aFormat1;
     276           2 :     r2 >>= aFormat2;
     277             : 
     278           6 :     return  (aFormat1.Lines <=1 && aFormat2.Lines <=1) ||
     279           4 :             (aFormat1.Lines == aFormat2.Lines &&
     280           4 :              aFormat1.Count == aFormat2.Count &&
     281           4 :              aFormat1.Distance == aFormat2.Distance);
     282             : }
     283             : 
     284           0 : bool XMLDropCapPropHdl_Impl::importXML(
     285             :         const OUString&,
     286             :            Any&,
     287             :         const SvXMLUnitConverter& ) const
     288             : {
     289             :     DBG_ASSERT( !this, "drop caps are an element import property" );
     290           0 :     return false;
     291             : }
     292             : 
     293           0 : bool XMLDropCapPropHdl_Impl::exportXML(
     294             :         OUString&,
     295             :         const Any&,
     296             :         const SvXMLUnitConverter& ) const
     297             : {
     298             :     DBG_ASSERT( !this, "drop caps are an element export property" );
     299           0 :     return false;
     300             : }
     301             : 
     302        2482 : class XMLOpaquePropHdl_Impl : public XMLPropertyHandler
     303             : {
     304             : public:
     305             :     virtual ~XMLOpaquePropHdl_Impl ();
     306             : 
     307             :     virtual bool importXML(
     308             :             const OUString& rStrImpValue,
     309             :             ::com::sun::star::uno::Any& rValue,
     310             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     311             :     virtual bool exportXML(
     312             :             OUString& rStrExpValue,
     313             :             const ::com::sun::star::uno::Any& rValue,
     314             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     315             : };
     316             : 
     317         169 : bool XMLOpaquePropHdl_Impl::importXML(
     318             :         const OUString& rStrImpValue,
     319             :            Any& rValue,
     320             :         const SvXMLUnitConverter& ) const
     321             : {
     322         169 :     bool bRet = true;
     323         169 :     sal_Bool bVal = sal_False;
     324         169 :     if( IsXMLToken( rStrImpValue, XML_FOREGROUND ) )
     325          46 :         bVal = sal_True;
     326         123 :     else if( !IsXMLToken( rStrImpValue, XML_BACKGROUND ) )
     327           0 :         bRet = false;
     328             : 
     329         169 :     if( bRet )
     330         169 :         rValue.setValue( &bVal, ::getBooleanCppuType() );
     331             : 
     332         169 :     return bRet;
     333             : }
     334             : 
     335           8 : bool XMLOpaquePropHdl_Impl::exportXML(
     336             :         OUString& rStrExpValue,
     337             :         const Any& rValue,
     338             :         const SvXMLUnitConverter& ) const
     339             : {
     340           8 :     if( *(sal_Bool *)rValue.getValue() )
     341           8 :            rStrExpValue = GetXMLToken( XML_FOREGROUND );
     342             :     else
     343           0 :            rStrExpValue = GetXMLToken( XML_BACKGROUND );
     344             : 
     345           8 :     return true;
     346             : }
     347             : 
     348        4960 : XMLOpaquePropHdl_Impl::~XMLOpaquePropHdl_Impl ()
     349             : {
     350        4960 : }
     351             : 
     352        2482 : class XMLContourModePropHdl_Impl : public XMLPropertyHandler
     353             : {
     354             : public:
     355             :     virtual ~XMLContourModePropHdl_Impl ();
     356             : 
     357             :     virtual bool importXML(
     358             :             const OUString& rStrImpValue,
     359             :             ::com::sun::star::uno::Any& rValue,
     360             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     361             :     virtual bool exportXML(
     362             :             OUString& rStrExpValue,
     363             :             const ::com::sun::star::uno::Any& rValue,
     364             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     365             : };
     366             : 
     367           0 : bool XMLContourModePropHdl_Impl::importXML(
     368             :         const OUString& rStrImpValue,
     369             :            Any& rValue,
     370             :         const SvXMLUnitConverter& ) const
     371             : {
     372           0 :     bool bRet = true;
     373           0 :     sal_Bool bVal = sal_False;
     374           0 :     if( IsXMLToken( rStrImpValue, XML_OUTSIDE ) )
     375           0 :         bVal = sal_True;
     376           0 :     else if( ! IsXMLToken( rStrImpValue, XML_FULL ) )
     377           0 :         bRet = false;
     378             : 
     379           0 :     if( bRet )
     380           0 :         rValue.setValue( &bVal, ::getBooleanCppuType() );
     381             : 
     382           0 :     return bRet;
     383             : }
     384             : 
     385           0 : bool XMLContourModePropHdl_Impl::exportXML(
     386             :         OUString& rStrExpValue,
     387             :         const Any& rValue,
     388             :         const SvXMLUnitConverter& ) const
     389             : {
     390           0 :     if( *(sal_Bool *)rValue.getValue() )
     391           0 :            rStrExpValue = GetXMLToken( XML_OUTSIDE );
     392             :     else
     393           0 :            rStrExpValue = GetXMLToken( XML_FULL );
     394             : 
     395           0 :     return true;
     396             : }
     397             : 
     398        4960 : XMLContourModePropHdl_Impl::~XMLContourModePropHdl_Impl()
     399             : {
     400        4960 : }
     401             : 
     402        2482 : class XMLParagraphOnlyPropHdl_Impl : public XMLPropertyHandler
     403             : {
     404             : public:
     405             :     virtual ~XMLParagraphOnlyPropHdl_Impl ();
     406             : 
     407             :     virtual bool importXML(
     408             :             const OUString& rStrImpValue,
     409             :             ::com::sun::star::uno::Any& rValue,
     410             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     411             :     virtual bool exportXML(
     412             :             OUString& rStrExpValue,
     413             :             const ::com::sun::star::uno::Any& rValue,
     414             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     415             : };
     416             : 
     417          84 : bool XMLParagraphOnlyPropHdl_Impl::importXML(
     418             :         const OUString& rStrImpValue,
     419             :            Any& rValue,
     420             :         const SvXMLUnitConverter& ) const
     421             : {
     422          84 :     bool bRet = true;
     423          84 :     sal_Bool bVal = sal_False;
     424             : 
     425          84 :     if( ! IsXMLToken( rStrImpValue, XML_NO_LIMIT ) )
     426             :     {
     427           0 :         sal_Int32 nValue = 0;
     428           0 :         bRet = ::sax::Converter::convertNumber( nValue, rStrImpValue );
     429           0 :         bVal = 1 == nValue;
     430             :     }
     431             : 
     432          84 :     if( bRet )
     433          84 :         rValue.setValue( &bVal, ::getBooleanCppuType() );
     434             : 
     435          84 :     return bRet;
     436             : }
     437             : 
     438          19 : bool XMLParagraphOnlyPropHdl_Impl::exportXML(
     439             :         OUString& rStrExpValue,
     440             :         const Any& rValue,
     441             :         const SvXMLUnitConverter& ) const
     442             : {
     443          19 :     if( *(sal_Bool *)rValue.getValue() )
     444           0 :            rStrExpValue = GetXMLToken( XML_1 );
     445             :     else
     446          19 :            rStrExpValue = GetXMLToken( XML_NO_LIMIT );
     447             : 
     448          19 :     return true;
     449             : }
     450             : 
     451        4960 : XMLParagraphOnlyPropHdl_Impl::~XMLParagraphOnlyPropHdl_Impl()
     452             : {
     453        4960 : }
     454             : 
     455             : SvXMLEnumMapEntry const pXML_Wrap_Enum[] =
     456             : {
     457             :     { XML_NONE,         WrapTextMode_NONE },
     458             :     { XML_RUN_THROUGH,  WrapTextMode_THROUGHT },
     459             :     { XML_PARALLEL,     WrapTextMode_PARALLEL },
     460             :     { XML_DYNAMIC,      WrapTextMode_DYNAMIC },
     461             :     { XML_LEFT,         WrapTextMode_LEFT },
     462             :     { XML_RIGHT,        WrapTextMode_RIGHT },
     463             :     { XML_TOKEN_INVALID, 0 }
     464             : };
     465             : 
     466        2482 : class XMLWrapPropHdl_Impl : public XMLPropertyHandler
     467             : {
     468             : public:
     469             :     virtual ~XMLWrapPropHdl_Impl ();
     470             : 
     471             :     virtual bool importXML(
     472             :             const OUString& rStrImpValue,
     473             :             ::com::sun::star::uno::Any& rValue,
     474             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     475             :     virtual bool exportXML(
     476             :             OUString& rStrExpValue,
     477             :             const ::com::sun::star::uno::Any& rValue,
     478             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     479             : };
     480             : 
     481         256 : bool XMLWrapPropHdl_Impl::importXML(
     482             :         const OUString& rStrImpValue,
     483             :            Any& rValue,
     484             :         const SvXMLUnitConverter& ) const
     485             : {
     486             :     sal_uInt16 nWrap;
     487             :     bool bRet = SvXMLUnitConverter::convertEnum( nWrap, rStrImpValue,
     488         256 :                                                 pXML_Wrap_Enum );
     489             : 
     490         256 :     if( bRet )
     491         256 :         rValue <<= (WrapTextMode)nWrap;
     492             : 
     493         256 :     return bRet;
     494             : }
     495             : 
     496          19 : bool XMLWrapPropHdl_Impl::exportXML(
     497             :         OUString& rStrExpValue,
     498             :         const Any& rValue,
     499             :         const SvXMLUnitConverter& ) const
     500             : {
     501          19 :     OUStringBuffer aOut;
     502             :     WrapTextMode eVal;
     503             : 
     504          19 :     rValue >>= eVal;
     505             : 
     506          19 :     bool bRet = SvXMLUnitConverter::convertEnum( aOut, eVal, pXML_Wrap_Enum, XML_NONE );
     507             : 
     508          19 :     rStrExpValue = aOut.makeStringAndClear();
     509             : 
     510          19 :     return bRet;
     511             : }
     512             : 
     513        4960 : XMLWrapPropHdl_Impl::~XMLWrapPropHdl_Impl ()
     514             : {
     515        4960 : }
     516             : 
     517             : class XMLFrameProtectPropHdl_Impl : public XMLPropertyHandler
     518             : {
     519             :     const OUString sVal;
     520             : public:
     521        7320 :     XMLFrameProtectPropHdl_Impl( enum XMLTokenEnum eVal ) :
     522        7320 :            sVal( GetXMLToken(eVal) ) {}
     523             :     virtual ~XMLFrameProtectPropHdl_Impl ();
     524             : 
     525             :     virtual bool importXML(
     526             :             const OUString& rStrImpValue,
     527             :             ::com::sun::star::uno::Any& rValue,
     528             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     529             :     virtual bool exportXML(
     530             :             OUString& rStrExpValue,
     531             :             const ::com::sun::star::uno::Any& rValue,
     532             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     533             : };
     534             : 
     535           0 : bool XMLFrameProtectPropHdl_Impl::importXML(
     536             :         const OUString& rStrImpValue,
     537             :            Any& rValue,
     538             :         const SvXMLUnitConverter& ) const
     539             : {
     540           0 :     bool bRet = true;
     541           0 :     sal_Bool bVal = sal_False;
     542           0 :     if( ! IsXMLToken( rStrImpValue, XML_NONE ) )
     543             :     {
     544           0 :         bRet = false;
     545           0 :         SvXMLTokenEnumerator aTokenEnum( rStrImpValue );
     546           0 :         OUString aToken;
     547           0 :         while( aTokenEnum.getNextToken( aToken ) )
     548             :         {
     549           0 :             bRet = true;
     550           0 :             if( aToken == sVal )
     551             :             {
     552           0 :                 bVal = sal_True;
     553           0 :                 break;
     554             :             }
     555           0 :         }
     556             :     }
     557             : 
     558           0 :     if( bRet )
     559           0 :         rValue.setValue( &bVal, ::getBooleanCppuType() );
     560             : 
     561           0 :     return bRet;
     562             : }
     563             : 
     564           0 : bool XMLFrameProtectPropHdl_Impl::exportXML(
     565             :         OUString& rStrExpValue,
     566             :         const Any& rValue,
     567             :         const SvXMLUnitConverter& ) const
     568             : {
     569           0 :     if( *(sal_Bool *)rValue.getValue() )
     570             :     {
     571           0 :         if( rStrExpValue.isEmpty() ||
     572           0 :             IsXMLToken( rStrExpValue, XML_NONE ) )
     573             :         {
     574           0 :                rStrExpValue = sVal;
     575             :         }
     576             :         else
     577             :         {
     578           0 :             rStrExpValue = rStrExpValue + " " + sVal;
     579             :         }
     580             :     }
     581           0 :     else if( rStrExpValue.isEmpty() )
     582             :     {
     583           0 :            rStrExpValue = GetXMLToken( XML_NONE );
     584             :     }
     585             : 
     586           0 :     return true;
     587             : }
     588             : 
     589       14628 : XMLFrameProtectPropHdl_Impl::~XMLFrameProtectPropHdl_Impl()
     590             : {
     591       14628 : }
     592             : 
     593             : SvXMLEnumMapEntry const pXML_Anchor_Enum[] =
     594             : {
     595             :     { XML_CHAR,         TextContentAnchorType_AT_CHARACTER },
     596             :     { XML_PAGE,         TextContentAnchorType_AT_PAGE },
     597             :     { XML_FRAME,        TextContentAnchorType_AT_FRAME },
     598             :     { XML_PARAGRAPH,        TextContentAnchorType_AT_PARAGRAPH },
     599             :     { XML_AS_CHAR,      TextContentAnchorType_AS_CHARACTER },
     600             :     { XML_TOKEN_INVALID, 0 }
     601             : };
     602             : 
     603         217 : bool XMLAnchorTypePropHdl::importXML(
     604             :         const OUString& rStrImpValue,
     605             :            Any& rValue,
     606             :         const SvXMLUnitConverter& ) const
     607             : {
     608             :     sal_uInt16 nAnchor;
     609             :     bool bRet = SvXMLUnitConverter::convertEnum( nAnchor, rStrImpValue,
     610         217 :                                                 pXML_Anchor_Enum );
     611             : 
     612         217 :     if( bRet )
     613         217 :         rValue <<= (TextContentAnchorType)nAnchor;
     614             : 
     615         217 :     return bRet;
     616             : }
     617             : 
     618          28 : bool XMLAnchorTypePropHdl::exportXML(
     619             :         OUString& rStrExpValue,
     620             :         const Any& rValue,
     621             :         const SvXMLUnitConverter& ) const
     622             : {
     623          28 :     OUStringBuffer aOut;
     624             :     TextContentAnchorType eVal;
     625             : 
     626          28 :     rValue >>= eVal;
     627             : 
     628          28 :     bool bRet = SvXMLUnitConverter::convertEnum( aOut, eVal, pXML_Anchor_Enum, XML_PARAGRAPH );
     629             : 
     630          28 :     rStrExpValue = aOut.makeStringAndClear();
     631             : 
     632          28 :     return bRet;
     633             : }
     634             : 
     635        3569 : XMLAnchorTypePropHdl::~XMLAnchorTypePropHdl()
     636             : {
     637        3569 : }
     638             : 
     639         345 : bool XMLAnchorTypePropHdl::convert( const OUString& rStrImpValue,
     640             :                  TextContentAnchorType& rType )
     641             : {
     642             :     sal_uInt16 nAnchor;
     643             :     bool bRet = SvXMLUnitConverter::convertEnum( nAnchor, rStrImpValue,
     644         345 :                                                 pXML_Anchor_Enum );
     645         345 :     if( bRet )
     646         345 :         rType = (TextContentAnchorType)nAnchor;
     647         345 :     return bRet;
     648             : }
     649             : 
     650        8550 : XMLTextColumnsPropertyHandler::~XMLTextColumnsPropertyHandler ()
     651             : {
     652        8550 : }
     653             : 
     654          75 : bool XMLTextColumnsPropertyHandler::equals(
     655             :         const Any& r1,
     656             :         const Any& r2 ) const
     657             : {
     658          75 :     Reference < XTextColumns > xColumns1;
     659          75 :     r1 >>= xColumns1;
     660             : 
     661         150 :     Reference < XTextColumns > xColumns2;
     662          75 :     r2 >>= xColumns2;
     663             : 
     664         104 :     if( xColumns1->getColumnCount() != xColumns2->getColumnCount() ||
     665          29 :           xColumns1->getReferenceValue() != xColumns2->getReferenceValue() )
     666          46 :         return false;
     667             : 
     668          58 :     Sequence < TextColumn > aColumns1 = xColumns1->getColumns();
     669          58 :     Sequence < TextColumn > aColumns2 = xColumns2->getColumns();
     670          29 :     sal_Int32 nCount = aColumns1.getLength();
     671          29 :     if( aColumns2.getLength() != nCount )
     672           0 :         return false;
     673             : 
     674          29 :     const TextColumn *pColumns1 = aColumns1.getArray();
     675          29 :     const TextColumn *pColumns2 = aColumns2.getArray();
     676             : 
     677          64 :     while( nCount-- )
     678             :     {
     679          12 :         if( pColumns1->Width != pColumns2->Width ||
     680          12 :              pColumns1->LeftMargin != pColumns2->LeftMargin ||
     681           6 :              pColumns1->RightMargin != pColumns2->RightMargin )
     682           0 :             return false;
     683             : 
     684           6 :         pColumns1++;
     685           6 :         pColumns2++;
     686             :     }
     687             : 
     688         104 :     return true;
     689             : }
     690             : 
     691           0 : bool XMLTextColumnsPropertyHandler::importXML(
     692             :         const OUString&,
     693             :            Any&,
     694             :         const SvXMLUnitConverter& ) const
     695             : {
     696             :     DBG_ASSERT( !this, "columns are an element import property" );
     697           0 :     return false;
     698             : }
     699             : 
     700           0 : bool XMLTextColumnsPropertyHandler::exportXML(
     701             :         OUString&,
     702             :         const Any&,
     703             :         const SvXMLUnitConverter& ) const
     704             : {
     705             :     DBG_ASSERT( !this, "columns are an element export property" );
     706           0 :     return false;
     707             : }
     708             : 
     709        2482 : class XMLHoriMirrorPropHdl_Impl : public XMLPropertyHandler
     710             : {
     711             : public:
     712             :     virtual ~XMLHoriMirrorPropHdl_Impl ();
     713             : 
     714             :     virtual bool importXML(
     715             :             const OUString& rStrImpValue,
     716             :             ::com::sun::star::uno::Any& rValue,
     717             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     718             :     virtual bool exportXML(
     719             :             OUString& rStrExpValue,
     720             :             const ::com::sun::star::uno::Any& rValue,
     721             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     722             : };
     723             : 
     724         278 : bool XMLHoriMirrorPropHdl_Impl::importXML(
     725             :         const OUString& rStrImpValue,
     726             :            Any& rValue,
     727             :         const SvXMLUnitConverter& ) const
     728             : {
     729             :     sal_uInt16 nHoriMirror;
     730             :     bool bRet = SvXMLUnitConverter::convertEnum( nHoriMirror, rStrImpValue,
     731         278 :                                                 pXML_HoriMirror_Enum );
     732             : 
     733         278 :     if( bRet )
     734             :     {
     735         278 :         sal_Bool bTmp = nHoriMirror != 0;
     736         278 :         rValue.setValue( &bTmp, ::getBooleanCppuType() );
     737             :     }
     738             : 
     739         278 :     return bRet;
     740             : }
     741             : 
     742           0 : bool XMLHoriMirrorPropHdl_Impl::exportXML(
     743             :         OUString&,
     744             :         const Any&,
     745             :         const SvXMLUnitConverter& ) const
     746             : {
     747             :     DBG_ASSERT( !this, "HorMirror properyt shouldn't be exported" );
     748             : 
     749           0 :     return false;
     750             : }
     751             : 
     752        4960 : XMLHoriMirrorPropHdl_Impl::~XMLHoriMirrorPropHdl_Impl ()
     753             : {
     754        4960 : }
     755             : 
     756             : class XMLGrfMirrorPropHdl_Impl : public XMLPropertyHandler
     757             : {
     758             :     const OUString sVal;
     759             :     bool bHori;
     760             : 
     761             : public:
     762        7320 :     XMLGrfMirrorPropHdl_Impl( enum XMLTokenEnum eVal, bool bH ) :
     763        7320 :            sVal( GetXMLToken( eVal ) ),
     764       14640 :         bHori( bH ) {}
     765             :     virtual ~XMLGrfMirrorPropHdl_Impl ();
     766             : 
     767             :     virtual bool importXML(
     768             :             const OUString& rStrImpValue,
     769             :             ::com::sun::star::uno::Any& rValue,
     770             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     771             :     virtual bool exportXML(
     772             :             OUString& rStrExpValue,
     773             :             const ::com::sun::star::uno::Any& rValue,
     774             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     775             : };
     776             : 
     777          33 : bool XMLGrfMirrorPropHdl_Impl::importXML(
     778             :         const OUString& rStrImpValue,
     779             :            Any& rValue,
     780             :         const SvXMLUnitConverter& ) const
     781             : {
     782          33 :     bool bRet = true;
     783          33 :     sal_Bool bVal = sal_False;
     784          33 :     if( ! IsXMLToken( rStrImpValue, XML_NONE ) )
     785             :     {
     786           0 :         bRet = false;
     787           0 :         SvXMLTokenEnumerator aTokenEnum( rStrImpValue );
     788           0 :         OUString aToken;
     789           0 :         while( aTokenEnum.getNextToken( aToken ) )
     790             :         {
     791           0 :             bRet = true;
     792           0 :             if( aToken == sVal ||
     793           0 :                  (bHori && IsXMLToken( aToken, XML_HORIZONTAL ) ) )
     794             :             {
     795           0 :                 bVal = sal_True;
     796           0 :                 break;
     797             :             }
     798           0 :         }
     799             :     }
     800             : 
     801          33 :     if( bRet )
     802          33 :         rValue.setValue( &bVal, ::getBooleanCppuType() );
     803             : 
     804          33 :     return bRet;
     805             : }
     806             : 
     807           3 : bool XMLGrfMirrorPropHdl_Impl::exportXML(
     808             :         OUString& rStrExpValue,
     809             :         const Any& rValue,
     810             :         const SvXMLUnitConverter& ) const
     811             : {
     812           3 :     if( *(sal_Bool *)rValue.getValue() )
     813             :     {
     814           0 :         if( rStrExpValue.isEmpty() ||
     815           0 :             IsXMLToken( rStrExpValue, XML_NONE ) )
     816             :         {
     817           0 :                rStrExpValue = sVal;
     818             :         }
     819           0 :         else if( bHori &&
     820             :                  /* XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES
     821             :                     are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD.
     822             :                     (#i49139#)
     823             :                  */
     824           0 :                  ( IsXMLToken( rStrExpValue, XML_HORIZONTAL_ON_EVEN ) ||
     825           0 :                    IsXMLToken( rStrExpValue, XML_HORIZONTAL_ON_ODD ) ))
     826             :         {
     827           0 :             rStrExpValue = GetXMLToken( XML_HORIZONTAL );
     828             :         }
     829             :         else
     830             :         {
     831           0 :             rStrExpValue = rStrExpValue + " " + sVal;
     832             :         }
     833             :     }
     834           3 :     else if( rStrExpValue.isEmpty() )
     835             :     {
     836           1 :            rStrExpValue = GetXMLToken( XML_NONE );
     837             :     }
     838             : 
     839           3 :     return true;
     840             : }
     841             : 
     842       14628 : XMLGrfMirrorPropHdl_Impl::~XMLGrfMirrorPropHdl_Impl()
     843             : {
     844       14628 : }
     845             : 
     846             : SvXMLEnumMapEntry const pXML_Emphasize_Enum[] =
     847             : {
     848             :     { XML_NONE,     FontEmphasis::NONE },
     849             :     { XML_DOT,      FontEmphasis::DOT_ABOVE },
     850             :     { XML_CIRCLE,   FontEmphasis::CIRCLE_ABOVE },
     851             :     { XML_DISC,     FontEmphasis::DISK_ABOVE },
     852             :     { XML_ACCENT,   FontEmphasis::ACCENT_ABOVE },
     853             :     { XML_TOKEN_INVALID, 0 }
     854             : };
     855             : class XMLTextEmphasizePropHdl_Impl : public XMLPropertyHandler
     856             : {
     857             : public:
     858        5642 :     XMLTextEmphasizePropHdl_Impl() {}
     859             :     virtual ~XMLTextEmphasizePropHdl_Impl();
     860             : 
     861             :     virtual bool importXML(
     862             :             const OUString& rStrImpValue,
     863             :             ::com::sun::star::uno::Any& rValue,
     864             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     865             :     virtual bool exportXML(
     866             :             OUString& rStrExpValue,
     867             :             const ::com::sun::star::uno::Any& rValue,
     868             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     869             : };
     870             : 
     871         141 : bool XMLTextEmphasizePropHdl_Impl::importXML(
     872             :         const OUString& rStrImpValue,
     873             :            Any& rValue,
     874             :         const SvXMLUnitConverter& ) const
     875             : {
     876         141 :     bool bRet = true;
     877         141 :     sal_uInt16 nVal = FontEmphasis::NONE;
     878         141 :     bool bBelow = false;
     879         141 :     bool bHasPos = false, bHasType = false;
     880         141 :     OUString aToken;
     881             : 
     882         141 :     SvXMLTokenEnumerator aTokenEnum( rStrImpValue );
     883         423 :     while( aTokenEnum.getNextToken( aToken ) )
     884             :     {
     885         141 :         if( !bHasPos && IsXMLToken( aToken, XML_ABOVE ) )
     886             :         {
     887           0 :             bBelow = false;
     888           0 :             bHasPos = true;
     889             :         }
     890         141 :         else if( !bHasPos && IsXMLToken( aToken, XML_BELOW ) )
     891             :         {
     892           0 :             bBelow = true;
     893           0 :             bHasPos = true;
     894             :         }
     895         282 :         else if( !bHasType &&
     896             :                   SvXMLUnitConverter::convertEnum( nVal, aToken,
     897         141 :                                              pXML_Emphasize_Enum ))
     898             :         {
     899         141 :             bHasType = true;
     900             :         }
     901             :         else
     902             :         {
     903           0 :             bRet = false;
     904           0 :             break;
     905             :         }
     906             :     }
     907             : 
     908         141 :     if( bRet )
     909             :     {
     910         141 :         if( FontEmphasis::NONE != nVal && bBelow )
     911           0 :             nVal += 10;
     912         141 :         rValue <<= (sal_Int16)nVal;
     913             :     }
     914             : 
     915         141 :     return bRet;
     916             : }
     917             : 
     918          37 : bool XMLTextEmphasizePropHdl_Impl::exportXML(
     919             :         OUString& rStrExpValue,
     920             :         const Any& rValue,
     921             :         const SvXMLUnitConverter& ) const
     922             : {
     923          37 :     OUStringBuffer aOut( 15 );
     924          37 :     bool bRet = true;
     925          37 :     sal_Int16 nType = sal_Int16();
     926          37 :     if( rValue >>= nType )
     927             :     {
     928          37 :         bool bBelow = false;
     929          37 :         if( nType > 10 )
     930             :         {
     931           0 :             bBelow = true;
     932           0 :             nType -= 10;
     933             :         }
     934             :         bRet = SvXMLUnitConverter::convertEnum( aOut, nType,
     935             :                                            pXML_Emphasize_Enum,
     936          37 :                                            XML_DOT );
     937          37 :         if( bRet )
     938             :         {
     939          37 :             if( nType != 0 )
     940             :             {
     941           0 :                 enum XMLTokenEnum ePos = bBelow ? XML_BELOW : XML_ABOVE;
     942           0 :                 aOut.append( ' ' );
     943           0 :                 aOut.append( GetXMLToken(ePos) );
     944             :             }
     945          37 :             rStrExpValue = aOut.makeStringAndClear();
     946             :         }
     947             :     }
     948             : 
     949          37 :     return bRet;
     950             : }
     951             : 
     952       11262 : XMLTextEmphasizePropHdl_Impl::~XMLTextEmphasizePropHdl_Impl()
     953             : {
     954       11262 : }
     955             : 
     956             : class XMLTextCombineCharPropHdl_Impl : public XMLPropertyHandler
     957             : {
     958             : public:
     959        5642 :     XMLTextCombineCharPropHdl_Impl() {}
     960             :     virtual ~XMLTextCombineCharPropHdl_Impl();
     961             : 
     962             :     virtual bool importXML(
     963             :             const OUString& rStrImpValue,
     964             :             ::com::sun::star::uno::Any& rValue,
     965             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     966             :     virtual bool exportXML(
     967             :             OUString& rStrExpValue,
     968             :             const ::com::sun::star::uno::Any& rValue,
     969             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
     970             : };
     971             : 
     972           0 : bool XMLTextCombineCharPropHdl_Impl::importXML(
     973             :         const OUString& rStrImpValue,
     974             :            Any& rValue,
     975             :         const SvXMLUnitConverter& ) const
     976             : {
     977           0 :     if( !rStrImpValue.isEmpty() )
     978           0 :         rValue <<= rStrImpValue.copy( 0, 1 );
     979             :     else
     980           0 :         rValue <<= rStrImpValue;
     981             : 
     982           0 :     return true;
     983             : }
     984             : 
     985           0 : bool XMLTextCombineCharPropHdl_Impl::exportXML(
     986             :         OUString& rStrExpValue,
     987             :         const Any& rValue,
     988             :         const SvXMLUnitConverter& ) const
     989             : {
     990           0 :     rValue >>= rStrExpValue;
     991             : 
     992             :     // #i114107# attribute of type "character": export only if length is 1
     993           0 :     return (1 == rStrExpValue.getLength());
     994             : }
     995             : 
     996       11262 : XMLTextCombineCharPropHdl_Impl::~XMLTextCombineCharPropHdl_Impl()
     997             : {
     998       11262 : }
     999             : 
    1000             : class XMLTextRelWidthHeightPropHdl_Impl : public XMLPropertyHandler
    1001             : {
    1002             : public:
    1003        1778 :     XMLTextRelWidthHeightPropHdl_Impl() {}
    1004             :     virtual ~XMLTextRelWidthHeightPropHdl_Impl();
    1005             : 
    1006             :     virtual bool importXML(
    1007             :             const OUString& rStrImpValue,
    1008             :             ::com::sun::star::uno::Any& rValue,
    1009             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
    1010             :     virtual bool exportXML(
    1011             :             OUString& rStrExpValue,
    1012             :             const ::com::sun::star::uno::Any& rValue,
    1013             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
    1014             : };
    1015             : 
    1016          29 : bool XMLTextRelWidthHeightPropHdl_Impl::importXML(
    1017             :         const OUString& rStrImpValue,
    1018             :            Any& rValue,
    1019             :         const SvXMLUnitConverter& ) const
    1020             : {
    1021             :     sal_Int32 nValue;
    1022          29 :     bool const bRet = ::sax::Converter::convertPercent( nValue, rStrImpValue );
    1023          29 :     if( bRet )
    1024           0 :         rValue <<= (sal_Int16)nValue;
    1025             : 
    1026          29 :     return bRet;
    1027             : }
    1028             : 
    1029           0 : bool XMLTextRelWidthHeightPropHdl_Impl::exportXML(
    1030             :         OUString& rStrExpValue,
    1031             :         const Any& rValue,
    1032             :         const SvXMLUnitConverter& ) const
    1033             : {
    1034           0 :     bool bRet = false;
    1035           0 :     sal_Int16 nValue = sal_Int16();
    1036           0 :     if( (rValue >>= nValue) && nValue > 0 )
    1037             :     {
    1038           0 :         OUStringBuffer aOut;
    1039           0 :         ::sax::Converter::convertPercent( aOut, nValue );
    1040           0 :         rStrExpValue = aOut.makeStringAndClear();
    1041             : 
    1042           0 :         bRet = true;
    1043             :     }
    1044             : 
    1045           0 :     return bRet;
    1046             : }
    1047             : 
    1048        3552 : XMLTextRelWidthHeightPropHdl_Impl::~XMLTextRelWidthHeightPropHdl_Impl()
    1049             : {
    1050        3552 : }
    1051             : 
    1052             : class XMLTextSyncWidthHeightPropHdl_Impl : public XMLPropertyHandler
    1053             : {
    1054             :     const OUString sValue;
    1055             : 
    1056             : public:
    1057           0 :     XMLTextSyncWidthHeightPropHdl_Impl( enum XMLTokenEnum eValue ) :
    1058           0 :            sValue( GetXMLToken(eValue) )    {}
    1059             :     virtual ~XMLTextSyncWidthHeightPropHdl_Impl();
    1060             : 
    1061             :     virtual bool importXML(
    1062             :             const OUString& rStrImpValue,
    1063             :             ::com::sun::star::uno::Any& rValue,
    1064             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
    1065             :     virtual bool exportXML(
    1066             :             OUString& rStrExpValue,
    1067             :             const ::com::sun::star::uno::Any& rValue,
    1068             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
    1069             : };
    1070             : 
    1071           0 : bool XMLTextSyncWidthHeightPropHdl_Impl::importXML(
    1072             :         const OUString& rStrImpValue,
    1073             :            Any& rValue,
    1074             :         const SvXMLUnitConverter& ) const
    1075             : {
    1076           0 :     sal_Bool bValue = (rStrImpValue == sValue );
    1077           0 :     rValue.setValue( &bValue, ::getBooleanCppuType() );
    1078             : 
    1079           0 :     return true;
    1080             : }
    1081             : 
    1082           0 : bool XMLTextSyncWidthHeightPropHdl_Impl::exportXML(
    1083             :         OUString& rStrExpValue,
    1084             :         const Any& rValue,
    1085             :         const SvXMLUnitConverter& ) const
    1086             : {
    1087           0 :     bool bRet = false;
    1088           0 :     if( *(sal_Bool *)rValue.getValue() )
    1089             :     {
    1090           0 :         rStrExpValue = sValue;
    1091           0 :         bRet = true;
    1092             :     }
    1093             : 
    1094           0 :     return bRet;
    1095             : }
    1096             : 
    1097           0 : XMLTextSyncWidthHeightPropHdl_Impl::~XMLTextSyncWidthHeightPropHdl_Impl()
    1098             : {
    1099           0 : }
    1100             : 
    1101             : class XMLTextRotationAnglePropHdl_Impl : public XMLPropertyHandler
    1102             : {
    1103             : 
    1104             : public:
    1105        5642 :     XMLTextRotationAnglePropHdl_Impl()  {}
    1106             :     virtual ~XMLTextRotationAnglePropHdl_Impl();
    1107             : 
    1108             :     virtual bool importXML(
    1109             :             const OUString& rStrImpValue,
    1110             :             ::com::sun::star::uno::Any& rValue,
    1111             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
    1112             :     virtual bool exportXML(
    1113             :             OUString& rStrExpValue,
    1114             :             const ::com::sun::star::uno::Any& rValue,
    1115             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
    1116             : };
    1117             : 
    1118           9 : bool XMLTextRotationAnglePropHdl_Impl::importXML(
    1119             :         const OUString& rStrImpValue,
    1120             :            Any& rValue,
    1121             :         const SvXMLUnitConverter& ) const
    1122             : {
    1123             :     sal_Int32 nValue;
    1124           9 :     bool const bRet = ::sax::Converter::convertNumber( nValue, rStrImpValue );
    1125           9 :     if( bRet )
    1126             :     {
    1127           9 :         nValue = (nValue % 360 );
    1128           9 :         if( nValue < 0 )
    1129           0 :             nValue = 360 + nValue;
    1130             :         sal_Int16 nAngle;
    1131           9 :         if( nValue < 45 || nValue > 315 )
    1132           8 :             nAngle = 0;
    1133           1 :         else if( nValue < 180 )
    1134           1 :             nAngle = 900;
    1135             :         else /* if nValalue <= 315 ) */
    1136           0 :             nAngle = 2700;
    1137           9 :         rValue <<= nAngle;
    1138             :     }
    1139             : 
    1140           9 :     return bRet;
    1141             : }
    1142             : 
    1143           0 : bool XMLTextRotationAnglePropHdl_Impl::exportXML(
    1144             :         OUString& rStrExpValue,
    1145             :         const Any& rValue,
    1146             :         const SvXMLUnitConverter& ) const
    1147             : {
    1148           0 :     sal_Int16 nAngle = sal_Int16();
    1149           0 :     bool bRet = ( rValue >>= nAngle );
    1150           0 :     if( bRet )
    1151             :     {
    1152           0 :         OUStringBuffer aOut;
    1153           0 :         ::sax::Converter::convertNumber( aOut, nAngle / 10 );
    1154           0 :         rStrExpValue = aOut.makeStringAndClear();
    1155             :     }
    1156             :     OSL_ENSURE( bRet, "illegal rotation angle" );
    1157             : 
    1158           0 :     return bRet;
    1159             : }
    1160             : 
    1161       11262 : XMLTextRotationAnglePropHdl_Impl::~XMLTextRotationAnglePropHdl_Impl()
    1162             : {
    1163       11262 : }
    1164             : class XMLNumber8OneBasedHdl : public XMLPropertyHandler
    1165             : {
    1166             : 
    1167             : public:
    1168        4110 :     XMLNumber8OneBasedHdl() {}
    1169        8198 :     virtual ~XMLNumber8OneBasedHdl() {};
    1170             : 
    1171             :     virtual bool importXML(
    1172             :             const OUString& rStrImpValue,
    1173             :             ::com::sun::star::uno::Any& rValue,
    1174             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
    1175             :     virtual bool exportXML(
    1176             :             OUString& rStrExpValue,
    1177             :             const ::com::sun::star::uno::Any& rValue,
    1178             :             const SvXMLUnitConverter& ) const SAL_OVERRIDE;
    1179             : };
    1180             : 
    1181           0 : bool XMLNumber8OneBasedHdl::importXML(
    1182             :         const OUString& rStrImpValue,
    1183             :            Any& rValue,
    1184             :         const SvXMLUnitConverter& ) const
    1185             : {
    1186           0 :     sal_Int32 nValue = 0;
    1187           0 :     bool const bRet = ::sax::Converter::convertNumber(nValue, rStrImpValue);
    1188           0 :     if( bRet )
    1189           0 :         rValue <<= static_cast<sal_Int8>( nValue - 1 );
    1190           0 :     return bRet;
    1191             : }
    1192             : 
    1193           0 : bool XMLNumber8OneBasedHdl::exportXML(
    1194             :         OUString& rStrExpValue,
    1195             :         const Any& rValue,
    1196             :         const SvXMLUnitConverter& ) const
    1197             : {
    1198           0 :     sal_Int8 nValue = sal_Int8();
    1199           0 :     bool bRet = ( rValue >>= nValue );
    1200           0 :     if( bRet )
    1201             :     {
    1202           0 :         OUStringBuffer aOut;
    1203           0 :         ::sax::Converter::convertNumber( aOut, nValue + 1 );
    1204           0 :         rStrExpValue = aOut.makeStringAndClear();
    1205             :     }
    1206           0 :     return bRet;
    1207             : }
    1208             : class XMLTextPropertyHandlerFactory_Impl
    1209             : {
    1210             : public:
    1211             :     const XMLPropertyHandler *GetPropertyHandler( sal_Int32 nType ) const;
    1212             : 
    1213             :     XMLTextPropertyHandlerFactory_Impl();
    1214             :     ~XMLTextPropertyHandlerFactory_Impl();
    1215             : };
    1216             : 
    1217             : //UUUU
    1218             : #include <xmloff/EnumPropertyHdl.hxx>
    1219             : #include <com/sun/star/drawing/FillStyle.hpp>
    1220             : #include "XMLFillBitmapSizePropertyHandler.hxx"
    1221             : #include "XMLBitmapLogicalSizePropertyHandler.hxx"
    1222             : #include <com/sun/star/drawing/RectanglePoint.hpp>
    1223             : #include <com/sun/star/drawing/BitmapMode.hpp>
    1224             : #include "XMLBitmapRepeatOffsetPropertyHandler.hxx"
    1225             : extern SvXMLEnumMapEntry aXML_FillStyle_EnumMap[];
    1226             : extern SvXMLEnumMapEntry aXML_RefPoint_EnumMap[];
    1227             : extern SvXMLEnumMapEntry aXML_BitmapMode_EnumMap[];
    1228             : 
    1229      164947 : const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler
    1230             :     ( sal_Int32 nType ) const
    1231             : {
    1232      164947 :     const XMLPropertyHandler* pHdl = 0;
    1233      164947 :     switch( nType )
    1234             :     {
    1235             :     case XML_TYPE_TEXT_DROPCAP:
    1236        4110 :         pHdl = new XMLDropCapPropHdl_Impl;
    1237        4110 :         break;
    1238             :     case XML_TYPE_TEXT_WRAP:
    1239        2482 :         pHdl = new XMLWrapPropHdl_Impl;
    1240        2482 :         break;
    1241             :     case XML_TYPE_TEXT_PARAGRAPH_ONLY:
    1242        2482 :         pHdl = new XMLParagraphOnlyPropHdl_Impl;
    1243        2482 :         break;
    1244             :     case XML_TYPE_TEXT_WRAP_OUTSIDE:
    1245        2482 :         pHdl = new XMLContourModePropHdl_Impl;
    1246        2482 :         break;
    1247             :     case XML_TYPE_TEXT_OPAQUE:
    1248        2482 :         pHdl = new XMLOpaquePropHdl_Impl;
    1249        2482 :         break;
    1250             :     case XML_TYPE_TEXT_PROTECT_CONTENT:
    1251        2440 :         pHdl = new XMLFrameProtectPropHdl_Impl( XML_CONTENT );
    1252        2440 :         break;
    1253             :     case XML_TYPE_TEXT_PROTECT_SIZE:
    1254        2440 :         pHdl = new XMLFrameProtectPropHdl_Impl( XML_SIZE );
    1255        2440 :         break;
    1256             :     case XML_TYPE_TEXT_PROTECT_POSITION:
    1257        2440 :         pHdl = new XMLFrameProtectPropHdl_Impl( XML_POSITION );
    1258        2440 :         break;
    1259             :     case XML_TYPE_TEXT_ANCHOR_TYPE:
    1260        1778 :         pHdl = new XMLAnchorTypePropHdl;
    1261        1778 :         break;
    1262             :     case XML_TYPE_TEXT_COLUMNS:
    1263        3954 :         pHdl = new XMLTextColumnsPropertyHandler;
    1264        3954 :         break;
    1265             :     case XML_TYPE_TEXT_HORIZONTAL_POS:
    1266        2482 :         pHdl = new XMLConstantsPropertyHandler( pXML_HoriPos_Enum, XML_TOKEN_INVALID );
    1267        2482 :         break;
    1268             :     case XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED:
    1269        2482 :         pHdl = new XMLConstantsPropertyHandler( pXML_HoriPosMirrored_Enum, XML_TOKEN_INVALID );
    1270        2482 :         break;
    1271             :     case XML_TYPE_TEXT_HORIZONTAL_REL:
    1272        2482 :         pHdl = new XMLConstantsPropertyHandler( pXML_HoriRel_Enum, XML_TOKEN_INVALID );
    1273        2482 :         break;
    1274             :     case XML_TYPE_TEXT_HORIZONTAL_REL_FRAME:
    1275        2482 :         pHdl = new XMLConstantsPropertyHandler( pXML_HoriRelFrame_Enum, XML_TOKEN_INVALID );
    1276        2482 :         break;
    1277             :     case XML_TYPE_TEXT_HORIZONTAL_MIRROR:
    1278        2482 :         pHdl = new XMLHoriMirrorPropHdl_Impl;
    1279        2482 :         break;
    1280             :     case XML_TYPE_TEXT_VERTICAL_POS:
    1281        2482 :         pHdl = new XMLConstantsPropertyHandler( pXML_VertPos_Enum, XML_TOKEN_INVALID );
    1282        2482 :         break;
    1283             :     case XML_TYPE_TEXT_VERTICAL_POS_AT_CHAR:
    1284        2482 :         pHdl = new XMLConstantsPropertyHandler( pXML_VertPosAtChar_Enum, XML_TOKEN_INVALID );
    1285        2482 :         break;
    1286             :     case XML_TYPE_TEXT_VERTICAL_REL:
    1287        2482 :         pHdl = new XMLConstantsPropertyHandler( pXML_VertRel_Enum, XML_TOKEN_INVALID );
    1288        2482 :         break;
    1289             :     case XML_TYPE_TEXT_VERTICAL_REL_PAGE:
    1290        2482 :         pHdl = new XMLConstantsPropertyHandler( pXML_VertRelPage_Enum, XML_TOKEN_INVALID );
    1291        2482 :         break;
    1292             :     case XML_TYPE_TEXT_VERTICAL_REL_FRAME:
    1293        2482 :         pHdl = new XMLConstantsPropertyHandler( pXML_VertRelFrame_Enum, XML_TOKEN_INVALID );
    1294        2482 :         break;
    1295             :     case XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR:
    1296        2482 :         pHdl = new XMLConstantsPropertyHandler( pXML_VertRelAsChar_Enum, XML_TOKEN_INVALID );
    1297        2482 :         break;
    1298             :     case XML_TYPE_TEXT_MIRROR_VERTICAL:
    1299        2440 :         pHdl = new XMLGrfMirrorPropHdl_Impl( XML_VERTICAL, false );
    1300        2440 :         break;
    1301             :     case XML_TYPE_TEXT_MIRROR_HORIZONTAL_LEFT:
    1302             :         // XML_HORIZONTAL_ON_LEFT_PAGES is replaced by XML_HORIZONTAL_ON_EVEN. (#i49139#)
    1303        2440 :         pHdl = new XMLGrfMirrorPropHdl_Impl( XML_HORIZONTAL_ON_EVEN, true );
    1304        2440 :         break;
    1305             :     case XML_TYPE_TEXT_MIRROR_HORIZONTAL_RIGHT:
    1306             :         // XML_HORIZONTAL_ON_RIGHT_PAGES is replaced by XML_HORIZONTAL_ON_ODD. (#i49139#)
    1307        2440 :         pHdl = new XMLGrfMirrorPropHdl_Impl( XML_HORIZONTAL_ON_ODD, true );
    1308        2440 :         break;
    1309             :     case XML_TYPE_TEXT_CLIP:
    1310        2440 :         pHdl = new XMLClipPropertyHandler( false );
    1311        2440 :         break;
    1312             :     case XML_TYPE_TEXT_CLIP11:
    1313        2440 :         pHdl = new XMLClipPropertyHandler( true );
    1314        2440 :         break;
    1315             :     case XML_TYPE_TEXT_EMPHASIZE:
    1316        5642 :         pHdl = new XMLTextEmphasizePropHdl_Impl;
    1317        5642 :         break;
    1318             :     case XML_TYPE_TEXT_COMBINE:
    1319             :         pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_LINES ),
    1320        5642 :                                             GetXMLToken( XML_NONE ) );
    1321        5642 :         break;
    1322             :     case XML_TYPE_TEXT_COMBINE_CHARACTERS:
    1323             :         pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_LETTERS ),
    1324        1532 :                                             GetXMLToken( XML_NONE ) );
    1325        1532 :         break;
    1326             :     case XML_TYPE_TEXT_COMBINECHAR:
    1327        5642 :         pHdl = new XMLTextCombineCharPropHdl_Impl;
    1328        5642 :         break;
    1329             :     case XML_TYPE_TEXT_AUTOSPACE:
    1330             :         pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_IDEOGRAPH_ALPHA ),
    1331        5642 :                                             GetXMLToken( XML_NONE ) );
    1332        5642 :         break;
    1333             :     case XML_TYPE_TEXT_PUNCTUATION_WRAP:
    1334             :         pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_HANGING ),
    1335        5642 :                                             GetXMLToken( XML_SIMPLE ) );
    1336        5642 :         break;
    1337             :     case XML_TYPE_TEXT_LINE_BREAK:
    1338             :         pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_STRICT ),
    1339        5642 :                                             GetXMLToken( XML_NORMAL ) );
    1340        5642 :         break;
    1341             :     case XML_TYPE_TEXT_REL_WIDTH_HEIGHT:
    1342        1778 :         pHdl = new XMLTextRelWidthHeightPropHdl_Impl;
    1343        1778 :         break;
    1344             :     case XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT:
    1345           0 :         pHdl = new XMLTextSyncWidthHeightPropHdl_Impl( XML_SCALE );
    1346           0 :         break;
    1347             :     case XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT_MIN:
    1348           0 :         pHdl = new XMLTextSyncWidthHeightPropHdl_Impl( XML_SCALE_MIN );
    1349           0 :         break;
    1350             :     case XML_TYPE_TEXT_RUBY_ADJUST:
    1351        1514 :         pHdl = new XMLConstantsPropertyHandler( pXML_RubyAdjust_Enum, XML_TOKEN_INVALID );
    1352        1514 :         break;
    1353             :     case XML_TYPE_TEXT_FONT_RELIEF:
    1354        5642 :         pHdl = new XMLConstantsPropertyHandler( pXML_FontRelief_Enum, XML_TOKEN_INVALID );
    1355        5642 :         break;
    1356             :     case XML_TYPE_TEXT_ROTATION_ANGLE:
    1357        5642 :         pHdl = new XMLTextRotationAnglePropHdl_Impl;
    1358        5642 :         break;
    1359             :     case XML_TYPE_TEXT_ROTATION_SCALE:
    1360             :         pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_FIXED ),
    1361        5642 :                                             GetXMLToken( XML_LINE_HEIGHT ) );
    1362        5642 :         break;
    1363             :     case XML_TYPE_TEXT_VERTICAL_ALIGN:
    1364        4110 :         pHdl = new XMLConstantsPropertyHandler( pXML_ParaVerticalAlign_Enum, XML_TOKEN_INVALID );
    1365        4110 :         break;
    1366             :     case XML_TYPE_TEXT_RUBY_POSITION:
    1367             :         pHdl = new XMLNamedBoolPropertyHdl( ::xmloff::token::XML_ABOVE,
    1368        1514 :                                             ::xmloff::token::XML_BELOW );
    1369        1514 :         break;
    1370             :     // OD 2004-05-05 #i28701#
    1371             :     case XML_TYPE_WRAP_INFLUENCE_ON_POSITION:
    1372             :         pHdl = new XMLConstantsPropertyHandler( pXML_WrapInfluenceOnPosition_Enum,
    1373        3185 :                                                 XML_TOKEN_INVALID );
    1374        3185 :         break;
    1375             :     case XML_TYPE_BORDER_MODEL:
    1376             :         pHdl = new XMLNamedBoolPropertyHdl( xmloff::token::XML_COLLAPSING,
    1377         245 :                                             xmloff::token::XML_SEPARATING );
    1378         245 :         break;
    1379             :     case XML_TYPE_TEXT_LINE_MODE:
    1380             :         pHdl = new XMLNamedBoolPropertyHdl(
    1381             :                                     ::xmloff::token::XML_SKIP_WHITE_SPACE,
    1382        5642 :                                     ::xmloff::token::XML_CONTINUOUS);
    1383        5642 :         break;
    1384             :     case XML_TYPE_TEXT_KEEP:
    1385             :         pHdl = new XMLNamedBoolPropertyHdl(
    1386             :                                     ::xmloff::token::XML_ALWAYS,
    1387        4110 :                                     ::xmloff::token::XML_AUTO);
    1388        4110 :         break;
    1389             :     case XML_TYPE_TEXT_NKEEP:
    1390             :         pHdl = new XMLNamedBoolPropertyHdl(
    1391             :                                     ::xmloff::token::XML_AUTO,
    1392         317 :                                     ::xmloff::token::XML_ALWAYS);
    1393         317 :         break;
    1394             :     case XML_TYPE_TEXT_NUMBER8_ONE_BASED:
    1395        4110 :         pHdl = new XMLNumber8OneBasedHdl();
    1396        4110 :         break;
    1397             :     case XML_TYPE_VERTICAL_ALIGN:
    1398        2440 :         pHdl = new XMLConstantsPropertyHandler( pXML_VerticalAlign_Enum, XML_TOKEN_INVALID );
    1399        2440 :         break;
    1400             : 
    1401             :     //UUUU
    1402             :     case XML_SW_TYPE_FILLSTYLE:
    1403        2440 :         pHdl = new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap, ::getCppuType((const FillStyle*)0) );
    1404        2440 :         break;
    1405             :     case XML_SW_TYPE_FILLBITMAPSIZE:
    1406        2440 :         pHdl = new XMLFillBitmapSizePropertyHandler();
    1407        2440 :         break;
    1408             :     case XML_SW_TYPE_LOGICAL_SIZE:
    1409        2440 :         pHdl = new XMLBitmapLogicalSizePropertyHandler();
    1410        2440 :         break;
    1411             :     case XML_SW_TYPE_BITMAP_REFPOINT:
    1412        2440 :         pHdl = new XMLEnumPropertyHdl( aXML_RefPoint_EnumMap, getCppuType((const RectanglePoint*)0) );
    1413        2440 :         break;
    1414             :     case XML_SW_TYPE_BITMAP_MODE:
    1415        2440 :         pHdl = new XMLEnumPropertyHdl( aXML_BitmapMode_EnumMap, getCppuType((const BitmapMode*)0) );
    1416        2440 :         break;
    1417             :     case XML_SW_TYPE_BITMAPREPOFFSETX:
    1418             :     case XML_SW_TYPE_BITMAPREPOFFSETY:
    1419        4880 :         pHdl = new XMLBitmapRepeatOffsetPropertyHandler(XML_SW_TYPE_BITMAPREPOFFSETX == nType);
    1420        4880 :         break;
    1421             : 
    1422             :     }
    1423             : 
    1424      164947 :     return pHdl;
    1425             : }
    1426             : 
    1427       12417 : XMLTextPropertyHandlerFactory_Impl::XMLTextPropertyHandlerFactory_Impl()
    1428             : {
    1429       12417 : }
    1430             : 
    1431       12402 : XMLTextPropertyHandlerFactory_Impl::~XMLTextPropertyHandlerFactory_Impl()
    1432             : {
    1433       12402 : }
    1434             : 
    1435       12417 : XMLTextPropertyHandlerFactory::XMLTextPropertyHandlerFactory() :
    1436             :     XMLPropertyHandlerFactory(),
    1437       12417 :    pImpl( new XMLTextPropertyHandlerFactory_Impl )
    1438             : {
    1439       12417 : }
    1440             : 
    1441       37206 : XMLTextPropertyHandlerFactory::~XMLTextPropertyHandlerFactory()
    1442             : {
    1443       12402 :     delete pImpl;
    1444       24804 : }
    1445             : 
    1446     1208022 : const XMLPropertyHandler *XMLTextPropertyHandlerFactory::GetPropertyHandler(
    1447             :         sal_Int32 nType ) const
    1448             : {
    1449             :     const XMLPropertyHandler *pHdl =
    1450     1208022 :         XMLPropertyHandlerFactory::GetPropertyHandler( nType );
    1451             : 
    1452     1208022 :     if( !pHdl )
    1453             :     {
    1454      164947 :         const XMLPropertyHandler *pNewHdl = pImpl->GetPropertyHandler( nType );
    1455             : 
    1456      164947 :         if( pNewHdl )
    1457      164947 :             PutHdlCache( nType, pNewHdl );
    1458             : 
    1459      164947 :         pHdl = pNewHdl;
    1460             :     }
    1461             : 
    1462     1208022 :     return pHdl;
    1463             : }
    1464             : 
    1465             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10