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 :
10 : #include <rtfskipdestination.hxx>
11 : #include <osl/diagnose.h>
12 : #include <sal/log.hxx>
13 :
14 : namespace writerfilter
15 : {
16 : namespace rtftok
17 : {
18 :
19 183512 : RTFSkipDestination::RTFSkipDestination(RTFListener& rImport)
20 : : m_rImport(rImport),
21 : m_bParsed(true),
22 183512 : m_bReset(true)
23 : {
24 183512 : }
25 :
26 183512 : RTFSkipDestination::~RTFSkipDestination()
27 : {
28 183512 : if (m_rImport.getSkipUnknown() && m_bReset)
29 : {
30 3138 : if (!m_bParsed)
31 : {
32 : SAL_INFO("writerfilter", OSL_THIS_FUNC << ": skipping destination");
33 1364 : m_rImport.setDestinationState(DESTINATION_SKIP);
34 : }
35 3138 : m_rImport.setSkipUnknown(false);
36 : }
37 183512 : }
38 :
39 19130 : void RTFSkipDestination::setParsed(bool bParsed)
40 : {
41 19130 : m_bParsed = bParsed;
42 19130 : }
43 :
44 3142 : void RTFSkipDestination::setReset(bool bReset)
45 : {
46 3142 : m_bReset = bReset;
47 3142 : }
48 :
49 : } // namespace rtftok
50 : } // namespace writerfilter
51 :
52 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|