summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcompilerplugins/clang/unusedenumconstants.py1
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/editview.cxx4
-rw-r--r--editeng/source/editeng/impedit.hxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx14
-rw-r--r--include/editeng/editdata.hxx2
-rw-r--r--sc/inc/globstr.hrc2
-rw-r--r--sc/source/ui/src/globstr.src4
-rw-r--r--sc/source/ui/view/spelleng.cxx12
-rw-r--r--sc/source/ui/view/viewfun4.cxx4
-rw-r--r--sd/source/ui/app/strings.src4
-rw-r--r--sd/source/ui/func/futhes.cxx14
-rw-r--r--sd/source/ui/inc/strings.hrc2
-rw-r--r--sd/source/ui/view/Outliner.cxx12
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx2
15 files changed, 25 insertions, 56 deletions
diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py
index f04d056df11d..ec7e73202170 100755
--- a/compilerplugins/clang/unusedenumconstants.py
+++ b/compilerplugins/clang/unusedenumconstants.py
@@ -169,6 +169,7 @@ for d in definitionSet:
"dbaccess/source/inc/dsntypes.hxx", # dbaccess::DATASOURCE_TYPE (from UI)
"cui/source/tabpages/tparea.cxx", # FillType (from UI)
"include/editeng/svxenum.hxx", # css::style::NumberingType
+ "include/editeng/bulletitem.hxx", # css::style::NumberingType
# represents constants from an external API
"opencl/inc/opencl_device_selection.h",
"vcl/inc/sft.hxx",
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index d3bf03f7dd92..dccbed4dbe64 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2168,7 +2168,7 @@ bool EditEngine::SpellNextDocument()
EESpellState EditEngine::HasSpellErrors()
{
if ( !pImpEditEngine->GetSpeller().is() )
- return EE_SPELL_NOSPELLER;
+ return EESpellState::NoSpeller;
return pImpEditEngine->HasSpellErrors();
}
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 897569e58fbc..75774fb5ff29 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -763,7 +763,7 @@ void EditView::CompleteAutoCorrect( vcl::Window* pFrameWin )
EESpellState EditView::StartSpeller( bool bMultipleDoc )
{
if ( !pImpEditView->pEditEngine->pImpEditEngine->GetSpeller().is() )
- return EE_SPELL_NOSPELLER;
+ return EESpellState::NoSpeller;
return pImpEditView->pEditEngine->pImpEditEngine->Spell( this, bMultipleDoc );
}
@@ -771,7 +771,7 @@ EESpellState EditView::StartSpeller( bool bMultipleDoc )
EESpellState EditView::StartThesaurus()
{
if ( !pImpEditView->pEditEngine->pImpEditEngine->GetSpeller().is() )
- return EE_SPELL_NOSPELLER;
+ return EESpellState::NoSpeller;
return pImpEditView->pEditEngine->pImpEditEngine->StartThesaurus( this );
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index d9ec4848cf2a..51452ad7ed27 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -172,7 +172,7 @@ struct SpellInfo
svx::SpellPortions aLastSpellPortions;
SpellContentSelections aLastSpellContentSelections;
SpellInfo()
- { bSpellToEnd = true; eState = EE_SPELL_OK; bMultipleDoc = false; }
+ { bSpellToEnd = true; eState = EESpellState::Ok; bMultipleDoc = false; }
};
// used for text conversion
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 0c457228676e..56d8566a2ec4 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1477,7 +1477,7 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, bool bMultipleDoc )
SAL_WARN_IF( !xSpeller.is(), "editeng", "No Spell checker set!" );
if ( !xSpeller.is() )
- return EE_SPELL_NOSPELLER;
+ return EESpellState::NoSpeller;
aOnlineSpellTimer.Stop();
@@ -1898,7 +1898,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpSpell( EditView* pEditView )
if ( !xSpellAlt.is() )
aCurSel = WordRight( aCurSel.Min(), css::i18n::WordType::DICTIONARY_WORD );
else
- pSpellInfo->eState = EE_SPELL_ERRORFOUND;
+ pSpellInfo->eState = EESpellState::ErrorFound;
}
pEditView->pImpEditView->DrawSelection();
@@ -1946,7 +1946,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpFindNextError(EditSelection& r
aCurSel = WordRight( aCurSel.Min(), css::i18n::WordType::DICTIONARY_WORD );
else
{
- pSpellInfo->eState = EE_SPELL_ERRORFOUND;
+ pSpellInfo->eState = EESpellState::ErrorFound;
rSelection = aCurSel;
}
}
@@ -2456,7 +2456,7 @@ EESpellState ImpEditEngine::HasSpellErrors()
if ( ( aCurSel.Max().GetNode() == pLastNode ) &&
( aCurSel.Max().GetIndex() >= pLastNode->Len() ) )
{
- return EE_SPELL_OK;
+ return EESpellState::Ok;
}
aCurSel = SelectWord( aCurSel, css::i18n::WordType::DICTIONARY_WORD );
@@ -2470,7 +2470,7 @@ EESpellState ImpEditEngine::HasSpellErrors()
aCurSel = WordRight( aCurSel.Max(), css::i18n::WordType::DICTIONARY_WORD );
}
- return EE_SPELL_ERRORFOUND;
+ return EESpellState::ErrorFound;
}
void ImpEditEngine::ClearSpellErrors()
@@ -2487,7 +2487,7 @@ EESpellState ImpEditEngine::StartThesaurus( EditView* pEditView )
Reference< XThesaurus > xThes( LinguMgr::GetThesaurus() );
if (!xThes.is())
- return EE_SPELL_ERRORFOUND;
+ return EESpellState::ErrorFound;
EditAbstractDialogFactory* pFact = EditAbstractDialogFactory::Create();
ScopedVclPtr<AbstractThesaurusDialog> xDlg(pFact->CreateThesaurusDialog( pEditView->GetWindow(), xThes, aWord, GetLanguage( aCurSel.Max() ) ));
@@ -2501,7 +2501,7 @@ EESpellState ImpEditEngine::StartThesaurus( EditView* pEditView )
pEditView->ShowCursor(true, false);
}
- return EE_SPELL_OK;
+ return EESpellState::Ok;
}
sal_Int32 ImpEditEngine::StartSearchAndReplace( EditView* pEditView, const SvxSearchItem& rSearchItem )
diff --git a/include/editeng/editdata.hxx b/include/editeng/editdata.hxx
index 178cf5d42abb..fe184d818853 100644
--- a/include/editeng/editdata.hxx
+++ b/include/editeng/editdata.hxx
@@ -35,7 +35,7 @@ enum EEHorizontalTextDirection { EE_HTEXTDIR_DEFAULT, EE_HTEXTDIR_L2R, EE_HTEXTD
enum EESelectionMode { EE_SELMODE_STD, EE_SELMODE_TXTONLY, EE_SELMODE_HIDDEN };
// EE_SELMODE_HIDDEN can be used to completely hide the selection. This is useful e.g. when you want show the selection
// only as long as your window (which the edit view works on) has the focus
-enum EESpellState { EE_SPELL_OK, EE_SPELL_NOLANGUAGE, EE_SPELL_LANGUAGENOTINSTALLED, EE_SPELL_NOSPELLER, EE_SPELL_ERRORFOUND };
+enum class EESpellState { Ok, LanguageNotInstalled, NoSpeller, ErrorFound };
enum EVAnchorMode {
ANCHOR_TOP_LEFT, ANCHOR_VCENTER_LEFT, ANCHOR_BOTTOM_LEFT,
ANCHOR_TOP_HCENTER, ANCHOR_VCENTER_HCENTER, ANCHOR_BOTTOM_HCENTER,
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 94b4fed8441f..a4e8b22409bb 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -273,7 +273,7 @@
#define STR_UNDO_GRAFEDIT 199
-#define STR_NOLANGERR 200
+// empty
#define STR_UNDO_INSERT_TAB 201
#define STR_UNDO_DELETE_TAB 202
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index be989f198341..23f174ed6917 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -1059,10 +1059,6 @@ String STR_SPELLING_STOP_OK+RID_GLOBSTR_OFFSET
{
Text [ en-US ] = "The spellcheck of this sheet has been completed." ;
};
-String STR_NOLANGERR+RID_GLOBSTR_OFFSET
-{
- Text [ en-US ] = "No language set" ;
-};
String STR_UNDO_INSERT_TAB+RID_GLOBSTR_OFFSET
{
Text [ en-US ] = "Insert Sheet" ;
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index f8b7f29fa25b..4a64409ec8e0 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -285,17 +285,11 @@ ScSpellingEngine::ScSpellingEngine(
void ScSpellingEngine::ConvertAll( EditView& rEditView )
{
- EESpellState eState = EE_SPELL_OK;
+ EESpellState eState = EESpellState::Ok;
if( FindNextConversionCell() )
eState = rEditView.StartSpeller( true );
- OSL_ENSURE( eState != EE_SPELL_NOSPELLER, "ScSpellingEngine::Convert - no spell checker" );
- if( eState == EE_SPELL_NOLANGUAGE )
- {
- vcl::Window* pParent = GetDialogParent();
- ScWaitCursorOff aWaitOff( pParent );
- ScopedVclPtrInstance<InfoBox>( pParent, ScGlobal::GetRscString( STR_NOLANGERR ) )->Execute();
- }
+ OSL_ENSURE( eState != EESpellState::NoSpeller, "ScSpellingEngine::Convert - no spell checker" );
}
bool ScSpellingEngine::SpellNextDocument()
@@ -305,7 +299,7 @@ bool ScSpellingEngine::SpellNextDocument()
bool ScSpellingEngine::NeedsConversion()
{
- return HasSpellErrors() != EE_SPELL_OK;
+ return HasSpellErrors() != EESpellState::Ok;
}
bool ScSpellingEngine::ShowTableWrapDialog()
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 1076636ec120..509bcff6a81e 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -382,9 +382,9 @@ void ScViewFunc::DoThesaurus()
// language is now in EditEngine attributes -> no longer passed to StartThesaurus
eState = pEditView->StartThesaurus();
- OSL_ENSURE(eState != EE_SPELL_NOSPELLER, "No SpellChecker");
+ OSL_ENSURE(eState != EESpellState::NoSpeller, "No SpellChecker");
- if (eState == EE_SPELL_ERRORFOUND) // should happen later through Wrapper!
+ if (eState == EESpellState::ErrorFound) // should happen later through Wrapper!
{
LanguageType eLnge = ScViewUtil::GetEffLanguage( &rDoc, ScAddress( nCol, nRow, nTab ) );
OUString aErr = SvtLanguageTable::GetLanguageString(eLnge);
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index 5922b471f49d..092c18af441e 100644
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -482,10 +482,6 @@ String STR_END_SPELLING_OBJ
{
Text [ en-US ] = "The spellcheck for the selected objects has been completed." ;
};
-String STR_NOLANGUAGE
-{
- Text [ en-US ] = "The selected language is not available." ;
-};
String STR_ASK_FOR_CONVERT_TO_BEZIER
{
Text [ en-US ] = "Convert selected object to curve?" ;
diff --git a/sd/source/ui/func/futhes.cxx b/sd/source/ui/func/futhes.cxx
index ddc34a850764..1f361c0f4868 100644
--- a/sd/source/ui/func/futhes.cxx
+++ b/sd/source/ui/func/futhes.cxx
@@ -108,12 +108,7 @@ void FuThesaurus::DoExecute( SfxRequest& )
}
EESpellState eState = const_cast<OutlinerView*>(pOutlView)->StartThesaurus();
- DBG_ASSERT(eState != EE_SPELL_NOSPELLER, "No SpellChecker");
-
- if (eState == EE_SPELL_NOLANGUAGE)
- {
- ScopedVclPtrInstance<MessageDialog>(mpWindow, SD_RESSTR(STR_NOLANGUAGE))->Execute();
- }
+ DBG_ASSERT(eState != EESpellState::NoSpeller, "No SpellChecker");
}
}
else if (mpViewShell && dynamic_cast< OutlineViewShell *>( mpViewShell ) != nullptr)
@@ -135,12 +130,7 @@ void FuThesaurus::DoExecute( SfxRequest& )
}
EESpellState eState = pOutlView->StartThesaurus();
- DBG_ASSERT(eState != EE_SPELL_NOSPELLER, "No SpellChecker");
-
- if (eState == EE_SPELL_NOLANGUAGE)
- {
- ScopedVclPtrInstance<MessageDialog>(mpWindow, SD_RESSTR(STR_NOLANGUAGE))->Execute();
- }
+ DBG_ASSERT(eState != EESpellState::NoSpeller, "No SpellChecker");
}
}
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index b131a8d81ca0..0de7b7b8a762 100644
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -206,7 +206,7 @@
#define STR_OBJECTS (RID_APP_START+341)
#define STR_END_SPELLING (RID_APP_START+343)
-#define STR_NOLANGUAGE (RID_APP_START+344)
+// empty
#define STR_ASK_FOR_CONVERT_TO_BEZIER (RID_APP_START+347)
#define STR_UNDO_CHANGE_PRES_OBJECT (RID_APP_START+349)
#define STR_UNDO_MODIFY_PAGE (RID_APP_START+350)
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 396e0ef75469..895f2bf31812 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1273,17 +1273,9 @@ void SdOutliner::PutTextIntoOutliner()
void SdOutliner::PrepareSpellCheck()
{
EESpellState eState = HasSpellErrors();
- DBG_ASSERT(eState != EE_SPELL_NOSPELLER, "No SpellChecker");
+ DBG_ASSERT(eState != EESpellState::NoSpeller, "No SpellChecker");
- if (eState == EE_SPELL_NOLANGUAGE)
- {
- mbError = true;
- mbEndOfSearch = true;
- ScopedVclPtrInstance<MessageDialog> aErrorBox (
- nullptr, SD_RESSTR(STR_NOLANGUAGE));
- ShowModalMessageBox (*aErrorBox.get());
- }
- else if (eState != EE_SPELL_OK)
+ if (eState != EESpellState::Ok)
{
// When spell checking we have to test whether we have processed the
// whole document and have reached the start page again.
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index cc8540243c0f..8c564231a15e 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -780,7 +780,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
pOutlView->SetOutputArea( aRect );
aTmpOutliner.SetText( *pParaObj );
aTmpOutliner.ClearModifyFlag();
- bHasSpellError = EE_SPELL_OK != aTmpOutliner.HasSpellErrors();
+ bHasSpellError = EESpellState::Ok != aTmpOutliner.HasSpellErrors();
aTmpOutliner.RemoveView( pOutlView.get() );
}
if(bHasSpellError)