summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-27 13:51:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-27 15:57:17 +0200
commitdf905f41a33d0d7d2cde7fad80c5b3dc3c837c10 (patch)
tree374d73a95196ada089e34dafea9d69746a520a28 /sfx2
parentad4c7b97752b4da73808402604d6f96b39d920f5 (diff)
loplugin:constmethod in sfx2
Change-Id: Ic129a8e136dc3f3b0a36fdb83e7aa71027ada59a Reviewed-on: https://gerrit.libreoffice.org/78190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/SfxRedactionHelper.hxx19
-rw-r--r--sfx2/inc/autoredactdialog.hxx2
-rw-r--r--sfx2/source/appl/app.cxx2
-rw-r--r--sfx2/source/appl/appuno.cxx6
-rw-r--r--sfx2/source/appl/childwin.cxx4
-rw-r--r--sfx2/source/appl/opengrf.cxx2
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx4
-rw-r--r--sfx2/source/appl/workwin.cxx4
-rw-r--r--sfx2/source/control/emojicontrol.cxx2
-rw-r--r--sfx2/source/dialog/checkin.cxx4
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx4
-rw-r--r--sfx2/source/dialog/tabdlg.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx4
-rw-r--r--sfx2/source/doc/SfxRedactionHelper.cxx18
-rw-r--r--sfx2/source/doc/autoredactdialog.cxx4
-rw-r--r--sfx2/source/doc/docfile.cxx12
-rw-r--r--sfx2/source/doc/doctempl.cxx2
-rw-r--r--sfx2/source/doc/doctemplateslocal.cxx2
-rw-r--r--sfx2/source/doc/doctemplateslocal.hxx2
-rw-r--r--sfx2/source/doc/guisaveas.cxx4
-rw-r--r--sfx2/source/doc/objcont.cxx4
-rw-r--r--sfx2/source/doc/objmisc.cxx10
-rw-r--r--sfx2/source/doc/objserv.cxx6
-rw-r--r--sfx2/source/doc/objxtor.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx2
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
-rw-r--r--sfx2/source/inc/fltoptint.hxx2
-rw-r--r--sfx2/source/inc/workwin.hxx4
-rw-r--r--sfx2/source/notebookbar/SfxNotebookBar.cxx2
-rw-r--r--sfx2/source/view/classificationcontroller.cxx6
-rw-r--r--sfx2/source/view/classificationhelper.cxx8
-rw-r--r--sfx2/source/view/ipclient.cxx2
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx4
-rw-r--r--sfx2/source/view/viewsh.cxx6
34 files changed, 82 insertions, 81 deletions
diff --git a/sfx2/inc/SfxRedactionHelper.hxx b/sfx2/inc/SfxRedactionHelper.hxx
index 737357505e5d..65835d75f8eb 100644
--- a/sfx2/inc/SfxRedactionHelper.hxx
+++ b/sfx2/inc/SfxRedactionHelper.hxx
@@ -73,7 +73,7 @@ public:
* and inserts the shapes into the newly created draw pages.
* */
static void
- addPagesToDraw(uno::Reference<XComponent>& xComponent, sal_Int32 nPages,
+ addPagesToDraw(const uno::Reference<XComponent>& xComponent, sal_Int32 nPages,
const std::vector<GDIMetaFile>& aMetaFiles,
const std::vector<::Size>& aPageSizes, const PageMargins& aPageMargins,
const std::vector<std::pair<RedactionTarget*, OUString>>& r_aTableTargets,
@@ -83,29 +83,30 @@ public:
* Meant to be called after converting a document to a Draw doc
* for redaction purposes.
* */
- static void showRedactionToolbar(SfxViewFrame* pViewFrame);
+ static void showRedactionToolbar(const SfxViewFrame* pViewFrame);
/*
* Used to get the page margins from the original/source Writer document. Then we apply these values to the
* pages inserted into Draw for redaction.
* */
- static PageMargins getPageMarginsForWriter(css::uno::Reference<css::frame::XModel>& xModel);
+ static PageMargins
+ getPageMarginsForWriter(const css::uno::Reference<css::frame::XModel>& xModel);
/*
* Used to get the page margins from the original/source Calc document. Then we apply these values to the
* pages inserted into Draw for redaction.
* */
- static PageMargins getPageMarginsForCalc(css::uno::Reference<css::frame::XModel>& xModel);
+ static PageMargins getPageMarginsForCalc(const css::uno::Reference<css::frame::XModel>& xModel);
static void searchInMetaFile(const RedactionTarget* pRedactionTarget, const GDIMetaFile& rMtf,
std::vector<tools::Rectangle>& aRedactionRectangles,
- uno::Reference<XComponent>& xComponent);
+ const uno::Reference<XComponent>& xComponent);
/*
* Draws a redaction rectangle on the draw page referenced with its page number (0-based)
* */
- static void addRedactionRectToPage(uno::Reference<XComponent>& xComponent,
- uno::Reference<drawing::XDrawPage>& xPage,
+ static void addRedactionRectToPage(const uno::Reference<XComponent>& xComponent,
+ const uno::Reference<drawing::XDrawPage>& xPage,
const std::vector<tools::Rectangle>& aNewRectangles);
/*
@@ -114,8 +115,8 @@ public:
* */
static void autoRedactPage(const RedactionTarget* pRedactionTarget,
const GDIMetaFile& rGDIMetaFile,
- uno::Reference<drawing::XDrawPage>& xPage,
- uno::Reference<XComponent>& xComponent);
+ const uno::Reference<drawing::XDrawPage>& xPage,
+ const uno::Reference<XComponent>& xComponent);
/// Fill the search options based on the given redaction target
static void fillSearchOptions(i18nutil::SearchOptions2& rSearchOpt,
diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx
index f7cdecc15cce..6b9f6e2e783e 100644
--- a/sfx2/inc/autoredactdialog.hxx
+++ b/sfx2/inc/autoredactdialog.hxx
@@ -70,7 +70,7 @@ public:
void InsertTarget(RedactionTarget* pTarget);
void SelectByName(const OUString& sName);
RedactionTarget* GetTargetByName(const OUString& sName);
- OUString GetNameProposal();
+ OUString GetNameProposal() const;
void unselect_all() { m_xControl->unselect_all(); }
bool has_focus() const { return m_xControl->has_focus(); }
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 53d2aae37da0..9f05c9bf227b 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -520,7 +520,7 @@ SfxApplication::ChooseScript(weld::Window *pParent)
return aScriptURL;
}
-void SfxApplication::MacroOrganizer(weld::Window* pParent, sal_Int16 nTabId)
+void SfxApplication::MacroOrganizer(const weld::Window* pParent, sal_Int16 nTabId)
{
#if !HAVE_FEATURE_SCRIPTING
(void) pParent;
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 2954eb45a522..649c18952701 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1667,7 +1667,7 @@ class RequestPackageReparation_Impl : public ::cppu::WeakImplHelper< task::XInte
public:
explicit RequestPackageReparation_Impl( const OUString& aName );
- bool isApproved();
+ bool isApproved() const;
virtual uno::Any SAL_CALL getRequest() override;
virtual uno::Sequence< uno::Reference< task::XInteractionContinuation > > SAL_CALL getContinuations() override;
};
@@ -1681,7 +1681,7 @@ RequestPackageReparation_Impl::RequestPackageReparation_Impl( const OUString& aN
m_xDisapprove = new comphelper::OInteractionDisapprove;
}
-bool RequestPackageReparation_Impl::isApproved()
+bool RequestPackageReparation_Impl::isApproved() const
{
return m_xApprove->wasSelected();
}
@@ -1706,7 +1706,7 @@ RequestPackageReparation::~RequestPackageReparation()
{
}
-bool RequestPackageReparation::isApproved()
+bool RequestPackageReparation::isApproved() const
{
return mxImpl->isApproved();
}
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 62838f4ae240..a7013fa6c530 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -366,7 +366,7 @@ SfxChildWinInfo SfxChildWindow::GetInfo() const
return aInfo;
}
-sal_uInt16 SfxChildWindow::GetPosition()
+sal_uInt16 SfxChildWindow::GetPosition() const
{
return pImpl->pFact->nPos;
}
@@ -696,7 +696,7 @@ bool SfxChildWindow::QueryClose()
return bAllow;
}
-const css::uno::Reference< css::frame::XFrame >& SfxChildWindow::GetFrame()
+const css::uno::Reference< css::frame::XFrame >& SfxChildWindow::GetFrame() const
{
return pImpl->xFrame;
}
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index 1469b0b3fc97..00a31a4f3ca9 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -285,7 +285,7 @@ void SvxOpenGraphicDialog::SetDetectedFilter(const OUString& rStr)
mpImpl->sDetectedFilter = rStr;
}
-Reference<ui::dialogs::XFilePickerControlAccess> const & SvxOpenGraphicDialog::GetFilePickerControlAccess()
+Reference<ui::dialogs::XFilePickerControlAccess> const & SvxOpenGraphicDialog::GetFilePickerControlAccess() const
{
return mpImpl->xCtrlAcc;
}
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 769a53281ee0..8e8e210a2cf6 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -76,14 +76,14 @@ class SfxPickListImpl : public SfxListener
certain requirements, e.g. being writable. Check implementation for requirement
details.
*/
- static void AddDocumentToPickList( SfxObjectShell* pDocShell );
+ static void AddDocumentToPickList( const SfxObjectShell* pDocShell );
public:
SfxPickListImpl(SfxApplication& rApp);
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
};
-void SfxPickListImpl::AddDocumentToPickList( SfxObjectShell* pDocSh )
+void SfxPickListImpl::AddDocumentToPickList( const SfxObjectShell* pDocSh )
{
if (pDocSh->IsAvoidRecentDocs() || comphelper::LibreOfficeKit::isActive())
return;
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 0cb1deb7e945..4210098ff231 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1492,7 +1492,7 @@ void SfxWorkWindow::MakeVisible_Impl( bool bVis )
nUpdateMode = nOrigMode;
}
-bool SfxWorkWindow::IsVisible_Impl()
+bool SfxWorkWindow::IsVisible_Impl() const
{
return nOrigMode != SfxVisibilityFlags::Invisible;
}
@@ -2103,7 +2103,7 @@ void SfxWorkWindow::ResetChildWindows_Impl()
// returns the size of the area (client area) of the
// parent windows, in which the ChildWindow can be fitted.
-tools::Rectangle SfxWorkWindow::GetTopRect_Impl()
+tools::Rectangle SfxWorkWindow::GetTopRect_Impl() const
{
return pMasterFrame->GetTopOuterRectPixel_Impl();
}
diff --git a/sfx2/source/control/emojicontrol.cxx b/sfx2/source/control/emojicontrol.cxx
index 775ee77b3a75..4ed5f48029e8 100644
--- a/sfx2/source/control/emojicontrol.cxx
+++ b/sfx2/source/control/emojicontrol.cxx
@@ -128,7 +128,7 @@ void SfxEmojiControl::ConvertLabelToUnicode(sal_uInt16 nPageId)
mpTabControl->SetPageText(nPageId, sHexText.toString());
}
-FILTER_CATEGORY SfxEmojiControl::getCurrentFilter()
+FILTER_CATEGORY SfxEmojiControl::getCurrentFilter() const
{
const sal_uInt16 nCurPageId = mpTabControl->GetCurPageId();
diff --git a/sfx2/source/dialog/checkin.cxx b/sfx2/source/dialog/checkin.cxx
index b4834eca5535..cd464d751525 100644
--- a/sfx2/source/dialog/checkin.cxx
+++ b/sfx2/source/dialog/checkin.cxx
@@ -22,12 +22,12 @@ SfxCheckinDialog::~SfxCheckinDialog()
{
}
-OUString SfxCheckinDialog::GetComment( )
+OUString SfxCheckinDialog::GetComment( ) const
{
return m_xCommentED->get_text();
}
-bool SfxCheckinDialog::IsMajor( )
+bool SfxCheckinDialog::IsMajor( ) const
{
return m_xMajorCB->get_active();
}
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 01d7b4228936..86d39b6cf4cf 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1338,7 +1338,7 @@ CustomPropertiesWindow::~CustomPropertiesWindow()
m_pCurrentLine = nullptr;
}
-void CustomPropertyLine::DoTypeHdl(weld::ComboBox& rBox)
+void CustomPropertyLine::DoTypeHdl(const weld::ComboBox& rBox)
{
auto nType = rBox.get_active_id().toInt32();
m_xValueEdit->set_visible( (CUSTOM_TYPE_TEXT == nType) || (CUSTOM_TYPE_NUMBER == nType) );
@@ -1355,7 +1355,7 @@ IMPL_LINK(CustomPropertyLine, TypeHdl, weld::ComboBox&, rBox, void)
DoTypeHdl(rBox);
}
-void CustomPropertiesWindow::Remove(CustomPropertyLine* pLine)
+void CustomPropertiesWindow::Remove(const CustomPropertyLine* pLine)
{
StoreCustomProperties();
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index c341b751c84e..7b6ef90e80bb 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -131,7 +131,7 @@ void SfxTabPage::SetFrame(const css::uno::Reference< css::frame::XFrame >& xFram
pImpl->mxFrame = xFrame;
}
-css::uno::Reference< css::frame::XFrame > SfxTabPage::GetFrame()
+css::uno::Reference< css::frame::XFrame > SfxTabPage::GetFrame() const
{
if (pImpl)
return pImpl->mxFrame;
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index cf2de5311f0e..c8bafb10317f 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -521,8 +521,8 @@ public:
StyleTree_Impl(const OUString &rName, const OUString &rParent):
aName(rName), aParent(rParent), pChildren(0) {}
- const OUString& getName() { return aName; }
- const OUString& getParent() { return aParent; }
+ const OUString& getName() const { return aName; }
+ const OUString& getParent() const { return aParent; }
StyleTreeArr_Impl& getChildren() { return pChildren; }
};
diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx b/sfx2/source/doc/SfxRedactionHelper.cxx
index a5182f25593f..cdbc91f450af 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -113,7 +113,7 @@ void fixMetaFile(GDIMetaFile& tmpMtf)
/*
* Sets page margins for a Draw page. Negative values are considered erroneous
* */
-void setPageMargins(uno::Reference<beans::XPropertySet>& xPageProperySet,
+void setPageMargins(const uno::Reference<beans::XPropertySet>& xPageProperySet,
const PageMargins& aPageMargins)
{
if (aPageMargins.nTop < 0 || aPageMargins.nBottom < 0 || aPageMargins.nLeft < 0
@@ -218,7 +218,7 @@ void SfxRedactionHelper::getPageMetaFilesFromDoc(std::vector<GDIMetaFile>& aMeta
}
void SfxRedactionHelper::addPagesToDraw(
- uno::Reference<XComponent>& xComponent, sal_Int32 nPages,
+ const uno::Reference<XComponent>& xComponent, sal_Int32 nPages,
const std::vector<GDIMetaFile>& aMetaFiles, const std::vector<::Size>& aPageSizes,
const PageMargins& aPageMargins,
const std::vector<std::pair<RedactionTarget*, OUString>>& r_aTableTargets, bool bIsAutoRedact)
@@ -275,7 +275,7 @@ void SfxRedactionHelper::addPagesToDraw(
xDrawPages->remove(xPage);
}
-void SfxRedactionHelper::showRedactionToolbar(SfxViewFrame* pViewFrame)
+void SfxRedactionHelper::showRedactionToolbar(const SfxViewFrame* pViewFrame)
{
if (!pViewFrame)
return;
@@ -305,7 +305,7 @@ void SfxRedactionHelper::showRedactionToolbar(SfxViewFrame* pViewFrame)
}
PageMargins
-SfxRedactionHelper::getPageMarginsForWriter(css::uno::Reference<css::frame::XModel>& xModel)
+SfxRedactionHelper::getPageMarginsForWriter(const css::uno::Reference<css::frame::XModel>& xModel)
{
PageMargins aPageMargins = { -1, -1, -1, -1 };
@@ -362,7 +362,7 @@ SfxRedactionHelper::getPageMarginsForWriter(css::uno::Reference<css::frame::XMod
}
PageMargins
-SfxRedactionHelper::getPageMarginsForCalc(css::uno::Reference<css::frame::XModel>& xModel)
+SfxRedactionHelper::getPageMarginsForCalc(const css::uno::Reference<css::frame::XModel>& xModel)
{
PageMargins aPageMargins = { -1, -1, -1, -1 };
OUString sPageStyleName("Default");
@@ -421,7 +421,7 @@ SfxRedactionHelper::getPageMarginsForCalc(css::uno::Reference<css::frame::XModel
void SfxRedactionHelper::searchInMetaFile(const RedactionTarget* pRedactionTarget,
const GDIMetaFile& rMtf,
std::vector<::tools::Rectangle>& aRedactionRectangles,
- uno::Reference<XComponent>& xComponent)
+ const uno::Reference<XComponent>& xComponent)
{
// Initialize search
i18nutil::SearchOptions2 aSearchOptions;
@@ -468,7 +468,7 @@ void SfxRedactionHelper::searchInMetaFile(const RedactionTarget* pRedactionTarge
}
void SfxRedactionHelper::addRedactionRectToPage(
- uno::Reference<XComponent>& xComponent, uno::Reference<drawing::XDrawPage>& xPage,
+ const uno::Reference<XComponent>& xComponent, const uno::Reference<drawing::XDrawPage>& xPage,
const std::vector<::tools::Rectangle>& aNewRectangles)
{
if (!xComponent.is() || !xPage.is())
@@ -502,8 +502,8 @@ void SfxRedactionHelper::addRedactionRectToPage(
void SfxRedactionHelper::autoRedactPage(const RedactionTarget* pRedactionTarget,
const GDIMetaFile& rGDIMetaFile,
- uno::Reference<drawing::XDrawPage>& xPage,
- uno::Reference<XComponent>& xComponent)
+ const uno::Reference<drawing::XDrawPage>& xPage,
+ const uno::Reference<XComponent>& xComponent)
{
if (pRedactionTarget == nullptr || pRedactionTarget->sContent.isEmpty())
return;
diff --git a/sfx2/source/doc/autoredactdialog.cxx b/sfx2/source/doc/autoredactdialog.cxx
index a3bbb8ddda2c..dfb90caa73a0 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -167,7 +167,7 @@ RedactionTarget* TargetsTable::GetTargetByName(const OUString& sName)
return reinterpret_cast<RedactionTarget*>(m_xControl->get_id(nEntry).toInt64());
}
-OUString TargetsTable::GetNameProposal()
+OUString TargetsTable::GetNameProposal() const
{
OUString sDefaultTargetName(SfxResId(STR_REDACTION_TARGET));
sal_Int32 nHighestTargetId = 0;
@@ -374,7 +374,7 @@ IMPL_LINK_NOARG(SfxAutoRedactDialog, DeleteHdl, weld::Button&, void)
namespace
{
-boost::property_tree::ptree redactionTargetToJSON(RedactionTarget* pTarget)
+boost::property_tree::ptree redactionTargetToJSON(const RedactionTarget* pTarget)
{
boost::property_tree::ptree aNode;
aNode.put("sName", pTarget->sName.toUtf8().getStr());
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 129f256cfbe1..cd88780180f0 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -333,7 +333,7 @@ public:
SfxMedium_Impl(const SfxMedium_Impl&) = delete;
SfxMedium_Impl& operator=(const SfxMedium_Impl&) = delete;
- OUString getFilterMimeType()
+ OUString getFilterMimeType() const
{ return !m_pFilter ? OUString() : m_pFilter->GetMimeType(); }
};
@@ -388,7 +388,7 @@ void SfxMedium::ResetError()
pImpl->m_pOutStream->ResetError();
}
-ErrCode const & SfxMedium::GetLastStorageCreationState()
+ErrCode const & SfxMedium::GetLastStorageCreationState() const
{
return pImpl->nLastStorageError;
}
@@ -553,7 +553,7 @@ OUString SfxMedium::GetBaseURL( bool bForSaving )
return aBaseURL;
}
-bool SfxMedium::IsSkipImages()
+bool SfxMedium::IsSkipImages() const
{
const SfxStringItem* pSkipImagesItem = GetItemSet()->GetItem<SfxStringItem>(SID_FILE_FILTEROPTIONS);
return pSkipImagesItem && pSkipImagesItem->GetValue() == "SkipImages";
@@ -784,7 +784,7 @@ bool SfxMedium::IsStorage()
}
-bool SfxMedium::IsPreview_Impl()
+bool SfxMedium::IsPreview_Impl() const
{
bool bPreview = false;
const SfxBoolItem* pPreview = SfxItemSet::GetItem<SfxBoolItem>(GetItemSet(), SID_PREVIEW, false);
@@ -4066,7 +4066,7 @@ bool SfxMedium::SignContents_Impl(weld::Window* pDialogParent,
}
-SignatureState SfxMedium::GetCachedSignatureState_Impl()
+SignatureState SfxMedium::GetCachedSignatureState_Impl() const
{
return pImpl->m_nSignatureState;
}
@@ -4292,7 +4292,7 @@ void SfxMedium::SetInCheckIn( bool bInCheckIn )
pImpl->m_bInCheckIn = bInCheckIn;
}
-bool SfxMedium::IsInCheckIn( )
+bool SfxMedium::IsInCheckIn( ) const
{
return pImpl->m_bInCheckIn;
}
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 7f2e71dd45d2..167caae41043 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -226,7 +226,7 @@ public:
bool InsertRegion( std::unique_ptr<RegionData_Impl> pData, size_t nPos );
const OUString& GetRootURL() const { return maRootURL; }
- const uno::Reference< XDocumentTemplates >& getDocTemplates() { return mxTemplates; }
+ const uno::Reference< XDocumentTemplates >& getDocTemplates() const { return mxTemplates; }
};
diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx
index 197047de7af6..9f03ab68d21a 100644
--- a/sfx2/source/doc/doctemplateslocal.cxx
+++ b/sfx2/source/doc/doctemplateslocal.cxx
@@ -122,7 +122,7 @@ DocTemplLocaleHelper::~DocTemplLocaleHelper()
}
-std::vector< beans::StringPair > const & DocTemplLocaleHelper::GetParsingResult()
+std::vector< beans::StringPair > const & DocTemplLocaleHelper::GetParsingResult() const
{
if ( !m_aElementsSeq.empty() )
throw uno::RuntimeException(); // the parsing has still not finished!
diff --git a/sfx2/source/doc/doctemplateslocal.hxx b/sfx2/source/doc/doctemplateslocal.hxx
index 7686d081f001..42770bcb3368 100644
--- a/sfx2/source/doc/doctemplateslocal.hxx
+++ b/sfx2/source/doc/doctemplateslocal.hxx
@@ -34,7 +34,7 @@ class DocTemplLocaleHelper : public cppu::WeakImplHelper < css::xml::sax::XDocum
std::vector< OUString > m_aElementsSeq; // stack of elements being parsed
DocTemplLocaleHelper();
- std::vector< css::beans::StringPair > const & GetParsingResult();
+ std::vector< css::beans::StringPair > const & GetParsingResult() const;
/// @throws css::uno::Exception
static std::vector< css::beans::StringPair > ReadLocalizationSequence_Impl( const css::uno::Reference< css::io::XInputStream >& xInStream, const OUString& aStringID, const css::uno::Reference< css::uno::XComponentContext >& xContext );
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index f875591e0a50..8d66dec30004 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -298,7 +298,7 @@ public:
void FreeDocumentProps();
- uno::Reference< frame::XModel > const & GetModel();
+ uno::Reference< frame::XModel > const & GetModel() const;
uno::Reference< frame::XStorable > const & GetStorable();
uno::Reference< frame::XStorable2 > const & GetStorable2();
@@ -376,7 +376,7 @@ void ModelData_Impl::FreeDocumentProps()
}
-uno::Reference< frame::XModel > const & ModelData_Impl::GetModel()
+uno::Reference< frame::XModel > const & ModelData_Impl::GetModel() const
{
if ( !m_xModel.is() )
throw uno::RuntimeException();
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 382583dbb321..890fea99990f 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -149,7 +149,7 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( bool bFullContent ) const
else
{
nAspect = ASPECT_THUMBNAIL;
- aTmpSize = const_cast<SfxObjectShell*>(this)->GetFirstPageSize();
+ aTmpSize = GetFirstPageSize();
}
xFile->SetPrefSize( aTmpSize );
@@ -667,7 +667,7 @@ void SfxObjectShell::SetModifyPasswordEntered( bool bEntered )
pImpl->m_bModifyPasswordEntered = bEntered;
}
-bool SfxObjectShell::IsModifyPasswordEntered()
+bool SfxObjectShell::IsModifyPasswordEntered() const
{
return pImpl->m_bModifyPasswordEntered;
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index adf3f5d4d5d4..5af5ddfdf2f0 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -169,7 +169,7 @@ bool SfxObjectShell::IsAbortingImport() const
uno::Reference<document::XDocumentProperties>
-SfxObjectShell::getDocProperties()
+SfxObjectShell::getDocProperties() const
{
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
GetModel(), uno::UNO_QUERY_THROW);
@@ -244,7 +244,7 @@ bool SfxObjectShell::IsEnableSetModified() const
}
-bool SfxObjectShell::IsModified()
+bool SfxObjectShell::IsModified() const
{
if ( pImpl->m_bIsModified )
return true;
@@ -631,7 +631,7 @@ OUString SfxObjectShell::GetSharedFileURL() const
#endif
}
-Size SfxObjectShell::GetFirstPageSize()
+Size SfxObjectShell::GetFirstPageSize() const
{
return GetVisArea(ASPECT_THUMBNAIL).GetSize();
}
@@ -1657,7 +1657,7 @@ void SfxObjectShell::SetCreateMode_Impl( SfxObjectCreateMode nMode )
eCreateMode = nMode;
}
-bool SfxObjectShell::IsInPlaceActive()
+bool SfxObjectShell::IsInPlaceActive() const
{
if ( eCreateMode != SfxObjectCreateMode::EMBEDDED )
return false;
@@ -1666,7 +1666,7 @@ bool SfxObjectShell::IsInPlaceActive()
return pFrame && pFrame->GetFrame().IsInPlace();
}
-bool SfxObjectShell::IsUIActive()
+bool SfxObjectShell::IsUIActive() const
{
if ( eCreateMode != SfxObjectCreateMode::EMBEDDED )
return false;
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 8cc196c015ce..5e04a0c09c34 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -158,7 +158,7 @@ class SfxClosePreventer_Impl : public ::cppu::WeakImplHelper< css::util::XCloseL
public:
SfxClosePreventer_Impl();
- bool HasOwnership() { return m_bGotOwnership; }
+ bool HasOwnership() const { return m_bGotOwnership; }
void SetPreventClose( bool bPrevent ) { m_bPreventClose = bPrevent; }
@@ -395,7 +395,7 @@ void SfxObjectShell::CheckIn( )
}
}
-uno::Sequence< document::CmisVersion > SfxObjectShell::GetCmisVersions( )
+uno::Sequence< document::CmisVersion > SfxObjectShell::GetCmisVersions( ) const
{
try
{
@@ -1812,7 +1812,7 @@ bool SfxObjectShell::CheckIsReadonly(bool bSignScriptingContent)
return false;
}
-bool SfxObjectShell::HasValidSignatures()
+bool SfxObjectShell::HasValidSignatures() const
{
return pImpl->nDocumentSignatureState == SignatureState::OK
|| pImpl->nDocumentSignatureState == SignatureState::NOTVALIDATED
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 5e5cb854c775..3660e52fc547 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -873,7 +873,7 @@ void SfxObjectShell::SetAutoStyleFilterIndex(sal_uInt16 nSet)
pImpl->nStyleFilter = nSet;
}
-sal_uInt16 SfxObjectShell::GetAutoStyleFilterIndex()
+sal_uInt16 SfxObjectShell::GetAutoStyleFilterIndex() const
{
return pImpl->nStyleFilter;
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 08c5f83ba54d..46d6be1a7840 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2894,7 +2894,7 @@ bool SfxBaseModel::impl_isDisposed() const
// private impl.
-OUString SfxBaseModel::GetMediumFilterName_Impl()
+OUString SfxBaseModel::GetMediumFilterName_Impl() const
{
std::shared_ptr<const SfxFilter> pFilter;
SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium();
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 6c9b479cb17a..f3c91a28c767 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -291,7 +291,7 @@ void SfxTemplateManagerDlg::setDocumentModel(const uno::Reference<frame::XModel>
m_xModel = rModel;
}
-FILTER_APPLICATION SfxTemplateManagerDlg::getCurrentApplicationFilter()
+FILTER_APPLICATION SfxTemplateManagerDlg::getCurrentApplicationFilter() const
{
const sal_Int16 nCurAppId = mxCBApp->get_active();
diff --git a/sfx2/source/inc/fltoptint.hxx b/sfx2/source/inc/fltoptint.hxx
index 7f26a1399c7e..624ecd073453 100644
--- a/sfx2/source/inc/fltoptint.hxx
+++ b/sfx2/source/inc/fltoptint.hxx
@@ -45,7 +45,7 @@ public:
RequestFilterOptions( css::uno::Reference< css::frame::XModel > const & rModel,
const css::uno::Sequence< css::beans::PropertyValue >& rProperties );
- bool isAbort() { return m_xAbort->wasSelected(); }
+ bool isAbort() const { return m_xAbort->wasSelected(); }
css::uno::Sequence< css::beans::PropertyValue > getFilterOptions()
{
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 159e6ceb0c6c..1b2bfceb9be2 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -223,7 +223,7 @@ class SfxWorkWindow final
void Sort_Impl();
SfxChild_Impl* FindChild_Impl( const vcl::Window& rWindow ) const;
bool RequestTopToolSpacePixel_Impl( SvBorder aBorder );
- tools::Rectangle GetTopRect_Impl();
+ tools::Rectangle GetTopRect_Impl() const;
SvBorder Arrange_Impl();
void SaveStatus_Impl(SfxChildWindow*, const SfxChildWinInfo&);
static bool IsPluginMode( SfxObjectShell const * pObjShell );
@@ -272,7 +272,7 @@ public:
void UpdateObjectBars_Impl2();
void ResetObjectBars_Impl();
void SetObjectBar_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags, ToolbarId eId);
- bool IsVisible_Impl();
+ bool IsVisible_Impl() const;
void MakeVisible_Impl( bool );
void Lock_Impl( bool );
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index 672c949531bb..0b47a818ef11 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -560,7 +560,7 @@ void SfxNotebookBar::ToggleMenubar()
}
}
-void SfxNotebookBar::ReloadNotebookBar(OUString& sUIPath)
+void SfxNotebookBar::ReloadNotebookBar(const OUString& sUIPath)
{
if (SfxNotebookBar::IsActive())
{
diff --git a/sfx2/source/view/classificationcontroller.cxx b/sfx2/source/view/classificationcontroller.cxx
index 05a6c6b93b8e..d1737912b3ca 100644
--- a/sfx2/source/view/classificationcontroller.cxx
+++ b/sfx2/source/view/classificationcontroller.cxx
@@ -95,13 +95,13 @@ public:
~ClassificationControl() override;
void dispose() override;
void Resize() override;
- const VclPtr<ListBox>& getCategory()
+ const VclPtr<ListBox>& getCategory() const
{
return m_pCategory;
}
static sfx::ClassificationCreationOrigin getExistingClassificationOrigin();
void toggleInteractivityOnOrigin();
- void setCategoryStateFromPolicy(SfxClassificationHelper & rHelper);
+ void setCategoryStateFromPolicy(const SfxClassificationHelper & rHelper);
};
namespace
@@ -351,7 +351,7 @@ void ClassificationControl::toggleInteractivityOnOrigin()
}
}
-void ClassificationControl::setCategoryStateFromPolicy(SfxClassificationHelper & rHelper)
+void ClassificationControl::setCategoryStateFromPolicy(const SfxClassificationHelper & rHelper)
{
const OUString& rCategoryName = rHelper.GetBACName(SfxClassificationHelper::getPolicyType());
if (!rCategoryName.isEmpty())
diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx
index 6102879c3d6d..23e737900614 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -596,22 +596,22 @@ SfxClassificationHelper::SfxClassificationHelper(const uno::Reference<document::
SfxClassificationHelper::~SfxClassificationHelper() = default;
-std::vector<OUString> const & SfxClassificationHelper::GetMarkings()
+std::vector<OUString> const & SfxClassificationHelper::GetMarkings() const
{
return m_pImpl->m_aMarkings;
}
-std::vector<OUString> const & SfxClassificationHelper::GetIntellectualPropertyParts()
+std::vector<OUString> const & SfxClassificationHelper::GetIntellectualPropertyParts() const
{
return m_pImpl->m_aIPParts;
}
-std::vector<OUString> const & SfxClassificationHelper::GetIntellectualPropertyPartNumbers()
+std::vector<OUString> const & SfxClassificationHelper::GetIntellectualPropertyPartNumbers() const
{
return m_pImpl->m_aIPPartNumbers;
}
-const OUString& SfxClassificationHelper::GetBACName(SfxClassificationPolicyType eType)
+const OUString& SfxClassificationHelper::GetBACName(SfxClassificationPolicyType eType) const
{
return m_pImpl->m_aCategory[eType].m_aName;
}
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 2e50126df545..5bc642d85be1 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -1096,7 +1096,7 @@ void SfxInPlaceClient::ResetObject()
{}
}
-bool SfxInPlaceClient::IsUIActive()
+bool SfxInPlaceClient::IsUIActive() const
{
return m_xImp->m_bUIActive;
}
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 956ce26fc4b4..7812b560de2a 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1154,12 +1154,12 @@ bool SfxBaseController::HandleEvent_Impl( NotifyEvent const & rEvent )
return m_pData->m_aUserInputInterception.handleNotifyEvent( rEvent );
}
-bool SfxBaseController::HasKeyListeners_Impl()
+bool SfxBaseController::HasKeyListeners_Impl() const
{
return m_pData->m_aUserInputInterception.hasKeyHandlers();
}
-bool SfxBaseController::HasMouseClickListeners_Impl()
+bool SfxBaseController::HasMouseClickListeners_Impl() const
{
return m_pData->m_aUserInputInterception.hasMouseClickListeners();
}
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index abbb7b7b0ac5..748d8eefe05b 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1953,13 +1953,13 @@ bool SfxViewShell::HandleNotifyEvent_Impl( NotifyEvent const & rEvent )
return false;
}
-bool SfxViewShell::HasKeyListeners_Impl()
+bool SfxViewShell::HasKeyListeners_Impl() const
{
return (pImpl->m_pController.is())
&& pImpl->m_pController->HasKeyListeners_Impl();
}
-bool SfxViewShell::HasMouseClickListeners_Impl()
+bool SfxViewShell::HasMouseClickListeners_Impl() const
{
return (pImpl->m_pController.is())
&& pImpl->m_pController->HasMouseClickListeners_Impl();
@@ -1988,7 +1988,7 @@ void SfxViewShell::notifyWindow(vcl::LOKWindowId nDialogId, const OUString& rAct
SfxLokHelper::notifyWindow(this, nDialogId, rAction, rPayload);
}
-uno::Reference< datatransfer::clipboard::XClipboardNotifier > SfxViewShell::GetClipboardNotifier()
+uno::Reference< datatransfer::clipboard::XClipboardNotifier > SfxViewShell::GetClipboardNotifier() const
{
uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClipboardNotifier;
if ( GetViewFrame() )