diff options
author | Muthu Subramanian <sumuthu@collabora.com> | 2014-02-04 18:24:03 +0530 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-03-25 11:40:09 +0200 |
commit | 21bc7548795ed6c3fc39a6e46b12d576b9bb89fb (patch) | |
tree | 34d280d223d293e22c076a11453aae96705bcd1c /svx | |
parent | decfc0306461aded04284023c05684f47ae6baad (diff) |
cp#1000025: Import casemaps from pptx.
(Ported from: 887bc4dd3e62fe6dd19dc9d1c3ba273a5b21b5ec
and 9dbcb79782d6a5b80c21a0c093537d18425b826f)
Change-Id: I211491e06273aedf5c8ddbd0ca3fc35f3d168aaa
Reviewed-on: https://gerrit.libreoffice.org/7848
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 5 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 6 | ||||
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index b01aab4052df..4927d8d45b21 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -178,6 +178,7 @@ namespace { if(!rInfo.maText.isEmpty() && rInfo.mnTextLen) { + OUString caseMappedText = rInfo.mrFont.CalcCaseMap( rInfo.maText ); basegfx::B2DVector aFontScaling; drawinglayer::attribute::FontAttribute aFontAttribute( drawinglayer::primitive2d::getFontAttributeFromVclFont( @@ -329,7 +330,7 @@ namespace // attributes for TextSimplePortionPrimitive2D aNewTransform, - rInfo.maText, + caseMappedText, rInfo.mnTextStart, rInfo.mnTextLen, aDXArray, @@ -356,7 +357,7 @@ namespace // TextSimplePortionPrimitive2D is enough pNewPrimitive = new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( aNewTransform, - rInfo.maText, + caseMappedText, rInfo.mnTextStart, rInfo.mnTextLen, aDXArray, diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 6d6befa2ff1f..b8f3a85067da 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -73,6 +73,8 @@ #include <editeng/shdditem.hxx> #include <editeng/udlnitem.hxx> #include <editeng/wghtitem.hxx> +#include <editeng/svxfont.hxx> +#include <editeng/cmapitem.hxx> #include "svx/drawitem.hxx" #include <svx/tbcontrl.hxx> #include "svx/dlgutil.hxx" @@ -630,6 +632,10 @@ void SvxStyleBox_Impl::UserDraw( const UserDrawEvent& rUDEvt ) if ( pItem ) aFont.SetStrikeout( static_cast< const SvxCrossedOutItem* >( pItem )->GetStrikeout() ); + pItem = aItemSet.GetItem( SID_ATTR_CHAR_CASEMAP ); + if ( pItem ) + ((SvxFont &)aFont).SetCaseMap( static_cast< const SvxCaseMapItem* >( pItem )->GetCaseMap() ); + pItem = aItemSet.GetItem( SID_ATTR_CHAR_EMPHASISMARK ); if ( pItem ) aFont.SetEmphasisMark( static_cast< const SvxEmphasisMarkItem* >( pItem )->GetEmphasisMark() ); diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 38c383912782..00557835ea3b 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -605,6 +605,7 @@ SfxItemPropertyMapEntry* ImplGetSvxControlShapePropertyMap() { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_WEIGHT), 0, &::getCppuType((const float*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_UNDERLINE), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_STRIKEOUT), 0, &::getCppuType((const sal_Int16*)0), 0, 0}, + { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_CASEMAP), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_COLOR), 0, &::getCppuType((const sal_Int32*)0), 0, 0 }, { MAP_CHAR_LEN("CharRelief"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN("CharUnderlineColor"), 0, &::getCppuType((const sal_Int32*)0), 0, 0 }, |