LCOV - code coverage report
Current view: top level - writerfilter/source/rtftok - rtfskipdestination.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 16 16 100.0 %
Date: 2012-08-25 Functions: 6 7 85.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 11 14 78.6 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * Version: MPL 1.1 / GPLv3+ / LGPLv3+
       3                 :            :  *
       4                 :            :  * The contents of this file are subject to the Mozilla Public License Version
       5                 :            :  * 1.1 (the "License"); you may not use this file except in compliance with
       6                 :            :  * the License. You may obtain a copy of the License at
       7                 :            :  * http://www.mozilla.org/MPL/
       8                 :            :  *
       9                 :            :  * Software distributed under the License is distributed on an "AS IS" basis,
      10                 :            :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      11                 :            :  * for the specific language governing rights and limitations under the
      12                 :            :  * License.
      13                 :            :  *
      14                 :            :  * The Initial Developer of the Original Code is
      15                 :            :  *       Miklos Vajna <vmiklos@frugalware.org>
      16                 :            :  * Portions created by the Initial Developer are Copyright (C) 2011 the
      17                 :            :  * Initial Developer. All Rights Reserved.
      18                 :            :  *
      19                 :            :  * Contributor(s):
      20                 :            :  *
      21                 :            :  * Alternatively, the contents of this file may be used under the terms of
      22                 :            :  * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
      23                 :            :  * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
      24                 :            :  * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
      25                 :            :  * instead of those above.
      26                 :            :  */
      27                 :            : 
      28                 :            : #include <rtfskipdestination.hxx>
      29                 :            : 
      30                 :            : namespace writerfilter {
      31                 :            : namespace rtftok {
      32                 :            : 
      33                 :     147642 : RTFSkipDestination::RTFSkipDestination(RTFDocumentImpl& rImport)
      34                 :            :     : m_rImport(rImport),
      35                 :            :     m_bParsed(true),
      36                 :     147642 :     m_bReset(true)
      37                 :            : {
      38                 :     147642 : }
      39                 :            : 
      40                 :     147642 : RTFSkipDestination::~RTFSkipDestination()
      41                 :            : {
      42 [ +  + ][ +  + ]:     147642 :     if (m_rImport.getSkipUnknown() && m_bReset)
                 [ +  + ]
      43                 :            :     {
      44         [ +  + ]:       1479 :         if (!m_bParsed)
      45                 :            :         {
      46                 :            :             SAL_INFO("writerfilter", OSL_THIS_FUNC << ": skipping destination");
      47                 :        723 :             m_rImport.getState().nDestinationState = DESTINATION_SKIP;
      48                 :            :         }
      49                 :       1479 :         m_rImport.setSkipUnknown(false);
      50                 :            :     }
      51         [ -  + ]:     147642 : }
      52                 :            : 
      53                 :      12978 : void RTFSkipDestination::setParsed(bool bParsed)
      54                 :            : {
      55                 :      12978 :     m_bParsed = bParsed;
      56                 :      12978 : }
      57                 :            : 
      58                 :       1479 : void RTFSkipDestination::setReset(bool bReset)
      59                 :            : {
      60                 :       1479 :     m_bReset = bReset;
      61                 :       1479 : }
      62                 :            : 
      63                 :            : } // namespace rtftok
      64 [ +  - ][ +  - ]:         60 : } // namespace writerfilter
      65                 :            : 
      66                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10