[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/unx

Noel Grandin noel.grandin at collabora.co.uk
Mon Feb 20 08:45:47 UTC 2017


 compilerplugins/clang/unusedenumconstants.py |   30 ++++++++++++++++++---------
 vcl/inc/unx/salframe.h                       |    1 
 vcl/unx/generic/app/wmadaptor.cxx            |   20 ------------------
 3 files changed, 21 insertions(+), 30 deletions(-)

New commits:
commit d1eb3c86b0ae5fb2a237b6a35b823e9569e2dcf6
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Feb 20 09:47:16 2017 +0200

    remove unused ModalDialogue from WMWindowType enum
    
    Change-Id: I22269d6d1868b744f48274ff53ca46fa93ce9fc1
    Reviewed-on: https://gerrit.libreoffice.org/34455
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py
index 803aaff..089927e 100755
--- a/compilerplugins/clang/unusedenumconstants.py
+++ b/compilerplugins/clang/unusedenumconstants.py
@@ -63,11 +63,7 @@ def startswith_one_of( srcLoc, fileSet ):
             return True;
     return False;
 
-untouchedSet = set()
-for d in definitionSet:
-    if d in readSet or d in writeSet:
-        continue
-    srcLoc = definitionToSourceLocationMap[d];
+def is_ignore(srcLoc):
     if startswith_one_of(srcLoc,
         [
         # this is all representations of on-disk or external data structures
@@ -118,6 +114,8 @@ for d in definitionSet:
          "include/basic/sbxdef.hxx", # SbxDataType
          "connectivity/source/inc/dbase/DTable.hxx", # ODbaseTable::DBFType
          "codemaker/source/javamaker/classfile.hxx", # AccessFlags
+         "basic/source/inc/filefmt.hxx", # FileOffset
+         "basic/source/inc/opcodes.hxx", #  SbiOpcode
         # unit test code
          "cppu/source/uno/check.cxx",
         # general weird nonsense going on
@@ -146,7 +144,7 @@ for d in definitionSet:
          "binaryurp/source/specialfunctionids.hxx", # binaryurp::SpecialFunctionIds
          "connectivity/source/inc/odbc/OTools.hxx", # ODBC3SQLFunctionId
          "include/formula/grammar.hxx", # FormulaGrammar::Grammar
-         "include/formula/opcode.hxx", # OpCode
+         "basic/source/sbx/sbxres.hxx", # StringId
         # Windows or OSX only
          "include/canvas/rendering/icolorbuffer.hxx",
          "include/vcl/commandevent.hxx",
@@ -159,7 +157,7 @@ for d in definitionSet:
         # must match some other enum
          "include/editeng/bulletitem.hxx",
          "include/editeng/svxenum.hxx",
-         "include/formula/opcode.hxx",
+         "include/formula/opcode.hxx", # OpCode
          "include/i18nutil/paper.hxx",
          "include/oox/drawingml/shapepropertymap.hxx",
          "include/svl/nfkeytab.hx",
@@ -194,9 +192,19 @@ for d in definitionSet:
          "include/i18nlangtag/applelangid.hxx", # AppleLanguageId
          "connectivity/source/drivers/firebird/Util.hxx", # firebird::BlobSubtype
          ]):
-        continue
+         return True
+    if d[1] == "UNKNOWN" or d[1] == "LAST" or d[1].endswith("NONE") or d[1].endswith("None") or d[1].endswith("EQUAL_SIZE"):
+        return True
+    return False
 
-    if d[1] == "UNKNOWN" or d[1].endswith("NONE") or d[1].endswith("None") or d[1].endswith("EQUAL_SIZE"): continue
+
+untouchedSet = set()
+for d in definitionSet:
+    if d in readSet or d in writeSet:
+        continue
+    srcLoc = definitionToSourceLocationMap[d];
+    if (is_ignore(srcLoc)):
+        continue
 
     untouchedSet.add((d[0] + " " + d[1], srcLoc))
 
@@ -205,6 +213,8 @@ for d in writeSet:
     if d in readSet:
         continue
     srcLoc = definitionToSourceLocationMap[d];
+    if (is_ignore(srcLoc)):
+        continue
     writeonlySet.add((d[0] + " " + d[1], srcLoc))
 
 readonlySet = set()
@@ -212,6 +222,8 @@ for d in readSet:
     if d in writeSet:
         continue
     srcLoc = definitionToSourceLocationMap[d];
+    if (is_ignore(srcLoc)):
+        continue
     readonlySet.add((d[0] + " " + d[1], srcLoc))
 
 # sort the results using a "natural order" so sequences like [item1,item2,item10] sort nicely
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index 510ebd1..69702fc 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -53,7 +53,6 @@ namespace vcl_sal { class WMAdaptor; class NetWMAdaptor; class GnomeWMAdaptor; }
 enum class WMWindowType
 {
     Normal,
-    ModalDialogue,
     ModelessDialogue,
     Utility,
     Splash,
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index c8dfecb..559bc1c 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -1067,17 +1067,6 @@ void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const
         int nStateAtoms = 0;
 
         // set NET_WM_STATE_MODAL
-        if( m_aWMAtoms[ NET_WM_STATE_MODAL ]
-            && pFrame->meWindowType == WMWindowType::ModalDialogue )
-        {
-            aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_MODAL ];
-            /*
-             *  #90998# NET_WM_STATE_SKIP_TASKBAR set on a frame will
-             *  cause kwin not to give it the focus on map request
-             *  this seems to be a bug in kwin
-             *  aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_SKIP_TASKBAR ];
-             */
-        }
         if( pFrame->mbMaximizedVert
             && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ] )
             aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_VERT ];
@@ -1322,15 +1311,6 @@ void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eTy
                 aHint.func |= 1L << 5;
             }
         }
-        // evaluate window type
-        switch( eType )
-        {
-            case WMWindowType::ModalDialogue:
-                aHint.input_mode = 1;
-                break;
-            default:
-                break;
-        }
 
         // set the hint
         XChangeProperty( m_pDisplay,


More information about the Libreoffice-commits mailing list