summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-28 10:01:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-28 11:28:41 +0200
commit6c6c1eea82b259c7aec1e0ed5ff86bfd2eb0243f (patch)
tree87e8ccbbfc4d369e079098eb8be09abf988f1c44 /sw/source/ui
parentfc79f23922ccae8b494b31a5dd7bb4767e50c87e (diff)
loplugin:constmethod in sw
Change-Id: I73c3c6d2165287d2d581a04b23b1d3b48166a488 Reviewed-on: https://gerrit.libreoffice.org/79780 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx10
-rw-r--r--sw/source/ui/dbui/addresslistdialog.hxx10
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx14
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx14
-rw-r--r--sw/source/ui/dbui/mmresultdialogs.cxx4
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx4
-rw-r--r--sw/source/ui/frmdlg/cption.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx2
-rw-r--r--sw/source/ui/misc/bookmark.cxx2
-rw-r--r--sw/source/ui/vba/vbaapplication.cxx2
-rw-r--r--sw/source/ui/vba/vbaapplication.hxx2
-rw-r--r--sw/source/ui/vba/vbadocument.cxx2
-rw-r--r--sw/source/ui/vba/vbadocument.hxx2
-rw-r--r--sw/source/ui/vba/vbapagesetup.cxx2
-rw-r--r--sw/source/ui/vba/vbapagesetup.hxx2
-rw-r--r--sw/source/ui/vba/vbaselection.cxx4
-rw-r--r--sw/source/ui/vba/vbaselection.hxx4
-rw-r--r--sw/source/ui/vba/vbatablehelper.cxx2
-rw-r--r--sw/source/ui/vba/vbatablehelper.hxx2
19 files changed, 43 insertions, 43 deletions
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index e4d6792d6c7f..1f982922f85e 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -565,7 +565,7 @@ IMPL_LINK(SwAddressListDialog, TableSelectHdl_Impl, weld::Button&, rButton, void
TableSelectHdl(&rButton);
}
-void SwAddressListDialog::TableSelectHdl(weld::Button* pButton)
+void SwAddressListDialog::TableSelectHdl(const weld::Button* pButton)
{
weld::WaitObject aWait(m_xDialog.get());
@@ -588,7 +588,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, OKHdl_Impl, weld::Button&, void)
m_xDialog->response(RET_OK);
}
-uno::Reference< XDataSource> SwAddressListDialog::GetSource()
+uno::Reference< XDataSource> SwAddressListDialog::GetSource() const
{
uno::Reference< XDataSource> xRet;
int nSelect = m_xListLB->get_selected_index();
@@ -601,7 +601,7 @@ uno::Reference< XDataSource> SwAddressListDialog::GetSource()
}
-SharedConnection SwAddressListDialog::GetConnection()
+SharedConnection SwAddressListDialog::GetConnection() const
{
SharedConnection xRet;
int nSelect = m_xListLB->get_selected_index();
@@ -613,7 +613,7 @@ SharedConnection SwAddressListDialog::GetConnection()
return xRet;
}
-uno::Reference< XColumnsSupplier> SwAddressListDialog::GetColumnsSupplier()
+uno::Reference< XColumnsSupplier> SwAddressListDialog::GetColumnsSupplier() const
{
uno::Reference< XColumnsSupplier> xRet;
int nSelect = m_xListLB->get_selected_index();
@@ -625,7 +625,7 @@ uno::Reference< XColumnsSupplier> SwAddressListDialog::GetColumnsSupplier()
return xRet;
}
-OUString SwAddressListDialog::GetFilter()
+OUString SwAddressListDialog::GetFilter() const
{
int nSelect = m_xListLB->get_selected_index();
if (nSelect != -1)
diff --git a/sw/source/ui/dbui/addresslistdialog.hxx b/sw/source/ui/dbui/addresslistdialog.hxx
index bf2d04121941..e3662fdf9da2 100644
--- a/sw/source/ui/dbui/addresslistdialog.hxx
+++ b/sw/source/ui/dbui/addresslistdialog.hxx
@@ -76,7 +76,7 @@ class SwAddressListDialog : public SfxDialogController
DECL_LINK(ListBoxSelectHdl_Impl, weld::TreeView&, void);
DECL_LINK(EditHdl_Impl, weld::Button&, void);
DECL_LINK(TableSelectHdl_Impl, weld::Button&, void);
- void TableSelectHdl(weld::Button* pButton);
+ void TableSelectHdl(const weld::Button* pButton);
DECL_LINK(OKHdl_Impl, weld::Button&, void);
DECL_LINK(StaticListBoxSelectHdl_Impl, void*, void);
@@ -86,15 +86,15 @@ public:
virtual ~SwAddressListDialog() override;
css::uno::Reference< css::sdbc::XDataSource>
- GetSource();
+ GetSource() const;
- SharedConnection GetConnection();
+ SharedConnection GetConnection() const;
css::uno::Reference< css::sdbcx::XColumnsSupplier>
- GetColumnsSupplier();
+ GetColumnsSupplier() const;
const SwDBData& GetDBData() const {return m_aDBData;}
- OUString GetFilter();
+ OUString GetFilter() const;
};
#endif
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 7ded7e7b9fc9..f7836e88b1d8 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -259,7 +259,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, HideParagraphsHdl_Impl, weld::ToggleButto
rConfigItem.SetHideEmptyParagraphs(rBox.get_active());
}
-void SwMailMergeAddressBlockPage::InsertDataHdl(weld::Button* pButton)
+void SwMailMergeAddressBlockPage::InsertDataHdl(const weld::Button* pButton)
{
//if no pButton is given, the first set has to be pre-set
SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem();
@@ -601,7 +601,7 @@ IMPL_LINK(SwCustomizeAddressBlockDialog, ImageButtonHdl_Impl, weld::Button&, rBu
UpdateImageButtons_Impl();
}
-sal_Int32 SwCustomizeAddressBlockDialog::GetSelectedItem_Impl()
+sal_Int32 SwCustomizeAddressBlockDialog::GetSelectedItem_Impl() const
{
sal_Int32 nRet = USER_DATA_NONE;
const OUString sSelected = m_xDragED->GetCurrentItem();
@@ -738,7 +738,7 @@ void SwCustomizeAddressBlockDialog::SetAddress(const OUString& rAddress)
EditModifyHdl_Impl(*m_xDragED);
}
-OUString SwCustomizeAddressBlockDialog::GetAddress()
+OUString SwCustomizeAddressBlockDialog::GetAddress() const
{
OUString sAddress(m_xDragED->GetAddress());
//remove placeholders by the actual content
@@ -1296,7 +1296,7 @@ void AddressMultiLineEdit::MoveCurrentItem(MoveItemFlags nMove)
m_aModifyLink.Call(*this);
}
-MoveItemFlags AddressMultiLineEdit::IsCurrentItemMoveable()
+MoveItemFlags AddressMultiLineEdit::IsCurrentItemMoveable() const
{
MoveItemFlags nRet = MoveItemFlags::NONE;
ESelection aSelection = m_xEditView->GetSelection();
@@ -1319,7 +1319,7 @@ MoveItemFlags AddressMultiLineEdit::IsCurrentItemMoveable()
return nRet;
}
-bool AddressMultiLineEdit::HasCurrentItem()
+bool AddressMultiLineEdit::HasCurrentItem() const
{
ESelection aSelection = m_xEditView->GetSelection();
@@ -1332,7 +1332,7 @@ bool AddressMultiLineEdit::HasCurrentItem()
&& pBeginAttrib->nEnd >= aSelection.nEndPos));
}
-OUString AddressMultiLineEdit::GetCurrentItem()
+OUString AddressMultiLineEdit::GetCurrentItem() const
{
ESelection aSelection = m_xEditView->GetSelection();
@@ -1370,7 +1370,7 @@ void AddressMultiLineEdit::SelectCurrentItem()
}
}
-OUString AddressMultiLineEdit::GetAddress()
+OUString AddressMultiLineEdit::GetAddress() const
{
OUString sRet;
const sal_uInt32 nParaCount = m_xEditEngine->GetParagraphCount();
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index f48c3e117846..27c99b0aedc7 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -65,7 +65,7 @@ class SwMailMergeAddressBlockPage : public vcl::OWizardPage
std::unique_ptr<weld::CustomWeld> m_xSettingsWIN;
std::unique_ptr<weld::CustomWeld> m_xPreviewWIN;
- void InsertDataHdl(weld::Button* pButton);
+ void InsertDataHdl(const weld::Button* pButton);
DECL_LINK(AddressListHdl_Impl, weld::Button&, void);
DECL_LINK(SettingsHdl_Impl, weld::Button&, void);
@@ -162,16 +162,16 @@ public:
void SetText( const OUString& rStr );
OUString GetText() const;
- OUString GetAddress();
+ OUString GetAddress() const;
void InsertNewEntry( const OUString& rStr );
void InsertNewEntryAtPosition( const OUString& rStr, sal_uLong nPara, sal_uInt16 nIndex );
void RemoveCurrentEntry();
void MoveCurrentItem(MoveItemFlags nMove);
- MoveItemFlags IsCurrentItemMoveable();
- bool HasCurrentItem();
- OUString GetCurrentItem();
+ MoveItemFlags IsCurrentItemMoveable() const;
+ bool HasCurrentItem() const;
+ OUString GetCurrentItem() const;
void SelectCurrentItem();
};
@@ -227,7 +227,7 @@ private:
DECL_LINK(TextFilterHdl, OUString&, bool);
DECL_LINK(SelectionChangedIdleHdl, Timer*, void);
- sal_Int32 GetSelectedItem_Impl();
+ sal_Int32 GetSelectedItem_Impl() const;
void UpdateImageButtons_Impl();
public:
@@ -242,7 +242,7 @@ public:
bool HasItem(sal_Int32 nUserData);
void SetAddress(const OUString& rAddress);
- OUString GetAddress();
+ OUString GetAddress() const;
};
class SwAssignFieldsControl;
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index c5230e195a8a..ef96c5b31029 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -208,10 +208,10 @@ public:
{
}
- OUString GetCC() {return m_xCCED->get_text();}
+ OUString GetCC() const {return m_xCCED->get_text();}
void SetCC(const OUString& rSet) {m_xCCED->set_text(rSet);}
- OUString GetBCC() {return m_xBCCED->get_text();}
+ OUString GetBCC() const {return m_xBCCED->get_text();}
void SetBCC(const OUString& rSet) {m_xBCCED->set_text(rSet);}
};
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index d0f91f6922c2..49f398fc5777 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -181,7 +181,7 @@ public:
void SetFilter(OUString const& rFilter);
void SetSubRegion(OUString const& rSubRegion);
- bool IsContent() { return m_bContent; }
+ bool IsContent() const { return m_bContent; }
void SetContent(bool const bValue) { m_bContent = bValue; }
void SetSelected() { m_bSelected = true; }
@@ -449,7 +449,7 @@ bool SwEditRegionDlg::CheckPasswd(weld::ToggleButton* pBox)
}
// recursively look for child-sections
-void SwEditRegionDlg::RecurseList(const SwSectionFormat* pFormat, weld::TreeIter* pEntry)
+void SwEditRegionDlg::RecurseList(const SwSectionFormat* pFormat, const weld::TreeIter* pEntry)
{
std::unique_ptr<weld::TreeIter> xIter(m_xTree->make_iterator());
if (!pFormat)
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 823431d6f888..4320d71aa4f8 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -67,7 +67,7 @@ public:
SwSequenceOptionDialog(weld::Window *pParent, SwView &rV, const OUString& rSeqFieldType);
void Apply();
- bool IsApplyBorderAndShadow() { return m_xApplyBorderAndShadowCB->get_active(); }
+ bool IsApplyBorderAndShadow() const { return m_xApplyBorderAndShadowCB->get_active(); }
void SetApplyBorderAndShadow( bool bSet ) { m_xApplyBorderAndShadowCB->set_active(bSet); }
//#i61007# order of captions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 9c27c10d27d4..c1868985ee9c 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -1646,7 +1646,7 @@ sal_Int32 SwFramePage::GetMapPos(const FrameMap *pMap, const weld::ComboBox& rAl
return nMapPos;
}
-RndStdIds SwFramePage::GetAnchor()
+RndStdIds SwFramePage::GetAnchor() const
{
RndStdIds nRet = RndStdIds::FLY_AT_PAGE;
if (m_xAnchorAtParaRB->get_active())
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index e690d8b10bcd..8fcd297ec225 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -469,7 +469,7 @@ void BookmarkTable::SelectByName(const OUString& sName)
select(*xEntry);
}
-OUString BookmarkTable::GetNameProposal()
+OUString BookmarkTable::GetNameProposal() const
{
OUString sDefaultBookmarkName = SwResId(STR_BOOKMARK_DEF_NAME);
sal_Int32 nHighestBookmarkId = 0;
diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx
index 255209ffa1c5..ed0a28863f3d 100644
--- a/sw/source/ui/vba/vbaapplication.cxx
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -184,7 +184,7 @@ SwVbaApplication::getActiveSwVbaWindow()
}
uno::Reference< css::uno::XComponentContext > const &
-SwVbaApplication::getContext()
+SwVbaApplication::getContext() const
{
return mxContext;
}
diff --git a/sw/source/ui/vba/vbaapplication.hxx b/sw/source/ui/vba/vbaapplication.hxx
index 62fd3dfaf75e..77c58e5d86d7 100644
--- a/sw/source/ui/vba/vbaapplication.hxx
+++ b/sw/source/ui/vba/vbaapplication.hxx
@@ -56,7 +56,7 @@ public:
void RemoveSink( sal_uInt32 nNumber );
SwVbaWindow* getActiveSwVbaWindow();
- css::uno::Reference< css::uno::XComponentContext > const & getContext();
+ css::uno::Reference< css::uno::XComponentContext > const & getContext() const;
// XApplication
virtual OUString SAL_CALL getName() override;
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index bf5610ca3df5..c8179770f0fc 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -603,7 +603,7 @@ SwVbaDocument::hasProperty( const OUString& aName )
}
uno::Reference< container::XNameAccess >
-SwVbaDocument::getFormControls()
+SwVbaDocument::getFormControls() const
{
uno::Reference< container::XNameAccess > xFormControls;
try
diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx
index 2bc6dbb0ffc0..e8f7a311ae3f 100644
--- a/sw/source/ui/vba/vbadocument.hxx
+++ b/sw/source/ui/vba/vbadocument.hxx
@@ -39,7 +39,7 @@ private:
void Initialize();
css::uno::Any getControlShape( const OUString& sName );
- css::uno::Reference< css::container::XNameAccess > getFormControls();
+ css::uno::Reference< css::container::XNameAccess > getFormControls() const;
public:
SwVbaDocument( const css::uno::Reference< ooo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& m_xContext, css::uno::Reference< css::frame::XModel > const & xModel );
diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx
index da6ab3e3ec24..98af6a494903 100644
--- a/sw/source/ui/vba/vbapagesetup.cxx
+++ b/sw/source/ui/vba/vbapagesetup.cxx
@@ -201,7 +201,7 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status
xFirstPageProps->setPropertyValue("RightMargin", uno::makeAny( nRightMargin ) );
}
-OUString SwVbaPageSetup::getStyleOfFirstPage()
+OUString SwVbaPageSetup::getStyleOfFirstPage() const
{
OUString styleFirstPage;
uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( mxModel ), uno::UNO_QUERY_THROW );
diff --git a/sw/source/ui/vba/vbapagesetup.hxx b/sw/source/ui/vba/vbapagesetup.hxx
index 2cdd5caca960..b6b9c0155115 100644
--- a/sw/source/ui/vba/vbapagesetup.hxx
+++ b/sw/source/ui/vba/vbapagesetup.hxx
@@ -32,7 +32,7 @@ class SwVbaPageSetup : public SwVbaPageSetup_BASE
{
private:
/// @throws css::uno::RuntimeException
- OUString getStyleOfFirstPage();
+ OUString getStyleOfFirstPage() const;
public:
/// @throws css::uno::RuntimeException
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index ab608dc4bb69..5d7d3395331c 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -942,7 +942,7 @@ uno::Any SAL_CALL SwVbaSelection::Columns( const uno::Any& index )
return uno::makeAny( xCol );
}
-uno::Reference< text::XTextTable > SwVbaSelection::GetXTextTable()
+uno::Reference< text::XTextTable > SwVbaSelection::GetXTextTable() const
{
uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW );
uno::Reference< text::XTextTable > xTextTable;
@@ -950,7 +950,7 @@ uno::Reference< text::XTextTable > SwVbaSelection::GetXTextTable()
return xTextTable;
}
-bool SwVbaSelection::IsInTable()
+bool SwVbaSelection::IsInTable() const
{
uno::Reference< text::XTextTable > xTextTable = GetXTextTable();
return xTextTable.is();
diff --git a/sw/source/ui/vba/vbaselection.hxx b/sw/source/ui/vba/vbaselection.hxx
index 7c86753d9340..322804fe0fd5 100644
--- a/sw/source/ui/vba/vbaselection.hxx
+++ b/sw/source/ui/vba/vbaselection.hxx
@@ -50,9 +50,9 @@ private:
/// @throws css::uno::RuntimeException
void GetSelectedCellRange( OUString& sTLName, OUString& sBRName );
/// @throws css::uno::RuntimeException
- css::uno::Reference< css::text::XTextTable > GetXTextTable();
+ css::uno::Reference< css::text::XTextTable > GetXTextTable() const;
/// @throws css::uno::RuntimeException
- bool IsInTable();
+ bool IsInTable() const;
/// @throws css::uno::RuntimeException
bool HasSelection();
diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx
index b003ca81517e..50c3493a5973 100644
--- a/sw/source/ui/vba/vbatablehelper.cxx
+++ b/sw/source/ui/vba/vbatablehelper.cxx
@@ -116,7 +116,7 @@ OUString SwVbaTableHelper::getColumnStr( sal_Int32 nCol )
return sRet;
}
-sal_Int32 SwVbaTableHelper::getTableWidth( )
+sal_Int32 SwVbaTableHelper::getTableWidth( ) const
{
sal_Int32 nWidth = 0;
bool isWidthRelatvie = false;
diff --git a/sw/source/ui/vba/vbatablehelper.hxx b/sw/source/ui/vba/vbatablehelper.hxx
index 078673d5e6e8..2b6fedbeb89b 100644
--- a/sw/source/ui/vba/vbatablehelper.hxx
+++ b/sw/source/ui/vba/vbatablehelper.hxx
@@ -50,7 +50,7 @@ public:
/// @throws css::uno::RuntimeException
sal_Int32 getTabColIndex( const OUString& sCellName );
/// @throws css::uno::RuntimeException
- sal_Int32 getTableWidth( );
+ sal_Int32 getTableWidth( ) const;
/// @throws css::uno::RuntimeException
sal_Int32 GetColWidth( sal_Int32 nCol, sal_Int32 nRow = 0 );