summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-12-29 13:42:43 +0100
committerJan Holesovsky <kendy@suse.cz>2011-12-29 13:47:05 +0100
commitcce76e658af88813e17dea4f04388a29d7e582df (patch)
treedfb1b2ef931c4aaf1c363f278c4beda509fc66eb /sw/inc
parent64e08fd3c5980b74bb958dc566c229d92db18726 (diff)
Header/Footer: When editing, show only the appropriate conrol.
Instead of showing both the header and footer controls, show only the footer-related if in footer, or header-related if in header.
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/viewsh.hxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index fd4a3d67edbe..85b17a400ca5 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -92,6 +92,12 @@ namespace vcl
class OldStylePrintAdaptor;
}
+enum FrameControlType
+{
+ PageBreak,
+ Header,
+ Footer
+};
// Define for flags needed in ctor or layers below.
// Currently the PreView flag is needed for DrawPage.
@@ -156,9 +162,10 @@ class SW_DLLPUBLIC ViewShell : public Ring
sal_Bool bEnableSmooth :1; // Disable SmoothScroll, e.g. for drag
// of scrollbars.
sal_Bool bEndActionByVirDev:1; // Paints from EndAction always via virtual device
- bool bShowHeaderFooterSeparator:1;
- bool bHeaderFooterEdit:1;
// (e.g. when browsing).
+ bool bShowHeaderSeparator:1; //< Flag to say that we are showing the header control
+ bool bShowFooterSeparator:1; //< Flag to say that we are showing the footer control
+ bool bHeaderFooterEdit:1; //< Flag to say that we are editing header or footer (according to the bShow(Header|Footer)Separator above)
// boolean, indicating that class in in constructor.
bool mbInConstructor:1;
@@ -565,10 +572,12 @@ public:
const SwPostItMgr* GetPostItMgr() const { return (const_cast<ViewShell*>(this))->GetPostItMgr(); }
SwPostItMgr* GetPostItMgr();
- void ToggleHeaderFooterEdit( );
+ /// Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags
+ void ToggleHeaderFooterEdit();
+ /// Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags
bool IsHeaderFooterEdit() const { return bHeaderFooterEdit; }
- bool IsShowHeaderFooterSeparator() { return bShowHeaderFooterSeparator; }
- virtual void SetShowHeaderFooterSeparator( bool bShow ) { bShowHeaderFooterSeparator = bShow; }
+ bool IsShowHeaderFooterSeparator( FrameControlType eControl ) { return (eControl == Header)? bShowHeaderSeparator: bShowFooterSeparator; }
+ virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow ) { if ( eControl == Header ) bShowHeaderSeparator = bShow; else bShowFooterSeparator = bShow; }
};
//---- class CurrShell manages global ShellPointer -------------------