Bump version to 6.4-15
[LibreOffice.git] / include / svx / sxcecitm.hxx
blobd3617f94bbd6f1d2a08fc9de9bb0fd50fa63e142
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SVX_SXCECITM_HXX
20 #define INCLUDED_SVX_SXCECITM_HXX
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>
28 enum class SdrCaptionEscDir { Horizontal, Vertical, BestFit };
31 // class SdrCaptionEscDirItem
33 class SVX_DLLPUBLIC SdrCaptionEscDirItem: public SfxEnumItem<SdrCaptionEscDir> {
34 public:
35 SdrCaptionEscDirItem(SdrCaptionEscDir eDir=SdrCaptionEscDir::Horizontal): SfxEnumItem(SDRATTR_CAPTIONESCDIR, eDir) {}
36 virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
37 virtual sal_uInt16 GetValueCount() const override; // { return 3; }
39 static OUString GetValueTextByPos(sal_uInt16 nPos);
41 virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
45 // class SdrCaptionEscIsRelItem
46 // sal_True = line escape position is relative
47 // sal_False = line escape position is absolute
49 class SVX_DLLPUBLIC SdrCaptionEscIsRelItem: public SdrYesNoItem {
50 public:
51 SdrCaptionEscIsRelItem(bool bRel=true): SdrYesNoItem(SDRATTR_CAPTIONESCISREL,bRel) {}
52 virtual ~SdrCaptionEscIsRelItem() override;
53 virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
55 SdrCaptionEscIsRelItem(SdrCaptionEscIsRelItem const &) = default;
56 SdrCaptionEscIsRelItem(SdrCaptionEscIsRelItem &&) = default;
57 SdrCaptionEscIsRelItem & operator =(SdrCaptionEscIsRelItem const &) = delete; // due to SdrYesNoItem
58 SdrCaptionEscIsRelItem & operator =(SdrCaptionEscIsRelItem &&) = delete; // due to SdrYesNoItem
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
68 class SVX_DLLPUBLIC SdrCaptionEscRelItem: public SfxInt32Item {
69 public:
70 SdrCaptionEscRelItem(long nEscRel=5000): SfxInt32Item(SDRATTR_CAPTIONESCREL,nEscRel) {}
71 virtual ~SdrCaptionEscRelItem() override;
72 virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
74 SdrCaptionEscRelItem(SdrCaptionEscRelItem const &) = default;
75 SdrCaptionEscRelItem(SdrCaptionEscRelItem &&) = default;
76 SdrCaptionEscRelItem & operator =(SdrCaptionEscRelItem const &) = delete; // due to SfxInt32Item
77 SdrCaptionEscRelItem & operator =(SdrCaptionEscRelItem &&) = delete; // due to SfxInt32Item
81 // class SdrCaptionEscAbsItem
82 // absolute line escape
83 // 0 = up resp. left,
84 // >0 = in direction right resp. down
85 // only when SdrCaptionEscIsRelItem=FALSE
87 class SdrCaptionEscAbsItem: public SdrMetricItem {
88 public:
89 SdrCaptionEscAbsItem(long nEscAbs=0): SdrMetricItem(SDRATTR_CAPTIONESCABS,nEscAbs) {}
90 virtual SfxPoolItem* Clone(SfxItemPool*) const override
92 return new SdrCaptionEscAbsItem(*this);
96 #endif
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */