summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-16 12:30:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-16 12:44:34 +0200
commitfd2ffceefc942c7f28f2a0146df09e4ff6ad7d09 (patch)
treee2eeeeac51f853358d41549ae8dfd2f4a124d820 /sd
parent4e19742382708a691c6f62c47744fd2fa663216c (diff)
convert EESpellState to scoped enum
and drop unused EE_SPELL_NOLANGUAGE enumerator Change-Id: I74a5f89335883a13d77b39f78b7de55bddb1f107
Diffstat (limited to 'sd')
-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
4 files changed, 5 insertions, 27 deletions
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.