LCOV - code coverage report
Current view: top level - include/editeng - swafopt.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 10 10 100.0 %
Date: 2015-06-13 12:38:46 Functions: 8 10 80.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_EDITENG_SWAFOPT_HXX
      21             : #define INCLUDED_EDITENG_SWAFOPT_HXX
      22             : 
      23             : #include <editeng/editengdllapi.h>
      24             : #include <o3tl/sorted_vector.hxx>
      25             : #include <rtl/ustring.hxx>
      26             : #include <vcl/font.hxx>
      27             : 
      28             : class SmartTagMgr;
      29             : 
      30             : namespace editeng {
      31             : 
      32             : class EDITENG_DLLPUBLIC IAutoCompleteString
      33             : {
      34             : private:
      35             :     OUString m_String;
      36             : public:
      37      121800 :     explicit IAutoCompleteString(OUString const& rString) : m_String(rString) {}
      38      121800 :     virtual ~IAutoCompleteString() {}
      39     2499742 :     OUString const& GetAutoCompleteString() const { return m_String; }
      40             : };
      41             : 
      42             : struct CompareAutoCompleteString
      43             : {
      44     1249871 :     bool operator()(IAutoCompleteString *const& lhs,
      45             :                     IAutoCompleteString *const& rhs) const
      46             :     {
      47     1249871 :         return lhs->GetAutoCompleteString().compareToIgnoreAsciiCase(
      48     2499742 :                 rhs->GetAutoCompleteString()) < 0;
      49             :     }
      50             : };
      51             : 
      52          59 : class SortedAutoCompleteStrings
      53             :   : public o3tl::sorted_vector<IAutoCompleteString*, CompareAutoCompleteString>
      54             : {
      55             : public:
      56          59 :     ~SortedAutoCompleteStrings() { DeleteAndDestroyAll(); }
      57             : };
      58             : 
      59             : } // namespace editeng
      60             : 
      61             : // Class of options for AutoFormat
      62         180 : struct EDITENG_DLLPUBLIC SvxSwAutoFormatFlags
      63             : {
      64             :     vcl::Font aBulletFont;
      65             :     vcl::Font aByInputBulletFont;
      66             :     /// only valid inside the Dialog!!!
      67             :     const editeng::SortedAutoCompleteStrings * m_pAutoCompleteList;
      68             :     SmartTagMgr* pSmartTagMgr;
      69             : 
      70             :     sal_Unicode cBullet;
      71             :     sal_Unicode cByInputBullet;
      72             : 
      73             :     sal_uInt16 nAutoCmpltWordLen, nAutoCmpltListLen;
      74             :     sal_uInt16 nAutoCmpltExpandKey;
      75             : 
      76             :     sal_uInt8 nRightMargin;
      77             : 
      78             :     bool bAutoCorrect : 1;
      79             :     bool bCapitalStartSentence : 1;
      80             :     bool bCapitalStartWord : 1;
      81             :     bool bChkFontAttr : 1;
      82             : 
      83             :     bool bChgUserColl : 1;
      84             :     bool bChgEnumNum : 1;
      85             : 
      86             :     bool bAFormatByInput : 1;
      87             :     bool bDelEmptyNode : 1;
      88             :     bool bSetNumRule : 1;
      89             : 
      90             :     bool bChgOrdinalNumber : 1;
      91             :     bool bChgToEnEmDash : 1;
      92             :     bool bAddNonBrkSpace : 1;
      93             :     bool bChgWeightUnderl : 1;
      94             :     bool bSetINetAttr : 1;
      95             : 
      96             :     bool bSetBorder : 1;
      97             :     bool bCreateTable : 1;
      98             :     bool bReplaceStyles : 1;
      99             :     bool bDummy : 1;
     100             : 
     101             :     bool bWithRedlining : 1;
     102             : 
     103             :     bool bRightMargin : 1;
     104             : 
     105             :     bool bAutoCompleteWords : 1;
     106             :     bool bAutoCmpltCollectWords : 1;
     107             :     bool bAutoCmpltEndless : 1;
     108             : // -- under NT here starts a new long
     109             :     bool bAutoCmpltAppendBlanc : 1;
     110             :     bool bAutoCmpltShowAsTip : 1;
     111             : 
     112             :     bool bAFormatDelSpacesAtSttEnd : 1;
     113             :     bool bAFormatDelSpacesBetweenLines : 1;
     114             :     bool bAFormatByInpDelSpacesAtSttEnd : 1;
     115             :     bool bAFormatByInpDelSpacesBetweenLines : 1;
     116             : 
     117             :     bool bAutoCmpltKeepList : 1;
     118             : 
     119             :     // some dummies for any new options
     120             :     bool bDummy6 : 1,
     121             :          bDummy7 : 1,
     122             :          bDummy8 : 1
     123             :          ;
     124             : 
     125             :     SvxSwAutoFormatFlags();
     126          60 :     SvxSwAutoFormatFlags( const SvxSwAutoFormatFlags& rAFFlags ) { *this = rAFFlags; }
     127             :     SvxSwAutoFormatFlags& operator=( const SvxSwAutoFormatFlags& );
     128             : };
     129             : 
     130             : #endif
     131             : 
     132             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11