[Libreoffice-commits] core.git: 15 commits - compilerplugins/clang dbaccess/source desktop/source drawinglayer/source editeng/source extensions/source framework/inc framework/source idlc/inc idlc/source include/drawinglayer include/editeng sc/inc sc/source sd/source starmath/source svx/source sw/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Feb 16 10:45:05 UTC 2017


 compilerplugins/clang/unusedenumconstants.py           |   10 +
 dbaccess/source/ui/inc/QueryDesignView.hxx             |    2 
 dbaccess/source/ui/inc/dbu_qry.hrc                     |    2 
 dbaccess/source/ui/querydesign/QueryDesignView.cxx     |    6 
 dbaccess/source/ui/querydesign/query.src               |    5 
 desktop/source/splash/splash.cxx                       |   27 ---
 drawinglayer/source/primitive2d/textbreakuphelper.cxx  |   18 --
 editeng/source/editeng/editeng.cxx                     |    2 
 editeng/source/editeng/editview.cxx                    |    4 
 editeng/source/editeng/impedit.cxx                     |    4 
 editeng/source/editeng/impedit.hxx                     |    4 
 editeng/source/editeng/impedit4.cxx                    |   14 -
 editeng/source/editeng/impedit5.cxx                    |    8 -
 editeng/source/uno/unofored.cxx                        |    7 
 editeng/source/uno/unoforou.cxx                        |   11 -
 editeng/source/uno/unotext.cxx                         |    2 
 extensions/source/scanner/grid.cxx                     |   14 -
 extensions/source/scanner/grid.hxx                     |    2 
 framework/inc/protocols.h                              |    4 
 framework/inc/uiconfiguration/globalsettings.hxx       |   11 -
 framework/source/dispatch/loaddispatcher.cxx           |    2 
 framework/source/inc/loadenv/loadenv.hxx               |   53 +++----
 framework/source/inc/loadenv/targethelper.hxx          |    3 
 framework/source/layoutmanager/layoutmanager.cxx       |    6 
 framework/source/loadenv/loadenv.cxx                   |    8 -
 framework/source/loadenv/targethelper.cxx              |   12 -
 framework/source/uiconfiguration/globalsettings.cxx    |   24 +--
 idlc/inc/astexpression.hxx                             |   31 +---
 idlc/inc/errorhandler.hxx                              |  100 +++++--------
 idlc/inc/idlctypes.hxx                                 |    1 
 idlc/source/astexpression.cxx                          |  101 ++++++-------
 idlc/source/astscope.cxx                               |    4 
 idlc/source/errorhandler.cxx                           |  128 ++++++-----------
 idlc/source/parser.y                                   |  108 +++++++-------
 include/drawinglayer/primitive2d/textbreakuphelper.hxx |    3 
 include/editeng/editdata.hxx                           |    2 
 include/editeng/editeng.hxx                            |   11 -
 include/editeng/editview.hxx                           |    1 
 include/editeng/unoedprx.hxx                           |    2 
 include/editeng/unoedsrc.hxx                           |    2 
 include/editeng/unofored.hxx                           |    2 
 include/editeng/unoforou.hxx                           |    2 
 include/editeng/unotext.hxx                            |    2 
 sc/inc/globstr.hrc                                     |    2 
 sc/source/core/tool/editutil.cxx                       |    2 
 sc/source/ui/src/globstr.src                           |    4 
 sc/source/ui/view/spelleng.cxx                         |   12 -
 sc/source/ui/view/viewfun4.cxx                         |    4 
 sd/source/ui/app/strings.src                           |    4 
 sd/source/ui/func/futhes.cxx                           |   14 -
 sd/source/ui/inc/strings.hrc                           |    2 
 sd/source/ui/view/Outliner.cxx                         |   12 -
 starmath/source/accessibility.cxx                      |    7 
 starmath/source/accessibility.hxx                      |    2 
 svx/source/accessibility/AccessibleEmptyEditSource.cxx |    2 
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx   |    2 
 56 files changed, 329 insertions(+), 505 deletions(-)

New commits:
commit c04f7de3d2b9fb490ce6ef425d147037cb1b5d8d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 12:34:41 2017 +0200

    remove unused Sentence from BreakupUnit
    
    Change-Id: I324d344a9e9154345b8bd7c8653415cfcbfc26cc

diff --git a/drawinglayer/source/primitive2d/textbreakuphelper.cxx b/drawinglayer/source/primitive2d/textbreakuphelper.cxx
index 91cde4f..fa6b213 100644
--- a/drawinglayer/source/primitive2d/textbreakuphelper.cxx
+++ b/drawinglayer/source/primitive2d/textbreakuphelper.cxx
@@ -260,24 +260,6 @@ namespace drawinglayer
                         }
                         break;
                     }
-                    case BreakupUnit::Sentence:
-                    {
-                        sal_Int32 nNextSentenceBreak(xBreakIterator->endOfSentence(rTxt, nTextPosition, rLocale));
-                        sal_Int32 a(nTextPosition);
-
-                        for(; a < nTextPosition + nTextLength; a++)
-                        {
-                            if(a == nNextSentenceBreak)
-                            {
-                                breakupPortion(aTempResult, nCurrent, a - nCurrent, false);
-                                nCurrent = a;
-                                nNextSentenceBreak = xBreakIterator->endOfSentence(rTxt, a + 1, rLocale);
-                            }
-                        }
-
-                        breakupPortion(aTempResult, nCurrent, a - nCurrent, false);
-                        break;
-                    }
                 }
 
                 mxResult = aTempResult;
diff --git a/include/drawinglayer/primitive2d/textbreakuphelper.hxx b/include/drawinglayer/primitive2d/textbreakuphelper.hxx
index 44dcd71..e63c3f6 100644
--- a/include/drawinglayer/primitive2d/textbreakuphelper.hxx
+++ b/include/drawinglayer/primitive2d/textbreakuphelper.hxx
@@ -33,8 +33,7 @@ namespace drawinglayer
         enum class BreakupUnit
         {
             Character,
-            Word,
-            Sentence
+            Word
         };
 
         class DRAWINGLAYER_DLLPUBLIC TextBreakupHelper
commit fd2ffceefc942c7f28f2a0146df09e4ff6ad7d09
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 12:30:13 2017 +0200

    convert EESpellState to scoped enum
    
    and drop unused EE_SPELL_NOLANGUAGE enumerator
    
    Change-Id: I74a5f89335883a13d77b39f78b7de55bddb1f107

diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py
index f04d056..ec7e732 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 d3bf03f..dccbed4 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 897569e..75774fb 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 d9ec484..51452ad 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 0c45722..56d8566 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 178cf5d..fe184d8 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 94b4fed..a4e8b22 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 be989f1..23f174e 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 f8b7f29..4a64409 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 1076636..509bcff 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 5922b47..092c18a 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 ddc34a8..1f361c0 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 b131a8d..0de7b7b 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 396e0ef..895f2bf 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 cc85402..8c56423 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)
commit 4e19742382708a691c6f62c47744fd2fa663216c
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 11:44:05 2017 +0200

    convert EditEngineAttribs to scoped enum
    
    and drop unused EditEngineAttribs_HardAndPara enumerator
    
    Change-Id: Ic1fcddc6adeb5317f96bcef9b6f715b26d901a8d

diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index bc42f55..d9ec484 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -819,7 +819,7 @@ public:
     sal_uInt32      GetParaHeight( sal_Int32 nParagraph );
 
     SfxItemSet      GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, GetAttribsFlags nFlags = GetAttribsFlags::ALL ) const;
-    SfxItemSet      GetAttribs( EditSelection aSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All  );
+    SfxItemSet      GetAttribs( EditSelection aSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All  );
     void            SetAttribs( EditSelection aSel, const SfxItemSet& rSet, SetAttribsMode nSpecial = SetAttribsMode::NONE );
     void            RemoveCharAttribs( EditSelection aSel, bool bRemoveParaAttribs, sal_uInt16 nWhich );
     void            RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0, bool bRemoveFeatures = false );
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index f089225..edf94a0 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -337,14 +337,14 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl
         // First the very hard formatting ...
         EditDoc::FindAttribs( pNode, nStartPos, nEndPos, aCurSet );
 
-        if( nOnlyHardAttrib != EditEngineAttribs_OnlyHard )
+        if( nOnlyHardAttrib != EditEngineAttribs::OnlyHard )
         {
             // and then paragraph formatting and template...
             for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
             {
                 if ( aCurSet.GetItemState( nWhich ) == SfxItemState::DEFAULT )
                 {
-                    if ( nOnlyHardAttrib == EditEngineAttribs_All )
+                    if ( nOnlyHardAttrib == EditEngineAttribs::All )
                     {
                         const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nWhich );
                         aCurSet.Put( rItem );
@@ -358,7 +358,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl
                 else if ( aCurSet.GetItemState( nWhich ) == SfxItemState::SET )
                 {
                     const SfxPoolItem* pItem = nullptr;
-                    if ( nOnlyHardAttrib == EditEngineAttribs_All )
+                    if ( nOnlyHardAttrib == EditEngineAttribs::All )
                     {
                         pItem = &pNode->GetContentAttribs().GetItem( nWhich );
                     }
@@ -384,7 +384,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl
     }
 
     // fill empty slots with defaults ...
-    if ( nOnlyHardAttrib == EditEngineAttribs_All )
+    if ( nOnlyHardAttrib == EditEngineAttribs::All )
     {
         for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++ )
         {
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx
index 47f7afd..8f7683e 100644
--- a/editeng/source/uno/unofored.cxx
+++ b/editeng/source/uno/unofored.cxx
@@ -68,13 +68,10 @@ SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, EditEngin
         GetAttribsFlags nFlags = GetAttribsFlags::NONE;
         switch( nOnlyHardAttrib )
         {
-        case EditEngineAttribs_All:
+        case EditEngineAttribs::All:
             nFlags = GetAttribsFlags::ALL;
             break;
-        case EditEngineAttribs_HardAndPara:
-            nFlags = GetAttribsFlags::PARAATTRIBS|GetAttribsFlags::CHARATTRIBS;
-            break;
-        case EditEngineAttribs_OnlyHard:
+        case EditEngineAttribs::OnlyHard:
             nFlags = GetAttribsFlags::CHARATTRIBS;
             break;
         default:
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index c41bdac..1fa359a 100644
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -79,13 +79,10 @@ static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, EditE
 
         switch( nOnlyHardAttrib )
         {
-        case EditEngineAttribs_All:
+        case EditEngineAttribs::All:
             nFlags = GetAttribsFlags::ALL;
             break;
-        case EditEngineAttribs_HardAndPara:
-            nFlags = GetAttribsFlags::PARAATTRIBS|GetAttribsFlags::CHARATTRIBS;
-            break;
-        case EditEngineAttribs_OnlyHard:
+        case EditEngineAttribs::OnlyHard:
             nFlags = GetAttribsFlags::CHARATTRIBS;
             break;
         default:
@@ -101,7 +98,7 @@ static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, EditE
 
 SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib ) const
 {
-    if( mpAttribsCache && ( EditEngineAttribs_All == nOnlyHardAttrib ) )
+    if( mpAttribsCache && ( EditEngineAttribs::All == nOnlyHardAttrib ) )
     {
         // have we the correct set in cache?
         if( const_cast<SvxOutlinerForwarder*>(this)->maAttribCacheSelection.IsEqual(rSel) )
@@ -123,7 +120,7 @@ SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, EditEngineA
 
     SfxItemSet aSet( ImplOutlinerForwarderGetAttribs( rSel, nOnlyHardAttrib, rEditEngine ) );
 
-    if( EditEngineAttribs_All == nOnlyHardAttrib )
+    if( EditEngineAttribs::All == nOnlyHardAttrib )
     {
         mpAttribsCache = new SfxItemSet( aSet );
         maAttribCacheSelection = rSel;
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index f3fe061..17e4560 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1066,7 +1066,7 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co
         {
             ESelection aSel( GetSelection() );
             CheckSelection( aSel, pForwarder );
-            pSet = new SfxItemSet( pForwarder->GetAttribs( aSel, EditEngineAttribs_OnlyHard ) );
+            pSet = new SfxItemSet( pForwarder->GetAttribs( aSel, EditEngineAttribs::OnlyHard ) );
         }
 
         bool bUnknownPropertyFound = false;
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 4742a60..d3e3f7e 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -113,12 +113,11 @@ enum class CharCompressType;
 
 
 /** values for:
-       SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All );
+       SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All );
 */
-enum EditEngineAttribs {
-    EditEngineAttribs_All,          /// returns all attributes even when theire not set
-    EditEngineAttribs_HardAndPara,  /// returns all attributes set on paragraph and on portions
-    EditEngineAttribs_OnlyHard      /// returns only attributes hard set on portions
+enum class EditEngineAttribs {
+    All,          /// returns all attributes even when they are not set
+    OnlyHard      /// returns only attributes hard set on portions
 };
 
 /** values for:
@@ -321,7 +320,7 @@ public:
     void            GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const;
 
     SfxItemSet      GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, GetAttribsFlags nFlags = GetAttribsFlags::ALL ) const;
-    SfxItemSet      GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All );
+    SfxItemSet      GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All );
 
     bool            HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const;
     const SfxPoolItem&  GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich );
diff --git a/include/editeng/unoedprx.hxx b/include/editeng/unoedprx.hxx
index ab28fe5..cc92ef4 100644
--- a/include/editeng/unoedprx.hxx
+++ b/include/editeng/unoedprx.hxx
@@ -36,7 +36,7 @@ public:
     virtual sal_Int32       GetParagraphCount() const override;
     virtual sal_Int32       GetTextLen( sal_Int32 nParagraph ) const override;
     virtual OUString        GetText( const ESelection& rSel ) const override;
-    virtual SfxItemSet      GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const override;
+    virtual SfxItemSet      GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All ) const override;
     virtual SfxItemSet      GetParaAttribs( sal_Int32 nPara ) const override;
     virtual void            SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override;
     virtual void            RemoveAttribs( const ESelection& rSelection ) override;
diff --git a/include/editeng/unoedsrc.hxx b/include/editeng/unoedsrc.hxx
index e493081..fdd7eb8 100644
--- a/include/editeng/unoedsrc.hxx
+++ b/include/editeng/unoedsrc.hxx
@@ -142,7 +142,7 @@ public:
     virtual sal_Int32   GetParagraphCount() const = 0;
     virtual sal_Int32   GetTextLen( sal_Int32 nParagraph ) const = 0;
     virtual OUString    GetText( const ESelection& rSel ) const = 0;
-    virtual SfxItemSet  GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const = 0;
+    virtual SfxItemSet  GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All ) const = 0;
     virtual SfxItemSet  GetParaAttribs( sal_Int32 nPara ) const = 0;
     virtual void        SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) = 0;
     virtual void        RemoveAttribs( const ESelection& rSelection ) = 0;
diff --git a/include/editeng/unofored.hxx b/include/editeng/unofored.hxx
index 6bd9975..b6c561c 100644
--- a/include/editeng/unofored.hxx
+++ b/include/editeng/unofored.hxx
@@ -38,7 +38,7 @@ public:
     virtual sal_Int32   GetParagraphCount() const override;
     virtual sal_Int32   GetTextLen( sal_Int32 nParagraph ) const override;
     virtual OUString    GetText( const ESelection& rSel ) const override;
-    virtual SfxItemSet  GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const override;
+    virtual SfxItemSet  GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All ) const override;
     virtual SfxItemSet  GetParaAttribs( sal_Int32 nPara ) const override;
     virtual void        SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override;
     virtual void        RemoveAttribs( const ESelection& rSelection ) override;
diff --git a/include/editeng/unoforou.hxx b/include/editeng/unoforou.hxx
index 1efbefa..7159db6 100644
--- a/include/editeng/unoforou.hxx
+++ b/include/editeng/unoforou.hxx
@@ -56,7 +56,7 @@ public:
     virtual sal_Int32   GetParagraphCount() const override;
     virtual sal_Int32   GetTextLen( sal_Int32 nParagraph ) const override;
     virtual OUString    GetText( const ESelection& rSel ) const override;
-    virtual SfxItemSet  GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const override;
+    virtual SfxItemSet  GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All ) const override;
     virtual SfxItemSet  GetParaAttribs( sal_Int32 nPara ) const override;
     virtual void        SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override;
     virtual void        RemoveAttribs( const ESelection& rSelection ) override;
diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx
index a2cd5d2..a9b42bd 100644
--- a/include/editeng/unotext.hxx
+++ b/include/editeng/unotext.hxx
@@ -180,7 +180,7 @@ public:
     virtual sal_Int32       GetParagraphCount() const override;
     virtual sal_Int32       GetTextLen( sal_Int32 nParagraph ) const override;
     virtual OUString        GetText( const ESelection& rSel ) const override;
-    virtual SfxItemSet      GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const override;
+    virtual SfxItemSet      GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All ) const override;
     virtual SfxItemSet      GetParaAttribs( sal_Int32 nPara ) const override;
     virtual void            SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override;
     virtual void            RemoveAttribs( const ESelection& rSelection ) override;
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 32d4a42..e820f11 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -382,7 +382,7 @@ ScEditAttrTester::ScEditAttrTester( ScEditEngineDefaulter* pEng ) :
     {
         const SfxPoolItem* pItem = nullptr;
         pEditAttrs.reset( new SfxItemSet( pEngine->GetAttribs(
-                                        ESelection(0,0,0,pEngine->GetTextLen(0)), EditEngineAttribs_OnlyHard ) ) );
+                                        ESelection(0,0,0,pEngine->GetTextLen(0)), EditEngineAttribs::OnlyHard ) ) );
         const SfxItemSet& rEditDefaults = pEngine->GetDefaults();
 
         for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && !bNeedsObject; nId++)
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 6e23b4a..cc56028 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -928,13 +928,10 @@ SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, EditEngineAttrib
         GetAttribsFlags nFlags = GetAttribsFlags::NONE;
         switch( nOnlyHardAttrib )
         {
-        case EditEngineAttribs_All:
+        case EditEngineAttribs::All:
             nFlags = GetAttribsFlags::ALL;
             break;
-        case EditEngineAttribs_HardAndPara:
-            nFlags = GetAttribsFlags::PARAATTRIBS|GetAttribsFlags::CHARATTRIBS;
-            break;
-        case EditEngineAttribs_OnlyHard:
+        case EditEngineAttribs::OnlyHard:
             nFlags = GetAttribsFlags::CHARATTRIBS;
             break;
         default:
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index dbe9d40..b69978e 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -188,7 +188,7 @@ public:
     virtual sal_Int32   GetParagraphCount() const override;
     virtual sal_Int32   GetTextLen( sal_Int32 nParagraph ) const override;
     virtual OUString    GetText( const ESelection& rSel ) const override;
-    virtual SfxItemSet  GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const override;
+    virtual SfxItemSet  GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All ) const override;
     virtual SfxItemSet  GetParaAttribs( sal_Int32 nPara ) const override;
     virtual void        SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override;
     virtual void        RemoveAttribs( const ESelection& rSelection ) override;
diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
index 37b9ed2..5b329f4 100644
--- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx
+++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
@@ -89,7 +89,7 @@ namespace accessibility
         sal_Int32          GetParagraphCount() const override { return 1; }
         sal_Int32          GetTextLen( sal_Int32 /*nParagraph*/ ) const override { return 0; }
         OUString           GetText( const ESelection& /*rSel*/ ) const override { return OUString(); }
-        SfxItemSet         GetAttribs( const ESelection& /*rSel*/, EditEngineAttribs /*nOnlyHardAttrib*/ = EditEngineAttribs_All ) const override
+        SfxItemSet         GetAttribs( const ESelection& /*rSel*/, EditEngineAttribs /*nOnlyHardAttrib*/ = EditEngineAttribs::All ) const override
         {
             // AW: Very dangerous: The former implementation used a SfxItemPool created on the
             // fly which of course was deleted again ASAP. Thus, the returned SfxItemSet was using
commit 1c3de19e9892deabd7ed2f47afbdf86f292eff8f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 10:55:46 2017 +0200

    remove unused NONE from ScrollRangeCheck enum
    
    Change-Id: I9d83cc38a9fa477a61ec7e2ec3d9786318187085

diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py
index 291f350..f04d056 100755
--- a/compilerplugins/clang/unusedenumconstants.py
+++ b/compilerplugins/clang/unusedenumconstants.py
@@ -133,6 +133,10 @@ for d in definitionSet:
          "sc/source/ui/docshell/impex.cxx", # SylkVersion
          "include/rsc/rsc-vcl-shared-types.hxx", # KeyFuncType
          "include/i18nutil/paper.hxx", # Paper
+         "cppcanvas/source/mtfrenderer/emfplus.cxx", # EmfPlusCombineMode
+         "cppcanvas/source/mtfrenderer/emfpbrush.hxx", # EmfPlusHatchStyle
+         "include/filter/msfilter/svdfppt.hxx", # PptPlaceholder, PptSlideLayout
+         "include/filter/msfilter/escherex.hxx", # various
         # Windows or OSX only
          "include/canvas/rendering/icolorbuffer.hxx",
          "include/vcl/commandevent.hxx",
@@ -162,6 +166,9 @@ for d in definitionSet:
          "sc/source/ui/inc/scuitphfedit.hxx", # ScHFEntryId (from UI)
          "include/i18nlangtag/languagetag.hxx", # LanguageTag::ScriptType
          "extensions/source/scanner/grid.hxx", # ResetType (from UI)
+         "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
         # represents constants from an external API
          "opencl/inc/opencl_device_selection.h",
          "vcl/inc/sft.hxx",
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 8df3d06..a91649c 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1096,7 +1096,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck )
         long nDiff = pEditEngine->pImpEditEngine->GetTextHeight() - aNewVisArea.Bottom(); // negative
         aNewVisArea.Move( 0, nDiff );   // could end up in the negative area...
     }
-    if ( ( aNewVisArea.Top() < 0 ) && ( nRangeCheck != ScrollRangeCheck::NONE ) )
+    if ( aNewVisArea.Top() < 0 )
         aNewVisArea.Move( 0, -aNewVisArea.Top() );
 
     // Horizontal:
@@ -1115,7 +1115,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck )
         long nDiff = pEditEngine->pImpEditEngine->CalcTextWidth( false ) - aNewVisArea.Right();     // negative
         aNewVisArea.Move( nDiff, 0 );   // could end up in the negative area...
     }
-    if ( ( aNewVisArea.Left() < 0 ) && ( nRangeCheck != ScrollRangeCheck::NONE ) )
+    if ( aNewVisArea.Left() < 0 )
         aNewVisArea.Move( -aNewVisArea.Left(), 0 );
 
     // The difference must be alignt on pixel (due to scroll!)
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 95b3228..adabc65 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -73,7 +73,6 @@ namespace linguistic2 {
 
 enum class ScrollRangeCheck
 {
-    NONE          = 0,   // No correction of VisArea when scrolling
     NoNegative    = 1,   // No negative VisArea when scrolling
     PaperWidthTextSize = 2,   // VisArea must be within paper width, Text Size
 };
commit 2f358c639238e1121685b85d9ee04b26a88ac762
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 10:43:11 2017 +0200

    drop unused eTooManyConditions,eColumnInLikeNotFound from SqlParseError enum
    
    Change-Id: I92fc8d768baa7ed62c85d13da01f984385bef4f9

diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx
index ff864c0..d6360ca 100644
--- a/dbaccess/source/ui/inc/QueryDesignView.hxx
+++ b/dbaccess/source/ui/inc/QueryDesignView.hxx
@@ -41,12 +41,10 @@ namespace dbaui
         eNoConnection,
         eNoSelectStatement,
         eStatementTooComplex,
-        eColumnInLikeNotFound,
         eNoColumnInLike,
         eColumnNotFound,
         eNativeMode,
         eTooManyTables,
-        eTooManyConditions,
         eTooManyColumns,
         eIllegalJoinCondition,
         eOk
diff --git a/dbaccess/source/ui/inc/dbu_qry.hrc b/dbaccess/source/ui/inc/dbu_qry.hrc
index a628692..b14c243 100644
--- a/dbaccess/source/ui/inc/dbu_qry.hrc
+++ b/dbaccess/source/ui/inc/dbu_qry.hrc
@@ -60,7 +60,7 @@
 #define STR_QRY_SYNTAX                      RID_STR_QRY_START + 38
 #define STR_QRY_NATIVE                      RID_STR_QRY_START + 39
 #define STR_QRY_TOO_MANY_TABLES             RID_STR_QRY_START + 40
-#define STR_QRY_TOOMANYCOND                 RID_STR_QRY_START + 41
+// empty
 #define STR_QUERYDESIGN                     RID_STR_QRY_START + 42
 #define STR_VIEWDESIGN                      RID_STR_QRY_START + 43
 #define STR_JOIN_TYPE_HINT                  RID_STR_QRY_START + 44
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index be8deec..5c8da41 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2422,9 +2422,6 @@ namespace
             case eNoSelectStatement:
                 nResId = STR_QRY_NOSELECT;
                 break;
-            case eColumnInLikeNotFound:
-                nResId = STR_QRY_SYNTAX;
-                break;
             case eNoColumnInLike:
                 nResId = STR_QRY_SYNTAX;
                 break;
@@ -2437,9 +2434,6 @@ namespace
             case eTooManyTables:
                 nResId = STR_QRY_TOO_MANY_TABLES;
                 break;
-            case eTooManyConditions:
-                nResId = STR_QRY_TOOMANYCOND;
-                break;
             case eTooManyColumns:
                 nResId = STR_QRY_TOO_MANY_COLUMNS;
                 break;
diff --git a/dbaccess/source/ui/querydesign/query.src b/dbaccess/source/ui/querydesign/query.src
index eaaa29d..560afdf 100644
--- a/dbaccess/source/ui/querydesign/query.src
+++ b/dbaccess/source/ui/querydesign/query.src
@@ -243,11 +243,6 @@ String STR_QRY_NOSELECT
     Text [ en-US ] = "Nothing has been selected." ;
 };
 
-String STR_QRY_TOOMANYCOND
-{
-    Text [ en-US ] = "Too many search criteria" ;
-};
-
 String STR_QRY_SYNTAX
 {
     Text [ en-US ] = "SQL syntax error" ;
commit b57b51bd013bc2b61ac1a8a27b7cee9058488284
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 10:40:29 2017 +0200

    drop BitmapMode enum
    
    since we only use the BM_DEFAULTMODE enumerator
    
    Change-Id: I425a2ca09d4a15d755010e8f963387071c0138ae

diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index e809b4e..7b3bb79 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -68,8 +68,6 @@ class  SplashScreen
 {
     friend class SplashScreenWindow;
 private:
-    enum BitmapMode { BM_FULLSCREEN, BM_DEFAULTMODE };
-
     VclPtr<SplashScreenWindow> pWindow;
 
     DECL_LINK( AppEventListenerHdl, VclSimpleEvent&, void );
@@ -91,7 +89,6 @@ private:
 
     sal_Int32   _iMax;
     sal_Int32   _iProgress;
-    BitmapMode  _eBitmapMode;
     bool        _bPaintProgress;
     bool        _bVisible;
     bool        _bShowLogo;
@@ -157,7 +154,6 @@ SplashScreen::SplashScreen()
     , _bNativeProgress(true)
     , _iMax(100)
     , _iProgress(0)
-    , _eBitmapMode(BM_DEFAULTMODE)
     , _bPaintProgress(false)
     , _bVisible(true)
     , _bShowLogo(true)
@@ -195,8 +191,6 @@ void SAL_CALL SplashScreen::start(const OUString&, sal_Int32 nRange)
     if (_bVisible) {
         _bProgressEnd = false;
         SolarMutexGuard aSolarGuard;
-        if ( _eBitmapMode == BM_FULLSCREEN )
-            pWindow->ShowFullScreenMode();
         pWindow->Show();
         pWindow->Redraw();
     }
@@ -207,8 +201,6 @@ void SAL_CALL SplashScreen::end()
     _iProgress = _iMax;
     if (_bVisible )
     {
-        if ( _eBitmapMode == BM_FULLSCREEN )
-            pWindow->EndFullScreenMode();
         pWindow->Hide();
     }
     _bProgressEnd = true;
@@ -219,8 +211,6 @@ void SAL_CALL SplashScreen::reset()
     _iProgress = 0;
     if (_bVisible && !_bProgressEnd )
     {
-        if ( _eBitmapMode == BM_FULLSCREEN )
-            pWindow->ShowFullScreenMode();
         pWindow->Show();
         updateStatus();
     }
@@ -235,8 +225,6 @@ void SAL_CALL SplashScreen::setText(const OUString& rText)
 
         if (_bVisible && !_bProgressEnd)
         {
-            if ( _eBitmapMode == BM_FULLSCREEN )
-                pWindow->ShowFullScreenMode();
             pWindow->Show();
             updateStatus();
         }
@@ -249,8 +237,6 @@ void SAL_CALL SplashScreen::setValue(sal_Int32 nValue)
 
     SolarMutexGuard aSolarGuard;
     if (_bVisible && !_bProgressEnd) {
-        if ( _eBitmapMode == BM_FULLSCREEN )
-            pWindow->ShowFullScreenMode();
         pWindow->Show();
         if (nValue >= _iMax)
             _iProgress = _iMax;
@@ -291,19 +277,6 @@ SplashScreen::initialize( const css::uno::Sequence< css::uno::Any>& aArguments )
                 _barwidth = 263;
             if ( NOT_LOADED == _barheight )
                 _barheight = 8;
-            if (( _eBitmapMode == BM_FULLSCREEN ) &&
-                _bFullScreenSplash )
-            {
-                if( ( _fXPos >= 0.0 ) && ( _fYPos >= 0.0 ))
-                {
-                    _tlx = sal_Int32( double( aSize.Width() ) * _fXPos );
-                    _tly = sal_Int32( double( aSize.Height() ) * _fYPos );
-                }
-                if ( _fWidth >= 0.0 )
-                    _barwidth  = sal_Int32( double( aSize.Width() ) * _fWidth );
-                if ( _fHeight >= 0.0 )
-                    _barheight = sal_Int32( double( aSize.Width() ) * _fHeight );
-            }
         }
         else
         {
commit ee36298909783fa3e722349d6efee061749041c0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 10:32:45 2017 +0200

    convert resetType to scoped enum
    
    Change-Id: Ie127b99949546b5303fd105c662b25c62d409941

diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py
index 64aaa59..291f350 100755
--- a/compilerplugins/clang/unusedenumconstants.py
+++ b/compilerplugins/clang/unusedenumconstants.py
@@ -113,6 +113,7 @@ for d in definitionSet:
          "starmath/source/mathtype.hxx", # MathType::MTOKENS
          "sd/source/filter/eppt/epptbase.hxx", # PPTExTextAttr
          "sc/source/filter/inc/tokstack.hxx", # E_TYPE
+         "filter/source/graphicfilter/icgm/cgmtypes.hxx",
         # unit test code
          "cppu/source/uno/check.cxx",
         # general weird nonsense going on
@@ -160,6 +161,7 @@ for d in definitionSet:
          "sd/inc/pres.hxx", # AutoLayout (from UI)
          "sc/source/ui/inc/scuitphfedit.hxx", # ScHFEntryId (from UI)
          "include/i18nlangtag/languagetag.hxx", # LanguageTag::ScriptType
+         "extensions/source/scanner/grid.hxx", # ResetType (from UI)
         # represents constants from an external API
          "opencl/inc/opencl_device_selection.h",
          "vcl/inc/sft.hxx",
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx
index 90faba3..4f8c285 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -127,7 +127,7 @@ public:
 
     double* getNewYValues() { return m_pNewYValues; }
 
-    void ChangeMode(int nType);
+    void ChangeMode(ResetType nType);
 
     virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override;
 };
@@ -631,11 +631,11 @@ void GridWindow::MouseButtonDown( const MouseEvent& rEvt )
     Window::MouseButtonDown( rEvt );
 }
 
-void GridWindow::ChangeMode(int nType)
+void GridWindow::ChangeMode(ResetType nType)
 {
     switch( nType )
     {
-        case LINEAR_ASCENDING:
+        case ResetType::LINEAR_ASCENDING:
         {
             for( int i = 0; i < m_nValues; i++ )
             {
@@ -643,7 +643,7 @@ void GridWindow::ChangeMode(int nType)
             }
         }
         break;
-        case LINEAR_DESCENDING:
+        case ResetType::LINEAR_DESCENDING:
         {
             for( int i = 0; i < m_nValues; i++ )
             {
@@ -651,13 +651,13 @@ void GridWindow::ChangeMode(int nType)
             }
         }
         break;
-        case RESET:
+        case ResetType::RESET:
         {
             if( m_pOrigYValues && m_pNewYValues && m_nValues )
                 memcpy( m_pNewYValues, m_pOrigYValues, m_nValues*sizeof(double) );
         }
         break;
-        case EXPONENTIAL:
+        case ResetType::EXPONENTIAL:
         {
             for( int i = 0; i < m_nValues; i++ )
             {
@@ -704,7 +704,7 @@ IMPL_LINK( GridDialog, ClickButtonHdl, Button*, pButton, void )
     if (pButton == m_pResetButton)
     {
         int nType = m_pResetTypeBox->GetSelectEntryPos();
-        m_pGridWindow->ChangeMode(nType);
+        m_pGridWindow->ChangeMode((ResetType)nType);
     }
 }
 
diff --git a/extensions/source/scanner/grid.hxx b/extensions/source/scanner/grid.hxx
index 73effc6..57e1106 100644
--- a/extensions/source/scanner/grid.hxx
+++ b/extensions/source/scanner/grid.hxx
@@ -27,7 +27,7 @@
 
 class GridWindow;
 
-enum resetType
+enum class ResetType
 {
     LINEAR_ASCENDING = 0,
     LINEAR_DESCENDING = 1,
commit 8c5860aeb47c5ba49e06a2af961a2448debe2b50
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 10:30:07 2017 +0200

    drop unused Private from EProtocol enum
    
    Change-Id: Ic3f64eb211e520dbafed4ef98344ab5cb0811599

diff --git a/framework/inc/protocols.h b/framework/inc/protocols.h
index 4e7f1cb..3496b75 100644
--- a/framework/inc/protocols.h
+++ b/framework/inc/protocols.h
@@ -56,7 +56,6 @@ namespace framework{
 /** well known protocols */
 enum class EProtocol
 {
-    Private,
     PrivateObject,
     PrivateStream,
     PrivateFactory,
@@ -82,9 +81,6 @@ class ProtocolCheck
         bool bRet = false;
         switch(eRequired)
         {
-            case EProtocol::Private:
-                bRet = sURL.startsWith(SPECIALPROTOCOL_PRIVATE);
-                break;
             case EProtocol::PrivateObject:
                 bRet = sURL.startsWith(SPECIALPROTOCOL_PRIVATE_OBJECT);
                 break;
commit d5c3e8004b2a3df1c0f624639e7dd3a650b868ac
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 10:29:10 2017 +0200

    drop enum framework::GlobalSettings::UIElementType
    
    since we only ever use the one enumerator.
    Consequently renaming some methods
    
    Change-Id: Ia8c022135df6661b8f300e037ea3e7cf610b63ac

diff --git a/framework/inc/uiconfiguration/globalsettings.hxx b/framework/inc/uiconfiguration/globalsettings.hxx
index 2609647..7123836 100644
--- a/framework/inc/uiconfiguration/globalsettings.hxx
+++ b/framework/inc/uiconfiguration/globalsettings.hxx
@@ -44,13 +44,6 @@ class GlobalSettings
         GlobalSettings( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
         ~GlobalSettings();
 
-        enum UIElementType
-        {
-            UIELEMENT_TYPE_TOOLBAR,
-            UIELEMENT_TYPE_DOCKWINDOW,
-            UIELEMENT_TYPE_STATUSBAR
-        };
-
         enum StateInfo
         {
             STATEINFO_LOCKED,
@@ -58,8 +51,8 @@ class GlobalSettings
         };
 
         // settings access
-        bool HasStatesInfo( UIElementType eElementType );
-        bool GetStateInfo( UIElementType eElementType, StateInfo eStateInfo, css::uno::Any& aValue );
+        bool HasToolbarStatesInfo();
+        bool GetToolbarStateInfo( StateInfo eStateInfo, css::uno::Any& aValue );
 
     private:
         GlobalSettings(const GlobalSettings&) = delete;
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 2f9f881..425b578 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -584,18 +584,18 @@ bool LayoutManager::readWindowStateData( const OUString& aName, UIElement& rElem
             // oversteer values with global settings
             if ( pGlobalSettings && ( bGetSettingsState || bGlobalSettings ))
             {
-                if ( pGlobalSettings->HasStatesInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR ))
+                if ( pGlobalSettings->HasToolbarStatesInfo())
                 {
                     SolarMutexClearableGuard aWriteLock2;
                     bInGlobalSettings = true;
                     aWriteLock2.clear();
 
                     uno::Any aValue;
-                    if ( pGlobalSettings->GetStateInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR,
+                    if ( pGlobalSettings->GetToolbarStateInfo(
                                                         GlobalSettings::STATEINFO_LOCKED,
                                                         aValue ))
                         aValue >>= rElementData.m_aDockedData.m_bLocked;
-                    if ( pGlobalSettings->GetStateInfo( GlobalSettings::UIELEMENT_TYPE_TOOLBAR,
+                    if ( pGlobalSettings->GetToolbarStateInfo(
                                                         GlobalSettings::STATEINFO_DOCKED,
                                                         aValue ))
                     {
diff --git a/framework/source/uiconfiguration/globalsettings.cxx b/framework/source/uiconfiguration/globalsettings.cxx
index c5e8e2b..94df703 100644
--- a/framework/source/uiconfiguration/globalsettings.cxx
+++ b/framework/source/uiconfiguration/globalsettings.cxx
@@ -60,8 +60,8 @@ class GlobalSettings_Access : public ::cppu::WeakImplHelper<
         virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
 
         // settings access
-        bool HasStatesInfo( GlobalSettings::UIElementType eElementType );
-        bool GetStateInfo( GlobalSettings::UIElementType eElementType, GlobalSettings::StateInfo eStateInfo, css::uno::Any& aValue );
+        bool HasToolbarStatesInfo();
+        bool GetToolbarStateInfo( GlobalSettings::StateInfo eStateInfo, css::uno::Any& aValue );
 
     private:
         void impl_initConfigAccess();
@@ -112,13 +112,9 @@ void SAL_CALL GlobalSettings_Access::disposing( const css::lang::EventObject& )
 }
 
 // settings access
-bool GlobalSettings_Access::HasStatesInfo( GlobalSettings::UIElementType eElementType )
+bool GlobalSettings_Access::HasToolbarStatesInfo()
 {
     osl::MutexGuard g(m_mutex);
-    if ( eElementType == GlobalSettings::UIELEMENT_TYPE_DOCKWINDOW )
-        return false;
-    else if ( eElementType == GlobalSettings::UIELEMENT_TYPE_STATUSBAR )
-        return false;
 
     if ( m_bDisposed )
         return false;
@@ -150,13 +146,9 @@ bool GlobalSettings_Access::HasStatesInfo( GlobalSettings::UIElementType eElemen
     return false;
 }
 
-bool GlobalSettings_Access::GetStateInfo( GlobalSettings::UIElementType eElementType, GlobalSettings::StateInfo eStateInfo, css::uno::Any& aValue )
+bool GlobalSettings_Access::GetToolbarStateInfo( GlobalSettings::StateInfo eStateInfo, css::uno::Any& aValue )
 {
     osl::MutexGuard g(m_mutex);
-    if ( eElementType == GlobalSettings::UIELEMENT_TYPE_DOCKWINDOW )
-        return false;
-    else if ( eElementType == GlobalSettings::UIELEMENT_TYPE_STATUSBAR )
-        return false;
 
     if ( m_bDisposed )
         return false;
@@ -257,22 +249,22 @@ GlobalSettings::~GlobalSettings()
 }
 
 // settings access
-bool GlobalSettings::HasStatesInfo( UIElementType eElementType )
+bool GlobalSettings::HasToolbarStatesInfo()
 {
     GlobalSettings_Access* pSettings( GetGlobalSettings( m_xContext ));
 
     if ( pSettings )
-        return pSettings->HasStatesInfo( eElementType );
+        return pSettings->HasToolbarStatesInfo();
     else
         return false;
 }
 
-bool GlobalSettings::GetStateInfo( UIElementType eElementType, StateInfo eStateInfo, css::uno::Any& aValue )
+bool GlobalSettings::GetToolbarStateInfo( StateInfo eStateInfo, css::uno::Any& aValue )
 {
     GlobalSettings_Access* pSettings( GetGlobalSettings( m_xContext ));
 
     if ( pSettings )
-        return pSettings->GetStateInfo( eElementType, eStateInfo, aValue );
+        return pSettings->GetToolbarStateInfo( eStateInfo, aValue );
     else
         return false;
 }
commit 344957aae65637c64b4f6d16f64c4488ddd2d085
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 10:22:07 2017 +0200

    convert LoadEnv::EFeature to o3tl::typed_flags
    
    Change-Id: I4c16b68c820783e9bd27fa273f2017b5088f4b85

diff --git a/framework/source/dispatch/loaddispatcher.cxx b/framework/source/dispatch/loaddispatcher.cxx
index f5d9d14..b04a4ca 100644
--- a/framework/source/dispatch/loaddispatcher.cxx
+++ b/framework/source/dispatch/loaddispatcher.cxx
@@ -106,7 +106,7 @@ css::uno::Any LoadDispatcher::impl_dispatch( const css::util::URL& rURL,
     css::uno::Reference< css::lang::XComponent > xComponent;
     try
     {
-        m_aLoader.initializeLoading( rURL.Complete, lArguments, xBaseFrame, m_sTarget, m_nSearchFlags, (LoadEnv::EFeature)(LoadEnv::E_ALLOW_CONTENTHANDLER | LoadEnv::E_WORK_WITH_UI));
+        m_aLoader.initializeLoading( rURL.Complete, lArguments, xBaseFrame, m_sTarget, m_nSearchFlags, LoadEnvFeatures::AllowContentHandler | LoadEnvFeatures::WorkWithUI);
         m_aLoader.startLoading();
         m_aLoader.waitWhileLoading(); // wait for ever!
         xComponent = m_aLoader.getTargetComponent();
diff --git a/framework/source/inc/loadenv/loadenv.hxx b/framework/source/inc/loadenv/loadenv.hxx
index 3597547..288da8f 100644
--- a/framework/source/inc/loadenv/loadenv.hxx
+++ b/framework/source/inc/loadenv/loadenv.hxx
@@ -35,6 +35,33 @@
 #include <rtl/ref.hxx>
 #include <unotools/mediadescriptor.hxx>
 #include <comphelper/sequenceashashmap.hxx>
+#include <o3tl/typed_flags_set.hxx>
+
+
+/** @short  enable/disable special features
+            of a load request.
+
+    @desrc  Such features must outcome without
+            any special parameters.
+            To make enabling/disabling of
+            features very easy (e.g. at the ctor of
+             this class) these values must be combinable
+            as flags. That means: its values must be in
+            range of [2^n]!
+ */
+enum class LoadEnvFeatures
+{
+    /// we should be informed, if no feature is enabled :-)
+    NONE = 0,
+    /// enable using of UI elements during loading (means progress, interaction handler etcpp.)
+    WorkWithUI = 1,
+    /// enable loading of resources, which are not related to a target frame! (see concept of ContentHandler)
+    AllowContentHandler = 2
+};
+namespace o3tl {
+    template<> struct typed_flags<LoadEnvFeatures> : is_typed_flags<LoadEnvFeatures, 0x3> {};
+}
+
 
 namespace framework {
 
@@ -51,28 +78,6 @@ class QuietInteraction;
 class LoadEnv
 {
 public:
-
-    /** @short  enable/disable special features
-                of a load request.
-
-        @desrc  Such features must outcome without
-                any special parameters.
-                To make enabling/disabling of
-                features very easy (e.g. at the ctor of
-                this class) these values must be combinable
-                as flags. That means: its values must be in
-                range of [2^n]!
-     */
-    enum EFeature
-    {
-        /// we should be informed, if no feature is enabled :-)
-        E_NO_FEATURE = 0,
-        /// enable using of UI elements during loading (means progress, interaction handler etcpp.)
-        E_WORK_WITH_UI = 1,
-        /// enable loading of resources, which are not related to a target frame! (see concept of ContentHandler)
-        E_ALLOW_CONTENTHANDLER = 2
-    };
-
     /** @short  classify a content.
 
         @descr  The load environment must know, if a content
@@ -153,7 +158,7 @@ private:
     css::util::URL m_aURL;
 
     /** @short  enable/disable special features of a load request. */
-    EFeature m_eFeature;
+    LoadEnvFeatures m_eFeature;
 
     /** @short  classify the content, which should be loaded by this instance. */
     EContentType m_eContentType;
@@ -264,7 +269,7 @@ public:
                            const css::uno::Reference< css::frame::XFrame >&          xBaseFrame      ,
                            const OUString&                                           sTarget         ,
                                  sal_Int32                                           nSearchFlags    ,
-                                 EFeature                                            eFeature        = E_NO_FEATURE);
+                                 LoadEnvFeatures                                     eFeature        = LoadEnvFeatures::NONE);
 
     /** @short  start loading of the resource represented by this loadenv instance.
 
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index c98fb8b..99dbb69 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -123,7 +123,7 @@ class LoadEnvListener : public ::cppu::WeakImplHelper< css::frame::XLoadEventLis
 LoadEnv::LoadEnv(const css::uno::Reference< css::uno::XComponentContext >& xContext)
     : m_xContext(xContext)
     , m_nSearchFlags(0)
-    , m_eFeature(E_NO_FEATURE)
+    , m_eFeature(LoadEnvFeatures::NONE)
     , m_eContentType(E_UNSUPPORTED_CONTENT)
     , m_bCloseFrameOnError(false)
     , m_bReactivateControllerOnError(false)
@@ -213,7 +213,7 @@ utl::MediaDescriptor addModelArgs(const uno::Sequence<beans::PropertyValue>& rDe
 
 void LoadEnv::initializeLoading(const OUString& sURL, const uno::Sequence<beans::PropertyValue>& lMediaDescriptor,
         const uno::Reference<frame::XFrame>& xBaseFrame, const OUString& sTarget,
-        sal_Int32 nSearchFlags, EFeature eFeature)
+        sal_Int32 nSearchFlags, LoadEnvFeatures eFeature)
 {
     osl::MutexGuard g(m_mutex);
 
@@ -269,7 +269,7 @@ void LoadEnv::initializeLoading(const OUString& sURL, const uno::Sequence<beans:
 
     // UI mode
     const bool bUIMode =
-        ((m_eFeature & E_WORK_WITH_UI) == E_WORK_WITH_UI) &&
+        (m_eFeature & LoadEnvFeatures::WorkWithUI) &&
         !m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(), false) &&
         !m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_PREVIEW(), false);
 
@@ -359,7 +359,7 @@ void LoadEnv::startLoading()
     // Use another strategy here. Try it and let it run into the case "loading not possible".
     bool bStarted = false;
     if (
-        ((m_eFeature & E_ALLOW_CONTENTHANDLER) == E_ALLOW_CONTENTHANDLER) &&
+        (m_eFeature & LoadEnvFeatures::AllowContentHandler) &&
         (m_eContentType                        != E_CAN_BE_SET          )   /* Attention: special feature to set existing component on a frame must ignore type detection! */
        )
     {
commit 3910f943e9bf7e70589d9a7c42c05a43ac11856c
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 10:17:30 2017 +0200

    drop unused enumerators from TargetHelper::ESpecialTarget
    
    Change-Id: Ieda0b6f09b0e4cb463de32309a2617018bb7cee5

diff --git a/framework/source/inc/loadenv/targethelper.hxx b/framework/source/inc/loadenv/targethelper.hxx
index 5743400..afa9686 100644
--- a/framework/source/inc/loadenv/targethelper.hxx
+++ b/framework/source/inc/loadenv/targethelper.hxx
@@ -41,9 +41,6 @@ class TargetHelper
          */
         enum class ESpecialTarget
         {
-            Self,
-            Parent,
-            Top,
             Blank,
             Default,
             Beamer,
diff --git a/framework/source/loadenv/targethelper.cxx b/framework/source/loadenv/targethelper.cxx
index 4010355..80a096e 100644
--- a/framework/source/loadenv/targethelper.cxx
+++ b/framework/source/loadenv/targethelper.cxx
@@ -26,18 +26,6 @@ bool TargetHelper::matchSpecialTarget(const OUString& sCheckTarget  ,
 {
     switch(eSpecialTarget)
     {
-        case ESpecialTarget::Self :
-            return (
-                    (sCheckTarget.isEmpty()                 ) ||
-                    sCheckTarget == SPECIALTARGET_SELF
-                   );
-
-        case ESpecialTarget::Parent :
-            return sCheckTarget == SPECIALTARGET_PARENT;
-
-        case ESpecialTarget::Top :
-            return sCheckTarget == SPECIALTARGET_TOP;
-
         case ESpecialTarget::Blank :
             return sCheckTarget == SPECIALTARGET_BLANK;
 
commit a6a46aad5118fca8b27205e9c0a9772af322235a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 10:15:48 2017 +0200

    convert ExprComb to scoped enum
    
    and drop unused EC_bit_neg enumerator
    
    Change-Id: I8a93310cd849cee56fcf628424d96005f89ba799

diff --git a/idlc/inc/astexpression.hxx b/idlc/inc/astexpression.hxx
index e092ffd..788d7a2 100644
--- a/idlc/inc/astexpression.hxx
+++ b/idlc/inc/astexpression.hxx
@@ -26,23 +26,22 @@
 #include <idlc.hxx>
 
 // Enum to define all the different operators to combine expressions
-enum ExprComb
+enum class ExprComb
 {
-    EC_add,     // '+'
-    EC_minus,   // '-'
-    EC_mul,     // '*'
-    EC_div,     // '/'
-    EC_mod,     // '%'
-    EC_or,      // '|'
-    EC_xor,     // '^'
-    EC_and,     // '&'
-    EC_left,    // '<<'
-    EC_right,   // '>>'
-    EC_u_plus,  // unary '+'
-    EC_u_minus, // unary '-'
-    EC_bit_neg, // '~'
-    EC_none,    // No operator (missing)
-    EC_symbol   // a symbol (function or constant name)
+    Add,     // '+'
+    Minus,   // '-'
+    Mul,     // '*'
+    Div,     // '/'
+    Mod,     // '%'
+    Or,      // '|'
+    Xor,     // '^'
+    And,     // '&'
+    Left,    // '<<'
+    Right,   // '>>'
+    UPlus,   // unary '+'
+    UMinus,  // unary '-'
+    NONE,    // No operator (missing)
+    Symbol   // a symbol (function or constant name)
 };
 
 // Enum to define expression type
diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx
index d180662..65451a5 100644
--- a/idlc/source/astexpression.cxx
+++ b/idlc/source/astexpression.cxx
@@ -41,7 +41,7 @@ AstExpression::AstExpression(ExprComb c, AstExpression *pExpr1, AstExpression *p
 }
 
 AstExpression::AstExpression(sal_Int32 l)
-    : m_combOperator(EC_none)
+    : m_combOperator(ExprComb::NONE)
     , m_subExpr1(nullptr)
     , m_subExpr2(nullptr)
     , m_exprValue(nullptr)
@@ -55,7 +55,7 @@ AstExpression::AstExpression(sal_Int32 l)
 }
 
 AstExpression::AstExpression(sal_Int32  l, ExprType et)
-    : m_combOperator(EC_none)
+    : m_combOperator(ExprComb::NONE)
     , m_subExpr1(nullptr)
     , m_subExpr2(nullptr)
     , m_exprValue(nullptr)
@@ -69,7 +69,7 @@ AstExpression::AstExpression(sal_Int32  l, ExprType et)
 }
 
 AstExpression::AstExpression(sal_Int64  h)
-    : m_combOperator(EC_none)
+    : m_combOperator(ExprComb::NONE)
     , m_subExpr1(nullptr)
     , m_subExpr2(nullptr)
     , m_exprValue(nullptr)
@@ -83,7 +83,7 @@ AstExpression::AstExpression(sal_Int64  h)
 }
 
 AstExpression::AstExpression(sal_uInt64 uh)
-    : m_combOperator(EC_none)
+    : m_combOperator(ExprComb::NONE)
     , m_subExpr1(nullptr)
     , m_subExpr2(nullptr)
     , m_exprValue(nullptr)
@@ -97,7 +97,7 @@ AstExpression::AstExpression(sal_uInt64 uh)
 }
 
 AstExpression::AstExpression(double d)
-    : m_combOperator(EC_none)
+    : m_combOperator(ExprComb::NONE)
     , m_subExpr1(nullptr)
     , m_subExpr2(nullptr)
     , m_exprValue(nullptr)
@@ -111,7 +111,7 @@ AstExpression::AstExpression(double d)
 }
 
 AstExpression::AstExpression(OString* scopedName)
-    : m_combOperator(EC_symbol)
+    : m_combOperator(ExprComb::Symbol)
     , m_subExpr1(nullptr)
     , m_subExpr2(nullptr)
     , m_exprValue(nullptr)
@@ -801,29 +801,28 @@ void AstExpression::evaluate()
      */
     switch (m_combOperator)
     {
-        case EC_add:
-        case EC_minus:
-        case EC_mul:
-        case EC_div:
-        case EC_mod:
+        case ExprComb::Add:
+        case ExprComb::Minus:
+        case ExprComb::Mul:
+        case ExprComb::Div:
+        case ExprComb::Mod:
             m_exprValue = eval_bin_op().release();
             break;
-        case EC_or:
-        case EC_xor:
-        case EC_and:
-        case EC_left:
-        case EC_right:
+        case ExprComb::Or:
+        case ExprComb::Xor:
+        case ExprComb::And:
+        case ExprComb::Left:
+        case ExprComb::Right:
             m_exprValue = eval_bit_op().release();
             break;
-        case EC_u_plus:
-        case EC_u_minus:
-        case EC_bit_neg:
+        case ExprComb::UPlus:
+        case ExprComb::UMinus:
             m_exprValue = eval_un_op().release();
             break;
-        case EC_symbol:
+        case ExprComb::Symbol:
             m_exprValue = eval_symbol();
             break;
-        case EC_none:
+        case ExprComb::NONE:
             break;
     }
 }
@@ -832,7 +831,7 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bin_op()
 {
     ExprType eType = ET_double;
 
-    if ( m_combOperator == EC_mod )
+    if ( m_combOperator == ExprComb::Mod )
         eType = ET_hyper;
 
     if (m_subExpr1 == nullptr || m_subExpr2 == nullptr)
@@ -853,21 +852,21 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bin_op()
 
     switch (m_combOperator)
     {
-        case EC_mod:
+        case ExprComb::Mod:
             if (m_subExpr2->getExprValue()->u.hval == 0)
                 return nullptr;
             retval->u.hval = m_subExpr1->getExprValue()->u.hval % m_subExpr2->getExprValue()->u.hval;
             break;
-        case EC_add:
+        case ExprComb::Add:
             retval->u.dval = m_subExpr1->getExprValue()->u.dval + m_subExpr2->getExprValue()->u.dval;
             break;
-        case EC_minus:
+        case ExprComb::Minus:
             retval->u.dval = m_subExpr1->getExprValue()->u.dval - m_subExpr2->getExprValue()->u.dval;
             break;
-        case EC_mul:
+        case ExprComb::Mul:
             retval->u.dval = m_subExpr1->getExprValue()->u.dval * m_subExpr2->getExprValue()->u.dval;
             break;
-        case EC_div:
+        case ExprComb::Div:
             if (m_subExpr2->getExprValue()->u.dval == 0.0)
                 return nullptr;
             retval->u.dval = m_subExpr1->getExprValue()->u.dval / m_subExpr2->getExprValue()->u.dval;
@@ -899,19 +898,19 @@ std::unique_ptr<AstExprValue> AstExpression::eval_bit_op()
 
     switch (m_combOperator)
     {
-        case EC_or:
+        case ExprComb::Or:
             retval->u.lval = m_subExpr1->getExprValue()->u.lval | m_subExpr2->getExprValue()->u.lval;
             break;
-        case EC_xor:
+        case ExprComb::Xor:
             retval->u.lval = m_subExpr1->getExprValue()->u.lval ^ m_subExpr2->getExprValue()->u.lval;
             break;
-        case EC_and:
+        case ExprComb::And:
             retval->u.lval = m_subExpr1->getExprValue()->u.lval & m_subExpr2->getExprValue()->u.lval;
             break;
-        case EC_left:
+        case ExprComb::Left:
             retval->u.lval = m_subExpr1->getExprValue()->u.lval << m_subExpr2->getExprValue()->u.lval;
             break;
-        case EC_right:
+        case ExprComb::Right:
             retval->u.lval = m_subExpr1->getExprValue()->u.lval >> m_subExpr2->getExprValue()->u.lval;
             break;
         default:
@@ -936,17 +935,12 @@ std::unique_ptr<AstExprValue> AstExpression::eval_un_op()
 
     switch (m_combOperator)
     {
-        case EC_u_plus:
+        case ExprComb::UPlus:
             retval->u.lval = m_subExpr1->getExprValue()->u.lval;
             break;
-        case EC_u_minus:
+        case ExprComb::UMinus:
             retval->u.lval = -(m_subExpr1->getExprValue()->u.lval);
             break;
-        case EC_bit_neg:
-            if (!m_subExpr1->coerce(ET_long))
-                return nullptr;
-            retval->u.lval = ~m_subExpr1->getExprValue()->u.lval;
-            break;
         default:
             return nullptr;
     }
@@ -1011,7 +1005,7 @@ AstExprValue* AstExpression::eval_symbol()
 OString AstExpression::toString()
 {
     OString exprStr;
-    if ( m_combOperator == EC_symbol )
+    if ( m_combOperator == ExprComb::Symbol )
         return m_pSymbolicName ? *m_pSymbolicName : OString("<Undefined Name>");
 
     if ( m_exprValue )
@@ -1049,15 +1043,12 @@ OString AstExpression::toString()
 
     switch (m_combOperator)
     {
-        case EC_u_plus:
+        case ExprComb::UPlus:
             exprStr += OString("+");
             break;
-        case EC_u_minus:
+        case ExprComb::UMinus:
             exprStr += OString("-");
             break;
-        case EC_bit_neg:
-            exprStr += OString("~");
-            break;
         default:
             break;
     }
@@ -1065,34 +1056,34 @@ OString AstExpression::toString()
         exprStr += m_subExpr1->toString();
     switch (m_combOperator)
     {
-        case EC_add:
+        case ExprComb::Add:
             exprStr += OString(" + ");
             break;
-        case EC_minus:
+        case ExprComb::Minus:
             exprStr += OString(" - ");
             break;
-        case EC_mul:
+        case ExprComb::Mul:
             exprStr += OString(" * ");
             break;
-        case EC_div:
+        case ExprComb::Div:
             exprStr += OString(" / ");
             break;
-        case EC_mod:
+        case ExprComb::Mod:
             exprStr += OString(" % ");
             break;
-        case EC_or:
+        case ExprComb::Or:
             exprStr += OString(" | ");
             break;
-        case EC_xor:
+        case ExprComb::Xor:
             exprStr += OString(" ^ ");
             break;
-        case EC_and:
+        case ExprComb::And:
             exprStr += OString(" & ");
             break;
-        case EC_left:
+        case ExprComb::Left:
             exprStr += OString(" << ");
             break;
-        case EC_right:
+        case ExprComb::Right:
             exprStr += OString(" >> ");
             break;
         default:
diff --git a/idlc/source/parser.y b/idlc/source/parser.y
index 3a12f4c..c2c55d1 100644
--- a/idlc/source/parser.y
+++ b/idlc/source/parser.y
@@ -1314,7 +1314,7 @@ or_expr :
     xor_expr
     | or_expr '|' xor_expr
     {
-        $$ = new AstExpression(EC_or, $1, $3);
+        $$ = new AstExpression(ExprComb::Or, $1, $3);
     }
     ;
 
@@ -1322,7 +1322,7 @@ xor_expr :
     and_expr
     | xor_expr '^' and_expr
     {
-        $$ = new AstExpression(EC_xor, $1, $3);
+        $$ = new AstExpression(ExprComb::Xor, $1, $3);
     }
     ;
 
@@ -1330,7 +1330,7 @@ and_expr :
     shift_expr
     | and_expr '&' shift_expr
     {
-        $$ = new AstExpression(EC_and, $1, $3);
+        $$ = new AstExpression(ExprComb::And, $1, $3);
     }
     ;
 
@@ -1338,11 +1338,11 @@ shift_expr :
     add_expr
     | shift_expr IDL_LEFTSHIFT add_expr
     {
-        $$ = new AstExpression(EC_left, $1, $3);
+        $$ = new AstExpression(ExprComb::Left, $1, $3);
     }
     | shift_expr IDL_RIGHTSHIFT add_expr
     {
-        $$ = new AstExpression(EC_right, $1, $3);
+        $$ = new AstExpression(ExprComb::Right, $1, $3);
     }
     ;
 
@@ -1350,11 +1350,11 @@ add_expr :
     mult_expr
     | add_expr '+' mult_expr
     {
-        $$ = new AstExpression(EC_add, $1, $3);
+        $$ = new AstExpression(ExprComb::Add, $1, $3);
     }
     | add_expr '-' mult_expr
     {
-        $$ = new AstExpression(EC_minus, $1, $3);
+        $$ = new AstExpression(ExprComb::Minus, $1, $3);
     }
     ;
 
@@ -1362,15 +1362,15 @@ mult_expr :
     unary_expr
     | mult_expr '*' unary_expr
     {
-        $$ = new AstExpression(EC_mul, $1, $3);
+        $$ = new AstExpression(ExprComb::Mul, $1, $3);
     }
     | mult_expr '/' unary_expr
     {
-        $$ = new AstExpression(EC_div, $1, $3);
+        $$ = new AstExpression(ExprComb::Div, $1, $3);
     }
     | mult_expr '%' unary_expr
     {
-        $$ = new AstExpression(EC_mod, $1, $3);
+        $$ = new AstExpression(ExprComb::Mod, $1, $3);
     }
     ;
 
@@ -1378,11 +1378,11 @@ unary_expr :
     primary_expr
     | '+' primary_expr
     {
-        $$ = new AstExpression(EC_u_plus, $2, nullptr);
+        $$ = new AstExpression(ExprComb::UPlus, $2, nullptr);
     }
     | '-' primary_expr
     {
-        $$ = new AstExpression(EC_u_minus, $2, nullptr);
+        $$ = new AstExpression(ExprComb::UMinus, $2, nullptr);
     }
     | '~' primary_expr
     {
commit d00431fd36eefe52d87dbc3d254d9d0ae464a333
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Feb 16 10:12:15 2017 +0200

    convert ErrorCode to scoped enum
    
    and drop unused enumerators
    
    Change-Id: I7330ebf8feead7b67e67f73ba942979e4756269d

diff --git a/idlc/inc/errorhandler.hxx b/idlc/inc/errorhandler.hxx
index 2e95361..f906ff7 100644
--- a/idlc/inc/errorhandler.hxx
+++ b/idlc/inc/errorhandler.hxx
@@ -23,58 +23,48 @@
 #include <astexpression.hxx>
 #include <astenum.hxx>
 
-enum ErrorCode
+enum class ErrorCode
 {
-    EIDL_NONE,              // No error
-    EIDL_SYNTAX_ERROR,      // Syntax error in IDL input
-                            // More details will be gleaned from examining
-                            // the parse state
-    EIDL_REDEF,             // Redefinition
-    EIDL_REDEF_SCOPE,       // Redefinition inside defining scope
-    EIDL_DEF_USE,           // Definition after use
-    EIDL_COERCION_FAILURE,  // Coercion failure
-    EIDL_SCOPE_CONFLICT,    // Between fwd declare and full declare
-    EIDL_ILLEGAL_ADD,       // Illegal add action
-    EIDL_ILLEGAL_USE,       // Illegal type used in expression
-    EIDL_ILLEGAL_RAISES,    // Error in "raises" clause
-    EIDL_CANT_INHERIT,      // Cannot inherit from non-interface
-    EIDL_LOOKUP_ERROR,      // Identifier not found
-    EIDL_INHERIT_FWD_ERROR, // Cannot inherit from fwd decl interface
-    EIDL_CONSTANT_EXPECTED, // We got something else..
-    EIDL_NAME_CASE_ERROR,   // Spelling differences found
-    EIDL_EVAL_ERROR,        // Error in evaluating expression
-    EIDL_AMBIGUOUS,         // Ambiguous name definition
-    EIDL_DECL_NOT_DEFINED,  // Forward declared but never defined
-    EIDL_FWD_DECL_LOOKUP,   // Tried to lookup in fwd declared intf
-    EIDL_RECURSIVE_TYPE,    // Illegal recursive use of type
-    EIDL_NOT_A_TYPE,        // Not a type
-    EIDL_TYPE_NOT_VALID,    // Type is not valid in this context
-    EIDL_INTERFACEMEMBER_LOOKUP,    // interface is not defined or a fwd declaration not exists
-    EIDL_SERVICEMEMBER_LOOKUP,
-    EIDL_TYPE_IDENT_CONFLICT,   // type and identifier has equal names
-    EIDL_WRONGATTRIBUTEFLAG,
-    EIDL_DEFINED_ATTRIBUTEFLAG,
-    EIDL_WRONGATTRIBUTEKEYWORD,
-    EIDL_MISSINGATTRIBUTEKEYWORD,
-    EIDL_BAD_ATTRIBUTE_FLAGS,
-    EIDL_OPTIONALEXPECTED,
-    EIDL_MIXED_INHERITANCE,
-    EIDL_DOUBLE_INHERITANCE,
-    EIDL_DOUBLE_MEMBER,
-    EIDL_CONSTRUCTOR_PARAMETER_NOT_IN,
-    EIDL_CONSTRUCTOR_REST_PARAMETER_NOT_FIRST,
-    EIDL_REST_PARAMETER_NOT_LAST,
-    EIDL_REST_PARAMETER_NOT_ANY,
-    EIDL_METHOD_HAS_REST_PARAMETER,
-    EIDL_READONLY_ATTRIBUTE_SET_EXCEPTIONS,
-    EIDL_UNSIGNED_TYPE_ARGUMENT,
-    EIDL_WRONG_NUMBER_OF_TYPE_ARGUMENTS,
-    EIDL_INSTANTIATED_STRUCT_TYPE_TYPEDEF,
-    EIDL_IDENTICAL_TYPE_PARAMETERS,
-    EIDL_STRUCT_TYPE_TEMPLATE_WITH_BASE,
-    EIDL_PUBLISHED_FORWARD,
-    EIDL_PUBLISHED_USES_UNPUBLISHED,
-    EIDL_SIMILAR_CONSTRUCTORS
+    SyntaxError,      // Syntax error in IDL input
+                      // More details will be gleaned from examining
+                      // the parse state
+    RedefScope,       // Redefinition inside defining scope
+    CoercionFailure,  // Coercion failure
+    ScopeConflict,    // Between fwd declare and full declare
+    IllegalAdd,       // Illegal add action
+    IllegalRaises,    // Error in "raises" clause
+    CantInherit,      // Cannot inherit from non-interface
+    IdentNotFound,    // Identifier not found
+    CannotInheritFromForward, // Cannot inherit from fwd decl interface
+    ExpectedConstant,       // We got something else..
+    Eval,                   // Error in evaluating expression
+    ForwardDeclLookup,      // Tried to lookup in fwd declared intf
+    RecursiveType,          // Illegal recursive use of type
+    NotAType,               // Not a type
+    InterfaceMemberLookup,  // interface is not defined or a fwd declaration not exists
+    ServiceMemberLookup,
+    DefinedAttributeFlag,
+    WrongAttributeKeyword,
+    MissingAttributeKeyword,
+    BadAttributeFlags,
+    ExpectedOptional,
+    MixedInheritance,
+    DoubleInheritance,
+    DoubleMember,
+    ConstructorParameterNotIn,
+    ConstructorRestParameterNotFirst,
+    RestParameterNotLast,
+    RestParameterNotAny,
+    MethodHasRestParameter,
+    ReadOnlyAttributeSetExceptions,
+    UnsignedTypeArgument,
+    WrongNumberOfTypeArguments,
+    InstantiatedStructTypeTypedef,
+    IdenticalTypeParameters,
+    StructTypeTemplateWithBase,
+    PublishedForward,
+    PublishedusesUnpublished,
+    SimilarConstructors
 };
 
 enum class WarningCode
diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx
index 7c064bd..c999257 100644
--- a/idlc/source/astscope.cxx
+++ b/idlc/source/astscope.cxx
@@ -48,7 +48,7 @@ AstDeclaration* AstScope::addDeclaration(AstDeclaration* pDecl)
     {
         if ( pDecl->hasAncestor(pDeclaration) )
         {
-            ErrorHandler::error2(EIDL_REDEF_SCOPE, pDecl, pDeclaration);
+            ErrorHandler::error2(ErrorCode::RedefScope, pDecl, pDeclaration);
             return nullptr;
         }
         if ( (pDecl->getNodeType() == pDeclaration->getNodeType()) &&
@@ -75,7 +75,7 @@ AstDeclaration* AstScope::addDeclaration(AstDeclaration* pDecl)
             return pDecl;
         }
 
-        ErrorHandler::error2(EIDL_REDEF_SCOPE, scopeAsDecl(this), pDecl);
+        ErrorHandler::error2(ErrorCode::RedefScope, scopeAsDecl(this), pDecl);
         return nullptr;
     }
 
diff --git a/idlc/source/errorhandler.cxx b/idlc/source/errorhandler.cxx
index 4fd2386..ac3aeee 100644
--- a/idlc/source/errorhandler.cxx
+++ b/idlc/source/errorhandler.cxx
@@ -24,118 +24,98 @@ static const sal_Char* errorCodeToMessage(ErrorCode eCode)
 {
     switch (eCode)
     {
-    case EIDL_NONE:
-        return "all is fine ";
-    case EIDL_SYNTAX_ERROR:
+    case ErrorCode::SyntaxError:
         return "";
-    case EIDL_REDEF:
-        return "illegal redefinition ";
-    case EIDL_REDEF_SCOPE:
+    case ErrorCode::RedefScope:
         return "illegal redefinition in scope ";
-    case EIDL_DEF_USE:
-        return "redefinition after use, ";
-    case EIDL_COERCION_FAILURE:
+    case ErrorCode::CoercionFailure:
         return "coercion failure ";
-    case EIDL_SCOPE_CONFLICT:
+    case ErrorCode::ScopeConflict:
         return "definition scope is different than fwd declare scope, ";
-    case EIDL_ILLEGAL_ADD:
+    case ErrorCode::IllegalAdd:
         return "illegal add operation, ";
-    case EIDL_ILLEGAL_USE:
-        return "illegal type used in expression, ";
-    case EIDL_ILLEGAL_RAISES:
+    case ErrorCode::IllegalRaises:
         return "non-exception type in raises(..) clause, ";
-    case EIDL_CANT_INHERIT:
+    case ErrorCode::CantInherit:
         return "cannot inherit ";
-    case EIDL_LOOKUP_ERROR:
+    case ErrorCode::IdentNotFound:
         return "error in lookup of symbol: ";
-    case EIDL_INHERIT_FWD_ERROR:
+    case ErrorCode::CannotInheritFromForward:
         return "";
-    case EIDL_CONSTANT_EXPECTED:
+    case ErrorCode::ExpectedConstant:
         return "constant expected: ";
-    case EIDL_NAME_CASE_ERROR:
-        return "identifier used with two differing spellings: ";
-    case EIDL_EVAL_ERROR:
+    case ErrorCode::Eval:
         return "expression evaluation error: ";
-    case EIDL_AMBIGUOUS:
-        return "ambiguous definition: ";
-    case EIDL_DECL_NOT_DEFINED:
-        return "forward declared but never defined: ";
-    case EIDL_FWD_DECL_LOOKUP:
+    case ErrorCode::ForwardDeclLookup:
         return "";
-    case EIDL_RECURSIVE_TYPE:
+    case ErrorCode::RecursiveType:
         return "illegal recursive use of type: ";
-    case EIDL_NOT_A_TYPE:
+    case ErrorCode::NotAType:
         return "specified symbol is not a type: ";
-    case EIDL_TYPE_NOT_VALID:
-        return "specified type is not valid in this context: ";
-    case EIDL_INTERFACEMEMBER_LOOKUP:
+    case ErrorCode::InterfaceMemberLookup:
         return "error in lookup of symbol, expected interface is not defined and no forward exists: ";
-    case EIDL_SERVICEMEMBER_LOOKUP:
+    case ErrorCode::ServiceMemberLookup:
         return "error in lookup of symbol, expected service is not defined: ";
-    case EIDL_TYPE_IDENT_CONFLICT:
-        return "type and parameter/member name are equal: ";
-    case EIDL_WRONGATTRIBUTEFLAG:
-        return "the used flag is not valid in this context: ";
-    case EIDL_DEFINED_ATTRIBUTEFLAG:
+    case ErrorCode::DefinedAttributeFlag:
         return "flag is already set: ";
-    case EIDL_WRONGATTRIBUTEKEYWORD:
+    case ErrorCode::WrongAttributeKeyword:
         return "keyword not allowed: ";
-    case EIDL_MISSINGATTRIBUTEKEYWORD:
+    case ErrorCode::MissingAttributeKeyword:
         return "missing keyword: ";
-    case EIDL_BAD_ATTRIBUTE_FLAGS:
+    case ErrorCode::BadAttributeFlags:
         return
             "the 'attribute' flag is mandatory, and only the 'bound' and"
             " 'readonly' optional flags are accepted: ";
-    case EIDL_OPTIONALEXPECTED:
+    case ErrorCode::ExpectedOptional:
         return "only the 'optional' flag is accepted: ";
-    case EIDL_MIXED_INHERITANCE:
+    case ErrorCode::MixedInheritance:
         return "interface inheritance declarations cannot appear in both an"
             " interface's header and its body";
-    case EIDL_DOUBLE_INHERITANCE:
+    case ErrorCode::DoubleInheritance:
         return
             "interface is (directly or indirectly) inherited more than once: ";
-    case EIDL_DOUBLE_MEMBER:
+    case ErrorCode::DoubleMember:
         return
             "member is (directly or indirectly) declared more than once: ";
-    case EIDL_CONSTRUCTOR_PARAMETER_NOT_IN:
+    case ErrorCode::ConstructorParameterNotIn:
         return
             "a service constructor parameter may not be an out or inout"
             " parameter";
-    case EIDL_CONSTRUCTOR_REST_PARAMETER_NOT_FIRST:
+    case ErrorCode::ConstructorRestParameterNotFirst:
         return
             "no parameters may precede a rest parameter in a service"
             " constructor";
-    case EIDL_REST_PARAMETER_NOT_LAST:
+    case ErrorCode::RestParameterNotLast:
         return "no parameters may follow a rest parameter";
-    case EIDL_REST_PARAMETER_NOT_ANY:
+    case ErrorCode::RestParameterNotAny:
         return "a rest parameter must be of type any";
-    case EIDL_METHOD_HAS_REST_PARAMETER:
+    case ErrorCode::MethodHasRestParameter:
         return "a rest parameter may not be used on an interface method";
-    case EIDL_READONLY_ATTRIBUTE_SET_EXCEPTIONS:
+    case ErrorCode::ReadOnlyAttributeSetExceptions:
         return "a readonly attribute may not have a setter raises clause";
-    case EIDL_UNSIGNED_TYPE_ARGUMENT:
+    case ErrorCode::UnsignedTypeArgument:
         return "an unsigned type cannot be used as a type argument";
-    case EIDL_WRONG_NUMBER_OF_TYPE_ARGUMENTS:
+    case ErrorCode::WrongNumberOfTypeArguments:
         return
             "the number of given type arguments does not match the expected"
             " number of type parameters";
-    case EIDL_INSTANTIATED_STRUCT_TYPE_TYPEDEF:
+    case ErrorCode::InstantiatedStructTypeTypedef:
         return
             "an instantiated polymorphic struct type cannot be used in a"
             " typedef";
-    case EIDL_IDENTICAL_TYPE_PARAMETERS:
+    case ErrorCode::IdenticalTypeParameters:
         return "two type parameters have the same name";
-    case EIDL_STRUCT_TYPE_TEMPLATE_WITH_BASE:
+    case ErrorCode::StructTypeTemplateWithBase:
         return "a polymorphic struct type template may not have a base type";
-    case EIDL_PUBLISHED_FORWARD:
+    case ErrorCode::PublishedForward:
         return
             "a published forward declaration of an interface type cannot be"
             " followed by an unpublished declaration of that type";
-    case EIDL_PUBLISHED_USES_UNPUBLISHED:
+    case ErrorCode::PublishedusesUnpublished:
         return
             "an unpublished entity cannot be used in the declaration of a"
             " published entity: ";
-    case EIDL_SIMILAR_CONSTRUCTORS:
+    case ErrorCode::SimilarConstructors:
         return "two constructors have identical lists of parameter types";
     }
     return "unknown error";
@@ -487,14 +467,14 @@ void ErrorHandler::warning0(WarningCode w, const sal_Char* warningmsg)
 
 void ErrorHandler::syntaxError(ParseState ps, sal_Int32 lineNumber, const sal_Char* errmsg)
 {
-    errorHeader(EIDL_SYNTAX_ERROR, lineNumber);
+    errorHeader(ErrorCode::SyntaxError, lineNumber);
     fprintf(stderr, "%s: %s\n", parseStateToMessage(ps), errmsg);
     idlc()->incErrorCount();
 }
 
 void ErrorHandler::coercionError(AstExpression *pExpr, ExprType et)
 {
-    errorHeader(EIDL_COERCION_FAILURE);
+    errorHeader(ErrorCode::CoercionFailure);
     fprintf(stderr, "'%s' to '%s'\n", pExpr->toString().getStr(),
             exprTypeToString(et));
     idlc()->incErrorCount();
@@ -502,7 +482,7 @@ void ErrorHandler::coercionError(AstExpression *pExpr, ExprType et)
 
 void ErrorHandler::lookupError(const OString& n)
 {
-    errorHeader(EIDL_LOOKUP_ERROR);
+    errorHeader(ErrorCode::IdentNotFound);
     fprintf(stderr, "'%s'\n", n.getStr());
     idlc()->incErrorCount();
 }
@@ -523,7 +503,7 @@ void ErrorHandler::flagError(ErrorCode e, sal_uInt32 flag)
 
 void ErrorHandler::noTypeError(AstDeclaration const * pDecl)
 {
-    errorHeader(EIDL_NOT_A_TYPE);
+    errorHeader(ErrorCode::NotAType);
     fprintf(stderr, "'%s'\n", pDecl->getScopedName().getStr());
     idlc()->incErrorCount();
 }
@@ -554,12 +534,12 @@ void ErrorHandler::inheritanceError(NodeType nodeType, const OString* name, AstD
          (pDecl->getNodeType() == NT_interface) &&
          !(static_cast<AstInterface*>(pDecl)->isDefined()) )
     {
-        errorHeader(EIDL_INHERIT_FWD_ERROR);
+        errorHeader(ErrorCode::CannotInheritFromForward);
         fprintf(stderr, "interface '%s' cannot inherit from forward declared interface '%s'\n",
                 name->getStr(), pDecl->getScopedName().getStr());
     } else
     {
-        errorHeader(EIDL_CANT_INHERIT);
+        errorHeader(ErrorCode::CantInherit);
         fprintf(stderr, "%s '%s' from '%s'\n",
                 nodeTypeName(nodeType), name->getStr(),
                 pDecl->getScopedName().getStr());
@@ -570,7 +550,7 @@ void ErrorHandler::inheritanceError(NodeType nodeType, const OString* name, AstD
 void ErrorHandler::forwardLookupError(const AstDeclaration* pForward,
                                       const OString& name)
 {
-    errorHeader(EIDL_FWD_DECL_LOOKUP);
+    errorHeader(ErrorCode::ForwardDeclLookup);
     fprintf(stderr, "trying to look up '%s' in undefined forward declared interface '%s'\n",
             pForward->getScopedName().getStr(), name.getStr());
     idlc()->incErrorCount();
@@ -579,21 +559,21 @@ void ErrorHandler::forwardLookupError(const AstDeclaration* pForward,
 void ErrorHandler::constantExpected(AstDeclaration* pDecl,
                                     const OString& name)
 {
-    errorHeader(EIDL_CONSTANT_EXPECTED);
+    errorHeader(ErrorCode::ExpectedConstant);
     fprintf(stderr, "'%s' is bound to '%s'\n", name.getStr(), pDecl->getScopedName().getStr());
     idlc()->incErrorCount();
 }
 
 void ErrorHandler::evalError(AstExpression* pExpr)
 {
-    errorHeader(EIDL_EVAL_ERROR);
+    errorHeader(ErrorCode::Eval);
     fprintf(stderr, "'%s'\n", pExpr->toString().getStr());
     idlc()->incErrorCount();
 }
 
 bool ErrorHandler::checkPublished(AstDeclaration const * decl, bool bOptional) {
     if (idlc()->isPublished() && !decl->isPublished() && !bOptional) {
-        error1(EIDL_PUBLISHED_USES_UNPUBLISHED, decl);
+        error1(ErrorCode::PublishedusesUnpublished, decl);
         return false;
     } else {
         return true;
diff --git a/idlc/source/parser.y b/idlc/source/parser.y
index f8b143b..3a12f4c 100644
--- a/idlc/source/parser.y
+++ b/idlc/source/parser.y
@@ -100,7 +100,7 @@ void reportDoubleMemberDeclarations(
              doubleMembers.begin());
          i != doubleMembers.end(); ++i)
     {
-        ErrorHandler::error2(EIDL_DOUBLE_MEMBER, i->first, i->second);
+        ErrorHandler::error2(ErrorCode::DoubleMember, i->first, i->second);
     }
 }
 
@@ -132,7 +132,7 @@ void addInheritedInterface(
                          i != doubleDecls.interfaces.end(); ++i)
                     {
                         ErrorHandler::error1(
-                            EIDL_DOUBLE_INHERITANCE, *i);
+                            ErrorCode::DoubleInheritance, *i);
                     }
                     reportDoubleMemberDeclarations(doubleDecls.members);
                 }
@@ -140,7 +140,7 @@ void addInheritedInterface(
         }
     } else {
         ErrorHandler::lookupError(
-            EIDL_INTERFACEMEMBER_LOOKUP, name, scopeAsDecl(ifc));
+            ErrorCode::InterfaceMemberLookup, name, scopeAsDecl(ifc));
     }
 }
 
@@ -158,7 +158,7 @@ AstDeclaration const * createNamedType(
         if (static_cast< AstStruct const * >(resolved)->getTypeParameterCount()
             != (typeArgs == nullptr ? 0 : typeArgs->size()))
         {
-            ErrorHandler::error0(EIDL_WRONG_NUMBER_OF_TYPE_ARGUMENTS);
+            ErrorHandler::error0(ErrorCode::WrongNumberOfTypeArguments);
             decl = nullptr;
         } else if (typeArgs != nullptr) {
             AstScope * global = idlc()->scopes()->bottom();
@@ -171,7 +171,7 @@ AstDeclaration const * createNamedType(
         }
     } else if (decl->isType()) {
         if (typeArgs != nullptr) {
-            ErrorHandler::error0(EIDL_WRONG_NUMBER_OF_TYPE_ARGUMENTS);
+            ErrorHandler::error0(ErrorCode::WrongNumberOfTypeArguments);
             decl = nullptr;
         }
     } else {
@@ -531,7 +531,7 @@ forward_dcl :
                     delete pForward;
                 } else
                 {
-                    ErrorHandler::error2(EIDL_REDEF_SCOPE, scopeAsDecl(pScope), pDecl);
+                    ErrorHandler::error2(ErrorCode::RedefScope, scopeAsDecl(pScope), pDecl);
                 }
             } else
             {
@@ -579,14 +579,14 @@ interface_dcl :
                         {
                             if ( pForward->getScopedName() != pInterface->getScopedName() )
                             {
-                                ErrorHandler::error3(EIDL_SCOPE_CONFLICT,
+                                ErrorHandler::error3(ErrorCode::ScopeConflict,
                                          pInterface, pForward, scopeAsDecl(pScope));
                             }
                         }
                         else if ( !pInterface->isPublished()
                                   && pForward->isPublished() )
                         {
-                            ErrorHandler::error0(EIDL_PUBLISHED_FORWARD);
+                            ErrorHandler::error0(ErrorCode::PublishedForward);
                         }
                         /*
                          * All OK, set full definition
@@ -724,7 +724,7 @@ attribute :
     {
         idlc()->setParseState(PS_AttrCompleted);
         if (($1 & ~(AF_BOUND | AF_READONLY)) != AF_ATTRIBUTE) {
-            ErrorHandler::flagError(EIDL_BAD_ATTRIBUTE_FLAGS, $1);
+            ErrorHandler::flagError(ErrorCode::BadAttributeFlags, $1);
         }
         AstInterface * scope = static_cast< AstInterface * >(
             idlc()->scopes()->top());
@@ -765,7 +765,7 @@ opt_attrflags :
     opt_attrflags ',' opt_attrflag
     {
         if ( ($1 & $3) == $3 )
-            ErrorHandler::flagError(EIDL_DEFINED_ATTRIBUTEFLAG, $3);
+            ErrorHandler::flagError(ErrorCode::DefinedAttributeFlag, $3);
 
         $$ = $1 | $3;
     }
@@ -910,7 +910,7 @@ attribute_set_raises:
         if (static_cast< AstAttribute * >(idlc()->scopes()->top())->
             isReadonly())
         {
-            ErrorHandler::error0(EIDL_READONLY_ATTRIBUTE_SET_EXCEPTIONS);
+            ErrorHandler::error0(ErrorCode::ReadOnlyAttributeSetExceptions);
         }
     }
     raises ';'
@@ -1053,10 +1053,10 @@ parameter :
             if ( pType )
             {
                 if (pScope->isConstructor() && $2 != DIR_IN) {
-                    ErrorHandler::error0(EIDL_CONSTRUCTOR_PARAMETER_NOT_IN);
+                    ErrorHandler::error0(ErrorCode::ConstructorParameterNotIn);
                 }
                 if (pScope->isVariadic()) {
-                    ErrorHandler::error0(EIDL_REST_PARAMETER_NOT_LAST);
+                    ErrorHandler::error0(ErrorCode::RestParameterNotLast);
                 }
                 if ($7) {
                     AstDeclaration const * type = resolveTypedefs(pType);
@@ -1064,17 +1064,17 @@ parameter :
                         || (static_cast< AstBaseType const * >(type)->
                             getExprType() != ET_any))
                     {
-                        ErrorHandler::error0(EIDL_REST_PARAMETER_NOT_ANY);
+                        ErrorHandler::error0(ErrorCode::RestParameterNotAny);
                     }
                     if (pScope->isConstructor()) {
                         if (pScope->getIteratorBegin()
                             != pScope->getIteratorEnd())
                         {
                             ErrorHandler::error0(
-                                EIDL_CONSTRUCTOR_REST_PARAMETER_NOT_FIRST);
+                                ErrorCode::ConstructorRestParameterNotFirst);
                         }
                     } else {
-                        ErrorHandler::error0(EIDL_METHOD_HAS_REST_PARAMETER);
+                        ErrorHandler::error0(ErrorCode::MethodHasRestParameter);
                     }
                 }
 
@@ -1176,7 +1176,7 @@ exception_name:
         } else if (!ErrorHandler::checkPublished(decl)) {
             decl = nullptr;
         } else if (decl->getNodeType() != NT_exception) {
-            ErrorHandler::error1(EIDL_ILLEGAL_RAISES, decl);
+            ErrorHandler::error1(ErrorCode::IllegalRaises, decl);
             decl = nullptr;
         }
         delete $1;
@@ -1195,7 +1195,7 @@ interface_inheritance_decl:
         AstInterface * ifc = static_cast< AstInterface * >(
             idlc()->scopes()->top());
         if (ifc->usesSingleInheritance()) {
-            ErrorHandler::error0(EIDL_MIXED_INHERITANCE);
+            ErrorHandler::error0(ErrorCode::MixedInheritance);
         } else {
             addInheritedInterface(
                 ifc, *$4, $1,
@@ -1538,14 +1538,14 @@ property :
 
         if ( pScope->getScopeNodeType() == NT_singleton )
         {
-            ErrorHandler::error0(EIDL_ILLEGAL_ADD);
+            ErrorHandler::error0(ErrorCode::IllegalAdd);
         } else
         {
             if ( ($1 & AF_ATTRIBUTE) == AF_ATTRIBUTE )
-                ErrorHandler::flagError(EIDL_WRONGATTRIBUTEKEYWORD, AF_ATTRIBUTE);
+                ErrorHandler::flagError(ErrorCode::WrongAttributeKeyword, AF_ATTRIBUTE);
 
             if ( ($1 & AF_PROPERTY) != AF_PROPERTY )
-                ErrorHandler::flagError(EIDL_MISSINGATTRIBUTEKEYWORD, AF_PROPERTY);
+                ErrorHandler::flagError(ErrorCode::MissingAttributeKeyword, AF_PROPERTY);
 
             /*
              * Create nodes representing attributes and add them to the
@@ -1610,7 +1610,7 @@ service_export :
 
         if ( pScope->getScopeNodeType() == NT_singleton )
         {
-            ErrorHandler::error0(EIDL_ILLEGAL_ADD);
+            ErrorHandler::error0(ErrorCode::IllegalAdd);
         } else
         {
             /*
@@ -1639,7 +1639,7 @@ service_export :
                         }
                     } else
                     {
-                        ErrorHandler::lookupError(EIDL_INTERFACEMEMBER_LOOKUP, *iter, scopeAsDecl(pScope));
+                        ErrorHandler::lookupError(ErrorCode::InterfaceMemberLookup, *iter, scopeAsDecl(pScope));
                     }
                     iter++;
                 }
@@ -1672,7 +1672,7 @@ service_export :
                 if ( pDecl && (pDecl->getNodeType() == NT_service) )
                 {
                     if ( static_cast< AstService * >(pDecl)->isSingleInterfaceBasedService() || (pScope->getScopeNodeType() == NT_singleton && pScope->nMembers() > 0) )
-                        ErrorHandler::error0(EIDL_ILLEGAL_ADD);
+                        ErrorHandler::error0(ErrorCode::IllegalAdd);
                     else if ( ErrorHandler::checkPublished(pDecl) )
                     {
                         pSMember = new AstServiceMember(
@@ -1681,7 +1681,7 @@ service_export :
                     }
                 } else
                 {
-                    ErrorHandler::lookupError(EIDL_SERVICEMEMBER_LOOKUP, *iter, scopeAsDecl(pScope));
+                    ErrorHandler::lookupError(ErrorCode::ServiceMemberLookup, *iter, scopeAsDecl(pScope));
                 }
                 iter++;
             }
@@ -1700,7 +1700,7 @@ service_export :
 
         if ( pScope->getScopeNodeType() == NT_singleton )
         {
-            ErrorHandler::error0(EIDL_ILLEGAL_ADD);
+            ErrorHandler::error0(ErrorCode::IllegalAdd);
         } else
         {
             /*
@@ -1721,7 +1721,7 @@ service_export :
                         pScope->addDeclaration(pObserves);
                     } else
                     {
-                        ErrorHandler::lookupError(EIDL_INTERFACEMEMBER_LOOKUP, *iter, scopeAsDecl(pScope));
+                        ErrorHandler::lookupError(ErrorCode::InterfaceMemberLookup, *iter, scopeAsDecl(pScope));
                     }
                     iter++;
                 }
@@ -1741,7 +1741,7 @@ service_export :
 
         if ( pScope->getScopeNodeType() == NT_singleton )
         {
-            ErrorHandler::error0(EIDL_ILLEGAL_ADD);
+            ErrorHandler::error0(ErrorCode::IllegalAdd);
         } else
         {
             /*
@@ -1762,7 +1762,7 @@ service_export :
                         pScope->addDeclaration(pNeeds);
                     } else
                     {
-                        ErrorHandler::lookupError(EIDL_SERVICEMEMBER_LOOKUP, *iter, scopeAsDecl(pScope));
+                        ErrorHandler::lookupError(ErrorCode::ServiceMemberLookup, *iter, scopeAsDecl(pScope));
                     }
                     iter++;
                 }
@@ -1788,7 +1788,7 @@ service_interface_header :
     {
         idlc()->setParseState(PS_ServiceIFHeadSeen);
         if ( (AF_OPTIONAL != $1) && ( AF_INVALID != $1) )
-            ErrorHandler::flagError(EIDL_OPTIONALEXPECTED, $1);
+            ErrorHandler::flagError(ErrorCode::ExpectedOptional, $1);
         $$ = $1;
     }
     ;
@@ -1804,7 +1804,7 @@ service_service_header :
     {
         idlc()->setParseState(PS_ServiceSHeadSeen);
         if ( (AF_OPTIONAL != $1) && ( AF_INVALID != $1) )

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list