Kaydet (Commit) 5a616ca9 authored tarafından Michael Stahl's avatar Michael Stahl

sc: loplugin:badstatics: _one_ global pActiveEdWnd is enough

Change-Id: Idb0eacc8c14b2c56e8255c47c8330e5e6572d5de
üst 5140fe15
......@@ -51,8 +51,6 @@
// STATIC DATA -----------------------------------------------------------
static VclPtr<ScEditWindow> pActiveEdWnd = nullptr;
// class ScHFEditPage
ScHFEditPage::ScHFEditPage( vcl::Window* pParent,
......@@ -793,7 +791,7 @@ IMPL_LINK_TYPED( ScHFEditPage, ListHdl_Impl, ListBox&, rList, void )
IMPL_LINK_TYPED( ScHFEditPage, ClickHdl, Button*, pBtn, void )
{
pActiveEdWnd = ::GetScEditWindow();
VclPtr<ScEditWindow> pActiveEdWnd = ::GetScEditWindow();
if ( !pActiveEdWnd )
return;
......@@ -824,7 +822,7 @@ IMPL_LINK_TYPED( ScHFEditPage, ClickHdl, Button*, pBtn, void )
IMPL_STATIC_LINK_TYPED( ScHFEditPage, MenuHdl, ScExtIButton&, rBtn, void )
{
pActiveEdWnd = ::GetScEditWindow();
VclPtr<ScEditWindow> pActiveEdWnd = ::GetScEditWindow();
if ( !pActiveEdWnd )
return;
......
......@@ -48,11 +48,11 @@
#include <memory>
// STATIC DATA -----------------------------------------------------------
static VclPtr<ScEditWindow> pActiveEdWnd = nullptr;
static VclPtr<ScEditWindow> g_pActiveEdWnd = nullptr;
ScEditWindow* GetScEditWindow ()
{
return pActiveEdWnd;
return g_pActiveEdWnd;
}
static void lcl_GetFieldData( ScHeaderFieldData& rData )
......@@ -283,7 +283,7 @@ void ScEditWindow::Command( const CommandEvent& rCEvt )
void ScEditWindow::GetFocus()
{
pEdView->ShowCursor();
pActiveEdWnd = this;
g_pActiveEdWnd = this;
css::uno::Reference< css::accessibility::XAccessible > xTemp = xAcc;
if (xTemp.is() && pAcc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment