LibreOffice Module editeng (master) 1
unoedhlp.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
20#ifndef INCLUDED_EDITENG_UNOEDHLP_HXX
21#define INCLUDED_EDITENG_UNOEDHLP_HXX
22
23#include <memory>
24#include <vcl/textdata.hxx>
25#include <svl/hint.hxx>
26#include <tools/gen.hxx>
28
29struct EENotify;
30class EditEngine;
31
37class SAL_DLLPUBLIC_RTTI SvxEditSourceHint : public TextHint
38{
39private:
40 sal_Int32 mnStart;
41 sal_Int32 mnEnd;
42
43public:
45 SvxEditSourceHint( SfxHintId nId, sal_Int32 nValue, sal_Int32 nStart, sal_Int32 nEnd );
46
48 sal_Int32 GetStartValue() const { return mnStart;}
49 sal_Int32 GetEndValue() const { return mnEnd;}
50};
52{
53public:
55};
59{
60public:
61
69 static ::std::unique_ptr<SfxHint> EENotification2Hint( EENotify const * aNotify );
70
90 static void GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, const EditEngine& rEE, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell = false);
91
110 static Point EEToUserSpace( const Point& rPoint, const Size& rEESize, bool bIsVertical );
111
130 static Point UserSpaceToEE( const Point& rPoint, const Size& rEESize, bool bIsVertical );
131
150 static tools::Rectangle EEToUserSpace( const tools::Rectangle& rRect, const Size& rEESize, bool bIsVertical );
151
152};
153
154#endif
155
156/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
size_t mnEnd
Helper class for common functionality in edit sources.
Definition: unoedhlp.hxx:59
Extends TextHint by two additional parameters which are necessary for the SfxHintId::EditSourceParasM...
Definition: unoedhlp.hxx:38
sal_Int32 mnEnd
Definition: unoedhlp.hxx:41
sal_Int32 GetEndValue() const
Definition: unoedhlp.hxx:49
sal_Int32 GetStartValue() const
Definition: unoedhlp.hxx:48
sal_Int32 mnStart
Definition: unoedhlp.hxx:40
sal_Int32 GetValue() const
#define EDITENG_DLLPUBLIC
Definition: editengdllapi.h:28
SfxHintId
@ EditSourceSelectionChanged
sal_Int32 nIndex
sal_Int32 mnStart