summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlcss1.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-05-19 14:32:58 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-05-19 18:59:01 +0200
commit0b725c38e01de528b3102975a842a700f4188087 (patch)
tree47c0565b62ccc1d2cb239beff1458ba6cb802254 /sw/source/filter/html/htmlcss1.cxx
parent581f7ae64de2a865c4a888248c374a89719f0f03 (diff)
sw HTML import: ignore hidden text frames
Use-case: HTML-copy 2 lines from a browser from a mattermost chat, paste it into Writer. The content is not visible at all, because there are 5 invisible full-page textframes covering the actual content. The browser has no problem with showing the content as these divs are all invisible. Writer does not support hiding textframes, so just ignore them on import for now. Change-Id: I36a807d46f5f8348239e4693ec85da49a2205854 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94500 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/filter/html/htmlcss1.cxx')
-rw-r--r--sw/source/filter/html/htmlcss1.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index d314b2caa7dd..ce608edc98f2 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -1425,6 +1425,12 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( sal_uInt16 nPoolId, bool bCreate )
bool SwCSS1Parser::MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
bool bAutoWidth )
{
+ if (!rPropInfo.m_bVisible)
+ {
+ // Don't create a textframe for this div if it's hidden.
+ return false;
+ }
+
// abs-pos
// left/top none auto twip perc