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_XMLNUMI_HXX 25 #define _XMLOFF_XMLNUMI_HXX 26 27 #include <com/sun/star/container/XIndexReplace.hpp> 28 29 #include <xmloff/xmlstyle.hxx> 30 #include <com/sun/star/style/NumberingType.hpp> 31 32 namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } } 33 class SvI18NMap; 34 class SvxXMLListStyle_Impl; 35 36 class SvxXMLListStyleContext : public SvXMLStyleContext 37 { 38 const ::rtl::OUString sIsPhysical; 39 const ::rtl::OUString sNumberingRules; 40 const ::rtl::OUString sName; 41 const ::rtl::OUString sIsContinuousNumbering; 42 43 ::com::sun::star::uno::Reference < 44 ::com::sun::star::container::XIndexReplace > xNumRules; 45 46 SvxXMLListStyle_Impl *pLevelStyles; 47 48 sal_Int32 nLevels; 49 sal_Bool bConsecutive : 1; 50 sal_Bool bOutline : 1; 51 52 protected: 53 54 virtual void SetAttribute( sal_uInt16 nPrefixKey, 55 const ::rtl::OUString& rLocalName, 56 const ::rtl::OUString& rValue ); 57 58 public: 59 60 TYPEINFO(); 61 62 SvxXMLListStyleContext( 63 SvXMLImport& rImport, sal_uInt16 nPrfx, 64 const ::rtl::OUString& rLName, 65 const ::com::sun::star::uno::Reference< 66 ::com::sun::star::xml::sax::XAttributeList >& xAttrList, 67 sal_Bool bOutl=sal_False ); 68 69 virtual ~SvxXMLListStyleContext(); 70 71 virtual SvXMLImportContext *CreateChildContext( 72 sal_uInt16 nPrefix, 73 const ::rtl::OUString& rLocalName, 74 const ::com::sun::star::uno::Reference< 75 ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); 76 77 void FillUnoNumRule( 78 const ::com::sun::star::uno::Reference< 79 ::com::sun::star::container::XIndexReplace > & rNumRule, 80 const SvI18NMap *pI18NMap ) const; 81 82 const ::com::sun::star::uno::Reference < GetNumRules() const83 ::com::sun::star::container::XIndexReplace >& GetNumRules() const 84 { return xNumRules; } IsOutline() const85 sal_Bool IsOutline() const { return bOutline; } IsConsecutive() const86 sal_Bool IsConsecutive() const { return bConsecutive; } GetLevels() const87 sal_Int32 GetLevels() const { return nLevels; } 88 89 static ::com::sun::star::uno::Reference < 90 ::com::sun::star::container::XIndexReplace > 91 CreateNumRule( 92 const ::com::sun::star::uno::Reference < 93 ::com::sun::star::frame::XModel > & rModel ); 94 95 static void SetDefaultStyle( 96 const ::com::sun::star::uno::Reference < 97 ::com::sun::star::container::XIndexReplace > & rNumRule, 98 sal_Int16 nLevel, 99 sal_Bool bOrdered ); 100 101 virtual void CreateAndInsertLate( sal_Bool bOverwrite ); 102 103 void CreateAndInsertAuto() const; 104 }; 105 106 #endif // _XMLOFF_XMLNUMI_HXX 107 108