Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / svx / sdtfsitm.hxx
blobed024c85754e43aa0306d10d0bae807cc17e89f9
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_SDTFSITM_HXX
20 #define INCLUDED_SVX_SDTFSITM_HXX
22 #include <svl/eitem.hxx>
23 #include <svx/svddef.hxx>
24 #include <svx/svxdllapi.h>
26 enum class SdrFitToSizeType
28 NONE, // - no fit-to-size
29 Proportional, // - resize all glyphs proportionally
30 // (might scale anisotrophically)
31 AllLines, // - like SdrFitToSizeType::Proportional, but
32 // scales each line separately
33 Autofit // - mimics PPT's automatic adaption of
34 // font size to text rect - comparable
35 // to SdrFitToSizeType::Proportional, but
36 // scales isotrophically
39 // No AutoGrow and no automatic line breaks for
40 // SdrFitToSizeType::Proportional and SdrFitToSizeType::AllLines.
41 // No automatic line breaks for AutoGrowingWidth as well (only if
42 // TextMaxFrameWidth is reached).
45 class SVX_DLLPUBLIC SdrTextFitToSizeTypeItem: public SfxEnumItem<SdrFitToSizeType> {
46 public:
47 static SfxPoolItem* CreateDefault();
48 SdrTextFitToSizeTypeItem(SdrFitToSizeType eFit=SdrFitToSizeType::NONE): SfxEnumItem(SDRATTR_TEXT_FITTOSIZE, eFit) {}
49 SdrTextFitToSizeTypeItem(SvStream& rIn) : SfxEnumItem(SDRATTR_TEXT_FITTOSIZE, rIn) {}
50 virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
51 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const override;
52 virtual sal_uInt16 GetValueCount() const override;
54 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
55 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
57 virtual OUString GetValueTextByPos(sal_uInt16 nPos) const override;
58 virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper * = nullptr) const override;
59 virtual bool HasBoolValue() const override;
60 virtual bool GetBoolValue() const override;
61 virtual void SetBoolValue(bool bVal) override;
64 #endif
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */