summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2015-06-15 23:23:10 +0300
committerCaolán McNamara <caolanm@redhat.com>2015-06-17 13:09:30 +0000
commit653792218dbb7bb1bbf415c880f104dcf7fee5f9 (patch)
tree26b33acb045e642e67387974b8cd6d16f11b583d
parent853033da3710f0e8df1b5d0d5355c6b0ce1c9ea0 (diff)
tdf#91001 Fix inc/dec font for complex selections
By "complex selection" I mean: 1. Selection with an empty paragraph that has a bullet. 2. Selection that has different font sizes. This is a regression of 5b32d9c4406a68507ac9737ee0ada8bd1d424815 that tried to fix tdf#61492. In reality in order to fix that, it seems to be enough to pass an empty SfxItemSet, because what we really need is to invalidate the bullet width (by setting it to -1), thus force recalculation, and this occurs anyway. Change-Id: I92545192f8c78ef7f1d66d72f0d8e8f256f87604 (cherry picked from commit 2a05cb81d363cce181d3e31967cea2cfff1bd06d) Reviewed-on: https://gerrit.libreoffice.org/16336 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sd/source/ui/view/drtxtob1.cxx15
1 files changed, 2 insertions, 13 deletions
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index c38924b1d378..924f06cf483e 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -396,19 +396,8 @@ void TextObjectBar::Execute( SfxRequest &rReq )
{
FuText::ChangeFontSize( nSlot == SID_GROW_FONT_SIZE, pOLV, pFontList, mpView );
if( pOLV )
- {
- SfxItemSet aSet( pOLV->GetEditView().GetAttribs() );
- SfxItemSet aNewAttrs (pOLV->GetEditView().GetEmptyItemSet() );
-
- aNewAttrs.Put( aSet.Get( EE_CHAR_FONTHEIGHT ), EE_CHAR_FONTHEIGHT );
- aNewAttrs.Put( aSet.Get( EE_CHAR_FONTHEIGHT_CJK ), EE_CHAR_FONTHEIGHT_CJK );
- aNewAttrs.Put( aSet.Get( EE_CHAR_FONTHEIGHT_CTL ), EE_CHAR_FONTHEIGHT_CTL );
-
- mpView->SetAttributes( aNewAttrs );
- }
- Invalidate();
- // to refresh preview (in outline mode), slot has to be invalidated:
- mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, true, false );
+ pOLV->SetAttribs( pOLV->GetEditView().GetEmptyItemSet() );
+ mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
}
rReq.Done();
}