[Libreoffice-commits] core.git: sw/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 23 10:58:46 UTC 2019
sw/source/uibase/wrtsh/wrtsh1.cxx | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
New commits:
commit e265c9134ce0fc227781303f2bbffabcbe322ded
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Sep 23 10:34:42 2019 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Sep 23 12:57:50 2019 +0200
Use proper which ranges to avoid resetting RES_CHRATR_RSID
Change-Id: I5be2e34e70b0381f6b5e13a375eab53172686bde
Reviewed-on: https://gerrit.libreoffice.org/79387
Reviewed-by: Phil Krylov <phil.krylov at gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
Tested-by: Jenkins
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 666cf357a27c..52f30e803973 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -212,10 +212,10 @@ void SwWrtShell::Insert( const OUString &rStr )
bCallIns = m_bIns /*|| bHasSel*/;
bool bDeleted = false;
- SfxItemSet aCharAttrSet(
- GetAttrPool(),
- svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT>{});
+ typedef svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_RSID - 1,
+ RES_CHRATR_RSID + 1, RES_CHRATR_END - 1,
+ RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT> CharItems;
+ SfxItemSet aCharAttrSet(GetAttrPool(), CharItems{});
if( bHasSel || ( !m_bIns && SelectHiddenRange() ) )
{
@@ -240,7 +240,6 @@ void SwWrtShell::Insert( const OUString &rStr )
const SwPosition *pStart = GetCursor()->Start();
SwPaM aPaM(pStart->nNode.GetNode(), pStart->nContent.GetIndex(),
pStart->nNode.GetNode(), pStart->nContent.GetIndex() + 1);
- aCharAttrSet.ClearItem(RES_CHRATR_RSID);
GetPaMAttr(&aPaM, aCharAttrSet);
StartUndo(SwUndoId::REPLACE, &aRewriter);
More information about the Libreoffice-commits
mailing list