Kaydet (Commit) d7824bf1 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedfields in sfx2 part2

Change-Id: I227b643641250d47ac6b2218f57ddb231765960e
Reviewed-on: https://gerrit.libreoffice.org/39038Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst f05d0d05
......@@ -122,7 +122,6 @@ public:
virtual ~SfxBindings() override;
void HidePopups( bool bHide = true );
SAL_DLLPRIVATE void HidePopupCtrls_Impl( bool bHide = true );
void SetDispatcher(SfxDispatcher *pDisp);
......
......@@ -79,7 +79,6 @@ public:
{ return aURL; }
void SetURL( const OUString& rURL );
void SetActualURL( const OUString& rURL );
void SetEditable( bool bSet );
// Size
void SetResizable( bool bRes )
......
......@@ -1436,7 +1436,6 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl* _pParent)
m_pTabCtrl->SetCurPageId( (sal_uInt16)nPageId );
ActivatePageHdl( m_pTabCtrl );
m_pActiveLB->SetSelectHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectHdl ) );
nMinWidth = ( m_pActiveLB->GetSizePixel().Width() / 2 );
aIdle.SetInvokeHandler( LINK( this, SfxHelpIndexWindow_Impl, InitHdl ) );
aIdle.SetPriority( TaskPriority::LOWER );
......
......@@ -298,7 +298,6 @@ private:
VclPtr<SearchTabPage_Impl> pSPage;
VclPtr<BookmarksTabPage_Impl> pBPage;
long nMinWidth;
bool bWasCursorLeftOrRight;
bool bIsInitDone;
......
......@@ -861,7 +861,7 @@ bool SfxWorkWindow::PrepareClose_Impl()
SfxChild_Impl* SfxWorkWindow::RegisterChild_Impl( vcl::Window& rWindow,
SfxChildAlignment eAlign, bool bCanGetFocus )
SfxChildAlignment eAlign )
{
DBG_ASSERT( aChildren.size() < 255, "too many children" );
DBG_ASSERT( SfxChildAlignValid(eAlign), "invalid align" );
......@@ -873,7 +873,6 @@ SfxChild_Impl* SfxWorkWindow::RegisterChild_Impl( vcl::Window& rWindow,
SfxChild_Impl *pChild = new SfxChild_Impl(rWindow, rWindow.GetSizePixel(),
eAlign, rWindow.IsVisible());
pChild->bCanGetFocus = bCanGetFocus;
aChildren.push_back(pChild);
bSorted = false;
......@@ -1375,7 +1374,7 @@ void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, bool bSetFocus )
{
// The window is not docked or docked outside of one split windows
// and must therefore be registered explicitly as a Child
pCW->pCli = RegisterChild_Impl(*(pChildWin->GetWindow()), pChildWin->GetAlignment(), pChildWin->CanGetFocus());
pCW->pCli = RegisterChild_Impl(*(pChildWin->GetWindow()), pChildWin->GetAlignment());
pCW->pCli->nVisible = SfxChildVisibility::VISIBLE;
if ( pChildWin->GetAlignment() != SfxChildAlignment::NOALIGNMENT && bIsFullScreen )
pCW->pCli->nVisible ^= SfxChildVisibility::ACTIVE;
......@@ -1549,7 +1548,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( eChild == SfxChildIdentifier::SPLITWINDOW && eConfig == SfxDockingConfig::TOGGLEFLOATMODE)
{
// DockingWindow was dragged out of a SplitWindow
pCW->pCli = RegisterChild_Impl(*pDockWin, pDockWin->GetAlignment(), pCW->pWin->CanGetFocus());
pCW->pCli = RegisterChild_Impl(*pDockWin, pDockWin->GetAlignment());
pCW->pCli->nVisible = SfxChildVisibility::VISIBLE;
}
......
......@@ -35,8 +35,6 @@ static sal_Char const sHTML_SC_yes[] = "YES";
static sal_Char const sHTML_SC_no[] = "NO";
static sal_Char const sHTML_SC_auto[] = "AUTO";
#define HTML_O_EDIT "EDIT"
static HTMLOptionEnum<ScrollingMode> const aScrollingTable[] =
{
{ sHTML_SC_yes, ScrollingMode::Yes },
......@@ -108,15 +106,6 @@ void SfxFrameHTMLParser::ParseFrameOptions(
pFrame->SetResizable( false );
break;
default:
if (rOption.GetTokenString().equalsIgnoreAsciiCase(HTML_O_EDIT))
{
const OUString& aStr = rOption.GetString();
bool bEdit = true;
if ( aStr.equalsIgnoreAsciiCase("FALSE") )
bEdit = false;
pFrame->SetEditable( bEdit );
}
break;
}
}
......
......@@ -54,10 +54,8 @@ struct SfxProgress_Impl
OUString aText, aStateText;
sal_uIntPtr nMax;
clock_t nCreate;
clock_t nNextReschedule;
bool bLocked;
bool bWaitMode;
bool bAllowRescheduling;
bool bRunning;
SfxProgress* pActiveProgress;
......@@ -96,10 +94,8 @@ void SfxProgress_Impl::Enable_Impl()
SfxProgress_Impl::SfxProgress_Impl()
: nMax(0)
, nCreate(0)
, nNextReschedule(0)
, bLocked(false)
, bWaitMode(false)
, bAllowRescheduling(false)
, bRunning(false)
, pActiveProgress(nullptr)
, pWorkWin(nullptr)
......@@ -137,7 +133,6 @@ SfxProgress::SfxProgress
bSuspended(true)
{
pImpl->bRunning = true;
pImpl->bAllowRescheduling = Application::IsInExecute();
pImpl->xObjSh = pObjSh;
pImpl->aText = rText;
......@@ -145,7 +140,6 @@ SfxProgress::SfxProgress
pImpl->bLocked = false;
pImpl->bWaitMode = bWait;
pImpl->nCreate = Get10ThSec();
pImpl->nNextReschedule = pImpl->nCreate;
SAL_INFO(
"sfx.bastyp",
"SfxProgress: created for '" << rText << "' at " << pImpl->nCreate
......
......@@ -124,12 +124,10 @@ public:
css::uno::Reference< css::frame::XDispatchProvider > xProv;
SfxWorkWindow* pWorkWin;
SfxBindings* pSubBindings;
SfxBindings* pSuperBindings;
std::vector<SfxStateCache *> pCaches; // One chache for each binding
std::size_t nCachedFunc1; // index for the last one called
std::size_t nCachedFunc2; // index for the second last called
std::size_t nMsgPos; // Message-Position relative the one to be updated
SfxPopupAction ePopupAction; // Checked in DeleteFloatinWindow()
bool bContextChanged;
bool bMsgDirty; // Has a MessageServer been invalidated?
bool bAllMsgDirty; // Has a MessageServer been invalidated?
......@@ -139,7 +137,6 @@ public:
bool bInUpdate; // for Assertions
bool bInNextJob; // for Assertions
bool bFirstRound; // First round in Update
sal_uInt16 nFirstShell; // Shell, the first round is preferred
sal_uInt16 nOwnRegLevel; // Counts the real Locks, except those of the Super Bindings
InvalidateSlotMap m_aInvalidateSlots; // store slots which are invalidated while in update
};
......@@ -155,7 +152,6 @@ SfxBindings::SfxBindings()
pImpl->bContextChanged = false;
pImpl->bMsgDirty = true;
pImpl->bAllDirty = true;
pImpl->ePopupAction = SfxPopupAction::DELETE;
pImpl->nCachedFunc1 = 0;
pImpl->nCachedFunc2 = 0;
pImpl->bCtrlReleased = false;
......@@ -163,7 +159,6 @@ SfxBindings::SfxBindings()
pImpl->bInNextJob = false;
pImpl->bInUpdate = false;
pImpl->pSubBindings = nullptr;
pImpl->pSuperBindings = nullptr;
pImpl->pWorkWin = nullptr;
pImpl->nOwnRegLevel = nRegLevel;
......@@ -256,37 +251,12 @@ void SfxBindings::DeleteControllers_Impl()
void SfxBindings::HidePopups( bool bHide )
{
// Hide SfxPopupWindows
HidePopupCtrls_Impl( bHide );
SfxBindings *pSub = pImpl->pSubBindings;
while ( pSub )
{
pImpl->pSubBindings->HidePopupCtrls_Impl( bHide );
pSub = pSub->pImpl->pSubBindings;
}
// Hide SfxChildWindows
DBG_ASSERT( pDispatcher, "HidePopups not allowed without dispatcher" );
if ( pImpl->pWorkWin )
pImpl->pWorkWin->HidePopups_Impl( bHide, true );
}
void SfxBindings::HidePopupCtrls_Impl( bool bHide )
{
if ( bHide )
{
// Hide SfxPopupWindows
pImpl->ePopupAction = SfxPopupAction::HIDE;
}
else
{
// Show SfxPopupWindows
pImpl->ePopupAction = SfxPopupAction::SHOW;
}
pImpl->ePopupAction = SfxPopupAction::DELETE;
}
void SfxBindings::Update_Impl(SfxStateCache& rCache /*The up to date SfxStatusCache*/)
{
if (rCache.GetDispatch().is() && rCache.GetItemLink())
......@@ -685,7 +655,6 @@ void SfxBindings::InvalidateShell
pImpl->aAutoTimer.SetTimeout(TIMEOUT_FIRST);
pImpl->aAutoTimer.Start();
pImpl->bFirstRound = true;
pImpl->nFirstShell = nLevel;
}
}
}
......@@ -1680,7 +1649,6 @@ void SfxBindings::SetSubBindings_Impl( SfxBindings *pSub )
if ( pImpl->pSubBindings )
{
pImpl->pSubBindings->SetDispatchProvider_Impl( css::uno::Reference< css::frame::XDispatchProvider > () );
pImpl->pSubBindings->pImpl->pSuperBindings = nullptr;
}
pImpl->pSubBindings = pSub;
......@@ -1688,7 +1656,6 @@ void SfxBindings::SetSubBindings_Impl( SfxBindings *pSub )
if ( pSub )
{
pImpl->pSubBindings->SetDispatchProvider_Impl( pImpl->xProv );
pSub->pImpl->pSuperBindings = this;
}
}
......
......@@ -742,13 +742,6 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI)
if ( bMDI && xImp->pFrame )
{
SfxBindings *pBind = GetBindings();
while ( pBind )
{
pBind->HidePopupCtrls_Impl( false );
pBind = pBind->GetSubBindings_Impl();
}
xImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( false, false, 1 );
}
......@@ -825,13 +818,6 @@ void SfxDispatcher::DoDeactivate_Impl(bool bMDI, SfxViewFrame* pNew)
if ( bHidePopups )
{
SfxBindings *pBind = GetBindings();
while ( pBind )
{
pBind->HidePopupCtrls_Impl();
pBind = pBind->GetSubBindings_Impl();
}
xImp->pFrame->GetFrame().GetWorkWindow_Impl()->HidePopups_Impl( true, false, 1 );
}
......
......@@ -72,8 +72,7 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
Window( i_pParent ),
mbLocalViewInitialized(false),
maButtonsTextColor(officecfg::Office::Common::Help::StartCenter::StartCenterTextColor::get()),
mbInitControls( false ),
mnHideExternalLinks( 0 )
mbInitControls( false )
{
m_pUIBuilder.reset(new VclBuilder(this, getUIRootDir(), "sfx/ui/startcenter.ui", "StartCenter" ));
......@@ -128,21 +127,6 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
try
{
mxContext.set( ::comphelper::getProcessComponentContext(), uno::UNO_SET_THROW );
Reference<lang::XMultiServiceFactory> xConfig = configuration::theDefaultProvider::get( mxContext );
Sequence<Any> args(1);
PropertyValue val(
"nodepath",
0,
Any(OUString("/org.openoffice.Office.Common/Help/StartCenter")),
PropertyState_DIRECT_VALUE);
args.getArray()[0] <<= val;
Reference<container::XNameAccess> xNameAccess(xConfig->createInstanceWithArguments(SERVICENAME_CFGREADACCESS,args), UNO_QUERY);
if( xNameAccess.is() )
{
//throws css::container::NoSuchElementException, css::lang::WrappedTargetException
Any value( xNameAccess->getByName("StartCenterHideExternalLinks") );
mnHideExternalLinks = value.get<sal_Int32>();
}
}
catch (const Exception& e)
{
......
......@@ -87,7 +87,6 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer
tools::Rectangle maStartCentButtons;
bool mbInitControls;
sal_Int32 mnHideExternalLinks;
std::unique_ptr<svt::AcceleratorExecute> mpAccExec;
void setupButton(PushButton* pButton);
......
......@@ -390,17 +390,16 @@ friend class SfxDockingWindow;
// The following members are only valid in the time from startDocking to
// EndDocking:
bool bEndDocked;
Size aSplitSize;
long nHorizontalSize;
long nVerticalSize;
sal_uInt16 nLine;
sal_uInt16 nPos;
sal_uInt16 nDockLine;
sal_uInt16 nDockPos;
sal_uInt16 nLine;
sal_uInt16 nPos;
sal_uInt16 nDockLine;
sal_uInt16 nDockPos;
bool bNewLine;
bool bDockingPrevented;
OString aWinState;
OString aWinState;
explicit SfxDockingWindow_Impl(SfxDockingWindow *pBase);
SfxChildAlignment GetLastAlignment() const
......@@ -419,7 +418,6 @@ SfxDockingWindow_Impl::SfxDockingWindow_Impl(SfxDockingWindow* pBase)
,bConstructed(false)
,pSplitWin(nullptr)
,bSplitable(true)
,bEndDocked(false)
,nHorizontalSize(0)
,nVerticalSize(0)
,nLine(0)
......@@ -801,9 +799,7 @@ void SfxDockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMod
}
else
{
pImpl->bEndDocked = true;
DockingWindow::EndDocking(rRect, bFloatMode);
pImpl->bEndDocked = false;
}
SetAlignment( IsFloatingMode() ? SfxChildAlignment::NOALIGNMENT : pImpl->GetDockAlignment() );
......
......@@ -878,7 +878,6 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
mpPreferredParentWindow = _pPreferredParentWindow;
mpAntiImpl = _pAntiImpl;
mnError = ERRCODE_NONE;
mbHasAutoExt = false;
mbHasPassword = false;
m_bHaveFilterOptions = false;
......@@ -919,7 +918,6 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
if ( ! mxFileDlg.is() || ! xNotifier.is() )
{
mnError = ERRCODE_ABORT;
return;
}
......
......@@ -72,8 +72,6 @@ namespace sfx2
ImplSVEvent * mnPostUserEventId;
ErrCode mnError;
FileDialogHelper::Context meContext;
bool mbHasPassword : 1;
......
......@@ -183,7 +183,6 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl,
: SplitWindow ( pParent, WB_BORDER | WB_SIZEABLE | WB_3DLOOK | WB_HIDE ),
eAlign(eAl),
pWorkWin(pW),
bLocked(false),
bPinned(true),
pEmptyWin(nullptr),
pActive(nullptr)
......@@ -660,8 +659,6 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
nWinSize = rSize.Height();
}
pDock->nSize = nWinSize;
DeactivateUpdateMode* pDeactivateUpdateMode = new DeactivateUpdateMode( *this );
if ( bNewLine || nLine == GetItemCount() )
......@@ -688,7 +685,6 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
// "pixel" actually only makes sense if also items with percentage or
// relative sizes are present.
nItemBits |= SplitWindowItemFlags::PercentSize;
bLocked = true;
sal_uInt16 nSet = GetItemId( nLine );
InsertItem( pDockWin->GetType(), pDockWin, nWinSize, nPos, nSet, nItemBits );
......@@ -706,7 +702,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
SetPinned_Impl( false );
pEmptyWin->Actualize();
SAL_INFO("sfx", "SfxSplitWindow::InsertWindow_Impl - registering empty Splitwindow" );
pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, true )->nVisible = SfxChildVisibility::VISIBLE;
pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign )->nVisible = SfxChildVisibility::VISIBLE;
pWorkWin->ArrangeChildren_Impl();
if ( bFadeIn )
FadeIn();
......@@ -724,7 +720,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
{
SAL_INFO("sfx", "SfxSplitWindow::InsertWindow_Impl - registering real Splitwindow" );
}
pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, true )->nVisible = SfxChildVisibility::VISIBLE;
pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign )->nVisible = SfxChildVisibility::VISIBLE;
pWorkWin->ArrangeChildren_Impl();
if ( bFadeIn )
FadeIn();
......@@ -734,7 +730,6 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
}
delete pDeactivateUpdateMode;
bLocked = false;
// workaround insuffiency of <SplitWindow> regarding dock layouting:
// apply FIXED item size as 'original' item size to improve layouting of undock-dock-cycle of a window
......@@ -811,16 +806,12 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, bool bHide )
// Remove Windows, and if it was the last of the line, then also remove
// the line (line = itemset)
DeactivateUpdateMode* pDeactivateUpdateMode = new DeactivateUpdateMode( *this );
bLocked = true;
std::unique_ptr<DeactivateUpdateMode> pDeactivateUpdateMode( new DeactivateUpdateMode( *this ) );
RemoveItem( pDockWin->GetType() );
if ( nSet && !GetItemCount( nSet ) )
RemoveItem( nSet );
delete pDeactivateUpdateMode;
bLocked = false;
};
......@@ -1047,7 +1038,7 @@ void SfxSplitWindow::SetPinned_Impl( bool bOn )
Hide();
pEmptyWin->Actualize();
SAL_INFO("sfx", "SfxSplitWindow::SetPinned_Impl - registering empty Splitwindow" );
pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, true )->nVisible = SfxChildVisibility::VISIBLE;
pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign )->nVisible = SfxChildVisibility::VISIBLE;
}
Point aPos( GetPosPixel() );
......@@ -1072,7 +1063,7 @@ void SfxSplitWindow::SetPinned_Impl( bool bOn )
pWorkWin->ReleaseChild_Impl( *pEmptyWin );
pEmptyWin->Hide();
SAL_INFO("sfx", "SfxSplitWindow::SetPinned_Impl - registering real Splitwindow" );
pWorkWin->RegisterChild_Impl( *this, eAlign, true )->nVisible = SfxChildVisibility::VISIBLE;
pWorkWin->RegisterChild_Impl( *this, eAlign )->nVisible = SfxChildVisibility::VISIBLE;
}
}
}
......@@ -1101,7 +1092,7 @@ void SfxSplitWindow::SetFadeIn_Impl( bool bOn )
pWorkWin->ReleaseChild_Impl( *pEmptyWin );
pEmptyWin->Hide();
SAL_INFO("sfx", "SfxSplitWindow::SetFadeIn_Impl - registering real Splitwindow" );
pWorkWin->RegisterChild_Impl( *this, eAlign, true )->nVisible = SfxChildVisibility::VISIBLE;
pWorkWin->RegisterChild_Impl( *this, eAlign )->nVisible = SfxChildVisibility::VISIBLE;
pWorkWin->ArrangeChildren_Impl();
pWorkWin->ShowChildren_Impl();
}
......@@ -1118,7 +1109,7 @@ void SfxSplitWindow::SetFadeIn_Impl( bool bOn )
Hide();
pEmptyWin->Actualize();
SAL_INFO("sfx", "SfxSplitWindow::SetFadeIn_Impl - registering empty Splitwindow" );
pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, true )->nVisible = SfxChildVisibility::VISIBLE;
pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign )->nVisible = SfxChildVisibility::VISIBLE;
pWorkWin->ArrangeChildren_Impl();
pWorkWin->ShowChildren_Impl();
pWorkWin->ArrangeAutoHideWindows( this );
......
......@@ -28,9 +28,8 @@ struct SfxFrameDescriptor_Impl
{
Wallpaper* pWallpaper;
SfxItemSet* pArgs;
bool bEditable;
SfxFrameDescriptor_Impl() : pWallpaper( nullptr ), pArgs( nullptr ), bEditable( true ) {}
SfxFrameDescriptor_Impl() : pWallpaper( nullptr ), pArgs( nullptr ) {}
~SfxFrameDescriptor_Impl()
{
delete pWallpaper;
......@@ -72,11 +71,6 @@ void SfxFrameDescriptor::SetActualURL( const OUString& rURL )
pImpl->pArgs->ClearItem();
}
void SfxFrameDescriptor::SetEditable( bool bSet )
{
pImpl->bEditable = bSet;
}
void SfxFrameDescriptor::SetWallpaper( const Wallpaper& rWallpaper )
{
DELETEZ( pImpl->pWallpaper );
......
......@@ -1059,7 +1059,6 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags )
{
pImpl->nFlagsInProgress |= SfxLoadedFlags::MAINDOCUMENT;
static_cast<SfxHeaderAttributes_Impl*>(GetHeaderAttributes())->SetAttributes();
pImpl->bImportDone = true;
if ( ( GetModifyPasswordHash() || GetModifyPasswordInfo().getLength() ) && !IsModifyPasswordEntered() )
SetReadOnly();
......
......@@ -2622,8 +2622,6 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
}
rItemSet.ClearItem( SID_COPY_STREAM_IF_POSSIBLE );
pImpl->bPasswd = SfxItemState::SET == rItemSet.GetItemState(SID_PASSWORD);
SfxMedium *pActMed = GetMedium();
const INetURLObject aActName(pActMed->GetName());
......
......@@ -209,13 +209,10 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,nVisualDocumentNumber( USHRT_MAX)
,nDocumentSignatureState( SignatureState::UNKNOWN )
,nScriptingSignatureState( SignatureState::UNKNOWN )
,bInList( false)
,bClosing( false)
,bIsSaving( false)
,bPasswd( false)
,bIsNamedVisible( false)
,bIsAbortingImport ( false)
,bImportDone ( false)
,bInPrepareClose( false )
,bPreparedForClose( false )
,bForbidReload( false )
......@@ -261,7 +258,6 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
SfxObjectShell* pDoc = &_rDocShell;
SfxObjectShellArr_Impl &rArr = SfxGetpApp()->GetObjectShells_Impl();
rArr.push_back( pDoc );
bInList = true;
}
......@@ -424,7 +420,6 @@ bool SfxObjectShell::CloseInternal()
SfxObjectShellArr_Impl::iterator it = std::find( rDocs.begin(), rDocs.end(), this );
if ( it != rDocs.end() )
rDocs.erase( it );
pImpl->bInList = false;
}
}
}
......@@ -523,10 +518,10 @@ bool SfxObjectShell::IsInPrepareClose() const
struct BoolEnv_Impl
{
SfxObjectShell_Impl* pImpl;
explicit BoolEnv_Impl( SfxObjectShell_Impl* pImplP) : pImpl( pImplP )
{ pImplP->bInPrepareClose = true; }
~BoolEnv_Impl() { pImpl->bInPrepareClose = false; }
SfxObjectShell_Impl& rImpl;
explicit BoolEnv_Impl( SfxObjectShell_Impl& rImplP) : rImpl( rImplP )
{ rImplP.bInPrepareClose = true; }
~BoolEnv_Impl() { rImpl.bInPrepareClose = false; }
};
......@@ -538,7 +533,7 @@ bool SfxObjectShell::PrepareClose
{
if( pImpl->bInPrepareClose || pImpl->bPreparedForClose )
return true;
BoolEnv_Impl aBoolEnv( pImpl.get() );
BoolEnv_Impl aBoolEnv( *pImpl );
// DocModalDialog?
if ( IsInModalMode() )
......
......@@ -67,13 +67,10 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
sal_uInt16 nVisualDocumentNumber;
SignatureState nDocumentSignatureState;
SignatureState nScriptingSignatureState;
bool bInList:1, // if reachable by First/Next
bClosing:1, // sal_True while Close(), to prevent recurrences Notification
bool bClosing:1, // sal_True while Close(), to prevent recurrences Notification
bIsSaving:1,
bPasswd:1,
bIsNamedVisible:1,
bIsAbortingImport:1, // Import operation should be canceled.
bImportDone : 1, // Import finished already? For auto reload of Docs.
bInPrepareClose : 1,
bPreparedForClose : 1,
bForbidReload : 1,
......
......@@ -35,7 +35,6 @@ struct SfxDock_Impl
VclPtr<SfxDockingWindow> pWin; // SplitWindow has this window
bool bNewLine;
bool bHide; // SplitWindow had this window
long nSize;
};
class SfxSplitWindow : public SplitWindow
......@@ -47,7 +46,6 @@ private:
SfxWorkWindow* pWorkWin;
std::vector<std::unique_ptr<SfxDock_Impl> >
maDockArr;
bool bLocked;
bool bPinned;
VclPtr<SfxEmptySplitWin_Impl> pEmptyWin;
VclPtr<SfxDockingWindow> pActive;
......@@ -100,7 +98,6 @@ public:
void Lock( bool bLock=true )
{
bLocked = bLock;
SetUpdateMode( !bLock );
}
using Window::IsLocked;
......
......@@ -94,13 +94,12 @@ struct SfxChild_Impl
SfxChildAlignment eAlign;
SfxChildVisibility nVisible;
bool bResize;
bool bCanGetFocus;
bool bSetFocus;
SfxChild_Impl( vcl::Window& rChild, const Size& rSize,
SfxChildAlignment eAlignment, bool bIsVisible ):
pWin(&rChild), aSize(rSize), eAlign(eAlignment), bResize(false),
bCanGetFocus( false ), bSetFocus( false )
bSetFocus( false )
{
nVisible = bIsVisible ? SfxChildVisibility::VISIBLE : SfxChildVisibility::NOT_VISIBLE;
}
......@@ -253,7 +252,7 @@ public:
// Methods for all Child windows
void DataChanged_Impl();
void ReleaseChild_Impl( vcl::Window& rWindow );
SfxChild_Impl* RegisterChild_Impl( vcl::Window& rWindow, SfxChildAlignment eAlign, bool bCanGetFocus );
SfxChild_Impl* RegisterChild_Impl( vcl::Window& rWindow, SfxChildAlignment eAlign );
void ShowChildren_Impl();
void HideChildren_Impl();
bool PrepareClose_Impl();
......
......@@ -176,7 +176,6 @@ struct SfxToolBoxControl_Impl
{
VclPtr<ToolBox> pBox;
bool bShowString;
SfxTbxCtrlFactory* pFact;
sal_uInt16 nTbxId;
sal_uInt16 nSlotId;
VclPtr<SfxPopupWindow> mpFloatingWindow;
......@@ -208,7 +207,6 @@ SfxToolBoxControl::SfxToolBoxControl(
{
pImpl->pBox = &rBox;
pImpl->bShowString = bShowStringItems;
pImpl->pFact = nullptr;
pImpl->nTbxId = nID;
pImpl->nSlotId = nSlotID;
pImpl->mpFloatingWindow = nullptr;
......@@ -300,7 +298,6 @@ SfxToolBoxControl* SfxToolBoxControl::CreateControl( sal_uInt16 nSlotId, sal_uIn
if( nFactory < nCount )
{
pCtrl = rFactories[nFactory].pCtor( nSlotId, nTbxId, *pBox );
pCtrl->pImpl->pFact = &rFactories[nFactory];
return pCtrl;
}
}
......@@ -326,7 +323,6 @@ SfxToolBoxControl* SfxToolBoxControl::CreateControl( sal_uInt16 nSlotId, sal_uIn
if( nFactory < nCount )
{
pCtrl = rFactories[nFactory].pCtor( nSlotId, nTbxId, *pBox );
pCtrl->pImpl->pFact = &rFactories[nFactory];
return pCtrl;
}
}
......
......@@ -380,11 +380,6 @@ void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc )
const SfxMedium *pMed = pDoc->GetMedium();
GetDescriptor()->SetActualURL( pMed->GetOrigURL() );
const SfxBoolItem* pItem = SfxItemSet::GetItem<SfxBoolItem>(pMed->GetItemSet(), SID_EDITDOC, false);
bool bEditable = ( !pItem || pItem->GetValue() );
GetDescriptor()->SetEditable( bEditable );
// Mark FileOpen parameter
SfxItemSet* pItemSet = pMed->GetItemSet();
......
......@@ -45,7 +45,6 @@ struct SfxViewFrame_Impl
bool bModal:1;
bool bEnabled:1;
bool bWindowWasEnabled:1;
bool bActive;
OUString aFactoryName;
explicit SfxViewFrame_Impl(SfxFrame& i_rFrame)
......@@ -61,7 +60,6 @@ struct SfxViewFrame_Impl
, bModal(false)
, bEnabled(false)
, bWindowWasEnabled(true)
, bActive(false)
{
}
};
......
......@@ -195,15 +195,11 @@ friend class SfxBaseController;
Reference < XController > xOwner;
Reference < task::XStatusIndicator > xProgress;
SfxWorkWindow* pWorkWindow;
sal_Int32 _nRange;
sal_Int32 _nValue;
long _nStartTime;
public:
SfxStatusIndicator(SfxBaseController* pController, SfxWorkWindow* pWork)
: xOwner( pController )
, pWorkWindow( pWork )
, _nRange(0)
, _nValue(0)
, _nStartTime(0)
{
++m_refCount;
......@@ -228,9 +224,6 @@ void SAL_CALL SfxStatusIndicator::start(const OUString& aText, sal_Int32 nRange)
SolarMutexGuard aGuard;
if ( xOwner.is() )
{
_nRange = nRange;
_nValue = 0;
if ( !xProgress.is() )
xProgress = pWorkWindow->GetStatusIndicator();
......@@ -277,8 +270,6 @@ void SAL_CALL SfxStatusIndicator::setValue( sal_Int32 nValue )
SolarMutexGuard aGuard;
if ( xOwner.is() )
{