LibreOffice Module vcl (master) 1
ImplLayoutArgs.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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 "sallayout.hxx"
21
22namespace vcl::text
23{
25{
26public:
27 // string related inputs
30 const OUString& mrStr;
33
34 // performance hack
36
37 // positioning related inputs
38 const double* mpDXArray; // in floating point pixel units
40 double mnLayoutWidth; // in pixel units
41 Degree10 mnOrientation; // in 0-3600 system
42
43 // data for bidi and glyph+script fallback
46
47 ImplLayoutArgs(OUString const& rStr, int nMinCharPos, int nEndCharPos, SalLayoutFlags nFlags,
48 LanguageTag aLanguageTag, vcl::text::TextLayoutCache const* pLayoutCache);
49
50 void SetLayoutWidth(double nWidth);
51 void SetDXArray(const double* pDXArray);
52 void SetKashidaArray(const sal_Bool* pKashidaArray);
53 void SetOrientation(Degree10 nOrientation);
54
55 void ResetPos();
56 bool GetNextPos(int* nCharPos, bool* bRTL);
57 bool GetNextRun(int* nMinRunPos, int* nEndRunPos, bool* bRTL);
58 void AddFallbackRun(int nMinRunPos, int nEndRunPos, bool bRTL);
59 bool HasDXArray() const { return mpDXArray; }
60
61 // methods used by BiDi and glyph fallback
62 bool HasFallbackRun() const;
63 bool PrepareFallback(const SalLayoutGlyphsImpl* pGlyphsImpl);
64
65private:
66 void AddRun(int nMinCharPos, int nEndCharPos, bool bRTL);
67};
68}
69
70// For nice SAL_INFO logging of ImplLayoutArgs values
71std::ostream& operator<<(std::ostream& s, vcl::text::ImplLayoutArgs const& rArgs);
72
73/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
std::ostream & operator<<(std::ostream &s, vcl::text::ImplLayoutArgs const &rArgs)
SalLayoutFlags
vcl::text::TextLayoutCache const * m_pTextLayoutCache
const sal_Bool * mpKashidaArray
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
unsigned char sal_Bool