From 7adb6d218f50bbafea7998f67ed375c27694339c Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Tue, 30 Jun 2015 23:52:19 +0300 Subject: 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 Reviewed-by: Maxim Monastirsky --- sw/sdi/_annotsh.sdi | 14 ++++++++++++ sw/source/uibase/shells/annotsh.cxx | 11 ++++++++++ sw/source/uibase/shells/drwtxtex.cxx | 41 +++++++----------------------------- 3 files changed, 33 insertions(+), 33 deletions(-) (limited to 'sw') diff --git a/sw/sdi/_annotsh.sdi b/sw/sdi/_annotsh.sdi index 232388c69187..43bef1e6b77c 100644 --- a/sw/sdi/_annotsh.sdi +++ b/sw/sdi/_annotsh.sdi @@ -230,6 +230,20 @@ interface _Annotation DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; ] + FN_GROW_FONT_SIZE + [ + ExecMethod = Exec; + StateMethod = GetState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] + + FN_SHRINK_FONT_SIZE + [ + ExecMethod = Exec; + StateMethod = GetState ; + DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; + ] + SID_ATTR_CHAR_COLOR // api: [ ExecMethod = Exec; diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index ba0a7f642c94..614b18177c98 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -245,6 +246,16 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) rReq.Done(); } break; + case FN_GROW_FONT_SIZE: + case FN_SHRINK_FONT_SIZE: + { + const SvxFontListItem* pFontListItem = static_cast< const SvxFontListItem* > + ( SfxObjectShell::Current()->GetItem( SID_ATTR_CHAR_FONTLIST ) ); + const FontList* pFontList = pFontListItem ? pFontListItem->GetFontList() : nullptr; + pOLV->GetEditView().ChangeFontSize( nSlot == FN_GROW_FONT_SIZE, pFontList ); + } + break; + case SID_ATTR_CHAR_FONT: case SID_ATTR_CHAR_FONTHEIGHT: case SID_ATTR_CHAR_WEIGHT: diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 57a8b3cb7438..d826f1293649 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -99,9 +100,6 @@ #include "misc.hrc" #include -const sal_uInt32 nFontInc = 40; // 2pt -const sal_uInt32 nFontMaxSz = 19998; // 999.9pt - using namespace ::com::sun::star; void SwDrawTextShell::Execute( SfxRequest &rReq ) @@ -553,31 +551,10 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) case FN_GROW_FONT_SIZE: case FN_SHRINK_FONT_SIZE: { - SfxItemPool* pPool2 = aEditAttr.GetPool()->GetSecondaryPool(); - if( !pPool2 ) - pPool2 = aEditAttr.GetPool(); - - SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONTHEIGHT, *pPool2 ); - aSetItem.GetItemSet().Put( aEditAttr, false ); - - SvtScriptType nScriptTypes = pOLV->GetSelectedScriptType(); - const SvxFontHeightItem* pSize( static_cast( aSetItem.GetItemOfScript( nScriptTypes ) ) ); - - if (pSize) - { - SvxFontHeightItem aSize(*pSize); - - sal_uInt32 nSize = aSize.GetHeight(); - - if( nSlot == FN_GROW_FONT_SIZE && ( nSize += nFontInc ) > nFontMaxSz ) - nSize = nFontMaxSz; - else if( nSlot == FN_SHRINK_FONT_SIZE && ( nSize -= nFontInc ) < nFontInc ) - nSize = nFontInc; - - aSize.SetHeight( nSize ); - aSetItem.PutItemForScriptType( nScriptTypes, aSize ); - aNewAttr.Put( aSetItem.GetItemSet() ); - } + const SvxFontListItem* pFontListItem = static_cast< const SvxFontListItem* > + ( SfxObjectShell::Current()->GetItem( SID_ATTR_CHAR_FONTLIST ) ); + const FontList* pFontList = pFontListItem ? pFontListItem->GetFontList() : nullptr; + pOLV->GetEditView().ChangeFontSize( nSlot == FN_GROW_FONT_SIZE, pFontList ); } break; @@ -945,14 +922,12 @@ void SwDrawTextShell::GetDrawTextCtrlState(SfxItemSet& rSet) aSetItem.GetItemSet().Put( aEditAttr, false ); const SvxFontHeightItem* pSize( static_cast( aSetItem.GetItemOfScript( nScriptType ) ) ); - if( !pSize ) - rSet.DisableItem( nSlotId ); - else + if( pSize ) { sal_uInt32 nSize = pSize->GetHeight(); - if( nSize == nFontMaxSz ) + if( nSize >= 19998 ) rSet.DisableItem( FN_GROW_FONT_SIZE ); - else if( nSize == nFontInc ) + else if( nSize <= 40 ) rSet.DisableItem( FN_SHRINK_FONT_SIZE ); } } -- cgit 3 LibreOffice Dictionaries 子仓库文档基金会
summaryrefslogtreecommitdiff
path: root/hu_HU
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2018-01-17 11:31:56 +0100
committerLászló Németh <nemeth@numbertext.org>2018-01-17 13:44:22 +0100
commit9f4bce132552f5e92a9419aa2ab09167074089b2 (patch)
tree62b04d557a9d0501e8c169a582a3f9670a9e4a8a /hu_HU
parent68dd2e833bfb2d741e7ce66bea70751b85b63c19 (diff)
tdf#95024 Update Hungarian Lightproof module
- fix rules related to the new Hungarian orthography: - "e-mail-cím" or "ímélcím", and not "e-mail cím" - "örökkön örökké", and not "örökkön-örökké" - check completeness of foreign expressions: "ab ovo", "et cetera"... - new rules (test document attached to the bug report) Change-Id: I13ef37381fe15a3f4d51d61763e4f570a17fa2da Reviewed-on: https://gerrit.libreoffice.org/48044 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'hu_HU')
-rw-r--r--hu_HU/README_lightproof_hu_HU.txt4
-rw-r--r--hu_HU/pythonpath/lightproof_hu_HU.py2