summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorPhilipp Hofer <philipp.hofer@protonmail.com>2020-11-12 13:12:24 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-11-19 01:36:55 +0100
commit6ceb1d0f2e23749fe03fab08ec338ba4d7782173 (patch)
tree44e69c2fdf12594169ca3a052224368faa967185 /sc/inc
parent695280feb90729fde1a7ecf1c409ae16f8281a46 (diff)
tdf#123936 Formatting files in module sc with clang-format
Change-Id: I66cafda863e3e1e4559a57289c09925d68b0719c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105701 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/bulkdatahint.hxx13
-rw-r--r--sc/inc/calcconfig.hxx24
-rw-r--r--sc/inc/celltextattr.hxx7
-rw-r--r--sc/inc/cellvalues.hxx53
-rw-r--r--sc/inc/chartarr.hxx20
-rw-r--r--sc/inc/clipoptions.hxx5
-rw-r--r--sc/inc/columniterator.hxx10
-rw-r--r--sc/inc/columnset.hxx7
-rw-r--r--sc/inc/datamapper.hxx10
-rw-r--r--sc/inc/datastreamgettime.hxx8
-rw-r--r--sc/inc/documentstreamaccess.hxx15
-rw-r--r--sc/inc/dpfilteredcache.hxx35
-rw-r--r--sc/inc/dpresfilter.hxx24
-rw-r--r--sc/inc/edittextiterator.hxx7
-rw-r--r--sc/inc/formulaiter.hxx5
-rw-r--r--sc/inc/generalfunction.hxx14
-rw-r--r--sc/inc/listenercontext.hxx27
-rw-r--r--sc/inc/listenerquery.hxx21
-rw-r--r--sc/inc/macromgr.hxx8
-rw-r--r--sc/inc/mid.h8
-rw-r--r--sc/inc/numformat.hxx9
-rw-r--r--sc/inc/pageuno.hxx6
-rw-r--r--sc/inc/reffind.hxx8
-rw-r--r--sc/inc/refreshtimerprotector.hxx4
-rw-r--r--sc/inc/scdllapi.h4
-rw-r--r--sc/inc/scopetools.hxx25
-rw-r--r--sc/inc/segmenttree.hxx49
-rw-r--r--sc/inc/stylehelper.hxx4
-rw-r--r--sc/inc/tokenstringcontext.hxx21
-rw-r--r--sc/inc/unitconv.hxx17
-rw-r--r--sc/inc/userlist.hxx20
-rw-r--r--sc/inc/zforauto.hxx12
32 files changed, 250 insertions, 250 deletions
diff --git a/sc/inc/bulkdatahint.hxx b/sc/inc/bulkdatahint.hxx
index 6ff94227484a..d587472b5eb2 100644
--- a/sc/inc/bulkdatahint.hxx
+++ b/sc/inc/bulkdatahint.hxx
@@ -15,8 +15,8 @@
class ScDocument;
-namespace sc {
-
+namespace sc
+{
class ColumnSpanSet;
class BulkDataHint final : public SfxHint
@@ -24,19 +24,18 @@ class BulkDataHint final : public SfxHint
struct Impl;
std::unique_ptr<Impl> mpImpl;
- BulkDataHint( const BulkDataHint& ) = delete;
- BulkDataHint& operator= ( const BulkDataHint& ) = delete;
+ BulkDataHint(const BulkDataHint&) = delete;
+ BulkDataHint& operator=(const BulkDataHint&) = delete;
public:
- BulkDataHint( ScDocument& rDoc, SfxHintId nHintId );
+ BulkDataHint(ScDocument& rDoc, SfxHintId nHintId);
virtual ~BulkDataHint() override;
- void setSpans( const ColumnSpanSet* pSpans );
+ void setSpans(const ColumnSpanSet* pSpans);
const ColumnSpanSet* getSpans() const;
ScDocument& getDoc();
};
-
}
#endif
diff --git a/sc/inc/calcconfig.hxx b/sc/inc/calcconfig.hxx
index 29d926c459c4..9781aa7414fc 100644
--- a/sc/inc/calcconfig.hxx
+++ b/sc/inc/calcconfig.hxx
@@ -45,22 +45,22 @@ struct SC_DLLPUBLIC ScCalcConfig
// from most stringent to most relaxed
enum class StringConversion
{
- ILLEGAL, ///< =1+"1" or =1+"x" give #VALUE!
- ZERO, ///< =1+"1" or =1+"x" give 1
- UNAMBIGUOUS, ///< =1+"1" gives 2, but =1+"1.000" or =1+"x" give #VALUE!
- LOCALE ///< =1+"1.000" may be 2 or 1001 ... =1+"x" gives #VALUE!
+ ILLEGAL, ///< =1+"1" or =1+"x" give #VALUE!
+ ZERO, ///< =1+"1" or =1+"x" give 1
+ UNAMBIGUOUS, ///< =1+"1" gives 2, but =1+"1.000" or =1+"x" give #VALUE!
+ LOCALE ///< =1+"1.000" may be 2 or 1001 ... =1+"x" gives #VALUE!
};
formula::FormulaGrammar::AddressConvention meStringRefAddressSyntax;
StringConversion meStringConversion;
- bool mbEmptyStringAsZero:1;
- bool mbHasStringRefSyntax:1;
+ bool mbEmptyStringAsZero : 1;
+ bool mbHasStringRefSyntax : 1;
static bool isOpenCLEnabled();
static bool isThreadingEnabled();
static ForceCalculationType getForceCalculationType();
- bool mbOpenCLSubsetOnly:1;
- bool mbOpenCLAutoSelect:1;
+ bool mbOpenCLSubsetOnly : 1;
+ bool mbOpenCLAutoSelect : 1;
OUString maOpenCLDevice;
sal_Int32 mnOpenCLMinimumFormulaGroupSize;
@@ -73,11 +73,11 @@ struct SC_DLLPUBLIC ScCalcConfig
void setOpenCLConfigToDefault();
void reset();
- void MergeDocumentSpecific( const ScCalcConfig& r );
- void SetStringRefSyntax( formula::FormulaGrammar::AddressConvention eConv );
+ void MergeDocumentSpecific(const ScCalcConfig& r);
+ void SetStringRefSyntax(formula::FormulaGrammar::AddressConvention eConv);
- bool operator== (const ScCalcConfig& r) const;
- bool operator!= (const ScCalcConfig& r) const;
+ bool operator==(const ScCalcConfig& r) const;
+ bool operator!=(const ScCalcConfig& r) const;
};
OUString ScOpCodeSetToSymbolicString(const ScCalcConfig::OpCodeSet& rOpCodes);
diff --git a/sc/inc/celltextattr.hxx b/sc/inc/celltextattr.hxx
index 0e9c34c4cf24..eb24101b3d0f 100644
--- a/sc/inc/celltextattr.hxx
+++ b/sc/inc/celltextattr.hxx
@@ -13,16 +13,15 @@
#include <sal/types.h>
#include <svl/languageoptions.hxx>
-namespace sc {
-
+namespace sc
+{
struct CellTextAttr
{
- sal_uInt16 mnTextWidth;
+ sal_uInt16 mnTextWidth;
SvtScriptType mnScriptType;
CellTextAttr();
};
-
}
#endif
diff --git a/sc/inc/cellvalues.hxx b/sc/inc/cellvalues.hxx
index 5a405779328f..ff9088b211f2 100644
--- a/sc/inc/cellvalues.hxx
+++ b/sc/inc/cellvalues.hxx
@@ -17,14 +17,13 @@
class ScColumn;
class ScFormulaCell;
-namespace svl {
-
+namespace svl
+{
class SharedString;
-
}
-namespace sc {
-
+namespace sc
+{
struct CellValuesImpl;
struct CellValueSpan
@@ -32,7 +31,7 @@ struct CellValueSpan
SCROW mnRow1;
SCROW mnRow2;
- CellValueSpan( SCROW nRow1, SCROW nRow2 );
+ CellValueSpan(SCROW nRow1, SCROW nRow2);
};
/**
@@ -43,8 +42,8 @@ class CellValues
{
std::unique_ptr<CellValuesImpl> mpImpl;
- CellValues( const CellValues& ) = delete;
- CellValues& operator= ( const CellValues& ) = delete;
+ CellValues(const CellValues&) = delete;
+ CellValues& operator=(const CellValues&) = delete;
public:
CellValues();
@@ -58,27 +57,27 @@ public:
* @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 transferFrom(ScColumn& rCol, SCROW nRow, size_t nLen);
- void copyTo( ScColumn& rCol, SCROW nRow ) const;
- void swapNonEmpty( ScColumn& rCol );
+ void copyTo(ScColumn& rCol, SCROW nRow) const;
+ void swapNonEmpty(ScColumn& rCol);
- void assign( const std::vector<double>& rVals );
- void assign( const std::vector<ScFormulaCell*>& rVals );
+ void assign(const std::vector<double>& rVals);
+ void assign(const std::vector<ScFormulaCell*>& 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 reset(size_t nSize);
+ void setValue(size_t nRow, double fVal);
+ void setValue(size_t nRow, const svl::SharedString& rStr);
- void swap( CellValues& r );
+ void swap(CellValues& r);
std::vector<CellValueSpan> getNonEmptySpans() const;
private:
- void copyCellsTo( ScColumn& rCol, SCROW nRow ) const;
- void copyCellTextAttrsTo( ScColumn& rCol, SCROW nRow ) const;
+ void copyCellsTo(ScColumn& rCol, SCROW nRow) const;
+ void copyCellTextAttrsTo(ScColumn& rCol, SCROW nRow) const;
};
/**
@@ -90,13 +89,12 @@ class TableValues
std::unique_ptr<Impl> mpImpl;
- TableValues( const TableValues& ) = delete;
- TableValues& operator= ( const TableValues& ) = delete;
+ TableValues(const TableValues&) = delete;
+ TableValues& operator=(const TableValues&) = delete;
public:
-
TableValues();
- TableValues( const ScRange& rRange );
+ TableValues(const ScRange& rRange);
~TableValues();
const ScRange& getRange() const;
@@ -104,18 +102,17 @@ public:
/**
* Swap the entire column.
*/
- void swap( SCTAB nTab, SCCOL nCol, CellValues& rColValue );
+ void swap(SCTAB nTab, SCCOL nCol, CellValues& rColValue);
/**
* Swap non-empty blocks with the column storage.
*/
- void swapNonEmpty( SCTAB nTab, SCCOL nCol, ScColumn& rCol );
+ void swapNonEmpty(SCTAB nTab, SCCOL nCol, ScColumn& rCol);
- std::vector<CellValueSpan> getNonEmptySpans( SCTAB nTab, SCCOL nCol ) const;
+ std::vector<CellValueSpan> getNonEmptySpans(SCTAB nTab, SCCOL nCol) const;
- void swap( TableValues& rOther );
+ void swap(TableValues& rOther);
};
-
}
#endif
diff --git a/sc/inc/chartarr.hxx b/sc/inc/chartarr.hxx
index c35fc4a6e66e..94bfabcd55c1 100644
--- a/sc/inc/chartarr.hxx
+++ b/sc/inc/chartarr.hxx
@@ -50,12 +50,15 @@ public:
const OUString& GetColText(SCCOL nCol) const { return pColText[nCol]; }
const OUString& GetRowText(SCROW nRow) const { return pRowText[nRow]; }
double GetData(SCCOL nCol, SCROW nRow) const { return pData[nCol * nRowCnt + nRow]; }
- void SetData(SCCOL nCol, SCROW nRow, const double& rVal) { pData[nCol * nRowCnt + nRow] = rVal; }
+ void SetData(SCCOL nCol, SCROW nRow, const double& rVal)
+ {
+ pData[nCol * nRowCnt + nRow] = rVal;
+ }
void SetColText(SCCOL nCol, const OUString& rText) { pColText[nCol] = rText; }
void SetRowText(SCROW nRow, const OUString& rText) { pRowText[nRow] = rText; }
};
-class ScChartArray // only parameter-struct
+class ScChartArray // only parameter-struct
{
ScDocument& rDocument;
ScChartPositioner aPositioner;
@@ -63,15 +66,16 @@ class ScChartArray // only parameter-struct
private:
std::unique_ptr<ScMemChart> CreateMemChartSingle();
std::unique_ptr<ScMemChart> CreateMemChartMulti();
+
public:
- ScChartArray( ScDocument& rDoc, const ScRangeListRef& rRangeList );
+ ScChartArray(ScDocument& rDoc, const ScRangeListRef& rRangeList);
- const ScRangeListRef& GetRangeList() const { return aPositioner.GetRangeList(); }
- const ScChartPositionMap* GetPositionMap() { return aPositioner.GetPositionMap(); }
+ const ScRangeListRef& GetRangeList() const { return aPositioner.GetRangeList(); }
+ const ScChartPositionMap* GetPositionMap() { return aPositioner.GetPositionMap(); }
- void SetHeaders(bool bCol, bool bRow) { aPositioner.SetHeaders(bCol, bRow); }
- bool HasColHeaders() const { return aPositioner.HasColHeaders(); }
- bool HasRowHeaders() const { return aPositioner.HasRowHeaders(); }
+ void SetHeaders(bool bCol, bool bRow) { aPositioner.SetHeaders(bCol, bRow); }
+ bool HasColHeaders() const { return aPositioner.HasColHeaders(); }
+ bool HasRowHeaders() const { return aPositioner.HasRowHeaders(); }
std::unique_ptr<ScMemChart> CreateMemChart();
};
diff --git a/sc/inc/clipoptions.hxx b/sc/inc/clipoptions.hxx
index 3a16e4109ec3..081a1a46d679 100644
--- a/sc/inc/clipoptions.hxx
+++ b/sc/inc/clipoptions.hxx
@@ -13,7 +13,10 @@
#include "scdllapi.h"
#include <com/sun/star/uno/Reference.h>
-namespace com::sun::star::document { class XDocumentProperties; }
+namespace com::sun::star::document
+{
+class XDocumentProperties;
+}
/// Stores options which are only relevant for clipboard documents.
class SC_DLLPUBLIC ScClipOptions
diff --git a/sc/inc/columniterator.hxx b/sc/inc/columniterator.hxx
index 46350afc32e9..3dbe76106ea2 100644
--- a/sc/inc/columniterator.hxx
+++ b/sc/inc/columniterator.hxx
@@ -32,7 +32,8 @@ class ScColumnTextWidthIterator
public:
ScColumnTextWidthIterator(const ScColumnTextWidthIterator&) = delete;
const ScColumnTextWidthIterator& operator=(const ScColumnTextWidthIterator&) = delete;
- ScColumnTextWidthIterator(const ScDocument& rDoc, ScColumn& rCol, SCROW nStartRow, SCROW nEndRow);
+ ScColumnTextWidthIterator(const ScDocument& rDoc, ScColumn& rCol, SCROW nStartRow,
+ SCROW nEndRow);
/**
* @param rDoc document instance.
@@ -56,8 +57,8 @@ private:
void checkEndRow();
};
-namespace sc {
-
+namespace sc
+{
/**
* This iterator lets you iterate over cells over specified range in a
* single column. It does not modify the state of the cells, and therefore
@@ -70,7 +71,7 @@ class ColumnIterator
bool mbComplete;
public:
- ColumnIterator( const CellStoreType& rCells, SCROW nRow1, SCROW nRow2 );
+ ColumnIterator(const CellStoreType& rCells, SCROW nRow1, SCROW nRow2);
~ColumnIterator();
void next();
@@ -83,7 +84,6 @@ public:
ScRefCellValue getCell() const;
};
-
}
#endif
diff --git a/sc/inc/columnset.hxx b/sc/inc/columnset.hxx
index d7d9a4de5ec6..2ae8ab01060b 100644
--- a/sc/inc/columnset.hxx
+++ b/sc/inc/columnset.hxx
@@ -15,8 +15,8 @@
#include <unordered_map>
#include <vector>
-namespace sc {
-
+namespace sc
+{
/**
* Simple container to keep track of sheet - column pair.
*/
@@ -29,10 +29,9 @@ class ColumnSet
public:
void set(SCTAB nTab, SCCOL nCol);
void getColumns(SCTAB nTab, std::vector<SCCOL>& rCols) const;
- bool hasTab( SCTAB nTab ) const;
+ bool hasTab(SCTAB nTab) const;
bool empty() const;
};
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/datamapper.hxx b/sc/inc/datamapper.hxx
index c3284cf1ddfa..0972931fd28d 100644
--- a/sc/inc/datamapper.hxx
+++ b/sc/inc/datamapper.hxx
@@ -20,8 +20,8 @@
class ScDocument;
-namespace sc {
-
+namespace sc
+{
class ScDBDataManager;
class DataProvider;
class DataTransformation;
@@ -29,7 +29,6 @@ class DataTransformation;
class SC_DLLPUBLIC ExternalDataSource
{
private:
-
/**
* The URL for the external data provider. The URL
* will be passed to the data provider together with
@@ -72,9 +71,7 @@ private:
ScDocument* mpDoc;
public:
-
- ExternalDataSource(const OUString& rURL,
- const OUString& rProvider, ScDocument* pDoc);
+ ExternalDataSource(const OUString& rURL, const OUString& rProvider, ScDocument* pDoc);
void setUpdateFrequency(double nUpdateFrequency);
@@ -113,7 +110,6 @@ public:
const std::vector<ExternalDataSource>& getDataSources() const;
std::vector<ExternalDataSource>& getDataSources();
};
-
}
#endif
diff --git a/sc/inc/datastreamgettime.hxx b/sc/inc/datastreamgettime.hxx
index 632cf8723159..b44c1db5d49e 100644
--- a/sc/inc/datastreamgettime.hxx
+++ b/sc/inc/datastreamgettime.hxx
@@ -22,9 +22,10 @@
#include <sal/config.h>
-namespace sc {
-
-enum class DebugTime {
+namespace sc
+{
+enum class DebugTime
+{
Import,
Recalc,
Render,
@@ -32,7 +33,6 @@ enum class DebugTime {
};
double datastream_get_time(DebugTime nIdx);
-
}
#endif
diff --git a/sc/inc/documentstreamaccess.hxx b/sc/inc/documentstreamaccess.hxx
index 0108958e475c..c3e2f5155589 100644
--- a/sc/inc/documentstreamaccess.hxx
+++ b/sc/inc/documentstreamaccess.hxx
@@ -17,8 +17,8 @@ class ScDocument;
class ScAddress;
class ScRange;
-namespace sc {
-
+namespace sc
+{
struct DocumentStreamAccessImpl;
/**
@@ -30,11 +30,11 @@ class DocumentStreamAccess
std::unique_ptr<DocumentStreamAccessImpl> mpImpl;
public:
- DocumentStreamAccess( ScDocument& rDoc );
+ DocumentStreamAccess(ScDocument& rDoc);
~DocumentStreamAccess();
- void setNumericCell( const ScAddress& rPos, double fVal );
- void setStringCell( const ScAddress& rPos, const OUString& rStr );
+ void setNumericCell(const ScAddress& rPos, double fVal);
+ void setStringCell(const ScAddress& rPos, const OUString& rStr);
/**
* Clear its internal state, and more importantly all the block position
@@ -46,15 +46,14 @@ public:
* Pop the top row inside specified range, shift all the other rows up by
* one, then set the bottom row empty.
*/
- void shiftRangeUp( const ScRange& rRange );
+ void shiftRangeUp(const ScRange& rRange);
/**
* Top the bottom row inside specified range, shift all the other rows
* above downward by one by inserting an empty row at the top.
*/
- void shiftRangeDown( const ScRange& rRange );
+ void shiftRangeDown(const ScRange& rRange);
};
-
}
#endif
diff --git a/sc/inc/dpfilteredcache.hxx b/sc/inc/dpfilteredcache.hxx
index 43e6ca0ced5f..aa40da4a11cf 100644
--- a/sc/inc/dpfilteredcache.hxx
+++ b/sc/inc/dpfilteredcache.hxx
@@ -31,8 +31,14 @@
#include <mdds/flat_segment_tree.hpp>
-namespace com::sun::star::uno { class Any; }
-namespace com::sun::star::uno { template <typename > class Sequence; }
+namespace com::sun::star::uno
+{
+class Any;
+}
+namespace com::sun::star::uno
+{
+template <typename> class Sequence;
+}
class ScDPCache;
struct ScDPValue;
@@ -54,7 +60,7 @@ public:
virtual ~FilterBase() {}
/** returns true if the matching condition is met for a single cell
value, or false otherwise. */
- virtual bool match( const ScDPItemData& rCellData ) const = 0;
+ virtual bool match(const ScDPItemData& rCellData) const = 0;
virtual std::vector<ScDPItemData> getMatchValues() const = 0;
};
@@ -63,7 +69,7 @@ public:
class SingleFilter final : public FilterBase
{
public:
- explicit SingleFilter(const ScDPItemData &rItem);
+ explicit SingleFilter(const ScDPItemData& rItem);
virtual bool match(const ScDPItemData& rCellData) const override;
virtual std::vector<ScDPItemData> getMatchValues() const override;
@@ -101,7 +107,7 @@ public:
sal_Int32 getRowSize() const;
sal_Int32 getColSize() const;
- const ScDPCache& getCache() const { return mrCache;}
+ const ScDPCache& getCache() const { return mrCache; }
void fillTable(const ScQueryParam& rQuery, bool bIgnoreEmptyRows, bool bRepeatIfEmpty);
@@ -114,32 +120,33 @@ public:
/** Set filter on/off flag to each row to control visibility. The caller
must ensure that the table is filled before calling this function. */
- void filterByPageDimension(const std::vector<Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims);
+ void filterByPageDimension(const std::vector<Criterion>& rCriteria,
+ const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims);
/** Get the cell instance at specified location within the data grid. Note
that the data grid doesn't include the header row. Don't delete the
returned object! */
const ScDPItemData* getCell(SCCOL nCol, SCROW nRow, bool bRepeatIfEmpty) const;
- void getValue( ScDPValue& rVal, SCCOL nCol, SCROW nRow) const;
+ void getValue(ScDPValue& rVal, SCCOL nCol, SCROW nRow) const;
OUString getFieldName(SCCOL nIndex) const;
- /** Get the unique entries for a field specified by index. The caller must
+ /** Get the unique entries for a field specified by index. The caller must
make sure that the table is filled before calling function, or it will
get an empty collection. */
- const ::std::vector<SCROW>& getFieldEntries( sal_Int32 nColumn ) const;
+ const ::std::vector<SCROW>& getFieldEntries(sal_Int32 nColumn) const;
/** Filter the table based on the specified criteria, and copy the
result to rTabData. This method is used, for example, to generate
a drill-down data table. */
void filterTable(const std::vector<Criterion>& rCriteria,
- css::uno::Sequence< css::uno::Sequence< css::uno::Any > >& rTabData,
+ css::uno::Sequence<css::uno::Sequence<css::uno::Any>>& rTabData,
const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims);
void clear();
bool empty() const;
#if DUMP_PIVOT_TABLE
- static void dumpRowFlag( const RowFlagType& rFlag );
+ static void dumpRowFlag(const RowFlagType& rFlag);
void dump() const;
#endif
@@ -152,12 +159,12 @@ private:
* @param nRow index of row to be tested.
* @param rCriteria a list of criteria
*/
- bool isRowQualified(sal_Int32 nRow, const ::std::vector<Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims) const;
+ bool isRowQualified(sal_Int32 nRow, const ::std::vector<Criterion>& rCriteria,
+ const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims) const;
private:
-
/** unique field entries for each field (column). */
- ::std::vector< ::std::vector<SCROW> > maFieldEntries;
+ ::std::vector<::std::vector<SCROW>> maFieldEntries;
/** Rows visible by standard filter query. */
RowFlagType maShowByFilter;
diff --git a/sc/inc/dpresfilter.hxx b/sc/inc/dpresfilter.hxx
index 5b68fdb28daa..c9f32b99c890 100644
--- a/sc/inc/dpresfilter.hxx
+++ b/sc/inc/dpresfilter.hxx
@@ -19,8 +19,14 @@
#include <vector>
#include <unordered_map>
-namespace com::sun::star::uno { template <typename > class Sequence; }
-namespace com::sun::star::sheet { struct DataPilotFieldFilter; }
+namespace com::sun::star::uno
+{
+template <typename> class Sequence;
+}
+namespace com::sun::star::sheet
+{
+struct DataPilotFieldFilter;
+}
struct ScDPResultFilter
{
@@ -28,8 +34,8 @@ struct ScDPResultFilter
OUString maValueName;
OUString maValue;
- bool mbHasValue:1;
- bool mbDataLayout:1;
+ bool mbHasValue : 1;
+ bool mbDataLayout : 1;
ScDPResultFilter(const OUString& rDimName, bool bDataLayout);
};
@@ -54,9 +60,8 @@ public:
typedef std::vector<double> ValuesType;
private:
-
struct MemberNode;
- typedef std::map<OUString, std::shared_ptr<MemberNode> > MembersType;
+ typedef std::map<OUString, std::shared_ptr<MemberNode>> MembersType;
struct DimensionNode
{
@@ -92,7 +97,7 @@ private:
struct NamePairHash
{
- size_t operator() (const NamePairType& rPair) const;
+ size_t operator()(const NamePairType& rPair) const;
};
typedef std::unordered_map<NamePairType, double, NamePairHash> LeafValuesType;
LeafValuesType maLeafValues;
@@ -101,7 +106,6 @@ private:
std::unique_ptr<MemberNode> mpRoot;
public:
-
ScDPResultTree();
ScDPResultTree(const ScDPResultTree&) = delete;
const ScDPResultTree& operator=(const ScDPResultTree&) = delete;
@@ -120,8 +124,8 @@ public:
bool empty() const;
void clear();
- const ValuesType* getResults(
- const css::uno::Sequence< css::sheet::DataPilotFieldFilter>& rFilters) const;
+ const ValuesType*
+ getResults(const css::uno::Sequence<css::sheet::DataPilotFieldFilter>& rFilters) const;
double getLeafResult(const css::sheet::DataPilotFieldFilter& rFilter) const;
diff --git a/sc/inc/edittextiterator.hxx b/sc/inc/edittextiterator.hxx
index 354719adcea7..3f2ad4a16244 100644
--- a/sc/inc/edittextiterator.hxx
+++ b/sc/inc/edittextiterator.hxx
@@ -17,8 +17,8 @@ class ScTable;
class ScDocument;
class EditTextObject;
-namespace sc {
-
+namespace sc
+{
/**
* Iterate through all edit text cells in a given sheet. The caller must
* check the validity of the sheet index passed to its constructor.
@@ -46,12 +46,11 @@ class EditTextIterator
void init();
public:
- EditTextIterator( const ScDocument& rDoc, SCTAB nTab );
+ EditTextIterator(const ScDocument& rDoc, SCTAB nTab);
const EditTextObject* first();
const EditTextObject* next();
};
-
}
#endif
diff --git a/sc/inc/formulaiter.hxx b/sc/inc/formulaiter.hxx
index f49ca5c423a8..6f0838d76382 100644
--- a/sc/inc/formulaiter.hxx
+++ b/sc/inc/formulaiter.hxx
@@ -35,9 +35,10 @@ private:
const ScDocument& mrDoc;
formula::FormulaTokenArrayPlainIterator maIter;
ScAddress aPos;
+
public:
- ScDetectiveRefIter( const ScDocument& rDoc, ScFormulaCell* pCell );
- bool GetNextRef( ScRange& rRange );
+ ScDetectiveRefIter(const ScDocument& rDoc, ScFormulaCell* pCell);
+ bool GetNextRef(ScRange& rRange);
formula::FormulaToken* GetNextRefToken();
};
diff --git a/sc/inc/generalfunction.hxx b/sc/inc/generalfunction.hxx
index fa0ae390d906..862667dbe726 100644
--- a/sc/inc/generalfunction.hxx
+++ b/sc/inc/generalfunction.hxx
@@ -32,64 +32,52 @@ enum class ScGeneralFunction
*/
NONE = int(css::sheet::GeneralFunction_NONE),
-
/** function is determined automatically.
<p>If the values are all numerical, SUM is used, otherwise COUNT.</p>
*/
AUTO = int(css::sheet::GeneralFunction_AUTO),
-
/** sum of all numerical values is calculated.
*/
SUM = int(css::sheet::GeneralFunction_SUM),
-
/** all values, including non-numerical values, are counted.
*/
COUNT = int(css::sheet::GeneralFunction_COUNT),
-
/** average of all numerical values is calculated.
*/
AVERAGE = int(css::sheet::GeneralFunction_AVERAGE),
-
/** maximum value of all numerical values is calculated.
*/
MAX = int(css::sheet::GeneralFunction_MAX),
-
/** minimum value of all numerical values is calculated.
*/
MIN = int(css::sheet::GeneralFunction_MIN),
-
/** product of all numerical values is calculated.
*/
PRODUCT = int(css::sheet::GeneralFunction_PRODUCT),
-
/** numerical values are counted.
*/
COUNTNUMS = int(css::sheet::GeneralFunction_COUNTNUMS),
-
/** standard deviation is calculated based on a sample.
*/
STDEV = int(css::sheet::GeneralFunction_STDEV),
-
/** standard deviation is calculated based on the entire population.
*/
STDEVP = int(css::sheet::GeneralFunction_STDEVP),
-
/** variance is calculated based on a sample.
*/
VAR = int(css::sheet::GeneralFunction_VAR),
-
/** variance is calculated based on the entire population.
*/
VARP = int(css::sheet::GeneralFunction_VARP),
@@ -98,7 +86,7 @@ enum class ScGeneralFunction
* median of all numerical values is calculated.
* @since LibreOffice 5.3
*/
- MEDIAN = css::sheet::GeneralFunction2::MEDIAN
+ MEDIAN = css::sheet::GeneralFunction2::MEDIAN
};
#endif
diff --git a/sc/inc/listenercontext.hxx b/sc/inc/listenercontext.hxx
index 8d62022c28bc..616af5d7a3c2 100644
--- a/sc/inc/listenercontext.hxx
+++ b/sc/inc/listenercontext.hxx
@@ -19,8 +19,8 @@
class ScDocument;
class ScTokenArray;
-namespace sc {
-
+namespace sc
+{
class ColumnSet;
class StartListeningContext
@@ -28,14 +28,15 @@ class StartListeningContext
ScDocument& mrDoc;
std::shared_ptr<ColumnBlockPositionSet> mpSet;
std::shared_ptr<const ColumnSet> mpColSet;
+
public:
StartListeningContext(const StartListeningContext&) = delete;
const StartListeningContext& operator=(const StartListeningContext&) = delete;
StartListeningContext(ScDocument& rDoc);
StartListeningContext(ScDocument& rDoc, const std::shared_ptr<ColumnBlockPositionSet>& pSet);
- void setColumnSet( const std::shared_ptr<const ColumnSet>& pColSet );
+ void setColumnSet(const std::shared_ptr<const ColumnSet>& pColSet);
const std::shared_ptr<const ColumnSet>& getColumnSet() const;
- ScDocument& getDoc() { return mrDoc;}
+ ScDocument& getDoc() { return mrDoc; }
ColumnBlockPosition* getBlockPosition(SCTAB nTab, SCCOL nCol);
};
@@ -52,13 +53,14 @@ public:
EndListeningContext(const EndListeningContext&) = delete;
const EndListeningContext& operator=(const EndListeningContext&) = delete;
EndListeningContext(ScDocument& rDoc, ScTokenArray* pOldCode = nullptr);
- EndListeningContext(ScDocument& rDoc, const std::shared_ptr<ColumnBlockPositionSet>& pSet, ScTokenArray* pOldCode = nullptr);
+ EndListeningContext(ScDocument& rDoc, const std::shared_ptr<ColumnBlockPositionSet>& pSet,
+ ScTokenArray* pOldCode = nullptr);
- void setPositionDelta( const ScAddress& rDelta );
+ void setPositionDelta(const ScAddress& rDelta);
- ScDocument& getDoc() { return mrDoc;}
- ScTokenArray* getOldCode() { return mpOldCode;}
- ScAddress getOldPosition( const ScAddress& rPos ) const;
+ ScDocument& getDoc() { return mrDoc; }
+ ScTokenArray* getOldCode() { return mpOldCode; }
+ ScAddress getOldPosition(const ScAddress& rPos) const;
ColumnBlockPosition* getBlockPosition(SCTAB nTab, SCCOL nCol);
@@ -74,12 +76,11 @@ class PurgeListenerAction final : public ColumnSpanSet::Action
public:
PurgeListenerAction(const PurgeListenerAction&) = delete;
const PurgeListenerAction& operator=(const PurgeListenerAction&) = delete;
- PurgeListenerAction( ScDocument& rDoc );
+ PurgeListenerAction(ScDocument& rDoc);
- virtual void startColumn( SCTAB nTab, SCCOL nCol ) override;
- virtual void execute( const ScAddress& rPos, SCROW nLength, bool bVal ) override;
+ virtual void startColumn(SCTAB nTab, SCCOL nCol) override;
+ virtual void execute(const ScAddress& rPos, SCROW nLength, bool bVal) override;
};
-
}
#endif
diff --git a/sc/inc/listenerquery.hxx b/sc/inc/listenerquery.hxx
index 9148211ed73c..095e65f762b3 100644
--- a/sc/inc/listenerquery.hxx
+++ b/sc/inc/listenerquery.hxx
@@ -17,8 +17,8 @@
#include <unordered_map>
#include <vector>
-namespace sc {
-
+namespace sc
+{
/**
* Used to collect positions of formula cells that belong to a formula
* group.
@@ -27,14 +27,14 @@ class RefQueryFormulaGroup final : public SvtListener::QueryBase
{
public:
typedef std::vector<SCROW> ColType;
- typedef std::unordered_map<SCCOL,ColType> ColsType;
- typedef std::unordered_map<SCTAB,ColsType> TabsType;
+ typedef std::unordered_map<SCCOL, ColType> ColsType;
+ typedef std::unordered_map<SCTAB, ColsType> TabsType;
RefQueryFormulaGroup();
virtual ~RefQueryFormulaGroup() override;
- void setSkipRange( const ScRange& rRange );
- void add( const ScAddress& rPos );
+ void setSkipRange(const ScRange& rRange);
+ void add(const ScAddress& rPos);
/**
* Row positions in each column may contain duplicates. Caller must
@@ -51,18 +51,17 @@ class QueryRange final : public SvtListener::QueryBase
{
ScRangeList maRanges;
- QueryRange( const QueryRange& ) = delete;
- QueryRange& operator= ( const QueryRange& ) = delete;
+ QueryRange(const QueryRange&) = delete;
+ QueryRange& operator=(const QueryRange&) = delete;
public:
QueryRange();
virtual ~QueryRange() override;
- void add( const ScRange& rRange );
+ void add(const ScRange& rRange);
- void swapRanges( ScRangeList& rRanges );
+ void swapRanges(ScRangeList& rRanges);
};
-
}
#endif
diff --git a/sc/inc/macromgr.hxx b/sc/inc/macromgr.hxx
index f8e905957692..bd2877095291 100644
--- a/sc/inc/macromgr.hxx
+++ b/sc/inc/macromgr.hxx
@@ -29,17 +29,17 @@ public:
~ScMacroManager();
SC_DLLPUBLIC void InitUserFuncData();
- SC_DLLPUBLIC void SetUserFuncVolatile( const OUString& sName, bool isVolatile );
- SC_DLLPUBLIC bool GetUserFuncVolatile( const OUString& sName );
+ SC_DLLPUBLIC void SetUserFuncVolatile(const OUString& sName, bool isVolatile);
+ SC_DLLPUBLIC bool GetUserFuncVolatile(const OUString& sName);
void AddDependentCell(const OUString& aModuleName, ScFormulaCell* pCell);
void RemoveDependentCell(const ScFormulaCell* pCell);
void BroadcastModuleUpdate(const OUString& aModuleName);
private:
- typedef std::unordered_map< OUString, bool > NameBoolMap;
+ typedef std::unordered_map<OUString, bool> NameBoolMap;
NameBoolMap mhFuncToVolatile;
- css::uno::Reference< css::container::XContainerListener > mxContainerListener;
+ css::uno::Reference<css::container::XContainerListener> mxContainerListener;
::std::unique_ptr<ScUserMacroDepTracker> mpDepTracker;
ScDocument& mrDoc;
diff --git a/sc/inc/mid.h b/sc/inc/mid.h
index 441f004c7358..614bcf91ee02 100644
--- a/sc/inc/mid.h
+++ b/sc/inc/mid.h
@@ -20,10 +20,10 @@
#ifndef SC_MID_H
#define SC_MID_H
-#define MID_1 1
-#define MID_2 2
-#define MID_3 3
-#define MID_4 4
+#define MID_1 1
+#define MID_2 2
+#define MID_3 3
+#define MID_4 4
#endif
diff --git a/sc/inc/numformat.hxx b/sc/inc/numformat.hxx
index 739c7f1d9329..cfd365386119 100644
--- a/sc/inc/numformat.hxx
+++ b/sc/inc/numformat.hxx
@@ -16,8 +16,8 @@
class ScPatternAttr;
class ScDocument;
-namespace sc {
-
+namespace sc
+{
class SC_DLLPUBLIC NumFmtUtil
{
public:
@@ -25,11 +25,10 @@ public:
* Check if the attribute pattern has a number format that only produces
* latin script output.
*/
- static bool isLatinScript( const ScPatternAttr& rPat, ScDocument& rDoc );
+ static bool isLatinScript(const ScPatternAttr& rPat, ScDocument& rDoc);
- static bool isLatinScript( sal_uLong nFormat, ScDocument& rDoc );
+ static bool isLatinScript(sal_uLong nFormat, ScDocument& rDoc);
};
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/pageuno.hxx b/sc/inc/pageuno.hxx
index 25da0d7d2ff5..987bb5e9c30b 100644
--- a/sc/inc/pageuno.hxx
+++ b/sc/inc/pageuno.hxx
@@ -30,11 +30,11 @@ public:
ScPageObj(SdrPage* pPage);
virtual ~ScPageObj() throw() override;
- virtual css::uno::Reference<css::drawing::XShape> CreateShape(SdrObject *pObj) const override;
+ virtual css::uno::Reference<css::drawing::XShape> CreateShape(SdrObject* pObj) const override;
- // XServiceInfo
+ // XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
- virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override;
+ virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override;
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
};
diff --git a/sc/inc/reffind.hxx b/sc/inc/reffind.hxx
index 9defa2986a8b..212650fd4956 100644
--- a/sc/inc/reffind.hxx
+++ b/sc/inc/reffind.hxx
@@ -35,9 +35,9 @@ class ScRefFinder
sal_Int32 mnSelEnd;
public:
- ScRefFinder(
- const OUString& rFormula, const ScAddress& rPos, ScDocument& rDoc,
- formula::FormulaGrammar::AddressConvention eConvP = formula::FormulaGrammar::CONV_OOO );
+ ScRefFinder(const OUString& rFormula, const ScAddress& rPos, ScDocument& rDoc,
+ formula::FormulaGrammar::AddressConvention eConvP
+ = formula::FormulaGrammar::CONV_OOO);
~ScRefFinder();
const OUString& GetText() const { return maFormula; }
@@ -45,7 +45,7 @@ public:
sal_Int32 GetSelStart() const { return mnSelStart; }
sal_Int32 GetSelEnd() const { return mnSelEnd; }
- void ToggleRel( sal_Int32 nStartPos, sal_Int32 nEndPos );
+ void ToggleRel(sal_Int32 nStartPos, sal_Int32 nEndPos);
};
#endif
diff --git a/sc/inc/refreshtimerprotector.hxx b/sc/inc/refreshtimerprotector.hxx
index 9fcb50421096..5ded7aa07fb8 100644
--- a/sc/inc/refreshtimerprotector.hxx
+++ b/sc/inc/refreshtimerprotector.hxx
@@ -18,10 +18,10 @@ class ScRefreshTimerControl;
class SC_DLLPUBLIC ScRefreshTimerProtector
{
- std::unique_ptr<ScRefreshTimerControl> const & m_rpControl;
+ std::unique_ptr<ScRefreshTimerControl> const& m_rpControl;
public:
- ScRefreshTimerProtector( std::unique_ptr<ScRefreshTimerControl> const & rp );
+ ScRefreshTimerProtector(std::unique_ptr<ScRefreshTimerControl> const& rp);
~ScRefreshTimerProtector();
};
diff --git a/sc/inc/scdllapi.h b/sc/inc/scdllapi.h
index 2e88ef197444..a7b914ee77a9 100644
--- a/sc/inc/scdllapi.h
+++ b/sc/inc/scdllapi.h
@@ -23,9 +23,9 @@
#include <sal/types.h>
#if defined(SC_DLLIMPLEMENTATION)
-#define SC_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#define SC_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
-#define SC_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#define SC_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
#endif // INCLUDED_SC_INC_SCDLLAPI_H
diff --git a/sc/inc/scopetools.hxx b/sc/inc/scopetools.hxx
index eb2941f15777..950ac699bc8e 100644
--- a/sc/inc/scopetools.hxx
+++ b/sc/inc/scopetools.hxx
@@ -14,22 +14,25 @@
class ScDocument;
class ScColumn;
-namespace vcl { class Window; }
-
-namespace sc {
+namespace vcl
+{
+class Window;
+}
+namespace sc
+{
/**
* Temporarily switch on/off auto calculation mode.
*/
class SC_DLLPUBLIC AutoCalcSwitch
{
ScDocument& mrDoc;
- bool mbOldValue;
+ bool mbOldValue;
- AutoCalcSwitch(AutoCalcSwitch const &) = delete;
- AutoCalcSwitch(AutoCalcSwitch &&) = delete;
- AutoCalcSwitch & operator =(AutoCalcSwitch const &) = delete;
- AutoCalcSwitch & operator =(AutoCalcSwitch &&) = delete;
+ AutoCalcSwitch(AutoCalcSwitch const&) = delete;
+ AutoCalcSwitch(AutoCalcSwitch&&) = delete;
+ AutoCalcSwitch& operator=(AutoCalcSwitch const&) = delete;
+ AutoCalcSwitch& operator=(AutoCalcSwitch&&) = delete;
public:
AutoCalcSwitch(ScDocument& rDoc, bool bAutoCalc);
@@ -40,6 +43,7 @@ class ExpandRefsSwitch
{
ScDocument& mrDoc;
bool mbOldValue;
+
public:
ExpandRefsSwitch(ScDocument& rDoc, bool bExpandRefs);
~ExpandRefsSwitch();
@@ -49,6 +53,7 @@ class SC_DLLPUBLIC UndoSwitch
{
ScDocument& mrDoc;
bool mbOldValue;
+
public:
UndoSwitch(ScDocument& rDoc, bool bUndo);
~UndoSwitch();
@@ -58,6 +63,7 @@ class IdleSwitch
{
ScDocument& mrDoc;
bool mbOldValue;
+
public:
IdleSwitch(ScDocument& rDoc, bool bEnableIdle);
~IdleSwitch();
@@ -68,6 +74,7 @@ class DelayFormulaGroupingSwitch
{
ScDocument& mrDoc;
bool const mbOldValue;
+
public:
DelayFormulaGroupingSwitch(ScDocument& rDoc, bool delay);
~DelayFormulaGroupingSwitch() COVERITY_NOEXCEPT_FALSE;
@@ -79,6 +86,7 @@ class DelayStartListeningFormulaCells
{
ScColumn& mColumn;
bool const mbOldValue;
+
public:
DelayStartListeningFormulaCells(ScColumn& column, bool delay);
DelayStartListeningFormulaCells(ScColumn& column);
@@ -86,7 +94,6 @@ public:
~DelayStartListeningFormulaCells();
void set();
};
-
}
#endif
diff --git a/sc/inc/segmenttree.hxx b/sc/inc/segmenttree.hxx
index f37a3d3facd6..58e59e60cd84 100644
--- a/sc/inc/segmenttree.hxx
+++ b/sc/inc/segmenttree.hxx
@@ -32,9 +32,9 @@ class ScFlatBoolRowSegments
public:
struct RangeData
{
- SCROW mnRow1;
- SCROW mnRow2;
- bool mbValue;
+ SCROW mnRow1;
+ SCROW mnRow2;
+ bool mbValue;
};
class ForwardIterator
@@ -42,26 +42,26 @@ public:
public:
explicit ForwardIterator(ScFlatBoolRowSegments& rSegs);
- [[nodiscard]]
- bool getValue(SCROW nPos, bool& rVal);
- SCROW getLastPos() const { return mnLastPos;}
+ [[nodiscard]] bool getValue(SCROW nPos, bool& rVal);
+ SCROW getLastPos() const { return mnLastPos; }
private:
- ScFlatBoolRowSegments& mrSegs;
+ ScFlatBoolRowSegments& mrSegs;
- SCROW mnCurPos;
- SCROW mnLastPos;
- bool mbCurValue;
+ SCROW mnCurPos;
+ SCROW mnLastPos;
+ bool mbCurValue;
};
class RangeIterator
{
public:
- explicit RangeIterator(ScFlatBoolRowSegments const & rSegs);
+ explicit RangeIterator(ScFlatBoolRowSegments const& rSegs);
bool getFirst(RangeData& rRange);
bool getNext(RangeData& rRange);
+
private:
- ScFlatBoolRowSegments const & mrSegs;
+ ScFlatBoolRowSegments const& mrSegs;
};
ScFlatBoolRowSegments(SCROW nMaxRow);
@@ -88,9 +88,9 @@ class ScFlatBoolColSegments
public:
struct RangeData
{
- SCCOL mnCol1;
- SCCOL mnCol2;
- bool mbValue;
+ SCCOL mnCol1;
+ SCCOL mnCol2;
+ bool mbValue;
};
ScFlatBoolColSegments(SCCOL nMaxCol);
ScFlatBoolColSegments(const ScFlatBoolColSegments& r);
@@ -115,9 +115,9 @@ class ScFlatUInt16RowSegments
public:
struct RangeData
{
- SCROW mnRow1;
- SCROW mnRow2;
- sal_uInt16 mnValue;
+ SCROW mnRow1;
+ SCROW mnRow2;
+ sal_uInt16 mnValue;
};
class ForwardIterator
@@ -126,14 +126,14 @@ public:
explicit ForwardIterator(ScFlatUInt16RowSegments& rSegs);
bool getValue(SCROW nPos, sal_uInt16& rVal);
- SCROW getLastPos() const { return mnLastPos;}
+ SCROW getLastPos() const { return mnLastPos; }
private:
- ScFlatUInt16RowSegments& mrSegs;
+ ScFlatUInt16RowSegments& mrSegs;
- SCROW mnCurPos;
- SCROW mnLastPos;
- sal_uInt16 mnCurValue;
+ SCROW mnCurPos;
+ SCROW mnLastPos;
+ sal_uInt16 mnCurValue;
};
ScFlatUInt16RowSegments(SCROW nMaxRow, sal_uInt16 nDefault);
@@ -141,7 +141,8 @@ public:
~ScFlatUInt16RowSegments();
void setValue(SCROW nRow1, SCROW nRow2, sal_uInt16 nValue);
- void setValueIf(SCROW nRow1, SCROW nRow2, sal_uInt16 nValue, const std::function<bool(sal_uInt16)>& rPredicate);
+ void setValueIf(SCROW nRow1, SCROW nRow2, sal_uInt16 nValue,
+ const std::function<bool(sal_uInt16)>& rPredicate);
sal_uInt16 getValue(SCROW nRow);
sal_uInt32 getSumValue(SCROW nRow1, SCROW nRow2);
bool getRangeData(SCROW nRow, RangeData& rData);
diff --git a/sc/inc/stylehelper.hxx b/sc/inc/stylehelper.hxx
index 81252653c7a4..68e6d252b03c 100644
--- a/sc/inc/stylehelper.hxx
+++ b/sc/inc/stylehelper.hxx
@@ -27,8 +27,8 @@ enum class SfxStyleFamily;
class ScStyleNameConversion
{
public:
- static OUString DisplayToProgrammaticName( const OUString& rDispName, SfxStyleFamily nType );
- static OUString ProgrammaticToDisplayName( const OUString& rProgName, SfxStyleFamily nType );
+ static OUString DisplayToProgrammaticName(const OUString& rDispName, SfxStyleFamily nType);
+ static OUString ProgrammaticToDisplayName(const OUString& rProgName, SfxStyleFamily nType);
};
#endif
diff --git a/sc/inc/tokenstringcontext.hxx b/sc/inc/tokenstringcontext.hxx
index 34d9bc99b50f..b44ab8bf087d 100644
--- a/sc/inc/tokenstringcontext.hxx
+++ b/sc/inc/tokenstringcontext.hxx
@@ -16,8 +16,8 @@
class ScDocument;
-namespace sc {
-
+namespace sc
+{
/**
* Context for creating string from an array of formula tokens, used in
* ScTokenArray::CreateString(). You can re-use the same string context
@@ -27,7 +27,7 @@ namespace sc {
struct SC_DLLPUBLIC TokenStringContext
{
typedef std::unordered_map<sal_uInt16, OUString> IndexNameMapType;
- typedef std::unordered_map<size_t, std::vector<OUString> > IndexNamesMapType;
+ typedef std::unordered_map<size_t, std::vector<OUString>> IndexNamesMapType;
typedef std::unordered_map<SCTAB, IndexNameMapType> TabIndexMapType;
formula::FormulaGrammar::Grammar meGram;
@@ -43,7 +43,7 @@ struct SC_DLLPUBLIC TokenStringContext
std::vector<OUString> maExternalFileNames;
IndexNamesMapType maExternalCachedTabNames;
- TokenStringContext( const ScDocument& rDoc, formula::FormulaGrammar::Grammar eGram );
+ TokenStringContext(const ScDocument& rDoc, formula::FormulaGrammar::Grammar eGram);
};
class SC_DLLPUBLIC CompileFormulaContext
@@ -55,17 +55,16 @@ class SC_DLLPUBLIC CompileFormulaContext
void updateTabNames();
public:
- CompileFormulaContext( ScDocument& rDoc );
- CompileFormulaContext( ScDocument& rDoc, formula::FormulaGrammar::Grammar eGram );
+ CompileFormulaContext(ScDocument& rDoc);
+ CompileFormulaContext(ScDocument& rDoc, formula::FormulaGrammar::Grammar eGram);
- formula::FormulaGrammar::Grammar getGrammar() const { return meGram;}
- void setGrammar( formula::FormulaGrammar::Grammar eGram );
+ formula::FormulaGrammar::Grammar getGrammar() const { return meGram; }
+ void setGrammar(formula::FormulaGrammar::Grammar eGram);
- const std::vector<OUString>& getTabNames() const { return maTabNames;}
+ const std::vector<OUString>& getTabNames() const { return maTabNames; }
- ScDocument& getDoc() { return mrDoc;}
+ ScDocument& getDoc() { return mrDoc; }
};
-
}
#endif
diff --git a/sc/inc/unitconv.hxx b/sc/inc/unitconv.hxx
index c4baa1cf9764..d16ee89391e1 100644
--- a/sc/inc/unitconv.hxx
+++ b/sc/inc/unitconv.hxx
@@ -30,16 +30,14 @@ class ScUnitConverterData
double mfValue;
public:
- ScUnitConverterData( const OUString& rFromUnit,
- const OUString& rToUnit, double fValue );
- ScUnitConverterData( const ScUnitConverterData& ) = default;
- ScUnitConverterData& operator=( const ScUnitConverterData& ) = delete;
+ ScUnitConverterData(const OUString& rFromUnit, const OUString& rToUnit, double fValue);
+ ScUnitConverterData(const ScUnitConverterData&) = default;
+ ScUnitConverterData& operator=(const ScUnitConverterData&) = delete;
- double GetValue() const { return mfValue;}
- const OUString& GetIndexString() const { return maIndexString;}
+ double GetValue() const { return mfValue; }
+ const OUString& GetIndexString() const { return maIndexString; }
- static OUString BuildIndexString(
- const OUString& rFromUnit, const OUString& rToUnit );
+ static OUString BuildIndexString(const OUString& rFromUnit, const OUString& rToUnit);
};
class ScUnitConverter
@@ -53,8 +51,7 @@ public:
const ScUnitConverter& operator=(const ScUnitConverter&) = delete;
~ScUnitConverter();
- bool GetValue(
- double& fValue, const OUString& rFromUnit, const OUString& rToUnit ) const;
+ bool GetValue(double& fValue, const OUString& rFromUnit, const OUString& rToUnit) const;
};
#endif
diff --git a/sc/inc/userlist.hxx b/sc/inc/userlist.hxx
index af9fe70ebdb3..ba3ac290153a 100644
--- a/sc/inc/userlist.hxx
+++ b/sc/inc/userlist.hxx
@@ -39,12 +39,13 @@ public:
OUString maUpper;
SubStr(const OUString& rReal, const OUString& rUpper);
};
+
private:
typedef std::vector<SubStr> SubStringsType;
SubStringsType maSubStrings;
OUString aStr;
- SAL_DLLPRIVATE void InitTokens();
+ SAL_DLLPRIVATE void InitTokens();
public:
ScUserListData(const OUString& rStr);
@@ -65,8 +66,9 @@ public:
*/
class SC_DLLPUBLIC ScUserList
{
- typedef std::vector< std::unique_ptr<ScUserListData> > DataType;
+ typedef std::vector<std::unique_ptr<ScUserListData>> DataType;
DataType maData;
+
public:
typedef DataType::iterator iterator;
typedef DataType::const_iterator const_iterator;
@@ -74,15 +76,15 @@ public:
ScUserList();
ScUserList(const ScUserList& r);
- const ScUserListData* GetData( const OUString& rSubStr ) const;
+ const ScUserListData* GetData(const OUString& rSubStr) const;
/// If the list in rStr is already inserted
- bool HasEntry( const OUString& rStr ) const;
+ bool HasEntry(const OUString& rStr) const;
- const ScUserListData& operator[](size_t nIndex) const;
- ScUserListData& operator[](size_t nIndex);
- ScUserList& operator= ( const ScUserList& r );
- bool operator==( const ScUserList& r ) const;
- bool operator!=( const ScUserList& r ) const;
+ const ScUserListData& operator[](size_t nIndex) const;
+ ScUserListData& operator[](size_t nIndex);
+ ScUserList& operator=(const ScUserList& r);
+ bool operator==(const ScUserList& r) const;
+ bool operator!=(const ScUserList& r) const;
iterator begin();
const_iterator begin() const;
diff --git a/sc/inc/zforauto.hxx b/sc/inc/zforauto.hxx
index d62498df2464..540ac208d18d 100644
--- a/sc/inc/zforauto.hxx
+++ b/sc/inc/zforauto.hxx
@@ -31,18 +31,18 @@ class ScNumFormatAbbrev
OUString sFormatstring;
LanguageType eLanguage;
LanguageType eSysLanguage;
+
public:
ScNumFormatAbbrev();
ScNumFormatAbbrev(sal_uInt32 nFormat, const SvNumberFormatter& rFormatter);
- void Load( SvStream& rStream, rtl_TextEncoding eByteStrSet ); // loading of the numberformats
- void Save( SvStream& rStream, rtl_TextEncoding eByteStrSet ) const; // saving of the numberformats
+ void Load(SvStream& rStream, rtl_TextEncoding eByteStrSet); // loading of the numberformats
+ void Save(SvStream& rStream, rtl_TextEncoding eByteStrSet) const; // saving of the numberformats
void PutFormatIndex(sal_uInt32 nFormat, const SvNumberFormatter& rFormatter);
- sal_uInt32 GetFormatIndex( SvNumberFormatter& rFormatter);
+ sal_uInt32 GetFormatIndex(SvNumberFormatter& rFormatter);
bool operator==(const ScNumFormatAbbrev& rNumFormat) const
{
- return ((sFormatstring == rNumFormat.sFormatstring)
- && (eLanguage == rNumFormat.eLanguage)
- && (eSysLanguage == rNumFormat.eSysLanguage));
+ return ((sFormatstring == rNumFormat.sFormatstring) && (eLanguage == rNumFormat.eLanguage)
+ && (eSysLanguage == rNumFormat.eSysLanguage));
}
LanguageType GetLanguage() const { return eLanguage; }
};