summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-01 19:41:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-02 18:26:37 +0100
commit8423861a74d7c6425ed2c3699806dd97415a04e1 (patch)
treeb198c81cdbdd7f56155287e6bada6ea05829165e /sw/source/filter
parent55133fc5fc499f6266f75ad3df77106f12333201 (diff)
drop PendingDrawObjectsInPaM in favor of detecting draw objects removal
Change-Id: I9f24f16ae47c8c178259650944bd80e19d6a887d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124568 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/html/htmlsect.cxx2
-rw-r--r--sw/source/filter/html/htmltab.cxx32
-rw-r--r--sw/source/filter/html/swhtml.hxx2
3 files changed, 3 insertions, 33 deletions
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 9b212c0c5f4b..928e9bfe158d 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -207,7 +207,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken )
static_cast<const SwStartNode *>( &rContentStIdx.GetNode() );
aDelPam.GetPoint()->nNode = pStNd->EndOfSectionIndex() - 1;
- if (!PendingObjectsInPaM(aDelPam))
+ if (!PendingTableInPaM(aDelPam))
{
m_xDoc->getIDocumentContentOperations().DeleteRange(aDelPam);
m_xDoc->getIDocumentContentOperations().DelFullPara(aDelPam);
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 7407988ce640..ffb9c173027f 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -634,8 +634,6 @@ public:
void IncBoxCount() { m_nBoxes++; }
bool IsOverflowing() const { return m_nBoxes > 64000; }
-
- bool PendingDrawObjectsInPaM(SwPaM& rPam) const;
};
void HTMLTableCnts::InitCtor()
@@ -5256,39 +5254,11 @@ std::shared_ptr<HTMLTable> SwHTMLParser::BuildTable(SvxAdjust eParentAdjust,
return xRetTable;
}
-bool HTMLTable::PendingDrawObjectsInPaM(SwPaM& rPam) const
-{
- if (!m_xResizeDrawObjects)
- return false;
-
- bool bRet = false;
-
- sal_uInt16 nCount = m_xResizeDrawObjects->size();
- for (sal_uInt16 i = 0; i < nCount && !bRet; ++i)
- {
- SdrObject *pObj = (*m_xResizeDrawObjects)[i];
- SwFrameFormat* pObjectFormat = ::FindFrameFormat(pObj);
- if (!pObjectFormat)
- continue;
- const SwFormatAnchor& rAnch = pObjectFormat->GetAnchor();
- if (const SwPosition* pPos = rAnch.GetContentAnchor())
- {
- SwNodeIndex aObjNodeIndex(pPos->nNode);
- bRet = (aObjNodeIndex >= rPam.Start()->nNode && aObjNodeIndex <= rPam.End()->nNode);
- }
- }
-
- return bRet;
-}
-
-bool SwHTMLParser::PendingObjectsInPaM(SwPaM& rPam) const
+bool SwHTMLParser::PendingTableInPaM(SwPaM& rPam) const
{
bool bRet = false;
for (const auto& a : m_aTables)
{
- bRet = a->PendingDrawObjectsInPaM(rPam);
- if (bRet)
- break;
const SwTable *pTable = a->GetSwTable();
if (!pTable)
continue;
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 023a796b5f5c..a0b714307974 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -874,7 +874,7 @@ private:
bool HasCurrentParaFlys( bool bNoSurroundOnly = false,
bool bSurroundOnly = false ) const;
- bool PendingObjectsInPaM(SwPaM& rPam) const;
+ bool PendingTableInPaM(SwPaM& rPam) const;
class TableDepthGuard
{