1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
12 #include <sal/config.h>
14 #include <rtl/ref.hxx>
15 #include <rtl/ustring.hxx>
16 #include <vcl/timer.hxx>
17 #include <address.hxx>
21 #include <documentstreamaccess.hxx>
27 namespace datastreams
{
34 DataStream(const DataStream
&) = delete;
35 const DataStream
& operator=(const DataStream
&) = delete;
54 Cell( const Cell
& r
);
60 std::vector
<Cell
> maCells
;
62 typedef std::vector
<Line
> LinesType
;
64 enum MoveType
{ NO_MOVE
, RANGE_DOWN
, MOVE_DOWN
, MOVE_UP
};
66 static void MakeToolbarVisible();
67 static DataStream
* Set(ScDocShell
*pShell
, const OUString
& rURL
, const ScRange
& rRange
,
68 sal_Int32 nLimit
, MoveType eMove
);
71 ScDocShell
*pShell
, const OUString
& rURL
, const ScRange
& rRange
,
72 sal_Int32 nLimit
, MoveType eMove
);
76 ScRange
GetRange() const;
77 const OUString
& GetURL() const { return msURL
; }
78 MoveType
GetMove() const { return meOrigMove
;}
79 bool IsRefreshOnEmptyLine() const { return mbRefreshOnEmptyLine
;}
82 const OUString
& rURL
, const ScRange
& rRange
, sal_Int32 nLimit
,
89 void SetRefreshOnEmptyLine( bool bVal
);
97 DECL_LINK( ImportTimerHdl
, Timer
*, void );
100 ScDocShell
* mpDocShell
;
101 DocumentStreamAccess maDocAccess
;
103 MoveType meOrigMove
; // Initial move setting. This one gets saved to file.
104 MoveType meMove
; // move setting during streaming, which may change in the middle.
107 bool mbRefreshOnEmptyLine
;
108 std::optional
<LinesType
> moLines
;
110 size_t mnLinesSinceRefresh
;
111 double mfLastRefreshTime
;
113 ScRange maStartRange
;
118 rtl::Reference
<datastreams::ReaderThread
> mxReaderThread
;
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */