LibreOffice Module sw (master) 1
ModelTraverser.hxx
Go to the documentation of this file.
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
11#pragma once
12
13#include <doc.hxx>
14
15class SwNode;
16class SdrObject;
17
18namespace sw
19{
21{
22public:
24
25 virtual void handleNode(SwNode* pNode) = 0;
26 virtual void handleSdrObject(SdrObject* pObject) = 0;
27};
28
30{
31private:
32 std::vector<std::shared_ptr<ModelTraverseHandler>> mpNodeHandler;
34
35public:
37 : m_pDoc(pDoc)
38 {
39 }
40
41 void traverse();
42
43 void addNodeHandler(std::shared_ptr<ModelTraverseHandler> pHandler)
44 {
45 mpNodeHandler.push_back(pHandler);
46 }
47};
48
49} // end sw namespace
50
51/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: doc.hxx:197
Base class of the Writer document model elements.
Definition: node.hxx:98
virtual void handleNode(SwNode *pNode)=0
virtual void handleSdrObject(SdrObject *pObject)=0
ModelTraverser(SwDoc *pDoc)
std::vector< std::shared_ptr< ModelTraverseHandler > > mpNodeHandler
void addNodeHandler(std::shared_ptr< ModelTraverseHandler > pHandler)
Dialog to specify the properties of date form field.
#define SW_DLLPUBLIC
Definition: swdllapi.h:28