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