LibreOffice Module sw (master)  1
fltini.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  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #ifndef INCLUDED_SW_SOURCE_FILTER_INC_FLTINI_HXX
20 #define INCLUDED_SW_SOURCE_FILTER_INC_FLTINI_HXX
21 
22 #include <shellio.hxx>
23 
24 class SwNumRuleTable;
25 class SwDoc;
26 class SwTextNode;
27 class SwNumRule;
28 class SwNodeIndex;
29 
30 // the special readers
31 
32 class HTMLReader: public Reader
33 {
34  // we don't want to have the streams/storages open
35  virtual bool SetStrmStgPtr() override;
36  virtual ErrCode Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &) override;
37  virtual OUString GetTemplateName(SwDoc& rDoc) const override;
38 
40  void SetupFilterOptions();
41 
42  OUString m_aNamespace;
43 public:
44  HTMLReader();
45 };
46 
47 class XMLReader : public Reader
48 {
49  virtual ErrCode Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &) override;
50 public:
51  virtual SwReaderType GetReaderType() override;
52 
53  XMLReader();
54 
55  // read the sections of the document, which is equal to the medium.
56  // returns the count of it
57  virtual size_t GetSectionList( SfxMedium& rMedium,
58  std::vector<OUString>& rStrings) const override;
59 };
60 
61 // the special writers
62 
63 void GetWW8Writer( const OUString&, const OUString&, WriterRef& );
64 
65 // Mapping of the LRSpaces in the currently imported document.
66 // The foreign filters always provide absolute values for the levels of
67 // a NumRule. We are now processing relative values related to the LR-Space-Item
68 // though. The consequence of this is that, for all paragraphs, the indentations
69 // of the NumRule must be subtracted from the paragraph indentation.
71 {
72  std::unique_ptr<SwNumRuleTable> pNumRuleTable; // list of all named NumRules
73 
74 public:
75  SwRelNumRuleSpaces( SwDoc const & rDoc, bool bNewDoc );
77 };
78 
79 
80 // Get size of fly (if 'automatic' in WW) and check if not too small
81 SW_DLLPUBLIC void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
82  SwTwips nPageWidth);
83 
84 #endif
85 
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
HTMLReader()
Definition: swhtml.cxx:162
virtual OUString GetTemplateName(SwDoc &rDoc) const override
Definition: swhtml.cxx:167
SW_DLLPUBLIC void CalculateFlySize(SfxItemSet &rFlySet, const SwNodeIndex &rAnchor, SwTwips nPageWidth)
Definition: fltini.cxx:304
virtual ErrCode Read(SwDoc &, const OUString &rBaseURL, SwPaM &, const OUString &) override
Definition: swhtml.cxx:207
virtual SwReaderType GetReaderType() override
Definition: swxml.cxx:131
void GetWW8Writer(const OUString &, const OUString &, WriterRef &)
Definition: fltini.cxx:703
virtual ErrCode Read(SwDoc &, const OUString &rBaseURL, SwPaM &, const OUString &) override
Definition: swxml.cxx:486
Definition: doc.hxx:185
long SwTwips
Definition: swtypes.hxx:49
XMLReader()
Definition: swxml.cxx:127
std::unique_ptr< SwNumRuleTable > pNumRuleTable
Definition: fltini.hxx:72
virtual size_t GetSectionList(SfxMedium &rMedium, std::vector< OUString > &rStrings) const override
Definition: swxml.cxx:987
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
virtual bool SetStrmStgPtr() override
Definition: swhtml.cxx:193
Marks a node in the document model.
Definition: ndindex.hxx:31
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
SwReaderType
Definition: shellio.hxx:183
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
void SetupFilterOptions()
Parse FilterOptions passed to the importer.
Definition: swhtml.cxx:5542
OUString m_aNamespace
Definition: fltini.hxx:42