diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-09-09 07:31:32 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-09-09 07:31:32 +0000 |
commit | c24ab8def12f8a7a305e35d39c91976e345dd3b0 (patch) | |
tree | 019d5541f524e4f5691328f1d8b5f9f24e5a01a0 /sc/inc/clipparam.hxx | |
parent | fbb3c82a81750cf7744e25af48a3372b8aafbd53 (diff) |
CWS-TOOLING: integrate CWS koheimultirangecopy
2009-08-29 08:19:57 +0200 kohei r275558 : A bit of cleanup & comments.
2009-08-29 08:10:31 +0200 kohei r275557 : removed duplicated code block.
2009-08-29 07:30:33 +0200 kohei r275556 : #i104551# fixed it.
2009-08-28 17:23:28 +0200 kohei r275541 : #i104553# fixed a crash on pasting over existing data. This also fixes notes being destroyed as originally reported in the IZ entry.
2009-08-27 23:36:17 +0200 kohei r275510 : #i104550# fixed. All I had to do was to call MarkToSimple() before examining the geometry of the marked ranges.
2009-08-27 18:04:11 +0200 kohei r275501 : CWS-TOOLING: rebase CWS koheimultirangecopy to trunk@275331 (milestone: DEV300:m56)
2009-08-21 11:37:20 +0200 dr r275228 : #i10000# another wntmsci12 warning
2009-08-21 09:33:32 +0200 dr r275218 : #i10000# sunncc warnings
2009-08-20 20:01:15 +0200 kohei r275196 : Let's not initialize a variable with itself, which is not yet initialized. This was obviously a silly human error.
2009-08-05 23:24:16 +0200 kohei r274702 : correct error message on matrix fragment.
2009-08-05 20:00:12 +0200 kohei r274699 : removed header includes for indexmap.hxx.
2009-08-05 19:54:24 +0200 kohei r274698 : removed ScIndexMap entirely - we don't need this any more.
2009-08-05 19:53:01 +0200 kohei r274697 : Removed duplicated methods that use ScIndexMap. We should now use ScRangeData::IndexMap across the board.
2009-08-05 18:45:17 +0200 kohei r274695 : Refactored code to remove redundant ScDocument::CopyToClip method.
2009-07-21 18:03:54 +0200 kohei r274209 : #i25855# initial commit of the patch from ooo-build. It's buildable.
Diffstat (limited to 'sc/inc/clipparam.hxx')
-rw-r--r-- | sc/inc/clipparam.hxx | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/sc/inc/clipparam.hxx b/sc/inc/clipparam.hxx new file mode 100644 index 000000000000..896117bdef69 --- /dev/null +++ b/sc/inc/clipparam.hxx @@ -0,0 +1,91 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: document.hxx,v $ + * $Revision: 1.115.36.9 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SC_CLIPPARAM_HXX +#define SC_CLIPPARAM_HXX + +#include "rangelst.hxx" +#include "rangenam.hxx" + +#include <vector> + +/** + * This struct stores general clipboard parameters associated with a + * ScDocument instance created in clipboard mode. + */ +struct ScClipParam +{ + enum Direction { Unspecified, Column, Row }; + + ScRangeList maRanges; + Direction meDirection; + bool mbCutMode; + + ScClipParam(); + ScClipParam(const ScRange& rRange, bool bCutMode); + explicit ScClipParam(const ScClipParam& r); + + bool isMultiRange() const; + + /** + * Get the column size of a pasted range. Note that when the range is + * non-contiguous, we first compress all individual ranges into a single + * range, and the size of that compressed range is returned. + */ + SCCOL getPasteColSize(); + + /** + * Same as the above method, but returns the row size of the compressed + * range. + */ + SCROW getPasteRowSize(); + + /** + * Return a single range that encompasses all individual ranges. + */ + ScRange getWholeRange() const; + + void transpose(); +}; + +// ============================================================================ + +struct ScClipRangeNameData +{ + ScRangeData::IndexMap maRangeMap; + ::std::vector<ScRangeData*> mpRangeNames; + bool mbReplace; + + ScClipRangeNameData(); + ~ScClipRangeNameData(); + void insert(sal_uInt16 nOldIndex, sal_uInt16 nNewIndex); +}; + +#endif |