diff options
author | Ashod Nakashian <ashodnakashian@yahoo.com> | 2015-08-29 21:02:39 -0400 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-03 08:45:07 +0000 |
commit | 2b8e62f7b6e0a45a9ff1ec530b2e941f3fbcf1a0 (patch) | |
tree | 2536a965821cd4ce454b8b93b59fa9582b4fa94e /sw/inc/viewopt.hxx | |
parent | a1fd97308d7fc7a35a5def1e15a05099dba90f91 (diff) |
tdf#39080 Hide white space between pages in 'print layout'
Merged Hide Whitespace with Browser Mode and hooked
the former with the UI. In Hide Whitespace mode
the headers and footers are removed and
page margins as well as between-page gaps are
reduced to minimum.
In single-page view the side margins are left
as-is. In multi-page and book-view the sides
are removed, however, they have twice the
width of the top and bottom.
Printing and PDF export disable this mode.
The usable screen real-estate is greatly
improved in this mode, which is controlled
from the View menu.
Change-Id: I2d0075ae9a76162c26c78e9eb23a71920cdfc522
Reviewed-on: https://gerrit.libreoffice.org/17281
Reviewed-by: Jean-Baptiste Faure <jbfaure@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/inc/viewopt.hxx')
-rw-r--r-- | sw/inc/viewopt.hxx | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx index 4b9076bcf534..bb6e034a9475 100644 --- a/sw/inc/viewopt.hxx +++ b/sw/inc/viewopt.hxx @@ -130,18 +130,18 @@ class SW_DLLPUBLIC SwViewOption protected: static sal_uInt16 nPixelTwips;// 1 Pixel == ? Twips - OUString sSymbolFont; // Symbolfont. + OUString sSymbolFont; // Symbolfont. sal_uInt32 nCoreOptions; // Bits for SwViewShell. sal_uInt32 nCore2Options; // Bits for SwViewShell. sal_uInt32 nUIOptions; // UI-Bits Color aRetoucheColor; // DefaultBackground for BrowseView Size aSnapSize; // Describes horizontal and vertical snap. - sal_uInt16 mnViewLayoutColumns;// # columns for edit view + sal_uInt16 mnViewLayoutColumns;// # columns for edit view short nDivisionX; // Grid division. short nDivisionY; - sal_uInt8 nPagePrevRow; // Page Preview Row/Columns. - sal_uInt8 nPagePrevCol; // Page Preview Row/Columns. - sal_uInt8 nShdwCrsrFillMode; // FillMode for ShadowCrsr. + sal_uInt8 nPagePrevRow; // Page Preview Row/Columns. + sal_uInt8 nPagePrevCol; // Page Preview Row/Columns. + sal_uInt8 nShdwCrsrFillMode; // FillMode for ShadowCrsr. bool bReadonly : 1; // Readonly-Doc. bool bStarOneSetting : 1;// Prevent from UI automatics (no scrollbars in readonly documents). bool bIsPagePreview : 1; // The preview mustn't print field/footnote/... shadings. @@ -151,7 +151,7 @@ protected: bool mbBookView : 1; // View mode for page preview. bool mbViewLayoutBookMode : 1; // Book view mode for edit view. bool mbHideWhitespaceMode : 1; // Hide header, footer, and pagebreak. - bool bShowPlaceHolderFields : 1; // Only used in printing! + bool bShowPlaceHolderFields : 1; // Only used in printing! mutable bool bIdle; // Scale @@ -371,6 +371,16 @@ public: inline short GetDivisionY() const { return nDivisionY; } inline void SetDivisionY( short n ){ nDivisionY = n; } + // Default margin left and above document: 284 twips == 5.0 mm. + static SAL_CONSTEXPR sal_uInt16 GetDefDocumentBorder() { return 284; } + // Default gap between pages: 284 twips == 5.0 mm. + static SAL_CONSTEXPR sal_uInt16 GetDefGapBetweenPages() { return 284; } + // Minimum edge-to-text distance: 114 twips == 2.0 mm. + static SAL_CONSTEXPR sal_uInt16 GetMinGapBetweenPages() { return 114; } + + inline sal_uInt16 GetDocumentBorder() const { return IsHideWhitespaceMode() ? GetMinGapBetweenPages() : GetDefDocumentBorder(); } + inline sal_uInt16 GetGapBetweenPages() const { return IsHideWhitespaceMode() ? GetMinGapBetweenPages() : GetDefGapBetweenPages(); } + inline sal_uInt8 GetPagePrevRow() const { return nPagePrevRow; } inline void SetPagePrevRow( sal_uInt8 n ) { nPagePrevRow = n; } inline sal_uInt8 GetPagePrevCol() const { return nPagePrevCol; } @@ -398,6 +408,9 @@ public: bool IsHideWhitespaceMode() const { return mbHideWhitespaceMode; } void SetHideWhitespaceMode( bool bMode ) { mbHideWhitespaceMode = bMode; } + bool IsMultipageView() const { return IsViewLayoutBookMode() || + GetViewLayoutColumns() == 0; } + #ifdef DBG_UTIL // Correspond to statements in ui/config/cfgvw.src. inline bool IsTest1() const { return m_bTest1; } |