summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-07-17 17:00:14 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-07-18 08:23:28 +0200
commit4dd7c0369d66aa7b30f2b9e547faa5fb2c7cd8dd (patch)
treeb3497428d040c18b167938fcc89f1e034ebafd45 /editeng
parent7dde426915ebbb7ea2ca3dc661f0a9ac70a26d5c (diff)
Various Clang 3.1 -Wunsued-variable, -Wconstant-conversion
Change-Id: I0799f22685609201dfb524c373d065b6184ed53c
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit.hxx4
-rw-r--r--editeng/source/editeng/impedit2.cxx1
-rw-r--r--editeng/source/editeng/impedit4.cxx10
3 files changed, 7 insertions, 8 deletions
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 9aefbe3024fb..750b470af4c4 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -592,7 +592,7 @@ private:
EditPaM StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
EditPaM EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_Bool bAcceptStartOfWord = sal_True );
- EditSelection SelectSentence( const EditSelection& rCurSel );
+ EditSelection SelectSentence( const EditSelection& rCurSel ) const;
EditPaM CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode, sal_Bool bToLeft );
EditPaM CursorVisualStartEnd( EditView* pEditView, const EditPaM& rPaM, sal_Bool bStart );
@@ -670,7 +670,7 @@ private:
::com::sun::star::uno::Reference < ::com::sun::star::i18n::XBreakIterator > ImplGetBreakIterator() const;
::com::sun::star::uno::Reference < ::com::sun::star::i18n::XExtendedInputSequenceChecker > ImplGetInputSequenceChecker() const;
- SpellInfo * CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs );
+ SpellInfo * CreateSpellInfo( bool bMultipleDocs );
ImpEditEngine(); // disabled
ImpEditEngine(EditEngine* pEditEngine, SfxItemPool* pPool);
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 32eadcd5361d..a85b163ff5e8 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1632,6 +1632,7 @@ EditSelection ImpEditEngine::SelectWord( const EditSelection& rCurSel, sal_Int16
}
EditSelection ImpEditEngine::SelectSentence( const EditSelection& rCurSel )
+ const
{
uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
const EditPaM& rPaM = rCurSel.Min();
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 127186060bdc..f5306703ebca 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1425,7 +1425,7 @@ Reference< XSpellChecker1 > ImpEditEngine::GetSpeller()
}
-SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs )
+SpellInfo * ImpEditEngine::CreateSpellInfo( bool bMultipleDocs )
{
if (!pSpellInfo)
pSpellInfo = new SpellInfo;
@@ -1433,7 +1433,6 @@ SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMul
*pSpellInfo = SpellInfo(); // reset to default values
pSpellInfo->bMultipleDoc = bMultipleDocs;
- EditSelection aSentenceSel( SelectSentence( rSel ) );
// always spell draw objects completely, startting at the top.
// (spelling in only a selection or not starting with the top requires
// further changes elsewehe to work properly)
@@ -1459,7 +1458,7 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, sal_Bool bMultipleDoc )
}
EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
- pSpellInfo = CreateSpellInfo( aCurSel, bMultipleDoc );
+ pSpellInfo = CreateSpellInfo( bMultipleDoc );
sal_Bool bIsStart = sal_False;
if ( bMultipleDoc )
@@ -1885,8 +1884,7 @@ void ImpEditEngine::StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc)
{
DBG_ASSERT(!pSpellInfo, "pSpellInfo already set?");
rEditView.pImpEditView->SetEditSelection( aEditDoc.GetStartPaM() );
- EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
- pSpellInfo = CreateSpellInfo( aCurSel, bMultipleDoc );
+ pSpellInfo = CreateSpellInfo( bMultipleDoc );
}
Reference< XSpellAlternatives > ImpEditEngine::ImpFindNextError(EditSelection& rSelection)
@@ -1942,7 +1940,7 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView,
bool bRet = false;
EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
if(!pSpellInfo)
- pSpellInfo = CreateSpellInfo( aCurSel, true );
+ pSpellInfo = CreateSpellInfo( true );
pSpellInfo->aCurSentenceStart = aCurSel.Min();
DBG_ASSERT( xSpeller.is(), "No spell checker set!" );
pSpellInfo->aLastSpellPortions.clear();