Version 6.1.0.2, tag libreoffice-6.1.0.2
[LibreOffice.git] / sc / inc / documentstreamaccess.hxx
blob0108958e475ceb59b14fc5dec20d98fcb6098291
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #ifndef INCLUDED_SC_INC_DOCUMENTSTREAMACCESS_HXX
11 #define INCLUDED_SC_INC_DOCUMENTSTREAMACCESS_HXX
13 #include <rtl/ustring.hxx>
14 #include <memory>
16 class ScDocument;
17 class ScAddress;
18 class ScRange;
20 namespace sc {
22 struct DocumentStreamAccessImpl;
24 /**
25 * Provides methods to allow direct shifting of document content without
26 * broadcasting or shifting of broadcaster positions.
28 class DocumentStreamAccess
30 std::unique_ptr<DocumentStreamAccessImpl> mpImpl;
32 public:
33 DocumentStreamAccess( ScDocument& rDoc );
34 ~DocumentStreamAccess();
36 void setNumericCell( const ScAddress& rPos, double fVal );
37 void setStringCell( const ScAddress& rPos, const OUString& rStr );
39 /**
40 * Clear its internal state, and more importantly all the block position
41 * hints currently held.
43 void reset();
45 /**
46 * Pop the top row inside specified range, shift all the other rows up by
47 * one, then set the bottom row empty.
49 void shiftRangeUp( const ScRange& rRange );
51 /**
52 * Top the bottom row inside specified range, shift all the other rows
53 * above downward by one by inserting an empty row at the top.
55 void shiftRangeDown( const ScRange& rRange );
60 #endif
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */