summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-04-24 16:38:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-04-24 21:03:57 +0200
commit9e8bb8fa8a77665552db9c01cac1034d5040da7b (patch)
tree0fb53156d4b008049385cf621ec06273ce098d1a /editeng/source
parent3b5e0316f755b9981ed4f4032c2c362407b808f6 (diff)
Resolves: tdf#132288 don't merge adjacent properties for spell checking
spell checking relies on each attribute chunk being unmerged with identical adjacent chunks Change-Id: Ia835fa054cad0dee4304f16724b9eb0c29b46102 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92866 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng/source')
-rw-r--r--editeng/source/editeng/editdoc.cxx12
-rw-r--r--editeng/source/editeng/editeng.cxx4
2 files changed, 15 insertions, 1 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index ebc55808da25..fbcb4c51ed41 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1908,7 +1908,8 @@ EditDoc::EditDoc( SfxItemPool* pPool ) :
mnRotation(TextRotation::NONE),
bIsFixedCellHeight(false),
bOwnerOfPool(pPool == nullptr),
- bModified(false)
+ bModified(false),
+ bDisableAttributeExpanding(false)
{
// Don't create an empty node, Clear() will be called in EditEngine-CTOR
};
@@ -2369,6 +2370,15 @@ void EditDoc::InsertAttribInSelection( ContentNode* pNode, sal_Int32 nStart, sal
RemoveAttribs( pNode, nStart, nEnd, pStartingAttrib, pEndingAttrib, rPoolItem.Which() );
+ // tdf#132288 By default inserting an attribute beside another that is of
+ // the same type expands the original instead of inserting another. But the
+ // spell check dialog doesn't want that behaviour
+ if (bDisableAttributeExpanding)
+ {
+ pStartingAttrib = nullptr;
+ pEndingAttrib = nullptr;
+ }
+
if ( pStartingAttrib && pEndingAttrib &&
( *(pStartingAttrib->GetItem()) == rPoolItem ) &&
( *(pEndingAttrib->GetItem()) == rPoolItem ) )
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 1b76d967b3ba..73d85a07b7ce 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2814,6 +2814,10 @@ bool EditEngine::IsPageOverflow() {
return pImpEditEngine->IsPageOverflow();
}
+void EditEngine::DisableAttributeExpanding() {
+ pImpEditEngine->GetEditDoc().DisableAttributeExpanding();
+}
+
EFieldInfo::EFieldInfo()
{
}