LibreOffice Module vcl (master) 1
textlayout.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <vcl/ctrl.hxx>
21#include <vcl/kernarray.hxx>
22#include <vcl/outdev.hxx>
23
24#include <textlayout.hxx>
25
26#include <osl/diagnose.h>
27#include <tools/fract.hxx>
28#include <sal/log.hxx>
29
30#if OSL_DEBUG_LEVEL > 1
31#include <rtl/strbuf.hxx>
32#endif
33
34#include <memory>
35#include <iterator>
36
37namespace vcl
38{
39
41 {
42 }
43
44 tools::Long DefaultTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
45 {
46 return m_rTargetDevice.GetTextWidth( _rText, _nStartIndex, _nLength );
47 }
48
49 void DefaultTextLayout::DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex,
50 sal_Int32 _nLength, std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText )
51 {
52 m_rTargetDevice.DrawText( _rStartPoint, _rText, _nStartIndex, _nLength, _pVector, _pDisplayText );
53 }
54
55 void DefaultTextLayout::GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray,
56 sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
57 {
58 m_rTargetDevice.GetCaretPositions( _rText, _pCaretXArray, _nStartIndex, _nLength );
59 }
60
61 sal_Int32 DefaultTextLayout::GetTextBreak( const OUString& _rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
62 {
63 return m_rTargetDevice.GetTextBreak( _rText, _nMaxTextWidth, _nStartIndex, _nLength );
64 }
65
67 {
68 return false;
69 }
70
72 {
73 public:
74 ReferenceDeviceTextLayout( const Control& _rControl, OutputDevice& _rTargetDevice, OutputDevice& _rReferenceDevice );
76
77 // ITextLayout
78 virtual tools::Long GetTextWidth( const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen ) const override;
79 virtual void DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText ) override;
80 virtual void GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const override;
81 virtual sal_Int32 GetTextBreak(const OUString& _rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override;
82 virtual bool DecomposeTextRectAction() const override;
83
84 public:
85 // equivalents to the respective OutputDevice methods, which take the reference device into account
86 tools::Rectangle DrawText( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize );
87 tools::Rectangle GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize );
88
89 private:
90 tools::Long GetTextArray( const OUString& _rText, KernArray* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const;
91
94 const bool m_bRTLEnabled;
95
97 };
98
100 OutputDevice& _rReferenceDevice )
101 :m_rTargetDevice( _rTargetDevice )
102 ,m_rReferenceDevice( _rReferenceDevice )
103 ,m_bRTLEnabled( _rControl.IsRTLEnabled() )
104 {
105 Font const aUnzoomedPointFont( _rControl.GetUnzoomedControlPointFont() );
106 const Fraction& aZoom( _rControl.GetZoom() );
108
109 MapMode aTargetMapMode( m_rTargetDevice.GetMapMode() );
110 OSL_ENSURE( aTargetMapMode.GetOrigin() == Point(), "ReferenceDeviceTextLayout::ReferenceDeviceTextLayout: uhm, the code below won't work here ..." );
111
112 // normally, controls simulate "zoom" by "zooming" the font. This is responsible for (part of) the discrepancies
113 // between text in Writer and text in controls in Writer, though both have the same font.
114 // So, if we have a zoom set at the control, then we do not scale the font, but instead modify the map mode
115 // to accommodate for the zoom.
116 aTargetMapMode.SetScaleX( aZoom ); // TODO: shouldn't this be "current_scale * zoom"?
117 aTargetMapMode.SetScaleY( aZoom );
118
119 // also, use a higher-resolution map unit than "pixels", which should save us some rounding errors when
120 // translating coordinates between the reference device and the target device.
121 OSL_ENSURE( aTargetMapMode.GetMapUnit() == MapUnit::MapPixel,
122 "ReferenceDeviceTextLayout::ReferenceDeviceTextLayout: this class is not expected to work with such target devices!" );
123 // we *could* adjust all the code in this class to handle this case, but at the moment, it's not necessary
124 const MapUnit eTargetMapUnit = m_rReferenceDevice.GetMapMode().GetMapUnit();
125 aTargetMapMode.SetMapUnit( eTargetMapUnit );
126 OSL_ENSURE( aTargetMapMode.GetMapUnit() != MapUnit::MapPixel,
127 "ReferenceDeviceTextLayout::ReferenceDeviceTextLayout: a reference device which has map mode PIXEL?!" );
128
129 m_rTargetDevice.SetMapMode( aTargetMapMode );
130
131 // now that the Zoom is part of the map mode, reset the target device's font to the "unzoomed" version
132 Font aDrawFont( aUnzoomedPointFont );
133 aDrawFont.SetFontSize( OutputDevice::LogicToLogic(aDrawFont.GetFontSize(), MapMode(MapUnit::MapPoint), MapMode(eTargetMapUnit)) );
134 _rTargetDevice.SetFont( aDrawFont );
135
136 // transfer font to the reference device
138 Font aRefFont( aUnzoomedPointFont );
140 aRefFont.GetFontSize(), MapMode(MapUnit::MapPoint), m_rReferenceDevice.GetMapMode()) );
141 m_rReferenceDevice.SetFont( aRefFont );
142 }
143
145 {
148 }
149
150 namespace
151 {
152 bool lcl_normalizeLength( std::u16string_view _rText, const sal_Int32 _nStartIndex, sal_Int32& _io_nLength )
153 {
154 sal_Int32 nTextLength = _rText.size();
155 if ( _nStartIndex > nTextLength )
156 return false;
157 if ( _nStartIndex + _io_nLength > nTextLength )
158 _io_nLength = nTextLength - _nStartIndex;
159 return true;
160 }
161 }
162
163 tools::Long ReferenceDeviceTextLayout::GetTextArray( const OUString& _rText, KernArray* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
164 {
165 if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
166 return 0;
167
168 // retrieve the character widths from the reference device
169 tools::Long nTextWidth = m_rReferenceDevice.GetTextArray( _rText, _pDXAry, _nStartIndex, _nLength );
170#if OSL_DEBUG_LEVEL > 1
171 if ( _pDXAry )
172 {
173 OStringBuffer aTrace;
174 aTrace.append( "ReferenceDeviceTextLayout::GetTextArray( " );
175 aTrace.append( OUStringToOString( _rText, RTL_TEXTENCODING_UTF8 ) );
176 aTrace.append( " ): " );
177 aTrace.append( nTextWidth );
178 aTrace.append( " = ( " );
179 for ( sal_Int32 i=0; i<_nLength; )
180 {
181 aTrace.append( _pDXAry->at(i) );
182 if ( ++i < _nLength )
183 aTrace.append( ", " );
184 }
185 aTrace.append( ")" );
186 SAL_INFO( "vcl", aTrace.makeStringAndClear() );
187 }
188#endif
189 return nTextWidth;
190 }
191
192 tools::Long ReferenceDeviceTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
193 {
194 return GetTextArray( _rText, nullptr, _nStartIndex, _nLength );
195 }
196
197 void ReferenceDeviceTextLayout::DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText )
198 {
199 if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
200 return;
201
202 if ( _pVector && _pDisplayText )
203 {
204 std::vector< tools::Rectangle > aGlyphBounds;
205 m_rReferenceDevice.GetGlyphBoundRects( _rStartPoint, _rText, _nStartIndex, _nLength, aGlyphBounds );
206 _pVector->insert( _pVector->end(), aGlyphBounds.begin(), aGlyphBounds.end() );
207 *_pDisplayText += _rText.subView( _nStartIndex, _nLength );
208 return;
209 }
210
211 KernArray aCharWidths;
212 tools::Long nTextWidth = GetTextArray( _rText, &aCharWidths, _nStartIndex, _nLength );
213 m_rTargetDevice.DrawTextArray( _rStartPoint, _rText, aCharWidths, {}, _nStartIndex, _nLength );
214
215 m_aCompleteTextRect.Union( tools::Rectangle( _rStartPoint, Size( nTextWidth, m_rTargetDevice.GetTextHeight() ) ) );
216 }
217
218 void ReferenceDeviceTextLayout::GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray,
219 sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
220 {
221 if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
222 return;
223
224 // retrieve the caret positions from the reference device
225 m_rReferenceDevice.GetCaretPositions( _rText, _pCaretXArray, _nStartIndex, _nLength );
226 }
227
228 sal_Int32 ReferenceDeviceTextLayout::GetTextBreak( const OUString& _rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
229 {
230 if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
231 return 0;
232
233 return m_rReferenceDevice.GetTextBreak( _rText, _nMaxTextWidth, _nStartIndex, _nLength );
234 }
235
237 {
238 return true;
239 }
240
242 std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize )
243 {
244 if ( _rText.isEmpty() )
245 return tools::Rectangle();
246
247 // determine text layout mode from the RTL-ness of the control whose text we render
249 m_rReferenceDevice.SetLayoutMode( nTextLayoutMode );
251
252 // ComplexTextLayoutFlags::TextOriginLeft is because when we do actually draw the text (in DrawText( Point, ... )), then
253 // our caller gives us the left border of the draw position, regardless of script type, text layout,
254 // and the like in our ctor, we set the map mode of the target device from pixel to twip, but our caller doesn't know this,
255 // but passed pixel coordinates. So, adjust the rect.
257 if (i_pDeviceSize)
258 {
259 //if i_pDeviceSize is passed in here, it was the original pre logic-to-pixel size of _rRect
260 SAL_WARN_IF(std::abs(_rRect.GetSize().Width() - m_rTargetDevice.LogicToPixel(*i_pDeviceSize).Width()) > 1, "vcl", "DeviceSize width was expected to match Pixel width");
261 SAL_WARN_IF(std::abs(_rRect.GetSize().Height() - m_rTargetDevice.LogicToPixel(*i_pDeviceSize).Height()) > 1, "vcl", "DeviceSize height was expected to match Pixel height");
262 aRect.SetSize(*i_pDeviceSize);
263 }
264
266 m_rTargetDevice.DrawText( aRect, _rText, _nStyle, _pVector, _pDisplayText, this );
268
269 if ( aTextRect.IsEmpty() && !aRect.IsEmpty() )
270 {
271 // this happens for instance if we're in a PaintToDevice call, where only a MetaFile is recorded,
272 // but no actual painting happens, so our "DrawText( Point, ... )" is never called
273 // In this case, calculate the rect from what OutputDevice::GetTextRect would give us. This has
274 // the disadvantage of less accuracy, compared with the approach to calculate the rect from the
275 // single "DrawText( Point, ... )" calls, since more intermediate arithmetic will translate
276 // from ref- to target-units.
277 aTextRect = m_rTargetDevice.GetTextRect( aRect, _rText, _nStyle, nullptr, this );
278 }
279
280 // similar to above, the text rect now contains TWIPs (or whatever unit the ref device has), but the caller
281 // expects pixel coordinates
282 aTextRect = m_rTargetDevice.LogicToPixel( aTextRect );
283
284 // convert the metric vector
285 if ( _pVector )
286 {
287 for ( auto& rCharRect : *_pVector )
288 {
289 rCharRect = m_rTargetDevice.LogicToPixel( rCharRect );
290 }
291 }
292
293 return aTextRect;
294 }
295
296 tools::Rectangle ReferenceDeviceTextLayout::GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize )
297 {
298 if ( _rText.isEmpty() )
299 return tools::Rectangle();
300
301 // determine text layout mode from the RTL-ness of the control whose text we render
303 m_rReferenceDevice.SetLayoutMode( nTextLayoutMode );
305
306 // ComplexTextLayoutFlags::TextOriginLeft is because when we do actually draw the text (in DrawText( Point, ... )), then
307 // our caller gives us the left border of the draw position, regardless of script type, text layout,
308 // and the like in our ctor, we set the map mode of the target device from pixel to twip, but our caller doesn't know this,
309 // but passed pixel coordinates. So, adjust the rect.
311
312 tools::Rectangle aTextRect = m_rTargetDevice.GetTextRect( aRect, _rText, _nStyle, nullptr, this );
313
314 //if o_pDeviceSize is available, stash the pre logic-to-pixel size in it
315 if (o_pDeviceSize)
316 {
317 *o_pDeviceSize = aTextRect.GetSize();
318 }
319
320 // similar to above, the text rect now contains TWIPs (or whatever unit the ref device has), but the caller
321 // expects pixel coordinates
322 aTextRect = m_rTargetDevice.LogicToPixel( aTextRect );
323
324 return aTextRect;
325 }
326
327 ControlTextRenderer::ControlTextRenderer( const Control& _rControl, OutputDevice& _rTargetDevice, OutputDevice& _rReferenceDevice )
328 :m_pImpl( new ReferenceDeviceTextLayout( _rControl, _rTargetDevice, _rReferenceDevice ) )
329 {
330 }
331
333 {
334 }
335
336 tools::Rectangle ControlTextRenderer::DrawText( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle,
337 std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize )
338 {
339 return m_pImpl->DrawText( _rRect, _rText, _nStyle, _pVector, _pDisplayText, i_pDeviceSize );
340 }
341
342 tools::Rectangle ControlTextRenderer::GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize = nullptr )
343 {
344 return m_pImpl->GetTextRect( _rRect, _rText, _nStyle, o_pDeviceSize );
345 }
346
347} // namespace vcl
348
349/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DrawTextFlags
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
Definition: ctrl.hxx:82
vcl::Font GetUnzoomedControlPointFont() const
Definition: ctrl.cxx:490
void SetScaleY(const Fraction &rScaleY)
Definition: mapmod.cxx:115
MapUnit GetMapUnit() const
Definition: mapmod.cxx:146
void SetMapUnit(MapUnit eUnit)
Definition: mapmod.cxx:98
const Point & GetOrigin() const
Definition: mapmod.cxx:148
void SetScaleX(const Fraction &rScaleX)
Definition: mapmod.cxx:109
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:170
bool GetGlyphBoundRects(const Point &rOrigin, const OUString &rStr, int nIndex, int nLen, std::vector< tools::Rectangle > &rVector) 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
Definition: text.cxx:1465
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)
Definition: text.cxx:923
void SetFont(const vcl::Font &rNewFont)
Definition: outdev/font.cxx:56
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1123
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
Definition: map.cxx:1593
void SetMapMode()
Definition: map.cxx:610
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.
Definition: text.cxx:886
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
Definition: text.cxx:958
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:892
tools::Rectangle GetTextRect(const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
Definition: text.cxx:1894
const MapMode & GetMapMode() const
Definition: outdev.hxx:1557
void GetCaretPositions(const OUString &, sal_Int32 *pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, const SalLayoutGlyphs *pGlyphs=nullptr) const
Definition: text.cxx:1062
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
Definition: stack.cxx:32
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Definition: text.cxx:897
void Pop()
Definition: stack.cxx:91
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)
Definition: text.cxx:797
void SetLayoutMode(vcl::text::ComplexTextLayoutFlags nTextLayoutMode)
Definition: text.cxx:60
constexpr tools::Long Height() const
constexpr tools::Long Width() const
void SetSize(const Size &)
constexpr Size GetSize() const
tools::Rectangle & Union(const tools::Rectangle &rRect)
constexpr bool IsEmpty() const
::std::unique_ptr< ReferenceDeviceTextLayout > m_pImpl
Definition: textlayout.hxx:105
tools::Rectangle DrawText(const tools::Rectangle &_rRect, const OUString &_rText, DrawTextFlags _nStyle, std::vector< tools::Rectangle > *_pVector, OUString *_pDisplayText, const Size *i_pDeviceSize)
Definition: textlayout.cxx:336
tools::Rectangle GetTextRect(const tools::Rectangle &_rRect, const OUString &_rText, DrawTextFlags _nStyle, Size *o_pDeviceSize)
Definition: textlayout.cxx:342
ControlTextRenderer(const Control &_rControl, OutputDevice &_rTargetDevice, OutputDevice &_rReferenceDevice)
Definition: textlayout.cxx:327
virtual void DrawText(const Point &_rStartPoint, const OUString &_rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, std::vector< tools::Rectangle > *_pVector, OUString *_pDisplayText) override
Definition: textlayout.cxx:49
virtual ~DefaultTextLayout()
Definition: textlayout.cxx:40
virtual bool DecomposeTextRectAction() const override
Definition: textlayout.cxx:66
virtual tools::Long GetTextWidth(const OUString &_rText, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override
Definition: textlayout.cxx:44
virtual sal_Int32 GetTextBreak(const OUString &_rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override
Definition: textlayout.cxx:61
virtual void GetCaretPositions(const OUString &_rText, sal_Int32 *_pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override
Definition: textlayout.cxx:55
OutputDevice & m_rTargetDevice
Definition: textlayout.hxx:80
void SetFontSize(const Size &)
Definition: font/font.cxx:149
const Size & GetFontSize() const
Definition: font/font.cxx:907
OutputDevice & m_rReferenceDevice
Definition: textlayout.cxx:93
tools::Rectangle m_aCompleteTextRect
Definition: textlayout.cxx:96
tools::Long GetTextArray(const OUString &_rText, KernArray *_pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength) const
Definition: textlayout.cxx:163
virtual void DrawText(const Point &_rStartPoint, const OUString &_rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, std::vector< tools::Rectangle > *_pVector, OUString *_pDisplayText) override
Definition: textlayout.cxx:197
tools::Rectangle GetTextRect(const tools::Rectangle &_rRect, const OUString &_rText, DrawTextFlags _nStyle, Size *o_pDeviceSize)
Definition: textlayout.cxx:296
virtual void GetCaretPositions(const OUString &_rText, sal_Int32 *_pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override
Definition: textlayout.cxx:218
virtual bool DecomposeTextRectAction() const override
Definition: textlayout.cxx:236
virtual sal_Int32 GetTextBreak(const OUString &_rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override
Definition: textlayout.cxx:228
ReferenceDeviceTextLayout(const Control &_rControl, OutputDevice &_rTargetDevice, OutputDevice &_rReferenceDevice)
Definition: textlayout.cxx:99
virtual tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex, sal_Int32 nLen) const override
Definition: textlayout.cxx:192
const Fraction & GetZoom() const
Definition: window2.cxx:1249
sal_Int32 nIndex
#define SAL_WARN_IF(condition, area, stream)
#define SAL_INFO(area, stream)
MapUnit
int i
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
long Long
ComplexTextLayoutFlags
Definition: State.hxx:76