diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-07 16:44:47 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-07 16:44:47 +0100 |
commit | 04c7d5013b9b87709b913e26190fb347a4916566 (patch) | |
tree | 9e7f08da39d977c19d4c02cd02c864db8e0a5fec /sw/inc/viewopt.hxx | |
parent | 761f7b584ee4ba4d34e983733d49357a4b8c15be (diff) |
Replace some constexpr functions with static data members
(I leave the DOCUMENTBORDER TODO alone, as that one is of type long while
defDocumentBorder is of type sal_uInt16, so cleaning that up likely is a little
more effort.)
Change-Id: Ie9972e2f38b0ca9812e09f1c9d9fbded1046fda0
Diffstat (limited to 'sw/inc/viewopt.hxx')
-rw-r--r-- | sw/inc/viewopt.hxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx index b44dd1d8a479..1bb138a889f5 100644 --- a/sw/inc/viewopt.hxx +++ b/sw/inc/viewopt.hxx @@ -377,14 +377,14 @@ public: void SetDivisionY( short n ){ m_nDivisionY = n; } // Default margin left and above document: 284 twips == 5.0 mm. - static constexpr sal_uInt16 GetDefDocumentBorder() { return 284; } + static constexpr sal_uInt16 defDocumentBorder = 284; // Default gap between pages: 284 twips == 5.0 mm. - static constexpr sal_uInt16 GetDefGapBetweenPages() { return 284; } + static constexpr sal_uInt16 defGapBetweenPages = 284; // Minimum edge-to-text distance: 22 twips == 0.4 mm. - static constexpr sal_uInt16 GetMinGapBetweenPages() { return 22; } + static constexpr sal_uInt16 minGapBetweenPages = 22; - sal_uInt16 GetDocumentBorder() const { return IsWhitespaceHidden() ? GetMinGapBetweenPages() : GetDefDocumentBorder(); } - sal_uInt16 GetGapBetweenPages() const { return IsWhitespaceHidden() ? GetMinGapBetweenPages() : GetDefGapBetweenPages(); } + sal_uInt16 GetDocumentBorder() const { return IsWhitespaceHidden() ? minGapBetweenPages : defDocumentBorder; } + sal_uInt16 GetGapBetweenPages() const { return IsWhitespaceHidden() ? minGapBetweenPages : defGapBetweenPages; } sal_uInt8 GetPagePrevRow() const { return m_nPagePreviewRow; } void SetPagePrevRow( sal_uInt8 n ) { m_nPagePreviewRow = n; } |