summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-22 15:56:13 +0200
committerNoel Grandin <noel@peralex.com>2016-03-23 09:13:14 +0200
commit26012ae8f65ca16e584b3688b0f1f9e76e97db84 (patch)
tree6c16a437f7aabbc36b60d162b0899cb2c657229e /sc/source/ui
parent50b39947cb23ec6a9de3845da4aea9ae53fd3cfa (diff)
loplugin:constantparam in sc
Change-Id: I437367b8c6960db730a69c020ba82792a9170d01
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx6
-rw-r--r--sc/source/ui/app/inputhdl.cxx115
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx13
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx7
-rw-r--r--sc/source/ui/cctrl/cbuttonw.cxx5
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx4
-rw-r--r--sc/source/ui/cctrl/editfield.cxx4
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeList.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx7
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx5
-rw-r--r--sc/source/ui/docshell/docfunc.cxx54
-rw-r--r--sc/source/ui/docshell/docsh2.cxx2
-rw-r--r--sc/source/ui/docshell/docsh3.cxx4
-rw-r--r--sc/source/ui/docshell/docsh5.cxx2
-rw-r--r--sc/source/ui/docshell/docsh6.cxx51
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx8
-rw-r--r--sc/source/ui/docshell/impex.cxx4
-rw-r--r--sc/source/ui/inc/TableFillingAndNavigationTools.hxx2
-rw-r--r--sc/source/ui/inc/cbutton.hxx5
-rw-r--r--sc/source/ui/inc/checklistmenu.hxx2
-rw-r--r--sc/source/ui/inc/crdlg.hxx2
-rw-r--r--sc/source/ui/inc/dbdocfun.hxx5
-rw-r--r--sc/source/ui/inc/dbfunc.hxx2
-rw-r--r--sc/source/ui/inc/docfunc.hxx24
-rw-r--r--sc/source/ui/inc/docsh.hxx2
-rw-r--r--sc/source/ui/inc/editfield.hxx3
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/inc/inputhdl.hxx2
-rw-r--r--sc/source/ui/inc/olinewin.hxx4
-rw-r--r--sc/source/ui/inc/tabview.hxx2
-rw-r--r--sc/source/ui/inc/undobase.hxx3
-rw-r--r--sc/source/ui/inc/undocell.hxx2
-rw-r--r--sc/source/ui/inc/undodat.hxx3
-rw-r--r--sc/source/ui/inc/viewdata.hxx5
-rw-r--r--sc/source/ui/inc/viewfunc.hxx15
-rw-r--r--sc/source/ui/inc/warnbox.hxx5
-rw-r--r--sc/source/ui/miscdlgs/crdlg.cxx7
-rw-r--r--sc/source/ui/miscdlgs/warnbox.cxx6
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx2
-rw-r--r--sc/source/ui/undo/undobase.cxx4
-rw-r--r--sc/source/ui/undo/undoblk.cxx2
-rw-r--r--sc/source/ui/undo/undoblk2.cxx2
-rw-r--r--sc/source/ui/undo/undocell.cxx8
-rw-r--r--sc/source/ui/undo/undodat.cxx5
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx26
-rw-r--r--sc/source/ui/unoobj/datauno.cxx4
-rw-r--r--sc/source/ui/unoobj/docuno.cxx4
-rw-r--r--sc/source/ui/unoobj/textuno.cxx6
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx4
-rw-r--r--sc/source/ui/vba/vbarange.cxx8
-rw-r--r--sc/source/ui/vba/vbarange.hxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx1
-rw-r--r--sc/source/ui/view/cellsh3.cxx2
-rw-r--r--sc/source/ui/view/dbfunc.cxx2
-rw-r--r--sc/source/ui/view/dbfunc3.cxx4
-rw-r--r--sc/source/ui/view/gridwin.cxx215
-rw-r--r--sc/source/ui/view/gridwin2.cxx6
-rw-r--r--sc/source/ui/view/gridwin4.cxx2
-rw-r--r--sc/source/ui/view/olinewin.cxx8
-rw-r--r--sc/source/ui/view/printfun.cxx2
-rw-r--r--sc/source/ui/view/tabview.cxx26
-rw-r--r--sc/source/ui/view/viewdata.cxx34
-rw-r--r--sc/source/ui/view/viewfun2.cxx22
-rw-r--r--sc/source/ui/view/viewfun3.cxx44
-rw-r--r--sc/source/ui/view/viewfunc.cxx23
66 files changed, 355 insertions, 511 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 5ff874ef21bf..0ff33178fa42 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -1436,7 +1436,7 @@ SvxTextForwarder* ScAccessibleHeaderTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, true );
+ ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool );
pHdrEngine->EnableUndo( false );
pHdrEngine->SetRefMapMode( MAP_TWIP );
diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
index 96c004061ee9..d6b7d361988a 100644
--- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
+++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
@@ -90,11 +90,11 @@ void FormulaTemplate::applyNumber(const OUString& aVariable, sal_Int32 aValue)
mTemplate = mTemplate.replaceAll(aVariable, OUString::number(aValue));
}
-AddressWalker::AddressWalker(ScAddress aInitialAddress, bool aTrackRange) :
+AddressWalker::AddressWalker(ScAddress aInitialAddress) :
mCurrentAddress(aInitialAddress),
mMinimumAddress(aInitialAddress),
mMaximumAddress(aInitialAddress),
- mTrackRange(aTrackRange)
+ mTrackRange(true)
{
mAddressStack.push_back(mCurrentAddress);
}
@@ -157,7 +157,7 @@ void AddressWalker::push(SCCOL aRelativeCol, SCROW aRelativeRow, SCTAB aRelative
AddressWalkerWriter::AddressWalkerWriter(ScAddress aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument,
formula::FormulaGrammar::Grammar eGrammar ) :
- AddressWalker(aInitialAddress, true),
+ AddressWalker(aInitialAddress),
mpDocShell(pDocShell),
mpDocument(pDocument),
meGrammar(eGrammar)
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 5e0814b4b901..b8db1ee885b6 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2891,7 +2891,7 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
if ( bOldMod && pExecuteSh && pCellAttrs && !bForget )
{
// Combine with input?
- pExecuteSh->ApplySelectionPattern( *pCellAttrs, true, true );
+ pExecuteSh->ApplySelectionPattern( *pCellAttrs, true );
pExecuteSh->AdjustBlockHeight();
}
@@ -3424,7 +3424,7 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false
return bUsed;
}
-void ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce )
+void ScInputHandler::InputCommand( const CommandEvent& rCEvt )
{
if ( rCEvt.GetCommand() == CommandEventId::CursorPos )
{
@@ -3458,77 +3458,74 @@ void ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce )
}
else
{
- if ( bForce || eMode != SC_INPUT_NONE )
+ if (!bOptLoaded)
{
- if (!bOptLoaded)
- {
- bAutoComplete = SC_MOD()->GetAppOptions().GetAutoComplete();
- bOptLoaded = true;
- }
+ bAutoComplete = SC_MOD()->GetAppOptions().GetAutoComplete();
+ bOptLoaded = true;
+ }
- HideTip();
- HideTipBelow();
+ HideTip();
+ HideTipBelow();
- if ( bSelIsRef )
- {
- RemoveSelection();
- bSelIsRef = false;
- }
+ if ( bSelIsRef )
+ {
+ RemoveSelection();
+ bSelIsRef = false;
+ }
- UpdateActiveView();
- bool bNewView = DataChanging( 0, true );
+ UpdateActiveView();
+ bool bNewView = DataChanging( 0, true );
- if (!bProtected) // changes allowed
+ if (!bProtected) // changes allowed
+ {
+ if (bNewView) // create new edit view
{
- if (bNewView) // create new edit view
- {
- if (pActiveViewSh)
- pActiveViewSh->GetViewData().GetDocShell()->PostEditView( pEngine, aCursorPos );
- UpdateActiveView();
- if (eMode==SC_INPUT_NONE)
- if (pTableView || pTopView)
+ if (pActiveViewSh)
+ pActiveViewSh->GetViewData().GetDocShell()->PostEditView( pEngine, aCursorPos );
+ UpdateActiveView();
+ if (eMode==SC_INPUT_NONE)
+ if (pTableView || pTopView)
+ {
+ OUString aStrLoP;
+ if (pTableView)
{
- OUString aStrLoP;
- if (pTableView)
- {
- pTableView->GetEditEngine()->SetText( aStrLoP );
- pTableView->SetSelection( ESelection(0,0, 0,0) );
- }
- if (pTopView)
- {
- pTopView->GetEditEngine()->SetText( aStrLoP );
- pTopView->SetSelection( ESelection(0,0, 0,0) );
- }
+ pTableView->GetEditEngine()->SetText( aStrLoP );
+ pTableView->SetSelection( ESelection(0,0, 0,0) );
}
- SyncViews();
- }
+ if (pTopView)
+ {
+ pTopView->GetEditEngine()->SetText( aStrLoP );
+ pTopView->SetSelection( ESelection(0,0, 0,0) );
+ }
+ }
+ SyncViews();
+ }
- if (pTableView || pTopView)
- {
- if (pTableView)
- pTableView->Command( rCEvt );
- if (pTopView)
- pTopView->Command( rCEvt );
+ if (pTableView || pTopView)
+ {
+ if (pTableView)
+ pTableView->Command( rCEvt );
+ if (pTopView)
+ pTopView->Command( rCEvt );
- if ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput )
- {
- // AutoInput after ext text input
+ if ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput )
+ {
+ // AutoInput after ext text input
- if (pFormulaData)
- miAutoPosFormula = pFormulaData->end();
- if (pColumnData)
- miAutoPosColumn = pColumnData->end();
+ if (pFormulaData)
+ miAutoPosFormula = pFormulaData->end();
+ if (pColumnData)
+ miAutoPosColumn = pColumnData->end();
- if (bFormulaMode)
- UseFormulaData();
- else
- UseColData();
- }
+ if (bFormulaMode)
+ UseFormulaData();
+ else
+ UseColData();
}
-
- DataChanged(); // calls UpdateParenthesis()
- InvalidateAttribs(); //! in DataChanged ?
}
+
+ DataChanged(); // calls UpdateParenthesis()
+ InvalidateAttribs(); //! in DataChanged ?
}
if (pTopView && eMode != SC_INPUT_NONE)
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index a77889463cff..9f6b7958a026 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -714,10 +714,9 @@ AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( vc
}
AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( vcl::Window* pParent,
- bool bUnGroup,
- bool bRows )
+ bool bUnGroup )
{
- VclPtr<ScGroupDlg> pDlg = VclPtr<ScGroupDlg>::Create( pParent, bUnGroup, bRows);
+ VclPtr<ScGroupDlg> pDlg = VclPtr<ScGroupDlg>::Create( pParent, bUnGroup, true/*bRows*/);
return new AbstractScGroupDlg_Impl( pDlg );
}
@@ -741,10 +740,9 @@ AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( v
}
AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( vcl::Window* pParent,
- InsertDeleteFlags nCheckDefaults,
const OUString* pStrTitle )
{
- VclPtr<ScInsertContentsDlg> pDlg = VclPtr<ScInsertContentsDlg>::Create(pParent, nCheckDefaults, pStrTitle);
+ VclPtr<ScInsertContentsDlg> pDlg = VclPtr<ScInsertContentsDlg>::Create(pParent, InsertDeleteFlags::NONE, pStrTitle);
return new AbstractScInsertContentsDlg_Impl( pDlg );
}
@@ -823,10 +821,9 @@ AbstractScDPSubtotalDlg * ScAbstractDialogFactory_Impl::CreateScDPSubtotalDlg (
ScDPObject& rDPObj,
const ScDPLabelData& rLabelData,
const ScPivotFuncData& rFuncData,
- const ScDPNameVec& rDataFields,
- bool bEnableLayout )
+ const ScDPNameVec& rDataFields )
{
- VclPtr<ScDPSubtotalDlg> pDlg = VclPtr<ScDPSubtotalDlg>::Create( pParent, rDPObj, rLabelData, rFuncData, rDataFields, bEnableLayout );
+ VclPtr<ScDPSubtotalDlg> pDlg = VclPtr<ScDPSubtotalDlg>::Create( pParent, rDPObj, rLabelData, rFuncData, rDataFields, true/*bEnableLayout*/ );
return new AbstractScDPSubtotalDlg_Impl( pDlg );
}
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 9c459527f20f..7a84d7366b0b 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -437,15 +437,13 @@ public:
double fMax,
sal_uInt16 nPossDir) override;
virtual AbstractScGroupDlg * CreateAbstractScGroupDlg( vcl::Window* pParent,
- bool bUnGroup = false,
- bool bRows = true) override;
+ bool bUnGroup = false) override;
virtual AbstractScInsertCellDlg * CreateScInsertCellDlg( vcl::Window* pParent,
int nId,
bool bDisallowCellMove = false ) override;
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( vcl::Window* pParent,
- InsertDeleteFlags nCheckDefaults = InsertDeleteFlags::NONE,
const OUString* pStrTitle = nullptr ) override;
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(vcl::Window* pParent, ScViewData& rViewData,
@@ -487,8 +485,7 @@ public:
ScDPObject& rDPObj,
const ScDPLabelData& rLabelData,
const ScPivotFuncData& rFuncData,
- const ScDPNameVec& rDataFields,
- bool bEnableLayout ) override;
+ const ScDPNameVec& rDataFields ) override;
virtual AbstractScDPNumGroupDlg * CreateScDPNumGroupDlg( vcl::Window* pParent,
int nId,
diff --git a/sc/source/ui/cctrl/cbuttonw.cxx b/sc/source/ui/cctrl/cbuttonw.cxx
index 436aa4ecd426..ad22426020e5 100644
--- a/sc/source/ui/cctrl/cbuttonw.cxx
+++ b/sc/source/ui/cctrl/cbuttonw.cxx
@@ -49,8 +49,7 @@ void ScDDComboBoxButton::SetOptSizePixel()
}
void ScDDComboBoxButton::Draw( const Point& rAt,
- const Size& rSize,
- bool bState )
+ const Size& rSize )
{
if ( rSize.Width() == 0 || rSize.Height() == 0 )
return;
@@ -82,7 +81,7 @@ void ScDDComboBoxButton::Draw( const Point& rAt,
aInnerRect.Top() = aInnerCenter.Y() - (aInnerSize.Width()>>1);
aInnerRect.Bottom()= aInnerCenter.Y() + (aInnerSize.Width()>>1);
- ImpDrawArrow( aInnerRect, bState );
+ ImpDrawArrow( aInnerRect, false/*bState*/ );
// restore old state
pOut->EnableMapMode( bOldEnable );
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 88d466932696..be5f3563dfd3 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -294,11 +294,11 @@ Reference<XAccessible> ScMenuFloatingWindow::CreateAccessible()
return mxAccessible;
}
-void ScMenuFloatingWindow::addMenuItem(const OUString& rText, bool bEnabled, Action* pAction)
+void ScMenuFloatingWindow::addMenuItem(const OUString& rText, Action* pAction)
{
MenuItemData aItem;
aItem.maText = rText;
- aItem.mbEnabled = bEnabled;
+ aItem.mbEnabled = true;
aItem.mpAction.reset(pAction);
maMenuItems.push_back(aItem);
}
diff --git a/sc/source/ui/cctrl/editfield.cxx b/sc/source/ui/cctrl/editfield.cxx
index 13419e8a91b4..ea8f112a83d6 100644
--- a/sc/source/ui/cctrl/editfield.cxx
+++ b/sc/source/ui/cctrl/editfield.cxx
@@ -66,10 +66,10 @@ bool ScDoubleField::GetValue( double& rfValue ) const
return bOk;
}
-void ScDoubleField::SetValue( double fValue, sal_Int32 nDecPlaces, bool bEraseTrailingDecZeros )
+void ScDoubleField::SetValue( double fValue, sal_Int32 nDecPlaces )
{
SetText( ::rtl::math::doubleToUString( fValue, rtl_math_StringFormat_G,
- nDecPlaces, lclGetDecSep(), bEraseTrailingDecZeros ) );
+ nDecPlaces, lclGetDecSep(), true/*bEraseTrailingDecZeros*/ ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx
index a4173e9cadca..c53590d73db2 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeList.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeList.cxx
@@ -57,7 +57,7 @@ bool ScPivotLayoutTreeList::DoubleClickHdl()
mpParent->PushDataFieldNames(aDataFieldNames);
std::unique_ptr<AbstractScDPSubtotalDlg> pDialog(
- pFactory->CreateScDPSubtotalDlg(this, mpParent->maPivotTableObject, rCurrentLabelData, rCurrentFunctionData, aDataFieldNames, true));
+ pFactory->CreateScDPSubtotalDlg(this, mpParent->maPivotTableObject, rCurrentLabelData, rCurrentFunctionData, aDataFieldNames));
if (pDialog->Execute() == RET_OK)
{
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index d3c7553bcb89..05ea76a84449 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -277,13 +277,14 @@ void ScDBDocFunc::ModifyAllDBData( const ScDBCollection& rNewColl, const std::ve
}
}
-bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bRecord, bool bApi, bool bIsUnnamed, SCTAB aTab )
+bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bApi, bool bIsUnnamed, SCTAB aTab )
{
//! auch fuer ScDBFunc::RepeatDB benutzen!
bool bDone = false;
ScDocument& rDoc = rDocShell.GetDocument();
- if (bRecord && !rDoc.IsUndoEnabled())
+ bool bRecord = true;
+ if (!rDoc.IsUndoEnabled())
bRecord = false;
ScDBData* pDBData = nullptr;
if (bIsUnnamed)
@@ -1627,7 +1628,7 @@ void ScDBDocFunc::UpdateImport( const OUString& rTarget, const svx::ODataAccessD
aImportParam.nType = static_cast<sal_uInt8>( ( nCommandType == sdb::CommandType::QUERY ) ? ScDbQuery : ScDbTable );
aImportParam.bImport = true;
- bool bContinue = DoImport( nTab, aImportParam, &rDescriptor, true );
+ bool bContinue = DoImport( nTab, aImportParam, &rDescriptor );
// DB-Operationen wiederholen
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index e05b81fd14b9..52cb9ed931d9 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -116,13 +116,14 @@ bool ScDBDocFunc::DoImportUno( const ScAddress& rPos,
}
bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
- const svx::ODataAccessDescriptor* pDescriptor, bool bRecord )
+ const svx::ODataAccessDescriptor* pDescriptor )
{
ScDocument& rDoc = rDocShell.GetDocument();
ScChangeTrack *pChangeTrack = nullptr;
ScRange aChangedRange;
- if (bRecord && !rDoc.IsUndoEnabled())
+ bool bRecord = true;
+ if (!rDoc.IsUndoEnabled())
bRecord = false;
ScDBData* pDBData = rDoc.GetDBAtArea( nTab, rParam.nCol1, rParam.nRow1,
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index c61141a34d8c..81e7caa26d8d 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -645,7 +645,7 @@ bool ScDocFunc::DeleteContents(
}
bool ScDocFunc::DeleteCell(
- const ScAddress& rPos, const ScMarkData& rMark, InsertDeleteFlags nFlags, bool bRecord, bool bApi )
+ const ScAddress& rPos, const ScMarkData& rMark, InsertDeleteFlags nFlags, bool bRecord )
{
ScDocShellModificator aModificator(rDocShell);
@@ -657,8 +657,7 @@ bool ScDocFunc::DeleteCell(
ScEditableTester aTester(&rDoc, rPos.Col(), rPos.Row(), rPos.Col(), rPos.Row(), rMark);
if (!aTester.IsEditable())
{
- if (!bApi)
- rDocShell.ErrorMessage(aTester.GetMessageId());
+ rDocShell.ErrorMessage(aTester.GetMessageId());
return false;
}
@@ -713,11 +712,12 @@ bool ScDocFunc::DeleteCell(
}
bool ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
- bool bRecord, bool bApi )
+ bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument& rDoc = rDocShell.GetDocument();
+ bool bRecord = true;
if (bRecord && !rDoc.IsUndoEnabled())
bRecord = false;
@@ -1146,7 +1146,7 @@ void ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
ScMarkData aMark;
aMark.SelectTable( rPos.Tab(), true );
aMark.SetMarkArea( ScRange( rPos ) );
- ApplyAttributes( aMark, aPattern, true, bApi );
+ ApplyAttributes( aMark, aPattern, bApi );
}
}
}
@@ -1310,9 +1310,10 @@ void ScDocFunc::ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, c
}
bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern,
- bool bRecord, bool bApi )
+ bool bApi )
{
ScDocument& rDoc = rDocShell.GetDocument();
+ bool bRecord = true;
if ( bRecord && !rDoc.IsUndoEnabled() )
bRecord = false;
@@ -1372,9 +1373,10 @@ bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r
}
bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName,
- bool bRecord, bool bApi )
+ bool bApi )
{
ScDocument& rDoc = rDocShell.GetDocument();
+ bool bRecord = true;
if ( bRecord && !rDoc.IsUndoEnabled() )
bRecord = false;
@@ -2076,7 +2078,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
}
bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, DelCellCmd eCmd,
- bool bRecord, bool bApi )
+ bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -2101,6 +2103,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
SCROW nPaintEndRow = nEndRow;
sal_uInt16 nPaintFlags = PAINT_GRID;
+ bool bRecord = true;
if (bRecord && !rDoc.IsUndoEnabled())
bRecord = false;
@@ -3288,10 +3291,11 @@ bool ScDocFunc::SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bo
}
bool ScDocFunc::SetTabBgColor(
- ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi )
+ ScUndoTabColorInfo::List& rUndoTabColorList, bool bApi )
{
ScDocument& rDoc = rDocShell.GetDocument();
- if (bRecord && !rDoc.IsUndoEnabled())
+ bool bRecord = true;
+ if (!rDoc.IsUndoEnabled())
bRecord = false;
if ( !rDoc.IsDocEditable() )
@@ -3929,7 +3933,7 @@ bool ScDocFunc::ChangeIndent( const ScMarkData& rMark, bool bIncrement, bool bAp
}
bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
- sal_uInt16 nFormatNo, bool bRecord, bool bApi )
+ sal_uInt16 nFormatNo, bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -3942,7 +3946,8 @@ bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
SCROW nEndRow = rRange.aEnd.Row();
SCTAB nEndTab = rRange.aEnd.Tab();
- if (bRecord && !rDoc.IsUndoEnabled())
+ bool bRecord = true;
+ if (!rDoc.IsUndoEnabled())
bRecord = false;
ScMarkData aMark;
if (pTabMark)
@@ -4259,7 +4264,7 @@ void adjustFillRangeForAdjacentCopy(ScRange& rRange, FillDir eDir)
}
bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, bool bRecord, bool bApi )
+ FillDir eDir, bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
ScDocument& rDoc = rDocShell.GetDocument();
@@ -4275,7 +4280,8 @@ bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
SCROW nEndRow = aRange.aEnd.Row();
SCTAB nEndTab = aRange.aEnd.Tab();
- if (bRecord && !rDoc.IsUndoEnabled())
+ bool bRecord = true;
+ if (!rDoc.IsUndoEnabled())
bRecord = false;
ScMarkData aMark;
@@ -4370,7 +4376,7 @@ bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
double fStart, double fStep, double fMax,
- bool bRecord, bool bApi )
+ bool bApi )
{
ScDocShellModificator aModificator( rDocShell );
@@ -4383,7 +4389,8 @@ bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
SCROW nEndRow = rRange.aEnd.Row();
SCTAB nEndTab = rRange.aEnd.Tab();
- if (bRecord && !rDoc.IsUndoEnabled())
+ bool bRecord = true;
+ if (!rDoc.IsUndoEnabled())
bRecord = false;
ScMarkData aMark;
@@ -4495,11 +4502,11 @@ bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
}
bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, sal_uLong nCount, bool bRecord, bool bApi )
+ FillDir eDir, sal_uLong nCount, bool bApi )
{
double fStep = 1.0;
double fMax = MAXDOUBLE;
- return FillAuto( rRange, pTabMark, eDir, FILL_AUTO, FILL_DAY, nCount, fStep, fMax, bRecord, bApi );
+ return FillAuto( rRange, pTabMark, eDir, FILL_AUTO, FILL_DAY, nCount, fStep, fMax, true/*bRecord*/, bApi );
}
bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, sal_uLong nCount, double fStep, double fMax, bool bRecord, bool bApi )
@@ -5154,7 +5161,7 @@ bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, bool bApi )
return bDone;
}
-void ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, bool bApi )
+void ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd )
{
ScDocument& rDoc = rDocShell.GetDocument();
SCCOL nStartCol = rOldRange.aStart.Col();
@@ -5177,13 +5184,13 @@ void ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd
aMark.SelectTable( nTab, true );
ScRange aNewRange( rOldRange.aStart, rNewEnd );
- if ( DeleteContents( aMark, InsertDeleteFlags::CONTENTS, true, bApi ) )
+ if ( DeleteContents( aMark, InsertDeleteFlags::CONTENTS, true, false/*bApi*/ ) )
{
// GRAM_PODF_A1 for API compatibility.
- if (!EnterMatrix( aNewRange, &aMark, nullptr, aFormula, bApi, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 ))
+ if (!EnterMatrix( aNewRange, &aMark, nullptr, aFormula, false/*bApi*/, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 ))
{
// versuchen, alten Zustand wiederherzustellen
- EnterMatrix( rOldRange, &aMark, nullptr, aFormula, bApi, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ EnterMatrix( rOldRange, &aMark, nullptr, aFormula, false/*bApi*/, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
}
}
@@ -5382,10 +5389,11 @@ void ScDocFunc::SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB
SfxGetpApp()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED));
}
-void ScDocFunc::ConvertFormulaToValue( const ScRange& rRange, bool bRecord, bool bInteraction )
+void ScDocFunc::ConvertFormulaToValue( const ScRange& rRange, bool bInteraction )
{
ScDocShellModificator aModificator(rDocShell);
ScDocument& rDoc = rDocShell.GetDocument();
+ bool bRecord = true;
if (!rDoc.IsUndoEnabled())
bRecord = false;
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index fd8cc681bd46..429a3f5390fb 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -44,7 +44,7 @@ bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
Size aSize( (long) ( STD_COL_WIDTH * HMM_PER_TWIPS * OLE_STD_CELLS_X ),
(long) ( ScGlobal::nStdRowHeight * HMM_PER_TWIPS * OLE_STD_CELLS_Y ) );
// Also adjust start here
- SetVisAreaOrSize( Rectangle( Point(), aSize ), true );
+ SetVisAreaOrSize( Rectangle( Point(), aSize ) );
}
// InitOptions sets the document languages, must be called before CreateStandardStyles
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index a805c0194e18..f9bb67114e8f 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -1035,7 +1035,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
if ( pDel->IsTopDelete() )
{
aSourceRange = pDel->GetOverAllRange().MakeRange();
- GetDocFunc().DeleteCells( aSourceRange, nullptr, DEL_DELROWS, true, false );
+ GetDocFunc().DeleteCells( aSourceRange, nullptr, DEL_DELROWS, false );
// #i101099# [Collaboration] Changes are not correctly shown
if ( bShared )
@@ -1055,7 +1055,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
if ( pDel->IsTopDelete() && !pDel->IsTabDeleteCol() )
{ // deleted Table enthaelt deleted Cols, die nicht
aSourceRange = pDel->GetOverAllRange().MakeRange();
- GetDocFunc().DeleteCells( aSourceRange, nullptr, DEL_DELCOLS, true, false );
+ GetDocFunc().DeleteCells( aSourceRange, nullptr, DEL_DELCOLS, false );
}
}
break;
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index a2d7dd018549..74ddbd84b480 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -1011,7 +1011,7 @@ IMPL_LINK_TYPED( ScDocShell, RefreshDBDataHdl, Timer*, pRefreshTimer, void )
{
ScRange aRange;
pDBData->GetArea( aRange );
- bool bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, nullptr, true ); //! Api-Flag as parameter
+ bool bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, nullptr ); //! Api-Flag as parameter
// internal operations (sort, query, subtotal) only if no error
if (bContinue)
{
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 5f9dc0cc7b10..8ef31acc47ee 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -70,7 +70,7 @@ void ScDocShell::SetVisArea( const Rectangle & rVisArea )
{
// with the SnapVisArea call in SetVisAreaOrSize, it's safe to always
// use both the size and position of the VisArea
- SetVisAreaOrSize( rVisArea, true );
+ SetVisAreaOrSize( rVisArea );
}
static void lcl_SetTopRight( Rectangle& rRect, const Point& rPos )
@@ -82,45 +82,34 @@ static void lcl_SetTopRight( Rectangle& rRect, const Point& rPos )
rRect.Bottom() = rPos.Y() + aSize.Height() - 1;
}
-void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, bool bModifyStart )
+void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea )
{
bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() );
Rectangle aArea = rVisArea;
- if (bModifyStart)
+ // when loading, don't check for negative values, because the sheet orientation
+ // might be set later
+ if ( !aDocument.IsImportingXML() )
{
- // when loading, don't check for negative values, because the sheet orientation
- // might be set later
- if ( !aDocument.IsImportingXML() )
+ if ( ( bNegativePage ? (aArea.Right() > 0) : (aArea.Left() < 0) ) || aArea.Top() < 0 )
{
- if ( ( bNegativePage ? (aArea.Right() > 0) : (aArea.Left() < 0) ) || aArea.Top() < 0 )
+ // VisArea start position can't be negative.
+ // Move the VisArea, otherwise only the upper left position would
+ // be changed in SnapVisArea, and the size would be wrong.
+
+ Point aNewPos( 0, std::max( aArea.Top(), (long) 0 ) );
+ if ( bNegativePage )
+ {
+ aNewPos.X() = std::min( aArea.Right(), (long) 0 );
+ lcl_SetTopRight( aArea, aNewPos );
+ }
+ else
{
- // VisArea start position can't be negative.
- // Move the VisArea, otherwise only the upper left position would
- // be changed in SnapVisArea, and the size would be wrong.
-
- Point aNewPos( 0, std::max( aArea.Top(), (long) 0 ) );
- if ( bNegativePage )
- {
- aNewPos.X() = std::min( aArea.Right(), (long) 0 );
- lcl_SetTopRight( aArea, aNewPos );
- }
- else
- {
- aNewPos.X() = std::max( aArea.Left(), (long) 0 );
- aArea.SetPos( aNewPos );
- }
+ aNewPos.X() = std::max( aArea.Left(), (long) 0 );
+ aArea.SetPos( aNewPos );
}
}
}
- else
- {
- Rectangle aOldVisArea = SfxObjectShell::GetVisArea();
- if ( bNegativePage )
- lcl_SetTopRight( aArea, aOldVisArea.TopRight() );
- else
- aArea.SetPos( aOldVisArea.TopLeft() );
- }
// hier Position anpassen!
@@ -207,7 +196,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, bool bSnapSize )
}
if (aNewArea != aOldArea)
- SetVisAreaOrSize( aNewArea, true ); // hier muss auch der Start angepasst werden
+ SetVisAreaOrSize( aNewArea ); // hier muss auch der Start angepasst werden
}
// Style-Krempel fuer Organizer etc.
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index c2ace4a4e825..87d51ee52721 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1050,7 +1050,7 @@ bool ScExternalRefCache::setCacheDocReferenced( sal_uInt16 nFileId )
return areAllCacheTablesReferenced();
}
-bool ScExternalRefCache::setCacheTableReferenced( sal_uInt16 nFileId, const OUString& rTabName, size_t nSheets, bool bPermanent )
+bool ScExternalRefCache::setCacheTableReferenced( sal_uInt16 nFileId, const OUString& rTabName, size_t nSheets )
{
DocItem* pDoc = getDocItem(nFileId);
if (pDoc)
@@ -1065,9 +1065,7 @@ bool ScExternalRefCache::setCacheTableReferenced( sal_uInt16 nFileId, const OUSt
TableTypeRef pTab = pDoc->maTables[i];
if (pTab.get())
{
- Table::ReferencedFlag eNewFlag = (bPermanent ?
- Table::REFERENCED_PERMANENT :
- Table::REFERENCED_MARKED);
+ Table::ReferencedFlag eNewFlag = Table::REFERENCED_MARKED;
Table::ReferencedFlag eOldFlag = pTab->getReferencedFlag();
if (eOldFlag != Table::REFERENCED_PERMANENT && eNewFlag != eOldFlag)
{
@@ -1741,7 +1739,7 @@ void ScExternalRefManager::markUsedExternalRefCells()
bool ScExternalRefManager::setCacheTableReferenced( sal_uInt16 nFileId, const OUString& rTabName, size_t nSheets )
{
- return maRefCache.setCacheTableReferenced( nFileId, rTabName, nSheets, false);
+ return maRefCache.setCacheTableReferenced( nFileId, rTabName, nSheets);
}
void ScExternalRefManager::setAllCacheTableReferencedStati( bool bReferenced )
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index c018e1dcfc92..39cf5be29b0f 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2164,7 +2164,7 @@ bool ScImportExport::RTF2Doc( SvStream& rStrm, const OUString& rBaseURL )
bool ScImportExport::HTML2Doc( SvStream& rStrm, const OUString& rBaseURL )
{
- ScEEAbsImport *pImp = ScFormatFilter::Get().CreateHTMLImport( pDoc, rBaseURL, aRange, true);
+ ScEEAbsImport *pImp = ScFormatFilter::Get().CreateHTMLImport( pDoc, rBaseURL, aRange);
if (!pImp)
return false;
pImp->Read( rStrm, rBaseURL );
@@ -2218,7 +2218,7 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin {
virtual FltError ScImportHTML( SvStream&, const OUString&, ScDocument*, ScRange&, double, bool, SvNumberFormatter*, bool ) override { return eERR_INTERN; }
virtual ScEEAbsImport *CreateRTFImport( ScDocument*, const ScRange& ) override { return nullptr; }
- virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const OUString&, const ScRange&, bool ) override { return nullptr; }
+ virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const OUString&, const ScRange& ) override { return nullptr; }
virtual OUString GetHTMLRangeNameList( ScDocument*, const OUString& ) override { return OUString(); }
virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel, rtl_TextEncoding ) override { return eERR_INTERN; }
diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
index e1a1de7d5059..f1fe8e563243 100644
--- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
+++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
@@ -62,7 +62,7 @@ public:
ScAddress mMaximumAddress;
bool mTrackRange;
- AddressWalker(ScAddress aInitialAddress, bool aTrackRange = true);
+ AddressWalker(ScAddress aInitialAddress);
ScAddress current(SCCOL aRelativeCol = 0, SCROW aRelativeRow = 0, SCTAB aRelativeTab = 0);
diff --git a/sc/source/ui/inc/cbutton.hxx b/sc/source/ui/inc/cbutton.hxx
index 4b6aaaedb99a..027dd786ee84 100644
--- a/sc/source/ui/inc/cbutton.hxx
+++ b/sc/source/ui/inc/cbutton.hxx
@@ -35,10 +35,9 @@ public:
void SetOutputDevice( OutputDevice* pOutputDevice );
void Draw( const Point& rAt,
- const Size& rSize,
- bool bState );
+ const Size& rSize );
void Draw()
- { Draw( aBtnPos, aBtnSize, false ); }
+ { Draw( aBtnPos, aBtnSize ); }
void SetOptSizePixel();
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index 693de5ef957c..fa104edef031 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -58,7 +58,7 @@ public:
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override;
virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;
- void addMenuItem(const OUString& rText, bool bEnabled, Action* pAction);
+ void addMenuItem(const OUString& rText, Action* pAction);
void addSeparator();
ScMenuFloatingWindow* addSubMenuItem(const OUString& rText, bool bEnabled);
diff --git a/sc/source/ui/inc/crdlg.hxx b/sc/source/ui/inc/crdlg.hxx
index e818d0707ed8..66f644714ed9 100644
--- a/sc/source/ui/inc/crdlg.hxx
+++ b/sc/source/ui/inc/crdlg.hxx
@@ -29,7 +29,7 @@ class ScColOrRowDlg : public ModalDialog
{
public:
ScColOrRowDlg(vcl::Window* pParent, const OUString& rStrTitle,
- const OUString& rStrLabel, bool bColDefault = true);
+ const OUString& rStrLabel);
virtual ~ScColOrRowDlg();
virtual void dispose() override;
private:
diff --git a/sc/source/ui/inc/dbdocfun.hxx b/sc/source/ui/inc/dbdocfun.hxx
index f8e87b4d7224..ec404d4ef7b2 100644
--- a/sc/source/ui/inc/dbdocfun.hxx
+++ b/sc/source/ui/inc/dbdocfun.hxx
@@ -61,8 +61,7 @@ public:
void UpdateImport( const OUString& rTarget, const svx::ODataAccessDescriptor& rDescriptor );
bool DoImport( SCTAB nTab, const ScImportParam& rParam,
- const svx::ODataAccessDescriptor* pDescriptor, // used for selection an existing ResultSet
- bool bRecord );
+ const svx::ODataAccessDescriptor* pDescriptor); // used for selection an existing ResultSet
bool DoImportUno( const ScAddress& rPos,
const css::uno::Sequence<css::beans::PropertyValue>& aArgs );
@@ -86,7 +85,7 @@ public:
void ModifyAllDBData( const ScDBCollection& rNewColl, const std::vector<ScRange>& rDelAreaList );
- bool RepeatDB( const OUString& rDBName, bool bRecord, bool bApi, bool bIsUnnamed=false, SCTAB aTab = 0);
+ bool RepeatDB( const OUString& rDBName, bool bApi, bool bIsUnnamed=false, SCTAB aTab = 0);
bool DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
bool bRecord, bool bApi, bool bAllowMove = false );
diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx
index 6df004f9bb27..69325bd32356 100644
--- a/sc/source/ui/inc/dbfunc.hxx
+++ b/sc/source/ui/inc/dbfunc.hxx
@@ -102,7 +102,7 @@ public:
void AutoOutline();
void SelectLevel( bool bColumns, sal_uInt16 nLevel,
- bool bRecord = true, bool bPaint = true );
+ bool bRecord = true );
void ShowOutline( bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
bool bRecord = true, bool bPaint = true );
void HideOutline( bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry,
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index bf5788351311..b7709294b7c4 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -89,10 +89,10 @@ public:
const ScMarkData& rMark, InsertDeleteFlags nFlags, bool bRecord, bool bApi );
bool DeleteCell(
- const ScAddress& rPos, const ScMarkData& rMark, InsertDeleteFlags nFlags, bool bRecord, bool bApi );
+ const ScAddress& rPos, const ScMarkData& rMark, InsertDeleteFlags nFlags, bool bRecord );
bool TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
- bool bRecord, bool bApi );
+ bool bApi );
bool SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, const OUString& rText, bool bApi );
bool SetValueCell( const ScAddress& rPos, double fVal, bool bInteraction );
@@ -118,15 +118,15 @@ public:
void ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, const OUString* pAuthor, const OUString* pDate, bool bApi );
bool ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern,
- bool bRecord, bool bApi );
+ bool bApi );
bool ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName,
- bool bRecord, bool bApi );
+ bool bApi );
bool InsertCells( const ScRange& rRange,const ScMarkData* pTabMark,
InsCellCmd eCmd, bool bRecord, bool bApi, bool bPartOfPaste = false );
bool DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
- DelCellCmd eCmd, bool bRecord, bool bApi );
+ DelCellCmd eCmd, bool bApi );
bool MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
bool bCut, bool bRecord, bool bPaint, bool bApi );
@@ -136,7 +136,7 @@ public:
bool DeleteTable( SCTAB nTab, bool bRecord, bool bApi );
bool SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bool bApi );
- bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi );
+ bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bApi );
void SetTableVisible( SCTAB nTab, bool bVisible, bool bApi );
@@ -159,7 +159,7 @@ public:
void ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, bool bApi );
bool ChangeIndent( const ScMarkData& rMark, bool bIncrement, bool bApi );
bool AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
- sal_uInt16 nFormatNo, bool bRecord, bool bApi );
+ sal_uInt16 nFormatNo, bool bApi );
SC_DLLPUBLIC bool
EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
@@ -172,20 +172,20 @@ public:
const ScTabOpParam& rParam, bool bRecord, bool bApi );
bool FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, bool bRecord, bool bApi );
+ FillDir eDir, bool bApi );
bool FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
double fStart, double fStep, double fMax,
- bool bRecord, bool bApi );
+ bool bApi );
// FillAuto: rRange wird von Source-Range auf Dest-Range angepasst
SC_DLLPUBLIC bool
FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, sal_uLong nCount, double fStep, double fMax, bool bRecord, bool bApi );
bool FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
- FillDir eDir, sal_uLong nCount, bool bRecord, bool bApi );
+ FillDir eDir, sal_uLong nCount, bool bApi );
- void ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, bool bApi );
+ void ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd );
bool MergeCells( const ScCellMergeOption& rOption, bool bContents,
bool bRecord, bool bApi );
@@ -224,7 +224,7 @@ public:
*/
void SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB nTab );
- void ConvertFormulaToValue( const ScRange& rRange, bool bRecord, bool bInteraction );
+ void ConvertFormulaToValue( const ScRange& rRange, bool bInteraction );
};
class ScDocFuncDirect : public ScDocFunc
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 23755ba2ae28..69421be79811 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -218,7 +218,7 @@ public:
virtual void SetModified( bool = true ) override;
- void SetVisAreaOrSize( const Rectangle& rVisArea, bool bModifyStart );
+ void SetVisAreaOrSize( const Rectangle& rVisArea );
virtual VclPtr<SfxDocumentInfoDialog> CreateDocumentInfoDialog( const SfxItemSet &rSet ) override;
diff --git a/sc/source/ui/inc/editfield.hxx b/sc/source/ui/inc/editfield.hxx
index 81c370bb1255..2020db572aae 100644
--- a/sc/source/ui/inc/editfield.hxx
+++ b/sc/source/ui/inc/editfield.hxx
@@ -30,8 +30,7 @@ public:
bool GetValue( double& rfValue ) const;
void SetValue( double fValue,
- sal_Int32 nDecPlaces = 12,
- bool bEraseTrailingDecZeros = true );
+ sal_Int32 nDecPlaces = 12 );
};
#endif
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 6e4f83ba10b2..a8862538e5d2 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -354,7 +354,7 @@ public:
void UpdateFormulas();
- void LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelect );
+ void LaunchDataSelectMenu( SCCOL nCol, SCROW nRow );
void DoScenarioMenu( const ScRange& rScenRange );
void LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow);
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index c41171c52033..ee2632ce93d7 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -185,7 +185,7 @@ public:
void SetReference( const ScRange& rRef, ScDocument* pDoc );
void AddRefEntry();
- void InputCommand( const CommandEvent& rCEvt, bool bForce );
+ void InputCommand( const CommandEvent& rCEvt );
void InsertFunction( const OUString& rFuncName, bool bAddPar = true );
void ClearText();
diff --git a/sc/source/ui/inc/olinewin.hxx b/sc/source/ui/inc/olinewin.hxx
index 0c5def840aed..6b94819da135 100644
--- a/sc/source/ui/inc/olinewin.hxx
+++ b/sc/source/ui/inc/olinewin.hxx
@@ -162,9 +162,9 @@ private:
@return true = focus wrapped from end to start or vice versa. */
bool ImplMoveFocusByLevel( bool bForward );
/** Calculates position of focus button in tab order.
- @param bFindVisible true = repeats until a visible button has been found.
+ Repeats until a visible button has been found.
@return true = focus wrapped from end to start or vice versa. */
- bool ImplMoveFocusByTabOrder( bool bForward, bool bFindVisible );
+ bool ImplMoveFocusByTabOrder( bool bForward );
/** If the focused entry is invisible, tries to move to visible position. */
void ImplMoveFocusToVisible( bool bForward );
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index da55593698b0..fee9cf9780ef 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -515,7 +515,7 @@ public:
void FreezeSplitters( bool bFreeze, SplitMethod eSplitMethod = SC_SPLIT_METHOD_CURSOR );
void RemoveSplit();
void SplitAtCursor();
- void SplitAtPixel( const Point& rPixel, bool bHor, bool bVer );
+ void SplitAtPixel( const Point& rPixel );
void InvalidateSplit();
void ErrorMessage( sal_uInt16 nGlobStrId );
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
index b81af2091f3b..192f47e077a0 100644
--- a/sc/source/ui/inc/undobase.hxx
+++ b/sc/source/ui/inc/undobase.hxx
@@ -100,8 +100,7 @@ protected:
class ScMultiBlockUndo: public ScSimpleUndo
{
public:
- ScMultiBlockUndo(ScDocShell* pDocSh, const ScRangeList& rRanges,
- ScBlockUndoMode eBlockMode);
+ ScMultiBlockUndo(ScDocShell* pDocSh, const ScRangeList& rRanges);
virtual ~ScMultiBlockUndo();
protected:
diff --git a/sc/source/ui/inc/undocell.hxx b/sc/source/ui/inc/undocell.hxx
index 7de6d534c3d7..98157823cb38 100644
--- a/sc/source/ui/inc/undocell.hxx
+++ b/sc/source/ui/inc/undocell.hxx
@@ -48,7 +48,7 @@ public:
ScUndoCursorAttr( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
const ScPatternAttr* pOldPat, const ScPatternAttr* pNewPat,
- const ScPatternAttr* pApplyPat, bool bAutomatic );
+ const ScPatternAttr* pApplyPat );
virtual ~ScUndoCursorAttr();
virtual void Undo() override;
diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx
index 98cc867b3eba..8270dda2568e 100644
--- a/sc/source/ui/inc/undodat.hxx
+++ b/sc/source/ui/inc/undodat.hxx
@@ -440,8 +440,7 @@ public:
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
InsertDeleteFlags nNewFlags,
- ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3,
- bool bRedoIsFilled = true
+ ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3
);
virtual ~ScUndoDataForm();
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index f6026fb863e5..7b190b5aba36 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -245,7 +245,7 @@ public:
ScDrawView* GetScDrawView(); // from View
bool IsMinimized(); // from View
- void UpdateInputHandler( bool bForce = false, bool bStopEditing = true );
+ void UpdateInputHandler( bool bForce = false );
void WriteUserData(OUString& rData);
void ReadUserData(const OUString& rData);
@@ -349,8 +349,7 @@ public:
bool GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix ) const;
void GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
SCsCOL& rPosX, SCsROW& rPosY,
- bool bTestMerge = true, bool bRepair = false,
- bool bNextIfLarge = true );
+ bool bTestMerge = true, bool bRepair = false );
void GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich,
SCsCOL nPosX, SCsROW nPosY, bool& rLeft, bool& rTop );
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 29fe7e482463..45ea187627b6 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -101,7 +101,7 @@ public:
SC_DLLPUBLIC bool CopyToClip( ScDocument* pClipDoc = nullptr, bool bCut = false, bool bApi = false,
bool bIncludeObjects = false, bool bStopEdit = true );
SC_DLLPUBLIC bool CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRange, bool bCut = false,
- bool bApi = false, bool bIncludeObjects = false, bool bStopEdit = true, bool bUseRangeForVBA = true );
+ bool bApi = false, bool bIncludeObjects = false, bool bStopEdit = true );
ScTransferObj* CopyToTransferable();
SC_DLLPUBLIC bool PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
ScPasteFunc nFunction = ScPasteFunc::NONE, bool bSkipEmpty = false,
@@ -147,9 +147,9 @@ public:
bool HasBookmarkAtCursor( SvxHyperlinkItem* pContent );
bool MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
- bool bCut, bool bRecord, bool bPaint, bool bApi );
+ bool bCut );
- bool LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, bool bApi );
+ bool LinkBlock( const ScRange& rSource, const ScAddress& rDestPos );
void CreateNames( sal_uInt16 nFlags );
sal_uInt16 GetCreateNameFlags();
@@ -160,8 +160,7 @@ public:
void ApplyAttributes( const SfxItemSet* pDialogSet, const SfxItemSet* pOldSet );
void ApplyAttr( const SfxPoolItem& rAttrItem );
void ApplySelectionPattern( const ScPatternAttr& rAttr,
- bool bRecord = true,
- bool bCursorOnly = false );
+ bool bCursorOnly = false);
void ApplyPatternLines( const ScPatternAttr& rAttr,
const SvxBoxItem* pNewOuter,
const SvxBoxInfoItem* pNewInner );
@@ -195,7 +194,7 @@ public:
void SetWidthOrHeight(
bool bWidth, const std::vector<sc::ColRowSpan>& rRanges, ScSizeMode eMode,
- sal_uInt16 nSizeTwips, bool bRecord = true, bool bPaint = true, ScMarkData* pMarkData = nullptr );
+ sal_uInt16 nSizeTwips, bool bRecord = true, ScMarkData* pMarkData = nullptr );
void SetMarkedWidthOrHeight( bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips );
@@ -221,7 +220,7 @@ public:
bool TestMergeCells();
bool TestRemoveMerge();
- bool MergeCells( bool bApi, bool& rDoContents, bool bRecord = true, bool bCenter = false );
+ bool MergeCells( bool bApi, bool& rDoContents, bool bCenter = false );
bool RemoveMerge();
void FillSimple( FillDir eDir );
@@ -266,7 +265,7 @@ public:
const OUString& rTabName );
void InsertAreaLink( const OUString& rFile,
const OUString& rFilter, const OUString& rOptions,
- const OUString& rSource, sal_uLong nRefresh );
+ const OUString& rSource );
void ShowTable( const std::vector<OUString>& rNames );
void HideTable( const ScMarkData& rMark );
diff --git a/sc/source/ui/inc/warnbox.hxx b/sc/source/ui/inc/warnbox.hxx
index 7ae2360e9efa..d8a49cf021c8 100644
--- a/sc/source/ui/inc/warnbox.hxx
+++ b/sc/source/ui/inc/warnbox.hxx
@@ -26,9 +26,8 @@
class ScCbWarningBox : public WarningBox
{
public:
- /** @param rMsgStr Resource ID for the message text.
- @param bDefYes true = "Yes" focused, false = "No" focused. */
- ScCbWarningBox( vcl::Window* pParent, const OUString& rMsgStr, bool bDefYes = true );
+ /** @param rMsgStr Resource ID for the message text. */
+ ScCbWarningBox( vcl::Window* pParent, const OUString& rMsgStr );
/** Opens dialog if IsDialogEnabled() returns true.
@descr If after executing the dialog the checkbox "Do not show again" is set,
diff --git a/sc/source/ui/miscdlgs/crdlg.cxx b/sc/source/ui/miscdlgs/crdlg.cxx
index 2fc9fe903231..deff2906e5a7 100644
--- a/sc/source/ui/miscdlgs/crdlg.cxx
+++ b/sc/source/ui/miscdlgs/crdlg.cxx
@@ -24,7 +24,7 @@
#include "miscdlgs.hrc"
ScColOrRowDlg::ScColOrRowDlg(vcl::Window* pParent, const OUString& rStrTitle,
- const OUString& rStrLabel, bool bColDefault)
+ const OUString& rStrLabel)
: ModalDialog(pParent, "ColOrRowDialog",
"modules/scalc/ui/colorrowdialog.ui")
{
@@ -36,10 +36,7 @@ ScColOrRowDlg::ScColOrRowDlg(vcl::Window* pParent, const OUString& rStrTitle,
SetText(rStrTitle);
m_pFrame->set_label(rStrLabel);
- if (bColDefault)
- m_pBtnCols->Check();
- else
- m_pBtnRows->Check();
+ m_pBtnCols->Check();
m_pBtnOk->SetClickHdl( LINK( this, ScColOrRowDlg, OkHdl ) );
}
diff --git a/sc/source/ui/miscdlgs/warnbox.cxx b/sc/source/ui/miscdlgs/warnbox.cxx
index 75c7b6032bf6..8d500490f13c 100644
--- a/sc/source/ui/miscdlgs/warnbox.cxx
+++ b/sc/source/ui/miscdlgs/warnbox.cxx
@@ -24,8 +24,8 @@
#include "scresid.hxx"
#include "sc.hrc"
-ScCbWarningBox::ScCbWarningBox( vcl::Window* pParent, const OUString& rMsgStr, bool bDefYes ) :
- WarningBox( pParent, WB_YES_NO | (bDefYes ? WB_DEF_YES : WB_DEF_NO), rMsgStr )
+ScCbWarningBox::ScCbWarningBox( vcl::Window* pParent, const OUString& rMsgStr ) :
+ WarningBox( pParent, WB_YES_NO | WB_DEF_YES, rMsgStr )
{
// By default, the check box is ON, and the user needs to un-check it to
// disable all future warnings.
@@ -55,7 +55,7 @@ void ScCbWarningBox::DisableDialog()
}
ScReplaceWarnBox::ScReplaceWarnBox( vcl::Window* pParent ) :
- ScCbWarningBox( pParent, OUString( ScResId( STR_REPLCELLSWARN ) ), true )
+ ScCbWarningBox( pParent, OUString( ScResId( STR_REPLCELLSWARN ) ) )
{
SetHelpId( HID_SC_REPLCELLSWARN );
}
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 9a094d34d2d7..bd592eff4dc2 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -79,7 +79,7 @@ ScEditWindow::ScEditWindow( vcl::Window* pParent, WinBits nBits, ScEditWindowLoc
Size aSize( GetOutputSize() );
aSize.Height() *= 4;
- pEdEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), true );
+ pEdEngine = new ScHeaderEditEngine( EditEngine::CreatePool() );
pEdEngine->SetPaperSize( aSize );
pEdEngine->SetRefDevice( this );
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 753f8dbac39a..dfdd563ec162 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -305,10 +305,10 @@ void ScBlockUndo::ShowBlock()
}
ScMultiBlockUndo::ScMultiBlockUndo(
- ScDocShell* pDocSh, const ScRangeList& rRanges, ScBlockUndoMode eBlockMode) :
+ ScDocShell* pDocSh, const ScRangeList& rRanges) :
ScSimpleUndo(pDocSh),
maBlockRanges(rRanges),
- meMode(eBlockMode)
+ meMode(SC_UNDO_SIMPLE)
{
mpDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() );
}
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index d86d6694de8b..270830de340d 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -830,7 +830,7 @@ ScUndoPaste::ScUndoPaste( ScDocShell* pNewDocShell, const ScRangeList& rRanges,
InsertDeleteFlags nNewFlags,
ScRefUndoData* pRefData,
bool bRedoIsFilled, const ScUndoPasteOptions* pOptions ) :
- ScMultiBlockUndo( pNewDocShell, rRanges, SC_UNDO_SIMPLE ),
+ ScMultiBlockUndo( pNewDocShell, rRanges ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
pRedoDoc( pNewRedoDoc ),
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index 65012a67f17f..e4319494f534 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -150,7 +150,7 @@ void ScUndoWidthOrHeight::Redo()
// SetWidthOrHeight changes current sheet!
pViewShell->SetWidthOrHeight(
- bWidth, maRanges, eMode, nNewSize, false, true, &aMarkData);
+ bWidth, maRanges, eMode, nNewSize, false, &aMarkData);
}
// paint grid if selection was changed directly at the MarkData
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index bacb10db6dee..2dbdb4da0ac0 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -70,14 +70,14 @@ namespace HelperNotifyChanges
ScUndoCursorAttr::ScUndoCursorAttr( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
const ScPatternAttr* pOldPat, const ScPatternAttr* pNewPat,
- const ScPatternAttr* pApplyPat, bool bAutomatic ) :
+ const ScPatternAttr* pApplyPat ) :
ScSimpleUndo( pNewDocShell ),
nCol( nNewCol ),
nRow( nNewRow ),
nTab( nNewTab ),
pOldEditData( static_cast<EditTextObject*>(nullptr) ),
pNewEditData( static_cast<EditTextObject*>(nullptr) ),
- bIsAutomatic( bAutomatic )
+ bIsAutomatic( false )
{
ScDocumentPool* pPool = pDocShell->GetDocument().GetPool();
pNewPattern = const_cast<ScPatternAttr*>(static_cast<const ScPatternAttr*>( &pPool->Put( *pNewPat ) ));
@@ -111,7 +111,7 @@ void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern, const share
{
ScDocument& rDoc = pDocShell->GetDocument();
ScAddress aPos(nCol, nRow, nTab);
- rDoc.SetPattern( nCol, nRow, nTab, *pWhichPattern, true );
+ rDoc.SetPattern( nCol, nRow, nTab, *pWhichPattern );
if (rDoc.GetCellType(aPos) == CELLTYPE_EDIT && pEditData)
rDoc.SetEditText(aPos, *pEditData, nullptr);
@@ -255,7 +255,7 @@ void ScUndoEnterData::Undo()
{
ScPatternAttr aPattern(*rDoc.GetPattern(maPos.Col(), maPos.Row(), rVal.mnTab));
aPattern.GetItemSet().ClearItem( ATTR_VALUE_FORMAT );
- rDoc.SetPattern(maPos.Col(), maPos.Row(), rVal.mnTab, aPattern, true);
+ rDoc.SetPattern(maPos.Col(), maPos.Row(), rVal.mnTab, aPattern);
}
pDocShell->PostPaintCell(maPos.Col(), maPos.Row(), rVal.mnTab);
}
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 59c839e36f8e..ad4f4aeeb40d 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1791,8 +1791,7 @@ ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
InsertDeleteFlags nNewFlags,
ScRefUndoData* pRefData,
- void* /*pFill1*/, void* /*pFill2*/, void* /*pFill3*/,
- bool bRedoIsFilled ) :
+ void* /*pFill1*/, void* /*pFill2*/, void* /*pFill3*/ ) :
ScBlockUndo( pNewDocShell, ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), SC_UNDO_SIMPLE ),
mpMarkData(new ScMarkData(rMark)),
pUndoDoc( pNewUndoDoc ),
@@ -1800,7 +1799,7 @@ ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell,
nFlags( nNewFlags ),
pRefUndoData( pRefData ),
pRefRedoData( nullptr ),
- bRedoFilled( bRedoIsFilled )
+ bRedoFilled( false )
{
// pFill1,pFill2,pFill3 are there so the ctor calls for simple paste (without cutting)
// don't have to be changed and branched for 641.
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 070514508e5a..2e262b44abfd 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2012,7 +2012,7 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const OUString& aPropertyN
else if ( pEntry->nWID == SC_WID_UNO_CELLSTYL )
{
OUString aStyleName( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ) );
- pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aStyleName, true, true );
+ pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aStyleName, true );
}
}
}
@@ -2293,7 +2293,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if ( nWhich != nFirstItem && nWhich != nSecondItem )
rSet.ClearItem(nWhich);
- pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), aPattern, true, true );
+ pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), aPattern, true );
}
}
else // implemented here
@@ -2351,7 +2351,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
aValue >>= aStrVal;
OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName(
aStrVal, SFX_STYLE_FAMILY_PARA ));
- pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aString, true, true );
+ pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aString, true );
}
break;
case SC_WID_UNO_TBLBORD:
@@ -2452,7 +2452,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
ScPatternAttr aPattern( rDoc.GetPool() );
aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nIndex ) );
- pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), aPattern, true, true );
+ pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), aPattern, true );
}
}
}
@@ -2751,7 +2751,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< OUString
}
if ( pNewPattern && !aRanges.empty() )
- pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), *pNewPattern, true, true );
+ pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), *pNewPattern, true );
}
}
@@ -2918,7 +2918,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
}
if ( pNewPattern && !aRanges.empty() )
- pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), *pNewPattern, true, true );
+ pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), *pNewPattern, true );
aReturns.realloc(nFailed);
@@ -5455,7 +5455,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
if (!bError)
pDocSh->GetDocFunc().FillSeries( aRange, nullptr, eDir, eCmd, eDateCmd,
- MAXDOUBLE, fStep, fEndValue, true, true );
+ MAXDOUBLE, fStep, fEndValue, true );
}
}
@@ -5499,7 +5499,7 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection,
bError = true;
if (!bError)
- pDocSh->GetDocFunc().FillAuto( aSourceRange, nullptr, eDir, nCount, true, true );
+ pDocSh->GetDocFunc().FillAuto( aSourceRange, nullptr, eDir, nCount, true );
}
}
@@ -5518,7 +5518,7 @@ void SAL_CALL ScCellRangeObj::autoFormat( const OUString& aName )
{
ScAutoFormat::const_iterator itBeg = pAutoFormat->begin();
size_t nIndex = std::distance(itBeg, it);
- pDocSh->GetDocFunc().AutoFormat(aRange, nullptr, nIndex, true, true);
+ pDocSh->GetDocFunc().AutoFormat(aRange, nullptr, nIndex, true);
}
else
throw lang::IllegalArgumentException();
@@ -5925,7 +5925,7 @@ void SAL_CALL ScCellRangeObj::doImport( const uno::Sequence<beans::PropertyValue
pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
ScDBDocFunc aFunc(*pDocSh); // Bereich muss angelegt sein
- aFunc.DoImport( nTab, aParam, nullptr, true ); //! Api-Flag as parameter
+ aFunc.DoImport( nTab, aParam, nullptr ); //! Api-Flag as parameter
}
}
@@ -6242,7 +6242,7 @@ void ScCellObj::InputEnglishString( const OUString& rText )
ScPatternAttr aPattern( rDoc.GetPool() );
aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
// ATTR_LANGUAGE_FORMAT remains unchanged
- rFunc.ApplyAttributes( *GetMarkData(), aPattern, true, true );
+ rFunc.ApplyAttributes( *GetMarkData(), aPattern, true );
}
}
}
@@ -7242,7 +7242,7 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang
OSL_ENSURE( rRangeAddress.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
ScRange aScRange;
ScUnoConversion::FillScRange( aScRange, rRangeAddress );
- pDocSh->GetDocFunc().DeleteCells( aScRange, nullptr, eCmd, true, true );
+ pDocSh->GetDocFunc().DeleteCells( aScRange, nullptr, eCmd, true );
}
}
}
@@ -8009,7 +8009,7 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd
ScPatternAttr aPattern( rDoc.GetPool() );
aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) );
aPattern.GetItemSet().Put( ScProtectionAttr( true ) );
- pDocSh->GetDocFunc().ApplyAttributes( aMarkData, aPattern, true, true );
+ pDocSh->GetDocFunc().ApplyAttributes( aMarkData, aPattern, true );
}
}
}
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index ba4858f10903..342f956e371a 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -1915,12 +1915,12 @@ void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException, std::ex
SCCOL nDummyCol;
SCROW nDummyRow;
pData->GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow );
- bContinue = aFunc.DoImport( nTab, aImportParam, nullptr, true ); //! Api-Flag as parameter
+ bContinue = aFunc.DoImport( nTab, aImportParam, nullptr ); //! Api-Flag as parameter
}
// interne Operationen (sort, query, subtotal) nur, wenn kein Fehler
if (bContinue)
- aFunc.RepeatDB( pData->GetName(), true, true, bIsUnnamed, aTab );
+ aFunc.RepeatDB( pData->GetName(), true, bIsUnnamed, aTab );
}
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 4e12fe8fbd08..ead7061e9108 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -3568,7 +3568,7 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCou
{
ScRange aRange( (SCCOL)(nStartCol+nIndex), 0, nTab,
(SCCOL)(nStartCol+nIndex+nCount-1), MAXROW, nTab );
- bDone = pDocShell->GetDocFunc().DeleteCells( aRange, nullptr, DEL_DELCOLS, true, true );
+ bDone = pDocShell->GetDocFunc().DeleteCells( aRange, nullptr, DEL_DELCOLS, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3825,7 +3825,7 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount
{
ScRange aRange( 0, (SCROW)(nStartRow+nIndex), nTab,
MAXCOL, (SCROW)(nStartRow+nIndex+nCount-1), nTab );
- bDone = pDocShell->GetDocFunc().DeleteCells( aRange, nullptr, DEL_DELROWS, true, true );
+ bDone = pDocShell->GetDocFunc().DeleteCells( aRange, nullptr, DEL_DELROWS, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index f960d87c3e70..b5bdc0c05cda 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -206,7 +206,7 @@ SvxTextForwarder* ScHeaderFooterTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, true );
+ ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool );
pHdrEngine->EnableUndo( false );
pHdrEngine->SetRefMapMode( MAP_TWIP );
@@ -337,7 +337,7 @@ OUString SAL_CALL ScHeaderFooterTextObj::getString() throw(uno::RuntimeException
if (pData)
{
// for pure text, no font info is needed in pool defaults
- ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), true );
+ ScHeaderEditEngine aEditEngine( EditEngine::CreatePool() );
ScHeaderFieldData aData;
FillDummyFieldData( aData );
@@ -355,7 +355,7 @@ void SAL_CALL ScHeaderFooterTextObj::setString( const OUString& aText ) throw(un
OUString aString(aText);
// for pure text, no font info is needed in pool defaults
- ScHeaderEditEngine aEditEngine(EditEngine::CreatePool(), true);
+ ScHeaderEditEngine aEditEngine(EditEngine::CreatePool());
aEditEngine.SetText( aString );
aTextData.UpdateData(aEditEngine);
}
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index f029710f9379..1a17d1a67a7b 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -1655,7 +1655,7 @@ void SAL_CALL ScTabViewObj::splitAtPosition( sal_Int32 nPixelX, sal_Int32 nPixel
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
- pViewSh->SplitAtPixel( Point( nPixelX, nPixelY ), true, true );
+ pViewSh->SplitAtPixel( Point( nPixelX, nPixelY ) );
pViewSh->FreezeSplitters( false );
pViewSh->InvalidateSplit();
}
@@ -1681,7 +1681,7 @@ void SAL_CALL ScTabViewObj::freezeAtPosition( sal_Int32 nColumns, sal_Int32 nRow
Point aSplit(rViewData.GetScrPos( (SCCOL)nColumns, (SCROW)nRows, SC_SPLIT_BOTTOMLEFT, true ));
aSplit += aWinStart;
- pViewSh->SplitAtPixel( aSplit, true, true );
+ pViewSh->SplitAtPixel( aSplit );
pViewSh->FreezeSplitters( true );
pViewSh->InvalidateSplit();
}
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 16962802327f..0d21f00b8b33 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1631,7 +1631,7 @@ ScVbaRange::ClearFormats() throw (uno::RuntimeException, std::exception)
}
void
-ScVbaRange::setFormulaValue( const uno::Any& rFormula, formula::FormulaGrammar::Grammar eGram, bool bFireEvent ) throw (uno::RuntimeException)
+ScVbaRange::setFormulaValue( const uno::Any& rFormula, formula::FormulaGrammar::Grammar eGram ) throw (uno::RuntimeException)
{
// If this is a multiple selection apply setFormula over all areas
if ( m_Areas->getCount() > 1 )
@@ -1642,7 +1642,7 @@ ScVbaRange::setFormulaValue( const uno::Any& rFormula, formula::FormulaGrammar::
return;
}
CellFormulaValueSetter formulaValueSetter( rFormula, &getScDocument(), eGram );
- setValue( rFormula, formulaValueSetter, bFireEvent );
+ setValue( rFormula, formulaValueSetter, true/*bFireEvent*/ );
}
uno::Any
@@ -1666,7 +1666,7 @@ void
ScVbaRange::setFormula(const uno::Any &rFormula ) throw (uno::RuntimeException, std::exception)
{
// #FIXME converting "=$a$1" e.g. CONV_XL_A1 -> CONV_OOO // results in "=$a$1:a1", temporalily disable conversion
- setFormulaValue( rFormula,formula::FormulaGrammar::GRAM_NATIVE_XL_A1, true );
+ setFormulaValue( rFormula,formula::FormulaGrammar::GRAM_NATIVE_XL_A1 );
}
uno::Any
@@ -1678,7 +1678,7 @@ ScVbaRange::getFormulaR1C1() throw (css::uno::RuntimeException, std::exception)
void
ScVbaRange::setFormulaR1C1(const uno::Any& rFormula ) throw (uno::RuntimeException, std::exception)
{
- setFormulaValue( rFormula,formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1, true );
+ setFormulaValue( rFormula,formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1 );
}
uno::Any
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index ee715cfa4e0b..9c134c237b01 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -101,7 +101,7 @@ class ScVbaRange : public ScVbaRange_BASE
void setValue( const css::uno::Any& aValue, ValueSetter& setter, bool bFireEvent ) throw ( css::uno::RuntimeException);
css::uno::Any getFormulaValue( formula::FormulaGrammar::Grammar ) throw (css::uno::RuntimeException);
- void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar, bool bFireEvent ) throw ( css::uno::RuntimeException);
+ void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar ) throw ( css::uno::RuntimeException);
css::uno::Reference< ov::excel::XRange > getArea( sal_Int32 nIndex ) throw( css::uno::RuntimeException );
ScCellRangeObj* getCellRangeObj( ) throw ( css::uno::RuntimeException );
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index a372a52e7d8b..b97450bf8db7 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -482,7 +482,6 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
std::unique_ptr<AbstractScInsertContentsDlg> pDlg(pFact->CreateScInsertContentsDlg( pTabViewShell->GetDialogParent(),
- InsertDeleteFlags::NONE, /* nCheckDefaults */
&ScGlobal::GetRscString(STR_FILL_TAB)));
OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->SetFillMode(true);
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index ff6822f6b576..e85e70a68abc 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -749,7 +749,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
bMoveContents = static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
- if (pTabViewShell->MergeCells( bApi, bMoveContents, true, bCenter ))
+ if (pTabViewShell->MergeCells( bApi, bMoveContents, bCenter ))
{
if (!bApi && bMoveContents) // "yes" clicked in dialog
rReq.AppendItem( SfxBoolItem( nSlot, bMoveContents ) );
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index faf6cabad06f..1e6aa67d4188 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -451,7 +451,7 @@ bool ScDBFunc::ImportData( const ScImportParam& rParam )
}
ScDBDocFunc aDBDocFunc( *GetViewData().GetDocShell() );
- return aDBDocFunc.DoImport( GetViewData().GetTabNo(), rParam, nullptr, true/*bRecord*/ );
+ return aDBDocFunc.DoImport( GetViewData().GetTabNo(), rParam, nullptr );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 886b8cbde8cd..4e90c19531bf 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -207,13 +207,13 @@ void ScDBFunc::AutoOutline( )
// select outline level
-void ScDBFunc::SelectLevel( bool bColumns, sal_uInt16 nLevel, bool bRecord, bool bPaint )
+void ScDBFunc::SelectLevel( bool bColumns, sal_uInt16 nLevel, bool bRecord )
{
SCTAB nTab = GetViewData().GetTabNo();
ScDocShell* pDocSh = GetViewData().GetDocShell();
ScOutlineDocFunc aFunc(*pDocSh);
- bool bOk = aFunc.SelectLevel( nTab, bColumns, nLevel, bRecord, bPaint );
+ bool bOk = aFunc.SelectLevel( nTab, bColumns, nLevel, bRecord, true/*bPaint*/ );
if (bOk)
UpdateScrollBars();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index d74fb713abc0..39c03f82e8f1 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -237,7 +237,6 @@ public:
bool IsInInit() const { return bInit; }
void SetCancelled() { bCancelled = true; }
bool IsInSelect() const { return bInSelect; }
- void SetListHasDates(bool b) { mbListHasDates = b; }
bool HasDates() const { return mbListHasDates; }
};
@@ -737,7 +736,7 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
// Populate the check box list.
bool bHasDates = false;
std::vector<ScTypedStrData> aStrings;
- pDoc->GetFilterEntries(nCol, nRow, nTab, true, aStrings, bHasDates);
+ pDoc->GetFilterEntries(nCol, nRow, nTab, aStrings, bHasDates);
mpAutoFilterPopup->setMemberSize(aStrings.size());
std::vector<ScTypedStrData>::const_iterator it = aStrings.begin(), itEnd = aStrings.end();
@@ -757,20 +756,20 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
// Populate the menu.
mpAutoFilterPopup->addMenuItem(
SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_ASC),
- true, new AutoFilterAction(this, SortAscending));
+ new AutoFilterAction(this, SortAscending));
mpAutoFilterPopup->addMenuItem(
SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_DESC),
- true, new AutoFilterAction(this, SortDescending));
+ new AutoFilterAction(this, SortDescending));
mpAutoFilterPopup->addSeparator();
mpAutoFilterPopup->addMenuItem(
- SC_RESSTR(SCSTR_TOP10FILTER), true, new AutoFilterAction(this, Top10));
+ SC_RESSTR(SCSTR_TOP10FILTER), new AutoFilterAction(this, Top10));
mpAutoFilterPopup->addMenuItem(
- SC_RESSTR(SCSTR_FILTER_EMPTY), true, new AutoFilterAction(this, Empty));
+ SC_RESSTR(SCSTR_FILTER_EMPTY), new AutoFilterAction(this, Empty));
mpAutoFilterPopup->addMenuItem(
- SC_RESSTR(SCSTR_FILTER_NOTEMPTY), true, new AutoFilterAction(this, NonEmpty));
+ SC_RESSTR(SCSTR_FILTER_NOTEMPTY), new AutoFilterAction(this, NonEmpty));
mpAutoFilterPopup->addSeparator();
mpAutoFilterPopup->addMenuItem(
- SC_RESSTR(SCSTR_STDFILTER), true, new AutoFilterAction(this, Custom));
+ SC_RESSTR(SCSTR_STDFILTER), new AutoFilterAction(this, Custom));
ScCheckListMenuWindow::Config aConfig;
aConfig.mbAllowEmptySet = false;
@@ -1092,12 +1091,11 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
CaptureMouse();
}
-void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelect )
+void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow )
{
mpFilterBox.disposeAndClear();
mpFilterFloat.disposeAndClear();
- sal_uInt16 i;
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
@@ -1117,7 +1115,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
mpFilterFloat.reset(VclPtr<ScFilterFloatingWindow>::Create(this, WinBits(WB_BORDER)));
mpFilterFloat->SetPopupModeEndHdl(LINK( this, ScGridWindow, PopupModeEndHdl));
- ScFilterBoxMode eFilterMode = bDataSelect ? SC_FILTERBOX_DATASELECT : SC_FILTERBOX_FILTER;
+ ScFilterBoxMode eFilterMode = SC_FILTERBOX_DATASELECT;
mpFilterBox.reset(VclPtr<ScFilterListBox>::Create(mpFilterFloat.get(), this, nCol, nRow, eFilterMode));
// Fix for bug fdo#44925
if (AllSettings::GetLayoutRTL() != bLayoutRTL)
@@ -1142,62 +1140,10 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
bool bEmpty = false;
std::vector<ScTypedStrData> aStrings; // case sensitive
- if ( bDataSelect ) // selection List
- {
- // Fill List
- pDoc->GetDataEntries(nCol, nRow, nTab, true, aStrings);
- if (aStrings.empty())
- bEmpty = true;
- }
- else // AutoFilter
- {
- //! Will the Titel be evaluated ???
- OUString aString = pDoc->GetString(nCol, nRow, nTab);
- mpFilterBox->SetText(aString);
-
- long nMaxText = 0;
-
- // default entries
- static const sal_uInt16 nDefIDs[] = { SCSTR_TOP10FILTER, SCSTR_STDFILTER, SCSTR_FILTER_EMPTY, SCSTR_FILTER_NOTEMPTY };
- const size_t nDefCount = SAL_N_ELEMENTS(nDefIDs);
- for (i=0; i<nDefCount; i++)
- {
- OUString aEntry( static_cast<ScResId>(nDefIDs[i]) );
- mpFilterBox->InsertEntry(aEntry);
- long nTextWidth = mpFilterBox->GetTextWidth(aEntry);
- if ( nTextWidth > nMaxText )
- nMaxText = nTextWidth;
- }
- mpFilterBox->SetSeparatorPos(nDefCount - 1);
-
- // get list entries
- bool bHasDates = false;
- pDoc->GetFilterEntries( nCol, nRow, nTab, true, aStrings, bHasDates);
- mpFilterBox->SetListHasDates(bHasDates);
-
- // check widths of numerical entries (string entries are not included)
- // so all numbers are completely visible
- std::vector<ScTypedStrData>::const_iterator it = aStrings.begin(), itEnd = aStrings.end();
- for (; it != itEnd; ++it)
- {
- if (!it->IsStrData()) // only numerical entries
- {
- long nTextWidth = mpFilterBox->GetTextWidth(it->GetString());
- if ( nTextWidth > nMaxText )
- nMaxText = nTextWidth;
- }
- }
-
- // add scrollbar width if needed (string entries are counted here)
- // (scrollbar is shown if the box is exactly full?)
- if (aStrings.size() + nDefCount >= SC_FILTERLISTBOX_LINES)
- nMaxText += GetSettings().GetStyleSettings().GetScrollBarSize();
-
- nMaxText += 4; // for borders
-
- if ( nMaxText > nSizeX )
- nSizeX = nMaxText; // just modify width - starting position is unchanged
- }
+ // Fill List
+ pDoc->GetDataEntries(nCol, nRow, nTab, true, aStrings);
+ if (aStrings.empty())
+ bEmpty = true;
if (!bEmpty)
{
@@ -1237,95 +1183,47 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
sal_Int32 nSelPos = LISTBOX_ENTRY_NOTFOUND;
- if (!bDataSelect) // AutoFilter: Select active entry
- {
- ScDBData* pDBData = pDoc->GetDBAtCursor( nCol, nRow, nTab, ScDBDataPortion::AREA );
- if (pDBData)
- {
- ScQueryParam aParam;
- pDBData->GetQueryParam( aParam ); // Can only result in MAXQUERY entries
-
- bool bValid = true;
- SCSIZE nCount = aParam.GetEntryCount();
- for (SCSIZE j = 0; j < nCount && bValid; ++j) // Current Filter settings
- if (aParam.GetEntry(j).bDoQuery)
- {
- //! Summarises DrawButtons queries!
-
- ScQueryEntry& rEntry = aParam.GetEntry(j);
- if (j>0)
- if (rEntry.eConnect != SC_AND)
- bValid = false;
- if (rEntry.nField == nCol)
- {
- OUString aQueryStr = rEntry.GetQueryItem().maString.getString();
- if (rEntry.eOp == SC_EQUAL)
- {
- if (!aQueryStr.isEmpty())
- {
- nSelPos = mpFilterBox->GetEntryPos(aQueryStr);
- }
- }
- else if ( rEntry.eOp == SC_TOPVAL && aQueryStr == "10" )
- nSelPos = SC_AUTOFILTER_TOP10;
- else
- nSelPos = SC_AUTOFILTER_CUSTOM;
- }
- }
-
- if (!bValid)
- nSelPos = SC_AUTOFILTER_CUSTOM;
- }
- }
- else
+ sal_uLong nIndex = static_cast<const SfxUInt32Item*>(pDoc->GetAttr(
+ nCol, nRow, nTab, ATTR_VALIDDATA ))->GetValue();
+ if ( nIndex )
{
-
- sal_uLong nIndex = static_cast<const SfxUInt32Item*>(pDoc->GetAttr(
- nCol, nRow, nTab, ATTR_VALIDDATA ))->GetValue();
- if ( nIndex )
+ const ScValidationData* pData = pDoc->GetValidationEntry( nIndex );
+ if (pData)
{
- const ScValidationData* pData = pDoc->GetValidationEntry( nIndex );
- if (pData)
+ std::unique_ptr<ScTypedStrData> pNew;
+ OUString aDocStr = pDoc->GetString(nCol, nRow, nTab);
+ if ( pDoc->HasValueData( nCol, nRow, nTab ) )
{
- std::unique_ptr<ScTypedStrData> pNew;
- OUString aDocStr = pDoc->GetString(nCol, nRow, nTab);
- if ( pDoc->HasValueData( nCol, nRow, nTab ) )
- {
- double fVal = pDoc->GetValue(ScAddress(nCol, nRow, nTab));
- pNew.reset(new ScTypedStrData(aDocStr, fVal, ScTypedStrData::Value));
- }
- else
- pNew.reset(new ScTypedStrData(aDocStr, 0.0, ScTypedStrData::Standard));
+ double fVal = pDoc->GetValue(ScAddress(nCol, nRow, nTab));
+ pNew.reset(new ScTypedStrData(aDocStr, fVal, ScTypedStrData::Value));
+ }
+ else
+ pNew.reset(new ScTypedStrData(aDocStr, 0.0, ScTypedStrData::Standard));
- bool bSortList = ( pData->GetListType() == css::sheet::TableValidationVisibility::SORTEDASCENDING);
- if ( bSortList )
+ bool bSortList = ( pData->GetListType() == css::sheet::TableValidationVisibility::SORTEDASCENDING);
+ if ( bSortList )
+ {
+ std::vector<ScTypedStrData>::const_iterator itBeg = aStrings.begin(), itEnd = aStrings.end();
+ std::vector<ScTypedStrData>::const_iterator it =
+ std::find_if(itBeg, itEnd, FindTypedStrData(*pNew, true));
+ if (it != itEnd)
+ // Found!
+ nSelPos = std::distance(itBeg, it);
+ }
+ else
+ {
+ ScTypedStrData::EqualCaseSensitive aHdl;
+ std::vector<ScTypedStrData>::const_iterator itBeg = aStrings.begin(), itEnd = aStrings.end();
+ std::vector<ScTypedStrData>::const_iterator it = itBeg;
+ for (; it != itEnd && LISTBOX_ENTRY_NOTFOUND == nSelPos; ++it)
{
- std::vector<ScTypedStrData>::const_iterator itBeg = aStrings.begin(), itEnd = aStrings.end();
- std::vector<ScTypedStrData>::const_iterator it =
- std::find_if(itBeg, itEnd, FindTypedStrData(*pNew, true));
- if (it != itEnd)
- // Found!
+ if (aHdl(*it, *pNew))
nSelPos = std::distance(itBeg, it);
}
- else
- {
- ScTypedStrData::EqualCaseSensitive aHdl;
- std::vector<ScTypedStrData>::const_iterator itBeg = aStrings.begin(), itEnd = aStrings.end();
- std::vector<ScTypedStrData>::const_iterator it = itBeg;
- for (; it != itEnd && LISTBOX_ENTRY_NOTFOUND == nSelPos; ++it)
- {
- if (aHdl(*it, *pNew))
- nSelPos = std::distance(itBeg, it);
- }
- }
}
}
}
- // new (309): Something must always be selected
- if (LISTBOX_ENTRY_NOTFOUND == nSelPos && mpFilterBox->GetEntryCount() > 0 && !bDataSelect)
- nSelPos = 0;
-
// Do not show an empty selection List:
if ( bEmpty )
@@ -1342,19 +1240,10 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
mpFilterBox->SelectEntryPos(nSelPos);
else
{
- if (bDataSelect)
- mpFilterBox->SetNoSelection();
+ mpFilterBox->SetNoSelection();
}
mpFilterBox->EndInit();
-
- if (!bDataSelect)
- {
- // AutoFilter (from MouseButtonDown):
- // The next MouseMove on the FilterBox is like a ButtonDown
- nMouseStatus = SC_GM_FILTER;
- CaptureMouse();
- }
}
}
@@ -2019,7 +1908,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
Rectangle aButtonRect = GetListValButtonRect( aListValPos );
if ( aButtonRect.IsInside( aPos ) )
{
- LaunchDataSelectMenu( aListValPos.Col(), aListValPos.Row(), true );
+ LaunchDataSelectMenu( aListValPos.Col(), aListValPos.Row() );
nMouseStatus = SC_GM_FILTER; // not set in DoAutoFilterMenue for bDataSelect
CaptureMouse();
@@ -2265,7 +2154,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if ( aEndPos != aBlockRange.aEnd )
{
- pViewData->GetDocShell()->GetDocFunc().ResizeMatrix( aBlockRange, aEndPos, false );
+ pViewData->GetDocShell()->GetDocFunc().ResizeMatrix( aBlockRange, aEndPos );
pViewData->GetView()->MarkRange( ScRange( aBlockRange.aStart, aEndPos ) );
}
}
@@ -3012,7 +2901,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() );
if ( pHdl )
{
- pHdl->InputCommand( rCEvt, true );
+ pHdl->InputCommand( rCEvt );
return; // done
}
@@ -4287,13 +4176,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
{
if ( bIsLink )
{
- // call with bApi = sal_True to avoid error messages in drop handler
- bDone = pView->LinkBlock( aSource, aDest.aStart, true /*bApi*/ );
+ bDone = pView->LinkBlock( aSource, aDest.aStart );
}
else
{
- // call with bApi = sal_True to avoid error messages in drop handler
- bDone = pView->MoveBlockTo( aSource, aDest.aStart, bIsMove, true /*bRecord*/, true /*bPaint*/, true /*bApi*/ );
+ bDone = pView->MoveBlockTo( aSource, aDest.aStart, bIsMove );
}
}
@@ -4313,7 +4200,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
( eCmd == DEL_CELLSLEFT && nDestPosY == aSource.aStart.Row() ) )
{
// call with bApi = sal_True to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().DeleteCells( aSource, nullptr, eCmd, true /*bRecord*/, true /*bApi*/ );
+ bDone = pDocSh->GetDocFunc().DeleteCells( aSource, nullptr, eCmd, true /*bApi*/ );
if ( bDone )
{
if ( eCmd == DEL_CELLSUP && nDestPosY > aSource.aEnd.Row() )
@@ -4529,7 +4416,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
pView->MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, false, false );
pView->InsertAreaLink( rData.aLinkDoc, EMPTY_OUSTRING, EMPTY_OUSTRING,
- rData.aLinkArea, 0 );
+ rData.aLinkArea );
}
else
{
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 2ee209254548..3b829ad0aeba 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -494,10 +494,10 @@ void ScGridWindow::DPLaunchFieldPopupMenu(
// Populate the menus.
ScTabViewShell* pViewShell = pViewData->GetViewShell();
mpDPFieldPopup->addMenuItem(
- SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_ASC), true,
+ SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_ASC),
new PopupSortAction(rPos, PopupSortAction::ASCENDING, 0, pViewShell));
mpDPFieldPopup->addMenuItem(
- SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_DESC), true,
+ SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_DESC),
new PopupSortAction(rPos, PopupSortAction::DESCENDING, 0, pViewShell));
ScMenuFloatingWindow* pSubMenu = mpDPFieldPopup->addSubMenuItem(
SC_STRLOAD(RID_POPUP_FILTER, STR_MENU_SORT_CUSTOM), !aUserSortNames.empty());
@@ -508,7 +508,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu(
for (size_t i = 0; i < n; ++i)
{
pSubMenu->addMenuItem(
- aUserSortNames[i], true,
+ aUserSortNames[i],
new PopupSortAction(rPos, PopupSortAction::CUSTOM, static_cast<sal_uInt16>(i), pViewShell));
}
}
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 95b6dfea8b66..71ad2e55a8be 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -138,7 +138,7 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const Rectangle& rInnerP
long nBHeight = nVer + aTextSize.Height() + 1;
Size aButSize( nBWidth, nBHeight );
long nButtonPos = bLayoutRTL ? aOuter.Left() : aOuter.Right()-nBWidth+1;
- aComboButton.Draw( Point(nButtonPos, nButtonY), aButSize, false );
+ aComboButton.Draw( Point(nButtonPos, nButtonY), aButSize );
if (pButtonViewData)
pButtonViewData->SetScenButSize( aButSize );
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index bf2e3910477e..721f7285d68b 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -838,7 +838,7 @@ bool ScOutlineWindow::ImplMoveFocusByLevel( bool bForward )
return bWrapped;
}
-bool ScOutlineWindow::ImplMoveFocusByTabOrder( bool bForward, bool bFindVisible )
+bool ScOutlineWindow::ImplMoveFocusByTabOrder( bool bForward )
{
bool bRet = false;
size_t nOldLevel = mnFocusLevel;
@@ -858,7 +858,7 @@ bool ScOutlineWindow::ImplMoveFocusByTabOrder( bool bForward, bool bFindVisible
if ( bForward && bWrapInLevel )
bRet |= ImplMoveFocusByLevel( bForward );
}
- while ( bFindVisible && !IsFocusButtonVisible() && ((nOldLevel != mnFocusLevel) || (nOldEntry != mnFocusEntry)) );
+ while ( !IsFocusButtonVisible() && ((nOldLevel != mnFocusLevel) || (nOldEntry != mnFocusEntry)) );
return bRet;
}
@@ -870,7 +870,7 @@ void ScOutlineWindow::ImplMoveFocusToVisible( bool bForward )
ImplMoveFocusByEntry( bForward, true );
// then try to find any other entry
if ( !IsFocusButtonVisible() )
- ImplMoveFocusByTabOrder( bForward, true );
+ ImplMoveFocusByTabOrder( bForward );
}
void ScOutlineWindow::MoveFocusByEntry( bool bForward )
@@ -890,7 +890,7 @@ void ScOutlineWindow::MoveFocusByLevel( bool bForward )
void ScOutlineWindow::MoveFocusByTabOrder( bool bForward )
{
HideFocus();
- ImplMoveFocusByTabOrder( bForward, true );
+ ImplMoveFocusByTabOrder( bForward );
ShowFocus();
}
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 439a5b8375cd..f9bfa0127e02 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1665,7 +1665,7 @@ void ScPrintFunc::MakeEditEngine()
{
// can't use document's edit engine pool here,
// because pool must have twips as default metric
- pEditEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), true );
+ pEditEngine = new ScHeaderEditEngine( EditEngine::CreatePool() );
pEditEngine->EnableUndo(false);
//fdo#45869 we want text to be positioned as it would be for the
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 9f5d69928057..1b015d9c37a1 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2108,24 +2108,18 @@ void ScTabView::SplitAtCursor()
RepeatResize();
}
-void ScTabView::SplitAtPixel( const Point& rPixel, bool bHor, bool bVer )
+void ScTabView::SplitAtPixel( const Point& rPixel )
{
// pixel is relative to the entire View, not to the first GridWin
- if (bHor)
- {
- if ( rPixel.X() > 0 )
- DoHSplit( rPixel.X() );
- else
- DoHSplit( 0 );
- }
- if (bVer)
- {
- if ( rPixel.Y() > 0 )
- DoVSplit( rPixel.Y() );
- else
- DoVSplit( 0 );
- }
+ if ( rPixel.X() > 0 )
+ DoHSplit( rPixel.X() );
+ else
+ DoHSplit( 0 );
+ if ( rPixel.Y() > 0 )
+ DoVSplit( rPixel.Y() );
+ else
+ DoVSplit( 0 );
RepeatResize();
}
@@ -2234,7 +2228,7 @@ void ScTabView::StartDataSelect()
if (pAttr->HasAutoFilter())
pWin->LaunchAutoFilterMenu(nCol, nRow);
else
- pWin->LaunchDataSelectMenu(nCol, nRow, true);
+ pWin->LaunchDataSelectMenu(nCol, nRow);
}
void ScTabView::EnableRefInput(bool bFlag)
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 74cf5a315475..c7b7b2e39843 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1744,7 +1744,7 @@ bool ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& r
void ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
SCsCOL& rPosX, SCsROW& rPosY,
- bool bTestMerge, bool bRepair, bool bNextIfLarge )
+ bool bTestMerge, bool bRepair )
{
// special handling of 0 is now in ScViewFunctionSet::SetCursorAtPoint
@@ -1796,22 +1796,20 @@ void ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
}
}
- if (bNextIfLarge) // cells to big?
+ // cells to big?
+ if ( rPosX == nStartPosX && nClickX > 0 )
{
- if ( rPosX == nStartPosX && nClickX > 0 )
- {
- if (pView)
- aScrSize.Width() = pView->GetGridWidth(eHWhich);
- if ( nClickX > aScrSize.Width() )
- ++rPosX;
- }
- if ( rPosY == nStartPosY && nClickY > 0 )
- {
- if (pView)
- aScrSize.Height() = pView->GetGridHeight(eVWhich);
- if ( nClickY > aScrSize.Height() )
- ++rPosY;
- }
+ if (pView)
+ aScrSize.Width() = pView->GetGridWidth(eHWhich);
+ if ( nClickX > aScrSize.Width() )
+ ++rPosX;
+ }
+ if ( rPosY == nStartPosY && nClickY > 0 )
+ {
+ if (pView)
+ aScrSize.Height() = pView->GetGridHeight(eVWhich);
+ if ( nClickY > aScrSize.Height() )
+ ++rPosY;
}
if (rPosX<0) rPosX=0;
@@ -2931,10 +2929,10 @@ Point ScViewData::GetMousePosPixel()
return pView->GetMousePosPixel();
}
-void ScViewData::UpdateInputHandler( bool bForce, bool bStopEditing )
+void ScViewData::UpdateInputHandler( bool bForce )
{
if (pViewShell)
- pViewShell->UpdateInputHandler( bForce, bStopEditing );
+ pViewShell->UpdateInputHandler( bForce );
}
bool ScViewData::IsOle()
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 54c019aae01c..b455fb9fe2f7 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1011,7 +1011,7 @@ bool ScViewFunc::TestMergeCells() // pre-test (for menu)
return false;
}
-bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bRecord, bool bCenter )
+bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bCenter )
{
// Editable- and Being-Nested- test must be at the beginning (in DocFunc too),
// so that the Contents-QueryBox won't appear
@@ -1089,7 +1089,7 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bRecord, bool bC
if (bOk)
{
- bOk = pDocSh->GetDocFunc().MergeCells( aMergeOption, rDoContents, bRecord, bApi );
+ bOk = pDocSh->GetDocFunc().MergeCells( aMergeOption, rDoContents, true/*bRecord*/, bApi );
if (bOk)
{
@@ -1199,7 +1199,7 @@ void ScViewFunc::FillSimple( FillDir eDir )
{
ScDocShell* pDocSh = GetViewData().GetDocShell();
const ScMarkData& rMark = GetViewData().GetMarkData();
- bool bSuccess = pDocSh->GetDocFunc().FillSimple( aRange, &rMark, eDir, true/*bRecord*/, false );
+ bool bSuccess = pDocSh->GetDocFunc().FillSimple( aRange, &rMark, eDir, false );
if (bSuccess)
{
pDocSh->UpdateOle(&GetViewData());
@@ -1224,7 +1224,7 @@ void ScViewFunc::FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
const ScMarkData& rMark = GetViewData().GetMarkData();
bool bSuccess = pDocSh->GetDocFunc().
FillSeries( aRange, &rMark, eDir, eCmd, eDateCmd,
- fStart, fStep, fMax, true/*bRecord*/, false );
+ fStart, fStep, fMax, false );
if (bSuccess)
{
pDocSh->UpdateOle(&GetViewData());
@@ -1246,7 +1246,7 @@ void ScViewFunc::FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow,
ScDocShell* pDocSh = GetViewData().GetDocShell();
const ScMarkData& rMark = GetViewData().GetMarkData();
bool bSuccess = pDocSh->GetDocFunc().
- FillAuto( aRange, &rMark, eDir, nCount, true/*bRecord*/, false );
+ FillAuto( aRange, &rMark, eDir, nCount, false );
if (bSuccess)
{
MarkRange( aRange, false ); // aRange was modified in FillAuto
@@ -1564,7 +1564,7 @@ void ScViewFunc::ConvertFormulaToValue()
aRange.PutInOrder();
ScDocShell* pDocSh = GetViewData().GetDocShell();
- pDocSh->GetDocFunc().ConvertFormulaToValue(aRange, true, true);
+ pDocSh->GetDocFunc().ConvertFormulaToValue(aRange, true);
pDocSh->PostPaint(aRange, PAINT_GRID);
}
@@ -1580,7 +1580,7 @@ void ScViewFunc::TransliterateText( sal_Int32 nType )
}
bool bSuccess = GetViewData().GetDocShell()->GetDocFunc().
- TransliterateText( aFuncMark, nType, true, false );
+ TransliterateText( aFuncMark, nType, false );
if (bSuccess)
{
GetViewData().GetViewShell()->UpdateInputHandler();
@@ -1618,7 +1618,7 @@ void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo )
ScDocShell* pDocSh = GetViewData().GetDocShell();
ScMarkData& rMark = GetViewData().GetMarkData();
- bool bSuccess = pDocSh->GetDocFunc().AutoFormat( aRange, &rMark, nFormatNo, true/*bRecord*/, false );
+ bool bSuccess = pDocSh->GetDocFunc().AutoFormat( aRange, &rMark, nFormatNo, false );
if (bSuccess)
pDocSh->UpdateOle(&GetViewData());
}
@@ -2353,7 +2353,7 @@ bool ScViewFunc::SetTabBgColor( const Color& rColor, SCTAB nTab )
bool ScViewFunc::SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfoList )
{
- bool bSuccess = GetViewData().GetDocShell()->GetDocFunc().SetTabBgColor( rUndoSetTabBgColorInfoList, true, false );
+ bool bSuccess = GetViewData().GetDocShell()->GetDocFunc().SetTabBgColor( rUndoSetTabBgColorInfoList, false );
if (bSuccess)
{
GetViewData().GetViewShell()->UpdateInputHandler();
@@ -2363,7 +2363,7 @@ bool ScViewFunc::SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfo
void ScViewFunc::InsertAreaLink( const OUString& rFile,
const OUString& rFilter, const OUString& rOptions,
- const OUString& rSource, sal_uLong nRefresh )
+ const OUString& rSource )
{
ScDocShell* pDocSh = GetViewData().GetDocShell();
SCCOL nPosX = GetViewData().GetCurX();
@@ -2371,7 +2371,7 @@ void ScViewFunc::InsertAreaLink( const OUString& rFile,
SCTAB nTab = GetViewData().GetTabNo();
ScAddress aPos( nPosX, nPosY, nTab );
- pDocSh->GetDocFunc().InsertAreaLink( rFile, rFilter, rOptions, rSource, aPos, nRefresh, false, false );
+ pDocSh->GetDocFunc().InsertAreaLink( rFile, rFilter, rOptions, rSource, aPos, 0/*nRefresh*/, false, false );
}
void ScViewFunc::InsertTableLink( const OUString& rFile,
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 1acbd4d54c68..c08b20a5e10b 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -161,14 +161,14 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, bool bCut, bool bApi, bool bI
{
ScRangeList aRangeList;
aRangeList.Append( aRange );
- bDone = CopyToClip( pClipDoc, aRangeList, bCut, bApi, bIncludeObjects, bStopEdit, false );
+ bDone = CopyToClip( pClipDoc, aRangeList, bCut, bApi, bIncludeObjects, bStopEdit );
}
else if (eMarkType == SC_MARK_MULTI)
{
ScRangeList aRangeList;
rMark.MarkToSimple();
rMark.FillRangeListWithMarks(&aRangeList, false);
- bDone = CopyToClip( pClipDoc, aRangeList, bCut, bApi, bIncludeObjects, bStopEdit, false );
+ bDone = CopyToClip( pClipDoc, aRangeList, bCut, bApi, bIncludeObjects, bStopEdit );
}
else
{
@@ -180,7 +180,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, bool bCut, bool bApi, bool bI
}
// Copy the content of the Range into clipboard.
-bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, bool bCut, bool bApi, bool bIncludeObjects, bool bStopEdit, bool bUseRangeForVBA )
+bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, bool bCut, bool bApi, bool bIncludeObjects, bool bStopEdit )
{
if ( rRanges.empty() )
return false;
@@ -220,11 +220,10 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
}
- if ( !bUseRangeForVBA )
- // is this necessary?, will setting the doc id upset the
- // following paste operation with range? would be nicer to just set this always
- // and lose the 'if' above
- aClipParam.setSourceDocID( pDoc->GetDocumentID() );
+ // is this necessary?, will setting the doc id upset the
+ // following paste operation with range? would be nicer to just set this always
+ // and lose the 'if' above
+ aClipParam.setSourceDocID( pDoc->GetDocumentID() );
if (SfxObjectShell* pObjectShell = pDoc->GetDocumentShell())
{
@@ -236,8 +235,8 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
pClipDoc->SetClipOptions(aOptions);
}
- pDoc->CopyToClip( aClipParam, pClipDoc, &rMark, false, false, bIncludeObjects, true, bUseRangeForVBA );
- if ( !bUseRangeForVBA && pDoc && pClipDoc )
+ pDoc->CopyToClip( aClipParam, pClipDoc, &rMark, false, false, bIncludeObjects );
+ if ( pDoc && pClipDoc )
{
ScDrawLayer* pDrawLayer = pClipDoc->GetDrawLayer();
if ( pDrawLayer )
@@ -366,7 +365,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
}
if (!bValidRanges)
break;
- pDoc->CopyToClip(aClipParam, pDocClip.get(), &rMark, false, false, bIncludeObjects, true, bUseRangeForVBA );
+ pDoc->CopyToClip(aClipParam, pDocClip.get(), &rMark, false, false, bIncludeObjects );
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
if ( pChangeTrack )
@@ -1796,7 +1795,7 @@ void ScViewFunc::PostPasteFromClip(const ScRangeList& rPasteRanges, const ScMark
// inside the doc
bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
- bool bCut, bool bRecord, bool bPaint, bool bApi )
+ bool bCut )
{
ScDocShell* pDocSh = GetViewData().GetDocShell();
HideAllCursors();
@@ -1808,11 +1807,8 @@ bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
{
// moving within one table and several tables selected -> apply to all selected tables
- if ( bRecord )
- {
- OUString aUndo = ScGlobal::GetRscString( bCut ? STR_UNDO_MOVE : STR_UNDO_COPY );
- pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
- }
+ OUString aUndo = ScGlobal::GetRscString( bCut ? STR_UNDO_MOVE : STR_UNDO_COPY );
+ pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
// collect ranges of consecutive selected tables
@@ -1835,20 +1831,19 @@ bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
aLocalDest.SetTab( nStartTab );
bSuccess = pDocSh->GetDocFunc().MoveBlock(
- aLocalSource, aLocalDest, bCut, bRecord, bPaint, bApi );
+ aLocalSource, aLocalDest, bCut, true/*bRecord*/, true/*bPaint*/, true/*bApi*/ );
nStartTab = nEndTab + 1;
}
}
- if ( bRecord )
- pDocSh->GetUndoManager()->LeaveListAction();
+ pDocSh->GetUndoManager()->LeaveListAction();
}
else
{
// move the block as specified
bSuccess = pDocSh->GetDocFunc().MoveBlock(
- rSource, rDestPos, bCut, bRecord, bPaint, bApi );
+ rSource, rDestPos, bCut, true/*bRecord*/, true/*bPaint*/, true/*bApi*/ );
}
ShowAllCursors();
@@ -1883,7 +1878,7 @@ bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
// link inside the doc
-bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, bool bApi )
+bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos )
{
// check overlapping
@@ -1895,8 +1890,6 @@ bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, b
if ( rSource.aStart.Col() <= nDestEndCol && rDestPos.Col() <= rSource.aEnd.Col() &&
rSource.aStart.Row() <= nDestEndRow && rDestPos.Row() <= rSource.aEnd.Row() )
{
- if (!bApi)
- ErrorMessage( STR_ERR_LINKOVERLAP );
return false;
}
}
@@ -1979,8 +1972,7 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
nStartCol, nCurrentRow, nStartTab,
nUndoEndCol, nUndoEndRow, nEndTab, rMark,
pUndoDoc, pRedoDoc, nUndoFlags,
- pUndoData, nullptr, nullptr, nullptr,
- false ); // FALSE = Redo data not yet copied
+ pUndoData, nullptr, nullptr, nullptr );
pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), true );
sal_uInt16 nPaint = PAINT_GRID;
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 7c46a85e8df8..f43695d3c971 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -209,9 +209,9 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
const ScPatternAttr* pOldPattern = rDoc.GetPattern( nCol, nRow, nTab );
const ScStyleSheet* pSrcStyle = pSource->GetStyleSheet();
if ( pSrcStyle && pSrcStyle != pOldPattern->GetStyleSheet() )
- rFunc.ApplyStyle( aMark, pSrcStyle->GetName(), true, false );
+ rFunc.ApplyStyle( aMark, pSrcStyle->GetName(), false );
- rFunc.ApplyAttributes( aMark, *pSource, true, false );
+ rFunc.ApplyAttributes( aMark, *pSource, false );
}
if ( bAttrChanged ) // value entered with number format?
@@ -949,7 +949,7 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
bFrame = false;
if (!bFrame)
- ApplySelectionPattern( aNewAttrs ); // standard only
+ ApplySelectionPattern( aNewAttrs ); // standard only
else
{
// if new items are default-items, overwrite the old items:
@@ -1082,8 +1082,7 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem
// pattern only
-void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
- bool bRecord, bool bCursorOnly )
+void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, bool bCursorOnly )
{
ScViewData& rViewData = GetViewData();
ScDocShell* pDocSh = rViewData.GetDocShell();
@@ -1091,7 +1090,8 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
ScMarkData aFuncMark( rViewData.GetMarkData() ); // local copy for UnmarkFiltered
ScViewUtil::UnmarkFiltered( aFuncMark, &rDoc );
- if (bRecord && !rDoc.IsUndoEnabled())
+ bool bRecord = true;
+ if (!rDoc.IsUndoEnabled())
bRecord = false;
// State from old ItemSet doesn't matter for paint flags, as any change will be
@@ -1208,7 +1208,7 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
if (bRecord)
{
ScUndoCursorAttr* pUndo = new ScUndoCursorAttr(
- pDocSh, nCol, nRow, nTab, pOldPat.get(), pNewPat, &rAttr, false );
+ pDocSh, nCol, nRow, nTab, pOldPat.get(), pNewPat, &rAttr );
pUndo->SetEditData(pOldEditData, pNewEditData);
pDocSh->GetUndoManager()->AddUndoAction(pUndo);
}
@@ -1503,14 +1503,14 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd )
}
while ( nCount > 0 )
{
- pDocSh->GetDocFunc().DeleteCells( aDelRange, &rMark, eCmd, true/*bRecord*/, false );
+ pDocSh->GetDocFunc().DeleteCells( aDelRange, &rMark, eCmd, false );
--nCount;
}
}
else
#endif
{
- pDocSh->GetDocFunc().DeleteCells( aRange, &rMark, eCmd, true/*bRecord*/, false );
+ pDocSh->GetDocFunc().DeleteCells( aRange, &rMark, eCmd, false );
}
pDocSh->UpdateOle(&GetViewData());
@@ -1784,7 +1784,7 @@ void ScViewFunc::DeleteContents( InsertDeleteFlags nFlags )
ScDocFunc& rDocFunc = pDocSh->GetDocFunc();
if (bSimple)
- rDocFunc.DeleteCell(aMarkRange.aStart, aFuncMark, nFlags, bRecord, false);
+ rDocFunc.DeleteCell(aMarkRange.aStart, aFuncMark, nFlags, bRecord);
else
rDocFunc.DeleteContents(aFuncMark, nFlags, bRecord, false);
@@ -1820,7 +1820,7 @@ void ScViewFunc::DeleteContents( InsertDeleteFlags nFlags )
void ScViewFunc::SetWidthOrHeight(
bool bWidth, const std::vector<sc::ColRowSpan>& rRanges, ScSizeMode eMode,
- sal_uInt16 nSizeTwips, bool bRecord, bool bPaint, ScMarkData* pMarkData )
+ sal_uInt16 nSizeTwips, bool bRecord, ScMarkData* pMarkData )
{
if (rRanges.empty())
return;
@@ -2051,7 +2051,6 @@ void ScViewFunc::SetWidthOrHeight(
GetViewData().GetView()->UpdateScrollBars();
- if (bPaint)
{
itr = aMarkData.begin();
for (; itr != itrEnd; ++itr)