LibreOffice Module sc (master)  1
revisionfragment.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 #ifndef INCLUDED_SC_OOX_XLS_REVISIONFRAGMENT_HXX
11 #define INCLUDED_SC_OOX_XLS_REVISIONFRAGMENT_HXX
12 
13 #include "excelhandlers.hxx"
14 #include <memory>
15 
16 class ScChangeTrack;
17 
18 namespace oox::xls {
19 
21 {
22  struct Impl;
23  std::unique_ptr<Impl> mpImpl;
24 
25 public:
26  explicit RevisionHeadersFragment(
27  const WorkbookHelper& rHelper, const OUString& rFragmentPath );
28 
29  virtual ~RevisionHeadersFragment() override;
30 
31 protected:
33  sal_Int32 nElement, const AttributeList& rAttribs ) override;
34 
35  virtual void onStartElement( const AttributeList& rAttribs ) override;
36  virtual void onCharacters( const OUString& rChars ) override;
37  virtual void onEndElement() override;
38 
39  virtual void finalizeImport() override;
40 
41 private:
42  void importHeader( const AttributeList& rAttribs );
43 };
44 
46 {
47  struct Impl;
48  std::unique_ptr<Impl> mpImpl;
49 
50 public:
51  explicit RevisionLogFragment(
52  const WorkbookHelper& rHelper, const OUString& rFragmentPath, ScChangeTrack& rChangeTrack );
53 
54  virtual ~RevisionLogFragment() override;
55 
56 protected:
58  sal_Int32 nElement, const AttributeList& rAttribs ) override;
59 
60  virtual void onStartElement( const AttributeList& rAttribs ) override;
61  virtual void onCharacters( const OUString& rChars ) override;
62  virtual void onEndElement() override;
63 
64  virtual void finalizeImport() override;
65 
66 private:
67  void importCommon( const AttributeList& rAttribs );
68  void importRcc( const AttributeList& rAttribs );
69  void importRrc( const AttributeList& rAttribs );
70 
71  void pushRevision();
72 };
73 
74 }
75 
76 #endif
77 
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
79 
Helper class to provide access to global workbook data.
void importRrc(const AttributeList &rAttribs)
void importRcc(const AttributeList &rAttribs)
virtual void onEndElement() override
virtual void onStartElement(const AttributeList &rAttribs) override
virtual oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Fragment handler derived from the WorkbookHelper helper class.
RevisionHeadersFragment(const WorkbookHelper &rHelper, const OUString &rFragmentPath)
virtual void onCharacters(const OUString &rChars) override
virtual void finalizeImport() override
virtual oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
RevisionLogFragment(const WorkbookHelper &rHelper, const OUString &rFragmentPath, ScChangeTrack &rChangeTrack)
virtual void finalizeImport() override
virtual void onCharacters(const OUString &rChars) override
virtual void onEndElement() override
virtual ~RevisionLogFragment() override
virtual void onStartElement(const AttributeList &rAttribs) override
void importHeader(const AttributeList &rAttribs)
std::unique_ptr< Impl > mpImpl
void importCommon(const AttributeList &rAttribs)