/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef INCLUDED_SC_INC_CELLVALUES_HXX #define INCLUDED_SC_INC_CELLVALUES_HXX #include "address.hxx" #include class ScColumn; namespace svl { class SharedString; } namespace sc { struct CellValuesImpl; struct CellValueSpan { SCROW mnRow1; SCROW mnRow2; CellType meType; CellValueSpan( SCROW nRow1, SCROW nRow2, CellType eType ); }; /** * Think of this as a mini-ScColumn like storage that only stores cell * values in a column. */ class CellValues { CellValuesImpl* mpImpl; CellValues( const CellValues& ) SAL_DELETED_FUNCTION; CellValues& operator= ( const CellValues& ) SAL_DELETED_FUNCTION; public: CellValues(); ~CellValues(); /** * Transfer values from specified column. The transferred segment in the * source column becomes empty after this call. * * @param rCol source column to transfer values from. * @param nRow top row position in the source column. * @param nLen length of the segment to transfer. */ void transferFrom( ScColumn& rCol, SCROW nRow, size_t nLen ); void copyTo( ScColumn& rCol, SCROW nRow ) const; void swapNonEmpty( ScColumn& rCol ); void assign( const std::vector& rVals ); size_t size() const; void reset( size_t nSize ); void setValue( size_t nRow, double fVal ); void setValue( size_t nRow, const svl::SharedString& rStr ); void swap( CellValues& r ); std::vector getNonEmptySpans() const; private: void copyCellsTo( ScColumn& rCol, SCROW nRow ) const; void copyCellTextAttrsTo( ScColumn& rCol, SCROW nRow ) const; }; /** * Stores cell values for multiple tables. */ class TableValues { struct Impl; Impl* mpImpl; TableValues( const TableValues& ) SAL_DELETED_FUNCTION; TableValues& operator= ( const TableValues& ) SAL_DELETED_FUNCTION; public: TableValues(); TableValues( const ScRange& rRange ); ~TableValues(); const ScRange& getRange() const; /** * Swap the entire column. */ void swap( SCTAB nTab, SCCOL nCol, CellValues& rColValue ); /** * Swap non-empty blocks with the column storage. */ void swapNonEmpty( SCTAB nTab, SCCOL nCol, ScColumn& rCol ); std::vector getNonEmptySpans( SCTAB nTab, SCCOL nCol ) const; void swap( TableValues& rOther ); }; } #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ collabora/co-24.04.4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-11-09Simplify and fix Java UNO API test makefilesJan-Marek Glogowski
Originally I just wanted to add the juh.jar to the list of jars of the UNO API tests, but this became tedious work, so after the first few files I decided to replace the similiar makefiles with a common define for the *_unoapi* tests. This patch adds two new make defines to be used used by Java UNO and UNO API tests: - gb_JunitTest_set_unoapi_test_defaults - gb_JunitTest_set_unoapi_test_class_and_jars The first one will deduce most defaults from the test name, but still allows to optionally override most settings. If a test doesn't match the default at all, the 2nd define still shares the common jar files and the main Java UNO class, so the second define adds these to your makefile. The real fix is to add juh.jar to gb_JunitTest_use_jars. Change-Id: I4342fdac5e31f85ea18fb4268e13c287a7adc2b7 Reviewed-on: https://gerrit.libreoffice.org/63118 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2015-05-29split toolkit unoapi test for performanceBjoern Michaelsen
- test previously took 3m18s here - slowest part is now 60s Change-Id: Ibbcdf9a7f408fcca189bcb7b182a864aea1f7159 Reviewed-on: https://gerrit.libreoffice.org/15958 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>