Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / core / inc / ModelTraverser.hxx
blobf3c6acb9c6dd13bcd495a2f1998f87de0e344b38
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 */
11 #pragma once
13 #include <doc.hxx>
15 class SwNode;
16 class SdrObject;
18 namespace sw
20 class SW_DLLPUBLIC ModelTraverseHandler
22 public:
23 virtual ~ModelTraverseHandler() {}
25 virtual void handleNode(SwNode* pNode) = 0;
26 virtual void handleSdrObject(SdrObject* pObject) = 0;
29 class ModelTraverser
31 private:
32 std::vector<std::shared_ptr<ModelTraverseHandler>> mpNodeHandler;
33 SwDoc* m_pDoc;
35 public:
36 ModelTraverser(SwDoc* pDoc)
37 : m_pDoc(pDoc)
41 void traverse();
43 void addNodeHandler(std::shared_ptr<ModelTraverseHandler> pHandler)
45 mpNodeHandler.push_back(pHandler);
49 } // end sw namespace
51 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */