1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 SdrCaptionEscDir
{SDRCAPT_ESCHORIZONTAL
,SDRCAPT_ESCVERTICAL
,SDRCAPT_ESCBESTFIT
};
31 // class SdrCaptionEscDirItem
33 class SVX_DLLPUBLIC SdrCaptionEscDirItem
: public SfxEnumItem
{
36 SdrCaptionEscDirItem(SdrCaptionEscDir eDir
=SDRCAPT_ESCHORIZONTAL
): SfxEnumItem(SDRATTR_CAPTIONESCDIR
,sal::static_int_cast
< sal_uInt16
>(eDir
)) {}
37 SdrCaptionEscDirItem(SvStream
& rIn
) : SfxEnumItem(SDRATTR_CAPTIONESCDIR
,rIn
) {}
38 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
=NULL
) const SAL_OVERRIDE
;
39 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVer
) const SAL_OVERRIDE
;
40 virtual sal_uInt16
GetValueCount() const SAL_OVERRIDE
; // { return 3; }
41 SdrCaptionEscDir
GetValue() const { return (SdrCaptionEscDir
)SfxEnumItem::GetValue(); }
43 virtual OUString
GetValueTextByPos(sal_uInt16 nPos
) const SAL_OVERRIDE
;
45 virtual bool GetPresentation(SfxItemPresentation ePres
, SfxMapUnit eCoreMetric
, SfxMapUnit ePresMetric
, OUString
& rText
, const IntlWrapper
* = 0) const SAL_OVERRIDE
;
49 // class SdrCaptionEscIsRelItem
50 // sal_True=Linienaustrittsposition relativ
51 // sal_False=Linienaustrittsposition absolut
53 class SdrCaptionEscIsRelItem
: public SdrYesNoItem
{
55 SdrCaptionEscIsRelItem(bool bRel
=true): SdrYesNoItem(SDRATTR_CAPTIONESCISREL
,bRel
) {}
56 SdrCaptionEscIsRelItem(SvStream
& rIn
) : SdrYesNoItem(SDRATTR_CAPTIONESCISREL
,rIn
) {}
60 // class SdrCaptionEscRelItem
61 // Relativer Linienaustritt
62 // 0 = 0.00% = oben bzw. links,
63 // 10000 = 100.00% = rechts bzw. unten
64 // nur wenn SdrCaptionEscIsRelItem=TRUE
66 class SdrCaptionEscRelItem
: public SfxInt32Item
{
68 SdrCaptionEscRelItem(long nEscRel
=5000): SfxInt32Item(SDRATTR_CAPTIONESCREL
,nEscRel
) {}
69 SdrCaptionEscRelItem(SvStream
& rIn
) : SfxInt32Item(SDRATTR_CAPTIONESCREL
,rIn
) {}
73 // class SdrCaptionEscAbsItem
74 // Absoluter Linienaustritt
75 // 0 = oben bzw. links,
76 // >0 = in Richtung rechts bzw. unten
77 // nur wenn SdrCaptionEscIsRelItem=FALSE
79 class SdrCaptionEscAbsItem
: public SdrMetricItem
{
81 SdrCaptionEscAbsItem(long nEscAbs
=0): SdrMetricItem(SDRATTR_CAPTIONESCABS
,nEscAbs
) {}
82 SdrCaptionEscAbsItem(SvStream
& rIn
) : SdrMetricItem(SDRATTR_CAPTIONESCABS
,rIn
) {}
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */