LibreOffice Module sc (master)  1
eeimport.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_SC_SOURCE_FILTER_INC_EEIMPORT_HXX
20 #define INCLUDED_SC_SOURCE_FILTER_INC_EEIMPORT_HXX
21 
22 #include <memory>
23 #include <address.hxx>
24 #include <filter.hxx>
25 #include <map>
26 
27 class ScDocument;
28 class ScEEParser;
29 class ScTabEditEngine;
30 class SvStream;
31 
33 
34 typedef std::map<SCROW, long> RowHeightMap;
35 
36 class ScEEImport : public ScEEAbsImport
37 {
38 protected:
41  std::unique_ptr<ScTabEditEngine>
43  std::unique_ptr<ScEEParser> // needs mpEngine
44  mpParser; // must reset before mpEngine resets
46 
47  bool GraphicSize( SCCOL nCol, SCROW nRow,
48  ScEEParseEntry* );
49  void InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab,
50  ScEEParseEntry* );
51 public:
52  ScEEImport( ScDocument* pDoc, const ScRange& rRange );
53  virtual ~ScEEImport() override;
54 
55  virtual ErrCode Read( SvStream& rStream, const OUString& rBaseURL ) override;
56  virtual ScRange GetRange() override { return maRange; }
57  virtual void WriteToDocument( bool bSizeColsRows = false,
58  double nOutputFactor = 1.0,
59  SvNumberFormatter* pFormatter = nullptr,
60  bool bConvertDate = true ) override;
61 };
62 
63 #endif
64 
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool GraphicSize(SCCOL nCol, SCROW nRow, ScEEParseEntry *)
Definition: eeimpars.cxx:481
ScDocument * mpDoc
Definition: eeimport.hxx:40
std::unique_ptr< ScTabEditEngine > mpEngine
Definition: eeimport.hxx:42
ScEEImport(ScDocument *pDoc, const ScRange &rRange)
Definition: eeimpars.cxx:57
sal_Int16 SCCOL
Definition: types.hxx:22
std::unique_ptr< ScEEParser > mpParser
Definition: eeimport.hxx:44
RowHeightMap maRowHeights
Definition: eeimport.hxx:45
sal_Int32 SCROW
Definition: types.hxx:18
void InsertGraphic(SCCOL nCol, SCROW nRow, SCTAB nTab, ScEEParseEntry *)
Definition: eeimpars.cxx:544
virtual void WriteToDocument(bool bSizeColsRows=false, double nOutputFactor=1.0, SvNumberFormatter *pFormatter=nullptr, bool bConvertDate=true) override
Definition: eeimpars.cxx:111
ScRange maRange
Definition: eeimport.hxx:39
std::map< SCROW, long > RowHeightMap
Definition: eeimport.hxx:32
virtual ~ScEEImport() override
Definition: eeimpars.cxx:68
virtual ErrCode Read(SvStream &rStream, const OUString &rBaseURL) override
Definition: eeimpars.cxx:74
sal_Int16 SCTAB
Definition: types.hxx:23
virtual ScRange GetRange() override
Definition: eeimport.hxx:56