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 
33 class SVXCORE_DLLPUBLIC SdrCaptionEscDirItem: public SfxEnumItem<SdrCaptionEscDir> {
34 public:
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 
50 public:
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 
69 public:
71  virtual ~SdrCaptionEscRelItem() override;
72  virtual SdrCaptionEscRelItem* Clone(SfxItemPool* pPool=nullptr) const override;
73 
74  SdrCaptionEscRelItem(SdrCaptionEscRelItem const &) = default;
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 
88 public:
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: */
virtual SdrCaptionEscAbsItem * Clone(SfxItemPool *) const override
Definition: sxcecitm.hxx:90
SdrCaptionEscDirItem(SdrCaptionEscDir eDir=SdrCaptionEscDir::Horizontal)
Definition: sxcecitm.hxx:35
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
SfxPoolItem & operator=(const SfxPoolItem &)=delete
SdrCaptionEscIsRelItem(bool bRel=true)
Definition: sxcecitm.hxx:51
SdrCaptionEscDir
Definition: sxcecitm.hxx:28
constexpr TypedWhichId< SdrCaptionEscDirItem > SDRATTR_CAPTIONESCDIR(SDRATTR_CAPTION_FIRST+4)
constexpr TypedWhichId< SdrCaptionEscRelItem > SDRATTR_CAPTIONESCREL(SDRATTR_CAPTION_FIRST+6)
virtual SdrYesNoItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: svdattr.cxx:728
SfxItemPresentation
constexpr TypedWhichId< SdrCaptionEscAbsItem > SDRATTR_CAPTIONESCABS(SDRATTR_CAPTION_FIRST+7)
virtual bool GetPresentation(SfxItemPresentation, MapUnit, MapUnit, OUString &rText, const IntlWrapper &) const override
SdrCaptionEscRelItem(long nEscRel=5000)
Definition: sxcecitm.hxx:70
SdrCaptionEscAbsItem(long nEscAbs=0)
Definition: sxcecitm.hxx:89
virtual SfxInt32Item * Clone(SfxItemPool *=nullptr) const override
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
virtual sal_uInt16 GetValueCount() const =0
MapUnit
constexpr TypedWhichId< SdrCaptionEscIsRelItem > SDRATTR_CAPTIONESCISREL(SDRATTR_CAPTION_FIRST+5)