diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-09 17:07:54 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-11 07:14:34 +0000 |
commit | 63ba54a168dbc777cdcec2393be476bdd5f79bc1 (patch) | |
tree | 48de29007d02ba4a982a50a1bd0138460e215c23 /editeng | |
parent | 7b9ea3348ac08d775ae452132239853724c65a41 (diff) |
convert EXTTEXTINPUT_ATTR to scoped enum
Change-Id: I94706bdea91d367fc8c2bbd482f6b4d8f55449d7
Reviewed-on: https://gerrit.libreoffice.org/24821
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 8 | ||||
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 20 | ||||
-rw-r--r-- | editeng/source/editeng/impedit5.cxx | 6 |
3 files changed, 17 insertions, 17 deletions
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 5875ad7d1f02..52c4c0ac5ed2 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -137,16 +137,16 @@ struct DragAndDropInfo struct ImplIMEInfos { OUString aOldTextAfterStartPos; - sal_uInt16* pAttribs; + ExtTextInputAttr* pAttribs; EditPaM aPos; sal_Int32 nLen; - bool bCursor; - bool bWasCursorOverwrite; + bool bCursor; + bool bWasCursorOverwrite; ImplIMEInfos( const EditPaM& rPos, const OUString& rOldTextAfterStartPos ); ~ImplIMEInfos(); - void CopyAttribs( const sal_uInt16* pA, sal_uInt16 nL ); + void CopyAttribs( const ExtTextInputAttr* pA, sal_uInt16 nL ); void DestroyAttribs(); }; diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index aa131dbc6f16..4d8f67403d95 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2342,7 +2342,7 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_Int32& rS if ( mpIMEInfos && mpIMEInfos->nLen && mpIMEInfos->pAttribs && ( mpIMEInfos->aPos.GetNode() == pNode ) ) { - sal_uInt16 nLastAttr = 0xFFFF; + ExtTextInputAttr nLastAttr = (ExtTextInputAttr)0xFFFF; for( sal_Int32 n = 0; n < mpIMEInfos->nLen; n++ ) { if ( mpIMEInfos->pAttribs[n] != nLastAttr ) @@ -2769,27 +2769,27 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo if ( mpIMEInfos && mpIMEInfos->pAttribs && ( mpIMEInfos->aPos.GetNode() == pNode ) && ( nPos > mpIMEInfos->aPos.GetIndex() ) && ( nPos <= ( mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen ) ) ) { - sal_uInt16 nAttr = mpIMEInfos->pAttribs[ nPos - mpIMEInfos->aPos.GetIndex() - 1 ]; - if ( nAttr & EXTTEXTINPUT_ATTR_UNDERLINE ) + ExtTextInputAttr nAttr = mpIMEInfos->pAttribs[ nPos - mpIMEInfos->aPos.GetIndex() - 1 ]; + if ( nAttr & ExtTextInputAttr::Underline ) rFont.SetUnderline( LINESTYLE_SINGLE ); - else if ( nAttr & EXTTEXTINPUT_ATTR_BOLDUNDERLINE ) + else if ( nAttr & ExtTextInputAttr::BoldUnderline ) rFont.SetUnderline( LINESTYLE_BOLD ); - else if ( nAttr & EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE ) + else if ( nAttr & ExtTextInputAttr::DottedUnderline ) rFont.SetUnderline( LINESTYLE_DOTTED ); - else if ( nAttr & EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE ) + else if ( nAttr & ExtTextInputAttr::DashDotUnderline ) rFont.SetUnderline( LINESTYLE_DOTTED ); - else if ( nAttr & EXTTEXTINPUT_ATTR_REDTEXT ) + else if ( nAttr & ExtTextInputAttr::RedText ) rFont.SetColor( Color( COL_RED ) ); - else if ( nAttr & EXTTEXTINPUT_ATTR_HALFTONETEXT ) + else if ( nAttr & ExtTextInputAttr::HalfToneText ) rFont.SetColor( Color( COL_LIGHTGRAY ) ); - if ( nAttr & EXTTEXTINPUT_ATTR_HIGHLIGHT ) + if ( nAttr & ExtTextInputAttr::Highlight ) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); rFont.SetColor( rStyleSettings.GetHighlightTextColor() ); rFont.SetFillColor( rStyleSettings.GetHighlightColor() ); rFont.SetTransparent( false ); } - else if ( nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE ) + else if ( nAttr & ExtTextInputAttr::GrayWaveline ) { rFont.SetUnderline( LINESTYLE_WAVE ); if( pOut ) diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index a20d2cb86551..224f5e1b5ba1 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -817,12 +817,12 @@ ImplIMEInfos::~ImplIMEInfos() delete[] pAttribs; } -void ImplIMEInfos::CopyAttribs( const sal_uInt16* pA, sal_uInt16 nL ) +void ImplIMEInfos::CopyAttribs( const ExtTextInputAttr* pA, sal_uInt16 nL ) { nLen = nL; delete[] pAttribs; - pAttribs = new sal_uInt16[ nL ]; - memcpy( pAttribs, pA, nL*sizeof(sal_uInt16) ); + pAttribs = new ExtTextInputAttr[ nL ]; + memcpy( pAttribs, pA, nL*sizeof(ExtTextInputAttr) ); } void ImplIMEInfos::DestroyAttribs() |