From ec35fc62993111e4e7dd917e7dbc91ef82b02f74 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Thu, 12 Nov 2020 12:53:37 +0100 Subject: tdf#123936 Formatting files in module cui with clang-format Change-Id: I473e2950bb9bd53043feeae31a27ae0c2fc7801d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105659 Tested-by: Jenkins Reviewed-by: Christian Lohmaier --- cui/inc/strings.hxx | 2 +- cui/qa/unit/cui-dialogs-test.cxx | 12 +++---- cui/qa/unit/cui-dialogs-test_2.cxx | 9 ++--- cui/qa/unit/cui-dialogs-test_3.cxx | 9 ++--- cui/qa/unit/cui-dialogs-test_4.cxx | 9 ++--- cui/source/dialogs/cuiimapwnd.cxx | 12 +++---- cui/source/dialogs/cuitbxform.cxx | 6 ++-- cui/source/dialogs/dlgname.cxx | 5 +-- cui/source/dialogs/newtabledlg.cxx | 4 +-- cui/source/dialogs/showcols.cxx | 25 +++++++------- cui/source/factory/cuiexp.cxx | 18 ++++------ cui/source/factory/cuiresmgr.cxx | 5 +-- cui/source/inc/cuifmsearch.hxx | 55 +++++++++++++++++------------- cui/source/inc/dlgname.hxx | 17 ++++----- cui/source/inc/headertablistbox.hxx | 6 ++-- cui/source/inc/hlmarkwn_def.hxx | 6 ++-- cui/source/inc/linkdlg.hxx | 32 ++++++++--------- cui/source/inc/optasian.hxx | 12 ++++--- cui/source/inc/screenshotannotationdlg.hxx | 6 ++-- cui/source/options/tsaurls.cxx | 26 +++++++------- solenv/clang-format/excludelist | 20 ----------- 21 files changed, 128 insertions(+), 168 deletions(-) diff --git a/cui/inc/strings.hxx b/cui/inc/strings.hxx index 616a5daa6bcb..5b72f3873df4 100644 --- a/cui/inc/strings.hxx +++ b/cui/inc/strings.hxx @@ -9,6 +9,6 @@ #pragma once -#define RID_SVXSTR_KEY_BASIC_PATH "BASIC" +#define RID_SVXSTR_KEY_BASIC_PATH "BASIC" /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/cui/qa/unit/cui-dialogs-test.cxx b/cui/qa/unit/cui-dialogs-test.cxx index f580644e37c9..85f6b5f55bbf 100644 --- a/cui/qa/unit/cui-dialogs-test.cxx +++ b/cui/qa/unit/cui-dialogs-test.cxx @@ -44,9 +44,7 @@ public: CPPUNIT_TEST_SUITE_END(); }; -CuiDialogsTest::CuiDialogsTest() -{ -} +CuiDialogsTest::CuiDialogsTest() {} void CuiDialogsTest::initialize() { @@ -67,19 +65,17 @@ VclPtr CuiDialogsTest::createDialogByID(sal_uInt32 nID) { VclPtr pReturnDialog; - switch ( nID ) + switch (nID) { case 0: // "cui/ui/formatcellsdialog.ui" { - pReturnDialog = mpFact->CreateSvxFormatCellsDialog( - nullptr, mxAttr.get(), *mxModel); + pReturnDialog = mpFact->CreateSvxFormatCellsDialog(nullptr, mxAttr.get(), *mxModel); break; } case 1: // "cui/ui/textdialog.ui" { - pReturnDialog = mpFact->CreateTextTabDialog( - nullptr, mxAttr.get(), nullptr); + pReturnDialog = mpFact->CreateTextTabDialog(nullptr, mxAttr.get(), nullptr); break; } diff --git a/cui/qa/unit/cui-dialogs-test_2.cxx b/cui/qa/unit/cui-dialogs-test_2.cxx index af1b27fc5b78..2f9b07f7d465 100644 --- a/cui/qa/unit/cui-dialogs-test_2.cxx +++ b/cui/qa/unit/cui-dialogs-test_2.cxx @@ -36,19 +36,14 @@ public: CPPUNIT_TEST_SUITE_END(); }; -CuiDialogsTest2::CuiDialogsTest2() -{ -} +CuiDialogsTest2::CuiDialogsTest2() {} void CuiDialogsTest2::registerKnownDialogsByID(mapType& /*rKnownDialogs*/) { // leave empty should be in CuiDialogTest if any } -VclPtr CuiDialogsTest2::createDialogByID(sal_uInt32 /*nID*/) -{ - return nullptr; -} +VclPtr CuiDialogsTest2::createDialogByID(sal_uInt32 /*nID*/) { return nullptr; } void CuiDialogsTest2::openAnyDialog() { diff --git a/cui/qa/unit/cui-dialogs-test_3.cxx b/cui/qa/unit/cui-dialogs-test_3.cxx index e369fd11fd39..9c3a09a8d240 100644 --- a/cui/qa/unit/cui-dialogs-test_3.cxx +++ b/cui/qa/unit/cui-dialogs-test_3.cxx @@ -36,19 +36,14 @@ public: CPPUNIT_TEST_SUITE_END(); }; -CuiDialogsTest3::CuiDialogsTest3() -{ -} +CuiDialogsTest3::CuiDialogsTest3() {} void CuiDialogsTest3::registerKnownDialogsByID(mapType& /*rKnownDialogs*/) { // leave empty should be in CuiDialogTest if any } -VclPtr CuiDialogsTest3::createDialogByID(sal_uInt32 /*nID*/) -{ - return nullptr; -} +VclPtr CuiDialogsTest3::createDialogByID(sal_uInt32 /*nID*/) { return nullptr; } void CuiDialogsTest3::openAnyDialog() { diff --git a/cui/qa/unit/cui-dialogs-test_4.cxx b/cui/qa/unit/cui-dialogs-test_4.cxx index 7183811b98f1..11820389968c 100644 --- a/cui/qa/unit/cui-dialogs-test_4.cxx +++ b/cui/qa/unit/cui-dialogs-test_4.cxx @@ -36,19 +36,14 @@ public: CPPUNIT_TEST_SUITE_END(); }; -CuiDialogsTest4::CuiDialogsTest4() -{ -} +CuiDialogsTest4::CuiDialogsTest4() {} void CuiDialogsTest4::registerKnownDialogsByID(mapType& /*rKnownDialogs*/) { // leave empty should be in CuiDialogTest if any } -VclPtr CuiDialogsTest4::createDialogByID(sal_uInt32 /*nID*/) -{ - return nullptr; -} +VclPtr CuiDialogsTest4::createDialogByID(sal_uInt32 /*nID*/) { return nullptr; } void CuiDialogsTest4::openAnyDialog() { diff --git a/cui/source/dialogs/cuiimapwnd.cxx b/cui/source/dialogs/cuiimapwnd.cxx index 60346dc69816..d613e1a804ee 100644 --- a/cui/source/dialogs/cuiimapwnd.cxx +++ b/cui/source/dialogs/cuiimapwnd.cxx @@ -38,10 +38,10 @@ URLDlg::URLDlg(weld::Widget* pWindow, const OUString& rURL, const OUString& rAlt m_xEdtDescription->set_size_request(m_xEdtDescription->get_approximate_digit_width() * 51, m_xEdtDescription->get_height_rows(5)); - m_xEdtURL->set_text( rURL ); - m_xEdtAlternativeText->set_text( rAlternativeText ); - m_xEdtDescription->set_text( rDescription ); - m_xEdtName->set_text( rName ); + m_xEdtURL->set_text(rURL); + m_xEdtAlternativeText->set_text(rAlternativeText); + m_xEdtDescription->set_text(rDescription); + m_xEdtName->set_text(rName); for (const OUString& a : rTargetList) m_xCbbTargets->append_text(a); @@ -52,8 +52,6 @@ URLDlg::URLDlg(weld::Widget* pWindow, const OUString& rURL, const OUString& rAlt m_xCbbTargets->set_entry_text(rTarget); } -URLDlg::~URLDlg() -{ -} +URLDlg::~URLDlg() {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/cuitbxform.cxx b/cui/source/dialogs/cuitbxform.cxx index eb0a768149d5..55d21325d5bc 100644 --- a/cui/source/dialogs/cuitbxform.cxx +++ b/cui/source/dialogs/cuitbxform.cxx @@ -19,15 +19,13 @@ #include -FmInputRecordNoDialog::FmInputRecordNoDialog(weld::Window * pParent) +FmInputRecordNoDialog::FmInputRecordNoDialog(weld::Window* pParent) : GenericDialogController(pParent, "cui/ui/recordnumberdialog.ui", "RecordNumberDialog") , m_xRecordNo(m_xBuilder->weld_spin_button("entry")) { m_xRecordNo->set_range(1, 0x7FFFFFFF); } -FmInputRecordNoDialog::~FmInputRecordNoDialog() -{ -} +FmInputRecordNoDialog::~FmInputRecordNoDialog() {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index d8044366b470..ffa540bbca5b 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -48,10 +48,11 @@ IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl, weld::Entry&, void) bEnable = !m_xEdtName->get_text().isEmpty(); m_xBtnOK->set_sensitive(bEnable); // tdf#129032: feedback on reason to disabled controls - m_xEdtName->set_message_type(bEnable ? weld::EntryMessageType::Normal : weld::EntryMessageType::Error); + m_xEdtName->set_message_type(bEnable ? weld::EntryMessageType::Normal + : weld::EntryMessageType::Error); OUString rTip = ""; if (!bEnable && m_aCheckNameTooltipHdl.IsSet()) - rTip = m_aCheckNameTooltipHdl.Call(*this); + rTip = m_aCheckNameTooltipHdl.Call(*this); m_xBtnOK->set_tooltip_text(rTip); m_xEdtName->set_tooltip_text(rTip); } diff --git a/cui/source/dialogs/newtabledlg.cxx b/cui/source/dialogs/newtabledlg.cxx index 16e81f8d90ea..9eb50987ea9a 100644 --- a/cui/source/dialogs/newtabledlg.cxx +++ b/cui/source/dialogs/newtabledlg.cxx @@ -28,12 +28,12 @@ SvxNewTableDialog::SvxNewTableDialog(weld::Window* pWindow) sal_Int32 SvxNewTableDialog::getRows() const { - return sal::static_int_cast< sal_Int32 >( mxNumRows->get_value() ); + return sal::static_int_cast(mxNumRows->get_value()); } sal_Int32 SvxNewTableDialog::getColumns() const { - return sal::static_int_cast< sal_Int32 >( mxNumColumns->get_value() ); + return sal::static_int_cast(mxNumColumns->get_value()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx index 895ed485ec1c..6c92d00fc6b2 100644 --- a/cui/source/dialogs/showcols.cxx +++ b/cui/source/dialogs/showcols.cxx @@ -25,28 +25,29 @@ #include #define CUIFM_PROP_HIDDEN "Hidden" -#define CUIFM_PROP_LABEL "Label" +#define CUIFM_PROP_LABEL "Label" FmShowColsDialog::FmShowColsDialog(weld::Window* pParent) : GenericDialogController(pParent, "cui/ui/showcoldialog.ui", "ShowColDialog") , m_xList(m_xBuilder->weld_tree_view("treeview")) , m_xOK(m_xBuilder->weld_button("ok")) { - m_xList->set_size_request(m_xList->get_approximate_digit_width() * 40, m_xList->get_height_rows(8)); + m_xList->set_size_request(m_xList->get_approximate_digit_width() * 40, + m_xList->get_height_rows(8)); m_xList->set_selection_mode(SelectionMode::Multiple); m_xOK->connect_clicked(LINK(this, FmShowColsDialog, OnClickedOk)); } -FmShowColsDialog::~FmShowColsDialog() -{ -} +FmShowColsDialog::~FmShowColsDialog() {} IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk, weld::Button&, void) { - DBG_ASSERT(m_xColumns.is(), "FmShowColsDialog::OnClickedOk : you should call SetColumns before executing the dialog !"); + DBG_ASSERT( + m_xColumns.is(), + "FmShowColsDialog::OnClickedOk : you should call SetColumns before executing the dialog !"); if (m_xColumns.is()) { - css::uno::Reference< css::beans::XPropertySet > xCol; + css::uno::Reference xCol; auto nSelectedRows = m_xList->get_selected_rows(); for (auto i : nSelectedRows) { @@ -57,7 +58,7 @@ IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk, weld::Button&, void) { xCol->setPropertyValue(CUIFM_PROP_HIDDEN, css::uno::Any(false)); } - catch(...) + catch (...) { OSL_FAIL("FmShowColsDialog::OnClickedOk Exception occurred!"); } @@ -68,7 +69,7 @@ IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk, weld::Button&, void) m_xDialog->response(RET_OK); } -void FmShowColsDialog::SetColumns(const css::uno::Reference< css::container::XIndexContainer>& xCols) +void FmShowColsDialog::SetColumns(const css::uno::Reference& xCols) { DBG_ASSERT(xCols.is(), "FmShowColsDialog::SetColumns : invalid columns !"); if (!xCols.is()) @@ -77,9 +78,9 @@ void FmShowColsDialog::SetColumns(const css::uno::Reference< css::container::XIn m_xList->clear(); - css::uno::Reference< css::beans::XPropertySet> xCurCol; + css::uno::Reference xCurCol; OUString sCurName; - for (sal_Int32 i=0; igetCount(); ++i) + for (sal_Int32 i = 0; i < xCols->getCount(); ++i) { sCurName.clear(); xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY); @@ -93,7 +94,7 @@ void FmShowColsDialog::SetColumns(const css::uno::Reference< css::container::XIn xCurCol->getPropertyValue(CUIFM_PROP_LABEL) >>= sName; sCurName = sName; } - catch(...) + catch (...) { OSL_FAIL("FmShowColsDialog::SetColumns Exception occurred!"); } diff --git a/cui/source/factory/cuiexp.cxx b/cui/source/factory/cuiexp.cxx index bbe1d743120a..06557be56779 100644 --- a/cui/source/factory/cuiexp.cxx +++ b/cui/source/factory/cuiexp.cxx @@ -22,19 +22,15 @@ namespace cui { - static AbstractDialogFactory_Impl* GetFactory() - { - static AbstractDialogFactory_Impl* pFactory = new AbstractDialogFactory_Impl; - return pFactory; - } +static AbstractDialogFactory_Impl* GetFactory() +{ + static AbstractDialogFactory_Impl* pFactory = new AbstractDialogFactory_Impl; + return pFactory; +} } -extern "C" -{ - SAL_DLLPUBLIC_EXPORT VclAbstractDialogFactory* CreateDialogFactory() - { - return ::cui::GetFactory(); - } +extern "C" { +SAL_DLLPUBLIC_EXPORT VclAbstractDialogFactory* CreateDialogFactory() { return ::cui::GetFactory(); } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/factory/cuiresmgr.cxx b/cui/source/factory/cuiresmgr.cxx index b59f73cf8530..ae22515bd261 100644 --- a/cui/source/factory/cuiresmgr.cxx +++ b/cui/source/factory/cuiresmgr.cxx @@ -20,9 +20,6 @@ #include #include -OUString CuiResId(const char *pKey) -{ - return Translate::get(pKey, Translate::Create("cui")); -} +OUString CuiResId(const char* pKey) { return Translate::get(pKey, Translate::Create("cui")); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx index 41c4da9f0ddb..9b3a5f947016 100644 --- a/cui/source/inc/cuifmsearch.hxx +++ b/cui/source/inc/cuifmsearch.hxx @@ -26,8 +26,9 @@ #include #include -namespace svxform { - class FmSearchConfigItem; +namespace svxform +{ +class FmSearchConfigItem; } struct FmSearchProgress; @@ -39,13 +40,14 @@ class FmSearchDialog final : public weld::GenericDialogController { friend class FmSearchEngine; - OUString m_sSearch; - OUString m_sCancel; + OUString m_sSearch; + OUString m_sCancel; - Link m_lnkFoundHandler; ///< Handler for "found" - Link m_lnkCanceledNotFoundHdl; ///< Handler for Positioning the Cursors + Link m_lnkFoundHandler; ///< Handler for "found" + Link + m_lnkCanceledNotFoundHdl; ///< Handler for Positioning the Cursors - Link m_lnkContextSupplier; ///< for search in contexts + Link m_lnkContextSupplier; ///< for search in contexts /// memorize the currently selected field for every context std::vector m_arrContextFields; @@ -53,7 +55,7 @@ class FmSearchDialog final : public weld::GenericDialogController std::unique_ptr m_pSearchEngine; // see EnableSearchUI - std::unique_ptr<::svxform::FmSearchConfigItem> m_pConfig; + std::unique_ptr<::svxform::FmSearchConfigItem> m_pConfig; // my all Controls std::unique_ptr m_prbSearchForText; @@ -98,8 +100,9 @@ public: (of course needed : the string number i in strUsedFields of a context must correspond with the interface number i in the arrFields of the context) */ - FmSearchDialog(weld::Window* pParent, const OUString& strInitialText, const std::vector< OUString >& _rContexts, sal_Int16 nInitialContext, - const Link& lnkContextSupplier); + FmSearchDialog(weld::Window* pParent, const OUString& strInitialText, + const std::vector& _rContexts, sal_Int16 nInitialContext, + const Link& lnkContextSupplier); virtual short run() override; @@ -111,7 +114,10 @@ public: This handler MUST be set. Furthermore, it should be considered, that during the handler the search-dialog is still modal. */ - void SetFoundHandler(const Link& lnk) { m_lnkFoundHandler = lnk; } + void SetFoundHandler(const Link& lnk) + { + m_lnkFoundHandler = lnk; + } /** If the search has been cancelled or has been finished without success, the current data set is always displayed in the search dialog. This handler exists to make this synchronous with the possible display of the caller (it does not @@ -119,7 +125,10 @@ public: The pointer that is passed to the handler points to a FmFoundRecordInformation-structure, for which aPosition and possibly (in a search with contexts) nContext are valid. */ - void SetCanceledNotFoundHdl(const Link& lnk) { m_lnkCanceledNotFoundHdl = lnk; } + void SetCanceledNotFoundHdl(const Link& lnk) + { + m_lnkCanceledNotFoundHdl = lnk; + } inline void SetActiveField(const OUString& strField); @@ -139,23 +148,23 @@ private: void SaveParams() const; // Handler for the Controls - DECL_LINK( OnClickedFieldRadios, weld::Button&, void ); - DECL_LINK( OnClickedSearchAgain, weld::Button&, void ); - DECL_LINK( OnClickedSpecialSettings, weld::Button&, void ); + DECL_LINK(OnClickedFieldRadios, weld::Button&, void); + DECL_LINK(OnClickedSearchAgain, weld::Button&, void); + DECL_LINK(OnClickedSpecialSettings, weld::Button&, void); - DECL_LINK( OnSearchTextModified, weld::ComboBox&, void ); + DECL_LINK(OnSearchTextModified, weld::ComboBox&, void); - DECL_LINK( OnPositionSelected, weld::ComboBox&, void ); - DECL_LINK( OnFieldSelected, weld::ComboBox&, void ); + DECL_LINK(OnPositionSelected, weld::ComboBox&, void); + DECL_LINK(OnFieldSelected, weld::ComboBox&, void); - DECL_LINK( OnFocusGrabbed, weld::Widget&, void ); - DECL_LINK( OnCheckBoxToggled, weld::ToggleButton&, void ); + DECL_LINK(OnFocusGrabbed, weld::Widget&, void); + DECL_LINK(OnCheckBoxToggled, weld::ToggleButton&, void); - DECL_LINK( OnContextSelection, weld::ComboBox&, void ); + DECL_LINK(OnContextSelection, weld::ComboBox&, void); - DECL_LINK( OnSearchProgress, const FmSearchProgress*, void ); + DECL_LINK(OnSearchProgress, const FmSearchProgress*, void); - void initCommon( const css::uno::Reference< css::sdbc::XResultSet >& _rxCursor ); + void initCommon(const css::uno::Reference& _rxCursor); }; inline void FmSearchDialog::SetActiveField(const OUString& strField) diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx index d305875837c5..06e70562fc8d 100644 --- a/cui/source/inc/dlgname.hxx +++ b/cui/source/inc/dlgname.hxx @@ -28,8 +28,8 @@ private: std::unique_ptr m_xFtDescription; std::unique_ptr m_xBtnOK; - Link m_aCheckNameHdl; - Link m_aCheckNameTooltipHdl; + Link m_aCheckNameHdl; + Link m_aCheckNameTooltipHdl; DECL_LINK(ModifyHdl, weld::Entry&, void); @@ -53,20 +53,20 @@ public: @todo Remove the parameter bCheckImmediately and incorporate the 'true' behaviour as default. */ - void SetCheckNameHdl(const Link& rLink, bool bCheckImmediately) + void SetCheckNameHdl(const Link& rLink, bool bCheckImmediately) { m_aCheckNameHdl = rLink; if (bCheckImmediately) m_xBtnOK->set_sensitive(rLink.Call(*this)); } - void SetCheckNameTooltipHdl(const Link& rLink) + void SetCheckNameTooltipHdl(const Link& rLink) { m_aCheckNameTooltipHdl = rLink; m_xBtnOK->set_tooltip_text(rLink.Call(*this)); } - void SetEditHelpId(const OString& aHelpId) { m_xEdtName->set_help_id(aHelpId);} + void SetEditHelpId(const OString& aHelpId) { m_xEdtName->set_help_id(aHelpId); } }; /** #i68101# @@ -82,7 +82,7 @@ private: std::unique_ptr m_xBtnOK; // callback link for name uniqueness - Link aCheckNameHdl; + Link aCheckNameHdl; DECL_LINK(ModifyHdl, weld::Entry&, void); @@ -94,10 +94,7 @@ public: OUString GetName() const { return m_xEdtName->get_text(); } // set handler - void SetCheckNameHdl(const Link& rLink) - { - aCheckNameHdl = rLink; - } + void SetCheckNameHdl(const Link& rLink) { aCheckNameHdl = rLink; } }; /** #i68101# diff --git a/cui/source/inc/headertablistbox.hxx b/cui/source/inc/headertablistbox.hxx index c39f0cb7dfeb..a87bb1460f76 100644 --- a/cui/source/inc/headertablistbox.hxx +++ b/cui/source/inc/headertablistbox.hxx @@ -25,15 +25,13 @@ class MacroEventListBox final { private: std::unique_ptr m_xTreeView; + public: MacroEventListBox(std::unique_ptr xTreeView); void set_sensitive(bool bSensitive) { m_xTreeView->set_sensitive(bSensitive); } void show() { m_xTreeView->show(); } - weld::TreeView& GetListBox() - { - return *m_xTreeView; - } + weld::TreeView& GetListBox() { return *m_xTreeView; } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/hlmarkwn_def.hxx b/cui/source/inc/hlmarkwn_def.hxx index ab8fd86d5a3b..34cd741fec77 100644 --- a/cui/source/inc/hlmarkwn_def.hxx +++ b/cui/source/inc/hlmarkwn_def.hxx @@ -19,8 +19,8 @@ #pragma once -#define LERR_NOERROR 0 -#define LERR_NOENTRIES 1 -#define LERR_DOCNOTOPEN 2 +#define LERR_NOERROR 0 +#define LERR_NOENTRIES 1 +#define LERR_DOCNOTOPEN 2 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx index e91aa0f2f6d8..3549ef0eb291 100644 --- a/cui/source/inc/linkdlg.hxx +++ b/cui/source/inc/linkdlg.hxx @@ -27,8 +27,8 @@ *************************************************************************/ namespace sfx2 { - class LinkManager; - class SvBaseLink; +class LinkManager; +class SvBaseLink; } enum class SfxLinkUpdateMode; @@ -41,7 +41,7 @@ class SvBaseLinksDlg : public weld::GenericDialogController OUString aStrCloselinkmsg; OUString aStrCloselinkmsgMulti; OUString aStrWaitinglink; - sfx2::LinkManager* pLinkMgr; + sfx2::LinkManager* pLinkMgr; Idle aUpdateIdle; std::unique_ptr m_xTbLinks; @@ -56,27 +56,27 @@ class SvBaseLinksDlg : public weld::GenericDialogController ScopedVclPtr m_xVirDev; - DECL_LINK( LinksSelectHdl, weld::TreeView&, void ); - DECL_LINK( LinksDoubleClickHdl, weld::TreeView&, bool ); - DECL_LINK( AutomaticClickHdl, weld::Button&, void ); - DECL_LINK( ManualClickHdl, weld::Button&, void ); - DECL_LINK( UpdateNowClickHdl, weld::Button&, void); - DECL_LINK( ChangeSourceClickHdl, weld::Button&, void ); - DECL_LINK( BreakLinkClickHdl, weld::Button&, void ); - DECL_LINK( UpdateWaitingHdl, Timer *, void ); - DECL_LINK( EndEditHdl, sfx2::SvBaseLink&, void ); + DECL_LINK(LinksSelectHdl, weld::TreeView&, void); + DECL_LINK(LinksDoubleClickHdl, weld::TreeView&, bool); + DECL_LINK(AutomaticClickHdl, weld::Button&, void); + DECL_LINK(ManualClickHdl, weld::Button&, void); + DECL_LINK(UpdateNowClickHdl, weld::Button&, void); + DECL_LINK(ChangeSourceClickHdl, weld::Button&, void); + DECL_LINK(BreakLinkClickHdl, weld::Button&, void); + DECL_LINK(UpdateWaitingHdl, Timer*, void); + DECL_LINK(EndEditHdl, sfx2::SvBaseLink&, void); void LinksSelectHdl(weld::TreeView* pTreeView); sfx2::SvBaseLink* GetSelEntry(int* pPos); - OUString ImplGetStateStr( const sfx2::SvBaseLink& ); + OUString ImplGetStateStr(const sfx2::SvBaseLink&); void SetType(sfx2::SvBaseLink& rLink, int nPos, SfxLinkUpdateMode nType); void InsertEntry(const sfx2::SvBaseLink& rLink, int nPos = -1, bool bSelect = false); - void SetManager( sfx2::LinkManager* ); + void SetManager(sfx2::LinkManager*); public: - SvBaseLinksDlg(weld::Window * pParent, sfx2::LinkManager*, bool bHtml); + SvBaseLinksDlg(weld::Window* pParent, sfx2::LinkManager*, bool bHtml); virtual ~SvBaseLinksDlg() override; - void SetActLink( sfx2::SvBaseLink const * pLink ); + void SetActLink(sfx2::SvBaseLink const* pLink); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/optasian.hxx b/cui/source/inc/optasian.hxx index 32015f5f8b98..8ecf942b9a13 100644 --- a/cui/source/inc/optasian.hxx +++ b/cui/source/inc/optasian.hxx @@ -46,13 +46,15 @@ class SvxAsianLayoutPage : public SfxTabPage DECL_LINK(ModifyHdl, weld::Entry&, void); public: - SvxAsianLayoutPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet ); + SvxAsianLayoutPage(weld::Container* pPage, weld::DialogController* pController, + const SfxItemSet& rSet); virtual ~SvxAsianLayoutPage() override; - static std::unique_ptr Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet ); - static const sal_uInt16* GetRanges(); - virtual bool FillItemSet( SfxItemSet* rSet ) override; - virtual void Reset( const SfxItemSet* rSet ) override; + static std::unique_ptr + Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet); + static const sal_uInt16* GetRanges(); + virtual bool FillItemSet(SfxItemSet* rSet) override; + virtual void Reset(const SfxItemSet* rSet) override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/screenshotannotationdlg.hxx b/cui/source/inc/screenshotannotationdlg.hxx index f82bbeacb392..1e41810a09aa 100644 --- a/cui/source/inc/screenshotannotationdlg.hxx +++ b/cui/source/inc/screenshotannotationdlg.hxx @@ -26,10 +26,10 @@ class ScreenshotAnnotationDlg_Impl; class ScreenshotAnnotationDlg : public weld::GenericDialogController { private: - std::unique_ptr< ScreenshotAnnotationDlg_Impl > m_pImpl; + std::unique_ptr m_pImpl; - ScreenshotAnnotationDlg(const ScreenshotAnnotationDlg &) = delete; - ScreenshotAnnotationDlg& operator=(const ScreenshotAnnotationDlg &) = delete; + ScreenshotAnnotationDlg(const ScreenshotAnnotationDlg&) = delete; + ScreenshotAnnotationDlg& operator=(const ScreenshotAnnotationDlg&) = delete; public: ScreenshotAnnotationDlg(weld::Dialog& rParentDialog); diff --git a/cui/source/options/tsaurls.cxx b/cui/source/options/tsaurls.cxx index 62f08298db8e..5c01e1c5b425 100644 --- a/cui/source/options/tsaurls.cxx +++ b/cui/source/options/tsaurls.cxx @@ -28,14 +28,15 @@ TSAURLsDialog::TSAURLsDialog(weld::Window* pParent) m_xURLListBox->get_height_rows(8)); m_xOKBtn->set_sensitive(false); - m_xAddBtn->connect_clicked( LINK( this, TSAURLsDialog, AddHdl_Impl ) ); - m_xDeleteBtn->connect_clicked( LINK( this, TSAURLsDialog, DeleteHdl_Impl ) ); - m_xOKBtn->connect_clicked( LINK( this, TSAURLsDialog, OKHdl_Impl ) ); - m_xURLListBox->connect_changed( LINK( this, TSAURLsDialog, SelectHdl ) ); + m_xAddBtn->connect_clicked(LINK(this, TSAURLsDialog, AddHdl_Impl)); + m_xDeleteBtn->connect_clicked(LINK(this, TSAURLsDialog, DeleteHdl_Impl)); + m_xOKBtn->connect_clicked(LINK(this, TSAURLsDialog, OKHdl_Impl)); + m_xURLListBox->connect_changed(LINK(this, TSAURLsDialog, SelectHdl)); try { - std::optional> aUserSetTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get()); + std::optional> aUserSetTSAURLs( + officecfg::Office::Common::Security::Scripting::TSAURLs::get()); if (aUserSetTSAURLs) { const css::uno::Sequence& rUserSetTSAURLs = *aUserSetTSAURLs; @@ -45,7 +46,7 @@ TSAURLsDialog::TSAURLsDialog(weld::Window* pParent) } } } - catch (const uno::Exception &) + catch (const uno::Exception&) { TOOLS_WARN_EXCEPTION("cui.options", "TSAURLsDialog::TSAURLsDialog()"); } @@ -58,17 +59,17 @@ TSAURLsDialog::TSAURLsDialog(weld::Window* pParent) IMPL_LINK_NOARG(TSAURLsDialog, OKHdl_Impl, weld::Button&, void) { - std::shared_ptr batch(comphelper::ConfigurationChanges::create()); + std::shared_ptr batch( + comphelper::ConfigurationChanges::create()); - officecfg::Office::Common::Security::Scripting::TSAURLs::set(comphelper::containerToSequence(m_aURLs), batch); + officecfg::Office::Common::Security::Scripting::TSAURLs::set( + comphelper::containerToSequence(m_aURLs), batch); batch->commit(); m_xDialog->response(RET_OK); } -TSAURLsDialog::~TSAURLsDialog() -{ -} +TSAURLsDialog::~TSAURLsDialog() {} void TSAURLsDialog::AddTSAURL(const OUString& rURL) { @@ -91,7 +92,8 @@ IMPL_LINK_NOARG(TSAURLsDialog, AddHdl_Impl, weld::Button&, void) OUString aDesc(m_xEnterAUrl->get_label()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr pDlg(pFact->CreateSvxNameDialog(m_xDialog.get(), aURL, aDesc)); + ScopedVclPtr pDlg( + pFact->CreateSvxNameDialog(m_xDialog.get(), aURL, aDesc)); if (pDlg->Execute() == RET_OK) { diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index faef69fd7da1..7e9920a35fb2 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -2545,11 +2545,6 @@ cppuhelper/source/unourl.cxx cppuhelper/source/weak.cxx cpputools/source/sp2bv/sp2bv.cxx cpputools/source/unoexe/unoexe.cxx -cui/inc/strings.hxx -cui/qa/unit/cui-dialogs-test.cxx -cui/qa/unit/cui-dialogs-test_2.cxx -cui/qa/unit/cui-dialogs-test_3.cxx -cui/qa/unit/cui-dialogs-test_4.cxx cui/source/customize/cfg.cxx cui/source/customize/cfgutil.cxx cui/source/customize/eventdlg.cxx @@ -2565,9 +2560,6 @@ cui/source/dialogs/cuifmsearch.cxx cui/source/dialogs/cuigaldlg.cxx cui/source/dialogs/cuigrfflt.cxx cui/source/dialogs/cuihyperdlg.cxx -cui/source/dialogs/cuiimapwnd.cxx -cui/source/dialogs/cuitbxform.cxx -cui/source/dialogs/dlgname.cxx cui/source/dialogs/hangulhanjadlg.cxx cui/source/dialogs/hldocntp.cxx cui/source/dialogs/hldoctp.cxx @@ -2581,19 +2573,15 @@ cui/source/dialogs/insdlg.cxx cui/source/dialogs/insrc.cxx cui/source/dialogs/linkdlg.cxx cui/source/dialogs/multipat.cxx -cui/source/dialogs/newtabledlg.cxx cui/source/dialogs/passwdomdlg.cxx cui/source/dialogs/pastedlg.cxx cui/source/dialogs/postdlg.cxx cui/source/dialogs/screenshotannotationdlg.cxx cui/source/dialogs/scriptdlg.cxx cui/source/dialogs/sdrcelldlg.cxx -cui/source/dialogs/showcols.cxx cui/source/dialogs/splitcelldlg.cxx cui/source/dialogs/srchxtra.cxx cui/source/dialogs/thesdlg.cxx -cui/source/factory/cuiexp.cxx -cui/source/factory/cuiresmgr.cxx cui/source/factory/dlgfact.cxx cui/source/factory/dlgfact.hxx cui/source/factory/init.cxx @@ -2607,7 +2595,6 @@ cui/source/inc/cfg.hxx cui/source/inc/cfgutil.hxx cui/source/inc/chardlg.hxx cui/source/inc/connect.hxx -cui/source/inc/cuifmsearch.hxx cui/source/inc/cuigaldlg.hxx cui/source/inc/cuigrfflt.hxx cui/source/inc/cuihyperdlg.hxx @@ -2618,29 +2605,24 @@ cui/source/inc/cuitabarea.hxx cui/source/inc/cuitabline.hxx cui/source/inc/dbregister.hxx cui/source/inc/defdlgname.hxx -cui/source/inc/dlgname.hxx cui/source/inc/grfpage.hxx cui/source/inc/hangulhanjadlg.hxx -cui/source/inc/headertablistbox.hxx cui/source/inc/hldocntp.hxx cui/source/inc/hldoctp.hxx cui/source/inc/hlinettp.hxx cui/source/inc/hlmailtp.hxx cui/source/inc/hlmarkwn.hxx -cui/source/inc/hlmarkwn_def.hxx cui/source/inc/hltpbase.hxx cui/source/inc/hyphen.hxx cui/source/inc/iconcdlg.hxx cui/source/inc/insdlg.hxx cui/source/inc/labdlg.hxx -cui/source/inc/linkdlg.hxx cui/source/inc/macroass.hxx cui/source/inc/macropg.hxx cui/source/inc/measure.hxx cui/source/inc/multipat.hxx cui/source/inc/numfmt.hxx cui/source/inc/numpages.hxx -cui/source/inc/optasian.hxx cui/source/inc/optdict.hxx cui/source/inc/optlingu.hxx cui/source/inc/optpath.hxx @@ -2649,7 +2631,6 @@ cui/source/inc/paragrph.hxx cui/source/inc/passwdomdlg.hxx cui/source/inc/pastedlg.hxx cui/source/inc/postdlg.hxx -cui/source/inc/screenshotannotationdlg.hxx cui/source/inc/scriptdlg.hxx cui/source/inc/sdrcelldlg.hxx cui/source/inc/splitcelldlg.hxx @@ -2721,7 +2702,6 @@ cui/source/options/sdbcdriverenum.hxx cui/source/options/securityoptions.cxx cui/source/options/securityoptions.hxx cui/source/options/treeopt.cxx -cui/source/options/tsaurls.cxx cui/source/options/webconninfo.cxx cui/source/options/webconninfo.hxx cui/source/tabpages/align.cxx -- cgit