[Libreoffice-commits] core.git: 4 commits - basic/source dbaccess/source include/basic include/dbaccess include/oox oox/inc oox/source sc/inc sc/source
Noel Grandin
noel at peralex.com
Thu Mar 3 06:11:46 UTC 2016
basic/source/basmgr/basmgr.cxx | 37 ++++-------
basic/source/comp/parser.cxx | 4 -
basic/source/comp/symtbl.cxx | 5 -
basic/source/inc/iosys.hxx | 4 -
basic/source/inc/parser.hxx | 2
basic/source/inc/runtime.hxx | 2
basic/source/inc/symtbl.hxx | 4 -
basic/source/runtime/iosys.cxx | 8 +-
basic/source/runtime/runtime.cxx | 4 -
dbaccess/source/core/dataaccess/ModelImpl.cxx | 5 -
dbaccess/source/core/dataaccess/ModelImpl.hxx | 3
dbaccess/source/ui/app/AppController.cxx | 4 -
dbaccess/source/ui/app/AppController.hxx | 5 -
dbaccess/source/ui/app/AppView.cxx | 4 -
dbaccess/source/ui/app/AppView.hxx | 5 -
dbaccess/source/ui/browser/brwctrlr.cxx | 11 +--
dbaccess/source/ui/browser/dsbrowserDnD.cxx | 4 -
dbaccess/source/ui/inc/WNameMatch.hxx | 2
dbaccess/source/ui/inc/brwctrlr.hxx | 6 -
dbaccess/source/ui/inc/unodatbr.hxx | 2
dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx | 5 -
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 4 -
dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx | 2
dbaccess/source/ui/tabledesign/TEditControl.cxx | 5 -
dbaccess/source/ui/tabledesign/TEditControl.hxx | 2
include/basic/basmgr.hxx | 4 -
include/dbaccess/dbsubcomponentcontroller.hxx | 3
include/oox/core/fastparser.hxx | 2
include/oox/core/xmlfilterbase.hxx | 2
include/oox/helper/binaryinputstream.hxx | 2
include/oox/helper/binaryoutputstream.hxx | 2
include/oox/helper/containerhelper.hxx | 19 +-----
include/oox/ole/axbinarywriter.hxx | 8 +-
include/oox/ole/vbaproject.hxx | 3
include/oox/vml/vmlshape.hxx | 3
oox/inc/drawingml/graphicproperties.hxx | 3
oox/inc/drawingml/textcharacterproperties.hxx | 3
oox/source/core/fastparser.cxx | 4 -
oox/source/core/xmlfilterbase.cxx | 4 -
oox/source/drawingml/fillproperties.cxx | 6 -
oox/source/drawingml/textcharacterproperties.cxx | 4 -
oox/source/helper/binaryinputstream.cxx | 6 -
oox/source/helper/binaryoutputstream.cxx | 7 --
oox/source/helper/containerhelper.cxx | 26 +-------
oox/source/ole/axbinarywriter.cxx | 19 ++----
oox/source/ole/vbaproject.cxx | 4 -
oox/source/vml/vmlshape.cxx | 4 -
sc/inc/address.hxx | 5 -
sc/inc/cellform.hxx | 2
sc/inc/chartlis.hxx | 3
sc/inc/chgviset.hxx | 2
sc/inc/column.hxx | 4 -
sc/inc/compiler.hxx | 5 -
sc/inc/dociter.hxx | 14 +---
sc/inc/document.hxx | 27 +++-----
sc/inc/dpobject.hxx | 7 --
sc/inc/editutil.hxx | 6 -
sc/inc/filter.hxx | 3
sc/inc/global.hxx | 2
sc/inc/miscuno.hxx | 2
sc/inc/progress.hxx | 6 -
sc/inc/rangenam.hxx | 3
sc/inc/rangeutl.hxx | 24 ++-----
sc/inc/scabstdlg.hxx | 7 --
sc/inc/table.hxx | 2
sc/inc/viewopti.hxx | 2
sc/source/core/data/column3.cxx | 4 -
sc/source/core/data/column4.cxx | 12 ---
sc/source/core/data/dociter.cxx | 5 -
sc/source/core/data/documen2.cxx | 4 -
sc/source/core/data/documen8.cxx | 2
sc/source/core/data/document.cxx | 56 ++++++++----------
sc/source/core/data/dpobject.cxx | 4 -
sc/source/core/data/global.cxx | 3
sc/source/core/data/postit.cxx | 6 -
sc/source/core/data/table1.cxx | 4 -
sc/source/core/inc/interpre.hxx | 3
sc/source/core/inc/jumpmatrix.hxx | 2
sc/source/core/tool/address.cxx | 27 ++++----
sc/source/core/tool/cellform.cxx | 11 +--
sc/source/core/tool/chartlis.cxx | 4 -
sc/source/core/tool/compiler.cxx | 6 -
sc/source/core/tool/editutil.cxx | 12 +--
sc/source/core/tool/interpr4.cxx | 6 -
sc/source/core/tool/jumpmatrix.cxx | 4 -
sc/source/core/tool/rangenam.cxx | 5 -
sc/source/core/tool/rangeutl.cxx | 36 ++++-------
sc/source/core/tool/viewopti.cxx | 4 -
sc/source/filter/dif/difexp.cxx | 4 -
sc/source/filter/inc/ftools.hxx | 3
sc/source/ui/attrdlg/scdlgfact.cxx | 10 +--
sc/source/ui/attrdlg/scdlgfact.hxx | 7 --
sc/source/ui/docshell/impex.cxx | 2
sc/source/ui/unoobj/miscuno.cxx | 4 -
sc/source/ui/view/cellsh1.cxx | 2
95 files changed, 270 insertions(+), 385 deletions(-)
New commits:
commit e13ba2d41deb93da53607a924e234730f4e0349c
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 2 16:53:51 2016 +0200
loplugin:unuseddefaultparams in dbaccess
Change-Id: I5f417aea43b4aa841ee45e947b982e6341c7b18b
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index c4c5c5e..aef17d1 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1009,9 +1009,10 @@ void ODatabaseModelImpl::commitStorages()
getDocumentStorageAccess()->commitStorages();
}
-Reference< XStorage > ODatabaseModelImpl::getStorage( const ObjectType _eType, const sal_Int32 _nDesiredMode )
+Reference< XStorage > ODatabaseModelImpl::getStorage( const ObjectType _eType )
{
- return getDocumentStorageAccess()->getDocumentSubStorage( getObjectContainerStorageName( _eType ), _nDesiredMode );
+ return getDocumentStorageAccess()->getDocumentSubStorage( getObjectContainerStorageName( _eType ),
+ css::embed::ElementModes::READWRITE );
}
const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings()
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index 9455767..b2fa15b 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -285,8 +285,7 @@ public:
inline OUString getDocFileLocation() const { return m_sDocFileLocation; }
css::uno::Reference< css::embed::XStorage >
- getStorage(
- const ObjectType _eType, const sal_Int32 _nDesiredMode = css::embed::ElementModes::READWRITE );
+ getStorage( const ObjectType _eType );
// helper
const css::uno::Reference< css::util::XNumberFormatsSupplier >&
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 47f3e46..55aa240 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1765,9 +1765,9 @@ bool OApplicationController::impl_isAlterableView_nothrow( const OUString& _rTab
}
Reference< XComponent > OApplicationController::openElement(const OUString& _sName, ElementType _eType,
- ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand )
+ ElementOpenMode _eOpenMode )
{
- return openElementWithArguments( _sName, _eType, _eOpenMode, _nInstigatorCommand, ::comphelper::NamedValueCollection() );
+ return openElementWithArguments( _sName, _eType, _eOpenMode, 0, ::comphelper::NamedValueCollection() );
}
Reference< XComponent > OApplicationController::openElementWithArguments( const OUString& _sName, ElementType _eType,
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index e73f1ea..f5fd97f 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -152,15 +152,12 @@ namespace dbaui
Defines the type to open
@param _eOpenMode
denotes the mode in which to open the object
- @param _nInstigatorCommand
- denotes the command which instigated the action. Might be 0.
@return the form or report model will only be returned, otherwise <NULL/>
*/
css::uno::Reference< css::lang::XComponent > openElement(
const OUString& _sName,
ElementType _eType,
- ElementOpenMode _eOpenMode,
- sal_uInt16 _nInstigatorCommand = 0
+ ElementOpenMode _eOpenMode
);
/** opens a new sub frame with a table/query/form/report/view, passing additional arguments
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index 56947d1..8365235 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -448,11 +448,11 @@ void OApplicationView::elementReplaced(ElementType _eType
getDetailView()->elementReplaced(_eType, _rOldName, _rNewName );
}
-void OApplicationView::clearPages(bool _bTaskAlso)
+void OApplicationView::clearPages()
{
OSL_ENSURE(m_pWin && getDetailView() && getPanel(),"Detail view is NULL! -> GPF");
getPanel()->clearSelection();
- getDetailView()->clearPages(_bTaskAlso);
+ getDetailView()->clearPages();
}
void OApplicationView::selectContainer(ElementType _eType)
diff --git a/dbaccess/source/ui/app/AppView.hxx b/dbaccess/source/ui/app/AppView.hxx
index 556fcf9..66ff3b8 100644
--- a/dbaccess/source/ui/app/AppView.hxx
+++ b/dbaccess/source/ui/app/AppView.hxx
@@ -181,10 +181,9 @@ namespace dbaui
sal_Int32 getSelectionCount();
/** clears the detail page and the selection on the left side.
- @param _bTaskAlso
- If <TRUE/> the task window will also be cleared.
+ The task window will also be cleared.
*/
- void clearPages(bool _bTaskAlso = true);
+ void clearPages();
/** returns the element names which are selected
@param _rNames
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index f47a075..73a4073 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2295,18 +2295,15 @@ IMPL_LINK_TYPED(SbaXDataBrowserController, OnInvalidateClipboard, Timer*, _pTime
InvalidateFeature(ID_BROWSER_PASTE);
}
-Reference< XPropertySet > SbaXDataBrowserController::getBoundField(sal_uInt16 nViewPos) const
+Reference< XPropertySet > SbaXDataBrowserController::getBoundField() const
{
Reference< XPropertySet > xEmptyReturn;
// get the current column from the grid
- if (nViewPos == (sal_uInt16)-1)
- {
- Reference< css::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY);
- if (!xGrid.is())
+ Reference< css::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY);
+ if (!xGrid.is())
return xEmptyReturn;
- nViewPos = xGrid->getCurrentColumnPosition();
- }
+ sal_uInt16 nViewPos = xGrid->getCurrentColumnPosition();
sal_uInt16 nCurrentCol = getBrowserView()->View2ModelPos(nViewPos);
if (nCurrentCol == (sal_uInt16)-1)
return xEmptyReturn;
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index d7e8e29..c1fd669 100644
--- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx
+++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
@@ -61,7 +61,7 @@ namespace dbaui
using namespace ::dbtools;
using namespace ::svx;
- TransferableHelper* SbaTableQueryBrowser::implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, bool _bAllowConnection )
+ TransferableHelper* SbaTableQueryBrowser::implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType )
{
try
{
@@ -72,7 +72,7 @@ namespace dbaui
SharedConnection xConnection;
if ( CommandType::QUERY != _nCommandType )
{
- if ( _bAllowConnection && !ensureConnection( _pApplyTo, xConnection) )
+ if ( !ensureConnection( _pApplyTo, xConnection) )
return nullptr;
pData = new ODataClipboard(aDSName, _nCommandType, aName, xConnection, getNumberFormatter(), getORB());
}
diff --git a/dbaccess/source/ui/inc/WNameMatch.hxx b/dbaccess/source/ui/inc/WNameMatch.hxx
index e4a96a5..4b4a3f3 100644
--- a/dbaccess/source/ui/inc/WNameMatch.hxx
+++ b/dbaccess/source/ui/inc/WNameMatch.hxx
@@ -39,7 +39,7 @@ namespace dbaui
OColumnTreeBox( vcl::Window* pParent, WinBits nBits = WB_BORDER );
void FillListBox( const ODatabaseExport::TColumnVector& _rList);
- void SetReadOnly(bool _bRo=true) { m_bReadOnly = _bRo; }
+ void SetReadOnly() { m_bReadOnly = true; }
virtual bool Select( SvTreeListEntry* pEntry, bool bSelect=true ) override;
private:
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index 1db7c72..0a08bcd 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -288,9 +288,9 @@ namespace dbaui
bool SaveModified(bool bAskFor = true);
// save the modified record
- css::uno::Reference< css::beans::XPropertySet > getBoundField(sal_uInt16 nViewPos = (sal_uInt16)-1) const;
- // a PropertySet corresponding to the cursor field a column is bound to
- // if nViewPos is (sal_uInt16)-1 (the default) then the field for the current column will be retrieved
+ css::uno::Reference< css::beans::XPropertySet > getBoundField() const;
+ // a PropertySet corresponding to the cursor field a column is bound to.
+ // The field for the current column will be retrieved.
void enterFormAction();
void leaveFormAction();
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index c70fa48..ca3daa2 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -330,7 +330,7 @@ namespace dbaui
void implAdministrate( SvTreeListEntry* _pApplyTo );
TransferableHelper*
- implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, bool _bAllowConnection = true );
+ implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType );
EntryType getEntryType( const SvTreeListEntry* _pEntry ) const;
EntryType getChildType( SvTreeListEntry* _pEntry ) const;
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 03c6e02..3d0a423 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -372,11 +372,10 @@ namespace dbaui
DBSubComponentController_Base::disposing( _rSource );
}
- void DBSubComponentController::appendError( const OUString& _rErrorMessage, const ::dbtools::StandardSQLState _eSQLState,
- const sal_Int32 _nErrorCode )
+ void DBSubComponentController::appendError( const OUString& _rErrorMessage, const ::dbtools::StandardSQLState _eSQLState )
{
m_pImpl->m_aCurrentError.append( ::dbtools::SQLExceptionInfo::TYPE::SQLException, _rErrorMessage, getStandardSQLState( _eSQLState ),
- _nErrorCode );
+ 1000 );
}
void DBSubComponentController::clearError()
{
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 2f321a9..d6d22bb 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1534,7 +1534,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n
invalidateUndoRedo();
}
-OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition, bool bVis, bool bActivate)
+OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition, bool bVis)
{
OQueryTableWindow* pSourceWin = static_cast<OQueryTableWindow*>(jxdSource.pListBox->GetTabWin());
if (!pSourceWin)
@@ -1555,7 +1555,7 @@ OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxd
aInfo->SetDataType(pInf->GetDataType());
aInfo->SetVisible(bVis);
- return InsertField(aInfo, _nColumnPosition, bVis, bActivate);
+ return InsertField(aInfo, _nColumnPosition, bVis);
}
OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _rInfo, sal_uInt16 _nColumnPosition, bool bVis, bool bActivate)
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index 3af7c69..6f80ff7 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -82,7 +82,7 @@ namespace dbaui
virtual void dispose() override;
void initialize();
- OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true, bool bActivate=true );
+ OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true );
OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true, bool bActivate=true );
void InsertColumn( OTableFieldDescRef pEntry, sal_uInt16& _nColumnPosition );
void RemoveColumn( sal_uInt16 _nColumnId );
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index a6e0eff..a7c9e4c 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -436,7 +436,7 @@ void OTableEditorCtrl::SaveCurRow()
pDescrWin->SaveData( pActRow->GetActFieldDescr() );
}
-void OTableEditorCtrl::DisplayData(long nRow, bool bGrabFocus)
+void OTableEditorCtrl::DisplayData(long nRow)
{
// go to the correct cell
SetDataPtr(nRow);
@@ -459,8 +459,7 @@ void OTableEditorCtrl::DisplayData(long nRow, bool bGrabFocus)
RowModified(nRow);
// and re-enable edit mode
- if (bWasEditing || bGrabFocus)
- ActivateCell(nRow, GetCurColumnId(), bGrabFocus);
+ ActivateCell(nRow, GetCurColumnId());
}
void OTableEditorCtrl::CursorMoved()
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index 729cbff..8878677 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -134,7 +134,7 @@ namespace dbaui
void SwitchType( const TOTypeInfoSP& _pType );
/// force displaying of the given row
- void DisplayData( long nRow, bool bGrabFocus = true );
+ void DisplayData( long nRow );
virtual void SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) override;
virtual void SetCellData( long nRow, sal_uInt16 nColId, const css::uno::Any& _rSaveData ) override;
diff --git a/include/dbaccess/dbsubcomponentcontroller.hxx b/include/dbaccess/dbsubcomponentcontroller.hxx
index 9e4248a..b9c9b28 100644
--- a/include/dbaccess/dbsubcomponentcontroller.hxx
+++ b/include/dbaccess/dbsubcomponentcontroller.hxx
@@ -107,8 +107,7 @@ namespace dbaui
*/
void appendError(
const OUString& _rErrorMessage,
- const ::dbtools::StandardSQLState _eSQLState = ::dbtools::StandardSQLState::GENERAL_ERROR,
- const sal_Int32 _nErrorCode = 1000
+ const ::dbtools::StandardSQLState _eSQLState = ::dbtools::StandardSQLState::GENERAL_ERROR
);
/** clears the error state.
commit bd2bf6bd559163389d1e6b6b948fc29cee5f13f5
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 2 16:44:45 2016 +0200
loplugin:unuseddefaultparams in basic
Change-Id: I286efdac6af47a859693fccc71b445915f76945c
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 12f015a..533fb0c 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -713,7 +713,7 @@ void BasicManager::ImpCreateStdLib( StarBASIC* pParentFromStdLib )
pStdLib->SetFlag( SbxFlagBits::DontStore | SbxFlagBits::ExtSearch );
}
-void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBaseURL, bool bLoadLibs )
+void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBaseURL )
{
tools::SvRef<SotStorageStream> xManagerStream = rStorage.OpenSotStream( szManagerStream, eStreamReadMode );
@@ -793,7 +793,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase
mpImpl->aLibs.push_back(std::unique_ptr<BasicLibInfo>(pInfo));
// Libs from external files should be loaded only when necessary.
// But references are loaded at once, otherwise some big customers get into trouble
- if ( bLoadLibs && pInfo->DoLoad() &&
+ if ( pInfo->DoLoad() &&
( !pInfo->IsExtern() || pInfo->IsReference()))
{
ImpLoadLibrary( pInfo, &rStorage );
@@ -928,7 +928,7 @@ BasicLibInfo* BasicManager::CreateLibInfo()
return pInf;
}
-bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage, bool bInfosOnly )
+bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage )
{
try {
DBG_ASSERT( pLibInfo, "LibInfo!?" );
@@ -982,29 +982,18 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
bool bLoaded = false;
if ( xBasicStream->Seek( STREAM_SEEK_TO_END ) != 0 )
{
- if ( !bInfosOnly )
+ if ( !pLibInfo->GetLib().Is() )
{
- if ( !pLibInfo->GetLib().Is() )
- {
- pLibInfo->SetLib( new StarBASIC( GetStdLib(), mbDocMgr ) );
- }
- xBasicStream->SetBufferSize( 1024 );
- xBasicStream->Seek( STREAM_SEEK_TO_BEGIN );
- bLoaded = ImplLoadBasic( *xBasicStream, pLibInfo->GetLibRef() );
- xBasicStream->SetBufferSize( 0 );
- StarBASICRef xStdLib = pLibInfo->GetLib();
- xStdLib->SetName( pLibInfo->GetLibName() );
- xStdLib->SetModified( false );
- xStdLib->SetFlag( SbxFlagBits::DontStore );
- }
- else
- {
- // Skip Basic...
- xBasicStream->Seek( STREAM_SEEK_TO_BEGIN );
- ImplEncryptStream( *xBasicStream );
- SbxBase::Skip( *xBasicStream );
- bLoaded = true;
+ pLibInfo->SetLib( new StarBASIC( GetStdLib(), mbDocMgr ) );
}
+ xBasicStream->SetBufferSize( 1024 );
+ xBasicStream->Seek( STREAM_SEEK_TO_BEGIN );
+ bLoaded = ImplLoadBasic( *xBasicStream, pLibInfo->GetLibRef() );
+ xBasicStream->SetBufferSize( 0 );
+ StarBASICRef xStdLib = pLibInfo->GetLib();
+ xStdLib->SetName( pLibInfo->GetLibName() );
+ xStdLib->SetModified( false );
+ xStdLib->SetFlag( SbxFlagBits::DontStore );
}
if ( !bLoaded )
{
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 35481d6..f9934b0 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -243,10 +243,10 @@ void SbiParser::Exit()
Error( ERRCODE_BASIC_BAD_EXIT );
}
-bool SbiParser::TestSymbol( bool bKwdOk )
+bool SbiParser::TestSymbol()
{
Peek();
- if( eCurTok == SYMBOL || ( bKwdOk && IsKwd( eCurTok ) ) )
+ if( eCurTok == SYMBOL )
{
Next(); return true;
}
diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index c75f7c6..7d96926 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -52,14 +52,13 @@ const OUString& SbiStringPool::Find( sal_uInt32 n ) const
return aData[n - 1];
}
-short SbiStringPool::Add( const OUString& rVal, bool bNoCase )
+short SbiStringPool::Add( const OUString& rVal )
{
sal_uInt32 n = aData.size();
for( sal_uInt32 i = 0; i < n; ++i )
{
OUString& p = aData[i];
- if( ( bNoCase && p == rVal )
- || ( !bNoCase && p.equalsIgnoreAsciiCase( rVal ) ) )
+ if( p == rVal )
return i+1;
}
diff --git a/basic/source/inc/iosys.hxx b/basic/source/inc/iosys.hxx
index 1b9964b..0902407 100644
--- a/basic/source/inc/iosys.hxx
+++ b/basic/source/inc/iosys.hxx
@@ -100,9 +100,9 @@ public:
void ResetChannel() { nChan = 0; }
void Open( short, const OString&, StreamMode, SbiStreamFlags, short );
void Close();
- void Read(OString&, short = 0);
+ void Read(OString&);
char Read();
- void Write(const OUString&, short = 0);
+ void Write(const OUString&);
// 0 == bad channel or no SvStream (nChannel=0..CHANNELS-1)
SbiStream* GetStream( short nChannel ) const;
void CloseAll(); // JSM
diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx
index 96683f5..fa60d6d 100644
--- a/basic/source/inc/parser.hxx
+++ b/basic/source/inc/parser.hxx
@@ -92,7 +92,7 @@ public:
bool HasGlobalCode();
bool TestToken( SbiToken );
- bool TestSymbol( bool bKwdOk=false );
+ bool TestSymbol();
bool TestComma();
void TestEoln();
diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx
index 5c082ee..2508d9e 100644
--- a/basic/source/inc/runtime.hxx
+++ b/basic/source/inc/runtime.hxx
@@ -299,7 +299,7 @@ class SbiRuntime
void PushVar( SbxVariable* );
SbxVariableRef PopVar();
- SbxVariable* GetTOS( short=0 );
+ SbxVariable* GetTOS();
void TOSMakeTemp();
void ClearExprStack();
diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index 2f75fa8..cc30090 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -41,9 +41,7 @@ public:
SbiStringPool();
~SbiStringPool();
sal_uInt32 GetSize() const { return aData.size(); }
- // From 8.4.1999: default changed to true because of #64236 -
- // change it back to false when the bug is cleanly removed.
- short Add( const OUString&, bool=true );
+ short Add( const OUString& );
short Add( double, SbxDataType );
const OUString& Find( sal_uInt32 ) const;
};
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index a6cdf58..e7c8908 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -852,7 +852,7 @@ void SbiIoSystem::Shutdown()
}
-void SbiIoSystem::Read(OString& rBuf, short n)
+void SbiIoSystem::Read(OString& rBuf)
{
if( !nChan )
{
@@ -864,7 +864,7 @@ void SbiIoSystem::Read(OString& rBuf, short n)
}
else
{
- nError = pChan[ nChan ]->Read( rBuf, n );
+ nError = pChan[ nChan ]->Read( rBuf );
}
}
@@ -892,7 +892,7 @@ char SbiIoSystem::Read()
return ch;
}
-void SbiIoSystem::Write(const OUString& rBuf, short n)
+void SbiIoSystem::Write(const OUString& rBuf)
{
if( !nChan )
{
@@ -904,7 +904,7 @@ void SbiIoSystem::Write(const OUString& rBuf, short n)
}
else
{
- nError = pChan[ nChan ]->Write( OUStringToOString(rBuf, osl_getThreadTextEncoding()), n );
+ nError = pChan[ nChan ]->Write( OUStringToOString(rBuf, osl_getThreadTextEncoding()) );
}
}
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 7380754..caf5727 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1014,9 +1014,9 @@ void SbiRuntime::ClearExprStack()
// Take variable from the expression-stack without removing it
// n counts from 0
-SbxVariable* SbiRuntime::GetTOS( short n )
+SbxVariable* SbiRuntime::GetTOS()
{
- n = nExprLvl - n - 1;
+ short n = nExprLvl - 1;
#ifdef DBG_UTIL
if( n < 0 )
{
diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx
index c9227ee..7277585 100644
--- a/include/basic/basmgr.hxx
+++ b/include/basic/basmgr.hxx
@@ -121,11 +121,11 @@ private:
BASIC_DLLPRIVATE void Init();
protected:
- bool ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage, bool bInfosOnly = false );
+ bool ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage );
void ImpCreateStdLib( StarBASIC* pParentFromStdLib );
void ImpMgrNotLoaded( const OUString& rStorageName );
BasicLibInfo* CreateLibInfo();
- void LoadBasicManager( SotStorage& rStorage, const OUString& rBaseURL, bool bLoadBasics = true );
+ void LoadBasicManager( SotStorage& rStorage, const OUString& rBaseURL );
void LoadOldBasicManager( SotStorage& rStorage );
bool ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const;
static bool ImplEncryptStream( SvStream& rStream );
commit 2b7215e6fa12cd947bdbbe195909642a850cfd69
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 2 16:39:41 2016 +0200
loplugin:unuseddefaultparams in oox
Change-Id: If05662102e161d3dd56bbb6ed3964e63ba853cf9
diff --git a/include/oox/core/fastparser.hxx b/include/oox/core/fastparser.hxx
index e19bdeb..946e6541 100644
--- a/include/oox/core/fastparser.hxx
+++ b/include/oox/core/fastparser.hxx
@@ -71,7 +71,7 @@ public:
/** Parses a stream from the passed storage with the specified name.
@param bCloseStream True = closes the stream after parsing. */
- void parseStream( StorageBase& rStorage, const OUString& rStreamName, bool bCloseStream = false )
+ void parseStream( StorageBase& rStorage, const OUString& rStreamName )
throw( css::xml::sax::SAXException, css::io::IOException, css::uno::RuntimeException );
css::uno::Reference< css::xml::sax::XFastTokenHandler >
diff --git a/include/oox/core/xmlfilterbase.hxx b/include/oox/core/xmlfilterbase.hxx
index e2415b3..b55a421 100644
--- a/include/oox/core/xmlfilterbase.hxx
+++ b/include/oox/core/xmlfilterbase.hxx
@@ -146,7 +146,7 @@ public:
@return Added relation Id.
*/
- OUString addRelation( const OUString& rType, const OUString& rTarget, bool bExternal = false );
+ OUString addRelation( const OUString& rType, const OUString& rTarget );
/** Adds new relation to part's relations.
diff --git a/include/oox/helper/binaryinputstream.hxx b/include/oox/helper/binaryinputstream.hxx
index fba55a0..101f1f0 100644
--- a/include/oox/helper/binaryinputstream.hxx
+++ b/include/oox/helper/binaryinputstream.hxx
@@ -188,7 +188,7 @@ public:
/** Copies nBytes bytes from the current position to the passed output stream.
*/
- void copyToStream( BinaryOutputStream& rOutStrm, sal_Int64 nBytes = SAL_MAX_INT64, sal_Int32 nAtomSize = 1 );
+ void copyToStream( BinaryOutputStream& rOutStrm, sal_Int64 nBytes = SAL_MAX_INT64 );
protected:
/** This dummy default c'tor will never call the c'tor of the virtual base
diff --git a/include/oox/helper/binaryoutputstream.hxx b/include/oox/helper/binaryoutputstream.hxx
index 486b4ef..8e315fa 100644
--- a/include/oox/helper/binaryoutputstream.hxx
+++ b/include/oox/helper/binaryoutputstream.hxx
@@ -73,7 +73,7 @@ public:
BinaryOutputStream& WriteUInt32(sal_uInt32 x) { writeValue(x); return *this; }
BinaryOutputStream& WriteInt64(sal_Int64 x) { writeValue(x); return *this; }
- void writeCompressedUnicodeArray( const OUString& rString, bool bCompressed, bool bAllowNulChars = false );
+ void writeCompressedUnicodeArray( const OUString& rString, bool bCompressed );
void writeCharArrayUC( const OUString& rString, rtl_TextEncoding eTextEnc, bool bAllowNulChars = false );
diff --git a/include/oox/helper/containerhelper.hxx b/include/oox/helper/containerhelper.hxx
index 66d098f..6fc6bd7 100644
--- a/include/oox/helper/containerhelper.hxx
+++ b/include/oox/helper/containerhelper.hxx
@@ -150,8 +150,7 @@ public:
static OUString getUnusedName(
const css::uno::Reference< css::container::XNameAccess >& rxNameAccess,
const OUString& rSuggestedName,
- sal_Unicode cSeparator,
- sal_Int32 nFirstIndexToAppend = 1 );
+ sal_Unicode cSeparator );
/** Inserts an object into a name container.
@@ -167,8 +166,7 @@ public:
static bool insertByName(
const css::uno::Reference< css::container::XNameContainer >& rxNameContainer,
const OUString& rName,
- const css::uno::Any& rObject,
- bool bReplaceOldExisting = true );
+ const css::uno::Any& rObject );
/** Inserts an object into a name container.
@@ -184,13 +182,9 @@ public:
@param rObject The object to be inserted.
- @param bRenameOldExisting Specifies behaviour if an object with the
- suggested name already exists. If false (default), the new object
- will be inserted with a name not yet extant in the container (this
- is done by appending a numerical index to the suggested name). If
- true, the existing object will be removed and inserted with an
- unused name, and the new object will be inserted with the suggested
- name.
+ The new object
+ will be inserted with a name not yet extant in the container (this
+ is done by appending a numerical index to the suggested name).
@return The final name the object is inserted with. Will always be
equal to the suggested name, if parameter bRenameOldExisting is
@@ -200,8 +194,7 @@ public:
const css::uno::Reference< css::container::XNameContainer >& rxNameContainer,
const OUString& rSuggestedName,
sal_Unicode cSeparator,
- const css::uno::Any& rObject,
- bool bRenameOldExisting = false );
+ const css::uno::Any& rObject );
// std::vector and std::map element access --------------------------------
diff --git a/include/oox/ole/axbinarywriter.hxx b/include/oox/ole/axbinarywriter.hxx
index 02fa348..66dc500 100644
--- a/include/oox/ole/axbinarywriter.hxx
+++ b/include/oox/ole/axbinarywriter.hxx
@@ -54,7 +54,7 @@ public:
position of the wrapped stream at construction time). */
void align( size_t nSize );
- void pad( sal_Int32 nBytes, size_t nAtomSize = 1);
+ void pad( sal_Int32 nBytes );
/** Aligns the stream according to the passed type and reads a value. */
template< typename Type >
@@ -84,13 +84,13 @@ public:
{ if( startNextProperty() ) maOutStrm.writeAligned< StreamType >( ornValue ); }
/** Write a boolean property value to the stream, the
respective flag in the property mask is set. */
- void writeBoolProperty( bool orbValue, bool bReverse = false );
+ void writeBoolProperty( bool orbValue );
/** Write a pair property the stream, the respective flag in
the property mask is set. */
void writePairProperty( AxPairData& orPairData );
/** Write a string property to the stream, the respective flag
in the property mask is set. */
- void writeStringProperty( OUString& orValue, bool bCompressed = true );
+ void writeStringProperty( OUString& orValue );
/** Skips the next property clears the respective
flag in the property mask. */
@@ -100,7 +100,7 @@ public:
void finalizeExport();
private:
- bool ensureValid( bool bCondition = true );
+ bool ensureValid();
bool startNextProperty( bool bSkip = false );
private:
diff --git a/include/oox/ole/vbaproject.hxx b/include/oox/ole/vbaproject.hxx
index e4ed682..d523098 100644
--- a/include/oox/ole/vbaproject.hxx
+++ b/include/oox/ole/vbaproject.hxx
@@ -118,8 +118,7 @@ public:
*/
void importVbaProject(
StorageBase& rVbaPrjStrg,
- const GraphicHelper& rGraphicHelper,
- bool bDefaultColorBgr = true );
+ const GraphicHelper& rGraphicHelper );
bool importVbaProject(
StorageBase& rVbaPrjStrg );
diff --git a/include/oox/vml/vmlshape.hxx b/include/oox/vml/vmlshape.hxx
index 6313591..2d3cf21 100644
--- a/include/oox/vml/vmlshape.hxx
+++ b/include/oox/vml/vmlshape.hxx
@@ -246,8 +246,7 @@ public:
/** Converts position and formatting into the passed existing XShape. */
void convertFormatting(
- const css::uno::Reference< css::drawing::XShape >& rxShape,
- const ShapeParentAnchor* pParentAnchor = nullptr ) const;
+ const css::uno::Reference< css::drawing::XShape >& rxShape ) const;
protected:
explicit ShapeBase( Drawing& rDrawing );
diff --git a/oox/inc/drawingml/graphicproperties.hxx b/oox/inc/drawingml/graphicproperties.hxx
index a834681..e8f7222e 100644
--- a/oox/inc/drawingml/graphicproperties.hxx
+++ b/oox/inc/drawingml/graphicproperties.hxx
@@ -44,8 +44,7 @@ struct GraphicProperties
/** Writes the properties to the passed property map. */
void pushToPropMap(
PropertyMap& rPropMap,
- const GraphicHelper& rGraphicHelper,
- sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const;
+ const GraphicHelper& rGraphicHelper ) const;
};
} // namespace drawingml
diff --git a/oox/inc/drawingml/textcharacterproperties.hxx b/oox/inc/drawingml/textcharacterproperties.hxx
index 1720bee..8f84e8a 100644
--- a/oox/inc/drawingml/textcharacterproperties.hxx
+++ b/oox/inc/drawingml/textcharacterproperties.hxx
@@ -77,8 +77,7 @@ struct TextCharacterProperties
/** Writes the properties to the passed property set. */
void pushToPropSet(
PropertySet& rPropSet,
- const ::oox::core::XmlFilterBase& rFilter,
- bool bUseOptional = false ) const;
+ const ::oox::core::XmlFilterBase& rFilter ) const;
};
diff --git a/oox/source/core/fastparser.cxx b/oox/source/core/fastparser.cxx
index 5465577..6410a42 100644
--- a/oox/source/core/fastparser.cxx
+++ b/oox/source/core/fastparser.cxx
@@ -126,9 +126,9 @@ void FastParser::parseStream( const Reference< XInputStream >& rxInStream, const
parseStream( aInputSource, bCloseStream );
}
-void FastParser::parseStream( StorageBase& rStorage, const OUString& rStreamName, bool bCloseStream ) throw( SAXException, IOException, RuntimeException )
+void FastParser::parseStream( StorageBase& rStorage, const OUString& rStreamName ) throw( SAXException, IOException, RuntimeException )
{
- parseStream( rStorage.openInputStream( rStreamName ), rStreamName, bCloseStream );
+ parseStream( rStorage.openInputStream( rStreamName ), rStreamName );
}
} // namespace core
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 062a600..5551dc0 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -481,11 +481,11 @@ OUString lclAddRelation( const Reference< XRelationshipAccess >& rRelations, sal
} // namespace
-OUString XmlFilterBase::addRelation( const OUString& rType, const OUString& rTarget, bool bExternal )
+OUString XmlFilterBase::addRelation( const OUString& rType, const OUString& rTarget )
{
Reference< XRelationshipAccess > xRelations( getStorage()->getXStorage(), UNO_QUERY );
if( xRelations.is() )
- return lclAddRelation( xRelations, mnRelId ++, rType, rTarget, bExternal );
+ return lclAddRelation( xRelations, mnRelId ++, rType, rTarget, false/*bExternal*/ );
return OUString();
}
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index a667bc5..e8a6001 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -690,7 +690,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
}
}
-void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr ) const
+void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper ) const
{
sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 );
sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 );
@@ -705,8 +705,8 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
if( maBlipProps.mxGraphic.is() )
{
// created transformed graphic
- Reference< XGraphic > xGraphic = lclCheckAndApplyDuotoneTransform( maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, nPhClr );
- xGraphic = lclCheckAndApplyChangeColorTransform( maBlipProps, xGraphic, rGraphicHelper, nPhClr );
+ Reference< XGraphic > xGraphic = lclCheckAndApplyDuotoneTransform( maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, API_RGB_TRANSPARENT );
+ xGraphic = lclCheckAndApplyChangeColorTransform( maBlipProps, xGraphic, rGraphicHelper, API_RGB_TRANSPARENT );
if (eColorMode == ColorMode_STANDARD && nBrightness == 70 && nContrast == -70)
// map MSO 'washout' to our Watermark colormode
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx
index d7a848d..acf337e 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -182,10 +182,10 @@ void pushToGrabBag( PropertySet& rPropSet, const std::vector<PropertyValue>& aVe
rPropSet.setAnyProperty(PROP_CharInteropGrabBag, makeAny(aGrabBag));
}
-void TextCharacterProperties::pushToPropSet( PropertySet& rPropSet, const XmlFilterBase& rFilter, bool bUseOptional ) const
+void TextCharacterProperties::pushToPropSet( PropertySet& rPropSet, const XmlFilterBase& rFilter ) const
{
PropertyMap aPropMap;
- pushToPropMap( aPropMap, rFilter, bUseOptional );
+ pushToPropMap( aPropMap, rFilter );
rPropSet.setProperties( aPropMap );
pushToGrabBag(rPropSet, maTextEffectsProperties);
}
diff --git a/oox/source/helper/binaryinputstream.cxx b/oox/source/helper/binaryinputstream.cxx
index a8e0683..7f35f6d 100644
--- a/oox/source/helper/binaryinputstream.cxx
+++ b/oox/source/helper/binaryinputstream.cxx
@@ -102,17 +102,17 @@ OUString BinaryInputStream::readCompressedUnicodeArray( sal_Int32 nChars, bool b
readUnicodeArray( nChars, bAllowNulChars );
}
-void BinaryInputStream::copyToStream( BinaryOutputStream& rOutStrm, sal_Int64 nBytes, sal_Int32 nAtomSize )
+void BinaryInputStream::copyToStream( BinaryOutputStream& rOutStrm, sal_Int64 nBytes )
{
if( nBytes > 0 )
{
// make buffer size a multiple of the passed atom size
- sal_Int32 nBufferSize = getLimitedValue< sal_Int32, sal_Int64 >( nBytes, 0, (INPUTSTREAM_BUFFERSIZE / nAtomSize) * nAtomSize );
+ sal_Int32 nBufferSize = getLimitedValue< sal_Int32, sal_Int64 >( nBytes, 0, INPUTSTREAM_BUFFERSIZE );
StreamDataSequence aBuffer( nBufferSize );
while( nBytes > 0 )
{
sal_Int32 nReadSize = getLimitedValue< sal_Int32, sal_Int64 >( nBytes, 0, nBufferSize );
- sal_Int32 nBytesRead = readData( aBuffer, nReadSize, nAtomSize );
+ sal_Int32 nBytesRead = readData( aBuffer, nReadSize );
rOutStrm.writeData( aBuffer );
if( nReadSize == nBytesRead )
nBytes -= nReadSize;
diff --git a/oox/source/helper/binaryoutputstream.cxx b/oox/source/helper/binaryoutputstream.cxx
index c5b8daf..c35f15b 100644
--- a/oox/source/helper/binaryoutputstream.cxx
+++ b/oox/source/helper/binaryoutputstream.cxx
@@ -123,14 +123,13 @@ BinaryOutputStream::writeUnicodeArray( const OUString& rString, bool bAllowNulCh
#endif
}
-void
-BinaryOutputStream::writeCompressedUnicodeArray( const OUString& rString, bool bCompressed, bool bAllowNulChars )
+void BinaryOutputStream::writeCompressedUnicodeArray( const OUString& rString, bool bCompressed )
{
if ( bCompressed )
// ISO-8859-1 maps all byte values 0xHH to the same Unicode code point U+00HH
- writeCharArrayUC( rString, RTL_TEXTENCODING_ISO_8859_1, bAllowNulChars );
+ writeCharArrayUC( rString, RTL_TEXTENCODING_ISO_8859_1 );
else
- writeUnicodeArray( rString, bAllowNulChars );
+ writeUnicodeArray( rString );
}
SequenceOutputStream::SequenceOutputStream( StreamDataSequence& rData ) :
diff --git a/oox/source/helper/containerhelper.cxx b/oox/source/helper/containerhelper.cxx
index 4a9d723..2f8b3d5 100644
--- a/oox/source/helper/containerhelper.cxx
+++ b/oox/source/helper/containerhelper.cxx
@@ -77,12 +77,12 @@ void ValueRangeSet::insert( const ValueRange& rRange )
OUString ContainerHelper::getUnusedName(
const Reference< XNameAccess >& rxNameAccess, const OUString& rSuggestedName,
- sal_Unicode cSeparator, sal_Int32 nFirstIndexToAppend )
+ sal_Unicode cSeparator )
{
OSL_ENSURE( rxNameAccess.is(), "ContainerHelper::getUnusedName - missing XNameAccess interface" );
OUString aNewName = rSuggestedName;
- sal_Int32 nIndex = nFirstIndexToAppend;
+ sal_Int32 nIndex = -1;
while( rxNameAccess->hasByName( aNewName ) )
aNewName = OUStringBuffer( rSuggestedName ).append( cSeparator ).append( nIndex++ ).makeStringAndClear();
return aNewName;
@@ -90,13 +90,13 @@ OUString ContainerHelper::getUnusedName(
bool ContainerHelper::insertByName(
const Reference< XNameContainer >& rxNameContainer,
- const OUString& rName, const Any& rObject, bool bReplaceOldExisting )
+ const OUString& rName, const Any& rObject )
{
OSL_ENSURE( rxNameContainer.is(), "ContainerHelper::insertByName - missing XNameContainer interface" );
bool bRet = false;
try
{
- if( bReplaceOldExisting && rxNameContainer->hasByName( rName ) )
+ if( rxNameContainer->hasByName( rName ) )
rxNameContainer->replaceByName( rName, rObject );
else
rxNameContainer->insertByName( rName, rObject );
@@ -112,29 +112,13 @@ bool ContainerHelper::insertByName(
OUString ContainerHelper::insertByUnusedName(
const Reference< XNameContainer >& rxNameContainer,
const OUString& rSuggestedName, sal_Unicode cSeparator,
- const Any& rObject, bool bRenameOldExisting )
+ const Any& rObject )
{
OSL_ENSURE( rxNameContainer.is(), "ContainerHelper::insertByUnusedName - missing XNameContainer interface" );
// find an unused name
OUString aNewName = getUnusedName( rxNameContainer, rSuggestedName, cSeparator );
- // rename existing object
- if( bRenameOldExisting && rxNameContainer->hasByName( rSuggestedName ) )
- {
- try
- {
- Any aOldObject = rxNameContainer->getByName( rSuggestedName );
- rxNameContainer->removeByName( rSuggestedName );
- rxNameContainer->insertByName( aNewName, aOldObject );
- aNewName = rSuggestedName;
- }
- catch( Exception& )
- {
- OSL_FAIL( "ContainerHelper::insertByUnusedName - cannot rename old object" );
- }
- }
-
// insert the new object and return its resulting name
insertByName( rxNameContainer, aNewName, rObject );
return aNewName;
diff --git a/oox/source/ole/axbinarywriter.cxx b/oox/source/ole/axbinarywriter.cxx
index 26247e5..ae73148 100644
--- a/oox/source/ole/axbinarywriter.cxx
+++ b/oox/source/ole/axbinarywriter.cxx
@@ -67,7 +67,7 @@ void AxAlignedOutputStream::writeMemory( const void* opMem, sal_Int32 nBytes, si
mnStrmPos = mpOutStrm->tell() - mnWrappedBeginPos;
}
-void AxAlignedOutputStream::pad( sal_Int32 nBytes, size_t nAtomSize )
+void AxAlignedOutputStream::pad( sal_Int32 nBytes )
{
//PRESUMABLY we need to pad with 0's here as appropriate
css::uno::Sequence< sal_Int8 > aData( nBytes );
@@ -75,7 +75,7 @@ void AxAlignedOutputStream::pad( sal_Int32 nBytes, size_t nAtomSize )
// set to 0(s), easier to not get fooled by 0's when looking at
// binary content......
memset( static_cast<void*>( aData.getArray() ), 0, nBytes );
- mpOutStrm->writeData( aData, nAtomSize );
+ mpOutStrm->writeData( aData );
mnStrmPos = mpOutStrm->tell() - mnWrappedBeginPos;
}
@@ -130,10 +130,10 @@ AxBinaryPropertyWriter::AxBinaryPropertyWriter( BinaryOutputStream& rOutStrm, bo
mnNextProp = 1;
}
-void AxBinaryPropertyWriter::writeBoolProperty( bool orbValue, bool bReverse )
+void AxBinaryPropertyWriter::writeBoolProperty( bool orbValue )
{
// orbValue == bReverse false then we want to set the bit, e.g. don't skip
- startNextProperty( orbValue == bReverse );
+ startNextProperty( !orbValue );
}
void AxBinaryPropertyWriter::writePairProperty( AxPairData& orPairData )
@@ -142,13 +142,10 @@ void AxBinaryPropertyWriter::writePairProperty( AxPairData& orPairData )
maLargeProps.push_back( ComplexPropVector::value_type( new PairProperty( orPairData ) ) );
}
-void AxBinaryPropertyWriter::writeStringProperty( OUString& orValue, bool bCompressed )
+void AxBinaryPropertyWriter::writeStringProperty( OUString& orValue )
{
sal_uInt32 nSize = orValue.getLength();
- if ( bCompressed )
- setFlag( nSize, AX_STRING_COMPRESSED );
- else
- nSize *= 2;
+ setFlag( nSize, AX_STRING_COMPRESSED );
maOutStrm.writeAligned< sal_uInt32 >( nSize );
maLargeProps.push_back( ComplexPropVector::value_type( new StringProperty( orValue, nSize ) ) );
startNextProperty();
@@ -187,9 +184,9 @@ void AxBinaryPropertyWriter::finalizeExport()
maOutStrm.seek( nPos );
}
-bool AxBinaryPropertyWriter::ensureValid( bool bCondition )
+bool AxBinaryPropertyWriter::ensureValid()
{
- mbValid = mbValid && bCondition && !maOutStrm.isEof();
+ mbValid = mbValid && !maOutStrm.isEof();
return mbValid;
}
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
index 607bec8..4d2b28c 100644
--- a/oox/source/ole/vbaproject.cxx
+++ b/oox/source/ole/vbaproject.cxx
@@ -167,13 +167,13 @@ bool VbaProject::importVbaProject( StorageBase& rVbaPrjStrg )
return hasModules() || hasDialogs();
}
-void VbaProject::importVbaProject( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper, bool bDefaultColorBgr )
+void VbaProject::importVbaProject( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper )
{
if( rVbaPrjStrg.isStorage() )
{
// load the code modules and forms
if( isImportVba() )
- importVba( rVbaPrjStrg, rGraphicHelper, bDefaultColorBgr );
+ importVba( rVbaPrjStrg, rGraphicHelper, true/*bDefaultColorBgr*/ );
// copy entire storage into model
if( isExportVba() )
copyStorage( rVbaPrjStrg );
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index ae717ed..c8d5476 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -424,13 +424,13 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS
return xShape;
}
-void ShapeBase::convertFormatting( const Reference< XShape >& rxShape, const ShapeParentAnchor* pParentAnchor ) const
+void ShapeBase::convertFormatting( const Reference< XShape >& rxShape ) const
{
if( rxShape.is() )
{
/* Calculate shape rectangle. Applications may do something special
according to some imported shape client data (e.g. Excel cell anchor). */
- awt::Rectangle aShapeRect = calcShapeRectangle( pParentAnchor );
+ awt::Rectangle aShapeRect = calcShapeRectangle( nullptr );
// convert the shape, if the calculated rectangle is not empty
if( (aShapeRect.Width > 0) || (aShapeRect.Height > 0) )
commit fecfd9c4987229c7fb335c6c6ba847e2ec30d40d
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 2 15:41:41 2016 +0200
loplugin:unuseddefaultparams in sc (part2)
Change-Id: I356a86bfca20cbf2c52185697042dce5237e847d
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 7849853..a7d79ac 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -323,8 +323,7 @@ public:
inline size_t hash() const;
/// "A1" or "$A$1" or R1C1 or R[1]C[1]
- OUString GetColRowString( bool bAbsolute = false,
- const Details& rDetails = detailsOOOa1) const;
+ OUString GetColRowString( bool bAbsolute = false ) const;
};
inline void ScAddress::PutInOrder( ScAddress& rAddress )
@@ -534,7 +533,7 @@ public:
/** Same as Move() but with sticky end col/row anchors. */
SC_DLLPUBLIC SAL_WARN_UNUSED_RESULT bool MoveSticky( SCsCOL aDeltaX, SCsROW aDeltaY, SCsTAB aDeltaZ,
- ScRange& rErrorRange, ScDocument* pDocument = nullptr );
+ ScRange& rErrorRange );
SC_DLLPUBLIC void ExtendTo( const ScRange& rRange );
SC_DLLPUBLIC bool Intersects( const ScRange& rRange ) const; // do two ranges intersect?
diff --git a/sc/inc/cellform.hxx b/sc/inc/cellform.hxx
index 9798dac..84ee916 100644
--- a/sc/inc/cellform.hxx
+++ b/sc/inc/cellform.hxx
@@ -49,7 +49,7 @@ public:
static OUString GetString(
ScDocument& rDoc, const ScAddress& rPos, sal_uLong nFormat,
Color** ppColor, SvNumberFormatter& rFormatter, bool bNullVals = true,
- bool bFormula = false, ScForceTextFmt eForceTextFmt = ftDontForce, bool bUseStarFormat = false );
+ bool bFormula = false, ScForceTextFmt eForceTextFmt = ftDontForce );
static void GetInputString(
ScRefCellValue& rCell, sal_uLong nFormat, OUString& rString, SvNumberFormatter& rFormatter,
diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx
index fcbc133..d66fb33 100644
--- a/sc/inc/chartlis.hxx
+++ b/sc/inc/chartlis.hxx
@@ -175,8 +175,7 @@ public:
OUString getUniqueName(const OUString& rPrefix) const;
void ChangeListening( const OUString& rName,
- const ScRangeListRef& rRangeListRef,
- bool bDirty = false );
+ const ScRangeListRef& rRangeListRef );
// use FreeUnused only the way it's used in ScDocument::UpdateChartListenerCollection
void FreeUnused();
void FreeUno( const css::uno::Reference< css::chart::XChartDataChangeEventListener >& rListener,
diff --git a/sc/inc/chgviset.hxx b/sc/inc/chgviset.hxx
index 61bf991..5d61b7c 100644
--- a/sc/inc/chgviset.hxx
+++ b/sc/inc/chgviset.hxx
@@ -127,7 +127,7 @@ public:
void AdjustDateMode( const ScDocument& rDoc );
bool HasActionRange() const { return mbIsActionRange; }
- void SetHasActionRange( bool bFlag = true ) { mbIsActionRange = bFlag; }
+ void SetHasActionRange() { mbIsActionRange = true; }
void GetTheActionRange( sal_uLong& nFirst, sal_uLong& nLast ) const { nFirst = mnFirstAction; nLast = mnLastAction; }
void SetTheActionRange( sal_uLong nFirst, sal_uLong nLast ) { mnFirstAction = nFirst; mnLastAction = nLast; }
};
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 0b560b9..edef180 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -345,7 +345,7 @@ public:
svl::SharedString GetSharedString( SCROW nRow ) const;
- void SetRawString( SCROW nRow, const OUString& rStr, bool bBroadcast = true );
+ void SetRawString( SCROW nRow, const OUString& rStr );
void SetRawString( SCROW nRow, const svl::SharedString& rStr, bool bBroadcast = true );
void SetRawString( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, const svl::SharedString& rStr, bool bBroadcast = true );
void SetValue( SCROW nRow, double fVal );
@@ -518,7 +518,7 @@ public:
void StartListeningFormulaCells(
sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt, SCROW nRow1, SCROW nRow2,
- SCROW* pStartRow = nullptr, SCROW* pEndRow = nullptr );
+ SCROW* pStartRow = nullptr );
void EndListeningFormulaCells(
sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2,
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 06736b4..d18d3b5 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -434,10 +434,9 @@ public:
/** If the character is allowed as tested by nFlags (SC_COMPILER_C_...
bits) for all known address conventions. If more than one bit is given
- in nFlags, all bits must match. If bTestLetterNumeric is false and
- char>=128, no LetterNumeric test is done and false is returned. */
+ in nFlags, all bits must match. */
static bool IsCharFlagAllConventions(
- OUString const & rStr, sal_Int32 nPos, sal_uLong nFlags, bool bTestLetterNumeric = true );
+ OUString const & rStr, sal_Int32 nPos, sal_uLong nFlags );
private:
// FormulaCompiler
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 34aa834..3775f9d 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -357,13 +357,10 @@ public:
the data is not sorted. Is always done if regular
expressions are involved.
- @param bIgnoreMismatchOnLeadingStrings
- Normally strings are sorted behind numerical
- values. If this parameter is true, the search does
- not stop when encountering a string and does not
- assume that no values follow anymore.
- If querying for a string a mismatch on the first
- entry, e.g. column header, is ignored.
+ The search does not stop when encountering a string and does not
+ assume that no values follow anymore.
+ If querying for a string a mismatch on the first
+ entry, e.g. column header, is ignored.
@ATTENTION! StopOnMismatch, TestEqualCondition and
the internal IgnoreMismatchOnLeadingStrings and query
@@ -372,8 +369,7 @@ public:
number format!
*/
bool FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
- SCROW& nFoundRow, bool bSearchForEqualAfterMismatch = false,
- bool bIgnoreMismatchOnLeadingStrings = true );
+ SCROW& nFoundRow, bool bSearchForEqualAfterMismatch = false );
};
class ScDocAttrIterator // all attribute areas
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index a50b004..30a8d9f 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -870,8 +870,7 @@ public:
void SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const sal_uInt16 nError);
SC_DLLPUBLIC void SetFormula(
- const ScAddress& rPos, const ScTokenArray& rArray,
- formula::FormulaGrammar::Grammar eGram = formula::FormulaGrammar::GRAM_DEFAULT );
+ const ScAddress& rPos, const ScTokenArray& rArray );
SC_DLLPUBLIC void SetFormula(
const ScAddress& rPos, const OUString& rFormula,
@@ -1194,26 +1193,26 @@ public:
SCCOL nEndCol, SCTAB nEndTab,
SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
const ScMarkData* pTabMark = nullptr );
- SC_DLLPUBLIC bool InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc = nullptr );
+ SC_DLLPUBLIC bool InsertRow( const ScRange& rRange );
void DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
SCCOL nEndCol, SCTAB nEndTab,
SCROW nStartRow, SCSIZE nSize,
ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
const ScMarkData* pTabMark = nullptr );
SC_DLLPUBLIC void DeleteRow( const ScRange& rRange,
- ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr );
+ ScDocument* pRefUndoDoc = nullptr );
bool InsertCol( SCROW nStartRow, SCTAB nStartTab,
SCROW nEndRow, SCTAB nEndTab,
SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
const ScMarkData* pTabMark = nullptr );
- SC_DLLPUBLIC bool InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc = nullptr );
+ SC_DLLPUBLIC bool InsertCol( const ScRange& rRange );
void DeleteCol( SCROW nStartRow, SCTAB nStartTab,
SCROW nEndRow, SCTAB nEndTab,
SCCOL nStartCol, SCSIZE nSize,
ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
const ScMarkData* pTabMark = nullptr );
void DeleteCol( const ScRange& rRange,
- ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr );
+ ScDocument* pRefUndoDoc = nullptr );
bool CanInsertRow( const ScRange& rRange ) const;
bool CanInsertCol( const ScRange& rRange ) const;
@@ -1366,15 +1365,13 @@ public:
const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc,
- const ScMarkData* pMarks = nullptr);
+ InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc);
void CopyToDocument(const ScRange& rRange,
InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc,
const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
void UndoToDocument(const ScRange& rRange,
- InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc,
- const ScMarkData* pMarks = nullptr);
+ InsertDeleteFlags nFlags, bool bMarked, ScDocument* pDestDoc);
void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario = false );
bool TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const;
@@ -1411,7 +1408,7 @@ public:
SC_DLLPUBLIC const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
SC_DLLPUBLIC const ScPatternAttr* GetPattern( const ScAddress& rPos ) const;
SC_DLLPUBLIC const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
- const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark, bool bDeep = true );
+ const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark );
ScPatternAttr* CreateSelectionPattern( const ScMarkData& rMark, bool bDeep = true );
SC_DLLPUBLIC void AddCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
void RemoveCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
@@ -1540,7 +1537,7 @@ public:
SC_DLLPUBLIC void ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark,
ScEditDataArray* pDataArray = nullptr );
void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
- void DeleteSelectionTab( SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
+ void DeleteSelectionTab( SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark );
SC_DLLPUBLIC void SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
SC_DLLPUBLIC void SetColWidthOnly( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
@@ -1553,9 +1550,9 @@ public:
SC_DLLPUBLIC void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual );
SC_DLLPUBLIC sal_uInt16 GetColWidth( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
- SC_DLLPUBLIC sal_uLong GetColWidth( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
+ SC_DLLPUBLIC sal_uLong GetColWidth( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab ) const;
SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
- SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const;
+ SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow ) const;
SC_DLLPUBLIC sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
SCROW GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const;
sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const;
@@ -1618,7 +1615,7 @@ public:
bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
- bool ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
+ bool ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = nullptr) const;
SC_DLLPUBLIC void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered);
SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index a2fd0663..4ecdd8f 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -380,14 +380,11 @@ public:
/**
* Create a new name that's not yet used by any existing data pilot
- * objects. All data pilot names are 'DataPilot' + <num>, and the nMin
- * specifies the minimum number allowed.
- *
- * @param nMin minimum number allowed.
+ * objects. All data pilot names are 'DataPilot' + <num>
*
* @return new name for data pilot object.
*/
- OUString CreateNewName( sal_uInt16 nMin = 1 ) const;
+ OUString CreateNewName() const;
void FreeTable(ScDPObject* pDPObj);
SC_DLLPUBLIC bool InsertNewTable(ScDPObject* pDPObj);
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index cdce620..a34caeb 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -152,16 +152,16 @@ public:
const SfxItemSet& rDefaults, bool bRememberCopy = true );
/// Current defaults are not applied, new defaults are applied
void SetTextNewDefaults( const EditTextObject& rTextObject,
- SfxItemSet* pDefaults, bool bTakeOwnership = true );
+ SfxItemSet* pDefaults );
/// Overwritten method to be able to apply defaults already set
void SetText( const OUString& rText );
/// Current defaults are not applied, new defaults are applied
void SetTextNewDefaults( const OUString& rText,
- const SfxItemSet& rDefaults, bool bRememberCopy = true );
+ const SfxItemSet& rDefaults );
/// Current defaults are not applied, new defaults are applied
void SetTextNewDefaults( const OUString& rText,
- SfxItemSet* pDefaults, bool bTakeOwnership = true );
+ SfxItemSet* pDefaults );
/// Paragraph attributes that are not defaults are copied to
/// character attributes and all paragraph attributes reset
diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx
index d7fc6b6..9f215f6 100644
--- a/sc/inc/filter.hxx
+++ b/sc/inc/filter.hxx
@@ -103,8 +103,7 @@ class SAL_DLLPUBLIC_RTTI ScFormatFilterPlugin {
// various export filters
virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, rtl_TextEncoding eDest ) = 0;
- virtual void ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const rtl_TextEncoding eDest,
- sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) = 0;
+ virtual void ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const rtl_TextEncoding eDest ) = 0;
virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest,
sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) = 0;
virtual void ScExportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest, bool bAll,
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index b236bad..14f4b08 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -629,7 +629,7 @@ SC_DLLPUBLIC static sal_Int32 FindUnquoted( const OUString& rString, sa
semantics as FindUnquoted( const String&, ...)
@returns: pointer to cChar if found, else NULL
*/
-SC_DLLPUBLIC static const sal_Unicode* FindUnquoted( const sal_Unicode* pString, sal_Unicode cChar, sal_Unicode cQuote = '\'' );
+SC_DLLPUBLIC static const sal_Unicode* FindUnquoted( const sal_Unicode* pString, sal_Unicode cChar );
static rtl_TextEncoding GetCharsetValue( const OUString& rCharSet );
static OUString GetCharsetString( rtl_TextEncoding eVal );
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx
index b5936af..e60ea14 100644
--- a/sc/inc/miscuno.hxx
+++ b/sc/inc/miscuno.hxx
@@ -155,7 +155,7 @@ public:
static bool GetBoolProperty( const css::uno::Reference< css::beans::XPropertySet>& xProp,
const OUString& rName, bool bDefault = false );
static sal_Int32 GetLongProperty( const css::uno::Reference< css::beans::XPropertySet>& xProp,
- const OUString& rName, long nDefault = 0 );
+ const OUString& rName );
static sal_Int32 GetEnumProperty( const css::uno::Reference< css::beans::XPropertySet>& xProp,
const OUString& rName, long nDefault );
static OUString GetStringProperty(
diff --git a/sc/inc/progress.hxx b/sc/inc/progress.hxx
index 1134676..3fc2ba3 100644
--- a/sc/inc/progress.hxx
+++ b/sc/inc/progress.hxx
@@ -80,14 +80,12 @@ public:
ScProgress();
#endif
- bool SetStateText( sal_uLong nVal, const OUString &rVal, sal_uLong nNewRange = 0 )
+ bool SetStateText( sal_uLong nVal, const OUString &rVal )
{
if ( pProgress )
{
- if ( nNewRange )
- nGlobalRange = nNewRange;
CalcGlobalPercent( nVal );
- if ( !pProgress->SetStateText( nVal, rVal, nNewRange ) )
+ if ( !pProgress->SetStateText( nVal, rVal ) )
bGlobalNoUserBreak = false;
return bGlobalNoUserBreak;
}
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index f6afd6b..2a15ec8 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -118,8 +118,7 @@ public:
sal_uInt32 GetUnoType() const;
SC_DLLPUBLIC void GetSymbol( OUString& rSymbol, const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ) const;
SC_DLLPUBLIC void GetSymbol( OUString& rSymbol, const ScAddress& rPos, const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ) const;
- void UpdateSymbol( OUStringBuffer& rBuffer, const ScAddress&,
- const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT );
+ void UpdateSymbol( OUStringBuffer& rBuffer, const ScAddress& );
/**
* @param nLocalTab sheet index where this name belongs, or -1 for global
diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx
index 4b6ca43..c572797 100644
--- a/sc/inc/rangeutl.hxx
+++ b/sc/inc/rangeutl.hxx
@@ -107,8 +107,7 @@ public:
static sal_Int32 GetTokenCount(
const OUString& rString,
- sal_Unicode cSeparator = ' ',
- sal_Unicode cQuote = '\'');
+ sal_Unicode cSeparator = ' ');
static void GetTokenByOffset(
OUString& rToken,
@@ -119,8 +118,7 @@ public:
static void AppendTableName(
OUStringBuffer& rBuf,
- const OUString& rTabName,
- sal_Unicode cQuote = '\'');
+ const OUString& rTabName);
/// String to Range core
static bool GetAddressFromString(
@@ -153,8 +151,7 @@ public:
const ScDocument* pDocument,
formula::FormulaGrammar::AddressConvention eConv,
sal_Int32& nOffset,
- sal_Unicode cSeparator = ' ',
- sal_Unicode cQuote = '\'');
+ sal_Unicode cSeparator = ' ');
/// String to Range API
static bool GetAddressFromString(
@@ -163,16 +160,14 @@ public:
const ScDocument* pDocument,
formula::FormulaGrammar::AddressConvention eConv,
sal_Int32& nOffset,
- sal_Unicode cSeparator = ' ',
- sal_Unicode cQuote = '\'');
+ sal_Unicode cSeparator = ' ');
static bool GetRangeFromString(
css::table::CellRangeAddress& rRange,
const OUString& rRangeStr,
const ScDocument* pDocument,
formula::FormulaGrammar::AddressConvention eConv,
sal_Int32& nOffset,
- sal_Unicode cSeparator = ' ',
- sal_Unicode cQuote = '\'');
+ sal_Unicode cSeparator = ' ');
/// Range to String core
static void GetStringFromAddress(
@@ -196,8 +191,7 @@ public:
const ScRangeList* pRangeList,
const ScDocument* pDocument,
formula::FormulaGrammar::AddressConvention eConv,
- sal_Unicode cSeparator = ' ',
- sal_uInt16 nFormatFlags = (SCA_VALID | SCA_TAB_3D));
+ sal_Unicode cSeparator = ' ');
static void GetStringFromArea(
OUString& rString,
@@ -215,8 +209,7 @@ public:
const ScDocument* pDocument,
formula::FormulaGrammar::AddressConvention eConv,
sal_Unicode cSeparator = ' ',
- bool bAppendStr = false,
- sal_uInt16 nFormatFlags = (SCA_VALID | SCA_TAB_3D) );
+ bool bAppendStr = false );
static void GetStringFromRange(
OUString& rString,
const css::table::CellRangeAddress& rRange,
@@ -230,8 +223,7 @@ public:
const css::uno::Sequence< css::table::CellRangeAddress >& rRangeSeq,
const ScDocument* pDocument,
formula::FormulaGrammar::AddressConvention eConv,
- sal_Unicode cSeparator = ' ',
- sal_uInt16 nFormatFlags = (SCA_VALID | SCA_TAB_3D) );
+ sal_Unicode cSeparator = ' ' );
/// XML Range to Calc Range
static void GetStringFromXMLRangeString(
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 52d8a62..9216dbe 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -140,7 +140,7 @@ public:
virtual double GetStep() const = 0;
virtual double GetMax() const = 0;
virtual OUString GetStartStr() const = 0;
- virtual void SetEdStartValEnabled(bool bFlag=false) = 0;
+ virtual void SetEdStartValEnabled(bool bFlag) = 0;
};
class AbstractScGroupDlg : public VclAbstractDialog
@@ -205,7 +205,7 @@ public:
class AbstractScMetricInputDlg : public VclAbstractDialog
{
public:
- virtual long GetInputValue( FieldUnit eUnit = FUNIT_TWIP ) const = 0;
+ virtual long GetInputValue() const = 0;
};
class AbstractScMoveTableDlg : public VclAbstractDialog
@@ -360,8 +360,7 @@ public:
virtual AbstractScDataFormDlg * CreateScDataFormDlg(vcl::Window* pParent,
ScTabViewShell* pTabViewShell) = 0;
- virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(vcl::Window* pParent,
- InsertDeleteFlags nCheckDefaults = InsertDeleteFlags::NONE) = 0;
+ virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(vcl::Window* pParent) = 0;
virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( vcl::Window* pParent,
ScDocument& rDocument,
FillDir eFillDir,
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index bcb61f4..496378e 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -483,7 +483,7 @@ public:
bool GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const; // FALSE = empty
bool GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const;
- bool GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, bool bFullFormattedArea = false ) const;
+ bool GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes ) const;
bool GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
SCCOL& rEndCol, bool bNotes ) const;
bool GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index dd1d168..892e529 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -96,7 +96,7 @@ public:
const ScGridOptions& GetGridOptions() const { return aGridOpt; }
void SetGridOptions( const ScGridOptions& rNew ) { aGridOpt = rNew; }
- SvxGridItem* CreateGridItem( sal_uInt16 nId = SID_ATTR_GRID_OPTIONS ) const;
+ SvxGridItem* CreateGridItem() const;
const ScViewOptions& operator= ( const ScViewOptions& rCpy );
bool operator== ( const ScViewOptions& rOpt ) const;
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 0484854..f37ae4e 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2381,7 +2381,7 @@ void ScColumn::SetError( SCROW nRow, const sal_uInt16 nError)
AttachNewFormulaCell(it, nRow, *pCell);
}
-void ScColumn::SetRawString( SCROW nRow, const OUString& rStr, bool bBroadcast )
+void ScColumn::SetRawString( SCROW nRow, const OUString& rStr )
{
if (!ValidRow(nRow))
return;
@@ -2390,7 +2390,7 @@ void ScColumn::SetRawString( SCROW nRow, const OUString& rStr, bool bBroadcast )
if (!aSS.getData())
return;
- SetRawString(nRow, aSS, bBroadcast);
+ SetRawString(nRow, aSS);
}
void ScColumn::SetRawString( SCROW nRow, const svl::SharedString& rStr, bool bBroadcast )
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 09e2e38..4cb643f 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -1259,11 +1259,6 @@ public:
{
return mnStartRow;
}
-
- SCROW getEndRow() const
- {
- return mnEndRow;
- }
};
class EndListeningFormulaCellsHandler
@@ -1351,7 +1346,7 @@ public:
void ScColumn::StartListeningFormulaCells(
sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt,
- SCROW nRow1, SCROW nRow2, SCROW* pStartRow, SCROW* pEndRow )
+ SCROW nRow1, SCROW nRow2, SCROW* pStartRow )
{
StartListeningFormulaCellsHandler aFunc(rStartCxt, rEndCxt);
sc::ProcessBlock(maCells.begin(), maCells, aFunc, nRow1, nRow2);
@@ -1360,11 +1355,6 @@ void ScColumn::StartListeningFormulaCells(
// start row position may be smaller than nRow1 in case the formula
// group starts before nRow1 position.
*pStartRow = aFunc.getStartRow();
-
- if (pEndRow)
- // row position of the last cell that started listening, which may be
- // greater than nRow2 in case the formula group extends beyond nRow2.
- *pEndRow = aFunc.getEndRow();
}
void ScColumn::EndListeningFormulaCells(
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 1b86461..760d9b4 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1277,8 +1277,7 @@ void ScQueryCellIterator::AdvanceQueryParamEntryField()
}
bool ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
- SCROW& nFoundRow, bool bSearchForEqualAfterMismatch,
- bool bIgnoreMismatchOnLeadingStringsP )
+ SCROW& nFoundRow, bool bSearchForEqualAfterMismatch )
{
// Set and automatically reset mpParam->mbRangeLookup when returning. We
// could use comphelper::FlagRestorationGuard, but really, that one is
@@ -1295,7 +1294,7 @@ bool ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol,
nFoundRow = MAXROW+1;
SetStopOnMismatch( true ); // assume sorted keys
SetTestEqualCondition( true );
- bIgnoreMismatchOnLeadingStrings = bIgnoreMismatchOnLeadingStringsP;
+ bIgnoreMismatchOnLeadingStrings = true;
bool bLiteral = mpParam->eSearchType == utl::SearchParam::SRCH_NORMAL &&
mpParam->GetEntry(0).GetQueryItem().meType == ScQueryEntry::ByString;
bool bBinary = bLiteral && mpParam->bByRow && (mpParam->GetEntry(0).eOp ==
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 3e7c8d8..dc13be8 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -1066,12 +1066,12 @@ void ScDocument::SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const sal_uInt16
}
void ScDocument::SetFormula(
- const ScAddress& rPos, const ScTokenArray& rArray, formula::FormulaGrammar::Grammar eGram )
+ const ScAddress& rPos, const ScTokenArray& rArray )
{
if (!TableExists(rPos.Tab()))
return;
- maTabs[rPos.Tab()]->SetFormula(rPos.Col(), rPos.Row(), rArray, eGram);
+ maTabs[rPos.Tab()]->SetFormula(rPos.Col(), rPos.Row(), rArray, formula::FormulaGrammar::GRAM_DEFAULT);
}
void ScDocument::SetFormula(
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index cd28479..2f81db9 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -506,7 +506,7 @@ public:
void setCol(SCCOL nCol) { mrCalcPos.SetCol(nCol); }
void setRow(SCROW nRow) { mrCalcPos.SetRow(nRow); }
- void incTab(SCTAB nInc=1) { mrCalcPos.IncTab(nInc); }
+ void incTab() { mrCalcPos.IncTab(); }
void incCol(SCCOL nInc=1) { mrCalcPos.IncCol(nInc); }
void setOldMapMode(const MapMode& rOldMapMode) { maOldMapMode = rOldMapMode; }
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index b61e011..731c8c1 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1310,12 +1310,11 @@ bool ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
return bRet;
}
-bool ScDocument::InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc )
+bool ScDocument::InsertRow( const ScRange& rRange )
{
return InsertRow( rRange.aStart.Col(), rRange.aStart.Tab(),
rRange.aEnd.Col(), rRange.aEnd.Tab(),
- rRange.aStart.Row(), static_cast<SCSIZE>(rRange.aEnd.Row()-rRange.aStart.Row()+1),
- pRefUndoDoc );
+ rRange.aStart.Row(), static_cast<SCSIZE>(rRange.aEnd.Row()-rRange.aStart.Row()+1) );
}
void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
@@ -1408,12 +1407,12 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
pChartListenerCollection->UpdateDirtyCharts();
}
-void ScDocument::DeleteRow( const ScRange& rRange, ScDocument* pRefUndoDoc, bool* pUndoOutline )
+void ScDocument::DeleteRow( const ScRange& rRange, ScDocument* pRefUndoDoc )
{
DeleteRow( rRange.aStart.Col(), rRange.aStart.Tab(),
rRange.aEnd.Col(), rRange.aEnd.Tab(),
rRange.aStart.Row(), static_cast<SCSIZE>(rRange.aEnd.Row()-rRange.aStart.Row()+1),
- pRefUndoDoc, pUndoOutline );
+ pRefUndoDoc );
}
bool ScDocument::CanInsertCol( const ScRange& rRange ) const
@@ -1514,12 +1513,11 @@ bool ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
return bRet;
}
-bool ScDocument::InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc )
+bool ScDocument::InsertCol( const ScRange& rRange )
{
return InsertCol( rRange.aStart.Row(), rRange.aStart.Tab(),
rRange.aEnd.Row(), rRange.aEnd.Tab(),
- rRange.aStart.Col(), static_cast<SCSIZE>(rRange.aEnd.Col()-rRange.aStart.Col()+1),
- pRefUndoDoc );
+ rRange.aStart.Col(), static_cast<SCSIZE>(rRange.aEnd.Col()-rRange.aStart.Col()+1) );
}
void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab,
@@ -1601,12 +1599,12 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA
pChartListenerCollection->UpdateDirtyCharts();
}
-void ScDocument::DeleteCol( const ScRange& rRange, ScDocument* pRefUndoDoc, bool* pUndoOutline )
+void ScDocument::DeleteCol( const ScRange& rRange, ScDocument* pRefUndoDoc )
{
DeleteCol( rRange.aStart.Row(), rRange.aStart.Tab(),
rRange.aEnd.Row(), rRange.aEnd.Tab(),
rRange.aStart.Col(), static_cast<SCSIZE>(rRange.aEnd.Col()-rRange.aStart.Col()+1),
- pRefUndoDoc, pUndoOutline );
+ pRefUndoDoc );
}
// for Area-Links: Insert/delete cells, when the range is changed.
@@ -2007,8 +2005,7 @@ void ScDocument::CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
- InsertDeleteFlags nFlags, bool bOnlyMarked, ScDocument* pDestDoc,
- const ScMarkData* pMarks)
+ InsertDeleteFlags nFlags, bool bOnlyMarked, ScDocument* pDestDoc)
{
PutInOrder( nCol1, nCol2 );
PutInOrder( nRow1, nRow2 );
@@ -2018,7 +2015,7 @@ void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
sc::AutoCalcSwitch aACSwitch(*pDestDoc, false); // avoid multiple calculations
if (nTab1 > 0)
- CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, InsertDeleteFlags::FORMULA, false, pDestDoc, pMarks );
+ CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, InsertDeleteFlags::FORMULA, false, pDestDoc );
sc::CopyToDocContext aCxt(*pDestDoc);
OSL_ASSERT( nTab2 < static_cast<SCTAB>(maTabs.size()) && nTab2 < static_cast<SCTAB>(pDestDoc->maTabs.size()));
@@ -2026,11 +2023,11 @@ void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
{
if (maTabs[i] && pDestDoc->maTabs[i])
maTabs[i]->UndoToTable(aCxt, nCol1, nRow1, nCol2, nRow2, nFlags,
- bOnlyMarked, pDestDoc->maTabs[i], pMarks);
+ bOnlyMarked, pDestDoc->maTabs[i]);
}
if (nTab2 < MAXTAB)
- CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,MAXTAB, InsertDeleteFlags::FORMULA, false, pDestDoc, pMarks );
+ CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,MAXTAB, InsertDeleteFlags::FORMULA, false, pDestDoc );
}
}
@@ -2066,8 +2063,7 @@ void ScDocument::CopyToDocument(const ScRange& rRange,
}
void ScDocument::UndoToDocument(const ScRange& rRange,
- InsertDeleteFlags nFlags, bool bOnlyMarked, ScDocument* pDestDoc,
- const ScMarkData* pMarks)
+ InsertDeleteFlags nFlags, bool bOnlyMarked, ScDocument* pDestDoc)
{
sc::AutoCalcSwitch aAutoCalcSwitch(*this, false);
@@ -2078,7 +2074,7 @@ void ScDocument::UndoToDocument(const ScRange& rRange,
sc::CopyToDocContext aCxt(*pDestDoc);
if (nTab1 > 0)
- CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, InsertDeleteFlags::FORMULA, false, pDestDoc, pMarks );
+ CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, InsertDeleteFlags::FORMULA, false, pDestDoc );
SCTAB nMinSizeBothTabs = static_cast<SCTAB>(std::min(maTabs.size(), pDestDoc->maTabs.size()));
for (SCTAB i = nTab1; i <= nTab2 && i < nMinSizeBothTabs; i++)
@@ -2086,11 +2082,11 @@ void ScDocument::UndoToDocument(const ScRange& rRange,
if (maTabs[i] && pDestDoc->maTabs[i])
maTabs[i]->UndoToTable(aCxt, aNewRange.aStart.Col(), aNewRange.aStart.Row(),
aNewRange.aEnd.Col(), aNewRange.aEnd.Row(),
- nFlags, bOnlyMarked, pDestDoc->maTabs[i], pMarks);
+ nFlags, bOnlyMarked, pDestDoc->maTabs[i]);
}
if (nTab2 < static_cast<SCTAB>(maTabs.size()))
- CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,maTabs.size(), InsertDeleteFlags::FORMULA, false, pDestDoc, pMarks );
+ CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,maTabs.size(), InsertDeleteFlags::FORMULA, false, pDestDoc );
}
// bUseRangeForVBA added for VBA api support to allow content of a specified
@@ -4006,13 +4002,13 @@ sal_uInt16 ScDocument::GetColWidth( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero )
return 0;
}
-sal_uLong ScDocument::GetColWidth( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHiddenAsZero ) const
+sal_uLong ScDocument::GetColWidth( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab ) const
{
const ScTable* pTab = FetchTable(nTab);
if (!pTab)
return 0;
- return pTab->GetColWidth(nStartCol, nEndCol, bHiddenAsZero);
+ return pTab->GetColWidth(nStartCol, nEndCol);
}
sal_uInt16 ScDocument::GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const
@@ -4047,10 +4043,10 @@ sal_uInt16 ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero
return 0;
}
-sal_uInt16 ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero ) const
+sal_uInt16 ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow ) const
{
if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
- return maTabs[nTab]->GetRowHeight( nRow, pStartRow, pEndRow, bHiddenAsZero );
+ return maTabs[nTab]->GetRowHeight( nRow, pStartRow, pEndRow );
OSL_FAIL("Wrong sheet number");
return 0;
}
@@ -4393,12 +4389,12 @@ bool ScDocument::HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) con
return maTabs[nTab]->HasFilteredRows(nStartRow, nEndRow);
}
-bool ScDocument::ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol, SCCOL* pLastCol) const
+bool ScDocument::ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol) const
{
if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab])
return false;
- return maTabs[nTab]->ColFiltered(nCol, pFirstCol, pLastCol);
+ return maTabs[nTab]->ColFiltered(nCol, pFirstCol);
}
void ScDocument::SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered)
@@ -4943,10 +4939,10 @@ ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, bool
return new ScPatternAttr( GetPool() ); // empty
}
-const ScPatternAttr* ScDocument::GetSelectionPattern( const ScMarkData& rMark, bool bDeep )
+const ScPatternAttr* ScDocument::GetSelectionPattern( const ScMarkData& rMark )
{
delete pSelectionAttr;
- pSelectionAttr = CreateSelectionPattern( rMark, bDeep );
+ pSelectionAttr = CreateSelectionPattern( rMark );
return pSelectionAttr;
}
@@ -5808,7 +5804,7 @@ void ScDocument::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData&
}
void ScDocument::DeleteSelectionTab(
- SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast )
+ SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark )
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
{
@@ -5838,7 +5834,7 @@ void ScDocument::DeleteSelectionTab(
aCxt.purgeEmptyBroadcasters();
}
- maTabs[nTab]->DeleteSelection(nDelFlag, rMark, bBroadcast);
+ maTabs[nTab]->DeleteSelection(nDelFlag, rMark);
if (bDelContent)
{
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index bff5524..5cda7a0 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -3573,7 +3573,7 @@ const ScDPObject* ScDPCollection::GetByName(const OUString& rName) const
return nullptr;
}
-OUString ScDPCollection::CreateNewName( sal_uInt16 nMin ) const
+OUString ScDPCollection::CreateNewName() const
{
OUString aBase("DataPilot");
@@ -3582,7 +3582,7 @@ OUString ScDPCollection::CreateNewName( sal_uInt16 nMin ) const
{
OUStringBuffer aBuf;
aBuf.append(aBase);
- aBuf.append(static_cast<sal_Int32>(nMin + nAdd));
+ aBuf.append(static_cast<sal_Int32>(1 + nAdd));
OUString aNewName = aBuf.makeStringAndClear();
bool bFound = false;
TablesType::const_iterator itr = maTables.begin(), itrEnd = maTables.end();
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 43e22c1..03b6b01 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -819,8 +819,9 @@ sal_Int32 ScGlobal::FindUnquoted( const OUString& rString, sal_Unicode cChar)
return -1;
}
-const sal_Unicode* ScGlobal::FindUnquoted( const sal_Unicode* pString, sal_Unicode cChar, sal_Unicode cQuote )
+const sal_Unicode* ScGlobal::FindUnquoted( const sal_Unicode* pString, sal_Unicode cChar )
{
+ sal_Unicode cQuote = '\'';
const sal_Unicode* p = pString;
bool bQuoted = false;
while (*p)
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 509ef41..efcf23e 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -173,7 +173,7 @@ public:
/** Places the caption inside the passed rectangle, tries to keep the cell rectangle uncovered. Uses page area if 0 is passed. */
void AutoPlaceCaption( const Rectangle* pVisRect = nullptr );
/** Updates caption tail and textbox according to current cell position. Uses page area if 0 is passed. */
- void UpdateCaptionPos( const Rectangle* pVisRect = nullptr );
+ void UpdateCaptionPos();
protected:
/** Helper constructor for derived classes. */
@@ -323,7 +323,7 @@ void ScCaptionCreator::AutoPlaceCaption( const Rectangle* pVisRect )
FitCaptionToRect( pVisRect );
}
-void ScCaptionCreator::UpdateCaptionPos( const Rectangle* pVisRect )
+void ScCaptionCreator::UpdateCaptionPos()
{
ScDrawLayer* pDrawLayer = mrDoc.GetDrawLayer();
@@ -345,7 +345,7 @@ void ScCaptionCreator::UpdateCaptionPos( const Rectangle* pVisRect )
mpCaption->SetTailPos( aTailPos );
mpCaption->SetLogicRect( aCaptRect );
// fit caption into draw page
- FitCaptionToRect( pVisRect );
+ FitCaptionToRect();
}
// update cell position in caption user data
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index df8284a..2d79511 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -563,7 +563,7 @@ bool ScTable::GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const
const SCCOL SC_COLUMNS_STOP = 30;
-bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, bool bFullFormattedArea ) const
+bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes ) const
{
bool bFound = false;
SCCOL nMaxX = 0;
@@ -605,7 +605,7 @@ bool ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, bool bF
for (i=0; i<=MAXCOL; i++) // Test attribute
{
SCROW nLastRow;
- if (aCol[i].GetLastVisibleAttr( nLastRow, bFullFormattedArea ))
+ if (aCol[i].GetLastVisibleAttr( nLastRow ))
{
bFound = true;
nMaxX = i;
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index dda96de..8de331d 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -318,8 +318,7 @@ void DoubleRefToVars( const formula::FormulaToken* p,
bool bDontCheckForTableOp = false );
ScDBRangeBase* PopDBDoubleRef();
void PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1,
- SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2,
- bool bDontCheckForTableOp = false );
+ SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2 );
void PopExternalSingleRef(sal_uInt16& rFileId, OUString& rTabName, ScSingleRefData& rRef);
void PopExternalSingleRef(ScExternalRefCache::TokenRef& rToken, ScExternalRefCache::CellFormat* pFmt = nullptr);
void PopExternalSingleRef(sal_uInt16& rFileId, OUString& rTabName, ScSingleRefData& rRef,
diff --git a/sc/source/core/inc/jumpmatrix.hxx b/sc/source/core/inc/jumpmatrix.hxx
index cbc72f2..ed98e53 100644
--- a/sc/source/core/inc/jumpmatrix.hxx
+++ b/sc/source/core/inc/jumpmatrix.hxx
@@ -97,7 +97,7 @@ public:
ScJumpMatrix( SCSIZE nColsP, SCSIZE nRowsP );
~ScJumpMatrix();
void GetDimensions( SCSIZE& rCols, SCSIZE& rRows ) const;
- void SetJump( SCSIZE nCol, SCSIZE nRow, double fBool, short nStart, short nNext, short nStop = SHRT_MAX );
+ void SetJump( SCSIZE nCol, SCSIZE nRow, double fBool, short nStart, short nNext );
void GetJump( SCSIZE nCol, SCSIZE nRow, double& rBool, short& rStart, short& rNext, short& rStop ) const;
void SetAllJumps( double fBool, short nStart, short nNext, short nStop = SHRT_MAX );
void SetJumpParameters( ScTokenVec* p );
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 6849db3..d4a69c7 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -2166,7 +2166,7 @@ bool ScRange::Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScRange& rErrorRange, ScDoc
return b;
}
-bool ScRange::MoveSticky( SCsCOL dx, SCsROW dy, SCsTAB dz, ScRange& rErrorRange, ScDocument* pDoc )
+bool ScRange::MoveSticky( SCsCOL dx, SCsROW dy, SCsTAB dz, ScRange& rErrorRange )
{
bool bColRange = (aStart.Col() < aEnd.Col());
bool bRowRange = (aStart.Row() < aEnd.Row());
@@ -2174,13 +2174,13 @@ bool ScRange::MoveSticky( SCsCOL dx, SCsROW dy, SCsTAB dz, ScRange& rErrorRange,
dy = 0; // Entire column not to be moved.
if (dx && aStart.Col() == 0 && aEnd.Col() == MAXCOL)
dx = 0; // Entire row not to be moved.
- bool b1 = aStart.Move( dx, dy, dz, rErrorRange.aStart, pDoc );
+ bool b1 = aStart.Move( dx, dy, dz, rErrorRange.aStart );
if (dx && bColRange && aEnd.Col() == MAXCOL)
dx = 0; // End column sticky.
if (dy && bRowRange && aEnd.Row() == MAXROW)
dy = 0; // End row sticky.
SCTAB nOldTab = aEnd.Tab();
- bool b2 = aEnd.Move( dx, dy, dz, rErrorRange.aEnd, pDoc );
+ bool b2 = aEnd.Move( dx, dy, dz, rErrorRange.aEnd );
if (!b2)
{
// End column or row of a range may have become sticky.
@@ -2235,31 +2235,30 @@ void ScRange::IncEndRowSticky( SCsROW nDelta )
aEnd.IncRow( nDelta); // was greater than MAXROW, caller should know..
}
-OUString ScAddress::GetColRowString( bool bAbsolute,
- const Details& rDetails ) const
+OUString ScAddress::GetColRowString( bool bAbsolute ) const
{
OUStringBuffer aString;
- switch( rDetails.eConv )
+ switch( detailsOOOa1.eConv )
{
default :
case formula::FormulaGrammar::CONV_OOO:
case formula::FormulaGrammar::CONV_XL_A1:
case formula::FormulaGrammar::CONV_XL_OOX:
- if (bAbsolute)
- aString.append("$");
+ if (bAbsolute)
+ aString.append("$");
- lcl_ScColToAlpha( aString, nCol);
+ lcl_ScColToAlpha( aString, nCol);
- if ( bAbsolute )
- aString.append("$");
+ if ( bAbsolute )
+ aString.append("$");
- aString.append(OUString::number(nRow+1));
+ aString.append(OUString::number(nRow+1));
break;
case formula::FormulaGrammar::CONV_XL_R1C1:
- lcl_r1c1_append_r ( aString, nRow, bAbsolute, rDetails );
- lcl_r1c1_append_c ( aString, nCol, bAbsolute, rDetails );
+ lcl_r1c1_append_r ( aString, nRow, bAbsolute, detailsOOOa1 );
+ lcl_r1c1_append_c ( aString, nCol, bAbsolute, detailsOOOa1 );
break;
}
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index 65eba23..c588676 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -128,8 +128,7 @@ void ScCellFormat::GetString( ScRefCellValue& rCell, sal_uLong nFormat, OUString
OUString ScCellFormat::GetString(
ScDocument& rDoc, const ScAddress& rPos, sal_uLong nFormat, Color** ppColor,
- SvNumberFormatter& rFormatter, bool bNullVals, bool bFormula, ScForceTextFmt eForceTextFmt,
- bool bUseStarFormat )
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list