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 : namespace rtftok {
16 :
17 62028 : RTFSkipDestination::RTFSkipDestination(RTFListener& rImport)
18 : : m_rImport(rImport),
19 : m_bParsed(true),
20 62028 : m_bReset(true)
21 : {
22 62028 : }
23 :
24 62028 : RTFSkipDestination::~RTFSkipDestination()
25 : {
26 62028 : if (m_rImport.getSkipUnknown() && m_bReset)
27 : {
28 775 : if (!m_bParsed)
29 : {
30 : SAL_INFO("writerfilter", OSL_THIS_FUNC << ": skipping destination");
31 352 : m_rImport.setDestinationState(DESTINATION_SKIP);
32 : }
33 775 : m_rImport.setSkipUnknown(false);
34 : }
35 62028 : }
36 :
37 5691 : void RTFSkipDestination::setParsed(bool bParsed)
38 : {
39 5691 : m_bParsed = bParsed;
40 5691 : }
41 :
42 775 : void RTFSkipDestination::setReset(bool bReset)
43 : {
44 775 : m_bReset = bReset;
45 775 : }
46 :
47 : } // namespace rtftok
48 : } // namespace writerfilter
49 :
50 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|