Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / sc / inc / clipcontext.hxx
blobdd63ba6c36c6f82da1c0622c9408449ab2463f0d
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 SC_CLIPCONTEXT_HXX
11 #define SC_CLIPCONTEXT_HXX
13 #include "address.hxx"
15 #include <vector>
16 #include <boost/unordered_map.hpp>
17 #include <boost/noncopyable.hpp>
18 #include <boost/scoped_ptr.hpp>
20 class ScDocument;
22 namespace sc {
24 struct ColumnBlockPosition;
25 class ColumnBlockPositionSet;
27 class ClipContextBase : boost::noncopyable
29 boost::scoped_ptr<ColumnBlockPositionSet> mpSet;
31 ClipContextBase(); // disabled
33 public:
34 ClipContextBase(ScDocument& rDoc);
35 virtual ~ClipContextBase();
37 ColumnBlockPosition* getBlockPosition(SCTAB nTab, SCCOL nCol);
40 class CopyFromClipContext : public ClipContextBase
42 SCTAB mnTabStart;
43 SCTAB mnTabEnd;
44 ScDocument* mpRefUndoDoc;
45 ScDocument* mpClipDoc;
46 sal_uInt16 mnInsertFlag;
47 bool mbAsLink:1;
48 bool mbSkipAttrForEmptyCells:1;
49 bool mbCloneNotes;
51 CopyFromClipContext(); // disabled
53 public:
54 CopyFromClipContext(ScDocument& rDoc,
55 ScDocument* pRefUndoDoc, ScDocument* pClipDoc, sal_uInt16 nInsertFlag,
56 bool bAsLink, bool bSkipAttrForEmptyCells);
58 virtual ~CopyFromClipContext();
60 void setTabRange(SCTAB nStart, SCTAB nEnd);
62 SCTAB getTabStart() const;
63 SCTAB getTabEnd() const;
65 ScDocument* getUndoDoc();
66 ScDocument* getClipDoc();
67 sal_uInt16 getInsertFlag() const;
68 bool isAsLink() const;
69 bool isSkipAttrForEmptyCells() const;
70 bool isCloneNotes() const;
73 class CopyToClipContext : public ClipContextBase
75 bool mbKeepScenarioFlags:1;
76 bool mbCloneNotes:1;
78 CopyToClipContext(); // disabled
80 public:
81 CopyToClipContext(ScDocument& rDoc, bool bKeepScenarioFlags, bool bCloneNotes);
82 virtual ~CopyToClipContext();
84 bool isKeepScenarioFlags() const;
85 bool isCloneNotes() const;
88 class CopyToDocContext : public ClipContextBase
90 public:
91 CopyToDocContext(ScDocument& rDoc);
92 virtual ~CopyToDocContext();
95 class MixDocContext : public ClipContextBase
97 public:
98 MixDocContext(ScDocument& rDoc);
99 virtual ~MixDocContext();
104 #endif
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */