diff options
120 files changed, 1201 insertions, 1398 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; } }; diff --git a/sc/qa/extras/check_data_pilot_field.cxx b/sc/qa/extras/check_data_pilot_field.cxx index 3445245ade2b..bde647232839 100644 --- a/sc/qa/extras/check_data_pilot_field.cxx +++ b/sc/qa/extras/check_data_pilot_field.cxx @@ -27,17 +27,19 @@ using namespace css; using namespace css::lang; -namespace sc_apitest { - -class CheckDataPilotField : public CalcUnoApiTest, public apitest::XNamed, public apitest::XPropertySet +namespace sc_apitest +{ +class CheckDataPilotField : public CalcUnoApiTest, + public apitest::XNamed, + public apitest::XPropertySet { - public: +public: CheckDataPilotField(); virtual void setUp() override; virtual void tearDown() override; - uno::Reference< uno::XInterface > init() override; + uno::Reference<uno::XInterface> init() override; CPPUNIT_TEST_SUITE(CheckDataPilotField); @@ -53,7 +55,6 @@ class CheckDataPilotField : public CalcUnoApiTest, public apitest::XNamed, publi CPPUNIT_TEST_SUITE_END(); protected: - virtual bool isPropertyIgnored(const OUString& rName) override; private: @@ -64,19 +65,17 @@ private: bool CheckDataPilotField::isPropertyIgnored(const OUString& rName) { - return rName == "Function" - || rName == "Subtotals" - || rName == "Function2" - || rName == "Subtotals2"; + return rName == "Function" || rName == "Subtotals" || rName == "Function2" + || rName == "Subtotals2"; } CheckDataPilotField::CheckDataPilotField() - : CalcUnoApiTest("/sc/qa/extras/testdocuments"), - apitest::XNamed("Col1") + : CalcUnoApiTest("/sc/qa/extras/testdocuments") + , apitest::XNamed("Col1") { } -uno::Reference< uno::XInterface > CheckDataPilotField::init() +uno::Reference<uno::XInterface> CheckDataPilotField::init() { // create a calc document if (!mxComponent.is()) @@ -85,14 +84,14 @@ uno::Reference< uno::XInterface > CheckDataPilotField::init() else return mxObject; - uno::Reference< sheet::XSpreadsheetDocument > xSheetDoc(mxComponent, uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW); // the cell range table::CellRangeAddress sCellRangeAdress; sCellRangeAdress.Sheet = 0; sCellRangeAdress.StartColumn = 1; sCellRangeAdress.StartRow = 0; - sCellRangeAdress.EndColumn = mMaxFieldIndex-1; + sCellRangeAdress.EndColumn = mMaxFieldIndex - 1; sCellRangeAdress.EndRow = mMaxFieldIndex - 1; // position of the data pilot table @@ -101,17 +100,17 @@ uno::Reference< uno::XInterface > CheckDataPilotField::init() sCellAdress.Column = 7; sCellAdress.Row = 8; // Getting spreadsheet - uno::Reference< sheet::XSpreadsheets > xSpreadsheets = xSheetDoc->getSheets(); - uno::Reference< container::XIndexAccess > oIndexAccess(xSpreadsheets, uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheets> xSpreadsheets = xSheetDoc->getSheets(); + uno::Reference<container::XIndexAccess> oIndexAccess(xSpreadsheets, uno::UNO_QUERY_THROW); // Per default there's now just one sheet, make sure we have at least two, then xSpreadsheets->insertNewByName("Some Sheet", 0); uno::Any aAny = oIndexAccess->getByIndex(0); - uno::Reference< sheet::XSpreadsheet > oSheet; + uno::Reference<sheet::XSpreadsheet> oSheet; CPPUNIT_ASSERT(aAny >>= oSheet); uno::Any aAny2 = oIndexAccess->getByIndex(1); - uno::Reference< sheet::XSpreadsheet > oSheet2; + uno::Reference<sheet::XSpreadsheet> oSheet2; CPPUNIT_ASSERT(aAny2 >>= oSheet2); //Filling a table @@ -129,33 +128,33 @@ uno::Reference< uno::XInterface > CheckDataPilotField::init() { oSheet->getCellByPosition(i, j)->setValue(i * (j + 1)); oSheet2->getCellByPosition(i, j)->setValue(i * (j + 2)); - } + } } // change a value of a cell and check the change in the data pilot // cell of data uno::Any oChangeCell; - oChangeCell<<= oSheet->getCellByPosition(1, 5); + oChangeCell <<= oSheet->getCellByPosition(1, 5); int x = sCellAdress.Column; int y = sCellAdress.Row + 3; // cell of the data pilot output uno::Any oCheckCell; - oCheckCell<<= oSheet->getCellByPosition(x, y); + oCheckCell <<= oSheet->getCellByPosition(x, y); // create the test objects - uno::Reference< sheet::XDataPilotTablesSupplier> DPTS(oSheet, uno::UNO_QUERY_THROW); - uno::Reference< sheet::XDataPilotTables> DPT = DPTS->getDataPilotTables(); - uno::Reference< sheet::XDataPilotDescriptor> DPDsc = DPT->createDataPilotDescriptor(); + uno::Reference<sheet::XDataPilotTablesSupplier> DPTS(oSheet, uno::UNO_QUERY_THROW); + uno::Reference<sheet::XDataPilotTables> DPT = DPTS->getDataPilotTables(); + uno::Reference<sheet::XDataPilotDescriptor> DPDsc = DPT->createDataPilotDescriptor(); DPDsc->setSourceRange(sCellRangeAdress); uno::Any oDataPilotField = DPDsc->getDataPilotFields()->getByIndex(0); - uno::Reference<beans::XPropertySet> fieldPropSet(oDataPilotField, uno::UNO_QUERY_THROW); + uno::Reference<beans::XPropertySet> fieldPropSet(oDataPilotField, uno::UNO_QUERY_THROW); uno::Any sum; - sum<<= sheet::GeneralFunction_SUM; - fieldPropSet->setPropertyValue("Function", sum ); + sum <<= sheet::GeneralFunction_SUM; + fieldPropSet->setPropertyValue("Function", sum); uno::Any data; - data<<= sheet::DataPilotFieldOrientation_DATA; + data <<= sheet::DataPilotFieldOrientation_DATA; fieldPropSet->setPropertyValue("Orientation", data); //Insert the DataPilotTable @@ -163,7 +162,7 @@ uno::Reference< uno::XInterface > CheckDataPilotField::init() DPT->removeByName("DataPilotField"); DPT->insertNewByName("DataPilotTField", sCellAdress, DPDsc); - uno::Reference< container::XIndexAccess > IA = DPDsc->getDataPilotFields(); + uno::Reference<container::XIndexAccess> IA = DPDsc->getDataPilotFields(); uno::Reference<uno::XInterface> xDataPilotFieldObject; data = IA->getByIndex(0); CPPUNIT_ASSERT(data >>= xDataPilotFieldObject); @@ -172,7 +171,6 @@ uno::Reference< uno::XInterface > CheckDataPilotField::init() return xDataPilotFieldObject; } - void CheckDataPilotField::setUp() { CalcUnoApiTest::setUp(); @@ -187,7 +185,6 @@ void CheckDataPilotField::tearDown() } CPPUNIT_TEST_SUITE_REGISTRATION(CheckDataPilotField); - } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/qa/extras/recordchanges-test.cxx b/sc/qa/extras/recordchanges-test.cxx index 357023e0d361..709a80238af6 100644 --- a/sc/qa/extras/recordchanges-test.cxx +++ b/sc/qa/extras/recordchanges-test.cxx @@ -31,22 +31,21 @@ public: CPPUNIT_TEST(testSetRecordChanges); CPPUNIT_TEST(testCheckRecordChangesProtection); CPPUNIT_TEST_SUITE_END(); - }; void ScRecordChangesTest::testSetRecordChanges() { + uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop("private:factory/scalc"); - uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop("private:factory/scalc"); - - uno::Reference< sheet::XSpreadsheetDocument > xDoc(xComponent, UNO_QUERY_THROW); - uno::Reference< beans::XPropertySet > xDocSettingsPropSet (xDoc, UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheetDocument> xDoc(xComponent, UNO_QUERY_THROW); + uno::Reference<beans::XPropertySet> xDocSettingsPropSet(xDoc, UNO_QUERY_THROW); bool recordChangesValue = true; bool protectionValue = true; CPPUNIT_ASSERT(xDocSettingsPropSet->getPropertyValue("RecordChanges") >>= recordChangesValue); - CPPUNIT_ASSERT(xDocSettingsPropSet->getPropertyValue("IsRecordChangesProtected") >>= protectionValue); + CPPUNIT_ASSERT(xDocSettingsPropSet->getPropertyValue("IsRecordChangesProtected") + >>= protectionValue); CPPUNIT_ASSERT_MESSAGE("a new document does not record changes", !recordChangesValue); CPPUNIT_ASSERT_MESSAGE("a new document does not protect record changes", !protectionValue); @@ -66,17 +65,18 @@ void ScRecordChangesTest::testCheckRecordChangesProtection() { // test with protected changes OUString aFileName; - createFileURL( "RecordChangesProtected.ods", aFileName); - uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName); + createFileURL("RecordChangesProtected.ods", aFileName); + uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileName); - uno::Reference< sheet::XSpreadsheetDocument > xDoc(xComponent, UNO_QUERY_THROW); - uno::Reference< beans::XPropertySet > xDocSettingsPropSet (xDoc, UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheetDocument> xDoc(xComponent, UNO_QUERY_THROW); + uno::Reference<beans::XPropertySet> xDocSettingsPropSet(xDoc, UNO_QUERY_THROW); bool recordChangesValue = false; bool protectionValue = false; CPPUNIT_ASSERT(xDocSettingsPropSet->getPropertyValue("RecordChanges") >>= recordChangesValue); - CPPUNIT_ASSERT(xDocSettingsPropSet->getPropertyValue("IsRecordChangesProtected") >>= protectionValue); + CPPUNIT_ASSERT(xDocSettingsPropSet->getPropertyValue("IsRecordChangesProtected") + >>= protectionValue); CPPUNIT_ASSERT_MESSAGE("the document should be recording changes", recordChangesValue); CPPUNIT_ASSERT_MESSAGE("the protection should be active", protectionValue); @@ -87,7 +87,8 @@ void ScRecordChangesTest::testCheckRecordChangesProtection() xDocSettingsPropSet->setPropertyValue("RecordChanges", aValue); CPPUNIT_ASSERT(xDocSettingsPropSet->getPropertyValue("RecordChanges") >>= recordChangesValue); - CPPUNIT_ASSERT(xDocSettingsPropSet->getPropertyValue("IsRecordChangesProtected") >>= protectionValue); + CPPUNIT_ASSERT(xDocSettingsPropSet->getPropertyValue("IsRecordChangesProtected") + >>= protectionValue); // this document should still record changes as protection is set CPPUNIT_ASSERT_MESSAGE("the document should still be recording changes", recordChangesValue); @@ -97,7 +98,7 @@ void ScRecordChangesTest::testCheckRecordChangesProtection() } ScRecordChangesTest::ScRecordChangesTest() - : UnoApiTest("/sc/qa/extras/testdocuments") + : UnoApiTest("/sc/qa/extras/testdocuments") { } diff --git a/sc/qa/extras/sccellrangesobj.cxx b/sc/qa/extras/sccellrangesobj.cxx index 174552d9c598..e87f6792e9e9 100644 --- a/sc/qa/extras/sccellrangesobj.cxx +++ b/sc/qa/extras/sccellrangesobj.cxx @@ -28,8 +28,8 @@ using namespace css; using namespace css::uno; -namespace sc_apitest { - +namespace sc_apitest +{ class ScCellRangesObj : public CalcUnoApiTest, public apitest::SheetCellRanges, public apitest::XEnumerationAccess, @@ -45,8 +45,8 @@ public: virtual void setUp() override; virtual void tearDown() override; - virtual uno::Reference< uno::XInterface > getXSpreadsheet() override; - virtual uno::Reference< uno::XInterface > init() override; + virtual uno::Reference<uno::XInterface> getXSpreadsheet() override; + virtual uno::Reference<uno::XInterface> init() override; CPPUNIT_TEST_SUITE(ScCellRangesObj); @@ -80,23 +80,25 @@ public: CPPUNIT_TEST_SUITE_END(); private: - uno::Reference< lang::XComponent > mxComponent; + uno::Reference<lang::XComponent> mxComponent; }; -ScCellRangesObj::ScCellRangesObj(): - CalcUnoApiTest("/sc/qa/extras/testdocuments"), - apitest::XFormulaQuery(table::CellRangeAddress(0, 4, 1, 5, 4), table::CellRangeAddress(0, 4, 1, 5, 4)) +ScCellRangesObj::ScCellRangesObj() + : CalcUnoApiTest("/sc/qa/extras/testdocuments") + , apitest::XFormulaQuery(table::CellRangeAddress(0, 4, 1, 5, 4), + table::CellRangeAddress(0, 4, 1, 5, 4)) { } -uno::Reference< uno::XInterface > ScCellRangesObj::init() +uno::Reference<uno::XInterface> ScCellRangesObj::init() { - uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW); - uno::Reference< container::XIndexAccess > xIndexAccess(xDoc->getSheets(), uno::UNO_QUERY_THROW); - uno::Reference< sheet::XSpreadsheet > xSheet(xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW); - uno::Reference< lang::XMultiServiceFactory > xMSF(xDoc, uno::UNO_QUERY_THROW); - uno::Reference< container::XNameContainer > xRanges(xMSF->createInstance("com.sun.star.sheet.SheetCellRanges"), uno::UNO_QUERY_THROW); + uno::Reference<container::XIndexAccess> xIndexAccess(xDoc->getSheets(), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheet> xSheet(xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW); + uno::Reference<lang::XMultiServiceFactory> xMSF(xDoc, uno::UNO_QUERY_THROW); + uno::Reference<container::XNameContainer> xRanges( + xMSF->createInstance("com.sun.star.sheet.SheetCellRanges"), uno::UNO_QUERY_THROW); uno::Any xCellRange; xCellRange <<= xSheet->getCellRangeByName("C1:D4"); @@ -108,9 +110,9 @@ uno::Reference< uno::XInterface > ScCellRangesObj::init() xCellRange <<= xSheet->getCellRangeByName("I7:J8"); xRanges->insertByName("Range4", xCellRange); - for ( int i = 0; i < 10; i++ ) + for (int i = 0; i < 10; i++) { - for ( int j = 5; j < 10; j++ ) + for (int j = 5; j < 10; j++) { xSheet->getCellByPosition(i, j)->setValue(i + j); } @@ -121,9 +123,9 @@ uno::Reference< uno::XInterface > ScCellRangesObj::init() uno::Reference<uno::XInterface> ScCellRangesObj::getXSpreadsheet() { - uno::Reference< sheet::XSpreadsheetDocument > xSheetDoc(mxComponent, uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW); - uno::Reference<sheet::XSpreadsheets> xSheets (xSheetDoc->getSheets(), UNO_SET_THROW); + uno::Reference<sheet::XSpreadsheets> xSheets(xSheetDoc->getSheets(), UNO_SET_THROW); uno::Reference<container::XIndexAccess> xIndex(xSheets, UNO_QUERY_THROW); uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), UNO_QUERY_THROW); @@ -146,7 +148,6 @@ void ScCellRangesObj::tearDown() } CPPUNIT_TEST_SUITE_REGISTRATION(ScCellRangesObj); - } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/qa/extras/scmodelobj.cxx b/sc/qa/extras/scmodelobj.cxx index 48b050b1134b..8c4a67f963ab 100644 --- a/sc/qa/extras/scmodelobj.cxx +++ b/sc/qa/extras/scmodelobj.cxx @@ -28,8 +28,8 @@ using namespace css; using namespace css::uno; -namespace sc_apitest { - +namespace sc_apitest +{ class ScModelObj : public UnoApiTest, public apitest::SpreadsheetDocumentSettings, public apitest::XCalculatable, @@ -42,8 +42,8 @@ public: virtual void setUp() override; virtual void tearDown() override; - virtual uno::Reference< uno::XInterface > init() override; - virtual uno::Reference< uno::XInterface > getXMSF() override; + virtual uno::Reference<uno::XInterface> init() override; + virtual uno::Reference<uno::XInterface> getXMSF() override; virtual uno::Sequence<uno::Reference<table::XCell>> getXCells() override; ScModelObj(); @@ -74,16 +74,16 @@ public: CPPUNIT_TEST_SUITE_END(); private: - uno::Reference< lang::XComponent > mxComponent; + uno::Reference<lang::XComponent> mxComponent; uno::Sequence<uno::Reference<table::XCell>> m_xCells; }; ScModelObj::ScModelObj() - : UnoApiTest("/sc/qa/extras/testdocuments") + : UnoApiTest("/sc/qa/extras/testdocuments") { } -uno::Reference< uno::XInterface > ScModelObj::init() +uno::Reference<uno::XInterface> ScModelObj::init() { uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW); @@ -104,15 +104,9 @@ uno::Reference< uno::XInterface > ScModelObj::init() return xModel; } -uno::Reference<uno::XInterface> ScModelObj::getXMSF() -{ - return getMultiServiceFactory(); -} +uno::Reference<uno::XInterface> ScModelObj::getXMSF() { return getMultiServiceFactory(); } -uno::Sequence<uno::Reference<table::XCell>> ScModelObj::getXCells() -{ - return m_xCells; -} +uno::Sequence<uno::Reference<table::XCell>> ScModelObj::getXCells() { return m_xCells; } void ScModelObj::setUp() { @@ -130,7 +124,6 @@ void ScModelObj::tearDown() } CPPUNIT_TEST_SUITE_REGISTRATION(ScModelObj); - } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/qa/extras/scoutlineobj.cxx b/sc/qa/extras/scoutlineobj.cxx index fba63ff98a65..8133cdb25614 100644 --- a/sc/qa/extras/scoutlineobj.cxx +++ b/sc/qa/extras/scoutlineobj.cxx @@ -17,8 +17,8 @@ using namespace css; using namespace css::uno; -namespace sc_apitest { - +namespace sc_apitest +{ class ScOutlineObj : public CalcUnoApiTest, public apitest::XSheetOutline { public: @@ -27,7 +27,7 @@ public: virtual void setUp() override; virtual void tearDown() override; - virtual uno::Reference< uno::XInterface > init() override; + virtual uno::Reference<uno::XInterface> init() override; CPPUNIT_TEST_SUITE(ScOutlineObj); @@ -43,7 +43,7 @@ public: CPPUNIT_TEST_SUITE_END(); private: - uno::Reference< lang::XComponent > mxComponent; + uno::Reference<lang::XComponent> mxComponent; }; ScOutlineObj::ScOutlineObj() @@ -51,13 +51,13 @@ ScOutlineObj::ScOutlineObj() { } -uno::Reference< uno::XInterface > ScOutlineObj::init() +uno::Reference<uno::XInterface> ScOutlineObj::init() { // get the first sheet - uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW); - uno::Reference< container::XIndexAccess > xIndex (xDoc->getSheets(), UNO_QUERY_THROW); - uno::Reference< sheet::XSpreadsheet > xSheet( xIndex->getByIndex(0), UNO_QUERY_THROW); + uno::Reference<container::XIndexAccess> xIndex(xDoc->getSheets(), UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), UNO_QUERY_THROW); return xSheet; } @@ -78,7 +78,6 @@ void ScOutlineObj::tearDown() } CPPUNIT_TEST_SUITE_REGISTRATION(ScOutlineObj); - } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/qa/extras/scsubtotalfieldobj.cxx b/sc/qa/extras/scsubtotalfieldobj.cxx index 2667f28a4098..991ee7bed436 100644 --- a/sc/qa/extras/scsubtotalfieldobj.cxx +++ b/sc/qa/extras/scsubtotalfieldobj.cxx @@ -28,14 +28,14 @@ using namespace css; using namespace css::uno; using namespace com::sun::star; -namespace sc_apitest { - +namespace sc_apitest +{ class ScSubTotalFieldObj : public CalcUnoApiTest, public apitest::XSubTotalField { public: ScSubTotalFieldObj(); - virtual uno::Reference< uno::XInterface > init() override; + virtual uno::Reference<uno::XInterface> init() override; virtual void setUp() override; virtual void tearDown() override; @@ -48,8 +48,7 @@ public: CPPUNIT_TEST_SUITE_END(); private: - uno::Reference< lang::XComponent > mxComponent; - + uno::Reference<lang::XComponent> mxComponent; }; ScSubTotalFieldObj::ScSubTotalFieldObj() @@ -57,24 +56,25 @@ ScSubTotalFieldObj::ScSubTotalFieldObj() { } -uno::Reference< uno::XInterface > ScSubTotalFieldObj::init() +uno::Reference<uno::XInterface> ScSubTotalFieldObj::init() { - uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW); - uno::Reference< container::XIndexAccess > xIndex(xDoc->getSheets(), uno::UNO_QUERY_THROW); - uno::Reference< sheet::XSpreadsheet > xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW); + uno::Reference<container::XIndexAccess> xIndex(xDoc->getSheets(), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW); - uno::Reference< sheet::XSubTotalCalculatable > xSubTotalCalc(xSheet, uno::UNO_QUERY_THROW); - uno::Reference< sheet::XSubTotalDescriptor > xSubTotalDesc = xSubTotalCalc->createSubTotalDescriptor(true); + uno::Reference<sheet::XSubTotalCalculatable> xSubTotalCalc(xSheet, uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSubTotalDescriptor> xSubTotalDesc + = xSubTotalCalc->createSubTotalDescriptor(true); - uno::Sequence< sheet::SubTotalColumn > xCols; + uno::Sequence<sheet::SubTotalColumn> xCols; xCols.realloc(1); xCols[0].Column = 5; xCols[0].Function = sheet::GeneralFunction_SUM; xSubTotalDesc->addNew(xCols, 1); - uno::Reference< container::XIndexAccess > xDescIndex(xSubTotalDesc, uno::UNO_QUERY_THROW); - uno::Reference< sheet::XSubTotalField > xSTF(xDescIndex->getByIndex(0), uno::UNO_QUERY_THROW); + uno::Reference<container::XIndexAccess> xDescIndex(xSubTotalDesc, uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSubTotalField> xSTF(xDescIndex->getByIndex(0), uno::UNO_QUERY_THROW); return xSTF; } @@ -84,7 +84,6 @@ void ScSubTotalFieldObj::setUp() CalcUnoApiTest::setUp(); // create a calc document mxComponent = loadFromDesktop("private:factory/scalc"); - } void ScSubTotalFieldObj::tearDown() diff --git a/sc/qa/unit/dataproviders_test.cxx b/sc/qa/unit/dataproviders_test.cxx index a9b6b1142c7f..1f83c620c58d 100644 --- a/sc/qa/unit/dataproviders_test.cxx +++ b/sc/qa/unit/dataproviders_test.cxx @@ -22,7 +22,6 @@ class ScDataProvidersTest : public ScBootstrapFixture { public: - ScDataProvidersTest(); virtual void setUp() override; @@ -44,13 +43,14 @@ public: private: ScDocShellRef m_xDocShell; - ScDocument *m_pDoc; + ScDocument* m_pDoc; }; void ScDataProvidersTest::testCSVImport() { ScDBData* pDBData = new ScDBData("testDB", 0, 0, 0, 10, 10); - bool bInserted = m_pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr<ScDBData>(pDBData)); + bool bInserted + = m_pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr<ScDBData>(pDBData)); CPPUNIT_ASSERT(bInserted); OUString aFileURL; @@ -58,7 +58,6 @@ void ScDataProvidersTest::testCSVImport() sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.csv", m_pDoc); aDataSource.setDBData(pDBData->GetName()); - m_pDoc->GetExternalDataMapper().insertDataSource(aDataSource); auto& rDataSources = m_pDoc->GetExternalDataMapper().getDataSources(); CPPUNIT_ASSERT(!rDataSources.empty()); @@ -78,7 +77,8 @@ void ScDataProvidersTest::testCSVImport() void ScDataProvidersTest::testDataLargerThanDB() { ScDBData* pDBData = new ScDBData("testDB", 0, 0, 0, 1, 1); - bool bInserted = m_pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr<ScDBData>(pDBData)); + bool bInserted + = m_pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr<ScDBData>(pDBData)); CPPUNIT_ASSERT(bInserted); OUString aFileURL; @@ -86,7 +86,6 @@ void ScDataProvidersTest::testDataLargerThanDB() sc::ExternalDataSource aDataSource(aFileURL, "org.libreoffice.calc.csv", m_pDoc); aDataSource.setDBData(pDBData->GetName()); - m_pDoc->GetExternalDataMapper().insertDataSource(aDataSource); auto& rDataSources = m_pDoc->GetExternalDataMapper().getDataSources(); CPPUNIT_ASSERT(!rDataSources.empty()); @@ -106,7 +105,8 @@ void ScDataProvidersTest::testDataLargerThanDB() void ScDataProvidersTest::testHTMLImport() { ScDBData* pDBData = new ScDBData("testDB", 0, 0, 0, 10, 10); - bool bInserted = m_pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr<ScDBData>(pDBData)); + bool bInserted + = m_pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr<ScDBData>(pDBData)); CPPUNIT_ASSERT(bInserted); OUString aFileURL; @@ -115,7 +115,6 @@ void ScDataProvidersTest::testHTMLImport() aDataSource.setID("//table"); aDataSource.setDBData(pDBData->GetName()); - m_pDoc->GetExternalDataMapper().insertDataSource(aDataSource); auto& rDataSources = m_pDoc->GetExternalDataMapper().getDataSources(); CPPUNIT_ASSERT(!rDataSources.empty()); @@ -123,11 +122,12 @@ void ScDataProvidersTest::testHTMLImport() rDataSources[0].refresh(m_pDoc, true); Scheduler::ProcessEventsToIdle(); - - std::vector<OUString> aCarManufacturers = {"Audi", "GM", "Nissan", "Ferrari", "Peugeot"}; - std::vector<OUString> aCities = {"Berlin", "San Francisco", "Tokyo", "Rome", "Paris"}; - std::vector<double> aFirstCol = {1, 10, -100, -0.11111, 1}; - std::vector<double> aSecondCol = {2, 2.1, 40179, 2, 2,}; // 40179 is equal to 2010-1-1 + std::vector<OUString> aCarManufacturers = { "Audi", "GM", "Nissan", "Ferrari", "Peugeot" }; + std::vector<OUString> aCities = { "Berlin", "San Francisco", "Tokyo", "Rome", "Paris" }; + std::vector<double> aFirstCol = { 1, 10, -100, -0.11111, 1 }; + std::vector<double> aSecondCol = { + 2, 2.1, 40179, 2, 2, + }; // 40179 is equal to 2010-1-1 CPPUNIT_ASSERT_EQUAL(OUString("Col1"), m_pDoc->GetString(0, 0, 0)); CPPUNIT_ASSERT_EQUAL(OUString("Col2"), m_pDoc->GetString(1, 0, 0)); @@ -146,14 +146,15 @@ void ScDataProvidersTest::testHTMLImport() void ScDataProvidersTest::testXMLImport() { ScDBData* pDBData = new ScDBData("testDB", 0, 0, 0, 10, 10); - bool bInserted = m_pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr<ScDBData>(pDBData)); + bool bInserted + = m_pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr<ScDBData>(pDBData)); CPPUNIT_ASSERT(bInserted); OUString aFileURL; ScOrcusImportXMLParam aParam; ScOrcusImportXMLParam::RangeLink aRangeLink; - aRangeLink.maPos = ScAddress(0,0,0); + aRangeLink.maPos = ScAddress(0, 0, 0); aRangeLink.maFieldPaths.push_back("/bookstore/book/title"); aRangeLink.maFieldPaths.push_back("/bookstore/book/author"); aRangeLink.maRowGroups.push_back("/bookstore/book"); @@ -164,7 +165,6 @@ void ScDataProvidersTest::testXMLImport() aDataSource.setDBData("testDB"); aDataSource.setXMLImportParam(aParam); - m_pDoc->GetExternalDataMapper().insertDataSource(aDataSource); auto& rDataSources = m_pDoc->GetExternalDataMapper().getDataSources(); CPPUNIT_ASSERT(!rDataSources.empty()); @@ -208,9 +208,9 @@ void ScDataProvidersTest::testBaseImport() } */ -ScDataProvidersTest::ScDataProvidersTest() : - ScBootstrapFixture( "sc/qa/unit/data/dataprovider" ), - m_pDoc(nullptr) +ScDataProvidersTest::ScDataProvidersTest() + : ScBootstrapFixture("sc/qa/unit/data/dataprovider") + , m_pDoc(nullptr) { } @@ -219,10 +219,9 @@ void ScDataProvidersTest::setUp() ScBootstrapFixture::setUp(); ScDLL::Init(); - m_xDocShell = new ScDocShell( - SfxModelFlags::EMBEDDED_OBJECT | - SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS | - SfxModelFlags::DISABLE_DOCUMENT_RECOVERY); + m_xDocShell + = new ScDocShell(SfxModelFlags::EMBEDDED_OBJECT | SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS + | SfxModelFlags::DISABLE_DOCUMENT_RECOVERY); m_xDocShell->SetIsInUcalc(); m_xDocShell->DoInitUnitTest(); diff --git a/sc/qa/unit/test_ScChartListenerCollection.cxx b/sc/qa/unit/test_ScChartListenerCollection.cxx index ba2e93c7223c..67f2f045c7bf 100644 --- a/sc/qa/unit/test_ScChartListenerCollection.cxx +++ b/sc/qa/unit/test_ScChartListenerCollection.cxx @@ -13,16 +13,15 @@ #include <chartlis.hxx> #include <scdll.hxx> -namespace { - +namespace +{ const ScRange RANGE_1(10, 10, 0, 19, 10, 0); const ScRange RANGE_2(20, 10, 0, 29, 10, 0); const ScRange RANGE_INTERSECTING_1_AND_2(10, 10, 0, 29, 10, 0); - -class ChartListenerCollectionTest : public test::BootstrapFixture { - +class ChartListenerCollectionTest : public test::BootstrapFixture +{ public: virtual void setUp() override { @@ -47,21 +46,21 @@ private: CPPUNIT_TEST(ListenersStopListeningIndependently); CPPUNIT_TEST_SUITE_END(); - }; -struct MockedHiddenRangeListener : public ScChartHiddenRangeListener { +struct MockedHiddenRangeListener : public ScChartHiddenRangeListener +{ unsigned mNotifyCount; MockedHiddenRangeListener() - : mNotifyCount(0) { + : mNotifyCount(0) + { } - void notify() override { - mNotifyCount++; - } + void notify() override { mNotifyCount++; } }; -void ChartListenerCollectionTest::ListenerGetsNotifiedWhenItsRangeIsSetDirty() { +void ChartListenerCollectionTest::ListenerGetsNotifiedWhenItsRangeIsSetDirty() +{ MockedHiddenRangeListener listener; ScDocument aDoc; ScChartListenerCollection sut(aDoc); @@ -72,7 +71,8 @@ void ChartListenerCollectionTest::ListenerGetsNotifiedWhenItsRangeIsSetDirty() { CPPUNIT_ASSERT_EQUAL(1u, listener.mNotifyCount); } -void ChartListenerCollectionTest::ListenerGetsNotifiedTwiceWhenRegisteredTwoTimes() { +void ChartListenerCollectionTest::ListenerGetsNotifiedTwiceWhenRegisteredTwoTimes() +{ MockedHiddenRangeListener listener; ScDocument aDoc; ScChartListenerCollection sut(aDoc); @@ -84,7 +84,8 @@ void ChartListenerCollectionTest::ListenerGetsNotifiedTwiceWhenRegisteredTwoTime CPPUNIT_ASSERT_EQUAL(2u, listener.mNotifyCount); } -void ChartListenerCollectionTest::ListenerDoesNotGetNotifiedWhenListeningStops() { +void ChartListenerCollectionTest::ListenerDoesNotGetNotifiedWhenListeningStops() +{ MockedHiddenRangeListener listener; ScDocument aDoc; ScChartListenerCollection sut(aDoc); @@ -94,10 +95,10 @@ void ChartListenerCollectionTest::ListenerDoesNotGetNotifiedWhenListeningStops() sut.SetRangeDirty(RANGE_INTERSECTING_1_AND_2); CPPUNIT_ASSERT_EQUAL(0u, listener.mNotifyCount); - } -void ChartListenerCollectionTest::ListenerStopsListeningForAllRanges() { +void ChartListenerCollectionTest::ListenerStopsListeningForAllRanges() +{ MockedHiddenRangeListener listener; ScDocument aDoc; ScChartListenerCollection sut(aDoc); @@ -110,7 +111,8 @@ void ChartListenerCollectionTest::ListenerStopsListeningForAllRanges() { CPPUNIT_ASSERT_EQUAL(0u, listener.mNotifyCount); } -void ChartListenerCollectionTest::ListenersStopListeningIndependently() { +void ChartListenerCollectionTest::ListenersStopListeningIndependently() +{ MockedHiddenRangeListener listener1; MockedHiddenRangeListener listener2; ScDocument aDoc; @@ -125,12 +127,10 @@ void ChartListenerCollectionTest::ListenersStopListeningIndependently() { CPPUNIT_ASSERT_EQUAL(0u, listener1.mNotifyCount); CPPUNIT_ASSERT_EQUAL(1u, listener2.mNotifyCount); } - } CPPUNIT_TEST_SUITE_REGISTRATION(ChartListenerCollectionTest); - CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx index 34c49a281f33..31171f72e4ce 100644 --- a/sc/source/core/data/table5.cxx +++ b/sc/source/core/data/table5.cxx @@ -47,9 +47,9 @@ using ::com::sun::star::uno::Sequence; using ::com::sun::star::sheet::TablePageBreakData; using ::std::set; -void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) +void ScTable::UpdatePageBreaks(const ScRange* pUserArea) { - if ( rDocument.IsImportingXML() ) + if (rDocument.IsImportingXML()) return; // pUserArea != NULL -> print area is specified. We need to force-update @@ -65,9 +65,9 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) return; } - SfxStyleSheetBase* pStyle = rDocument.GetStyleSheetPool()-> - Find( aPageStyle, SfxStyleFamily::Page ); - if ( !pStyle ) + SfxStyleSheetBase* pStyle + = rDocument.GetStyleSheetPool()->Find(aPageStyle, SfxStyleFamily::Page); + if (!pStyle) { OSL_FAIL("UpdatePageBreaks: Style not found"); return; @@ -89,20 +89,20 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) else { sal_uInt16 nAreaCount = GetPrintRangeCount(); - if ( nAreaCount > 1 ) + if (nAreaCount > 1) { // Show nothing, when multiple ranges for (SCCOL nX : GetColumnsRange(0, rDocument.MaxCol())) RemoveColBreak(nX, true, false); - RemoveRowPageBreaks(0, rDocument.MaxRow()-1); + RemoveRowPageBreaks(0, rDocument.MaxRow() - 1); return; } - else if ( nAreaCount == 1 ) + else if (nAreaCount == 1) { - const ScRange* pArea = GetPrintRange( 0 ); + const ScRange* pArea = GetPrintRange(0); if (pArea) { nStartCol = pArea->aStart.Col(); @@ -110,7 +110,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) nEndCol = pArea->aEnd.Col(); nEndRow = pArea->aEnd.Row(); } - } // otherwise show everything + } // otherwise show everything } // get bSkipColBreaks/bSkipRowBreaks flags: @@ -122,48 +122,50 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) if (!mbForceBreaks) { - if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, false, &pItem ) == SfxItemState::SET ) - { - OSL_ENSURE( dynamic_cast<const SfxUInt16Item*>( pItem) != nullptr, "invalid Item" ); - bSkipColBreaks = bSkipRowBreaks = static_cast<const SfxUInt16Item*>(pItem)->GetValue() > 0; - } - - if ( !bSkipColBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, false, &pItem) == SfxItemState::SET ) - { - // #i54993# when fitting to width or height, ignore only manual breaks in that direction - const ScPageScaleToItem* pScaleToItem = static_cast<const ScPageScaleToItem*>(pItem); - if ( pScaleToItem->GetWidth() > 0 ) - bSkipColBreaks = true; - if ( pScaleToItem->GetHeight() > 0 ) - bSkipRowBreaks = true; - } + if (pStyleSet->GetItemState(ATTR_PAGE_SCALETOPAGES, false, &pItem) == SfxItemState::SET) + { + OSL_ENSURE(dynamic_cast<const SfxUInt16Item*>(pItem) != nullptr, "invalid Item"); + bSkipColBreaks = bSkipRowBreaks + = static_cast<const SfxUInt16Item*>(pItem)->GetValue() > 0; + } + + if (!bSkipColBreaks + && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, false, &pItem) == SfxItemState::SET) + { + // #i54993# when fitting to width or height, ignore only manual breaks in that direction + const ScPageScaleToItem* pScaleToItem = static_cast<const ScPageScaleToItem*>(pItem); + if (pScaleToItem->GetWidth() > 0) + bSkipColBreaks = true; + if (pScaleToItem->GetHeight() > 0) + bSkipRowBreaks = true; + } } tools::Long nPageSizeX = aPageSizeTwips.Width(); tools::Long nPageSizeY = aPageSizeTwips.Height(); - // Beginning: Remove breaks + // Beginning: Remove breaks - for (SCCOL nX : GetColumnsRange(0, nStartCol-1)) + for (SCCOL nX : GetColumnsRange(0, nStartCol - 1)) RemoveColBreak(nX, true, false); - RemoveRowPageBreaks(0, nStartRow-1); + RemoveRowPageBreaks(0, nStartRow - 1); if (nStartCol > 0) - SetColBreak(nStartCol, true, false); // AREABREAK + SetColBreak(nStartCol, true, false); // AREABREAK if (nStartRow > 0) - SetRowBreak(nStartRow, true, false); // AREABREAK + SetRowBreak(nStartRow, true, false); // AREABREAK - // Middle part: Distribute breaks + // Middle part: Distribute breaks - bool bRepeatCol = ( nRepeatStartX != SCCOL_REPEAT_NONE ); + bool bRepeatCol = (nRepeatStartX != SCCOL_REPEAT_NONE); bool bColFound = false; tools::Long nSizeX = 0; - for (SCCOL nX=nStartCol; nX<=nEndCol; nX++) + for (SCCOL nX = nStartCol; nX <= nEndCol; nX++) { bool bStartOfPage = false; tools::Long nThisX = ColHidden(nX) ? 0 : mpColWidth->GetValue(nX); bool bManualBreak = HasColManualBreak(nX); - if ( (nSizeX+nThisX > nPageSizeX) || (bManualBreak && !bSkipColBreaks) ) + if ((nSizeX + nThisX > nPageSizeX) || (bManualBreak && !bSkipColBreaks)) { SetColBreak(nX, true, false); nSizeX = 0; @@ -174,12 +176,12 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) else bStartOfPage = true; - if ( bStartOfPage && bRepeatCol && nX>nRepeatStartX && !bColFound ) + if (bStartOfPage && bRepeatCol && nX > nRepeatStartX && !bColFound) { // subtract size of repeat columns from page size - for (SCCOL i=nRepeatStartX; i<=nRepeatEndX; i++) + for (SCCOL i = nRepeatStartX; i <= nRepeatEndX; i++) nPageSizeX -= ColHidden(i) ? 0 : mpColWidth->GetValue(i); - while (nX<=nRepeatEndX) + while (nX <= nRepeatEndX) RemoveColBreak(++nX, true, false); bColFound = true; } @@ -188,10 +190,10 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) } // Remove all page breaks in range. - RemoveRowPageBreaks(nStartRow+1, nEndRow); + RemoveRowPageBreaks(nStartRow + 1, nEndRow); // And set new page breaks. - bool bRepeatRow = ( nRepeatStartY != SCROW_REPEAT_NONE ); + bool bRepeatRow = (nRepeatStartY != SCROW_REPEAT_NONE); bool bRowFound = false; tools::Long nSizeY = 0; ScFlatBoolRowSegments::ForwardIterator aIterHidden(*mpHiddenRows); @@ -202,7 +204,8 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) bool bStartOfPage = false; bool bThisRowHidden = false; const bool bHasValue = aIterHidden.getValue(nY, bThisRowHidden); - assert(bHasValue); (void)bHasValue; + assert(bHasValue); + (void)bHasValue; tools::Long nThisY = 0; if (!bThisRowHidden) { @@ -219,10 +222,10 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) bManualBreak = (nY == nNextManualBreak); if (nY >= nNextManualBreak) // Query the next manual break position. - nNextManualBreak = GetNextManualBreak(nY+1); + nNextManualBreak = GetNextManualBreak(nY + 1); } - if ( (nSizeY+nThisY > nPageSizeY) || (bManualBreak && !bSkipRowBreaks) ) + if ((nSizeY + nThisY > nPageSizeY) || (bManualBreak && !bSkipRowBreaks)) { SetRowBreak(nY, true, false); nSizeY = 0; @@ -233,7 +236,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) else bStartOfPage = true; - if ( bStartOfPage && bRepeatRow && nY>nRepeatStartY && !bRowFound ) + if (bStartOfPage && bRepeatRow && nY > nRepeatStartY && !bRowFound) { // subtract size of repeat rows from page size tools::ULong nHeights = GetTotalRowHeight(nRepeatStartY, nRepeatEndY); @@ -252,7 +255,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) // Hidden row range. Skip them unless there is a manual break. SCROW nLastCommon = aIterHidden.getLastPos(); if (nNextManualBreak >= 0) - nLastCommon = ::std::min(nLastCommon, nNextManualBreak-1); + nLastCommon = ::std::min(nLastCommon, nNextManualBreak - 1); nY = nLastCommon; } else @@ -263,7 +266,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) SCROW nLastHeight = aIterHeights.getLastPos(); SCROW nLastCommon = ::std::min(nLastHidden, nLastHeight); if (nNextManualBreak >= 0) - nLastCommon = ::std::min(nLastCommon, nNextManualBreak-1); + nLastCommon = ::std::min(nLastCommon, nNextManualBreak - 1); if (nLastCommon > nY) { @@ -282,21 +285,22 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) nSizeY += nThisY; } - // End: Remove Break + // End: Remove Break if (nEndCol < rDocument.MaxCol()) { - SetColBreak(nEndCol+1, true, false); // AREABREAK + SetColBreak(nEndCol + 1, true, false); // AREABREAK for (SCCOL nCol : GetColumnsRange(nEndCol + 2, rDocument.MaxCol())) RemoveColBreak(nCol, true, false); } if (nEndRow < rDocument.MaxRow()) { - SetRowBreak(nEndRow+1, true, false); // AREABREAK - if (nEndRow+2 <= rDocument.MaxRow()) - RemoveRowPageBreaks(nEndRow+2, rDocument.MaxRow()); + SetRowBreak(nEndRow + 1, true, false); // AREABREAK + if (nEndRow + 2 <= rDocument.MaxRow()) + RemoveRowPageBreaks(nEndRow + 2, rDocument.MaxRow()); } - mbPageBreaksValid = !pUserArea; // #i116881# the valid flag can only apply to the "no user area" case + mbPageBreaksValid + = !pUserArea; // #i116881# the valid flag can only apply to the "no user area" case } void ScTable::RemoveManualBreaks() @@ -313,14 +317,14 @@ bool ScTable::HasManualBreaks() const return !maRowManualBreaks.empty() || !maColManualBreaks.empty(); } -void ScTable::SetRowManualBreaks( const ::std::set<SCROW>& rBreaks ) +void ScTable::SetRowManualBreaks(const ::std::set<SCROW>& rBreaks) { maRowManualBreaks = rBreaks; InvalidatePageBreaks(); SetStreamValid(false); } -void ScTable::SetColManualBreaks( const ::std::set<SCCOL>& rBreaks ) +void ScTable::SetColManualBreaks(const ::std::set<SCCOL>& rBreaks) { maColManualBreaks = rBreaks; InvalidatePageBreaks(); @@ -335,7 +339,8 @@ void ScTable::GetAllRowBreaks(set<SCROW>& rBreaks, bool bPage, bool bManual) con if (bManual) { using namespace std; - copy(maRowManualBreaks.begin(), maRowManualBreaks.end(), inserter(rBreaks, rBreaks.begin())); + copy(maRowManualBreaks.begin(), maRowManualBreaks.end(), + inserter(rBreaks, rBreaks.begin())); } } @@ -347,7 +352,8 @@ void ScTable::GetAllColBreaks(set<SCCOL>& rBreaks, bool bPage, bool bManual) con if (bManual) { using namespace std; - copy(maColManualBreaks.begin(), maColManualBreaks.end(), inserter(rBreaks, rBreaks.begin())); + copy(maColManualBreaks.begin(), maColManualBreaks.end(), + inserter(rBreaks, rBreaks.begin())); } } @@ -396,7 +402,7 @@ void ScTable::RemoveRowPageBreaks(SCROW nStartRow, SCROW nEndRow) if (!ValidRow(nStartRow) || !ValidRow(nEndRow)) return; - set<SCROW>::iterator low = maRowPageBreaks.lower_bound(nStartRow); + set<SCROW>::iterator low = maRowPageBreaks.lower_bound(nStartRow); set<SCROW>::iterator high = maRowPageBreaks.upper_bound(nEndRow); maRowPageBreaks.erase(low, high); } @@ -467,7 +473,8 @@ Sequence<TablePageBreakData> ScTable::GetRowBreakData() const using ::std::inserter; set<SCROW> aRowBreaks = maRowPageBreaks; - copy(maRowManualBreaks.begin(), maRowManualBreaks.end(), inserter(aRowBreaks, aRowBreaks.begin())); + copy(maRowManualBreaks.begin(), maRowManualBreaks.end(), + inserter(aRowBreaks, aRowBreaks.begin())); sal_Int32 i = 0; Sequence<TablePageBreakData> aSeq(aRowBreaks.size()); @@ -610,12 +617,12 @@ bool ScTable::SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden) { SetStreamValid(false); - { // Scoped bulk broadcast. + { // Scoped bulk broadcast. // Only subtotal formula cells will accept the notification of // SfxHintId::ScHiddenRowsChanged, leaving the bulk will track // those and broadcast SfxHintId::ScDataChanged to notify all // dependents. - ScBulkBroadcast aBulkBroadcast( rDocument.GetBASM(), SfxHintId::ScDataChanged); + ScBulkBroadcast aBulkBroadcast(rDocument.GetBASM(), SfxHintId::ScDataChanged); for (SCCOL i = 0; i < aCol.size(); i++) { aCol[i].BroadcastRows(nStartRow, nEndRow, SfxHintId::ScHiddenRowsChanged); @@ -689,7 +696,8 @@ void ScTable::CopyRowHidden(const ScTable& rTable, SCROW nStartRow, SCROW nEndRo } } -void ScTable::CopyRowHeight(const ScTable& rSrcTable, SCROW nStartRow, SCROW nEndRow, SCROW nSrcOffset) +void ScTable::CopyRowHeight(const ScTable& rSrcTable, SCROW nStartRow, SCROW nEndRow, + SCROW nSrcOffset) { SCROW nRow = nStartRow; ScFlatUInt16RowSegments::RangeData aSrcData; @@ -775,7 +783,7 @@ SCROW ScTable::CountVisibleRows(SCROW nStartRow, SCROW nEndRow) const return nCount; } -sal_uInt32 ScTable::GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero ) const +sal_uInt32 ScTable::GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero) const { sal_uInt32 nHeight = 0; SCROW nRow = nStartRow; @@ -788,7 +796,7 @@ sal_uInt32 ScTable::GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow, bool bHidd if (aData.mnRow2 > nEndRow) aData.mnRow2 = nEndRow; - if ( !( bHiddenAsZero && aData.mbValue ) ) + if (!(bHiddenAsZero && aData.mbValue)) // visible row range. nHeight += mpRowHeights->getSumValue(nRow, aData.mnRow2); @@ -805,7 +813,7 @@ SCCOLROW ScTable::LastHiddenColRow(SCCOLROW nPos, bool bCol) const SCCOL nCol = static_cast<SCCOL>(nPos); if (ColHidden(nCol)) { - for (SCCOL i = nCol+1; i <= rDocument.MaxCol(); ++i) + for (SCCOL i = nCol + 1; i <= rDocument.MaxCol(); ++i) { if (!ColHidden(i)) return i - 1; @@ -990,17 +998,19 @@ bool ScTable::IsManualRowHeight(SCROW nRow) const return bool(pRowFlags->GetValue(nRow) & CRFlags::ManualSize); } -namespace { - -void lcl_syncFlags(const ScDocument* pDocument, ScFlatBoolColSegments& rColSegments, const ScFlatBoolRowSegments& rRowSegments, - ScBitMaskCompressedArray<SCCOL, CRFlags>* pColFlags, ScBitMaskCompressedArray< SCROW, CRFlags>* pRowFlags, const CRFlags nFlagMask) +namespace +{ +void lcl_syncFlags(const ScDocument* pDocument, ScFlatBoolColSegments& rColSegments, + const ScFlatBoolRowSegments& rRowSegments, + ScBitMaskCompressedArray<SCCOL, CRFlags>* pColFlags, + ScBitMaskCompressedArray<SCROW, CRFlags>* pRowFlags, const CRFlags nFlagMask) { using ::sal::static_int_cast; CRFlags nFlagMaskComplement = ~nFlagMask; pRowFlags->AndValue(0, pDocument->MaxRow(), nFlagMaskComplement); - pColFlags->AndValue(0, pDocument->MaxCol()+1, nFlagMaskComplement); + pColFlags->AndValue(0, pDocument->MaxCol() + 1, nFlagMaskComplement); { // row hidden flags. @@ -1036,7 +1046,6 @@ void lcl_syncFlags(const ScDocument* pDocument, ScFlatBoolColSegments& rColSegme } } } - } void ScTable::SyncColRowFlags() @@ -1045,7 +1054,7 @@ void ScTable::SyncColRowFlags() // Manual breaks. pRowFlags->AndValue(0, rDocument.MaxRow(), nManualBreakComplement); - mpColFlags->AndValue(0, rDocument.MaxCol()+1, nManualBreakComplement); + mpColFlags->AndValue(0, rDocument.MaxCol() + 1, nManualBreakComplement); for (const auto& rBreakPos : maRowManualBreaks) pRowFlags->OrValue(rBreakPos, CRFlags::ManualBreak); @@ -1054,13 +1063,15 @@ void ScTable::SyncColRowFlags() mpColFlags->OrValue(rBreakPos, CRFlags::ManualBreak); // Hidden flags. - lcl_syncFlags(&rDocument, *mpHiddenCols, *mpHiddenRows, mpColFlags.get(), pRowFlags.get(), CRFlags::Hidden); - lcl_syncFlags(&rDocument, *mpFilteredCols, *mpFilteredRows, mpColFlags.get(), pRowFlags.get(), CRFlags::Filtered); + lcl_syncFlags(&rDocument, *mpHiddenCols, *mpHiddenRows, mpColFlags.get(), pRowFlags.get(), + CRFlags::Hidden); + lcl_syncFlags(&rDocument, *mpFilteredCols, *mpFilteredRows, mpColFlags.get(), pRowFlags.get(), + CRFlags::Filtered); } -void ScTable::SetPageSize( const Size& rSize ) +void ScTable::SetPageSize(const Size& rSize) { - if ( !rSize.IsEmpty() ) + if (!rSize.IsEmpty()) { if (aPageSizeTwips != rSize) InvalidatePageBreaks(); @@ -1072,10 +1083,7 @@ void ScTable::SetPageSize( const Size& rSize ) bPageSizeValid = false; } -bool ScTable::IsProtected() const -{ - return pTabProtection && pTabProtection->isProtected(); -} +bool ScTable::IsProtected() const { return pTabProtection && pTabProtection->isProtected(); } void ScTable::SetProtection(const ScTableProtection* pProtect) { @@ -1087,49 +1095,48 @@ void ScTable::SetProtection(const ScTableProtection* pProtect) SetStreamValid(false); } -ScTableProtection* ScTable::GetProtection() -{ - return pTabProtection.get(); -} +ScTableProtection* ScTable::GetProtection() { return pTabProtection.get(); } Size ScTable::GetPageSize() const { - if ( bPageSizeValid ) + if (bPageSizeValid) return aPageSizeTwips; else - return Size(); // blank + return Size(); // blank } -void ScTable::SetRepeatArea( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow ) +void ScTable::SetRepeatArea(SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow) { // #i117952# page break calculation uses these values (set from ScPrintFunc), not pRepeatColRange/pRepeatRowRange - if ( nStartCol != nRepeatStartX || nEndCol != nRepeatEndX || nStartRow != nRepeatStartY || nEndRow != nRepeatEndY ) + if (nStartCol != nRepeatStartX || nEndCol != nRepeatEndX || nStartRow != nRepeatStartY + || nEndRow != nRepeatEndY) InvalidatePageBreaks(); nRepeatStartX = nStartCol; - nRepeatEndX = nEndCol; + nRepeatEndX = nEndCol; nRepeatStartY = nStartRow; - nRepeatEndY = nEndRow; + nRepeatEndY = nEndRow; } -void ScTable::StartListening( const ScAddress& rAddress, SvtListener* pListener ) +void ScTable::StartListening(const ScAddress& rAddress, SvtListener* pListener) { if (!ValidCol(rAddress.Col())) return; - CreateColumnIfNotExists(rAddress.Col()).StartListening( *pListener, rAddress.Row() ); + CreateColumnIfNotExists(rAddress.Col()).StartListening(*pListener, rAddress.Row()); } -void ScTable::EndListening( const ScAddress& rAddress, SvtListener* pListener ) +void ScTable::EndListening(const ScAddress& rAddress, SvtListener* pListener) { if (!ValidCol(rAddress.Col())) return; if (rAddress.Col() < aCol.size()) - aCol[rAddress.Col()].EndListening( *pListener, rAddress.Row() ); + aCol[rAddress.Col()].EndListening(*pListener, rAddress.Row()); } -void ScTable::StartListening( sc::StartListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener ) +void ScTable::StartListening(sc::StartListeningContext& rCxt, const ScAddress& rAddress, + SvtListener& rListener) { if (!ValidCol(rAddress.Col())) return; @@ -1137,7 +1144,8 @@ void ScTable::StartListening( sc::StartListeningContext& rCxt, const ScAddress& CreateColumnIfNotExists(rAddress.Col()).StartListening(rCxt, rAddress, rListener); } -void ScTable::EndListening( sc::EndListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener ) +void ScTable::EndListening(sc::EndListeningContext& rCxt, const ScAddress& rAddress, + SvtListener& rListener) { if (!ValidCol(rAddress.Col())) return; @@ -1145,62 +1153,63 @@ void ScTable::EndListening( sc::EndListeningContext& rCxt, const ScAddress& rAdd aCol[rAddress.Col()].EndListening(rCxt, rAddress, rListener); } -void ScTable::SetPageStyle( const OUString& rName ) +void ScTable::SetPageStyle(const OUString& rName) { - if ( aPageStyle == rName ) + if (aPageStyle == rName) return; - OUString aStrNew = rName; - SfxStyleSheetBasePool* pStylePool = rDocument.GetStyleSheetPool(); - SfxStyleSheetBase* pNewStyle = pStylePool->Find( aStrNew, SfxStyleFamily::Page ); + OUString aStrNew = rName; + SfxStyleSheetBasePool* pStylePool = rDocument.GetStyleSheetPool(); + SfxStyleSheetBase* pNewStyle = pStylePool->Find(aStrNew, SfxStyleFamily::Page); - if ( !pNewStyle ) + if (!pNewStyle) { aStrNew = ScResId(STR_STYLENAME_STANDARD); - pNewStyle = pStylePool->Find( aStrNew, SfxStyleFamily::Page ); + pNewStyle = pStylePool->Find(aStrNew, SfxStyleFamily::Page); } - if ( aPageStyle == aStrNew ) + if (aPageStyle == aStrNew) return; - SfxStyleSheetBase* pOldStyle = pStylePool->Find( aPageStyle, SfxStyleFamily::Page ); - if ( pOldStyle && pNewStyle ) + SfxStyleSheetBase* pOldStyle = pStylePool->Find(aPageStyle, SfxStyleFamily::Page); + if (pOldStyle && pNewStyle) { - SfxItemSet& rOldSet = pOldStyle->GetItemSet(); - SfxItemSet& rNewSet = pNewStyle->GetItemSet(); - auto getScaleValue = [](const SfxItemSet& rSet, sal_uInt16 nId) - { return static_cast<const SfxUInt16Item&>(rSet.Get(nId)).GetValue(); }; - - const sal_uInt16 nOldScale = getScaleValue(rOldSet,ATTR_PAGE_SCALE); - const sal_uInt16 nOldScaleToPages = getScaleValue(rOldSet,ATTR_PAGE_SCALETOPAGES); - const sal_uInt16 nNewScale = getScaleValue(rNewSet,ATTR_PAGE_SCALE); - const sal_uInt16 nNewScaleToPages = getScaleValue(rNewSet,ATTR_PAGE_SCALETOPAGES); - - if ( (nOldScale != nNewScale) || (nOldScaleToPages != nNewScaleToPages) ) + SfxItemSet& rOldSet = pOldStyle->GetItemSet(); + SfxItemSet& rNewSet = pNewStyle->GetItemSet(); + auto getScaleValue = [](const SfxItemSet& rSet, sal_uInt16 nId) { + return static_cast<const SfxUInt16Item&>(rSet.Get(nId)).GetValue(); + }; + + const sal_uInt16 nOldScale = getScaleValue(rOldSet, ATTR_PAGE_SCALE); + const sal_uInt16 nOldScaleToPages = getScaleValue(rOldSet, ATTR_PAGE_SCALETOPAGES); + const sal_uInt16 nNewScale = getScaleValue(rNewSet, ATTR_PAGE_SCALE); + const sal_uInt16 nNewScaleToPages = getScaleValue(rNewSet, ATTR_PAGE_SCALETOPAGES); + + if ((nOldScale != nNewScale) || (nOldScaleToPages != nNewScaleToPages)) InvalidateTextWidth(nullptr, nullptr, false, false); } - if ( pNewStyle ) // also without the old one (for UpdateStdNames) + if (pNewStyle) // also without the old one (for UpdateStdNames) aPageStyle = aStrNew; SetStreamValid(false); } -void ScTable::PageStyleModified( const OUString& rNewName ) +void ScTable::PageStyleModified(const OUString& rNewName) { aPageStyle = rNewName; - InvalidateTextWidth(nullptr, nullptr, false, false); // don't know what was in the style before + InvalidateTextWidth(nullptr, nullptr, false, false); // don't know what was in the style before } -void ScTable::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, - bool bNumFormatChanged, bool bBroadcast ) +void ScTable::InvalidateTextWidth(const ScAddress* pAdrFrom, const ScAddress* pAdrTo, + bool bNumFormatChanged, bool bBroadcast) { - if ( pAdrFrom && !pAdrTo ) + if (pAdrFrom && !pAdrTo) { // Special case: only process the "from" cell. SCCOL nCol = pAdrFrom->Col(); SCROW nRow = pAdrFrom->Row(); - if ( nCol >= aCol.size() ) + if (nCol >= aCol.size()) return; ScColumn& rCol = aCol[nCol]; ScRefCellValue aCell = rCol.GetCellValue(nRow); @@ -1209,17 +1218,17 @@ void ScTable::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* p rCol.SetTextWidth(nRow, TEXTWIDTH_DIRTY); - if ( bNumFormatChanged ) + if (bNumFormatChanged) rCol.SetScriptType(nRow, SvtScriptType::UNKNOWN); - if ( bBroadcast ) - { // Only with CalcAsShown + if (bBroadcast) + { // Only with CalcAsShown switch (aCell.meType) { - case CELLTYPE_VALUE : + case CELLTYPE_VALUE: rCol.Broadcast(nRow); break; - case CELLTYPE_FORMULA : + case CELLTYPE_FORMULA: aCell.mpFormula->SetDirty(); break; default: @@ -1234,14 +1243,14 @@ void ScTable::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* p const SCCOL nCol1 = pAdrFrom ? pAdrFrom->Col() : 0; const SCROW nRow1 = pAdrFrom ? pAdrFrom->Row() : 0; - const SCCOL nCol2 = pAdrTo ? pAdrTo->Col() : aCol.size() - 1; - const SCROW nRow2 = pAdrTo ? pAdrTo->Row() : rDocument.MaxRow(); + const SCCOL nCol2 = pAdrTo ? pAdrTo->Col() : aCol.size() - 1; + const SCROW nRow2 = pAdrTo ? pAdrTo->Row() : rDocument.MaxRow(); for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol) { ScColumnTextWidthIterator aIter(GetDoc(), aCol[nCol], nRow1, nRow2); sc::ColumnBlockPosition blockPos; // cache mdds position - InitColumnBlockPosition( blockPos, nCol ); + InitColumnBlockPosition(blockPos, nCol); for (; aIter.hasCell(); aIter.next()) { @@ -1251,17 +1260,17 @@ void ScTable::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* p if (aCell.isEmpty()) continue; - if ( bNumFormatChanged ) + if (bNumFormatChanged) aCol[nCol].SetScriptType(nRow, SvtScriptType::UNKNOWN); - if ( bBroadcast ) - { // Only with CalcAsShown + if (bBroadcast) + { // Only with CalcAsShown switch (aCell.meType) { - case CELLTYPE_VALUE : + case CELLTYPE_VALUE: aCol[nCol].Broadcast(nRow); break; - case CELLTYPE_FORMULA : + case CELLTYPE_FORMULA: aCell.mpFormula->SetDirty(); break; default: diff --git a/sc/source/core/inc/arraysumfunctor.hxx b/sc/source/core/inc/arraysumfunctor.hxx index fb3285842812..eb046fa9b293 100644 --- a/sc/source/core/inc/arraysumfunctor.hxx +++ b/sc/source/core/inc/arraysumfunctor.hxx @@ -19,7 +19,6 @@ namespace sc { - struct ArraySumFunctor { private: @@ -33,7 +32,7 @@ public: { } - double operator() () + double operator()() { const static bool hasSSE2 = cpuid::hasSSE2(); @@ -43,12 +42,12 @@ public: if (hasSSE2) { - while ( i < mnSize && !simd::isAligned<double, 16>(pCurrent)) + while (i < mnSize && !simd::isAligned<double, 16>(pCurrent)) { fSum += *pCurrent++; i++; } - if( i < mnSize ) + if (i < mnSize) { fSum += executeSSE2(i, pCurrent); } @@ -65,7 +64,7 @@ public: // Re-calculate, carefully if (!std::isfinite(fSum)) { - sal_uInt32 nErr = reinterpret_cast< sal_math_Double * >(&fSum)->nan_parts.fraction_lo; + sal_uInt32 nErr = reinterpret_cast<sal_math_Double*>(&fSum)->nan_parts.fraction_lo; if (nErr & 0xffff0000) { fSum = 0; @@ -73,7 +72,8 @@ public: { if (!std::isfinite(mpArray[i])) { - nErr = reinterpret_cast< const sal_math_Double * >(&mpArray[i])->nan_parts.fraction_lo; + nErr = reinterpret_cast<const sal_math_Double*>(&mpArray[i]) + ->nan_parts.fraction_lo; if (!(nErr & 0xffff0000)) fSum += mpArray[i]; // Let errors encoded as NaNs propagate ??? } @@ -86,7 +86,6 @@ public: } private: - double executeSSE2(size_t& i, const double* pCurrent) const; double executeUnrolled(size_t& i, const double* pCurrent) const { diff --git a/sc/source/core/inc/cellkeytranslator.hxx b/sc/source/core/inc/cellkeytranslator.hxx index c94f061c5b03..5d5aae5335a2 100644 --- a/sc/source/core/inc/cellkeytranslator.hxx +++ b/sc/source/core/inc/cellkeytranslator.hxx @@ -26,20 +26,23 @@ #include <memory> #include <unordered_map> -namespace com::sun::star::lang { struct Locale; } +namespace com::sun::star::lang +{ +struct Locale; +} struct TransItem; struct ScCellKeyword { const char* mpName; - OpCode meOpCode; + OpCode meOpCode; const css::lang::Locale& mrLocale; ScCellKeyword(const char* pName, OpCode eOpCode, const css::lang::Locale& rLocale); }; -typedef std::unordered_map< OUString, ::std::vector<ScCellKeyword> > ScCellKeywordHashMap; +typedef std::unordered_map<OUString, ::std::vector<ScCellKeyword>> ScCellKeywordHashMap; /** Translate cell function keywords. @@ -69,8 +72,7 @@ private: ScCellKeywordTranslator(); void init(); - void addToMap(const OUString& rKey, const char* pName, - const css::lang::Locale& rLocale, + void addToMap(const OUString& rKey, const char* pName, const css::lang::Locale& rLocale, OpCode eOpCode); void addToMap(const TransItem* pItems, const css::lang::Locale& rLocale); diff --git a/sc/source/core/inc/doubleref.hxx b/sc/source/core/inc/doubleref.hxx index dc1b93ba96c6..621bb2e6ba66 100644 --- a/sc/source/core/inc/doubleref.hxx +++ b/sc/source/core/inc/doubleref.hxx @@ -71,12 +71,13 @@ public: */ virtual SCCOL findFieldColumn(SCCOL nIndex) const = 0; virtual SCCOL findFieldColumn(const OUString& rStr, FormulaError* pErr = nullptr) const = 0; - virtual std::unique_ptr<ScDBQueryParamBase> createQueryParam(const ScDBRangeBase* pQueryRef) const = 0; + virtual std::unique_ptr<ScDBQueryParamBase> + createQueryParam(const ScDBRangeBase* pQueryRef) const = 0; virtual bool isRangeEqual(const ScRange& rRange) const = 0; protected: ScDBRangeBase(ScDocument* pDoc); - ScDocument* getDoc() const { return mpDoc;} + ScDocument* getDoc() const { return mpDoc; } /** * Populate query options that are always the same for all database @@ -94,7 +95,7 @@ public: explicit ScDBInternalRange(ScDocument* pDoc, const ScRange& rRange); virtual ~ScDBInternalRange() override; - const ScRange& getRange() const { return maRange;} + const ScRange& getRange() const { return maRange; } virtual SCCOL getColSize() const override; virtual SCROW getRowSize() const override; @@ -121,8 +122,10 @@ public: * @return 0-based column index */ virtual SCCOL findFieldColumn(SCCOL nIndex) const override; - virtual SCCOL findFieldColumn(const OUString& rStr, FormulaError* pErr = nullptr) const override; - virtual std::unique_ptr<ScDBQueryParamBase> createQueryParam(const ScDBRangeBase* pQueryRef) const override; + virtual SCCOL findFieldColumn(const OUString& rStr, + FormulaError* pErr = nullptr) const override; + virtual std::unique_ptr<ScDBQueryParamBase> + createQueryParam(const ScDBRangeBase* pQueryRef) const override; virtual bool isRangeEqual(const ScRange& rRange) const override; private: @@ -161,8 +164,10 @@ public: * @return 0-based column index */ virtual SCCOL findFieldColumn(SCCOL nIndex) const override; - virtual SCCOL findFieldColumn(const OUString& rStr, FormulaError* pErr = nullptr) const override; - virtual std::unique_ptr<ScDBQueryParamBase> createQueryParam(const ScDBRangeBase* pQueryRef) const override; + virtual SCCOL findFieldColumn(const OUString& rStr, + FormulaError* pErr = nullptr) const override; + virtual std::unique_ptr<ScDBQueryParamBase> + createQueryParam(const ScDBRangeBase* pQueryRef) const override; virtual bool isRangeEqual(const ScRange& rRange) const override; private: diff --git a/sc/source/core/inc/scrdata.hxx b/sc/source/core/inc/scrdata.hxx index b65a6ed63e7f..127fc2014245 100644 --- a/sc/source/core/inc/scrdata.hxx +++ b/sc/source/core/inc/scrdata.hxx @@ -22,12 +22,15 @@ #include <com/sun/star/uno/Reference.hxx> -namespace com::sun::star::i18n { class XBreakIterator; } +namespace com::sun::star::i18n +{ +class XBreakIterator; +} class ScScriptTypeData { public: - css::uno::Reference< css::i18n::XBreakIterator > xBreakIter; + css::uno::Reference<css::i18n::XBreakIterator> xBreakIter; ScScriptTypeData() {} }; diff --git a/sc/source/core/tool/addincfg.cxx b/sc/source/core/tool/addincfg.cxx index 9e90505ed2ce..292e822a57e7 100644 --- a/sc/source/core/tool/addincfg.cxx +++ b/sc/source/core/tool/addincfg.cxx @@ -29,28 +29,25 @@ using namespace com::sun::star; -#define CFGPATH_ADDINS "Office.CalcAddIns/AddInInfo" +#define CFGPATH_ADDINS "Office.CalcAddIns/AddInInfo" -ScAddInCfg::ScAddInCfg() : - ConfigItem( CFGPATH_ADDINS ) +ScAddInCfg::ScAddInCfg() + : ConfigItem(CFGPATH_ADDINS) { - uno::Sequence<OUString> aNames(1); // one entry: empty string - EnableNotification( aNames ); + uno::Sequence<OUString> aNames(1); // one entry: empty string + EnableNotification(aNames); } -void ScAddInCfg::ImplCommit() -{ - SAL_WARN("sc", "ScAddInCfg shouldn't be modified"); -} +void ScAddInCfg::ImplCommit() { SAL_WARN("sc", "ScAddInCfg shouldn't be modified"); } -void ScAddInCfg::Notify( const uno::Sequence<OUString>& ) +void ScAddInCfg::Notify(const uno::Sequence<OUString>&) { // forget all add-in information, re-initialize when needed next time ScGlobal::GetAddInCollection()->Clear(); // function list must also be rebuilt, but can't be modified while function // autopilot is open (function list for autopilot is then still old) - if ( SC_MOD()->GetCurRefDlgId() != SID_OPENDLG_FUNCTION ) + if (SC_MOD()->GetCurRefDlgId() != SID_OPENDLG_FUNCTION) ScGlobal::ResetFunctionList(); } diff --git a/sc/source/core/tool/math.cxx b/sc/source/core/tool/math.cxx index 436b24c94f28..a077d5c3521a 100644 --- a/sc/source/core/tool/math.cxx +++ b/sc/source/core/tool/math.cxx @@ -14,19 +14,19 @@ #include <o3tl/float_int_conversion.hxx> -namespace sc { - -static double err_pow( const double& fVal1, const double& fVal2 ) +namespace sc +{ +static double err_pow(const double& fVal1, const double& fVal2) { // pow() is expected to set domain error or pole error or range error (or // flag them via exceptions) or return NaN or Inf. assert((math_errhandling & (MATH_ERRNO | MATH_ERREXCEPT)) != 0); std::feclearexcept(FE_ALL_EXCEPT); errno = 0; - return pow( fVal1, fVal2); + return pow(fVal1, fVal2); } -double power( const double& fVal1, const double& fVal2 ) +double power(const double& fVal1, const double& fVal2) { double fPow; if (fVal1 < 0 && fVal2 != 0.0) @@ -36,32 +36,31 @@ double power( const double& fVal1, const double& fVal2 ) && o3tl::convertsToAtMost(f, SAL_MAX_INT64))) { // Casting to int would be undefined behaviour. - fPow = err_pow( fVal1, fVal2); + fPow = err_pow(fVal1, fVal2); } else { const sal_Int64 i = static_cast<sal_Int64>(f); if (i % 2 != 0 && rtl::math::approxEqual(1 / static_cast<double>(i), fVal2)) - fPow = -err_pow( -fVal1, fVal2); + fPow = -err_pow(-fVal1, fVal2); else - fPow = err_pow( fVal1, fVal2); + fPow = err_pow(fVal1, fVal2); } } else { - fPow = err_pow( fVal1, fVal2); + fPow = err_pow(fVal1, fVal2); } // The pow() call must had been the most recent call to check errno or exception. if ((((math_errhandling & MATH_ERRNO) != 0) && (errno == EDOM || errno == ERANGE)) - || (((math_errhandling & MATH_ERREXCEPT) != 0) - && std::fetestexcept( FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)) - || !std::isfinite(fPow)) + || (((math_errhandling & MATH_ERREXCEPT) != 0) + && std::fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)) + || !std::isfinite(fPow)) { - fPow = CreateDoubleError( FormulaError::IllegalFPOperation); + fPow = CreateDoubleError(FormulaError::IllegalFPOperation); } return fPow; } - } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/sc/source/core/tool/subtotal.cxx b/sc/source/core/tool/subtotal.cxx index 5fd8d8cd4324..9676553a8e28 100644 --- a/sc/source/core/tool/subtotal.cxx +++ b/sc/source/core/tool/subtotal.cxx @@ -63,7 +63,7 @@ bool SubTotal::SafeDiv(double& fVal1, double fVal2) return bOk; } -void ScFunctionData::update( double fNewVal ) +void ScFunctionData::update(double fNewVal) { if (mbError) return; @@ -73,53 +73,53 @@ void ScFunctionData::update( double fNewVal ) case SUBTOTAL_FUNC_SUM: if (!SubTotal::SafePlus(getValueRef(), fNewVal)) mbError = true; - break; + break; case SUBTOTAL_FUNC_PROD: - if (getCountRef() == 0) // copy first value (nVal is initialized to 0) + if (getCountRef() == 0) // copy first value (nVal is initialized to 0) { getValueRef() = fNewVal; - getCountRef() = 1; // don't care about further count + getCountRef() = 1; // don't care about further count } else if (!SubTotal::SafeMult(getValueRef(), fNewVal)) mbError = true; - break; + break; case SUBTOTAL_FUNC_CNT: case SUBTOTAL_FUNC_CNT2: ++getCountRef(); - break; + break; case SUBTOTAL_FUNC_SELECTION_COUNT: getCountRef() += fNewVal; - break; + break; case SUBTOTAL_FUNC_AVE: if (!SubTotal::SafePlus(getValueRef(), fNewVal)) mbError = true; else ++getCountRef(); - break; + break; case SUBTOTAL_FUNC_MAX: - if (getCountRef() == 0) // copy first value (nVal is initialized to 0) + if (getCountRef() == 0) // copy first value (nVal is initialized to 0) { getValueRef() = fNewVal; - getCountRef() = 1; // don't care about further count + getCountRef() = 1; // don't care about further count } else if (fNewVal > getValueRef()) getValueRef() = fNewVal; - break; + break; case SUBTOTAL_FUNC_MIN: - if (getCountRef() == 0) // copy first value (nVal is initialized to 0) + if (getCountRef() == 0) // copy first value (nVal is initialized to 0) { getValueRef() = fNewVal; - getCountRef() = 1; // don't care about further count + getCountRef() = 1; // don't care about further count } else if (fNewVal < getValueRef()) getValueRef() = fNewVal; - break; + break; case SUBTOTAL_FUNC_VAR: case SUBTOTAL_FUNC_STD: case SUBTOTAL_FUNC_VARP: case SUBTOTAL_FUNC_STDP: - maWelford.update( fNewVal); - break; + maWelford.update(fNewVal); + break; default: // unhandled unknown mbError = true; @@ -138,23 +138,23 @@ double ScFunctionData::getResult() case SUBTOTAL_FUNC_CNT2: case SUBTOTAL_FUNC_SELECTION_COUNT: fRet = getCountRef(); - break; + break; case SUBTOTAL_FUNC_SUM: case SUBTOTAL_FUNC_MAX: case SUBTOTAL_FUNC_MIN: // Note that nVal is 0.0 for MAX and MIN if nCount==0, that's also // how it is defined in ODFF. fRet = getValueRef(); - break; + break; case SUBTOTAL_FUNC_PROD: fRet = (getCountRef() > 0) ? getValueRef() : 0.0; - break; + break; case SUBTOTAL_FUNC_AVE: if (getCountRef() == 0) mbError = true; else fRet = getValueRef() / getCountRef(); - break; + break; case SUBTOTAL_FUNC_VAR: case SUBTOTAL_FUNC_STD: if (maWelford.getCount() < 2) @@ -165,9 +165,9 @@ double ScFunctionData::getResult() if (fRet < 0.0) mbError = true; else if (meFunc == SUBTOTAL_FUNC_STD) - fRet = sqrt( fRet); + fRet = sqrt(fRet); } - break; + break; case SUBTOTAL_FUNC_VARP: case SUBTOTAL_FUNC_STDP: if (maWelford.getCount() < 1) @@ -180,20 +180,20 @@ double ScFunctionData::getResult() if (fRet < 0.0) mbError = true; else if (meFunc == SUBTOTAL_FUNC_STDP) - fRet = sqrt( fRet); + fRet = sqrt(fRet); } - break; + break; default: assert(!"unhandled unknown"); mbError = true; - break; + break; } if (mbError) fRet = 0.0; return fRet; } -void WelfordRunner::update( double fVal ) +void WelfordRunner::update(double fVal) { ++mnCount; const double fDelta = fVal - mfMean; diff --git a/sc/source/filter/excel/xltracer.cxx b/sc/source/filter/excel/xltracer.cxx index 3e11dd193d7e..c04d186a5a60 100644 --- a/sc/source/filter/excel/xltracer.cxx +++ b/sc/source/filter/excel/xltracer.cxx @@ -25,66 +25,61 @@ using ::com::sun::star::uno::Sequence; using ::com::sun::star::beans::PropertyValue; -XclTracer::XclTracer( const OUString& rDocUrl ) +XclTracer::XclTracer(const OUString& rDocUrl) : mbEnabled(false) - , maFirstTimes(eTraceLength,true) + , maFirstTimes(eTraceLength, true) { - Sequence< PropertyValue > aConfigData( 1 ); - aConfigData[ 0 ].Name = "DocumentURL"; - aConfigData[ 0 ].Value <<= rDocUrl; + Sequence<PropertyValue> aConfigData(1); + aConfigData[0].Name = "DocumentURL"; + aConfigData[0].Value <<= rDocUrl; } -XclTracer::~XclTracer() -{ -} +XclTracer::~XclTracer() {} void XclTracer::ProcessTraceOnce(XclTracerId eProblem) { - if( mbEnabled && maFirstTimes[eProblem]) + if (mbEnabled && maFirstTimes[eProblem]) { maFirstTimes[eProblem] = false; } } -void XclTracer::TraceInvalidAddress( const ScAddress& rPos, const ScAddress& rMaxPos ) +void XclTracer::TraceInvalidAddress(const ScAddress& rPos, const ScAddress& rMaxPos) { TraceInvalidRow(rPos.Row(), rMaxPos.Row()); TraceInvalidTab(rPos.Tab(), rMaxPos.Tab()); } -void XclTracer::TraceInvalidRow( sal_uInt32 nRow, sal_uInt32 nMaxRow ) +void XclTracer::TraceInvalidRow(sal_uInt32 nRow, sal_uInt32 nMaxRow) { - if(nRow > nMaxRow) + if (nRow > nMaxRow) ProcessTraceOnce(eRowLimitExceeded); } -void XclTracer::TraceInvalidTab( SCTAB nTab, SCTAB nMaxTab ) +void XclTracer::TraceInvalidTab(SCTAB nTab, SCTAB nMaxTab) { - if(nTab > nMaxTab) + if (nTab > nMaxTab) ProcessTraceOnce(eTabLimitExceeded); } -void XclTracer::TracePrintRange() -{ - ProcessTraceOnce( ePrintRange); -} +void XclTracer::TracePrintRange() { ProcessTraceOnce(ePrintRange); } -void XclTracer::TraceDates( sal_uInt16 nNumFmt) +void XclTracer::TraceDates(sal_uInt16 nNumFmt) { // Short Date = 14 and Short Date+Time = 22 - if(nNumFmt == 14 || nNumFmt == 22) + if (nNumFmt == 14 || nNumFmt == 22) ProcessTraceOnce(eShortDate); } -void XclTracer::TraceBorderLineStyle( bool bBorderLineStyle) +void XclTracer::TraceBorderLineStyle(bool bBorderLineStyle) { - if(bBorderLineStyle) + if (bBorderLineStyle) ProcessTraceOnce(eBorderLineStyle); } -void XclTracer::TraceFillPattern( bool bFillPattern) +void XclTracer::TraceFillPattern(bool bFillPattern) { - if(bFillPattern) + if (bFillPattern) ProcessTraceOnce(eFillPattern); } @@ -94,9 +89,9 @@ void XclTracer::TraceFormulaMissingArg() ProcessTraceOnce(eFormulaMissingArg); } -void XclTracer::TracePivotDataSource( bool bExternal) +void XclTracer::TracePivotDataSource(bool bExternal) { - if(bExternal) + if (bExternal) ProcessTraceOnce(ePivotDataSource); } @@ -106,15 +101,9 @@ void XclTracer::TracePivotChartExists() ProcessTraceOnce(ePivotChartExists); } -void XclTracer::TraceChartUnKnownType() -{ - ProcessTraceOnce(eChartUnKnownType); -} +void XclTracer::TraceChartUnKnownType() { ProcessTraceOnce(eChartUnKnownType); } -void XclTracer::TraceChartOnlySheet() -{ - ProcessTraceOnce(eChartOnlySheet); -} +void XclTracer::TraceChartOnlySheet() { ProcessTraceOnce(eChartOnlySheet); } void XclTracer::TraceChartDataTable() { @@ -135,15 +124,12 @@ void XclTracer::TraceUnsupportedObjects() ProcessTraceOnce(eUnsupportedObject); } -void XclTracer::TraceObjectNotPrintable() -{ - ProcessTraceOnce(eObjectNotPrintable); -} +void XclTracer::TraceObjectNotPrintable() { ProcessTraceOnce(eObjectNotPrintable); } -void XclTracer::TraceDVType( bool bType) +void XclTracer::TraceDVType(bool bType) { // Custom types work if 'Data->validity dialog' is not OKed. - if(bType) + if (bType) ProcessTraceOnce(eDVType); } diff --git a/sc/source/filter/inc/optab.h b/sc/source/filter/inc/optab.h index 9dd8fb164f27..a8e6ee6e2622 100644 --- a/sc/source/filter/inc/optab.h +++ b/sc/source/filter/inc/optab.h @@ -26,17 +26,17 @@ class SvStream; struct LotusContext; -typedef void ( *OPCODE_FKT )(LotusContext &rContext, SvStream &rStream, sal_uInt16 nLength); +typedef void (*OPCODE_FKT)(LotusContext& rContext, SvStream& rStream, sal_uInt16 nLength); -#define FKT_LIMIT 101 +#define FKT_LIMIT 101 -#define FKT_LIMIT123 101 +#define FKT_LIMIT123 101 -#define LOTUS_EOF 0x01 +#define LOTUS_EOF 0x01 #define LOTUS_FILEPASSWD 0x4b -#define LOTUS_PATTERN 0x284 +#define LOTUS_PATTERN 0x284 #define LOTUS_FORMAT_INDEX 0x800 diff --git a/sc/source/filter/inc/qpro.hxx b/sc/source/filter/inc/qpro.hxx index 5bdc913eadd8..573452da459a 100644 --- a/sc/source/filter/inc/qpro.hxx +++ b/sc/source/filter/inc/qpro.hxx @@ -35,7 +35,7 @@ class ScQProReader sal_uInt16 mnId; sal_uInt16 mnLength; sal_uInt32 mnOffset; - SvStream *mpStream; + SvStream* mpStream; bool mbEndOfFile; const SCTAB mnMaxTab; @@ -44,15 +44,15 @@ public: ~ScQProReader(); bool recordsLeft(); - void SetEof( bool bValue ){ mbEndOfFile = bValue; } + void SetEof(bool bValue) { mbEndOfFile = bValue; } bool nextRecord(); sal_uInt16 getId() const { return mnId; } sal_uInt16 getLength() const { return mnLength; } OUString readString(sal_uInt16 nLength); - ErrCode parse( ScDocument& rDoc ); - ErrCode import( ScDocument& rDoc ); //parse + CalcAfterLoad - ErrCode readSheet( SCTAB nTab, ScDocument& rDoc, ScQProStyle *pStyle ); + ErrCode parse(ScDocument& rDoc); + ErrCode import(ScDocument& rDoc); //parse + CalcAfterLoad + ErrCode readSheet(SCTAB nTab, ScDocument& rDoc, ScQProStyle* pStyle); }; #endif diff --git a/sc/source/filter/inc/qproform.hxx b/sc/source/filter/inc/qproform.hxx index a4e643f433e1..d272e2c4eb1a 100644 --- a/sc/source/filter/inc/qproform.hxx +++ b/sc/source/filter/inc/qproform.hxx @@ -57,15 +57,16 @@ private: public: static const size_t nBufSize = 256; - QProToSc( SvStream &aStr, svl::SharedStringPool& rSPool, const ScAddress& rRefPos ); - ConvErr Convert( const ScDocument& rDoc, std::unique_ptr<ScTokenArray>& pArray ); - void DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const char* pExtString ); - void ReadSRD( const ScDocument& rDoc, ScSingleRefData& rR, sal_Int8 nPage, sal_Int8 nCol, sal_uInt16 rRel ); - void IncToken( TokenId &aParam ); - static DefTokenId IndexToToken( sal_uInt16 nToken ); - static QPRO_FUNC_TYPE IndexToType( sal_uInt8 nToken ); - static DefTokenId IndexToDLLId( sal_uInt16 nIndex ); - static const char* getString( sal_uInt8 nIndex ); + QProToSc(SvStream& aStr, svl::SharedStringPool& rSPool, const ScAddress& rRefPos); + ConvErr Convert(const ScDocument& rDoc, std::unique_ptr<ScTokenArray>& pArray); + void DoFunc(DefTokenId eOc, sal_uInt16 nArgs, const char* pExtString); + void ReadSRD(const ScDocument& rDoc, ScSingleRefData& rR, sal_Int8 nPage, sal_Int8 nCol, + sal_uInt16 rRel); + void IncToken(TokenId& aParam); + static DefTokenId IndexToToken(sal_uInt16 nToken); + static QPRO_FUNC_TYPE IndexToType(sal_uInt8 nToken); + static DefTokenId IndexToDLLId(sal_uInt16 nIndex); + static const char* getString(sal_uInt8 nIndex); }; #endif diff --git a/sc/source/filter/inc/sharedformulagroups.hxx b/sc/source/filter/inc/sharedformulagroups.hxx index 540d1e901ef6..ae45f07a53e2 100644 --- a/sc/source/filter/inc/sharedformulagroups.hxx +++ b/sc/source/filter/inc/sharedformulagroups.hxx @@ -15,8 +15,8 @@ #include <map> class ScTokenArray; -namespace sc { - +namespace sc +{ class SharedFormulaGroupEntry { private: @@ -41,12 +41,11 @@ private: StoreType m_Store; public: - void set( size_t nSharedId, std::unique_ptr<ScTokenArray> pArray ); - void set( size_t nSharedId, std::unique_ptr<ScTokenArray> pArray, const ScAddress& rOrigin ); - const ScTokenArray* get( size_t nSharedId ) const; - const SharedFormulaGroupEntry* getEntry( size_t nSharedId ) const; + void set(size_t nSharedId, std::unique_ptr<ScTokenArray> pArray); + void set(size_t nSharedId, std::unique_ptr<ScTokenArray> pArray, const ScAddress& rOrigin); + const ScTokenArray* get(size_t nSharedId) const; + const SharedFormulaGroupEntry* getEntry(size_t nSharedId) const; }; - } #endif diff --git a/sc/source/filter/inc/xepivotxml.hxx b/sc/source/filter/inc/xepivotxml.hxx index 4d02d30615d6..18c6a50e6129 100644 --- a/sc/source/filter/inc/xepivotxml.hxx +++ b/sc/source/filter/inc/xepivotxml.hxx @@ -29,15 +29,15 @@ public: ScRange maSrcRange; }; - XclExpXmlPivotCaches( const XclExpRoot& rRoot ); - virtual void SaveXml( XclExpXmlStream& rStrm ) override; + XclExpXmlPivotCaches(const XclExpRoot& rRoot); + virtual void SaveXml(XclExpXmlStream& rStrm) override; - void SetCaches( const std::vector<Entry>& rCaches ); + void SetCaches(const std::vector<Entry>& rCaches); bool HasCaches() const; - const Entry* GetCache( sal_Int32 nCacheId ) const; + const Entry* GetCache(sal_Int32 nCacheId) const; private: - void SavePivotCacheXml( XclExpXmlStream& rStrm, const Entry& rEntry, sal_Int32 nCacheId ); + void SavePivotCacheXml(XclExpXmlStream& rStrm, const Entry& rEntry, sal_Int32 nCacheId); private: std::vector<Entry> maCaches; @@ -51,7 +51,7 @@ class XclExpXmlPivotTables : public XclExpRecordBase, protected XclExpRoot sal_Int32 mnCacheId; sal_Int32 mnPivotId; /// used as [n] in pivotTable[n].xml part name. - Entry( const ScDPObject* pTable, sal_Int32 nCacheId, sal_Int32 nPivotId ); + Entry(const ScDPObject* pTable, sal_Int32 nCacheId, sal_Int32 nPivotId); }; const XclExpXmlPivotCaches& mrCaches; @@ -59,27 +59,28 @@ class XclExpXmlPivotTables : public XclExpRecordBase, protected XclExpRoot TablesType maTables; public: - XclExpXmlPivotTables( const XclExpRoot& rRoot, const XclExpXmlPivotCaches& rCaches ); + XclExpXmlPivotTables(const XclExpRoot& rRoot, const XclExpXmlPivotCaches& rCaches); - virtual void SaveXml( XclExpXmlStream& rStrm ) override; + virtual void SaveXml(XclExpXmlStream& rStrm) override; - void AppendTable( const ScDPObject* pTable, sal_Int32 nCacheId, sal_Int32 nPivotId ); + void AppendTable(const ScDPObject* pTable, sal_Int32 nCacheId, sal_Int32 nPivotId); private: - void SavePivotTableXml( XclExpXmlStream& rStrm, const ScDPObject& rObj, sal_Int32 nCacheId ); + void SavePivotTableXml(XclExpXmlStream& rStrm, const ScDPObject& rObj, sal_Int32 nCacheId); }; class XclExpXmlPivotTableManager : protected XclExpRoot { typedef std::map<SCTAB, std::unique_ptr<XclExpXmlPivotTables>> TablesType; typedef std::unordered_map<const ScDPObject*, sal_Int32> CacheIdMapType; + public: - XclExpXmlPivotTableManager( const XclExpRoot& rRoot ); + XclExpXmlPivotTableManager(const XclExpRoot& rRoot); void Initialize(); XclExpXmlPivotCaches& GetCaches(); - XclExpXmlPivotTables* GetTablesBySheet( SCTAB nTab ); + XclExpXmlPivotTables* GetTablesBySheet(SCTAB nTab); private: XclExpXmlPivotCaches maCaches; diff --git a/sc/source/filter/lotus/memory.cxx b/sc/source/filter/lotus/memory.cxx index 7852858b726e..a5543daa8229 100644 --- a/sc/source/filter/lotus/memory.cxx +++ b/sc/source/filter/lotus/memory.cxx @@ -27,21 +27,21 @@ #include <tool.h> #include <editeng/svxenum.hxx> -bool MemNew(LotusContext &rContext) +bool MemNew(LotusContext& rContext) { rContext.pValueFormCache = new FormCache(&rContext.rDoc); // for tool.cxx::PutFormString() - rContext.pAttrRight = new SvxHorJustifyItem( SvxCellHorJustify::Right, ATTR_HOR_JUSTIFY ); - rContext.pAttrLeft = new SvxHorJustifyItem( SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY ); - rContext.pAttrCenter = new SvxHorJustifyItem( SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY ); - rContext.pAttrRepeat = new SvxHorJustifyItem( SvxCellHorJustify::Repeat, ATTR_HOR_JUSTIFY ); - rContext.pAttrStandard = new SvxHorJustifyItem( SvxCellHorJustify::Standard, ATTR_HOR_JUSTIFY ); + rContext.pAttrRight = new SvxHorJustifyItem(SvxCellHorJustify::Right, ATTR_HOR_JUSTIFY); + rContext.pAttrLeft = new SvxHorJustifyItem(SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY); + rContext.pAttrCenter = new SvxHorJustifyItem(SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY); + rContext.pAttrRepeat = new SvxHorJustifyItem(SvxCellHorJustify::Repeat, ATTR_HOR_JUSTIFY); + rContext.pAttrStandard = new SvxHorJustifyItem(SvxCellHorJustify::Standard, ATTR_HOR_JUSTIFY); return true; } -void MemDelete(LotusContext &rContext) +void MemDelete(LotusContext& rContext) { delete rContext.pValueFormCache; delete rContext.pAttrRight; diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx index 578217885b7d..86f4c8065262 100644 --- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx +++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx @@ -25,7 +25,10 @@ #include <memory> #include <tools/solar.h> -namespace com::sun::star::text { class XText; } +namespace com::sun::star::text +{ +class XText; +} class ScChangeAction; class ScChangeTrack; @@ -37,9 +40,9 @@ class ScEditEngineTextObj; class ScChangeTrackingExportHelper { - ScXMLExport& rExport; + ScXMLExport& rExport; - ScChangeTrack* pChangeTrack; + ScChangeTrack* pChangeTrack; ScEditEngineTextObj* pEditTextObj; css::uno::Reference<css::text::XText> xText; @@ -73,6 +76,7 @@ class ScChangeTrackingExportHelper void CollectCellAutoStyles(const ScCellValue& rCell); void CollectActionAutoStyles(const ScChangeAction* pAction); void WorkWithChangeAction(ScChangeAction* pAction); + public: explicit ScChangeTrackingExportHelper(ScXMLExport& rExport); ~ScChangeTrackingExportHelper(); diff --git a/sc/source/filter/xml/XMLEmptyContext.hxx b/sc/source/filter/xml/XMLEmptyContext.hxx index 9eb6fce74cde..204e99540949 100644 --- a/sc/source/filter/xml/XMLEmptyContext.hxx +++ b/sc/source/filter/xml/XMLEmptyContext.hxx @@ -21,17 +21,16 @@ #include "importcontext.hxx" - class ScXMLEmptyContext : public ScXMLImportContext { public: - ScXMLEmptyContext( ScXMLImport& rImport ); + ScXMLEmptyContext(ScXMLImport& rImport); virtual ~ScXMLEmptyContext() override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL - createFastChildContext( sal_Int32 nElement, - const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList ) override; + virtual css::uno::Reference<css::xml::sax::XFastContextHandler> SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList) override; }; #endif diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.hxx b/sc/source/filter/xml/XMLExportDatabaseRanges.hxx index c5cf519f912e..8b1478123a88 100644 --- a/sc/source/filter/xml/XMLExportDatabaseRanges.hxx +++ b/sc/source/filter/xml/XMLExportDatabaseRanges.hxx @@ -27,12 +27,13 @@ class ScXMLExport; class ScDocument; class ScMyEmptyDatabaseRangesContainer; -void writeSort(ScXMLExport& mrExport, const ScSortParam& aParam, const ScRange& aRange, const ScDocument* mpDoc); +void writeSort(ScXMLExport& mrExport, const ScSortParam& aParam, const ScRange& aRange, + const ScDocument* mpDoc); class ScXMLExportDatabaseRanges { - ScXMLExport& rExport; - ScDocument* pDoc; + ScXMLExport& rExport; + ScDocument* pDoc; public: explicit ScXMLExportDatabaseRanges(ScXMLExport& rExport); diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.hxx b/sc/source/filter/xml/XMLTrackedChangesContext.hxx index 334c96e6e8ba..e69d1f8c2142 100644 --- a/sc/source/filter/xml/XMLTrackedChangesContext.hxx +++ b/sc/source/filter/xml/XMLTrackedChangesContext.hxx @@ -22,22 +22,26 @@ #include "importcontext.hxx" -namespace sax_fastparser { class FastAttributeList; } +namespace sax_fastparser +{ +class FastAttributeList; +} class ScXMLChangeTrackingImportHelper; class ScXMLTrackedChangesContext : public ScXMLImportContext { - ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper; + ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper; public: - ScXMLTrackedChangesContext( ScXMLImport& rImport, - const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, - ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); + ScXMLTrackedChangesContext(ScXMLImport& rImport, + const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, + ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLTrackedChangesContext() override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( - sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; + virtual css::uno::Reference<css::xml::sax::XFastContextHandler> SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList) override; }; #endif diff --git a/sc/source/filter/xml/importcontext.hxx b/sc/source/filter/xml/importcontext.hxx index c762469d2360..0ed1c4d7ed49 100644 --- a/sc/source/filter/xml/importcontext.hxx +++ b/sc/source/filter/xml/importcontext.hxx @@ -20,10 +20,9 @@ class ScXMLImport; class ScXMLImportContext : public SvXMLImportContext { public: - ScXMLImportContext( - ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName); + ScXMLImportContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName); - ScXMLImportContext( SvXMLImport& rImport ); + ScXMLImportContext(SvXMLImport& rImport); protected: ScXMLImport& GetScImport(); diff --git a/sc/source/filter/xml/pivotsource.hxx b/sc/source/filter/xml/pivotsource.hxx index 5dab5c2b4d12..c8bd0937669d 100644 --- a/sc/source/filter/xml/pivotsource.hxx +++ b/sc/source/filter/xml/pivotsource.hxx @@ -17,8 +17,8 @@ #include <unordered_map> #include <vector> -namespace sc { - +namespace sc +{ /** * Store pivot table data that need to be post-processed at the end of the * import. @@ -32,7 +32,7 @@ struct PivotTableSources ScDPObject* mpDP; SelectedPagesType maSelectedPages; - SelectedPages( ScDPObject* pObj, const SelectedPagesType& rSelected ); + SelectedPages(ScDPObject* pObj, const SelectedPagesType& rSelected); }; struct SheetSource @@ -40,7 +40,7 @@ struct PivotTableSources ScDPObject* mpDP; ScSheetSourceDesc maDesc; - SheetSource( ScDPObject* pObj, const ScSheetSourceDesc& rDesc ); + SheetSource(ScDPObject* pObj, const ScSheetSourceDesc& rDesc); }; struct DBSource @@ -48,7 +48,7 @@ struct PivotTableSources ScDPObject* mpDP; ScImportSourceDesc maDesc; - DBSource( ScDPObject* pObj, const ScImportSourceDesc& rDesc ); + DBSource(ScDPObject* pObj, const ScImportSourceDesc& rDesc); }; struct ServiceSource @@ -56,25 +56,24 @@ struct PivotTableSources ScDPObject* mpDP; ScDPServiceDesc maDesc; - ServiceSource( ScDPObject* pObj, const ScDPServiceDesc& rDesc ); + ServiceSource(ScDPObject* pObj, const ScDPServiceDesc& rDesc); }; - std::vector<SelectedPages> maSelectedPagesList; - std::vector<SheetSource> maSheetSources; - std::vector<DBSource> maDBSources; - std::vector<ServiceSource> maServiceSources; + std::vector<SelectedPages> maSelectedPagesList; + std::vector<SheetSource> maSheetSources; + std::vector<DBSource> maDBSources; + std::vector<ServiceSource> maServiceSources; PivotTableSources(); - void appendSheetSource( ScDPObject* pObj, const ScSheetSourceDesc& rDesc ); - void appendDBSource( ScDPObject* pObj, const ScImportSourceDesc& rDesc ); - void appendServiceSource( ScDPObject* pObj, const ScDPServiceDesc& rDesc ); + void appendSheetSource(ScDPObject* pObj, const ScSheetSourceDesc& rDesc); + void appendDBSource(ScDPObject* pObj, const ScImportSourceDesc& rDesc); + void appendServiceSource(ScDPObject* pObj, const ScDPServiceDesc& rDesc); - void appendSelectedPages( ScDPObject* pObj, const SelectedPagesType& rSelected ); + void appendSelectedPages(ScDPObject* pObj, const SelectedPagesType& rSelected); void process(); }; - } #endif diff --git a/sc/source/filter/xml/xmlcvali.hxx b/sc/source/filter/xml/xmlcvali.hxx index e33b7f1aeb37..05998254cb45 100644 --- a/sc/source/filter/xml/xmlcvali.hxx +++ b/sc/source/filter/xml/xmlcvali.hxx @@ -24,13 +24,13 @@ class ScXMLContentValidationsContext : public ScXMLImportContext { public: - - ScXMLContentValidationsContext( ScXMLImport& rImport ); + ScXMLContentValidationsContext(ScXMLImport& rImport); virtual ~ScXMLContentValidationsContext() override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( - sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; + virtual css::uno::Reference<css::xml::sax::XFastContextHandler> SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList) override; }; #endif diff --git a/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx b/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx index 4d7d4c49aa28..78da26006fe4 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx @@ -24,16 +24,13 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; - //===== internal ======================================================== +//===== internal ======================================================== -ScAccessibleDocumentBase::ScAccessibleDocumentBase( - const uno::Reference<XAccessible>& rxParent) +ScAccessibleDocumentBase::ScAccessibleDocumentBase(const uno::Reference<XAccessible>& rxParent) : ScAccessibleContextBase(rxParent, AccessibleRole::DOCUMENT_SPREADSHEET) { } -ScAccessibleDocumentBase::~ScAccessibleDocumentBase() -{ -} +ScAccessibleDocumentBase::~ScAccessibleDocumentBase() {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/attrdlg/scuiexp.cxx b/sc/source/ui/attrdlg/scuiexp.cxx index 66665ae8c0a0..44de41d0314f 100644 --- a/sc/source/ui/attrdlg/scuiexp.cxx +++ b/sc/source/ui/attrdlg/scuiexp.cxx @@ -24,19 +24,18 @@ namespace scui { - static ScAbstractDialogFactory_Impl* GetFactory() - { - static ScAbstractDialogFactory_Impl* pFactory = new ScAbstractDialogFactory_Impl; - return pFactory; - } +static ScAbstractDialogFactory_Impl* GetFactory() +{ + static ScAbstractDialogFactory_Impl* pFactory = new ScAbstractDialogFactory_Impl; + return pFactory; +} } -extern "C" +extern "C" { +SAL_DLLPUBLIC_EXPORT ScAbstractDialogFactory* ScCreateDialogFactory() { - SAL_DLLPUBLIC_EXPORT ScAbstractDialogFactory* ScCreateDialogFactory() - { - return ::scui::GetFactory(); - } + return ::scui::GetFactory(); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/cctrl/cbnumberformat.cxx b/sc/source/ui/cctrl/cbnumberformat.cxx index 05d7281ab96d..32bc0d76d0e1 100644 --- a/sc/source/ui/cctrl/cbnumberformat.cxx +++ b/sc/source/ui/cctrl/cbnumberformat.cxx @@ -27,7 +27,8 @@ #include <sc.hrc> ScNumberFormat::ScNumberFormat(vcl::Window* pParent) - : InterimItemWindow(pParent, "modules/scalc/ui/numberbox.ui", "NumberBox", reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) + : InterimItemWindow(pParent, "modules/scalc/ui/numberbox.ui", "NumberBox", + reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) , m_xWidget(m_xBuilder->weld_combo_box("numbertype")) { m_xWidget->append_text(ScResId(STR_GENERAL)); @@ -53,10 +54,7 @@ void ScNumberFormat::dispose() InterimItemWindow::dispose(); } -ScNumberFormat::~ScNumberFormat() -{ - disposeOnce(); -} +ScNumberFormat::~ScNumberFormat() { disposeOnce(); } void ScNumberFormat::GetFocus() { @@ -76,8 +74,7 @@ IMPL_STATIC_LINK(ScNumberFormat, NumFormatSelectHdl, weld::ComboBox&, rBox, void { const sal_Int32 nVal = rBox.get_active(); SfxUInt16Item aItem(SID_NUMBER_TYPE_FORMAT, nVal); - pDisp->ExecuteList(SID_NUMBER_TYPE_FORMAT, - SfxCallMode::RECORD, {&aItem}); + pDisp->ExecuteList(SID_NUMBER_TYPE_FORMAT, SfxCallMode::RECORD, { &aItem }); pCurSh->GetWindow().GrabFocus(); } diff --git a/sc/source/ui/dataprovider/htmldataprovider.hxx b/sc/source/ui/dataprovider/htmldataprovider.hxx index 6a74eb3d9801..fcc991ff0590 100644 --- a/sc/source/ui/dataprovider/htmldataprovider.hxx +++ b/sc/source/ui/dataprovider/htmldataprovider.hxx @@ -12,21 +12,19 @@ #include <dataprovider.hxx> -namespace sc { - +namespace sc +{ class HTMLFetchThread; class HTMLDataProvider : public DataProvider { private: - ScDocument* mpDocument; rtl::Reference<HTMLFetchThread> mxHTMLFetchThread; ScDocumentUniquePtr mpDoc; public: - HTMLDataProvider(ScDocument* pDoc, sc::ExternalDataSource& rDataSource); virtual ~HTMLDataProvider() override; @@ -36,7 +34,6 @@ public: void ImportFinished(); }; - } #endif diff --git a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx index 8e59df906f66..b193acf9a251 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx @@ -24,9 +24,7 @@ ScPivotLayoutTreeList::ScPivotLayoutTreeList(std::unique_ptr<weld::TreeView> xCo mxControl->connect_row_activated(LINK(this, ScPivotLayoutTreeList, DoubleClickHdl)); } -ScPivotLayoutTreeList::~ScPivotLayoutTreeList() -{ -} +ScPivotLayoutTreeList::~ScPivotLayoutTreeList() {} void ScPivotLayoutTreeList::Setup(ScPivotLayoutDialog* pParent, SvPivotTreeListType eType) { @@ -40,7 +38,8 @@ IMPL_LINK_NOARG(ScPivotLayoutTreeList, DoubleClickHdl, weld::TreeView&, bool) if (nEntry == -1) return true; - ScItemValue* pCurrentItemValue = reinterpret_cast<ScItemValue*>(mxControl->get_id(nEntry).toInt64()); + ScItemValue* pCurrentItemValue + = reinterpret_cast<ScItemValue*>(mxControl->get_id(nEntry).toInt64()); ScPivotFuncData& rCurrentFunctionData = pCurrentItemValue->maFunctionData; if (mpParent->IsDataElement(rCurrentFunctionData.mnCol)) @@ -55,7 +54,8 @@ IMPL_LINK_NOARG(ScPivotLayoutTreeList, DoubleClickHdl, weld::TreeView&, bool) mpParent->PushDataFieldNames(aDataFieldNames); ScopedVclPtr<AbstractScDPSubtotalDlg> pDialog( - pFactory->CreateScDPSubtotalDlg(mxControl.get(), mpParent->maPivotTableObject, rCurrentLabelData, rCurrentFunctionData, aDataFieldNames)); + pFactory->CreateScDPSubtotalDlg(mxControl.get(), mpParent->maPivotTableObject, + rCurrentLabelData, rCurrentFunctionData, aDataFieldNames)); if (pDialog->Execute() == RET_OK) { @@ -73,8 +73,8 @@ void ScPivotLayoutTreeList::FillFields(ScPivotFieldVector& rFieldVector) for (const ScPivotField& rField : rFieldVector) { - OUString aLabel = mpParent->GetItem( rField.nCol )->maName; - ScItemValue* pItemValue = new ScItemValue( aLabel, rField.nCol, rField.nFuncMask ); + OUString aLabel = mpParent->GetItem(rField.nCol)->maName; + ScItemValue* pItemValue = new ScItemValue(aLabel, rField.nCol, rField.nFuncMask); maItemValues.push_back(std::unique_ptr<ScItemValue>(pItemValue)); OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pItemValue))); mxControl->append(sId, pItemValue->maName); @@ -87,7 +87,7 @@ void ScPivotLayoutTreeList::InsertEntryForSourceTarget(weld::TreeView& rSource, ScItemValue* pOriginalItemValue = pItemValue->mpOriginalItemValue; // Don't allow to add "Data" element to page fields - if(meType == PAGE_LIST && mpParent->IsDataElement(pItemValue->maFunctionData.mnCol)) + if (meType == PAGE_LIST && mpParent->IsDataElement(pItemValue->maFunctionData.mnCol)) return; mpParent->ItemInserted(pOriginalItemValue, meType); @@ -97,7 +97,7 @@ void ScPivotLayoutTreeList::InsertEntryForSourceTarget(weld::TreeView& rSource, void ScPivotLayoutTreeList::InsertEntryForItem(const ScItemValue* pItemValue, int nPosition) { - ScItemValue *pListItemValue = new ScItemValue(pItemValue); + ScItemValue* pListItemValue = new ScItemValue(pItemValue); maItemValues.push_back(std::unique_ptr<ScItemValue>(pListItemValue)); OUString sName = pListItemValue->maName; OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pListItemValue))); diff --git a/sc/source/ui/formdlg/formdata.cxx b/sc/source/ui/formdlg/formdata.cxx index 3ab8130d7721..b936d22c7563 100644 --- a/sc/source/ui/formdlg/formdata.cxx +++ b/sc/source/ui/formdlg/formdata.cxx @@ -27,13 +27,8 @@ ScFormEditData::ScFormEditData() Reset(); } -ScFormEditData::~ScFormEditData() -{ -} +ScFormEditData::~ScFormEditData() {} -void ScFormEditData::SaveValues() -{ - Reset(); -} +void ScFormEditData::SaveValues() { Reset(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/AccessibleDocumentBase.hxx b/sc/source/ui/inc/AccessibleDocumentBase.hxx index bd2a27aa37c8..b09c7f297804 100644 --- a/sc/source/ui/inc/AccessibleDocumentBase.hxx +++ b/sc/source/ui/inc/AccessibleDocumentBase.hxx @@ -22,13 +22,12 @@ #include "AccessibleContextBase.hxx" -class ScAccessibleDocumentBase - : public ScAccessibleContextBase +class ScAccessibleDocumentBase : public ScAccessibleContextBase { public: //===== internal ======================================================== - ScAccessibleDocumentBase( - const css::uno::Reference<css::accessibility::XAccessible>& rxParent); + ScAccessibleDocumentBase(const css::uno::Reference<css::accessibility::XAccessible>& rxParent); + protected: virtual ~ScAccessibleDocumentBase() override; }; diff --git a/sc/source/ui/inc/IAnyRefDialog.hxx b/sc/source/ui/inc/IAnyRefDialog.hxx index 57d6004c8444..49f0e48b8145 100644 --- a/sc/source/ui/inc/IAnyRefDialog.hxx +++ b/sc/source/ui/inc/IAnyRefDialog.hxx @@ -26,21 +26,21 @@ class ScDocument; class SfxObjectShell; namespace formula { - class RefEdit; - class RefButton; +class RefEdit; +class RefButton; } class SAL_NO_VTABLE IAnyRefDialog : public formula::IControlReferenceHandler { public: virtual ~IAnyRefDialog() COVERITY_NOEXCEPT_FALSE {} - virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) = 0; - virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) = 0; - virtual void RefInputDone( bool bForced = false ) = 0; + virtual void SetReference(const ScRange& rRef, ScDocument& rDoc) = 0; + virtual void RefInputStart(formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr) = 0; + virtual void RefInputDone(bool bForced = false) = 0; virtual bool IsTableLocked() const = 0; virtual bool IsRefInputMode() const = 0; - virtual bool IsDocAllowed( SfxObjectShell* pDocSh ) const = 0; + virtual bool IsDocAllowed(SfxObjectShell* pDocSh) const = 0; virtual void AddRefEntry() = 0; virtual void SetActive() = 0; virtual void ViewShellChanged() = 0; diff --git a/sc/source/ui/inc/PivotLayoutTreeListBase.hxx b/sc/source/ui/inc/PivotLayoutTreeListBase.hxx index fbb026330eeb..24186c2494a5 100644 --- a/sc/source/ui/inc/PivotLayoutTreeListBase.hxx +++ b/sc/source/ui/inc/PivotLayoutTreeListBase.hxx @@ -24,8 +24,8 @@ class ScPivotLayoutTreeDropTarget : public DropTargetHelper private: ScPivotLayoutTreeListBase& m_rTreeView; - virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override; - virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override; + virtual sal_Int8 AcceptDrop(const AcceptDropEvent& rEvt) override; + virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent& rEvt) override; public: ScPivotLayoutTreeDropTarget(ScPivotLayoutTreeListBase& rTreeView); @@ -56,7 +56,8 @@ protected: public: void Setup(ScPivotLayoutDialog* pParent); - ScPivotLayoutTreeListBase(std::unique_ptr<weld::TreeView> xControl, SvPivotTreeListType eType = UNDEFINED); + ScPivotLayoutTreeListBase(std::unique_ptr<weld::TreeView> xControl, + SvPivotTreeListType eType = UNDEFINED); weld::TreeView& get_widget() { return *mxControl; } virtual ~ScPivotLayoutTreeListBase(); diff --git a/sc/source/ui/inc/PivotLayoutTreeListLabel.hxx b/sc/source/ui/inc/PivotLayoutTreeListLabel.hxx index ac2ccc0b1a8f..7c55bc2313b1 100644 --- a/sc/source/ui/inc/PivotLayoutTreeListLabel.hxx +++ b/sc/source/ui/inc/PivotLayoutTreeListLabel.hxx @@ -18,10 +18,11 @@ class ScPivotLayoutTreeListLabel : public ScPivotLayoutTreeListBase { private: - std::vector<std::unique_ptr<ScItemValue> > maItemValues; + std::vector<std::unique_ptr<ScItemValue>> maItemValues; SCCOL maDataItem; DECL_LINK(KeyInputHdl, const KeyEvent&, bool); + public: ScPivotLayoutTreeListLabel(std::unique_ptr<weld::TreeView> xControl); virtual ~ScPivotLayoutTreeListLabel() override; diff --git a/sc/source/ui/inc/attrdlg.hxx b/sc/source/ui/inc/attrdlg.hxx index c8ad33d974d4..e80d9dbb30c4 100644 --- a/sc/source/ui/inc/attrdlg.hxx +++ b/sc/source/ui/inc/attrdlg.hxx @@ -22,7 +22,10 @@ #include <sfx2/tabdlg.hxx> -namespace weld { class Window; } +namespace weld +{ +class Window; +} class SfxItemSet; class ScAttrDlg : public SfxTabDialogController @@ -30,6 +33,7 @@ class ScAttrDlg : public SfxTabDialogController public: ScAttrDlg(weld::Window* pParent, const SfxItemSet* pCellAttrs); virtual ~ScAttrDlg() override; + protected: virtual void PageCreated(const OString& rPageId, SfxTabPage& rTabPage) override; }; diff --git a/sc/source/ui/inc/chartsh.hxx b/sc/source/ui/inc/chartsh.hxx index f9b41d2e98d4..fc2ee32b0d0e 100644 --- a/sc/source/ui/inc/chartsh.hxx +++ b/sc/source/ui/inc/chartsh.hxx @@ -27,7 +27,7 @@ class ScViewData; #include "drawsh.hxx" -class ScChartShell: public ScDrawShell +class ScChartShell : public ScDrawShell { public: SFX_DECL_INTERFACE(SCID_CHART_SHELL) @@ -41,8 +41,7 @@ public: virtual ~ScChartShell() override; void ExecuteExportAsGraphic(SfxRequest& rReq); - void GetExportAsGraphicState(SfxItemSet &rSet); - + void GetExportAsGraphicState(SfxItemSet& rSet); }; #endif diff --git a/sc/source/ui/inc/condformatdlgitem.hxx b/sc/source/ui/inc/condformatdlgitem.hxx index 66efdf4b5090..1d0ba356382b 100644 --- a/sc/source/ui/inc/condformatdlgitem.hxx +++ b/sc/source/ui/inc/condformatdlgitem.hxx @@ -14,8 +14,8 @@ #include <memory> -namespace condformat::dialog { - +namespace condformat::dialog +{ enum ScCondFormatDialogType { NONE, @@ -25,7 +25,6 @@ enum ScCondFormatDialogType ICONSET, DATE }; - } class ScConditionalFormatList; @@ -33,15 +32,15 @@ class ScConditionalFormatList; class ScCondFormatDlgItem : public SfxPoolItem { public: - - ScCondFormatDlgItem(std::shared_ptr<ScConditionalFormatList> pCondFormats, sal_Int32 nItem, bool bManaged); + ScCondFormatDlgItem(std::shared_ptr<ScConditionalFormatList> pCondFormats, sal_Int32 nItem, + bool bManaged); virtual ~ScCondFormatDlgItem() override; - ScCondFormatDlgItem(ScCondFormatDlgItem const &) = default; - ScCondFormatDlgItem(ScCondFormatDlgItem &&) = default; - ScCondFormatDlgItem & operator =(ScCondFormatDlgItem const &) = delete; // due to SfxPoolItem - ScCondFormatDlgItem & operator =(ScCondFormatDlgItem &&) = delete; // due to SfxPoolItem + ScCondFormatDlgItem(ScCondFormatDlgItem const&) = default; + ScCondFormatDlgItem(ScCondFormatDlgItem&&) = default; + ScCondFormatDlgItem& operator=(ScCondFormatDlgItem const&) = delete; // due to SfxPoolItem + ScCondFormatDlgItem& operator=(ScCondFormatDlgItem&&) = delete; // due to SfxPoolItem virtual bool operator==(const SfxPoolItem&) const override; virtual ScCondFormatDlgItem* Clone(SfxItemPool* pPool = nullptr) const override; @@ -55,7 +54,6 @@ public: ScConditionalFormatList* GetConditionalFormatList(); private: - std::shared_ptr<ScConditionalFormatList> mpCondFormats; sal_Int32 mnItem; condformat::dialog::ScCondFormatDialogType meDialogType; diff --git a/sc/source/ui/inc/dapitype.hxx b/sc/source/ui/inc/dapitype.hxx index 2fea18054c62..436d71c9d7f5 100644 --- a/sc/source/ui/inc/dapitype.hxx +++ b/sc/source/ui/inc/dapitype.hxx @@ -57,11 +57,11 @@ public: ScDataPilotServiceDlg(weld::Window* pParent, const std::vector<OUString>& rServices); virtual ~ScDataPilotServiceDlg() override; - OUString GetServiceName() const; - OUString GetParSource() const; - OUString GetParName() const; - OUString GetParUser() const; - OUString GetParPass() const; + OUString GetServiceName() const; + OUString GetParSource() const; + OUString GetParName() const; + OUString GetParUser() const; + OUString GetParPass() const; }; #endif diff --git a/sc/source/ui/inc/dataproviderdlg.hxx b/sc/source/ui/inc/dataproviderdlg.hxx index 977dd154733d..d6fd8d73fc60 100644 --- a/sc/source/ui/inc/dataproviderdlg.hxx +++ b/sc/source/ui/inc/dataproviderdlg.hxx @@ -46,13 +46,14 @@ private: void InitMenu(); - DECL_LINK( StartMenuHdl, const OString&, void ); - DECL_LINK( ColumnMenuHdl, const OString&, void ); - DECL_LINK( ImportHdl, ScDataProviderBaseControl*, void ); - DECL_LINK( ScrollToEnd, Timer*, void ); + DECL_LINK(StartMenuHdl, const OString&, void); + DECL_LINK(ColumnMenuHdl, const OString&, void); + DECL_LINK(ImportHdl, ScDataProviderBaseControl*, void); + DECL_LINK(ScrollToEnd, Timer*, void); public: - ScDataProviderDlg(weld::Window* pWindow, std::shared_ptr<ScDocument> pDoc, const ScDocument* pDocument); + ScDataProviderDlg(weld::Window* pWindow, std::shared_ptr<ScDocument> pDoc, + const ScDocument* pDocument); virtual ~ScDataProviderDlg() override; void applyAndQuit(); diff --git a/sc/source/ui/inc/datastreamdlg.hxx b/sc/source/ui/inc/datastreamdlg.hxx index db9fe01b0620..22d5b19f7305 100644 --- a/sc/source/ui/inc/datastreamdlg.hxx +++ b/sc/source/ui/inc/datastreamdlg.hxx @@ -18,13 +18,13 @@ class ScDocShell; class SvtURLBox; class ScRange; -namespace sc { - +namespace sc +{ class DataStream; class DataStreamDlg : public weld::GenericDialogController { - ScDocShell *m_pDocShell; + ScDocShell* m_pDocShell; std::unique_ptr<SvtURLBox> m_xCbUrl; std::unique_ptr<weld::Button> m_xBtnBrowse; @@ -51,14 +51,13 @@ class DataStreamDlg : public weld::GenericDialogController ScRange GetStartRange(); public: - DataStreamDlg(ScDocShell *pDocShell, weld::Window* pParent); + DataStreamDlg(ScDocShell* pDocShell, weld::Window* pParent); virtual ~DataStreamDlg() override; - void Init( const DataStream& rStrm ); + void Init(const DataStream& rStrm); void StartStream(); }; - } #endif // INCLUDED_SC_SOURCE_UI_INC_DATASTREAMDLG_HXX diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx index d2f9e9535d8a..b7edc42d5ab1 100644 --- a/sc/source/ui/inc/delcodlg.hxx +++ b/sc/source/ui/inc/delcodlg.hxx @@ -26,7 +26,7 @@ class ScDeleteContentsDlg : public weld::GenericDialogController { private: - bool m_bObjectsDisabled; + bool m_bObjectsDisabled; std::unique_ptr<weld::CheckButton> m_xBtnDelAll; std::unique_ptr<weld::CheckButton> m_xBtnDelStrings; @@ -36,18 +36,18 @@ private: std::unique_ptr<weld::CheckButton> m_xBtnDelNotes; std::unique_ptr<weld::CheckButton> m_xBtnDelAttrs; std::unique_ptr<weld::CheckButton> m_xBtnDelObjects; - std::unique_ptr<weld::Button> m_xBtnOk; + std::unique_ptr<weld::Button> m_xBtnOk; - static bool bPreviousAllCheck; + static bool bPreviousAllCheck; static InsertDeleteFlags nPreviousChecks; - void DisableChecks( bool bDelAllChecked ); - DECL_LINK( DelAllHdl, weld::Button&, void ); + void DisableChecks(bool bDelAllChecked); + DECL_LINK(DelAllHdl, weld::Button&, void); public: ScDeleteContentsDlg(weld::Window* pParent); virtual ~ScDeleteContentsDlg() override; - void DisableObjects(); + void DisableObjects(); InsertDeleteFlags GetDelContentsCmdBits() const; }; diff --git a/sc/source/ui/inc/fudraw.hxx b/sc/source/ui/inc/fudraw.hxx index a3c1e6f2ddba..4cc8952af469 100644 --- a/sc/source/ui/inc/fudraw.hxx +++ b/sc/source/ui/inc/fudraw.hxx @@ -27,13 +27,13 @@ enum class PointerStyle; /** Base class for all Drawmodule specific functions */ class FuDraw : public FuPoor { - protected: +protected: PointerStyle aNewPointer; PointerStyle aOldPointer; - public: - FuDraw(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView, - SdrModel* pDoc, const SfxRequest& rReq); +public: + FuDraw(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView, SdrModel* pDoc, + const SfxRequest& rReq); virtual ~FuDraw() override; virtual bool KeyInput(const KeyEvent& rKEvt) override; @@ -45,13 +45,13 @@ class FuDraw : public FuPoor virtual bool MouseButtonDown(const MouseEvent& rMEvt) override; bool IsEditingANote() const; - bool IsSizingOrMovingNote( const MouseEvent& rMEvt ) const; + bool IsSizingOrMovingNote(const MouseEvent& rMEvt) const; - private: - void DoModifiers(const MouseEvent& rMEvt); - void ResetModifiers(); +private: + void DoModifiers(const MouseEvent& rMEvt); + void ResetModifiers(); }; -#endif // _SD_FUDRAW_HXX +#endif // _SD_FUDRAW_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx index b20b0dc13336..3c39ad2d3d86 100644 --- a/sc/source/ui/inc/namedefdlg.hxx +++ b/sc/source/ui/inc/namedefdlg.hxx @@ -22,11 +22,11 @@ class ScViewData; class ScNameDefDlg : public ScAnyRefDlgController { private: - bool mbUndo; //if true we need to add an undo action after creating a range name + bool mbUndo; //if true we need to add an undo action after creating a range name ScDocument& mrDoc; ScDocShell* mpDocShell; - ScAddress maCursorPos; + ScAddress maCursorPos; OUString maStrInfoDefault; const OUString maGlobalNameStr; const OUString maErrInvalidNameStr; @@ -63,28 +63,28 @@ private: bool IsNameValid(); bool IsFormulaValid(); - DECL_LINK( CancelBtnHdl, weld::Button&, void ); - DECL_LINK( AddBtnHdl, weld::Button&, void ); - DECL_LINK( NameModifyHdl, weld::Entry&, void ); - DECL_LINK( AssignGetFocusHdl, formula::RefEdit&, void ); + DECL_LINK(CancelBtnHdl, weld::Button&, void); + DECL_LINK(AddBtnHdl, weld::Button&, void); + DECL_LINK(NameModifyHdl, weld::Entry&, void); + DECL_LINK(AssignGetFocusHdl, formula::RefEdit&, void); protected: - virtual void RefInputDone( bool bForced = false ) override; + virtual void RefInputDone(bool bForced = false) override; public: - ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, - const ScViewData& rViewData, const std::map<OUString, ScRangeName*>& aRangeMap, - const ScAddress& aCursorPos, const bool bUndo); + ScNameDefDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, + const ScViewData& rViewData, const std::map<OUString, ScRangeName*>& aRangeMap, + const ScAddress& aCursorPos, const bool bUndo); virtual ~ScNameDefDlg() override; - virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override; - virtual bool IsRefInputMode() const override; + virtual void SetReference(const ScRange& rRef, ScDocument& rDoc) override; + virtual bool IsRefInputMode() const override; - virtual void SetActive() override; - virtual void Close() override; + virtual void SetActive() override; + virtual void Close() override; - void GetNewData( OUString& rName, OUString& rScope ); + void GetNewData(OUString& rName, OUString& rScope); }; #endif diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx index a45b4ec4c65e..f85ee09bc39f 100644 --- a/sc/source/ui/inc/namedlg.hxx +++ b/sc/source/ui/inc/namedlg.hxx @@ -39,8 +39,8 @@ private: const OUString maStrMultiSelect; OUString maStrInfoDefault; - ScViewData& mrViewData; - ScDocument& mrDoc; + ScViewData& mrViewData; + ScDocument& mrDoc; const ScAddress maCursorPos; bool mbDataChanged; @@ -53,7 +53,7 @@ private: std::unique_ptr<weld::Entry> m_xEdName; std::unique_ptr<weld::Label> m_xFtAssign; - std::unique_ptr<formula::RefEdit> m_xEdAssign; + std::unique_ptr<formula::RefEdit> m_xEdAssign; std::unique_ptr<formula::RefButton> m_xRbAssign; std::unique_ptr<weld::ComboBox> m_xLbScope; @@ -92,32 +92,31 @@ private: void SelectionChanged(); // Handler: - DECL_LINK( OkBtnHdl, weld::Button&, void ); - DECL_LINK( CancelBtnHdl, weld::Button&, void ); - DECL_LINK( AddBtnHdl, weld::Button&, void ); - DECL_LINK( RemoveBtnHdl, weld::Button&, void ); - DECL_LINK( EdModifyHdl, weld::Entry&, void ); - DECL_LINK( RefEdModifyHdl, formula::RefEdit&, void ); - DECL_LINK( EdModifyCheckBoxHdl, weld::ToggleButton&, void ); - DECL_LINK( AssignGetFocusHdl, formula::RefEdit&, void ); - DECL_LINK( SelectionChangedHdl_Impl, weld::TreeView&, void ); - DECL_LINK( ScopeChangedHdl, weld::ComboBox&, void ); + DECL_LINK(OkBtnHdl, weld::Button&, void); + DECL_LINK(CancelBtnHdl, weld::Button&, void); + DECL_LINK(AddBtnHdl, weld::Button&, void); + DECL_LINK(RemoveBtnHdl, weld::Button&, void); + DECL_LINK(EdModifyHdl, weld::Entry&, void); + DECL_LINK(RefEdModifyHdl, formula::RefEdit&, void); + DECL_LINK(EdModifyCheckBoxHdl, weld::ToggleButton&, void); + DECL_LINK(AssignGetFocusHdl, formula::RefEdit&, void); + DECL_LINK(SelectionChangedHdl_Impl, weld::TreeView&, void); + DECL_LINK(ScopeChangedHdl, weld::ComboBox&, void); protected: - virtual void RefInputDone( bool bForced = false ) override; + virtual void RefInputDone(bool bForced = false) override; public: - ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, - ScViewData& rViewData, - const ScAddress& aCursorPos, - std::map<OUString, std::unique_ptr<ScRangeName>>* pRangeMap = nullptr); - virtual ~ScNameDlg() override; + ScNameDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, ScViewData& rViewData, + const ScAddress& aCursorPos, + std::map<OUString, std::unique_ptr<ScRangeName>>* pRangeMap = nullptr); + virtual ~ScNameDlg() override; - virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override; - virtual bool IsRefInputMode() const override; + virtual void SetReference(const ScRange& rRef, ScDocument& rDoc) override; + virtual bool IsRefInputMode() const override; - virtual void SetActive() override; - virtual void Close() override; + virtual void SetActive() override; + virtual void Close() override; void GetRangeNames(std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap); void SetEntry(const OUString& rName, const OUString& rScope); diff --git a/sc/source/ui/inc/protectiondlg.hxx b/sc/source/ui/inc/protectiondlg.hxx index b3db92440d1b..e3682173929c 100644 --- a/sc/source/ui/inc/protectiondlg.hxx +++ b/sc/source/ui/inc/protectiondlg.hxx @@ -41,12 +41,12 @@ private: void EnableOptionalWidgets(bool bEnable); - OUString m_aSelectLockedCells; - OUString m_aSelectUnlockedCells; - OUString m_aInsertColumns; - OUString m_aInsertRows; - OUString m_aDeleteColumns; - OUString m_aDeleteRows; + OUString m_aSelectLockedCells; + OUString m_aSelectUnlockedCells; + OUString m_aInsertColumns; + OUString m_aInsertRows; + OUString m_aDeleteColumns; + OUString m_aDeleteRows; std::unique_ptr<weld::CheckButton> m_xBtnProtect; std::unique_ptr<weld::Container> m_xPasswords; diff --git a/sc/source/ui/inc/retypepassdlg.hxx b/sc/source/ui/inc/retypepassdlg.hxx index 4d5b9f48fd8c..26c57148c88b 100644 --- a/sc/source/ui/inc/retypepassdlg.hxx +++ b/sc/source/ui/inc/retypepassdlg.hxx @@ -65,23 +65,23 @@ private: void DeleteSheets(); private: - OUString maTextNotProtected; - OUString maTextNotPassProtected; - OUString maTextHashBad; - OUString maTextHashGood; + OUString maTextNotProtected; + OUString maTextNotPassProtected; + OUString maTextHashBad; + OUString maTextHashGood; DECL_LINK(OKHdl, weld::Button&, void); DECL_LINK(RetypeBtnHdl, weld::Button&, void); struct TableItem { - OUString maName; + OUString maName; std::shared_ptr<ScTableProtection> mpProtect; }; ::std::vector<TableItem> maTableItems; std::shared_ptr<ScDocProtection> mpDocItem; - ScPasswordHash meDesiredHash; + ScPasswordHash meDesiredHash; std::unique_ptr<weld::Button> mxBtnOk; std::unique_ptr<weld::Label> mxTextDocStatus; @@ -120,10 +120,10 @@ private: std::unique_ptr<weld::RadioButton> m_xBtnRemovePassword; - DECL_LINK( OKHdl, weld::Button&, void ); - DECL_LINK( RadioBtnHdl, weld::ToggleButton&, void ); - DECL_LINK( CheckBoxHdl, weld::ToggleButton&, void ); - DECL_LINK( PasswordModifyHdl, weld::Entry&, void ); + DECL_LINK(OKHdl, weld::Button&, void); + DECL_LINK(RadioBtnHdl, weld::ToggleButton&, void); + DECL_LINK(CheckBoxHdl, weld::ToggleButton&, void); + DECL_LINK(PasswordModifyHdl, weld::Entry&, void); }; #endif diff --git a/sc/source/ui/inc/shtabdlg.hxx b/sc/source/ui/inc/shtabdlg.hxx index 0143ad73a690..3355f143dc8e 100644 --- a/sc/source/ui/inc/shtabdlg.hxx +++ b/sc/source/ui/inc/shtabdlg.hxx @@ -28,19 +28,18 @@ private: std::unique_ptr<weld::Frame> m_xFrame; std::unique_ptr<weld::TreeView> m_xLb; - DECL_LINK( DblClkHdl, weld::TreeView&, bool ); + DECL_LINK(DblClkHdl, weld::TreeView&, bool); public: ScShowTabDlg(weld::Window* pParent); virtual ~ScShowTabDlg() override; /** Sets dialog title, fixed text for listbox and help IDs. */ - void SetDescription( - const OUString& rTitle, const OUString& rFixedText, - const OString& nDlgHelpId, const OString& nLbHelpId ); + void SetDescription(const OUString& rTitle, const OUString& rFixedText, + const OString& nDlgHelpId, const OString& nLbHelpId); /** Inserts a string into the weld::TreeView. */ - void Insert( const OUString& rString, bool bSelected ); + void Insert(const OUString& rString, bool bSelected); std::vector<sal_Int32> GetSelectedRows() const; OUString GetEntry(sal_Int32 nPos) const; diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx index 85b6da332e20..667cd35aa2a4 100644 --- a/sc/source/ui/inc/sortkeydlg.hxx +++ b/sc/source/ui/inc/sortkeydlg.hxx @@ -32,12 +32,13 @@ struct ScSortKeyItem void EnableField(); }; -typedef std::vector<std::unique_ptr<ScSortKeyItem> > ScSortKeyItems; +typedef std::vector<std::unique_ptr<ScSortKeyItem>> ScSortKeyItems; class ScSortKeyWindow { public: ScSortKeyItems m_aSortKeyItems; + private: weld::Container* m_pBox; @@ -45,7 +46,7 @@ public: ScSortKeyWindow(weld::Container* pBox); ~ScSortKeyWindow(); - void AddSortKey( sal_uInt16 nItem ); + void AddSortKey(sal_uInt16 nItem); }; #endif // INCLUDED_SC_SOURCE_UI_INC_SORTKEYDLG_HXX diff --git a/sc/source/ui/inc/textdlgs.hxx b/sc/source/ui/inc/textdlgs.hxx index f9d3a6dba615..97da3a214455 100644 --- a/sc/source/ui/inc/textdlgs.hxx +++ b/sc/source/ui/inc/textdlgs.hxx @@ -29,15 +29,18 @@ class ScCharDlg : public SfxTabDialogController private: const SfxObjectShell& rDocShell; - virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override; + virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override; + public: - ScCharDlg(weld::Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell, bool bDrawText); + ScCharDlg(weld::Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell, + bool bDrawText); }; class ScParagraphDlg : public SfxTabDialogController { private: - virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override; + virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override; + public: ScParagraphDlg(weld::Window* pParent, const SfxItemSet* pAttr); }; diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx index 3cda79900d0e..78d93c798f05 100644 --- a/sc/source/ui/inc/tpformula.hxx +++ b/sc/source/ui/inc/tpformula.hxx @@ -28,13 +28,15 @@ class ScTpFormulaOptions : public SfxTabPage { public: - explicit ScTpFormulaOptions(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet); - static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet); + explicit ScTpFormulaOptions(weld::Container* pPage, weld::DialogController* pController, + const SfxItemSet& rCoreSet); + static std::unique_ptr<SfxTabPage> + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet); virtual ~ScTpFormulaOptions() override; virtual bool FillItemSet(SfxItemSet* rCoreSet) override; - virtual void Reset( const SfxItemSet* rCoreSet ) override; - virtual DeactivateRC DeactivatePage(SfxItemSet* pSet ) override; + virtual void Reset(const SfxItemSet* rCoreSet) override; + virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; private: void ResetSeparators(); @@ -44,12 +46,12 @@ private: bool IsValidSeparator(const OUString& rSep) const; - DECL_LINK( ButtonHdl, weld::Button&, void ); - DECL_LINK( SepInsertTextHdl, OUString&, bool ); - DECL_LINK( ColSepInsertTextHdl, OUString&, bool ); - DECL_LINK( RowSepInsertTextHdl, OUString&, bool ); - DECL_LINK( SepModifyHdl, weld::Entry&, void ); - DECL_LINK( SepEditOnFocusHdl, weld::Widget&, void ); + DECL_LINK(ButtonHdl, weld::Button&, void); + DECL_LINK(SepInsertTextHdl, OUString&, bool); + DECL_LINK(ColSepInsertTextHdl, OUString&, bool); + DECL_LINK(RowSepInsertTextHdl, OUString&, bool); + DECL_LINK(SepModifyHdl, weld::Entry&, void); + DECL_LINK(SepEditOnFocusHdl, weld::Widget&, void); private: /** Stores old separator value of currently focused separator edit box. diff --git a/sc/source/ui/inc/uiobject.hxx b/sc/source/ui/inc/uiobject.hxx index 827c2f1b5c07..235c5f7bdbda 100644 --- a/sc/source/ui/inc/uiobject.hxx +++ b/sc/source/ui/inc/uiobject.hxx @@ -21,13 +21,11 @@ class ScGridWinUIObject : public WindowUIObject VclPtr<ScGridWindow> mxGridWindow; public: - ScGridWinUIObject(const VclPtr<ScGridWindow>& xGridWin); virtual StringMap get_state() override; - virtual void execute(const OUString& rAction, - const StringMap& rParameters) override; + virtual void execute(const OUString& rAction, const StringMap& rParameters) override; virtual std::unique_ptr<UIObject> get_child(const OUString& rID) override; @@ -36,11 +34,9 @@ public: virtual std::set<OUString> get_children() const override; protected: - virtual OUString get_name() const override; private: - ScDBFunc* getDBFunc(); ScDrawView* getDrawView(); ScTabViewShell* getViewShell(); @@ -54,16 +50,13 @@ class ScNavigatorDlgUIObject : public WindowUIObject VclPtr<ScNavigatorDlg> mxScNavigatorDlg; public: - ScNavigatorDlgUIObject(const VclPtr<ScNavigatorDlg>& xScNavigatorDlg); - virtual void execute(const OUString& rAction, - const StringMap& rParameters) override; + virtual void execute(const OUString& rAction, const StringMap& rParameters) override; static std::unique_ptr<UIObject> create(vcl::Window* pWindow); protected: - virtual OUString get_name() const override; }; diff --git a/sc/source/ui/inc/undoconvert.hxx b/sc/source/ui/inc/undoconvert.hxx index d792cde714da..291c9db2ec7c 100644 --- a/sc/source/ui/inc/undoconvert.hxx +++ b/sc/source/ui/inc/undoconvert.hxx @@ -13,14 +13,14 @@ #include "undobase.hxx" #include <cellvalues.hxx> -namespace sc { - +namespace sc +{ class UndoFormulaToValue : public ScSimpleUndo { TableValues maUndoValues; public: - UndoFormulaToValue( ScDocShell* pDocSh, TableValues& rUndoValues ); + UndoFormulaToValue(ScDocShell* pDocSh, TableValues& rUndoValues); virtual OUString GetComment() const override; virtual void Undo() override; @@ -29,7 +29,6 @@ public: private: void Execute(); }; - } #endif diff --git a/sc/source/ui/miscdlgs/crdlg.cxx b/sc/source/ui/miscdlgs/crdlg.cxx index e2690af78750..9d778595e83f 100644 --- a/sc/source/ui/miscdlgs/crdlg.cxx +++ b/sc/source/ui/miscdlgs/crdlg.cxx @@ -22,7 +22,8 @@ #include <crdlg.hxx> #include <scui_def.hxx> -ScColOrRowDlg::ScColOrRowDlg(weld::Window* pParent, const OUString& rStrTitle, const OUString& rStrLabel) +ScColOrRowDlg::ScColOrRowDlg(weld::Window* pParent, const OUString& rStrTitle, + const OUString& rStrLabel) : GenericDialogController(pParent, "modules/scalc/ui/colorrowdialog.ui", "ColOrRowDialog") , m_xFrame(m_xBuilder->weld_frame("frame")) , m_xBtnRows(m_xBuilder->weld_radio_button("rows")) @@ -34,9 +35,7 @@ ScColOrRowDlg::ScColOrRowDlg(weld::Window* pParent, const OUString& rStrTitle, c m_xBtnOk->connect_clicked(LINK(this, ScColOrRowDlg, OkHdl)); } -ScColOrRowDlg::~ScColOrRowDlg() -{ -} +ScColOrRowDlg::~ScColOrRowDlg() {} IMPL_LINK_NOARG(ScColOrRowDlg, OkHdl, weld::Button&, void) { diff --git a/sc/source/ui/miscdlgs/datastreamdlg.cxx b/sc/source/ui/miscdlgs/datastreamdlg.cxx index f56b09149a83..efbf6ab28cad 100644 --- a/sc/source/ui/miscdlgs/datastreamdlg.cxx +++ b/sc/source/ui/miscdlgs/datastreamdlg.cxx @@ -15,9 +15,9 @@ #include <docsh.hxx> #include <datastream.hxx> -namespace sc { - -DataStreamDlg::DataStreamDlg(ScDocShell *pDocShell, weld::Window* pParent) +namespace sc +{ +DataStreamDlg::DataStreamDlg(ScDocShell* pDocShell, weld::Window* pParent) : GenericDialogController(pParent, "modules/scalc/ui/datastreams.ui", "DataStreamDialog") , m_pDocShell(pDocShell) , m_xCbUrl(new SvtURLBox(m_xBuilder->weld_combo_box("url"))) @@ -36,44 +36,33 @@ DataStreamDlg::DataStreamDlg(ScDocShell *pDocShell, weld::Window* pParent) , m_xVclFrameLimit(m_xBuilder->weld_frame("framelimit")) , m_xVclFrameMove(m_xBuilder->weld_frame("framemove")) { - m_xCbUrl->connect_changed( LINK( this, DataStreamDlg, UpdateComboBoxHdl ) ); - m_xRBAddressValue->connect_toggled( LINK( this, DataStreamDlg, UpdateClickHdl ) ); + m_xCbUrl->connect_changed(LINK(this, DataStreamDlg, UpdateComboBoxHdl)); + m_xRBAddressValue->connect_toggled(LINK(this, DataStreamDlg, UpdateClickHdl)); m_xRBAddressValue->set_sensitive(false); m_xRBNoMove->hide(); - m_xRBValuesInLine->connect_toggled( LINK( this, DataStreamDlg, UpdateClickHdl ) ); - m_xEdRange->connect_changed( LINK( this, DataStreamDlg, UpdateHdl ) ); - m_xBtnBrowse->connect_clicked( LINK( this, DataStreamDlg, BrowseHdl ) ); + m_xRBValuesInLine->connect_toggled(LINK(this, DataStreamDlg, UpdateClickHdl)); + m_xEdRange->connect_changed(LINK(this, DataStreamDlg, UpdateHdl)); + m_xBtnBrowse->connect_clicked(LINK(this, DataStreamDlg, BrowseHdl)); UpdateEnable(); } -DataStreamDlg::~DataStreamDlg() -{ -} +DataStreamDlg::~DataStreamDlg() {} IMPL_LINK_NOARG(DataStreamDlg, BrowseHdl, weld::Button&, void) { sfx2::FileDialogHelper aFileDialog(0, FileDialogFlags::NONE, m_xDialog.get()); - if ( aFileDialog.Execute() != ERRCODE_NONE ) + if (aFileDialog.Execute() != ERRCODE_NONE) return; m_xCbUrl->set_entry_text(aFileDialog.GetPath()); UpdateEnable(); } -IMPL_LINK_NOARG(DataStreamDlg, UpdateClickHdl, weld::ToggleButton&, void) -{ - UpdateEnable(); -} +IMPL_LINK_NOARG(DataStreamDlg, UpdateClickHdl, weld::ToggleButton&, void) { UpdateEnable(); } -IMPL_LINK_NOARG(DataStreamDlg, UpdateComboBoxHdl, weld::ComboBox&, void) -{ - UpdateEnable(); -} +IMPL_LINK_NOARG(DataStreamDlg, UpdateComboBoxHdl, weld::ComboBox&, void) { UpdateEnable(); } -IMPL_LINK_NOARG(DataStreamDlg, UpdateHdl, weld::Entry&, void) -{ - UpdateEnable(); -} +IMPL_LINK_NOARG(DataStreamDlg, UpdateHdl, weld::Entry&, void) { UpdateEnable(); } void DataStreamDlg::UpdateEnable() { @@ -98,7 +87,7 @@ void DataStreamDlg::UpdateEnable() } } m_xBtnOk->set_sensitive(bOk); -// setOptimalLayoutSize(); + // setOptimalLayoutSize(); } ScRange DataStreamDlg::GetStartRange() @@ -107,7 +96,7 @@ ScRange DataStreamDlg::GetStartRange() ScDocument& rDoc = m_pDocShell->GetDocument(); ScRange aRange; ScRefFlags nRes = aRange.Parse(aStr, rDoc, rDoc.GetAddressConvention()); - if ( ((nRes & ScRefFlags::VALID) == ScRefFlags::ZERO) || !aRange.IsValid()) + if (((nRes & ScRefFlags::VALID) == ScRefFlags::ZERO) || !aRange.IsValid()) { // Invalid range. aRange.SetInvalid(); @@ -121,7 +110,7 @@ ScRange DataStreamDlg::GetStartRange() return aRange; } -void DataStreamDlg::Init( const DataStream& rStrm ) +void DataStreamDlg::Init(const DataStream& rStrm) { m_xCbUrl->set_entry_text(rStrm.GetURL()); ScDocument& rDoc = m_pDocShell->GetDocument(); @@ -146,14 +135,13 @@ void DataStreamDlg::Init( const DataStream& rStrm ) { case DataStream::MOVE_DOWN: m_xRBDataDown->set_active(true); - break; + break; case DataStream::RANGE_DOWN: m_xRBRangeDown->set_active(true); - break; + break; case DataStream::MOVE_UP: case DataStream::NO_MOVE: - default: - ; + default:; } m_xCBRefreshOnEmpty->set_active(rStrm.IsRefreshOnEmptyLine()); @@ -174,17 +162,16 @@ void DataStreamDlg::StartStream() OUString rURL = m_xCbUrl->get_active_text(); sal_uInt32 nSettings = 0; if (m_xRBValuesInLine->get_active()) - nSettings |= DataStream::VALUES_IN_LINE; + nSettings |= DataStream::VALUES_IN_LINE; - DataStream::MoveType eMove = - m_xRBRangeDown->get_active() ? DataStream::RANGE_DOWN : DataStream::MOVE_DOWN; + DataStream::MoveType eMove + = m_xRBRangeDown->get_active() ? DataStream::RANGE_DOWN : DataStream::MOVE_DOWN; DataStream* pStream = DataStream::Set(m_pDocShell, rURL, aStartRange, nLimit, eMove, nSettings); pStream->SetRefreshOnEmptyLine(m_xCBRefreshOnEmpty->get_active()); DataStream::MakeToolbarVisible(); pStream->StartImport(); } - } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/delcldlg.cxx b/sc/source/ui/miscdlgs/delcldlg.cxx index 07a3ac7d0f51..71ce6b99edd2 100644 --- a/sc/source/ui/miscdlgs/delcldlg.cxx +++ b/sc/source/ui/miscdlgs/delcldlg.cxx @@ -21,7 +21,7 @@ #include <delcldlg.hxx> -static sal_uInt8 nDelItemChecked=0; +static sal_uInt8 nDelItemChecked = 0; ScDeleteCellDlg::ScDeleteCellDlg(weld::Window* pParent, bool bDisallowCellMove) : GenericDialogController(pParent, "modules/scalc/ui/deletecells.ui", "DeleteCellsDialog") @@ -68,32 +68,30 @@ ScDeleteCellDlg::ScDeleteCellDlg(weld::Window* pParent, bool bDisallowCellMove) } } -ScDeleteCellDlg::~ScDeleteCellDlg() -{ -} +ScDeleteCellDlg::~ScDeleteCellDlg() {} DelCellCmd ScDeleteCellDlg::GetDelCellCmd() const { DelCellCmd nReturn = DelCellCmd::NONE; - if ( m_xBtnCellsUp->get_active() ) + if (m_xBtnCellsUp->get_active()) { - nDelItemChecked=0; + nDelItemChecked = 0; nReturn = DelCellCmd::CellsUp; } - else if ( m_xBtnCellsLeft->get_active() ) + else if (m_xBtnCellsLeft->get_active()) { - nDelItemChecked=1; + nDelItemChecked = 1; nReturn = DelCellCmd::CellsLeft; } - else if ( m_xBtnDelRows->get_active() ) + else if (m_xBtnDelRows->get_active()) { - nDelItemChecked=2; + nDelItemChecked = 2; nReturn = DelCellCmd::Rows; } - else if ( m_xBtnDelCols->get_active() ) + else if (m_xBtnDelCols->get_active()) { - nDelItemChecked=3; + nDelItemChecked = 3; nReturn = DelCellCmd::Cols; } diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx index acc5ed72d29c..3ad28fa36346 100644 --- a/sc/source/ui/miscdlgs/inscldlg.cxx +++ b/sc/source/ui/miscdlgs/inscldlg.cxx @@ -21,9 +21,9 @@ #include <inscldlg.hxx> -static sal_uInt8 nInsItemChecked=0; +static sal_uInt8 nInsItemChecked = 0; -ScInsertCellDlg::ScInsertCellDlg(weld::Window* pParent,bool bDisallowCellMove) +ScInsertCellDlg::ScInsertCellDlg(weld::Window* pParent, bool bDisallowCellMove) : GenericDialogController(pParent, "modules/scalc/ui/insertcells.ui", "InsertCellsDialog") , m_xBtnCellsDown(m_xBuilder->weld_radio_button("down")) , m_xBtnCellsRight(m_xBuilder->weld_radio_button("right")) @@ -69,9 +69,7 @@ ScInsertCellDlg::ScInsertCellDlg(weld::Window* pParent,bool bDisallowCellMove) } } -ScInsertCellDlg::~ScInsertCellDlg() -{ -} +ScInsertCellDlg::~ScInsertCellDlg() {} InsCellCmd ScInsertCellDlg::GetInsCellCmd() const { @@ -79,22 +77,22 @@ InsCellCmd ScInsertCellDlg::GetInsCellCmd() const if (m_xBtnCellsDown->get_active()) { - nInsItemChecked=0; + nInsItemChecked = 0; nReturn = INS_CELLSDOWN; } else if (m_xBtnCellsRight->get_active()) { - nInsItemChecked=1; + nInsItemChecked = 1; nReturn = INS_CELLSRIGHT; } else if (m_xBtnInsRow->get_active()) { - nInsItemChecked=2; + nInsItemChecked = 2; nReturn = INS_INSROWS_BEFORE; } else if (m_xBtnInsCol->get_active()) { - nInsItemChecked=3; + nInsItemChecked = 3; nReturn = INS_INSCOLS_BEFORE; } diff --git a/sc/source/ui/miscdlgs/mergecellsdialog.cxx b/sc/source/ui/miscdlgs/mergecellsdialog.cxx index a5990d16c7bb..2bfcc5da3b9b 100644 --- a/sc/source/ui/miscdlgs/mergecellsdialog.cxx +++ b/sc/source/ui/miscdlgs/mergecellsdialog.cxx @@ -10,7 +10,7 @@ #include <mergecellsdialog.hxx> -ScMergeCellsDialog::ScMergeCellsDialog(weld::Window * pParent) +ScMergeCellsDialog::ScMergeCellsDialog(weld::Window* pParent) : GenericDialogController(pParent, "modules/scalc/ui/mergecellsdialog.ui", "MergeCellsDialog") , m_xRBMoveContent(m_xBuilder->weld_radio_button("move-cells-radio")) , m_xRBKeepContent(m_xBuilder->weld_radio_button("keep-content-radio")) @@ -19,17 +19,15 @@ ScMergeCellsDialog::ScMergeCellsDialog(weld::Window * pParent) m_xRBKeepContent->set_active(true); } -ScMergeCellsDialog::~ScMergeCellsDialog() -{ -} +ScMergeCellsDialog::~ScMergeCellsDialog() {} ScMergeCellsOption ScMergeCellsDialog::GetMergeCellsOption() const { - if ( m_xRBMoveContent->get_active() ) + if (m_xRBMoveContent->get_active()) return MoveContentHiddenCells; - if ( m_xRBKeepContent->get_active() ) + if (m_xRBKeepContent->get_active()) return KeepContentHiddenCells; - if ( m_xRBEmptyContent->get_active() ) + if (m_xRBEmptyContent->get_active()) return EmptyContentHiddenCells; assert(!"Unknown selection for merge cells."); return KeepContentHiddenCells; // default value diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index 05ad987fa64b..5ba94735d9ce 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -60,11 +60,9 @@ ScMoveTableDlg::ScMoveTableDlg(weld::Window* pParent, const OUString& rDefault) Init(); } -ScMoveTableDlg::~ScMoveTableDlg() -{ -} +ScMoveTableDlg::~ScMoveTableDlg() {} -void ScMoveTableDlg::GetTabNameString( OUString& rString ) const +void ScMoveTableDlg::GetTabNameString(OUString& rString) const { rString = m_xEdTabName->get_text(); } @@ -130,7 +128,7 @@ void ScMoveTableDlg::CheckNewTabName() { // New sheet name is empty. This is not good. m_xFtWarn->show(); -//TODO m_xFtWarn->SetControlBackground(COL_YELLOW); + //TODO m_xFtWarn->SetControlBackground(COL_YELLOW); m_xFtWarn->set_label(msStrTabNameEmpty); m_xBtnOk->set_sensitive(false); return; @@ -140,7 +138,7 @@ void ScMoveTableDlg::CheckNewTabName() { // New sheet name contains invalid characters. m_xFtWarn->show(); -//TODO m_xFtWarn->SetControlBackground(COL_YELLOW); + //TODO m_xFtWarn->SetControlBackground(COL_YELLOW); m_xFtWarn->set_label(msStrTabNameInvalid); m_xBtnOk->set_sensitive(false); return; @@ -149,7 +147,7 @@ void ScMoveTableDlg::CheckNewTabName() bool bMoveInCurrentDoc = m_xBtnMove->get_active() && m_xLbDoc->get_active() == mnCurrentDocPos; bool bFound = false; const int nLast = m_xLbTable->n_children(); - for (int i = 0; i<nLast && !bFound; ++i) + for (int i = 0; i < nLast && !bFound; ++i) { if (aNewName == m_xLbTable->get_text(i)) { @@ -159,17 +157,17 @@ void ScMoveTableDlg::CheckNewTabName() } } - if ( bFound ) + if (bFound) { m_xFtWarn->show(); -//TODO m_xFtWarn->SetControlBackground(COL_YELLOW); + //TODO m_xFtWarn->SetControlBackground(COL_YELLOW); m_xFtWarn->set_label(msStrTabNameUsed); m_xBtnOk->set_sensitive(false); } else { m_xFtWarn->hide(); -//TODO m_xFtWarn->SetControlBackground(); + //TODO m_xFtWarn->SetControlBackground(); m_xFtWarn->set_label(OUString()); m_xBtnOk->set_sensitive(true); } @@ -184,8 +182,8 @@ void ScMoveTableDlg::Init() { m_xBtnOk->connect_clicked(LINK(this, ScMoveTableDlg, OkHdl)); m_xLbDoc->connect_changed(LINK(this, ScMoveTableDlg, SelHdl)); - m_xBtnCopy->connect_toggled(LINK( this, ScMoveTableDlg, CheckBtnHdl)); - m_xEdTabName->connect_changed(LINK( this, ScMoveTableDlg, CheckNameHdl)); + m_xBtnCopy->connect_toggled(LINK(this, ScMoveTableDlg, CheckBtnHdl)); + m_xEdTabName->connect_changed(LINK(this, ScMoveTableDlg, CheckNameHdl)); m_xBtnMove->set_active(true); m_xBtnCopy->set_active(false); m_xEdTabName->set_sensitive(false); @@ -196,23 +194,23 @@ void ScMoveTableDlg::Init() void ScMoveTableDlg::InitDocListBox() { - SfxObjectShell* pSh = SfxObjectShell::GetFirst(); - ScDocShell* pScSh = nullptr; - sal_uInt16 nSelPos = 0; - sal_uInt16 i = 0; + SfxObjectShell* pSh = SfxObjectShell::GetFirst(); + ScDocShell* pScSh = nullptr; + sal_uInt16 nSelPos = 0; + sal_uInt16 i = 0; m_xLbDoc->clear(); m_xLbDoc->freeze(); - while ( pSh ) + while (pSh) { - pScSh = dynamic_cast<ScDocShell*>( pSh ); + pScSh = dynamic_cast<ScDocShell*>(pSh); - if ( pScSh ) + if (pScSh) { OUString aEntryName = pScSh->GetTitle(); - if ( pScSh == SfxObjectShell::Current() ) + if (pScSh == SfxObjectShell::Current()) { mnCurrentDocPos = nSelPos = i; aEntryName += " " + msCurrentDoc; @@ -223,7 +221,7 @@ void ScMoveTableDlg::InitDocListBox() i++; } - pSh = SfxObjectShell::GetNext( *pSh ); + pSh = SfxObjectShell::GetNext(*pSh); } m_xLbDoc->thaw(); @@ -233,7 +231,7 @@ void ScMoveTableDlg::InitDocListBox() // Handler: -IMPL_LINK( ScMoveTableDlg, CheckBtnHdl, weld::ToggleButton&, rBtn, void ) +IMPL_LINK(ScMoveTableDlg, CheckBtnHdl, weld::ToggleButton&, rBtn, void) { if (&rBtn == m_xBtnCopy.get()) ResetRenameInput(); @@ -241,14 +239,14 @@ IMPL_LINK( ScMoveTableDlg, CheckBtnHdl, weld::ToggleButton&, rBtn, void ) IMPL_LINK_NOARG(ScMoveTableDlg, OkHdl, weld::Button&, void) { - const sal_Int32 nDocSel = m_xLbDoc->get_active(); + const sal_Int32 nDocSel = m_xLbDoc->get_active(); const sal_Int32 nDocLast = m_xLbDoc->get_count() - 1; - const sal_Int32 nTabSel = m_xLbTable->get_selected_index(); + const sal_Int32 nTabSel = m_xLbTable->get_selected_index(); const sal_Int32 nTabLast = m_xLbTable->n_children() - 1; - nDocument = (nDocSel != nDocLast) ? nDocSel : SC_DOC_NEW; - nTable = (nTabSel != nTabLast) ? static_cast<SCTAB>(nTabSel) : SC_TAB_APPEND; - bCopyTable = m_xBtnCopy->get_active(); + nDocument = (nDocSel != nDocLast) ? nDocSel : SC_DOC_NEW; + nTable = (nTabSel != nTabLast) ? static_cast<SCTAB>(nTabSel) : SC_TAB_APPEND; + bCopyTable = m_xBtnCopy->get_active(); if (bCopyTable) { @@ -279,9 +277,9 @@ IMPL_LINK_NOARG(ScMoveTableDlg, SelHdl, weld::ComboBox&, void) m_xLbTable->clear(); m_xLbTable->freeze(); - if ( pDoc ) + if (pDoc) { - SCTAB nLast = pDoc->GetTableCount()-1; + SCTAB nLast = pDoc->GetTableCount() - 1; for (SCTAB i = 0; i <= nLast; ++i) { pDoc->GetName(i, aName); diff --git a/sc/source/ui/miscdlgs/namecrea.cxx b/sc/source/ui/miscdlgs/namecrea.cxx index ca49886bf470..334b89d8ba77 100644 --- a/sc/source/ui/miscdlgs/namecrea.cxx +++ b/sc/source/ui/miscdlgs/namecrea.cxx @@ -21,22 +21,20 @@ #include <namecrea.hxx> -ScNameCreateDlg::ScNameCreateDlg(weld::Window * pParent, CreateNameFlags nFlags) +ScNameCreateDlg::ScNameCreateDlg(weld::Window* pParent, CreateNameFlags nFlags) : GenericDialogController(pParent, "modules/scalc/ui/createnamesdialog.ui", "CreateNamesDialog") , m_xTopBox(m_xBuilder->weld_check_button("top")) , m_xLeftBox(m_xBuilder->weld_check_button("left")) , m_xBottomBox(m_xBuilder->weld_check_button("bottom")) , m_xRightBox(m_xBuilder->weld_check_button("right")) { - m_xTopBox->set_active( bool(nFlags & CreateNameFlags::Top) ); - m_xLeftBox->set_active( bool(nFlags & CreateNameFlags::Left) ); - m_xBottomBox->set_active( bool(nFlags & CreateNameFlags::Bottom) ); - m_xRightBox->set_active( bool(nFlags & CreateNameFlags::Right) ); + m_xTopBox->set_active(bool(nFlags & CreateNameFlags::Top)); + m_xLeftBox->set_active(bool(nFlags & CreateNameFlags::Left)); + m_xBottomBox->set_active(bool(nFlags & CreateNameFlags::Bottom)); + m_xRightBox->set_active(bool(nFlags & CreateNameFlags::Right)); } -ScNameCreateDlg::~ScNameCreateDlg() -{ -} +ScNameCreateDlg::~ScNameCreateDlg() {} CreateNameFlags ScNameCreateDlg::GetFlags() const { diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx index 3a71dc27e16a..9af22432648d 100644 --- a/sc/source/ui/miscdlgs/retypepassdlg.cxx +++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx @@ -42,14 +42,9 @@ ScRetypePassDlg::ScRetypePassDlg(weld::Window* pParent) Init(); } -ScRetypePassDlg::~ScRetypePassDlg() -{ -} +ScRetypePassDlg::~ScRetypePassDlg() {} -void ScRetypePassDlg::DeleteSheets() -{ - maSheets.clear(); -} +void ScRetypePassDlg::DeleteSheets() { maSheets.clear(); } short ScRetypePassDlg::run() { @@ -93,10 +88,7 @@ void ScRetypePassDlg::SetDataFromDocument(const ScDocument& rDoc) } } -void ScRetypePassDlg::SetDesiredHash(ScPasswordHash eHash) -{ - meDesiredHash = eHash; -} +void ScRetypePassDlg::SetDesiredHash(ScPasswordHash eHash) { meDesiredHash = eHash; } void ScRetypePassDlg::WriteNewDataToDocument(ScDocument& rDoc) const { @@ -118,10 +110,10 @@ void ScRetypePassDlg::WriteNewDataToDocument(ScDocument& rDoc) const void ScRetypePassDlg::Init() { - Link<weld::Button&,void> aLink = LINK( this, ScRetypePassDlg, OKHdl ); + Link<weld::Button&, void> aLink = LINK(this, ScRetypePassDlg, OKHdl); mxBtnOk->connect_clicked(aLink); - aLink = LINK( this, ScRetypePassDlg, RetypeBtnHdl ); + aLink = LINK(this, ScRetypePassDlg, RetypeBtnHdl); mxBtnRetypeDoc->connect_clicked(aLink); mxTextDocStatus->set_label(maTextNotProtected); @@ -135,7 +127,7 @@ void ScRetypePassDlg::PopulateDialog() // Sheet protection next. for (size_t i = 0; i < maTableItems.size(); ++i) - SetTableData(i, static_cast< SCTAB >( i )); + SetTableData(i, static_cast<SCTAB>(i)); } void ScRetypePassDlg::SetDocData() @@ -222,16 +214,12 @@ void ScRetypePassDlg::CheckHashStatus() mxBtnOk->set_sensitive(true); return; - } - while (false); + } while (false); mxBtnOk->set_sensitive(false); } -IMPL_LINK_NOARG(ScRetypePassDlg, OKHdl, weld::Button&, void) -{ - m_xDialog->response(RET_OK); -} +IMPL_LINK_NOARG(ScRetypePassDlg, OKHdl, weld::Button&, void) { m_xDialog->response(RET_OK); } IMPL_LINK(ScRetypePassDlg, RetypeBtnHdl, weld::Button&, rBtn, void) { @@ -277,7 +265,8 @@ IMPL_LINK(ScRetypePassDlg, RetypeBtnHdl, weld::Button&, rBtn, void) } ScRetypePassInputDlg::ScRetypePassInputDlg(weld::Window* pParent, ScPassHashProtectable* pProtected) - : GenericDialogController(pParent, "modules/scalc/ui/retypepassworddialog.ui", "RetypePasswordDialog") + : GenericDialogController(pParent, "modules/scalc/ui/retypepassworddialog.ui", + "RetypePasswordDialog") , m_pProtected(pProtected) , m_xBtnOk(m_xBuilder->weld_button("ok")) , m_xBtnRetypePassword(m_xBuilder->weld_radio_button("retypepassword")) @@ -290,19 +279,11 @@ ScRetypePassInputDlg::ScRetypePassInputDlg(weld::Window* pParent, ScPassHashProt Init(); } -ScRetypePassInputDlg::~ScRetypePassInputDlg() -{ -} +ScRetypePassInputDlg::~ScRetypePassInputDlg() {} -bool ScRetypePassInputDlg::IsRemovePassword() const -{ - return m_xBtnRemovePassword->get_active(); -} +bool ScRetypePassInputDlg::IsRemovePassword() const { return m_xBtnRemovePassword->get_active(); } -OUString ScRetypePassInputDlg::GetNewPassword() const -{ - return m_xPassword1Edit->get_text(); -} +OUString ScRetypePassInputDlg::GetNewPassword() const { return m_xPassword1Edit->get_text(); } void ScRetypePassInputDlg::Init() { @@ -310,7 +291,7 @@ void ScRetypePassInputDlg::Init() m_xBtnRetypePassword->connect_toggled(LINK(this, ScRetypePassInputDlg, RadioBtnHdl)); m_xBtnRemovePassword->connect_toggled(LINK(this, ScRetypePassInputDlg, RadioBtnHdl)); m_xBtnMatchOldPass->connect_toggled(LINK(this, ScRetypePassInputDlg, CheckBoxHdl)); - Link<weld::Entry&,void> aLink2 = LINK( this, ScRetypePassInputDlg, PasswordModifyHdl ); + Link<weld::Entry&, void> aLink2 = LINK(this, ScRetypePassInputDlg, PasswordModifyHdl); m_xPassword1Edit->connect_changed(aLink2); m_xPassword2Edit->connect_changed(aLink2); @@ -356,10 +337,7 @@ void ScRetypePassInputDlg::CheckPasswordInput() m_xBtnOk->set_sensitive(bPassGood); } -IMPL_LINK_NOARG(ScRetypePassInputDlg, OKHdl, weld::Button&, void) -{ - m_xDialog->response(RET_OK); -} +IMPL_LINK_NOARG(ScRetypePassInputDlg, OKHdl, weld::Button&, void) { m_xDialog->response(RET_OK); } IMPL_LINK_NOARG(ScRetypePassInputDlg, RadioBtnHdl, weld::ToggleButton&, void) { diff --git a/sc/source/ui/miscdlgs/shtabdlg.cxx b/sc/source/ui/miscdlgs/shtabdlg.cxx index 71e4fa0d1c03..cf0c10918890 100644 --- a/sc/source/ui/miscdlgs/shtabdlg.cxx +++ b/sc/source/ui/miscdlgs/shtabdlg.cxx @@ -31,13 +31,10 @@ ScShowTabDlg::ScShowTabDlg(weld::Window* pParent) m_xLb->connect_row_activated(LINK(this, ScShowTabDlg, DblClkHdl)); } -ScShowTabDlg::~ScShowTabDlg() -{ -} +ScShowTabDlg::~ScShowTabDlg() {} -void ScShowTabDlg::SetDescription( - const OUString& rTitle, const OUString& rFixedText, - const OString& rDlgHelpId, const OString& sLbHelpId ) +void ScShowTabDlg::SetDescription(const OUString& rTitle, const OUString& rFixedText, + const OString& rDlgHelpId, const OString& sLbHelpId) { m_xDialog->set_title(rTitle); m_xFrame->set_label(rFixedText); @@ -58,10 +55,7 @@ std::vector<sal_Int32> ScShowTabDlg::GetSelectedRows() const return std::vector<sal_Int32>(aTmp.begin(), aTmp.end()); } -OUString ScShowTabDlg::GetEntry(sal_Int32 nIndex) const -{ - return m_xLb->get_text(nIndex); -} +OUString ScShowTabDlg::GetEntry(sal_Int32 nIndex) const { return m_xLb->get_text(nIndex); } IMPL_LINK_NOARG(ScShowTabDlg, DblClkHdl, weld::TreeView&, bool) { diff --git a/sc/source/ui/miscdlgs/warnbox.cxx b/sc/source/ui/miscdlgs/warnbox.cxx index 4c53b658e691..8bb0a37d1220 100644 --- a/sc/source/ui/miscdlgs/warnbox.cxx +++ b/sc/source/ui/miscdlgs/warnbox.cxx @@ -24,7 +24,7 @@ ScReplaceWarnBox::ScReplaceWarnBox(weld::Window* pParent) : MessageDialogController(pParent, "modules/scalc/ui/checkwarningdialog.ui", - "CheckWarningDialog", "ask") + "CheckWarningDialog", "ask") // By default, the check box is ON, and the user needs to un-check it to // disable all future warnings. , m_xWarningOnBox(m_xBuilder->weld_check_button("ask")) @@ -35,15 +35,15 @@ ScReplaceWarnBox::ScReplaceWarnBox(weld::Window* pParent) short ScReplaceWarnBox::run() { short nRet = RET_YES; - if( SC_MOD()->GetInputOptions().GetReplaceCellsWarn() ) + if (SC_MOD()->GetInputOptions().GetReplaceCellsWarn()) { nRet = MessageDialogController::run(); if (!m_xWarningOnBox->get_active()) { ScModule* pScMod = SC_MOD(); - ScInputOptions aInputOpt( pScMod->GetInputOptions() ); - aInputOpt.SetReplaceCellsWarn( false ); - pScMod->SetInputOptions( aInputOpt ); + ScInputOptions aInputOpt(pScMod->GetInputOptions()); + aInputOpt.SetReplaceCellsWarn(false); + pScMod->SetInputOptions(aInputOpt); } } return nRet; diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx index 3c2b41a4d4c5..2082204da1bd 100644 --- a/sc/source/ui/namedlg/namemgrtable.cxx +++ b/sc/source/ui/namedlg/namemgrtable.cxx @@ -44,21 +44,21 @@ void ScRangeManagerTable::SetEntry(const ScRangeNameLine& rLine) { for (int i = 0, nEntryCount = m_xTreeView->n_children(); i < nEntryCount; ++i) { - if (rLine.aName == m_xTreeView->get_text(i, 0) && - rLine.aScope == m_xTreeView->get_text(i, 2)) + if (rLine.aName == m_xTreeView->get_text(i, 0) + && rLine.aScope == m_xTreeView->get_text(i, 2)) { m_xTreeView->set_cursor(i); } } } -ScRangeManagerTable::ScRangeManagerTable(std::unique_ptr<weld::TreeView> xTreeView, - const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap, - const ScAddress& rPos) +ScRangeManagerTable::ScRangeManagerTable( + std::unique_ptr<weld::TreeView> xTreeView, + const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap, const ScAddress& rPos) : m_xTreeView(std::move(xTreeView)) - , maGlobalString( ScResId(STR_GLOBAL_SCOPE)) + , maGlobalString(ScResId(STR_GLOBAL_SCOPE)) , m_RangeMap(rRangeMap) - , maPos( rPos ) + , maPos(rPos) , m_nId(0) , mbNeedUpdate(true) { @@ -95,18 +95,18 @@ void ScRangeManagerTable::CheckForFormulaString() if (UpdatesBlocked()) return; - auto lambda = [this](weld::TreeIter& rEntry){ + auto lambda = [this](weld::TreeIter& rEntry) { OUString sId(m_xTreeView->get_id(rEntry)); std::map<OUString, bool>::const_iterator itr = maCalculatedFormulaEntries.find(sId); if (itr == maCalculatedFormulaEntries.end() || !itr->second) { ScRangeNameLine aLine; GetLine(aLine, rEntry); - const ScRangeData* pData = findRangeData( aLine ); + const ScRangeData* pData = findRangeData(aLine); OUString aFormulaString; pData->GetSymbol(aFormulaString, maPos); m_xTreeView->set_text(rEntry, aFormulaString, 1); - maCalculatedFormulaEntries.insert( std::pair<OUString, bool>(sId, true) ); + maCalculatedFormulaEntries.insert(std::pair<OUString, bool>(sId, true)); } return false; }; @@ -117,10 +117,7 @@ void ScRangeManagerTable::CheckForFormulaString() m_xTreeView->selected_foreach(lambda); } -IMPL_LINK_NOARG(ScRangeManagerTable, SizeAllocHdl, const Size&, void) -{ - CheckForFormulaString(); -} +IMPL_LINK_NOARG(ScRangeManagerTable, SizeAllocHdl, const Size&, void) { CheckForFormulaString(); } void ScRangeManagerTable::addEntry(const ScRangeNameLine& rLine, bool bSetCurEntry) { @@ -148,7 +145,7 @@ void ScRangeManagerTable::Init() m_xTreeView->clear(); for (auto const& itr : m_RangeMap) { - const ScRangeName *const pLocalRangeName = itr.second.get(); + const ScRangeName* const pLocalRangeName = itr.second.get(); ScRangeNameLine aLine; if (itr.first == STR_GLOBAL_RANGE_NAME) aLine.aScope = maGlobalString; @@ -169,7 +166,7 @@ void ScRangeManagerTable::Init() std::vector<ScRangeNameLine> ScRangeManagerTable::GetSelectedEntries() { std::vector<ScRangeNameLine> aSelectedEntries; - m_xTreeView->selected_foreach([this, &aSelectedEntries](weld::TreeIter& rEntry){ + m_xTreeView->selected_foreach([this, &aSelectedEntries](weld::TreeIter& rEntry) { ScRangeNameLine aLine; GetLine(aLine, rEntry); aSelectedEntries.push_back(aLine); diff --git a/sc/source/ui/namedlg/namepast.cxx b/sc/source/ui/namedlg/namepast.cxx index 63ddeccd0ab8..c6851abcc426 100644 --- a/sc/source/ui/namedlg/namepast.cxx +++ b/sc/source/ui/namedlg/namepast.cxx @@ -28,17 +28,17 @@ #include <scresid.hxx> #include <compiler.hxx> -ScNamePasteDlg::ScNamePasteDlg(weld::Window * pParent, ScDocShell* pShell) +ScNamePasteDlg::ScNamePasteDlg(weld::Window* pParent, ScDocShell* pShell) : GenericDialogController(pParent, "modules/scalc/ui/insertname.ui", "InsertNameDialog") , m_xBtnPasteAll(m_xBuilder->weld_button("pasteall")) , m_xBtnPaste(m_xBuilder->weld_button("paste")) , m_xBtnClose(m_xBuilder->weld_button("close")) { ScDocument& rDoc = pShell->GetDocument(); - m_aSheetSep = OUString( rDoc.GetSheetSeparator()); + m_aSheetSep = OUString(rDoc.GetSheetSeparator()); std::map<OUString, ScRangeName*> aCopyMap; rDoc.GetRangeNameMap(aCopyMap); - for (const auto& [aTemp, pName] : aCopyMap) + for (const auto & [ aTemp, pName ] : aCopyMap) { m_RangeMap.insert(std::make_pair(aTemp, std::make_unique<ScRangeName>(*pName))); } @@ -51,9 +51,9 @@ ScNamePasteDlg::ScNamePasteDlg(weld::Window * pParent, ScDocShell* pShell) xTreeView->get_height_rows(10)); m_xTable.reset(new ScRangeManagerTable(std::move(xTreeView), m_RangeMap, aPos)); - m_xBtnPaste->connect_clicked( LINK( this, ScNamePasteDlg, ButtonHdl) ); - m_xBtnPasteAll->connect_clicked( LINK( this, ScNamePasteDlg, ButtonHdl)); - m_xBtnClose->connect_clicked( LINK( this, ScNamePasteDlg, ButtonHdl)); + m_xBtnPaste->connect_clicked(LINK(this, ScNamePasteDlg, ButtonHdl)); + m_xBtnPasteAll->connect_clicked(LINK(this, ScNamePasteDlg, ButtonHdl)); + m_xBtnClose->connect_clicked(LINK(this, ScNamePasteDlg, ButtonHdl)); if (!m_xTable->n_children()) { @@ -62,9 +62,7 @@ ScNamePasteDlg::ScNamePasteDlg(weld::Window * pParent, ScDocShell* pShell) } } -ScNamePasteDlg::~ScNamePasteDlg() -{ -} +ScNamePasteDlg::~ScNamePasteDlg() {} IMPL_LINK(ScNamePasteDlg, ButtonHdl, weld::Button&, rButton, void) { @@ -74,7 +72,7 @@ IMPL_LINK(ScNamePasteDlg, ButtonHdl, weld::Button&, rButton, void) } else if (&rButton == m_xBtnPaste.get()) { - const OUString aGlobalScope( ScResId( STR_GLOBAL_SCOPE)); + const OUString aGlobalScope(ScResId(STR_GLOBAL_SCOPE)); std::vector<ScRangeNameLine> aSelectedLines = m_xTable->GetSelectedEntries(); for (const auto& rLine : aSelectedLines) { @@ -82,9 +80,9 @@ IMPL_LINK(ScNamePasteDlg, ButtonHdl, weld::Button&, rButton, void) maSelectedNames.push_back(rLine.aName); else { - OUString aSheet( rLine.aScope); - ScCompiler::CheckTabQuotes( aSheet); - maSelectedNames.push_back( aSheet + m_aSheetSep + rLine.aName); + OUString aSheet(rLine.aScope); + ScCompiler::CheckTabQuotes(aSheet); + maSelectedNames.push_back(aSheet + m_aSheetSep + rLine.aName); } } m_xDialog->response(BTN_PASTE_NAME); @@ -95,9 +93,6 @@ IMPL_LINK(ScNamePasteDlg, ButtonHdl, weld::Button&, rButton, void) } } -const std::vector<OUString>& ScNamePasteDlg::GetSelectedNames() const -{ - return maSelectedNames; -} +const std::vector<OUString>& ScNamePasteDlg::GetSelectedNames() const { return maSelectedNames; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.hxx b/sc/source/ui/sidebar/CellLineStyleValueSet.hxx index 5e3f55c4ce18..9a2ebd64dd90 100644 --- a/sc/source/ui/sidebar/CellLineStyleValueSet.hxx +++ b/sc/source/ui/sidebar/CellLineStyleValueSet.hxx @@ -23,13 +23,14 @@ #define CELL_LINE_STYLE_ENTRIES 9 -namespace sc::sidebar { - +namespace sc::sidebar +{ class CellLineStyleValueSet : public ValueSet { private: - sal_uInt16 nSelItem; - OUString maStrUnit[CELL_LINE_STYLE_ENTRIES]; + sal_uInt16 nSelItem; + OUString maStrUnit[CELL_LINE_STYLE_ENTRIES]; + public: CellLineStyleValueSet(); virtual ~CellLineStyleValueSet() override; @@ -37,7 +38,7 @@ public: void SetUnit(const OUString* str); void SetSelItem(sal_uInt16 nSel); virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; - virtual void UserDraw( const UserDrawEvent& rUDEvt ) override; + virtual void UserDraw(const UserDrawEvent& rUDEvt) override; }; } // end of namespace svx::sidebar diff --git a/sc/source/ui/undo/target.cxx b/sc/source/ui/undo/target.cxx index db8784288558..ee220b633f6b 100644 --- a/sc/source/ui/undo/target.cxx +++ b/sc/source/ui/undo/target.cxx @@ -19,8 +19,6 @@ #include <target.hxx> -ScTabViewTarget::~ScTabViewTarget() -{ -} +ScTabViewTarget::~ScTabViewTarget() {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/undo/undoolk.cxx b/sc/source/ui/undo/undoolk.cxx index ac812fdabc34..519ae20a77c3 100644 --- a/sc/source/ui/undo/undoolk.cxx +++ b/sc/source/ui/undo/undoolk.cxx @@ -23,18 +23,18 @@ #include <drwlayer.hxx> #include <undoolk.hxx> -std::unique_ptr<SdrUndoAction> GetSdrUndoAction( ScDocument* pDoc ) +std::unique_ptr<SdrUndoAction> GetSdrUndoAction(ScDocument* pDoc) { ScDrawLayer* pLayer = pDoc->GetDrawLayer(); if (pLayer) - return pLayer->GetCalcUndo(); // must exist + return pLayer->GetCalcUndo(); // must exist else return nullptr; } -void DoSdrUndoAction( SdrUndoAction* pUndoAction, ScDocument* pDoc ) +void DoSdrUndoAction(SdrUndoAction* pUndoAction, ScDocument* pDoc) { - if ( pUndoAction ) + if (pUndoAction) pUndoAction->Undo(); else { @@ -45,27 +45,27 @@ void DoSdrUndoAction( SdrUndoAction* pUndoAction, ScDocument* pDoc ) // pages can just be created now. ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); - if ( pDrawLayer ) + if (pDrawLayer) { SCTAB nTabCount = pDoc->GetTableCount(); SCTAB nPages = static_cast<SCTAB>(pDrawLayer->GetPageCount()); - while ( nPages < nTabCount ) + while (nPages < nTabCount) { - pDrawLayer->ScAddPage( nPages ); + pDrawLayer->ScAddPage(nPages); ++nPages; } } } } -void RedoSdrUndoAction( SdrUndoAction* pUndoAction ) +void RedoSdrUndoAction(SdrUndoAction* pUndoAction) { // DoSdrUndoAction/RedoSdrUndoAction is called even if the pointer is null - if ( pUndoAction ) + if (pUndoAction) pUndoAction->Redo(); } -void EnableDrawAdjust( ScDocument* pDoc, bool bEnable ) +void EnableDrawAdjust(ScDocument* pDoc, bool bEnable) { ScDrawLayer* pLayer = pDoc->GetDrawLayer(); if (pLayer) diff --git a/sc/source/ui/unoobj/convuno.cxx b/sc/source/ui/unoobj/convuno.cxx index 100a08e4db20..d6ce8d9e1faa 100644 --- a/sc/source/ui/unoobj/convuno.cxx +++ b/sc/source/ui/unoobj/convuno.cxx @@ -25,22 +25,22 @@ using namespace com::sun::star; // everything is static... -LanguageType ScUnoConversion::GetLanguage( const lang::Locale& rLocale ) +LanguageType ScUnoConversion::GetLanguage(const lang::Locale& rLocale) { // empty language -> LANGUAGE_SYSTEM - if ( rLocale.Language.isEmpty() ) + if (rLocale.Language.isEmpty()) return LANGUAGE_SYSTEM; - LanguageType eRet = LanguageTag::convertToLanguageType( rLocale, false); - if ( eRet == LANGUAGE_NONE ) - eRet = LANGUAGE_SYSTEM; //! or throw an exception? + LanguageType eRet = LanguageTag::convertToLanguageType(rLocale, false); + if (eRet == LANGUAGE_NONE) + eRet = LANGUAGE_SYSTEM; //! or throw an exception? return eRet; } -void ScUnoConversion::FillLocale( lang::Locale& rLocale, LanguageType eLang ) +void ScUnoConversion::FillLocale(lang::Locale& rLocale, LanguageType eLang) { - rLocale = LanguageTag::convertToLocale( eLang ); + rLocale = LanguageTag::convertToLocale(eLang); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/unoobj/exceldetect.hxx b/sc/source/ui/unoobj/exceldetect.hxx index 32909a041b51..3abb930badad 100644 --- a/sc/source/ui/unoobj/exceldetect.hxx +++ b/sc/source/ui/unoobj/exceldetect.hxx @@ -15,7 +15,8 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/document/XExtendedFilterDetection.hpp> -class ScExcelBiffDetect : public cppu::WeakImplHelper<css::document::XExtendedFilterDetection, css::lang::XServiceInfo> +class ScExcelBiffDetect + : public cppu::WeakImplHelper<css::document::XExtendedFilterDetection, css::lang::XServiceInfo> { public: explicit ScExcelBiffDetect(); @@ -23,11 +24,12 @@ public: // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; - virtual sal_Bool SAL_CALL supportsService( const OUString& aName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + virtual sal_Bool SAL_CALL supportsService(const OUString& aName) override; + virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; // XExtendedFilterDetection - virtual OUString SAL_CALL detect( css::uno::Sequence<css::beans::PropertyValue>& lDescriptor ) override; + virtual OUString SAL_CALL + detect(css::uno::Sequence<css::beans::PropertyValue>& lDescriptor) override; }; #endif diff --git a/sc/source/ui/unoobj/listenercalls.cxx b/sc/source/ui/unoobj/listenercalls.cxx index d05938d85101..2d9a23083ca8 100644 --- a/sc/source/ui/unoobj/listenercalls.cxx +++ b/sc/source/ui/unoobj/listenercalls.cxx @@ -24,20 +24,18 @@ using namespace com::sun::star; -ScUnoListenerCalls::ScUnoListenerCalls() -{ -} +ScUnoListenerCalls::ScUnoListenerCalls() {} ScUnoListenerCalls::~ScUnoListenerCalls() { - OSL_ENSURE( aEntries.empty(), "unhandled listener calls remaining" ); + OSL_ENSURE(aEntries.empty(), "unhandled listener calls remaining"); } -void ScUnoListenerCalls::Add( const uno::Reference<util::XModifyListener>& rListener, - const lang::EventObject& rEvent ) +void ScUnoListenerCalls::Add(const uno::Reference<util::XModifyListener>& rListener, + const lang::EventObject& rEvent) { - if ( rListener.is() ) - aEntries.emplace_back( rListener, rEvent ); + if (rListener.is()) + aEntries.emplace_back(rListener, rEvent); } void ScUnoListenerCalls::ExecuteAndClear() @@ -52,9 +50,9 @@ void ScUnoListenerCalls::ExecuteAndClear() ScUnoListenerEntry aEntry = *aItr; try { - aEntry.xListener->modified( aEntry.aEvent ); + aEntry.xListener->modified(aEntry.aEvent); } - catch ( const uno::RuntimeException& ) + catch (const uno::RuntimeException&) { // the listener is an external object and may throw a RuntimeException // for reasons we don't know diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx index 09fccee63f77..c5577a7f82c0 100644 --- a/sc/source/ui/vba/vbacondition.cxx +++ b/sc/source/ui/vba/vbacondition.cxx @@ -29,26 +29,30 @@ using namespace ::com::sun::star; const sal_Int32 ISFORMULA = 98765432; -template< typename... Ifc > -ScVbaCondition< Ifc... >::ScVbaCondition( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetCondition >& _xSheetCondition ) : ScVbaCondition_BASE( xParent, xContext ), mxSheetCondition( _xSheetCondition ) +template <typename... Ifc> +ScVbaCondition<Ifc...>::ScVbaCondition( + const uno::Reference<XHelperInterface>& xParent, + const uno::Reference<uno::XComponentContext>& xContext, + const uno::Reference<sheet::XSheetCondition>& _xSheetCondition) + : ScVbaCondition_BASE(xParent, xContext) + , mxSheetCondition(_xSheetCondition) { - mxAddressable.set( xParent, uno::UNO_QUERY_THROW ); + mxAddressable.set(xParent, uno::UNO_QUERY_THROW); } -template< typename... Ifc > -sheet::ConditionOperator -ScVbaCondition< Ifc... >::retrieveAPIOperator( const uno::Any& _aOperator) +template <typename... Ifc> +sheet::ConditionOperator ScVbaCondition<Ifc...>::retrieveAPIOperator(const uno::Any& _aOperator) { sheet::ConditionOperator aRetAPIOperator = sheet::ConditionOperator_NONE; sal_Int32 nOperator = 0; - if ( _aOperator >>= nOperator ) + if (_aOperator >>= nOperator) { - switch(nOperator) + switch (nOperator) { case excel::XlFormatConditionOperator::xlBetween: aRetAPIOperator = sheet::ConditionOperator_BETWEEN; break; - case excel::XlFormatConditionOperator::xlNotBetween: + case excel::XlFormatConditionOperator::xlNotBetween: aRetAPIOperator = sheet::ConditionOperator_NOT_BETWEEN; break; case excel::XlFormatConditionOperator::xlEqual: @@ -77,26 +81,20 @@ ScVbaCondition< Ifc... >::retrieveAPIOperator( const uno::Any& _aOperator) return aRetAPIOperator; } -template< typename... Ifc > -OUString -ScVbaCondition< Ifc... >::Formula1( ) +template <typename... Ifc> OUString ScVbaCondition<Ifc...>::Formula1() { - return mxSheetCondition->getFormula1(); + return mxSheetCondition->getFormula1(); } -template< typename... Ifc > -OUString -ScVbaCondition< Ifc... >::Formula2( ) +template <typename... Ifc> OUString ScVbaCondition<Ifc...>::Formula2() { - return mxSheetCondition->getFormula2(); + return mxSheetCondition->getFormula2(); } -template< typename... Ifc > -sal_Int32 -ScVbaCondition< Ifc... >::Operator(bool _bIncludeFormulaValue) +template <typename... Ifc> sal_Int32 ScVbaCondition<Ifc...>::Operator(bool _bIncludeFormulaValue) { sal_Int32 retvalue = -1; - sheet::ConditionOperator aConditionalOperator = mxSheetCondition->getOperator(); + sheet::ConditionOperator aConditionalOperator = mxSheetCondition->getOperator(); switch (aConditionalOperator) { case sheet::ConditionOperator_EQUAL: @@ -135,11 +133,11 @@ ScVbaCondition< Ifc... >::Operator(bool _bIncludeFormulaValue) case sheet::ConditionOperator_NONE: default: DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, u"Operator not supported"); - break; + break; } return retvalue; } -template class ScVbaCondition< excel::XFormatCondition >; +template class ScVbaCondition<excel::XFormatCondition>; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbafont.hxx b/sc/source/ui/vba/vbafont.hxx index 6be7f26db76f..9aa5936dbee0 100644 --- a/sc/source/ui/vba/vbafont.hxx +++ b/sc/source/ui/vba/vbafont.hxx @@ -24,52 +24,54 @@ #include <ooo/vba/excel/XFont.hpp> #include <vbahelper/vbafontbase.hxx> -namespace com::sun::star::beans { class XPropertySet; } +namespace com::sun::star::beans +{ +class XPropertySet; +} class ScCellRangeObj; class SfxItemSet; class ScVbaPalette; -typedef cppu::ImplInheritanceHelper< VbaFontBase, ov::excel::XFont > ScVbaFont_BASE; +typedef cppu::ImplInheritanceHelper<VbaFontBase, ov::excel::XFont> ScVbaFont_BASE; class ScVbaFont : public ScVbaFont_BASE { ScCellRangeObj* mpRangeObj; - SfxItemSet* GetDataSet(); + SfxItemSet* GetDataSet(); + public: /// @throws css::uno::RuntimeException - ScVbaFont( - const css::uno::Reference< ov::XHelperInterface >& xParent, - const css::uno::Reference< css::uno::XComponentContext >& xContext, - const ScVbaPalette& dPalette, - const css::uno::Reference< css::beans::XPropertySet >& xPropertySet, - ScCellRangeObj* pRangeObj = nullptr, bool bFormControl = false ); - virtual ~ScVbaFont() override;// {} + ScVbaFont(const css::uno::Reference<ov::XHelperInterface>& xParent, + const css::uno::Reference<css::uno::XComponentContext>& xContext, + const ScVbaPalette& dPalette, + const css::uno::Reference<css::beans::XPropertySet>& xPropertySet, + ScCellRangeObj* pRangeObj = nullptr, bool bFormControl = false); + virtual ~ScVbaFont() override; // {} // Attributes virtual css::uno::Any SAL_CALL getSize() override; virtual css::uno::Any SAL_CALL getStandardFontSize() override; - virtual void SAL_CALL setStandardFontSize( const css::uno::Any& _standardfontsize ) override; + virtual void SAL_CALL setStandardFontSize(const css::uno::Any& _standardfontsize) override; virtual css::uno::Any SAL_CALL getStandardFont() override; - virtual void SAL_CALL setStandardFont( const css::uno::Any& _standardfont ) override; + virtual void SAL_CALL setStandardFont(const css::uno::Any& _standardfont) override; virtual css::uno::Any SAL_CALL getFontStyle() override; - virtual void SAL_CALL setFontStyle( const css::uno::Any& _fontstyle ) override; + virtual void SAL_CALL setFontStyle(const css::uno::Any& _fontstyle) override; virtual css::uno::Any SAL_CALL getColorIndex() override; - virtual void SAL_CALL setColorIndex( const css::uno::Any& _colorindex ) override; + virtual void SAL_CALL setColorIndex(const css::uno::Any& _colorindex) override; virtual css::uno::Any SAL_CALL getBold() override; virtual css::uno::Any SAL_CALL getUnderline() override; - virtual void SAL_CALL setUnderline( const css::uno::Any& _underline ) override; + virtual void SAL_CALL setUnderline(const css::uno::Any& _underline) override; virtual css::uno::Any SAL_CALL getStrikethrough() override; virtual css::uno::Any SAL_CALL getShadow() override; virtual css::uno::Any SAL_CALL getItalic() override; virtual css::uno::Any SAL_CALL getName() override; - virtual css::uno::Any SAL_CALL getColor() override ; - virtual css::uno::Any SAL_CALL getOutlineFont() override ; - virtual void SAL_CALL setOutlineFont( const css::uno::Any& _outlinefont ) override ; + virtual css::uno::Any SAL_CALL getColor() override; + virtual css::uno::Any SAL_CALL getOutlineFont() override; + virtual void SAL_CALL setOutlineFont(const css::uno::Any& _outlinefont) override; // XHelperInterface virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; - }; #endif // INCLUDED_SC_SOURCE_UI_VBA_VBAFONT_HXX diff --git a/sc/source/ui/vba/vbaoleobjects.hxx b/sc/source/ui/vba/vbaoleobjects.hxx index 761bbddbd24b..fbf0dd436f27 100644 --- a/sc/source/ui/vba/vbaoleobjects.hxx +++ b/sc/source/ui/vba/vbaoleobjects.hxx @@ -23,25 +23,26 @@ #include <vbahelper/vbacollectionimpl.hxx> -typedef CollTestImplHelper< ov::excel::XOLEObjects > OLEObjectsImpl_BASE; +typedef CollTestImplHelper<ov::excel::XOLEObjects> OLEObjectsImpl_BASE; class ScVbaOLEObjects : public OLEObjectsImpl_BASE { protected: - virtual css::uno::Any getItemByStringIndex( const OUString& sIndex ) override; + virtual css::uno::Any getItemByStringIndex(const OUString& sIndex) override; virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; + public: - ScVbaOLEObjects( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ); + ScVbaOLEObjects(const css::uno::Reference<ov::XHelperInterface>& xParent, + const css::uno::Reference<css::uno::XComponentContext>& xContext, + const css::uno::Reference<css::container::XIndexAccess>& xIndexAccess); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() override; - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override; + virtual css::uno::Reference<css::container::XEnumeration> SAL_CALL createEnumeration() override; // ScVbaCollectionBaseImpl - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ) override; - + virtual css::uno::Any createCollectionObject(const css::uno::Any& aSource) override; }; #endif // INCLUDED_SC_SOURCE_UI_VBA_VBAOLEOBJECTS_HXX diff --git a/sc/source/ui/vba/vbapagebreaks.hxx b/sc/source/ui/vba/vbapagebreaks.hxx index 3593ebeca298..eda42c075460 100644 --- a/sc/source/ui/vba/vbapagebreaks.hxx +++ b/sc/source/ui/vba/vbapagebreaks.hxx @@ -23,25 +23,31 @@ #include <ooo/vba/excel/XVPageBreaks.hpp> #include <vbahelper/vbacollectionimpl.hxx> -namespace com::sun::star::sheet { class XSheetPageBreak; } -namespace com::sun::star::uno { class XComponentContext; } +namespace com::sun::star::sheet +{ +class XSheetPageBreak; +} +namespace com::sun::star::uno +{ +class XComponentContext; +} -typedef CollTestImplHelper< ov::excel::XHPageBreaks > ScVbaHPageBreaks_BASE; +typedef CollTestImplHelper<ov::excel::XHPageBreaks> ScVbaHPageBreaks_BASE; class ScVbaHPageBreaks : public ScVbaHPageBreaks_BASE { public: /// @throws css::uno::RuntimeException - ScVbaHPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent, - const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::sheet::XSheetPageBreak >& xSheetPageBreak); + ScVbaHPageBreaks(const css::uno::Reference<ov::XHelperInterface>& xParent, + const css::uno::Reference<css::uno::XComponentContext>& xContext, + const css::uno::Reference<css::sheet::XSheetPageBreak>& xSheetPageBreak); // XHPageBreaks - virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Before) override; + virtual css::uno::Any SAL_CALL Add(const css::uno::Any& Before) override; // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() override; - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override; + virtual css::uno::Reference<css::container::XEnumeration> SAL_CALL createEnumeration() override; virtual css::uno::Any createCollectionObject(const css::uno::Any&) override; // XHelperInterface @@ -50,25 +56,25 @@ public: }; //VPageBreaks -typedef CollTestImplHelper< ov::excel::XVPageBreaks > ScVbaVPageBreaks_BASE; +typedef CollTestImplHelper<ov::excel::XVPageBreaks> ScVbaVPageBreaks_BASE; class ScVbaVPageBreaks : public ScVbaVPageBreaks_BASE { public: /// @throws css::uno::RuntimeException - ScVbaVPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent, - const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::sheet::XSheetPageBreak >& xSheetPageBreak ); + ScVbaVPageBreaks(const css::uno::Reference<ov::XHelperInterface>& xParent, + const css::uno::Reference<css::uno::XComponentContext>& xContext, + const css::uno::Reference<css::sheet::XSheetPageBreak>& xSheetPageBreak); virtual ~ScVbaVPageBreaks() override; // XVPageBreaks - virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Before ) override; + virtual css::uno::Any SAL_CALL Add(const css::uno::Any& Before) override; // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() override; - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override; - virtual css::uno::Any createCollectionObject( const css::uno::Any& ) override; + virtual css::uno::Reference<css::container::XEnumeration> SAL_CALL createEnumeration() override; + virtual css::uno::Any createCollectionObject(const css::uno::Any&) override; // XHelperInterface virtual OUString getServiceImplName() override; diff --git a/sc/source/ui/vba/vbapagesetup.hxx b/sc/source/ui/vba/vbapagesetup.hxx index bd5045d41741..7ceaa3ca3384 100644 --- a/sc/source/ui/vba/vbapagesetup.hxx +++ b/sc/source/ui/vba/vbapagesetup.hxx @@ -25,63 +25,64 @@ #include <com/sun/star/sheet/XSpreadsheet.hpp> #include <vbahelper/vbapagesetupbase.hxx> -typedef cppu::ImplInheritanceHelper< VbaPageSetupBase, ov::excel::XPageSetup > ScVbaPageSetup_BASE; +typedef cppu::ImplInheritanceHelper<VbaPageSetupBase, ov::excel::XPageSetup> ScVbaPageSetup_BASE; -class ScVbaPageSetup : public ScVbaPageSetup_BASE +class ScVbaPageSetup : public ScVbaPageSetup_BASE { - css::uno::Reference< css::sheet::XSpreadsheet > mxSheet; + css::uno::Reference<css::sheet::XSpreadsheet> mxSheet; bool mbIsLandscape; + public: /// @throws css::uno::RuntimeException - ScVbaPageSetup( const css::uno::Reference< ov::XHelperInterface >& xParent, - const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::sheet::XSpreadsheet>& xSheet, - const css::uno::Reference< css::frame::XModel >& xModel); + ScVbaPageSetup(const css::uno::Reference<ov::XHelperInterface>& xParent, + const css::uno::Reference<css::uno::XComponentContext>& xContext, + const css::uno::Reference<css::sheet::XSpreadsheet>& xSheet, + const css::uno::Reference<css::frame::XModel>& xModel); // Attribute virtual OUString SAL_CALL getPrintArea() override; - virtual void SAL_CALL setPrintArea( const OUString& rAreas ) override; + virtual void SAL_CALL setPrintArea(const OUString& rAreas) override; virtual double SAL_CALL getHeaderMargin() override; - void SAL_CALL setHeaderMargin( double margin ) override; + void SAL_CALL setHeaderMargin(double margin) override; double SAL_CALL getFooterMargin() override; - void SAL_CALL setFooterMargin( double margin ) override; + void SAL_CALL setFooterMargin(double margin) override; virtual css::uno::Any SAL_CALL getFitToPagesTall() override; - virtual void SAL_CALL setFitToPagesTall( const css::uno::Any& fitToPagesTall ) override; + virtual void SAL_CALL setFitToPagesTall(const css::uno::Any& fitToPagesTall) override; virtual css::uno::Any SAL_CALL getFitToPagesWide() override; - virtual void SAL_CALL setFitToPagesWide( const css::uno::Any& fitToPagesWide ) override; + virtual void SAL_CALL setFitToPagesWide(const css::uno::Any& fitToPagesWide) override; virtual css::uno::Any SAL_CALL getZoom() override; - virtual void SAL_CALL setZoom( const css::uno::Any& zoom ) override; + virtual void SAL_CALL setZoom(const css::uno::Any& zoom) override; virtual OUString SAL_CALL getLeftHeader() override; - virtual void SAL_CALL setLeftHeader( const OUString& leftHeader ) override; + virtual void SAL_CALL setLeftHeader(const OUString& leftHeader) override; virtual OUString SAL_CALL getCenterHeader() override; - virtual void SAL_CALL setCenterHeader( const OUString& centerHeader ) override; + virtual void SAL_CALL setCenterHeader(const OUString& centerHeader) override; virtual OUString SAL_CALL getRightHeader() override; - virtual void SAL_CALL setRightHeader( const OUString& rightHeader ) override; + virtual void SAL_CALL setRightHeader(const OUString& rightHeader) override; virtual OUString SAL_CALL getLeftFooter() override; - virtual void SAL_CALL setLeftFooter( const OUString& leftFooter ) override; + virtual void SAL_CALL setLeftFooter(const OUString& leftFooter) override; virtual OUString SAL_CALL getCenterFooter() override; - virtual void SAL_CALL setCenterFooter( const OUString& centerFooter ) override; + virtual void SAL_CALL setCenterFooter(const OUString& centerFooter) override; virtual OUString SAL_CALL getRightFooter() override; - virtual void SAL_CALL setRightFooter( const OUString& rightFooter ) override; + virtual void SAL_CALL setRightFooter(const OUString& rightFooter) override; virtual sal_Int32 SAL_CALL getOrder() override; - virtual void SAL_CALL setOrder( sal_Int32 order ) override; + virtual void SAL_CALL setOrder(sal_Int32 order) override; virtual sal_Int32 SAL_CALL getFirstPageNumber() override; - virtual void SAL_CALL setFirstPageNumber( sal_Int32 firstPageNumber ) override; + virtual void SAL_CALL setFirstPageNumber(sal_Int32 firstPageNumber) override; virtual sal_Bool SAL_CALL getCenterVertically() override; - virtual void SAL_CALL setCenterVertically( sal_Bool centerVertically ) override; + virtual void SAL_CALL setCenterVertically(sal_Bool centerVertically) override; virtual sal_Bool SAL_CALL getCenterHorizontally() override; - virtual void SAL_CALL setCenterHorizontally( sal_Bool centerHorizontally ) override; + virtual void SAL_CALL setCenterHorizontally(sal_Bool centerHorizontally) override; virtual sal_Bool SAL_CALL getPrintHeadings() override; - virtual void SAL_CALL setPrintHeadings( sal_Bool printHeadings ) override; + virtual void SAL_CALL setPrintHeadings(sal_Bool printHeadings) override; virtual sal_Bool SAL_CALL getPrintGridlines() override; - virtual void SAL_CALL setPrintGridlines( sal_Bool _printgridlines ) override; + virtual void SAL_CALL setPrintGridlines(sal_Bool _printgridlines) override; virtual OUString SAL_CALL getPrintTitleRows() override; - virtual void SAL_CALL setPrintTitleRows( const OUString& _printtitlerows ) override; + virtual void SAL_CALL setPrintTitleRows(const OUString& _printtitlerows) override; virtual OUString SAL_CALL getPrintTitleColumns() override; - virtual void SAL_CALL setPrintTitleColumns( const OUString& _printtitlecolumns ) override; + virtual void SAL_CALL setPrintTitleColumns(const OUString& _printtitlecolumns) override; virtual sal_Int32 SAL_CALL getPaperSize() override; - virtual void SAL_CALL setPaperSize( sal_Int32 papersize ) override; + virtual void SAL_CALL setPaperSize(sal_Int32 papersize) override; // XHelperInterface virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; diff --git a/sc/source/ui/vba/vbapivottable.hxx b/sc/source/ui/vba/vbapivottable.hxx index 506c61a7febb..8c99df75d4bc 100644 --- a/sc/source/ui/vba/vbapivottable.hxx +++ b/sc/source/ui/vba/vbapivottable.hxx @@ -23,14 +23,16 @@ #include <ooo/vba/excel/XPivotTable.hpp> #include <vbahelper/vbahelperinterface.hxx> -typedef InheritedHelperInterfaceWeakImpl< ov::excel::XPivotTable > PivotTableImpl_BASE; +typedef InheritedHelperInterfaceWeakImpl<ov::excel::XPivotTable> PivotTableImpl_BASE; class ScVbaPivotTable : public PivotTableImpl_BASE { - css::uno::Reference< css::sheet::XDataPilotTable > m_xTable; + css::uno::Reference<css::sheet::XDataPilotTable> m_xTable; + public: - ScVbaPivotTable( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XDataPilotTable >& xTable ); - virtual css::uno::Reference< ov::excel::XPivotCache > SAL_CALL PivotCache( ) override; + ScVbaPivotTable(const css::uno::Reference<css::uno::XComponentContext>& xContext, + const css::uno::Reference<css::sheet::XDataPilotTable>& xTable); + virtual css::uno::Reference<ov::excel::XPivotCache> SAL_CALL PivotCache() override; // XHelperInterface virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; diff --git a/sc/source/ui/vba/vbatextframe.hxx b/sc/source/ui/vba/vbatextframe.hxx index 8b7a2c70d527..6ebaec17c835 100644 --- a/sc/source/ui/vba/vbatextframe.hxx +++ b/sc/source/ui/vba/vbatextframe.hxx @@ -23,19 +23,19 @@ #include <vbahelper/vbatextframe.hxx> //typedef InheritedHelperInterfaceWeakImpl< ov::excel::XTextFrame > ScVbaTextFrame_BASE; -typedef cppu::ImplInheritanceHelper< VbaTextFrame, ov::excel::XTextFrame > ScVbaTextFrame_BASE; +typedef cppu::ImplInheritanceHelper<VbaTextFrame, ov::excel::XTextFrame> ScVbaTextFrame_BASE; class ScVbaTextFrame : public ScVbaTextFrame_BASE { public: /// @throws css::lang::IllegalArgumentException - ScVbaTextFrame( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext ); + ScVbaTextFrame(css::uno::Sequence<css::uno::Any> const& aArgs, + css::uno::Reference<css::uno::XComponentContext> const& xContext); // Methods - virtual css::uno::Any SAL_CALL Characters( ) override; + virtual css::uno::Any SAL_CALL Characters() override; // XHelperInterface virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; - }; #endif // INCLUDED_SC_SOURCE_UI_VBA_VBATEXTFRAME_HXX diff --git a/sc/source/ui/view/dbfunc4.cxx b/sc/source/ui/view/dbfunc4.cxx index 0ac150e9b84e..c8a6f48d0452 100644 --- a/sc/source/ui/view/dbfunc4.cxx +++ b/sc/source/ui/view/dbfunc4.cxx @@ -27,7 +27,7 @@ using namespace com::sun::star; -sal_uInt16 ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument& rDoc, bool bAllCharts ) +sal_uInt16 ScDBFunc::DoUpdateCharts(const ScAddress& rPos, ScDocument& rDoc, bool bAllCharts) { ScDrawLayer* pModel = rDoc.GetDrawLayer(); if (!pModel) @@ -36,30 +36,30 @@ sal_uInt16 ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument& rDoc, bo sal_uInt16 nFound = 0; sal_uInt16 nPageCount = pModel->GetPageCount(); - for (sal_uInt16 nPageNo=0; nPageNo<nPageCount; nPageNo++) + for (sal_uInt16 nPageNo = 0; nPageNo < nPageCount; nPageNo++) { SdrPage* pPage = pModel->GetPage(nPageNo); - OSL_ENSURE(pPage,"Page ?"); + OSL_ENSURE(pPage, "Page ?"); - SdrObjListIter aIter( pPage, SdrIterMode::DeepNoGroups ); + SdrObjListIter aIter(pPage, SdrIterMode::DeepNoGroups); SdrObject* pObject = aIter.Next(); while (pObject) { - if ( pObject->GetObjIdentifier() == OBJ_OLE2 && ScDocument::IsChart( pObject ) ) + if (pObject->GetObjIdentifier() == OBJ_OLE2 && ScDocument::IsChart(pObject)) { OUString aName = static_cast<SdrOle2Obj*>(pObject)->GetPersistName(); bool bHit = true; - if ( !bAllCharts ) + if (!bAllCharts) { ScRangeList aRanges; bool bColHeaders = false; bool bRowHeaders = false; - rDoc.GetOldChartParameters( aName, aRanges, bColHeaders, bRowHeaders ); - bHit = aRanges.In( rPos ); + rDoc.GetOldChartParameters(aName, aRanges, bColHeaders, bRowHeaders); + bHit = aRanges.In(rPos); } - if ( bHit ) + if (bHit) { - rDoc.UpdateChart( aName ); + rDoc.UpdateChart(aName); ++nFound; } } diff --git a/sc/source/ui/view/pgbrksh.cxx b/sc/source/ui/view/pgbrksh.cxx index def2d41fd71d..a0cdb21be6eb 100644 --- a/sc/source/ui/view/pgbrksh.cxx +++ b/sc/source/ui/view/pgbrksh.cxx @@ -27,7 +27,6 @@ #define ShellClass_ScPageBreakShell #include <scslots.hxx> - SFX_IMPL_INTERFACE(ScPageBreakShell, SfxShell) void ScPageBreakShell::InitInterface_Impl() @@ -35,22 +34,20 @@ void ScPageBreakShell::InitInterface_Impl() GetStaticInterface()->RegisterPopupMenu("pagebreak"); } -ScPageBreakShell::ScPageBreakShell( ScTabViewShell* pViewSh ) : - SfxShell(pViewSh) +ScPageBreakShell::ScPageBreakShell(ScTabViewShell* pViewSh) + : SfxShell(pViewSh) { - SetPool( &pViewSh->GetPool() ); + SetPool(&pViewSh->GetPool()); ScViewData& rViewData = pViewSh->GetViewData(); SfxUndoManager* pMgr = rViewData.GetSfxDocShell()->GetUndoManager(); - SetUndoManager( pMgr ); - if ( !rViewData.GetDocument().IsUndoEnabled() ) + SetUndoManager(pMgr); + if (!rViewData.GetDocument().IsUndoEnabled()) { - pMgr->SetMaxUndoActionCount( 0 ); + pMgr->SetMaxUndoActionCount(0); } SetName("PageBreak"); } -ScPageBreakShell::~ScPageBreakShell() -{ -} +ScPageBreakShell::~ScPageBreakShell() {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/view/tabvwshd.cxx b/sc/source/ui/view/tabvwshd.cxx index b86663900273..86a3c0e623ba 100644 --- a/sc/source/ui/view/tabvwshd.cxx +++ b/sc/source/ui/view/tabvwshd.cxx @@ -32,10 +32,10 @@ weld::Window* ScTabViewShell::GetDialogParent() { // if a ref-input dialog is open, use it as parent // (necessary when a slot is executed from the dialog's OK handler) - if ( nCurRefDlgId && nCurRefDlgId == SC_MOD()->GetCurRefDlgId() ) + if (nCurRefDlgId && nCurRefDlgId == SC_MOD()->GetCurRefDlgId()) { SfxViewFrame* pViewFrm = GetViewFrame(); - if ( pViewFrm->HasChildWindow(nCurRefDlgId) ) + if (pViewFrm->HasChildWindow(nCurRefDlgId)) { SfxChildWindow* pChild = pViewFrm->GetChildWindow(nCurRefDlgId); if (pChild) @@ -49,7 +49,7 @@ weld::Window* ScTabViewShell::GetDialogParent() } ScDocShell* pDocSh = GetViewData().GetDocShell(); - if ( pDocSh->IsOle() ) + if (pDocSh->IsOle()) { // TODO/LATER: how to GetEditWindow in embedded document?! // It should be OK to return the ViewShell Window! @@ -60,7 +60,7 @@ weld::Window* ScTabViewShell::GetDialogParent() // return pEnv->GetEditWin(); } - vcl::Window* pWin = GetActiveWin(); // for normal views, too + vcl::Window* pWin = GetActiveWin(); // for normal views, too return pWin ? pWin->GetFrameWeld() : nullptr; } diff --git a/scaddins/source/analysis/bessel.hxx b/scaddins/source/analysis/bessel.hxx index 58086ed258ed..2a3c88c96df4 100644 --- a/scaddins/source/analysis/bessel.hxx +++ b/scaddins/source/analysis/bessel.hxx @@ -22,39 +22,37 @@ #include <sal/types.h> -namespace sca::analysis { - - +namespace sca::analysis +{ // BESSEL functions - /** Returns the result for the unmodified BESSEL function of first kind (J), n-th order, at point x. @throws css::lang::IllegalArgumentException @throws css::sheet::NoConvergenceException */ -double BesselJ( double x, sal_Int32 n ); +double BesselJ(double x, sal_Int32 n); /** Returns the result for the modified BESSEL function of first kind (I), n-th order, at point x. @throws css::lang::IllegalArgumentException @throws css::sheet::NoConvergenceException */ -double BesselI( double x, sal_Int32 n ); +double BesselI(double x, sal_Int32 n); /** Returns the result for the unmodified BESSEL function of second kind (Y), n-th order, at point x. @throws css::lang::IllegalArgumentException @throws css::sheet::NoConvergenceException */ -double BesselY( double x, sal_Int32 n ); +double BesselY(double x, sal_Int32 n); /** Returns the result for the modified BESSEL function of second kind (K), n-th order, at point x. @throws css::lang::IllegalArgumentException @throws css::sheet::NoConvergenceException */ -double BesselK( double x, sal_Int32 n ); +double BesselK(double x, sal_Int32 n); } // namespace sca::analysis diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index f78e52cd67e7..d931dc2b369b 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -8732,17 +8732,12 @@ sc/inc/autoform.hxx sc/inc/autonamecache.hxx sc/inc/bigrange.hxx sc/inc/brdcst.hxx -sc/inc/bulkdatahint.hxx -sc/inc/calcconfig.hxx sc/inc/calcmacros.hxx sc/inc/callform.hxx sc/inc/cellform.hxx sc/inc/cellsuno.hxx -sc/inc/celltextattr.hxx sc/inc/cellvalue.hxx -sc/inc/cellvalues.hxx sc/inc/chart2uno.hxx -sc/inc/chartarr.hxx sc/inc/charthelper.hxx sc/inc/chartlis.hxx sc/inc/chartlock.hxx @@ -8751,13 +8746,10 @@ sc/inc/chartuno.hxx sc/inc/chgtrack.hxx sc/inc/chgviset.hxx sc/inc/clipcontext.hxx -sc/inc/clipoptions.hxx sc/inc/clipparam.hxx sc/inc/colcontainer.hxx sc/inc/colorscale.hxx sc/inc/column.hxx -sc/inc/columniterator.hxx -sc/inc/columnset.hxx sc/inc/columnspanset.hxx sc/inc/compare.hxx sc/inc/compiler.hxx @@ -8768,8 +8760,6 @@ sc/inc/consoli.hxx sc/inc/convuno.hxx sc/inc/cursuno.hxx sc/inc/dapiuno.hxx -sc/inc/datamapper.hxx -sc/inc/datastreamgettime.hxx sc/inc/datauno.hxx sc/inc/dbdata.hxx sc/inc/dbdocutl.hxx @@ -8785,11 +8775,9 @@ sc/inc/docpool.hxx sc/inc/document.hxx sc/inc/documentimport.hxx sc/inc/documentlinkmgr.hxx -sc/inc/documentstreamaccess.hxx sc/inc/docuno.hxx sc/inc/dpcache.hxx sc/inc/dpdimsave.hxx -sc/inc/dpfilteredcache.hxx sc/inc/dpglobal.hxx sc/inc/dpgroup.hxx sc/inc/dpitemdata.hxx @@ -8797,7 +8785,6 @@ sc/inc/dpnumgroupinfo.hxx sc/inc/dpobject.hxx sc/inc/dpoutput.hxx sc/inc/dpoutputgeometry.hxx -sc/inc/dpresfilter.hxx sc/inc/dpsave.hxx sc/inc/dpsdbtab.hxx sc/inc/dpshttab.hxx @@ -8810,7 +8797,6 @@ sc/inc/drdefuno.hxx sc/inc/drwlayer.hxx sc/inc/editdataarray.hxx sc/inc/editsrc.hxx -sc/inc/edittextiterator.hxx sc/inc/editutil.hxx sc/inc/eventuno.hxx sc/inc/externalrefmgr.hxx @@ -8825,7 +8811,6 @@ sc/inc/fonthelper.hxx sc/inc/forbiuno.hxx sc/inc/formulacell.hxx sc/inc/formulagroup.hxx -sc/inc/formulaiter.hxx sc/inc/formulalogger.hxx sc/inc/formulaopt.hxx sc/inc/formulaparserpool.hxx @@ -8833,7 +8818,6 @@ sc/inc/formularesult.hxx sc/inc/fstalgorithm.hxx sc/inc/funcdesc.hxx sc/inc/funcuno.hxx -sc/inc/generalfunction.hxx sc/inc/global.hxx sc/inc/grouparealistener.hxx sc/inc/helpids.h @@ -8842,17 +8826,13 @@ sc/inc/importfilterdata.hxx sc/inc/inputopt.hxx sc/inc/linkuno.hxx sc/inc/listenercalls.hxx -sc/inc/listenercontext.hxx -sc/inc/listenerquery.hxx sc/inc/listenerqueryids.hxx sc/inc/lookupcache.hxx -sc/inc/macromgr.hxx sc/inc/markarr.hxx sc/inc/markdata.hxx sc/inc/markmulti.hxx sc/inc/math.hxx sc/inc/matrixoperators.hxx -sc/inc/mid.h sc/inc/miscuno.hxx sc/inc/mtvcellfunc.hxx sc/inc/mtvelements.hxx @@ -8860,14 +8840,12 @@ sc/inc/mtvfunctions.hxx sc/inc/nameuno.hxx sc/inc/navicfg.hxx sc/inc/notesuno.hxx -sc/inc/numformat.hxx sc/inc/olinetab.hxx sc/inc/optuno.hxx sc/inc/optutil.hxx sc/inc/orcusfilters.hxx sc/inc/orcusxml.hxx sc/inc/pagepar.hxx -sc/inc/pageuno.hxx sc/inc/paramisc.hxx sc/inc/patattr.hxx sc/inc/pivot.hxx @@ -8884,24 +8862,19 @@ sc/inc/rangeutl.hxx sc/inc/rechead.hxx sc/inc/recursionhelper.hxx sc/inc/refdata.hxx -sc/inc/reffind.hxx sc/inc/refhint.hxx sc/inc/refreshtimer.hxx -sc/inc/refreshtimerprotector.hxx sc/inc/reftokenhelper.hxx sc/inc/reordermap.hxx sc/inc/rowheightcontext.hxx sc/inc/scabstdlg.hxx sc/inc/scdll.hxx -sc/inc/scdllapi.h sc/inc/scerrors.hxx sc/inc/scextopt.hxx sc/inc/scfuncs.hxx sc/inc/scitems.hxx sc/inc/scmatrix.hxx sc/inc/scmod.hxx -sc/inc/scopetools.hxx -sc/inc/segmenttree.hxx sc/inc/servuno.hxx sc/inc/shapeuno.hxx sc/inc/sharedformula.hxx @@ -8910,14 +8883,12 @@ sc/inc/sheetevents.hxx sc/inc/shellids.hxx sc/inc/simpleformulacalc.hxx sc/inc/sortparam.hxx -sc/inc/spellcheckcontext.hxx sc/inc/srchuno.hxx sc/inc/stlalgorithm.hxx sc/inc/stlpool.hxx sc/inc/stlsheet.hxx sc/inc/strings.hxx sc/inc/stringutil.hxx -sc/inc/stylehelper.hxx sc/inc/styleuno.hxx sc/inc/subtotal.hxx sc/inc/subtotalparam.hxx @@ -8929,44 +8900,33 @@ sc/inc/targuno.hxx sc/inc/textuno.hxx sc/inc/token.hxx sc/inc/tokenarray.hxx -sc/inc/tokenstringcontext.hxx sc/inc/tokenuno.hxx sc/inc/typedstrdata.hxx sc/inc/types.hxx -sc/inc/unitconv.hxx sc/inc/unonames.hxx sc/inc/unoreflist.hxx sc/inc/unowids.hxx sc/inc/userdat.hxx -sc/inc/userlist.hxx sc/inc/validat.hxx sc/inc/viewopti.hxx sc/inc/viewuno.hxx sc/inc/waitoff.hxx sc/inc/xmlwrap.hxx -sc/inc/zforauto.hxx -sc/qa/extras/check_data_pilot_field.cxx sc/qa/extras/check_data_pilot_table.cxx sc/qa/extras/check_xcell_ranges_query.cxx sc/qa/extras/htmlexporttest.cxx sc/qa/extras/macros-test.cxx sc/qa/extras/new_cond_format.cxx -sc/qa/extras/recordchanges-test.cxx sc/qa/extras/regression-test.cxx sc/qa/extras/scannotationsobj.cxx sc/qa/extras/sccellcursorobj.cxx -sc/qa/extras/sccellrangesobj.cxx sc/qa/extras/scdatabaserangeobj.cxx sc/qa/extras/scdatapilottableobj.cxx -sc/qa/extras/scmodelobj.cxx sc/qa/extras/scnamedrangeobj.cxx -sc/qa/extras/scoutlineobj.cxx -sc/qa/extras/scsubtotalfieldobj.cxx sc/qa/extras/sctablesheetobj.cxx sc/qa/perf/scperfobj.cxx sc/qa/unit/bugfix-test.cxx sc/qa/unit/copy_paste_test.cxx -sc/qa/unit/dataproviders_test.cxx sc/qa/unit/datatransformation_test.cxx sc/qa/unit/filters-test.cxx sc/qa/unit/functions_addin.cxx @@ -8998,7 +8958,6 @@ sc/qa/unit/rangelst_test.cxx sc/qa/unit/screenshots/screenshots.cxx sc/qa/unit/subsequent_export-test.cxx sc/qa/unit/subsequent_filters-test.cxx -sc/qa/unit/test_ScChartListenerCollection.cxx sc/qa/unit/tiledrendering/tiledrendering.cxx sc/qa/unit/ucalc.cxx sc/qa/unit/ucalc_column.cxx @@ -9099,7 +9058,6 @@ sc/source/core/data/table1.cxx sc/source/core/data/table2.cxx sc/source/core/data/table3.cxx sc/source/core/data/table4.cxx -sc/source/core/data/table5.cxx sc/source/core/data/table6.cxx sc/source/core/data/table7.cxx sc/source/core/data/tabprotection.cxx @@ -9109,11 +9067,8 @@ sc/source/core/data/validat.cxx sc/source/core/inc/addinhelpid.hxx sc/source/core/inc/addinlis.hxx sc/source/core/inc/adiasync.hxx -sc/source/core/inc/arraysumfunctor.hxx sc/source/core/inc/bcaslot.hxx -sc/source/core/inc/cellkeytranslator.hxx sc/source/core/inc/ddelink.hxx -sc/source/core/inc/doubleref.hxx sc/source/core/inc/formulagroupcl.hxx sc/source/core/inc/grouptokenconverter.hxx sc/source/core/inc/interpre.hxx @@ -9121,7 +9076,6 @@ sc/source/core/inc/jumpmatrix.hxx sc/source/core/inc/parclass.hxx sc/source/core/inc/poolhelp.hxx sc/source/core/inc/refupdat.hxx -sc/source/core/inc/scrdata.hxx sc/source/core/opencl/formulagroupcl.cxx sc/source/core/opencl/op_addin.cxx sc/source/core/opencl/op_addin.hxx @@ -9144,7 +9098,6 @@ sc/source/core/opencl/opbase.hxx sc/source/core/opencl/opinlinefun_finacial.cxx sc/source/core/opencl/opinlinefun_math.hxx sc/source/core/opencl/opinlinefun_statistical.cxx -sc/source/core/tool/addincfg.cxx sc/source/core/tool/addincol.cxx sc/source/core/tool/addinhelpid.cxx sc/source/core/tool/addinlis.cxx @@ -9198,7 +9151,6 @@ sc/source/core/tool/interpr8.cxx sc/source/core/tool/jumpmatrix.cxx sc/source/core/tool/listenerquery.cxx sc/source/core/tool/lookupcache.cxx -sc/source/core/tool/math.cxx sc/source/core/tool/matrixoperators.cxx sc/source/core/tool/navicfg.cxx sc/source/core/tool/numformat.cxx @@ -9228,7 +9180,6 @@ sc/source/core/tool/scopetools.cxx sc/source/core/tool/sharedformula.cxx sc/source/core/tool/stringutil.cxx sc/source/core/tool/stylehelper.cxx -sc/source/core/tool/subtotal.cxx sc/source/core/tool/token.cxx sc/source/core/tool/tokenstringcontext.cxx sc/source/core/tool/typedstrdata.cxx @@ -9297,7 +9248,6 @@ sc/source/filter/excel/xlstyle.cxx sc/source/filter/excel/xltoolbar.cxx sc/source/filter/excel/xltoolbar.hxx sc/source/filter/excel/xltools.cxx -sc/source/filter/excel/xltracer.cxx sc/source/filter/excel/xlview.cxx sc/source/filter/ftools/fapihelper.cxx sc/source/filter/ftools/fprogressbar.cxx @@ -9365,7 +9315,6 @@ sc/source/filter/inc/namebuff.hxx sc/source/filter/inc/numberformatsbuffer.hxx sc/source/filter/inc/ooxformulaparser.hxx sc/source/filter/inc/op.h -sc/source/filter/inc/optab.h sc/source/filter/inc/orcusinterface.hxx sc/source/filter/inc/otlnbuff.hxx sc/source/filter/inc/pagesettings.hxx @@ -9373,8 +9322,6 @@ sc/source/filter/inc/pivotcachebuffer.hxx sc/source/filter/inc/pivotcachefragment.hxx sc/source/filter/inc/pivottablebuffer.hxx sc/source/filter/inc/pivottablefragment.hxx -sc/source/filter/inc/qpro.hxx -sc/source/filter/inc/qproform.hxx sc/source/filter/inc/qprostyle.hxx sc/source/filter/inc/querytablebuffer.hxx sc/source/filter/inc/querytablefragment.hxx @@ -9387,7 +9334,6 @@ sc/source/filter/inc/rtfparse.hxx sc/source/filter/inc/scenariobuffer.hxx sc/source/filter/inc/scenariocontext.hxx sc/source/filter/inc/scfobj.hxx -sc/source/filter/inc/sharedformulagroups.hxx sc/source/filter/inc/sharedstringsbuffer.hxx sc/source/filter/inc/sharedstringsfragment.hxx sc/source/filter/inc/sheetdatabuffer.hxx @@ -9423,7 +9369,6 @@ sc/source/filter/inc/xelink.hxx sc/source/filter/inc/xename.hxx sc/source/filter/inc/xepage.hxx sc/source/filter/inc/xepivot.hxx -sc/source/filter/inc/xepivotxml.hxx sc/source/filter/inc/xerecord.hxx sc/source/filter/inc/xeroot.hxx sc/source/filter/inc/xestream.hxx @@ -9470,7 +9415,6 @@ sc/source/filter/lotus/lotform.cxx sc/source/filter/lotus/lotimpop.cxx sc/source/filter/lotus/lotread.cxx sc/source/filter/lotus/lotus.cxx -sc/source/filter/lotus/memory.cxx sc/source/filter/lotus/op.cxx sc/source/filter/lotus/optab.cxx sc/source/filter/lotus/tool.cxx @@ -9552,7 +9496,6 @@ sc/source/filter/xml/XMLCalculationSettingsContext.hxx sc/source/filter/xml/XMLCellRangeSourceContext.cxx sc/source/filter/xml/XMLCellRangeSourceContext.hxx sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx -sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx sc/source/filter/xml/XMLCodeNameProvider.cxx @@ -9568,13 +9511,11 @@ sc/source/filter/xml/XMLDDELinksContext.hxx sc/source/filter/xml/XMLDetectiveContext.cxx sc/source/filter/xml/XMLDetectiveContext.hxx sc/source/filter/xml/XMLEmptyContext.cxx -sc/source/filter/xml/XMLEmptyContext.hxx sc/source/filter/xml/XMLExportDDELinks.cxx sc/source/filter/xml/XMLExportDDELinks.hxx sc/source/filter/xml/XMLExportDataPilot.cxx sc/source/filter/xml/XMLExportDataPilot.hxx sc/source/filter/xml/XMLExportDatabaseRanges.cxx -sc/source/filter/xml/XMLExportDatabaseRanges.hxx sc/source/filter/xml/XMLExportIterator.cxx sc/source/filter/xml/XMLExportIterator.hxx sc/source/filter/xml/XMLExportSharedData.cxx @@ -9596,7 +9537,6 @@ sc/source/filter/xml/XMLTableShapesContext.hxx sc/source/filter/xml/XMLTableSourceContext.cxx sc/source/filter/xml/XMLTableSourceContext.hxx sc/source/filter/xml/XMLTrackedChangesContext.cxx -sc/source/filter/xml/XMLTrackedChangesContext.hxx sc/source/filter/xml/cachedattraccess.cxx sc/source/filter/xml/cachedattraccess.hxx sc/source/filter/xml/celltextparacontext.cxx @@ -9605,9 +9545,7 @@ sc/source/filter/xml/datastreamimport.cxx sc/source/filter/xml/datastreamimport.hxx sc/source/filter/xml/editattributemap.cxx sc/source/filter/xml/importcontext.cxx -sc/source/filter/xml/importcontext.hxx sc/source/filter/xml/pivotsource.cxx -sc/source/filter/xml/pivotsource.hxx sc/source/filter/xml/sheetdata.cxx sc/source/filter/xml/xmlannoi.cxx sc/source/filter/xml/xmlannoi.hxx @@ -9622,7 +9560,6 @@ sc/source/filter/xml/xmlcondformat.hxx sc/source/filter/xml/xmlconti.cxx sc/source/filter/xml/xmlconti.hxx sc/source/filter/xml/xmlcvali.cxx -sc/source/filter/xml/xmlcvali.hxx sc/source/filter/xml/xmldpimp.cxx sc/source/filter/xml/xmldpimp.hxx sc/source/filter/xml/xmldrani.cxx @@ -9663,7 +9600,6 @@ sc/source/ui/Accessibility/AccessibleCellBase.cxx sc/source/ui/Accessibility/AccessibleContextBase.cxx sc/source/ui/Accessibility/AccessibleCsvControl.cxx sc/source/ui/Accessibility/AccessibleDocument.cxx -sc/source/ui/Accessibility/AccessibleDocumentBase.cxx sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx sc/source/ui/Accessibility/AccessibleEditObject.cxx sc/source/ui/Accessibility/AccessiblePageHeader.cxx @@ -9708,9 +9644,7 @@ sc/source/ui/attrdlg/attrdlg.cxx sc/source/ui/attrdlg/scabstdlg.cxx sc/source/ui/attrdlg/scdlgfact.cxx sc/source/ui/attrdlg/scdlgfact.hxx -sc/source/ui/attrdlg/scuiexp.cxx sc/source/ui/attrdlg/tabpages.cxx -sc/source/ui/cctrl/cbnumberformat.cxx sc/source/ui/cctrl/cbuttonw.cxx sc/source/ui/cctrl/checklistmenu.cxx sc/source/ui/cctrl/dpcontrol.cxx @@ -9726,9 +9660,7 @@ sc/source/ui/dataprovider/csvdataprovider.cxx sc/source/ui/dataprovider/dataprovider.cxx sc/source/ui/dataprovider/datatransformation.cxx sc/source/ui/dataprovider/htmldataprovider.cxx -sc/source/ui/dataprovider/htmldataprovider.hxx sc/source/ui/dbgui/PivotLayoutDialog.cxx -sc/source/ui/dbgui/PivotLayoutTreeList.cxx sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx sc/source/ui/dbgui/PivotLayoutTreeListData.cxx sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx @@ -9814,7 +9746,6 @@ sc/source/ui/drawfunc/graphsh.cxx sc/source/ui/drawfunc/mediash.cxx sc/source/ui/drawfunc/oleobjsh.cxx sc/source/ui/formdlg/dwfunctr.cxx -sc/source/ui/formdlg/formdata.cxx sc/source/ui/formdlg/formula.cxx sc/source/ui/inc/AccessibilityHints.hxx sc/source/ui/inc/AccessibleCell.hxx @@ -9822,7 +9753,6 @@ sc/source/ui/inc/AccessibleCellBase.hxx sc/source/ui/inc/AccessibleContextBase.hxx sc/source/ui/inc/AccessibleCsvControl.hxx sc/source/ui/inc/AccessibleDocument.hxx -sc/source/ui/inc/AccessibleDocumentBase.hxx sc/source/ui/inc/AccessibleDocumentPagePreview.hxx sc/source/ui/inc/AccessibleEditObject.hxx sc/source/ui/inc/AccessiblePageHeader.hxx @@ -9843,12 +9773,9 @@ sc/source/ui/inc/DescriptiveStatisticsDialog.hxx sc/source/ui/inc/DrawModelBroadcaster.hxx sc/source/ui/inc/ExponentialSmoothingDialog.hxx sc/source/ui/inc/FTestDialog.hxx -sc/source/ui/inc/IAnyRefDialog.hxx sc/source/ui/inc/MatrixComparisonGenerator.hxx sc/source/ui/inc/MovingAverageDialog.hxx sc/source/ui/inc/PivotLayoutDialog.hxx -sc/source/ui/inc/PivotLayoutTreeListBase.hxx -sc/source/ui/inc/PivotLayoutTreeListLabel.hxx sc/source/ui/inc/RandomNumberGeneratorDialog.hxx sc/source/ui/inc/RegressionDialog.hxx sc/source/ui/inc/SamplingDialog.hxx @@ -9862,20 +9789,17 @@ sc/source/ui/inc/anyrefdg.hxx sc/source/ui/inc/areasave.hxx sc/source/ui/inc/areasdlg.hxx sc/source/ui/inc/asciiopt.hxx -sc/source/ui/inc/attrdlg.hxx sc/source/ui/inc/autofmt.hxx sc/source/ui/inc/autostyl.hxx sc/source/ui/inc/cbutton.hxx sc/source/ui/inc/cellmergeoption.hxx sc/source/ui/inc/cellsh.hxx -sc/source/ui/inc/chartsh.hxx sc/source/ui/inc/checklistmenu.hxx sc/source/ui/inc/client.hxx sc/source/ui/inc/cliputil.hxx sc/source/ui/inc/colrowba.hxx sc/source/ui/inc/condformatdlg.hxx sc/source/ui/inc/condformatdlgentry.hxx -sc/source/ui/inc/condformatdlgitem.hxx sc/source/ui/inc/condformathelper.hxx sc/source/ui/inc/condformatmgr.hxx sc/source/ui/inc/condformatuno.hxx @@ -9888,17 +9812,13 @@ sc/source/ui/inc/csvgrid.hxx sc/source/ui/inc/csvruler.hxx sc/source/ui/inc/csvsplits.hxx sc/source/ui/inc/csvtablebox.hxx -sc/source/ui/inc/dapitype.hxx sc/source/ui/inc/datafdlg.hxx sc/source/ui/inc/dataprovider.hxx -sc/source/ui/inc/dataproviderdlg.hxx sc/source/ui/inc/datastream.hxx -sc/source/ui/inc/datastreamdlg.hxx sc/source/ui/inc/datatransformation.hxx sc/source/ui/inc/dbdocfun.hxx sc/source/ui/inc/dbfunc.hxx sc/source/ui/inc/dbnamdlg.hxx -sc/source/ui/inc/delcodlg.hxx sc/source/ui/inc/docfunc.hxx sc/source/ui/inc/docfuncutil.hxx sc/source/ui/inc/docsh.hxx @@ -9924,7 +9844,6 @@ sc/source/ui/inc/fuconpol.hxx sc/source/ui/inc/fuconrec.hxx sc/source/ui/inc/fuconstr.hxx sc/source/ui/inc/fuconuno.hxx -sc/source/ui/inc/fudraw.hxx sc/source/ui/inc/fuinsert.hxx sc/source/ui/inc/fupoor.hxx sc/source/ui/inc/fusel.hxx @@ -9948,8 +9867,6 @@ sc/source/ui/inc/lnktrans.hxx sc/source/ui/inc/msgpool.hxx sc/source/ui/inc/mtrindlg.hxx sc/source/ui/inc/mvtabdlg.hxx -sc/source/ui/inc/namedefdlg.hxx -sc/source/ui/inc/namedlg.hxx sc/source/ui/inc/namemgrtable.hxx sc/source/ui/inc/navcitem.hxx sc/source/ui/inc/navipi.hxx @@ -9969,12 +9886,10 @@ sc/source/ui/inc/preview.hxx sc/source/ui/inc/prevloc.hxx sc/source/ui/inc/prevwsh.hxx sc/source/ui/inc/printfun.hxx -sc/source/ui/inc/protectiondlg.hxx sc/source/ui/inc/pvfundlg.hxx sc/source/ui/inc/redcom.hxx sc/source/ui/inc/reffact.hxx sc/source/ui/inc/refundo.hxx -sc/source/ui/inc/retypepassdlg.hxx sc/source/ui/inc/rfindlst.hxx sc/source/ui/inc/scendlg.hxx sc/source/ui/inc/scui_def.hxx @@ -9988,14 +9903,12 @@ sc/source/ui/inc/selectionstate.hxx sc/source/ui/inc/seltrans.hxx sc/source/ui/inc/servobj.hxx sc/source/ui/inc/sharedocdlg.hxx -sc/source/ui/inc/shtabdlg.hxx sc/source/ui/inc/simpref.hxx sc/source/ui/inc/sizedev.hxx sc/source/ui/inc/solveroptions.hxx sc/source/ui/inc/solverutil.hxx sc/source/ui/inc/solvrdlg.hxx sc/source/ui/inc/sortdlg.hxx -sc/source/ui/inc/sortkeydlg.hxx sc/source/ui/inc/spelldialog.hxx sc/source/ui/inc/spelleng.hxx sc/source/ui/inc/spellparam.hxx @@ -10010,11 +9923,9 @@ sc/source/ui/inc/tabview.hxx sc/source/ui/inc/tabvwsh.hxx sc/source/ui/inc/target.hxx sc/source/ui/inc/tbzoomsliderctrl.hxx -sc/source/ui/inc/textdlgs.hxx sc/source/ui/inc/tpcalc.hxx sc/source/ui/inc/tpcompatibility.hxx sc/source/ui/inc/tpdefaults.hxx -sc/source/ui/inc/tpformula.hxx sc/source/ui/inc/tphf.hxx sc/source/ui/inc/tphfedit.hxx sc/source/ui/inc/tpprint.hxx @@ -10026,11 +9937,9 @@ sc/source/ui/inc/tpusrlst.hxx sc/source/ui/inc/tpview.hxx sc/source/ui/inc/transobj.hxx sc/source/ui/inc/uiitems.hxx -sc/source/ui/inc/uiobject.hxx sc/source/ui/inc/undobase.hxx sc/source/ui/inc/undoblk.hxx sc/source/ui/inc/undocell.hxx -sc/source/ui/inc/undoconvert.hxx sc/source/ui/inc/undodat.hxx sc/source/ui/inc/undodraw.hxx sc/source/ui/inc/undoolk.hxx @@ -10046,33 +9955,24 @@ sc/source/ui/miscdlgs/acredlin.cxx sc/source/ui/miscdlgs/anyrefdg.cxx sc/source/ui/miscdlgs/autofmt.cxx sc/source/ui/miscdlgs/conflictsdlg.cxx -sc/source/ui/miscdlgs/crdlg.cxx sc/source/ui/miscdlgs/crnrdlg.cxx sc/source/ui/miscdlgs/datafdlg.cxx sc/source/ui/miscdlgs/dataproviderdlg.cxx -sc/source/ui/miscdlgs/datastreamdlg.cxx sc/source/ui/miscdlgs/datatableview.cxx -sc/source/ui/miscdlgs/delcldlg.cxx sc/source/ui/miscdlgs/delcodlg.cxx sc/source/ui/miscdlgs/filldlg.cxx sc/source/ui/miscdlgs/groupdlg.cxx sc/source/ui/miscdlgs/highred.cxx -sc/source/ui/miscdlgs/inscldlg.cxx sc/source/ui/miscdlgs/inscodlg.cxx sc/source/ui/miscdlgs/instbdlg.cxx sc/source/ui/miscdlgs/lbseldlg.cxx sc/source/ui/miscdlgs/linkarea.cxx -sc/source/ui/miscdlgs/mergecellsdialog.cxx sc/source/ui/miscdlgs/mtrindlg.cxx -sc/source/ui/miscdlgs/mvtabdlg.cxx -sc/source/ui/miscdlgs/namecrea.cxx sc/source/ui/miscdlgs/optsolver.cxx sc/source/ui/miscdlgs/protectiondlg.cxx sc/source/ui/miscdlgs/redcom.cxx -sc/source/ui/miscdlgs/retypepassdlg.cxx sc/source/ui/miscdlgs/scuiautofmt.cxx sc/source/ui/miscdlgs/sharedocdlg.cxx -sc/source/ui/miscdlgs/shtabdlg.cxx sc/source/ui/miscdlgs/simpref.cxx sc/source/ui/miscdlgs/solveroptions.cxx sc/source/ui/miscdlgs/solverutil.cxx @@ -10081,11 +9981,8 @@ sc/source/ui/miscdlgs/strindlg.cxx sc/source/ui/miscdlgs/tabbgcolordlg.cxx sc/source/ui/miscdlgs/tabopdlg.cxx sc/source/ui/miscdlgs/textdlgs.cxx -sc/source/ui/miscdlgs/warnbox.cxx sc/source/ui/namedlg/namedefdlg.cxx sc/source/ui/namedlg/namedlg.cxx -sc/source/ui/namedlg/namemgrtable.cxx -sc/source/ui/namedlg/namepast.cxx sc/source/ui/navipi/content.cxx sc/source/ui/navipi/navcitem.cxx sc/source/ui/navipi/navipi.cxx @@ -10112,7 +10009,6 @@ sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx sc/source/ui/sidebar/CellBorderStyleControl.cxx sc/source/ui/sidebar/CellLineStyleControl.cxx sc/source/ui/sidebar/CellLineStyleValueSet.cxx -sc/source/ui/sidebar/CellLineStyleValueSet.hxx sc/source/ui/sidebar/NumberFormatControl.cxx sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx @@ -10122,7 +10018,6 @@ sc/source/ui/styleui/styledlg.cxx sc/source/ui/uitest/uiobject.cxx sc/source/ui/undo/areasave.cxx sc/source/ui/undo/refundo.cxx -sc/source/ui/undo/target.cxx sc/source/ui/undo/undobase.cxx sc/source/ui/undo/undoblk.cxx sc/source/ui/undo/undoblk2.cxx @@ -10132,7 +10027,6 @@ sc/source/ui/undo/undocell2.cxx sc/source/ui/undo/undoconvert.cxx sc/source/ui/undo/undodat.cxx sc/source/ui/undo/undodraw.cxx -sc/source/ui/undo/undoolk.cxx sc/source/ui/undo/undorangename.cxx sc/source/ui/undo/undosort.cxx sc/source/ui/undo/undostyl.cxx @@ -10157,7 +10051,6 @@ sc/source/ui/unoobj/chart2uno.cxx sc/source/ui/unoobj/chartuno.cxx sc/source/ui/unoobj/condformatuno.cxx sc/source/ui/unoobj/confuno.cxx -sc/source/ui/unoobj/convuno.cxx sc/source/ui/unoobj/cursuno.cxx sc/source/ui/unoobj/dapiuno.cxx sc/source/ui/unoobj/datauno.cxx @@ -10168,14 +10061,12 @@ sc/source/ui/unoobj/drdefuno.cxx sc/source/ui/unoobj/editsrc.cxx sc/source/ui/unoobj/eventuno.cxx sc/source/ui/unoobj/exceldetect.cxx -sc/source/ui/unoobj/exceldetect.hxx sc/source/ui/unoobj/fielduno.cxx sc/source/ui/unoobj/filtuno.cxx sc/source/ui/unoobj/fmtuno.cxx sc/source/ui/unoobj/forbiuno.cxx sc/source/ui/unoobj/funcuno.cxx sc/source/ui/unoobj/linkuno.cxx -sc/source/ui/unoobj/listenercalls.cxx sc/source/ui/unoobj/miscuno.cxx sc/source/ui/unoobj/nameuno.cxx sc/source/ui/unoobj/notesuno.cxx @@ -10223,7 +10114,6 @@ sc/source/ui/vba/vbacomment.cxx sc/source/ui/vba/vbacomment.hxx sc/source/ui/vba/vbacomments.cxx sc/source/ui/vba/vbacomments.hxx -sc/source/ui/vba/vbacondition.cxx sc/source/ui/vba/vbacondition.hxx sc/source/ui/vba/vbadialog.cxx sc/source/ui/vba/vbadialog.hxx @@ -10236,7 +10126,6 @@ sc/source/ui/vba/vbafiledialog.hxx sc/source/ui/vba/vbafiledialogitems.cxx sc/source/ui/vba/vbafiledialogitems.hxx sc/source/ui/vba/vbafont.cxx -sc/source/ui/vba/vbafont.hxx sc/source/ui/vba/vbaformat.cxx sc/source/ui/vba/vbaformat.hxx sc/source/ui/vba/vbaformatcondition.cxx @@ -10272,7 +10161,6 @@ sc/source/ui/vba/vbanames.hxx sc/source/ui/vba/vbaoleobject.cxx sc/source/ui/vba/vbaoleobject.hxx sc/source/ui/vba/vbaoleobjects.cxx -sc/source/ui/vba/vbaoleobjects.hxx sc/source/ui/vba/vbaoutline.cxx sc/source/ui/vba/vbaoutline.hxx sc/source/ui/vba/vbaovalshape.cxx @@ -10280,9 +10168,7 @@ sc/source/ui/vba/vbaovalshape.hxx sc/source/ui/vba/vbapagebreak.cxx sc/source/ui/vba/vbapagebreak.hxx sc/source/ui/vba/vbapagebreaks.cxx -sc/source/ui/vba/vbapagebreaks.hxx sc/source/ui/vba/vbapagesetup.cxx -sc/source/ui/vba/vbapagesetup.hxx sc/source/ui/vba/vbapalette.cxx sc/source/ui/vba/vbapalette.hxx sc/source/ui/vba/vbapane.cxx @@ -10290,7 +10176,6 @@ sc/source/ui/vba/vbapane.hxx sc/source/ui/vba/vbapivotcache.cxx sc/source/ui/vba/vbapivotcache.hxx sc/source/ui/vba/vbapivottable.cxx -sc/source/ui/vba/vbapivottable.hxx sc/source/ui/vba/vbapivottables.cxx sc/source/ui/vba/vbapivottables.hxx sc/source/ui/vba/vbarange.cxx @@ -10306,7 +10191,6 @@ sc/source/ui/vba/vbastyles.hxx sc/source/ui/vba/vbatextboxshape.cxx sc/source/ui/vba/vbatextboxshape.hxx sc/source/ui/vba/vbatextframe.cxx -sc/source/ui/vba/vbatextframe.hxx sc/source/ui/vba/vbatitle.hxx sc/source/ui/vba/vbavalidation.cxx sc/source/ui/vba/vbavalidation.hxx @@ -10336,7 +10220,6 @@ sc/source/ui/view/colrowba.cxx sc/source/ui/view/dbfunc.cxx sc/source/ui/view/dbfunc2.cxx sc/source/ui/view/dbfunc3.cxx -sc/source/ui/view/dbfunc4.cxx sc/source/ui/view/drawutil.cxx sc/source/ui/view/drawvie3.cxx sc/source/ui/view/drawvie4.cxx @@ -10362,7 +10245,6 @@ sc/source/ui/view/output2.cxx sc/source/ui/view/output3.cxx sc/source/ui/view/overlayobject.cxx sc/source/ui/view/pfuncache.cxx -sc/source/ui/view/pgbrksh.cxx sc/source/ui/view/pivotsh.cxx sc/source/ui/view/preview.cxx sc/source/ui/view/prevloc.cxx @@ -10393,7 +10275,6 @@ sc/source/ui/view/tabvwsh9.cxx sc/source/ui/view/tabvwsha.cxx sc/source/ui/view/tabvwshb.cxx sc/source/ui/view/tabvwshc.cxx -sc/source/ui/view/tabvwshd.cxx sc/source/ui/view/tabvwshe.cxx sc/source/ui/view/tabvwshf.cxx sc/source/ui/view/tabvwshg.cxx @@ -10415,7 +10296,6 @@ scaddins/source/analysis/analysisdefs.hxx scaddins/source/analysis/analysishelper.cxx scaddins/source/analysis/analysishelper.hxx scaddins/source/analysis/bessel.cxx -scaddins/source/analysis/bessel.hxx scaddins/source/analysis/deffuncname.hxx scaddins/source/analysis/financial.cxx scaddins/source/datefunc/datefunc.cxx |