loplugin:singlevalfields
Change-Id: Idfc08ff0ca967f0400ce316925a92839fe2981af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191621 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -184,7 +184,6 @@ public:
|
||||
|
||||
protected:
|
||||
PushButtonDropdownStyle mnDDStyle;
|
||||
bool mbIsActive;
|
||||
|
||||
SAL_DLLPRIVATE void ImplInitPushButtonData();
|
||||
SAL_DLLPRIVATE static WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
|
||||
|
||||
@@ -32,7 +32,6 @@ public:
|
||||
/** Options to change how the traverser is traversing the tree, what is included and what not */
|
||||
struct TraverserOptions
|
||||
{
|
||||
bool mbPages = true;
|
||||
bool mbMasterPages = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -20,8 +20,7 @@ void ModelTraverser::traverse()
|
||||
if (!m_pDocument)
|
||||
return;
|
||||
|
||||
if (m_aTraverserOptions.mbPages)
|
||||
traversePages();
|
||||
traversePages();
|
||||
|
||||
if (m_aTraverserOptions.mbMasterPages)
|
||||
traverseMasterPages();
|
||||
|
||||
@@ -683,7 +683,7 @@ std::unordered_set<OUString> PowerPointExport::getUsedFontList()
|
||||
return aReturnSet;
|
||||
|
||||
auto pCollector = std::make_shared<FontNameCollector>(aReturnSet, mbEmbedLatinScript, mbEmbedAsianScript, mbEmbedComplexScript);
|
||||
sd::ModelTraverser aModelTraverser(pDocument, { .mbPages = true, .mbMasterPages = true });
|
||||
sd::ModelTraverser aModelTraverser(pDocument, { .mbMasterPages = true });
|
||||
aModelTraverser.addNodeHandler(pCollector);
|
||||
aModelTraverser.traverse();
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@ struct RenderState
|
||||
std::vector<drawinglayer::primitive2d::Primitive2DReference> maPrimitivesToUnhide;
|
||||
|
||||
SdrObject* mpCurrentTarget = nullptr;
|
||||
sal_Int32 mnCurrentTargetParagraph = -1;
|
||||
|
||||
bool mbShowMasterPageObjects = false;
|
||||
bool mbFooterEnabled = false;
|
||||
|
||||
@@ -95,7 +95,7 @@ void GraphicSizeCheck::check()
|
||||
|
||||
auto pHandler = std::make_shared<GraphicSizeCheckHandler>(nDPI, m_aGraphicSizeViolationList);
|
||||
|
||||
ModelTraverser aModelTraverser(m_pDocument, { .mbPages = true, .mbMasterPages = false });
|
||||
ModelTraverser aModelTraverser(m_pDocument, { .mbMasterPages = false });
|
||||
aModelTraverser.addNodeHandler(pHandler);
|
||||
aModelTraverser.traverse();
|
||||
}
|
||||
|
||||
@@ -10624,8 +10624,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, const FSHelperPtr
|
||||
m_bParaAfterAutoSpacing(false),
|
||||
m_nParaBeforeSpacing(0),
|
||||
m_nParaAfterSpacing(0),
|
||||
m_bParaInlineHeading(false)
|
||||
, m_nStateOfFlyFrame( FLY_NOT_PROCESSED )
|
||||
m_nStateOfFlyFrame( FLY_NOT_PROCESSED )
|
||||
{
|
||||
m_nHyperLinkCount.push_back(0);
|
||||
}
|
||||
|
||||
@@ -1082,8 +1082,6 @@ private:
|
||||
bool m_bParaBeforeAutoSpacing,m_bParaAfterAutoSpacing;
|
||||
// store hardcoded value which was set during import.
|
||||
sal_Int32 m_nParaBeforeSpacing,m_nParaAfterSpacing;
|
||||
// flag inline heading
|
||||
bool m_bParaInlineHeading;
|
||||
|
||||
SdtBlockHelper m_aParagraphSdt;
|
||||
SdtBlockHelper m_aRunSdt;
|
||||
|
||||
@@ -654,7 +654,6 @@ void PushButton::ImplInitPushButtonData()
|
||||
meSymbol = SymbolType::DONTKNOW;
|
||||
meState = TRISTATE_FALSE;
|
||||
mnDDStyle = PushButtonDropdownStyle::NONE;
|
||||
mbIsActive = false;
|
||||
mbPressed = false;
|
||||
mbIsAction = false;
|
||||
}
|
||||
@@ -980,7 +979,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
|
||||
bool bNativeOK = false;
|
||||
|
||||
// adjust style if button should be rendered 'pressed'
|
||||
if (mbPressed || mbIsActive)
|
||||
if (mbPressed)
|
||||
nButtonStyle |= DrawButtonFlags::Pressed;
|
||||
|
||||
if (GetStyle() & WB_FLATBUTTON)
|
||||
@@ -1036,7 +1035,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
|
||||
ImplControlValue aControlValue;
|
||||
ControlState nState = ControlState::NONE;
|
||||
|
||||
if (mbPressed || mbIsActive)
|
||||
if (mbPressed)
|
||||
nState |= ControlState::PRESSED;
|
||||
if (GetButtonState() & DrawButtonFlags::Pressed)
|
||||
nState |= ControlState::PRESSED;
|
||||
@@ -1050,12 +1049,6 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
|
||||
if (IsMouseOver() && aInRect.Contains(GetPointerPosPixel()))
|
||||
nState |= ControlState::ROLLOVER;
|
||||
|
||||
if ( IsMouseOver() && aInRect.Contains(GetPointerPosPixel()) && mbIsActive)
|
||||
{
|
||||
nState |= ControlState::ROLLOVER;
|
||||
nButtonStyle &= ~DrawButtonFlags::Pressed;
|
||||
}
|
||||
|
||||
bNativeOK = rRenderContext.DrawNativeControl(aCtrlType, ControlPart::ButtonDown, aInRect, nState,
|
||||
aControlValue, OUString());
|
||||
}
|
||||
@@ -1078,7 +1071,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
|
||||
tools::Rectangle aCtrlRegion(aInRect);
|
||||
ControlState nState = ControlState::NONE;
|
||||
|
||||
if (mbPressed || IsChecked() || mbIsActive)
|
||||
if (mbPressed || IsChecked())
|
||||
{
|
||||
nState |= ControlState::PRESSED;
|
||||
nButtonStyle |= DrawButtonFlags::Pressed;
|
||||
@@ -1092,18 +1085,12 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
|
||||
if (Window::IsEnabled())
|
||||
nState |= ControlState::ENABLED;
|
||||
|
||||
if (bRollOver || mbIsActive)
|
||||
if (bRollOver)
|
||||
{
|
||||
nButtonStyle |= DrawButtonFlags::Highlight;
|
||||
nState |= ControlState::ROLLOVER;
|
||||
}
|
||||
|
||||
if (mbIsActive && bRollOver)
|
||||
{
|
||||
nState &= ~ControlState::PRESSED;
|
||||
nButtonStyle &= ~DrawButtonFlags::Pressed;
|
||||
}
|
||||
|
||||
if (GetStyle() & WB_FLATBUTTON)
|
||||
aControlValue.m_bFlatButton = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user