diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-09 08:37:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-11 07:13:11 +0100 |
commit | f011a01d4b1fc6fd9cdd4178dd2651a51cd897dc (patch) | |
tree | 3374e999e464f54c7bde5f2530067ae86cf0f4a0 /sd | |
parent | 87b44efa2a21279d22a3350b3a3d497284621d52 (diff) |
loplugin:constantparam
Change-Id: Ibe167c208844b4cdd10df80ae804b1e5bfa6aa13
Reviewed-on: https://gerrit.libreoffice.org/68998
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/headerfooterdlg.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/sdtreelb.cxx | 33 | ||||
-rw-r--r-- | sd/source/ui/inc/sdtreelb.hxx | 2 |
3 files changed, 7 insertions, 30 deletions
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index 0659b52f74d3..b0bd74a4ea3d 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -455,7 +455,7 @@ HeaderFooterTabPage::HeaderFooterTabPage( vcl::Window* pWindow, SdDrawDocument* mpCBHeader->SetClickHdl( LINK( this, HeaderFooterTabPage, UpdateOnClickHdl ) ); mpCBSlideNumber->SetClickHdl( LINK( this, HeaderFooterTabPage, UpdateOnClickHdl ) ); - mpCBDateTimeLanguage->SetLanguageList( SvxLanguageListFlags::ALL|SvxLanguageListFlags::ONLY_KNOWN, false ); + mpCBDateTimeLanguage->SetLanguageList( SvxLanguageListFlags::ALL|SvxLanguageListFlags::ONLY_KNOWN, false, false ); mpCBDateTimeLanguage->SetSelectHdl( LINK( this, HeaderFooterTabPage, LanguageChangeHdl ) ); GetOrSetDateTimeLanguage( meOldLanguage, false ); diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 2fa3dc9c4e42..f2152e704a9d 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -1462,42 +1462,19 @@ std::vector<OUString> SdPageObjsTLV::GetSelectEntryList(const int nDepth) const * Checks if it is a draw file and opens the BookmarkDoc depending of * the provided Docs */ -SdDrawDocument* SdPageObjsTLV::GetBookmarkDoc(SfxMedium* pMed) +SdDrawDocument* SdPageObjsTLV::GetBookmarkDoc() { - if ( - !m_pBookmarkDoc || - (pMed && (!m_pOwnMedium || m_pOwnMedium->GetName() != pMed->GetName())) - ) + if (!m_pBookmarkDoc) { // create a new BookmarkDoc if now one exists or if a new Medium is provided - if (m_pOwnMedium != pMed) + if (m_pOwnMedium != nullptr) { CloseBookmarkDoc(); } - if (pMed) - { - // it looks that it is undefined if a Medium was set by Fill() already - DBG_ASSERT( !m_pMedium, "SfxMedium confusion!" ); - delete m_pMedium; - m_pMedium = nullptr; + DBG_ASSERT( m_pMedium, "No SfxMedium provided!" ); - // take over this Medium (currently used only be Navigator) - m_pOwnMedium = pMed; - } - - DBG_ASSERT( m_pMedium || pMed, "No SfxMedium provided!" ); - - if( pMed ) - { - // in this mode the document is also owned and controlled by this instance - m_xBookmarkDocShRef = new ::sd::DrawDocShell(SfxObjectCreateMode::STANDARD, true, DocumentType::Impress); - if (m_xBookmarkDocShRef->DoLoad(pMed)) - m_pBookmarkDoc = m_xBookmarkDocShRef->GetDoc(); - else - m_pBookmarkDoc = nullptr; - } - else if ( m_pMedium ) + if ( m_pMedium ) // in this mode the document is owned and controlled by the SdDrawDocument // it can be released by calling the corresponding CloseBookmarkDoc method // successful creation of a document makes this the owner of the medium diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index b954175c5d18..fdc154ecfd30 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -381,7 +381,7 @@ public: std::vector<OUString> GetSelectEntryList(const int nDepth) const; - SdDrawDocument* GetBookmarkDoc(SfxMedium* pMedium = nullptr); + SdDrawDocument* GetBookmarkDoc(); bool IsLinkableSelected() const { return m_bLinkableSelected; } |