diff options
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/accessibility/AccessibleEditableTextPara.cxx | 2 | ||||
-rw-r--r-- | editeng/source/accessibility/AccessibleStaticTextBase.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/editview.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/eehtml.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 83 | ||||
-rw-r--r-- | editeng/source/editeng/impedit4.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/textconv.hxx | 2 | ||||
-rw-r--r-- | editeng/source/misc/hangulhanja.cxx | 2 | ||||
-rw-r--r-- | editeng/source/misc/unolingu.cxx | 2 |
13 files changed, 90 insertions, 23 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 9ff0c08058df..51fce72ffac9 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -1554,7 +1554,7 @@ namespace accessibility for( i = 0; i < nLength; i++ ) pIndices[i] = i; sort( &pIndices[0], &pIndices[nLength], IndexCompare(pPairs) ); - // create sorted sequences accoring to index array + // create sorted sequences according to index array uno::Sequence<beans::PropertyValue> aNewValues( nLength ); beans::PropertyValue* pNewValues = aNewValues.getArray(); for( i = 0; i < nLength; i++ ) diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx index 6408b10a1c09..a2ea3248f0b6 100644 --- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx +++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx @@ -308,7 +308,7 @@ sal_Unicode cNewLine(0x0a); throw lang::DisposedException ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("object has been already disposed")), mxThis ); - // TODO: Have a differnt method on AccessibleEditableTextPara + // TODO: Have a different method on AccessibleEditableTextPara // that does not care about state changes mpTextParagraph->SetParagraphIndex( nPara ); diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index f8af8401fa1a..87d3cd6ae3dc 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -330,7 +330,7 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const P // Immer die Intersect-Methode, weil beim Metafile ein Muss! if ( bClip ) { - // Clip only if neccesary... + // Clip only if necessary... if ( !rStartDocPos.X() && !rStartDocPos.Y() && ( rOutRect.GetHeight() >= (long)GetTextHeight() ) && ( rOutRect.GetWidth() >= (long)CalcTextWidth() ) ) diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 3a2a23735e6f..354a84808f2f 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -648,7 +648,7 @@ BinTextObject::BinTextObject( SfxItemPool* pP ) : // pool destruction time of an alien pool, the pool is still alive. // When registering would happen at an alien pool which just uses an // EditEngineItemPool as some sub-pool, that pool could already - // be decoupled and deleted whcih would lead to crashes. + // be decoupled and deleted which would lead to crashes. pPool = getEditEngineItemPool(pP); if ( pPool ) diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index d144ec342a42..5f0f1a1340b9 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -108,7 +108,7 @@ LanguageType lcl_CheckLanguage( if (aTmpLocale.Language == aLocale.Language) nLang = nTmpLang; } - if (nLang == LANGUAGE_NONE) // language not found by looking up the sytem language... + if (nLang == LANGUAGE_NONE) // language not found by looking up the system language... nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale ); if (nLang == LANGUAGE_SYSTEM) nLang = nTmpLang; diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index d0271d785589..2faa3acba855 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -65,7 +65,7 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu DBG_ASSERT( RTL_TEXTENCODING_DONTKNOW == GetSrcEncoding( ), "EditHTMLParser::EditHTMLParser: Where does the encoding come from?" ); DBG_ASSERT( !IsSwitchToUCS2(), "EditHTMLParser::::EditHTMLParser: Switch to UCS2?" ); - // Altough the real default encoding is ISO8859-1, we use MS-1252 + // Although the real default encoding is ISO8859-1, we use MS-1252 // als default encoding. SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) ); diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 892c948afaef..f7f98ebe8f5f 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -253,7 +253,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion, OutputD if ( aBottomRight.Y() < GetVisDocTop() ) continue; - // Now that we have Bidi, the first/last index doesn't have to be the 'most outside' postion + // Now that we have Bidi, the first/last index doesn't have to be the 'most outside' position if ( !bPartOfLine ) { Range aLineXPosStartEnd = pEditEngine->pImpEditEngine->GetLineXPosStartEnd( pTmpPortion, pLine ); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 9d1d100e44f8..5cd0aedfe29e 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -1776,7 +1776,7 @@ void ImpEditEngine::InitScriptTypes( sal_uInt16 nPara ) if ( ( nScriptType == i18n::ScriptType::WEAK ) || ( nScriptType == rTypes.back().nScriptType ) ) { - // Expand last ScriptTypePosInfo, don't create weak or unecessary portions + // Expand last ScriptTypePosInfo, don't create weak or unnecessary portions rTypes.back().nEndPos = (sal_uInt16)nEndPos; } else @@ -2045,7 +2045,7 @@ sal_Bool ImpEditEngine::IsRightToLeft( sal_uInt16 nPara ) const // #103045# if DefaultHorizontalTextDirection is set, use that value, otherwise pool default. if ( GetDefaultHorizontalTextDirection() != EE_HTEXTDIR_DEFAULT ) { - pFrameDirItem = NULL; // bR2L allready set to default horizontal text direction + pFrameDirItem = NULL; // bR2L already set to default horizontal text direction } else { diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index a2e0f1f169f3..874a44b5db26 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -1037,7 +1037,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY ) bBrokenLine = sal_True; } // Compression in Fields???? - // I think this could be a little bit difficult and is not very usefull + // I think this could be a little bit difficult and is not very useful bCompressedChars = sal_False; } break; @@ -1247,7 +1247,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY ) sal_Bool bCanHyphenate = ( aTmpFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL ); if ( bCompressedChars && pPortion && ( pPortion->GetLen() > 1 ) && pPortion->GetExtraInfos() && pPortion->GetExtraInfos()->bCompressed ) { - // I need the manipulated DXArray for determining the break postion... + // I need the manipulated DXArray for determining the break position... ImplCalcAsianCompression( pNode, pPortion, nPortionStart, const_cast<sal_Int32*>(( pLine->GetCharPosArray().GetData() + (nPortionStart-pLine->GetStart()) )), 10000, sal_True ); } if( pPortion ) @@ -1285,7 +1285,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY ) for ( sal_uInt16 nP = pLine->GetStartPortion(); nP <= pLine->GetEndPortion(); nP++ ) { TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( nP ); - // #95819# problem with hard font height attribute, when everthing but the line break has this attribute + // #95819# problem with hard font height attribute, when everything but the line break has this attribute if ( pTP->GetKind() != PORTIONKIND_LINEBREAK ) { SeekCursor( pNode, nTPos+1, aTmpFont ); @@ -2093,7 +2093,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, pLastPortion->GetSize().Width()++; // Correct positions in array - // Even for kashidas just change positions, VCL will then draw the kashida automaticly + // Even for kashidas just change positions, VCL will then draw the kashida automatically sal_uInt16 nPortionEnd = nPortionStart + pLastPortion->GetLen(); for ( sal_uInt16 _n = nChar; _n < nPortionEnd; _n++ ) { @@ -3558,7 +3558,74 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta String aText; aText.Fill( (sal_uInt16)nChars, pTextPortion->GetExtraValue() ); - pOutDev->DrawStretchText( aTmpPos, pTextPortion->GetSize().Width(), aText ); + + if(bStripOnly) + { + // #71056# when converting to primitives, visualized TAB spaces need to be + // visualized. Add tab#ed text here. Alternatively a primitive especially + // representing this space and the single fill character would be possible, too. + // For now, use what we have (the DrawingText callback) + const lang::Locale aLocale(GetLocale(EditPaM(pPortion->GetNode(),nIndex + 1))); + + // get Overline color (from ((const SvxOverlineItem*)GetItem())->GetColor() in + // consequence, but also already set at pOutDev) + const Color aOverlineColor(pOutDev->GetOverlineColor()); + + // get TextLine color (from ((const SvxUnderlineItem*)GetItem())->GetColor() in + // consequence, but also already set at pOutDev) + const Color aTextLineColor(pOutDev->GetTextLineColor()); + + // get AllWidth and together with nCharWidth create DXArray using per character + // difference + const sal_Int32 nAllWidth(pTextPortion->GetSize().Width()); + const double fSingleCharDiff((double(nAllWidth) / double(nChars)) - double(nCharWidth)); + sal_Int32* pTmpDXArray = 0; + + if(fSingleCharDiff > 1.0) + { + // if more than one unit per character, create DXArray to create + // something adequate to StretchText + const double fAdvance(nCharWidth + fSingleCharDiff); + const sal_uInt32 nCount(static_cast< sal_uInt32 >(nChars)); + pTmpDXArray = new sal_Int32[nCount]; + double fPos(0.0); + + for(sal_uInt32 a(0); a < nCount; a++) + { + fPos += fAdvance; + pTmpDXArray[a] = basegfx::fround(fPos); + } + } + + // StripPortions() data callback + GetEditEnginePtr()->DrawingText( + aTmpPos, + aText, + 0, + nChars, + pTmpDXArray, + aTmpFont, + n, + nIndex, + pTextPortion->GetRightToLeft(), + 0, + 0, + false, + false, + false, // support for EOL/EOP TEXT comments + &aLocale, + aOverlineColor, + aTextLineColor); + + if(pTmpDXArray) + { + delete pTmpDXArray; + } + } + else + { + pOutDev->DrawStretchText(aTmpPos,pTextPortion->GetSize().Width(),aText); + } } } break; @@ -4447,17 +4514,17 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_uInt16 nPara, sal_uLong nLayoutMode = pOutDev->GetLayoutMode(); - // We always use the left postion for DrawText() + // We always use the left position for DrawText() nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL); if ( !bCTL && !bR2L) { - // No CTL/Bidi checking neccessary + // No CTL/Bidi checking necessary nLayoutMode |= ( TEXT_LAYOUT_COMPLEX_DISABLED | TEXT_LAYOUT_BIDI_STRONG ); } else { - // CTL/Bidi checking neccessary + // CTL/Bidi checking necessary // Don't use BIDI_STRONG, VCL must do some checks. nLayoutMode &= ~( TEXT_LAYOUT_COMPLEX_DISABLED | TEXT_LAYOUT_BIDI_STRONG ); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 16772dd9a6e4..681dae1b99b2 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -2051,7 +2051,7 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView, //make sure that the sentence is never smaller than the error range! if(aSentencePaM.Max().GetIndex() < aCurSel.Max().GetIndex()) aSentencePaM.Max() = aCurSel.Max(); - //add the portion preceeding the error + //add the portion preceding the error EditSelection aStartSelection(aSentencePaM.Min(), aCurSel.Min()); if(aStartSelection.HasRange()) AddPortionIterated(rEditView, aStartSelection, 0, rToFill); @@ -3109,7 +3109,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, if (rData.nLen != rData.aNewText.Len()) bLenChanged = sal_True; - // Change text without loosing the attributes + // Change text without losing the attributes sal_uInt16 nDiffs = ReplaceTextOnly( rData.aSelection.Min().GetNode(), rData.nStart, rData.nLen, rData.aNewText, rData.aOffsets ); @@ -3156,7 +3156,7 @@ short ImpEditEngine::ReplaceTextOnly( { (void) nLen; - // Change text without loosing the attributes + // Change text without losing the attributes sal_uInt16 nCharsAfterTransliteration = sal::static_int_cast< sal_uInt16 >(rOffsets.getLength()); const sal_Int32* pOffsets = rOffsets.getConstArray(); diff --git a/editeng/source/editeng/textconv.hxx b/editeng/source/editeng/textconv.hxx index 6cfcd3723827..a493564530e7 100644 --- a/editeng/source/editeng/textconv.hxx +++ b/editeng/source/editeng/textconv.hxx @@ -51,7 +51,7 @@ class TextConvWrapper : public editeng::HangulHanjaConversion sal_Bool bStartDone; sal_Bool bEndDone; sal_Bool bAllowChange; // storage for _bAllowImplicitChangesForNotConvertibleText - // paramters value of function GetNextPortion. + // parameters value of function GetNextPortion. // used to transport the value to where it is needed. diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx index d4794b7b83a6..0af4d3d86342 100644 --- a/editeng/source/misc/hangulhanja.cxx +++ b/editeng/source/misc/hangulhanja.cxx @@ -811,7 +811,7 @@ namespace editeng } } - // the proper indicies (the wrapper implementation needs indicies relative to the + // the proper indices (the wrapper implementation needs indices relative to the // previous replacement) DBG_ASSERT( ( m_nReplacementBaseIndex <= m_nCurrentStartIndex ) && ( m_nReplacementBaseIndex <= m_nCurrentEndIndex ), "HangulHanjaConversion_Impl::implChange: invalid replacement base!" ); diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index dfe396e5cafd..12e358295855 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -410,7 +410,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) // otherwise we may miss a new installed extension dicitonary // just because e.g. the spellchecker is not asked what // languages it does support currently... - // Since the check is on-demand occuring and executed once it should + // Since the check is on-demand occurring and executed once it should // not be too troublesome. // In OOo 3.0 we will not need the respective code anymore at all. // aAny <<= nCurrentDataFilesChangedCheckValue; |