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/outdev.hxx>
22
23#include <textlayout.hxx>
24
25#include <osl/diagnose.h>
26#include <tools/fract.hxx>
27#include <sal/log.hxx>
28
29#if OSL_DEBUG_LEVEL > 1
30#include <rtl/strbuf.hxx>
31#endif
32
33#include <memory>
34#include <iterator>
35
36namespace vcl
37{
38
40 {
41 }
42
43 tools::Long DefaultTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
44 {
45 return m_rTargetDevice.GetTextWidth( _rText, _nStartIndex, _nLength );
46 }
47
48 void DefaultTextLayout::DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex,
49 sal_Int32 _nLength, std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText )
50 {
51 m_rTargetDevice.DrawText( _rStartPoint, _rText, _nStartIndex, _nLength, _pVector, _pDisplayText );
52 }
53
54 void DefaultTextLayout::GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray,
55 sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
56 {
57 m_rTargetDevice.GetCaretPositions( _rText, _pCaretXArray, _nStartIndex, _nLength );
58 }
59
60 sal_Int32 DefaultTextLayout::GetTextBreak( const OUString& _rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
61 {
62 return m_rTargetDevice.GetTextBreak( _rText, _nMaxTextWidth, _nStartIndex, _nLength );
63 }
64
66 {
67 return false;
68 }
69
71 {
72 public:
73 ReferenceDeviceTextLayout( const Control& _rControl, OutputDevice& _rTargetDevice, OutputDevice& _rReferenceDevice );
75
76 // ITextLayout
77 virtual tools::Long GetTextWidth( const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen ) const override;
78 virtual void DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText ) override;
79 virtual void GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const override;
80 virtual sal_Int32 GetTextBreak(const OUString& _rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override;
81 virtual bool DecomposeTextRectAction() const override;
82
83 public:
84 // equivalents to the respective OutputDevice methods, which take the reference device into account
85 tools::Rectangle DrawText( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize );
86 tools::Rectangle GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize );
87
88 private:
89 tools::Long GetTextArray( const OUString& _rText, std::vector<sal_Int32>* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const;
90
93 const bool m_bRTLEnabled;
94
96 };
97
99 OutputDevice& _rReferenceDevice )
100 :m_rTargetDevice( _rTargetDevice )
101 ,m_rReferenceDevice( _rReferenceDevice )
102 ,m_bRTLEnabled( _rControl.IsRTLEnabled() )
103 {
104 Font const aUnzoomedPointFont( _rControl.GetUnzoomedControlPointFont() );
105 const Fraction& aZoom( _rControl.GetZoom() );
107
108 MapMode aTargetMapMode( m_rTargetDevice.GetMapMode() );
109 OSL_ENSURE( aTargetMapMode.GetOrigin() == Point(), "ReferenceDeviceTextLayout::ReferenceDeviceTextLayout: uhm, the code below won't work here ..." );
110
111 // normally, controls simulate "zoom" by "zooming" the font. This is responsible for (part of) the discrepancies
112 // between text in Writer and text in controls in Writer, though both have the same font.
113 // So, if we have a zoom set at the control, then we do not scale the font, but instead modify the map mode
114 // to accommodate for the zoom.
115 aTargetMapMode.SetScaleX( aZoom ); // TODO: shouldn't this be "current_scale * zoom"?
116 aTargetMapMode.SetScaleY( aZoom );
117
118 // also, use a higher-resolution map unit than "pixels", which should save us some rounding errors when
119 // translating coordinates between the reference device and the target device.
120 OSL_ENSURE( aTargetMapMode.GetMapUnit() == MapUnit::MapPixel,
121 "ReferenceDeviceTextLayout::ReferenceDeviceTextLayout: this class is not expected to work with such target devices!" );
122 // we *could* adjust all the code in this class to handle this case, but at the moment, it's not necessary
123 const MapUnit eTargetMapUnit = m_rReferenceDevice.GetMapMode().GetMapUnit();
124 aTargetMapMode.SetMapUnit( eTargetMapUnit );
125 OSL_ENSURE( aTargetMapMode.GetMapUnit() != MapUnit::MapPixel,
126 "ReferenceDeviceTextLayout::ReferenceDeviceTextLayout: a reference device which has map mode PIXEL?!" );
127
128 m_rTargetDevice.SetMapMode( aTargetMapMode );
129
130 // now that the Zoom is part of the map mode, reset the target device's font to the "unzoomed" version
131 Font aDrawFont( aUnzoomedPointFont );
132 aDrawFont.SetFontSize( OutputDevice::LogicToLogic(aDrawFont.GetFontSize(), MapMode(MapUnit::MapPoint), MapMode(eTargetMapUnit)) );
133 _rTargetDevice.SetFont( aDrawFont );
134
135 // transfer font to the reference device
137 Font aRefFont( aUnzoomedPointFont );
139 aRefFont.GetFontSize(), MapMode(MapUnit::MapPoint), m_rReferenceDevice.GetMapMode()) );
140 m_rReferenceDevice.SetFont( aRefFont );
141 }
142
144 {
147 }
148
149 namespace
150 {
151 bool lcl_normalizeLength( std::u16string_view _rText, const sal_Int32 _nStartIndex, sal_Int32& _io_nLength )
152 {
153 sal_Int32 nTextLength = _rText.size();
154 if ( _nStartIndex > nTextLength )
155 return false;
156 if ( _nStartIndex + _io_nLength > nTextLength )
157 _io_nLength = nTextLength - _nStartIndex;
158 return true;
159 }
160 }
161
162 tools::Long ReferenceDeviceTextLayout::GetTextArray( const OUString& _rText, std::vector<sal_Int32>* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
163 {
164 if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
165 return 0;
166
167 // retrieve the character widths from the reference device
168 tools::Long nTextWidth = m_rReferenceDevice.GetTextArray( _rText, _pDXAry, _nStartIndex, _nLength );
169#if OSL_DEBUG_LEVEL > 1
170 if ( _pDXAry )
171 {
172 OStringBuffer aTrace;
173 aTrace.append( "ReferenceDeviceTextLayout::GetTextArray( " );
174 aTrace.append( OUStringToOString( _rText, RTL_TEXTENCODING_UTF8 ) );
175 aTrace.append( " ): " );
176 aTrace.append( nTextWidth );
177 aTrace.append( " = ( " );
178 for ( sal_Int32 i=0; i<_nLength; )
179 {
180 aTrace.append( _pDXAry->at(i) );
181 if ( ++i < _nLength )
182 aTrace.append( ", " );
183 }
184 aTrace.append( ")" );
185 SAL_INFO( "vcl", aTrace.makeStringAndClear() );
186 }
187#endif
188 return nTextWidth;
189 }
190
191 tools::Long ReferenceDeviceTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
192 {
193 return GetTextArray( _rText, nullptr, _nStartIndex, _nLength );
194 }
195
196 void ReferenceDeviceTextLayout::DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText )
197 {
198 if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
199 return;
200
201 if ( _pVector && _pDisplayText )
202 {
203 std::vector< tools::Rectangle > aGlyphBounds;
204 m_rReferenceDevice.GetGlyphBoundRects( _rStartPoint, _rText, _nStartIndex, _nLength, aGlyphBounds );
205 _pVector->insert( _pVector->end(), aGlyphBounds.begin(), aGlyphBounds.end() );
206 *_pDisplayText += _rText.subView( _nStartIndex, _nLength );
207 return;
208 }
209
210 std::vector<sal_Int32> aCharWidths;
211 tools::Long nTextWidth = GetTextArray( _rText, &aCharWidths, _nStartIndex, _nLength );
212 m_rTargetDevice.DrawTextArray( _rStartPoint, _rText, aCharWidths, {}, _nStartIndex, _nLength );
213
214 m_aCompleteTextRect.Union( tools::Rectangle( _rStartPoint, Size( nTextWidth, m_rTargetDevice.GetTextHeight() ) ) );
215 }
216
217 void ReferenceDeviceTextLayout::GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray,
218 sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
219 {
220 if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
221 return;
222
223 // retrieve the caret positions from the reference device
224 m_rReferenceDevice.GetCaretPositions( _rText, _pCaretXArray, _nStartIndex, _nLength );
225 }
226
227 sal_Int32 ReferenceDeviceTextLayout::GetTextBreak( const OUString& _rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
228 {
229 if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
230 return 0;
231
232 return m_rReferenceDevice.GetTextBreak( _rText, _nMaxTextWidth, _nStartIndex, _nLength );
233 }
234
236 {
237 return true;
238 }
239
241 std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize )
242 {
243 if ( _rText.isEmpty() )
244 return tools::Rectangle();
245
246 // determine text layout mode from the RTL-ness of the control whose text we render
248 m_rReferenceDevice.SetLayoutMode( nTextLayoutMode );
250
251 // ComplexTextLayoutFlags::TextOriginLeft is because when we do actually draw the text (in DrawText( Point, ... )), then
252 // our caller gives us the left border of the draw position, regardless of script type, text layout,
253 // 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,
254 // but passed pixel coordinates. So, adjust the rect.
256 if (i_pDeviceSize)
257 {
258 //if i_pDeviceSize is passed in here, it was the original pre logic-to-pixel size of _rRect
259 SAL_WARN_IF(std::abs(_rRect.GetSize().Width() - m_rTargetDevice.LogicToPixel(*i_pDeviceSize).Width()) > 1, "vcl", "DeviceSize width was expected to match Pixel width");
260 SAL_WARN_IF(std::abs(_rRect.GetSize().Height() - m_rTargetDevice.LogicToPixel(*i_pDeviceSize).Height()) > 1, "vcl", "DeviceSize height was expected to match Pixel height");
261 aRect.SetSize(*i_pDeviceSize);
262 }
263
265 m_rTargetDevice.DrawText( aRect, _rText, _nStyle, _pVector, _pDisplayText, this );
267
268 if ( aTextRect.IsEmpty() && !aRect.IsEmpty() )
269 {
270 // this happens for instance if we're in a PaintToDevice call, where only a MetaFile is recorded,
271 // but no actual painting happens, so our "DrawText( Point, ... )" is never called
272 // In this case, calculate the rect from what OutputDevice::GetTextRect would give us. This has
273 // the disadvantage of less accuracy, compared with the approach to calculate the rect from the
274 // single "DrawText( Point, ... )" calls, since more intermediate arithmetic will translate
275 // from ref- to target-units.
276 aTextRect = m_rTargetDevice.GetTextRect( aRect, _rText, _nStyle, nullptr, this );
277 }
278
279 // similar to above, the text rect now contains TWIPs (or whatever unit the ref device has), but the caller
280 // expects pixel coordinates
281 aTextRect = m_rTargetDevice.LogicToPixel( aTextRect );
282
283 // convert the metric vector
284 if ( _pVector )
285 {
286 for ( auto& rCharRect : *_pVector )
287 {
288 rCharRect = m_rTargetDevice.LogicToPixel( rCharRect );
289 }
290 }
291
292 return aTextRect;
293 }
294
295 tools::Rectangle ReferenceDeviceTextLayout::GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize )
296 {
297 if ( _rText.isEmpty() )
298 return tools::Rectangle();
299
300 // determine text layout mode from the RTL-ness of the control whose text we render
302 m_rReferenceDevice.SetLayoutMode( nTextLayoutMode );
304
305 // ComplexTextLayoutFlags::TextOriginLeft is because when we do actually draw the text (in DrawText( Point, ... )), then
306 // our caller gives us the left border of the draw position, regardless of script type, text layout,
307 // 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,
308 // but passed pixel coordinates. So, adjust the rect.
310
311 tools::Rectangle aTextRect = m_rTargetDevice.GetTextRect( aRect, _rText, _nStyle, nullptr, this );
312
313 //if o_pDeviceSize is available, stash the pre logic-to-pixel size in it
314 if (o_pDeviceSize)
315 {
316 *o_pDeviceSize = aTextRect.GetSize();
317 }
318
319 // similar to above, the text rect now contains TWIPs (or whatever unit the ref device has), but the caller
320 // expects pixel coordinates
321 aTextRect = m_rTargetDevice.LogicToPixel( aTextRect );
322
323 return aTextRect;
324 }
325
326 ControlTextRenderer::ControlTextRenderer( const Control& _rControl, OutputDevice& _rTargetDevice, OutputDevice& _rReferenceDevice )
327 :m_pImpl( new ReferenceDeviceTextLayout( _rControl, _rTargetDevice, _rReferenceDevice ) )
328 {
329 }
330
332 {
333 }
334
335 tools::Rectangle ControlTextRenderer::DrawText( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle,
336 std::vector< tools::Rectangle >* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize )
337 {
338 return m_pImpl->DrawText( _rRect, _rText, _nStyle, _pVector, _pDisplayText, i_pDeviceSize );
339 }
340
341 tools::Rectangle ControlTextRenderer::GetTextRect( const tools::Rectangle& _rRect, const OUString& _rText, DrawTextFlags _nStyle, Size* o_pDeviceSize = nullptr )
342 {
343 return m_pImpl->GetTextRect( _rRect, _rText, _nStyle, o_pDeviceSize );
344 }
345
346} // namespace vcl
347
348/* 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:483
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:171
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:1479
void SetFont(const vcl::Font &rNewFont)
Definition: outdev/font.cxx:56
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1135
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
Definition: map.cxx:1605
void SetMapMode()
Definition: map.cxx:620
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
void DrawTextArray(const Point &rStartPt, const OUString &rStr, o3tl::span< const sal_Int32 > pDXAry, o3tl::span< const sal_Bool > pKashidaAry, sal_Int32 nIndex, sal_Int32 nLen, SalLayoutFlags flags=SalLayoutFlags::NONE, const SalLayoutGlyphs *pLayoutCache=nullptr)
Definition: text.cxx:923
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:904
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:1910
const MapMode & GetMapMode() const
Definition: outdev.hxx:1558
void GetCaretPositions(const OUString &, sal_Int32 *pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, const SalLayoutGlyphs *pGlyphs=nullptr) const
Definition: text.cxx:1070
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
Definition: stack.cxx:33
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:92
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
tools::Long GetTextArray(const OUString &rStr, std::vector< sal_Int32 > *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
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:335
tools::Rectangle GetTextRect(const tools::Rectangle &_rRect, const OUString &_rText, DrawTextFlags _nStyle, Size *o_pDeviceSize)
Definition: textlayout.cxx:341
ControlTextRenderer(const Control &_rControl, OutputDevice &_rTargetDevice, OutputDevice &_rReferenceDevice)
Definition: textlayout.cxx:326
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:48
virtual ~DefaultTextLayout()
Definition: textlayout.cxx:39
virtual bool DecomposeTextRectAction() const override
Definition: textlayout.cxx:65
virtual tools::Long GetTextWidth(const OUString &_rText, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override
Definition: textlayout.cxx:43
virtual sal_Int32 GetTextBreak(const OUString &_rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override
Definition: textlayout.cxx:60
virtual void GetCaretPositions(const OUString &_rText, sal_Int32 *_pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override
Definition: textlayout.cxx:54
OutputDevice & m_rTargetDevice
Definition: textlayout.hxx:80
void SetFontSize(const Size &)
Definition: font/font.cxx:149
const Size & GetFontSize() const
Definition: font/font.cxx:906
OutputDevice & m_rReferenceDevice
Definition: textlayout.cxx:92
tools::Rectangle m_aCompleteTextRect
Definition: textlayout.cxx:95
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:196
tools::Rectangle GetTextRect(const tools::Rectangle &_rRect, const OUString &_rText, DrawTextFlags _nStyle, Size *o_pDeviceSize)
Definition: textlayout.cxx:295
tools::Long GetTextArray(const OUString &_rText, std::vector< sal_Int32 > *_pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength) const
Definition: textlayout.cxx:162
virtual void GetCaretPositions(const OUString &_rText, sal_Int32 *_pCaretXArray, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override
Definition: textlayout.cxx:217
virtual bool DecomposeTextRectAction() const override
Definition: textlayout.cxx:235
virtual sal_Int32 GetTextBreak(const OUString &_rText, tools::Long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength) const override
Definition: textlayout.cxx:227
ReferenceDeviceTextLayout(const Control &_rControl, OutputDevice &_rTargetDevice, OutputDevice &_rReferenceDevice)
Definition: textlayout.cxx:98
virtual tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex, sal_Int32 nLen) const override
Definition: textlayout.cxx:191
const Fraction & GetZoom() const
Definition: window2.cxx:1241
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