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 :
10 : #ifndef INCLUDED_SC_INC_ROWHEIGHTCONTEXT_HXX
11 : #define INCLUDED_SC_INC_ROWHEIGHTCONTEXT_HXX
12 :
13 : #include "scdllapi.h"
14 :
15 : #include <tools/fract.hxx>
16 :
17 : #include <vector>
18 :
19 : class OutputDevice;
20 :
21 : namespace sc {
22 :
23 : class SC_DLLPUBLIC RowHeightContext
24 : {
25 : std::vector<sal_uInt16> maHeights;
26 :
27 : double mfPPTX;
28 : double mfPPTY;
29 : Fraction maZoomX;
30 : Fraction maZoomY;
31 : OutputDevice* mpOutDev;
32 :
33 : sal_uInt16 mnExtraHeight;
34 : bool mbForceAutoSize; /// whether to set height to optimal even when the manual height flag is set.
35 :
36 : public:
37 : RowHeightContext(
38 : double fPPTX, double fPPTY, const Fraction& rZoomX, const Fraction& rZoomY,
39 : OutputDevice* pOutDev );
40 :
41 : ~RowHeightContext();
42 :
43 5212 : double getPPTX() const { return mfPPTX;}
44 7722 : double getPPTY() const { return mfPPTY;}
45 2510 : const Fraction& getZoomX() const { return maZoomX;}
46 2510 : const Fraction& getZoomY() const { return maZoomY;}
47 :
48 2510 : OutputDevice* getOutputDevice() { return mpOutDev;}
49 :
50 : void setExtraHeight( sal_uInt16 nH );
51 163586964 : sal_uInt16 getExtraHeight() const { return mnExtraHeight;}
52 :
53 : void setForceAutoSize( bool b );
54 3440 : bool isForceAutoSize() const { return mbForceAutoSize;}
55 :
56 : std::vector<sal_uInt16>& getHeightArray();
57 : };
58 :
59 : }
60 :
61 : #endif
62 :
63 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|