summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorheiko tietze <tietze.heiko@gmail.com>2018-10-12 10:56:58 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-10-12 13:33:29 +0200
commit4e4c8a71756da952686cdd682c6132413959dc21 (patch)
tree95adfb5c47f7914a628a382d940ed3e11e72d66f /sw/source
parent95b91bafa519e45177689e9459e621370a34a40b (diff)
tdf#118621 - Optionally disable floating header/footer menu
UNO command UseHeaderFooterMenu introduced Change-Id: I4be009e08bc66dc675c7c903552c6376e22639f1 Reviewed-on: https://gerrit.libreoffice.org/61706 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/view/viewsh.cxx12
-rw-r--r--sw/source/uibase/uiview/view0.cxx12
-rw-r--r--sw/source/uibase/uno/unomod.cxx5
3 files changed, 27 insertions, 2 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index e2e855394e3a..587b3bc6b07c 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -100,6 +100,18 @@ static bool bInSizeNotify = false;
using namespace ::com::sun::star;
+void SwViewShell::SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow ) {
+
+ //tdf#118621 - Optionally disable floating header/footer menu
+ if ( bShow )
+ bShow = GetViewOptions()->IsUseHeaderFooterMenu();
+
+ if ( eControl == Header )
+ mbShowHeaderSeparator = bShow;
+ else
+ mbShowFooterSeparator = bShow;
+}
+
void SwViewShell::ToggleHeaderFooterEdit()
{
mbHeaderFooterEdit = !mbHeaderFooterEdit;
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 592147febec9..a51e3c5cbd1c 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -325,7 +325,10 @@ void SwView::StateViewOptions(SfxItemSet &rSet)
break;
case FN_SHOW_INLINETOOLTIPS:
aBool.SetValue( pOpt->IsShowInlineTooltips() );
-
+ break;
+ case FN_USE_HEADERFOOTERMENU:
+ aBool.SetValue( pOpt->IsUseHeaderFooterMenu() );
+ break;
}
if( nWhich )
@@ -548,6 +551,13 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
pOpt->SetShowInlineTooltips( bFlag );
break;
+ case FN_USE_HEADERFOOTERMENU:
+ if( STATE_TOGGLE == eState )
+ bFlag = !pOpt->IsUseHeaderFooterMenu();
+
+ pOpt->SetUseHeaderFooterMenu( bFlag );
+ break;
+
default:
OSL_FAIL("wrong request method");
return;
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index 259c9728acce..00399ac9ca45 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -90,7 +90,8 @@ enum SwViewSettingsPropertyHandles
HANDLE_VIEWSET_VERT_RULER_METRIC,
HANDLE_VIEWSET_SCROLLBAR_TIPS,
HANDLE_VIEWSET_INLINECHANGES_TIPS,
- HANDLE_VIEWSET_HIDE_WHITESPACE
+ HANDLE_VIEWSET_HIDE_WHITESPACE,
+ HANDLE_VIEWSET_USE_HEADERFOOTERMENU,
};
enum SwPrintSettingsPropertyHandles
@@ -126,6 +127,7 @@ static ChainablePropertySetInfo * lcl_createViewSettingsInfo()
{ OUString( "IsVertRulerRightAligned"),HANDLE_VIEWSET_VRULER_RIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE},
{ OUString( "ShowContentTips" ), HANDLE_VIEWSET_SHOW_CONTENT_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
{ OUString( "ShowInlineTooltips" ), HANDLE_VIEWSET_INLINECHANGES_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
+ { OUString( "UseHeaderFooterMenu" ), HANDLE_VIEWSET_USE_HEADERFOOTERMENU , cppu::UnoType<bool>::get(), PROPERTY_NONE},
{ OUString( "RasterResolutionX"), HANDLE_VIEWSET_RASTER_RESOLUTION_X, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE},
{ OUString( "RasterResolutionY"), HANDLE_VIEWSET_RASTER_RESOLUTION_Y, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE},
{ OUString( "RasterSubdivisionX"), HANDLE_VIEWSET_RASTER_SUBDIVISION_X, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE},
@@ -594,6 +596,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
case HANDLE_VIEWSET_IS_SNAP_TO_RASTER : mpViewOption->SetSnap(*o3tl::doAccess<bool>(rValue)); break;
case HANDLE_VIEWSET_SCROLLBAR_TIPS : mpViewOption->SetShowScrollBarTips(*o3tl::doAccess<bool>(rValue)); break;
case HANDLE_VIEWSET_INLINECHANGES_TIPS : mpViewOption->SetShowInlineTooltips(*o3tl::doAccess<bool>(rValue)); break;
+ case HANDLE_VIEWSET_USE_HEADERFOOTERMENU : mpViewOption->SetUseHeaderFooterMenu(*o3tl::doAccess<bool>(rValue)); break;
case HANDLE_VIEWSET_RASTER_RESOLUTION_X :
{
sal_Int32 nTmp = 0;