summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-31 14:36:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-01 06:44:26 +0100
commit15c86cadadcd389bfcf80ca285c1c298353d987f (patch)
tree5b03dcae0c545dea73ceb1abefe13b46970ec290
parentef9bfdfe4f4ef75ca65547face0db09af7352314 (diff)
rename RemoveX->Remove in SfxUndoArray
accidentally left it this way when doing commit 19e715973e15f9e7cf6e8237643dbbc14f8eb87a Date: Mon Oct 29 16:15:27 2018 +0200 loplugin:useuniqueptr in MarkedUndoAction Change-Id: I250676df7af27f485c5d34281ef0da1e127eb24c Reviewed-on: https://gerrit.libreoffice.org/62694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--include/svl/undo.hxx4
-rw-r--r--sd/source/ui/view/outlview.cxx4
-rw-r--r--sfx2/source/doc/Metadatable.cxx18
-rw-r--r--svl/source/undo/undo.cxx24
4 files changed, 25 insertions, 25 deletions
diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx
index 87c5196960f2..ad189ea54a08 100644
--- a/include/svl/undo.hxx
+++ b/include/svl/undo.hxx
@@ -106,8 +106,8 @@ struct SVL_DLLPUBLIC SfxUndoArray
SfxUndoArray( SfxUndoArray const & ) = delete; // MSVC2017 workaround
SfxUndoAction* GetUndoAction(size_t idx) { return maUndoActions[idx].pAction.get(); }
- std::unique_ptr<SfxUndoAction> RemoveX(int idx);
- void RemoveX( size_t i_pos, size_t i_count );
+ std::unique_ptr<SfxUndoAction> Remove(int idx);
+ void Remove( size_t i_pos, size_t i_count );
void Insert( std::unique_ptr<SfxUndoAction> i_action, size_t i_pos );
};
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index f2264eff09f5..544785643416 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1524,7 +1524,7 @@ void OutlineView::TryToMergeUndoActions()
// first remove the merged undo action
assert( pListAction->GetUndoAction(nEditPos) == pEditUndo &&
"sd::OutlineView::TryToMergeUndoActions(), wrong edit pos!" );
- pListAction->RemoveX(nEditPos);
+ pListAction->Remove(nEditPos);
if ( !pListAction->maUndoActions.empty() )
{
@@ -1535,7 +1535,7 @@ void OutlineView::TryToMergeUndoActions()
size_t nDestAction = pPrevListAction->maUndoActions.size();
while( nCount-- )
{
- std::unique_ptr<SfxUndoAction> pTemp = pListAction->RemoveX(0);
+ std::unique_ptr<SfxUndoAction> pTemp = pListAction->Remove(0);
pPrevListAction->Insert( std::move(pTemp), nDestAction++ );
}
pPrevListAction->nCurUndoAction = pPrevListAction->maUndoActions.size();
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 65b386640845..3ff02fb39735 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -183,7 +183,7 @@ public:
Does not remove the metadata reference from the element.
</p>
- @see RemoveXmlIdForElement
+ @see RemovemlIdForElement
*/
virtual void UnregisterMetadatable(Metadatable const&) = 0;
@@ -192,7 +192,7 @@ public:
GetXmlIdForElement(Metadatable const&) const;
/** remove the metadata reference for the given element. */
- virtual void RemoveXmlIdForElement(Metadatable const&) = 0;
+ virtual void RemovemlIdForElement(Metadatable const&) = 0;
protected:
@@ -221,7 +221,7 @@ public:
virtual void UnregisterMetadatable(Metadatable const&) override;
- virtual void RemoveXmlIdForElement(Metadatable const&) override;
+ virtual void RemovemlIdForElement(Metadatable const&) override;
/** register i_rCopy as a copy of i_rSource,
with precedence iff i_bCopyPrecedesSource is true */
@@ -312,7 +312,7 @@ public:
virtual void UnregisterMetadatable(Metadatable const&) override;
- virtual void RemoveXmlIdForElement(Metadatable const&) override;
+ virtual void RemovemlIdForElement(Metadatable const&) override;
/** register i_rCopy as a copy of i_rSource */
MetadatableClipboard & RegisterCopyClipboard(Metadatable & i_rCopy,
@@ -761,9 +761,9 @@ void XmlIdRegistryDocument::UnregisterMetadatable(const Metadatable& i_rObject)
}
}
-void XmlIdRegistryDocument::RemoveXmlIdForElement(const Metadatable& i_rObject)
+void XmlIdRegistryDocument::RemovemlIdForElement(const Metadatable& i_rObject)
{
- SAL_INFO("sfx", "RemoveXmlIdForElement: " << &i_rObject);
+ SAL_INFO("sfx", "RemovemlIdForElement: " << &i_rObject);
const XmlIdReverseMap_t::iterator iter(
m_pImpl->m_XmlIdReverseMap.find(&i_rObject) );
@@ -1165,9 +1165,9 @@ void XmlIdRegistryClipboard::UnregisterMetadatable(const Metadatable& i_rObject)
}
-void XmlIdRegistryClipboard::RemoveXmlIdForElement(const Metadatable& i_rObject)
+void XmlIdRegistryClipboard::RemovemlIdForElement(const Metadatable& i_rObject)
{
- SAL_INFO("sfx", "RemoveXmlIdForElement: " << &i_rObject);
+ SAL_INFO("sfx", "RemovemlIdForElement: " << &i_rObject);
ClipboardXmlIdReverseMap_t::iterator iter(
m_pImpl->m_XmlIdReverseMap.find(&i_rObject) );
@@ -1246,7 +1246,7 @@ void Metadatable::RemoveMetadataReference()
if (m_pReg)
{
m_pReg->UnregisterMetadatable( *this );
- m_pReg->RemoveXmlIdForElement( *this );
+ m_pReg->RemovemlIdForElement( *this );
m_pReg = nullptr;
}
}
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index 2bd89b39a0c7..18faeb8cfffd 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -136,14 +136,14 @@ void SfxUndoAction::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterEndElement(pWriter);
}
-std::unique_ptr<SfxUndoAction> SfxUndoArray::RemoveX(int idx)
+std::unique_ptr<SfxUndoAction> SfxUndoArray::Remove(int idx)
{
auto ret = std::move(maUndoActions[idx].pAction);
maUndoActions.erase(maUndoActions.begin() + idx);
return ret;
}
-void SfxUndoArray::RemoveX( size_t i_pos, size_t i_count )
+void SfxUndoArray::Remove( size_t i_pos, size_t i_count )
{
maUndoActions.erase(maUndoActions.begin() + i_pos, maUndoActions.begin() + i_pos + i_count);
}
@@ -400,14 +400,14 @@ void SfxUndoManager::SetMaxUndoActionCount( size_t nMaxUndoActionCount )
size_t nPos = m_xData->pActUndoArray->maUndoActions.size();
if ( nPos > m_xData->pActUndoArray->nCurUndoAction )
{
- SfxUndoAction* pAction = m_xData->pActUndoArray->RemoveX( nPos-1 ).release();
+ SfxUndoAction* pAction = m_xData->pActUndoArray->Remove( nPos-1 ).release();
aGuard.markForDeletion( pAction );
--nNumToDelete;
}
if ( nNumToDelete > 0 && m_xData->pActUndoArray->nCurUndoAction > 0 )
{
- SfxUndoAction* pAction = m_xData->pActUndoArray->RemoveX(0).release();
+ SfxUndoAction* pAction = m_xData->pActUndoArray->Remove(0).release();
aGuard.markForDeletion( pAction );
--m_xData->pActUndoArray->nCurUndoAction;
--nNumToDelete;
@@ -428,7 +428,7 @@ void SfxUndoManager::ImplClearCurrentLevel_NoNotify( UndoManagerGuard& i_guard )
while ( !m_xData->pActUndoArray->maUndoActions.empty() )
{
size_t deletePos = m_xData->pActUndoArray->maUndoActions.size() - 1;
- SfxUndoAction* pAction = m_xData->pActUndoArray->RemoveX( deletePos ).release();
+ SfxUndoAction* pAction = m_xData->pActUndoArray->Remove( deletePos ).release();
i_guard.markForDeletion( pAction );
}
@@ -512,7 +512,7 @@ void SfxUndoManager::ImplClearUndo( UndoManagerGuard& i_guard )
{
while ( m_xData->pActUndoArray->nCurUndoAction > 0 )
{
- SfxUndoAction* pUndoAction = m_xData->pActUndoArray->RemoveX( 0 ).release();
+ SfxUndoAction* pUndoAction = m_xData->pActUndoArray->Remove( 0 ).release();
i_guard.markForDeletion( pUndoAction );
--m_xData->pActUndoArray->nCurUndoAction;
}
@@ -529,7 +529,7 @@ void SfxUndoManager::ImplClearRedo( UndoManagerGuard& i_guard, bool const i_curr
while ( pUndoArray->maUndoActions.size() > pUndoArray->nCurUndoAction )
{
size_t deletePos = pUndoArray->maUndoActions.size() - 1;
- SfxUndoAction* pAction = pUndoArray->RemoveX( deletePos ).release();
+ SfxUndoAction* pAction = pUndoArray->Remove( deletePos ).release();
i_guard.markForDeletion( pAction );
}
@@ -570,7 +570,7 @@ bool SfxUndoManager::ImplAddUndoAction_NoNotify( SfxUndoAction *pAction, bool bT
{
while(m_xData->pActUndoArray->maUndoActions.size() >= m_xData->pActUndoArray->nMaxUndoActions)
{
- i_guard.markForDeletion( m_xData->pActUndoArray->RemoveX(0).release() );
+ i_guard.markForDeletion( m_xData->pActUndoArray->Remove(0).release() );
if (m_xData->pActUndoArray->nCurUndoAction > 0)
{
--m_xData->pActUndoArray->nCurUndoAction;
@@ -652,7 +652,7 @@ void SfxUndoManager::RemoveLastUndoAction()
aGuard.markForDeletion( m_xData->pActUndoArray->maUndoActions[nPos-1].pAction.release() );
}
- m_xData->pActUndoArray->RemoveX(
+ m_xData->pActUndoArray->Remove(
m_xData->pActUndoArray->nCurUndoAction,
m_xData->pActUndoArray->maUndoActions.size() - m_xData->pActUndoArray->nCurUndoAction );
ImplCheckEmptyActions();
@@ -1024,7 +1024,7 @@ size_t SfxUndoManager::ImplLeaveListAction( const bool i_merge, UndoManagerGuard
const size_t nListActionElements = pArrayToLeave->nCurUndoAction;
if ( nListActionElements == 0 )
{
- SfxUndoAction* pCurrentAction = m_xData->pActUndoArray->RemoveX( --m_xData->pActUndoArray->nCurUndoAction ).release();
+ SfxUndoAction* pCurrentAction = m_xData->pActUndoArray->Remove( --m_xData->pActUndoArray->nCurUndoAction ).release();
i_guard.markForDeletion( pCurrentAction );
i_guard.scheduleNotification( &SfxUndoListener::listActionCancelled );
@@ -1046,7 +1046,7 @@ size_t SfxUndoManager::ImplLeaveListAction( const bool i_merge, UndoManagerGuard
"SfxUndoManager::ImplLeaveListAction: cannot merge the list action if there's no other action on the same level - check this beforehand!" );
if ( m_xData->pActUndoArray->nCurUndoAction > 1 )
{
- std::unique_ptr<SfxUndoAction> pPreviousAction = m_xData->pActUndoArray->RemoveX( m_xData->pActUndoArray->nCurUndoAction - 2 );
+ std::unique_ptr<SfxUndoAction> pPreviousAction = m_xData->pActUndoArray->Remove( m_xData->pActUndoArray->nCurUndoAction - 2 );
--m_xData->pActUndoArray->nCurUndoAction;
pListAction->SetComment( pPreviousAction->GetComment() );
pListAction->Insert( std::move(pPreviousAction), 0 );
@@ -1168,7 +1168,7 @@ void SfxUndoManager::RemoveOldestUndoAction()
return;
}
- m_xData->pUndoArray->RemoveX( 0 ).release();
+ m_xData->pUndoArray->Remove( 0 ).release();
aGuard.markForDeletion( pActionToRemove );
--m_xData->pUndoArray->nCurUndoAction;
ImplCheckEmptyActions();