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