summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-04 11:57:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-05 06:40:10 +0000
commit3d6c84f2d9683b23c14fa5bf50ca4425cf4ceb04 (patch)
treebc18d71a94b1a9015d45155ad79179e61e6aa3c0 /sc
parentcedbc4031f26ea13b188a4ecc5b90cc9646095fb (diff)
loplugin:constantparam
Change-Id: I1996319e5b664dff95f7a9b2346aea6092d333ec Reviewed-on: https://gerrit.libreoffice.org/36070 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/address.hxx5
-rw-r--r--sc/inc/attrib.hxx6
-rw-r--r--sc/inc/defaultsoptions.hxx3
-rw-r--r--sc/inc/formulaopt.hxx3
-rw-r--r--sc/inc/printopt.hxx3
-rw-r--r--sc/inc/viewopti.hxx4
-rw-r--r--sc/qa/unit/ucalc_formula.cxx4
-rw-r--r--sc/source/core/data/docpool.cxx2
-rw-r--r--sc/source/core/tool/defaultsoptions.cxx11
-rw-r--r--sc/source/core/tool/formulaopt.cxx5
-rw-r--r--sc/source/core/tool/printopt.cxx5
-rw-r--r--sc/source/core/tool/viewopti.cxx4
-rw-r--r--sc/source/filter/inc/connectionsbuffer.hxx2
-rw-r--r--sc/source/filter/inc/formulabase.hxx14
-rw-r--r--sc/source/filter/inc/pivotcachebuffer.hxx2
-rw-r--r--sc/source/filter/inc/richstring.hxx11
-rw-r--r--sc/source/filter/oox/commentsbuffer.cxx2
-rw-r--r--sc/source/filter/oox/connectionsbuffer.cxx4
-rw-r--r--sc/source/filter/oox/defnamesbuffer.cxx6
-rw-r--r--sc/source/filter/oox/formulabase.cxx18
-rw-r--r--sc/source/filter/oox/formulaparser.cxx8
-rw-r--r--sc/source/filter/oox/pivotcachebuffer.cxx5
-rw-r--r--sc/source/filter/oox/richstring.cxx7
-rw-r--r--sc/source/ui/app/scmod.cxx8
-rw-r--r--sc/source/ui/inc/acredlin.hxx8
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx32
-rw-r--r--sc/source/ui/optdlg/tpdefaults.cxx2
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx2
-rw-r--r--sc/source/ui/optdlg/tpprint.cxx2
-rw-r--r--sc/source/ui/optdlg/tpview.cxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx12
-rw-r--r--sc/source/ui/view/tabvwshc.cxx3
32 files changed, 95 insertions, 110 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 5f394983c016..0a489ae0d44a 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -776,10 +776,9 @@ public:
ScRefAddress() :
bRelCol(false), bRelRow(false), bRelTab(false)
{}
- ScRefAddress( SCCOL nCol, SCROW nRow, SCTAB nTab,
- bool bRelColP, bool bRelRowP, bool bRelTabP ) :
+ ScRefAddress( SCCOL nCol, SCROW nRow, SCTAB nTab ) :
aAdr(nCol, nRow, nTab),
- bRelCol(bRelColP), bRelRow(bRelRowP), bRelTab(bRelTabP)
+ bRelCol(false), bRelRow(false), bRelTab(false)
{}
ScRefAddress( const ScRefAddress& rRef ) :
aAdr(rRef.aAdr), bRelCol(rRef.bRelCol), bRelRow(rRef.bRelRow),
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index fddb8f44cbf8..414fdcdd3987 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -192,7 +192,7 @@ inline ScRangeItem& ScRangeItem::operator=( const ScRangeItem &rCpy )
class ScTableListItem : public SfxPoolItem
{
public:
- inline ScTableListItem( const sal_uInt16 nWhich );
+ ScTableListItem();
ScTableListItem( const ScTableListItem& rCpy );
virtual ~ScTableListItem() override;
@@ -212,10 +212,6 @@ public:
std::unique_ptr<SCTAB[]> pTabArr;
};
-inline ScTableListItem::ScTableListItem( const sal_uInt16 nWhichP )
- : SfxPoolItem(nWhichP), nCount(0), pTabArr(nullptr)
-{}
-
// page format item: contents of header and footer
#define SC_HF_LEFTAREA 1
diff --git a/sc/inc/defaultsoptions.hxx b/sc/inc/defaultsoptions.hxx
index b0d58ef277a3..be0e8c110a7a 100644
--- a/sc/inc/defaultsoptions.hxx
+++ b/sc/inc/defaultsoptions.hxx
@@ -44,8 +44,7 @@ public:
class SC_DLLPUBLIC ScTpDefaultsItem : public SfxPoolItem
{
public:
- ScTpDefaultsItem( sal_uInt16 nWhich,
- const ScDefaultsOptions& rOpt );
+ ScTpDefaultsItem( const ScDefaultsOptions& rOpt );
ScTpDefaultsItem( const ScTpDefaultsItem& rItem );
virtual ~ScTpDefaultsItem() override;
diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx
index ea5cca40fefa..d4dd5762f067 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -83,8 +83,7 @@ public:
class SC_DLLPUBLIC ScTpFormulaItem : public SfxPoolItem
{
public:
- ScTpFormulaItem( sal_uInt16 nWhich,
- const ScFormulaOptions& rOpt );
+ ScTpFormulaItem( const ScFormulaOptions& rOpt );
ScTpFormulaItem( const ScTpFormulaItem& rItem );
virtual ~ScTpFormulaItem() override;
diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx
index 7e6fe5e143b8..5510b68c0b77 100644
--- a/sc/inc/printopt.hxx
+++ b/sc/inc/printopt.hxx
@@ -54,8 +54,7 @@ public:
class SC_DLLPUBLIC ScTpPrintItem : public SfxPoolItem
{
public:
- ScTpPrintItem( sal_uInt16 nWhich,
- const ScPrintOptions& rOpt );
+ ScTpPrintItem( const ScPrintOptions& rOpt );
ScTpPrintItem( const ScTpPrintItem& rItem );
virtual ~ScTpPrintItem() override;
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index c5dfd1afa208..0d64499a8901 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -110,12 +110,12 @@ private:
ScGridOptions aGridOpt;
};
-// Item for the options dialoge - View
+// Item for the options dialog - View
class SC_DLLPUBLIC ScTpViewItem : public SfxPoolItem
{
public:
- ScTpViewItem( sal_uInt16 nWhich, const ScViewOptions& rOpt );
+ ScTpViewItem( const ScViewOptions& rOpt );
ScTpViewItem( const ScTpViewItem& rItem );
virtual ~ScTpViewItem() override;
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 81e2f2121185..a3ad3c082289 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -3507,9 +3507,9 @@ void Test::testMultipleOperations()
// Set multiple operations range.
ScTabOpParam aParam;
- aParam.aRefFormulaCell = ScRefAddress(1,0,0,false,false,false);
+ aParam.aRefFormulaCell = ScRefAddress(1,0,0);
aParam.aRefFormulaEnd = aParam.aRefFormulaCell;
- aParam.aRefColCell = ScRefAddress(0,0,0,false,false,false);
+ aParam.aRefColCell = ScRefAddress(0,0,0);
ScMarkData aMark;
aMark.SetMarkArea(ScRange(0,2,0,1,4,0)); // Select A3:B5.
m_pDoc->InsertTableOp(aParam, 0, 2, 1, 4, aMark);
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 49759cf3a778..858e761e01cf 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -317,7 +317,7 @@ ScDocumentPool::ScDocumentPool()
rPoolDefaults[ ATTR_PAGE_PRINTAREA - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_PRINTAREA );
rPoolDefaults[ ATTR_PAGE_REPEATROW - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_REPEATROW );
rPoolDefaults[ ATTR_PAGE_REPEATCOL - ATTR_STARTINDEX ] = new ScRangeItem( ATTR_PAGE_REPEATCOL );
- rPoolDefaults[ ATTR_PAGE_PRINTTABLES- ATTR_STARTINDEX ] = new ScTableListItem( ATTR_PAGE_PRINTTABLES );
+ rPoolDefaults[ ATTR_PAGE_PRINTTABLES- ATTR_STARTINDEX ] = new ScTableListItem;
rPoolDefaults[ ATTR_PAGE_HEADERLEFT - ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_HEADERLEFT );
rPoolDefaults[ ATTR_PAGE_FOOTERLEFT - ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_FOOTERLEFT );
rPoolDefaults[ ATTR_PAGE_HEADERRIGHT- ATTR_STARTINDEX ] = new ScPageHFItem( ATTR_PAGE_HEADERRIGHT );
diff --git a/sc/source/core/tool/defaultsoptions.cxx b/sc/source/core/tool/defaultsoptions.cxx
index 2ae74582030d..e49516f65610 100644
--- a/sc/source/core/tool/defaultsoptions.cxx
+++ b/sc/source/core/tool/defaultsoptions.cxx
@@ -13,7 +13,10 @@
#include "defaultsoptions.hxx"
#include "miscuno.hxx"
#include "global.hxx"
+#include "attrib.hxx"
+#include "scitems.hxx"
#include "globstr.hrc"
+#include "sc.hrc"
using namespace utl;
using namespace com::sun::star::uno;
@@ -54,8 +57,12 @@ bool ScDefaultsOptions::operator==( const ScDefaultsOptions& rOpt ) const
&& rOpt.aInitTabPrefix == aInitTabPrefix;
}
-ScTpDefaultsItem::ScTpDefaultsItem( sal_uInt16 nWhichP, const ScDefaultsOptions& rOpt ) :
- SfxPoolItem ( nWhichP ),
+ScTableListItem::ScTableListItem()
+ : SfxPoolItem(ATTR_PAGE_PRINTTABLES), nCount(0), pTabArr(nullptr)
+{}
+
+ScTpDefaultsItem::ScTpDefaultsItem( const ScDefaultsOptions& rOpt ) :
+ SfxPoolItem ( SID_SCDEFAULTSOPTIONS ),
theOptions ( rOpt )
{
}
diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx
index fd1d456fc5e2..62fc4034543d 100644
--- a/sc/source/core/tool/formulaopt.cxx
+++ b/sc/source/core/tool/formulaopt.cxx
@@ -15,6 +15,7 @@
#include "miscuno.hxx"
#include "global.hxx"
#include "formulagroup.hxx"
+#include "sc.hrc"
using namespace utl;
using namespace com::sun::star::uno;
@@ -147,8 +148,8 @@ bool ScFormulaOptions::operator!=( const ScFormulaOptions& rOpt ) const
return !(operator==(rOpt));
}
-ScTpFormulaItem::ScTpFormulaItem( sal_uInt16 nWhichP, const ScFormulaOptions& rOpt ) :
- SfxPoolItem ( nWhichP ),
+ScTpFormulaItem::ScTpFormulaItem( const ScFormulaOptions& rOpt ) :
+ SfxPoolItem ( SID_SCFORMULAOPTIONS ),
theOptions ( rOpt )
{
}
diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx
index a42df78042a2..ade54c635b30 100644
--- a/sc/source/core/tool/printopt.cxx
+++ b/sc/source/core/tool/printopt.cxx
@@ -23,6 +23,7 @@
#include "printopt.hxx"
#include "miscuno.hxx"
+#include "sc.hrc"
using namespace utl;
using namespace com::sun::star::uno;
@@ -66,8 +67,8 @@ bool ScPrintOptions::operator==( const ScPrintOptions& rOpt ) const
&& bForceBreaks == rOpt.bForceBreaks;
}
-ScTpPrintItem::ScTpPrintItem( sal_uInt16 nWhichP, const ScPrintOptions& rOpt ) :
- SfxPoolItem ( nWhichP ),
+ScTpPrintItem::ScTpPrintItem( const ScPrintOptions& rOpt ) :
+ SfxPoolItem ( SID_SCPRINTOPTIONS ),
theOptions ( rOpt )
{
}
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index b94f6afec640..7da2ef077958 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -193,8 +193,8 @@ SvxGridItem* ScViewOptions::CreateGridItem() const
// ScTpViewItem - data for the ViewOptions TabPage
-ScTpViewItem::ScTpViewItem( sal_uInt16 nWhichP, const ScViewOptions& rOpt )
- : SfxPoolItem ( nWhichP ),
+ScTpViewItem::ScTpViewItem( const ScViewOptions& rOpt )
+ : SfxPoolItem ( SID_SCVIEWOPTIONS ),
theOptions ( rOpt )
{
}
diff --git a/sc/source/filter/inc/connectionsbuffer.hxx b/sc/source/filter/inc/connectionsbuffer.hxx
index 3c29cc33d05d..eaa473551fc2 100644
--- a/sc/source/filter/inc/connectionsbuffer.hxx
+++ b/sc/source/filter/inc/connectionsbuffer.hxx
@@ -93,7 +93,7 @@ struct ConnectionModel
class Connection : public WorkbookHelper
{
public:
- explicit Connection( const WorkbookHelper& rHelper, sal_Int32 nConnId = -1 );
+ explicit Connection( const WorkbookHelper& rHelper );
/** Imports connection settings from the connection element. */
void importConnection( const AttributeList& rAttribs );
diff --git a/sc/source/filter/inc/formulabase.hxx b/sc/source/filter/inc/formulabase.hxx
index ba5440cc7679..d207559a2d66 100644
--- a/sc/source/filter/inc/formulabase.hxx
+++ b/sc/source/filter/inc/formulabase.hxx
@@ -673,6 +673,7 @@ public:
extractReference( const ApiTokenSequence& rTokens ) const;
/** Tries to extract a cell range address from a formula token sequence.
+ Only real absolute references will be accepted.
@param orAddress (output parameter) If the token sequence is valid,
this parameter will contain the extracted cell range address. If
@@ -683,19 +684,15 @@ public:
one cell range address token. The token sequence may contain
whitespace tokens.
- @param bAllowRelative True = it is allowed that rTokens contains
- relative references (based on cell A1 of the current sheet).
- False = only real absolute references will be accepted.
-
@return True, if the token sequence contains a valid cell range
address which has been extracted to orRange, false otherwise.
*/
bool extractCellRange(
ScRange& orRange,
- const ApiTokenSequence& rTokens,
- bool bAllowRelative ) const;
+ const ApiTokenSequence& rTokens ) const;
/** Tries to extract a cell range list from a formula token sequence.
+ Only real absolute references will be accepted.
@param orRanges (output parameter) If the token sequence is valid,
this parameter will contain the extracted cell range list. Deleted
@@ -708,10 +705,6 @@ public:
standard function parameter separator token. The token sequence may
contain parentheses and whitespace tokens.
- @param bAllowRelative True = it is allowed that rTokens contains
- relative references (based on cell A1 of the current sheet).
- False = only real absolute references will be accepted.
-
@param nFilterBySheet If non-negative, this function returns only cell
ranges located in the specified sheet, otherwise returns all cell
ranges contained in the token sequence.
@@ -719,7 +712,6 @@ public:
void extractCellRangeList(
ScRangeList& orRanges,
const ApiTokenSequence& rTokens,
- bool bAllowRelative,
sal_Int32 nFilterBySheet ) const;
/** Tries to extract a string from a formula token sequence.
diff --git a/sc/source/filter/inc/pivotcachebuffer.hxx b/sc/source/filter/inc/pivotcachebuffer.hxx
index a3012f4c37fb..33317d0c2f05 100644
--- a/sc/source/filter/inc/pivotcachebuffer.hxx
+++ b/sc/source/filter/inc/pivotcachebuffer.hxx
@@ -361,7 +361,7 @@ public:
void importPCDSheetSource( SequenceInputStream& rStrm, const ::oox::core::Relations& rRelations );
/** Creates and returns a new pivot cache field. */
- PivotCacheField& createCacheField( bool bInitDatabaseField = false );
+ PivotCacheField& createCacheField();
/** Checks validity of source data and creates a dummy data sheet for external sheet sources. */
void finalizeImport();
diff --git a/sc/source/filter/inc/richstring.hxx b/sc/source/filter/inc/richstring.hxx
index bb62d2e40a5c..4be4a1fce142 100644
--- a/sc/source/filter/inc/richstring.hxx
+++ b/sc/source/filter/inc/richstring.hxx
@@ -85,8 +85,7 @@ struct FontPortionModel
sal_Int32 mnFontId; /// Font identifier for the next characters.
explicit FontPortionModel() : mnPos( 0 ), mnFontId( -1 ) {}
- explicit FontPortionModel( sal_Int32 nPos, sal_Int32 nFontId ) :
- mnPos( nPos ), mnFontId( nFontId ) {}
+ explicit FontPortionModel( sal_Int32 nPos ) : mnPos( nPos ), mnFontId( -1 ) {}
void read( SequenceInputStream& rStrm );
};
@@ -232,12 +231,10 @@ public:
OUString& orString,
const oox::xls::Font* pFirstPortionFont ) const;
- /** Converts the string and writes it into the passed XText.
+ /** Converts the string and writes it into the passed XText, replace old contents of the text object,.
@param rxText The XText interface of the target object.
- @param bReplaceOld True = replace old contents of the text object. */
- void convert(
- const css::uno::Reference< css::text::XText >& rxText,
- bool bReplaceOld ) const;
+ */
+ void convert( const css::uno::Reference< css::text::XText >& rxText ) const;
::EditTextObject* convert( ScEditEngineDefaulter& rEE, const oox::xls::Font* pFont ) const;
private:
diff --git a/sc/source/filter/oox/commentsbuffer.cxx b/sc/source/filter/oox/commentsbuffer.cxx
index ae719868b0a9..b76d8e2ddcfa 100644
--- a/sc/source/filter/oox/commentsbuffer.cxx
+++ b/sc/source/filter/oox/commentsbuffer.cxx
@@ -171,7 +171,7 @@ void Comment::finalizeImport()
// insert text and convert text formatting
maModel.mxText->finalizeImport();
Reference< XText > xAnnoText( xAnnoShape, UNO_QUERY_THROW );
- maModel.mxText->convert( xAnnoText, true );
+ maModel.mxText->convert( xAnnoText );
}
catch( Exception& )
{
diff --git a/sc/source/filter/oox/connectionsbuffer.cxx b/sc/source/filter/oox/connectionsbuffer.cxx
index 81e3497c4b47..c90d9ba408ba 100644
--- a/sc/source/filter/oox/connectionsbuffer.cxx
+++ b/sc/source/filter/oox/connectionsbuffer.cxx
@@ -104,10 +104,10 @@ WebPrModel& ConnectionModel::createWebPr()
return *mxWebPr;
}
-Connection::Connection( const WorkbookHelper& rHelper, sal_Int32 nConnId ) :
+Connection::Connection( const WorkbookHelper& rHelper ) :
WorkbookHelper( rHelper )
{
- maModel.mnId = nConnId;
+ maModel.mnId = -1;
}
void Connection::importConnection( const AttributeList& rAttribs )
diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx
index 0004f5a90719..b681921c592d 100644
--- a/sc/source/filter/oox/defnamesbuffer.cxx
+++ b/sc/source/filter/oox/defnamesbuffer.cxx
@@ -360,7 +360,7 @@ void DefinedName::convertFormula( const css::uno::Sequence<css::sheet::ExternalL
{
Reference< XPrintAreas > xPrintAreas( getSheetFromDoc( mnCalcSheet ), UNO_QUERY );
ScRangeList aPrintRanges;
- getFormulaParser().extractCellRangeList( aPrintRanges, aFTokenSeq, false, mnCalcSheet );
+ getFormulaParser().extractCellRangeList( aPrintRanges, aFTokenSeq, mnCalcSheet );
if( xPrintAreas.is() && !aPrintRanges.empty() )
xPrintAreas->setPrintAreas( AddressConverter::toApiSequence(aPrintRanges) );
}
@@ -369,7 +369,7 @@ void DefinedName::convertFormula( const css::uno::Sequence<css::sheet::ExternalL
{
Reference< XPrintAreas > xPrintAreas( getSheetFromDoc( mnCalcSheet ), UNO_QUERY );
ScRangeList aTitleRanges;
- getFormulaParser().extractCellRangeList( aTitleRanges, aFTokenSeq, false, mnCalcSheet );
+ getFormulaParser().extractCellRangeList( aTitleRanges, aFTokenSeq, mnCalcSheet );
if( xPrintAreas.is() && !aTitleRanges.empty() )
{
bool bHasRowTitles = false;
@@ -408,7 +408,7 @@ bool DefinedName::getAbsoluteRange( ScRange& orRange ) const
ScTokenArray* pTokenArray = mpScRangeData->GetCode();
Sequence< FormulaToken > aFTokenSeq;
ScTokenConversion::ConvertToTokenSequence(getScDocument(), aFTokenSeq, *pTokenArray);
- return getFormulaParser().extractCellRange( orRange, aFTokenSeq, false );
+ return getFormulaParser().extractCellRange( orRange, aFTokenSeq );
}
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index 3c675367b77c..4a2821cc1a1c 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -1481,13 +1481,13 @@ bool lclConvertToCellRange( ScRange& orRange, const ComplexReference& rComplexRe
enum TokenToRangeListState { STATE_REF, STATE_SEP, STATE_OPEN, STATE_CLOSE, STATE_ERROR };
-TokenToRangeListState lclProcessRef( ScRangeList& orRanges, const Any& rData, bool bAllowRelative, sal_Int32 nFilterBySheet )
+TokenToRangeListState lclProcessRef( ScRangeList& orRanges, const Any& rData, sal_Int32 nFilterBySheet )
{
using namespace ::com::sun::star::sheet::ReferenceFlags;
- const sal_Int32 FORBIDDEN_FLAGS_DEL = COLUMN_DELETED | ROW_DELETED | SHEET_DELETED;
- const sal_Int32 FORBIDDEN_FLAGS_REL = FORBIDDEN_FLAGS_DEL | COLUMN_RELATIVE | ROW_RELATIVE | SHEET_RELATIVE | RELATIVE_NAME;
+ const sal_Int32 FORBIDDEN_FLAGS_REL = COLUMN_DELETED | ROW_DELETED | SHEET_DELETED |
+ COLUMN_RELATIVE | ROW_RELATIVE | SHEET_RELATIVE | RELATIVE_NAME;
- sal_Int32 nForbiddenFlags = bAllowRelative ? FORBIDDEN_FLAGS_DEL : FORBIDDEN_FLAGS_REL;
+ sal_Int32 nForbiddenFlags = FORBIDDEN_FLAGS_REL;
SingleReference aSingleRef;
if( rData >>= aSingleRef )
{
@@ -1599,10 +1599,10 @@ Any FormulaProcessorBase::extractReference( const ApiTokenSequence& rTokens ) co
}
bool FormulaProcessorBase::extractCellRange( ScRange& orRange,
- const ApiTokenSequence& rTokens, bool bAllowRelative ) const
+ const ApiTokenSequence& rTokens ) const
{
ScRangeList aRanges;
- lclProcessRef( aRanges, extractReference( rTokens ), bAllowRelative, -1 );
+ lclProcessRef( aRanges, extractReference( rTokens ), -1 );
if( !aRanges.empty() )
{
orRange = *aRanges.front();
@@ -1612,7 +1612,7 @@ bool FormulaProcessorBase::extractCellRange( ScRange& orRange,
}
void FormulaProcessorBase::extractCellRangeList( ScRangeList& orRanges,
- const ApiTokenSequence& rTokens, bool bAllowRelative, sal_Int32 nFilterBySheet ) const
+ const ApiTokenSequence& rTokens, sal_Int32 nFilterBySheet ) const
{
orRanges.RemoveAll();
TokenToRangeListState eState = STATE_OPEN;
@@ -1630,7 +1630,7 @@ void FormulaProcessorBase::extractCellRangeList( ScRangeList& orRanges,
else eState = STATE_ERROR;
break;
case STATE_SEP:
- if( nOpCode == OPCODE_PUSH ) eState = lclProcessRef( orRanges, aIt->Data, bAllowRelative, nFilterBySheet );
+ if( nOpCode == OPCODE_PUSH ) eState = lclProcessRef( orRanges, aIt->Data, nFilterBySheet );
else if( nOpCode == OPCODE_SEP ) eState = STATE_SEP;
else if( nOpCode == OPCODE_LIST ) eState = STATE_SEP;
else if( nOpCode == OPCODE_OPEN ) eState = lclProcessOpen( nParenLevel );
@@ -1638,7 +1638,7 @@ void FormulaProcessorBase::extractCellRangeList( ScRangeList& orRanges,
else eState = STATE_ERROR;
break;
case STATE_OPEN:
- if( nOpCode == OPCODE_PUSH ) eState = lclProcessRef( orRanges, aIt->Data, bAllowRelative, nFilterBySheet );
+ if( nOpCode == OPCODE_PUSH ) eState = lclProcessRef( orRanges, aIt->Data, nFilterBySheet );
else if( nOpCode == OPCODE_SEP ) eState = STATE_SEP;
else if( nOpCode == OPCODE_LIST ) eState = STATE_SEP;
else if( nOpCode == OPCODE_OPEN ) eState = lclProcessOpen( nParenLevel );
diff --git a/sc/source/filter/oox/formulaparser.cxx b/sc/source/filter/oox/formulaparser.cxx
index b94cd73b0221..c7d163eaba1c 100644
--- a/sc/source/filter/oox/formulaparser.cxx
+++ b/sc/source/filter/oox/formulaparser.cxx
@@ -498,7 +498,7 @@ protected:
bool pushExternalFuncOperand( const FunctionInfo& rFuncInfo );
bool pushDdeLinkOperand( const OUString& rDdeServer, const OUString& rDdeTopic, const OUString& rDdeItem );
bool pushExternalNameOperand( const ExternalNameRef& rxExtName, const ExternalLink& rExtLink );
- bool pushSpecialTokenOperand( const BinAddress& rBaseAddr, bool bTable );
+ bool pushSpecialTokenOperand( const BinAddress& rBaseAddr );
bool pushUnaryPreOperator( sal_Int32 nOpCode );
bool pushUnaryPostOperator( sal_Int32 nOpCode );
@@ -1005,10 +1005,10 @@ bool FormulaParserImpl::pushExternalNameOperand( const ExternalNameRef& rxExtNam
return pushBiffErrorOperand( BIFF_ERR_NAME );
}
-bool FormulaParserImpl::pushSpecialTokenOperand( const BinAddress& rBaseAddr, bool bTable )
+bool FormulaParserImpl::pushSpecialTokenOperand( const BinAddress& rBaseAddr )
{
CellAddress aBaseAddr( maBaseAddr.Tab(), rBaseAddr.mnCol, rBaseAddr.mnRow );
- ApiSpecialTokenInfo aTokenInfo( aBaseAddr, bTable );
+ ApiSpecialTokenInfo aTokenInfo( aBaseAddr, false );
return mbSpecialTokens && (getFormulaSize() == 0) && pushValueOperand( aTokenInfo, OPCODE_BAD );
}
@@ -1681,7 +1681,7 @@ bool OoxFormulaParserImpl::importExpToken( SequenceInputStream& rStrm )
swapStreamPosition( rStrm );
aBaseAddr.mnCol = rStrm.readInt32();
swapStreamPosition( rStrm );
- return pushSpecialTokenOperand( aBaseAddr, false );
+ return pushSpecialTokenOperand( aBaseAddr );
}
LinkSheetRange OoxFormulaParserImpl::readSheetRange( SequenceInputStream& rStrm )
diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx
index 088a6a6d1478..93677c03329a 100644
--- a/sc/source/filter/oox/pivotcachebuffer.cxx
+++ b/sc/source/filter/oox/pivotcachebuffer.cxx
@@ -957,10 +957,9 @@ void PivotCache::importPCDSheetSource( SequenceInputStream& rStrm, const Relatio
maTargetUrl = rRelations.getExternalTargetFromRelId( maSheetSrcModel.maRelId );
}
-PivotCacheField& PivotCache::createCacheField( bool bInitDatabaseField )
+PivotCacheField& PivotCache::createCacheField()
{
- bool bIsDatabaseField = !bInitDatabaseField;
- PivotCacheFieldVector::value_type xCacheField( new PivotCacheField( *this, bIsDatabaseField ) );
+ PivotCacheFieldVector::value_type xCacheField( new PivotCacheField( *this, true/*bIsDatabaseField*/ ) );
maFields.push_back( xCacheField );
return *xCacheField;
}
diff --git a/sc/source/filter/oox/richstring.cxx b/sc/source/filter/oox/richstring.cxx
index f88297f800d5..e4c114b3af26 100644
--- a/sc/source/filter/oox/richstring.cxx
+++ b/sc/source/filter/oox/richstring.cxx
@@ -370,7 +370,7 @@ bool RichString::extractPlainString( OUString& orString, const oox::xls::Font* p
return false;
}
-void RichString::convert( const Reference< XText >& rxText, bool bReplaceOld ) const
+void RichString::convert( const Reference< XText >& rxText ) const
{
if (maTextPortions.size() == 1)
{
@@ -382,6 +382,7 @@ void RichString::convert( const Reference< XText >& rxText, bool bReplaceOld ) c
return;
}
+ bool bReplaceOld = true;
for( PortionVector::const_iterator aIt = maTextPortions.begin(), aEnd = maTextPortions.end(); aIt != aEnd; ++aIt )
{
(*aIt)->convert( rxText, bReplaceOld );
@@ -435,9 +436,9 @@ void RichString::createTextPortions( const OUString& rText, FontPortionModelList
sal_Int32 nStrLen = rText.getLength();
// add leading and trailing string position to ease the following loop
if( rPortions.empty() || (rPortions.front().mnPos > 0) )
- rPortions.insert( rPortions.begin(), FontPortionModel( 0, -1 ) );
+ rPortions.insert( rPortions.begin(), FontPortionModel( 0 ) );
if( rPortions.back().mnPos < nStrLen )
- rPortions.push_back( FontPortionModel( nStrLen, -1 ) );
+ rPortions.push_back( FontPortionModel( nStrLen ) );
// create all string portions according to the font id vector
for( ::std::vector< FontPortionModel >::const_iterator aIt = rPortions.begin(); aIt->mnPos < nStrLen; ++aIt )
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 580c34ac906c..c25910d55dc0 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1983,7 +1983,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
pRet->Put( ScTpCalcItem( SID_SCDOCOPTIONS, aCalcOpt ) );
// TP_VIEW
- pRet->Put( ScTpViewItem( SID_SCVIEWOPTIONS, aViewOpt ) );
+ pRet->Put( ScTpViewItem( aViewOpt ) );
pRet->Put( SfxBoolItem( SID_SC_OPT_SYNCZOOM, rAppOpt.GetSynchronizeZoom() ) );
// TP_INPUT
@@ -2011,7 +2011,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
rInpOpt.GetLegacyCellSelection() ) );
// RID_SC_TP_PRINT
- pRet->Put( ScTpPrintItem( SID_SCPRINTOPTIONS, GetPrintOptions() ) );
+ pRet->Put( ScTpPrintItem( GetPrintOptions() ) );
// TP_GRID
SvxGridItem* pSvxGridItem = aViewOpt.CreateGridItem();
@@ -2030,7 +2030,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
rAppOpt.GetKeyBindingType() ) );
// TP_DEFAULTS
- pRet->Put( ScTpDefaultsItem( SID_SCDEFAULTSOPTIONS, GetDefaultsOptions() ) );
+ pRet->Put( ScTpDefaultsItem( GetDefaultsOptions() ) );
// TP_FORMULA
ScFormulaOptions aOptions = GetFormulaOptions();
@@ -2040,7 +2040,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
aConfig.MergeDocumentSpecific( pDocSh->GetDocument().GetCalcConfig());
aOptions.SetCalcConfig( aConfig);
}
- pRet->Put( ScTpFormulaItem( SID_SCFORMULAOPTIONS, aOptions ) );
+ pRet->Put( ScTpFormulaItem( aOptions ) );
}
return pRet;
}
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index f4bead09c04b..90525c51f356 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -119,15 +119,15 @@ protected:
OUString* MakeTypeString(ScChangeActionType eType);
- SvTreeListEntry* InsertChangeAction(
+ SvTreeListEntry* AppendChangeAction(
const ScChangeAction* pScChangeAction,ScChangeActionState eState,
SvTreeListEntry* pParent=nullptr,bool bDelMaster = false,
- bool bDisabled = false,sal_uLong nPos = TREELIST_APPEND);
+ bool bDisabled = false);
- SvTreeListEntry* InsertFilteredAction(
+ SvTreeListEntry* AppendFilteredAction(
const ScChangeAction* pScChangeAction,ScChangeActionState eState,
SvTreeListEntry* pParent = nullptr,bool bDelMaster = false,
- bool bDisabled = false, sal_uLong nPos = TREELIST_APPEND);
+ bool bDisabled = false);
SvTreeListEntry* InsertChangeActionContent(const ScChangeActionContent* pScChangeAction,
SvTreeListEntry* pParent,sal_uLong nSpecial);
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 36825bfdfb86..307d7527d706 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -361,9 +361,9 @@ bool ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
return bFlag;
}
-SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction(
+SvTreeListEntry* ScAcceptChgDlg::AppendChangeAction(
const ScChangeAction* pScChangeAction, ScChangeActionState /*eState*/,
- SvTreeListEntry* pParent, bool bDelMaster,bool bDisabled, sal_uLong nPos)
+ SvTreeListEntry* pParent, bool bDelMaster,bool bDisabled)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
@@ -486,12 +486,12 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction(
if(!bFlag&& bUseColor&& pParent==nullptr)
{
pEntry = pTheView->InsertEntry(
- aBuf.makeStringAndClear() ,pNewData, Color(COL_LIGHTBLUE), pParent, nPos);
+ aBuf.makeStringAndClear() ,pNewData, Color(COL_LIGHTBLUE), pParent, TREELIST_APPEND);
}
else if(bFlag&& bUseColor&& pParent!=nullptr)
{
pEntry = pTheView->InsertEntry(
- aBuf.makeStringAndClear(), pNewData, Color(COL_GREEN), pParent, nPos);
+ aBuf.makeStringAndClear(), pNewData, Color(COL_GREEN), pParent, TREELIST_APPEND);
SvTreeListEntry* pExpEntry=pParent;
while(pExpEntry!=nullptr && !pTheView->IsExpanded(pExpEntry))
@@ -506,14 +506,14 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction(
else
{
pEntry = pTheView->InsertEntry(
- aBuf.makeStringAndClear(), pNewData, pParent, nPos);
+ aBuf.makeStringAndClear(), pNewData, pParent, TREELIST_APPEND);
}
return pEntry;
}
-SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction(
+SvTreeListEntry* ScAcceptChgDlg::AppendFilteredAction(
const ScChangeAction* pScChangeAction, ScChangeActionState eState,
- SvTreeListEntry* pParent, bool bDelMaster, bool bDisabled, sal_uLong nPos)
+ SvTreeListEntry* pParent, bool bDelMaster, bool bDisabled)
{
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
@@ -626,7 +626,7 @@ SvTreeListEntry* ScAcceptChgDlg::InsertFilteredAction(
if (pTheView->IsValidComment(aComment))
{
aString+=aComment;
- pEntry=pTheView->InsertEntry(aString,pNewData,pParent,nPos);
+ pEntry=pTheView->InsertEntry(aString,pNewData,pParent,TREELIST_APPEND);
}
else
delete pNewData;
@@ -784,9 +784,9 @@ void ScAcceptChgDlg::UpdateView()
if(pScChangeAction->IsDialogRoot())
{
if(pScChangeAction->IsDialogParent())
- pParent=InsertChangeAction(pScChangeAction,SC_CAS_VIRGIN);
+ pParent=AppendChangeAction(pScChangeAction,SC_CAS_VIRGIN);
else
- pParent=InsertFilteredAction(pScChangeAction,SC_CAS_VIRGIN);
+ pParent=AppendFilteredAction(pScChangeAction,SC_CAS_VIRGIN);
}
else
pParent=nullptr;
@@ -1217,7 +1217,7 @@ bool ScAcceptChgDlg::InsertAcceptedORejected(SvTreeListEntry* pParent)
while(pScChangeAction!=nullptr)
{
if(pScChangeAction->GetState()==eState &&
- InsertFilteredAction(pScChangeAction,eState,pParent)!=nullptr)
+ AppendFilteredAction(pScChangeAction,eState,pParent)!=nullptr)
bTheTestFlag=false;
pScChangeAction=pScChangeAction->GetNext();
}
@@ -1232,7 +1232,7 @@ bool ScAcceptChgDlg::InsertChildren(ScChangeActionMap* pActionMap,SvTreeListEntr
for( itChangeAction = pActionMap->begin(); itChangeAction != pActionMap->end(); ++itChangeAction )
{
- SvTreeListEntry* pEntry=InsertChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, false, true );
+ SvTreeListEntry* pEntry=AppendChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, false, true );
if(pEntry!=nullptr)
{
@@ -1262,9 +1262,9 @@ bool ScAcceptChgDlg::InsertDeletedChildren(const ScChangeAction* pScChangeAction
{
if( pScChangeAction != itChangeAction->second )
- pEntry = InsertChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, false, true );
+ pEntry = AppendChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, false, true );
else
- pEntry = InsertChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, true, true );
+ pEntry = AppendChangeAction( itChangeAction->second, SC_CAS_VIRGIN, pParent, true, true );
if(pEntry!=nullptr)
{
@@ -1414,9 +1414,9 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartActio
if(pScChangeAction->IsDialogRoot())
{
if(pScChangeAction->IsDialogParent())
- pParent=InsertChangeAction(pScChangeAction,SC_CAS_VIRGIN);
+ pParent=AppendChangeAction(pScChangeAction,SC_CAS_VIRGIN);
else
- pParent=InsertFilteredAction(pScChangeAction,SC_CAS_VIRGIN);
+ pParent=AppendFilteredAction(pScChangeAction,SC_CAS_VIRGIN);
}
else
pParent=nullptr;
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx
index 4f9d10a7f1ad..bcc26d5aa5e9 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -59,7 +59,7 @@ bool ScTpDefaultsOptions::FillItemSet(SfxItemSet *rCoreSet)
aOpt.SetInitTabCount( nTabCount );
aOpt.SetInitTabPrefix( aSheetPrefix );
- rCoreSet->Put( ScTpDefaultsItem( SID_SCDEFAULTSOPTIONS, aOpt ) );
+ rCoreSet->Put( ScTpDefaultsItem( aOpt ) );
bRet = true;
}
return bRet;
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 5d5a7859716e..3cb64e4244b8 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -292,7 +292,7 @@ bool ScTpFormulaOptions::FillItemSet(SfxItemSet* rCoreSet)
aOpt.SetODFRecalcOptions(eODFRecalc);
aOpt.SetWriteCalcConfig( maCurrentDocOptions.IsWriteCalcConfig());
- rCoreSet->Put( ScTpFormulaItem( SID_SCFORMULAOPTIONS, aOpt ) );
+ rCoreSet->Put( ScTpFormulaItem( aOpt ) );
rCoreSet->Put( ScTpCalcItem( SID_SCDOCOPTIONS, maCurrentDocOptions ) );
bRet = true;
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index bb0b8830c6d9..0e9e574dcd85 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -109,7 +109,7 @@ bool ScTpPrintOptions::FillItemSet( SfxItemSet* rCoreAttrs )
aOpt.SetSkipEmpty( m_pSkipEmptyPagesCB->IsChecked() );
aOpt.SetAllSheets( !m_pSelectedSheetsCB->IsChecked() );
aOpt.SetForceBreaks( m_pForceBreaksCB->IsChecked() );
- rCoreAttrs->Put( ScTpPrintItem( SID_SCPRINTOPTIONS, aOpt ) );
+ rCoreAttrs->Put( ScTpPrintItem( aOpt ) );
if ( bSelectedSheetsChanged )
{
rCoreAttrs->Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, m_pSelectedSheetsCB->IsChecked() ) );
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 986f9d2dd06d..07a262c31340 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -154,7 +154,7 @@ bool ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet )
{
NamedColor aNamedColor = pColorLB->GetSelectEntry();
pLocalOptions->SetGridColor(aNamedColor.first, aNamedColor.second);
- rCoreSet->Put(ScTpViewItem(SID_SCVIEWOPTIONS, *pLocalOptions));
+ rCoreSet->Put(ScTpViewItem(*pLocalOptions));
bRet = true;
}
if(pRangeFindCB->IsValueChangedFromSaved())
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 6a4f61012ba9..3342deada578 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -5235,17 +5235,13 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress&
bool bError = false;
ScTabOpParam aParam;
aParam.aRefFormulaCell = ScRefAddress( (SCCOL)aFormulaRange.StartColumn,
- (SCROW)aFormulaRange.StartRow, aFormulaRange.Sheet,
- false, false, false );
+ (SCROW)aFormulaRange.StartRow, aFormulaRange.Sheet );
aParam.aRefFormulaEnd = ScRefAddress( (SCCOL)aFormulaRange.EndColumn,
- (SCROW)aFormulaRange.EndRow, aFormulaRange.Sheet,
- false, false, false );
+ (SCROW)aFormulaRange.EndRow, aFormulaRange.Sheet );
aParam.aRefRowCell = ScRefAddress( (SCCOL)aRowCell.Column,
- (SCROW)aRowCell.Row, aRowCell.Sheet,
- false, false, false );
+ (SCROW)aRowCell.Row, aRowCell.Sheet );
aParam.aRefColCell = ScRefAddress( (SCCOL)aColumnCell.Column,
- (SCROW)aColumnCell.Row, aColumnCell.Sheet,
- false, false, false );
+ (SCROW)aColumnCell.Row, aColumnCell.Sheet );
switch (nMode)
{
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index b3f4c1a078e9..5ac562612ed3 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -308,8 +308,7 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
ScViewData& rViewData = GetViewData();
ScRefAddress aCurPos ( rViewData.GetCurX(),
rViewData.GetCurY(),
- rViewData.GetTabNo(),
- false, false, false );
+ rViewData.GetTabNo());
pResult = VclPtr<ScTabOpDlg>::Create( pB, pCW, pParent, rViewData.GetDocument(), aCurPos );
}