23#include <rtl/ustrbuf.hxx>
45#include <textlayout.hxx>
51#include <com/sun/star/i18n/WordType.hpp>
52#include <com/sun/star/i18n/XBreakIterator.hpp>
53#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
58#define TEXT_DRAW_ELLIPSIS (DrawTextFlags::EndEllipsis | DrawTextFlags::PathEllipsis | DrawTextFlags::NewsEllipsis)
121 if ( !(nOrientation % 900_deg10) )
123 if ( nOrientation == 900_deg10 )
133 else if ( nOrientation == 1800_deg10 )
209 Point aBasePt( nBaseX, nBaseY );
278 aPoint +=
Point( nX, nY );
284 bool bOldMap =
mbMap;
355 Color aTextColor( aOldColor );
357 Color aTextLineColor( aOldTextLineColor );
358 Color aOverlineColor( aOldOverlineColor );
398 if ( aTextColor != aOldColor )
490 SAL_WARN_IF( nWidth <= 0,
"vcl",
"ImplGetTextLines: nWidth <= 0!" );
503 css::uno::Reference< css::linguistic2::XHyphenator > xHyph;
508 css::uno::Reference<css::linguistic2::XLinguServiceManager2> xLinguMgr = css::linguistic2::LinguServiceManager::create(xContext);
509 xHyph = xLinguMgr->getHyphenator();
512 css::uno::Reference<css::i18n::XBreakIterator> xBI;
514 sal_Int32 nLen = rStr.getLength();
515 sal_Int32 nCurrentTextY = 0;
516 while (
nPos < nLen )
518 sal_Int32 nBreakPos =
nPos;
520 while ( ( nBreakPos < nLen ) && ( rStr[ nBreakPos ] !=
'\r' ) && ( rStr[ nBreakPos ] !=
'\n' ) )
544 if ( nBreakPos ==
nPos )
548 if (
nPos < nLen && ( ( rStr[
nPos ] ==
'\r' ) || ( rStr[
nPos ] ==
'\n' ) ) )
552 if ( (
nPos < nLen ) && ( rStr[
nPos ] ==
'\n' ) && ( rStr[
nPos-1 ] ==
'\r' ) )
555 nCurrentTextY += nTextHeight;
556 if (bClipping && nCurrentTextY > rRect.
GetHeight())
561 for ( sal_Int32 nL = 0; nL < rLineInfo.
Count(); nL++ )
565 SAL_WARN_IF( aLine.indexOf(
'\r' ) != -1,
"vcl",
"ImplGetTextLines - Found CR!" );
566 SAL_WARN_IF( aLine.indexOf(
'\n' ) != -1,
"vcl",
"ImplGetTextLines - Found LF!" );
570 return nMaxLineWidth;
574 const css::uno::Reference< css::linguistic2::XHyphenator >& xHyph,
575 const css::uno::Reference<css::i18n::XBreakIterator>& xBI,
576 const bool bHyphenate,
577 const sal_Int32 nPos, sal_Int32 nBreakPos)
581 if (nSoftBreak == -1)
585 SAL_WARN_IF( nSoftBreak >= nBreakPos,
"vcl",
"Break?!" );
586 css::i18n::LineBreakHyphenationOptions aHyphOptions( xHyph, css::uno::Sequence <css::beans::PropertyValue>(), 1 );
587 css::i18n::LineBreakUserOptions aUserOptions;
588 css::i18n::LineBreakResults aLBR = xBI->getLineBreak( rStr, nSoftBreak, rDefLocale,
nPos, aHyphOptions, aUserOptions );
589 nBreakPos = aLBR.breakIndex;
590 if ( nBreakPos <=
nPos )
591 nBreakPos = nSoftBreak;
606 css::i18n::Boundary aBoundary = xBI->getWordBoundary( rStr, nBreakPos, rDefLocale, css::i18n::WordType::DICTIONARY_WORD,
true );
607 sal_Int32 nWordStart =
nPos;
608 sal_Int32 nWordEnd = aBoundary.endPos;
609 SAL_WARN_IF( nWordEnd <= nWordStart, "vcl", "ImpBreakLine: Start >=
End?
" );
611 sal_Int32 nWordLen = nWordEnd - nWordStart;
612 if ( ( nWordEnd < nSoftBreak ) || ( nWordLen <= 3 ) )
615 // #104415# May happen, because getLineBreak may differ from getWordBoundary with DICTIONARY_WORD
616 // SAL_WARN_IF( nWordEnd < nMaxBreakPos, "vcl", "Hyph:
Break?
" );
617 OUString aWord = rStr.copy( nWordStart, nWordLen );
618 sal_Int32 nMinTrail = nWordEnd-nSoftBreak+1; //+1: Before the "broken off
" char
619 css::uno::Reference< css::linguistic2::XHyphenatedWord > xHyphWord;
621 xHyphWord = xHyph->hyphenate( aWord, rDefLocale, aWord.getLength() - nMinTrail, css::uno::Sequence< css::beans::PropertyValue >() );
625 bool bAlternate = xHyphWord->isAlternativeSpelling();
626 sal_Int32 _nWordLen = 1 + xHyphWord->getHyphenPos();
628 if ( ( _nWordLen < 2 ) || ( (nWordStart+_nWordLen) < 2 ) )
633 nBreakPos = nWordStart + _nWordLen;
638 OUString aAlt( xHyphWord->getHyphenatedWord() );
640 // We can have two cases:
641 // 1) "packen
" turns into "pak-ken
"
642 // 2) "Schiffahrt
" turns into "Schiff-fahrt
"
644 // In case 1 we need to replace a char
645 // In case 2 we add a char
647 // Correct recognition is made harder by words such as
648 // "Schiffahrtsbrennesseln
", as the Hyphenator splits all
649 // positions of the word and comes up with "Schifffahrtsbrennnesseln
"
650 // Thus, we cannot infer the aWord from the AlternativeWord's
652 // TODO: The whole junk will be made easier by a function in
653 // the Hyphenator, as soon as AMA adds it.
654 sal_Int32 nAltStart = _nWordLen - 1;
655 sal_Int32 nTxtStart = nAltStart - (aAlt.getLength() - aWord.getLength());
656 sal_Int32 nTxtEnd = nTxtStart;
657 sal_Int32 nAltEnd = nAltStart;
659 // The area between nStart and nEnd is the difference
660 // between AlternativeString and OriginalString
661 while( nTxtEnd < aWord.getLength() && nAltEnd < aAlt.getLength() &&
662 aWord[nTxtEnd] != aAlt[nAltEnd] )
668 // If a char was added, we notice it now:
669 if( nAltEnd > nTxtEnd && nAltStart == nAltEnd &&
670 aWord[ nTxtEnd ] == aAlt[nAltEnd] )
677 SAL_WARN_IF( ( nAltEnd - nAltStart ) != 1, "vcl", "Alternate: Wrong assumption!
" );
679 sal_Unicode cAlternateReplChar = 0;
680 if ( nTxtEnd > nTxtStart )
681 cAlternateReplChar = aAlt[ nAltStart ];
683 nBreakPos = nWordStart + nTxtStart;
684 if ( cAlternateReplChar )
689sal_Int32 OutputDevice::ImplBreakLinesSimple( const tools::Long nWidth, const OUString& rStr,
690 const vcl::ITextLayout& _rLayout, const sal_Int32 nPos, sal_Int32 nBreakPos, tools::Long& nLineWidth )
692 sal_Int32 nSpacePos = rStr.getLength();
696 nSpacePos = rStr.lastIndexOf( ' ', nSpacePos );
697 if( nSpacePos != -1 )
699 if( nSpacePos > nPos )
701 nW = _rLayout.GetTextWidth( rStr, nPos, nSpacePos-nPos );
703 } while( nW > nWidth );
705 if( nSpacePos != -1 )
707 nBreakPos = nSpacePos;
708 nLineWidth = _rLayout.GetTextWidth( rStr, nPos, nBreakPos-nPos );
709 if( nBreakPos < rStr.getLength()-1 )
716void OutputDevice::SetTextColor( const Color& rColor )
719 Color aColor(vcl::drawmode::GetTextColor(rColor, GetDrawMode(), GetSettings().GetStyleSettings()));
722 mpMetaFile->AddAction( new MetaTextColorAction( aColor ) );
724 if ( maTextColor != aColor )
726 maTextColor = aColor;
727 mbInitTextColor = true;
731 mpAlphaVDev->SetTextColor( COL_ALPHA_OPAQUE );
734void OutputDevice::SetTextFillColor()
738 mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), false ) );
740 if ( maFont.GetColor() != COL_TRANSPARENT ) {
741 maFont.SetFillColor( COL_TRANSPARENT );
743 if ( !maFont.IsTransparent() )
744 maFont.SetTransparent( true );
747 mpAlphaVDev->SetTextFillColor();
750void OutputDevice::SetTextFillColor( const Color& rColor )
752 Color aColor(vcl::drawmode::GetFillColor(rColor, GetDrawMode(), GetSettings().GetStyleSettings()));
755 mpMetaFile->AddAction( new MetaTextFillColorAction( aColor, true ) );
757 if ( maFont.GetFillColor() != aColor )
758 maFont.SetFillColor( aColor );
759 if ( maFont.IsTransparent() != rColor.IsTransparent() )
760 maFont.SetTransparent( rColor.IsTransparent() );
763 mpAlphaVDev->SetTextFillColor( COL_ALPHA_OPAQUE );
766Color OutputDevice::GetTextFillColor() const
768 if ( maFont.IsTransparent() )
769 return COL_TRANSPARENT;
771 return maFont.GetFillColor();
774void OutputDevice::SetTextAlign( TextAlign eAlign )
778 mpMetaFile->AddAction( new MetaTextAlignAction( eAlign ) );
780 if ( maFont.GetAlignment() != eAlign )
782 maFont.SetAlignment( eAlign );
787 mpAlphaVDev->SetTextAlign( eAlign );
790vcl::Region OutputDevice::GetOutputBoundsClipRegion() const
792 return GetClipRegion();
795const SalLayoutFlags eDefaultLayout = SalLayoutFlags::NONE;
797void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
798 sal_Int32 nIndex, sal_Int32 nLen,
799 std::vector< tools::Rectangle >* pVector, OUString* pDisplayText,
800 const SalLayoutGlyphs* pLayoutCache
803 assert(!is_double_buffered_window());
805 if( (nLen < 0) || (nIndex + nLen >= rStr.getLength()))
807 nLen = rStr.getLength() - nIndex;
810 if (mpOutDevData->mpRecordLayout)
812 pVector = &mpOutDevData->mpRecordLayout->m_aUnicodeBoundRects;
813 pDisplayText = &mpOutDevData->mpRecordLayout->m_aDisplayText;
816#if OSL_DEBUG_LEVEL > 2
833 std::vector< tools::Rectangle > aTmp;
836 bool bInserted =
false;
837 for( std::vector< tools::Rectangle >::const_iterator it = aTmp.begin(); it != aTmp.end(); ++it,
nIndex++ )
839 bool bAppend =
false;
843 else if( rStr[
nIndex ] ==
' ' && bInserted )
845 std::vector< tools::Rectangle >::const_iterator next = it;
847 if( next != aTmp.end() && aClip.
Overlaps( *next ) )
853 pVector->push_back( *it );
855 *pDisplayText += OUStringChar(rStr[
nIndex ]);
864 *pDisplayText += rStr.subView(
nIndex, nLen );
874 pLayoutCache =
nullptr;
876 std::unique_ptr<SalLayout> pSalLayout =
ImplLayout(rStr, nIndex, nLen, rStartPt, 0, {}, {},
eDefaultLayout,
nullptr, pLayoutCache);
892 nLen,
false, pLayoutCache, pSalLayoutCache );
931 if( nLen < 0 || nIndex + nLen >= rStr.getLength() )
933 nLen = rStr.getLength() -
nIndex;
948 std::unique_ptr<SalLayout> pSalLayout =
ImplLayout(rStr,
nIndex, nLen, rStartPt, 0, pDXAry, pKashidaAry, flags,
nullptr, pSalLayoutCache);
959 sal_Int32 nIndex, sal_Int32 nLen,
bool bCaret,
963 if(
nIndex >= rStr.getLength() )
966 if( nLen < 0 || nIndex + nLen >= rStr.getLength() )
968 nLen = rStr.getLength() -
nIndex;
971 std::vector<sal_Int32>* pDXAry = pKernArray ? &pKernArray->
get_subunit_array() :
nullptr;
986 pDXAry->resize(nLen);
987 std::fill(pDXAry->begin(), pDXAry->end(), 0);
992 std::unique_ptr<std::vector<double>> xDXPixelArray;
995 xDXPixelArray.reset(
new std::vector<double>(nLen));
997 std::vector<double>* pDXPixelArray = xDXPixelArray.get();
998 double nWidth = pSalLayout->FillDXArray(pDXPixelArray, bCaret ? rStr : OUString());
1003 for(
int i = 1;
i < nLen; ++
i )
1005 (*pDXPixelArray)[
i] += (*pDXPixelArray)[
i - 1];
1012 int nSubPixelFactor = pKernArray->
get_factor();
1015 for (
int i = 0;
i < nLen; ++
i)
1018 else if (nSubPixelFactor)
1020 for (
int i = 0;
i < nLen; ++
i)
1021 (*pDXPixelArray)[
i] *= nSubPixelFactor;
1027 pDXAry->resize(nLen);
1028 for (
int i = 0;
i < nLen; ++
i)
1039 sal_Int32 nIndex, sal_Int32 nLen,
1043 if(
nIndex >= rStr.getLength() )
1045 if(
nIndex+nLen >= rStr.getLength() )
1046 nLen = rStr.getLength() -
nIndex;
1048 sal_Int32 nCaretPos = nLen * 2;
1050 rCaretPos.resize(nCaretPos);
1057 std::fill(rCaretPos.begin(), rCaretPos.end(), -1);
1061 std::vector<double> aCaretPixelPos;
1062 pSalLayout->GetCaretPositions(aCaretPixelPos, rStr);
1066 for (
i = 0;
i < nCaretPos; ++
i)
1067 if (aCaretPixelPos[
i] >= 0)
1069 tools::Long nXPos = (
i < nCaretPos) ? aCaretPixelPos[
i] : -1;
1070 for (
i = 0;
i < nCaretPos; ++
i)
1072 if (aCaretPixelPos[
i] >= 0)
1073 nXPos = aCaretPixelPos[
i];
1075 aCaretPixelPos[
i] = nXPos;
1081 double nWidth = pSalLayout->GetTextWidth();
1082 for (
i = 0;
i < nCaretPos; ++
i)
1083 aCaretPixelPos[
i] = nWidth - aCaretPixelPos[
i] - 1;
1086 int nSubPixelFactor = rCaretXArray.
get_factor();
1090 for (
i = 0;
i < nCaretPos; ++
i)
1093 else if (nSubPixelFactor)
1095 for (
i = 0;
i < nCaretPos; ++
i)
1096 aCaretPixelPos[
i] *= nSubPixelFactor;
1099 for (
i = 0;
i < nCaretPos; ++
i)
1104 const OUString& rStr,
1105 sal_Int32 nIndex, sal_Int32 nLen)
1109 if( (nLen < 0) || (
nIndex + nLen >= rStr.getLength()))
1111 nLen = rStr.getLength() -
nIndex;
1120 std::unique_ptr<SalLayout> pSalLayout =
ImplLayout(rStr,
nIndex, nLen, rStartPt, nWidth);
1131 const sal_Int32 nMinIndex,
const sal_Int32 nLen,
1136 assert(nMinIndex >= 0);
1140 sal_Int32 nEndIndex = rStr.getLength();
1141 if( nMinIndex + nLen < nEndIndex )
1142 nEndIndex = nMinIndex + nLen;
1145 if( nEndIndex < nMinIndex )
1146 nEndIndex = nMinIndex;
1166 std::optional<OUStringBuffer> xTmpStr;
1167 for( ; pStr < pEnd; ++pStr )
1170 if( (*pStr >=
'0') && (*pStr <=
'9') )
1174 if( cChar != *pStr )
1177 xTmpStr = OUStringBuffer(rStr);
1179 (*xTmpStr)[pStr - pBase] = cChar;
1184 rStr = (*xTmpStr).makeStringAndClear();
1190 bRightAlign =
false;
1196 bRightAlign ^= bRTLWindow;
1212 const sal_Int32 nMinIndex,
1213 const sal_Int32 nEndIndex )
const
1223 bool bAllLtr =
true;
1224 for (sal_Int32
i = nMinIndex;
i < nEndIndex;
i++)
1229 if (rStr[
i] > 0x052F)
1238 return nLayoutFlags;
1251 OUString originalName = originalFont.
GetStyleName().isEmpty()
1254 std::vector<OUString> usedFontNames;
1263 usedFontNames.push_back(
name );
1267 if( item.mOriginalFont == originalName && item.mUsedFonts == usedFontNames )
1293 sal_Int32 nMinIndex, sal_Int32 nLen,
1301 if (pGlyphs && !pGlyphs->
IsValid())
1303 SAL_WARN(
"vcl",
"Trying to setup invalid cached glyphs - falling back to relayout!");
1309 for(
int level = 0;; ++level )
1312 if(glyphsImpl ==
nullptr)
1328 if( -1 == nLen || nMinIndex + nLen > rOrigStr.getLength() )
1330 const sal_Int32 nNewLen = rOrigStr.getLength() - nMinIndex;
1336 OUString
aStr = rOrigStr;
1341 pLayoutCache =
nullptr;
1345 double nPixelWidth = nLogicalWidth;
1346 if( nLogicalWidth &&
mbMap )
1353 nPixelWidth, flags, pLayoutCache);
1355 double nEndGlyphCoord(0);
1356 std::unique_ptr<double[]> xDXPixelArray;
1357 if( !pDXArray.
empty() )
1359 xDXPixelArray.reset(
new double[nLen]);
1366 for (
int i = 0;
i < nLen; ++
i)
1368 nEndGlyphCoord = xDXPixelArray[nLen - 1];
1372 for(
int i = 0;
i < nLen; ++
i)
1373 xDXPixelArray[
i] = pDXArray.
get(
i);
1374 nEndGlyphCoord = std::lround(xDXPixelArray[nLen - 1]);
1380 if (!pKashidaArray.
empty())
1387 pSalLayout->SetSubpixelPositioning(
mbMap);
1390 if( pSalLayout && !pSalLayout->LayoutText( aLayoutArgs, pGlyphs ? pGlyphs->
Impl(0) :
nullptr ) )
1409 pSalLayout->AdjustLayout( aLayoutArgs );
1425 if (!pDXArray.
empty())
1426 nRTLOffset = nEndGlyphCoord;
1427 else if( nPixelWidth )
1428 nRTLOffset = nPixelWidth;
1430 nRTLOffset = pSalLayout->GetTextWidth();
1431 pSalLayout->DrawOffset().setX( 1 - nRTLOffset );
1441 OUString
const& rString)
1448 OUString
aStr( rString );
1454 return (nCharPos !=
nIndex);
1458 sal_Int32 nIndex, sal_Int32 nLen,
1465 sal_Int32 nRetVal = -1;
1474 nSubPixelFactor = 64;
1476 double nExtraPixelWidth = 0;
1477 if( nCharExtra != 0 )
1479 nRetVal = pSalLayout->GetTextBreak( nTextPixelWidth, nExtraPixelWidth, nSubPixelFactor );
1487 sal_Int32 nIndex, sal_Int32 nLen,
1496 sal_Int32 nRetVal = -1;
1505 nSubPixelFactor = 64;
1508 double nExtraPixelWidth = 0;
1509 if( nCharExtra != 0 )
1513 nRetVal = pSalLayout->GetTextBreak( nTextPixelWidth, nExtraPixelWidth, nSubPixelFactor );
1516 OUString aHyphenStr(nHyphenChar);
1517 std::unique_ptr<SalLayout> pHyphenLayout =
ImplLayout( aHyphenStr, 0, 1 );
1521 double nHyphenPixelWidth = pHyphenLayout->GetTextWidth() * nSubPixelFactor;
1524 nTextPixelWidth -= nHyphenPixelWidth;
1525 if( nExtraPixelWidth > 0 )
1526 nTextPixelWidth -= nExtraPixelWidth;
1528 rHyphenPos = pSalLayout->GetTextBreak(nTextPixelWidth, nExtraPixelWidth, nSubPixelFactor);
1530 if( rHyphenPos > nRetVal )
1531 rHyphenPos = nRetVal;
1540 std::vector< tools::Rectangle >* pVector, OUString* pDisplayText,
1544 Color aOldTextColor;
1545 Color aOldTextFillColor;
1546 bool bRestoreFillColor =
false;
1549 bool bHighContrastBlack =
false;
1550 bool bHighContrastWhite =
false;
1563 bHighContrastBlack = aCol.
IsDark();
1564 bHighContrastWhite = aCol.
IsBright();
1570 bRestoreFillColor =
true;
1573 if( bHighContrastBlack )
1575 else if( bHighContrastWhite )
1588 if (nWidth <= 0 || nHeight <= 0)
1593 SAL_WARN_IF(bFuzzing,
"vcl",
"skipping negative rectangle of: " << nWidth <<
" x " << nHeight);
1602 sal_Int32 nMnemonicPos = -1;
1604 OUString
aStr = rOrigStr;
1616 sal_Int32 nFormatLines;
1621 sal_Int32 nLines =
static_cast<sal_Int32
>(nHeight/nTextHeight);
1623 nFormatLines = aMultiLineInfo.
Count();
1626 if ( nFormatLines > nLines )
1631 nFormatLines = nLines-1;
1636 OUStringBuffer aLastLineBuffer(aLastLine);
1637 sal_Int32 nLastLineLen = aLastLineBuffer.getLength();
1638 for (
i = 0;
i < nLastLineLen;
i++ )
1640 if ( aLastLineBuffer[
i ] ==
'\n' )
1641 aLastLineBuffer[
i ] =
' ';
1643 aLastLine = aLastLineBuffer.makeStringAndClear();
1651 if ( nMaxTextWidth <= nWidth )
1656 if ( nFormatLines*nTextHeight > nHeight )
1668 aPos.
AdjustY(nHeight-(nFormatLines*nTextHeight) );
1670 aPos.
AdjustY((nHeight-(nFormatLines*nTextHeight))/2 );
1679 for (
i = 0;
i < nFormatLines;
i++ )
1687 sal_Int32 nLineLen = rLineInfo.
GetLen();
1689 if ( bDrawMnemonics )
1691 if ( (nMnemonicPos >=
nIndex) && (nMnemonicPos <
nIndex+nLineLen) )
1699 sal_Int32 lc_x1 =
nPos ? aDXArray[
nPos - 1] : 0;
1700 sal_Int32 lc_x2 = aDXArray[
nPos];
1714 if ( !aLastLine.isEmpty() )
1715 _rLayout.
DrawText( aPos, aLastLine, 0, aLastLine.getLength(), pVector, pDisplayText );
1719 rTargetDevice.
Pop();
1727 if ( nTextWidth > nWidth )
1739 if ( nTextHeight <= nHeight )
1745 aPos.
AdjustX(nWidth-nTextWidth );
1747 aPos.
AdjustX((nWidth-nTextWidth)/2 );
1756 aPos.
AdjustY(nHeight-nTextHeight );
1758 aPos.
AdjustY((nHeight-nTextHeight)/2 );
1762 double nMnemonicWidth = 0;
1763 if (nMnemonicPos != -1 && nMnemonicPos <
aStr.getLength())
1767 tools::Long lc_x1 = nMnemonicPos? aDXArray[nMnemonicPos - 1] : 0;
1780 _rLayout.
DrawText( aPos,
aStr, 0,
aStr.getLength(), pVector, pDisplayText );
1781 if ( bDrawMnemonics && nMnemonicPos != -1 )
1783 rTargetDevice.
Pop();
1787 _rLayout.
DrawText( aPos,
aStr, 0,
aStr.getLength(), pVector, pDisplayText );
1788 if ( bDrawMnemonics && nMnemonicPos != -1 )
1796 if ( bRestoreFillColor )
1802 const OUString& rOrigStr,
1807 if ( rOrigStr.isEmpty() || rRect.
IsEmpty() )
1828 ImplDrawText( *
this, rRect, rOrigStr, nStyle,
nullptr,
nullptr, aLayout );
1836 std::vector< tools::Rectangle >* pVector, OUString* pDisplayText,
1843 pVector = &
mpOutDevData->mpRecordLayout->m_aUnicodeBoundRects;
1844 pDisplayText = &
mpOutDevData->mpRecordLayout->m_aDisplayText;
1848 if (
mpMetaFile && !bDecomposeTextRectAction )
1866 if ( !bDecomposeTextRectAction )
1872 ImplDrawText( *
this, rRect, rOrigStr, nStyle, pVector, pDisplayText, _pTextLayout ? *_pTextLayout : aDefaultLayout );
1893 OUString
aStr = rStr;
1900 sal_Int32 nFormatLines;
1905 ImplGetTextLines( rRect, nTextHeight, aMultiLineInfo, nWidth,
aStr, nStyle, _pTextLayout ? *_pTextLayout : aDefaultLayout );
1906 nFormatLines = aMultiLineInfo.
Count();
1909 nLines =
static_cast<sal_uInt16
>(aRect.
GetHeight()/nTextHeight);
1914 if ( nFormatLines <= nLines )
1915 nLines = nFormatLines;
1919 nLines = nFormatLines;
1929 bool bMaxWidth = nMaxWidth == 0;
1931 for (
i = 0;
i < nLines;
i++ )
1934 if ( bMaxWidth && (rLineInfo.
GetWidth() > nMaxWidth) )
1940 else if ( !nMaxWidth )
1942 for (
i = 0;
i < nLines;
i++ )
1945 if ( rLineInfo.
GetWidth() > nMaxWidth )
2027 OUString
aStr = rOrigStr;
2034 OUStringBuffer aTmpStr(
aStr );
2036 sal_Int32 nEraseChars = std::max<sal_Int32>(4,
aStr.getLength() - (
nIndex*4)/3);
2037 while( nEraseChars <
aStr.getLength() && _rLayout.
GetTextWidth( aTmpStr.toString(), 0, aTmpStr.getLength() ) > nMaxWidth )
2040 sal_Int32
i = (aTmpStr.getLength() - nEraseChars)/2;
2041 aTmpStr.remove(
i, nEraseChars++);
2042 aTmpStr.insert(
i,
"...");
2044 aStr = aTmpStr.makeStringAndClear();
2061 aStr += OUStringChar(rOrigStr[ 0 ]);
2065 OUString aPath( rOrigStr );
2066 OUString aAbbreviatedPath;
2067 osl_abbreviateSystemPath( aPath.pData, &aAbbreviatedPath.pData,
nIndex,
nullptr );
2068 aStr = aAbbreviatedPath;
2072 static char const pSepChars[] =
".";
2074 sal_Int32 nLastContent =
aStr.getLength();
2075 while ( nLastContent )
2081 while ( nLastContent &&
2085 OUString aLastStr =
aStr.copy(nLastContent);
2086 OUString aTempLastStr1 =
"..." + aLastStr;
2087 if ( _rLayout.
GetTextWidth( aTempLastStr1, 0, aTempLastStr1.getLength() ) > nMaxWidth )
2091 sal_Int32 nFirstContent = 0;
2092 while ( nFirstContent < nLastContent )
2098 while ( (nFirstContent < nLastContent) &&
2102 if ( nFirstContent >= nLastContent )
2106 if ( nFirstContent > 4 )
2108 OUString aFirstStr = OUString::Concat(
aStr.subView( 0, nFirstContent )) +
"...";
2109 OUString aTempStr = aFirstStr + aLastStr;
2110 if ( _rLayout.
GetTextWidth( aTempStr, 0, aTempStr.getLength() ) > nMaxWidth )
2117 if( nLastContent >
aStr.getLength() )
2118 nLastContent =
aStr.getLength();
2119 while ( nFirstContent < nLastContent )
2126 while ( (nFirstContent < nLastContent) &&
2130 if ( nFirstContent < nLastContent )
2132 std::u16string_view aTempLastStr =
aStr.subView( nLastContent );
2133 aTempStr = aFirstStr + aTempLastStr;
2135 if ( _rLayout.
GetTextWidth( aTempStr, 0, aTempStr.getLength() ) > nMaxWidth )
2139 while ( nFirstContent < nLastContent );
2150 sal_Int32 nIndex, sal_Int32 nLen,
2151 DrawTextFlags nStyle, std::vector< tools::Rectangle >* pVector, OUString* pDisplayText,
2156 if( (nLen < 0) || (
nIndex + nLen >= rStr.getLength()))
2158 nLen = rStr.getLength() -
nIndex;
2174 if(
nIndex >= rStr.getLength() )
2177 if( (nLen < 0) || (
nIndex + nLen >= rStr.getLength()))
2179 nLen = rStr.getLength() -
nIndex;
2181 OUString
aStr = rStr;
2182 sal_Int32 nMnemonicPos = -1;
2190 if ( nMnemonicPos != -1 )
2192 if( nMnemonicPos <
nIndex )
2198 if( nMnemonicPos < (
nIndex+nLen) )
2200 SAL_WARN_IF( nMnemonicPos >= (
nIndex+nLen),
"vcl",
"Mnemonic underline marker after last character" );
2202 bool bInvalidPos =
false;
2204 if( nMnemonicPos >= nLen )
2210 nMnemonicPos = nLen-1;
2216 sal_Int32 lc_x1 =
nPos ? aDXArray[
nPos - 1] : 0;
2217 sal_Int32 lc_x2 = aDXArray[
nPos];
2218 nMnemonicWidth = std::abs(lc_x1 - lc_x2);
2233 Color aOldTextColor;
2234 Color aOldTextFillColor;
2235 bool bRestoreFillColor;
2236 bool bHighContrastBlack =
false;
2237 bool bHighContrastWhite =
false;
2245 bHighContrastBlack = aCol.
IsDark();
2246 bHighContrastWhite = aCol.
IsBright();
2253 bRestoreFillColor =
true;
2257 bRestoreFillColor =
false;
2259 if( bHighContrastBlack )
2261 else if( bHighContrastWhite )
2269 if ( nMnemonicPos != -1 )
2273 if ( bRestoreFillColor )
2281 if ( nMnemonicPos != -1 )
2292 sal_Int32 nLen = rStr.getLength();
2295 sal_Int32 nMnemonicPos;
2297 if ( nMnemonicPos != -1 )
2299 if ( nMnemonicPos <
nIndex )
2308 const OUString& rStr, sal_Int32 nBase,
2309 sal_Int32 nIndex, sal_Int32 nLen,
2317 std::unique_ptr<SalLayout> pSalLayout;
2320 double nXOffset = 0;
2323 sal_Int32 nStart = std::min( nBase,
nIndex );
2324 sal_Int32 nOfsLen = std::max( nBase,
nIndex ) - nStart;
2325 pSalLayout =
ImplLayout( rStr, nStart, nOfsLen, aPoint, nLayoutWidth, pDXAry, pKashidaAry );
2328 nXOffset = pSalLayout->GetTextWidth();
2331 nXOffset = -nXOffset;
2340 bRet = pSalLayout->GetBoundRect(aPixelRect);
2347 aPixelRect += aRotatedOfs;
2358 const OUString& rStr, sal_Int32 nBase,
2359 sal_Int32 nIndex, sal_Int32 nLen,
2371 nLen = rStr.getLength() -
nIndex;
2373 rVector.reserve( nLen );
2377 bool bOldMap =
mbMap;
2384 std::unique_ptr<SalLayout> pSalLayout;
2387 double nXOffset = 0;
2390 sal_Int32 nStart = std::min( nBase,
nIndex );
2391 sal_Int32 nOfsLen = std::max( nBase,
nIndex ) - nStart;
2392 pSalLayout =
ImplLayout( rStr, nStart, nOfsLen,
Point(0,0), nLayoutWidth, pDXArray, pKashidaArray);
2395 nXOffset = pSalLayout->GetTextWidth();
2399 nXOffset = -nXOffset;
2406 bRet = pSalLayout->GetOutline(rVector);
2421 for (
auto & elem : rVector)
2422 elem.transform( aMatrix );
2440 const OUString& rStr, sal_Int32 nBase,
2441 sal_Int32 nIndex, sal_Int32 nLen,
2445 rResultVector.clear();
2450 nLayoutWidth, pDXArray, pKashidaArray ) )
2454 rResultVector.reserve( aB2DPolyPolyVector.size() );
2455 for (
auto const& elem : aB2DPolyPolyVector)
2456 rResultVector.emplace_back(elem);
2472 for (
auto const& elem : aB2DPolyPolyVector)
2473 for(
auto const& rB2DPolygon : elem)
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
Gets the application's settings.
bool Rotate(Degree10 nAngle10, const Color &rFillColor)
Rotate bitmap by the specified angle.
const OUString & GetFamilyName() const
const OUString & GetStyleName() const
tools::Long GetAscent() const
void AddLine(const ImplTextLineInfo &)
std::vector< ImplTextLineInfo > mvLines
const ImplTextLineInfo & GetLine(sal_Int32 nLine) const
sal_Int32 GetIndex() const
tools::Long GetWidth() const
sal_Int32 get(size_t nIndex) const
sal_Int32 get_subunit(size_t nIndex) const
std::vector< sal_Int32 > & get_subunit_array()
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
tools::Long mnEmphasisAscent
bool ImplDrawRotateText(SalLayout &)
virtual void InitClipRegion()
void ImplDrawTextLines(SalLayout &, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove)
SAL_DLLPRIVATE basegfx::B2DPoint ImplLogicToDeviceSubPixel(const Point &rLogicPt) const
void GetCaretPositions(const OUString &, KernArray &rCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, const SalLayoutGlyphs *pGlyphs=nullptr) const
tools::Long GetCtrlTextWidth(const OUString &rStr, const SalLayoutGlyphs *pLayoutCache=nullptr) const
float approximate_digit_width() const
std::vector< FontMappingUseItem > FontMappingUseData
bool GetGlyphBoundRects(const Point &rOrigin, const OUString &rStr, int nIndex, int nLen, std::vector< tools::Rectangle > &rVector) const
SAL_DLLPRIVATE std::unique_ptr< SalLayout > ImplGlyphFallbackLayout(std::unique_ptr< SalLayout >, vcl::text::ImplLayoutArgs &, const SalLayoutGlyphs *) const
static FontMappingUseData FinishTrackingFontMappingUse()
void EnableMapMode(bool bEnable=true)
void DrawCtrlText(const Point &rPos, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, DrawTextFlags nStyle=DrawTextFlags::Mnemonic, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr)
tools::Long GetOutOffYPixel() const
const vcl::Font & GetFont() const
sal_Int32 GetTextBreak(const OUString &rStr, tools::Long nTextWidth, sal_Int32 nIndex, sal_Int32 nLen=-1, tools::Long nCharExtra=0, vcl::text::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
SAL_DLLPRIVATE bool is_double_buffered_window() const
void DrawTextArray(const Point &rStartPt, const OUString &rStr, KernArraySpan aKernArray, o3tl::span< const sal_Bool > pKashidaAry, sal_Int32 nIndex, sal_Int32 nLen, SalLayoutFlags flags=SalLayoutFlags::NONE, const SalLayoutGlyphs *pLayoutCache=nullptr)
tools::Long mnOutOffY
Output offset for device output in pixel (pseudo window offset within window system's frames)
void EnableOutput(bool bEnable=true)
SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicHeight(tools::Long nHeight) const
Convert device pixels to a height in logical units.
void SetFont(const vcl::Font &rNewFont)
SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel(const tools::Rectangle &rLogicRect) const
Convert a logical rectangle to a rectangle in physical device pixel units.
bool GetTextOutline(tools::PolyPolygon &, const OUString &rStr) const
SAL_DLLPRIVATE void ImplDrawPolygon(const tools::Polygon &rPoly, const tools::PolyPolygon *pClipPolyPoly=nullptr)
virtual bool AcquireGraphics() const =0
Acquire a graphics device that the output device uses to draw on.
tools::Long mnOutOffX
Output offset for device output in pixel (pseudo window offset within window system's frames)
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
std::unique_ptr< ImplOutDevData > mpOutDevData
const Wallpaper & GetBackground() const
virtual void SetSystemTextColor(SystemTextColorFlags nFlags, bool bEnabled)
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, KernArraySpan aDXArray=KernArraySpan(), o3tl::span< const sal_Bool > pKashidaArray={}, const SalLayoutGlyphs *pGlyphs=nullptr) const
Return the exact bounding rectangle of rStr.
static SAL_DLLPRIVATE sal_Int32 ImplBreakLinesSimple(const tools::Long nWidth, const OUString &rStr, const vcl::ITextLayout &_rLayout, const sal_Int32 nPos, sal_Int32 nBreakPos, tools::Long &nLineWidth)
vcl::text::ComplexTextLayoutFlags mnTextLayoutMode
OUString GetEllipsisString(const OUString &rStr, tools::Long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) const
SAL_DLLPRIVATE tools::Long ImplLogicWidthToDevicePixel(tools::Long nWidth) const
Convert a logical width to a width in units of device pixels.
const Color & GetOverlineColor() const
tools::Long mnEmphasisDescent
SAL_DLLPRIVATE SalLayoutFlags GetBiDiLayoutFlags(std::u16string_view rStr, const sal_Int32 nMinIndex, const sal_Int32 nEndIndex) const
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
SalGraphics * mpGraphics
Graphics context to draw on.
void AddTextRectActions(const tools::Rectangle &rRect, const OUString &rOrigStr, DrawTextFlags nStyle, GDIMetaFile &rMtf)
Generate MetaTextActions for the text rect.
void SetTextColor(const Color &rColor)
static SAL_DLLPRIVATE sal_Int32 ImplBreakLinesWithIterator(const tools::Long nWidth, const OUString &rStr, const vcl::ITextLayout &_rLayout, const css::uno::Reference< css::linguistic2::XHyphenator > &xHyph, const css::uno::Reference< css::i18n::XBreakIterator > &xBI, const bool bHyphenate, const sal_Int32 nPos, sal_Int32 nBreakPos)
void DrawMask(const Point &rDestPt, const Bitmap &rBitmap, const Color &rMaskColor)
tools::Rectangle ImplGetTextBoundRect(const SalLayout &) const
tools::Long GetTextArray(const OUString &rStr, KernArray *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, bool bCaret=false, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
rtl::Reference< LogicalFontInstance > mpFontInstance
static SAL_DLLPRIVATE OUString ImplGetEllipsisString(const OutputDevice &rTargetDevice, const OUString &rStr, tools::Long nMaxWidth, DrawTextFlags nStyle, const vcl::ITextLayout &_rLayout)
SAL_DLLPRIVATE void ImplDrawEmphasisMarks(SalLayout &)
LanguageType meTextLanguage
SAL_DLLPRIVATE double ImplLogicWidthToDeviceSubPixel(tools::Long nWidth) const
bool IsRTLEnabled() const
void SetDigitLanguage(LanguageType)
SAL_DLLPRIVATE float approximate_char_width() const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
tools::Rectangle GetTextRect(const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
SAL_DLLPRIVATE tools::Long ImplDevicePixelToLogicWidth(tools::Long nWidth) const
Convert device pixels to a width in logical units.
TextAlign GetTextAlign() const
bool IsTextFillColor() const
SAL_DLLPRIVATE void ImplDrawSpecialText(SalLayout &)
FontMetric GetFontMetric() const
virtual bool HasMirroredGraphics() const
static SAL_DLLPRIVATE tools::Long ImplGetTextLines(const tools::Rectangle &rRect, tools::Long nTextHeight, ImplMultiTextLineInfo &rLineInfo, tools::Long nWidth, const OUString &rStr, DrawTextFlags nStyle, const vcl::ITextLayout &_rLayout)
virtual Bitmap GetBitmap(const Point &rSrcPt, const Size &rSize) const
bool IsDeviceOutputNecessary() const
VclPtr< VirtualDevice > mpAlphaVDev
static void StartTrackingFontMappingUse()
const Color & GetTextColor() const
void ImplDrawTextBackground(const SalLayout &)
virtual vcl::Region GetOutputBoundsClipRegion() const
static void ImplDrawText(OutputDevice &rTargetDevice, const tools::Rectangle &rRect, const OUString &rOrigStr, DrawTextFlags nStyle, std::vector< tools::Rectangle > *pVector, OUString *pDisplayText, vcl::ITextLayout &_rLayout)
bool IsBackground() const
bool GetTextIsRTL(const OUString &, sal_Int32 nIndex, sal_Int32 nLen) const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
SAL_DLLPRIVATE void ImplInitTextColor()
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
bool IsOutputEnabled() const
std::unique_ptr< SalLayout > ImplLayout(const OUString &, sal_Int32 nIndex, sal_Int32 nLen, const Point &rLogicPos=Point(0, 0), tools::Long nLogicWidth=0, KernArraySpan aKernArray=KernArraySpan(), o3tl::span< const sal_Bool > pKashidaArray={}, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::text::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
tools::Long mnTextOffX
font specific text alignment offsets in pixel units
SAL_DLLPRIVATE void ImplDrawTextRect(tools::Long nBaseX, tools::Long nBaseY, tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)
Color GetTextFillColor() const
SAL_DLLPRIVATE void ImplDrawTextDirect(SalLayout &, bool bTextLines)
tools::Long GetOutOffXPixel() const
bool GetTextOutlines(PolyPolyVector &, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, KernArraySpan aDXArray=KernArraySpan(), o3tl::span< const sal_Bool > pKashidaArray={}) const
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
void SetLayoutMode(vcl::text::ComplexTextLayoutFlags nTextLayoutMode)
const AllSettings & GetSettings() const
static std::shared_ptr< const vcl::text::TextLayoutCache > CreateTextLayoutCache(OUString const &)
void IntersectClipRegion(const tools::Rectangle &rRect)
SAL_DLLPRIVATE void ImplDrawMnemonicLine(tools::Long nX, tools::Long nY, tools::Long nWidth)
SAL_DLLPRIVATE vcl::text::ImplLayoutArgs ImplPrepareLayoutArgs(OUString &, const sal_Int32 nIndex, const sal_Int32 nLen, double nPixelWidth, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::text::TextLayoutCache const *=nullptr) const
const Color & GetTextLineColor() const
SAL_DLLPRIVATE bool InitFont() const
void DrawStretchText(const Point &rStartPt, sal_Int32 nWidth, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1)
virtual bool IsVirtual() const
const OutDevType meOutDevType
constexpr tools::Long Y() const
void setX(tools::Long nX)
void RotateAround(tools::Long &rX, tools::Long &rY, Degree10 nOrientation) const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
virtual void SetTextColor(Color nColor)=0
virtual void SetLineColor()=0
virtual void SetFillColor()=0
virtual tools::Long GetGraphicsWidth() const =0
void DrawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice &rOutDev)
virtual std::unique_ptr< GenericSalLayout > GetTextLayout(int nFallbackLevel)=0
SalLayoutFlags GetFlags() const
SalLayoutGlyphsImpl * Impl(unsigned int nLevel) const
virtual double GetTextWidth() const
basegfx::B2DPoint GetDrawPosition(const basegfx::B2DPoint &rRelative=basegfx::B2DPoint(0, 0)) const
bool GetBoundRect(tools::Rectangle &) const
basegfx::B2DPoint & DrawBase()
virtual void DrawText(SalGraphics &) const =0
virtual SalLayoutGlyphs GetGlyphs() const
bool GetHighContrastMode() const
StyleSettingsOptions GetOptions() const
const Color & GetFaceColor() const
const Color & GetDisableColor() const
static VclPtr< reference_type > Create(Arg &&... arg)
A construction helper for VclPtr.
bool SetOutputSizePixel(const Size &rNewSize, bool bErase=true, bool bAlphaMaskTransparent=false)
const Color & GetColor() const
void translate(double fX, double fY)
constexpr pointer data() const noexcept
constexpr bool empty() const noexcept
is an implementation of the ITextLayout interface which simply delegates its calls to the respective ...
FontKerning GetKerning() const
void SetFontSize(const Size &)
void SetOrientation(Degree10 nLineOrientation)
const LanguageTag & GetLanguageTag() const
const OUString & GetStyleName() const
FontStrikeout GetStrikeout() const
FontLineStyle GetOverline() const
FontRelief GetRelief() const
FontEmphasisMark GetEmphasisMark() const
const OUString & GetFamilyName() const
bool IsUnderlineAbove() const
FontLineStyle GetUnderline() const
bool IsFixKerning() const
bool IsWordLineMode() const
Degree10 GetOrientation() const
virtual bool DecomposeTextRectAction() const =0
virtual void DrawText(const Point &_rStartPoint, const OUString &_rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, std::vector< tools::Rectangle > *_pVector, OUString *_pDisplayText)=0
virtual tools::Long GetTextWidth(const OUString &_rText, sal_Int32 _nStartIndex, sal_Int32 _nLength) const =0
virtual tools::Long GetTextArray(const OUString &_rText, KernArray *_pDXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength, bool bCaret=false) const =0
virtual sal_Int32 GetTextBreak(const OUString &_rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength) const =0
void Intersect(const tools::Rectangle &rRegion)
bool Overlaps(const tools::Rectangle &rRect) const
abstract base class for physical font faces
void SetLayoutWidth(double nWidth)
bool GetNextPos(int *nCharPos, bool *bRTL)
void SetOrientation(Degree10 nOrientation)
void SetKashidaArray(const sal_Bool *pKashidaArray)
bool HasFallbackRun() const
void SetDXArray(const double *pDXArray)
static std::shared_ptr< const vcl::text::TextLayoutCache > Create(OUString const &)
constexpr ::Color COL_GREEN(0x00, 0x80, 0x00)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
constexpr ::Color COL_LIGHTGREEN(0x00, 0xFF, 0x00)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define DBG_TESTSOLARMUTEX()
TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
::std::vector< B2DPolyPolygon > B2DPolyPolygonVector
B2IRange fround(const B2DRange &rRange)
const LanguageTag & getLocale()
Reference< XComponentContext > getProcessComponentContext()
VCL_DLLPUBLIC css::uno::Reference< css::i18n::XBreakIterator > CreateBreakIterator()
std::vector< tools::PolyPolygon > PolyPolyVector
sal_UCS4 GetLocalizedChar(sal_UCS4 nChar, LanguageType eLang)
tools::Long mnMapOfsY
Offset in Y direction.
tools::Long mnMapOfsX
Offset in X direction.
OUString removeMnemonicFromString(OUString const &rStr)
static OutputDevice::FontMappingUseData * fontMappingUseData
#define TEXT_DRAW_ELLIPSIS
static bool ImplIsCharIn(sal_Unicode c, const char *pStr)
static void TrackFontMappingUse(const vcl::Font &originalFont, const SalLayout *salLayout)
static bool IsTrackingFontMappingUse()
const SalLayoutFlags eDefaultLayout