loplugin:singlevalfields in sfx2

Change-Id: Ice6d47ccbc3ebf8971887b8b64c0d6860c76eec8
Reviewed-on: https://gerrit.libreoffice.org/26602
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index e017963..7dc7289 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -192,7 +192,6 @@ public:
    static SfxChildWindow* CreateChildWindow( sal_uInt16, vcl::Window*, SfxBindings*, SfxChildWinInfo&);
    void                SetHideNotDelete( bool bOn );
    bool                IsHideNotDelete() const;
    bool                IsHideAtToggle() const;
    bool                IsVisible() const;
    void                SetWantsFocus( bool );
    bool                WantsFocus() const;
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index fd8e710..c1b879a 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -413,8 +413,6 @@ public:
    void                        ClearHeaderAttributesForSourceViewHack();
    void                        SetHeaderAttributesForSourceViewHack();

    bool                        IsTemplate() const;

    bool                        IsQueryLoadTemplate() const;
    bool                        IsUseUserData() const;
    bool                        IsUseThumbnailSave() const;
diff --git a/include/sfx2/sidebar/DeckTitleBar.hxx b/include/sfx2/sidebar/DeckTitleBar.hxx
index 700ad6a..9ddba79 100644
--- a/include/sfx2/sidebar/DeckTitleBar.hxx
+++ b/include/sfx2/sidebar/DeckTitleBar.hxx
@@ -42,7 +42,7 @@ protected:
    virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;

private:
    const sal_uInt16 mnCloserItemIndex;
    static const sal_uInt16 mnCloserItemIndex = 1;
    const std::function<void()> maCloserAction;
    bool mbIsCloserVisible;
};
diff --git a/include/sfx2/sidebar/MenuButton.hxx b/include/sfx2/sidebar/MenuButton.hxx
index 67f47aa..7243805 100644
--- a/include/sfx2/sidebar/MenuButton.hxx
+++ b/include/sfx2/sidebar/MenuButton.hxx
@@ -39,10 +39,6 @@ protected:

private:
    bool mbIsLeftButtonDown;
    enum PaintType {
        PT_Native,
        PT_Theme
    } mePaintType;
};

} } // end of namespace sfx2::sidebar
diff --git a/include/sfx2/sidebar/PanelTitleBar.hxx b/include/sfx2/sidebar/PanelTitleBar.hxx
index b8020bd..52a04eb 100644
--- a/include/sfx2/sidebar/PanelTitleBar.hxx
+++ b/include/sfx2/sidebar/PanelTitleBar.hxx
@@ -53,7 +53,7 @@ protected:
private:
    bool mbIsLeftButtonDown;
    VclPtr<Panel> mpPanel;
    const sal_uInt16 mnMenuItemIndex;
    static const sal_uInt16 mnMenuItemIndex = 1;
    css::uno::Reference<css::frame::XFrame> mxFrame;
    OUString msMoreOptionsCommand;
};
diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx
index cbed84e..8eff2ae 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -189,7 +189,6 @@ private:
    */
    ::boost::optional<bool> mbIsDeckRequestedOpen;
    ::boost::optional<bool> mbIsDeckOpen;
    bool mbCanDeckBeOpened;

    /** Before the deck is closed the sidebar width is saved into this variable,
        so that it can be restored when the deck is reopened.
diff --git a/include/sfx2/sidebar/TabItem.hxx b/include/sfx2/sidebar/TabItem.hxx
index 9060729..a5e26ffd 100644
--- a/include/sfx2/sidebar/TabItem.hxx
+++ b/include/sfx2/sidebar/TabItem.hxx
@@ -42,10 +42,6 @@ public:

private:
    bool mbIsLeftButtonDown;
    enum PaintType {
        PT_Native,
        PT_Theme
    } mePaintType;
};

} } // end of namespace sfx2::sidebar
diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index eeec07c..5e3bce0 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -164,7 +164,6 @@ protected:
    css::uno::Reference< css::frame::XModel > m_xModel;
    css::uno::Reference< css::frame::XDesktop2 > mxDesktop;

    bool mbIsSynced; ///< Tells whether maRepositories is synchronized with the user config
    std::vector<TemplateRepository*> maRepositories; ///< Stores the remote repositories for templates
};

diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 721503e..bd08a57 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -297,7 +297,6 @@ protected:
    ThumbnailValueItemList mFilteredItemList; ///< Cache to store the filtered items
    ThumbnailValueItemList::iterator mpStartSelRange;
    VclPtr<ScrollBar> mpScrBar;
    long mnHeaderHeight;
    long mnItemWidth;
    long mnItemHeight;
    long mnItemPadding;
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index 92a315b..e60ec8a 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -104,7 +104,6 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* )
    , pPool(nullptr)
    , pProgress(nullptr)
    , nDocModalMode(0)
    , nAutoTabPageId(0)
    , nRescheduleLocks(0)
    , nInReschedule(0)
    , m_xImeStatusWindow(new sfx2::appl::ImeStatusWindow(comphelper::getProcessComponentContext()))
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 116e386..1d1fdb8 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -61,7 +61,6 @@ struct SfxChildWindow_Impl
    SfxChildWinFactory* pFact;
    bool                bHideNotDelete;
    bool                bVisible;
    bool                bHideAtToggle;
    bool                bWantsFocus;
    SfxModule*          pContextModule;
    SfxWorkWindow*      pWorkWin;
@@ -162,7 +161,6 @@ SfxChildWindow::SfxChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId)
{
    pImpl->pFact = nullptr;
    pImpl->bHideNotDelete = false;
    pImpl->bHideAtToggle = false;
    pImpl->bWantsFocus = true;
    pImpl->bVisible = true;
    pImpl->pContextModule = nullptr;
@@ -558,11 +556,6 @@ bool SfxChildWindow::IsHideNotDelete() const
    return pImpl->bHideNotDelete;
}

bool SfxChildWindow::IsHideAtToggle() const
{
    return pImpl->bHideAtToggle;
}

void SfxChildWindow::SetWantsFocus( bool bSet )
{
    pImpl->bWantsFocus = bSet;
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 537405c..0b7711b 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1295,7 +1295,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
    {
        SfxChildWindow *pChildWin = pCW->pWin;
        bool bCreate = false;
        if ( pCW->nId && !pCW->bDisabled  && (pCW->aInfo.nFlags & SfxChildWindowFlags::ALWAYSAVAILABLE || IsVisible_Impl( pCW->nVisibility ) ) )
        if ( pCW->nId && (pCW->aInfo.nFlags & SfxChildWindowFlags::ALWAYSAVAILABLE || IsVisible_Impl( pCW->nVisibility ) ) )
        {
            // In the context is an appropriate ChildWindow allowed;
            // it is also turned on?
@@ -1493,7 +1493,7 @@ void SfxWorkWindow::UpdateStatusBar_Impl()
    // No status bar, if no ID is required or when in FullScreenView or
    // if disabled
    if ( aStatBar.nId && IsDockingAllowed() && bInternalDockingAllowed && bShowStatusBar &&
         ( (aStatBar.bOn && !bIsFullScreen) || aStatBar.bTemp ) )
         aStatBar.bOn && !bIsFullScreen )
    {
        // Id has changed, thus create a suitable Statusbarmanager, this takes
        // over the  current status bar;
@@ -1876,16 +1876,9 @@ void SfxWorkWindow::ToggleChildWindow_Impl(sal_uInt16 nId, bool bSetFocus)
                    if ( pChild->QueryClose() )
                    {
                        pCW->bCreate = false;
                        if ( pChild->IsHideAtToggle() )
                        {
                            ShowChildWindow_Impl( nId, false, bSetFocus );
                        }
                        else
                        {
                            // The Window should be switched off
                            pChild->SetVisible_Impl( false );
                            RemoveChildWin_Impl( pCW );
                        }
                        // The Window should be switched off
                        pChild->SetVisible_Impl( false );
                        RemoveChildWin_Impl( pCW );
                    }
                }
                else
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index be06109..49983e4 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -55,14 +55,12 @@ struct SfxObjectUI_Impl
{
    sal_uInt16  nPos;
    sal_uInt32  nResId;
    bool        bVisible;
    bool        bContext;
    sal_uInt32  nFeature;

    SfxObjectUI_Impl(sal_uInt16 n, sal_uInt32 nId, sal_uInt32 nFeat) :
        nPos(n),
        nResId(nId),
        bVisible(true),
        bContext(false),
        nFeature(nFeat)
    {
@@ -541,7 +539,7 @@ bool SfxInterface::IsObjectBarVisible(sal_uInt16 nNo) const

    assert( nNo<pImplData->aObjectBars.size() );

    return pImplData->aObjectBars[nNo]->bVisible;
    return true;
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index b510328..a6a48e8 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -133,7 +133,6 @@ void ThumbnailView::AppendItem(ThumbnailViewItem *pItem)
void ThumbnailView::ImplInit()
{
    mpScrBar = nullptr;
    mnHeaderHeight = 0;
    mnItemWidth = 0;
    mnItemHeight = 0;
    mnItemPadding = 0;
@@ -297,11 +296,11 @@ void ThumbnailView::CalculateItemPositions (bool bScrollBarUsed)
        mnCols = 1;

    // calculate maximum number of visible rows
    mnVisLines = (sal_uInt16)((aWinSize.Height()-mnHeaderHeight) / (mnItemHeight));
    mnVisLines = (sal_uInt16)(aWinSize.Height() / mnItemHeight);

    // calculate empty space
    long nHSpace = aWinSize.Width()-nScrBarWidth - mnCols*mnItemWidth;
    long nVSpace = aWinSize.Height()-mnHeaderHeight - mnVisLines*mnItemHeight;
    long nVSpace = aWinSize.Height() - mnVisLines*mnItemHeight;
    long nHItemSpace = nHSpace / (mnCols+1);
    long nVItemSpace = nVSpace / (mnVisLines+1);

@@ -322,12 +321,12 @@ void ThumbnailView::CalculateItemPositions (bool bScrollBarUsed)
    long nItemHeightOffset = mnItemHeight + nVItemSpace;
    long nHiddenLines = (static_cast<long>(
        ( mnLines - 1 ) * nItemHeightOffset * nScrollRatio ) -
        nVItemSpace - mnHeaderHeight) /
        nVItemSpace ) /
        nItemHeightOffset;

    // calculate offsets
    long nStartX = nHItemSpace;
    long nStartY = nVItemSpace + mnHeaderHeight;
    long nStartY = nVItemSpace;

    // calculate and draw items
    long x = nStartX;
@@ -411,8 +410,8 @@ void ThumbnailView::CalculateItemPositions (bool bScrollBarUsed)
        mbScroll = mnLines > mnVisLines;


        Point aPos( aWinSize.Width() - nScrBarWidth, mnHeaderHeight );
        Size aSize( nScrBarWidth, aWinSize.Height() - mnHeaderHeight );
        Point aPos( aWinSize.Width() - nScrBarWidth, 0 );
        Size aSize( nScrBarWidth, aWinSize.Height() );

        mpScrBar->SetPosSizePixel( aPos, aSize );
        mpScrBar->SetRangeMax( (nCurCount+mnCols-1)*mnFineness/mnCols);
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 84dcd1c..0562aa1 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -559,12 +559,6 @@ void SfxTabDialog::Start_Impl()

        if ( USHRT_MAX != m_nAppPageId )
            nActPage = m_nAppPageId;
        else
        {
            sal_uInt16 nAutoTabPageId = SfxGetpApp()->Get_Impl()->nAutoTabPageId;
            if ( nAutoTabPageId )
                nActPage = nAutoTabPageId;
        }

        if ( TAB_PAGE_NOTFOUND == m_pTabCtrl->GetPagePos( nActPage ) )
            nActPage = m_pTabCtrl->GetPageId( 0 );
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 422ab12..fde185a 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -119,8 +119,6 @@ class DocTempl_EntryData_Impl
    OUString            maTitle;
    OUString            maOwnURL;
    OUString            maTargetURL;
    bool            mbIsOwner   : 1;
    bool            mbDidConvert: 1;

private:
    RegionData_Impl*    GetParent() const { return mpParent; }
@@ -1231,8 +1229,6 @@ DocTempl_EntryData_Impl::DocTempl_EntryData_Impl( RegionData_Impl* pParent,
    mpParent    = pParent;
    maTitle     = SfxDocumentTemplates::ConvertResourceString(
                  STR_TEMPLATE_NAME1_DEF, STR_TEMPLATE_NAME1, NUM_TEMPLATE_NAMES, rTitle );
    mbIsOwner   = false;
    mbDidConvert= false;
}


diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 67e3eff..d461bc0 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -256,12 +256,6 @@ void SfxObjectShell::ResetError()
}


bool SfxObjectShell::IsTemplate() const
{
    return pImpl->bIsTemplate;
}


void SfxObjectShell::EnableSetModified( bool bEnable )
{
#ifdef DBG_UTIL
@@ -792,7 +786,6 @@ OUString SfxObjectShell::GetTitle
        bRecur = true;

        OUString aTitle;
        SfxObjectShell *pThis = const_cast<SfxObjectShell*>(this);

        if ( pMed )
        {
@@ -804,19 +797,12 @@ OUString SfxObjectShell::GetTitle
        if ( aTitle.isEmpty() )
            aTitle = GetTitle( SFX_TITLE_FILENAME );

        if ( IsTemplate() )
            pThis->SetTitle( aTitle );
        bRecur = false;
        return aTitle;
    }
    else if (SFX_TITLE_APINAME == nMaxLength )
        return GetAPIName();

    // Special case templates:
    if( IsTemplate() && !pImpl->aTitle.isEmpty() &&
         ( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) )
        return pImpl->aTitle;

    // Picklist/Caption is mapped
    if ( pMed && ( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) )
    {
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 8c59eec..dc99618 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -216,7 +216,6 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
    ,bIsSaving( false)
    ,bPasswd( false)
    ,bIsNamedVisible( false)
    ,bIsTemplate(false)
    ,bIsAbortingImport ( false)
    ,bImportDone ( false)
    ,bInPrepareClose( false )
@@ -248,7 +247,6 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
    ,nFlagsInProgress( SfxLoadedFlags::NONE )
    ,bModalMode( false )
    ,bRunningMacro( false )
    ,bReloadAvailable( false )
    ,nAutoLoadLocks( 0 )
    ,eFlags( SfxObjectShellFlags::UNDEFINED )
    ,bReadOnlyUI( false )
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 42b7dfe..e7f5d06 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -162,7 +162,6 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window *parent)
    : ModalDialog(parent, "TemplateDialog", "sfx/ui/templatedlg.ui"),
      maSelTemplates(cmpSelectionItems),
      mxDesktop( Desktop::create(comphelper::getProcessComponentContext()) ),
      mbIsSynced(false),
      maRepositories()
{
    get(mpSearchFilter, "search_filter");
@@ -1461,31 +1460,27 @@ bool SfxTemplateManagerDlg::insertRepository(const OUString &rName, const OUStri

    maRepositories.push_back(pItem);

    mbIsSynced = false;
    return true;
}

void SfxTemplateManagerDlg::syncRepositories() const
{
    if (!mbIsSynced)
    uno::Reference < uno::XComponentContext > pContext(comphelper::getProcessComponentContext());
    std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(pContext));

    size_t nSize = maRepositories.size();
    uno::Sequence<OUString> aUrls(nSize);
    uno::Sequence<OUString> aNames(nSize);

    for(size_t i = 0; i < nSize; ++i)
    {
        uno::Reference < uno::XComponentContext > pContext(comphelper::getProcessComponentContext());
        std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(pContext));

        size_t nSize = maRepositories.size();
        uno::Sequence<OUString> aUrls(nSize);
        uno::Sequence<OUString> aNames(nSize);

        for(size_t i = 0; i < nSize; ++i)
        {
            aUrls[i] = maRepositories[i]->getURL();
            aNames[i] = maRepositories[i]->maTitle;
        }

        officecfg::Office::Common::Misc::TemplateRepositoryUrls::set(aUrls, batch);
        officecfg::Office::Common::Misc::TemplateRepositoryNames::set(aNames, batch);
        batch->commit();
        aUrls[i] = maRepositories[i]->getURL();
        aNames[i] = maRepositories[i]->maTitle;
    }

    officecfg::Office::Common::Misc::TemplateRepositoryUrls::set(aUrls, batch);
    officecfg::Office::Common::Misc::TemplateRepositoryNames::set(aNames, batch);
    batch->commit();
}

static bool lcl_getServiceName ( const OUString &rFileURL, OUString &rName )
diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx
index b99d7fb..f19d393 100644
--- a/sfx2/source/explorer/nochaos.cxx
+++ b/sfx2/source/explorer/nochaos.cxx
@@ -35,7 +35,7 @@ class CntItemPool;

class CntStaticPoolDefaults_Impl
{
    sal_uInt32        m_nItems;
    static const sal_uInt32  m_nItems = 1;
    SfxPoolItem** m_ppDefaults;
    SfxItemInfo*  m_pItemInfos;

@@ -179,8 +179,7 @@ CntStaticPoolDefaults_Impl::~CntStaticPoolDefaults_Impl()


CntStaticPoolDefaults_Impl::CntStaticPoolDefaults_Impl( CntItemPool* /*pPool*/ )
: m_nItems( 1 ),
  m_ppDefaults( new SfxPoolItem* [ m_nItems ] ),
: m_ppDefaults( new SfxPoolItem* [ m_nItems ] ),
  m_pItemInfos( new SfxItemInfo  [ m_nItems ] )
{
    memset( m_ppDefaults, 0, sizeof( SfxPoolItem* ) * m_nItems );
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index 696b138..71fabc3 100644
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.hxx
@@ -103,7 +103,6 @@ public:
    SfxProgress*                        pProgress;

    sal_uInt16                              nDocModalMode;              // counts documents in modal mode
    sal_uInt16                              nAutoTabPageId;
    sal_uInt16                              nRescheduleLocks;
    sal_uInt16                              nInReschedule;

diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index 1a338be..22cb4c6 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -80,7 +80,6 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
                        bIsSaving:1,
                        bPasswd:1,
                        bIsNamedVisible:1,
                        bIsTemplate:1,
                        bIsAbortingImport:1,  // Import operation should be canceled.
                        bImportDone : 1, // Import finished already? For auto reload of Docs.
                        bInPrepareClose : 1,
@@ -115,7 +114,6 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
    SfxLoadedFlags      nFlagsInProgress;
    bool                bModalMode;
    bool                bRunningMacro;
    bool                bReloadAvailable;
    sal_uInt16          nAutoLoadLocks;
    SfxObjectShellFlags eFlags;
    bool                bReadOnlyUI;
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index dcc0fd3..d9a68d6 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -62,18 +62,16 @@ struct SfxObjectBar_Impl
};


// This struct makes all relevant Informationen available of the status bar
// This struct makes all relevant Information available of the status bar

struct SfxStatBar_Impl
{
    sal_uInt16              nId;
    bool                    bOn;
    bool                    bTemp;

    SfxStatBar_Impl() :
        nId(0),
        bOn(true),
        bTemp(false)
        bOn(true)
    {}
};

@@ -122,7 +120,6 @@ struct SfxChildWin_Impl
    SfxChild_Impl*                  pCli;          // != 0 at direct Children
    sal_uInt16                      nVisibility;
    bool                            bEnable;
    bool                            bDisabled;

    SfxChildWin_Impl( sal_uInt32 nID ) :
        nSaveId((sal_uInt16) (nID & 0xFFFF) ),
@@ -132,8 +129,7 @@ struct SfxChildWin_Impl
        bCreate(false),
        pCli(nullptr),
        nVisibility( SFX_VISIBILITY_UNVISIBLE ),
        bEnable( true ),
        bDisabled( false )
        bEnable( true )
    {}
};

diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx
index 31214fb..22ddec1 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -41,7 +41,6 @@ DeckTitleBar::DeckTitleBar (const OUString& rsTitle,
                            vcl::Window* pParentWindow,
                            const std::function<void()>& rCloserAction)
    : TitleBar(rsTitle, pParentWindow, GetBackgroundPaint())
    , mnCloserItemIndex(1)
    , maCloserAction(rCloserAction)
    , mbIsCloserVisible(false)
{
diff --git a/sfx2/source/sidebar/MenuButton.cxx b/sfx2/source/sidebar/MenuButton.cxx
index 428cdaf..ef74945 100644
--- a/sfx2/source/sidebar/MenuButton.cxx
+++ b/sfx2/source/sidebar/MenuButton.cxx
@@ -31,45 +31,33 @@ namespace sfx2 { namespace sidebar {

MenuButton::MenuButton (vcl::Window* pParentWindow)
    : CheckBox(pParentWindow),
      mbIsLeftButtonDown(false),
      mePaintType(PT_Theme)
      mbIsLeftButtonDown(false)
{
#ifdef DEBUG
    SetText(OUString("MenuButton"));
#endif
}

void MenuButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rUpdateArea)
void MenuButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rUpdateArea*/)
{
    switch (mePaintType)
    {
        case PT_Theme:
        default:
        {
            const bool bIsSelected (IsChecked());
            const bool bIsHighlighted (IsMouseOver() || HasFocus());
            DrawHelper::DrawRoundedRectangle(
                        rRenderContext,
                        Rectangle(Point(0,0), GetSizePixel()),
                        3,
                        (bIsHighlighted || bIsSelected
                            ? Theme::GetColor(Theme::Color_TabItemBorder)
                            : Color(0xffffffff)),
                        (bIsHighlighted
                            ? Theme::GetPaint(Theme::Paint_TabItemBackgroundHighlight)
                            : Theme::GetPaint(Theme::Paint_TabItemBackgroundNormal)));
    const bool bIsSelected (IsChecked());
    const bool bIsHighlighted (IsMouseOver() || HasFocus());
    DrawHelper::DrawRoundedRectangle(
                rRenderContext,
                Rectangle(Point(0,0), GetSizePixel()),
                3,
                (bIsHighlighted || bIsSelected
                    ? Theme::GetColor(Theme::Color_TabItemBorder)
                    : Color(0xffffffff)),
                (bIsHighlighted
                    ? Theme::GetPaint(Theme::Paint_TabItemBackgroundHighlight)
                    : Theme::GetPaint(Theme::Paint_TabItemBackgroundNormal)));

            const Image aIcon(Button::GetModeImage());
            const Size aIconSize(aIcon.GetSizePixel());
            const Point aIconLocation((GetSizePixel().Width() - aIconSize.Width()) / 2,
                                      (GetSizePixel().Height() - aIconSize.Height()) / 2);
            rRenderContext.DrawImage(aIconLocation, aIcon);
            break;
        }
        case PT_Native:
            Button::Paint(rRenderContext, rUpdateArea);
            break;
    }
    const Image aIcon(Button::GetModeImage());
    const Size aIconSize(aIcon.GetSizePixel());
    const Point aIconLocation((GetSizePixel().Width() - aIconSize.Width()) / 2,
                              (GetSizePixel().Height() - aIconSize.Height()) / 2);
    rRenderContext.DrawImage(aIconLocation, aIcon);
}

void MenuButton::MouseMove (const MouseEvent& rEvent)
diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx
index c91cef3..7a16f337 100644
--- a/sfx2/source/sidebar/PanelTitleBar.cxx
+++ b/sfx2/source/sidebar/PanelTitleBar.cxx
@@ -46,7 +46,6 @@ PanelTitleBar::PanelTitleBar(const OUString& rsTitle,
    : TitleBar(rsTitle, pParentWindow, GetBackgroundPaint()),
      mbIsLeftButtonDown(false),
      mpPanel(pPanel),
      mnMenuItemIndex(1),
      mxFrame(),
      msMoreOptionsCommand()
{
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 43d8884..78de65d 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -108,7 +108,6 @@ SidebarController::SidebarController (
      maAsynchronousDeckSwitch(),
      mbIsDeckRequestedOpen(),
      mbIsDeckOpen(),
      mbCanDeckBeOpened(true),
      mnSavedSidebarWidth(pParentWindow->GetSizePixel().Width()),
      maFocusManager([this](const Panel& rPanel){ return this->ShowPanel(rPanel); }),
      mxReadOnlyModeDispatch(),
@@ -349,18 +348,13 @@ void SidebarController::NotifyResize()
        mnSavedSidebarWidth = nWidth;

    bool bIsDeckVisible;
    if (mbCanDeckBeOpened)
    {
        const bool bIsOpening (nWidth > mnWidthOnSplitterButtonDown);
        if (bIsOpening)
            bIsDeckVisible = nWidth >= nTabBarDefaultWidth + gnWidthOpenThreshold;
        else
            bIsDeckVisible = nWidth >= nTabBarDefaultWidth + gnWidthCloseThreshold;
        mbIsDeckRequestedOpen = bIsDeckVisible;
        UpdateCloseIndicator(!bIsDeckVisible);
    }
    const bool bIsOpening (nWidth > mnWidthOnSplitterButtonDown);
    if (bIsOpening)
        bIsDeckVisible = nWidth >= nTabBarDefaultWidth + gnWidthOpenThreshold;
    else
        bIsDeckVisible = false;
        bIsDeckVisible = nWidth >= nTabBarDefaultWidth + gnWidthCloseThreshold;
    mbIsDeckRequestedOpen = bIsDeckVisible;
    UpdateCloseIndicator(!bIsDeckVisible);

    if (mpCurrentDeck)
    {
diff --git a/sfx2/source/sidebar/TabItem.cxx b/sfx2/source/sidebar/TabItem.cxx
index 8c45b65..13bc991 100644
--- a/sfx2/source/sidebar/TabItem.cxx
+++ b/sfx2/source/sidebar/TabItem.cxx
@@ -32,8 +32,7 @@ namespace sfx2 { namespace sidebar {

TabItem::TabItem (vcl::Window* pParentWindow)
    : ImageRadioButton(pParentWindow),
      mbIsLeftButtonDown(false),
      mePaintType(PT_Theme)
      mbIsLeftButtonDown(false)
{
    SetStyle(GetStyle() | WB_TABSTOP | WB_DIALOGCONTROL | WB_NOPOINTERFOCUS);
    SetBackground(Theme::GetPaint(Theme::Paint_TabBarBackground).GetWallpaper());
@@ -42,16 +41,11 @@ TabItem::TabItem (vcl::Window* pParentWindow)
#endif
}

void TabItem::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rUpdateArea)
void TabItem::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*UpdateArea*/)
{
    switch (mePaintType)
    {
        case PT_Theme:
        default:
        {
            const bool bIsSelected (IsChecked());
            const bool bIsHighlighted (IsMouseOver() || HasFocus());
            DrawHelper::DrawRoundedRectangle(
    const bool bIsSelected (IsChecked());
    const bool bIsHighlighted (IsMouseOver() || HasFocus());
    DrawHelper::DrawRoundedRectangle(
                rRenderContext,
                Rectangle(Point(0,0), GetSizePixel()),
                Theme::GetInteger(Theme::Int_ButtonCornerRadius),
@@ -62,17 +56,11 @@ void TabItem::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rUpdate
                    ? Theme::GetPaint(Theme::Paint_TabItemBackgroundHighlight)
                    : Theme::GetPaint(Theme::Paint_TabItemBackgroundNormal));

            const Image aIcon(Button::GetModeImage());
            const Size aIconSize (aIcon.GetSizePixel());
            const Point aIconLocation((GetSizePixel().Width() - aIconSize.Width()) / 2,
                                      (GetSizePixel().Height() - aIconSize.Height()) / 2);
            rRenderContext.DrawImage(aIconLocation, aIcon, IsEnabled() ? DrawImageFlags::NONE : DrawImageFlags::Disable);
            break;
        }
        case PT_Native:
            Button::Paint(rRenderContext, rUpdateArea);
            break;
    }
    const Image aIcon(Button::GetModeImage());
    const Size aIconSize (aIcon.GetSizePixel());
    const Point aIconLocation((GetSizePixel().Width() - aIconSize.Width()) / 2,
                              (GetSizePixel().Height() - aIconSize.Height()) / 2);
    rRenderContext.DrawImage(aIconLocation, aIcon, IsEnabled() ? DrawImageFlags::NONE : DrawImageFlags::Disable);
}

void TabItem::MouseMove(const MouseEvent& rEvent)
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index 6b128ea..20ef4cf 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -40,7 +40,6 @@ struct SfxViewFrame_Impl
    sal_uInt16          nDocViewNo;
    sal_uInt16          nCurViewId;
    bool            bResizeInToOut:1;
    bool            bDontOverwriteResizeInToOut:1;
    bool            bObjLocked:1;
    bool            bReloading:1;
    bool            bIsDowning:1;
@@ -58,7 +57,6 @@ struct SfxViewFrame_Impl
        , nDocViewNo(0)
        , nCurViewId(0)
        , bResizeInToOut(false)
        , bDontOverwriteResizeInToOut(false)
        , bObjLocked(false)
        , bReloading(false)
        , bIsDowning(false)
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 28ea8f5..a98f891 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -259,31 +259,6 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
                return;
            }
        }

        // If only a reload of the graphics for one or more child frames
        // should be made
        SfxFrame& rFrame = GetFrame();
        if ( pParent == &rFrame && rFrame.GetChildFrameCount() )
        {
            bool bReloadAvailable = false;
            SfxFrameIterator aIter( rFrame, false );
            SfxFrame *pChild = aIter.FirstFrame();
            while ( pChild )
            {
                SfxFrame *pNext = aIter.NextFrame( *pChild );
                SfxObjectShell *pShell = pChild->GetCurrentDocument();
                if( pShell && pShell->Get_Impl()->bReloadAvailable )
                {
                    bReloadAvailable = true;
                    pChild->GetCurrentViewFrame()->ExecuteSlot( rReq );
                }
                pChild = pNext;
            }

            // The top level frame itself has no graphics!
            if ( bReloadAvailable )
                return;
        }
    }
    else
    {
@@ -870,31 +845,13 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )

            case SID_RELOAD:
            {
                SfxFrame* pFrame = &GetTopFrame();

                if ( !pSh || !pSh->CanReload_Impl() || pSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
                    rSet.DisableItem(nWhich);
                else
                {
                    // If any ChildFrame is reloadable, the slot is enabled,
                    // so you can perfom CTRL-Reload
                    bool bReloadAvailable = false;
                    SfxFrameIterator aFrameIter( *pFrame, true );
                    for( SfxFrame* pNextFrame = aFrameIter.FirstFrame();
                            pFrame;
                            pNextFrame = pNextFrame ?
                                aFrameIter.NextFrame( *pNextFrame ) : nullptr )
                    {
                        SfxObjectShell *pShell = pFrame->GetCurrentDocument();
                        if( pShell && pShell->Get_Impl()->bReloadAvailable )
                        {
                            bReloadAvailable = true;
                            break;
                        }
                        pFrame = pNextFrame;
                    }

                    rSet.Put( SfxBoolItem( nWhich, bReloadAvailable));
                    rSet.Put( SfxBoolItem( nWhich, false));
                }

                break;
@@ -1373,7 +1330,6 @@ IMPL_LINK_NOARG_TYPED(SfxViewFrame, SwitchReadOnlyHandler, Button*, void)
void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
{
    m_pImpl->bResizeInToOut = true;
    m_pImpl->bDontOverwriteResizeInToOut = false;
    m_pImpl->bObjLocked = false;
    m_pImpl->pFocusWin = nullptr;
    m_pImpl->pActiveChild = nullptr;
@@ -1611,8 +1567,7 @@ SfxViewFrame* SfxViewFrame::GetParentViewFrame_Impl() const

void SfxViewFrame::ForceOuterResize_Impl()
{
    if ( !m_pImpl->bDontOverwriteResizeInToOut )
        m_pImpl->bResizeInToOut = true;
    m_pImpl->bResizeInToOut = true;
}

bool SfxViewFrame::IsResizeInToOut_Impl() const
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index fe3b494..fa3e680 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -45,7 +45,6 @@ struct SfxViewShell_Impl
    bool                        m_bControllerSet;
    SfxShellArr_Impl            aArr;
    Size                        aMargin;
    sal_uInt16                  m_nPrinterLocks;
    bool                        m_bCanPrint;
    bool                        m_bHasPrintOptions;
    bool                        m_bIsShowView;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index fc23ebb..b4b8ad1 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -240,7 +240,6 @@ public:
SfxViewShell_Impl::SfxViewShell_Impl(SfxViewShellFlags const nFlags)
: aInterceptorContainer( aMutex )
,   m_bControllerSet(false)
,   m_nPrinterLocks(0)
,   m_bCanPrint(nFlags & SfxViewShellFlags::CAN_PRINT)
,   m_bHasPrintOptions(nFlags & SfxViewShellFlags::HAS_PRINTOPTIONS)
,   m_bIsShowView(!(nFlags & SfxViewShellFlags::NO_SHOW))
@@ -709,7 +708,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
            case SID_SETUPPRINTER:
            case SID_PRINTER_NAME:
            {
                bool bEnabled = pImpl->m_bCanPrint && !pImpl->m_nPrinterLocks
                bool bEnabled = pImpl->m_bCanPrint
                              && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
                if ( bEnabled )
                {