diff options
Diffstat (limited to 'sw/source')
151 files changed, 952 insertions, 948 deletions
diff --git a/sw/source/core/access/accheaderfooter.hxx b/sw/source/core/access/accheaderfooter.hxx index f948311c777f..821ed9883451 100644 --- a/sw/source/core/access/accheaderfooter.hxx +++ b/sw/source/core/access/accheaderfooter.hxx @@ -31,34 +31,30 @@ protected: virtual ~SwAccessibleHeaderFooter() override; public: - SwAccessibleHeaderFooter( std::shared_ptr<SwAccessibleMap> const& pInitMap, - const SwHeaderFrame* pHdFrame ); - SwAccessibleHeaderFooter( std::shared_ptr<SwAccessibleMap> const& pInitMap, - const SwFooterFrame* pFtFrame ); + SwAccessibleHeaderFooter(std::shared_ptr<SwAccessibleMap> const& pInitMap, + const SwHeaderFrame* pHdFrame); + SwAccessibleHeaderFooter(std::shared_ptr<SwAccessibleMap> const& pInitMap, + const SwFooterFrame* pFtFrame); // XAccessibleContext /// Return this object's description. - virtual OUString SAL_CALL - getAccessibleDescription() override; + virtual OUString SAL_CALL getAccessibleDescription() override; // XServiceInfo /** Returns an identifier for the implementation of this object. */ - virtual OUString SAL_CALL - getImplementationName() override; + virtual OUString SAL_CALL getImplementationName() override; /** Return whether the specified service is supported by this class. */ - virtual sal_Bool SAL_CALL - supportsService (const OUString& sServiceName) override; + virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override; /** Returns a list of all supported services. In this case that is just the AccessibleContext service. */ - virtual css::uno::Sequence< OUString> SAL_CALL - getSupportedServiceNames() override; + virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; // XTypeProvider - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override; + virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId() override; // XAccessibleComponent sal_Int32 SAL_CALL getBackground() override; }; diff --git a/sw/source/core/attr/fmtfollowtextflow.cxx b/sw/source/core/attr/fmtfollowtextflow.cxx index 8b04869afc5a..71c390d4bbbe 100644 --- a/sw/source/core/attr/fmtfollowtextflow.cxx +++ b/sw/source/core/attr/fmtfollowtextflow.cxx @@ -22,7 +22,7 @@ #include <sal/log.hxx> -SwFormatFollowTextFlow* SwFormatFollowTextFlow::Clone( SfxItemPool * ) const +SwFormatFollowTextFlow* SwFormatFollowTextFlow::Clone(SfxItemPool*) const { return new SwFormatFollowTextFlow(*this); } diff --git a/sw/source/core/bastyp/SwSmartTagMgr.cxx b/sw/source/core/bastyp/SwSmartTagMgr.cxx index 096705e8ba73..e99c11a02f93 100644 --- a/sw/source/core/bastyp/SwSmartTagMgr.cxx +++ b/sw/source/core/bastyp/SwSmartTagMgr.cxx @@ -30,41 +30,39 @@ SwSmartTagMgr* SwSmartTagMgr::spTheSwSmartTagMgr = nullptr; SwSmartTagMgr& SwSmartTagMgr::Get() { - if ( !spTheSwSmartTagMgr ) + if (!spTheSwSmartTagMgr) { - spTheSwSmartTagMgr = new SwSmartTagMgr( SwDocShell::Factory().GetModuleName() ); + spTheSwSmartTagMgr = new SwSmartTagMgr(SwDocShell::Factory().GetModuleName()); spTheSwSmartTagMgr->Init("Writer"); } return *spTheSwSmartTagMgr; } -SwSmartTagMgr::SwSmartTagMgr( const OUString& rModuleName ) : - SmartTagMgr( rModuleName ) +SwSmartTagMgr::SwSmartTagMgr(const OUString& rModuleName) + : SmartTagMgr(rModuleName) { } -SwSmartTagMgr::~SwSmartTagMgr() -{ -} +SwSmartTagMgr::~SwSmartTagMgr() {} -void SwSmartTagMgr::modified( const lang::EventObject& rEO ) +void SwSmartTagMgr::modified(const lang::EventObject& rEO) { SolarMutexGuard aGuard; // Installed recognizers have changed. We remove all existing smart tags: - SwModule::CheckSpellChanges( false, true, true, true ); + SwModule::CheckSpellChanges(false, true, true, true); - SmartTagMgr::modified( rEO ); + SmartTagMgr::modified(rEO); } -void SwSmartTagMgr::changesOccurred( const util::ChangesEvent& rEvent ) +void SwSmartTagMgr::changesOccurred(const util::ChangesEvent& rEvent) { SolarMutexGuard aGuard; // Configuration has changed. We remove all existing smart tags: - SwModule::CheckSpellChanges( false, true, true, true ); + SwModule::CheckSpellChanges(false, true, true, true); - SmartTagMgr::changesOccurred( rEvent ); + SmartTagMgr::changesOccurred(rEvent); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/bastyp/checkit.cxx b/sw/source/core/bastyp/checkit.cxx index 69066ff5cbac..f6e00314dbe0 100644 --- a/sw/source/core/bastyp/checkit.cxx +++ b/sw/source/core/bastyp/checkit.cxx @@ -26,7 +26,7 @@ using namespace ::com::sun::star::i18n; SwCheckIt::SwCheckIt() { - Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); + Reference<XComponentContext> xContext = ::comphelper::getProcessComponentContext(); xCheck = InputSequenceChecker::create(xContext); } diff --git a/sw/source/core/bastyp/proofreadingiterator.cxx b/sw/source/core/bastyp/proofreadingiterator.cxx index 7d09b1676ccd..64c0ac2b1d09 100644 --- a/sw/source/core/bastyp/proofreadingiterator.cxx +++ b/sw/source/core/bastyp/proofreadingiterator.cxx @@ -18,27 +18,24 @@ #include <proofreadingiterator.hxx> -namespace { - +namespace +{ css::uno::Reference<css::linguistic2::XProofreadingIterator> instance; bool disposed = false; -void doDispose( - css::uno::Reference<css::linguistic2::XProofreadingIterator> const & - inst) +void doDispose(css::uno::Reference<css::linguistic2::XProofreadingIterator> const& inst) { css::uno::Reference<css::lang::XComponent> comp(inst, css::uno::UNO_QUERY); - if (comp.is()) { + if (comp.is()) + { SolarMutexReleaser r; comp->dispose(); } } - } css::uno::Reference<css::linguistic2::XProofreadingIterator> -sw::proofreadingiterator::get( - css::uno::Reference<css::uno::XComponentContext> const & context) +sw::proofreadingiterator::get(css::uno::Reference<css::uno::XComponentContext> const& context) { css::uno::Reference<css::linguistic2::XProofreadingIterator> inst( css::linguistic2::ProofreadingIterator::create(context)); @@ -48,13 +45,15 @@ sw::proofreadingiterator::get( instance = inst; disp = disposed; } - if (disp) { + if (disp) + { doDispose(inst); } return inst; } -void sw::proofreadingiterator::dispose() { +void sw::proofreadingiterator::dispose() +{ css::uno::Reference<css::linguistic2::XProofreadingIterator> inst; { SolarMutexGuard g; diff --git a/sw/source/core/bastyp/swtypes.cxx b/sw/source/core/bastyp/swtypes.cxx index 59c01abb55cb..507804363e9a 100644 --- a/sw/source/core/bastyp/swtypes.cxx +++ b/sw/source/core/bastyp/swtypes.cxx @@ -49,22 +49,16 @@ Size GetGraphicSizeTwip(const Graphic& rGraphic, vcl::RenderContext* pOutDev) return aSize; } -uno::Reference< linguistic2::XSpellChecker1 > GetSpellChecker() +uno::Reference<linguistic2::XSpellChecker1> GetSpellChecker() { return LinguMgr::GetSpellChecker(); } -uno::Reference< linguistic2::XHyphenator > GetHyphenator() -{ - return LinguMgr::GetHyphenator(); -} +uno::Reference<linguistic2::XHyphenator> GetHyphenator() { return LinguMgr::GetHyphenator(); } -uno::Reference< linguistic2::XThesaurus > GetThesaurus() -{ - return LinguMgr::GetThesaurus(); -} +uno::Reference<linguistic2::XThesaurus> GetThesaurus() { return LinguMgr::GetThesaurus(); } -uno::Reference< linguistic2::XLinguProperties > GetLinguPropertySet() +uno::Reference<linguistic2::XLinguProperties> GetLinguPropertySet() { return LinguMgr::GetLinguPropertySet(); } diff --git a/sw/source/core/crsr/BlockCursor.cxx b/sw/source/core/crsr/BlockCursor.cxx index 5c986ab86552..0dd0f5dff6c0 100644 --- a/sw/source/core/crsr/BlockCursor.cxx +++ b/sw/source/core/crsr/BlockCursor.cxx @@ -20,13 +20,8 @@ #include <viscrs.hxx> #include "BlockCursor.hxx" -SwBlockCursor::~SwBlockCursor() -{ -} +SwBlockCursor::~SwBlockCursor() {} -SwShellCursor& SwBlockCursor::getShellCursor() -{ - return maCursor; -} +SwShellCursor& SwBlockCursor::getShellCursor() { return maCursor; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/swstylemanager.hxx b/sw/source/core/doc/swstylemanager.hxx index b1301b2f13f6..4b27b02746a1 100644 --- a/sw/source/core/doc/swstylemanager.hxx +++ b/sw/source/core/doc/swstylemanager.hxx @@ -25,7 +25,7 @@ class IStyleAccess; class SfxItemSet; -std::unique_ptr<IStyleAccess> createStyleManager( SfxItemSet const * pIgnorableParagraphItems ); +std::unique_ptr<IStyleAccess> createStyleManager(SfxItemSet const* pIgnorableParagraphItems); #endif // INCLUDED_SW_SOURCE_CORE_DOC_SWSTYLEMANAGER_HXX diff --git a/sw/source/core/docnode/cancellablejob.hxx b/sw/source/core/docnode/cancellablejob.hxx index ecd226b51645..010e1f4dec6f 100644 --- a/sw/source/core/docnode/cancellablejob.hxx +++ b/sw/source/core/docnode/cancellablejob.hxx @@ -31,16 +31,16 @@ class CancellableJob : public ::cppu::WeakImplHelper<css::util::XCancellable> { public: - explicit CancellableJob( const ::rtl::Reference< ObservableThread >& rThread ); + explicit CancellableJob(const ::rtl::Reference<ObservableThread>& rThread); // css::util::XCancellable: virtual void SAL_CALL cancel() override; private: - CancellableJob( CancellableJob const & ) = delete; - void operator =( CancellableJob const & ) = delete; + CancellableJob(CancellableJob const&) = delete; + void operator=(CancellableJob const&) = delete; - ::rtl::Reference< ObservableThread > mrThread; + ::rtl::Reference<ObservableThread> mrThread; }; #endif diff --git a/sw/source/core/docnode/ndsect.hxx b/sw/source/core/docnode/ndsect.hxx index 70e3ed72f695..286f9d35c1e0 100644 --- a/sw/source/core/docnode/ndsect.hxx +++ b/sw/source/core/docnode/ndsect.hxx @@ -24,8 +24,7 @@ class SwSectionNode; -void sw_DeleteFootnote( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd ); - +void sw_DeleteFootnote(SwSectionNode* pNd, sal_uLong nStt, sal_uLong nEnd); #endif diff --git a/sw/source/core/docnode/pausethreadstarting.cxx b/sw/source/core/docnode/pausethreadstarting.cxx index 5d93ea9236d9..953bd3a3f8fd 100644 --- a/sw/source/core/docnode/pausethreadstarting.cxx +++ b/sw/source/core/docnode/pausethreadstarting.cxx @@ -27,10 +27,10 @@ */ SwPauseThreadStarting::SwPauseThreadStarting() - : mbPausedThreadStarting( false ) + : mbPausedThreadStarting(false) { - if ( SwThreadManager::ExistsThreadManager() && - !SwThreadManager::GetThreadManager().StartingOfThreadsSuspended() ) + if (SwThreadManager::ExistsThreadManager() + && !SwThreadManager::GetThreadManager().StartingOfThreadsSuspended()) { SwThreadManager::GetThreadManager().SuspendStartingOfThreads(); mbPausedThreadStarting = true; @@ -39,7 +39,7 @@ SwPauseThreadStarting::SwPauseThreadStarting() SwPauseThreadStarting::~SwPauseThreadStarting() COVERITY_NOEXCEPT_FALSE { - if ( mbPausedThreadStarting ) + if (mbPausedThreadStarting) { SwThreadManager::GetThreadManager().ResumeStartingOfThreads(); } diff --git a/sw/source/core/docnode/swthreadjoiner.cxx b/sw/source/core/docnode/swthreadjoiner.cxx index ee5a3144cdf3..d13540d33ff8 100644 --- a/sw/source/core/docnode/swthreadjoiner.cxx +++ b/sw/source/core/docnode/swthreadjoiner.cxx @@ -29,26 +29,25 @@ using namespace ::com::sun::star; namespace { - class theJoinerMutex : public rtl::Static<osl::Mutex, theJoinerMutex> {}; +class theJoinerMutex : public rtl::Static<osl::Mutex, theJoinerMutex> +{ +}; - uno::Reference< util::XJobManager > pThreadJoiner; +uno::Reference<util::XJobManager> pThreadJoiner; } -uno::Reference< util::XJobManager >& SwThreadJoiner::GetThreadJoiner() +uno::Reference<util::XJobManager>& SwThreadJoiner::GetThreadJoiner() { osl::MutexGuard aGuard(theJoinerMutex::get()); - if ( !pThreadJoiner.is() ) + if (!pThreadJoiner.is()) { - pThreadJoiner = util::JobManager::create( comphelper::getProcessComponentContext() ); + pThreadJoiner = util::JobManager::create(comphelper::getProcessComponentContext()); } return pThreadJoiner; } -void SwThreadJoiner::ReleaseThreadJoiner() -{ - pThreadJoiner.clear(); -} +void SwThreadJoiner::ReleaseThreadJoiner() { pThreadJoiner.clear(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/edfldexp.cxx b/sw/source/core/edit/edfldexp.cxx index ebf5cabab643..3247d0500523 100644 --- a/sw/source/core/edit/edfldexp.cxx +++ b/sw/source/core/edit/edfldexp.cxx @@ -30,24 +30,25 @@ using namespace com::sun::star; bool SwEditShell::IsFieldDataSourceAvailable(OUString& rUsedDataSource) const { - const SwFieldTypes * pFieldTypes = GetDoc()->getIDocumentFieldsAccess().GetFieldTypes(); - uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); + const SwFieldTypes* pFieldTypes = GetDoc()->getIDocumentFieldsAccess().GetFieldTypes(); + uno::Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext()); uno::Reference<sdb::XDatabaseContext> xDBContext = sdb::DatabaseContext::create(xContext); std::vector<SwFormatField*> vFields; - for(const auto& pFieldType : *pFieldTypes) + for (const auto& pFieldType : *pFieldTypes) { - if(IsUsed(*pFieldType) && pFieldType->Which() == SwFieldIds::Database) + if (IsUsed(*pFieldType) && pFieldType->Which() == SwFieldIds::Database) pFieldType->GatherFields(vFields); } - if(!vFields.size()) + if (!vFields.size()) return true; - const SwDBData& rData = static_cast<SwDBFieldType*>(vFields.front()->GetField()->GetTyp())->GetDBData(); + const SwDBData& rData + = static_cast<SwDBFieldType*>(vFields.front()->GetField()->GetTyp())->GetDBData(); try { return xDBContext->getByName(rData.sDataSource).hasValue(); } - catch(uno::Exception const &) + catch (uno::Exception const&) { rUsedDataSource = rData.sDataSource; return false; diff --git a/sw/source/core/inc/DocumentDeviceManager.hxx b/sw/source/core/inc/DocumentDeviceManager.hxx index 46c682817247..4880fc75eaf4 100644 --- a/sw/source/core/inc/DocumentDeviceManager.hxx +++ b/sw/source/core/inc/DocumentDeviceManager.hxx @@ -30,39 +30,37 @@ class OutputDevice; class JobSetup; class SwPrintData; -namespace sw { - +namespace sw +{ class DocumentDeviceManager : public IDocumentDeviceAccess { - public: + DocumentDeviceManager(SwDoc& i_rSwdoc); - DocumentDeviceManager( SwDoc& i_rSwdoc ); + SfxPrinter* getPrinter(/*[in]*/ bool bCreate) const override; - SfxPrinter* getPrinter(/*[in]*/ bool bCreate ) const override; + void setPrinter(/*[in]*/ SfxPrinter* pP, /*[in]*/ bool bDeleteOld, + /*[in]*/ bool bCallPrtDataChanged) override; - void setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged ) override; + VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate) const override; - VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate ) const override; + void setVirtualDevice(/*[in]*/ VirtualDevice* pVd) override; - void setVirtualDevice(/*[in]*/ VirtualDevice* pVd ) override; + OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate) const override; - OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate ) const override; - - void setReferenceDeviceType(/*[in]*/ bool bNewVirtual, /*[in]*/ bool bNewHiRes ) override; + void setReferenceDeviceType(/*[in]*/ bool bNewVirtual, /*[in]*/ bool bNewHiRes) override; const JobSetup* getJobsetup() const override; - void setJobsetup(/*[in]*/ const JobSetup &rJobSetup ) override; + void setJobsetup(/*[in]*/ const JobSetup& rJobSetup) override; - const SwPrintData & getPrintData() const override; + const SwPrintData& getPrintData() const override; - void setPrintData(/*[in]*/ const SwPrintData& rPrtData ) override; + void setPrintData(/*[in]*/ const SwPrintData& rPrtData) override; virtual ~DocumentDeviceManager() override; private: - DocumentDeviceManager(DocumentDeviceManager const&) = delete; DocumentDeviceManager& operator=(DocumentDeviceManager const&) = delete; @@ -77,7 +75,6 @@ private: VclPtr<VirtualDevice> mpVirDev; std::unique_ptr<SwPrintData> mpPrtData; }; - } #endif diff --git a/sw/source/core/inc/DocumentDrawModelManager.hxx b/sw/source/core/inc/DocumentDrawModelManager.hxx index 2f86e2d732ee..b55dd333ba99 100644 --- a/sw/source/core/inc/DocumentDrawModelManager.hxx +++ b/sw/source/core/inc/DocumentDrawModelManager.hxx @@ -30,12 +30,10 @@ class SwDoc; namespace sw { - class DocumentDrawModelManager : public IDocumentDrawModelAccess { public: - - DocumentDrawModelManager( SwDoc& i_rSwdoc ); + DocumentDrawModelManager(SwDoc& i_rSwdoc); void InitDrawModel(); void ReleaseDrawModel(); @@ -53,16 +51,15 @@ public: virtual SdrLayerID GetInvisibleHellId() const override; virtual SdrLayerID GetInvisibleControlsId() const override; - virtual void NotifyInvisibleLayers( SdrPageView& _rSdrPageView ) override; + virtual void NotifyInvisibleLayers(SdrPageView& _rSdrPageView) override; - virtual bool IsVisibleLayerId( SdrLayerID _nLayerId ) const override; + virtual bool IsVisibleLayerId(SdrLayerID _nLayerId) const override; - virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( SdrLayerID _nVisibleLayerId ) override; + virtual SdrLayerID GetInvisibleLayerIdByVisibleOne(SdrLayerID _nVisibleLayerId) override; virtual bool Search(const SwPaM& rPaM, const SvxSearchItem& rSearchItem) override; private: - DocumentDrawModelManager(DocumentDrawModelManager const&) = delete; DocumentDrawModelManager& operator=(DocumentDrawModelManager const&) = delete; @@ -82,7 +79,6 @@ private: SdrLayerID mnInvisibleHell; SdrLayerID mnInvisibleControls; }; - } #endif diff --git a/sw/source/core/inc/DocumentExternalDataManager.hxx b/sw/source/core/inc/DocumentExternalDataManager.hxx index 068d87eed006..3cbe1957d910 100644 --- a/sw/source/core/inc/DocumentExternalDataManager.hxx +++ b/sw/source/core/inc/DocumentExternalDataManager.hxx @@ -22,11 +22,10 @@ #include <IDocumentExternalData.hxx> -namespace sw { - +namespace sw +{ class DocumentExternalDataManager : public IDocumentExternalData { - private: DocumentExternalDataManager(DocumentExternalDataManager const&) = delete; DocumentExternalDataManager& operator=(DocumentExternalDataManager const&) = delete; @@ -34,13 +33,12 @@ private: public: DocumentExternalDataManager() = default; - void setExternalData( ::sw::tExternalDataType eType, ::sw::tExternalDataPointer pPayload) override; + void setExternalData(::sw::tExternalDataType eType, + ::sw::tExternalDataPointer pPayload) override; ::sw::tExternalDataPointer getExternalData(::sw::tExternalDataType eType) override; }; - } #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ - diff --git a/sw/source/core/inc/DocumentStatisticsManager.hxx b/sw/source/core/inc/DocumentStatisticsManager.hxx index 7986610e9bfc..b74d530cd51c 100644 --- a/sw/source/core/inc/DocumentStatisticsManager.hxx +++ b/sw/source/core/inc/DocumentStatisticsManager.hxx @@ -27,25 +27,22 @@ class SwDoc; struct SwDocStat; -namespace sw { - +namespace sw +{ class DocumentStatisticsManager : public IDocumentStatistics { - public: - - DocumentStatisticsManager( SwDoc& i_rSwdoc ); + DocumentStatisticsManager(SwDoc& i_rSwdoc); void DocInfoChgd(bool isEnableSetModified) override; - const SwDocStat &GetDocStat() const override; + const SwDocStat& GetDocStat() const override; void SetDocStatModified(bool bSet); - const SwDocStat &GetUpdatedDocStat(bool bCompleteAsync, bool bFields) override; + const SwDocStat& GetUpdatedDocStat(bool bCompleteAsync, bool bFields) override; void SetDocStat(const SwDocStat& rStat) override; void UpdateDocStat(bool bCompleteAsync, bool bFields) override; virtual ~DocumentStatisticsManager() override; private: - DocumentStatisticsManager(DocumentStatisticsManager const&) = delete; DocumentStatisticsManager& operator=(DocumentStatisticsManager const&) = delete; @@ -60,13 +57,12 @@ private: bool IncrementalDocStatCalculate(tools::Long nChars, bool bFields = true); // Our own 'StatsUpdateTimer' calls the following method - DECL_LINK( DoIdleStatsUpdate, Timer *, void ); + DECL_LINK(DoIdleStatsUpdate, Timer*, void); - std::unique_ptr<SwDocStat> mpDocStat;//< Statistics information - bool mbInitialized; //< allow first time update - SwDocIdle maStatsUpdateIdle; //< Idle for asynchronous stats calculation + std::unique_ptr<SwDocStat> mpDocStat; //< Statistics information + bool mbInitialized; //< allow first time update + SwDocIdle maStatsUpdateIdle; //< Idle for asynchronous stats calculation }; - } #endif diff --git a/sw/source/core/inc/DocumentTimerManager.hxx b/sw/source/core/inc/DocumentTimerManager.hxx index 65346efdb494..0ac1c1206322 100644 --- a/sw/source/core/inc/DocumentTimerManager.hxx +++ b/sw/source/core/inc/DocumentTimerManager.hxx @@ -30,7 +30,6 @@ class SwDoc; namespace sw { - class DocumentTimerManager : public IDocumentTimerAccess { public: @@ -43,7 +42,7 @@ public: Fields, }; - DocumentTimerManager( SwDoc& i_rSwdoc ); + DocumentTimerManager(SwDoc& i_rSwdoc); virtual ~DocumentTimerManager() override; void StartIdling() override; @@ -62,9 +61,9 @@ private: /// Delay starting idle jobs to allow for post-load activity. /// Used by LOK only. - DECL_LINK( FireIdleJobsTimeout, Timer *, void ); + DECL_LINK(FireIdleJobsTimeout, Timer*, void); - DECL_LINK( DoIdleJobs, Timer *, void ); + DECL_LINK(DoIdleJobs, Timer*, void); IdleJob GetNextIdleJob() const; @@ -81,7 +80,6 @@ inline bool DocumentTimerManager::IsDocIdle() const { return ((0 == m_nIdleBlockCount) && (GetNextIdleJob() != IdleJob::Busy)); } - } #endif diff --git a/sw/source/core/inc/SwGrammarMarkUp.hxx b/sw/source/core/inc/SwGrammarMarkUp.hxx index f37605556353..69375aa9644a 100644 --- a/sw/source/core/inc/SwGrammarMarkUp.hxx +++ b/sw/source/core/inc/SwGrammarMarkUp.hxx @@ -35,32 +35,35 @@ class SwGrammarMarkUp : public SwWrongList { - std::vector< sal_Int32 > maSentence; + std::vector<sal_Int32> maSentence; public: - SwGrammarMarkUp() : SwWrongList( WRONGLIST_GRAMMAR ) {} + SwGrammarMarkUp() + : SwWrongList(WRONGLIST_GRAMMAR) + { + } virtual ~SwGrammarMarkUp() override; virtual SwWrongList* Clone() override; - virtual void CopyFrom( const SwWrongList& rCopy ) override; + virtual void CopyFrom(const SwWrongList& rCopy) override; /* SwWrongList::Move() + handling of maSentence */ - void MoveGrammar( sal_Int32 nPos, sal_Int32 nDiff ); + void MoveGrammar(sal_Int32 nPos, sal_Int32 nDiff); /* SwWrongList::SplitList() + handling of maSentence */ - SwGrammarMarkUp* SplitGrammarList( sal_Int32 nSplitPos ); + SwGrammarMarkUp* SplitGrammarList(sal_Int32 nSplitPos); /* SwWrongList::JoinList() + handling of maSentence */ - void JoinGrammarList( SwGrammarMarkUp* pNext, sal_Int32 nInsertPos ); + void JoinGrammarList(SwGrammarMarkUp* pNext, sal_Int32 nInsertPos); /* SwWrongList::ClearList() + handling of maSentence */ - void ClearGrammarList( sal_Int32 nSentenceEnd = COMPLETE_STRING ); + void ClearGrammarList(sal_Int32 nSentenceEnd = COMPLETE_STRING); /* setSentence to define the start position of a sentence, at the moment the end position is given by the next start position */ - void setSentence( sal_Int32 nStart ); + void setSentence(sal_Int32 nStart); /* getSentenceStart returns the last start position of a sentence which is lower or equal to the given parameter */ - sal_Int32 getSentenceStart( sal_Int32 nPos ); + sal_Int32 getSentenceStart(sal_Int32 nPos); /* getSentenceEnd returns the first start position of a sentence which is greater than the given parameter */ - sal_Int32 getSentenceEnd( sal_Int32 nPos ); + sal_Int32 getSentenceEnd(sal_Int32 nPos); }; #endif diff --git a/sw/source/core/inc/SwUndoTOXChange.hxx b/sw/source/core/inc/SwUndoTOXChange.hxx index a871e7135472..cc47fd684d7b 100644 --- a/sw/source/core/inc/SwUndoTOXChange.hxx +++ b/sw/source/core/inc/SwUndoTOXChange.hxx @@ -35,12 +35,12 @@ private: sal_uLong const m_nNodeIndex; public: - SwUndoTOXChange(const SwDoc& rDoc, SwTOXBaseSection const& rTOX, const SwTOXBase & rNew); + SwUndoTOXChange(const SwDoc& rDoc, SwTOXBaseSection const& rTOX, const SwTOXBase& rNew); virtual ~SwUndoTOXChange() override; - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; - virtual void RepeatImpl( ::sw::RepeatContext & ) override; + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; + virtual void RepeatImpl(::sw::RepeatContext&) override; }; #endif // INCLUDED_SW_SOURCE_CORE_INC_SWUNDOTOXCHANGE_HXX diff --git a/sw/source/core/inc/UndoBookmark.hxx b/sw/source/core/inc/UndoBookmark.hxx index 6d44bda440be..c10ed451c57d 100644 --- a/sw/source/core/inc/UndoBookmark.hxx +++ b/sw/source/core/inc/UndoBookmark.hxx @@ -27,9 +27,10 @@ class SwHistoryBookmark; class SwHistoryNoTextFieldmark; class SwHistoryTextFieldmark; -namespace sw::mark { - class IMark; - class IFieldmark; +namespace sw::mark +{ +class IMark; +class IFieldmark; } class SwDoc; @@ -39,10 +40,10 @@ class SwUndoBookmark : public SwUndo const std::unique_ptr<SwHistoryBookmark> m_pHistoryBookmark; protected: - SwUndoBookmark( SwUndoId nUndoId, const ::sw::mark::IMark& ); + SwUndoBookmark(SwUndoId nUndoId, const ::sw::mark::IMark&); - void SetInDoc( SwDoc* ); - void ResetInDoc( SwDoc& ); + void SetInDoc(SwDoc*); + void ResetInDoc(SwDoc&); public: virtual ~SwUndoBookmark() override; @@ -65,19 +66,19 @@ public: class SwUndoInsBookmark : public SwUndoBookmark { public: - SwUndoInsBookmark( const ::sw::mark::IMark& ); + SwUndoInsBookmark(const ::sw::mark::IMark&); - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; }; class SwUndoDeleteBookmark : public SwUndoBookmark { public: - SwUndoDeleteBookmark( const ::sw::mark::IMark& ); + SwUndoDeleteBookmark(const ::sw::mark::IMark&); - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; }; class SwUndoRenameBookmark : public SwUndo @@ -86,14 +87,14 @@ class SwUndoRenameBookmark : public SwUndo const OUString m_sNewName; public: - SwUndoRenameBookmark( const OUString& rOldName, const OUString& rNewName, const SwDoc& rDoc ); + SwUndoRenameBookmark(const OUString& rOldName, const OUString& rNewName, const SwDoc& rDoc); virtual ~SwUndoRenameBookmark() override; private: virtual SwRewriter GetRewriter() const override; - static void Rename( ::sw::UndoRedoContext const &, const OUString& sFrom, const OUString& sTo ); - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; + static void Rename(::sw::UndoRedoContext const&, const OUString& sFrom, const OUString& sTo); + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; }; /// Handling undo / redo of checkbox and drop-down form field insertion @@ -105,8 +106,8 @@ private: public: SwUndoInsNoTextFieldmark(const ::sw::mark::IFieldmark& rFieldmark); - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; }; /// Handling undo / redo of checkbox and drop-down form field deletion @@ -119,8 +120,8 @@ public: SwUndoDelNoTextFieldmark(const ::sw::mark::IFieldmark& rFieldmark); ~SwUndoDelNoTextFieldmark(); - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; }; /// Handling undo / redo of text form field insertion @@ -132,8 +133,8 @@ private: public: SwUndoInsTextFieldmark(const ::sw::mark::IFieldmark& rFieldmark); - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; }; /// Handling undo / redo of text form field deletion @@ -146,8 +147,8 @@ public: SwUndoDelTextFieldmark(const ::sw::mark::IFieldmark& rFieldmark); ~SwUndoDelTextFieldmark(); - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; }; #endif // INCLUDED_SW_SOURCE_CORE_INC_UNDOBOOKMARK_HXX diff --git a/sw/source/core/inc/UndoDraw.hxx b/sw/source/core/inc/UndoDraw.hxx index 468db932a476..07dfca71ca74 100644 --- a/sw/source/core/inc/UndoDraw.hxx +++ b/sw/source/core/inc/UndoDraw.hxx @@ -39,12 +39,12 @@ class SwSdrUndo : public SwUndo std::unique_ptr<SdrMarkList> m_pMarkList; // MarkList for all selected SdrObjects public: - SwSdrUndo( std::unique_ptr<SdrUndoAction> , const SdrMarkList* pMarkList, const SwDoc& rDoc ); + SwSdrUndo(std::unique_ptr<SdrUndoAction>, const SdrMarkList* pMarkList, const SwDoc& rDoc); virtual ~SwSdrUndo() override; - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; virtual OUString GetComment() const override; }; @@ -56,15 +56,15 @@ class SwUndoDrawGroup : public SwUndo bool m_bDeleteFormat; public: - SwUndoDrawGroup( sal_uInt16 nCnt, const SwDoc& rDoc ); + SwUndoDrawGroup(sal_uInt16 nCnt, const SwDoc& rDoc); virtual ~SwUndoDrawGroup() override; - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; - void AddObj( sal_uInt16 nPos, SwDrawFrameFormat*, SdrObject* ); - void SetGroupFormat( SwDrawFrameFormat* ); + void AddObj(sal_uInt16 nPos, SwDrawFrameFormat*, SdrObject*); + void SetGroupFormat(SwDrawFrameFormat*); }; // Action "ungroup drawing object" is now split into three parts - see @@ -85,48 +85,47 @@ class SwUndoDrawUnGroup : public SwUndo bool m_bDeleteFormat; public: - SwUndoDrawUnGroup( SdrObjGroup*, const SwDoc& rDoc ); + SwUndoDrawUnGroup(SdrObjGroup*, const SwDoc& rDoc); virtual ~SwUndoDrawUnGroup() override; - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; - void AddObj( sal_uInt16 nPos, SwDrawFrameFormat* ); + void AddObj(sal_uInt16 nPos, SwDrawFrameFormat*); }; class SwUndoDrawUnGroupConnectToLayout : public SwUndo { private: - std::vector< std::pair< SwDrawFrameFormat*, SdrObject* > > m_aDrawFormatsAndObjs; + std::vector<std::pair<SwDrawFrameFormat*, SdrObject*>> m_aDrawFormatsAndObjs; public: SwUndoDrawUnGroupConnectToLayout(const SwDoc& rDoc); virtual ~SwUndoDrawUnGroupConnectToLayout() override; - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; - void AddFormatAndObj( SwDrawFrameFormat* pDrawFrameFormat, - SdrObject* pDrawObject ); + void AddFormatAndObj(SwDrawFrameFormat* pDrawFrameFormat, SdrObject* pDrawObject); }; class SwUndoDrawDelete : public SwUndo { std::unique_ptr<SwUndoGroupObjImpl[]> m_pObjArray; - std::unique_ptr<SdrMarkList> m_pMarkList; // MarkList for all selected SdrObjects + std::unique_ptr<SdrMarkList> m_pMarkList; // MarkList for all selected SdrObjects bool m_bDeleteFormat; public: - SwUndoDrawDelete( sal_uInt16 nCnt, const SwDoc& rDoc ); + SwUndoDrawDelete(sal_uInt16 nCnt, const SwDoc& rDoc); virtual ~SwUndoDrawDelete() override; - virtual void UndoImpl( ::sw::UndoRedoContext & ) override; - virtual void RedoImpl( ::sw::UndoRedoContext & ) override; + virtual void UndoImpl(::sw::UndoRedoContext&) override; + virtual void RedoImpl(::sw::UndoRedoContext&) override; - void AddObj( SwDrawFrameFormat*, const SdrMark& ); + void AddObj(SwDrawFrameFormat*, const SdrMark&); void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; diff --git a/sw/source/core/inc/colfrm.hxx b/sw/source/core/inc/colfrm.hxx index 7c78661e7920..e2e1125ffd07 100644 --- a/sw/source/core/inc/colfrm.hxx +++ b/sw/source/core/inc/colfrm.hxx @@ -22,17 +22,17 @@ #include "ftnboss.hxx" -class SwColumnFrame: public SwFootnoteBossFrame +class SwColumnFrame : public SwFootnoteBossFrame { private: virtual void DestroyImpl() override; virtual ~SwColumnFrame() override; public: - SwColumnFrame( SwFrameFormat*, SwFrame* ); + SwColumnFrame(SwFrameFormat*, SwFrame*); virtual void PaintBreak() const override; - virtual void PaintSubsidiaryLines( const SwPageFrame*, const SwRect& ) const override; + virtual void PaintSubsidiaryLines(const SwPageFrame*, const SwRect&) const override; }; #endif // INCLUDED_SW_SOURCE_CORE_INC_COLFRM_HXX diff --git a/sw/source/core/inc/docedt.hxx b/sw/source/core/inc/docedt.hxx index 13ba7c8a8467..036d516d993c 100644 --- a/sw/source/core/inc/docedt.hxx +++ b/sw/source/core/inc/docedt.hxx @@ -22,9 +22,9 @@ class SwPaM; -bool sw_JoinText( SwPaM& rPam, bool bJoinPrev ); +bool sw_JoinText(SwPaM& rPam, bool bJoinPrev); -void sw_GetJoinFlags( SwPaM& rPam, bool& rJoinText, bool& rJoinPrev ); +void sw_GetJoinFlags(SwPaM& rPam, bool& rJoinText, bool& rJoinPrev); #endif diff --git a/sw/source/core/inc/docredln.hxx b/sw/source/core/inc/docredln.hxx index 1a65c354054a..f60cb930dc66 100644 --- a/sw/source/core/inc/docredln.hxx +++ b/sw/source/core/inc/docredln.hxx @@ -26,7 +26,7 @@ class SwDoc; -void sw_DebugRedline( const SwDoc* pDoc ); +void sw_DebugRedline(const SwDoc* pDoc); #endif diff --git a/sw/source/core/inc/environmentofanchoredobject.hxx b/sw/source/core/inc/environmentofanchoredobject.hxx index aa3d5a2a5be5..23965035eb6a 100644 --- a/sw/source/core/inc/environmentofanchoredobject.hxx +++ b/sw/source/core/inc/environmentofanchoredobject.hxx @@ -25,72 +25,72 @@ class SwLayoutFrame; namespace objectpositioning { - class SwEnvironmentOfAnchoredObject - { - private: - const bool mbFollowTextFlow; - - public: - /** constructor - - @param _bFollowTextFlow - input parameter - indicates, if the anchored object, for which - this environment is instantiated, follow the text flow or not - */ - SwEnvironmentOfAnchoredObject( const bool _bFollowTextFlow ); - - /** destructor - */ - ~SwEnvironmentOfAnchoredObject(); - - /** determine environment layout frame for possible horizontal object - positions respectively for alignment to 'page areas' - - this is, if object has to follow the text flow: - - cell frame, if anchored inside a cell - - fly frame, if anchored inside a fly frame - otherwise it's the page frame - - this is, if object hasn't to follow the text flow: - - page frame. - - no exception any more. Thus remove - parameter <_bForPageAlignment> - - @param _rHoriOrientFrame - input parameter - frame, at which the horizontal position is - oriented at (typically it's the anchor frame). - starting point for the search of the layout frame. - - @return reference to the layout frame, which determines the - horizontal environment the object has to be positioned in. - */ - const SwLayoutFrame& GetHoriEnvironmentLayoutFrame( const SwFrame& _rHoriOrientFrame ) const; - - /** determine environment layout frame for possible vertical object - positions respectively for alignments to 'page areas' - - this is, if object has to follow the text flow: - - cell frame, if anchored inside a cell - - fly frame, if anchored inside a fly frame - - header/footer frame, if anchored inside page header/footer - - footnote frame, if anchored inside footnote - otherwise it's the document body frame - - this is, if object hasn't to follow the text flow: - - page frame. - - no exception any more. Thus remove - parameter <_bForPageAlignment> - - @param _rVertOrientFrame - input parameter - frame, at which the vertical position is - oriented at (typically it's the anchor frame). - starting point for the search of the layout frame. - - @return reference to the layout frame, which determines the - vertical environment the object has to be positioned in. - */ - const SwLayoutFrame& GetVertEnvironmentLayoutFrame( const SwFrame& _rVertOrientFrame ) const; - }; +class SwEnvironmentOfAnchoredObject +{ +private: + const bool mbFollowTextFlow; + +public: + /** constructor + + @param _bFollowTextFlow + input parameter - indicates, if the anchored object, for which + this environment is instantiated, follow the text flow or not + */ + SwEnvironmentOfAnchoredObject(const bool _bFollowTextFlow); + + /** destructor + */ + ~SwEnvironmentOfAnchoredObject(); + + /** determine environment layout frame for possible horizontal object + positions respectively for alignment to 'page areas' + + this is, if object has to follow the text flow: + - cell frame, if anchored inside a cell + - fly frame, if anchored inside a fly frame + otherwise it's the page frame + + this is, if object hasn't to follow the text flow: + - page frame. + - no exception any more. Thus remove + parameter <_bForPageAlignment> + + @param _rHoriOrientFrame + input parameter - frame, at which the horizontal position is + oriented at (typically it's the anchor frame). + starting point for the search of the layout frame. + + @return reference to the layout frame, which determines the + horizontal environment the object has to be positioned in. + */ + const SwLayoutFrame& GetHoriEnvironmentLayoutFrame(const SwFrame& _rHoriOrientFrame) const; + + /** determine environment layout frame for possible vertical object + positions respectively for alignments to 'page areas' + + this is, if object has to follow the text flow: + - cell frame, if anchored inside a cell + - fly frame, if anchored inside a fly frame + - header/footer frame, if anchored inside page header/footer + - footnote frame, if anchored inside footnote + otherwise it's the document body frame + + this is, if object hasn't to follow the text flow: + - page frame. + - no exception any more. Thus remove + parameter <_bForPageAlignment> + + @param _rVertOrientFrame + input parameter - frame, at which the vertical position is + oriented at (typically it's the anchor frame). + starting point for the search of the layout frame. + + @return reference to the layout frame, which determines the + vertical environment the object has to be positioned in. + */ + const SwLayoutFrame& GetVertEnvironmentLayoutFrame(const SwFrame& _rVertOrientFrame) const; +}; } #endif diff --git a/sw/source/core/inc/fefly.hxx b/sw/source/core/inc/fefly.hxx index 07b56d5fcbcb..411bf7586169 100644 --- a/sw/source/core/inc/fefly.hxx +++ b/sw/source/core/inc/fefly.hxx @@ -23,8 +23,7 @@ class SwFlyFrame; class SfxItemSet; -bool sw_ChkAndSetNewAnchor( const SwFlyFrame& rFly, SfxItemSet& rSet ); - +bool sw_ChkAndSetNewAnchor(const SwFlyFrame& rFly, SfxItemSet& rSet); #endif diff --git a/sw/source/core/inc/fieldhint.hxx b/sw/source/core/inc/fieldhint.hxx index 929d6ea19587..2e1bcd60ca8e 100644 --- a/sw/source/core/inc/fieldhint.hxx +++ b/sw/source/core/inc/fieldhint.hxx @@ -31,11 +31,11 @@ public: SwPaM* m_pPaM; SwRootFrame const* m_pLayout; - SwFieldHint(SwPaM *const pPaM, SwRootFrame const*const pLayout) + SwFieldHint(SwPaM* const pPaM, SwRootFrame const* const pLayout) : m_pPaM(pPaM) , m_pLayout(pLayout) - {} - + { + } }; #endif diff --git a/sw/source/core/inc/node2lay.hxx b/sw/source/core/inc/node2lay.hxx index 4475e3a03296..ef0e2f03adee 100644 --- a/sw/source/core/inc/node2lay.hxx +++ b/sw/source/core/inc/node2lay.hxx @@ -54,26 +54,28 @@ class Point; class SwNode2Layout { std::unique_ptr<SwNode2LayImpl> m_pImpl; + public: /// Use this ctor for inserting before/after rNd /// @param nIdx is the index of the to-be-inserted Node - SwNode2Layout( const SwNode& rNd, sal_uLong nIdx ); + SwNode2Layout(const SwNode& rNd, sal_uLong nIdx); ~SwNode2Layout(); SwFrame* NextFrame(); - SwLayoutFrame* UpperFrame( SwFrame* &rpFrame, const SwNode& rNode ); + SwLayoutFrame* UpperFrame(SwFrame*& rpFrame, const SwNode& rNode); - SwFrame *GetFrame( const Point* pDocPos ) const; + SwFrame* GetFrame(const Point* pDocPos) const; }; class SwNode2LayoutSaveUpperFrames { std::unique_ptr<SwNode2LayImpl> m_pImpl; + public: /// Use this ctor for collecting the UpperFrames - SwNode2LayoutSaveUpperFrames( const SwNode& rNd ); + SwNode2LayoutSaveUpperFrames(const SwNode& rNd); ~SwNode2LayoutSaveUpperFrames(); - void RestoreUpperFrames( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ); + void RestoreUpperFrames(SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd); }; #endif diff --git a/sw/source/core/inc/noteurl.hxx b/sw/source/core/inc/noteurl.hxx index fd52fffb5dea..1e5775d3c099 100644 --- a/sw/source/core/inc/noteurl.hxx +++ b/sw/source/core/inc/noteurl.hxx @@ -25,7 +25,7 @@ class SwNoteURL }; // globale Variable, in NoteURL.Cxx angelegt -extern SwNoteURL *pNoteURL; +extern SwNoteURL* pNoteURL; #endif diff --git a/sw/source/core/inc/paintfrm.hxx b/sw/source/core/inc/paintfrm.hxx index b3d4812d6aad..dca4a3871b47 100644 --- a/sw/source/core/inc/paintfrm.hxx +++ b/sw/source/core/inc/paintfrm.hxx @@ -25,11 +25,12 @@ extern Color aGlobalRetoucheColor; class OutputDevice; -namespace vcl { - typedef OutputDevice RenderContext; +namespace vcl +{ +typedef OutputDevice RenderContext; }; -void SwCalcPixStatics( vcl::RenderContext const *pOut ); +void SwCalcPixStatics(vcl::RenderContext const* pOut); #endif // INCLUDED_SW_SOURCE_CORE_INC_PAINTFRM_HXX diff --git a/sw/source/core/inc/ptqueue.hxx b/sw/source/core/inc/ptqueue.hxx index 04c62873fc5a..a5e40f2e3f77 100644 --- a/sw/source/core/inc/ptqueue.hxx +++ b/sw/source/core/inc/ptqueue.hxx @@ -45,10 +45,10 @@ class SwRect; class SwPaintQueue { public: - static SwQueuedPaint *s_pPaintQueue; + static SwQueuedPaint* s_pPaintQueue; - static void Add( SwViewShell *pSh, const SwRect &rNew ); - static void Remove( SwViewShell const *pSh ); + static void Add(SwViewShell* pSh, const SwRect& rNew); + static void Remove(SwViewShell const* pSh); static void Repaint(); }; diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx index e131730c20e6..505c0e635535 100644 --- a/sw/source/core/inc/rowfrm.hxx +++ b/sw/source/core/inc/rowfrm.hxx @@ -25,15 +25,16 @@ class SwTableLine; class SwBorderAttrs; /// SwRowFrame is one table row in the document layout. -class SwRowFrame: public SwLayoutFrame +class SwRowFrame : public SwLayoutFrame { - virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override; + virtual void Format(vcl::RenderContext* pRenderContext, + const SwBorderAttrs* pAttrs = nullptr) override; /// Only change the Frame size, not the PrtArea SSize - virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; - virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual SwTwips ShrinkFrame(SwTwips, bool bTst = false, bool bInfo = false) override; + virtual SwTwips GrowFrame(SwTwips, bool bTst = false, bool bInfo = false) override; - const SwTableLine * m_pTabLine; - SwRowFrame * m_pFollowRow; ///< note: this is *only* set on old-style tables! + const SwTableLine* m_pTabLine; + SwRowFrame* m_pFollowRow; ///< note: this is *only* set on old-style tables! // #i29550# sal_uInt16 mnTopMarginForLowers; sal_uInt16 mnBottomMarginForLowers; @@ -51,10 +52,10 @@ class SwRowFrame: public SwLayoutFrame protected: virtual void MakeAll(vcl::RenderContext* pRenderContext) override; - virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; + virtual void Modify(const SfxPoolItem*, const SfxPoolItem*) override; public: - SwRowFrame( const SwTableLine &, SwFrame*, bool bInsertContent = true ); + SwRowFrame(const SwTableLine&, SwFrame*, bool bInsertContent = true); virtual void Cut() override; @@ -64,45 +65,45 @@ public: * been created; the same holds true for the Page at which the Flys * are to be registered at. */ - void RegistFlys( SwPageFrame *pPage = nullptr ); + void RegistFlys(SwPageFrame* pPage = nullptr); - const SwTableLine *GetTabLine() const { return m_pTabLine; } + const SwTableLine* GetTabLine() const { return m_pTabLine; } /** * Adapts the Cells to the current height; invalidates the Cells if * the Direction does not match the height */ - void AdjustCells( const SwTwips nHeight, const bool bHeight ); + void AdjustCells(const SwTwips nHeight, const bool bHeight); SwRowFrame* GetFollowRow() const { return m_pFollowRow; } - void SetFollowRow( SwRowFrame* pNew ) { m_pFollowRow = pNew; } + void SetFollowRow(SwRowFrame* pNew) { m_pFollowRow = pNew; } // #i29550# sal_uInt16 GetTopMarginForLowers() const { return mnTopMarginForLowers; } - void SetTopMarginForLowers( sal_uInt16 nNew ) { mnTopMarginForLowers = nNew; } + void SetTopMarginForLowers(sal_uInt16 nNew) { mnTopMarginForLowers = nNew; } sal_uInt16 GetBottomMarginForLowers() const { return mnBottomMarginForLowers; } - void SetBottomMarginForLowers( sal_uInt16 nNew ) { mnBottomMarginForLowers = nNew; } + void SetBottomMarginForLowers(sal_uInt16 nNew) { mnBottomMarginForLowers = nNew; } sal_uInt16 GetBottomLineSize() const { return mnBottomLineSize; } - void SetBottomLineSize( sal_uInt16 nNew ) { mnBottomLineSize = nNew; } + void SetBottomLineSize(sal_uInt16 nNew) { mnBottomLineSize = nNew; } // <-- collapsing bool IsRepeatedHeadline() const { return m_bIsRepeatedHeadline; } - void SetRepeatedHeadline( bool bNew ) { m_bIsRepeatedHeadline = bNew; } + void SetRepeatedHeadline(bool bNew) { m_bIsRepeatedHeadline = bNew; } // --> split table rows bool IsRowSplitAllowed() const; bool IsForceRowSplitAllowed() const { return m_bForceRowSplitAllowed; } - void SetForceRowSplitAllowed( bool bNew) { m_bForceRowSplitAllowed = bNew; }; + void SetForceRowSplitAllowed(bool bNew) { m_bForceRowSplitAllowed = bNew; }; bool IsFollowFlowRow() const { return m_bIsFollowFlowRow; } - void SetFollowFlowRow( bool bNew ) { m_bIsFollowFlowRow = bNew; } + void SetFollowFlowRow(bool bNew) { m_bIsFollowFlowRow = bNew; } // <-- split table rows // #131283# Table row keep feature - bool ShouldRowKeepWithNext( const bool bCheckParents = true ) const; + bool ShouldRowKeepWithNext(const bool bCheckParents = true) const; // #i4032# NEW TABLES bool IsRowSpanLine() const { return m_bIsRowSpanLine; } - void SetRowSpanLine( bool bNew ) { m_bIsRowSpanLine = bNew; } + void SetRowSpanLine(bool bNew) { m_bIsRowSpanLine = bNew; } // A row may only be split if the minimum height of the row frame // fits into the vertical space left. diff --git a/sw/source/core/inc/swselectionlist.hxx b/sw/source/core/inc/swselectionlist.hxx index 0fe63587ba81..9eb3903211b2 100644 --- a/sw/source/core/inc/swselectionlist.hxx +++ b/sw/source/core/inc/swselectionlist.hxx @@ -39,8 +39,8 @@ class SwFrame; class SwSelectionList { - std::list< SwPaM* > m_aList; // container for the selected text portions - const SwFrame* m_pContext; // the context of these text portions + std::list<SwPaM*> m_aList; // container for the selected text portions + const SwFrame* m_pContext; // the context of these text portions public: /** Ctor to create an empty list for a given context @@ -48,7 +48,7 @@ public: The frame (normally a SwTextFrame) where the block cursor selection starts, it will be used to get the allowed context for the text selections. */ - explicit SwSelectionList( const SwFrame* pInitCxt ); + explicit SwSelectionList(const SwFrame* pInitCxt); /** Start of the container for the selected text portions */ @@ -63,7 +63,7 @@ public: @param pPam represents a text portion to select */ - void insertPaM( SwPaM* pPam ) { m_aList.push_front( pPam ); } + void insertPaM(SwPaM* pPam) { m_aList.push_front(pPam); } /** Reports if the list does not contain any text portion @@ -83,7 +83,7 @@ public: @return true, if the context of the frame is equal to the one of the list */ - bool checkContext( const SwFrame* pCheck ); + bool checkContext(const SwFrame* pCheck); }; #endif // INCLUDED_SW_SOURCE_CORE_INC_SWSELECTIONLIST_HXX diff --git a/sw/source/core/inc/swthreadjoiner.hxx b/sw/source/core/inc/swthreadjoiner.hxx index e22fb90ae628..18e1e11930c0 100644 --- a/sw/source/core/inc/swthreadjoiner.hxx +++ b/sw/source/core/inc/swthreadjoiner.hxx @@ -21,15 +21,21 @@ #include <sal/types.h> -namespace com::sun::star::uno { template <class interface_type> class Reference; } -namespace com::sun::star::util { class XJobManager; } +namespace com::sun::star::uno +{ +template <class interface_type> class Reference; +} +namespace com::sun::star::util +{ +class XJobManager; +} /** Testing */ namespace SwThreadJoiner { - css::uno::Reference< css::util::XJobManager >& GetThreadJoiner(); +css::uno::Reference<css::util::XJobManager>& GetThreadJoiner(); - void ReleaseThreadJoiner(); +void ReleaseThreadJoiner(); } #endif diff --git a/sw/source/core/inc/unoevent.hxx b/sw/source/core/inc/unoevent.hxx index 6e533a079017..de6b745e36ad 100644 --- a/sw/source/core/inc/unoevent.hxx +++ b/sw/source/core/inc/unoevent.hxx @@ -27,23 +27,27 @@ class SwXTextFrame; class SwXTextGraphicObject; class SwXTextEmbeddedObject; class SwFormatINetFormat; -namespace sw { class ICoreFrameStyle; } +namespace sw +{ +class ICoreFrameStyle; +} class SwHyperlinkEventDescriptor : public SvDetachedEventDescriptor { //XServiceInfo virtual OUString SAL_CALL getImplementationName() override; + protected: virtual ~SwHyperlinkEventDescriptor() override; -public: - SwHyperlinkEventDescriptor(); +public: + SwHyperlinkEventDescriptor(); void copyMacrosFromINetFormat(const SwFormatINetFormat& aFormat); void copyMacrosIntoINetFormat(SwFormatINetFormat& aFormat); - void copyMacrosFromNameReplace( - css::uno::Reference<css::container::XNameReplace> const & xReplace); + void + copyMacrosFromNameReplace(css::uno::Reference<css::container::XNameReplace> const& xReplace); }; // SwEventDescriptor for @@ -56,9 +60,9 @@ class SwFrameEventDescriptor : public SvEventDescriptor SwXFrame& rFrame; public: - SwFrameEventDescriptor( SwXTextFrame& rFrameRef ); - SwFrameEventDescriptor( SwXTextGraphicObject& rGraphicRef ); - SwFrameEventDescriptor( SwXTextEmbeddedObject& rObjectRef ); + SwFrameEventDescriptor(SwXTextFrame& rFrameRef); + SwFrameEventDescriptor(SwXTextGraphicObject& rGraphicRef); + SwFrameEventDescriptor(SwXTextEmbeddedObject& rObjectRef); virtual ~SwFrameEventDescriptor() override; @@ -75,7 +79,7 @@ class SwFrameStyleEventDescriptor : public SvEventDescriptor sw::ICoreFrameStyle& m_rStyle; public: - SwFrameStyleEventDescriptor( sw::ICoreFrameStyle& rStyle ); + SwFrameStyleEventDescriptor(sw::ICoreFrameStyle& rStyle); virtual ~SwFrameStyleEventDescriptor() override; diff --git a/sw/source/core/inc/visiturl.hxx b/sw/source/core/inc/visiturl.hxx index ccc5b9be7769..d2d3b25ac52d 100644 --- a/sw/source/core/inc/visiturl.hxx +++ b/sw/source/core/inc/visiturl.hxx @@ -27,11 +27,12 @@ class SwDoc; class SwURLStateChanged : public SfxListener { SwDoc& m_rDoc; + public: - SwURLStateChanged( SwDoc& rD ); + SwURLStateChanged(SwDoc& rD); virtual ~SwURLStateChanged() override; - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; }; #endif diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx index e7709204fd9d..b65eb966a468 100644 --- a/sw/source/core/layout/flypos.cxx +++ b/sw/source/core/layout/flypos.cxx @@ -27,7 +27,7 @@ bool SwPosFlyFrameCmp::operator()(const SwPosFlyFramePtr& rA, const SwPosFlyFramePtr& rB) const { - if(rA->GetNdIndex() == rB->GetNdIndex()) + if (rA->GetNdIndex() == rB->GetNdIndex()) { // In this case, the order number decides! return rA->GetOrdNum() < rB->GetOrdNum(); @@ -36,15 +36,18 @@ bool SwPosFlyFrameCmp::operator()(const SwPosFlyFramePtr& rA, const SwPosFlyFram return rA->GetNdIndex() < rB->GetNdIndex(); } -SwPosFlyFrame::SwPosFlyFrame(const SwNodeIndex& rIdx, const SwFrameFormat* pFormat, sal_uInt16 nArrPos) - : m_pFrameFormat(pFormat), m_pNodeIndex(const_cast<SwNodeIndex*>(&rIdx)), m_nOrdNum(SAL_MAX_UINT32) +SwPosFlyFrame::SwPosFlyFrame(const SwNodeIndex& rIdx, const SwFrameFormat* pFormat, + sal_uInt16 nArrPos) + : m_pFrameFormat(pFormat) + , m_pNodeIndex(const_cast<SwNodeIndex*>(&rIdx)) + , m_nOrdNum(SAL_MAX_UINT32) { const SwFormatAnchor& rAnchor = pFormat->GetAnchor(); - if(RndStdIds::FLY_AT_PAGE == rAnchor.GetAnchorId()) + if (RndStdIds::FLY_AT_PAGE == rAnchor.GetAnchorId()) m_pNodeIndex = new SwNodeIndex(rIdx); - else if(pFormat->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell()) + else if (pFormat->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell()) pFormat->CallSwClientNotify(sw::GetZOrderHint(m_nOrdNum)); - if(m_nOrdNum == SAL_MAX_UINT32) + if (m_nOrdNum == SAL_MAX_UINT32) { m_nOrdNum = pFormat->GetDoc()->GetSpzFrameFormats()->size(); m_nOrdNum += nArrPos; diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx index 7e1f91493c39..fa91ea252d5f 100644 --- a/sw/source/core/text/noteurl.cxx +++ b/sw/source/core/text/noteurl.cxx @@ -20,6 +20,6 @@ #include <noteurl.hxx> // Global variable -SwNoteURL *pNoteURL = nullptr; +SwNoteURL* pNoteURL = nullptr; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/text/porref.hxx b/sw/source/core/text/porref.hxx index 0c7dc85037b9..b0fff5e34b2a 100644 --- a/sw/source/core/text/porref.hxx +++ b/sw/source/core/text/porref.hxx @@ -24,8 +24,8 @@ class SwRefPortion : public SwTextPortion { public: - SwRefPortion(){ SetWhichPor( PortionType::Ref ); } - virtual void Paint( const SwTextPaintInfo &rInf ) const override; + SwRefPortion() { SetWhichPor(PortionType::Ref); } + virtual void Paint(const SwTextPaintInfo& rInf) const override; }; class SwIsoRefPortion : public SwRefPortion @@ -33,14 +33,14 @@ class SwIsoRefPortion : public SwRefPortion sal_uInt16 nViewWidth; public: - SwIsoRefPortion(); - virtual bool Format( SwTextFormatInfo &rInf ) override; - virtual void Paint( const SwTextPaintInfo &rInf ) const override; - virtual SwLinePortion *Compress() override; - virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const override; + SwIsoRefPortion(); + virtual bool Format(SwTextFormatInfo& rInf) override; + virtual void Paint(const SwTextPaintInfo& rInf) const override; + virtual SwLinePortion* Compress() override; + virtual sal_uInt16 GetViewWidth(const SwTextSizeInfo& rInf) const override; // Accessibility: pass information about this portion to the PortionHandler - virtual void HandlePortion( SwPortionHandler& rPH ) const override; + virtual void HandlePortion(SwPortionHandler& rPH) const override; }; #endif diff --git a/sw/source/core/text/portox.hxx b/sw/source/core/text/portox.hxx index b2c8f23a76df..8b61c1064217 100644 --- a/sw/source/core/text/portox.hxx +++ b/sw/source/core/text/portox.hxx @@ -25,8 +25,8 @@ class SwToxPortion : public SwTextPortion { public: - SwToxPortion(){ SetWhichPor( PortionType::Tox ); } - virtual void Paint( const SwTextPaintInfo &rInf ) const override; + SwToxPortion() { SetWhichPor(PortionType::Tox); } + virtual void Paint(const SwTextPaintInfo& rInf) const override; }; class SwIsoToxPortion : public SwToxPortion @@ -34,14 +34,14 @@ class SwIsoToxPortion : public SwToxPortion sal_uInt16 nViewWidth; public: - SwIsoToxPortion(); - virtual bool Format( SwTextFormatInfo &rInf ) override; - virtual void Paint( const SwTextPaintInfo &rInf ) const override; - virtual SwLinePortion *Compress() override; - virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const override; + SwIsoToxPortion(); + virtual bool Format(SwTextFormatInfo& rInf) override; + virtual void Paint(const SwTextPaintInfo& rInf) const override; + virtual SwLinePortion* Compress() override; + virtual sal_uInt16 GetViewWidth(const SwTextSizeInfo& rInf) const override; // Accessibility: pass information about this portion to the PortionHandler - virtual void HandlePortion( SwPortionHandler& rPH ) const override; + virtual void HandlePortion(SwPortionHandler& rPH) const override; }; #endif diff --git a/sw/source/core/text/txtcache.hxx b/sw/source/core/text/txtcache.hxx index d04a0eb63323..192fb42ee20f 100644 --- a/sw/source/core/text/txtcache.hxx +++ b/sw/source/core/text/txtcache.hxx @@ -32,11 +32,11 @@ class SwTextLine : public SwCacheObj virtual void UpdateCachePos() override; public: - SwTextLine( SwTextFrame const *pFrame, std::unique_ptr<SwParaPortion> pNew = nullptr ); + SwTextLine(SwTextFrame const* pFrame, std::unique_ptr<SwParaPortion> pNew = nullptr); virtual ~SwTextLine() override; - SwParaPortion *GetPara() { return pLine.get(); } - const SwParaPortion *GetPara() const { return pLine.get(); } + SwParaPortion* GetPara() { return pLine.get(); } + const SwParaPortion* GetPara() const { return pLine.get(); } void SetPara(SwParaPortion* pNew, bool bDelete) { @@ -48,14 +48,13 @@ public: class SwTextLineAccess : public SwCacheAccess { - protected: - virtual SwCacheObj *NewObj() override; + virtual SwCacheObj* NewObj() override; public: - explicit SwTextLineAccess( const SwTextFrame *pOwner ); + explicit SwTextLineAccess(const SwTextFrame* pOwner); - SwParaPortion *GetPara(); + SwParaPortion* GetPara(); bool IsAvailable() const; }; diff --git a/sw/source/core/txtnode/chrfmt.cxx b/sw/source/core/txtnode/chrfmt.cxx index b5fac1e16855..15a60eeb4bac 100644 --- a/sw/source/core/txtnode/chrfmt.cxx +++ b/sw/source/core/txtnode/chrfmt.cxx @@ -22,7 +22,6 @@ #include <charfmt.hxx> #include <docary.hxx> - void SwCharFormat::dumpAsXml(xmlTextWriterPtr pWriter) const { xmlTextWriterStartElement(pWriter, BAD_CAST("SwCharFormat")); diff --git a/sw/source/core/undo/SwRewriter.cxx b/sw/source/core/undo/SwRewriter.cxx index 05566a1bd2f3..b35a31a912b5 100644 --- a/sw/source/core/undo/SwRewriter.cxx +++ b/sw/source/core/undo/SwRewriter.cxx @@ -22,17 +22,15 @@ using namespace std; -SwRewriter::SwRewriter() -{ -} +SwRewriter::SwRewriter() {} -void SwRewriter::AddRule(SwUndoArg eWhat, const OUString & rWith) +void SwRewriter::AddRule(SwUndoArg eWhat, const OUString& rWith) { SwRewriteRule aRule(eWhat, rWith); - vector<SwRewriteRule>::iterator aIt = find_if( - mRules.begin(), mRules.end(), - [&aRule](SwRewriteRule const & a) { return a.first == aRule.first; }); + vector<SwRewriteRule>::iterator aIt + = find_if(mRules.begin(), mRules.end(), + [&aRule](SwRewriteRule const& a) { return a.first == aRule.first; }); if (aIt != mRules.end()) *aIt = aRule; @@ -40,7 +38,7 @@ void SwRewriter::AddRule(SwUndoArg eWhat, const OUString & rWith) mRules.push_back(aRule); } -OUString SwRewriter::Apply(const OUString & rStr) const +OUString SwRewriter::Apply(const OUString& rStr) const { OUString aResult = rStr; diff --git a/sw/source/core/view/vprint.hxx b/sw/source/core/view/vprint.hxx index fc8e35c99eef..2d91e3f90d4c 100644 --- a/sw/source/core/view/vprint.hxx +++ b/sw/source/core/view/vprint.hxx @@ -30,4 +30,3 @@ SwPageFrame const* sw_getPage(SwRootFrame const& rLayout, sal_Int32 const nPage) #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ - diff --git a/sw/source/filter/ascii/wrtasc.hxx b/sw/source/filter/ascii/wrtasc.hxx index cb0fdc191bb2..8be5e5352f61 100644 --- a/sw/source/filter/ascii/wrtasc.hxx +++ b/sw/source/filter/ascii/wrtasc.hxx @@ -33,12 +33,12 @@ class SwASCWriter : public Writer virtual ErrCode WriteStream() override; public: - SwASCWriter( const OUString& rFilterName ); + SwASCWriter(const OUString& rFilterName); virtual ~SwASCWriter() override; const OUString& GetLineEnd() const { return m_sLineEnd; } }; -#endif // _ INCLUDED_SW_SOURCE_FILTER_ASCII_WRTASC_HXX +#endif // _ INCLUDED_SW_SOURCE_FILTER_ASCII_WRTASC_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/docx/swdocxreader.hxx b/sw/source/filter/docx/swdocxreader.hxx index 214d2742d287..dc641d13c13d 100644 --- a/sw/source/filter/docx/swdocxreader.hxx +++ b/sw/source/filter/docx/swdocxreader.hxx @@ -29,12 +29,12 @@ public: virtual SwReaderType GetReaderType() override; virtual bool HasGlossaries() const override; - virtual bool ReadGlossaries( SwTextBlocks& rBlocks, bool bSaveRelFiles ) const override; + virtual bool ReadGlossaries(SwTextBlocks& rBlocks, bool bSaveRelFiles) const override; private: - virtual ErrCode Read( SwDoc&, const OUString&, SwPaM&, const OUString& ) override; + virtual ErrCode Read(SwDoc&, const OUString&, SwPaM&, const OUString&) override; - static bool MakeEntries( SwDoc *pD, SwTextBlocks &rBlocks ); + static bool MakeEntries(SwDoc* pD, SwTextBlocks& rBlocks); }; #endif diff --git a/sw/source/filter/html/css1atr.hxx b/sw/source/filter/html/css1atr.hxx index ea07dec5cf30..c5e394e18f89 100644 --- a/sw/source/filter/html/css1atr.hxx +++ b/sw/source/filter/html/css1atr.hxx @@ -20,8 +20,7 @@ #ifndef INCLUDED_SW_SOURCE_FILTER_HTML_CSS1ATR_HXX #define INCLUDED_SW_SOURCE_FILTER_HTML_CSS1ATR_HXX -bool swhtml_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 ); - +bool swhtml_css1atr_equalFontItems(const SfxPoolItem& r1, const SfxPoolItem& r2); #endif diff --git a/sw/source/filter/html/css1kywd.hxx b/sw/source/filter/html/css1kywd.hxx index eee703adce66..47be061d9de6 100644 --- a/sw/source/filter/html/css1kywd.hxx +++ b/sw/source/filter/html/css1kywd.hxx @@ -205,7 +205,6 @@ extern const char* const sCSS1_PV_landscape; //extern const char* const sCSS1_PV_crop; //extern const char* const sCSS1_PV_cross; - extern const char* const sCSS1_P_so_language; extern const char* const sCSS1_P_direction; extern const char* const sCSS1_PV_ltr; diff --git a/sw/source/filter/html/htmlfld.hxx b/sw/source/filter/html/htmlfld.hxx index 36cfc9e07ca5..80c50959e598 100644 --- a/sw/source/filter/html/htmlfld.hxx +++ b/sw/source/filter/html/htmlfld.hxx @@ -20,7 +20,6 @@ #ifndef INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFLD_HXX #define INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFLD_HXX - #define OOO_STRING_SW_HTML_FT_author "AUTHOR" #define OOO_STRING_SW_HTML_FT_sender "SENDER" #define OOO_STRING_SW_HTML_FT_datetime "DATETIME" diff --git a/sw/source/filter/html/htmlform.hxx b/sw/source/filter/html/htmlform.hxx index 5564a7d29315..0a3f02db47d1 100644 --- a/sw/source/filter/html/htmlform.hxx +++ b/sw/source/filter/html/htmlform.hxx @@ -22,10 +22,10 @@ #include <sal/types.h> -extern const char * aEventListenerTable[]; -extern const char * aEventMethodTable[]; -extern const char * aEventSDOptionTable[]; -extern const char * aEventOptionTable[]; +extern const char* aEventListenerTable[]; +extern const char* aEventMethodTable[]; +extern const char* aEventSDOptionTable[]; +extern const char* aEventOptionTable[]; #endif diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx index 9d5ed50d57e7..345645a240c8 100644 --- a/sw/source/filter/html/htmlnum.cxx +++ b/sw/source/filter/html/htmlnum.cxx @@ -21,14 +21,13 @@ #include <ndtxt.hxx> #include <doc.hxx> -void SwHTMLNumRuleInfo::Set( const SwTextNode& rTextNd ) +void SwHTMLNumRuleInfo::Set(const SwTextNode& rTextNd) { - const SwNumRule* pTextNdNumRule( rTextNd.GetNumRule() ); - if ( pTextNdNumRule && - pTextNdNumRule != rTextNd.GetDoc().GetOutlineNumRule() ) + const SwNumRule* pTextNdNumRule(rTextNd.GetNumRule()); + if (pTextNdNumRule && pTextNdNumRule != rTextNd.GetDoc().GetOutlineNumRule()) { pNumRule = const_cast<SwNumRule*>(pTextNdNumRule); - nDeep = static_cast< sal_uInt16 >(pNumRule ? rTextNd.GetActualListLevel() + 1 : 0); + nDeep = static_cast<sal_uInt16>(pNumRule ? rTextNd.GetActualListLevel() + 1 : 0); bNumbered = rTextNd.IsCountedInList(); // #i57919# - correction of refactoring done by cws swnumtree: // <bRestart> has to be set to <true>, if numbering is restarted at this diff --git a/sw/source/filter/inc/fltini.hxx b/sw/source/filter/inc/fltini.hxx index 54ff7cf07679..eb48d253d24a 100644 --- a/sw/source/filter/inc/fltini.hxx +++ b/sw/source/filter/inc/fltini.hxx @@ -29,24 +29,26 @@ class SwNodeIndex; // the special readers -class HTMLReader: public Reader +class HTMLReader : public Reader { // we don't want to have the streams/storages open virtual bool SetStrmStgPtr() override; - virtual ErrCode Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &) override; + virtual ErrCode Read(SwDoc&, const OUString& rBaseURL, SwPaM&, const OUString&) override; virtual OUString GetTemplateName(SwDoc& rDoc) const override; /// Parse FilterOptions passed to the importer. void SetupFilterOptions(); OUString m_aNamespace; + public: HTMLReader(); }; class XMLReader : public Reader { - virtual ErrCode Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &) override; + virtual ErrCode Read(SwDoc&, const OUString& rBaseURL, SwPaM&, const OUString&) override; + public: virtual SwReaderType GetReaderType() override; @@ -54,17 +56,17 @@ public: // read the sections of the document, which is equal to the medium. // returns the count of it - virtual size_t GetSectionList( SfxMedium& rMedium, - std::vector<OUString>& rStrings) const override; + virtual size_t GetSectionList(SfxMedium& rMedium, + std::vector<OUString>& rStrings) const override; }; // the special writers -void GetWW8Writer( const OUString&, const OUString&, WriterRef& ); +void GetWW8Writer(const OUString&, const OUString&, WriterRef&); // Get size of fly (if 'automatic' in WW) and check if not too small SW_DLLPUBLIC void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, - SwTwips nPageWidth); + SwTwips nPageWidth); #endif diff --git a/sw/source/filter/inc/rtf.hxx b/sw/source/filter/inc/rtf.hxx index d1e4d3fa9e3a..f0bff55c5923 100644 --- a/sw/source/filter/inc/rtf.hxx +++ b/sw/source/filter/inc/rtf.hxx @@ -24,21 +24,24 @@ class RTFSurround { union { - struct { + struct + { sal_uInt8 nGoldCut : 1; // should ideally be bool sal_uInt8 nOrder : 4; sal_uInt8 nJunk : 3; } Flags; sal_uInt8 nVal; } Value; + public: - RTFSurround( bool bGoldCut, sal_uInt8 nOrder ) { + RTFSurround(bool bGoldCut, sal_uInt8 nOrder) + { Value.Flags.nGoldCut = sal_uInt8(bGoldCut); Value.Flags.nOrder = nOrder; Value.Flags.nJunk = 0; } - sal_uInt16 GetValue() const { return Value.nVal; } + sal_uInt16 GetValue() const { return Value.nVal; } }; #endif // INCLUDED_SW_SOURCE_FILTER_INC_RTF_HXX diff --git a/sw/source/filter/ww8/WW8FFData.hxx b/sw/source/filter/ww8/WW8FFData.hxx index e1ea582b524c..120f80cf4638 100644 --- a/sw/source/filter/ww8/WW8FFData.hxx +++ b/sw/source/filter/ww8/WW8FFData.hxx @@ -27,7 +27,6 @@ class SvStream; namespace sw { - class WW8FFData final { private: @@ -60,9 +59,9 @@ private: OUString msMacroEnter; OUString msMacroExit; - std::vector< OUString > msListEntries; + std::vector<OUString> msListEntries; - static void WriteOUString(SvStream * pStream, const OUString & rStr, bool bAddZero); + static void WriteOUString(SvStream* pStream, const OUString& rStr, bool bAddZero); public: WW8FFData(); @@ -72,15 +71,15 @@ public: void setResult(sal_uInt8 nResult) { mnResult = nResult; } - void setName(const OUString & rName) { msName = rName; } + void setName(const OUString& rName) { msName = rName; } - void setHelp(const OUString & rHelp); + void setHelp(const OUString& rHelp); - void setStatus(const OUString & rStatus); + void setStatus(const OUString& rStatus); - void addListboxEntry(const OUString & rEntry); + void addListboxEntry(const OUString& rEntry); - void Write(SvStream * pDataStrm); + void Write(SvStream* pDataStrm); }; } diff --git a/sw/source/filter/ww8/WW8FibData.cxx b/sw/source/filter/ww8/WW8FibData.cxx index 2c94015a1ca6..9a257e366aa6 100644 --- a/sw/source/filter/ww8/WW8FibData.cxx +++ b/sw/source/filter/ww8/WW8FibData.cxx @@ -22,14 +22,12 @@ namespace ww8 { WW8FibData::WW8FibData() - : m_bReadOnlyRecommended(false), - m_bWriteReservation(false) + : m_bReadOnlyRecommended(false) + , m_bWriteReservation(false) { } -WW8FibData::~WW8FibData() -{ -} +WW8FibData::~WW8FibData() {} void WW8FibData::setReadOnlyRecommended(bool bReadOnlyRecommended) { @@ -40,8 +38,6 @@ void WW8FibData::setWriteReservation(bool bWriteReservation) { m_bWriteReservation = bWriteReservation; } - - } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/WW8FibData.hxx b/sw/source/filter/ww8/WW8FibData.hxx index b47cdf6de2dd..ee5caf75fe8c 100644 --- a/sw/source/filter/ww8/WW8FibData.hxx +++ b/sw/source/filter/ww8/WW8FibData.hxx @@ -35,8 +35,8 @@ public: void setReadOnlyRecommended(bool bReadOnlyRecommended); void setWriteReservation(bool bWriteReservation); - bool getReadOnlyRecommended() const { return m_bReadOnlyRecommended;} - bool getWriteReservation() const { return m_bWriteReservation;} + bool getReadOnlyRecommended() const { return m_bReadOnlyRecommended; } + bool getWriteReservation() const { return m_bWriteReservation; } }; } diff --git a/sw/source/filter/ww8/docxhelper.hxx b/sw/source/filter/ww8/docxhelper.hxx index 4791aaa8306c..6133c6dfb8e0 100644 --- a/sw/source/filter/ww8/docxhelper.hxx +++ b/sw/source/filter/ww8/docxhelper.hxx @@ -18,7 +18,7 @@ struct DocxStringTokenMap sal_Int32 nToken; }; -sal_Int32 DocxStringGetToken(DocxStringTokenMap const * pMap, const OUString& rName); +sal_Int32 DocxStringGetToken(DocxStringTokenMap const* pMap, const OUString& rName); #endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXHELPER_HXX diff --git a/sw/source/filter/ww8/fields.hxx b/sw/source/filter/ww8/fields.hxx index 9f3b0aafa252..a539c645cf85 100644 --- a/sw/source/filter/ww8/fields.hxx +++ b/sw/source/filter/ww8/fields.hxx @@ -25,22 +25,22 @@ namespace ww { - /** Find the English Field Name from a winword index - - See OpenOffice.org issue 12831 - (https://bz.apache.org/ooo/show_bug.cgi?id=12831) and MS - Knowledge Base article 268717 - (http://support.microsoft.com/default.aspx?scid=kb;en-us;268717) for - details of why to use english field names and not localized ones since - Word 2000. - - @param - nIndex the index to search for - - @return 0 if not found, otherwise the fieldname as a C style ASCII - string - */ - const char *GetEnglishFieldName(eField eIndex) throw(); +/** Find the English Field Name from a winword index + + See OpenOffice.org issue 12831 + (https://bz.apache.org/ooo/show_bug.cgi?id=12831) and MS + Knowledge Base article 268717 + (http://support.microsoft.com/default.aspx?scid=kb;en-us;268717) for + details of why to use english field names and not localized ones since + Word 2000. + + @param + nIndex the index to search for + + @return 0 if not found, otherwise the fieldname as a C style ASCII + string +*/ +const char* GetEnglishFieldName(eField eIndex) throw(); } #endif diff --git a/sw/source/filter/xml/xmlbrshe.hxx b/sw/source/filter/xml/xmlbrshe.hxx index 1e970ff8ed04..807f454645f3 100644 --- a/sw/source/filter/xml/xmlbrshe.hxx +++ b/sw/source/filter/xml/xmlbrshe.hxx @@ -25,16 +25,16 @@ class SwXMLExport; class SwXMLBrushItemExport { - SwXMLExport& rExport; + SwXMLExport& rExport; SwXMLExport& GetExport() { return rExport; } -public: - explicit SwXMLBrushItemExport( SwXMLExport& rExport ); +public: + explicit SwXMLBrushItemExport(SwXMLExport& rExport); ~SwXMLBrushItemExport(); // core API - void exportXML( const SvxBrushItem& rItem ); + void exportXML(const SvxBrushItem& rItem); }; #endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLBRSHE_HXX diff --git a/sw/source/filter/xml/xmlscript.cxx b/sw/source/filter/xml/xmlscript.cxx index d3a58c6b5ea2..8fee9ffd877f 100644 --- a/sw/source/filter/xml/xmlscript.cxx +++ b/sw/source/filter/xml/xmlscript.cxx @@ -24,13 +24,13 @@ using namespace ::com::sun::star; -SvXMLImportContext *SwXMLImport::CreateScriptContext() +SvXMLImportContext* SwXMLImport::CreateScriptContext() { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContext* pContext = nullptr; - if( !(IsStylesOnlyMode() || IsInsertMode()) ) + if (!(IsStylesOnlyMode() || IsInsertMode())) { - pContext = new XMLScriptContext( *this, GetModel() ); + pContext = new XMLScriptContext(*this, GetModel()); } return pContext; diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx index 0930caf03982..88ac9e40dc8d 100644 --- a/sw/source/ui/dbui/mmdocselectpage.hxx +++ b/sw/source/ui/dbui/mmdocselectpage.hxx @@ -26,10 +26,10 @@ class SwMailMergeWizard; class SwMailMergeDocSelectPage : public vcl::OWizardPage { - OUString m_sLoadFileName; - OUString m_sLoadTemplateName; + OUString m_sLoadFileName; + OUString m_sLoadTemplateName; - SwMailMergeWizard* m_pWizard; + SwMailMergeWizard* m_pWizard; std::unique_ptr<weld::RadioButton> m_xCurrentDocRB; std::unique_ptr<weld::RadioButton> m_xNewDocRB; @@ -43,7 +43,7 @@ class SwMailMergeDocSelectPage : public vcl::OWizardPage DECL_LINK(DocSelectHdl, weld::ToggleButton&, void); DECL_LINK(FileSelectHdl, weld::Button&, void); - virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason _eReason ) override; + virtual bool commitPage(::vcl::WizardTypes::CommitPageReason _eReason) override; public: SwMailMergeDocSelectPage(weld::Container* pPage, SwMailMergeWizard* pWizard); diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx index 14284d3224dd..3fd55ea2b002 100644 --- a/sw/source/ui/dbui/mmgreetingspage.hxx +++ b/sw/source/ui/dbui/mmgreetingspage.hxx @@ -31,7 +31,7 @@ class SwMailMergeWizard; class SwGreetingsHandler { protected: - SwMailMergeWizard* m_pWizard; + SwMailMergeWizard* m_pWizard; /// The mail merge state, available even when m_pWizard is nullptr. SwMailMergeConfigItem& m_rConfigItem; bool m_bIsTabPage; @@ -79,12 +79,11 @@ protected: DECL_LINK(IndividualHdl_Impl, weld::ToggleButton&, void); DECL_LINK(GreetingHdl_Impl, weld::Button&, void); - void Contains(bool bContainsGreeting); - virtual void UpdatePreview(); + void Contains(bool bContainsGreeting); + virtual void UpdatePreview(); }; -class SwMailMergeGreetingsPage : public vcl::OWizardPage - , public SwGreetingsHandler +class SwMailMergeGreetingsPage : public vcl::OWizardPage, public SwGreetingsHandler { std::unique_ptr<SwAddressPreview> m_xPreview; std::unique_ptr<weld::Label> m_xPreviewFI; @@ -94,7 +93,7 @@ class SwMailMergeGreetingsPage : public vcl::OWizardPage std::unique_ptr<weld::Button> m_xNextSetIB; std::unique_ptr<weld::CustomWeld> m_xPreviewWIN; - OUString m_sDocument; + OUString m_sDocument; DECL_LINK(ContainsHdl_Impl, weld::ToggleButton&, void); DECL_LINK(InsertDataHdl_Impl, weld::Button&, void); @@ -102,9 +101,10 @@ class SwMailMergeGreetingsPage : public vcl::OWizardPage DECL_LINK(GreetingSelectListBoxHdl_Impl, weld::ComboBox&, void); DECL_LINK(AssignHdl_Impl, weld::Button&, void); - virtual void UpdatePreview() override; - virtual void Activate() override; - virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason _eReason ) override; + virtual void UpdatePreview() override; + virtual void Activate() override; + virtual bool commitPage(::vcl::WizardTypes::CommitPageReason _eReason) override; + public: SwMailMergeGreetingsPage(weld::Container* pPage, SwMailMergeWizard* pWizard); virtual ~SwMailMergeGreetingsPage() override; @@ -118,11 +118,12 @@ class SwMailBodyDialog : public SfxDialogController, public SwGreetingsHandler DECL_LINK(ContainsHdl_Impl, weld::ToggleButton&, void); DECL_LINK(OKHdl, weld::Button&, void); + public: SwMailBodyDialog(weld::Window* pParent); virtual ~SwMailBodyDialog() override; - void SetBody(const OUString& rBody ) { m_xBodyMLE->set_text(rBody); } + void SetBody(const OUString& rBody) { m_xBodyMLE->set_text(rBody); } OUString GetBody() const { return m_xBodyMLE->get_text(); } }; #endif diff --git a/sw/source/ui/dbui/mmoutputtypepage.hxx b/sw/source/ui/dbui/mmoutputtypepage.hxx index 92a60da30941..eccd2bb9d08f 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.hxx +++ b/sw/source/ui/dbui/mmoutputtypepage.hxx @@ -25,7 +25,7 @@ class SwMailMergeWizard; class SwMailMergeOutputTypePage : public vcl::OWizardPage { - SwMailMergeWizard* m_pWizard; + SwMailMergeWizard* m_pWizard; std::unique_ptr<weld::RadioButton> m_xLetterRB; std::unique_ptr<weld::RadioButton> m_xMailRB; diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 91e6d06f6a11..19db636a54bb 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -39,7 +39,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::beans; SwSelectDBTableDialog::SwSelectDBTableDialog(weld::Window* pParent, - const uno::Reference< sdbc::XConnection>& rConnection) + const uno::Reference<sdbc::XConnection>& rConnection) : SfxDialogController(pParent, "modules/swriter/ui/selecttabledialog.ui", "SelectTableDialog") , m_xConnection(rConnection) , m_xTable(m_xBuilder->weld_tree_view("table")) @@ -83,9 +83,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(weld::Window* pParent, } } -SwSelectDBTableDialog::~SwSelectDBTableDialog() -{ -} +SwSelectDBTableDialog::~SwSelectDBTableDialog() {} IMPL_LINK_NOARG(SwSelectDBTableDialog, PreviewHdl, weld::Button&, void) { @@ -98,7 +96,7 @@ IMPL_LINK_NOARG(SwSelectDBTableDialog, PreviewHdl, weld::Button&, void) OUString sDataSourceName; Reference<XChild> xChild(m_xConnection, UNO_QUERY); - if(xChild.is()) + if (xChild.is()) { Reference<XDataSource> xSource(xChild->getParent(), UNO_QUERY); Reference<XPropertySet> xPrSet(xSource, UNO_QUERY); @@ -138,8 +136,7 @@ void SwSelectDBTableDialog::SetSelectedTable(const OUString& rTable, bool bIsTab { for (int i = 0, nCount = m_xTable->n_children(); i < nCount; ++i) { - if (m_xTable->get_text(i, 0) == rTable && - m_xTable->get_id(i).isEmpty() == bIsTable) + if (m_xTable->get_text(i, 0) == rTable && m_xTable->get_id(i).isEmpty() == bIsTable) { m_xTable->select(i); break; diff --git a/sw/source/ui/dialog/abstract.cxx b/sw/source/ui/dialog/abstract.cxx index 01f4b1ea29ca..01e013895563 100644 --- a/sw/source/ui/dialog/abstract.cxx +++ b/sw/source/ui/dialog/abstract.cxx @@ -26,9 +26,7 @@ SwInsertAbstractDlg::SwInsertAbstractDlg(weld::Window* pParent) { } -SwInsertAbstractDlg::~SwInsertAbstractDlg() -{ -} +SwInsertAbstractDlg::~SwInsertAbstractDlg() {} sal_uInt8 SwInsertAbstractDlg::GetLevel() const { diff --git a/sw/source/ui/dialog/addrdlg.cxx b/sw/source/ui/dialog/addrdlg.cxx index 3c16519ab46c..0dde165fc05a 100644 --- a/sw/source/ui/dialog/addrdlg.cxx +++ b/sw/source/ui/dialog/addrdlg.cxx @@ -25,8 +25,8 @@ SwAddrDlg::SwAddrDlg(weld::Window* pParent, const SfxItemSet& rSet) : SfxSingleTabDialogController(pParent, &rSet) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SFXPAGE_GENERAL ); - if ( fnCreatePage ) + ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc(RID_SFXPAGE_GENERAL); + if (fnCreatePage) { // create TabPage SetTabPage(fnCreatePage(get_content_area(), this, &rSet)); diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx index 846618ac0b3b..e141dab80d0d 100644 --- a/sw/source/ui/dialog/swuiexp.cxx +++ b/sw/source/ui/dialog/swuiexp.cxx @@ -23,19 +23,18 @@ namespace swui { - SwAbstractDialogFactory& GetFactory() - { - static SwAbstractDialogFactory_Impl aFactory; - return aFactory; - } +SwAbstractDialogFactory& GetFactory() +{ + static SwAbstractDialogFactory_Impl aFactory; + return aFactory; +} } -extern "C" +extern "C" { +SAL_DLLPUBLIC_EXPORT SwAbstractDialogFactory* SwCreateDialogFactory() { - SAL_DLLPUBLIC_EXPORT SwAbstractDialogFactory* SwCreateDialogFactory() - { - return &::swui::GetFactory(); - } + return &::swui::GetFactory(); +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx index 28da3d63d07d..610f595133a0 100644 --- a/sw/source/ui/envelp/envfmt.hxx +++ b/sw/source/ui/envelp/envfmt.hxx @@ -27,18 +27,18 @@ class SwTextFormatColl; class SwEnvFormatPage : public SfxTabPage { SwEnvDlg* m_pDialog; - std::vector<sal_uInt16> m_aIDs; + std::vector<sal_uInt16> m_aIDs; SwEnvPreview m_aPreview; - std::unique_ptr<weld::MetricSpinButton> m_xAddrLeftField; - std::unique_ptr<weld::MetricSpinButton> m_xAddrTopField; + std::unique_ptr<weld::MetricSpinButton> m_xAddrLeftField; + std::unique_ptr<weld::MetricSpinButton> m_xAddrTopField; std::unique_ptr<weld::MenuButton> m_xAddrEditButton; - std::unique_ptr<weld::MetricSpinButton> m_xSendLeftField; - std::unique_ptr<weld::MetricSpinButton> m_xSendTopField; + std::unique_ptr<weld::MetricSpinButton> m_xSendLeftField; + std::unique_ptr<weld::MetricSpinButton> m_xSendTopField; std::unique_ptr<weld::MenuButton> m_xSendEditButton; std::unique_ptr<weld::ComboBox> m_xSizeFormatBox; - std::unique_ptr<weld::MetricSpinButton> m_xSizeWidthField; - std::unique_ptr<weld::MetricSpinButton> m_xSizeHeightField; + std::unique_ptr<weld::MetricSpinButton> m_xSizeWidthField; + std::unique_ptr<weld::MetricSpinButton> m_xSizeHeightField; std::unique_ptr<weld::CustomWeld> m_xPreview; DECL_LINK(ModifyHdl, weld::MetricSpinButton&, void); @@ -48,22 +48,24 @@ class SwEnvFormatPage : public SfxTabPage void SetMinMax(); - SfxItemSet *GetCollItemSet(SwTextFormatColl const * pColl, bool bSender); + SfxItemSet* GetCollItemSet(SwTextFormatColl const* pColl, bool bSender); void Edit(const OString& rIdent, bool bSender); - SwEnvDlg *GetParentSwEnvDlg() { return m_pDialog; } + SwEnvDlg* GetParentSwEnvDlg() { return m_pDialog; } public: - SwEnvFormatPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); + SwEnvFormatPage(weld::Container* pPage, weld::DialogController* pController, + const SfxItemSet& rSet); void Init(SwEnvDlg* pDialog); virtual ~SwEnvFormatPage() override; - static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); + static std::unique_ptr<SfxTabPage> + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; - void FillItem(SwEnvItem& rItem); + void FillItem(SwEnvItem& rItem); virtual bool FillItemSet(SfxItemSet* rSet) override; virtual void Reset(const SfxItemSet* rSet) override; }; diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx index 00a610cad3e9..4fde994f6eeb 100644 --- a/sw/source/ui/envelp/envprt.hxx +++ b/sw/source/ui/envelp/envprt.hxx @@ -37,30 +37,32 @@ class SwEnvPrtPage : public SfxTabPage std::unique_ptr<weld::RadioButton> m_xBottomButton; std::unique_ptr<weld::MetricSpinButton> m_xRightField; std::unique_ptr<weld::MetricSpinButton> m_xDownField; - std::unique_ptr<weld::Label> m_xPrinterInfo; - std::unique_ptr<weld::Button> m_xPrtSetup; + std::unique_ptr<weld::Label> m_xPrinterInfo; + std::unique_ptr<weld::Button> m_xPrtSetup; - std::unique_ptr<weld::RadioButton> m_aIdsL[ENV_VER_RGHT-ENV_HOR_LEFT+1]; - std::unique_ptr<weld::RadioButton> m_aIdsU[ENV_VER_RGHT-ENV_HOR_LEFT+1]; + std::unique_ptr<weld::RadioButton> m_aIdsL[ENV_VER_RGHT - ENV_HOR_LEFT + 1]; + std::unique_ptr<weld::RadioButton> m_aIdsU[ENV_VER_RGHT - ENV_HOR_LEFT + 1]; - VclPtr<Printer> m_xPrt; + VclPtr<Printer> m_xPrt; DECL_LINK(LowerHdl, weld::ToggleButton&, void); DECL_LINK(UpperHdl, weld::ToggleButton&, void); DECL_LINK(ClickHdl, weld::ToggleButton&, void); - DECL_LINK(ButtonHdl, weld::Button&, void ); + DECL_LINK(ButtonHdl, weld::Button&, void); - SwEnvDlg* GetParentSwEnvDlg() {return static_cast<SwEnvDlg*>(GetDialogController()); } + SwEnvDlg* GetParentSwEnvDlg() { return static_cast<SwEnvDlg*>(GetDialogController()); } public: - SwEnvPrtPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); + SwEnvPrtPage(weld::Container* pPage, weld::DialogController* pController, + const SfxItemSet& rSet); virtual ~SwEnvPrtPage() override; - static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); + static std::unique_ptr<SfxTabPage> + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; - void FillItem(SwEnvItem& rItem); + void FillItem(SwEnvItem& rItem); virtual bool FillItemSet(SfxItemSet* rSet) override; virtual void Reset(const SfxItemSet* rSet) override; diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx index 0f4243aacac1..48e513d6275c 100644 --- a/sw/source/ui/envelp/labfmt.hxx +++ b/sw/source/ui/envelp/labfmt.hxx @@ -58,7 +58,6 @@ class SwLabPreview : public weld::CustomWidgetController virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; public: - SwLabPreview(); void UpdateItem(const SwLabItem& rItem); @@ -72,53 +71,54 @@ class SwLabFormatPage : public SfxTabPage SwLabPreview m_aPreview; - std::unique_ptr<weld::Label> m_xMakeFI; - std::unique_ptr<weld::Label> m_xTypeFI; + std::unique_ptr<weld::Label> m_xMakeFI; + std::unique_ptr<weld::Label> m_xTypeFI; std::unique_ptr<weld::CustomWeld> m_xPreview; - std::unique_ptr<weld::MetricSpinButton> m_xHDistField; - std::unique_ptr<weld::MetricSpinButton> m_xVDistField; - std::unique_ptr<weld::MetricSpinButton> m_xWidthField; - std::unique_ptr<weld::MetricSpinButton> m_xHeightField; - std::unique_ptr<weld::MetricSpinButton> m_xLeftField; - std::unique_ptr<weld::MetricSpinButton> m_xUpperField; + std::unique_ptr<weld::MetricSpinButton> m_xHDistField; + std::unique_ptr<weld::MetricSpinButton> m_xVDistField; + std::unique_ptr<weld::MetricSpinButton> m_xWidthField; + std::unique_ptr<weld::MetricSpinButton> m_xHeightField; + std::unique_ptr<weld::MetricSpinButton> m_xLeftField; + std::unique_ptr<weld::MetricSpinButton> m_xUpperField; std::unique_ptr<weld::SpinButton> m_xColsField; std::unique_ptr<weld::SpinButton> m_xRowsField; - std::unique_ptr<weld::MetricSpinButton> m_xPWidthField; - std::unique_ptr<weld::MetricSpinButton> m_xPHeightField; + std::unique_ptr<weld::MetricSpinButton> m_xPWidthField; + std::unique_ptr<weld::MetricSpinButton> m_xPHeightField; std::unique_ptr<weld::Button> m_xSavePB; - - DECL_LINK( ModifyHdl, weld::SpinButton&, void ); - DECL_LINK( MetricModifyHdl, weld::MetricSpinButton&, void ); - DECL_LINK( PreviewHdl, Timer *, void ); - DECL_LINK( SaveHdl, weld::Button&, void ); + DECL_LINK(ModifyHdl, weld::SpinButton&, void); + DECL_LINK(MetricModifyHdl, weld::MetricSpinButton&, void); + DECL_LINK(PreviewHdl, Timer*, void); + DECL_LINK(SaveHdl, weld::Button&, void); void ChangeMinMax(); public: - SwLabFormatPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); + SwLabFormatPage(weld::Container* pPage, weld::DialogController* pController, + const SfxItemSet& rSet); virtual ~SwLabFormatPage() override; - static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); + static std::unique_ptr<SfxTabPage> + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; - void FillItem(SwLabItem& rItem); + void FillItem(SwLabItem& rItem); virtual bool FillItemSet(SfxItemSet* rSet) override; virtual void Reset(const SfxItemSet* rSet) override; - SwLabDlg* GetParentSwLabDlg() {return static_cast<SwLabDlg*>(GetDialogController());} + SwLabDlg* GetParentSwLabDlg() { return static_cast<SwLabDlg*>(GetDialogController()); } }; class SwSaveLabelDlg : public weld::GenericDialogController { - bool bSuccess; - SwLabDlg* m_pLabDialog; - SwLabRec& rLabRec; + bool bSuccess; + SwLabDlg* m_pLabDialog; + SwLabRec& rLabRec; std::unique_ptr<weld::ComboBox> m_xMakeCB; - std::unique_ptr<weld::Entry> m_xTypeED; - std::unique_ptr<weld::Button> m_xOKPB; + std::unique_ptr<weld::Entry> m_xTypeED; + std::unique_ptr<weld::Button> m_xOKPB; DECL_LINK(OkHdl, weld::Button&, void); DECL_LINK(ModifyEntryHdl, weld::Entry&, void); diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx index c69d44ea4514..4f1673a7215c 100644 --- a/sw/source/ui/envelp/labprt.hxx +++ b/sw/source/ui/envelp/labprt.hxx @@ -28,31 +28,33 @@ class SwLabItem; class SwLabPrtPage : public SfxTabPage { - VclPtr<Printer> pPrinter; // for the shaft setting - unfortunately + VclPtr<Printer> pPrinter; // for the shaft setting - unfortunately - std::unique_ptr<weld::RadioButton> m_xPageButton; - std::unique_ptr<weld::RadioButton> m_xSingleButton; + std::unique_ptr<weld::RadioButton> m_xPageButton; + std::unique_ptr<weld::RadioButton> m_xSingleButton; std::unique_ptr<weld::Widget> m_xSingleGrid; std::unique_ptr<weld::Widget> m_xPrinterFrame; std::unique_ptr<weld::SpinButton> m_xColField; std::unique_ptr<weld::SpinButton> m_xRowField; - std::unique_ptr<weld::CheckButton> m_xSynchronCB; - std::unique_ptr<weld::Label> m_xPrinterInfo; + std::unique_ptr<weld::CheckButton> m_xSynchronCB; + std::unique_ptr<weld::Label> m_xPrinterInfo; std::unique_ptr<weld::Button> m_xPrtSetup; - DECL_LINK( CountHdl, weld::Button&, void ); + DECL_LINK(CountHdl, weld::Button&, void); - SwLabDlg* GetParentSwLabDlg() {return static_cast<SwLabDlg*>(GetDialogController());} + SwLabDlg* GetParentSwLabDlg() { return static_cast<SwLabDlg*>(GetDialogController()); } public: - SwLabPrtPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); + SwLabPrtPage(weld::Container* pPage, weld::DialogController* pController, + const SfxItemSet& rSet); virtual ~SwLabPrtPage() override; - static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); + static std::unique_ptr<SfxTabPage> + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; - void FillItem(SwLabItem& rItem); + void FillItem(SwLabItem& rItem); virtual bool FillItemSet(SfxItemSet* rSet) override; virtual void Reset(const SfxItemSet* rSet) override; Printer* GetPrt() { return pPrinter; } diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx index 5634b4c2c5eb..b4229e0c22c8 100644 --- a/sw/source/ui/envelp/swuilabimp.hxx +++ b/sw/source/ui/envelp/swuilabimp.hxx @@ -26,9 +26,9 @@ class SwLabPage : public SfxTabPage { - SwDBManager* pDBManager; - OUString sActDBName; - SwLabItem aItem; + SwDBManager* pDBManager; + OUString sActDBName; + SwLabItem aItem; std::unique_ptr<weld::Widget> m_xAddressFrame; std::unique_ptr<weld::CheckButton> m_xAddrBox; @@ -45,13 +45,13 @@ class SwLabPage : public SfxTabPage std::unique_ptr<weld::Label> m_xFormatInfo; DECL_LINK(AddrHdl, weld::ToggleButton&, void); - DECL_LINK(DatabaseHdl, weld::ComboBox&, void ); + DECL_LINK(DatabaseHdl, weld::ComboBox&, void); DECL_LINK(FieldHdl, weld::Button&, void); DECL_LINK(PageHdl, weld::ToggleButton&, void); DECL_LINK(MakeHdl, weld::ComboBox&, void); DECL_LINK(TypeHdl, weld::ComboBox&, void); - void DisplayFormat (); + void DisplayFormat(); SwLabRec* GetSelectedEntryPos(); public: @@ -59,17 +59,18 @@ public: virtual ~SwLabPage() override; - static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); + static std::unique_ptr<SfxTabPage> + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; - void FillItem(SwLabItem& rItem); + void FillItem(SwLabItem& rItem); virtual bool FillItemSet(SfxItemSet* rSet) override; virtual void Reset(const SfxItemSet* rSet) override; - SwLabDlg* GetParentSwLabDlg() {return static_cast<SwLabDlg*>(GetDialogController());} + SwLabDlg* GetParentSwLabDlg() { return static_cast<SwLabDlg*>(GetDialogController()); } - void SetToBusinessCard(); + void SetToBusinessCard(); void InitDatabaseBox(); void SetDBManager(SwDBManager* pDBManager_) { pDBManager = pDBManager_; } @@ -98,10 +99,12 @@ class SwPrivateDataPage : public SfxTabPage std::unique_ptr<weld::Entry> m_xMailED; public: - SwPrivateDataPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); + SwPrivateDataPage(weld::Container* pPage, weld::DialogController* pController, + const SfxItemSet& rSet); virtual ~SwPrivateDataPage() override; - static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); + static std::unique_ptr<SfxTabPage> + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; @@ -127,10 +130,12 @@ class SwBusinessDataPage : public SfxTabPage std::unique_ptr<weld::Entry> m_xMailED; public: - SwBusinessDataPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); + SwBusinessDataPage(weld::Container* pPage, weld::DialogController* pController, + const SfxItemSet& rSet); virtual ~SwBusinessDataPage() override; - static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); + static std::unique_ptr<SfxTabPage> + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; diff --git a/sw/source/ui/frmdlg/pattern.cxx b/sw/source/ui/frmdlg/pattern.cxx index a9de137b21dd..097ed1823027 100644 --- a/sw/source/ui/frmdlg/pattern.cxx +++ b/sw/source/ui/frmdlg/pattern.cxx @@ -29,8 +29,8 @@ SwBackgroundDlg::SwBackgroundDlg(weld::Window* pParent, const SfxItemSet& rSet) { m_xDialog->set_title(SwResId(STR_FRMUI_PATTERN)); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ); - if ( fnCreatePage ) + ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BKG); + if (fnCreatePage) { std::unique_ptr<SfxTabPage> xRet = (*fnCreatePage)(get_content_area(), this, &rSet); xRet->PageCreated(rSet); diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx index 5635b06ed400..81917da684c2 100644 --- a/sw/source/ui/frmdlg/uiborder.cxx +++ b/sw/source/ui/frmdlg/uiborder.cxx @@ -35,22 +35,20 @@ SwBorderDlg::SwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes m_xDialog->set_title(SwResId(STR_FRMUI_BORDER)); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ); + ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BORDER); if (fnCreatePage) { std::unique_ptr<SfxTabPage> xNewPage = (*fnCreatePage)(get_content_area(), this, &rSet); SfxAllItemSet aSet(*(rSet.GetPool())); - aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE, static_cast<sal_uInt16>(nType))); - if(SwBorderModes::TABLE == nType) - aSet.Put (SfxUInt32Item(SID_FLAG_TYPE,SVX_HIDESHADOWCTL)); + aSet.Put(SfxUInt16Item(SID_SWMODE_TYPE, static_cast<sal_uInt16>(nType))); + if (SwBorderModes::TABLE == nType) + aSet.Put(SfxUInt32Item(SID_FLAG_TYPE, SVX_HIDESHADOWCTL)); xNewPage->PageCreated(aSet); SetTabPage(std::move(xNewPage)); } } -SwBorderDlg::~SwBorderDlg() -{ -} +SwBorderDlg::~SwBorderDlg() {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/inc/swuiexp.hxx b/sw/source/ui/inc/swuiexp.hxx index 4419a7029549..3ea2f5f30464 100644 --- a/sw/source/ui/inc/swuiexp.hxx +++ b/sw/source/ui/inc/swuiexp.hxx @@ -23,7 +23,7 @@ namespace swui { - SwAbstractDialogFactory& GetFactory(); +SwAbstractDialogFactory& GetFactory(); } #endif diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx index 6d021eb07c13..e944bf24a50f 100644 --- a/sw/source/ui/index/multmrk.cxx +++ b/sw/source/ui/index/multmrk.cxx @@ -22,7 +22,8 @@ #include <wrtsh.hxx> SwMultiTOXMarkDlg::SwMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr& rTOXMgr) - : GenericDialogController(pParent, "modules/swriter/ui/selectindexdialog.ui", "SelectIndexDialog") + : GenericDialogController(pParent, "modules/swriter/ui/selectindexdialog.ui", + "SelectIndexDialog") , m_rMgr(rTOXMgr) , m_nPos(0) , m_xTextFT(m_xBuilder->weld_label("type")) @@ -34,14 +35,14 @@ SwMultiTOXMarkDlg::SwMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr& rTOXMgr) m_xTOXLB->connect_changed(LINK(this, SwMultiTOXMarkDlg, SelectHdl)); sal_uInt16 nSize = m_rMgr.GetTOXMarkCount(); - for(sal_uInt16 i=0; i < nSize; ++i) + for (sal_uInt16 i = 0; i < nSize; ++i) m_xTOXLB->append_text(m_rMgr.GetTOXMark(i)->GetText(m_rMgr.GetShell()->GetLayout())); m_xTOXLB->select(0); m_xTextFT->set_label(m_rMgr.GetTOXMark(0)->GetTOXType()->GetTypeName()); } -IMPL_LINK( SwMultiTOXMarkDlg, SelectHdl, weld::TreeView&, rBox, void ) +IMPL_LINK(SwMultiTOXMarkDlg, SelectHdl, weld::TreeView&, rBox, void) { if (rBox.get_selected_index() != -1) { @@ -59,8 +60,6 @@ short SwMultiTOXMarkDlg::run() return nRet; } -SwMultiTOXMarkDlg::~SwMultiTOXMarkDlg() -{ -} +SwMultiTOXMarkDlg::~SwMultiTOXMarkDlg() {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 2d0d1eef4d13..60c5d3737b23 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -56,7 +56,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, ModifyHdl, weld::Entry&, void) const sal_Int32 nTmpLen = sTmp.getLength(); sTmp = sTmp.replaceAll(OUStringChar(BookmarkTable::aForbiddenChars.getStr()[i]), ""); if (sTmp.getLength() != nTmpLen) - sMsg += OUStringChar(BookmarkTable::aForbiddenChars.getStr()[i]); + sMsg += OUStringChar(BookmarkTable::aForbiddenChars.getStr()[i]); } const bool bHasForbiddenChars = sTmp.getLength() != nLen; m_xForbiddenChars->set_visible(bHasForbiddenChars); @@ -80,7 +80,8 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, ModifyHdl, weld::Entry&, void) } // allow to add new bookmark only if one name provided and it's not taken - m_xInsertBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 0 && !bHasForbiddenChars && !m_bAreProtected); + m_xInsertBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 0 && !bHasForbiddenChars + && !m_bAreProtected); // allow to delete only if all bookmarks are recognized m_xDeleteBtn->set_sensitive(nEntries > 0 && nSelectedEntries == nEntries && !m_bAreProtected); @@ -96,9 +97,10 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl, weld::Button&, void) int nSelectedRows(0); - m_xBookmarksBox->selected_foreach([this, &nSelectedRows](weld::TreeIter& rEntry){ + m_xBookmarksBox->selected_foreach([this, &nSelectedRows](weld::TreeIter& rEntry) { // remove from model - sw::mark::IMark* pBookmark = reinterpret_cast<sw::mark::IMark*>(m_xBookmarksBox->get_id(rEntry).toInt64()); + sw::mark::IMark* pBookmark + = reinterpret_cast<sw::mark::IMark*>(m_xBookmarksBox->get_id(rEntry).toInt64()); OUString sRemoved = pBookmark->GetName(); IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess(); pMarkAccess->deleteMark(pMarkAccess->findMark(sRemoved)); @@ -106,7 +108,8 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl, weld::Button&, void) aReq.AppendItem(SfxStringItem(FN_DELETE_BOOKMARK, sRemoved)); aReq.Done(); aTableBookmarks.erase(std::remove(aTableBookmarks.begin(), aTableBookmarks.end(), - std::make_pair(pBookmark, sRemoved)), aTableBookmarks.end()); + std::make_pair(pBookmark, sRemoved)), + aTableBookmarks.end()); ++nSelectedRows; @@ -128,10 +131,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl, weld::Button&, void) } // callback to a goto button -IMPL_LINK_NOARG(SwInsertBookmarkDlg, GotoHdl, weld::Button&, void) -{ - GotoSelectedBookmark(); -} +IMPL_LINK_NOARG(SwInsertBookmarkDlg, GotoHdl, weld::Button&, void) { GotoSelectedBookmark(); } IMPL_LINK_NOARG(SwInsertBookmarkDlg, DoubleClickHdl, weld::TreeView&, bool) { @@ -149,15 +149,17 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, SelectionChangedHdl, weld::TreeView&, void) OUStringBuffer sEditBoxText; int nSelectedRows = 0; - m_xBookmarksBox->selected_foreach([this, &sEditBoxText, &nSelectedRows](weld::TreeIter& rEntry){ - sw::mark::IMark* pBookmark = reinterpret_cast<sw::mark::IMark*>(m_xBookmarksBox->get_id(rEntry).toInt64()); - const OUString& sEntryName = pBookmark->GetName(); - if (!sEditBoxText.isEmpty()) - sEditBoxText.append(";"); - sEditBoxText.append(sEntryName); - ++nSelectedRows; - return false; - }); + m_xBookmarksBox->selected_foreach( + [this, &sEditBoxText, &nSelectedRows](weld::TreeIter& rEntry) { + sw::mark::IMark* pBookmark + = reinterpret_cast<sw::mark::IMark*>(m_xBookmarksBox->get_id(rEntry).toInt64()); + const OUString& sEntryName = pBookmark->GetName(); + if (!sEditBoxText.isEmpty()) + sEditBoxText.append(";"); + sEditBoxText.append(sEntryName); + ++nSelectedRows; + return false; + }); if (nSelectedRows) { m_xInsertBtn->set_sensitive(false); @@ -183,7 +185,8 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, weld::Button&, void) if (!xSelected) return; - sw::mark::IMark* pBookmark = reinterpret_cast<sw::mark::IMark*>(m_xBookmarksBox->get_id(*xSelected).toInt64()); + sw::mark::IMark* pBookmark + = reinterpret_cast<sw::mark::IMark*>(m_xBookmarksBox->get_id(*xSelected).toInt64()); uno::Reference<frame::XModel> xModel = rSh.GetView().GetDocShell()->GetBaseModel(); uno::Reference<text::XBookmarksSupplier> xBkms(xModel, uno::UNO_QUERY); uno::Reference<container::XNameAccess> xNameAccess = xBkms->getBookmarks(); @@ -192,8 +195,10 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, weld::Button&, void) aObj >>= xTmp; uno::Reference<container::XNamed> xNamed(xTmp, uno::UNO_QUERY); SwAbstractDialogFactory& rFact = swui::GetFactory(); - ScopedVclPtr<AbstractSwRenameXNamedDlg> pDlg(rFact.CreateSwRenameXNamedDlg(m_xDialog.get(), xNamed, xNameAccess)); - pDlg->SetForbiddenChars(BookmarkTable::aForbiddenChars + OUStringChar(BookmarkTable::cSeparator)); + ScopedVclPtr<AbstractSwRenameXNamedDlg> pDlg( + rFact.CreateSwRenameXNamedDlg(m_xDialog.get(), xNamed, xNameAccess)); + pDlg->SetForbiddenChars(BookmarkTable::aForbiddenChars + + OUStringChar(BookmarkTable::cSeparator)); if (pDlg->Execute()) { @@ -209,7 +214,8 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, weld::Button&, void) IMPL_LINK_NOARG(SwInsertBookmarkDlg, InsertHdl, weld::Button&, void) { OUString sBookmark = m_xEditBox->get_text(); - rSh.SetBookmark2(vcl::KeyCode(), sBookmark, m_xHideCB->get_active(), m_xConditionED->get_text()); + rSh.SetBookmark2(vcl::KeyCode(), sBookmark, m_xHideCB->get_active(), + m_xConditionED->get_text()); m_xDialog->response(RET_OK); } @@ -231,7 +237,8 @@ void SwInsertBookmarkDlg::GotoSelectedBookmark() if (!xSelected) return; - sw::mark::IMark* pBookmark = reinterpret_cast<sw::mark::IMark*>(m_xBookmarksBox->get_id(*xSelected).toInt64()); + sw::mark::IMark* pBookmark + = reinterpret_cast<sw::mark::IMark*>(m_xBookmarksBox->get_id(*xSelected).toInt64()); rSh.EnterStdMode(); rSh.GotoMark(pBookmark); @@ -254,7 +261,8 @@ bool SwInsertBookmarkDlg::HaveBookmarksChanged() if (pMarkAccess->getBookmarksCount() != m_nLastBookmarksCount) return true; - std::vector<std::pair<sw::mark::IMark*, OUString>>::const_iterator aListIter = aTableBookmarks.begin(); + std::vector<std::pair<sw::mark::IMark*, OUString>>::const_iterator aListIter + = aTableBookmarks.begin(); for (IDocumentMarkAccess::const_iterator_t ppBookmark = pMarkAccess->getBookmarksBegin(); ppBookmark != pMarkAccess->getBookmarksEnd(); ++ppBookmark) { @@ -263,8 +271,7 @@ bool SwInsertBookmarkDlg::HaveBookmarksChanged() // more bookmarks then expected if (aListIter == aTableBookmarks.end()) return true; - if (aListIter->first != *ppBookmark || - aListIter->second != (*ppBookmark)->GetName()) + if (aListIter->first != *ppBookmark || aListIter->second != (*ppBookmark)->GetName()) return true; ++aListIter; } @@ -326,14 +333,15 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS) m_xEditBox->set_text(m_xBookmarksBox->GetNameProposal()); m_xEditBox->set_position(-1); - m_xForbiddenChars->set_label(SwResId(STR_BOOKMARK_FORBIDDENCHARS) + " " + BookmarkTable::aForbiddenChars); + m_xForbiddenChars->set_label(SwResId(STR_BOOKMARK_FORBIDDENCHARS) + " " + + BookmarkTable::aForbiddenChars); m_xForbiddenChars->set_visible(false); - if ( !officecfg::Office::Common::Misc::ExperimentalMode::get() ) + if (!officecfg::Office::Common::Misc::ExperimentalMode::get()) { - m_xHideCB->set_visible( false ); - m_xConditionFT->set_visible( false ); - m_xConditionED->set_visible( false ); + m_xHideCB->set_visible(false); + m_xConditionFT->set_visible(false); + m_xConditionED->set_visible(false); } m_bAreProtected = rSh.getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS); @@ -374,9 +382,7 @@ IMPL_LINK(SwInsertBookmarkDlg, HeaderBarClick, int, nColumn, void) } } -SwInsertBookmarkDlg::~SwInsertBookmarkDlg() -{ -} +SwInsertBookmarkDlg::~SwInsertBookmarkDlg() {} BookmarkTable::BookmarkTable(std::unique_ptr<weld::TreeView> xControl) : m_xControl(std::move(xControl)) @@ -450,8 +456,9 @@ void BookmarkTable::InsertBookmark(sw::mark::IMark* pMark) std::unique_ptr<weld::TreeIter> BookmarkTable::GetRowByBookmarkName(const OUString& sName) { std::unique_ptr<weld::TreeIter> xRet; - m_xControl->all_foreach([this, &sName, &xRet](weld::TreeIter& rEntry){ - sw::mark::IMark* pBookmark = reinterpret_cast<sw::mark::IMark*>(m_xControl->get_id(rEntry).toInt64()); + m_xControl->all_foreach([this, &sName, &xRet](weld::TreeIter& rEntry) { + sw::mark::IMark* pBookmark + = reinterpret_cast<sw::mark::IMark*>(m_xControl->get_id(rEntry).toInt64()); if (pBookmark->GetName() == sName) { xRet = m_xControl->make_iterator(&rEntry); @@ -485,7 +492,8 @@ OUString BookmarkTable::GetNameProposal() const sal_Int32 nHighestBookmarkId = 0; for (int i = 0, nCount = m_xControl->n_children(); i < nCount; ++i) { - sw::mark::IMark* pBookmark = reinterpret_cast<sw::mark::IMark*>(m_xControl->get_id(i).toInt64()); + sw::mark::IMark* pBookmark + = reinterpret_cast<sw::mark::IMark*>(m_xControl->get_id(i).toInt64()); const OUString& sName = pBookmark->GetName(); sal_Int32 nIndex = 0; if (sName.getToken(0, ' ', nIndex) == sDefaultBookmarkName) diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index fe49843b5264..3684ba04ff56 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -36,9 +36,8 @@ static int nSaveButtonState = -1; // 0: tab, 1: semicolon, 2: paragraph, 3: othe static bool bIsKeepColumn = true; static sal_Unicode uOther = ','; -void SwConvertTableDlg::GetValues( sal_Unicode& rDelim, - SwInsertTableOptions& rInsTableOpts, - SwTableAutoFormat const*& prTAFormat ) +void SwConvertTableDlg::GetValues(sal_Unicode& rDelim, SwInsertTableOptions& rInsTableOpts, + SwTableAutoFormat const*& prTAFormat) { if (m_xTabBtn->get_active()) { @@ -86,8 +85,8 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim, } SwConvertTableDlg::SwConvertTableDlg(SwView& rView, bool bToTable) - : SfxDialogController(rView.GetFrameWeld(), - "modules/swriter/ui/converttexttable.ui", "ConvertTextTableDialog") + : SfxDialogController(rView.GetFrameWeld(), "modules/swriter/ui/converttexttable.ui", + "ConvertTextTableDialog") , m_xTabBtn(m_xBuilder->weld_radio_button("tabs")) , m_xSemiBtn(m_xBuilder->weld_radio_button("semicolons")) , m_xParaBtn(m_xBuilder->weld_radio_button("paragraph")) @@ -121,11 +120,10 @@ SwConvertTableDlg::SwConvertTableDlg(SwView& rView, bool bToTable) m_xOtherBtn->set_active(true); if (uOther) m_xOtherEd->set_text(OUString(uOther)); - break; + break; } - } - if( bToTable ) + if (bToTable) { m_xDialog->set_title(SwResId(STR_CONVERT_TEXT_TABLE)); m_xAutoFormatBtn->connect_clicked(LINK(this, SwConvertTableDlg, AutoFormatHdl)); @@ -140,7 +138,7 @@ SwConvertTableDlg::SwConvertTableDlg(SwView& rView, bool bToTable) } m_xKeepColumn->save_state(); - Link<weld::Button&,void> aLk( LINK(this, SwConvertTableDlg, BtnHdl) ); + Link<weld::Button&, void> aLk(LINK(this, SwConvertTableDlg, BtnHdl)); m_xTabBtn->connect_clicked(aLk); m_xSemiBtn->connect_clicked(aLk); m_xParaBtn->connect_clicked(aLk); @@ -149,7 +147,7 @@ SwConvertTableDlg::SwConvertTableDlg(SwView& rView, bool bToTable) const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); + bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell()) & HTMLMODE_ON); SwInsertTableOptions aInsOpts = pModOpt->GetInsTableFlags(bHTMLMode); SwInsertTableFlags nInsTableFlags = aInsOpts.mnInsMode; @@ -168,7 +166,8 @@ IMPL_LINK_NOARG(SwConvertTableDlg, AutoFormatHdl, weld::Button&, void) { SwAbstractDialogFactory& rFact = swui::GetFactory(); - ScopedVclPtr<AbstractSwAutoFormatDlg> pDlg(rFact.CreateSwAutoFormatDlg(m_xDialog.get(), pShell, false, mxTAutoFormat.get())); + ScopedVclPtr<AbstractSwAutoFormatDlg> pDlg( + rFact.CreateSwAutoFormatDlg(m_xDialog.get(), pShell, false, mxTAutoFormat.get())); if (RET_OK == pDlg->Execute()) mxTAutoFormat = pDlg->FillAutoFormatOfIndex(); } diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx index 5713709145e4..c715b8a5f6a1 100644 --- a/sw/source/ui/table/mergetbl.cxx +++ b/sw/source/ui/table/mergetbl.cxx @@ -19,7 +19,7 @@ #include <mergetbl.hxx> -SwMergeTableDlg::SwMergeTableDlg(weld::Window *pParent, bool& rWithPrev) +SwMergeTableDlg::SwMergeTableDlg(weld::Window* pParent, bool& rWithPrev) : GenericDialogController(pParent, "modules/swriter/ui/mergetabledialog.ui", "MergeTableDialog") , m_rMergePrev(rWithPrev) , m_xMergePrevRB(m_xBuilder->weld_radio_button("prev")) @@ -27,10 +27,7 @@ SwMergeTableDlg::SwMergeTableDlg(weld::Window *pParent, bool& rWithPrev) m_xMergePrevRB->set_active(true); } -void SwMergeTableDlg::Apply() -{ - m_rMergePrev = m_xMergePrevRB->get_active(); -} +void SwMergeTableDlg::Apply() { m_rMergePrev = m_xMergePrevRB->get_active(); } short SwMergeTableDlg::run() { diff --git a/sw/source/ui/table/splittbl.cxx b/sw/source/ui/table/splittbl.cxx index e322bd8462a0..0deb5d03093c 100644 --- a/sw/source/ui/table/splittbl.cxx +++ b/sw/source/ui/table/splittbl.cxx @@ -21,7 +21,7 @@ #include <splittbl.hxx> #include <tblenum.hxx> -SwSplitTableDlg::SwSplitTableDlg(weld::Window *pParent, SwWrtShell &rSh) +SwSplitTableDlg::SwSplitTableDlg(weld::Window* pParent, SwWrtShell& rSh) : GenericDialogController(pParent, "modules/swriter/ui/splittable.ui", "SplitTableDialog") , m_xContentCopyRB(m_xBuilder->weld_radio_button("copyheading")) , m_xBoxAttrCopyWithParaRB(m_xBuilder->weld_radio_button("customheadingapplystyle")) diff --git a/sw/source/ui/vba/vbaaddin.hxx b/sw/source/ui/vba/vbaaddin.hxx index 7b66b6ba6218..6678dcdbddc3 100644 --- a/sw/source/ui/vba/vbaaddin.hxx +++ b/sw/source/ui/vba/vbaaddin.hxx @@ -22,7 +22,7 @@ #include <ooo/vba/word/XAddin.hpp> #include <vbahelper/vbahelperinterface.hxx> -typedef InheritedHelperInterfaceWeakImpl< ooo::vba::word::XAddin > SwVbaAddin_BASE; +typedef InheritedHelperInterfaceWeakImpl<ooo::vba::word::XAddin> SwVbaAddin_BASE; class SwVbaAddin : public SwVbaAddin_BASE { @@ -32,16 +32,18 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaAddin( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const OUString& rFileURL ); + SwVbaAddin(const css::uno::Reference<ooo::vba::XHelperInterface>& rParent, + const css::uno::Reference<css::uno::XComponentContext>& rContext, + const OUString& rFileURL); virtual ~SwVbaAddin() override; // Attributes virtual OUString SAL_CALL getName() override; - virtual void SAL_CALL setName( const OUString& _name ) override; + virtual void SAL_CALL setName(const OUString& _name) override; virtual OUString SAL_CALL getPath() override; virtual sal_Bool SAL_CALL getAutoload() override; virtual sal_Bool SAL_CALL getInstalled() override; - virtual void SAL_CALL setInstalled( sal_Bool _installed ) override; + virtual void SAL_CALL setInstalled(sal_Bool _installed) override; // XHelperInterface virtual OUString getServiceImplName() override; diff --git a/sw/source/ui/vba/vbaaddins.hxx b/sw/source/ui/vba/vbaaddins.hxx index 67a9edb3c998..0072b36d5aa8 100644 --- a/sw/source/ui/vba/vbaaddins.hxx +++ b/sw/source/ui/vba/vbaaddins.hxx @@ -22,20 +22,21 @@ #include <vbahelper/vbacollectionimpl.hxx> #include <ooo/vba/word/XAddins.hpp> -typedef CollTestImplHelper< ooo::vba::word::XAddins > SwVbaAddins_BASE; +typedef CollTestImplHelper<ooo::vba::word::XAddins> SwVbaAddins_BASE; class SwVbaAddins : public SwVbaAddins_BASE { public: /// @throws css::uno::RuntimeException - SwVbaAddins( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext ); + SwVbaAddins(const css::uno::Reference<ov::XHelperInterface>& xParent, + const css::uno::Reference<css::uno::XComponentContext>& xContext); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() override; - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override; + virtual css::uno::Reference<css::container::XEnumeration> SAL_CALL createEnumeration() override; // SwVbaAddins_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ) override; + virtual css::uno::Any createCollectionObject(const css::uno::Any& aSource) override; virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; }; diff --git a/sw/source/ui/vba/vbabookmark.hxx b/sw/source/ui/vba/vbabookmark.hxx index 6333354262c9..6bc123bb34f1 100644 --- a/sw/source/ui/vba/vbabookmark.hxx +++ b/sw/source/ui/vba/vbabookmark.hxx @@ -23,13 +23,13 @@ #include <vbahelper/vbahelperinterface.hxx> #include <com/sun/star/text/XTextContent.hpp> -typedef InheritedHelperInterfaceWeakImpl< ooo::vba::word::XBookmark > SwVbaBookmark_BASE; +typedef InheritedHelperInterfaceWeakImpl<ooo::vba::word::XBookmark> SwVbaBookmark_BASE; class SwVbaBookmark : public SwVbaBookmark_BASE { private: - css::uno::Reference< css::frame::XModel > mxModel; - css::uno::Reference< css::text::XTextContent > mxBookmark; + css::uno::Reference<css::frame::XModel> mxModel; + css::uno::Reference<css::text::XTextContent> mxBookmark; OUString maBookmarkName; bool mbValid; @@ -39,13 +39,14 @@ private: public: /// @throws css::uno::RuntimeException - SwVbaBookmark( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, - const css::uno::Reference< css::frame::XModel >& rModel, const OUString& rName ); + SwVbaBookmark(const css::uno::Reference<ooo::vba::XHelperInterface>& rParent, + const css::uno::Reference<css::uno::XComponentContext>& rContext, + const css::uno::Reference<css::frame::XModel>& rModel, const OUString& rName); virtual ~SwVbaBookmark() override; - // Methods + // Methods virtual OUString SAL_CALL getName() override; - virtual void SAL_CALL setName( const OUString& ) override; + virtual void SAL_CALL setName(const OUString&) override; virtual void SAL_CALL Delete() override; virtual void SAL_CALL Select() override; virtual css::uno::Any SAL_CALL Range() override; diff --git a/sw/source/ui/vba/vbaglobals.hxx b/sw/source/ui/vba/vbaglobals.hxx index 23e40c45d962..1d8c0b4f8a2a 100644 --- a/sw/source/ui/vba/vbaglobals.hxx +++ b/sw/source/ui/vba/vbaglobals.hxx @@ -28,36 +28,36 @@ #include <cppuhelper/implbase.hxx> #include <vbahelper/vbaglobalbase.hxx> -typedef ::cppu::ImplInheritanceHelper< VbaGlobalsBase, ov::word::XGlobals > SwVbaGlobals_BASE; +typedef ::cppu::ImplInheritanceHelper<VbaGlobalsBase, ov::word::XGlobals> SwVbaGlobals_BASE; class SwVbaGlobals : public SwVbaGlobals_BASE { private: - css::uno::Reference< ooo::vba::word::XApplication > mxApplication; + css::uno::Reference<ooo::vba::word::XApplication> mxApplication; /// @throws css::uno::RuntimeException - css::uno::Reference< ooo::vba::word::XApplication > const & getApplication(); + css::uno::Reference<ooo::vba::word::XApplication> const& getApplication(); public: - - SwVbaGlobals( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& rxContext ); + SwVbaGlobals(css::uno::Sequence<css::uno::Any> const& aArgs, + css::uno::Reference<css::uno::XComponentContext> const& rxContext); virtual ~SwVbaGlobals() override; // XGlobals virtual OUString SAL_CALL getName() override; - virtual css::uno::Reference< ooo::vba::word::XSystem > SAL_CALL getSystem() override; - virtual css::uno::Reference< ov::word::XDocument > SAL_CALL getActiveDocument() override; - virtual css::uno::Reference< ov::word::XWindow > SAL_CALL getActiveWindow() override; - virtual css::uno::Reference< ooo::vba::word::XOptions > SAL_CALL getOptions() override; - virtual css::uno::Reference< ooo::vba::word::XSelection > SAL_CALL getSelection() override; - virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) override; - virtual css::uno::Any SAL_CALL Documents( const css::uno::Any& aIndex ) override; - virtual css::uno::Any SAL_CALL Addins( const css::uno::Any& aIndex ) override; - virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& aIndex ) override; - virtual css::uno::Any SAL_CALL ListGalleries( const css::uno::Any& aIndex ) override; - virtual float SAL_CALL CentimetersToPoints( float Centimeters ) override; + virtual css::uno::Reference<ooo::vba::word::XSystem> SAL_CALL getSystem() override; + virtual css::uno::Reference<ov::word::XDocument> SAL_CALL getActiveDocument() override; + virtual css::uno::Reference<ov::word::XWindow> SAL_CALL getActiveWindow() override; + virtual css::uno::Reference<ooo::vba::word::XOptions> SAL_CALL getOptions() override; + virtual css::uno::Reference<ooo::vba::word::XSelection> SAL_CALL getSelection() override; + virtual css::uno::Any SAL_CALL CommandBars(const css::uno::Any& aIndex) override; + virtual css::uno::Any SAL_CALL Documents(const css::uno::Any& aIndex) override; + virtual css::uno::Any SAL_CALL Addins(const css::uno::Any& aIndex) override; + virtual css::uno::Any SAL_CALL Dialogs(const css::uno::Any& aIndex) override; + virtual css::uno::Any SAL_CALL ListGalleries(const css::uno::Any& aIndex) override; + virtual float SAL_CALL CentimetersToPoints(float Centimeters) override; // XMultiServiceFactory - virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames( ) override; + virtual css::uno::Sequence<OUString> SAL_CALL getAvailableServiceNames() override; // XHelperInterface virtual OUString getServiceImplName() override; diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.hxx b/sw/source/ui/vba/vbaheaderfooterhelper.hxx index ed3c5d2d9d21..ca66b208addf 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.hxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.hxx @@ -26,21 +26,21 @@ class HeaderFooterHelper { public: /// @throws css::uno::RuntimeException - static bool isHeaderFooter( const css::uno::Reference< css::frame::XModel >& xModel ); + static bool isHeaderFooter(const css::uno::Reference<css::frame::XModel>& xModel); /// @throws css::uno::RuntimeException - static bool isHeaderFooter( const css::uno::Reference< css::text::XText >& xText ); + static bool isHeaderFooter(const css::uno::Reference<css::text::XText>& xText); /// @throws css::uno::RuntimeException - static bool isHeader( const css::uno::Reference< css::frame::XModel >& xModel ); + static bool isHeader(const css::uno::Reference<css::frame::XModel>& xModel); /// @throws css::uno::RuntimeException - static bool isFirstPageHeader( const css::uno::Reference< css::frame::XModel >& xModel ); + static bool isFirstPageHeader(const css::uno::Reference<css::frame::XModel>& xModel); /// @throws css::uno::RuntimeException - static bool isEvenPagesHeader( const css::uno::Reference< css::frame::XModel >& xModel ); + static bool isEvenPagesHeader(const css::uno::Reference<css::frame::XModel>& xModel); /// @throws css::uno::RuntimeException - static bool isFooter( const css::uno::Reference< css::frame::XModel >& xModel ); + static bool isFooter(const css::uno::Reference<css::frame::XModel>& xModel); /// @throws css::uno::RuntimeException - static bool isFirstPageFooter( const css::uno::Reference< css::frame::XModel >& xModel ); + static bool isFirstPageFooter(const css::uno::Reference<css::frame::XModel>& xModel); /// @throws css::uno::RuntimeException - static bool isEvenPagesFooter( const css::uno::Reference< css::frame::XModel >& xModel ); + static bool isEvenPagesFooter(const css::uno::Reference<css::frame::XModel>& xModel); }; #endif diff --git a/sw/source/ui/vba/vbainformationhelper.hxx b/sw/source/ui/vba/vbainformationhelper.hxx index 01e5500bab86..c60b300cd430 100644 --- a/sw/source/ui/vba/vbainformationhelper.hxx +++ b/sw/source/ui/vba/vbainformationhelper.hxx @@ -26,13 +26,16 @@ class SwVbaInformationHelper { public: /// @throws css::uno::RuntimeException - static sal_Int32 handleWdActiveEndPageNumber( const css::uno::Reference< css::text::XTextViewCursor >& xTVCursor ); + static sal_Int32 + handleWdActiveEndPageNumber(const css::uno::Reference<css::text::XTextViewCursor>& xTVCursor); /// @throws css::uno::RuntimeException - static sal_Int32 handleWdNumberOfPagesInDocument( const css::uno::Reference< css::frame::XModel >& xModel ); + static sal_Int32 + handleWdNumberOfPagesInDocument(const css::uno::Reference<css::frame::XModel>& xModel); /// @throws css::uno::RuntimeException - static double handleWdVerticalPositionRelativeToPage( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextViewCursor >& xTVCursor ); + static double handleWdVerticalPositionRelativeToPage( + const css::uno::Reference<css::frame::XModel>& xModel, + const css::uno::Reference<css::text::XTextViewCursor>& xTVCursor); //static double verticalPositionRelativeToPageBoundary( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XTextViewCursor >& xTVCursor, const css::uno::Reference< css::beans::XPropertySet >& xStyleProps ) throw( css::uno::RuntimeException ); - }; #endif // INCLUDED_SW_SOURCE_UI_VBA_VBAINFORMATIONHELPER_HXX diff --git a/sw/source/ui/vba/vbapane.hxx b/sw/source/ui/vba/vbapane.hxx index e5c13bf1c324..63edfa390725 100644 --- a/sw/source/ui/vba/vbapane.hxx +++ b/sw/source/ui/vba/vbapane.hxx @@ -22,22 +22,23 @@ #include <ooo/vba/word/XPane.hpp> #include <vbahelper/vbahelperinterface.hxx> -typedef InheritedHelperInterfaceWeakImpl< ooo::vba::word::XPane > SwVbaPane_BASE; +typedef InheritedHelperInterfaceWeakImpl<ooo::vba::word::XPane> SwVbaPane_BASE; class SwVbaPane : public SwVbaPane_BASE { private: - css::uno::Reference< css::frame::XModel > mxModel; + css::uno::Reference<css::frame::XModel> mxModel; public: /// @throws css::uno::RuntimeException - SwVbaPane( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, - const css::uno::Reference< css::frame::XModel >& xModel ); + SwVbaPane(const css::uno::Reference<ooo::vba::XHelperInterface>& rParent, + const css::uno::Reference<css::uno::XComponentContext>& rContext, + const css::uno::Reference<css::frame::XModel>& xModel); virtual ~SwVbaPane() override; // Methods - virtual css::uno::Any SAL_CALL View( ) override; - virtual void SAL_CALL Close( ) override; + virtual css::uno::Any SAL_CALL View() override; + virtual void SAL_CALL Close() override; // XHelperInterface virtual OUString getServiceImplName() override; diff --git a/sw/source/ui/vba/vbatabstop.hxx b/sw/source/ui/vba/vbatabstop.hxx index de956205db96..3be2c29e4747 100644 --- a/sw/source/ui/vba/vbatabstop.hxx +++ b/sw/source/ui/vba/vbatabstop.hxx @@ -22,13 +22,14 @@ #include <ooo/vba/word/XTabStop.hpp> #include <vbahelper/vbahelperinterface.hxx> -typedef InheritedHelperInterfaceWeakImpl< ooo::vba::word::XTabStop > SwVbaTabStop_BASE; +typedef InheritedHelperInterfaceWeakImpl<ooo::vba::word::XTabStop> SwVbaTabStop_BASE; class SwVbaTabStop : public SwVbaTabStop_BASE { public: /// @throws css::uno::RuntimeException - SwVbaTabStop( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext ); + SwVbaTabStop(const css::uno::Reference<ooo::vba::XHelperInterface>& rParent, + const css::uno::Reference<css::uno::XComponentContext>& rContext); virtual ~SwVbaTabStop() override; // XHelperInterface diff --git a/sw/source/uibase/app/appenv.hxx b/sw/source/uibase/app/appenv.hxx index 64fcd4a81af0..862e5b08f090 100644 --- a/sw/source/uibase/app/appenv.hxx +++ b/sw/source/uibase/app/appenv.hxx @@ -15,8 +15,7 @@ class SwWrtShell; class SwFieldMgr; -OUString InsertLabEnvText( SwWrtShell& , SwFieldMgr& , const OUString& ); - +OUString InsertLabEnvText(SwWrtShell&, SwFieldMgr&, const OUString&); #endif diff --git a/sw/source/uibase/app/swdllimpl.hxx b/sw/source/uibase/app/swdllimpl.hxx index bcbcaf005df9..bee7110e0e1a 100644 --- a/sw/source/uibase/app/swdllimpl.hxx +++ b/sw/source/uibase/app/swdllimpl.hxx @@ -16,7 +16,10 @@ #include <memory> -namespace sw { class Filters; } +namespace sw +{ +class Filters; +} class SvxAutoCorrCfg; @@ -30,14 +33,14 @@ public: SwDLL(); ~SwDLL() COVERITY_NOEXCEPT_FALSE; - sw::Filters & getFilters(); + sw::Filters& getFilters(); private: SwDLL(SwDLL const&) = delete; SwDLL& operator=(SwDLL const&) = delete; - std::unique_ptr< sw::Filters > filters_; - SvxAutoCorrCfg *m_pAutoCorrCfg; + std::unique_ptr<sw::Filters> filters_; + SvxAutoCorrCfg* m_pAutoCorrCfg; }; #endif diff --git a/sw/source/uibase/frmdlg/colmgr.cxx b/sw/source/uibase/frmdlg/colmgr.cxx index 8dda357ee391..32d777713fda 100644 --- a/sw/source/uibase/frmdlg/colmgr.cxx +++ b/sw/source/uibase/frmdlg/colmgr.cxx @@ -35,17 +35,17 @@ void FitToActualSize(SwFormatCol& rCol, sal_uInt16 nWidth) { const sal_uInt16 nCount = rCol.GetColumns().size(); - for(sal_uInt16 i = 0; i < nCount; ++i) + for (sal_uInt16 i = 0; i < nCount; ++i) { const sal_uInt16 nTmp = rCol.CalcColWidth(i, nWidth); - auto & col = rCol.GetColumns()[i]; + auto& col = rCol.GetColumns()[i]; col.SetWishWidth(nTmp); // If necessary, shrink borders (as equally as possible) to keep up the invariant that // GetWishWidth() >= GetLeft() + GetRight(): sal_uInt32 const borders = col.GetLeft() + col.GetRight(); if (borders > nTmp) { - auto const shrink = borders - nTmp; + auto const shrink = borders - nTmp; auto const half = shrink / 2; // rounds down if (col.GetLeft() < col.GetRight()) { @@ -67,34 +67,34 @@ void FitToActualSize(SwFormatCol& rCol, sal_uInt16 nWidth) // public methods // set column quantity and Gutterwidth -void SwColMgr::SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth) +void SwColMgr::SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth) { aFormatCol.Init(nCount, nGutterWidth, nWidth); aFormatCol.SetWishWidth(nWidth); aFormatCol.SetGutterWidth(nGutterWidth, nWidth); } -sal_uInt16 SwColMgr::GetGutterWidth( sal_uInt16 nPos ) const +sal_uInt16 SwColMgr::GetGutterWidth(sal_uInt16 nPos) const { sal_uInt16 nRet; - if(nPos == USHRT_MAX ) + if (nPos == USHRT_MAX) nRet = GetCount() > 1 ? aFormatCol.GetGutterWidth() : DEF_GUTTER_WIDTH; else { - OSL_ENSURE(nPos < GetCount() - 1, "column overindexed" ); + OSL_ENSURE(nPos < GetCount() - 1, "column overindexed"); const SwColumns& rCols = aFormatCol.GetColumns(); nRet = rCols[nPos].GetRight() + rCols[nPos + 1].GetLeft(); } return nRet; } -void SwColMgr::SetGutterWidth(sal_uInt16 nGutterWidth, sal_uInt16 nPos ) +void SwColMgr::SetGutterWidth(sal_uInt16 nGutterWidth, sal_uInt16 nPos) { - if(nPos == USHRT_MAX) + if (nPos == USHRT_MAX) aFormatCol.SetGutterWidth(nGutterWidth, nWidth); else { - OSL_ENSURE(nPos < GetCount() - 1, "column overindexed" ); + OSL_ENSURE(nPos < GetCount() - 1, "column overindexed"); SwColumns& rCols = aFormatCol.GetColumns(); sal_uInt16 nGutterWidth2 = nGutterWidth / 2; rCols[nPos].SetRight(nGutterWidth2); @@ -124,7 +124,6 @@ void SwColMgr::SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWd) { OSL_ENSURE(nIdx < GetCount(), "Column array overindexed."); aFormatCol.GetColumns()[nIdx].SetWishWidth(nWd); - } // newly set size @@ -135,21 +134,19 @@ void SwColMgr::SetActualWidth(sal_uInt16 nW) } // ctor -SwColMgr::SwColMgr(const SfxItemSet& rSet) : - aFormatCol(rSet.Get(RES_COL)) +SwColMgr::SwColMgr(const SfxItemSet& rSet) + : aFormatCol(rSet.Get(RES_COL)) { nWidth = static_cast<sal_uInt16>(rSet.Get(RES_FRM_SIZE).GetWidth()); if (nWidth < MINLAY) nWidth = USHRT_MAX; - const SvxLRSpaceItem &rLR = rSet.Get(RES_LR_SPACE); + const SvxLRSpaceItem& rLR = rSet.Get(RES_LR_SPACE); nWidth = nWidth - static_cast<sal_uInt16>(rLR.GetLeft()); nWidth = nWidth - static_cast<sal_uInt16>(rLR.GetRight()); ::FitToActualSize(aFormatCol, nWidth); } -SwColMgr::~SwColMgr() -{ -} +SwColMgr::~SwColMgr() {} void SwColMgr::SetLineWidthAndColor(SvxBorderLineStyle eStyle, sal_uLong nLWidth, const Color& rCol) { diff --git a/sw/source/uibase/inc/DashedLine.hxx b/sw/source/uibase/inc/DashedLine.hxx index 38a3eab69fe1..a2d2aa1b012f 100644 --- a/sw/source/uibase/inc/DashedLine.hxx +++ b/sw/source/uibase/inc/DashedLine.hxx @@ -18,10 +18,10 @@ class SwDashedLine : public Control Color& (*m_pColorFn)(); public: - SwDashedLine( vcl::Window* pParent, Color& ( *pColorFn )() ); - virtual ~SwDashedLine( ) override; + SwDashedLine(vcl::Window* pParent, Color& (*pColorFn)()); + virtual ~SwDashedLine() override; - virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; + virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; }; #endif diff --git a/sw/source/uibase/inc/SidebarWindowsConsts.hxx b/sw/source/uibase/inc/SidebarWindowsConsts.hxx index a6becb92b499..2e920b990765 100644 --- a/sw/source/uibase/inc/SidebarWindowsConsts.hxx +++ b/sw/source/uibase/inc/SidebarWindowsConsts.hxx @@ -22,8 +22,8 @@ #include <sal/types.h> -namespace sw::sidebarwindows { - +namespace sw::sidebarwindows +{ const sal_Int8 ANCHORLINE_WIDTH = 1; } // end of namespace sw::sidebarwindows diff --git a/sw/source/uibase/inc/abstract.hxx b/sw/source/uibase/inc/abstract.hxx index 6d6f6ba60d03..2bba7126debe 100644 --- a/sw/source/uibase/inc/abstract.hxx +++ b/sw/source/uibase/inc/abstract.hxx @@ -30,8 +30,8 @@ public: SwInsertAbstractDlg(weld::Window* pParent); virtual ~SwInsertAbstractDlg() override; - sal_uInt8 GetLevel() const; - sal_uInt8 GetPara() const; + sal_uInt8 GetLevel() const; + sal_uInt8 GetPara() const; }; #endif diff --git a/sw/source/uibase/inc/ascfldlg.hxx b/sw/source/uibase/inc/ascfldlg.hxx index 330159551f96..c50d51956cd7 100644 --- a/sw/source/uibase/inc/ascfldlg.hxx +++ b/sw/source/uibase/inc/ascfldlg.hxx @@ -37,7 +37,7 @@ class SwAsciiFilterDlg : public SfxDialogController std::unique_ptr<weld::Label> m_xFontFT; std::unique_ptr<weld::ComboBox> m_xFontLB; std::unique_ptr<weld::Label> m_xLanguageFT; - std::unique_ptr<SvxLanguageBox> m_xLanguageLB; + std::unique_ptr<SvxLanguageBox> m_xLanguageLB; std::unique_ptr<weld::RadioButton> m_xCRLF_RB; std::unique_ptr<weld::RadioButton> m_xCR_RB; std::unique_ptr<weld::RadioButton> m_xLF_RB; @@ -45,9 +45,9 @@ class SwAsciiFilterDlg : public SfxDialogController DECL_LINK(CharSetSelHdl, weld::ComboBox&, void); DECL_LINK(LineEndHdl, weld::ToggleButton&, void); - void SetCRLF( LineEnd eEnd ); + void SetCRLF(LineEnd eEnd); LineEnd GetCRLF() const; - void SetIncludeBOM( bool bIncludeBOM ); + void SetIncludeBOM(bool bIncludeBOM); bool GetIncludeBOM() const; void UpdateIncludeBOMSensitiveState(); @@ -57,7 +57,7 @@ public: SwAsciiFilterDlg(weld::Window* pParent, SwDocShell& rDocSh, SvStream* pStream); virtual ~SwAsciiFilterDlg() override; - void FillOptions( SwAsciiOptions& rOptions ); + void FillOptions(SwAsciiOptions& rOptions); }; #endif diff --git a/sw/source/uibase/inc/barcfg.hxx b/sw/source/uibase/inc/barcfg.hxx index f40f2c7d1516..a980cbc064e9 100644 --- a/sw/source/uibase/inc/barcfg.hxx +++ b/sw/source/uibase/inc/barcfg.hxx @@ -26,19 +26,19 @@ enum class SelectionType : sal_Int32; class SwToolbarConfigItem : public utl::ConfigItem { - sal_Int32 aTbxIdArray[5]; + sal_Int32 aTbxIdArray[5]; static css::uno::Sequence<OUString> GetPropertyNames(); virtual void ImplCommit() override; public: - SwToolbarConfigItem( bool bWeb ); + SwToolbarConfigItem(bool bWeb); virtual ~SwToolbarConfigItem() override; - virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override; + virtual void Notify(const css::uno::Sequence<OUString>& aPropertyNames) override; - void SetTopToolbar(SelectionType nSelType, ToolbarId eBarId); + void SetTopToolbar(SelectionType nSelType, ToolbarId eBarId); }; #endif diff --git a/sw/source/uibase/inc/beziersh.hxx b/sw/source/uibase/inc/beziersh.hxx index abf64aa65533..1556c2acc136 100644 --- a/sw/source/uibase/inc/beziersh.hxx +++ b/sw/source/uibase/inc/beziersh.hxx @@ -21,7 +21,7 @@ #include "basesh.hxx" -class SwBezierShell: public SwBaseShell +class SwBezierShell : public SwBaseShell { public: SFX_DECL_INTERFACE(SW_BEZIERSHELL) @@ -31,10 +31,10 @@ private: static void InitInterface_Impl(); public: - SwBezierShell(SwView &rView); + SwBezierShell(SwView& rView); - void GetState(SfxItemSet &); - void Execute(SfxRequest const &); + void GetState(SfxItemSet&); + void Execute(SfxRequest const&); }; #endif diff --git a/sw/source/uibase/inc/bookctrl.hxx b/sw/source/uibase/inc/bookctrl.hxx index a69f020d6c51..002cdea92c3b 100644 --- a/sw/source/uibase/inc/bookctrl.hxx +++ b/sw/source/uibase/inc/bookctrl.hxx @@ -24,20 +24,20 @@ class SwBookmarkControl : public SfxStatusBarControl { - virtual void Command( const CommandEvent& rCEvt ) override; + virtual void Command(const CommandEvent& rCEvt) override; public: - virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, - const SfxPoolItem* pState ) override; - virtual void Paint( const UserDrawEvent& rEvt ) override; + virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, + const SfxPoolItem* pState) override; + virtual void Paint(const UserDrawEvent& rEvt) override; SFX_DECL_STATUSBAR_CONTROL(); - SwBookmarkControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb ); + SwBookmarkControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb); virtual ~SwBookmarkControl() override; private: - OUString sPageNumber; + OUString sPageNumber; }; #endif diff --git a/sw/source/uibase/inc/break.hxx b/sw/source/uibase/inc/break.hxx index 9ee79926fb1a..9de8a9f4a366 100644 --- a/sw/source/uibase/inc/break.hxx +++ b/sw/source/uibase/inc/break.hxx @@ -36,12 +36,12 @@ class SwBreakDlg : public weld::GenericDialogController std::unique_ptr<weld::SpinButton> m_xPageNumEdit; std::unique_ptr<weld::Button> m_xOkBtn; - SwWrtShell &rSh; - OUString m_aTemplate; - sal_uInt16 nKind; - ::std::optional<sal_uInt16> oPgNum; + SwWrtShell& rSh; + OUString m_aTemplate; + sal_uInt16 nKind; + ::std::optional<sal_uInt16> oPgNum; - bool bHtmlMode; + bool bHtmlMode; DECL_LINK(ToggleHdl, weld::ToggleButton&, void); DECL_LINK(ChangeHdl, weld::ComboBox&, void); @@ -53,10 +53,10 @@ class SwBreakDlg : public weld::GenericDialogController void rememberResult(); public: - SwBreakDlg(weld::Window *pParent, SwWrtShell &rSh); + SwBreakDlg(weld::Window* pParent, SwWrtShell& rSh); const OUString& GetTemplateName() const { return m_aTemplate; } sal_uInt16 GetKind() const { return nKind; } - const ::std::optional<sal_uInt16>& GetPageNumber() const { return oPgNum; } + const ::std::optional<sal_uInt16>& GetPageNumber() const { return oPgNum; } }; #endif diff --git a/sw/source/uibase/inc/condedit.hxx b/sw/source/uibase/inc/condedit.hxx index a5714d6120bb..1c4df0086b55 100644 --- a/sw/source/uibase/inc/condedit.hxx +++ b/sw/source/uibase/inc/condedit.hxx @@ -30,8 +30,8 @@ class SW_DLLPUBLIC ConditionEditDropTarget : public DropTargetHelper private: ConditionEdit& m_rEdit; - SAL_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override; - SAL_DLLPRIVATE virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override; + SAL_DLLPRIVATE virtual sal_Int8 AcceptDrop(const AcceptDropEvent& rEvt) override; + SAL_DLLPRIVATE virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent& rEvt) override; public: ConditionEditDropTarget(ConditionEdit& rEdit); @@ -53,7 +53,10 @@ public: void save_value() { m_xControl->save_value(); } bool get_value_changed_from_saved() const { return m_xControl->get_value_changed_from_saved(); } void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); } - void connect_changed(const Link<weld::Entry&, void>& rLink) { m_xControl->connect_changed(rLink); } + void connect_changed(const Link<weld::Entry&, void>& rLink) + { + m_xControl->connect_changed(rLink); + } void replace_selection(const OUString& rText) { m_xControl->replace_selection(rText); } void hide() { m_xControl->hide(); } weld::Entry& get_widget() { return *m_xControl; } diff --git a/sw/source/uibase/inc/conpoly.hxx b/sw/source/uibase/inc/conpoly.hxx index d1fad7db3e94..e9250eb39e89 100644 --- a/sw/source/uibase/inc/conpoly.hxx +++ b/sw/source/uibase/inc/conpoly.hxx @@ -30,7 +30,7 @@ public: // Mouse- & Key-Events virtual bool MouseButtonUp(const MouseEvent& rMEvt) override; - virtual void Activate(const sal_uInt16 nSlotId) override; // activate function + virtual void Activate(const sal_uInt16 nSlotId) override; // activate function }; #endif // INCLUDED_SW_SOURCE_UIBASE_INC_CONPOLY_HXX diff --git a/sw/source/uibase/inc/convert.hxx b/sw/source/uibase/inc/convert.hxx index 08a831b0b459..103490eac0f9 100644 --- a/sw/source/uibase/inc/convert.hxx +++ b/sw/source/uibase/inc/convert.hxx @@ -49,7 +49,7 @@ class SwConvertTableDlg : public SfxDialogController std::unique_ptr<weld::Button> m_xAutoFormatBtn; std::unique_ptr<SwTableAutoFormat> mxTAutoFormat; - SwWrtShell* pShell; + SwWrtShell* pShell; DECL_LINK(AutoFormatHdl, weld::Button&, void); DECL_LINK(BtnHdl, weld::Button&, void); @@ -59,9 +59,8 @@ class SwConvertTableDlg : public SfxDialogController public: SwConvertTableDlg(SwView& rView, bool bToTable); - void GetValues( sal_Unicode& rDelim, - SwInsertTableOptions& rInsTableOpts, - SwTableAutoFormat const*& prTAFormat ); + void GetValues(sal_Unicode& rDelim, SwInsertTableOptions& rInsTableOpts, + SwTableAutoFormat const*& prTAFormat); }; #endif diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx index 16fa1f063da9..b26a1fb2178f 100644 --- a/sw/source/uibase/inc/cption.hxx +++ b/sw/source/uibase/inc/cption.hxx @@ -33,14 +33,14 @@ class SwCaptionDialog : public SfxDialogController { OUString m_sNone; TextFilterAutoConvert m_aTextFilter; - SwView &rView; // search per active, avoid View - std::unique_ptr<SwFieldMgr> pMgr; // pointer to save the include + SwView& rView; // search per active, avoid View + std::unique_ptr<SwFieldMgr> pMgr; // pointer to save the include - OUString sCharacterStyle; - bool bCopyAttributes; - bool bOrderNumberingFirst; //#i61007# order of captions + OUString sCharacterStyle; + bool bCopyAttributes; + bool bOrderNumberingFirst; //#i61007# order of captions - css::uno::Reference< css::container::XNameAccess > xNameAccess; + css::uno::Reference<css::container::XNameAccess> xNameAccess; SwCaptionPreview m_aPreview; std::unique_ptr<weld::Entry> m_xTextEdit; @@ -73,7 +73,7 @@ class SwCaptionDialog : public SfxDialogController static OUString our_aSepTextSave; // Save caption separator text public: - SwCaptionDialog(weld::Window *pParent, SwView &rV); + SwCaptionDialog(weld::Window* pParent, SwView& rV); virtual short run() override; virtual ~SwCaptionDialog() override; }; diff --git a/sw/source/uibase/inc/dbui.hxx b/sw/source/uibase/inc/dbui.hxx index 38ace352a2cd..ea42bb44da13 100644 --- a/sw/source/uibase/inc/dbui.hxx +++ b/sw/source/uibase/inc/dbui.hxx @@ -23,14 +23,14 @@ #include <swdllapi.h> -class PrintMonitor: public weld::GenericDialogController +class PrintMonitor : public weld::GenericDialogController { public: std::unique_ptr<weld::Label> m_xDocName; std::unique_ptr<weld::Label> m_xPrinter; std::unique_ptr<weld::Label> m_xPrintInfo; - PrintMonitor(weld::Window *pParent); + PrintMonitor(weld::Window* pParent); virtual ~PrintMonitor() override; }; @@ -41,26 +41,26 @@ public: std::unique_ptr<weld::Label> m_xPrinter; std::unique_ptr<weld::Label> m_xPrintInfo; - SaveMonitor(weld::Window *pParent); + SaveMonitor(weld::Window* pParent); virtual ~SaveMonitor() override; }; class CreateMonitor : public weld::GenericDialogController { public: - CreateMonitor(weld::Window *pParent); + CreateMonitor(weld::Window* pParent); virtual ~CreateMonitor() override; - void SetTotalCount( sal_Int32 nTotal ); - void SetCurrentPosition( sal_Int32 nCurrent ); + void SetTotalCount(sal_Int32 nTotal); + void SetCurrentPosition(sal_Int32 nCurrent); private: void UpdateCountingText(); private: - OUString m_sCountingPattern; - sal_Int32 m_nTotalCount; - sal_Int32 m_nCurrentPosition; + OUString m_sCountingPattern; + sal_Int32 m_nTotalCount; + sal_Int32 m_nCurrentPosition; std::unique_ptr<weld::Label> m_xCounting; }; diff --git a/sw/source/uibase/inc/docfnote.hxx b/sw/source/uibase/inc/docfnote.hxx index 521e2114a4e0..6e232c85ac63 100644 --- a/sw/source/uibase/inc/docfnote.hxx +++ b/sw/source/uibase/inc/docfnote.hxx @@ -25,14 +25,14 @@ class SwWrtShell; class SwFootNoteOptionDlg : public SfxTabDialogController { - SwWrtShell &rSh; + SwWrtShell& rSh; - virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override; + virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override; DECL_LINK(OkHdl, weld::Button&, void); public: - SwFootNoteOptionDlg(weld::Window *pParent, SwWrtShell &rSh); + SwFootNoteOptionDlg(weld::Window* pParent, SwWrtShell& rSh); }; #endif diff --git a/sw/source/uibase/inc/dselect.hxx b/sw/source/uibase/inc/dselect.hxx index cac7e5ce4396..e6002e1d6107 100644 --- a/sw/source/uibase/inc/dselect.hxx +++ b/sw/source/uibase/inc/dselect.hxx @@ -24,10 +24,10 @@ // draw rectangle class DrawSelection : public SwDrawBase { - public: +public: DrawSelection(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView); - virtual void Activate(const sal_uInt16 nSlotId) override; // activate function + virtual void Activate(const sal_uInt16 nSlotId) override; // activate function }; #endif // INCLUDED_SW_SOURCE_UIBASE_INC_DSELECT_HXX diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx index 7455d35791a0..a851aa3880e1 100644 --- a/sw/source/uibase/inc/envlop.hxx +++ b/sw/source/uibase/inc/envlop.hxx @@ -24,7 +24,7 @@ #include <vcl/customweld.hxx> #include "envimg.hxx" -#define GetFieldVal(rField) (rField).Denormalize((rField).GetValue(FieldUnit::TWIP)) +#define GetFieldVal(rField) (rField).Denormalize((rField).GetValue(FieldUnit::TWIP)) #define SetFieldVal(rField, lValue) (rField).SetValue((rField).Normalize(lValue), FieldUnit::TWIP) inline int getfieldval(const weld::MetricSpinButton& rField) @@ -58,32 +58,33 @@ public: class SwEnvDlg : public SfxTabDialogController { -friend class SwEnvPage; -friend class SwEnvFormatPage; -friend class SwEnvPrtPage; -friend class SwEnvPreview; + friend class SwEnvPage; + friend class SwEnvFormatPage; + friend class SwEnvPrtPage; + friend class SwEnvPreview; - SwEnvItem aEnvItem; - SwWrtShell *pSh; + SwEnvItem aEnvItem; + SwWrtShell* pSh; VclPtr<Printer> pPrinter; std::unique_ptr<SfxItemSet> pAddresseeSet; std::unique_ptr<SfxItemSet> pSenderSet; std::unique_ptr<weld::Button> m_xModify; - virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override; - virtual short Ok() override; + virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override; + virtual short Ok() override; public: - SwEnvDlg(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, bool bInsert); + SwEnvDlg(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, + bool bInsert); virtual ~SwEnvDlg() override; }; class SwEnvPage : public SfxTabPage { SwEnvDlg* m_pDialog; - SwWrtShell* m_pSh; - OUString m_sActDBName; + SwWrtShell* m_pSh; + OUString m_sActDBName; SwEnvPreview m_aPreview; std::unique_ptr<weld::TextView> m_xAddrEdit; @@ -108,11 +109,12 @@ public: void Init(SwEnvDlg* pDialog); virtual ~SwEnvPage() override; - static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); + static std::unique_ptr<SfxTabPage> + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; - void FillItem(SwEnvItem& rItem); + void FillItem(SwEnvItem& rItem); virtual bool FillItemSet(SfxItemSet* rSet) override; virtual void Reset(const SfxItemSet* rSet) override; }; diff --git a/sw/source/uibase/inc/formatclipboard.hxx b/sw/source/uibase/inc/formatclipboard.hxx index 262ecfc68538..e83267bd700b 100644 --- a/sw/source/uibase/inc/formatclipboard.hxx +++ b/sw/source/uibase/inc/formatclipboard.hxx @@ -40,8 +40,8 @@ public: * Test if the object contains text or paragraph attribute */ bool HasContent() const; - bool HasContentForThisType( SelectionType nSelectionType ) const; - static bool CanCopyThisType( SelectionType nSelectionType ); + bool HasContentForThisType(SelectionType nSelectionType) const; + static bool CanCopyThisType(SelectionType nSelectionType); /** * Store/Backup the text and paragraph attribute of the current selection. @@ -49,7 +49,7 @@ public: * @param bPersistentCopy * input parameter - specify if the Paste function will erase the current object. */ - void Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bPersistentCopy ); + void Copy(SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bPersistentCopy); /** * Paste the stored text and paragraph attributes on the current selection and current paragraph. @@ -60,8 +60,8 @@ public: * @param bNoParagraphFormats * Do not paste the paragraph formats. */ - void Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPool - , bool bNoCharacterFormats, bool bNoParagraphFormats ); + void Paste(SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPool, bool bNoCharacterFormats, + bool bNoParagraphFormats); /** * Clear the currently stored text and paragraph attributes. @@ -87,7 +87,7 @@ private: //no frame style because it contains position information /** specify if the Paste function have to clear the current object */ - bool m_bPersistentCopy; + bool m_bPersistentCopy; }; #endif diff --git a/sw/source/uibase/inc/glosbib.hxx b/sw/source/uibase/inc/glosbib.hxx index b5ba48a97711..a012381ce25d 100644 --- a/sw/source/uibase/inc/glosbib.hxx +++ b/sw/source/uibase/inc/glosbib.hxx @@ -44,7 +44,7 @@ class SwGlossaryGroupDlg final : public SfxDialogController weld::Window* m_pParent; SwGlossaryHdl* pGlosHdl; - OUString sCreatedGroup; + OUString sCreatedGroup; std::unique_ptr<weld::Entry> m_xNameED; std::unique_ptr<weld::ComboBox> m_xPathLB; @@ -54,7 +54,7 @@ class SwGlossaryGroupDlg final : public SfxDialogController std::unique_ptr<weld::Button> m_xDelPB; std::unique_ptr<weld::Button> m_xRenamePB; - bool IsDeleteAllowed(const OUString &rGroup); + bool IsDeleteAllowed(const OUString& rGroup); void Apply(); DECL_LINK(SelectHdl, weld::TreeView&, void); @@ -67,13 +67,12 @@ class SwGlossaryGroupDlg final : public SfxDialogController DECL_LINK(EntrySizeAllocHdl, const Size&, void); public: - SwGlossaryGroupDlg(weld::Window* pParent, - std::vector<OUString> const& rPathArr, - SwGlossaryHdl *pGlosHdl); + SwGlossaryGroupDlg(weld::Window* pParent, std::vector<OUString> const& rPathArr, + SwGlossaryHdl* pGlosHdl); virtual short run() override; virtual ~SwGlossaryGroupDlg() override; - const OUString& GetCreatedGroupName() const {return sCreatedGroup;} + const OUString& GetCreatedGroupName() const { return sCreatedGroup; } }; #endif diff --git a/sw/source/uibase/inc/grfsh.hxx b/sw/source/uibase/inc/grfsh.hxx index 357fabf4201d..c5de732025f6 100644 --- a/sw/source/uibase/inc/grfsh.hxx +++ b/sw/source/uibase/inc/grfsh.hxx @@ -27,7 +27,7 @@ #include <sfx2/shell.hxx> -class SwGrfShell: public SwBaseShell +class SwGrfShell : public SwBaseShell { class SwExternalToolEdit; std::vector<std::unique_ptr<SwExternalToolEdit>> m_ExternalEdits; @@ -41,13 +41,13 @@ private: public: void Execute(SfxRequest& rRequest); - void ExecAttr(SfxRequest const & rRequest); + void ExecAttr(SfxRequest const& rRequest); void GetAttrState(SfxItemSet& rRequest); - void ExecuteRotation(SfxRequest const &rRequest); + void ExecuteRotation(SfxRequest const& rRequest); void GetAttrStateForRotation(SfxItemSet& rRequest); - SwGrfShell(SwView &rView); + SwGrfShell(SwView& rView); virtual ~SwGrfShell() override; }; diff --git a/sw/source/uibase/inc/initui.hxx b/sw/source/uibase/inc/initui.hxx index c9eec95d3bc3..a74f7b39328f 100644 --- a/sw/source/uibase/inc/initui.hxx +++ b/sw/source/uibase/inc/initui.hxx @@ -34,8 +34,8 @@ class SwGlossaryList; bool HasGlossaryList(); SwGlossaryList* GetGlossaryList(); -extern void InitUI(); -extern void FinitUI(); +extern void InitUI(); +extern void FinitUI(); #endif diff --git a/sw/source/uibase/inc/instable.hxx b/sw/source/uibase/inc/instable.hxx index aa36dc655c00..05c02af5c2a8 100644 --- a/sw/source/uibase/inc/instable.hxx +++ b/sw/source/uibase/inc/instable.hxx @@ -33,17 +33,17 @@ class SwInsTableDlg : public SfxDialogController { - TextFilter m_aTextFilter; + TextFilter m_aTextFilter; - SwWrtShell* pShell; + SwWrtShell* pShell; SwTableAutoFormatTable* pTableTable; - SwTableAutoFormat* pTAutoFormat; + SwTableAutoFormat* pTAutoFormat; - sal_uInt8 lbIndex; - sal_uInt8 tbIndex; - sal_uInt8 minTableIndexInLb; - sal_uInt8 maxTableIndexInLb; - sal_Int64 nEnteredValRepeatHeaderNF; + sal_uInt8 lbIndex; + sal_uInt8 tbIndex; + sal_uInt8 minTableIndexInLb; + sal_uInt8 maxTableIndexInLb; + sal_Int64 nEnteredValRepeatHeaderNF; AutoFormatPreview m_aWndPreview; @@ -62,7 +62,7 @@ class SwInsTableDlg : public SfxDialogController // Returns 255 if mapping is not possible. // This means there cannot be more than 255 autotable style. - sal_uInt8 lbIndexToTableIndex( const sal_uInt8 listboxIndex ); + sal_uInt8 lbIndexToTableIndex(const sal_uInt8 listboxIndex); void InitAutoTableFormat(); DECL_LINK(TextFilterHdl, OUString&, bool); @@ -77,9 +77,9 @@ class SwInsTableDlg : public SfxDialogController public: SwInsTableDlg(SwView& rView); - void GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol, - SwInsertTableOptions& rInsTableOpts, OUString& rTableAutoFormatName, - std::unique_ptr<SwTableAutoFormat>& prTAFormat ); + void GetValues(OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol, + SwInsertTableOptions& rInsTableOpts, OUString& rTableAutoFormatName, + std::unique_ptr<SwTableAutoFormat>& prTAFormat); }; #endif diff --git a/sw/source/uibase/inc/listsh.hxx b/sw/source/uibase/inc/listsh.hxx index 0caecf64282e..83bc9b321c06 100644 --- a/sw/source/uibase/inc/listsh.hxx +++ b/sw/source/uibase/inc/listsh.hxx @@ -21,7 +21,7 @@ #include "basesh.hxx" -class SwListShell: public SwBaseShell +class SwListShell : public SwBaseShell { public: SFX_DECL_INTERFACE(SW_LISTSHELL) @@ -31,10 +31,10 @@ private: static void InitInterface_Impl(); public: - SwListShell(SwView &rView); + SwListShell(SwView& rView); - void Execute(SfxRequest &); - void GetState(SfxItemSet &); + void Execute(SfxRequest&); + void GetState(SfxItemSet&); }; #endif diff --git a/sw/source/uibase/inc/macassgn.hxx b/sw/source/uibase/inc/macassgn.hxx index 6c1ce2c4dbdc..afc6fe56c568 100644 --- a/sw/source/uibase/inc/macassgn.hxx +++ b/sw/source/uibase/inc/macassgn.hxx @@ -38,9 +38,9 @@ enum DlgEventType class SwMacroAssignDlg { public: - static SfxEventNamesItem AddEvents( DlgEventType eType ); + static SfxEventNamesItem AddEvents(DlgEventType eType); static bool INetFormatDlg(weld::Window* pParent, SwWrtShell& rSh, - std::unique_ptr<SvxMacroItem>& rpINetItem ); + std::unique_ptr<SvxMacroItem>& rpINetItem); }; #endif diff --git a/sw/source/uibase/inc/maildispatcher.hxx b/sw/source/uibase/inc/maildispatcher.hxx index c4cdf253c620..e6f9f0cc7888 100644 --- a/sw/source/uibase/inc/maildispatcher.hxx +++ b/sw/source/uibase/inc/maildispatcher.hxx @@ -41,9 +41,7 @@ class IMailDispatcherListener; must not be shared among different client threads. Instead each client thread should create an own instance of this class. */ -class SW_DLLPUBLIC MailDispatcher - : public salhelper::SimpleReferenceObject - , private ::osl::Thread +class SW_DLLPUBLIC MailDispatcher : public salhelper::SimpleReferenceObject, private ::osl::Thread { public: // bringing operator new/delete into scope @@ -60,7 +58,7 @@ public: @throws css::uno::RuntimeException on errors during construction of an instance of this class. */ - MailDispatcher(css::uno::Reference< css::mail::XSmtpService> const & xMailService); + MailDispatcher(css::uno::Reference<css::mail::XSmtpService> const& xMailService); /** Shutdown the mail dispatcher. Every mail messages @@ -76,12 +74,12 @@ public: @param xMailMessage [in] a mail message that should be send. */ - void enqueueMailMessage(css::uno::Reference< css::mail::XMailMessage> const & xMailMessage); + void enqueueMailMessage(css::uno::Reference<css::mail::XMailMessage> const& xMailMessage); /** Dequeues a mail message. This enables the caller to remove attachments when sending mails is to be cancelled. */ - css::uno::Reference< css::mail::XMailMessage> dequeueMailMessage(); + css::uno::Reference<css::mail::XMailMessage> dequeueMailMessage(); /** Start sending mail messages asynchronously. A client may register @@ -130,20 +128,20 @@ public: /** * Register a listener for mail dispatcher events */ - void addListener(::rtl::Reference<IMailDispatcherListener> const & listener); + void addListener(::rtl::Reference<IMailDispatcherListener> const& listener); protected: virtual void SAL_CALL run() override; virtual void SAL_CALL onTerminated() override; private: - std::vector< ::rtl::Reference<IMailDispatcherListener> > cloneListener(); - void sendMailMessageNotifyListener(css::uno::Reference< css::mail::XMailMessage> const & message); + std::vector<::rtl::Reference<IMailDispatcherListener>> cloneListener(); + void sendMailMessageNotifyListener(css::uno::Reference<css::mail::XMailMessage> const& message); private: - css::uno::Reference< css::mail::XSmtpService> m_xMailserver; - std::list< css::uno::Reference< css::mail::XMailMessage > > m_aXMessageList; - std::vector< ::rtl::Reference<IMailDispatcherListener> > m_aListenerVector; + css::uno::Reference<css::mail::XSmtpService> m_xMailserver; + std::list<css::uno::Reference<css::mail::XMailMessage>> m_aXMessageList; + std::vector<::rtl::Reference<IMailDispatcherListener>> m_aListenerVector; ::osl::Mutex m_aMessageContainerMutex; ::osl::Mutex m_aListenerContainerMutex; ::osl::Mutex m_aThreadStatusMutex; diff --git a/sw/source/uibase/inc/mediash.hxx b/sw/source/uibase/inc/mediash.hxx index b67f903f01ee..cd2204f82fb7 100644 --- a/sw/source/uibase/inc/mediash.hxx +++ b/sw/source/uibase/inc/mediash.hxx @@ -25,7 +25,7 @@ #include "basesh.hxx" #include <shellid.hxx> -class SwMediaShell: public SwBaseShell +class SwMediaShell : public SwBaseShell { public: SFX_DECL_INTERFACE(SW_MEDIASHELL) @@ -35,10 +35,10 @@ private: static void InitInterface_Impl(); public: - void ExecMedia(SfxRequest const &); - void GetMediaState(SfxItemSet &); + void ExecMedia(SfxRequest const&); + void GetMediaState(SfxItemSet&); - SwMediaShell(SwView &rView); + SwMediaShell(SwView& rView); }; #endif diff --git a/sw/source/uibase/inc/mergetbl.hxx b/sw/source/uibase/inc/mergetbl.hxx index 11ca8c726455..765c3d603947 100644 --- a/sw/source/uibase/inc/mergetbl.hxx +++ b/sw/source/uibase/inc/mergetbl.hxx @@ -26,11 +26,12 @@ class SwMergeTableDlg : public weld::GenericDialogController bool& m_rMergePrev; std::unique_ptr<weld::RadioButton> m_xMergePrevRB; + private: void Apply(); public: - SwMergeTableDlg(weld::Window *pParent, bool& rWithPrev); + SwMergeTableDlg(weld::Window* pParent, bool& rWithPrev); virtual short run() override; }; diff --git a/sw/source/uibase/inc/multmrk.hxx b/sw/source/uibase/inc/multmrk.hxx index 6edca05cebc2..5027e216e5e8 100644 --- a/sw/source/uibase/inc/multmrk.hxx +++ b/sw/source/uibase/inc/multmrk.hxx @@ -28,14 +28,14 @@ class SwTOXMgr; class SwMultiTOXMarkDlg : public weld::GenericDialogController { DECL_LINK(SelectHdl, weld::TreeView&, void); - SwTOXMgr& m_rMgr; - sal_uInt16 m_nPos; + SwTOXMgr& m_rMgr; + sal_uInt16 m_nPos; std::unique_ptr<weld::Label> m_xTextFT; std::unique_ptr<weld::TreeView> m_xTOXLB; public: - SwMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr); + SwMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr& rTOXMgr); virtual ~SwMultiTOXMarkDlg() override; virtual short run() override; }; diff --git a/sw/source/uibase/inc/navsh.hxx b/sw/source/uibase/inc/navsh.hxx index 4bc26ecb17de..f6c86a41b400 100644 --- a/sw/source/uibase/inc/navsh.hxx +++ b/sw/source/uibase/inc/navsh.hxx @@ -15,7 +15,7 @@ #include "basesh.hxx" #include <shellid.hxx> -class SwNavigationShell: public SwBaseShell +class SwNavigationShell : public SwBaseShell { public: SFX_DECL_INTERFACE(SW_NAVIGATIONSHELL) @@ -25,10 +25,10 @@ private: static void InitInterface_Impl(); public: - SwNavigationShell(SwView &rView); + SwNavigationShell(SwView& rView); - void GetState(SfxItemSet &); - void Execute(SfxRequest const &); + void GetState(SfxItemSet&); + void Execute(SfxRequest const&); }; #endif diff --git a/sw/source/uibase/inc/olesh.hxx b/sw/source/uibase/inc/olesh.hxx index 30979029ed16..4f21b2a0396a 100644 --- a/sw/source/uibase/inc/olesh.hxx +++ b/sw/source/uibase/inc/olesh.hxx @@ -21,7 +21,7 @@ #include "frmsh.hxx" -class SwOleShell: public SwFrameShell +class SwOleShell : public SwFrameShell { public: SFX_DECL_INTERFACE(SW_OLESHELL) @@ -31,7 +31,7 @@ private: static void InitInterface_Impl(); public: - SwOleShell(SwView &rView); + SwOleShell(SwView& rView); }; #endif diff --git a/sw/source/uibase/inc/pardlg.hxx b/sw/source/uibase/inc/pardlg.hxx index c417c7223906..ac8d0da9d784 100644 --- a/sw/source/uibase/inc/pardlg.hxx +++ b/sw/source/uibase/inc/pardlg.hxx @@ -20,8 +20,8 @@ #define INCLUDED_SW_SOURCE_UIBASE_INC_PARDLG_HXX //DialogModes: -#define DLG_STD 0 -#define DLG_ENVELOP 2 +#define DLG_STD 0 +#define DLG_ENVELOP 2 #endif diff --git a/sw/source/uibase/inc/rowht.hxx b/sw/source/uibase/inc/rowht.hxx index 58439eb89d38..f1d66dbab63f 100644 --- a/sw/source/uibase/inc/rowht.hxx +++ b/sw/source/uibase/inc/rowht.hxx @@ -25,7 +25,7 @@ class SwWrtShell; class SwTableHeightDlg : public weld::GenericDialogController { - SwWrtShell &m_rSh; + SwWrtShell& m_rSh; std::unique_ptr<weld::MetricSpinButton> m_xHeightEdit; std::unique_ptr<weld::CheckButton> m_xAutoHeightCB; @@ -34,7 +34,7 @@ private: void Apply(); public: - SwTableHeightDlg(weld::Window *pParent, SwWrtShell &rS); + SwTableHeightDlg(weld::Window* pParent, SwWrtShell& rS); virtual short run() override; }; diff --git a/sw/source/uibase/inc/sharedconnection.hxx b/sw/source/uibase/inc/sharedconnection.hxx index 138cbf51e107..58d5dfcfc3cb 100644 --- a/sw/source/uibase/inc/sharedconnection.hxx +++ b/sw/source/uibase/inc/sharedconnection.hxx @@ -23,7 +23,7 @@ #include <unotools/sharedunocomponent.hxx> #include <com/sun/star/sdbc/XConnection.hpp> -typedef ::utl::SharedUNOComponent< css::sdbc::XConnection > SharedConnection; +typedef ::utl::SharedUNOComponent<css::sdbc::XConnection> SharedConnection; #endif // INCLUDED_SW_SOURCE_UIBASE_INC_SHAREDCONNECTION_HXX diff --git a/sw/source/uibase/inc/splittbl.hxx b/sw/source/uibase/inc/splittbl.hxx index ac75e72c691c..4fc49e572e87 100644 --- a/sw/source/uibase/inc/splittbl.hxx +++ b/sw/source/uibase/inc/splittbl.hxx @@ -33,13 +33,13 @@ private: std::unique_ptr<weld::RadioButton> m_xBoxAttrCopyNoParaRB; std::unique_ptr<weld::RadioButton> m_xBorderCopyRB; - SwWrtShell &rShell; + SwWrtShell& rShell; SplitTable_HeadlineOption m_nSplit; void Apply(); public: - SwSplitTableDlg(weld::Window *pParent, SwWrtShell &rSh); + SwSplitTableDlg(weld::Window* pParent, SwWrtShell& rSh); virtual short run() override { diff --git a/sw/source/uibase/inc/srtdlg.hxx b/sw/source/uibase/inc/srtdlg.hxx index b4828dcf5e0a..e47a974e40ee 100644 --- a/sw/source/uibase/inc/srtdlg.hxx +++ b/sw/source/uibase/inc/srtdlg.hxx @@ -64,23 +64,23 @@ class SwSortDlg : public weld::GenericDialogController OUString aRowText; OUString aNumericText; - SwWrtShell &rSh; + SwWrtShell& rSh; std::unique_ptr<CollatorResource> m_xColRes; sal_uInt16 nX; sal_uInt16 nY; void Apply(); - sal_Unicode GetDelimChar() const; + sal_Unicode GetDelimChar() const; DECL_LINK(CheckHdl, weld::ToggleButton&, void); - DECL_LINK(DelimHdl, weld::ToggleButton&, void ); + DECL_LINK(DelimHdl, weld::ToggleButton&, void); DECL_LINK(LanguageListBoxHdl, weld::ComboBox&, void); void LanguageHdl(weld::ComboBox const*); - DECL_LINK(DelimCharHdl, weld::Button&,void); + DECL_LINK(DelimCharHdl, weld::Button&, void); public: - SwSortDlg(weld::Window * pParent, SwWrtShell &rSh); + SwSortDlg(weld::Window* pParent, SwWrtShell& rSh); virtual short run() override; }; diff --git a/sw/source/uibase/inc/tabledlg.hxx b/sw/source/uibase/inc/tabledlg.hxx index 3d4af57d89d1..1b0dd0917b18 100644 --- a/sw/source/uibase/inc/tabledlg.hxx +++ b/sw/source/uibase/inc/tabledlg.hxx @@ -30,6 +30,7 @@ class SwTableTabDlg : public SfxTabDialogController SwWrtShell* pShell; virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override; + public: SwTableTabDlg(weld::Window* pParent, const SfxItemSet* pItemSet, SwWrtShell* pSh); }; diff --git a/sw/source/uibase/inc/tblnumfm.hxx b/sw/source/uibase/inc/tblnumfm.hxx index 300688b92994..3d0eee08c6ea 100644 --- a/sw/source/uibase/inc/tblnumfm.hxx +++ b/sw/source/uibase/inc/tblnumfm.hxx @@ -21,13 +21,16 @@ #include <sfx2/basedlgs.hxx> -namespace weld { class Window; } +namespace weld +{ +class Window; +} class SfxItemSet; class SwNumFormatDlg : public SfxSingleTabDialogController { public: - SwNumFormatDlg(weld::Widget* pParent, const SfxItemSet& rSet); + SwNumFormatDlg(weld::Widget* pParent, const SfxItemSet& rSet); }; #endif diff --git a/sw/source/uibase/inc/titlepage.hxx b/sw/source/uibase/inc/titlepage.hxx index 2679c00176ec..d3e655eae426 100644 --- a/sw/source/uibase/inc/titlepage.hxx +++ b/sw/source/uibase/inc/titlepage.hxx @@ -14,20 +14,23 @@ #include <fmtpdsc.hxx> -namespace vcl { class Window; } +namespace vcl +{ +class Window; +} class SwWrtShell; class SwPageDesc; class SwTitlePageDlg : public SfxDialogController { private: - SwWrtShell *mpSh; + SwWrtShell* mpSh; std::unique_ptr<const SwFormatPageDesc> mpPageFormatDesc; - SwPageDesc *mpTitleDesc; - const SwPageDesc *mpIndexDesc; - const SwPageDesc *mpNormalDesc; + SwPageDesc* mpTitleDesc; + const SwPageDesc* mpIndexDesc; + const SwPageDesc* mpNormalDesc; std::unique_ptr<weld::RadioButton> m_xUseExistingPagesRB; std::unique_ptr<weld::SpinButton> m_xPageCountNF; @@ -52,8 +55,9 @@ private: DECL_LINK(SetPageNumberHdl, weld::ToggleButton&, void); DECL_LINK(ValueChangeHdl, weld::SpinButton&, void); DECL_LINK(StartPageHdl, weld::ToggleButton&, void); + public: - SwTitlePageDlg(weld::Window *pParent); + SwTitlePageDlg(weld::Window* pParent); virtual ~SwTitlePageDlg() override; }; diff --git a/sw/source/uibase/inc/tmplctrl.hxx b/sw/source/uibase/inc/tmplctrl.hxx index 80fa0fa61ce5..cf089fae618d 100644 --- a/sw/source/uibase/inc/tmplctrl.hxx +++ b/sw/source/uibase/inc/tmplctrl.hxx @@ -24,19 +24,20 @@ class SwTemplateControl : public SfxStatusBarControl { protected: - virtual void Command( const CommandEvent& rCEvt ) override; + virtual void Command(const CommandEvent& rCEvt) override; + public: - virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, - const SfxPoolItem* pState ) override; - virtual void Paint( const UserDrawEvent& rEvt ) override; + virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, + const SfxPoolItem* pState) override; + virtual void Paint(const UserDrawEvent& rEvt) override; SFX_DECL_STATUSBAR_CONTROL(); - SwTemplateControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb ); + SwTemplateControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb); virtual ~SwTemplateControl() override; private: - OUString sTemplate; + OUString sTemplate; }; #endif diff --git a/sw/source/uibase/inc/uiborder.hxx b/sw/source/uibase/inc/uiborder.hxx index f3764ad9fb2e..8820a769b5c9 100644 --- a/sw/source/uibase/inc/uiborder.hxx +++ b/sw/source/uibase/inc/uiborder.hxx @@ -25,11 +25,10 @@ class SwBorderDlg : public SfxSingleTabDialogController { public: - - // nType may be: - // SW_BORDER_MODE_PARA - // SW_BORDER_MODE_TABLE - // SW_BORDER_MODE_FRAME + // nType may be: + // SW_BORDER_MODE_PARA + // SW_BORDER_MODE_TABLE + // SW_BORDER_MODE_FRAME SwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes nType); virtual ~SwBorderDlg() override; diff --git a/sw/source/uibase/inc/wformsh.hxx b/sw/source/uibase/inc/wformsh.hxx index dfce5359f1e3..2d73b1232e55 100644 --- a/sw/source/uibase/inc/wformsh.hxx +++ b/sw/source/uibase/inc/wformsh.hxx @@ -24,7 +24,7 @@ class SwWebDrawFormShell : public SwDrawFormShell { public: - SwWebDrawFormShell(SwView &rShell); + SwWebDrawFormShell(SwView& rShell); virtual ~SwWebDrawFormShell() override; SFX_DECL_INTERFACE(SW_WEBDRAWFORMSHELL) diff --git a/sw/source/uibase/inc/wfrmsh.hxx b/sw/source/uibase/inc/wfrmsh.hxx index 15cd8a8b7a63..e03a49a635e8 100644 --- a/sw/source/uibase/inc/wfrmsh.hxx +++ b/sw/source/uibase/inc/wfrmsh.hxx @@ -22,7 +22,7 @@ #include "frmsh.hxx" -class SwWebFrameShell: public SwFrameShell +class SwWebFrameShell : public SwFrameShell { public: SFX_DECL_INTERFACE(SW_WEBFRAMESHELL) @@ -32,7 +32,7 @@ private: static void InitInterface_Impl(); public: - SwWebFrameShell(SwView &rView); + SwWebFrameShell(SwView& rView); virtual ~SwWebFrameShell() override; }; diff --git a/sw/source/uibase/inc/wgrfsh.hxx b/sw/source/uibase/inc/wgrfsh.hxx index 65987a423958..645694628eec 100644 --- a/sw/source/uibase/inc/wgrfsh.hxx +++ b/sw/source/uibase/inc/wgrfsh.hxx @@ -21,11 +21,11 @@ #include "grfsh.hxx" -class SwWebGrfShell: public SwGrfShell +class SwWebGrfShell : public SwGrfShell { public: - SwWebGrfShell(SwView &rShell); - virtual ~SwWebGrfShell() override; + SwWebGrfShell(SwView& rShell); + virtual ~SwWebGrfShell() override; SFX_DECL_INTERFACE(SW_WEBGRFSHELL) diff --git a/sw/source/uibase/inc/wlistsh.hxx b/sw/source/uibase/inc/wlistsh.hxx index f3a1179a6f60..be6ca6310996 100644 --- a/sw/source/uibase/inc/wlistsh.hxx +++ b/sw/source/uibase/inc/wlistsh.hxx @@ -21,7 +21,7 @@ #include "listsh.hxx" -class SwWebListShell: public SwListShell +class SwWebListShell : public SwListShell { public: SFX_DECL_INTERFACE(SW_WEBLISTSHELL) @@ -31,8 +31,7 @@ private: static void InitInterface_Impl(); public: - - SwWebListShell(SwView &rView); + SwWebListShell(SwView& rView); virtual ~SwWebListShell() override; }; diff --git a/sw/source/uibase/inc/wolesh.hxx b/sw/source/uibase/inc/wolesh.hxx index 017768aace59..90c51257a206 100644 --- a/sw/source/uibase/inc/wolesh.hxx +++ b/sw/source/uibase/inc/wolesh.hxx @@ -21,7 +21,7 @@ #include "olesh.hxx" -class SwWebOleShell: public SwOleShell +class SwWebOleShell : public SwOleShell { public: SFX_DECL_INTERFACE(SW_WEBOLESHELL) @@ -31,7 +31,7 @@ private: static void InitInterface_Impl(); public: - SwWebOleShell(SwView &rView); + SwWebOleShell(SwView& rView); virtual ~SwWebOleShell() override; }; diff --git a/sw/source/uibase/inc/wordcountctrl.hxx b/sw/source/uibase/inc/wordcountctrl.hxx index 7b6f8620453e..d8ecc4a5963d 100644 --- a/sw/source/uibase/inc/wordcountctrl.hxx +++ b/sw/source/uibase/inc/wordcountctrl.hxx @@ -27,9 +27,8 @@ public: SwWordCountStatusBarControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb); virtual ~SwWordCountStatusBarControl() override; - virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, - const SfxPoolItem* pState ) override; - + virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, + const SfxPoolItem* pState) override; }; #endif diff --git a/sw/source/uibase/inc/wtabsh.hxx b/sw/source/uibase/inc/wtabsh.hxx index 0411750194a5..1ded54d1d552 100644 --- a/sw/source/uibase/inc/wtabsh.hxx +++ b/sw/source/uibase/inc/wtabsh.hxx @@ -21,7 +21,7 @@ #include "tabsh.hxx" -class SwWebTableShell: public SwTableShell +class SwWebTableShell : public SwTableShell { public: SFX_DECL_INTERFACE(SW_WEBTABSHELL) @@ -31,7 +31,7 @@ private: static void InitInterface_Impl(); public: - SwWebTableShell(SwView &rView); + SwWebTableShell(SwView& rView); virtual ~SwWebTableShell() override; }; diff --git a/sw/source/uibase/inc/wtextsh.hxx b/sw/source/uibase/inc/wtextsh.hxx index 7924fdf903d9..264500046677 100644 --- a/sw/source/uibase/inc/wtextsh.hxx +++ b/sw/source/uibase/inc/wtextsh.hxx @@ -22,7 +22,7 @@ #include "textsh.hxx" -class SwWebTextShell: public SwTextShell +class SwWebTextShell : public SwTextShell { public: SFX_DECL_INTERFACE(SW_WEBTEXTSHELL) @@ -32,7 +32,7 @@ private: static void InitInterface_Impl(); public: - SwWebTextShell(SwView &rView); + SwWebTextShell(SwView& rView); virtual ~SwWebTextShell() override; }; diff --git a/sw/source/uibase/inc/wview.hxx b/sw/source/uibase/inc/wview.hxx index cfd63881dd7a..9ac5f79499c7 100644 --- a/sw/source/uibase/inc/wview.hxx +++ b/sw/source/uibase/inc/wview.hxx @@ -22,10 +22,10 @@ #include <swdllapi.h> #include <view.hxx> -class SW_DLLPUBLIC SwWebView: public SwView +class SW_DLLPUBLIC SwWebView : public SwView { protected: - virtual void SelectShell() override; + virtual void SelectShell() override; public: SFX_DECL_VIEWFACTORY(SwWebView); diff --git a/sw/source/uibase/inc/zoomctrl.hxx b/sw/source/uibase/inc/zoomctrl.hxx index d0802989a5a1..e05ad40e76a9 100644 --- a/sw/source/uibase/inc/zoomctrl.hxx +++ b/sw/source/uibase/inc/zoomctrl.hxx @@ -24,18 +24,18 @@ class SwZoomControl : public SvxZoomStatusBarControl { private: - OUString sPreviewZoom; + OUString sPreviewZoom; + public: - virtual void Command( const CommandEvent& rCEvt ) override; - virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, - const SfxPoolItem* pState ) override; - virtual void Paint( const UserDrawEvent& rEvt ) override; + virtual void Command(const CommandEvent& rCEvt) override; + virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, + const SfxPoolItem* pState) override; + virtual void Paint(const UserDrawEvent& rEvt) override; SFX_DECL_STATUSBAR_CONTROL(); - SwZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb ); + SwZoomControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb); virtual ~SwZoomControl() override; - }; #endif diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx index f5df02d1b307..5136bed3d4c1 100644 --- a/sw/source/uibase/misc/numberingtypelistbox.cxx +++ b/sw/source/uibase/misc/numberingtypelistbox.cxx @@ -38,14 +38,13 @@ SwNumberingTypeListBox::SwNumberingTypeListBox(std::unique_ptr<weld::ComboBox> p : m_xWidget(std::move(pWidget)) , m_xImpl(new SwNumberingTypeListBox_Impl) { - uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); - uno::Reference<text::XDefaultNumberingProvider> xDefNum = text::DefaultNumberingProvider::create(xContext); + uno::Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext()); + uno::Reference<text::XDefaultNumberingProvider> xDefNum + = text::DefaultNumberingProvider::create(xContext); m_xImpl->xInfo.set(xDefNum, uno::UNO_QUERY); } -SwNumberingTypeListBox::~SwNumberingTypeListBox() -{ -} +SwNumberingTypeListBox::~SwNumberingTypeListBox() {} void SwNumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags) { @@ -57,36 +56,36 @@ void SwNumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags) aTypes = m_xImpl->xInfo->getSupportedNumberingTypes(); } - for(size_t i = 0; i < SvxNumberingTypeTable::Count(); i++) + for (size_t i = 0; i < SvxNumberingTypeTable::Count(); i++) { sal_IntPtr nValue = SvxNumberingTypeTable::GetValue(i); bool bInsert = true; int nPos = -1; - switch(nValue) + switch (nValue) { - case style::NumberingType::NUMBER_NONE: + case style::NumberingType::NUMBER_NONE: bInsert = bool(nTypeFlags & SwInsertNumTypes::NoNumbering); nPos = 0; break; - case style::NumberingType::CHAR_SPECIAL: + case style::NumberingType::CHAR_SPECIAL: bInsert = false; break; - case style::NumberingType::PAGE_DESCRIPTOR: + case style::NumberingType::PAGE_DESCRIPTOR: bInsert = false; break; - case style::NumberingType::BITMAP: + case style::NumberingType::BITMAP: bInsert = false; break; - case style::NumberingType::BITMAP | LINK_TOKEN: + case style::NumberingType::BITMAP | LINK_TOKEN: bInsert = false; break; default: - if (nValue > style::NumberingType::CHARS_LOWER_LETTER_N) + if (nValue > style::NumberingType::CHARS_LOWER_LETTER_N) { // Insert only if offered by i18n framework per configuration. bInsert = std::find(aTypes.begin(), aTypes.end(), nValue) != aTypes.end(); @@ -107,7 +106,8 @@ void SwNumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags) { if (m_xWidget->find_id(OUString::number(nCurrent)) == -1) { - m_xWidget->append(OUString::number(nCurrent), m_xImpl->xInfo->getNumberingIdentifier(nCurrent)); + m_xWidget->append(OUString::number(nCurrent), + m_xImpl->xInfo->getNumberingIdentifier(nCurrent)); } } } diff --git a/sw/source/uibase/ribbar/conarc.cxx b/sw/source/uibase/ribbar/conarc.cxx index 16625a4df026..03af3b70c05f 100644 --- a/sw/source/uibase/ribbar/conarc.cxx +++ b/sw/source/uibase/ribbar/conarc.cxx @@ -28,11 +28,12 @@ #include <conarc.hxx> ConstArc::ConstArc(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) - : SwDrawBase(pWrtShell, pEditWin, pSwView), m_nButtonUpCount(0) + : SwDrawBase(pWrtShell, pEditWin, pSwView) + , m_nButtonUpCount(0) { } -bool ConstArc::MouseButtonDown( const MouseEvent& rMEvt ) +bool ConstArc::MouseButtonDown(const MouseEvent& rMEvt) { bool bReturn = SwDrawBase::MouseButtonDown(rMEvt); if (bReturn && !m_nButtonUpCount) @@ -40,7 +41,7 @@ bool ConstArc::MouseButtonDown( const MouseEvent& rMEvt ) return bReturn; } -bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) +bool ConstArc::MouseButtonUp(const MouseEvent& rMEvt) { bool bReturn = false; @@ -53,9 +54,10 @@ bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) bReturn = true; } else - { m_nButtonUpCount++; + { + m_nButtonUpCount++; - if (m_nButtonUpCount == 3) // Generating of circular arc finished + if (m_nButtonUpCount == 3) // Generating of circular arc finished { SwDrawBase::MouseButtonUp(rMEvt); m_nButtonUpCount = 0; diff --git a/sw/source/uibase/ribbar/dselect.cxx b/sw/source/uibase/ribbar/dselect.cxx index a70583fda5dc..4758934a34e9 100644 --- a/sw/source/uibase/ribbar/dselect.cxx +++ b/sw/source/uibase/ribbar/dselect.cxx @@ -26,8 +26,8 @@ #include <drawbase.hxx> #include <dselect.hxx> -DrawSelection::DrawSelection(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) : - SwDrawBase(pWrtShell, pEditWin, pSwView) +DrawSelection::DrawSelection(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) + : SwDrawBase(pWrtShell, pEditWin, pSwView) { m_bCreateObj = false; } @@ -35,7 +35,7 @@ DrawSelection::DrawSelection(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* void DrawSelection::Activate(const sal_uInt16 nSlotId) { m_pWin->SetSdrDrawMode(OBJ_NONE); - m_pWin->SetObjectSelect( true ); + m_pWin->SetObjectSelect(true); SwDrawBase::Activate(nSlotId); m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); diff --git a/sw/source/uibase/shells/navsh.cxx b/sw/source/uibase/shells/navsh.cxx index b5b9021cc1ac..5b5d071bee8d 100644 --- a/sw/source/uibase/shells/navsh.cxx +++ b/sw/source/uibase/shells/navsh.cxx @@ -21,27 +21,25 @@ SFX_IMPL_INTERFACE(SwNavigationShell, SwBaseShell) -void SwNavigationShell::InitInterface_Impl() -{ -} +void SwNavigationShell::InitInterface_Impl() {} -SwNavigationShell::SwNavigationShell(SwView &_rView) - : SwBaseShell( _rView ) +SwNavigationShell::SwNavigationShell(SwView& _rView) + : SwBaseShell(_rView) { SetName("Navigation"); } -void SwNavigationShell::Execute(SfxRequest const &rReq) +void SwNavigationShell::Execute(SfxRequest const& rReq) { - SwWrtShell *pSh = &GetShell(); + SwWrtShell* pSh = &GetShell(); SdrView* pSdrView = pSh->GetDrawView(); - const SfxItemSet *pArgs = rReq.GetArgs(); + const SfxItemSet* pArgs = rReq.GetArgs(); const sal_uInt16 nSlotId = rReq.GetSlot(); bool bChanged = pSdrView->GetModel()->IsChanged(); pSdrView->GetModel()->SetChanged(false); SwNavigationMgr& aSwNavigationMgr = pSh->GetNavigationMgr(); const SfxPoolItem* pItem; - if(pArgs) + if (pArgs) pArgs->GetItemState(nSlotId, false, &pItem); switch (nSlotId) { @@ -63,15 +61,15 @@ void SwNavigationShell::Execute(SfxRequest const &rReq) // determine if the buttons should be enabled/disabled -void SwNavigationShell::GetState(SfxItemSet &rSet) +void SwNavigationShell::GetState(SfxItemSet& rSet) { - SwWrtShell *pSh = &GetShell(); - SfxWhichIter aIter( rSet ); + SwWrtShell* pSh = &GetShell(); + SfxWhichIter aIter(rSet); sal_uInt16 nWhich = aIter.FirstWhich(); SwNavigationMgr& aNavigationMgr = pSh->GetNavigationMgr(); - while( nWhich ) + while (nWhich) { - switch( nWhich ) + switch (nWhich) { case FN_NAVIGATION_BACK: if (!aNavigationMgr.backEnabled()) diff --git a/sw/source/uibase/sidebar/PageColumnControl.hxx b/sw/source/uibase/sidebar/PageColumnControl.hxx index 140c948721dc..f4e35291b7cc 100644 --- a/sw/source/uibase/sidebar/PageColumnControl.hxx +++ b/sw/source/uibase/sidebar/PageColumnControl.hxx @@ -24,8 +24,8 @@ class PageColumnPopup; -namespace sw::sidebar { - +namespace sw::sidebar +{ class PageColumnControl final : public WeldToolbarPopup { public: @@ -43,10 +43,10 @@ private: rtl::Reference<PageColumnPopup> m_xControl; - static void ExecuteColumnChange( const sal_uInt16 nColumnType ); + static void ExecuteColumnChange(const sal_uInt16 nColumnType); - DECL_LINK( ColumnButtonClickHdl_Impl, weld::Button&, void ); - DECL_LINK( MoreButtonClickHdl_Impl, weld::Button&, void ); + DECL_LINK(ColumnButtonClickHdl_Impl, weld::Button&, void); + DECL_LINK(MoreButtonClickHdl_Impl, weld::Button&, void); }; } // end of namespace sw::sidebar diff --git a/sw/source/uibase/sidebar/PageSizeControl.hxx b/sw/source/uibase/sidebar/PageSizeControl.hxx index be43d0900b8a..bbeaa1b198d2 100644 --- a/sw/source/uibase/sidebar/PageSizeControl.hxx +++ b/sw/source/uibase/sidebar/PageSizeControl.hxx @@ -26,12 +26,15 @@ #include <vector> -namespace svx::sidebar { class ValueSetWithTextControl; } +namespace svx::sidebar +{ +class ValueSetWithTextControl; +} class PageSizePopup; class ValueSet; -namespace sw::sidebar { - +namespace sw::sidebar +{ class PageSizeControl final : public WeldToolbarPopup { public: @@ -47,9 +50,9 @@ private: std::unique_ptr<weld::CustomWeld> mxSizeValueSetWin; rtl::Reference<PageSizePopup> mxControl; - std::vector< Paper > maPaperList; + std::vector<Paper> maPaperList; - static void ExecuteSizeChange( const Paper ePaper ); + static void ExecuteSizeChange(const Paper ePaper); DECL_LINK(ImplSizeHdl, ValueSet*, void); DECL_LINK(MoreButtonClickHdl_Impl, weld::Button&, void); diff --git a/sw/source/uibase/uno/unodefaults.cxx b/sw/source/uibase/uno/unodefaults.cxx index 135bf88e80ec..01e10aaaae5e 100644 --- a/sw/source/uibase/uno/unodefaults.cxx +++ b/sw/source/uibase/uno/unodefaults.cxx @@ -24,16 +24,15 @@ #include <IDocumentDrawModelAccess.hxx> SwSvxUnoDrawPool::SwSvxUnoDrawPool(SwDoc& rDoc) - : SvxUnoDrawPool(rDoc.getIDocumentDrawModelAccess().GetDrawModel(), SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER) + : SvxUnoDrawPool(rDoc.getIDocumentDrawModelAccess().GetDrawModel(), + SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER) , m_rDoc(rDoc) { } -SwSvxUnoDrawPool::~SwSvxUnoDrawPool() throw() -{ -} +SwSvxUnoDrawPool::~SwSvxUnoDrawPool() throw() {} -SfxItemPool* SwSvxUnoDrawPool::getModelPool( bool /*bReadOnly*/ ) throw() +SfxItemPool* SwSvxUnoDrawPool::getModelPool(bool /*bReadOnly*/) throw() { // DVO, OD 01.10.2003 #i18732# - return item pool of writer document; // it contains draw model item pool as secondary pool. diff --git a/sw/source/uibase/uno/unodefaults.hxx b/sw/source/uibase/uno/unodefaults.hxx index ba218940b6d0..14b892f94d22 100644 --- a/sw/source/uibase/uno/unodefaults.hxx +++ b/sw/source/uibase/uno/unodefaults.hxx @@ -26,11 +26,12 @@ class SwDoc; class SwSvxUnoDrawPool : public SvxUnoDrawPool { SwDoc& m_rDoc; + public: SwSvxUnoDrawPool(SwDoc& rDoc); virtual ~SwSvxUnoDrawPool() throw() override; - virtual SfxItemPool* getModelPool( bool bReadOnly ) throw() override; + virtual SfxItemPool* getModelPool(bool bReadOnly) throw() override; }; #endif diff --git a/sw/source/uibase/utlui/gotodlg.cxx b/sw/source/uibase/utlui/gotodlg.cxx index 63e7c424ca39..0c8387ab267d 100644 --- a/sw/source/uibase/utlui/gotodlg.cxx +++ b/sw/source/uibase/utlui/gotodlg.cxx @@ -36,7 +36,7 @@ SwGotoPageDlg::SwGotoPageDlg(weld::Window* pParent, SfxBindings* _pBindings) { sal_uInt16 nTotalPage = GetPageInfo(); - if(nTotalPage) + if (nTotalPage) { OUString sStr = mxPageNumberLbl->get_label(); mxPageNumberLbl->set_label(sStr.replaceFirst("$1", OUString::number(nTotalPage))); @@ -55,21 +55,21 @@ IMPL_LINK_NOARG(SwGotoPageDlg, PageModifiedHdl, weld::Entry&, void) if (page_value <= 0) mxMtrPageCtrl->set_text(OUString::number(1)); - else if(page_value > mnMaxPageCnt) + else if (page_value > mnMaxPageCnt) mxMtrPageCtrl->set_text(OUString::number(mnMaxPageCnt)); mxMtrPageCtrl->set_position(-1); } } -SwView* SwGotoPageDlg::GetCreateView() const +SwView* SwGotoPageDlg::GetCreateView() const { - if(!m_pCreateView) + if (!m_pCreateView) { SwView* pView = SwModule::GetFirstView(); - while(pView) + while (pView) { - if(&pView->GetViewFrame()->GetBindings() == m_rBindings) + if (&pView->GetViewFrame()->GetBindings() == m_rBindings) { const_cast<SwGotoPageDlg*>(this)->m_pCreateView = pView; break; @@ -85,8 +85,8 @@ SwView* SwGotoPageDlg::GetCreateView() const sal_uInt16 SwGotoPageDlg::GetPageInfo() { - SwView *pView = GetCreateView(); - SwWrtShell *pSh = pView ? &pView->GetWrtShell() : nullptr; + SwView* pView = GetCreateView(); + SwWrtShell* pSh = pView ? &pView->GetWrtShell() : nullptr; mxMtrPageCtrl->set_text(OUString::number(1)); if (pSh) { diff --git a/sw/source/uibase/utlui/prcntfld.cxx b/sw/source/uibase/utlui/prcntfld.cxx index 2cefdc4ff7bc..9c704f9cb029 100644 --- a/sw/source/uibase/utlui/prcntfld.cxx +++ b/sw/source/uibase/utlui/prcntfld.cxx @@ -48,8 +48,8 @@ void SwPercentField::SetRefValue(int nValue) void SwPercentField::ShowPercent(bool bPercent) { - if ((bPercent && m_pField->get_unit() == FieldUnit::PERCENT) || - (!bPercent && m_pField->get_unit() != FieldUnit::PERCENT)) + if ((bPercent && m_pField->get_unit() == FieldUnit::PERCENT) + || (!bPercent && m_pField->get_unit() != FieldUnit::PERCENT)) return; int nOldValue; @@ -112,9 +112,10 @@ void SwPercentField::set_value(int nNewValue, FieldUnit eInUnit) { // Overwrite output value, do not restore later int nPercent, nCurrentWidth; - if(eInUnit == FieldUnit::TWIP) + if (eInUnit == FieldUnit::TWIP) { - nCurrentWidth = vcl::ConvertValue(nNewValue, 0, nOldDigits, FieldUnit::TWIP, FieldUnit::TWIP); + nCurrentWidth + = vcl::ConvertValue(nNewValue, 0, nOldDigits, FieldUnit::TWIP, FieldUnit::TWIP); } else { @@ -168,7 +169,7 @@ int SwPercentField::DenormalizePercent(int nValue) else { int nFactor = ImpPower10(nOldDigits); - nValue = ((nValue+(nFactor/2)) / nFactor); + nValue = ((nValue + (nFactor / 2)) / nFactor); } return nValue; } @@ -177,7 +178,7 @@ int SwPercentField::ImpPower10(sal_uInt16 n) { int nValue = 1; - for (sal_uInt16 i=0; i < n; ++i) + for (sal_uInt16 i = 0; i < n; ++i) nValue *= 10; return nValue; @@ -193,9 +194,8 @@ int SwPercentField::GetRealValue(FieldUnit eOutUnit) int SwPercentField::Convert(int nValue, FieldUnit eInUnit, FieldUnit eOutUnit) { - if (eInUnit == eOutUnit || - (eInUnit == FieldUnit::NONE && eOutUnit == m_pField->get_unit()) || - (eOutUnit == FieldUnit::NONE && eInUnit == m_pField->get_unit())) + if (eInUnit == eOutUnit || (eInUnit == FieldUnit::NONE && eOutUnit == m_pField->get_unit()) + || (eOutUnit == FieldUnit::NONE && eInUnit == m_pField->get_unit())) return nValue; if (eInUnit == FieldUnit::PERCENT) @@ -206,7 +206,8 @@ int SwPercentField::Convert(int nValue, FieldUnit eInUnit, FieldUnit eOutUnit) if (eOutUnit == FieldUnit::TWIP) // Only convert if necessary return NormalizePercent(nTwipValue); else - return vcl::ConvertValue(NormalizePercent(nTwipValue), 0, nOldDigits, FieldUnit::TWIP, eOutUnit); + return vcl::ConvertValue(NormalizePercent(nTwipValue), 0, nOldDigits, FieldUnit::TWIP, + eOutUnit); } if (eOutUnit == FieldUnit::PERCENT) @@ -215,7 +216,7 @@ int SwPercentField::Convert(int nValue, FieldUnit eInUnit, FieldUnit eOutUnit) int nCurrentWidth; nValue = DenormalizePercent(nValue); - if (eInUnit == FieldUnit::TWIP) // Only convert if necessary + if (eInUnit == FieldUnit::TWIP) // Only convert if necessary nCurrentWidth = nValue; else nCurrentWidth = vcl::ConvertValue(nValue, 0, nOldDigits, eInUnit, FieldUnit::TWIP); |