[Libreoffice-commits] core.git: sw/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 20 08:56:20 UTC 2020
sw/source/core/undo/undobj1.cxx | 24 ++++--------------------
1 file changed, 4 insertions(+), 20 deletions(-)
New commits:
commit 6c55d0ea3952c87aebec7fce76e1cdea1ff981f8
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Aug 19 17:05:20 2020 +0200
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Thu Aug 20 10:55:33 2020 +0200
sw: remove misleading initialisation from SwUndoInsLayFormat
Change-Id: I5577b388b565cdab6dcf60721f0f90d2987dac05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101005
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 3f20a2e9c67a..3feab0a10c74 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -269,26 +269,10 @@ SwUndoInsLayFormat::SwUndoInsLayFormat( SwFrameFormat* pFormat, sal_uLong nNodeI
const SwFormatAnchor& rAnchor = m_pFrameFormat->GetAnchor();
m_nRndId = rAnchor.GetAnchorId();
m_bDelFormat = false;
- switch( m_nRndId )
- {
- case RndStdIds::FLY_AT_PAGE:
- m_nNodePagePos = rAnchor.GetPageNum();
- break;
- case RndStdIds::FLY_AT_PARA:
- case RndStdIds::FLY_AT_FLY:
- m_nNodePagePos = rAnchor.GetContentAnchor()->nNode.GetIndex();
- break;
- case RndStdIds::FLY_AS_CHAR:
- case RndStdIds::FLY_AT_CHAR:
- {
- const SwPosition* pPos = rAnchor.GetContentAnchor();
- m_nContentPos = pPos->nContent.GetIndex();
- m_nNodePagePos = pPos->nNode.GetIndex();
- }
- break;
- default:
- OSL_FAIL( "Which FlyFrame?" );
- }
+ // note: SwUndoInsLayFormat is called with the content being fully inserted
+ // from most places but with only an empty content section from
+ // CopyLayoutFormat(); it's not necessary here to init m_nNodePagePos
+ // because Undo will do it.
}
SwUndoInsLayFormat::~SwUndoInsLayFormat()
More information about the Libreoffice-commits
mailing list