summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-03 10:53:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-03 12:16:38 +0200
commit77e9216ca1073caa0dcec23ef89808cc7f80fc06 (patch)
tree71ea2c3841f1a1017123dec44552239d74fd7a4a /vcl
parent81903d443116c643a9ff92d92c092812abc7f57d (diff)
loplugin:unusedfields
and filter out the weld fields, since we're not touching them yet Change-Id: I3cc23c46d2650f13cb29c7d381687939d23e2882 Reviewed-on: https://gerrit.libreoffice.org/80104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/svdata.hxx4
-rw-r--r--vcl/inc/unx/gtk/gtkframe.hxx3
-rw-r--r--vcl/inc/unx/salframe.h1
-rw-r--r--vcl/source/app/settings.cxx15
-rw-r--r--vcl/source/window/dialog.cxx2
-rw-r--r--vcl/source/window/layout.cxx24
-rw-r--r--vcl/source/window/menu.cxx7
-rw-r--r--vcl/source/window/menubarwindow.cxx18
-rw-r--r--vcl/source/window/toolbox.cxx16
-rw-r--r--vcl/unx/generic/window/salframe.cxx3
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx4
11 files changed, 8 insertions, 89 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 0e6fde80a6f4..33e5778f7f42 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -266,17 +266,13 @@ struct ImplSVNWFData
int mnStatusBarLowerRightOffset = 0; // amount in pixel to avoid in the lower righthand corner
int mnMenuFormatBorderX = 0; // horizontal inner popup menu border
int mnMenuFormatBorderY = 0; // vertical inner popup menu border
- int mnMenuSeparatorBorderX = 0; // gap at each side of separator
::Color maMenuBarHighlightTextColor = COL_TRANSPARENT; // override highlight text color
// in menubar if not transparent
bool mbMenuBarDockingAreaCommonBG = false; // e.g. WinXP default theme
bool mbDockingAreaSeparateTB = false; // individual toolbar backgrounds
// instead of one for docking area
bool mbDockingAreaAvoidTBFrames = false; ///< don't draw frames around the individual toolbars if mbDockingAreaSeparateTB is false
- bool mbToolboxDropDownSeparate = false; // two adjacent buttons for
- // toolbox dropdown buttons
bool mbFlatMenu = false; // no popup 3D border
- bool mbOpenMenuOnF10 = false; // on gnome the first menu opens on F10
bool mbNoFocusRects = false; // on Aqua/Gtk3 use native focus rendering, except for flat buttons
bool mbNoFocusRectsForFlatButtons = false; // on Gtk3 native focusing is also preferred for flat buttons
bool mbCenteredTabs = false; // on Aqua, tabs are centered
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index fc4831a23092..a8aa8a443e2a 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -183,13 +183,10 @@ class GtkSalFrame : public SalFrame
GdkCursor *m_pCurrentCursor;
PointerStyle m_ePointerStyle;
ScreenSaverInhibitor m_ScreenSaverInhibitor;
- int m_nWorkArea;
bool m_bFullscreen;
bool m_bSpanMonitorsWhenFullscreen;
bool m_bDefaultPos;
bool m_bDefaultSize;
- bool m_bWindowIsGtkPlug;
- OUString m_aTitle;
OUString m_sWMClass;
std::unique_ptr<IMHandler> m_pIMHandler;
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index a913fc6165b0..c511097d0c57 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -96,7 +96,6 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame final : public SalFrame, public NativeWindo
bool bAlwaysOnTop_;
bool bViewable_;
bool bMapped_;
- bool mbInShow;
bool bDefaultPosition_; // client is centered initially
bool m_bXEmbed;
int nVisibility_;
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 74bb8fcd5219..fdd524e06f20 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -182,7 +182,6 @@ struct ImplStyleData
//primary means scroll by single page. Secondary button takes the alternative behaviour
bool mbPrimaryButtonWarpsSlider;
DialogStyle maDialogStyle;
- FrameStyle maFrameStyle;
sal_uInt16 mnEdgeBlending;
Color maEdgeBlendingTopLeftColor;
@@ -575,7 +574,6 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
meContextMenuShortcuts(rData.meContextMenuShortcuts),
mbPrimaryButtonWarpsSlider(rData.mbPrimaryButtonWarpsSlider),
maDialogStyle( rData.maDialogStyle ),
- maFrameStyle( rData.maFrameStyle ),
mnEdgeBlending(rData.mnEdgeBlending),
maEdgeBlendingTopLeftColor(rData.maEdgeBlendingTopLeftColor),
maEdgeBlendingBottomRightColor(rData.maEdgeBlendingBottomRightColor),
@@ -1883,19 +1881,6 @@ StyleSettings::SetDialogStyle( const DialogStyle& rStyle )
mxData->maDialogStyle = rStyle;
}
-const FrameStyle&
-StyleSettings::GetFrameStyle() const
-{
- return mxData->maFrameStyle;
-}
-
-void
-StyleSettings::SetFrameStyle( const FrameStyle& rStyle )
-{
- CopyData();
- mxData->maFrameStyle = rStyle;
-}
-
void
StyleSettings::SetEdgeBlending(sal_uInt16 nCount)
{
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 080b64416e01..5acc2bb8e757 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -610,8 +610,6 @@ void Dialog::settingOptimalLayoutSize(Window *pBox)
GetSettings().GetStyleSettings().GetDialogStyle();
VclBox * pBox2 = static_cast<VclBox*>(pBox);
pBox2->set_border_width(rDialogStyle.content_area_border);
- pBox2->set_spacing(pBox2->get_spacing() +
- rDialogStyle.content_area_spacing);
}
Dialog::~Dialog()
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index d0c155d1a4d4..2599b4278664 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1528,11 +1528,6 @@ Size VclFrame::calculateRequisition() const
aRet.setWidth( std::max(aLabelSize.Width(), aRet.Width()) );
}
- const FrameStyle &rFrameStyle =
- GetSettings().GetStyleSettings().GetFrameStyle();
- aRet.AdjustWidth(rFrameStyle.left + rFrameStyle.right );
- aRet.AdjustHeight(rFrameStyle.top + rFrameStyle.bottom );
-
return aRet;
}
@@ -1540,11 +1535,8 @@ void VclFrame::setAllocation(const Size &rAllocation)
{
//SetBackground( Color(0xFF, 0x00, 0xFF) );
- const FrameStyle &rFrameStyle =
- GetSettings().GetStyleSettings().GetFrameStyle();
- Size aAllocation(rAllocation.Width() - rFrameStyle.left - rFrameStyle.right,
- rAllocation.Height() - rFrameStyle.top - rFrameStyle.bottom);
- Point aChildPos(rFrameStyle.left, rFrameStyle.top);
+ Size aAllocation(rAllocation);
+ Point aChildPos;
vcl::Window *pChild = get_child();
vcl::Window *pLabel = get_label_widget();
@@ -1732,21 +1724,13 @@ Size VclExpander::calculateRequisition() const
aRet.AdjustHeight(aExpanderSize.Height() );
aRet.setWidth( std::max(aExpanderSize.Width(), aRet.Width()) );
- const FrameStyle &rFrameStyle =
- GetSettings().GetStyleSettings().GetFrameStyle();
- aRet.AdjustWidth(rFrameStyle.left + rFrameStyle.right );
- aRet.AdjustHeight(rFrameStyle.top + rFrameStyle.bottom );
-
return aRet;
}
void VclExpander::setAllocation(const Size &rAllocation)
{
- const FrameStyle &rFrameStyle =
- GetSettings().GetStyleSettings().GetFrameStyle();
- Size aAllocation(rAllocation.Width() - rFrameStyle.left - rFrameStyle.right,
- rAllocation.Height() - rFrameStyle.top - rFrameStyle.bottom);
- Point aChildPos(rFrameStyle.left, rFrameStyle.top);
+ Size aAllocation(rAllocation);
+ Point aChildPos;
WindowImpl* pWindowImpl = ImplGetWindowImpl();
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 71465b16bf26..c1502e891a84 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1812,12 +1812,9 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, Size const & rSize,
nState |= ControlState::ENABLED;
if (bHighlighted)
nState |= ControlState::SELECTED;
- int nSepPad = ImplGetSVData()->maNWFData.mnMenuSeparatorBorderX;
- Point aMpos (aPos);
- aMpos.AdjustX(nSepPad );
Size aSz(pData->aSz);
- aSz.setWidth( aOutSz.Width() - 2*nOuterSpaceX - 2 * nSepPad );
- tools::Rectangle aItemRect(aMpos, aSz);
+ aSz.setWidth( aOutSz.Width() - 2*nOuterSpaceX );
+ tools::Rectangle aItemRect(aPos, aSz);
MenupopupValue aVal(nTextPos - GUTTERBORDER, aItemRect);
bNativeOk = rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Separator,
aItemRect, nState, aVal, OUString());
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 040385d5cf9b..106c949fc0df 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -750,7 +750,7 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
if ( nCode == KEY_MENU && !rKEvent.GetKeyCode().IsShift() ) // only F10, not Shift-F10
{
- mbAutoPopup = ImplGetSVData()->maNWFData.mbOpenMenuOnF10;
+ mbAutoPopup = false;
if ( m_nHighlightedItem == ITEMPOS_INVALID )
{
ChangeHighlightItem( 0, false );
@@ -777,17 +777,6 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
n = m_pMenu->GetItemCount()-1;
}
- // handling gtk like (aka mbOpenMenuOnF10)
- // do not highlight an item when opening a sub menu
- // unless there already was a highlighted sub menu item
- bool bWasHighlight = false;
- if( m_pActivePopup )
- {
- MenuFloatingWindow* pSubWindow = dynamic_cast<MenuFloatingWindow*>(m_pActivePopup->ImplGetWindow());
- if( pSubWindow )
- bWasHighlight = (pSubWindow->GetHighlightedItem() != ITEMPOS_INVALID);
- }
-
sal_uInt16 nLoop = n;
if( nCode == KEY_HOME )
@@ -816,10 +805,7 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
m_pMenu->ImplIsVisible(n) &&
!m_pMenu->ImplCurrentlyHiddenOnGUI(n))
{
- bool bDoSelect = true;
- if( ImplGetSVData()->maNWFData.mbOpenMenuOnF10 )
- bDoSelect = bWasHighlight;
- ChangeHighlightItem( n, bDoSelect );
+ ChangeHighlightItem( n, true );
break;
}
} while ( n != nLoop );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 267d2389e18a..82640c566927 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2578,22 +2578,6 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
// Compute buttons area.
Size aBtnSize = pItem->maRect.GetSize();
- if( ImplGetSVData()->maNWFData.mbToolboxDropDownSeparate )
- {
- // separate button not for dropdown only where the whole button is painted
- // exception: when text position is set to bottom then we want to calculate rect for dropdown only button
- if ( ( pItem->mnBits & ToolBoxItemBits::DROPDOWN &&
- ((pItem->mnBits & ToolBoxItemBits::DROPDOWNONLY) != ToolBoxItemBits::DROPDOWNONLY) )
- || ( ( pItem->mnBits & ToolBoxItemBits::DROPDOWN) && ( meTextPosition == ToolBoxTextPosition::Bottom ) ) )
- {
- tools::Rectangle aArrowRect = pItem->GetDropDownRect( mbHorz );
- if( aArrowRect.Top() == pItem->maRect.Top() ) // dropdown arrow on right side
- aBtnSize.AdjustWidth( -(aArrowRect.GetWidth()) );
- else if ( !( (meTextPosition == ToolBoxTextPosition::Bottom)
- && ((pItem->mnBits & ToolBoxItemBits::DROPDOWNONLY) == ToolBoxItemBits::DROPDOWNONLY) ) )
- aBtnSize.AdjustHeight( -(aArrowRect.GetHeight()) ); // dropdown arrow on bottom side
- }
- }
/* Compute the button/separator rectangle here, we'll need it for
* both the buttons and the separators. */
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index f5a3d872f7a5..ed2a3bb2c3bb 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -849,7 +849,6 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle,
bDefaultPosition_ = true;
nVisibility_ = VisibilityFullyObscured;
m_nWorkArea = 0;
- mbInShow = false;
m_bXEmbed = false;
@@ -1171,7 +1170,6 @@ void X11SalFrame::Show( bool bVisible, bool bNoActivate )
setXEmbedInfo();
if( bVisible )
{
- mbInShow = true;
if( ! (nStyle_ & SalFrameStyleFlags::INTRO) )
{
// hide all INTRO frames
@@ -3937,7 +3935,6 @@ bool X11SalFrame::Dispatch( XEvent *pEvent )
}
RestackChildren();
- mbInShow = false;
m_bSetFocusOnMap = false;
}
break;
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index e18ea40cd789..25badaec34d3 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -473,7 +473,6 @@ GtkSalFrame::GtkSalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle )
getDisplay()->registerFrame( this );
m_bDefaultPos = true;
m_bDefaultSize = ( (nStyle & SalFrameStyleFlags::SIZEABLE) && ! pParent );
- m_bWindowIsGtkPlug = false;
Init( pParent, nStyle );
}
@@ -1176,7 +1175,6 @@ void GtkSalFrame::Init( SystemParentData* pSysData )
if( pSysData->nSize > sizeof(pSysData->nSize)+sizeof(pSysData->aWindow) && pSysData->bXEmbedSupport )
{
m_pWindow = gtk_plug_new_for_display( getGdkDisplay(), pSysData->aWindow );
- m_bWindowIsGtkPlug = true;
widget_set_can_default( m_pWindow, true );
widget_set_can_focus( m_pWindow, true );
gtk_widget_set_sensitive( m_pWindow, true );
@@ -1184,7 +1182,6 @@ void GtkSalFrame::Init( SystemParentData* pSysData )
else
{
m_pWindow = gtk_window_new( GTK_WINDOW_POPUP );
- m_bWindowIsGtkPlug = false;
}
m_nStyle = SalFrameStyleFlags::PLUG;
InitCommon();
@@ -1233,7 +1230,6 @@ bool GtkSalFrame::PostEvent(std::unique_ptr<ImplSVEvent> pData)
void GtkSalFrame::SetTitle( const OUString& rTitle )
{
- m_aTitle = rTitle;
if( m_pWindow && ! isChild() )
{
OString sTitle(OUStringToOString(rTitle, RTL_TEXTENCODING_UTF8));