LibreOffice Module sw (master) 1
portxt.hxx
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#pragma once
20
21#include "porlin.hxx"
22
23class SwTextGuess;
24
27{
28 void BreakCut( SwTextFormatInfo &rInf, const SwTextGuess &rGuess );
29 void BreakUnderflow( SwTextFormatInfo &rInf );
30 bool Format_( SwTextFormatInfo &rInf );
31
32public:
34 static SwTextPortion * CopyLinePortion(const SwLinePortion &rPortion);
35 virtual void Paint( const SwTextPaintInfo &rInf ) const override;
36 virtual bool Format( SwTextFormatInfo &rInf ) override;
37 virtual void FormatEOL( SwTextFormatInfo &rInf ) override;
38 virtual TextFrameIndex GetModelPositionForViewPoint(sal_uInt16 nOfst) const override;
39 virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override;
40 virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override;
41 virtual tools::Long CalcSpacing( tools::Long nSpaceAdd, const SwTextSizeInfo &rInf ) const override;
42
43 // Counts the spaces for justified paragraph
45
46 bool CreateHyphen( SwTextFormatInfo &rInf, SwTextGuess const &rGuess );
47
48 // Accessibility: pass information about this portion to the PortionHandler
49 virtual void HandlePortion( SwPortionHandler& rPH ) const override;
50};
51
53{
54public:
56
57 virtual bool Format( SwTextFormatInfo &rInf ) override;
58 virtual void Paint( const SwTextPaintInfo &rInf ) const override;
59 virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override;
60 virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override;
61};
62
64{
65 sal_uInt16 m_nBlankWidth;
66public:
67 explicit SwHolePortion( const SwTextPortion &rPor );
68 sal_uInt16 GetBlankWidth( ) const { return m_nBlankWidth; }
69 void SetBlankWidth( const sal_uInt16 nNew ) { m_nBlankWidth = nNew; }
70 virtual SwLinePortion *Compress() override;
71 virtual bool Format( SwTextFormatInfo &rInf ) override;
72 virtual SwPosSize GetTextSize(const SwTextSizeInfo& rInfo) const override;
73 virtual void Paint( const SwTextPaintInfo &rInf ) const override;
74
75 // Accessibility: pass information about this portion to the PortionHandler
76 virtual void HandlePortion( SwPortionHandler& rPH ) const override;
77
78 void dumpAsXml(xmlTextWriterPtr pWriter, const OUString& rText,
79 TextFrameIndex& nOffset) const override;
80};
81
83{
84 public:
86 {
88 }
89 virtual void Paint( const SwTextPaintInfo &rInf ) const override;
90 virtual bool Format( SwTextFormatInfo &rInf ) override;
91};
92
94{
95public:
97 {
99 }
100 virtual void Paint( const SwTextPaintInfo &rInf ) const override;
101 virtual bool Format( SwTextFormatInfo &rInf ) override;
102};
103
104/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: portxt.cxx:858
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: portxt.cxx:875
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: portxt.cxx:852
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: portxt.cxx:846
virtual SwPosSize GetTextSize(const SwTextSizeInfo &rInfo) const override
Definition: portxt.cxx:768
sal_uInt16 m_nBlankWidth
Definition: portxt.hxx:65
virtual SwLinePortion * Compress() override
Definition: portxt.cxx:765
void SetBlankWidth(const sal_uInt16 nNew)
Definition: portxt.hxx:69
sal_uInt16 GetBlankWidth() const
Definition: portxt.hxx:68
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: portxt.cxx:824
SwHolePortion(const SwTextPortion &rPor)
Definition: portxt.cxx:755
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: portxt.cxx:783
void dumpAsXml(xmlTextWriterPtr pWriter, const OUString &rText, TextFrameIndex &nOffset) const override
Definition: portxt.cxx:834
virtual void HandlePortion(SwPortionHandler &rPH) const override
Definition: portxt.cxx:829
Base class for anything that can be part of a line in the Writer layout.
Definition: porlin.hxx:52
void SetWhichPor(const PortionType nNew)
Definition: porlin.hxx:101
The SwPortionHandler interface implements a visitor for the layout engine's text portions.
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: portxt.cxx:689
virtual bool GetExpText(const SwTextSizeInfo &rInf, OUString &rText) const override
Definition: portxt.cxx:726
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: portxt.cxx:694
virtual SwPosSize GetTextSize(const SwTextSizeInfo &rInfo) const override
Definition: portxt.cxx:744
This portion represents a part of the paragraph string.
Definition: portxt.hxx:27
virtual SwPosSize GetTextSize(const SwTextSizeInfo &rInfo) const override
Definition: portxt.cxx:511
virtual bool GetExpText(const SwTextSizeInfo &rInf, OUString &rText) const override
Definition: portxt.cxx:570
bool CreateHyphen(SwTextFormatInfo &rInf, SwTextGuess const &rGuess)
Definition: txthyph.cxx:252
virtual void Paint(const SwTextPaintInfo &rInf) const override
Definition: portxt.cxx:526
virtual void HandlePortion(SwPortionHandler &rPH) const override
Definition: portxt.cxx:679
void BreakUnderflow(SwTextFormatInfo &rInf)
Definition: portxt.cxx:264
virtual TextFrameIndex GetModelPositionForViewPoint(sal_uInt16 nOfst) const override
the parameter is actually SwTwips apparently?
Definition: portxt.cxx:504
void BreakCut(SwTextFormatInfo &rInf, const SwTextGuess &rGuess)
Definition: portxt.cxx:219
TextFrameIndex GetSpaceCnt(const SwTextSizeInfo &rInf, TextFrameIndex &rCnt) const
Definition: portxt.cxx:577
static SwTextPortion * CopyLinePortion(const SwLinePortion &rPortion)
Definition: portxt.cxx:211
virtual bool Format(SwTextFormatInfo &rInf) override
Definition: portxt.cxx:442
bool Format_(SwTextFormatInfo &rInf)
Definition: portxt.cxx:280
virtual void FormatEOL(SwTextFormatInfo &rInf) override
Definition: portxt.cxx:470
virtual tools::Long CalcSpacing(tools::Long nSpaceAdd, const SwTextSizeInfo &rInf) const override
Definition: portxt.cxx:619
struct _xmlTextWriter * xmlTextWriterPtr
long Long