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 #include "clipcontext.hxx"
11 #include "document.hxx"
12 #include "mtvelements.hxx"
16 ClipContextBase::ClipContextBase(ScDocument
& rDoc
) :
17 mpSet(new ColumnBlockPositionSet(rDoc
)) {}
19 ClipContextBase::~ClipContextBase() {}
21 ColumnBlockPosition
* ClipContextBase::getBlockPosition(SCTAB nTab
, SCCOL nCol
)
23 return mpSet
->getBlockPosition(nTab
, nCol
);
26 CopyFromClipContext::CopyFromClipContext(ScDocument
& rDoc
,
27 ScDocument
* pRefUndoDoc
, ScDocument
* pClipDoc
, sal_uInt16 nInsertFlag
,
28 bool bAsLink
, bool bSkipAttrForEmptyCells
) :
29 ClipContextBase(rDoc
),
30 mnTabStart(-1), mnTabEnd(-1),
31 mpRefUndoDoc(pRefUndoDoc
), mpClipDoc(pClipDoc
), mnInsertFlag(nInsertFlag
),
32 mbAsLink(bAsLink
), mbSkipAttrForEmptyCells(bSkipAttrForEmptyCells
),
33 mbCloneNotes (mnInsertFlag
& (IDF_NOTE
|IDF_ADDNOTES
) )
37 CopyFromClipContext::~CopyFromClipContext()
41 void CopyFromClipContext::setTabRange(SCTAB nStart
, SCTAB nEnd
)
47 SCTAB
CopyFromClipContext::getTabStart() const
52 SCTAB
CopyFromClipContext::getTabEnd() const
57 ScDocument
* CopyFromClipContext::getUndoDoc()
62 ScDocument
* CopyFromClipContext::getClipDoc()
67 sal_uInt16
CopyFromClipContext::getInsertFlag() const
72 bool CopyFromClipContext::isAsLink() const
77 bool CopyFromClipContext::isSkipAttrForEmptyCells() const
79 return mbSkipAttrForEmptyCells
;
82 bool CopyFromClipContext::isCloneNotes() const
87 CopyToClipContext::CopyToClipContext(
88 ScDocument
& rDoc
, bool bKeepScenarioFlags
, bool bCloneNotes
) :
89 ClipContextBase(rDoc
), mbKeepScenarioFlags(bKeepScenarioFlags
), mbCloneNotes(bCloneNotes
) {}
91 CopyToClipContext::~CopyToClipContext() {}
93 bool CopyToClipContext::isKeepScenarioFlags() const
95 return mbKeepScenarioFlags
;
98 bool CopyToClipContext::isCloneNotes() const
103 CopyToDocContext::CopyToDocContext(ScDocument
& rDoc
) : ClipContextBase(rDoc
) {}
104 CopyToDocContext::~CopyToDocContext() {}
106 MixDocContext::MixDocContext(ScDocument
& rDoc
) : ClipContextBase(rDoc
) {}
107 MixDocContext::~MixDocContext() {}
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */