diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2020-02-07 01:46:25 +0300 |
---|---|---|
committer | Muhammet Kara <muhammet.kara@collabora.com> | 2020-02-07 08:06:24 +0100 |
commit | e9152974af2598856ab57268cb02c363f8730579 (patch) | |
tree | b55f155e06fef9d06463962763b417c8196a7375 /cui | |
parent | c19e688b1a1c3165e267eea971892869edb89569 (diff) |
clang-format cui with under 5-percent lines of change
Files which could become clang-format conformant with
under 5-percent lines of change relative to the total
count of lines in the file are found by using bin/find-clang-format.py,
and fixed with /opt/lo/bin/clang-format -i <path-of-the-file>
There will be follow-up patches to fix all 'under-5-percent' files.
Change-Id: I2886b6da85043218505ff9f3e40a8e28289c6f37
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88152
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/dlgname.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/zoom.cxx | 39 | ||||
-rw-r--r-- | cui/source/inc/about.hxx | 4 | ||||
-rw-r--r-- | cui/source/inc/dialmgr.hxx | 2 | ||||
-rw-r--r-- | cui/source/inc/newtabledlg.hxx | 1 | ||||
-rw-r--r-- | cui/source/inc/showcols.hxx | 4 | ||||
-rw-r--r-- | cui/source/options/certpath.hxx | 2 | ||||
-rw-r--r-- | cui/source/options/tsaurls.hxx | 2 |
8 files changed, 28 insertions, 28 deletions
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index 0e201d5e22dd..133f1753fecd 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -77,7 +77,7 @@ IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl, weld::Entry&, void) // Dialog for editing Object Title and Description SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, - const OUString& rDescription) + const OUString& rDescription) : GenericDialogController(pParent, "cui/ui/objecttitledescdialog.ui", "ObjectTitleDescDialog") , m_xEdtTitle(m_xBuilder->weld_entry("object_title_entry")) , m_xEdtDescription(m_xBuilder->weld_text_view("desc_entry")) diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index 380ad1404da4..b80080dfa352 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -28,7 +28,6 @@ namespace { - const sal_uInt16 SPECIAL_FACTOR = 0xFFFF; } // anonymous namespace @@ -50,7 +49,7 @@ void SvxZoomDialog::SetFactor(sal_uInt16 nNewFactor, ZoomButtonId nButtonId) if (nButtonId == ZoomButtonId::NONE) { - if ( nNewFactor == 100 ) + if (nNewFactor == 100) { m_x100Btn->set_active(true); m_x100Btn->grab_focus(); @@ -66,7 +65,7 @@ void SvxZoomDialog::SetFactor(sal_uInt16 nNewFactor, ZoomButtonId nButtonId) else { m_xUserEdit->set_value(nNewFactor, FieldUnit::PERCENT); - switch(nButtonId) + switch (nButtonId) { case ZoomButtonId::OPTIMAL: { @@ -86,7 +85,8 @@ void SvxZoomDialog::SetFactor(sal_uInt16 nNewFactor, ZoomButtonId nButtonId) m_xWholePageBtn->grab_focus(); break; } - default: break; + default: + break; } } } @@ -108,7 +108,7 @@ void SvxZoomDialog::HideButton(ZoomButtonId nButtonId) break; default: - OSL_FAIL("Wrong button number!" ); + OSL_FAIL("Wrong button number!"); } } @@ -118,10 +118,7 @@ void SvxZoomDialog::SetLimits(sal_uInt16 nMin, sal_uInt16 nMax) m_xUserEdit->set_range(nMin, nMax, FieldUnit::PERCENT); } -const SfxItemSet* SvxZoomDialog::GetOutputItemSet() const -{ - return m_pOutSet.get(); -} +const SfxItemSet* SvxZoomDialog::GetOutputItemSet() const { return m_pOutSet.get(); } SvxZoomDialog::SvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) : SfxDialogController(pParent, "cui/ui/zoomdialog.ui", "ZoomDialog") @@ -141,22 +138,24 @@ SvxZoomDialog::SvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) , m_xBookModeChk(m_xBuilder->weld_check_button("bookmode")) , m_xOKBtn(m_xBuilder->weld_button("ok")) { - Link<weld::ToggleButton&,void> aLink = LINK(this, SvxZoomDialog, UserHdl); + Link<weld::ToggleButton&, void> aLink = LINK(this, SvxZoomDialog, UserHdl); m_x100Btn->connect_toggled(aLink); m_xOptimalBtn->connect_toggled(aLink); m_xPageWidthBtn->connect_toggled(aLink); m_xWholePageBtn->connect_toggled(aLink); m_xUserBtn->connect_toggled(aLink); - Link<weld::ToggleButton&,void> aViewLayoutLink = LINK(this, SvxZoomDialog, ViewLayoutUserHdl); + Link<weld::ToggleButton&, void> aViewLayoutLink = LINK(this, SvxZoomDialog, ViewLayoutUserHdl); m_xAutomaticBtn->connect_toggled(aViewLayoutLink); m_xSingleBtn->connect_toggled(aViewLayoutLink); m_xColumnsBtn->connect_toggled(aViewLayoutLink); - Link<weld::SpinButton&,void> aViewLayoutSpinLink = LINK(this, SvxZoomDialog, ViewLayoutSpinHdl); + Link<weld::SpinButton&, void> aViewLayoutSpinLink + = LINK(this, SvxZoomDialog, ViewLayoutSpinHdl); m_xColumnsEdit->connect_value_changed(aViewLayoutSpinLink); - Link<weld::ToggleButton&,void> aViewLayoutCheckLink = LINK(this, SvxZoomDialog, ViewLayoutCheckHdl); + Link<weld::ToggleButton&, void> aViewLayoutCheckLink + = LINK(this, SvxZoomDialog, ViewLayoutCheckHdl); m_xBookModeChk->connect_toggled(aViewLayoutCheckLink); m_xOKBtn->connect_clicked(LINK(this, SvxZoomDialog, OKHdl)); @@ -188,7 +187,7 @@ SvxZoomDialog::SvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) const SfxPoolItem& rItem = m_rSet.Get(m_rSet.GetPool()->GetWhich(SID_ATTR_ZOOM)); - if (nullptr != dynamic_cast<const SvxZoomItem*>( &rItem)) + if (nullptr != dynamic_cast<const SvxZoomItem*>(&rItem)) { const SvxZoomItem& rZoomItem = static_cast<const SvxZoomItem&>(rItem); const sal_uInt16 nZoom = rZoomItem.GetValue(); @@ -233,9 +232,10 @@ SvxZoomDialog::SvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) const SfxPoolItem* pPoolViewLayoutItem = nullptr; if (SfxItemState::SET == m_rSet.GetItemState(SID_ATTR_VIEWLAYOUT, false, &pPoolViewLayoutItem)) { - const SvxViewLayoutItem* pViewLayoutItem = static_cast<const SvxViewLayoutItem*>(pPoolViewLayoutItem); + const SvxViewLayoutItem* pViewLayoutItem + = static_cast<const SvxViewLayoutItem*>(pPoolViewLayoutItem); const sal_uInt16 nColumns = pViewLayoutItem->GetValue(); - const bool bBookMode = pViewLayoutItem->IsBookMode(); + const bool bBookMode = pViewLayoutItem->IsBookMode(); if (0 == nColumns) { @@ -346,7 +346,8 @@ IMPL_LINK_NOARG(SvxZoomDialog, OKHdl, weld::Button&, void) if (m_bModified) { SvxZoomItem aZoomItem(SvxZoomType::PERCENT, 0, m_rSet.GetPool()->GetWhich(SID_ATTR_ZOOM)); - SvxViewLayoutItem aViewLayoutItem(0, false, m_rSet.GetPool()->GetWhich(SID_ATTR_VIEWLAYOUT)); + SvxViewLayoutItem aViewLayoutItem(0, false, + m_rSet.GetPool()->GetWhich(SID_ATTR_VIEWLAYOUT)); sal_uInt16 nFactor = GetFactor(); @@ -392,14 +393,14 @@ IMPL_LINK_NOARG(SvxZoomDialog, OKHdl, weld::Button&, void) if (pShell) { - sal_uInt16 nZoomValue = static_cast<sal_uInt16>(m_xUserEdit->get_value(FieldUnit::PERCENT)); + sal_uInt16 nZoomValue + = static_cast<sal_uInt16>(m_xUserEdit->get_value(FieldUnit::PERCENT)); pShell->PutItem(SfxUInt16Item(SID_ATTR_ZOOM_USER, nZoomValue)); } m_xDialog->response(RET_OK); } else m_xDialog->response(RET_CANCEL); - } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index c51eb15433d8..aeda433cb2bd 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -33,8 +33,8 @@ private: std::unique_ptr<weld::Button> m_xReleaseNotesButton; std::unique_ptr<weld::Button> m_xCloseButton; - BitmapEx aLogoBitmap; - BitmapEx aBackgroundBitmap; + BitmapEx aLogoBitmap; + BitmapEx aBackgroundBitmap; OUString m_buildIdLinkString; diff --git a/cui/source/inc/dialmgr.hxx b/cui/source/inc/dialmgr.hxx index 067591a09bab..ae0fcfd694bd 100644 --- a/cui/source/inc/dialmgr.hxx +++ b/cui/source/inc/dialmgr.hxx @@ -21,7 +21,7 @@ #include <rtl/ustring.hxx> -OUString CuiResId(const char *pKey); +OUString CuiResId(const char* pKey); #endif diff --git a/cui/source/inc/newtabledlg.hxx b/cui/source/inc/newtabledlg.hxx index cad953779b12..320b319d315d 100644 --- a/cui/source/inc/newtabledlg.hxx +++ b/cui/source/inc/newtabledlg.hxx @@ -40,5 +40,4 @@ public: #endif // INCLUDED_CUI_SOURCE_INC_NEWTABLEDLG_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/showcols.hxx b/cui/source/inc/showcols.hxx index 36a89060802e..3b15abfd33bb 100644 --- a/cui/source/inc/showcols.hxx +++ b/cui/source/inc/showcols.hxx @@ -31,13 +31,13 @@ class FmShowColsDialog final : public weld::GenericDialogController std::unique_ptr<weld::TreeView> m_xList; std::unique_ptr<weld::Button> m_xOK; - css::uno::Reference< css::container::XIndexAccess > m_xColumns; + css::uno::Reference<css::container::XIndexAccess> m_xColumns; public: FmShowColsDialog(weld::Window* pParent); virtual ~FmShowColsDialog() override; - void SetColumns(const css::uno::Reference< css::container::XIndexContainer>& xCols); + void SetColumns(const css::uno::Reference<css::container::XIndexContainer>& xCols); private: DECL_LINK(OnClickedOk, weld::Button&, void); diff --git a/cui/source/options/certpath.hxx b/cui/source/options/certpath.hxx index b040a31d3c94..7ab30955dff6 100644 --- a/cui/source/options/certpath.hxx +++ b/cui/source/options/certpath.hxx @@ -26,7 +26,7 @@ class CertPathDialog : public weld::GenericDialogController DECL_LINK(OKHdl_Impl, weld::Button&, void); void HandleEntryChecked(int nRow); - void AddCertPath(const OUString &rProfile, const OUString &rPath, bool bSelect = true); + void AddCertPath(const OUString& rProfile, const OUString& rPath, bool bSelect = true); void AddManualCertPath(const OUString& sUserSetCertPath, bool bSelect = true); public: diff --git a/cui/source/options/tsaurls.hxx b/cui/source/options/tsaurls.hxx index 41ceeaa37253..ddec756bdda4 100644 --- a/cui/source/options/tsaurls.hxx +++ b/cui/source/options/tsaurls.hxx @@ -32,7 +32,7 @@ private: std::set<OUString> m_aURLs; - void AddTSAURL(const OUString &rURL); + void AddTSAURL(const OUString& rURL); public: explicit TSAURLsDialog(weld::Window* pParent); |