[Libreoffice-commits] core.git: editeng/source include/editeng sw/inc sw/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 4 15:21:06 UTC 2019


 editeng/source/misc/svxacorr.cxx |    5 ++---
 include/editeng/svxacorr.hxx     |    2 +-
 sw/inc/editsh.hxx                |    2 +-
 sw/source/core/edit/edws.cxx     |    2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 5b8625bd88c5c23e5b7be1245737b6a2ac08c373
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Oct 4 12:02:14 2019 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Oct 4 17:20:20 2019 +0200

    SvxAutoCorrect::GetPrevAutoCorrWord should not be const
    
    Change-Id: Icc5f8eae4347e097f7ff22212dd94467d0702353
    Reviewed-on: https://gerrit.libreoffice.org/80198
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index bf3ac6349545..52098a3f0334 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1550,7 +1550,7 @@ bool SvxAutoCorrect::AddWrtSttException( const OUString& rNew,
 
 bool SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc const & rDoc,
                                         const OUString& rTxt, sal_Int32 nPos,
-                                        OUString& rWord ) const
+                                        OUString& rWord )
 {
     if( !nPos )
         return false;
@@ -1581,8 +1581,7 @@ bool SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc const & rDoc,
 
     const LanguageType eLang = GetDocLanguage( rDoc, nCapLttrPos );
 
-    SvxAutoCorrect* pThis = const_cast<SvxAutoCorrect*>(this);
-    CharClass& rCC = pThis->GetCharClass( eLang );
+    CharClass& rCC = GetCharClass(eLang);
 
     if( lcl_IsSymbolChar( rCC, rTxt, nCapLttrPos, nEnde ))
         return false;
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index 4106122ee94b..c9c9bdee9677 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -292,7 +292,7 @@ public:
     // Return for the autotext expansion the previous word,
     // AutoCorrect - corresponding algorithm
     bool GetPrevAutoCorrWord( SvxAutoCorrDoc const & rDoc, const OUString& rTxt,
-                                sal_Int32 nPos, OUString& rWord ) const;
+                                sal_Int32 nPos, OUString& rWord );
 
     // Search for the words in the replacement table.
     // rText - check in this text the words of the list
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 8a2c2064d97b..29271604343d 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -816,7 +816,7 @@ public:
     /// Call AutoCorrect
     void AutoCorrect( SvxAutoCorrect& rACorr, bool bInsertMode,
                         sal_Unicode cChar );
-    bool GetPrevAutoCorrWord( SvxAutoCorrect const & rACorr, OUString& rWord );
+    bool GetPrevAutoCorrWord(SvxAutoCorrect& rACorr, OUString& rWord);
 
     /// Set our styles according to the respective rules.
     void AutoFormat( const SvxSwAutoFormatFlags* pAFlags );
diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx
index 4a238d2a34a0..1abceee1b75d 100644
--- a/sw/source/core/edit/edws.cxx
+++ b/sw/source/core/edit/edws.cxx
@@ -279,7 +279,7 @@ void SwEditShell::SetNewDoc()
     GetDoc()->getIDocumentState().SetNewDoc(true);
 }
 
-bool SwEditShell::GetPrevAutoCorrWord( SvxAutoCorrect const & rACorr, OUString& rWord )
+bool SwEditShell::GetPrevAutoCorrWord(SvxAutoCorrect& rACorr, OUString& rWord)
 {
     SET_CURR_SHELL( this );
 


More information about the Libreoffice-commits mailing list