summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorPhil Krylov <phil.krylov@gmail.com>2019-03-15 23:26:04 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-03-21 08:13:23 +0100
commit04bd1925706360414438b814046b543c5e317d0a (patch)
tree2699da23b357bf568f143afaba63daf6e4e702c2 /sw
parent7379a8084df6fd659591ec114d43122ef1686d00 (diff)
tdf#79717 save/restore character style on selection overwrite
Change-Id: Ie423e72014734bc188ffb585150dcb024d377d1b Reviewed-on: https://gerrit.libreoffice.org/69323 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 8ea052499b4f..5d5745bb85fa 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -89,6 +89,7 @@
#include <editeng/acorrcfg.hxx>
#include <IMark.hxx>
#include <sfx2/bindings.hxx>
+#include <fchrfmt.hxx>
// -> #111827#
#include <SwRewriter.hxx>
@@ -188,7 +189,8 @@ void SwWrtShell::Insert( const OUString &rStr )
SfxItemSet aCharAttrSet(
GetAttrPool(),
- svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>{});
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT>{});
if( bHasSel || ( !m_bIns && SelectHiddenRange() ) )
{
@@ -235,6 +237,7 @@ void SwWrtShell::Insert( const OUString &rStr )
for (sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; ++i)
if (i != sal_uInt16(RES_CHRATR_RSID))
aAttribs.insert(aAttribs.end(), i);
+ aAttribs.insert(aAttribs.end(), RES_TXTATR_CHARFMT);
ResetAttr(aAttribs, &aPaM);
SetAttrSet(aCharAttrSet, SetAttrMode::DEFAULT, &aPaM);