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/.
10 #ifndef SC_CLIPCONTEXT_HXX
11 #define SC_CLIPCONTEXT_HXX
13 #include "address.hxx"
16 #include <boost/unordered_map.hpp>
17 #include <boost/noncopyable.hpp>
18 #include <boost/scoped_ptr.hpp>
24 struct ColumnBlockPosition
;
25 class ColumnBlockPositionSet
;
27 class ClipContextBase
: boost::noncopyable
29 boost::scoped_ptr
<ColumnBlockPositionSet
> mpSet
;
31 ClipContextBase(); // disabled
34 ClipContextBase(ScDocument
& rDoc
);
35 virtual ~ClipContextBase();
37 ColumnBlockPosition
* getBlockPosition(SCTAB nTab
, SCCOL nCol
);
40 class CopyFromClipContext
: public ClipContextBase
44 ScDocument
* mpRefUndoDoc
;
45 ScDocument
* mpClipDoc
;
46 sal_uInt16 mnInsertFlag
;
48 bool mbSkipAttrForEmptyCells
:1;
51 CopyFromClipContext(); // disabled
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;
78 CopyToClipContext(); // disabled
81 CopyToClipContext(ScDocument
& rDoc
, bool bKeepScenarioFlags
, bool bCloneNotes
);
82 virtual ~CopyToClipContext();
84 bool isKeepScenarioFlags() const;
85 bool isCloneNotes() const;
88 class CopyToDocContext
: public ClipContextBase
91 CopyToDocContext(ScDocument
& rDoc
);
92 virtual ~CopyToDocContext();
95 class MixDocContext
: public ClipContextBase
98 MixDocContext(ScDocument
& rDoc
);
99 virtual ~MixDocContext();
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */