1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_xmloff.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir #include <com/sun/star/container/XIndexReplace.hpp> 33*cdf0e10cSrcweir #include <tools/debug.hxx> 34*cdf0e10cSrcweir #include "impastpl.hxx" 35*cdf0e10cSrcweir #include <xmloff/xmlaustp.hxx> 36*cdf0e10cSrcweir #include <xmloff/families.hxx> 37*cdf0e10cSrcweir #include "xmloff/xmlnmspe.hxx" 38*cdf0e10cSrcweir #include <xmloff/xmltoken.hxx> 39*cdf0e10cSrcweir #include <xmloff/xmlexp.hxx> 40*cdf0e10cSrcweir #include "xmloff/XMLTextListAutoStylePool.hxx" 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir #ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX 43*cdf0e10cSrcweir #include <xmloff/PageMasterStyleMap.hxx> 44*cdf0e10cSrcweir #endif 45*cdf0e10cSrcweir #include "PageMasterExportPropMapper.hxx" 46*cdf0e10cSrcweir #include "XMLBackgroundImageExport.hxx" 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir using namespace ::std; 50*cdf0e10cSrcweir using ::rtl::OUString; 51*cdf0e10cSrcweir using ::rtl::OUStringBuffer; 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir using namespace ::com::sun::star; 54*cdf0e10cSrcweir using namespace ::xmloff::token; 55*cdf0e10cSrcweir 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir namespace 58*cdf0e10cSrcweir { 59*cdf0e10cSrcweir static void lcl_exportDataStyle( SvXMLExport& _rExport, const UniReference< XMLPropertySetMapper >& _rxMapper, 60*cdf0e10cSrcweir const XMLPropertyState& _rProperty ) 61*cdf0e10cSrcweir { 62*cdf0e10cSrcweir DBG_ASSERT( _rxMapper.is(), "xmloff::lcl_exportDataStyle: invalid property mapper!" ); 63*cdf0e10cSrcweir // obtain the data style name 64*cdf0e10cSrcweir ::rtl::OUString sDataStyleName; 65*cdf0e10cSrcweir _rProperty.maValue >>= sDataStyleName; 66*cdf0e10cSrcweir DBG_ASSERT( sDataStyleName.getLength(), "xmloff::lcl_exportDataStyle: invalid property value for the data style name!" ); 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir // add the attribute 69*cdf0e10cSrcweir _rExport.AddAttribute( 70*cdf0e10cSrcweir _rxMapper->GetEntryNameSpace( _rProperty.mnIndex ), 71*cdf0e10cSrcweir _rxMapper->GetEntryXMLName( _rProperty.mnIndex ), 72*cdf0e10cSrcweir sDataStyleName ); 73*cdf0e10cSrcweir } 74*cdf0e10cSrcweir } 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir void SvXMLAutoStylePoolP::exportStyleAttributes( 77*cdf0e10cSrcweir SvXMLAttributeList&, 78*cdf0e10cSrcweir sal_Int32 nFamily, 79*cdf0e10cSrcweir const vector< XMLPropertyState >& rProperties, 80*cdf0e10cSrcweir const SvXMLExportPropertyMapper& rPropExp, 81*cdf0e10cSrcweir const SvXMLUnitConverter&, 82*cdf0e10cSrcweir const SvXMLNamespaceMap& 83*cdf0e10cSrcweir ) const 84*cdf0e10cSrcweir { 85*cdf0e10cSrcweir if ( XML_STYLE_FAMILY_CONTROL_ID == nFamily ) 86*cdf0e10cSrcweir { // it's a control-related style 87*cdf0e10cSrcweir UniReference< XMLPropertySetMapper > aPropertyMapper = rPropExp.getPropertySetMapper(); 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir for ( vector< XMLPropertyState >::const_iterator pProp = rProperties.begin(); 90*cdf0e10cSrcweir pProp != rProperties.end(); 91*cdf0e10cSrcweir ++pProp 92*cdf0e10cSrcweir ) 93*cdf0e10cSrcweir { 94*cdf0e10cSrcweir if ( ( pProp->mnIndex > -1 ) 95*cdf0e10cSrcweir && ( CTF_FORMS_DATA_STYLE == aPropertyMapper->GetEntryContextId( pProp->mnIndex ) ) 96*cdf0e10cSrcweir ) 97*cdf0e10cSrcweir { // it's the data-style for a grid column 98*cdf0e10cSrcweir lcl_exportDataStyle( GetExport(), aPropertyMapper, *pProp ); 99*cdf0e10cSrcweir } 100*cdf0e10cSrcweir } 101*cdf0e10cSrcweir } 102*cdf0e10cSrcweir 103*cdf0e10cSrcweir if( (XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily) || (XML_STYLE_FAMILY_SD_PRESENTATION_ID == nFamily) ) 104*cdf0e10cSrcweir { // it's a graphics style 105*cdf0e10cSrcweir UniReference< XMLPropertySetMapper > aPropertyMapper = rPropExp.getPropertySetMapper(); 106*cdf0e10cSrcweir DBG_ASSERT(aPropertyMapper.is(), "SvXMLAutoStylePoolP::exportStyleAttributes: invalid property set mapper!"); 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir sal_Bool bFoundControlShapeDataStyle = sal_False; 109*cdf0e10cSrcweir sal_Bool bFoundNumberingRulesName = sal_False; 110*cdf0e10cSrcweir 111*cdf0e10cSrcweir for ( vector< XMLPropertyState >::const_iterator pProp = rProperties.begin(); 112*cdf0e10cSrcweir pProp != rProperties.end(); 113*cdf0e10cSrcweir ++pProp 114*cdf0e10cSrcweir ) 115*cdf0e10cSrcweir { 116*cdf0e10cSrcweir if (pProp->mnIndex > -1) 117*cdf0e10cSrcweir { // it's a valid property 118*cdf0e10cSrcweir switch( aPropertyMapper->GetEntryContextId(pProp->mnIndex) ) 119*cdf0e10cSrcweir { 120*cdf0e10cSrcweir case CTF_SD_CONTROL_SHAPE_DATA_STYLE: 121*cdf0e10cSrcweir { // it's the control shape data style property 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir if (bFoundControlShapeDataStyle) 124*cdf0e10cSrcweir { 125*cdf0e10cSrcweir DBG_ERROR("SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the ControlShapeDataStyle context id!"); 126*cdf0e10cSrcweir // already added the attribute for the first occurence 127*cdf0e10cSrcweir break; 128*cdf0e10cSrcweir } 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir lcl_exportDataStyle( GetExport(), aPropertyMapper, *pProp ); 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir // check if there is another property with the special context id we're handling here 133*cdf0e10cSrcweir bFoundControlShapeDataStyle = sal_True; 134*cdf0e10cSrcweir break; 135*cdf0e10cSrcweir } 136*cdf0e10cSrcweir case CTF_SD_NUMBERINGRULES_NAME: 137*cdf0e10cSrcweir { 138*cdf0e10cSrcweir if (bFoundNumberingRulesName) 139*cdf0e10cSrcweir { 140*cdf0e10cSrcweir DBG_ERROR("SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the numbering rules name context id!"); 141*cdf0e10cSrcweir // already added the attribute for the first occurence 142*cdf0e10cSrcweir break; 143*cdf0e10cSrcweir } 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir uno::Reference< container::XIndexReplace > xNumRule; 146*cdf0e10cSrcweir pProp->maValue >>= xNumRule; 147*cdf0e10cSrcweir if( xNumRule.is() && (xNumRule->getCount() > 0 ) ) 148*cdf0e10cSrcweir { 149*cdf0e10cSrcweir const OUString sName(((XMLTextListAutoStylePool*)&GetExport().GetTextParagraphExport()->GetListAutoStylePool())->Add( xNumRule )); 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_LIST_STYLE_NAME, GetExport().EncodeStyleName( sName ) ); 152*cdf0e10cSrcweir } 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir bFoundNumberingRulesName = sal_True; 155*cdf0e10cSrcweir break; 156*cdf0e10cSrcweir } 157*cdf0e10cSrcweir } 158*cdf0e10cSrcweir } 159*cdf0e10cSrcweir } 160*cdf0e10cSrcweir } 161*cdf0e10cSrcweir 162*cdf0e10cSrcweir if( nFamily == XML_STYLE_FAMILY_PAGE_MASTER ) 163*cdf0e10cSrcweir { 164*cdf0e10cSrcweir for( vector< XMLPropertyState >::const_iterator pProp = rProperties.begin(); pProp != rProperties.end(); pProp++ ) 165*cdf0e10cSrcweir { 166*cdf0e10cSrcweir if (pProp->mnIndex > -1) 167*cdf0e10cSrcweir { 168*cdf0e10cSrcweir UniReference< XMLPropertySetMapper > aPropMapper = rPropExp.getPropertySetMapper(); 169*cdf0e10cSrcweir sal_Int32 nIndex = pProp->mnIndex; 170*cdf0e10cSrcweir sal_Int16 nContextID = aPropMapper->GetEntryContextId( nIndex ); 171*cdf0e10cSrcweir switch( nContextID ) 172*cdf0e10cSrcweir { 173*cdf0e10cSrcweir case CTF_PM_PAGEUSAGE: 174*cdf0e10cSrcweir { 175*cdf0e10cSrcweir OUString sValue; 176*cdf0e10cSrcweir const XMLPropertyHandler* pPropHdl = aPropMapper->GetPropertyHandler( nIndex ); 177*cdf0e10cSrcweir if( pPropHdl && 178*cdf0e10cSrcweir pPropHdl->exportXML( sValue, pProp->maValue, 179*cdf0e10cSrcweir GetExport().GetMM100UnitConverter() ) && 180*cdf0e10cSrcweir ( ! IsXMLToken( sValue, XML_ALL ) ) ) 181*cdf0e10cSrcweir { 182*cdf0e10cSrcweir GetExport().AddAttribute( aPropMapper->GetEntryNameSpace( nIndex ), aPropMapper->GetEntryXMLName( nIndex ), sValue ); 183*cdf0e10cSrcweir } 184*cdf0e10cSrcweir } 185*cdf0e10cSrcweir break; 186*cdf0e10cSrcweir } 187*cdf0e10cSrcweir } 188*cdf0e10cSrcweir } 189*cdf0e10cSrcweir } 190*cdf0e10cSrcweir } 191*cdf0e10cSrcweir 192*cdf0e10cSrcweir void SvXMLAutoStylePoolP::exportStyleContent( 193*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > &, 194*cdf0e10cSrcweir sal_Int32 nFamily, 195*cdf0e10cSrcweir const vector< XMLPropertyState >& rProperties, 196*cdf0e10cSrcweir const SvXMLExportPropertyMapper& rPropExp, 197*cdf0e10cSrcweir const SvXMLUnitConverter&, 198*cdf0e10cSrcweir const SvXMLNamespaceMap& 199*cdf0e10cSrcweir ) const 200*cdf0e10cSrcweir { 201*cdf0e10cSrcweir if( nFamily == XML_STYLE_FAMILY_PAGE_MASTER ) 202*cdf0e10cSrcweir { 203*cdf0e10cSrcweir OUString sWS( GetXMLToken(XML_WS) ); 204*cdf0e10cSrcweir 205*cdf0e10cSrcweir sal_Int32 nHeaderStartIndex(-1); 206*cdf0e10cSrcweir sal_Int32 nHeaderEndIndex(-1); 207*cdf0e10cSrcweir sal_Int32 nFooterStartIndex(-1); 208*cdf0e10cSrcweir sal_Int32 nFooterEndIndex(-1); 209*cdf0e10cSrcweir sal_Bool bHeaderStartIndex(sal_False); 210*cdf0e10cSrcweir sal_Bool bHeaderEndIndex(sal_False); 211*cdf0e10cSrcweir sal_Bool bFooterStartIndex(sal_False); 212*cdf0e10cSrcweir sal_Bool bFooterEndIndex(sal_False); 213*cdf0e10cSrcweir 214*cdf0e10cSrcweir UniReference< XMLPropertySetMapper > aPropMapper = rPropExp.getPropertySetMapper(); 215*cdf0e10cSrcweir 216*cdf0e10cSrcweir sal_Int32 nIndex(0); 217*cdf0e10cSrcweir while(nIndex < aPropMapper->GetEntryCount()) 218*cdf0e10cSrcweir { 219*cdf0e10cSrcweir switch( aPropMapper->GetEntryContextId( nIndex ) & CTF_PM_FLAGMASK ) 220*cdf0e10cSrcweir { 221*cdf0e10cSrcweir case CTF_PM_HEADERFLAG: 222*cdf0e10cSrcweir { 223*cdf0e10cSrcweir if (!bHeaderStartIndex) 224*cdf0e10cSrcweir { 225*cdf0e10cSrcweir nHeaderStartIndex = nIndex; 226*cdf0e10cSrcweir bHeaderStartIndex = sal_True; 227*cdf0e10cSrcweir } 228*cdf0e10cSrcweir if (bFooterStartIndex && !bFooterEndIndex) 229*cdf0e10cSrcweir { 230*cdf0e10cSrcweir nFooterEndIndex = nIndex; 231*cdf0e10cSrcweir bFooterEndIndex = sal_True; 232*cdf0e10cSrcweir } 233*cdf0e10cSrcweir } 234*cdf0e10cSrcweir break; 235*cdf0e10cSrcweir case CTF_PM_FOOTERFLAG: 236*cdf0e10cSrcweir { 237*cdf0e10cSrcweir if (!bFooterStartIndex) 238*cdf0e10cSrcweir { 239*cdf0e10cSrcweir nFooterStartIndex = nIndex; 240*cdf0e10cSrcweir bFooterStartIndex = sal_True; 241*cdf0e10cSrcweir } 242*cdf0e10cSrcweir if (bHeaderStartIndex && !bHeaderEndIndex) 243*cdf0e10cSrcweir { 244*cdf0e10cSrcweir nHeaderEndIndex = nIndex; 245*cdf0e10cSrcweir bHeaderEndIndex = sal_True; 246*cdf0e10cSrcweir } 247*cdf0e10cSrcweir } 248*cdf0e10cSrcweir break; 249*cdf0e10cSrcweir } 250*cdf0e10cSrcweir nIndex++; 251*cdf0e10cSrcweir } 252*cdf0e10cSrcweir if (!bHeaderEndIndex) 253*cdf0e10cSrcweir nHeaderEndIndex = nIndex; 254*cdf0e10cSrcweir if (!bFooterEndIndex) 255*cdf0e10cSrcweir nFooterEndIndex = nIndex; 256*cdf0e10cSrcweir 257*cdf0e10cSrcweir // export header style element 258*cdf0e10cSrcweir { 259*cdf0e10cSrcweir SvXMLElementExport aElem( 260*cdf0e10cSrcweir GetExport(), XML_NAMESPACE_STYLE, XML_HEADER_STYLE, 261*cdf0e10cSrcweir sal_True, sal_True ); 262*cdf0e10cSrcweir 263*cdf0e10cSrcweir rPropExp.exportXML( 264*cdf0e10cSrcweir GetExport(), rProperties, 265*cdf0e10cSrcweir nHeaderStartIndex, nHeaderEndIndex, XML_EXPORT_FLAG_IGN_WS); 266*cdf0e10cSrcweir } 267*cdf0e10cSrcweir 268*cdf0e10cSrcweir // export footer style 269*cdf0e10cSrcweir { 270*cdf0e10cSrcweir SvXMLElementExport aElem( 271*cdf0e10cSrcweir GetExport(), XML_NAMESPACE_STYLE, XML_FOOTER_STYLE, 272*cdf0e10cSrcweir sal_True, sal_True ); 273*cdf0e10cSrcweir 274*cdf0e10cSrcweir rPropExp.exportXML( 275*cdf0e10cSrcweir GetExport(), rProperties, 276*cdf0e10cSrcweir nFooterStartIndex, nFooterEndIndex, XML_EXPORT_FLAG_IGN_WS); 277*cdf0e10cSrcweir } 278*cdf0e10cSrcweir } 279*cdf0e10cSrcweir } 280*cdf0e10cSrcweir 281*cdf0e10cSrcweir SvXMLAutoStylePoolP::SvXMLAutoStylePoolP() 282*cdf0e10cSrcweir { 283*cdf0e10cSrcweir DBG_ERROR("This constuctor is obsoleted and should not be used!"); 284*cdf0e10cSrcweir pImpl = NULL; 285*cdf0e10cSrcweir } 286*cdf0e10cSrcweir 287*cdf0e10cSrcweir SvXMLAutoStylePoolP::SvXMLAutoStylePoolP( SvXMLExport& rExport ) 288*cdf0e10cSrcweir { 289*cdf0e10cSrcweir pImpl = new SvXMLAutoStylePoolP_Impl( rExport ); 290*cdf0e10cSrcweir } 291*cdf0e10cSrcweir 292*cdf0e10cSrcweir SvXMLAutoStylePoolP::~SvXMLAutoStylePoolP() 293*cdf0e10cSrcweir { 294*cdf0e10cSrcweir delete pImpl; 295*cdf0e10cSrcweir } 296*cdf0e10cSrcweir 297*cdf0e10cSrcweir SvXMLExport& SvXMLAutoStylePoolP::GetExport() const 298*cdf0e10cSrcweir { 299*cdf0e10cSrcweir return pImpl->GetExport(); 300*cdf0e10cSrcweir } 301*cdf0e10cSrcweir 302*cdf0e10cSrcweir // TODO: romove this 303*cdf0e10cSrcweir void SvXMLAutoStylePoolP::AddFamily( 304*cdf0e10cSrcweir sal_Int32 nFamily, 305*cdf0e10cSrcweir const OUString& rStrName, 306*cdf0e10cSrcweir SvXMLExportPropertyMapper* pMapper, 307*cdf0e10cSrcweir OUString aStrPrefix, 308*cdf0e10cSrcweir sal_Bool bAsFamily ) 309*cdf0e10cSrcweir { 310*cdf0e10cSrcweir UniReference <SvXMLExportPropertyMapper> xTmp = pMapper; 311*cdf0e10cSrcweir AddFamily( nFamily, rStrName, xTmp, aStrPrefix, bAsFamily ); 312*cdf0e10cSrcweir } 313*cdf0e10cSrcweir 314*cdf0e10cSrcweir void SvXMLAutoStylePoolP::AddFamily( 315*cdf0e10cSrcweir sal_Int32 nFamily, 316*cdf0e10cSrcweir const OUString& rStrName, 317*cdf0e10cSrcweir const UniReference < SvXMLExportPropertyMapper > & rMapper, 318*cdf0e10cSrcweir const OUString& rStrPrefix, 319*cdf0e10cSrcweir sal_Bool bAsFamily ) 320*cdf0e10cSrcweir { 321*cdf0e10cSrcweir pImpl->AddFamily( nFamily, rStrName, rMapper, rStrPrefix, bAsFamily ); 322*cdf0e10cSrcweir } 323*cdf0e10cSrcweir 324*cdf0e10cSrcweir void SvXMLAutoStylePoolP::RegisterName( sal_Int32 nFamily, 325*cdf0e10cSrcweir const OUString& rName ) 326*cdf0e10cSrcweir { 327*cdf0e10cSrcweir pImpl->RegisterName( nFamily, rName ); 328*cdf0e10cSrcweir } 329*cdf0e10cSrcweir 330*cdf0e10cSrcweir void SvXMLAutoStylePoolP::GetRegisteredNames( 331*cdf0e10cSrcweir uno::Sequence<sal_Int32>& rFamilies, 332*cdf0e10cSrcweir uno::Sequence<OUString>& rNames ) 333*cdf0e10cSrcweir { 334*cdf0e10cSrcweir pImpl->GetRegisteredNames( rFamilies, rNames ); 335*cdf0e10cSrcweir } 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir void SvXMLAutoStylePoolP::RegisterNames( 338*cdf0e10cSrcweir uno::Sequence<sal_Int32>& aFamilies, 339*cdf0e10cSrcweir uno::Sequence<OUString>& aNames ) 340*cdf0e10cSrcweir { 341*cdf0e10cSrcweir DBG_ASSERT( aFamilies.getLength() == aNames.getLength(), 342*cdf0e10cSrcweir "aFamilies != aNames" ); 343*cdf0e10cSrcweir 344*cdf0e10cSrcweir // iterate over sequence(s) and call RegisterName(..) for each pair 345*cdf0e10cSrcweir const sal_Int32* pFamilies = aFamilies.getConstArray(); 346*cdf0e10cSrcweir const OUString* pNames = aNames.getConstArray(); 347*cdf0e10cSrcweir sal_Int32 nCount = min( aFamilies.getLength(), aNames.getLength() ); 348*cdf0e10cSrcweir for( sal_Int32 n = 0; n < nCount; n++ ) 349*cdf0e10cSrcweir RegisterName( pFamilies[n], pNames[n] ); 350*cdf0e10cSrcweir } 351*cdf0e10cSrcweir 352*cdf0e10cSrcweir OUString SvXMLAutoStylePoolP::Add( sal_Int32 nFamily, 353*cdf0e10cSrcweir const vector< XMLPropertyState >& rProperties ) 354*cdf0e10cSrcweir { 355*cdf0e10cSrcweir OUString sEmpty; 356*cdf0e10cSrcweir OUString sName; 357*cdf0e10cSrcweir pImpl->Add(sName, nFamily, sEmpty, rProperties ); 358*cdf0e10cSrcweir return sName; 359*cdf0e10cSrcweir } 360*cdf0e10cSrcweir 361*cdf0e10cSrcweir OUString SvXMLAutoStylePoolP::Add( sal_Int32 nFamily, 362*cdf0e10cSrcweir const OUString& rParent, 363*cdf0e10cSrcweir const vector< XMLPropertyState >& rProperties, bool bDontSeek ) 364*cdf0e10cSrcweir { 365*cdf0e10cSrcweir OUString sName; 366*cdf0e10cSrcweir pImpl->Add(sName, nFamily, rParent, rProperties, sal_False, bDontSeek ); 367*cdf0e10cSrcweir return sName; 368*cdf0e10cSrcweir } 369*cdf0e10cSrcweir 370*cdf0e10cSrcweir sal_Bool SvXMLAutoStylePoolP::Add(OUString& rName, sal_Int32 nFamily, const ::std::vector< XMLPropertyState >& rProperties ) 371*cdf0e10cSrcweir { 372*cdf0e10cSrcweir OUString sEmpty; 373*cdf0e10cSrcweir return pImpl->Add(rName, nFamily, sEmpty, rProperties); 374*cdf0e10cSrcweir } 375*cdf0e10cSrcweir 376*cdf0e10cSrcweir sal_Bool SvXMLAutoStylePoolP::Add(OUString& rName, sal_Int32 nFamily, const OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties ) 377*cdf0e10cSrcweir { 378*cdf0e10cSrcweir return pImpl->Add(rName, nFamily, rParent, rProperties); 379*cdf0e10cSrcweir } 380*cdf0e10cSrcweir 381*cdf0e10cSrcweir sal_Bool SvXMLAutoStylePoolP::AddNamed( const OUString& rName, sal_Int32 nFamily, const OUString& rParent, 382*cdf0e10cSrcweir const ::std::vector< XMLPropertyState >& rProperties ) 383*cdf0e10cSrcweir 384*cdf0e10cSrcweir { 385*cdf0e10cSrcweir return pImpl->AddNamed(rName, nFamily, rParent, rProperties); 386*cdf0e10cSrcweir } 387*cdf0e10cSrcweir 388*cdf0e10cSrcweir OUString SvXMLAutoStylePoolP::AddAndCache( sal_Int32 nFamily, 389*cdf0e10cSrcweir const vector< XMLPropertyState >& rProperties ) 390*cdf0e10cSrcweir { 391*cdf0e10cSrcweir OUString sEmpty; 392*cdf0e10cSrcweir OUString sName; 393*cdf0e10cSrcweir pImpl->Add(sName, nFamily, sEmpty, rProperties, sal_True ); 394*cdf0e10cSrcweir return sName; 395*cdf0e10cSrcweir } 396*cdf0e10cSrcweir 397*cdf0e10cSrcweir OUString SvXMLAutoStylePoolP::AddAndCache( sal_Int32 nFamily, 398*cdf0e10cSrcweir const OUString& rParent, 399*cdf0e10cSrcweir const vector< XMLPropertyState >& rProperties ) 400*cdf0e10cSrcweir { 401*cdf0e10cSrcweir OUString sName; 402*cdf0e10cSrcweir pImpl->Add(sName, nFamily, rParent, rProperties, sal_True ); 403*cdf0e10cSrcweir return sName; 404*cdf0e10cSrcweir } 405*cdf0e10cSrcweir 406*cdf0e10cSrcweir OUString SvXMLAutoStylePoolP::AddAndCache( sal_Int32 nFamily, 407*cdf0e10cSrcweir const OUString& rParent ) 408*cdf0e10cSrcweir { 409*cdf0e10cSrcweir return pImpl->AddToCache( nFamily, rParent ); 410*cdf0e10cSrcweir } 411*cdf0e10cSrcweir 412*cdf0e10cSrcweir OUString SvXMLAutoStylePoolP::Find( sal_Int32 nFamily, 413*cdf0e10cSrcweir const vector< XMLPropertyState >& rProperties ) const 414*cdf0e10cSrcweir { 415*cdf0e10cSrcweir OUString sEmpty; 416*cdf0e10cSrcweir return pImpl->Find( nFamily, sEmpty, rProperties ); 417*cdf0e10cSrcweir } 418*cdf0e10cSrcweir 419*cdf0e10cSrcweir OUString SvXMLAutoStylePoolP::Find( sal_Int32 nFamily, 420*cdf0e10cSrcweir const OUString& rParent, 421*cdf0e10cSrcweir const vector< XMLPropertyState >& rProperties ) const 422*cdf0e10cSrcweir { 423*cdf0e10cSrcweir return pImpl->Find( nFamily, rParent, rProperties ); 424*cdf0e10cSrcweir } 425*cdf0e10cSrcweir 426*cdf0e10cSrcweir OUString SvXMLAutoStylePoolP::FindAndRemoveCached( sal_Int32 nFamily ) const 427*cdf0e10cSrcweir { 428*cdf0e10cSrcweir return pImpl->FindAndRemoveCached( nFamily ); 429*cdf0e10cSrcweir } 430*cdf0e10cSrcweir 431*cdf0e10cSrcweir 432*cdf0e10cSrcweir void SvXMLAutoStylePoolP::exportXML( sal_Int32 nFamily, 433*cdf0e10cSrcweir const uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > &, 434*cdf0e10cSrcweir const SvXMLUnitConverter&, 435*cdf0e10cSrcweir const SvXMLNamespaceMap& 436*cdf0e10cSrcweir ) const 437*cdf0e10cSrcweir { 438*cdf0e10cSrcweir pImpl->exportXML( nFamily, 439*cdf0e10cSrcweir GetExport().GetDocHandler(), 440*cdf0e10cSrcweir GetExport().GetMM100UnitConverter(), 441*cdf0e10cSrcweir GetExport().GetNamespaceMap(), 442*cdf0e10cSrcweir this); 443*cdf0e10cSrcweir } 444*cdf0e10cSrcweir 445*cdf0e10cSrcweir void SvXMLAutoStylePoolP::ClearEntries() 446*cdf0e10cSrcweir { 447*cdf0e10cSrcweir pImpl->ClearEntries(); 448*cdf0e10cSrcweir } 449