Line data Source code
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 _SXCECITM_HXX
20 : #define _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 :
28 : enum SdrCaptionEscDir {SDRCAPT_ESCHORIZONTAL,SDRCAPT_ESCVERTICAL,SDRCAPT_ESCBESTFIT};
29 :
30 : //------------------------------
31 : // class SdrCaptionEscDirItem
32 : //------------------------------
33 1 : class SVX_DLLPUBLIC SdrCaptionEscDirItem: public SfxEnumItem {
34 : public:
35 : TYPEINFO();
36 1 : 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;
39 : virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
40 : virtual sal_uInt16 GetValueCount() const; // { return 3; }
41 0 : SdrCaptionEscDir GetValue() const { return (SdrCaptionEscDir)SfxEnumItem::GetValue(); }
42 :
43 : virtual rtl::OUString GetValueTextByPos(sal_uInt16 nPos) const;
44 :
45 : virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const;
46 : };
47 :
48 : //------------------------------------
49 : // class SdrCaptionEscIsRelItem
50 : // sal_True=Linienaustrittsposition relativ
51 : // sal_False=Linienaustrittsposition absolut
52 : //------------------------------------
53 0 : class SdrCaptionEscIsRelItem: public SdrYesNoItem {
54 : public:
55 0 : SdrCaptionEscIsRelItem(sal_Bool bRel=sal_True): SdrYesNoItem(SDRATTR_CAPTIONESCISREL,bRel) {}
56 : SdrCaptionEscIsRelItem(SvStream& rIn) : SdrYesNoItem(SDRATTR_CAPTIONESCISREL,rIn) {}
57 : };
58 :
59 : //------------------------------------
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
65 : //------------------------------------
66 0 : class SdrCaptionEscRelItem: public SfxInt32Item {
67 : public:
68 0 : SdrCaptionEscRelItem(long nEscRel=5000): SfxInt32Item(SDRATTR_CAPTIONESCREL,nEscRel) {}
69 : SdrCaptionEscRelItem(SvStream& rIn) : SfxInt32Item(SDRATTR_CAPTIONESCREL,rIn) {}
70 : };
71 :
72 : //------------------------------------
73 : // class SdrCaptionEscAbsItem
74 : // Absoluter Linienaustritt
75 : // 0 = oben bzw. links,
76 : // >0 = in Richtung rechts bzw. unten
77 : // nur wenn SdrCaptionEscIsRelItem=FALSE
78 : //------------------------------------
79 0 : class SdrCaptionEscAbsItem: public SdrMetricItem {
80 : public:
81 0 : SdrCaptionEscAbsItem(long nEscAbs=0): SdrMetricItem(SDRATTR_CAPTIONESCABS,nEscAbs) {}
82 : SdrCaptionEscAbsItem(SvStream& rIn) : SdrMetricItem(SDRATTR_CAPTIONESCABS,rIn) {}
83 : };
84 :
85 : #endif
86 :
87 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|