summaryrefslogtreecommitdiff
path: root/sc/source/ui/drawfunc
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2015-06-30 23:52:19 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2015-07-01 17:51:10 +0000
commit7adb6d218f50bbafea7998f67ed375c27694339c (patch)
treeb84158e19737a1d941498dcdfc06f2d7c0359bc7 /sc/source/ui/drawfunc
parentf4f844952f1213283133fc848b0781bb0ce3bb53 (diff)
tdf#86179 inc/dec font is missing in some shells
Mostly in Calc, but also for the SwAnnotationShell. Also replace the current code in SwDrawTextShell with a call to EditView::ChangeFontSize. The latter is able to handle text with different sizes out of the box. Change-Id: I4b55da579ea51683140bce0544e481606d7e5f3e Reviewed-on: https://gerrit.libreoffice.org/16658 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sc/source/ui/drawfunc')
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index ae5bb94123e1..c07b2dff7c03 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -27,8 +27,10 @@
#include <editeng/contouritem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <editeng/editeng.hxx>
+#include <editeng/editview.hxx>
#include <editeng/escapementitem.hxx>
#include <editeng/flditem.hxx>
+#include <editeng/flstitem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/frmdiritem.hxx>
#include <editeng/lrspitem.hxx>
@@ -819,6 +821,23 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
}
break;
+ case SID_GROW_FONT_SIZE:
+ case SID_SHRINK_FONT_SIZE:
+ {
+ OutlinerView* pOutView = pView->IsTextEdit() ?
+ pView->GetTextEditOutlinerView() : nullptr;
+ if ( pOutView )
+ {
+ const SvxFontListItem* pFontListItem = static_cast< const SvxFontListItem* >
+ ( SfxObjectShell::Current()->GetItem( SID_ATTR_CHAR_FONTLIST ) );
+ const FontList* pFontList = pFontListItem ? pFontListItem->GetFontList() : nullptr;
+ pOutView->GetEditView().ChangeFontSize( nSlot == SID_GROW_FONT_SIZE, pFontList );
+ pViewData->GetBindings().Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
+ bDone = false;
+ }
+ }
+ break;
+
case SID_CHAR_DLG_EFFECT:
case SID_CHAR_DLG: // Dialog-Button
case SID_ATTR_CHAR_FONT: // Controller nicht angezeigt