compilerplugins/clang/unusedfields.readonly.results |   26 -----
 include/vcl/button.hxx                              |    5 -
 include/vcl/menu.hxx                                |    8 -
 include/vcl/opengl/OpenGLContext.hxx                |    1 
 include/vcl/svapp.hxx                               |   12 --
 include/vcl/throbber.hxx                            |    1 
 include/vcl/toolbox.hxx                             |    1 
 vcl/inc/svdata.hxx                                  |    6 -
 vcl/inc/unx/i18n_status.hxx                         |    1 
 vcl/inc/unx/salgdi.h                                |    1 
 vcl/source/app/svapp.cxx                            |   72 --------------
 vcl/source/app/svmain.cxx                           |    6 -
 vcl/source/control/button.cxx                       |   20 ----
 vcl/source/control/throbber.cxx                     |   18 ---
 vcl/source/filter/sgvmain.hxx                       |    1 
 vcl/source/gdi/pdfwriter_impl.cxx                   |    2 
 vcl/source/gdi/pdfwriter_impl.hxx                   |    2 
 vcl/source/opengl/OpenGLContext.cxx                 |    4 
 vcl/source/window/menu.cxx                          |   31 ------
 vcl/source/window/menufloatingwindow.cxx            |   24 +---
 vcl/source/window/menufloatingwindow.hxx            |    2 
 vcl/source/window/toolbox.cxx                       |   98 +-------------------
 vcl/source/window/winproc.cxx                       |    8 -
 vcl/unx/generic/app/i18n_status.cxx                 |   10 --
 vcl/unx/generic/gdi/gdiimpl.cxx                     |   13 --
 vcl/unx/generic/gdi/salgdi.cxx                      |    1 
 26 files changed, 27 insertions(+), 347 deletions(-)

New commits:
commit f24b46c27243b88e4d367d7b105d1365e97dbd76
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Thu Jul 20 11:13:20 2017 +0200

    loplugin:unusedfields in vcl
    
    Change-Id: I207866df495ec81bb9288e6d0f664b96d90251d6
    Reviewed-on: https://gerrit.libreoffice.org/40217
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/compilerplugins/clang/unusedfields.readonly.results 
b/compilerplugins/clang/unusedfields.readonly.results
index 18f29baaec63..f36b53dea1cb 100644
--- a/compilerplugins/clang/unusedfields.readonly.results
+++ b/compilerplugins/clang/unusedfields.readonly.results
@@ -698,20 +698,10 @@ include/vcl/bitmap.hxx:176
     BmpFilterParam::(anonymous) mcSolarGreyThreshold sal_uInt8
 include/vcl/bitmap.hxx:177
     BmpFilterParam::(anonymous) mnRadius double
-include/vcl/button.hxx:287
-    RadioButton mbLegacyNoTextAlign _Bool
 include/vcl/filter/pdfdocument.hxx:173
     vcl::filter::PDFNameElement m_nLength sal_uInt64
-include/vcl/menu.hxx:121
-    MenuLogo aBitmap class BitmapEx
 include/vcl/opengl/OpenGLContext.hxx:57
     OpenGLCapabilitySwitch mbLimitedShaderRegisters _Bool
-include/vcl/opengl/OpenGLContext.hxx:203
-    OpenGLContext mnPainting int
-include/vcl/throbber.hxx:83
-    Throbber meImageSet enum Throbber::ImageSet
-include/vcl/toolbox.hxx:106
-    ToolBox maOutDockRect tools::Rectangle
 include/xmloff/nmspmap.hxx:70
     SvXMLNamespaceMap sEmpty const class rtl::OUString
 io/source/acceptor/acc_socket.cxx:89
@@ -1754,10 +1744,6 @@ vcl/inc/unx/gtk/gloactiongroup.h:37
     GLOActionGroupClass parent_class GObjectClass
 vcl/inc/unx/gtk/gloactiongroup.h:40
     GLOActionGroupClass padding gpointer [12]
-vcl/inc/unx/i18n_status.hxx:57
-    vcl::I18NStatus::ChoiceData pData void *
-vcl/inc/unx/salgdi.h:339
-    X11SalGraphics bPrinter_ _Bool
 vcl/inc/unx/XIM.h:28
     (anonymous) client_data XPointer
 vcl/inc/unx/XIM.h:34
@@ -1814,12 +1800,6 @@ vcl/inc/unx/XIM.h:97
     (anonymous) count_subsets unsigned short
 vcl/inc/unx/XIM.h:98
     (anonymous) supported_subsets XIMUnicodeCharacterSubset *
-vcl/source/app/svapp.cxx:158
-    ImplHotKey mpNext struct ImplHotKey *
-vcl/source/app/svapp.cxx:159
-    ImplHotKey maKeyCode vcl::KeyCode
-vcl/source/app/svapp.cxx:164
-    ImplEventHook mpNext struct ImplEventHook *
 vcl/source/filter/jpeg/Exif.hxx:62
     Exif::TiffHeader byteOrder sal_uInt16
 vcl/source/filter/jpeg/transupp.h:132
@@ -1834,8 +1814,6 @@ vcl/source/filter/jpeg/transupp.h:150
     (anonymous) crop_yoffset_set JCROP_CODE
 vcl/source/filter/sgvmain.hxx:44
     DtHdType Reserved sal_uInt8 [256]
-vcl/source/filter/sgvmain.hxx:285
-    BmapType aFltPath class INetURLObject
 vcl/source/fontsubset/sft.cxx:1055
     vcl::_subHeader2 firstCode sal_uInt16
 vcl/source/fontsubset/sft.cxx:1056
@@ -1878,10 +1856,6 @@ vcl/source/gdi/pdfwriter_impl.cxx:5794
     (anonymous namespace)::(anonymous) statusString SECItem
 vcl/source/gdi/pdfwriter_impl.cxx:5795
     (anonymous namespace)::(anonymous) failInfo SECItem
-vcl/source/gdi/pdfwriter_impl.hxx:749
-    vcl::PDFWriterImpl::GraphicsState m_nTransparentPercent sal_Int32
-vcl/unx/generic/app/i18n_status.cxx:298
-    vcl::IIIMPStatusWindow m_aMenu ScopedVclPtrInstance<class PopupMenu>
 vcl/unx/generic/fontmanager/fontsubst.cxx:35
     FcPreMatchSubstitution maCachedFontMap 
FcPreMatchSubstitution::CachedFontMapType
 vcl/unx/generic/print/bitmap_gfx.cxx:67
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index b469060661bf..3872a8c2c156 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -280,11 +280,6 @@ private:
     bool            mbRadioCheck;
     bool            mbStateChanged;
     Link<RadioButton&,void> maToggleHdl;
-    // when mbLegacyNoTextAlign is set then the old behaviour where
-    // the WB_LEFT, WB_RIGHT & WB_CENTER affect the image placement
-    // occurs, otherwise the image ( radiobutton circle ) is placed
-    // to the left or right ( depending on RTL or LTR settings )
-    bool            mbLegacyNoTextAlign;
     SAL_DLLPRIVATE void     ImplInitRadioButtonData();
     SAL_DLLPRIVATE WinBits  ImplInitStyle( const vcl::Window* pPrevWindow, 
WinBits nStyle );
     SAL_DLLPRIVATE void     ImplInitSettings( bool bBackground );
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 10c708f830b5..c828aae0baa3 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -116,13 +116,6 @@ struct ImplMenuDelData
     bool isDeleted() const { return mpMenu == nullptr; }
 };
 
-struct MenuLogo
-{
-    BitmapEx aBitmap;
-    Color aStartColor;
-    Color aEndColor;
-};
-
 typedef void (*MenuUserDataReleaseFunction)(sal_uLong);
 
 class VCL_DLLPUBLIC Menu : public VclReferenceBase
@@ -137,7 +130,6 @@ class VCL_DLLPUBLIC Menu : public VclReferenceBase
 private:
     ImplMenuDelData* mpFirstDel;
     std::unique_ptr<MenuItemList> pItemList; // list with MenuItems
-    MenuLogo* pLogo;
     VclPtr<Menu> pStartedFrom;
     VclPtr<vcl::Window> pWindow;
 
diff --git a/include/vcl/opengl/OpenGLContext.hxx 
b/include/vcl/opengl/OpenGLContext.hxx
index 5fc88d6c0008..738f503269d2 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -200,7 +200,6 @@ private:
 
 public:
     vcl::Region maClipRegion;
-    int mnPainting;
 
     // Don't hold references to ourselves:
     OpenGLContext *mpPrevContext;
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index eddce0abf324..d5b81b2a20a4 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -674,18 +674,6 @@ public:
     ///@{
 
 
-    /** Call on all event hooks
-
-     @param rEvt                Reference to the notification event to send
-                                to the event hook.
-
-     @return If any of the event hooks called upon fail with a non-zero
-         status, then it stops processing any more event hooks and returns
-         the error code as a long.
-
-    */
-    static long                 CallEventHooks( NotifyEvent& rEvt );
-
     /** Add a VCL event listener to the application. If no event listener 
exists,
      then initialize the application's event listener with a new one, then add
      the event listener.
diff --git a/include/vcl/throbber.hxx b/include/vcl/throbber.hxx
index 91906c41aeae..a7fccb02a17a 100644
--- a/include/vcl/throbber.hxx
+++ b/include/vcl/throbber.hxx
@@ -80,7 +80,6 @@ private:
     sal_Int32   mnStepTime;
     sal_Int32   mnCurStep;
     AutoTimer   maWaitTimer;
-    ImageSet    meImageSet;
 
     DECL_LINK( TimeOutHdl, Timer*, void );
 };
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 7412452e8948..5136a343612a 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -103,7 +103,6 @@ private:
     Idle               *mpIdle;
     tools::Rectangle           maUpperRect;
     tools::Rectangle           maLowerRect;
-    tools::Rectangle           maOutDockRect;
     tools::Rectangle           maInDockRect;
     tools::Rectangle           maPaintRect;
     VclPtr<FloatingWindow> mpFloatWin;
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 35edf1eec40e..8c07cf9ffff1 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -138,8 +138,6 @@ struct ImplSVAppData
     Help*                   mpHelp = nullptr;               // Application help
     VclPtr<PopupMenu>       mpActivePopupMenu;              // Actives 
Popup-Menu (in Execute)
     VclPtr<ImplWheelWindow> mpWheelWindow;                  // WheelWindow
-    ImplHotKey*             mpFirstHotKey = nullptr;        // 
HotKey-Verwaltung
-    ImplEventHook*          mpFirstEventHook = nullptr;     // Event-Hooks
     sal_uInt64              mnLastInputTime = 0;            // 
GetLastInputTime()
     sal_uInt16              mnDispatchLevel = 0;            // DispatchLevel
     sal_uInt16              mnModalMode = 0;                // ModalMode Count
@@ -371,10 +369,6 @@ VCL_PLUGIN_PUBLIC ResId VclResId( sal_Int32 nId ); // 
throws std::bad_alloc if n
 DockingManager*     ImplGetDockingManager();
 BlendFrameCache*    ImplGetBlendFrameCache();
 
-bool        ImplCallHotKey( const vcl::KeyCode& rKeyCode );
-void        ImplFreeHotKeyData();
-void        ImplFreeEventHookData();
-
 bool        ImplCallPreNotify( NotifyEvent& rEvt );
 
 VCL_PLUGIN_PUBLIC ImplSVData* ImplGetSVData();
diff --git a/vcl/inc/unx/i18n_status.hxx b/vcl/inc/unx/i18n_status.hxx
index f8cc4614c811..d9be17c5d288 100644
--- a/vcl/inc/unx/i18n_status.hxx
+++ b/vcl/inc/unx/i18n_status.hxx
@@ -54,7 +54,6 @@ public:
     struct ChoiceData
     {
         OUString  aString;
-        void*     pData;
     };
 private:
     SalFrame*                       m_pParent;
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 87f9d6e83176..46d2557f1b21 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -336,7 +336,6 @@ protected:
     Pixmap                          hBrush_;        // Dither
 
     bool                            bWindow_ : 1;       // is Window
-    bool                            bPrinter_ : 1;      // is Printer
     bool                            bVirDev_ : 1;       // is VirDev
     bool                            bFontGC_ : 1;       // is Font GC valid
     bool                            m_bOpenGL : 1;
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0d93f95b23f5..5cd0594c684c 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -153,15 +153,8 @@ extern "C" {
     typedef UnoWrapperBase* (SAL_CALL *FN_TkCreateUnoWrapper)();
 }
 
-struct ImplHotKey
-{
-    ImplHotKey*             mpNext;
-    vcl::KeyCode            maKeyCode;
-};
-
 struct ImplEventHook
 {
-    ImplEventHook*          mpNext;
     void*                   mpUserData;
     VCLEventHookProc        mpProc;
 };
@@ -1522,71 +1515,6 @@ void Application::SetFilterHdl( const 
Link<ConvertData&,bool>& rLink )
     ImplGetSVData()->maGDIData.mpGrfConverter->SetFilterHdl( rLink );
 }
 
-bool ImplCallHotKey( const vcl::KeyCode& rKeyCode )
-{
-    ImplSVData*     pSVData = ImplGetSVData();
-    ImplHotKey*     pHotKeyData = pSVData->maAppData.mpFirstHotKey;
-    while ( pHotKeyData )
-    {
-        if ( pHotKeyData->maKeyCode == rKeyCode )
-        {
-            return true;
-        }
-
-        pHotKeyData = pHotKeyData->mpNext;
-    }
-
-    return false;
-}
-
-void ImplFreeHotKeyData()
-{
-    ImplSVData*     pSVData = ImplGetSVData();
-    ImplHotKey*     pTempHotKeyData;
-    ImplHotKey*     pHotKeyData = pSVData->maAppData.mpFirstHotKey;
-    while ( pHotKeyData )
-    {
-        pTempHotKeyData = pHotKeyData->mpNext;
-        delete pHotKeyData;
-        pHotKeyData = pTempHotKeyData;
-    }
-
-    pSVData->maAppData.mpFirstHotKey = nullptr;
-}
-
-void ImplFreeEventHookData()
-{
-    ImplSVData*     pSVData = ImplGetSVData();
-    ImplEventHook*  pTempEventHookData;
-    ImplEventHook*  pEventHookData = pSVData->maAppData.mpFirstEventHook;
-    while ( pEventHookData )
-    {
-        pTempEventHookData = pEventHookData->mpNext;
-        delete pEventHookData;
-        pEventHookData = pTempEventHookData;
-    }
-
-    pSVData->maAppData.mpFirstEventHook = nullptr;
-}
-
-long Application::CallEventHooks( NotifyEvent& rEvt )
-{
-    ImplSVData*     pSVData = ImplGetSVData();
-    long            nRet = 0;
-    ImplEventHook*  pTempEventHookData;
-    ImplEventHook*  pEventHookData = pSVData->maAppData.mpFirstEventHook;
-    while ( pEventHookData )
-    {
-        pTempEventHookData = pEventHookData->mpNext;
-        nRet = pEventHookData->mpProc( rEvt, pEventHookData->mpUserData );
-        if ( nRet )
-            break;
-        pEventHookData = pTempEventHookData;
-    }
-
-    return nRet;
-}
-
 const LocaleDataWrapper& Application::GetAppLocaleDataWrapper()
 {
     return GetSettings().GetLocaleDataWrapper();
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 325eef803b9a..b51bfbe8870a 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -562,12 +562,6 @@ void DeInitVCL()
         delete pSVData->maAppData.mpKeyListeners;
         pSVData->maAppData.mpKeyListeners = nullptr;
     }
-
-    if ( pSVData->maAppData.mpFirstHotKey )
-        ImplFreeHotKeyData();
-    if ( pSVData->maAppData.mpFirstEventHook )
-        ImplFreeEventHookData();
-
     if (pSVData->mpBlendFrameCache)
     {
         delete pSVData->mpBlendFrameCache;
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 8db0bfcaa947..aed5ef25a4ef 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2068,32 +2068,18 @@ void RadioButton::ImplDraw( OutputDevice* pDev, 
DrawFlags nDrawFlags,
         }
         else
         {
-            if ( mbLegacyNoTextAlign && ( nWinStyle & WB_CENTER ) )
-                rStateRect.Left() = 
rPos.X()+((rSize.Width()-rImageSize.Width())/2);
-            else if ( mbLegacyNoTextAlign && ( nWinStyle & WB_RIGHT ) )
-                rStateRect.Left() = rPos.X()+rSize.Width()-rImageSize.Width(); 
//-1;
-            else
-                rStateRect.Left() = rPos.X(); //+1;
+            rStateRect.Left() = rPos.X();
             if ( nWinStyle & WB_VCENTER )
                 rStateRect.Top() = 
rPos.Y()+((rSize.Height()-rImageSize.Height())/2);
             else if ( nWinStyle & WB_BOTTOM )
                 rStateRect.Top() = 
rPos.Y()+rSize.Height()-rImageSize.Height(); //-1;
             else
-                rStateRect.Top() = rPos.Y(); //+1;
+                rStateRect.Top() = rPos.Y();
             rStateRect.Right()  = rStateRect.Left()+rImageSize.Width()-1;
             rStateRect.Bottom() = rStateRect.Top()+rImageSize.Height()-1;
             rMouseRect          = rStateRect;
 
             ImplSetFocusRect( rStateRect );
-
-/*  and above -1 because CalcSize() does not include focus-rectangle since 
images would be even
-    positioned higher in writer
-            rFocusRect          = rStateRect;
-            rFocusRect.Left()--;
-            rFocusRect.Top()--;
-            rFocusRect.Right()++;
-            rFocusRect.Bottom()++;
-*/
         }
     }
     else
@@ -2295,7 +2281,7 @@ void RadioButton::ImplCallClick( bool bGrabFocus, 
GetFocusFlags nFocusFlags )
 }
 
 RadioButton::RadioButton( vcl::Window* pParent, WinBits nStyle ) :
-    Button( WindowType::RADIOBUTTON ), mbLegacyNoTextAlign( false )
+    Button( WindowType::RADIOBUTTON )
 {
     ImplInitRadioButtonData();
     ImplInit( pParent, nStyle );
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx
index 86297ad3b445..9201a75430a7 100644
--- a/vcl/source/control/throbber.cxx
+++ b/vcl/source/control/throbber.cxx
@@ -45,7 +45,6 @@ Throbber::Throbber( vcl::Window* i_parentWindow, WinBits 
i_style )
     ,mbRepeat( true )
     ,mnStepTime( 100 )
     ,mnCurStep( 0 )
-    ,meImageSet( ImageSet::Auto )
 {
     maWaitTimer.SetTimeout( mnStepTime );
     maWaitTimer.SetInvokeHandler( LINK( this, Throbber, TimeOutHdl ) );
@@ -96,9 +95,7 @@ namespace
 void Throbber::Resize()
 {
     ImageControl::Resize();
-
-    if ( meImageSet == ImageSet::Auto )
-        initImages();
+    initImages();
 }
 
 void Throbber::initImages()
@@ -106,16 +103,9 @@ void Throbber::initImages()
     try
     {
         ::std::vector< ::std::vector< Image > > aImageSets;
-        if ( meImageSet == ImageSet::Auto )
-        {
-            aImageSets.push_back( lcl_loadImageSet( ImageSet::N16px ) );
-            aImageSets.push_back( lcl_loadImageSet( ImageSet::N32px ) );
-            aImageSets.push_back( lcl_loadImageSet( ImageSet::N64px ) );
-        }
-        else
-        {
-            aImageSets.push_back( lcl_loadImageSet( meImageSet ) );
-        }
+        aImageSets.push_back( lcl_loadImageSet( ImageSet::N16px ) );
+        aImageSets.push_back( lcl_loadImageSet( ImageSet::N32px ) );
+        aImageSets.push_back( lcl_loadImageSet( ImageSet::N64px ) );
 
         // find the best matching image set (size-wise)
         const ::Size aWindowSizePixel = GetSizePixel();
diff --git a/vcl/source/filter/sgvmain.hxx b/vcl/source/filter/sgvmain.hxx
index 83fa65000ac7..061aa4205a72 100644
--- a/vcl/source/filter/sgvmain.hxx
+++ b/vcl/source/filter/sgvmain.hxx
@@ -282,7 +282,6 @@ public:
     bool    InvOut;       // output inverted ?
     bool    LightOut;     // brighten? (SD20)
     sal_uInt8   GrfFlg;       // (SD20) 0=nSGF 1=Pcx 2=HPGL 4=Raw $FF=Undef 
(to fix DrawBmp)
-    INetURLObject aFltPath;   // for GraphicFilter
 
     BmapType()
         : Flags(0)
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index cac8aff63909..bc1fcec4abad 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -10295,7 +10295,7 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode)
     if( (rNewState.m_nUpdateFlags & 
GraphicsStateUpdateFlags::TransparentPercent) )
     {
         rNewState.m_nUpdateFlags &= 
~GraphicsStateUpdateFlags::TransparentPercent;
-        if( m_aContext.Version >= PDFWriter::PDFVersion::PDF_1_4 && 
m_aCurrentPDFState.m_nTransparentPercent != rNewState.m_nTransparentPercent )
+        if( m_aContext.Version >= PDFWriter::PDFVersion::PDF_1_4 )
         {
             // TODO: switch extended graphicsstate
         }
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx 
b/vcl/source/gdi/pdfwriter_impl.hxx
index 97666d0cefd4..7b8fc46a3cb3 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -746,7 +746,6 @@ private:
         bool                             m_bClipRegion;
         ComplexTextLayoutFlags            m_nLayoutMode;
         LanguageType                     m_aDigitLanguage;
-        sal_Int32                        m_nTransparentPercent;
         PushFlags                        m_nFlags;
         GraphicsStateUpdateFlags         m_nUpdateFlags;
 
@@ -758,7 +757,6 @@ private:
                 m_bClipRegion( false ),
                 m_nLayoutMode( ComplexTextLayoutFlags::Default ),
                 m_aDigitLanguage( 0 ),
-                m_nTransparentPercent( 0 ),
                 m_nFlags( PushFlags::ALL ),
                 m_nUpdateFlags( GraphicsStateUpdateFlags::All )
         {}
diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index 1354f3764880..d2a5fc8a963b 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -61,7 +61,6 @@ OpenGLContext::OpenGLContext():
     mpLastFramebuffer(nullptr),
     mpCurrentProgram(nullptr),
     mpRenderState(new RenderState),
-    mnPainting(0),
     mpPrevContext(nullptr),
     mpNextContext(nullptr)
 {
@@ -382,9 +381,6 @@ void OpenGLContext::reset()
 
     OpenGLZone aZone;
 
-    // don't reset a context in the middle of stack frames rendering to it
-    assert( mnPainting == 0 );
-
     // reset the clip region
     maClipRegion.SetEmpty();
     mpRenderState.reset(new RenderState);
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index e97113907a2b..ad2c18a9cac0 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -126,7 +126,6 @@ void ImplClosePopupToolBox( const VclPtr<vcl::Window>& pWin 
)
 Menu::Menu()
     : mpFirstDel(nullptr),
       pItemList(new MenuItemList),
-      pLogo(nullptr),
       pStartedFrom(nullptr),
       pWindow(nullptr),
       nTitleHeight(0),
@@ -185,8 +184,6 @@ void Menu::dispose()
     bKilled = true;
 
     pItemList->Clear();
-    delete pLogo;
-    pLogo = nullptr;
     delete mpLayoutData;
     mpLayoutData = nullptr;
 
@@ -1582,9 +1579,6 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
             aSz.Height() = nCloseButtonHeight;
     }
 
-    if ( pLogo )
-        aSz.Width() += pLogo->aBitmap.GetSizePixel().Width();
-
     return aSz;
 }
 
@@ -1683,9 +1677,6 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
 
     Point aTopLeft, aTmpPos;
 
-    if (pLogo)
-        aTopLeft.X() = pLogo->aBitmap.GetSizePixel().Width();
-
     int nOuterSpaceX = 0;
     if (!IsMenuBar())
     {
@@ -2023,28 +2014,6 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
         else
             aTopLeft.X() += pData->aSz.Width();
     }
-
-    if (!bLayout && !pThisItemOnly && pLogo)
-    {
-        Size aLogoSz = pLogo->aBitmap.GetSizePixel();
-
-        tools::Rectangle aRect(Point(), Point(aLogoSz.Width() - 1, 
aOutSz.Height()));
-        if (rRenderContext.GetColorCount() >= 256)
-        {
-            Gradient aGrad(GradientStyle::Linear, pLogo->aStartColor, 
pLogo->aEndColor);
-            aGrad.SetAngle(1800);
-            aGrad.SetBorder(15);
-            rRenderContext.DrawGradient(aRect, aGrad);
-        }
-        else
-        {
-            rRenderContext.SetFillColor(pLogo->aStartColor);
-            rRenderContext.DrawRect(aRect);
-        }
-
-        Point aLogoPos(0, aOutSz.Height() - aLogoSz.Height());
-        pLogo->aBitmap.Draw(&rRenderContext, aLogoPos);
-    }
 }
 
 Menu* Menu::ImplGetStartMenu()
diff --git a/vcl/source/window/menufloatingwindow.cxx 
b/vcl/source/window/menufloatingwindow.cxx
index a30653f1c6cb..e9d691ec5aa2 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -169,7 +169,7 @@ long MenuFloatingWindow::ImplGetStartY() const
     return -nY;
 }
 
-vcl::Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const
+vcl::Region MenuFloatingWindow::ImplCalcClipRegion() const
 {
     Size aOutSz = GetOutputSizePixel();
     Point aPos;
@@ -177,12 +177,7 @@ vcl::Region MenuFloatingWindow::ImplCalcClipRegion( bool 
bIncludeLogo ) const
     aRect.Top() += nScrollerHeight;
     aRect.Bottom() -= nScrollerHeight;
 
-    if ( pMenu && pMenu->pLogo && !bIncludeLogo )
-        aRect.Left() += pMenu->pLogo->aBitmap.GetSizePixel().Width();
-
     vcl::Region aRegion(aRect);
-    if ( pMenu && pMenu->pLogo && bIncludeLogo && nScrollerHeight )
-        aRegion.Union( tools::Rectangle( Point(), Size( 
pMenu->pLogo->aBitmap.GetSizePixel().Width(), aOutSz.Height() ) ) );
 
     return aRegion;
 }
@@ -634,7 +629,7 @@ void MenuFloatingWindow::ImplScroll( bool bUp )
                 Invalidate();
             }
 
-            Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( false 
).GetBoundRect(), ScrollFlags::Clip );
+            Scroll( 0, nScrollEntryHeight, 
ImplCalcClipRegion().GetBoundRect(), ScrollFlags::Clip );
         }
     }
     else if ( bScrollDown && !bUp )
@@ -663,7 +658,7 @@ void MenuFloatingWindow::ImplScroll( bool bUp )
                 Invalidate();
             }
 
-            Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( false 
).GetBoundRect(), ScrollFlags::Clip );
+            Scroll( 0, -nScrollEntryHeight, 
ImplCalcClipRegion().GetBoundRect(), ScrollFlags::Clip );
         }
     }
 
@@ -813,9 +808,6 @@ void 
MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
     long nStartY;
     long nY = GetInitialItemY(&nStartY);
 
-    if (pMenu->pLogo)
-        nX = pMenu->pLogo->aBitmap.GetSizePixel().Width();
-
     int nOuterSpaceX = ImplGetSVData()->maNWFData.mnMenuFormatBorderX;
 
     size_t nCount = pMenu->pItemList->size();
@@ -897,10 +889,6 @@ tools::Rectangle MenuFloatingWindow::ImplGetItemRect( 
sal_uInt16 nPos )
     Size    aSz = GetOutputSizePixel();
     long    nStartY = ImplGetStartY();
     long    nY = nScrollerHeight+nStartY;
-    long    nX = 0;
-
-    if ( pMenu->pLogo )
-        nX = pMenu->pLogo->aBitmap.GetSizePixel().Width();
 
     size_t nCount = pMenu->pItemList->size();
     for ( size_t n = 0; n < nCount; n++ )
@@ -911,7 +899,7 @@ tools::Rectangle MenuFloatingWindow::ImplGetItemRect( 
sal_uInt16 nPos )
             SAL_WARN_IF( !pMenu->ImplIsVisible( n ), "vcl", "ImplGetItemRect: 
Item not visible!" );
             if ( pData->eType != MenuItemType::SEPARATOR )
             {
-                aRect = tools::Rectangle( Point( nX, nY ), Size( aSz.Width(), 
pData->aSz.Height() ) );
+                aRect = tools::Rectangle( Point( 0, nY ), Size( aSz.Width(), 
pData->aSz.Height() ) );
                 if ( pData->nBits & MenuItemBits::POPUPSELECT )
                 {
                     long nFontHeight = GetTextHeight();
@@ -1192,7 +1180,7 @@ void MenuFloatingWindow::Paint(vcl::RenderContext& 
rRenderContext, const tools::
     if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, 
ControlPart::Entire))
     {
         rRenderContext.SetClipRegion();
-        long nX = pMenu->pLogo ? pMenu->pLogo->aBitmap.GetSizePixel().Width() 
: 0;
+        long nX = 0;
         Size aPxSize(GetOutputSizePixel());
         aPxSize.Width() -= nX;
         ImplControlValue aVal(pMenu->nTextPos - GUTTERBORDER);
@@ -1223,7 +1211,7 @@ void 
MenuFloatingWindow::ImplDrawScroller(vcl::RenderContext& rRenderContext, bo
 
     Size aOutSz(GetOutputSizePixel());
     long nY = bUp ? 0 : (aOutSz.Height() - nScrollerHeight);
-    long nX = pMenu->pLogo ? pMenu->pLogo->aBitmap.GetSizePixel().Width() : 0;
+    long nX = 0;
     tools::Rectangle aRect(Point(nX, nY), Size(aOutSz.Width() - nX, 
nScrollerHeight));
 
     DecorationView aDecoView(&rRenderContext);
diff --git a/vcl/source/window/menufloatingwindow.hxx 
b/vcl/source/window/menufloatingwindow.hxx
index a65c3fbfb172..9888cd220687 100644
--- a/vcl/source/window/menufloatingwindow.hxx
+++ b/vcl/source/window/menufloatingwindow.hxx
@@ -70,7 +70,7 @@ private:
     void End();
 
 protected:
-    vcl::Region ImplCalcClipRegion( bool bIncludeLogo = true ) const;
+    vcl::Region ImplCalcClipRegion() const;
     void ImplDrawScroller(vcl::RenderContext& rRenderContext, bool bUp);
     using Window::ImplScroll;
     void ImplScroll( const Point& rMousePos );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 2a1bf3f95567..6d4a30470635 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -978,14 +978,14 @@ void ToolBox::ImplLineSizing( const Point& rPos, 
tools::Rectangle& rRect, sal_uI
     if ( bHorz )
     {
         nOneLineSize = ImplCalcSize( 1 ).Height();
-        nMaxSize = maOutDockRect.GetHeight() - 20;
+        nMaxSize = - 20;
         if ( nMaxSize < aWinSize.Height() )
             nMaxSize = aWinSize.Height();
     }
     else
     {
         nOneLineSize = ImplCalcSize( 1 ).Width();
-        nMaxSize = maOutDockRect.GetWidth() - 20;
+        nMaxSize = - 20;
         if ( nMaxSize < aWinSize.Width() )
             nMaxSize = aWinSize.Width();
     }
@@ -4223,97 +4223,13 @@ bool ToolBox::Docking( const Point& rPos, 
tools::Rectangle& rRect )
         aDockingRect.SetPos( ImplGetFrameWindow()->GetPointerPosPixel() );
     }
 
-    tools::Rectangle aIntersection = maOutDockRect.GetIntersection( 
aDockingRect );
-    if ( !aIntersection.IsEmpty() )
-    {
-        tools::Rectangle   aInRect = maInDockRect;
-        Size aDockSize;
-        aDockSize.Width()  = ImplCalcSize( mnLines, TB_CALCMODE_VERT ).Width();
-        aDockSize.Height() = ImplCalcSize( mnLines, TB_CALCMODE_HORZ 
).Height();
-        aInRect.Left()   += aDockSize.Width()/2;
-        aInRect.Top()    += aDockSize.Height()/2;
-        aInRect.Right()  -= aDockSize.Width()/2;
-        aInRect.Bottom() -= aDockSize.Height()/2;
-
-        // if the window is too small, use the complete InDock-Rect
-        if ( aInRect.Left() >= aInRect.Right() )
-        {
-            aInRect.Left()  = maInDockRect.Left();
-            aInRect.Right() = maInDockRect.Right();
-        }
-        if ( aInRect.Top() >= aInRect.Bottom() )
-        {
-            aInRect.Top()    = maInDockRect.Top();
-            aInRect.Bottom() = maInDockRect.Bottom();
-        }
-
-        // if the mouse is outside the Dock area, it can only
-        // become a floating window
-        tools::Rectangle aIntersect = aInRect.GetIntersection( aDockingRect );
-        if ( aIntersect == aDockingRect )
-            bFloatMode = true;
-        else
-        {
-            // docking rectangle is in the "sensible area"
-            Point aPos = aDockingRect.TopLeft();
-            Point aInPosTL( aPos.X()-aInRect.Left(), aPos.Y()-aInRect.Top() );
-            Point aInPosBR( aPos.X()-aInRect.Left() + aDockingRect.GetWidth(), 
aPos.Y()-aInRect.Top() + aDockingRect.GetHeight() );
-            Size  aInSize = aInRect.GetSize();
-
-            if ( aInPosTL.X() <= 0 )
-                meDockAlign = WindowAlign::Left;
-            else if ( aInPosTL.Y() <= 0)
-                meDockAlign = WindowAlign::Top;
-            else if ( aInPosBR.X() >= aInSize.Width() )
-                meDockAlign = WindowAlign::Right;
-            else if ( aInPosBR.Y() >= aInSize.Height() )
-                meDockAlign = WindowAlign::Bottom;
-
-            // update the Dock size if Dock-Align was changed
-            if ( (meDockAlign == WindowAlign::Top) || (meDockAlign == 
WindowAlign::Bottom) )
-                aDockSize.Width() = maInDockRect.GetWidth();
-            else
-                aDockSize.Height() = maInDockRect.GetHeight();
-
-            aDockingRect.SetSize( aDockSize );
-
-            Point aPosTL( maInDockRect.TopLeft() );
-            switch ( meDockAlign )
-            {
-                case WindowAlign::Top :
-                    aDockingRect.SetPos( aPosTL );
-                    break;
-                case WindowAlign::Left :
-                    aDockingRect.SetPos( aPosTL );
-                    break;
-                case WindowAlign::Bottom :
-                {
-                    Point aPosBL( maInDockRect.BottomLeft() );
-                    aPosBL.Y() -= aDockingRect.GetHeight();
-                    aDockingRect.SetPos( aPosBL );
-                    break;
-                }
-                case WindowAlign::Right :
-                {
-                    Point aPosTR( maInDockRect.TopRight() );
-                    aPosTR.X() -= aDockingRect.GetWidth();
-                    aDockingRect.SetPos( aPosTR );
-                    break;
-                }
-            }
-        }
-    }
-    else
-        bFloatMode = true;
+    bFloatMode = true;
 
-    if ( bFloatMode )
+    meDockAlign = meAlign;
+    if ( !mbLastFloatMode )
     {
-        meDockAlign = meAlign;
-        if ( !mbLastFloatMode )
-        {
-            ImplToolItems::size_type nTemp = 0;
-            aDockingRect.SetSize( ImplCalcFloatSize( nTemp ) );
-        }
+        ImplToolItems::size_type nTemp = 0;
+        aDockingRect.SetSize( ImplCalcFloatSize( nTemp ) );
     }
 
     rRect = aDockingRect;
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index e48546029050..7a182b07eeab 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -57,8 +57,7 @@
 
 bool ImplCallPreNotify( NotifyEvent& rEvt )
 {
-    return Application::CallEventHooks( rEvt )
-        || rEvt.GetWindow()->CompatPreNotify( rEvt );
+    return rEvt.GetWindow()->CompatPreNotify( rEvt );
 }
 
 static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& 
rMousePos,
@@ -380,7 +379,6 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& 
xWindow, MouseNotifyEvent
             Point aChildPos = pChild->ImplFrameToOutput( aMousePos );
             MouseEvent aMEvt( aChildPos, pWinFrameData->mnClickCount, nMode, 
nCode, nCode );
             NotifyEvent aNEvt( nSVEvent, pChild, &aMEvt );
-            Application::CallEventHooks( aNEvt );
 
             if( pChild->IsCallHandlersOnInputDisabled() )
             {
@@ -1062,9 +1060,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, 
MouseNotifyEvent nSVEvent,
                 }
             }
             else
-            {
-                bRet = ImplCallHotKey( aKeyCode );
-            }
+                bRet = false;
         }
     }
     else
diff --git a/vcl/unx/generic/app/i18n_status.cxx 
b/vcl/unx/generic/app/i18n_status.cxx
index 7e59021a031b..4e08c3b45711 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -295,7 +295,6 @@ namespace vcl {
 class IIIMPStatusWindow : public StatusWindow
 {
     VclPtr<MenuButton>      m_aStatusBtn;
-    ScopedVclPtrInstance<PopupMenu> m_aMenu;
     SalFrame*               m_pResetFocus;
     bool                    m_bShow;
     bool                    m_bOn;
@@ -334,14 +333,9 @@ IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, 
bool bOn ) :
     layout();
 
     m_aStatusBtn->SetSelectHdl( LINK( this, IIIMPStatusWindow, SelectHdl ) );
-    m_aStatusBtn->SetPopupMenu( m_aMenu.get() );
+    m_aStatusBtn->SetPopupMenu( nullptr );
     m_aStatusBtn->Show();
 
-    const ::std::vector< I18NStatus::ChoiceData >& rChoices( 
I18NStatus::get().getChoices() );
-    int i = 1;
-    for( ::std::vector< I18NStatus::ChoiceData >::const_iterator it = 
rChoices.begin(); it != rChoices.end(); ++it, i++ )
-        m_aMenu->InsertItem( i, it->aString );
-
     if( pParent )
     {
         const SystemEnvData* pEnvData = GetSystemData();
@@ -464,7 +458,7 @@ IMPL_LINK( IIIMPStatusWindow, SelectHdl, MenuButton*, pBtn, 
void )
         {
             XSetICValues( 
static_cast<X11SalFrame*>(I18NStatus::get().getParent())->getInputContext()->GetContext(),
                           XNUnicodeCharacterSubset,
-                          rChoices[nIndex].pData,
+                          nullptr,
                           nullptr);
             // FIXME: get rid of X11SalFrame
             X11SalFrame* pParent = 
static_cast<X11SalFrame*>(I18NStatus::get().getParent());
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index f218ef2d95c7..20abe91a8b07 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -430,8 +430,6 @@ GC X11SalGraphicsImpl::SelectBrush()
         {
             XSetFillStyle ( pDisplay, mpBrushGC, FillSolid );
             XSetForeground( pDisplay, mpBrushGC, mnBrushPixel );
-            if( mrParent.bPrinter_ )
-                XSetTile( pDisplay, mpBrushGC, None );
         }
         else
         {
@@ -542,11 +540,7 @@ void X11SalGraphicsImpl::copyBits( const SalTwoRect& 
rPosAry,
     }
     else if( pSrcGraphics->bVirDev_ )
     {
-        // printer compatible virtual device
-        if( mrParent.bPrinter_ )
-            n = 2; // printer or compatible virtual device == same display
-        else
-            n = 1; // window or compatible virtual device
+        n = 1; // window or compatible virtual device
     }
     else
         n = 0;
@@ -654,8 +648,6 @@ void X11SalGraphicsImpl::drawBitmap( const SalTwoRect& 
rPosAry,
                                  const SalBitmap& rSrcBitmap,
                                  const SalBitmap& rMaskBitmap )
 {
-    SAL_WARN_IF( mrParent.bPrinter_, "vcl", "Drawing of transparent bitmaps on 
printer devices is strictly forbidden" );
-
     // decide if alpha masking or transparency masking is needed
     BitmapBuffer* pAlphaBuffer = 
const_cast<SalBitmap&>(rMaskBitmap).AcquireBuffer( BitmapAccessMode::Read );
     if( pAlphaBuffer != nullptr )
@@ -1696,9 +1688,6 @@ SalColor X11SalGraphicsImpl::getPixel( long nX, long nY )
 
 SalBitmap *X11SalGraphicsImpl::getBitmap( long nX, long nY, long nDX, long nDY 
)
 {
-    if( mrParent.bPrinter_ && !mrParent.bVirDev_ )
-        return nullptr;
-
     bool bFakeWindowBG = false;
 
     // normalize
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index f061649b975d..8f39d1b407a6 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -84,7 +84,6 @@ X11SalGraphics::X11SalGraphics():
     nTextPixel_(0),
     hBrush_(None),
     bWindow_(false),
-    bPrinter_(false),
     bVirDev_(false),
     bFontGC_(false),
     m_bOpenGL(OpenGLHelper::isVCLOpenGLEnabled())
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to