diff options
author | matteocam <matteo.campanelli@gmail.com> | 2014-05-28 16:20:14 -0400 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2014-06-30 22:54:38 +0200 |
commit | be34ea6f62a357eaaab01ce14e2882528015e1d1 (patch) | |
tree | 8e206c3cbb44889b1e8aa0c8fbd0a8c4abf18be8 /editeng | |
parent | fcbfcc75ed6157f4eb4124c7cfeda4346ddc6b45 (diff) |
Cleaned up code from operations in vcl
Change-Id: Ica5194f0cf6e30ec099974ae8b794fb2bc5e654a
(cherry picked from commit 4445f361aa2730b61fdd339dcdd7014b266e5c42)
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index b5053b2e16f8..86a8090875c2 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2556,6 +2556,9 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo rFont = pNode->GetCharAttribs().GetDefFont(); + /* + * Set attributes for script types Asian and Complex + */ short nScriptType = GetI18NScriptType( EditPaM( pNode, nPos ) ); if ( ( nScriptType == i18n::ScriptType::ASIAN ) || ( nScriptType == i18n::ScriptType::COMPLEX ) ) { @@ -2574,6 +2577,9 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo sal_uInt16 nRelWidth = ((const SvxCharScaleWidthItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_FONTWIDTH)).GetValue(); + /* + * Set output device's line and overline colors + */ if ( pOut ) { const SvxUnderlineItem& rTextLineColor = (const SvxUnderlineItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_UNDERLINE ); @@ -2594,6 +2600,9 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo const SvxLanguageItem* pCJKLanguageItem = NULL; + /* + * Scan through char attributes of pNode + */ if ( aStatus.UseCharAttribs() ) { CharAttribList::AttribsType& rAttribs = pNode->GetCharAttribs().GetAttribs(); @@ -3412,6 +3421,12 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt ' ' == aText[nTextStart + nTextLen - 1] ) --nTextLen; + // FIXME(matteocam) + if (aTmpFont.GetItalic() != ITALIC_NONE) { + Color aColor = COL_BROWN; + aTmpFont.SetFillColor(aColor); + } + // output directly aTmpFont.QuickDrawText( pOutDev, aRealOutPos, aText, nTextStart, nTextLen, pDXArray ); @@ -3684,6 +3699,8 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDev SvxFont aTmpFont; ContentNode* pNode = GetEditDoc().GetObject( 0 ); SeekCursor( pNode, 1, aTmpFont ); + + Color aFontColor( aTmpFont.GetColor() ); if( (aFontColor == COL_AUTO) || IsForceAutoColor() ) aFontColor = GetAutoColor(); |