summaryrefslogtreecommitdiffstats
path: root/editeng
diff options
context:
space:
mode:
authormatteocam <matteo.campanelli@gmail.com>2014-05-28 16:20:14 -0400
committerFridrich Štrba <fridrich.strba@bluewin.ch>2014-06-30 22:54:38 +0200
commitbe34ea6f62a357eaaab01ce14e2882528015e1d1 (patch)
tree8e206c3cbb44889b1e8aa0c8fbd0a8c4abf18be8 /editeng
parentAdded EE_CHAR_BKGCOLOR (diff)
downloadcore-be34ea6f62a357eaaab01ce14e2882528015e1d1.tar.gz
core-be34ea6f62a357eaaab01ce14e2882528015e1d1.zip
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.cxx17
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();