summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-10-15 14:44:07 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-10-30 12:58:28 +0100
commit6af797a11a2f1c79303580c4d76401f0594dcc7d (patch)
tree8eef9314013d0b8a99909e3def366c4e7fd3771a /sw
parent1113636c0a976387189b0f721c0721119ef12dff (diff)
We're not interested in using an empty reply
Change-Id: I6925879c83e188e892a375df5b295a48fb0f464d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174974 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 18e1f0e92aa20ba9c08ce553523f8a2cdec2e23d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175759 Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index c447eff36ca8..20e44c8a930d 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -2291,7 +2291,9 @@ void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, const SfxRequest& rReq)
sText = GetView().GetPostItMgr()->GetAnswerText();
pPostItMgr->RegisterAnswerText(OUString());
}
- oTextPara = *pAnswer;
+ const EditTextObject& rTextObject = pAnswer->GetTextObject();
+ if (rTextObject.GetParagraphCount() != 1 || !rTextObject.GetText(0).isEmpty())
+ oTextPara = *pAnswer;
}
if ( HasSelection() && !IsTableMode() )