LCOV - code coverage report
Current view: top level - xmloff/source/text - XMLTextNumRuleInfo.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 45 0.0 %
Date: 2014-04-14 Functions: 0 14 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTNUMRULEINFO_HXX
      21             : #define INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTNUMRULEINFO_HXX
      22             : 
      23             : #include <com/sun/star/uno/Reference.hxx>
      24             : #include <com/sun/star/container/XIndexReplace.hpp>
      25             : 
      26             : namespace com { namespace sun { namespace star {
      27             :     namespace text { class XTextContent; }
      28             : } } }
      29             : #include <sal/types.h>
      30             : 
      31             : class XMLTextListAutoStylePool;
      32             : 
      33             : /** information about list and list style for a certain paragraph
      34             : 
      35             :     OD 2008-04-24 #refactorlists#
      36             :     Complete refactoring of the class and enhancement of the class for lists.
      37             :     These changes are considered by method <XMLTextParagraphExport::exportListChange(..)>
      38             : */
      39           0 : class XMLTextNumRuleInfo
      40             : {
      41             :     const OUString msNumberingRules;
      42             :     const OUString msNumberingLevel;
      43             :     const OUString msNumberingStartValue;
      44             :     const OUString msParaIsNumberingRestart;
      45             :     const OUString msNumberingIsNumber;
      46             :     const OUString msNumberingIsOutline;
      47             :     const OUString msPropNameListId;
      48             :     const OUString msPropNameStartWith;
      49             :     const OUString msContinueingPreviousSubTree;
      50             :     const OUString msListLabelStringProp;
      51             : 
      52             :     // numbering rules instance and its name
      53             :     ::com::sun::star::uno::Reference <
      54             :                         ::com::sun::star::container::XIndexReplace > mxNumRules;
      55             :     OUString     msNumRulesName;
      56             : 
      57             :     // paragraph's list attributes
      58             :     OUString     msListId;
      59             :     sal_Int16           mnListStartValue;
      60             :     sal_Int16           mnListLevel;
      61             :     sal_Bool            mbIsNumbered;
      62             :     sal_Bool            mbIsRestart;
      63             : 
      64             :     // numbering rules' attributes
      65             :     sal_Int16           mnListLevelStartValue;
      66             : 
      67             :     // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
      68             :     sal_Bool mbOutlineStyleAsNormalListStyle;
      69             : 
      70             :     sal_Bool mbContinueingPreviousSubTree;
      71             :     OUString msListLabelString;
      72             : 
      73             : public:
      74             : 
      75             :     XMLTextNumRuleInfo();
      76             : 
      77             :     inline XMLTextNumRuleInfo& operator=( const XMLTextNumRuleInfo& rInfo );
      78             : 
      79             :     void Set( const ::com::sun::star::uno::Reference <
      80             :                         ::com::sun::star::text::XTextContent > & rTextContnt,
      81             :               const sal_Bool bOutlineStyleAsNormalListStyle,
      82             :               const XMLTextListAutoStylePool& rListAutoPool,
      83             :               const sal_Bool bExportTextNumberElement );
      84             :     inline void Reset();
      85             : 
      86           0 :     inline const OUString& GetNumRulesName() const
      87             :     {
      88           0 :         return msNumRulesName;
      89             :     }
      90             :     inline const ::com::sun::star::uno::Reference <
      91             :         ::com::sun::star::container::XIndexReplace >& GetNumRules() const
      92             :     {
      93             :         return mxNumRules;
      94             :     }
      95           0 :     inline sal_Int16 GetListLevelStartValue() const
      96             :     {
      97           0 :         return mnListLevelStartValue;
      98             :     }
      99             : 
     100           0 :     inline const OUString& GetListId() const
     101             :     {
     102           0 :         return msListId;
     103             :     }
     104             : 
     105           0 :     inline sal_Int16 GetLevel() const
     106             :     {
     107           0 :         return mnListLevel;
     108             :     }
     109             : 
     110           0 :     inline sal_Bool HasStartValue() const
     111             :     {
     112           0 :         return mnListStartValue != -1;
     113             :     }
     114           0 :     inline sal_uInt32 GetStartValue() const
     115             :     {
     116           0 :         return mnListStartValue;
     117             :     }
     118             : 
     119           0 :     inline sal_Bool IsNumbered() const
     120             :     {
     121           0 :         return mbIsNumbered;
     122             :     }
     123           0 :     inline sal_Bool IsRestart() const
     124             :     {
     125           0 :         return mbIsRestart;
     126             :     }
     127             : 
     128             :     sal_Bool BelongsToSameList( const XMLTextNumRuleInfo& rCmp ) const;
     129             : 
     130           0 :     inline sal_Bool HasSameNumRules( const XMLTextNumRuleInfo& rCmp ) const
     131             :     {
     132           0 :         return rCmp.msNumRulesName == msNumRulesName;
     133             :     }
     134             : 
     135           0 :     inline sal_Bool IsContinueingPreviousSubTree() const
     136             :     {
     137           0 :         return mbContinueingPreviousSubTree;
     138             :     }
     139           0 :     inline const OUString& ListLabelString() const
     140             :     {
     141           0 :         return msListLabelString;
     142             :     }
     143             : };
     144             : 
     145           0 : inline XMLTextNumRuleInfo& XMLTextNumRuleInfo::operator=(
     146             :         const XMLTextNumRuleInfo& rInfo )
     147             : {
     148           0 :     msNumRulesName = rInfo.msNumRulesName;
     149           0 :     mxNumRules = rInfo.mxNumRules;
     150           0 :     msListId = rInfo.msListId;
     151           0 :     mnListStartValue = rInfo.mnListStartValue;
     152           0 :     mnListLevel = rInfo.mnListLevel;
     153           0 :     mbIsNumbered = rInfo.mbIsNumbered;
     154           0 :     mbIsRestart = rInfo.mbIsRestart;
     155             :     // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
     156           0 :     mbOutlineStyleAsNormalListStyle = rInfo.mbOutlineStyleAsNormalListStyle;
     157           0 :     mbContinueingPreviousSubTree = rInfo.mbContinueingPreviousSubTree;
     158           0 :     msListLabelString = rInfo.msListLabelString;
     159             : 
     160           0 :     return *this;
     161             : }
     162             : 
     163           0 : inline void XMLTextNumRuleInfo::Reset()
     164             : {
     165           0 :     mxNumRules = 0;
     166           0 :     msNumRulesName = "";
     167           0 :     msListId = "";
     168           0 :     mnListStartValue = -1;
     169           0 :     mnListLevel = 0;
     170             :     // Written OpenDocument file format doesn't fit to the created text document (#i69627#)
     171             :     mbIsNumbered = mbIsRestart =
     172           0 :     mbOutlineStyleAsNormalListStyle = sal_False;
     173           0 :     mbContinueingPreviousSubTree = sal_False;
     174           0 :     msListLabelString = "";
     175           0 : }
     176             : #endif // INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTNUMRULEINFO_HXX
     177             : 
     178             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10