From 4565382ee6f8fec96f0df94c34a2567816291c2e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 19 Jan 2022 12:15:01 +0100 Subject: sw: generalize ModelToViewHelper to handle all NonTextFieldmarks Rename getDropDownsFor() to getNoTextFieldmarksIn(). Move some code so that sw::mark::ExpandFieldmark can expand all fieldmarks that use CH_TXT_ATR_FORMELEMENT. Change-Id: I8a1e28fc0ad77df3a749d9e55c306cb45187a082 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128606 Tested-by: Jenkins Reviewed-by: Michael Stahl --- sw/source/core/doc/docbm.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sw/source/core/doc/docbm.cxx') diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index e9c0ce701eba..5ed676719622 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1569,7 +1569,7 @@ namespace sw::mark return pMark; } - std::vector MarkManager::getDropDownsFor(const SwPaM &rPaM) const + std::vector MarkManager::getNoTextFieldmarksIn(const SwPaM &rPaM) const { std::vector aRet; @@ -1582,8 +1582,11 @@ namespace sw::mark continue; IFieldmark *pMark = dynamic_cast(pI); - if (!pMark || pMark->GetFieldname() != ODF_FORMDROPDOWN) + if (!pMark || (pMark->GetFieldname() != ODF_FORMDROPDOWN + && pMark->GetFieldname() != ODF_FORMCHECKBOX)) + { continue; + } aRet.push_back(pMark); } -- cgit