[Libreoffice-commits] core.git: sw/inc sw/qa sw/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Sep 28 09:29:24 UTC 2019
sw/inc/AnnotationWin.hxx | 34 ++++++++++++------------
sw/inc/PostItMgr.hxx | 8 ++---
sw/inc/SwAppletImpl.hxx | 2 -
sw/inc/breakit.hxx | 2 -
sw/inc/calbck.hxx | 2 -
sw/inc/calc.hxx | 4 +-
sw/inc/crsrsh.hxx | 6 ++--
sw/inc/dbmgr.hxx | 4 +-
sw/inc/doc.hxx | 8 ++---
sw/inc/docsh.hxx | 2 -
sw/inc/editsh.hxx | 4 +-
sw/inc/expfld.hxx | 2 -
sw/inc/fesh.hxx | 4 +-
sw/inc/fmtmeta.hxx | 2 -
sw/inc/hints.hxx | 6 ++--
sw/inc/modcfg.hxx | 2 -
sw/inc/ndgrf.hxx | 2 -
sw/inc/ndtxt.hxx | 2 -
sw/inc/node.hxx | 2 -
sw/inc/prtopt.hxx | 2 -
sw/inc/shellio.hxx | 6 ++--
sw/inc/splargs.hxx | 2 -
sw/inc/swmodule.hxx | 4 +-
sw/inc/tblafmt.hxx | 2 -
sw/inc/unodraw.hxx | 2 -
sw/inc/unosett.hxx | 2 -
sw/inc/unostyle.hxx | 2 -
sw/inc/view.hxx | 18 ++++++------
sw/inc/viewsh.hxx | 6 ++--
sw/qa/api/SwXTextFrame.cxx | 2 -
sw/qa/extras/inc/swmodeltestbase.hxx | 4 +-
sw/qa/extras/uiwriter/uiwriter.cxx | 6 ++--
sw/source/core/access/acccontext.hxx | 2 -
sw/source/core/doc/acmplwrd.cxx | 2 -
sw/source/core/docnode/threadmanager.cxx | 2 -
sw/source/core/docnode/threadmanager.hxx | 2 -
sw/source/core/edit/edfcol.cxx | 2 -
sw/source/core/edit/editsh.cxx | 2 -
sw/source/core/fields/expfld.cxx | 2 -
sw/source/core/fields/reffld.cxx | 2 -
sw/source/core/fields/textapi.cxx | 2 -
sw/source/core/frmedt/fews.cxx | 4 +-
sw/source/core/inc/UndoCore.hxx | 4 +-
sw/source/core/inc/dialoghelp.hxx | 4 +-
sw/source/core/inc/flowfrm.hxx | 4 +-
sw/source/core/inc/frmtool.hxx | 4 +-
sw/source/core/inc/ftnfrm.hxx | 4 +-
sw/source/core/inc/rolbck.hxx | 6 ++--
sw/source/core/inc/rootfrm.hxx | 4 +-
sw/source/core/inc/swblocks.hxx | 2 -
sw/source/core/inc/tabfrm.hxx | 2 -
sw/source/core/inc/textapi.hxx | 4 +-
sw/source/core/inc/unotextmarkup.hxx | 2 -
sw/source/core/layout/frmtool.cxx | 4 +-
sw/source/core/swg/swblocks.cxx | 2 -
sw/source/core/text/frmpaint.cxx | 6 ++--
sw/source/core/text/inftxt.hxx | 2 -
sw/source/core/text/itrcrsr.cxx | 2 -
sw/source/core/text/porlay.hxx | 2 -
sw/source/core/txtnode/fmtatr2.cxx | 2 -
sw/source/core/txtnode/fntcap.cxx | 2 -
sw/source/core/txtnode/thints.cxx | 2 -
sw/source/core/undo/rolbck.cxx | 6 ++--
sw/source/core/undo/undobj1.cxx | 2 -
sw/source/core/undo/unfmco.cxx | 2 -
sw/source/core/unocore/unoftn.cxx | 2 -
sw/source/core/unocore/unoidx.cxx | 4 +-
sw/source/core/unocore/unoportenum.cxx | 6 ++--
sw/source/core/unocore/unostyle.cxx | 2 -
sw/source/core/unocore/unotbl.cxx | 10 +++----
sw/source/core/unocore/unotextmarkup.cxx | 2 -
sw/source/core/view/dialoghelp.cxx | 4 +-
sw/source/core/view/viewsh.cxx | 2 -
sw/source/filter/inc/fltshell.hxx | 4 +-
sw/source/filter/ww8/WW8TableInfo.cxx | 8 ++---
sw/source/filter/ww8/WW8TableInfo.hxx | 8 ++---
sw/source/filter/ww8/attributeoutputbase.hxx | 10 +++----
sw/source/filter/ww8/docxattributeoutput.cxx | 2 -
sw/source/filter/ww8/docxattributeoutput.hxx | 8 ++---
sw/source/filter/ww8/docxexport.hxx | 4 +-
sw/source/filter/ww8/docxsdrexport.cxx | 16 +++++------
sw/source/filter/ww8/docxsdrexport.hxx | 12 ++++----
sw/source/filter/ww8/escher.hxx | 4 +-
sw/source/filter/ww8/rtfexport.hxx | 2 -
sw/source/filter/ww8/wrtw8esh.cxx | 4 +-
sw/source/filter/ww8/ww8glsy.hxx | 2 -
sw/source/filter/ww8/ww8par.cxx | 4 +-
sw/source/filter/ww8/ww8par.hxx | 16 +++++------
sw/source/filter/ww8/ww8par6.cxx | 2 -
sw/source/filter/ww8/ww8scan.hxx | 2 -
sw/source/filter/ww8/ww8toolbar.cxx | 2 -
sw/source/filter/ww8/ww8toolbar.hxx | 2 -
sw/source/filter/xml/XMLRedlineImportHelper.cxx | 6 ++--
sw/source/filter/xml/XMLRedlineImportHelper.hxx | 2 -
sw/source/filter/xml/xmltbli.cxx | 2 -
sw/source/ui/dbui/addresslistdialog.cxx | 10 +++----
sw/source/ui/dbui/addresslistdialog.hxx | 10 +++----
sw/source/ui/dbui/mmaddressblockpage.cxx | 14 ++++-----
sw/source/ui/dbui/mmaddressblockpage.hxx | 14 ++++-----
sw/source/ui/dbui/mmresultdialogs.cxx | 4 +-
sw/source/ui/dialog/uiregionsw.cxx | 4 +-
sw/source/ui/frmdlg/cption.cxx | 2 -
sw/source/ui/frmdlg/frmpage.cxx | 2 -
sw/source/ui/misc/bookmark.cxx | 2 -
sw/source/ui/vba/vbaapplication.cxx | 2 -
sw/source/ui/vba/vbaapplication.hxx | 2 -
sw/source/ui/vba/vbadocument.cxx | 2 -
sw/source/ui/vba/vbadocument.hxx | 2 -
sw/source/ui/vba/vbapagesetup.cxx | 2 -
sw/source/ui/vba/vbapagesetup.hxx | 2 -
sw/source/ui/vba/vbaselection.cxx | 4 +-
sw/source/ui/vba/vbaselection.hxx | 4 +-
sw/source/ui/vba/vbatablehelper.cxx | 2 -
sw/source/ui/vba/vbatablehelper.hxx | 2 -
sw/source/uibase/app/swmodul1.cxx | 4 +-
sw/source/uibase/config/modcfg.cxx | 2 -
sw/source/uibase/config/prtopt.cxx | 2 -
sw/source/uibase/config/usrpref.cxx | 4 +-
sw/source/uibase/dbui/dbtree.cxx | 2 -
sw/source/uibase/dbui/mmconfigitem.cxx | 4 +-
sw/source/uibase/dochdl/gloshdl.cxx | 2 -
sw/source/uibase/dochdl/swdtflvr.cxx | 2 -
sw/source/uibase/docvw/AnnotationWin.cxx | 10 +++----
sw/source/uibase/docvw/AnnotationWin2.cxx | 8 ++---
sw/source/uibase/docvw/FrameControlsManager.cxx | 2 -
sw/source/uibase/docvw/HeaderFooterWin.cxx | 2 -
sw/source/uibase/docvw/PostItMgr.cxx | 2 -
sw/source/uibase/docvw/ShadowOverlayObject.hxx | 2 -
sw/source/uibase/docvw/edtwin.cxx | 4 +-
sw/source/uibase/envelp/labimg.cxx | 2 -
sw/source/uibase/inc/FrameControl.hxx | 2 -
sw/source/uibase/inc/HeaderFooterWin.hxx | 4 +-
sw/source/uibase/inc/bookmark.hxx | 2 -
sw/source/uibase/inc/content.hxx | 4 +-
sw/source/uibase/inc/conttree.hxx | 10 +++----
sw/source/uibase/inc/drawbase.hxx | 4 +-
sw/source/uibase/inc/drwtxtsh.hxx | 2 -
sw/source/uibase/inc/edtwin.hxx | 4 +-
sw/source/uibase/inc/frmpage.hxx | 4 +-
sw/source/uibase/inc/frmsh.hxx | 2 -
sw/source/uibase/inc/glosdoc.hxx | 2 -
sw/source/uibase/inc/gloshdl.hxx | 2 -
sw/source/uibase/inc/insfnote.hxx | 4 +-
sw/source/uibase/inc/labimg.hxx | 2 -
sw/source/uibase/inc/mailmrge.hxx | 2 -
sw/source/uibase/inc/mmconfigitem.hxx | 4 +-
sw/source/uibase/inc/numberingtypelistbox.hxx | 2 -
sw/source/uibase/inc/regionsw.hxx | 2 -
sw/source/uibase/inc/scroll.hxx | 2 -
sw/source/uibase/inc/srcedtw.hxx | 2 -
sw/source/uibase/inc/srcview.hxx | 2 -
sw/source/uibase/inc/swdtflvr.hxx | 2 -
sw/source/uibase/inc/toxmgr.hxx | 4 +-
sw/source/uibase/inc/uivwimp.hxx | 4 +-
sw/source/uibase/inc/unoatxt.hxx | 6 ++--
sw/source/uibase/inc/usrpref.hxx | 4 +-
sw/source/uibase/inc/wrtsh.hxx | 2 -
sw/source/uibase/misc/numberingtypelistbox.cxx | 2 -
sw/source/uibase/ribbar/drawbase.cxx | 2 -
sw/source/uibase/shells/drwtxtsh.cxx | 2 -
sw/source/uibase/shells/frmsh.cxx | 2 -
sw/source/uibase/uiview/view0.cxx | 2 -
sw/source/uibase/uiview/viewdlg2.cxx | 6 ++--
sw/source/uibase/uiview/viewdraw.cxx | 2 -
sw/source/uibase/uiview/viewprt.cxx | 2 -
sw/source/uibase/utlui/content.cxx | 8 ++---
sw/source/uibase/wrtsh/wrtsh1.cxx | 2 -
167 files changed, 331 insertions(+), 331 deletions(-)
New commits:
commit 6c6c1eea82b259c7aec1e0ed5ff86bfd2eb0243f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Sep 28 10:01:37 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Sep 28 11:28:41 2019 +0200
loplugin:constmethod in sw
Change-Id: I73c3c6d2165287d2d581a04b23b1d3b48166a488
Reviewed-on: https://gerrit.libreoffice.org/79780
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index 18ebe2e7f8c1..4d920621405e 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -70,12 +70,12 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
void SetPostItText();
void Delete();
void GotoPos();
- const SwPostItField* GetPostItField() { return mpField; }
+ const SwPostItField* GetPostItField() const { return mpField; }
void UpdateText(const OUString& aText);
- OUString GetAuthor();
- Date GetDate();
- tools::Time GetTime();
+ OUString GetAuthor() const;
+ Date GetDate() const;
+ tools::Time GetTime() const;
sal_uInt32 MoveCaret();
@@ -83,7 +83,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
sal_uInt32 CalcParent();
void InitAnswer(OutlinerParaObject const * pText);
- bool IsProtected();
+ bool IsProtected() const;
void SetSize( const Size& rNewSize );
void SetPosSizePixelRect( long nX,
@@ -97,10 +97,10 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
void CheckMetaText();
Point const & GetAnchorPos() { return mAnchorRect.Pos(); }
- const SwRect& GetAnchorRect() { return mAnchorRect; }
- bool IsAnchorRectChanged() { return mbAnchorRectChanged; }
+ const SwRect& GetAnchorRect() const { return mAnchorRect; }
+ bool IsAnchorRectChanged() const { return mbAnchorRectChanged; }
void ResetAnchorRectChanged() { mbAnchorRectChanged = false; }
- const std::vector<basegfx::B2DRange>& GetAnnotationTextRanges() { return maAnnotationTextRanges; }
+ const std::vector<basegfx::B2DRange>& GetAnnotationTextRanges() const { return maAnnotationTextRanges; }
SwEditWin& EditWin();
SwSidebarItem& GetSidebarItem() { return mrSidebarItem; }
@@ -136,7 +136,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition);
void SetReadonly(bool bSet);
- bool IsReadOnly()
+ bool IsReadOnly() const
{
return mbReadonly;
}
@@ -149,14 +149,14 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
void SetViewState(::sw::sidebarwindows::ViewState bViewState);
- bool IsFollow() { return mbIsFollow; }
+ bool IsFollow() const { return mbIsFollow; }
void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; };
sal_Int32 GetMetaHeight();
- sal_Int32 GetMinimumSizeWithMeta();
- sal_Int32 GetMinimumSizeWithoutMeta();
- sal_Int32 GetMetaButtonAreaWidth();
- sal_Int32 GetScrollbarWidth();
+ sal_Int32 GetMinimumSizeWithMeta() const;
+ sal_Int32 GetMinimumSizeWithoutMeta() const;
+ sal_Int32 GetMetaButtonAreaWidth() const;
+ sal_Int32 GetScrollbarWidth() const;
sal_Int32 GetNumFields();
void SetSpellChecking();
@@ -168,8 +168,8 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
void SetChangeTracking( const SwPostItHelper::SwLayoutStatus aStatus,
const Color& aColor);
- SwPostItHelper::SwLayoutStatus GetLayoutStatus() { return mLayoutStatus; }
- const Color& GetChangeColor() { return mChangeColor; }
+ SwPostItHelper::SwLayoutStatus GetLayoutStatus() const { return mLayoutStatus; }
+ const Color& GetChangeColor() const { return mChangeColor; }
DECL_LINK( WindowEventListener, VclWindowEvent&, void );
bool IsMouseOverSidebarWin() const { return mbMouseOver; }
@@ -216,7 +216,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
sal_uInt32 CountFollowing();
- SvxLanguageItem GetLanguage();
+ SvxLanguageItem GetLanguage() const;
VclBuilder maBuilder;
SwPostItMgr& mrMgr;
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 89edc53e62f4..8a6330dcecb3 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -105,7 +105,7 @@ class SwNoteProps: public utl::ConfigItem
pValues[0]>>=m_bIsShowAnchor;
}
- bool IsShowAnchor()
+ bool IsShowAnchor() const
{
return m_bIsShowAnchor;
}
@@ -192,7 +192,7 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr: public SfxListener
bool ShowScrollbar(const unsigned long aPage) const;
bool HasNotes() const ;
bool ShowNotes() const;
- bool IsShowAnchor() { return mbIsShowAnchor;}
+ bool IsShowAnchor() const { return mbIsShowAnchor;}
unsigned long GetSidebarWidth(bool bPx = false) const;
unsigned long GetSidebarBorderWidth(bool bPx = false) const;
@@ -213,7 +213,7 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr: public SfxListener
void Hide( const OUString& rAuthor );
void Hide();
void Show();
- void UpdateResolvedStatus(sw::annotation::SwAnnotationWin* topNote);
+ void UpdateResolvedStatus(const sw::annotation::SwAnnotationWin* topNote);
void ShowHideResolvedNotes(bool visible);
void Rescale();
@@ -257,7 +257,7 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr: public SfxListener
void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;}
OutlinerParaObject* IsAnswer() {return mpAnswer;}
void RegisterAnswerText(const OUString& aAnswerText) { maAnswerText = aAnswerText; }
- const OUString& GetAnswerText() { return maAnswerText; }
+ const OUString& GetAnswerText() const { return maAnswerText; }
void CheckMetaText();
sal_uInt16 Replace(SvxSearchItem const * pItem);
diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx
index bf2f754995ca..e35fa84b239d 100644
--- a/sw/inc/SwAppletImpl.hxx
+++ b/sw/inc/SwAppletImpl.hxx
@@ -56,7 +56,7 @@ public:
void AppendParam( const OUString& rName, const OUString& rValue );
#endif
void FinishApplet();
- const css::uno::Reference < css::embed::XEmbeddedObject >& GetApplet() { return xApplet; }
+ const css::uno::Reference < css::embed::XEmbeddedObject >& GetApplet() const { return xApplet; }
SfxItemSet& GetItemSet() { return aItemSet; }
const OUString& GetAltText() const { return sAlt; }
void SetAltText( const OUString& rAlt ) {sAlt = rAlt;}
diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx
index aad3d4757caa..f33c0cc771a8 100644
--- a/sw/inc/breakit.hxx
+++ b/sw/inc/breakit.hxx
@@ -59,7 +59,7 @@ public:
public:
static SwBreakIt * Get();
- css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIter()
+ css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIter() const
{
return m_xBreak;
}
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 5cc590989c8a..fde08c288577 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -223,7 +223,7 @@ public:
bool IsInSwFntCache() const { return m_bInSwFntCache; }
void CheckCaching( const sal_uInt16 nWhich );
- bool HasOnlyOneListener() { return m_pWriterListeners && m_pWriterListeners->IsLast(); }
+ bool HasOnlyOneListener() const { return m_pWriterListeners && m_pWriterListeners->IsLast(); }
};
template<typename TElementType, typename TSource, sw::IteratorMode eMode> class SwIterator;
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 220fe79d21c5..c3404d8b402e 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -113,10 +113,10 @@ public:
double GetDouble() const;
SwSbxValue& MakeDouble();
- bool IsVoidValue() {return m_bVoid;}
+ bool IsVoidValue() const {return m_bVoid;}
void SetVoidValue(bool bSet) {m_bVoid = bSet;}
- bool IsDBvalue() {return m_bDBvalue;}
+ bool IsDBvalue() const {return m_bDBvalue;}
void SetDBvalue(bool bSet) {m_bDBvalue = bSet;}
};
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 5ad7a6ac2dd2..66c597b21bef 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -405,7 +405,7 @@ public:
// Areas
inline void SetMark();
- inline bool HasMark();
+ inline bool HasMark() const;
void ClearMark();
@@ -834,7 +834,7 @@ public:
{
m_bMacroExecAllowed = _bMacroExecAllowed;
}
- bool IsMacroExecAllowed()
+ bool IsMacroExecAllowed() const
{
return m_bMacroExecAllowed;
}
@@ -874,7 +874,7 @@ inline SwPaM* SwCursorShell::GetStackCursor() const { return m_pStackCursor; }
inline void SwCursorShell::SetMark() { m_pCurrentCursor->SetMark(); }
-inline bool SwCursorShell::HasMark() { return m_pCurrentCursor->HasMark(); }
+inline bool SwCursorShell::HasMark() const { return m_pCurrentCursor->HasMark(); }
inline bool SwCursorShell::IsSelection() const
{
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index c9e69a9861e1..991062424c35 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -299,8 +299,8 @@ public:
bool Merge( const SwMergeDescriptor& rMergeDesc );
void MergeCancel();
- bool IsMergeOk() { return MergeStatus::Ok == m_aMergeStatus; };
- bool IsMergeError() { return MergeStatus::Error <= m_aMergeStatus; };
+ bool IsMergeOk() const { return MergeStatus::Ok == m_aMergeStatus; };
+ bool IsMergeError() const { return MergeStatus::Error <= m_aMergeStatus; };
static std::shared_ptr<SwMailMergeConfigItem> PerformMailMerge(SwView const * pView);
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index af2e97aa9985..79ae280c872a 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -387,7 +387,7 @@ public:
DOCTYPE_MSWORD // This doc model comes from MS Word
};
DocumentType meDocType;
- DocumentType GetDocumentType(){ return meDocType; }
+ DocumentType GetDocumentType() const { return meDocType; }
void SetDocumentType( DocumentType eDocType ) { meDocType = eDocType; }
// Life cycle
@@ -1345,7 +1345,7 @@ public:
/** in case during copying of embedded object a new shell is created,
it should be set here and cleaned later */
void SetTmpDocShell( SfxObjectShellLock rLock ) { mxTmpDocShell = rLock; }
- const SfxObjectShellLock& GetTmpDocShell() { return mxTmpDocShell; }
+ const SfxObjectShellLock& GetTmpDocShell() const { return mxTmpDocShell; }
// For Autotexts? (text modules) They have only one SVPersist at their disposal.
SfxObjectShell* GetPersist() const;
@@ -1605,7 +1605,7 @@ public:
css::uno::Reference< css::script::vba::XVBAEventProcessor > const & GetVbaEventProcessor();
void SetVBATemplateToProjectCache( css::uno::Reference< css::container::XNameContainer > const & xCache ) { m_xTemplateToProjectCache = xCache; };
- const css::uno::Reference< css::container::XNameContainer >& GetVBATemplateToProjectCache() { return m_xTemplateToProjectCache; };
+ const css::uno::Reference< css::container::XNameContainer >& GetVBATemplateToProjectCache() const { return m_xTemplateToProjectCache; };
::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
::sw::MetaFieldManager & GetMetaFieldManager();
::sw::UndoManager & GetUndoManager();
@@ -1644,7 +1644,7 @@ public:
/// Use to notify if the dictionary can be found for a single content portion (has to be called for all portions)
void SetMissingDictionaries( bool bIsMissing );
/// Returns true if no dictionary can be found for any content
- bool IsDictionaryMissing() { return meDictionaryMissing == MissingDictionary::True; }
+ bool IsDictionaryMissing() const { return meDictionaryMissing == MissingDictionary::True; }
private:
// Copies master header to left / first one, if necessary - used by ChgPageDesc().
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 291b20455c17..3834fc34ce02 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -305,7 +305,7 @@ public:
GetController();
SfxInPlaceClient* GetIPClient( const ::svt::EmbeddedObjectRef& xObjRef );
- SAL_DLLPRIVATE bool IsTemplate() { return m_IsATemplate; }
+ SAL_DLLPRIVATE bool IsTemplate() const { return m_IsATemplate; }
SAL_DLLPRIVATE void SetIsTemplate( bool bValue ) { m_IsATemplate = bValue; }
virtual const ::sfx2::IXmlIdRegistry* GetXmlIdRegistry() const override;
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 7d033edb76ea..8a2c2064d97b 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -362,7 +362,7 @@ public:
void ApplyAdvancedClassification(std::vector<svx::ClassificationResult> const & rResult);
std::vector<svx::ClassificationResult> CollectAdvancedClassification();
- SfxWatermarkItem GetWatermark();
+ SfxWatermarkItem GetWatermark() const;
void SetWatermark(const SfxWatermarkItem& rText);
/// Sign the paragraph at the cursor.
@@ -685,7 +685,7 @@ public:
/// Update content of all charts for table with given name.
void UpdateCharts( const OUString &rName );
- OUString GetCurWord();
+ OUString GetCurWord() const;
/** Glossary from glossary document in current document.
Styles only if not already existent. */
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index dcd1354619b3..01611c4aa8ea 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -162,7 +162,7 @@ public:
inline sal_uInt16 GetType() const;
void SetSeqFormat(sal_uLong nFormat);
- sal_uLong GetSeqFormat();
+ sal_uLong GetSeqFormat() const;
bool IsDeleted() const { return m_bDeleted; }
void SetDeleted( bool b ) { m_bDeleted = b; }
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 65732d8f384f..49d168233ebe 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -701,7 +701,7 @@ public:
sal_uInt16 GetRowsToRepeat() const;
void SetRowsToRepeat( sal_uInt16 nNumOfRows );
- sal_uInt16 GetVirtPageNum();
+ sal_uInt16 GetVirtPageNum() const;
/** @return the number of table rows currently selected
if the selection start at the top of the table. */
@@ -733,7 +733,7 @@ public:
/** Phy: real page count.
Virt: consider offset that may have been set by user. */
- sal_uInt16 GetPhyPageNum();
+ sal_uInt16 GetPhyPageNum() const;
void SetNewPageOffset( sal_uInt16 nOffset );
void SetPageOffset( sal_uInt16 nOffset ); ///< Changes last page offset.
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index 2fe348cffce0..d2d403751211 100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -216,7 +216,7 @@ public:
std::vector< css::uno::Reference<css::text::XTextField> > getMetaFields();
/// Copy document properties from rSource to m_xDocumentProperties.
void copyDocumentProperties(const SwDoc& rSource);
- const css::uno::Reference<css::document::XDocumentProperties>& getDocumentProperties();
+ const css::uno::Reference<css::document::XDocumentProperties>& getDocumentProperties() const;
};
} // namespace sw
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index 29cc96a3b90e..3caa88e03da7 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -268,9 +268,9 @@ class SwVirtPageNumInfo: public SwMsgPoolItem
public:
SwVirtPageNumInfo( const SwPageFrame *pPg );
- const SwPageFrame *GetPage() { return m_pPage; }
- const SwPageFrame *GetOrigPage() { return m_pOrigPage;}
- const SwFrame *GetFrame() { return m_pFrame; }
+ const SwPageFrame *GetPage() const { return m_pPage; }
+ const SwPageFrame *GetOrigPage() const { return m_pOrigPage;}
+ const SwFrame *GetFrame() const { return m_pFrame; }
void SetInfo( const SwPageFrame *pPg,
const SwFrame *pF ) { m_pFrame = pF; m_pPage = pPg; }
};
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index 4cac78f4c883..217be9327139 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -130,7 +130,7 @@ class SAL_DLLPUBLIC_RTTI SwInsertConfig : public utl::ConfigItem
SwInsertTableOptions m_aInsTableOpts;
bool const m_bIsWeb;
- const css::uno::Sequence<OUString>& GetPropertyNames();
+ const css::uno::Sequence<OUString>& GetPropertyNames() const;
virtual void ImplCommit() override;
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index 2faed3ec01e8..65716602c16f 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -141,7 +141,7 @@ public:
/// Returns the with our graphic attributes filled Graphic-Attr-Structure.
GraphicAttr& GetGraphicAttr( GraphicAttr&, const SwFrame* pFrame ) const;
- std::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > GetThreadConsumer() { return mpThreadConsumer;}
+ std::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > GetThreadConsumer() const { return mpThreadConsumer;}
bool IsLinkedInputStreamReady() const { return mbLinkedInputStreamReady;}
void TriggerAsyncRetrieveInputStream();
void ApplyInputStream(
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 125891a8cb50..acef43b0010e 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -595,7 +595,7 @@ public:
*/
void SetAttrOutlineLevel(int nLevel);
- bool IsEmptyListStyleDueToSetOutlineLevelAttr() { return mbEmptyListStyleSetDueToSetOutlineLevelAttr;}
+ bool IsEmptyListStyleDueToSetOutlineLevelAttr() const { return mbEmptyListStyleSetDueToSetOutlineLevelAttr;}
void SetEmptyListStyleDueToSetOutlineLevelAttr();
void ResetEmptyListStyleDueToResetOutlineLevelAttr();
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 143213035881..c403a75a136a 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -90,7 +90,7 @@ class SW_DLLPUBLIC SwNode
public:
/// sw_redlinehide: redline node merge state
enum class Merge { None, First, NonFirst, Hidden };
- bool IsCreateFrameWhenHidingRedlines() {
+ bool IsCreateFrameWhenHidingRedlines() const {
return m_eMerge == Merge::None || m_eMerge == Merge::First;
}
void SetRedlineMergeFlag(Merge const eMerge) { m_eMerge = eMerge; }
diff --git a/sw/inc/prtopt.hxx b/sw/inc/prtopt.hxx
index 5c53ee1a84bd..e03714902b63 100644
--- a/sw/inc/prtopt.hxx
+++ b/sw/inc/prtopt.hxx
@@ -27,7 +27,7 @@ class SwPrintOptions : public SwPrintData, public utl::ConfigItem
private:
bool const bIsWeb;
- css::uno::Sequence<OUString> GetPropertyNames();
+ css::uno::Sequence<OUString> GetPropertyNames() const;
virtual void ImplCommit() override;
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 0b6d926d6b4c..025193a1c00c 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -267,7 +267,7 @@ public:
virtual size_t GetSectionList( SfxMedium& rMedium,
std::vector<OUString>& rStrings) const;
- const tools::SvRef<SotStorage>& getSotStorageRef() { return m_pStorage; };
+ const tools::SvRef<SotStorage>& getSotStorageRef() const { return m_pStorage; };
void setSotStorageRef(const tools::SvRef<SotStorage>& pStgRef) { m_pStorage = pStgRef; };
private:
@@ -292,7 +292,7 @@ class SW_DLLPUBLIC StgReader : public Reader
public:
virtual SwReaderType GetReaderType() override;
- const OUString& GetFltName() { return aFltName; }
+ const OUString& GetFltName() const { return aFltName; }
virtual void SetFltName( const OUString& r ) override;
};
@@ -312,7 +312,7 @@ public:
SwDoc* GetDoc();
void ClearDoc(); // Delete Doc-contents.
- OUString GetName();
+ OUString GetName() const;
void SetName( const OUString& );
ErrCode const & GetError() const { return nErr; }
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
index 0c66737205f9..122b9c7b09ac 100644
--- a/sw/inc/splargs.hxx
+++ b/sw/inc/splargs.hxx
@@ -136,7 +136,7 @@ public:
{
xHyphWord = rxHW;
}
- const css::uno::Reference< css::linguistic2::XHyphenatedWord >& GetHyphWord()
+ const css::uno::Reference< css::linguistic2::XHyphenatedWord >& GetHyphWord() const
{
return xHyphWord;
}
diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
index a102410d7118..6fbab3ad4f78 100644
--- a/sw/inc/swmodule.hxx
+++ b/sw/inc/swmodule.hxx
@@ -208,8 +208,8 @@ public:
void GetDeletedAuthorAttr(std::size_t nAuthor, SfxItemSet &rSet);
void GetFormatAuthorAttr(std::size_t nAuthor, SfxItemSet &rSet);
- sal_uInt16 GetRedlineMarkPos();
- const Color& GetRedlineMarkColor();
+ sal_uInt16 GetRedlineMarkPos() const;
+ const Color& GetRedlineMarkColor() const;
SwCompareMode GetCompareMode() const;
bool IsUseRsid() const;
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index fd74bee7c27a..23fdbe395c14 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -303,7 +303,7 @@ class SwCellStyleDescriptor
public:
SwCellStyleDescriptor(const std::pair<OUString, std::unique_ptr<SwBoxAutoFormat>>& rCellStyleDesc) : m_rCellStyleDesc(rCellStyleDesc) { }
- const OUString& GetName() { return m_rCellStyleDesc.first; }
+ const OUString& GetName() const { return m_rCellStyleDesc.first; }
};
class SwCellStyleTable
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index 2938e7a79114..deaa34fc1636 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -257,7 +257,7 @@ public:
SwShapeDescriptor_Impl* GetDescImpl() {return pImpl.get();}
SwFrameFormat* GetFrameFormat() const { return m_pFormat; }
- const css::uno::Reference< css::uno::XAggregation >& GetAggregationInterface() {return xShapeAgg;}
+ const css::uno::Reference< css::uno::XAggregation >& GetAggregationInterface() const {return xShapeAgg;}
// helper
static void AddExistingShapeToFormat( SdrObject const & _rObj );
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index 7414645d9b54..a86c35700a16 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -202,7 +202,7 @@ public:
const OUString* GetNewCharStyleNames() const {return m_sNewCharStyleNames;}
const OUString* GetBulletFontNames() const {return m_sNewBulletFontNames;}
- const SwNumRule* GetNumRule() {return m_pNumRule;}
+ const SwNumRule* GetNumRule() const {return m_pNumRule;}
static bool isInvalidStyle(const OUString &rName);
void Invalidate() {m_pDocShell = nullptr;}
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index 5a2e66195c72..67c7dd996424 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -357,7 +357,7 @@ class SwXTextCellStyle : public cppu::WeakImplHelper
/// Sets the address of SwBoxAutoFormat this style is bound to. Usable only when style is physical.
void SetBoxFormat(SwBoxAutoFormat* pBoxFormat);
void SetPhysical();
- bool IsPhysical();
+ bool IsPhysical() const;
//XStyle
virtual sal_Bool SAL_CALL isUserDefined() override;
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index e6142006d50c..e2a18d00a231 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -377,7 +377,7 @@ public:
virtual sal_uInt16 SetPrinter( SfxPrinter* pNew,
SfxPrinterChangeFlags nDiff = SFX_PRINTER_ALL) override;
- ShellMode GetShellMode();
+ ShellMode GetShellMode() const;
css::view::XSelectionSupplier* GetUNOObject();
@@ -513,9 +513,9 @@ public:
SwDrawBase* GetDrawFuncPtr() const { return m_pDrawActual.get(); }
void GetDrawState(SfxItemSet &rSet);
void ExitDraw();
- bool IsDrawRotate() { return m_bDrawRotate; }
+ bool IsDrawRotate() const { return m_bDrawRotate; }
void FlipDrawRotate() { m_bDrawRotate = !m_bDrawRotate; }
- bool IsDrawSelMode() { return m_bDrawSelMode; }
+ bool IsDrawSelMode() const { return m_bDrawSelMode; }
void SetSelDrawSlot();
void FlipDrawSelMode() { m_bDrawSelMode = !m_bDrawSelMode; }
void NoRotate(); // turn off rotate mode
@@ -523,16 +523,16 @@ public:
/// Same as EnterDrawTextMode(), but takes an SdrObject instead of guessing it by document position.
bool EnterShapeDrawTextMode(SdrObject* pObject);
void LeaveDrawCreate() { m_nDrawSfxId = m_nFormSfxId = USHRT_MAX; m_sDrawCustom.clear();}
- bool IsDrawMode() { return (m_nDrawSfxId != USHRT_MAX || m_nFormSfxId != USHRT_MAX); }
+ bool IsDrawMode() const { return (m_nDrawSfxId != USHRT_MAX || m_nFormSfxId != USHRT_MAX); }
bool IsFormMode() const;
- bool IsBezierEditMode();
+ bool IsBezierEditMode() const;
bool AreOnlyFormsSelected() const;
bool HasOnlyObj(SdrObject const *pSdrObj, SdrInventor eObjInventor) const;
bool BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=nullptr,
vcl::Window* pWin=nullptr, bool bIsNewObj=false, bool bSetSelectionToStart=false );
- bool isSignatureLineSelected();
- bool isSignatureLineSigned();
- bool isQRCodeSelected();
+ bool isSignatureLineSelected() const;
+ bool isSignatureLineSigned() const;
+ bool isQRCodeSelected() const;
void StateTabWin(SfxItemSet&);
@@ -638,7 +638,7 @@ public:
/// See SfxViewShell::dumpAsXml().
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
void SetRedlineAuthor(const OUString& rAuthor);
- const OUString& GetRedlineAuthor();
+ const OUString& GetRedlineAuthor() const;
/// See SfxViewShell::NotifyCursor().
void NotifyCursor(SfxViewShell* pViewShell) const override;
void ShowUIElement(const OUString& sElementURL) const;
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 3f11b6d6fe24..dc6472b060cd 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -200,7 +200,7 @@ public:
bool IsInEndAction() const { return mbInEndAction; }
void SetEndActionByVirDev( bool b ) { mbEndActionByVirDev = b; }
- bool IsEndActionByVirDev() { return mbEndActionByVirDev; }
+ bool IsEndActionByVirDev() const { return mbEndActionByVirDev; }
// The ActionCount for all Shells is temporarily set to zero and then
// restored at the RootFrame via UNO.
@@ -264,7 +264,7 @@ public:
Point GetPagePos( sal_uInt16 nPageNum ) const;
- sal_uInt16 GetNumPages(); // Ask count of current pages from layout.
+ sal_uInt16 GetNumPages() const; // Ask count of current pages from layout.
bool IsDummyPage( sal_uInt16 nPageNum ) const; // An empty page?
// Invalidate first visible page for all Shells in ring.
@@ -565,7 +565,7 @@ public:
bool IsHeaderFooterEdit() const { return mbHeaderFooterEdit; }
bool IsShowHeaderFooterSeparator( FrameControlType eControl ) { return (eControl == Header)? mbShowHeaderSeparator: mbShowFooterSeparator; }
virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow );
- bool IsSelectAll() { return mbSelectAll; }
+ bool IsSelectAll() const { return mbSelectAll; }
void setOutputToWindow(bool bOutputToWindow);
bool isOutputToWindow() const;
diff --git a/sw/qa/api/SwXTextFrame.cxx b/sw/qa/api/SwXTextFrame.cxx
index 546823b5dbe2..4e29f31604a9 100644
--- a/sw/qa/api/SwXTextFrame.cxx
+++ b/sw/qa/api/SwXTextFrame.cxx
@@ -53,7 +53,7 @@ public:
SwXTextFrame()
: apitest::XServiceInfo("SwXTextFrame", "com.sun.star.text.TextFrame"){};
uno::Reference<uno::XInterface> init() override;
- uno::Reference<text::XTextDocument> getTextDocument() { return mxTextDocument; }
+ const uno::Reference<text::XTextDocument>& getTextDocument() const { return mxTextDocument; }
void triggerDesktopTerminate() override { mxDesktop->terminate(); }
CPPUNIT_TEST_SUITE(SwXTextFrame);
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 23cc46af3016..35edcd79c090 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -396,7 +396,7 @@ protected:
}
/// Get the length of the whole document.
- int getLength()
+ int getLength() const
{
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
@@ -887,7 +887,7 @@ protected:
}
/// Get page count.
- int getPages()
+ int getPages() const
{
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 10e9ee644983..a859f152400e 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -4057,7 +4057,7 @@ void SwUiWriterTest::testDde()
class IdleTask
{
public:
- bool GetFlag();
+ bool GetFlag() const;
IdleTask();
DECL_LINK( FlipFlag, Timer *, void );
private:
@@ -4077,7 +4077,7 @@ IdleTask::IdleTask() : flag( false )
}
//GetFlag() of IdleTask Class
-bool IdleTask::GetFlag()
+bool IdleTask::GetFlag() const
{
//returning the status of current flag
return flag;
@@ -4995,7 +4995,7 @@ void SwUiWriterTest::testTdf88453Table()
namespace
{
-int checkShells(SwDocShell* pSource, SwDocShell* pDestination)
+int checkShells(const SwDocShell* pSource, const SwDocShell* pDestination)
{
return int(SfxClassificationHelper::CheckPaste(pSource->getDocProperties(), pDestination->getDocProperties()));
}
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
index fbdcab48cb44..52dfe42827d9 100644
--- a/sw/source/core/access/acccontext.hxx
+++ b/sw/source/core/access/acccontext.hxx
@@ -346,7 +346,7 @@ public:
//This method is used to update the selected state and fire the selected state changed event.
virtual bool SetSelectedState(bool bSeleted);
- bool IsSeletedInDoc() { return m_isSelectedInDoc; }
+ bool IsSeletedInDoc() const { return m_isSelectedInDoc; }
static OUString GetResource(const char* pResId,
const OUString *pArg1 = nullptr,
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 6090c098a3b8..db2472e76407 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -55,7 +55,7 @@ public:
SwAutoCompleteClient& operator=(const SwAutoCompleteClient& rClient);
- const SwDoc& GetDoc(){return *pDoc;}
+ const SwDoc& GetDoc() const {return *pDoc;}
#if OSL_DEBUG_LEVEL > 0
static sal_uLong GetElementCount() {return nSwAutoCompleteClientCount;}
#endif
diff --git a/sw/source/core/docnode/threadmanager.cxx b/sw/source/core/docnode/threadmanager.cxx
index 3be5cdcfdd79..6e73f31168a9 100644
--- a/sw/source/core/docnode/threadmanager.cxx
+++ b/sw/source/core/docnode/threadmanager.cxx
@@ -61,7 +61,7 @@ ThreadManager::~ThreadManager()
maStartedThreads.clear();
}
-std::weak_ptr< IFinishedThreadListener > ThreadManager::GetThreadListenerWeakRef()
+std::weak_ptr< IFinishedThreadListener > ThreadManager::GetThreadListenerWeakRef() const
{
return mpThreadListener;
}
diff --git a/sw/source/core/docnode/threadmanager.hxx b/sw/source/core/docnode/threadmanager.hxx
index 84ee87b454a2..a0a43a78f2a4 100644
--- a/sw/source/core/docnode/threadmanager.hxx
+++ b/sw/source/core/docnode/threadmanager.hxx
@@ -51,7 +51,7 @@ class ThreadManager final
explicit ThreadManager( css::uno::Reference< css::util::XJobManager > const & rThreadJoiner );
~ThreadManager();
- std::weak_ptr< IFinishedThreadListener > GetThreadListenerWeakRef();
+ std::weak_ptr< IFinishedThreadListener > GetThreadListenerWeakRef() const;
void NotifyAboutFinishedThread( const oslInterlockedCount nThreadID );
/** initialization
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 8dce2d6731d6..aa0d763c7bde 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -1380,7 +1380,7 @@ static sal_Int16 lcl_GetAngle(const drawing::HomogenMatrix3& rMatrix)
return nDeg < 0 ? round(nDeg) * -1 : round(360.0 - nDeg);
}
-SfxWatermarkItem SwEditShell::GetWatermark()
+SfxWatermarkItem SwEditShell::GetWatermark() const
{
SwDocShell* pDocShell = GetDoc()->GetDocShell();
if (!pDocShell)
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index df141dd389c3..26a0a411d159 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -412,7 +412,7 @@ void SwEditShell::SetTableName( SwFrameFormat& rTableFormat, const OUString &rNe
}
/// request current word
-OUString SwEditShell::GetCurWord()
+OUString SwEditShell::GetCurWord() const
{
const SwPaM& rPaM = *GetCursor();
const SwTextNode* pNd = rPaM.GetNode().GetTextNode();
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 3490d548ad1b..033ccb556faf 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -561,7 +561,7 @@ void SwSetExpFieldType::SetSeqFormat(sal_uLong nFormat)
pFormatField->GetField()->ChangeFormat( nFormat );
}
-sal_uLong SwSetExpFieldType::GetSeqFormat()
+sal_uLong SwSetExpFieldType::GetSeqFormat() const
{
if( !HasWriterListeners() )
return SVX_NUM_ARABIC;
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 27a20a24bca0..3d430ee495be 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -1273,7 +1273,7 @@ public:
void Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rField, bool bField );
- const OUString& GetName() { return aName; }
+ const OUString& GetName() const { return aName; }
};
/// Get a sorted list of the field IDs from a document.
diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx
index 29729fd55290..ed8f6bead855 100644
--- a/sw/source/core/fields/textapi.cxx
+++ b/sw/source/core/fields/textapi.cxx
@@ -183,7 +183,7 @@ std::unique_ptr<OutlinerParaObject> SwTextAPIEditSource::CreateText()
return nullptr;
}
-OUString SwTextAPIEditSource::GetText()
+OUString SwTextAPIEditSource::GetText() const
{
if ( pImpl->mpPool && pImpl->mpOutliner )
return pImpl->mpOutliner->GetEditEngine().GetText();
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index d6108875560c..6134d0f73f45 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -333,7 +333,7 @@ void SwFEShell::ShellLoseFocus()
}
}
-sal_uInt16 SwFEShell::GetPhyPageNum()
+sal_uInt16 SwFEShell::GetPhyPageNum() const
{
SwFrame *pFrame = GetCurrFrame();
if ( pFrame )
@@ -341,7 +341,7 @@ sal_uInt16 SwFEShell::GetPhyPageNum()
return 0;
}
-sal_uInt16 SwFEShell::GetVirtPageNum()
+sal_uInt16 SwFEShell::GetVirtPageNum() const
{
SwFrame *pFrame = GetCurrFrame();
if ( pFrame )
diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx
index 6a2d9289b50b..0d09c20c34bb 100644
--- a/sw/source/core/inc/UndoCore.hxx
+++ b/sw/source/core/inc/UndoCore.hxx
@@ -156,7 +156,7 @@ class SwUndoFormatColl : public SwUndo, private SwUndRng
void DoSetFormatColl(SwDoc & rDoc, SwPaM const & rPaM);
public:
- SwUndoFormatColl( const SwPaM&, SwFormatColl*,
+ SwUndoFormatColl( const SwPaM&, const SwFormatColl*,
const bool bReset,
const bool bResetListAttrs );
virtual ~SwUndoFormatColl() override;
@@ -200,7 +200,7 @@ class SwUndoSetFlyFormat : public SwUndo, public SwClient
void GetAnchor( SwFormatAnchor& rAnhor, sal_uLong nNode, sal_Int32 nContent );
public:
- SwUndoSetFlyFormat( SwFrameFormat& rFlyFormat, SwFrameFormat& rNewFrameFormat );
+ SwUndoSetFlyFormat( SwFrameFormat& rFlyFormat, const SwFrameFormat& rNewFrameFormat );
virtual ~SwUndoSetFlyFormat() override;
virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
diff --git a/sw/source/core/inc/dialoghelp.hxx b/sw/source/core/inc/dialoghelp.hxx
index ce9c0721055f..a549523658e5 100644
--- a/sw/source/core/inc/dialoghelp.hxx
+++ b/sw/source/core/inc/dialoghelp.hxx
@@ -20,8 +20,8 @@ namespace weld
class Window;
}
-weld::Window* GetFrameWeld(SfxFrame* pFrame);
-weld::Window* GetFrameWeld(SfxMedium* pMedium);
+weld::Window* GetFrameWeld(const SfxFrame* pFrame);
+weld::Window* GetFrameWeld(const SfxMedium* pMedium);
weld::Window* GetFrameWeld(SwDocShell* pDocSh);
weld::Window* GetFrameWeld(SwDoc* pDoc);
diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx
index d7dc6cfe0ebf..cf06172d0c06 100644
--- a/sw/source/core/inc/flowfrm.hxx
+++ b/sw/source/core/inc/flowfrm.hxx
@@ -122,7 +122,7 @@ protected:
bool m_bFlyLock :1; // stop positioning of at-character flyframes
// checks if forward flow makes sense to prevent infinite moves
- inline bool IsFwdMoveAllowed();
+ inline bool IsFwdMoveAllowed() const;
// #i44049# - method <CalcContent(..)> has to check this property.
friend void CalcContent( SwLayoutFrame *pLay, bool bNoColl );
bool IsKeepFwdMoveAllowed( bool bIgnoreMyOwnKeepValue = false ); // like above, forward flow for Keep.
@@ -237,7 +237,7 @@ public:
static const SwFlowFrame *CastFlowFrame( const SwFrame *pFrame );
};
-inline bool SwFlowFrame::IsFwdMoveAllowed()
+inline bool SwFlowFrame::IsFwdMoveAllowed() const
{
return m_rThis.GetIndPrev() != nullptr;
}
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index d2a5b7704cb1..3edf774c9828 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -233,7 +233,7 @@ public:
~SwLayNotify();
void SetLowersComplete( bool b ) { m_bLowersComplete = b; }
- bool IsLowersComplete() { return m_bLowersComplete; }
+ bool IsLowersComplete() const { return m_bLowersComplete; }
};
class SwFlyNotify : public SwLayNotify
@@ -575,7 +575,7 @@ public:
* true if mpFrame != 0 and mpFrame is not client of pRegIn
* false otherwise
*/
- bool HasBeenDeleted();
+ bool HasBeenDeleted() const;
};
#endif
diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx
index f0eb3112e20e..618353c6256b 100644
--- a/sw/source/core/inc/ftnfrm.hxx
+++ b/sw/source/core/inc/ftnfrm.hxx
@@ -115,7 +115,7 @@ public:
void LockBackMove() { mbBackMoveLocked = true; }
void UnlockBackMove() { mbBackMoveLocked = false;}
- bool IsBackMoveLocked() { return mbBackMoveLocked; }
+ bool IsBackMoveLocked() const { return mbBackMoveLocked; }
// prevents that the last content deletes the SwFootnoteFrame as well (Cut())
void ColLock() { mbColLocked = true; }
@@ -130,7 +130,7 @@ public:
{
mbUnlockPosOfLowerObjs = false;
}
- bool IsUnlockPosOfLowerObjs()
+ bool IsUnlockPosOfLowerObjs() const
{
return mbUnlockPosOfLowerObjs;
}
diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index 5a1613efb4df..6fb81943af4d 100644
--- a/sw/source/core/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -139,7 +139,7 @@ class SwHistorySetTextField : public SwHistoryHint
SwFieldIds m_nFieldWhich;
public:
- SwHistorySetTextField( SwTextField* pTextField, sal_uLong nNode );
+ SwHistorySetTextField( const SwTextField* pTextField, sal_uLong nNode );
virtual ~SwHistorySetTextField() override;
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) override;
@@ -155,7 +155,7 @@ class SwHistorySetRefMark : public SwHistoryHint
const sal_Int32 m_nEnd;
public:
- SwHistorySetRefMark( SwTextRefMark* pTextHt, sal_uLong nNode );
+ SwHistorySetRefMark( const SwTextRefMark* pTextHt, sal_uLong nNode );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) override;
};
@@ -170,7 +170,7 @@ class SwHistorySetTOXMark : public SwHistoryHint
const sal_Int32 m_nEnd;
public:
- SwHistorySetTOXMark( SwTextTOXMark* pTextHt, sal_uLong nNode );
+ SwHistorySetTOXMark( const SwTextTOXMark* pTextHt, sal_uLong nNode );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) override;
bool IsEqual( const SwTOXMark& rCmp ) const;
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index c3e5d7e48a69..484ff172e25d 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -274,7 +274,7 @@ public:
/// Makes sure that all requested page-bound Flys find a Page
void SetAssertFlyPages() { mbAssertFlyPages = true; }
void AssertFlyPages();
- bool IsAssertFlyPages() { return mbAssertFlyPages; }
+ bool IsAssertFlyPages() const { return mbAssertFlyPages; }
/**
* Makes sure that, starting from the passed Page, all page-bound Frames
@@ -344,7 +344,7 @@ public:
bool IsTurboAllowed() const { return mbTurboAllowed; }
void SetTurbo( const SwContentFrame *pContent ) { mpTurbo = pContent; }
void ResetTurbo() { mpTurbo = nullptr; }
- const SwContentFrame *GetTurbo() { return mpTurbo; }
+ const SwContentFrame *GetTurbo() const { return mpTurbo; }
/// Update the footnote numbers of all Pages
void UpdateFootnoteNums(); // Only for page by page numbering!
diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx
index 97af78f8d439..ae20aac45b82 100644
--- a/sw/source/core/inc/swblocks.hxx
+++ b/sw/source/core/inc/swblocks.hxx
@@ -99,7 +99,7 @@ public:
const OUString& GetFileName() const {return m_aFile;} /// Return physical file name
void SetName( const OUString& rName ) /// Logic name
{ m_aName = rName; m_bInfoChanged = true; }
- const OUString& GetName()
+ const OUString& GetName() const
{ return m_aName; }
const OUString& GetBaseURL() const { return m_sBaseURL;}
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 40b9923ba744..69e07ac9c692 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -144,7 +144,7 @@ public:
const SwTable *GetTable() const { return m_pTable; }
SwTable *GetTable() { return m_pTable; }
- bool IsComplete() { return m_bComplete; }
+ bool IsComplete() const { return m_bComplete; }
void SetComplete() { m_bComplete = true; }
void ResetComplete() { m_bComplete = false; }
diff --git a/sw/source/core/inc/textapi.hxx b/sw/source/core/inc/textapi.hxx
index ee8bd319d407..3362621d7b03 100644
--- a/sw/source/core/inc/textapi.hxx
+++ b/sw/source/core/inc/textapi.hxx
@@ -44,7 +44,7 @@ public:
void SetText( OutlinerParaObject const & rText );
void SetString( const OUString& rText );
std::unique_ptr<OutlinerParaObject> CreateText();
- OUString GetText();
+ OUString GetText() const;
};
class SwTextAPIObject : public SvxUnoText
@@ -57,7 +57,7 @@ public:
std::unique_ptr<OutlinerParaObject> CreateText() { return pSource->CreateText(); }
void SetString( const OUString& rText ) { pSource->SetString( rText ); }
void SetText( OutlinerParaObject const & rText ) { pSource->SetText( rText ); }
- OUString GetText() { return pSource->GetText(); }
+ OUString GetText() const { return pSource->GetText(); }
};
#endif
diff --git a/sw/source/core/inc/unotextmarkup.hxx b/sw/source/core/inc/unotextmarkup.hxx
index e0e1551c169f..30e1b3bf3ebc 100644
--- a/sw/source/core/inc/unotextmarkup.hxx
+++ b/sw/source/core/inc/unotextmarkup.hxx
@@ -75,7 +75,7 @@ private:
protected:
SwTextNode* GetTextNode();
void ClearTextNode();
- const ModelToViewHelper& GetConversionMap();
+ const ModelToViewHelper& GetConversionMap() const;
};
/** Implementation of the css::container::XStringKeyMap interface
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 65041858c291..b1e414d46880 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -3495,7 +3495,7 @@ public:
void SetFrame( SwFrame* pHold );
SwFrame* GetFrame() { return pFrame; }
void Reset();
- bool IsSet() { return bSet; }
+ bool IsSet() const { return bSet; }
};
void SwFrameHolder::SetFrame( SwFrame* pHold )
@@ -3738,7 +3738,7 @@ SwDeletionChecker::SwDeletionChecker(const SwFrame* pFrame)
}
/// Can be used to check if a frame has been deleted
-bool SwDeletionChecker::HasBeenDeleted()
+bool SwDeletionChecker::HasBeenDeleted() const
{
if ( !mpFrame || !mpRegIn )
return false;
diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx
index 0d388a56d21c..ace092727f1a 100644
--- a/sw/source/core/swg/swblocks.cxx
+++ b/sw/source/core/swg/swblocks.cxx
@@ -249,7 +249,7 @@ SwTextBlocks::~SwTextBlocks()
{
}
-OUString SwTextBlocks::GetName()
+OUString SwTextBlocks::GetName() const
{
return pImp ? pImp->m_aName : OUString();
}
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index e52f220ffbf2..393968dbd032 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -72,7 +72,7 @@ class SwExtraPainter
sal_uLong m_nLineNr;
sal_uInt16 m_nDivider;
bool m_bGoLeft;
- bool IsClipChg() { return m_aClip.IsChg(); }
+ bool IsClipChg() const { return m_aClip.IsChg(); }
SwExtraPainter(const SwExtraPainter&) = delete;
SwExtraPainter& operator=(const SwExtraPainter&) = delete;
@@ -83,8 +83,8 @@ public:
sal_Int16 eHor, bool bLnNm );
SwFont* GetFont() const { return m_pFnt.get(); }
void IncLineNr() { ++m_nLineNr; }
- bool HasNumber() { return !( m_nLineNr % m_rLineInf.GetCountBy() ); }
- bool HasDivider() {
+ bool HasNumber() const { return !( m_nLineNr % m_rLineInf.GetCountBy() ); }
+ bool HasDivider() const {
if( !m_nDivider ) return false;
return !(m_nLineNr % m_rLineInf.GetDividerCountBy());
}
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index c9178e61ede2..94eb7de9f207 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -663,7 +663,7 @@ public:
TextFrameIndex ScanPortionEnd(TextFrameIndex nStart, TextFrameIndex nEnd);
void SetTabOverflow( bool bOverflow ) { m_bTabOverflow = bOverflow; }
- bool IsTabOverflow() { return m_bTabOverflow; }
+ bool IsTabOverflow() const { return m_bTabOverflow; }
};
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index ae0d717f6967..5806f06e3b76 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1260,7 +1260,7 @@ void SwTextCursor::GetCharRect( SwRect* pOrig, TextFrameIndex const nOfst,
* Determines if SwTextCursor::GetCursorOfst() should consider the next portion when calculating the
* doc model position from a Point.
*/
-static bool ConsiderNextPortionForCursorOffset(SwLinePortion* pPor, sal_uInt16 nWidth30, sal_uInt16 nX)
+static bool ConsiderNextPortionForCursorOffset(const SwLinePortion* pPor, sal_uInt16 nWidth30, sal_uInt16 nX)
{
if (!pPor->GetNextPortion())
{
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index 2997b88c763d..2cbcd06c4824 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -162,7 +162,7 @@ public:
virtual bool Format( SwTextFormatInfo &rInf ) override;
// Stuff for justified alignment
- bool IsSpaceAdd() { return m_pLLSpaceAdd != nullptr; }
+ bool IsSpaceAdd() const { return m_pLLSpaceAdd != nullptr; }
void InitSpaceAdd(); // Creates pLLSpaceAdd if necessary
void CreateSpaceAdd( const long nInit = 0 );
void FinishSpaceAdd() { m_pLLSpaceAdd.reset(); }
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index 42980e3f7733..805d0dd1dddd 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -835,7 +835,7 @@ void MetaFieldManager::copyDocumentProperties(const SwDoc& rSource)
m_xDocumentProperties.set(xCloneable->createClone(), uno::UNO_QUERY);
}
-const uno::Reference<document::XDocumentProperties>& MetaFieldManager::getDocumentProperties()
+const uno::Reference<document::XDocumentProperties>& MetaFieldManager::getDocumentProperties() const
{
return m_xDocumentProperties;
}
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index dac54161c7d3..171accf5ae5d 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -328,7 +328,7 @@ public:
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont ) override;
virtual void Do() override;
- TextFrameIndex GetCursor(){ return nCursor; }
+ TextFrameIndex GetCursor() const { return nCursor; }
};
void SwDoCapitalCursorOfst::Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont )
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index b155c0f98e4b..e2dea45e13fb 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -116,7 +116,7 @@ static void TextAttrDelete( SwDoc & rDoc, SwTextAttr * const pAttr )
SwTextAttr::Destroy( pAttr, rDoc.GetAttrPool() );
}
-static bool TextAttrContains(const sal_Int32 nPos, SwTextAttrEnd * const pAttr)
+static bool TextAttrContains(const sal_Int32 nPos, const SwTextAttrEnd * const pAttr)
{
return (pAttr->GetStart() < nPos) && (nPos < *pAttr->End());
}
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index e20c705a0228..77e594e9dafc 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -251,7 +251,7 @@ void SwHistorySetText::SetInDoc( SwDoc* pDoc, bool )
}
}
-SwHistorySetTextField::SwHistorySetTextField( SwTextField* pTextField, sal_uLong nNodePos )
+SwHistorySetTextField::SwHistorySetTextField( const SwTextField* pTextField, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETTXTFLDHNT )
, m_pField( new SwFormatField( *pTextField->GetFormatField().GetField() ) )
{
@@ -309,7 +309,7 @@ void SwHistorySetTextField::SetInDoc( SwDoc* pDoc, bool )
}
}
-SwHistorySetRefMark::SwHistorySetRefMark( SwTextRefMark* pTextHt, sal_uLong nNodePos )
+SwHistorySetRefMark::SwHistorySetRefMark( const SwTextRefMark* pTextHt, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETREFMARKHNT )
, m_RefName( pTextHt->GetRefMark().GetRefName() )
, m_nNodeIndex( nNodePos )
@@ -336,7 +336,7 @@ void SwHistorySetRefMark::SetInDoc( SwDoc* pDoc, bool )
}
}
-SwHistorySetTOXMark::SwHistorySetTOXMark( SwTextTOXMark* pTextHt, sal_uLong nNodePos )
+SwHistorySetTOXMark::SwHistorySetTOXMark( const SwTextTOXMark* pTextHt, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETTOXMARKHNT )
, m_TOXMark( pTextHt->GetTOXMark() )
, m_TOXName( m_TOXMark.GetTOXType()->GetTypeName() )
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 4e83a712dcb3..1fb7f4551881 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -455,7 +455,7 @@ void SwUndoDelLayFormat::RedoForRollback()
DelFly( m_pFrameFormat->GetDoc() );
}
-SwUndoSetFlyFormat::SwUndoSetFlyFormat( SwFrameFormat& rFlyFormat, SwFrameFormat& rNewFrameFormat )
+SwUndoSetFlyFormat::SwUndoSetFlyFormat( SwFrameFormat& rFlyFormat, const SwFrameFormat& rNewFrameFormat )
: SwUndo( SwUndoId::SETFLYFRMFMT, rFlyFormat.GetDoc() ), SwClient( &rFlyFormat ), m_pFrameFormat( &rFlyFormat ),
m_DerivedFromFormatName( rFlyFormat.IsDefault() ? "" : rFlyFormat.DerivedFrom()->GetName() ),
m_NewFormatName( rNewFrameFormat.GetName() ),
diff --git a/sw/source/core/undo/unfmco.cxx b/sw/source/core/undo/unfmco.cxx
index b56aebe7f41d..722e61c7d440 100644
--- a/sw/source/core/undo/unfmco.cxx
+++ b/sw/source/core/undo/unfmco.cxx
@@ -26,7 +26,7 @@
#include <docary.hxx>
SwUndoFormatColl::SwUndoFormatColl( const SwPaM& rRange,
- SwFormatColl* pColl,
+ const SwFormatColl* pColl,
const bool bReset,
const bool bResetListAttrs )
: SwUndo( SwUndoId::SETFMTCOLL, rRange.GetDoc() ),
diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx
index d8bf523b3a42..50a4bfc0cba1 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -95,7 +95,7 @@ public:
return m_rThis.GetDoc() ? m_pFormatFootnote : nullptr;
}
- SwFormatFootnote const& GetFootnoteFormatOrThrow() {
+ SwFormatFootnote const& GetFootnoteFormatOrThrow() const {
SwFormatFootnote const*const pFootnote( GetFootnoteFormat() );
if (!pFootnote) {
throw uno::RuntimeException("SwXFootnote: disposed or invalid", nullptr);
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index ac2197c36583..ae93e9c63b07 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -1522,8 +1522,8 @@ public:
Impl(SwXDocumentIndexMark& rThis,
SwDoc* const pDoc,
const enum TOXTypes eType,
- SwTOXType* const pType,
- SwTOXMark const*const pMark)
+ const SwTOXType* pType,
+ SwTOXMark const* pMark)
: m_rThis(rThis)
, m_bInReplaceMark(false)
, m_rPropSet(
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 137bf4880c83..26a00c334746 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -101,7 +101,7 @@ namespace
, aPosition ( rPosition )
{
}
- sal_Int32 getIndex ()
+ sal_Int32 getIndex () const
{
return aPosition.nContent.GetIndex();
}
@@ -236,7 +236,7 @@ namespace
{
}
- sal_Int32 getIndex ()
+ sal_Int32 getIndex () const
{
return maPosition.nContent.GetIndex();
}
@@ -689,7 +689,7 @@ struct SwXRedlinePortion_Impl
{
}
- sal_Int32 getRealIndex ()
+ sal_Int32 getRealIndex () const
{
return m_bStart ? m_pRedline->Start()->nContent.GetIndex()
: m_pRedline->End() ->nContent.GetIndex();
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index dde6652ff130..683afef3fd17 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -4670,7 +4670,7 @@ void SwXTextCellStyle::SetPhysical()
SAL_WARN("sw.uno", "calling SetPhysical on a physical SwXTextCellStyle");
}
-bool SwXTextCellStyle::IsPhysical()
+bool SwXTextCellStyle::IsPhysical() const
{
return m_bPhysical;
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 48438301f112..8cdddc8d72d2 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1984,7 +1984,7 @@ public:
StartListening(m_pFrameFormat->GetNotifier());
}
- bool IsDescriptor() { return m_pTableProps != nullptr; }
+ bool IsDescriptor() const { return m_pTableProps != nullptr; }
// note: lock mutex before calling this to avoid concurrent update
static std::pair<sal_uInt16, sal_uInt16> ThrowIfComplex(SwXTextTable &rThis)
@@ -3200,8 +3200,8 @@ public:
void SetLabelDescriptions(SwXCellRange & rThis,
const css::uno::Sequence<OUString>& rDesc, bool bRow);
- sal_Int32 GetRowCount();
- sal_Int32 GetColumnCount();
+ sal_Int32 GetRowCount() const;
+ sal_Int32 GetColumnCount() const;
virtual void Notify(const SfxHint& ) override;
@@ -3851,12 +3851,12 @@ void SAL_CALL SwXCellRange::sort(const uno::Sequence< beans::PropertyValue >& rD
}
}
-sal_Int32 SwXCellRange::Impl::GetColumnCount()
+sal_Int32 SwXCellRange::Impl::GetColumnCount() const
{
return m_RangeDescriptor.nRight - m_RangeDescriptor.nLeft + 1;
}
-sal_Int32 SwXCellRange::Impl::GetRowCount()
+sal_Int32 SwXCellRange::Impl::GetRowCount() const
{
return m_RangeDescriptor.nBottom - m_RangeDescriptor.nTop + 1;
}
diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx
index 955793003b4a..09259ed571e1 100644
--- a/sw/source/core/unocore/unotextmarkup.cxx
+++ b/sw/source/core/unocore/unotextmarkup.cxx
@@ -81,7 +81,7 @@ void SwXTextMarkup::ClearTextNode()
m_pImpl->EndListeningAll();
}
-const ModelToViewHelper& SwXTextMarkup::GetConversionMap()
+const ModelToViewHelper& SwXTextMarkup::GetConversionMap() const
{
return m_pImpl->m_ConversionMap;
}
diff --git a/sw/source/core/view/dialoghelp.cxx b/sw/source/core/view/dialoghelp.cxx
index 0ee765845b29..cdb47694456e 100644
--- a/sw/source/core/view/dialoghelp.cxx
+++ b/sw/source/core/view/dialoghelp.cxx
@@ -17,12 +17,12 @@
#include <docsh.hxx>
#include <view.hxx>
-weld::Window* GetFrameWeld(SfxFrame* pFrame)
+weld::Window* GetFrameWeld(const SfxFrame* pFrame)
{
return pFrame ? pFrame->GetWindow().GetFrameWeld() : nullptr;
}
-weld::Window* GetFrameWeld(SfxMedium* pMedium)
+weld::Window* GetFrameWeld(const SfxMedium* pMedium)
{
return GetFrameWeld(pMedium ? pMedium->GetLoadTargetFrame() : nullptr);
}
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 6ec563446366..90f49a0c42ed 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -630,7 +630,7 @@ Point SwViewShell::GetPagePos( sal_uInt16 nPageNum ) const
return GetLayout()->GetPagePos( nPageNum );
}
-sal_uInt16 SwViewShell::GetNumPages()
+sal_uInt16 SwViewShell::GetNumPages() const
{
//It is possible that no layout exists when the method from
//root-Ctor is called.
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index e3f24316dde5..83478a939cb5 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -110,7 +110,7 @@ public:
void SetEndCP(sal_Int32 nCP) {mnEndCP = nCP;}
sal_Int32 GetStartCP() const {return mnStartCP;}
sal_Int32 GetEndCP() const {return mnEndCP;}
- bool IsParaEnd(){ return bIsParaEnd;}
+ bool IsParaEnd() const { return bIsParaEnd;}
void SetIsParaEnd(bool bArg){ bIsParaEnd = bArg;}
};
@@ -283,7 +283,7 @@ public:
// "purely virtual methods" of SfxPoolItem
virtual bool operator==(const SfxPoolItem&) const override;
virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
- const SwTOXBase& GetBase() { return *m_xTOXBase; }
+ const SwTOXBase& GetBase() const { return *m_xTOXBase; }
void SetHadBreakItem( bool bVal ) { bHadBreakItem = bVal; }
void SetHadPageDescItem( bool bVal ) { bHadPageDescItem = bVal; }
bool HadBreakItem() const { return bHadBreakItem; }
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index d8b215e48a95..e2753c4d0de1 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -131,7 +131,7 @@ const SwNode * WW8TableNodeInfoInner::getNode() const
return pResult;
}
-TableBoxVectorPtr WW8TableNodeInfoInner::getTableBoxesOfRow()
+TableBoxVectorPtr WW8TableNodeInfoInner::getTableBoxesOfRow() const
{
TableBoxVectorPtr pResult(new TableBoxVector);
@@ -222,7 +222,7 @@ GridColsPtr WW8TableNodeInfoInner::getGridColsOfRow(AttributeOutputBase & rBase,
return pResult;
}
-WidthsPtr WW8TableNodeInfoInner::getColumnWidthsBasedOnAllRows()
+WidthsPtr WW8TableNodeInfoInner::getColumnWidthsBasedOnAllRows() const
{
WidthsPtr pWidths;
@@ -279,7 +279,7 @@ WidthsPtr WW8TableNodeInfoInner::getColumnWidthsBasedOnAllRows()
return pWidths;
}
-WidthsPtr WW8TableNodeInfoInner::getWidthsOfRow()
+WidthsPtr WW8TableNodeInfoInner::getWidthsOfRow() const
{
WidthsPtr pWidths;
@@ -312,7 +312,7 @@ WidthsPtr WW8TableNodeInfoInner::getWidthsOfRow()
return pWidths;
}
-RowSpansPtr WW8TableNodeInfoInner::getRowSpansOfRow()
+RowSpansPtr WW8TableNodeInfoInner::getRowSpansOfRow() const
{
RowSpansPtr pResult(new RowSpans);
diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx
index 306313485f0b..c381fac9aeea 100644
--- a/sw/source/filter/ww8/WW8TableInfo.hxx
+++ b/sw/source/filter/ww8/WW8TableInfo.hxx
@@ -101,11 +101,11 @@ public:
const SwNode * getNode() const;
- TableBoxVectorPtr getTableBoxesOfRow();
- WidthsPtr getWidthsOfRow();
- WidthsPtr getColumnWidthsBasedOnAllRows();
+ TableBoxVectorPtr getTableBoxesOfRow() const;
+ WidthsPtr getWidthsOfRow() const;
+ WidthsPtr getColumnWidthsBasedOnAllRows() const;
GridColsPtr getGridColsOfRow(AttributeOutputBase & rBase, bool calculateColumnsFromAllRows = false);
- RowSpansPtr getRowSpansOfRow();
+ RowSpansPtr getRowSpansOfRow() const;
#ifdef DBG_UTIL
std::string toString() const;
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 43ab2a6ecd1b..74084f625590 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -683,11 +683,11 @@ class WW8Ruby
public:
WW8Ruby(const SwTextNode& rNode, const SwFormatRuby& rRuby, const MSWordExportBase& rExport );
- sal_Int32 GetJC() { return m_nJC; }
- sal_Char GetDirective() { return m_cDirective; }
- sal_uInt32 GetRubyHeight() { return m_nRubyHeight; }
- sal_uInt32 GetBaseHeight() { return m_nBaseHeight; }
- OUString const & GetFontFamily() { return m_sFontFamily; }
+ sal_Int32 GetJC() const { return m_nJC; }
+ sal_Char GetDirective() const { return m_cDirective; }
+ sal_uInt32 GetRubyHeight() const { return m_nRubyHeight; }
+ sal_uInt32 GetBaseHeight() const { return m_nBaseHeight; }
+ OUString const & GetFontFamily() const { return m_sFontFamily; }
};
#endif // INCLUDED_SW_SOURCE_FILTER_WW8_ATTRIBUTEOUTPUTBASE_HXX
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 2be50ad0ece1..f183bada73b1 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -275,7 +275,7 @@ class FieldMarkParamsHelper
const sw::mark::IFieldmark& mrFieldmark;
public:
explicit FieldMarkParamsHelper( const sw::mark::IFieldmark& rFieldmark ) : mrFieldmark( rFieldmark ) {}
- OUString const & getName() { return mrFieldmark.GetName(); }
+ OUString const & getName() const { return mrFieldmark.GetName(); }
template < typename T >
bool extractParam( const OUString& rKey, T& rResult )
{
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 92fdd032737f..df8e10724987 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -975,7 +975,7 @@ public:
void SetSerializer( ::sax_fastparser::FSHelperPtr const & pSerializer );
/// Occasionally need to use this serializer from the outside
- const ::sax_fastparser::FSHelperPtr& GetSerializer( ) { return m_pSerializer; }
+ const ::sax_fastparser::FSHelperPtr& GetSerializer( ) const { return m_pSerializer; }
/// Do we have any footnotes?
bool HasFootnotes() const;
@@ -1004,11 +1004,11 @@ public:
void BulletDefinition(int nId, const Graphic& rGraphic, Size aSize) override;
void SetWritingHeaderFooter( bool bWritingHeaderFooter ) { m_bWritingHeaderFooter = bWritingHeaderFooter; }
- bool GetWritingHeaderFooter( ) { return m_bWritingHeaderFooter; }
+ bool GetWritingHeaderFooter( ) const { return m_bWritingHeaderFooter; }
void SetAlternateContentChoiceOpen( bool bAltContentChoiceOpen ) { m_bAlternateContentChoiceOpen = bAltContentChoiceOpen; }
- bool IsAlternateContentChoiceOpen( ) { return m_bAlternateContentChoiceOpen; }
+ bool IsAlternateContentChoiceOpen( ) const { return m_bAlternateContentChoiceOpen; }
void GetSdtEndBefore(const SdrObject* pSdrObj);
- bool IsFirstParagraph() { return m_bIsFirstParagraph; }
+ bool IsFirstParagraph() const { return m_bIsFirstParagraph; }
/// Stores the table export state to the passed context and resets own state.
void pushToTableExportContext(DocxTableExportContext& rContext);
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 1dfb33b327a2..00b908dc7efa 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -119,7 +119,7 @@ public:
DocxExportFilter& GetFilter() { return *m_pFilter; };
const DocxExportFilter& GetFilter() const { return *m_pFilter; };
- const ww8::Frame* GetFloatingTableFrame() { return m_pFloatingTableFrame; }
+ const ww8::Frame* GetFloatingTableFrame() const { return m_pFloatingTableFrame; }
/// Access to the attribute output class.
virtual AttributeOutputBase& AttrOutput() const override;
@@ -287,7 +287,7 @@ public:
/// Set the document default tab stop.
void setDefaultTabStop( int stop ) { m_aSettings.defaultTabStop = stop; }
- const ::sax_fastparser::FSHelperPtr& GetFS() { return mpFS; }
+ const ::sax_fastparser::FSHelperPtr& GetFS() const { return mpFS; }
void SetFS(::sax_fastparser::FSHelperPtr const & mpFS);
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index de82c29deae6..5d80a78a9d90 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -180,7 +180,7 @@ public:
m_pSerializer = pSerializer;
}
- const sax_fastparser::FSHelperPtr& getSerializer() { return m_pSerializer; }
+ const sax_fastparser::FSHelperPtr& getSerializer() const { return m_pSerializer; }
void setFlyFrameSize(const Size* pFlyFrameSize) { m_pFlyFrameSize = pFlyFrameSize; }
@@ -219,7 +219,7 @@ public:
void setDrawingOpen(bool bDrawingOpen) { m_bDrawingOpen = bDrawingOpen; }
- bool getDrawingOpen() { return m_bDrawingOpen; }
+ bool getDrawingOpen() const { return m_bDrawingOpen; }
void setParagraphSdtOpen(bool bParagraphSdtOpen) { m_bParagraphSdtOpen = bParagraphSdtOpen; }
@@ -290,11 +290,11 @@ void DocxSdrExport::setSerializer(const sax_fastparser::FSHelperPtr& pSerializer
m_pImpl->setSerializer(pSerializer);
}
-const Size* DocxSdrExport::getFlyFrameSize() { return m_pImpl->getFlyFrameSize(); }
+const Size* DocxSdrExport::getFlyFrameSize() const { return m_pImpl->getFlyFrameSize(); }
-bool DocxSdrExport::getTextFrameSyntax() { return m_pImpl->getTextFrameSyntax(); }
+bool DocxSdrExport::getTextFrameSyntax() const { return m_pImpl->getTextFrameSyntax(); }
-bool DocxSdrExport::getDMLTextFrameSyntax() { return m_pImpl->getDMLTextFrameSyntax(); }
+bool DocxSdrExport::getDMLTextFrameSyntax() const { return m_pImpl->getDMLTextFrameSyntax(); }
rtl::Reference<sax_fastparser::FastAttributeList>& DocxSdrExport::getFlyAttrList()
{
@@ -308,16 +308,16 @@ rtl::Reference<sax_fastparser::FastAttributeList>& DocxSdrExport::getTextboxAttr
OStringBuffer& DocxSdrExport::getTextFrameStyle() { return m_pImpl->getTextFrameStyle(); }
-bool DocxSdrExport::IsDrawingOpen() { return m_pImpl->getDrawingOpen(); }
+bool DocxSdrExport::IsDrawingOpen() const { return m_pImpl->getDrawingOpen(); }
void DocxSdrExport::setParagraphSdtOpen(bool bParagraphSdtOpen)
{
m_pImpl->setParagraphSdtOpen(bParagraphSdtOpen);
}
-bool DocxSdrExport::IsDMLAndVMLDrawingOpen() { return m_pImpl->getDMLAndVMLDrawingOpen(); }
+bool DocxSdrExport::IsDMLAndVMLDrawingOpen() const { return m_pImpl->getDMLAndVMLDrawingOpen(); }
-bool DocxSdrExport::IsParagraphHasDrawing() { return m_pImpl->getParagraphHasDrawing(); }
+bool DocxSdrExport::IsParagraphHasDrawing() const { return m_pImpl->getParagraphHasDrawing(); }
void DocxSdrExport::setParagraphHasDrawing(bool bParagraphHasDrawing)
{
diff --git a/sw/source/filter/ww8/docxsdrexport.hxx b/sw/source/filter/ww8/docxsdrexport.hxx
index 2f7d57c2017d..aecb83c2359d 100644
--- a/sw/source/filter/ww8/docxsdrexport.hxx
+++ b/sw/source/filter/ww8/docxsdrexport.hxx
@@ -60,9 +60,9 @@ public:
void setSerializer(const sax_fastparser::FSHelperPtr& pSerializer);
/// When exporting fly frames, this holds the real size of the frame.
- const Size* getFlyFrameSize();
- bool getTextFrameSyntax();
- bool getDMLTextFrameSyntax();
+ const Size* getFlyFrameSize() const;
+ bool getTextFrameSyntax() const;
+ bool getDMLTextFrameSyntax() const;
rtl::Reference<sax_fastparser::FastAttributeList>& getFlyAttrList();
/// Attributes of the next v:textbox element.
rtl::Reference<sax_fastparser::FastAttributeList>& getTextboxAttrList();
@@ -71,9 +71,9 @@ public:
/// Set if paragraph sdt open in the current drawing.
void setParagraphSdtOpen(bool bParagraphSdtOpen);
- bool IsDrawingOpen();
- bool IsDMLAndVMLDrawingOpen();
- bool IsParagraphHasDrawing();
+ bool IsDrawingOpen() const;
+ bool IsDMLAndVMLDrawingOpen() const;
+ bool IsParagraphHasDrawing() const;
void setParagraphHasDrawing(bool bParagraphHasDrawing);
rtl::Reference<sax_fastparser::FastAttributeList>& getFlyFillAttrList();
sax_fastparser::FastAttributeList* getFlyWrapAttrList();
diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx
index 3e7e49edf0fc..6bdb7d03b450 100644
--- a/sw/source/filter/ww8/escher.hxx
+++ b/sw/source/filter/ww8/escher.hxx
@@ -126,8 +126,8 @@ public:
virtual void WritePictures();
virtual ~SwBasicEscherEx() override;
//i120927,this function is added to export hyperlink info,such as graphic/frame/OLE
- bool IsRelUrl();
- OUString GetBasePath();
+ bool IsRelUrl() const;
+ OUString GetBasePath() const;
OUString BuildFileName(sal_uInt16& rnLevel, bool& rbRel, const OUString& rUrl);
void WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFormatURL* pINetFormatArg);
void PreWriteHyperlinkWithinFly(const SwFrameFormat& rFormat,EscherPropertyContainer& rPropOpt);
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index ac9d2f980943..055aa50ff04e 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -201,7 +201,7 @@ public:
void InsStyle(sal_uInt16 nId, const OString& rStyle);
OString* GetStyle(sal_uInt16 nId);
- const SfxItemSet* GetFirstPageItemSet() { return m_pFirstPageItemSet; }
+ const SfxItemSet* GetFirstPageItemSet() const { return m_pFirstPageItemSet; }
private:
void WriteFonts();
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index af8baa78b3cc..10272bac7467 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -113,7 +113,7 @@ using namespace sw::types;
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::drawing::XShape;
-bool SwBasicEscherEx::IsRelUrl()
+bool SwBasicEscherEx::IsRelUrl() const
{
SvtSaveOptions aSaveOpt;
bool bRelUrl = false;
@@ -123,7 +123,7 @@ bool SwBasicEscherEx::IsRelUrl()
return bRelUrl;
}
-OUString SwBasicEscherEx::GetBasePath()
+OUString SwBasicEscherEx::GetBasePath() const
{
OUString sDocUrl;
SfxMedium * pMedium = rWrt.GetWriter().GetMedia();
diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx
index 61b3f6fc6741..3779098c9ee1 100644
--- a/sw/source/filter/ww8/ww8glsy.hxx
+++ b/sw/source/filter/ww8/ww8glsy.hxx
@@ -40,7 +40,7 @@ public:
WW8GlossaryFib( SvStream& rStrm, sal_uInt8 nWantedVersion, const WW8Fib &rFib)
: WW8Fib(rStrm, nWantedVersion, FindGlossaryFibOffset(rFib)) {}
// fGlsy will indicate whether this has AutoText or not
- bool IsGlossaryFib() {
+ bool IsGlossaryFib() const {
return m_fGlsy;
}
private:
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index f1b33912fc8d..cade9b2cc4d8 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -368,7 +368,7 @@ public:
mxCtx = comphelper::getProcessComponentContext();
}
bool import( const uno::Reference< io::XInputStream >& rxIn );
- OUString getProjectName();
+ OUString getProjectName() const;
};
bool BasicProjImportHelper::import( const uno::Reference< io::XInputStream >& rxIn )
@@ -391,7 +391,7 @@ bool BasicProjImportHelper::import( const uno::Reference< io::XInputStream >& rx
return bRet;
}
-OUString BasicProjImportHelper::getProjectName()
+OUString BasicProjImportHelper::getProjectName() const
{
OUString sProjName( "Standard" );
uno::Reference< beans::XPropertySet > xProps( mrDocShell.GetModel(), uno::UNO_QUERY );
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index f043d44b9a08..8d104eb0e45c 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -548,8 +548,8 @@ namespace sw
explicit Position(const SwPosition &rPos);
Position(const Position &rPos);
operator SwPosition() const;
- const SwNodeIndex& GetPtNode() { return maPtNode; };
- sal_Int32 GetPtContent() { return mnPtContent; };
+ const SwNodeIndex& GetPtNode() const { return maPtNode; };
+ sal_Int32 GetPtContent() const { return mnPtContent; };
};
}
}
@@ -571,11 +571,11 @@ class WW8FieldEntry
WW8FieldEntry &operator=(const WW8FieldEntry &rOther) throw();
void Swap(WW8FieldEntry &rOther) throw();
- SwNodeIndex GetPtNode() { return maStartPos.GetPtNode(); };
- sal_Int32 GetPtContent() { return maStartPos.GetPtContent(); };
+ SwNodeIndex GetPtNode() const { return maStartPos.GetPtNode(); };
+ sal_Int32 GetPtContent() const { return maStartPos.GetPtContent(); };
- const OUString& GetBookmarkName() { return msBookmarkName;}
- const OUString& GetBookmarkCode() { return msMarkCode;}
+ const OUString& GetBookmarkName() const { return msBookmarkName;}
+ const OUString& GetBookmarkCode() const { return msMarkCode;}
void SetBookmarkName(const OUString& bookmarkName);
void SetBookmarkType(const OUString& bookmarkType);
void SetBookmarkCode(const OUString& bookmarkCode);
@@ -1490,8 +1490,8 @@ private:
void SetAttributesAtGrfNode(SvxMSDffImportRec const* pRecord,
SwFrameFormat const *pFlyFormat, WW8_FSPA const *pF);
- bool IsDropCap();
- bool IsListOrDropcap() { return (!m_xCurrentItemSet || m_bDropCap); };
+ bool IsDropCap() const;
+ bool IsListOrDropcap() const { return (!m_xCurrentItemSet || m_bDropCap); };
//Apo == Absolutely Positioned Object, MSWord's old-style frames
std::unique_ptr<WW8FlyPara> ConstructApo(const ApoTestResults &rApo,
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 723581862ef7..aa68d9180295 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2384,7 +2384,7 @@ std::unique_ptr<WW8FlyPara> SwWW8ImplReader::ConstructApo(const ApoTestResults &
return pRet;
}
-bool SwWW8ImplReader::IsDropCap()
+bool SwWW8ImplReader::IsDropCap() const
{
// Find the DCS (Drop Cap Specifier) for the paragraph
// if does not exist or if the first three bits are 0
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index a2dbffa847e2..1c7545ae4e0d 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -479,7 +479,7 @@ public:
const WW8ScannerBase *pSBase);
WW8PLCFpcd_Iter* GetPLCFIter() { return pPcdI.get(); }
void SetClipStart(WW8_CP nIn) { nClipStart = nIn; }
- WW8_CP GetClipStart() { return nClipStart; }
+ WW8_CP GetClipStart() const { return nClipStart; }
static sal_Int32 TransformPieceAddress(long nfc, bool& bIsUnicodeAddress)
{
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index cdc9424e9ac2..d3b52cce6cc3 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -389,7 +389,7 @@ SwCTB::~SwCTB()
{
}
-bool SwCTB::IsMenuToolbar()
+bool SwCTB::IsMenuToolbar() const
{
return tb.IsMenuToolbar();
}
diff --git a/sw/source/filter/ww8/ww8toolbar.hxx b/sw/source/filter/ww8/ww8toolbar.hxx
index ea5456ede91c..bc6a232abc66 100644
--- a/sw/source/filter/ww8/ww8toolbar.hxx
+++ b/sw/source/filter/ww8/ww8toolbar.hxx
@@ -60,7 +60,7 @@ public:
SwCTB();
virtual ~SwCTB() override;
bool Read(SvStream &rS) override;
- bool IsMenuToolbar();
+ bool IsMenuToolbar() const;
bool ImportCustomToolBar( SwCTBWrapper&, CustomToolBarImportHelper& );
bool ImportMenuTB( SwCTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
OUString const & GetName() { return tb.getName().getString(); }
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 748df90325ef..bfd4e488fcb8 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -101,7 +101,7 @@ public:
void CopyPositionInto(SwPosition& rPos, SwDoc & rDoc);
SwDoc* GetDoc();
- bool IsValid();
+ bool IsValid() const;
};
XTextRangeOrNodeIndexPosition::XTextRangeOrNodeIndexPosition()
@@ -171,7 +171,7 @@ SwDoc* XTextRangeOrNodeIndexPosition::GetDoc()
return (nullptr != pIndex) ? pIndex->GetNodes().GetDoc() : lcl_GetDocViaTunnel(xRange);
}
-bool XTextRangeOrNodeIndexPosition::IsValid()
+bool XTextRangeOrNodeIndexPosition::IsValid() const
{
return ( xRange.is() || (pIndex != nullptr) );
}
@@ -562,7 +562,7 @@ void XMLRedlineImportHelper::AdjustStartNodeCursor(
// else: can't find redline -> ignore
}
-inline bool XMLRedlineImportHelper::IsReady(RedlineInfo* pRedline)
+inline bool XMLRedlineImportHelper::IsReady(const RedlineInfo* pRedline)
{
// we can insert a redline if we have start & end, and we don't
// expect adjustments for either of these
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.hxx b/sw/source/filter/xml/XMLRedlineImportHelper.hxx
index 3a7e684c5ea9..2c6d2397b11c 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.hxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.hxx
@@ -117,7 +117,7 @@ public:
private:
- static inline bool IsReady(RedlineInfo* pRedline);
+ static inline bool IsReady(const RedlineInfo* pRedline);
void InsertIntoDocument(RedlineInfo* pRedline);
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index d5fcebe1667c..3f6fff362ff6 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1028,7 +1028,7 @@ public:
OUString& GetDDEApplication() { return sDDEApplication; }
OUString& GetDDEItem() { return sDDEItem; }
OUString& GetDDETopic() { return sDDETopic; }
- bool GetIsAutomaticUpdate() { return bIsAutomaticUpdate; }
+ bool GetIsAutomaticUpdate() const { return bIsAutomaticUpdate; }
};
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 );
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx
index 61a881b314a7..cc225e872aeb 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -554,7 +554,7 @@ void SwModule::GetFormatAuthorAttr( std::size_t nAuthor, SfxItemSet &rSet )
lcl_FillAuthorAttr( nAuthor, rSet, m_pModuleConfig->GetFormatAuthorAttr() );
}
-sal_uInt16 SwModule::GetRedlineMarkPos()
+sal_uInt16 SwModule::GetRedlineMarkPos() const
{
return m_pModuleConfig->GetMarkAlignMode();
}
@@ -584,7 +584,7 @@ void SwModule::SetSplitVerticalByDefault(bool bHTML, bool value)
m_pModuleConfig->SetSplitVerticalByDefault(bHTML, value);
}
-const Color &SwModule::GetRedlineMarkColor()
+const Color &SwModule::GetRedlineMarkColor() const
{
return m_pModuleConfig->GetMarkAlignColor();
}
diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx
index 7c9a027ed031..3a5c34ab8515 100644
--- a/sw/source/uibase/config/modcfg.cxx
+++ b/sw/source/uibase/config/modcfg.cxx
@@ -456,7 +456,7 @@ enum InsertConfigProp
INS_PROP_CAP_OBJECT_OLEMISC_CHARACTERSTYLE, //92
INS_PROP_CAP_OBJECT_OLEMISC_APPLYATTRIBUTES //93
};
-const Sequence<OUString>& SwInsertConfig::GetPropertyNames()
+const Sequence<OUString>& SwInsertConfig::GetPropertyNames() const
{
static Sequence<OUString> aNames
{
diff --git a/sw/source/uibase/config/prtopt.cxx b/sw/source/uibase/config/prtopt.cxx
index 7ded55bfa0de..ceba29eac7bf 100644
--- a/sw/source/uibase/config/prtopt.cxx
+++ b/sw/source/uibase/config/prtopt.cxx
@@ -29,7 +29,7 @@ using namespace utl;
using namespace com::sun::star::uno;
// Ctor
-Sequence<OUString> SwPrintOptions::GetPropertyNames()
+Sequence<OUString> SwPrintOptions::GetPropertyNames() const
{
static const char* aPropNames[] =
{
diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx
index 26c81f745a45..0246b6f039d6 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -82,7 +82,7 @@ SwMasterUsrPref::~SwMasterUsrPref()
{
}
-Sequence<OUString> SwContentViewConfig::GetPropertyNames()
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list