LibreOffice Module sw (master) 1
ToxTabStopTokenHandler.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
10
11#ifndef TOXTABSTOPTOKENHANDLER_HXX_
12#define TOXTABSTOPTOKENHANDLER_HXX_
13
14#include <rtl/ustring.hxx>
15
16#include <editeng/tstpitem.hxx>
17#include "nodeoffset.hxx"
18
19struct SwFormToken;
20class SwPageDesc;
21class SwRootFrame;
22class SwTextNode;
23
24namespace sw {
25
32{
33public:
35
38 OUString text;
40 };
41
48 HandleTabStopToken(const SwFormToken& aToken, const SwTextNode& targetNode,
49 const SwRootFrame *currentLayout) const = 0;
50};
51
54{
55public:
56
58
74 DefaultToxTabStopTokenHandler(SwNodeOffset indexOfSectionNode, const SwPageDesc& defaultPageDescription,
75 bool tabPositionIsRelativeToParagraphIndent,
76 TabStopReferencePolicy referencePolicy);
77
86 HandleTabStopToken(const SwFormToken& aToken, const SwTextNode& targetNode,
87 const SwRootFrame *currentLayout) const override;
88
89private:
94 static bool
95 CanUseLayoutRectangle(const SwTextNode& targetNode, const SwRootFrame *currentLayout);
96
102 CalculatePageMarginFromPageDescription(const SwTextNode& targetNode) const;
103
108};
109
110}
111
112#endif /* TOXTABSTOPTOKENHANDLER_HXX_ */
113
114/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
The root element of a Writer document layout.
Definition: rootfrm.hxx:85
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
The default implementation of ToxTabStopTokenHandler.
static bool CanUseLayoutRectangle(const SwTextNode &targetNode, const SwRootFrame *currentLayout)
Test whether the page layout can be obtained by a layout rectangle.
DefaultToxTabStopTokenHandler(SwNodeOffset indexOfSectionNode, const SwPageDesc &defaultPageDescription, bool tabPositionIsRelativeToParagraphIndent, TabStopReferencePolicy referencePolicy)
ToxTabStopTokenHandler::HandledTabStopToken HandleTabStopToken(const SwFormToken &aToken, const SwTextNode &targetNode, const SwRootFrame *currentLayout) const override
Handle a tab stop token.
tools::Long CalculatePageMarginFromPageDescription(const SwTextNode &targetNode) const
Calculate the page margin from the page description.
This class handles tab stop tokens in the pattern for tox entries.
virtual HandledTabStopToken HandleTabStopToken(const SwFormToken &aToken, const SwTextNode &targetNode, const SwRootFrame *currentLayout) const =0
Handle a tab stop token.
Dialog to specify the properties of date form field.
long Long