1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX 25 #define _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX 26 27 #include "sal/config.h" 28 #include "xmloff/dllapi.h" 29 #include "sal/types.h" 30 #include <rtl/ustring.hxx> 31 #include <com/sun/star/ucb/XAnyCompare.hpp> 32 33 namespace com { namespace sun { namespace star { namespace container { 34 class XIndexReplace; } } } } 35 namespace rtl { class OUString; } 36 37 38 class XMLTextListAutoStylePool_Impl; 39 class XMLTextListAutoStylePoolNames_Impl; 40 class XMLTextListAutoStylePoolEntry_Impl; 41 class SvXMLExport; 42 43 class XMLOFF_DLLPUBLIC XMLTextListAutoStylePool 44 { 45 SvXMLExport& rExport; 46 47 ::rtl::OUString sPrefix; 48 49 XMLTextListAutoStylePool_Impl *pPool; 50 XMLTextListAutoStylePoolNames_Impl *pNames; 51 sal_uInt32 nName; 52 53 /** this is an optional NumRule compare component for applications where 54 the NumRules don't have names */ 55 ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XAnyCompare > mxNumRuleCompare; 56 57 SAL_DLLPRIVATE sal_uInt32 Find( XMLTextListAutoStylePoolEntry_Impl* pEntry ) 58 const; 59 public: 60 61 XMLTextListAutoStylePool( SvXMLExport& rExport ); 62 ~XMLTextListAutoStylePool(); 63 64 void RegisterName( const ::rtl::OUString& rName ); 65 sal_Bool HasName( const ::rtl::OUString& rName ) const; 66 67 ::rtl::OUString Add( 68 const ::com::sun::star::uno::Reference < 69 ::com::sun::star::container::XIndexReplace > & rNumRules ); 70 71 ::rtl::OUString Find( 72 const ::com::sun::star::uno::Reference < 73 ::com::sun::star::container::XIndexReplace > & rNumRules ) const; 74 ::rtl::OUString Find( const ::rtl::OUString& rInternalName ) const; 75 76 void exportXML() const; 77 }; 78 79 80 #endif // _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX 81