diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-20 11:13:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-20 13:02:31 +0200 |
commit | f24b46c27243b88e4d367d7b105d1365e97dbd76 (patch) | |
tree | ff7d573afc446c189f852382312d477c67d26108 /vcl | |
parent | c93eb59b65d5cecb185b4dae11593149009a60bf (diff) |
loplugin:unusedfields in vcl
Change-Id: I207866df495ec81bb9288e6d0f664b96d90251d6
Reviewed-on: https://gerrit.libreoffice.org/40217
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/svdata.hxx | 6 | ||||
-rw-r--r-- | vcl/inc/unx/i18n_status.hxx | 1 | ||||
-rw-r--r-- | vcl/inc/unx/salgdi.h | 1 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 72 | ||||
-rw-r--r-- | vcl/source/app/svmain.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 20 | ||||
-rw-r--r-- | vcl/source/control/throbber.cxx | 18 | ||||
-rw-r--r-- | vcl/source/filter/sgvmain.hxx | 1 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 2 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 31 | ||||
-rw-r--r-- | vcl/source/window/menufloatingwindow.cxx | 24 | ||||
-rw-r--r-- | vcl/source/window/menufloatingwindow.hxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 98 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/generic/app/i18n_status.cxx | 10 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/gdiimpl.cxx | 13 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salgdi.cxx | 1 |
19 files changed, 27 insertions, 293 deletions
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()) |