From 20c14c812ccc00692d42d294d3b8dea1774e3511 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 9 Sep 2016 13:26:44 +0200 Subject: loplugin:constantparam in sfx2 Change-Id: If5d401001abb7bf3fc642d47f537b57836e6d9c5 Reviewed-on: https://gerrit.libreoffice.org/28772 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- sfx2/Library_sfx.mk | 2 +- sfx2/source/appl/appinit.cxx | 4 ++-- sfx2/source/appl/appserv.cxx | 13 +++++----- sfx2/source/appl/sfxpicklist.cxx | 9 ++++--- sfx2/source/control/bindings.cxx | 14 ++++------- sfx2/source/control/dispatch.cxx | 6 ++--- sfx2/source/control/emojiview.cxx | 4 ++-- sfx2/source/control/templatesearchview.cxx | 4 ++-- sfx2/source/control/thumbnailview.cxx | 4 ++-- sfx2/source/dialog/basedlgs.cxx | 5 +--- sfx2/source/dialog/mailmodel.cxx | 38 +++++------------------------- sfx2/source/dialog/splitwin.cxx | 4 ++-- sfx2/source/dialog/titledockwin.cxx | 5 ++-- sfx2/source/dialog/tplpitem.cxx | 5 ++-- sfx2/source/doc/saveastemplatedlg.cxx | 4 ++-- sfx2/source/doc/sfxbasemodel.cxx | 4 ++-- sfx2/source/doc/templatedlg.cxx | 4 ++-- sfx2/source/inc/openurlhint.hxx | 38 ++++++++++++++++++++++++++++++ sfx2/source/inc/splitwin.hxx | 3 +-- sfx2/source/inc/stringhint.hxx | 38 ------------------------------ sfx2/source/inc/templatesearchview.hxx | 2 +- sfx2/source/notify/openurlhint.cxx | 34 ++++++++++++++++++++++++++ sfx2/source/notify/stringhint.cxx | 33 -------------------------- sfx2/source/view/viewfrm.cxx | 2 +- sfx2/source/view/viewsh.cxx | 2 +- 25 files changed, 122 insertions(+), 159 deletions(-) create mode 100644 sfx2/source/inc/openurlhint.hxx delete mode 100644 sfx2/source/inc/stringhint.hxx create mode 100644 sfx2/source/notify/openurlhint.cxx delete mode 100644 sfx2/source/notify/stringhint.cxx (limited to 'sfx2') diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index a6220499ce05..9ec5f0ee3af8 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -250,7 +250,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/notify/eventsupplier \ sfx2/source/notify/globalevents \ sfx2/source/notify/hintpost \ - sfx2/source/notify/stringhint \ + sfx2/source/notify/openurlhint \ sfx2/source/sidebar/Sidebar \ sfx2/source/sidebar/SidebarChildWindow \ sfx2/source/sidebar/SidebarDockingWindow \ diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index a1b63462f634..8daf1fa1a94d 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -237,7 +237,7 @@ void SfxApplication::Initialize_Impl() } DBG_ASSERT( !pImpl->pAppDispat, "AppDispatcher already exists" ); - pImpl->pAppDispat = new SfxDispatcher(static_cast(nullptr)); + pImpl->pAppDispat = new SfxDispatcher; pImpl->pSlotPool = new SfxSlotPool; pImpl->pTbxCtrlFac = new SfxTbxCtrlFactArr_Impl; pImpl->pStbCtrlFac = new SfxStbCtrlFactArr_Impl; @@ -263,7 +263,7 @@ void SfxApplication::Initialize_Impl() // App-Dispatcher aufbauen pImpl->pAppDispat->Push(*this); pImpl->pAppDispat->Flush(); - pImpl->pAppDispat->DoActivate_Impl( true, nullptr ); + pImpl->pAppDispat->DoActivate_Impl( true ); { SolarMutexGuard aGuard; diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index b78255b1e17a..e841d2edadd7 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -277,11 +277,11 @@ namespace private: DECL_LINK_TYPED(ShowHdl, Button*, void); public: - explicit LicenseDialog(vcl::Window *pParent=nullptr); + explicit LicenseDialog(); }; - LicenseDialog::LicenseDialog(vcl::Window *pParent) - : ModalDialog(pParent, "LicenseDialog", "sfx/ui/licensedialog.ui") + LicenseDialog::LicenseDialog() + : ModalDialog(nullptr, "LicenseDialog", "sfx/ui/licensedialog.ui") { get("show")->SetClickHdl(LINK(this, LicenseDialog, ShowHdl)); } @@ -396,9 +396,8 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) if ( pFrameItem ) xFrame = pFrameItem->GetFrame(); - std::unique_ptr pDlg(pFact->CreateTabDialog( - RID_SVXDLG_CUSTOMIZE, - nullptr, &aSet, xFrame )); + std::unique_ptr pDlg(pFact->CreateCustomizeTabDialog( + &aSet, xFrame )); if ( pDlg ) { @@ -1548,7 +1547,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), false, &pItem ) == SfxItemState::SET ) aSet.Put( *pItem ); - std::unique_ptr pDlg(pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, nullptr, &aSet, nullptr )); + std::unique_ptr pDlg(pFact->CreateAutoCorrTabDialog( &aSet )); pDlg->Execute(); } diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx index ac0f027aff96..f0e409b78fe0 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -49,7 +49,7 @@ #include #include #include "objshimp.hxx" -#include +#include #include #include @@ -188,11 +188,10 @@ SfxPickList::~SfxPickList() void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint ) { - const SfxStringHint* pStringHint = dynamic_cast(&rHint); - if ( pStringHint ) + const SfxOpenUrlHint* pOpenUrlHint = dynamic_cast(&rHint); + if ( pOpenUrlHint ) { - if ( pStringHint->GetId() == SID_OPENURL ) - INetURLHistory::GetOrCreate()->PutUrl( INetURLObject( pStringHint->GetObject() )); + INetURLHistory::GetOrCreate()->PutUrl( INetURLObject( pOpenUrlHint->GetDocumentURL() )); } const SfxEventHint* pEventHint = dynamic_cast(&rHint); diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 3b782f1edbfa..371ff8f0d4ee 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -951,26 +951,24 @@ void SfxBindings::Release( SfxControllerItem& rItem ) } -const SfxPoolItem* SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolItem** ppItems, - const SfxPoolItem **ppInternalArgs ) +const SfxPoolItem* SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolItem** ppItems ) { DBG_ASSERT( pImpl->pCaches != nullptr, "SfxBindings not initialized" ); if( !nId || !pDispatcher ) return nullptr; - return Execute_Impl( nId, ppItems, 0, SfxCallMode::SYNCHRON, ppInternalArgs ); + return Execute_Impl( nId, ppItems, 0, SfxCallMode::SYNCHRON, nullptr ); } -bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, SfxCallMode nCallMode, - const SfxPoolItem **ppInternalArgs ) +bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, SfxCallMode nCallMode ) { DBG_ASSERT( pImpl->pCaches != nullptr, "SfxBindings not initialized" ); if( !nId || !pDispatcher ) return false; - const SfxPoolItem* pRet = Execute_Impl( nId, ppItems, 0, nCallMode, ppInternalArgs ); + const SfxPoolItem* pRet = Execute_Impl( nId, ppItems, 0, nCallMode, nullptr ); return ( pRet != nullptr ); } @@ -1595,11 +1593,9 @@ sal_uInt16 SfxBindings::EnterRegistrations(const char *pFile, int nLine) } -void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int nLine ) +void SfxBindings::LeaveRegistrations( const char *pFile, int nLine ) { - (void)nLevel; // unused variable DBG_ASSERT( nRegLevel, "Leave without Enter" ); - DBG_ASSERT( nLevel == USHRT_MAX || nLevel == nRegLevel, "wrong Leave" ); // Only when the SubBindings are still locked by the Superbindings, // remove this lock (i.e. if there are more locks than "real" ones) diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index c959816ed449..a83c6cb8361a 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -457,9 +457,9 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent ) xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); } -SfxDispatcher::SfxDispatcher( SfxDispatcher* pParent ) +SfxDispatcher::SfxDispatcher() { - Construct_Impl( pParent ); + Construct_Impl( nullptr ); xImp->pFrame = nullptr; } @@ -742,7 +742,7 @@ SfxViewFrame* SfxDispatcher::GetFrame() const are called with the handler , starting with the lowest. */ -void SfxDispatcher::DoActivate_Impl(bool bMDI, SfxViewFrame* /* pOld */) +void SfxDispatcher::DoActivate_Impl(bool bMDI) { SFX_STACK(SfxDispatcher::DoActivate); if ( bMDI ) diff --git a/sfx2/source/control/emojiview.cxx b/sfx2/source/control/emojiview.cxx index c29ea7533dcd..6ab877f9d4c2 100644 --- a/sfx2/source/control/emojiview.cxx +++ b/sfx2/source/control/emojiview.cxx @@ -65,8 +65,8 @@ bool ViewFilter_Category::operator () (const ThumbnailViewItem *pItem) return true; } -EmojiView::EmojiView (vcl::Window *pParent, WinBits nWinStyle) - : ThumbnailView(pParent,nWinStyle) +EmojiView::EmojiView (vcl::Window *pParent) + : ThumbnailView(pParent, WB_TABSTOP | WB_VSCROLL) { //locate json data file OUString sPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/emojiconfig/emoji.json"); diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx index d86172ccf96d..1f3fc76ee469 100644 --- a/sfx2/source/control/templatesearchview.cxx +++ b/sfx2/source/control/templatesearchview.cxx @@ -23,8 +23,8 @@ #define MNI_DEFAULT_TEMPLATE 3 #define MNI_DELETE 4 -TemplateSearchView::TemplateSearchView (vcl::Window *pParent, WinBits nWinStyle) - : ThumbnailView(pParent,nWinStyle), +TemplateSearchView::TemplateSearchView (vcl::Window *pParent) + : ThumbnailView(pParent,WB_TABSTOP | WB_VSCROLL), maSelectedItem(nullptr), maPosition(0,0) { diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index a6a48e89ccaf..716883c47825 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -57,12 +57,12 @@ enum SCROLL_OFFSET = 4 }; -ThumbnailView::ThumbnailView (vcl::Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren) +ThumbnailView::ThumbnailView (vcl::Window *pParent, WinBits nWinStyle) : Control( pParent, nWinStyle ) , mpItemAttrs(new ThumbnailItemAttributes) { ImplInit(); - mbIsTransientChildrenDisabled = bDisableTransientChildren; + mbIsTransientChildrenDisabled = false; } ThumbnailView::~ThumbnailView() diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index d694dee656a9..d97ae949afeb 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -665,7 +665,6 @@ IMPL_LINK_NOARG_TYPED(SfxSingleTabDialog, OKHdl_Impl, Button*, void) SfxSingleTabDialog::SfxSingleTabDialog(vcl::Window *pParent, const SfxItemSet& rSet, const OUString& rID, const OUString& rUIXMLDescription) : SfxModalDialog(pParent, rID, rUIXMLDescription) - , fnGetRanges(nullptr) , pImpl(new SingleTabDlgImpl) { get(pOKBtn, "ok"); @@ -678,7 +677,6 @@ SfxSingleTabDialog::SfxSingleTabDialog(vcl::Window *pParent, const SfxItemSet& r SfxSingleTabDialog::SfxSingleTabDialog(vcl::Window* pParent, const SfxItemSet* pInSet, const OUString& rID, const OUString& rUIXMLDescription) : SfxModalDialog(pParent, rID, rUIXMLDescription) - , fnGetRanges(nullptr) , pImpl(new SingleTabDlgImpl) { get(pOKBtn, "ok"); @@ -705,7 +703,7 @@ void SfxSingleTabDialog::dispose() } void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage, - GetTabPageRanges pRangesFunc, sal_uInt32 nSettingsId) + sal_uInt32 nSettingsId) /* [Description] Insert a (new) TabPage; an existing page is deleted. @@ -717,7 +715,6 @@ void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage, SetUniqId(nSettingsId); pImpl->m_pSfxPage.disposeAndClear(); pImpl->m_pSfxPage = pTabPage; - fnGetRanges = pRangesFunc; if ( pImpl->m_pSfxPage ) { diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index c7995c9f2a08..9d6e6b3ae1ca 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -656,43 +656,17 @@ SfxMailModel::~SfxMailModel() { } -void SfxMailModel::AddAddress( const OUString& rAddress, AddressRole eRole ) +void SfxMailModel::AddToAddress( const OUString& rAddress ) { // don't add a empty address if ( !rAddress.isEmpty() ) { - AddressList_Impl* pList = nullptr; - if ( ROLE_TO == eRole ) - { - if ( !mpToList ) - // create the list - mpToList.reset(new AddressList_Impl); - pList = mpToList.get(); - } - else if ( ROLE_CC == eRole ) - { - if ( !mpCcList ) - // create the list - mpCcList.reset(new AddressList_Impl); - pList = mpCcList.get(); - } - else if ( ROLE_BCC == eRole ) - { - if ( !mpBccList ) - // create the list - mpBccList.reset(new AddressList_Impl); - pList = mpBccList.get(); - } - else - { - SAL_WARN( "sfx.dialog", "invalid address role" ); - } + if ( !mpToList ) + // create the list + mpToList.reset(new AddressList_Impl); - if ( pList ) - { - // add address to list - pList->push_back( rAddress ); - } + // add address to list + mpToList->push_back( rAddress ); } } diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 39e6bcd92ed1..bbe836309a11 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -179,7 +179,7 @@ void SfxSplitWindow::MouseButtonDown( const MouseEvent& rMEvt ) } SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl, - SfxWorkWindow *pW, bool bWithButtons, WinBits nBits ) + SfxWorkWindow *pW, bool bWithButtons ) /* [Description] @@ -189,7 +189,7 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl, the arrangement of the SfxDockingWindows. */ -: SplitWindow ( pParent, nBits | WB_HIDE ), +: SplitWindow ( pParent, WB_BORDER | WB_SIZEABLE | WB_3DLOOK | WB_HIDE ), eAlign(eAl), pWorkWin(pW), pDockArr( new SfxDockArr_Impl ), diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx index bfa9d6782f56..27f292be0249 100644 --- a/sfx2/source/dialog/titledockwin.cxx +++ b/sfx2/source/dialog/titledockwin.cxx @@ -31,9 +31,8 @@ namespace sfx2 { //= TitledDockingWindow - TitledDockingWindow::TitledDockingWindow( SfxBindings* i_pBindings, SfxChildWindow* i_pChildWindow, vcl::Window* i_pParent, - WinBits i_nStyle ) - :SfxDockingWindow( i_pBindings, i_pChildWindow, i_pParent, i_nStyle ) + TitledDockingWindow::TitledDockingWindow( SfxBindings* i_pBindings, SfxChildWindow* i_pChildWindow, vcl::Window* i_pParent ) + :SfxDockingWindow( i_pBindings, i_pChildWindow, i_pParent, WB_MOVEABLE|WB_CLOSEABLE|WB_DOCKABLE|WB_HIDE|WB_3DLOOK ) ,m_sTitle() ,m_aToolbox( VclPtr::Create(this) ) ,m_aContentWindow( VclPtr::Create(this, WB_DIALOGCONTROL) ) diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx index 6df782b266d2..6f5f77ef1d37 100644 --- a/sfx2/source/dialog/tplpitem.cxx +++ b/sfx2/source/dialog/tplpitem.cxx @@ -31,9 +31,8 @@ SfxTemplateItem::SfxTemplateItem() : SfxTemplateItem::SfxTemplateItem ( sal_uInt16 nWhichId, // Slot-ID - const OUString& rStyle, // Name of the current Styles - sal_uInt16 nValue // Flags for the filters of the automatic display -) : SfxFlagItem( nWhichId, nValue ), + const OUString& rStyle // Name of the current Styles +) : SfxFlagItem( nWhichId, SFXSTYLEBIT_ALL ), aStyle( rStyle ) { } diff --git a/sfx2/source/doc/saveastemplatedlg.cxx b/sfx2/source/doc/saveastemplatedlg.cxx index cd384ac545aa..e2d103cf89c4 100644 --- a/sfx2/source/doc/saveastemplatedlg.cxx +++ b/sfx2/source/doc/saveastemplatedlg.cxx @@ -33,8 +33,8 @@ using namespace ::com::sun::star::frame; // Class SfxSaveAsTemplateDialog -------------------------------------------------- -SfxSaveAsTemplateDialog::SfxSaveAsTemplateDialog( vcl::Window* pParent): - ModalDialog(pParent, "SaveAsTemplateDialog", "sfx/ui/saveastemplatedlg.ui"), +SfxSaveAsTemplateDialog::SfxSaveAsTemplateDialog(): + ModalDialog(nullptr, "SaveAsTemplateDialog", "sfx/ui/saveastemplatedlg.ui"), msSelectedCategory(OUString()), msTemplateName(OUString()), mnRegionPos(0), diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 17c8411d462a..62e87918b82b 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -111,7 +111,7 @@ #include #include "graphhelp.hxx" #include "docundomanager.hxx" -#include +#include #include #include #include "printhelper.hxx" @@ -1074,7 +1074,7 @@ void SAL_CALL SfxBaseModel::connectController( const Reference< frame::XControll pViewFrame->UpdateDocument_Impl(); const OUString sDocumentURL = GetObjectShell()->GetMedium()->GetName(); if ( !sDocumentURL.isEmpty() ) - SfxGetpApp()->Broadcast( SfxStringHint( SID_OPENURL, sDocumentURL ) ); + SfxGetpApp()->Broadcast( SfxOpenUrlHint( sDocumentURL ) ); } } diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index f746147fa1e8..fae62da8a5d1 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -1289,8 +1289,8 @@ static std::vector lcl_getAllFactoryURLs () // Class SfxTemplateCategoryDialog -------------------------------------------------- -SfxTemplateCategoryDialog::SfxTemplateCategoryDialog( vcl::Window* pParent): - ModalDialog(pParent, "TemplatesCategoryDialog", "sfx/ui/templatecategorydlg.ui"), +SfxTemplateCategoryDialog::SfxTemplateCategoryDialog(): + ModalDialog(nullptr, "TemplatesCategoryDialog", "sfx/ui/templatecategorydlg.ui"), msSelectedCategory(OUString()), mbIsNewCategory(false) { diff --git a/sfx2/source/inc/openurlhint.hxx b/sfx2/source/inc/openurlhint.hxx new file mode 100644 index 000000000000..ae8356ede52a --- /dev/null +++ b/sfx2/source/inc/openurlhint.hxx @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SFX2_STRINGHINT_HXX +#define INCLUDED_SFX2_STRINGHINT_HXX + +#include +#include + +class SfxOpenUrlHint: public SfxSimpleHint +{ + OUString msDocumentURL; + +public: + SfxOpenUrlHint(const OUString& sDocumentURL); + const OUString& GetDocumentURL() const; + virtual ~SfxOpenUrlHint(); +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx index b0a97b69dfd7..389384b37906 100644 --- a/sfx2/source/inc/splitwin.hxx +++ b/sfx2/source/inc/splitwin.hxx @@ -76,8 +76,7 @@ protected: public: SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl, - SfxWorkWindow *pW, bool bWithButtons, - WinBits nBits = WB_BORDER | WB_SIZEABLE | WB_3DLOOK ); + SfxWorkWindow *pW, bool bWithButtons ); virtual ~SfxSplitWindow(); virtual void dispose() override; diff --git a/sfx2/source/inc/stringhint.hxx b/sfx2/source/inc/stringhint.hxx deleted file mode 100644 index 4c2ed2ebdd67..000000000000 --- a/sfx2/source/inc/stringhint.hxx +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SFX2_STRINGHINT_HXX -#define INCLUDED_SFX2_STRINGHINT_HXX - -#include -#include - -class SfxStringHint: public SfxSimpleHint -{ - OUString aObj; - -public: - SfxStringHint(sal_uInt16 nId, const OUString& rObject); - const OUString& GetObject() const; - virtual ~SfxStringHint(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/inc/templatesearchview.hxx b/sfx2/source/inc/templatesearchview.hxx index ce3c44b0ee37..c7d3fb7997b4 100644 --- a/sfx2/source/inc/templatesearchview.hxx +++ b/sfx2/source/inc/templatesearchview.hxx @@ -19,7 +19,7 @@ class TemplateSearchView : public ThumbnailView { public: - TemplateSearchView ( vcl::Window* pParent, WinBits nWinStyle = WB_TABSTOP | WB_VSCROLL); + TemplateSearchView ( vcl::Window* pParent); void setOpenTemplateHdl (const Link &rLink); diff --git a/sfx2/source/notify/openurlhint.cxx b/sfx2/source/notify/openurlhint.cxx new file mode 100644 index 000000000000..1eba43b358dc --- /dev/null +++ b/sfx2/source/notify/openurlhint.cxx @@ -0,0 +1,34 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include +#include + +SfxOpenUrlHint::SfxOpenUrlHint( const OUString& sDocumentURL ) : + SfxSimpleHint( SID_OPENURL ), + msDocumentURL(sDocumentURL) { } + +const OUString& SfxOpenUrlHint::GetDocumentURL() const +{ + return msDocumentURL; +} + +SfxOpenUrlHint::~SfxOpenUrlHint() {} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/notify/stringhint.cxx b/sfx2/source/notify/stringhint.cxx deleted file mode 100644 index 980cf95d1880..000000000000 --- a/sfx2/source/notify/stringhint.cxx +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include - -SfxStringHint::SfxStringHint( sal_uInt16 nId, const OUString& rObject ) : - SfxSimpleHint( nId ), - aObj(rObject) { } - -const OUString& SfxStringHint::GetObject() const -{ - return aObj; -} - -SfxStringHint::~SfxStringHint() {} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index f1c93d81243e..963876a8a859 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1077,7 +1077,7 @@ void SfxViewFrame::DoActivate( bool bUI ) { SfxGetpApp(); - m_pDispatcher->DoActivate_Impl( bUI, nullptr ); + m_pDispatcher->DoActivate_Impl( bUI ); // If this ViewFrame has got a parent and this is not a parent of the // old ViewFrames, it gets a ParentActivate. diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 710c9cbb1189..e2d2473f71c5 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -508,7 +508,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) if ( aRecipient.startsWith( aMailToStr ) ) aRecipient = aRecipient.copy( aMailToStr.getLength() ); - aModel.AddAddress( aRecipient, SfxMailModel::ROLE_TO ); + aModel.AddToAddress( aRecipient ); } const SfxStringItem* pMailDocType = rReq.GetArg(SID_TYPE_NAME); if ( pMailDocType ) -- cgit