[Libreoffice-commits] core.git: sw/source
Jim Raykowski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 3 07:14:46 UTC 2020
sw/source/uibase/utlui/content.cxx | 45 ++++++++++++++++++++++++++++---------
1 file changed, 35 insertions(+), 10 deletions(-)
New commits:
commit 09e35aafccf2792c7a25e4d8a896b69f0ab47e04
Author: Jim Raykowski <raykowj at gmail.com>
AuthorDate: Thu Aug 27 16:44:36 2020 -0800
Commit: Jim Raykowski <raykowj at gmail.com>
CommitDate: Thu Sep 3 09:14:05 2020 +0200
tdf#136212 Fix Writer Navigator blink jump
when table, frame, image, OLE and draw objects are hidden
This patch fixes Writer Navigator blinking and scrolling back to
highlighted entry when table, frame, image, OLE and draw objects are
hidden by using checkVisiblityChanged function approach used by
SwContentType::FillMemberList ContentTypeId::REGION case.
For detailed explanation see commit
f5f6781acb292783033caea0147ff98490c78d89 and tdf#118322 Avoid blinking in
Explorer for 'Section' part
Change-Id: Ia119b7153394e09d8ae226a5a0c2f4d6d1d2838a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101515
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj at gmail.com>
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index cf7329ee267f..36cf1449881c 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -571,7 +571,6 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
}
break;
-
case ContentTypeId::TABLE :
{
const size_t nCount = m_pWrtShell->GetTableFrameFormatCount(true);
@@ -590,10 +589,18 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
pCnt->SetInvisible();
m_pMember->insert(std::unique_ptr<SwContent>(pCnt));
+ }
- if(nOldMemberCount > i &&
- (*pOldMember)[i]->IsInvisible() != pCnt->IsInvisible())
- *pbLevelOrVisibilityChanged = true;
+ if (nullptr != pbLevelOrVisibilityChanged)
+ {
+ assert(pOldMember);
+ // need to check visibility (and equal entry number) after
+ // creation due to a sorted list being used here (before,
+ // entries with same index were compared already at creation
+ // time what worked before a sorted list was used)
+ *pbLevelOrVisibilityChanged = checkVisibilityChanged(
+ *pOldMember,
+ *m_pMember);
}
}
break;
@@ -635,9 +642,18 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
m_pMember->insert(std::unique_ptr<SwContent>(pCnt));
- if (nOldMemberCount > i &&
- (*pOldMember)[i]->IsInvisible() != pCnt->IsInvisible())
- *pbLevelOrVisibilityChanged = true;
+ }
+
+ if(nullptr != pbLevelOrVisibilityChanged)
+ {
+ assert(pOldMember);
+ // need to check visibility (and equal entry number) after
+ // creation due to a sorted list being used here (before,
+ // entries with same index were compared already at creation
+ // time what worked before a sorted list was used)
+ *pbLevelOrVisibilityChanged = checkVisibilityChanged(
+ *pOldMember,
+ *m_pMember);
}
}
break;
@@ -803,11 +819,20 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
pCnt->SetInvisible();
m_pMember->insert(std::unique_ptr<SwContent>(pCnt));
m_nMemberCount++;
- if (nOldMemberCount > i &&
- (*pOldMember)[i]->IsInvisible() != pCnt->IsInvisible() )
- *pbLevelOrVisibilityChanged = true;
}
}
+
+ if (nullptr != pbLevelOrVisibilityChanged)
+ {
+ assert(pOldMember);
+ // need to check visibility (and equal entry number) after
+ // creation due to a sorted list being used here (before,
+ // entries with same index were compared already at creation
+ // time what worked before a sorted list was used)
+ *pbLevelOrVisibilityChanged = checkVisibilityChanged(
+ *pOldMember,
+ *m_pMember);
+ }
}
}
break;
More information about the Libreoffice-commits
mailing list