LibreOffice Module svx (master) 1
sxcecitm.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#ifndef INCLUDED_SVX_SXCECITM_HXX
20#define INCLUDED_SVX_SXCECITM_HXX
21
22#include <svl/eitem.hxx>
23#include <svx/svddef.hxx>
24#include <svx/sdynitm.hxx>
25#include <svx/sdmetitm.hxx>
26#include <svx/svxdllapi.h>
27
29
30
31// class SdrCaptionEscDirItem
32
33class SVXCORE_DLLPUBLIC SdrCaptionEscDirItem final : public SfxEnumItem<SdrCaptionEscDir> {
34public:
36 virtual SdrCaptionEscDirItem* Clone(SfxItemPool* pPool=nullptr) const override;
37 virtual sal_uInt16 GetValueCount() const override; // { return 3; }
38
39 static OUString GetValueTextByPos(sal_uInt16 nPos);
40
41 virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
42};
43
44
45// class SdrCaptionEscIsRelItem
46// sal_True = line escape position is relative
47// sal_False = line escape position is absolute
48
50public:
52 virtual ~SdrCaptionEscIsRelItem() override;
53 virtual SdrCaptionEscIsRelItem* Clone(SfxItemPool* pPool=nullptr) const override;
54
57 SdrCaptionEscIsRelItem & operator =(SdrCaptionEscIsRelItem const &) = delete; // due to SdrYesNoItem
58 SdrCaptionEscIsRelItem & operator =(SdrCaptionEscIsRelItem &&) = delete; // due to SdrYesNoItem
59};
60
61
62// class SdrCaptionEscRelItem
63// relative line escape
64// 0 = 0.00% = up resp. left,
65// 10000 = 100.00% = right resp. down
66// only when SdrCaptionEscIsRelItem=TRUE
67
69public:
70 SdrCaptionEscRelItem(sal_Int32 nEscRel=5000): SfxInt32Item(SDRATTR_CAPTIONESCREL,nEscRel) {}
71 virtual ~SdrCaptionEscRelItem() override;
72 virtual SdrCaptionEscRelItem* Clone(SfxItemPool* pPool=nullptr) const override;
73
76 SdrCaptionEscRelItem & operator =(SdrCaptionEscRelItem const &) = delete; // due to SfxInt32Item
77 SdrCaptionEscRelItem & operator =(SdrCaptionEscRelItem &&) = delete; // due to SfxInt32Item
78};
79
80
81// class SdrCaptionEscAbsItem
82// absolute line escape
83// 0 = up resp. left,
84// >0 = in direction right resp. down
85// only when SdrCaptionEscIsRelItem=FALSE
86
87class SdrCaptionEscAbsItem final : public SdrMetricItem {
88public:
90 virtual SdrCaptionEscAbsItem* Clone(SfxItemPool*) const override
91 {
92 return new SdrCaptionEscAbsItem(*this);
93 }
94};
95
96#endif
97
98/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SdrCaptionEscAbsItem(tools::Long nEscAbs=0)
Definition: sxcecitm.hxx:89
virtual SdrCaptionEscAbsItem * Clone(SfxItemPool *) const override
Definition: sxcecitm.hxx:90
SdrCaptionEscDirItem(SdrCaptionEscDir eDir=SdrCaptionEscDir::Horizontal)
Definition: sxcecitm.hxx:35
SdrCaptionEscIsRelItem(SdrCaptionEscIsRelItem const &)=default
SdrCaptionEscIsRelItem(bool bRel=true)
Definition: sxcecitm.hxx:51
SdrCaptionEscIsRelItem(SdrCaptionEscIsRelItem &&)=default
SdrCaptionEscRelItem(sal_Int32 nEscRel=5000)
Definition: sxcecitm.hxx:70
SdrCaptionEscRelItem(SdrCaptionEscRelItem &&)=default
SdrCaptionEscRelItem(SdrCaptionEscRelItem const &)=default
virtual sal_uInt16 GetValueCount() const=0
virtual bool GetPresentation(SfxItemPresentation, MapUnit, MapUnit, OUString &rText, const IntlWrapper &) const override
SfxPoolItem & operator=(const SfxPoolItem &)=delete
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
MapUnit
long Long
SfxItemPresentation
constexpr TypedWhichId< SdrCaptionEscRelItem > SDRATTR_CAPTIONESCREL(SDRATTR_CAPTION_FIRST+6)
constexpr TypedWhichId< SdrCaptionEscIsRelItem > SDRATTR_CAPTIONESCISREL(SDRATTR_CAPTION_FIRST+5)
constexpr TypedWhichId< SdrCaptionEscAbsItem > SDRATTR_CAPTIONESCABS(SDRATTR_CAPTION_FIRST+7)
constexpr TypedWhichId< SdrCaptionEscDirItem > SDRATTR_CAPTIONESCDIR(SDRATTR_CAPTION_FIRST+4)
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
SdrCaptionEscDir
Definition: sxcecitm.hxx:28