summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-16 08:49:35 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-16 08:42:37 +0000
commitf0f973da8560e16cba85d2c9465c3a8c4c0ebbb3 (patch)
tree0b6d78c3b16acc698dee15d83422a924be71097f /vcl
parent6eb91bdf75fe0085584efa6abf955c14c7acb9fd (diff)
loplugin:constantparams in vcl/
also some improvements to the plugin Change-Id: I0e3a519d70756e577fcb1bd47dd66864b5b4c871 Reviewed-on: https://gerrit.libreoffice.org/23289 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/PhysicalFontFamily.hxx2
-rw-r--r--vcl/inc/listbox.hxx4
-rw-r--r--vcl/inc/openglgdiimpl.hxx2
-rw-r--r--vcl/inc/osx/salsys.h4
-rw-r--r--vcl/inc/outdev.h2
-rw-r--r--vcl/inc/salgdi.hxx1
-rw-r--r--vcl/inc/salsys.hxx33
-rw-r--r--vcl/inc/unx/gensys.h4
-rw-r--r--vcl/inc/win/salsys.h4
-rw-r--r--vcl/opengl/gdiimpl.cxx8
-rw-r--r--vcl/osx/salsys.cxx76
-rw-r--r--vcl/source/app/svapp.cxx6
-rw-r--r--vcl/source/control/button.cxx45
-rw-r--r--vcl/source/control/imp_listbox.cxx40
-rw-r--r--vcl/source/control/listbox.cxx6
-rw-r--r--vcl/source/control/tabctrl.cxx31
-rw-r--r--vcl/source/control/throbber.cxx4
-rw-r--r--vcl/source/edit/textdoc.cxx4
-rw-r--r--vcl/source/edit/textdoc.hxx2
-rw-r--r--vcl/source/edit/texteng.cxx9
-rw-r--r--vcl/source/edit/textview.cxx61
-rw-r--r--vcl/source/filter/graphicfilter.cxx2
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx2
-rw-r--r--vcl/source/font/PhysicalFontFamily.cxx4
-rw-r--r--vcl/source/gdi/animate.cxx6
-rw-r--r--vcl/source/gdi/gfxlink.cxx17
-rw-r--r--vcl/source/gdi/metaact.cxx4
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter.cxx4
-rw-r--r--vcl/source/gdi/print3.cxx10
-rw-r--r--vcl/source/gdi/salgdilayout.cxx4
-rw-r--r--vcl/source/image/ImplImageTree.cxx9
-rw-r--r--vcl/source/outdev/font.cxx7
-rw-r--r--vcl/source/outdev/text.cxx12
-rw-r--r--vcl/source/window/accessibility.cxx38
-rw-r--r--vcl/source/window/brdwin.cxx2
-rw-r--r--vcl/source/window/clipping.cxx35
-rw-r--r--vcl/source/window/decoview.cxx4
-rw-r--r--vcl/source/window/dialog.cxx4
-rw-r--r--vcl/source/window/event.cxx4
-rw-r--r--vcl/source/window/menu.cxx4
-rw-r--r--vcl/source/window/menubarwindow.cxx94
-rw-r--r--vcl/source/window/menubarwindow.hxx4
-rw-r--r--vcl/source/window/menufloatingwindow.cxx32
-rw-r--r--vcl/source/window/menufloatingwindow.hxx2
-rw-r--r--vcl/source/window/paint.cxx32
-rw-r--r--vcl/source/window/splitwin.cxx21
-rw-r--r--vcl/source/window/status.cxx109
-rw-r--r--vcl/source/window/syswin.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx61
-rw-r--r--vcl/source/window/window.cxx148
-rw-r--r--vcl/unx/generic/app/gensys.cxx51
-rw-r--r--vcl/win/app/salinfo.cxx31
-rw-r--r--vcl/win/window/salframe.cxx4
54 files changed, 333 insertions, 782 deletions
diff --git a/vcl/inc/PhysicalFontFamily.hxx b/vcl/inc/PhysicalFontFamily.hxx
index a80ffb97130e..0363de3bea6e 100644
--- a/vcl/inc/PhysicalFontFamily.hxx
+++ b/vcl/inc/PhysicalFontFamily.hxx
@@ -66,7 +66,7 @@ public:
void UpdateDevFontList( ImplDeviceFontList& ) const;
void UpdateCloneFontList( PhysicalFontCollection&,
- bool bScalable, bool bEmbeddable ) const;
+ bool bEmbeddable ) const;
static void CalcType( ImplFontAttrs& rType, FontWeight& rWeight, FontWidth& rWidth,
FontFamily eFamily, const utl::FontNameAttr* pFontAttr );
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 040027a29351..25c37f5699d2 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -120,7 +120,7 @@ public:
/// GetAddedHeight( 0 ) @return 0
/// GetAddedHeight( LISTBOX_ENTRY_NOTFOUND ) @return 0
/// GetAddedHeight( i, k ) with k > i is equivalent -GetAddedHeight( k, i )
- long GetAddedHeight( sal_Int32 nEndIndex, sal_Int32 nBeginIndex = 0, long nBeginHeight = 0 ) const;
+ long GetAddedHeight( sal_Int32 nEndIndex, sal_Int32 nBeginIndex = 0 ) const;
long GetEntryHeight( sal_Int32 nPos ) const;
sal_Int32 GetEntryCount() const { return (sal_Int32 )maEntries.size(); }
@@ -276,7 +276,7 @@ public:
sal_uInt16 GetDisplayLineCount() const;
void SetEntryFlags( sal_Int32 nPos, ListBoxEntryFlags nFlags );
- void DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos = false, bool bLayout = false);
+ void DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos = false);
void SelectEntry( sal_Int32 nPos, bool bSelect );
void DeselectAll();
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index f3247f9f8d22..8dd063902075 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -113,7 +113,7 @@ public:
bool UseSolid( SalColor nColor );
bool UseSolidAA( SalColor nColor, double fTransparency );
bool UseSolidAA( SalColor nColor );
- bool UseLine(SalColor nColor, double fTransparency, GLfloat fLineWidth, bool bUseAA);
+ bool UseLine(SalColor nColor, double fTransparency, GLfloat fLineWidth);
bool UseInvert50();
bool UseInvert(SalInvert nFlags);
diff --git a/vcl/inc/osx/salsys.h b/vcl/inc/osx/salsys.h
index 50c3fc0b2f75..b667b3192117 100644
--- a/vcl/inc/osx/salsys.h
+++ b/vcl/inc/osx/salsys.h
@@ -36,9 +36,7 @@ public:
virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override;
virtual int ShowNativeMessageBox( const OUString& rTitle,
- const OUString& rMessage,
- int nButtonCombination,
- int nDefaultButton, bool bUseResources) override;
+ const OUString& rMessage) override;
};
#endif // INCLUDED_VCL_INC_OSX_SALSYS_H
diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h
index fcca71ec6013..1a06185eaace 100644
--- a/vcl/inc/outdev.h
+++ b/vcl/inc/outdev.h
@@ -103,7 +103,7 @@ public:
void RemoveFontSubstitute( int nIndex );
int GetFontSubstituteCount() const { return maFontSubstList.size(); };
- bool FindFontSubstitute( OUString& rSubstName, const OUString& rFontName, AddFontSubstituteFlags nFlags ) const;
+ bool FindFontSubstitute( OUString& rSubstName, const OUString& rFontName ) const;
};
// PreMatchFontSubstitution
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 3e98291ab39f..23d0d8164db1 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -305,7 +305,6 @@ public:
long nDestX, long nDestY,
long nSrcX, long nSrcY,
long nSrcWidth, long nSrcHeight,
- sal_uInt16 nFlags,
const OutputDevice *pOutDev );
// CopyBits and DrawBitmap --> RasterOp and ClipRegion
diff --git a/vcl/inc/salsys.hxx b/vcl/inc/salsys.hxx
index 0d6fff49ffa8..bc273f07ddee 100644
--- a/vcl/inc/salsys.hxx
+++ b/vcl/inc/salsys.hxx
@@ -24,22 +24,8 @@
#include <vcl/dllapi.h>
#include <rtl/ustring.hxx>
-// Button combinations for ShowNativeMessageBox
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK = 0;
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL = 1;
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE = 2;
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL = 3;
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO = 4;
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL = 5;
-
// Button identifier for ShowNativeMessageBox
const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK = 1;
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL = 2;
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT = 3;
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY = 4;
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE = 5;
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES = 6;
-const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO = 7;
class VCL_PLUGIN_PUBLIC SalSystem
{
@@ -88,29 +74,12 @@ public:
@param rMessage
The message to be shown by the dialog box.
- @param nButtonCombination
- Specify which button combination the message box should display.
- See button combinations above.
-
- @param nDefaultButton
- Specifies which button has the focus initially.
- See button identifiers above.
- The effect of specifying a button that doesn't belong
- to the specified button combination is undefined.
-
- @param bUseResources
- If false, assume initialization of the application failed early and do
- not try to access any resources.
-
@returns the identifier of the button that was pressed by the user.
See button identifier above. If the function fails the
return value is 0.
*/
virtual int ShowNativeMessageBox( const OUString& rTitle,
- const OUString& rMessage,
- int nButtonCombination,
- int nDefaultButton,
- bool bUseResources ) = 0;
+ const OUString& rMessage ) = 0;
};
diff --git a/vcl/inc/unx/gensys.h b/vcl/inc/unx/gensys.h
index 6e935f5642cf..4edd21a7f3dc 100644
--- a/vcl/inc/unx/gensys.h
+++ b/vcl/inc/unx/gensys.h
@@ -39,9 +39,7 @@ class VCL_DLLPUBLIC SalGenericSystem : public SalSystem
int nDefButton ) = 0;
virtual int ShowNativeMessageBox( const OUString& rTitle,
- const OUString& rMessage,
- int nButtonCombination,
- int nDefaultButton, bool bUseResources) override;
+ const OUString& rMessage) override;
#if !defined(ANDROID) && !defined(IOS)
// Simple helpers for X11 WM_CLASS hints
diff --git a/vcl/inc/win/salsys.h b/vcl/inc/win/salsys.h
index 5b6fc7f04bfe..7efce50509a9 100644
--- a/vcl/inc/win/salsys.h
+++ b/vcl/inc/win/salsys.h
@@ -60,9 +60,7 @@ public:
virtual unsigned int GetDisplayBuiltInScreen() override;
virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) override;
virtual int ShowNativeMessageBox( const OUString& rTitle,
- const OUString& rMessage,
- int nButtonCombination,
- int nDefaultButton, bool bUseResources) override;
+ const OUString& rMessage) override;
bool initMonitors();
// discards monitorinfo; used by WM_DISPLAYCHANGED handler
void clearMonitors();
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 7bf7149fe588..5773676b8afc 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -915,7 +915,7 @@ void OpenGLSalGraphicsImpl::DrawPolyLine(const basegfx::B2DPolygon& rPolygon, fl
}
}
-bool OpenGLSalGraphicsImpl::UseLine(SalColor nColor, double fTransparency, GLfloat fLineWidth, bool bUseAA)
+bool OpenGLSalGraphicsImpl::UseLine(SalColor nColor, double fTransparency, GLfloat fLineWidth)
{
if( nColor == SALCOLOR_NONE )
return false;
@@ -924,8 +924,8 @@ bool OpenGLSalGraphicsImpl::UseLine(SalColor nColor, double fTransparency, GLflo
mpProgram->SetColorf("color", nColor, fTransparency);
mpProgram->SetUniform1f("line_width", fLineWidth);
// The width of the feather - area we make lineary transparent in VS.
- // Good AA value is 0.5, 0.0 means the no AA will be done.
- mpProgram->SetUniform1f("feather", bUseAA ? 0.5f : 0.0f);
+ // Good AA value is 0.5
+ mpProgram->SetUniform1f("feather", 0.5f);
// We need blending or AA won't work correctly
mpProgram->SetBlendMode( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
#ifdef DBG_UTIL
@@ -1855,7 +1855,7 @@ bool OpenGLSalGraphicsImpl::drawPolyLine(
PreDraw(XOROption::IMPLEMENT_XOR);
- if (UseLine(mnLineColor, 0.0f, fLineWidth, true))
+ if (UseLine(mnLineColor, 0.0f, fLineWidth))
{
basegfx::B2DPolygon aPolygon(rPolygon);
diff --git a/vcl/osx/salsys.cxx b/vcl/osx/salsys.cxx
index d0ed61554bf8..c4d454abed93 100644
--- a/vcl/osx/salsys.cxx
+++ b/vcl/osx/salsys.cxx
@@ -80,65 +80,16 @@ static NSString* getStandardString( StandardButtonType nButtonId, bool bUseResou
return aText.isEmpty() ? nil : CreateNSString( aText);
}
-#define NO_BUTTON static_cast<StandardButtonType>(-1)
-
int AquaSalSystem::ShowNativeMessageBox( const OUString& rTitle,
- const OUString& rMessage,
- int nButtonCombination,
- int nDefaultButton, bool bUseResources)
+ const OUString& rMessage )
{
NSString* pTitle = CreateNSString( rTitle );
NSString* pMessage = CreateNSString( rMessage );
- struct id_entry
- {
- int nCombination;
- int nDefaultButton;
- StandardButtonType nTextIds[3];
- } aButtonIds[] =
- {
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK, { StandardButtonType::OK, NO_BUTTON, NO_BUTTON } },
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK, { StandardButtonType::OK, StandardButtonType::Cancel, NO_BUTTON } },
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL, { StandardButtonType::Cancel, StandardButtonType::OK, NO_BUTTON } },
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT, { StandardButtonType::Abort, StandardButtonType::Ignore, StandardButtonType::Retry } },
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY, { StandardButtonType::Retry, StandardButtonType::Ignore, StandardButtonType::Abort } },
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE, { StandardButtonType::Ignore, StandardButtonType::Ignore, StandardButtonType::Abort } },
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES, { StandardButtonType::Yes, StandardButtonType::No, StandardButtonType::Cancel } },
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO, { StandardButtonType::No, StandardButtonType::Yes, StandardButtonType::Cancel } },
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL, { StandardButtonType::Cancel, StandardButtonType::Yes, StandardButtonType::No } },
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES, { StandardButtonType::Yes, StandardButtonType::No, NO_BUTTON } },
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO, { StandardButtonType::No, StandardButtonType::Yes, NO_BUTTON } },
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY, { StandardButtonType::Retry, StandardButtonType::Cancel, NO_BUTTON } },
- { SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL, SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL, { StandardButtonType::Cancel, StandardButtonType::Retry, NO_BUTTON } }
- };
-
- NSString* pDefText = nil;
- NSString* pAltText = nil;
- NSString* pOthText = nil;
-
- unsigned int nC;
- for( nC = 0; nC < sizeof(aButtonIds)/sizeof(aButtonIds[0]); nC++ )
- {
- if( aButtonIds[nC].nCombination == nButtonCombination )
- {
- if( aButtonIds[nC].nDefaultButton == nDefaultButton )
- {
- if( aButtonIds[nC].nTextIds[0] != NO_BUTTON )
- pDefText = getStandardString(
- aButtonIds[nC].nTextIds[0], bUseResources );
- if( aButtonIds[nC].nTextIds[1] != NO_BUTTON )
- pAltText = getStandardString(
- aButtonIds[nC].nTextIds[1], bUseResources );
- if( aButtonIds[nC].nTextIds[2] != NO_BUTTON )
- pOthText = getStandardString(
- aButtonIds[nC].nTextIds[2], bUseResources );
- break;
- }
- }
- }
+ NSString* pDefText = getStandardString( StandardButtonType::OK, false/*bUseResources*/ );
SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.10 NSRunAlertPanel
- int nResult = NSRunAlertPanel( pTitle, @"%@", pDefText, pAltText, pOthText, pMessage );
+ int nResult = NSRunAlertPanel( pTitle, @"%@", pDefText, nil, nil, pMessage );
SAL_WNODEPRECATED_DECLARATIONS_POP
if( pTitle )
@@ -147,27 +98,10 @@ int AquaSalSystem::ShowNativeMessageBox( const OUString& rTitle,
[pMessage release];
if( pDefText )
[pDefText release];
- if( pAltText )
- [pAltText release];
- if( pOthText )
- [pOthText release];
int nRet = 0;
- if( nC < sizeof(aButtonIds)/sizeof(aButtonIds[0]) && nResult >= 1 && nResult <= 3 )
- {
- StandardButtonType nPressed = aButtonIds[nC].nTextIds[nResult-1];
- switch( nPressed )
- {
- case StandardButtonType::No: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO; break;
- case StandardButtonType::Yes: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES; break;
- case StandardButtonType::OK: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK; break;
- case StandardButtonType::Cancel: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL; break;
- case StandardButtonType::Abort: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT; break;
- case StandardButtonType::Retry: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY; break;
- case StandardButtonType::Ignore: nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE; break;
- default: break;
- }
- }
+ if( nResult == 1 )
+ nRet = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK;
return nRet;
}
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 32d47d4d663c..20bdca4a1cd1 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1697,11 +1697,9 @@ void Application::EnableEventTestingMode()
void Application::ShowNativeErrorBox(const OUString& sTitle ,
const OUString& sMessage)
{
- int btn = ImplGetSalSystem()->ShowNativeMessageBox (
+ int btn = ImplGetSalSystem()->ShowNativeMessageBox(
sTitle,
- sMessage,
- SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK,
- SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK, false);
+ sMessage);
if (btn != SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK) {
OSL_TRACE("ShowNativeMessageBox returned %d", btn);
}
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 1671d6caf1f0..22e325cef269 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -825,7 +825,7 @@ static void ImplDrawBtnDropDownArrow( OutputDevice* pDev,
}
void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFlags,
- const Rectangle& rRect, bool bLayout, bool bMenuBtnSep)
+ const Rectangle& rRect, bool bMenuBtnSep)
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aInRect = rRect;
@@ -880,41 +880,38 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
aSymbolRect.Right() -= nSymbolSize/2;
aSymbolRect.Left() = aSymbolRect.Right() - nSymbolSize;
- ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep,
+ ImplDrawAlignedImage( pDev, aPos, aSize, false/*bLayout*/, nImageSep,
nDrawFlags, nTextStyle, nullptr, true );
}
else
ImplCalcSymbolRect( aSymbolRect );
- if( ! bLayout )
+ long nDistance = (aSymbolRect.GetHeight() > 10) ? 2 : 1;
+ DecorationView aDecoView( pDev );
+ if( bMenuBtnSep && nSeparatorX > 0 )
{
- long nDistance = (aSymbolRect.GetHeight() > 10) ? 2 : 1;
- DecorationView aDecoView( pDev );
- if( bMenuBtnSep && nSeparatorX > 0 )
- {
- Point aStartPt( nSeparatorX, aSymbolRect.Top()+nDistance );
- Point aEndPt( nSeparatorX, aSymbolRect.Bottom()-nDistance );
- aDecoView.DrawSeparator( aStartPt, aEndPt );
- }
- ImplSetSeparatorX( nSeparatorX );
-
- aDecoView.DrawSymbol( aSymbolRect, SymbolType::SPIN_DOWN, aColor, nStyle );
+ Point aStartPt( nSeparatorX, aSymbolRect.Top()+nDistance );
+ Point aEndPt( nSeparatorX, aSymbolRect.Bottom()-nDistance );
+ aDecoView.DrawSeparator( aStartPt, aEndPt );
}
+ ImplSetSeparatorX( nSeparatorX );
+
+ aDecoView.DrawSymbol( aSymbolRect, SymbolType::SPIN_DOWN, aColor, nStyle );
}
else
{
Rectangle aSymbolRect;
- ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep, nDrawFlags,
+ ImplDrawAlignedImage( pDev, aPos, aSize, false/*bLayout*/, nImageSep, nDrawFlags,
nTextStyle, IsSymbol() ? &aSymbolRect : nullptr, true );
- if ( IsSymbol() && ! bLayout )
+ if ( IsSymbol() )
{
DecorationView aDecoView( pDev );
aDecoView.DrawSymbol( aSymbolRect, meSymbol, aColor, nStyle );
}
- if ( mnDDStyle == PushButtonDropdownStyle::Toolbox && !bLayout )
+ if ( mnDDStyle == PushButtonDropdownStyle::Toolbox )
{
bool bBlack = false;
Color aArrowColor( COL_BLACK );
@@ -1087,7 +1084,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
// draw content using the same aInRect as non-native VCL would do
ImplDrawPushButtonContent(&rRenderContext, (nState&ControlState::ROLLOVER) ? DrawFlags::NoRollover : DrawFlags::NONE,
- aInRect, false/*bLayout*/, bDrawMenuSep);
+ aInRect, bDrawMenuSep);
if (HasFocus())
ShowFocus(ImplGetFocusRect());
@@ -1112,7 +1109,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
}
// draw content
- ImplDrawPushButtonContent(&rRenderContext, DrawFlags::NONE, aInRect, false/*bLayout*/, bDrawMenuSep);
+ ImplDrawPushButtonContent(&rRenderContext, DrawFlags::NONE, aInRect, bDrawMenuSep);
if (HasFocus())
{
@@ -1402,7 +1399,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
nButtonStyle |= DrawButtonFlags::Checked;
aRect = aDecoView.DrawButton( aRect, nButtonStyle );
- ImplDrawPushButtonContent( pDev, nFlags, aRect, false, true );
+ ImplDrawPushButtonContent( pDev, nFlags, aRect, true );
pDev->Pop();
}
@@ -3074,7 +3071,7 @@ void CheckBox::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext)
void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
- Rectangle& rMouseRect, bool bLayout )
+ Rectangle& rMouseRect )
{
WinBits nWinStyle = GetStyle();
OUString aText( GetText() );
@@ -3104,7 +3101,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
aSize.Height() = rImageSize.Height();
}
- ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, 1,
+ ImplDrawAlignedImage( pDev, aPos, aSize, false/*bLayout*/, 1,
nDrawFlags, nTextStyle );
nLineY = aPos.Y() + aSize.Height()/2;
@@ -3183,7 +3180,7 @@ void CheckBox::ImplDrawCheckBox(vcl::RenderContext& rRenderContext)
HideFocus();
ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel(),
- aImageSize, maStateRect, maMouseRect, false/*bLayout*/);
+ aImageSize, maStateRect, maMouseRect);
ImplDrawCheckBoxState(rRenderContext);
if (HasFocus())
@@ -3382,7 +3379,7 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetTextFillColor();
ImplDraw( pDev, nFlags, aPos, aSize,
- aImageSize, aStateRect, aMouseRect, false );
+ aImageSize, aStateRect, aMouseRect );
pDev->SetLineColor();
pDev->SetFillColor( Color( COL_BLACK ) );
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index d8fe4dd84886..19835250a3f9 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -292,9 +292,9 @@ sal_Int32 ImplEntryList::FindEntry( const void* pData ) const
return nPos;
}
-long ImplEntryList::GetAddedHeight( sal_Int32 i_nEndIndex, sal_Int32 i_nBeginIndex, long i_nBeginHeight ) const
+long ImplEntryList::GetAddedHeight( sal_Int32 i_nEndIndex, sal_Int32 i_nBeginIndex ) const
{
- long nHeight = i_nBeginHeight;
+ long nHeight = 0;
sal_Int32 nStart = i_nEndIndex > i_nBeginIndex ? i_nBeginIndex : i_nEndIndex;
sal_Int32 nStop = i_nEndIndex > i_nBeginIndex ? i_nEndIndex : i_nBeginIndex;
sal_Int32 nEntryCount = GetEntryCount();
@@ -1746,7 +1746,7 @@ void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32
}
}
-void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos, bool bLayout)
+void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos)
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr(nPos);
if (!pEntry)
@@ -1760,7 +1760,7 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
long nY = mpEntryList->GetAddedHeight(nPos, mnTop);
Size aImgSz;
- if (bDrawImage && mpEntryList->HasImages() && !bLayout)
+ if (bDrawImage && mpEntryList->HasImages())
{
Image aImage = mpEntryList->GetEntryImage(nPos);
if (!!aImage)
@@ -1804,8 +1804,6 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
if (bDrawText)
{
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
OUString aStr(mpEntryList->GetEntryText(nPos));
if (!aStr.isEmpty())
{
@@ -1823,9 +1821,6 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
aTextRect.Left() += nImageWidth + IMG_TXT_DISTANCE;
}
- if (bLayout)
- mpControlData->mpLayoutData->m_aLineIndices.push_back(mpControlData->mpLayoutData->m_aDisplayText.getLength());
-
// pb: #106948# explicit mirroring for calc
if (mbMirroring)
{
@@ -1841,25 +1836,22 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
if ((pEntry->mnFlags & ListBoxEntryFlags::DrawDisabled))
nDrawStyle |= DrawTextFlags::Disable;
- rRenderContext.DrawText(aTextRect, aStr, nDrawStyle, pVector, pDisplayText);
+ rRenderContext.DrawText(aTextRect, aStr, nDrawStyle);
}
}
- if (!bLayout)
+ if ((mnSeparatorPos != LISTBOX_ENTRY_NOTFOUND) &&
+ ((nPos == mnSeparatorPos) || (nPos == mnSeparatorPos + 1)))
{
- if ((mnSeparatorPos != LISTBOX_ENTRY_NOTFOUND) &&
- ((nPos == mnSeparatorPos) || (nPos == mnSeparatorPos + 1)))
- {
- Color aOldLineColor(rRenderContext.GetLineColor());
- rRenderContext.SetLineColor((GetBackground().GetColor() != COL_LIGHTGRAY) ? COL_LIGHTGRAY : COL_GRAY);
- Point aStartPos(0, nY);
- if (nPos == mnSeparatorPos)
- aStartPos.Y() += pEntry->mnHeight - 1;
- Point aEndPos(aStartPos);
- aEndPos.X() = GetOutputSizePixel().Width();
- rRenderContext.DrawLine(aStartPos, aEndPos);
- rRenderContext.SetLineColor(aOldLineColor);
- }
+ Color aOldLineColor(rRenderContext.GetLineColor());
+ rRenderContext.SetLineColor((GetBackground().GetColor() != COL_LIGHTGRAY) ? COL_LIGHTGRAY : COL_GRAY);
+ Point aStartPos(0, nY);
+ if (nPos == mnSeparatorPos)
+ aStartPos.Y() += pEntry->mnHeight - 1;
+ Point aEndPos(aStartPos);
+ aEndPos.X() = GetOutputSizePixel().Width();
+ rRenderContext.DrawLine(aStartPos, aEndPos);
+ rRenderContext.SetLineColor(aOldLineColor);
}
}
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index ba78bc64647b..c2f50bcece3e 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -1386,12 +1386,12 @@ void ListBox::UserDraw( const UserDrawEvent& )
{
}
-void ListBox::DrawEntry(const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos)
+void ListBox::DrawEntry(const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawTextAtImagePos)
{
if (rEvt.GetWindow() == mpImplLB->GetMainWindow())
- mpImplLB->GetMainWindow()->DrawEntry(*rEvt.GetRenderContext(), rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos );
+ mpImplLB->GetMainWindow()->DrawEntry(*rEvt.GetRenderContext(), rEvt.GetItemId(), bDrawImage, true/*bDrawText*/, bDrawTextAtImagePos );
else if (rEvt.GetWindow() == mpImplWin)
- mpImplWin->DrawEntry(*rEvt.GetRenderContext(), bDrawImage, bDrawText, bDrawTextAtImagePos);
+ mpImplWin->DrawEntry(*rEvt.GetRenderContext(), bDrawImage, true/*bDrawText*/, bDrawTextAtImagePos);
}
void ListBox::SetUserItemSize( const Size& rSz )
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 5939eba7e942..38199eb1a8cb 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -757,22 +757,11 @@ void TabControl::ImplShowFocus()
}
void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* pItem, const Rectangle& rCurRect,
- bool bLayout, bool bFirstInGroup, bool bLastInGroup, bool /* bIsCurrentItem */ )
+ bool bFirstInGroup, bool bLastInGroup, bool /* bIsCurrentItem */ )
{
if (pItem->maRect.IsEmpty())
return;
- if (bLayout)
- {
- if (!HasLayoutData())
- {
- mpControlData->mpLayoutData = new vcl::ControlLayoutData();
- mpTabCtrlData->maLayoutLineToPageId.clear();
- mpTabCtrlData->maLayoutPageIdToLine.clear();
- mpTabCtrlData->maTabRectangles.clear();
- }
- }
-
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
Rectangle aRect = pItem->maRect;
long nLeftBottom = aRect.Bottom();
@@ -844,7 +833,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
}
}
- if (!bLayout && (bNativeOK = rRenderContext.IsNativeControlSupported(CTRL_TAB_ITEM, PART_ENTIRE_CONTROL)))
+ if ( (bNativeOK = rRenderContext.IsNativeControlSupported(CTRL_TAB_ITEM, PART_ENTIRE_CONTROL)) )
{
TabitemValue tiValue(Rectangle(pItem->maRect.Left() + TAB_TABOFFSET_X,
pItem->maRect.Top() + TAB_TABOFFSET_Y,
@@ -864,7 +853,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
aCtrlRegion, nState, tiValue, OUString() );
}
- if (!bLayout && !bNativeOK)
+ if (!bNativeOK)
{
if (!(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono))
{
@@ -909,15 +898,6 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
}
}
- if (bLayout)
- {
- int nLine = mpControlData->mpLayoutData->m_aLineIndices.size();
- mpControlData->mpLayoutData->m_aLineIndices.push_back( mpControlData->mpLayoutData->m_aDisplayText.getLength() );
- mpTabCtrlData->maLayoutPageIdToLine[ (int)pItem->mnId ] = nLine;
- mpTabCtrlData->maLayoutLineToPageId[ nLine ] = (int)pItem->mnId;
- mpTabCtrlData->maTabRectangles.push_back( aRect );
- }
-
// set font accordingly, current item is painted bold
// we set the font attributes always before drawing to be re-entrant (DrawNativeControl may trigger additional paints)
vcl::Font aFont(rRenderContext.GetFont());
@@ -954,8 +934,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
Rectangle aOutRect(nXPos + aImageSize.Width(), nYPos,
nXPos + aImageSize.Width() + nTextWidth, nYPos + nTextHeight);
DrawControlText(rRenderContext, aOutRect, pItem->maFormatText, nStyle,
- bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr,
- bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr);
+ nullptr, nullptr);
rRenderContext.SetTextColor(aOldColor);
}
@@ -1239,7 +1218,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle&
aClipRgn.Intersect(rRect);
if (!aClipRgn.IsEmpty())
{
- ImplDrawItem(rRenderContext, pCurItem, aCurRect, false/*bLayout*/,
+ ImplDrawItem(rRenderContext, pCurItem, aCurRect,
pCurItem == pFirstTab, pCurItem == pLastTab, true);
}
}
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx
index f0c17c5526f4..592b255d16ff 100644
--- a/vcl/source/control/throbber.cxx
+++ b/vcl/source/control/throbber.cxx
@@ -42,12 +42,12 @@ using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::uno::Exception;
namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode;
-Throbber::Throbber( vcl::Window* i_parentWindow, WinBits i_style, const ImageSet i_imageSet )
+Throbber::Throbber( vcl::Window* i_parentWindow, WinBits i_style )
:ImageControl( i_parentWindow, i_style )
,mbRepeat( true )
,mnStepTime( 100 )
,mnCurStep( 0 )
- ,meImageSet( i_imageSet )
+ ,meImageSet( IMAGES_AUTO )
{
maWaitTimer.SetTimeout( mnStepTime );
maWaitTimer.SetTimeoutHdl( LINK( this, Throbber, TimeOutHdl ) );
diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx
index 84721c8061bd..eee0acc34214 100644
--- a/vcl/source/edit/textdoc.cxx
+++ b/vcl/source/edit/textdoc.cxx
@@ -514,10 +514,10 @@ TextPaM TextDoc::InsertText( const TextPaM& rPaM, const OUString& rStr )
return aPaM;
}
-TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM, bool bKeepEndingAttribs )
+TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM )
{
TextNode* pNode = maTextNodes[ rPaM.GetPara() ];
- TextNode* pNew = pNode->Split( rPaM.GetIndex(), bKeepEndingAttribs );
+ TextNode* pNew = pNode->Split( rPaM.GetIndex(), true/*bKeepEndingAttribs*/ );
DBG_ASSERT( maTextNodes.size()<SAL_MAX_UINT32, "InsertParaBreak: more than 4Gi paragraphs!" );
maTextNodes.insert( maTextNodes.begin() + rPaM.GetPara() + 1, pNew );
diff --git a/vcl/source/edit/textdoc.hxx b/vcl/source/edit/textdoc.hxx
index c23b11e79d28..7ab215d50019 100644
--- a/vcl/source/edit/textdoc.hxx
+++ b/vcl/source/edit/textdoc.hxx
@@ -111,7 +111,7 @@ public:
TextPaM InsertText( const TextPaM& rPaM, sal_Unicode c );
TextPaM InsertText( const TextPaM& rPaM, const OUString& rStr );
- TextPaM InsertParaBreak( const TextPaM& rPaM, bool bKeepEndingAttribs );
+ TextPaM InsertParaBreak( const TextPaM& rPaM );
TextPaM ConnectParagraphs( TextNode* pLeft, TextNode* pRight );
sal_Int32 GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = nullptr ) const;
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 592a0e51cd18..40a47719a242 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -828,7 +828,7 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM )
TextNode* pNode = mpDoc->GetNodes()[ rPaM.GetPara() ];
bool bFirstParaContentChanged = rPaM.GetIndex() < pNode->GetText().getLength();
- TextPaM aPaM( mpDoc->InsertParaBreak( rPaM, true/*bKeepEndingAttribs*/ ) );
+ TextPaM aPaM( mpDoc->InsertParaBreak( rPaM ) );
TEParaPortion* pPortion = mpTEParaPortions->GetObject( rPaM.GetPara() );
DBG_ASSERT( pPortion, "ImpInsertParaBreak: Hidden Portion" );
@@ -2582,7 +2582,7 @@ void TextEngine::RemoveAttribs( sal_uInt32 nPara )
}
}
}
-void TextEngine::RemoveAttribs( sal_uInt32 nPara, sal_uInt16 nWhich, bool bIdleFormatAndUpdate )
+void TextEngine::RemoveAttribs( sal_uInt32 nPara, sal_uInt16 nWhich )
{
if ( nPara < mpDoc->GetNodes().size() )
{
@@ -2599,10 +2599,7 @@ void TextEngine::RemoveAttribs( sal_uInt32 nPara, sal_uInt16 nWhich, bool bIdleF
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().getLength() );
mbFormatted = false;
- if(bIdleFormatAndUpdate)
- IdleFormatAndUpdate( nullptr, 0xFFFF );
- else
- FormatAndUpdate();
+ IdleFormatAndUpdate( nullptr, 0xFFFF );
}
}
}
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index f34d60c9f553..038f122bd83d 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -319,10 +319,10 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartP
void TextView::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
{
- ImpPaint(rRenderContext, rRect, false);
+ ImpPaint(rRenderContext, rRect);
}
-void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bUseVirtDev)
+void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
{
if ( !mpImpl->mpTextEngine->GetUpdateMode() || mpImpl->mpTextEngine->IsInUndo() )
return;
@@ -331,59 +331,10 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRe
if (!mpImpl->mbHighlightSelection && mpImpl->maSelection.HasRange())
pDrawSelection = &mpImpl->maSelection;
- if (bUseVirtDev)
- {
- VirtualDevice* pVDev = GetVirtualDevice();
-
- const Color& rBackgroundColor = mpImpl->mpWindow->GetBackground().GetColor();
- if (pVDev->GetFillColor() != rBackgroundColor)
- pVDev->SetFillColor( rBackgroundColor );
- if (pVDev->GetBackground().GetColor() != rBackgroundColor)
- pVDev->SetBackground( rBackgroundColor );
-
- bool bVDevValid = true;
- Size aOutSz(pVDev->GetOutputSizePixel());
- if ((aOutSz.Width() < rRect.GetWidth()) ||
- (aOutSz.Height() < rRect.GetHeight()))
- {
- bVDevValid = pVDev->SetOutputSizePixel(rRect.GetSize());
- }
- else
- {
- // the VirtDev can get very large on Resize =>
- // shrink now and then
- if ((aOutSz.Height() > (rRect.GetHeight() + 20)) ||
- (aOutSz.Width() > (rRect.GetWidth() + 20)))
- {
- bVDevValid = pVDev->SetOutputSizePixel(rRect.GetSize());
- }
- else
- {
- pVDev->Erase();
- }
- }
- if (!bVDevValid)
- {
- ImpPaint(rRenderContext, rRect, false);
- return;
- }
-
- Rectangle aTmpRect(Point(0, 0), rRect.GetSize());
-
- Point aDocPos(mpImpl->maStartDocPos.X(), mpImpl->maStartDocPos.Y() + rRect.Top());
- Point aStartPos = ImpGetOutputStartPos(aDocPos);
- ImpPaint(*pVDev, aStartPos, &aTmpRect, nullptr, pDrawSelection);
- rRenderContext.DrawOutDev(rRect.TopLeft(), rRect.GetSize(), Point(0,0), rRect.GetSize(), *pVDev);
- if (mpImpl->mbHighlightSelection)
- ImpHighlight(mpImpl->maSelection);
- }
- else
- {
- Point aStartPos = ImpGetOutputStartPos(mpImpl->maStartDocPos);
- ImpPaint(rRenderContext, aStartPos, &rRect, nullptr, pDrawSelection);
- if (mpImpl->mbHighlightSelection)
- ImpHighlight(mpImpl->maSelection);
- }
+ Point aStartPos = ImpGetOutputStartPos(mpImpl->maStartDocPos);
+ ImpPaint(rRenderContext, aStartPos, &rRect, nullptr, pDrawSelection);
+ if (mpImpl->mbHighlightSelection)
+ ImpHighlight(mpImpl->maSelection);
}
void TextView::ImpHighlight( const TextSelection& rSel )
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 5f7ddcc185f3..e025f4829aa9 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1764,7 +1764,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
}
if( nStatus == GRFILTER_OK )
{
- rGraphic.SetLink( GfxLink( pGraphicContent, nGraphicContentSize, eLinkType, true ) );
+ rGraphic.SetLink( GfxLink( pGraphicContent, nGraphicContentSize, eLinkType ) );
bGraphicContentOwned = false; //ownership passed to the GfxLink
}
}
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index 823c06d90f32..10c992ebd680 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -937,7 +937,7 @@ PhysicalFontCollection* PhysicalFontCollection::Clone( bool bEmbeddable ) const
for(; it != maPhysicalFontFamilies.end(); ++it )
{
const PhysicalFontFamily* pFontFace = (*it).second;
- pFontFace->UpdateCloneFontList( *pClonedCollection, true/*bScalable*/, bEmbeddable );
+ pFontFace->UpdateCloneFontList( *pClonedCollection, bEmbeddable );
}
return pClonedCollection;
diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx
index 43ec3de0f767..8cc63fa52445 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -261,7 +261,7 @@ void PhysicalFontFamily::GetFontHeights( std::set<int>& rHeights ) const
}
void PhysicalFontFamily::UpdateCloneFontList( PhysicalFontCollection& rFontCollection,
- bool bScalable, bool bEmbeddable ) const
+ bool bEmbeddable ) const
{
OUString aFamilyName = GetEnglishSearchFontName( GetFamilyName() );
PhysicalFontFamily* pFamily = rFontCollection.FindOrCreateFontFamily( aFamilyName );
@@ -270,7 +270,7 @@ void PhysicalFontFamily::UpdateCloneFontList( PhysicalFontCollection& rFontColle
{
PhysicalFontFace *pFoundFontFace = *it;
- if( bScalable && !pFoundFontFace->IsScalable() )
+ if( !pFoundFontFace->IsScalable() )
continue;
if( bEmbeddable && !pFoundFontFace->CanEmbed() && !pFoundFontFace->CanSubset() )
continue;
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 6f1779e72f49..fd9260f5c9be 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -558,7 +558,7 @@ bool Animation::Convert( BmpConversion eConversion )
return bRet;
}
-bool Animation::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce )
+bool Animation::ReduceColors( sal_uInt16 nNewColorCount )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
@@ -569,9 +569,9 @@ bool Animation::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce )
bRet = true;
for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i )
- bRet = maList[ i ]->aBmpEx.ReduceColors( nNewColorCount, eReduce );
+ bRet = maList[ i ]->aBmpEx.ReduceColors( nNewColorCount, BMP_REDUCE_POPULAR );
- maBitmapEx.ReduceColors( nNewColorCount, eReduce );
+ maBitmapEx.ReduceColors( nNewColorCount, BMP_REDUCE_POPULAR );
}
else
bRet = false;
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 291fe59e34cb..fc2790dbfe4c 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -46,26 +46,17 @@ GfxLink::GfxLink( const GfxLink& rGfxLink ) :
ImplCopy( rGfxLink );
}
-GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, bool bOwns ) :
+GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType ) :
mpImpData( new ImpGfxLink )
{
- DBG_ASSERT( (pBuf != nullptr && nSize) || (!bOwns && nSize == 0),
+ DBG_ASSERT( pBuf != nullptr && nSize,
"GfxLink::GfxLink(): empty/NULL buffer given" );
meType = nType;
mnBufSize = nSize;
mpSwap = nullptr;
mnUserId = 0UL;
-
- if( bOwns )
- mpBuf = new ImpBuffer( pBuf );
- else if( nSize )
- {
- mpBuf = new ImpBuffer( nSize );
- memcpy( mpBuf->mpBuffer, pBuf, nSize );
- }
- else
- mpBuf = nullptr;
+ mpBuf = new ImpBuffer( pBuf );
}
GfxLink::~GfxLink()
@@ -295,7 +286,7 @@ SvStream& ReadGfxLink( SvStream& rIStream, GfxLink& rGfxLink)
pBuf = new sal_uInt8[ nSize ];
rIStream.Read( pBuf, nSize );
- rGfxLink = GfxLink( pBuf, nSize, (GfxLinkType) nType, true );
+ rGfxLink = GfxLink( pBuf, nSize, (GfxLinkType) nType );
rGfxLink.SetUserId( nUserId );
if( bMapAndSizeValid )
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 0d05aa7de5e5..7bfa151fe3ec 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -3164,9 +3164,9 @@ void MetaRefPointAction::Read( SvStream& rIStm, ImplMetaReadData* )
ReadPair( rIStm, maRefPoint ).ReadCharAsBool( mbSet );
}
-MetaCommentAction::MetaCommentAction( sal_Int32 nValue ) :
+MetaCommentAction::MetaCommentAction() :
MetaAction ( MetaActionType::COMMENT ),
- mnValue ( nValue )
+ mnValue ( 0 )
{
ImplInitDynamicData( nullptr, 0UL );
}
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 96072615719c..fd1addf02c7f 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -615,14 +615,14 @@ void PDFExtOutDevData::PlayGlobalActions( PDFWriter& rWriter )
all actions will be played after the last page was recorded
*/
//--->i56629
-sal_Int32 PDFExtOutDevData::CreateNamedDest(const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
+sal_Int32 PDFExtOutDevData::CreateNamedDest(const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr )
{
mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNamedDest );
mpGlobalSyncData->mParaOUStrings.push_back( sDestName );
mpGlobalSyncData->mParaRects.push_back( rRect );
mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
mpGlobalSyncData->mParaInts.push_back( nPageNr == -1 ? mnPage : nPageNr );
- mpGlobalSyncData->mParaDestAreaTypes.push_back( eType );
+ mpGlobalSyncData->mParaDestAreaTypes.push_back( PDFWriter::XYZ );
return mpGlobalSyncData->mCurId++;
}
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 1a84a6358607..5bf4bb29623e 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -445,9 +445,9 @@ PDFOutputStream::~PDFOutputStream()
{
}
-void PDFWriter::AddStream( const OUString& rMimeType, PDFOutputStream* pStream, bool bCompress )
+void PDFWriter::AddStream( const OUString& rMimeType, PDFOutputStream* pStream )
{
- xImplementation->addStream( rMimeType, pStream, bCompress );
+ xImplementation->addStream( rMimeType, pStream, false/*bCompress*/ );
}
std::set< PDFWriter::ErrorCode > PDFWriter::GetErrors()
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 2f35a3bbc062..1633dab15045 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -202,7 +202,7 @@ public:
}
bool isFixedPageSize() const
{ return mbPapersizeFromSetup; }
- PrinterController::PageSize modifyJobSetup( const css::uno::Sequence< css::beans::PropertyValue >& i_rProps, bool bNoNUP );
+ PrinterController::PageSize modifyJobSetup( const css::uno::Sequence< css::beans::PropertyValue >& i_rProps );
void resetPaperToLastConfigured();
};
@@ -855,7 +855,7 @@ bool PrinterController::setupPrinter( vcl::Window* i_pParent )
return bRet;
}
-PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( const css::uno::Sequence< css::beans::PropertyValue >& i_rProps, bool bNoNUP )
+PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( const css::uno::Sequence< css::beans::PropertyValue >& i_rProps )
{
PrinterController::PageSize aPageSize;
aPageSize.aSize = mxPrinter->GetPaperSize();
@@ -890,7 +890,7 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons
if( aSetSize.Width && aSetSize.Height )
{
Size aSetPaperSize( aSetSize.Width, aSetSize.Height );
- Size aRealPaperSize( getRealPaperSize( aSetPaperSize, bNoNUP ) );
+ Size aRealPaperSize( getRealPaperSize( aSetPaperSize, true/*bNoNUP*/ ) );
if( aRealPaperSize != aCurSize )
aIsSize = aSetSize;
}
@@ -900,7 +900,7 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons
aPageSize.aSize.Width() = aIsSize.Width;
aPageSize.aSize.Height() = aIsSize.Height;
- Size aRealPaperSize( getRealPaperSize( aPageSize.aSize, bNoNUP ) );
+ Size aRealPaperSize( getRealPaperSize( aPageSize.aSize, true/*bNoNUP*/ ) );
if( aRealPaperSize != aCurSize )
mxPrinter->SetPaperSizeUser( aRealPaperSize, ! isFixedPageSize() );
}
@@ -990,7 +990,7 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag
mpImplData->mxPrinter->SetMapMode( aMapMode );
// modify job setup if necessary
- PrinterController::PageSize aPageSize = mpImplData->modifyJobSetup( aPageParm, true );
+ PrinterController::PageSize aPageSize = mpImplData->modifyJobSetup( aPageParm );
o_rMtf.SetPrefSize( aPageSize.aSize );
o_rMtf.SetPrefMapMode( aMapMode );
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 4ac52a1307e0..9c2d221193f3 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -498,14 +498,14 @@ bool SalGraphics::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradi
void SalGraphics::CopyArea( long nDestX, long nDestY,
long nSrcX, long nSrcY,
long nSrcWidth, long nSrcHeight,
- sal_uInt16 nFlags, const OutputDevice *pOutDev )
+ const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
mirror( nDestX, nSrcWidth, pOutDev );
mirror( nSrcX, nSrcWidth, pOutDev );
}
- copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, nFlags );
+ copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, SAL_COPYAREA_WINDOWINVALIDATE );
}
void SalGraphics::CopyBits( const SalTwoRect& rPosAry,
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index bb14b629bdb6..4c616d752987 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -188,7 +188,7 @@ OUString ImplImageTree::fallbackStyle(const OUString &style)
}
bool ImplImageTree::loadImage(OUString const & name, OUString const & style, BitmapEx & bitmap,
- bool localized, bool loadMissing)
+ bool localized)
{
OUString aStyle(style);
while (!aStyle.isEmpty())
@@ -207,12 +207,7 @@ bool ImplImageTree::loadImage(OUString const & name, OUString const & style, Bit
aStyle = fallbackStyle(aStyle);
}
- if (!loadMissing)
- return false;
-
- SAL_INFO("vcl", "ImplImageTree::loadImage couldn't load \"" << name << "\", fetching default image");
-
- return loadDefaultImage(style, bitmap);
+ return false;
}
bool ImplImageTree::loadDefaultImage(OUString const & style, BitmapEx& bitmap)
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 7b1ed3abfb88..7d9a14dcefb2 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -725,15 +725,14 @@ sal_uInt16 OutputDevice::GetFontSubstituteCount()
}
bool ImplDirectFontSubstitution::FindFontSubstitute( OUString& rSubstName,
- const OUString& rSearchName, AddFontSubstituteFlags nFlags ) const
+ const OUString& rSearchName ) const
{
// TODO: get rid of O(N) searches
FontSubstList::const_iterator it = maFontSubstList.begin();
for(; it != maFontSubstList.end(); ++it )
{
const ImplFontSubstEntry& rEntry = *it;
- if( ((rEntry.mnFlags & nFlags) || nFlags == AddFontSubstituteFlags::NONE)
- && (rEntry.maSearchName == rSearchName) )
+ if( (rEntry.mnFlags & AddFontSubstituteFlags::ALWAYS) && rEntry.maSearchName == rSearchName )
{
rSubstName = rEntry.maSearchReplaceName;
return true;
@@ -752,7 +751,7 @@ void ImplFontSubstitute( OUString& rFontName )
// apply user-configurable font replacement (eg, from the list in Tools->Options)
const ImplDirectFontSubstitution* pSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst;
- if( pSubst && pSubst->FindFontSubstitute( aSubstFontName, rFontName, AddFontSubstituteFlags::ALWAYS ) )
+ if( pSubst && pSubst->FindFontSubstitute( aSubstFontName, rFontName ) )
{
rFontName = aSubstFontName;
return;
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 711196f6db85..33e0fdc45097 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -2827,7 +2827,7 @@ bool OutputDevice::GetTextOutlines( basegfx::B2DPolyPolygonVector& rVector,
bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
const OUString& rStr, sal_Int32 nBase,
- sal_Int32 nIndex, sal_Int32 nLen, bool bOptimize,
+ sal_Int32 nIndex, sal_Int32 nLen,
sal_uLong nTWidth, const long* pDXArray ) const
{
if(nLen == 0x0FFFF)
@@ -2841,7 +2841,7 @@ bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
// get the basegfx polypolygon vector
basegfx::B2DPolyPolygonVector aB2DPolyPolyVector;
if( !GetTextOutlines( aB2DPolyPolyVector, rStr, nBase, nIndex, nLen,
- bOptimize, nTWidth, pDXArray ) )
+ true/*bOptimize*/, nTWidth, pDXArray ) )
return false;
// convert to a tool polypolygon vector
@@ -2854,8 +2854,8 @@ bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector,
}
bool OutputDevice::GetTextOutline( tools::PolyPolygon& rPolyPoly, const OUString& rStr,
- sal_Int32 nBase, sal_Int32 nIndex, sal_Int32 nLen,
- bool bOptimize, sal_uLong nTWidth, const long* pDXArray ) const
+ sal_Int32 nLen,
+ sal_uLong nTWidth, const long* pDXArray ) const
{
if(nLen == 0x0FFFF)
{
@@ -2866,8 +2866,8 @@ bool OutputDevice::GetTextOutline( tools::PolyPolygon& rPolyPoly, const OUString
// get the basegfx polypolygon vector
basegfx::B2DPolyPolygonVector aB2DPolyPolyVector;
- if( !GetTextOutlines( aB2DPolyPolyVector, rStr, nBase, nIndex, nLen,
- bOptimize, nTWidth, pDXArray ) )
+ if( !GetTextOutlines( aB2DPolyPolyVector, rStr, 0/*nBase*/, 0/*nIndex*/, nLen,
+ true/*bOptimize*/, nTWidth, pDXArray ) )
return false;
// convert and merge into a tool polypolygon
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index a42ca44ea069..b3639999a421 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -179,44 +179,6 @@ bool Window::ImplIsAccessibleNativeFrame() const
return false;
}
-sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( GetWindowType nFirstWindowType ) const
-{
- sal_uInt16 nChildren = 0;
- vcl::Window* pChild = GetWindow( nFirstWindowType );
- while ( pChild )
- {
- if( pChild->ImplIsAccessibleCandidate() )
- nChildren++;
- else
- nChildren = sal::static_int_cast<sal_uInt16>(nChildren + pChild->ImplGetAccessibleCandidateChildWindowCount( GetWindowType::FirstChild ));
- pChild = pChild->mpWindowImpl->mpNext;
- }
- return nChildren;
-}
-
-vcl::Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, GetWindowType nFirstWindowType, bool bTopLevel ) const
-{
-
- if( bTopLevel )
- rChildCount = 0;
-
- vcl::Window* pChild = GetWindow( nFirstWindowType );
- while ( pChild )
- {
- vcl::Window *pTmpChild = pChild;
-
- if( !pChild->ImplIsAccessibleCandidate() )
- pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, GetWindowType::FirstChild, false );
-
- if ( nChild == rChildCount )
- return pTmpChild;
- pChild = pChild->mpWindowImpl->mpNext;
- rChildCount++;
- }
-
- return nullptr;
-}
-
vcl::Window* Window::GetAccessibleParentWindow() const
{
if ( ImplIsAccessibleNativeFrame() )
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index da14e99ec75f..ff246a5e3acd 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -131,7 +131,7 @@ static void ImplDrawBrdWinSymbolButton( vcl::RenderContext* pDev,
pDev->SetLineColor();
pDev->DrawRect( rRect );
pWin->DrawSelectionBackground( rRect, 2, bool(nState & DrawButtonFlags::Pressed),
- true, false );
+ true );
}
aTempRect = rRect;
aTempRect.Left()+=3;
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index 1468e22f2cad..13989cd09b49 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -607,7 +607,7 @@ void Window::ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl
}
void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& rRegion,
- bool bChildren, bool bParent, bool bSiblings )
+ bool bChildren, bool bSiblings )
{
vcl::Region aRegion( rSourceRect );
if ( mpWindowImpl->mbWinRegion )
@@ -618,29 +618,26 @@ void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& r
ImplCalcOverlapRegionOverlaps( aRegion, rRegion );
// Parent-Boundaries
- if ( bParent )
+ pWindow = this;
+ if ( !ImplIsOverlapWindow() )
{
- pWindow = this;
- if ( !ImplIsOverlapWindow() )
- {
- pWindow = ImplGetParent();
- do
- {
- aTempRegion = aRegion;
- pWindow->ImplExcludeWindowRegion( aTempRegion );
- rRegion.Union( aTempRegion );
- if ( pWindow->ImplIsOverlapWindow() )
- break;
- pWindow = pWindow->ImplGetParent();
- }
- while ( pWindow );
- }
- if ( pWindow && !pWindow->mpWindowImpl->mbFrame )
+ pWindow = ImplGetParent();
+ do
{
aTempRegion = aRegion;
- aTempRegion.Exclude( Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
+ pWindow->ImplExcludeWindowRegion( aTempRegion );
rRegion.Union( aTempRegion );
+ if ( pWindow->ImplIsOverlapWindow() )
+ break;
+ pWindow = pWindow->ImplGetParent();
}
+ while ( pWindow );
+ }
+ if ( pWindow && !pWindow->mpWindowImpl->mbFrame )
+ {
+ aTempRegion = aRegion;
+ aTempRegion.Exclude( Rectangle( Point( 0, 0 ), Size( mpWindowImpl->mpFrameWindow->mnOutWidth, mpWindowImpl->mpFrameWindow->mnOutHeight ) ) );
+ rRegion.Union( aTempRegion );
}
// Siblings
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 6741171bec6c..0d43be98f19e 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -892,7 +892,7 @@ void DecorationView::DrawFrame( const Rectangle& rRect,
}
void DecorationView::DrawHighlightFrame( const Rectangle& rRect,
- DrawHighlightFrameStyle nStyle, bool bTestBackground )
+ DrawHighlightFrameStyle nStyle )
{
const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
Color aLightColor = rStyleSettings.GetLightColor();
@@ -904,7 +904,7 @@ void DecorationView::DrawHighlightFrame( const Rectangle& rRect,
aLightColor = Color( COL_BLACK );
aShadowColor = Color( COL_BLACK );
}
- else if ( bTestBackground )
+ else
{
Wallpaper aBackground = mpOutDev->GetBackground();
if ( aBackground.IsBitmap() || aBackground.IsGradient() )
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 46dcef989a99..e0fbd7e88bdd 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1015,7 +1015,7 @@ void Dialog::SetModalInputMode( bool bModal )
// before the other dialog can be closed (because the other dialog
// is on stack since our dialog returns)
if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, true ) )
- mpPrevExecuteDlg->EnableInput( false, true, true, this );
+ mpPrevExecuteDlg->EnableInput( false, this );
// determine next overlap dialog parent
vcl::Window* pParent = GetParent();
@@ -1041,7 +1041,7 @@ void Dialog::SetModalInputMode( bool bModal )
// Enable the prev Modal Dialog
if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, true ) )
{
- mpPrevExecuteDlg->EnableInput( true, true, true, this );
+ mpPrevExecuteDlg->EnableInput( true, this );
// ensure continued modality of prev dialog
// do not change modality counter
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 04a4a7a43bf1..af424e24a687 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -629,12 +629,12 @@ void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow,
NotifyEvent::NotifyEvent( MouseNotifyEvent nEventType, vcl::Window* pWindow,
- const void* pEvent, long nRet )
+ const void* pEvent )
{
mpWindow = pWindow;
mpData = const_cast<void*>(pEvent);
mnEventType = nEventType;
- mnRetValue = nRet;
+ mnRetValue = 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 489638bdf9b9..810525ba1234 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2595,7 +2595,7 @@ void MenuBar::ImplDestroy( MenuBar* pMenu, bool bDelete )
pMenu->pWindow = nullptr;
}
-bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
+bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent )
{
bool bDone = false;
@@ -2609,7 +2609,7 @@ bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
if (pWin && pWin->IsEnabled() && pWin->IsInputEnabled() && !pWin->IsInModalMode())
{
MenuBarWindow* pMenuWin = getMenuBarWindow();
- bDone = pMenuWin && pMenuWin->HandleKeyEvent(rKEvent, bFromMenu);
+ bDone = pMenuWin && pMenuWin->HandleKeyEvent(rKEvent, false/*bFromMenu*/);
}
return bDone;
}
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 99daa750b94f..8f496ea25dc6 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -34,8 +34,8 @@
// document closing button
#define IID_DOCUMENTCLOSE 1
-DecoToolBox::DecoToolBox( vcl::Window* pParent, WinBits nStyle ) :
- ToolBox( pParent, nStyle )
+DecoToolBox::DecoToolBox( vcl::Window* pParent ) :
+ ToolBox( pParent, 0 )
{
ImplInit();
}
@@ -583,7 +583,7 @@ static void ImplAddNWFSeparator(vcl::RenderContext& rRenderContext, const Size&
}
}
-void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHighlight)
+void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos)
{
if (!pMenu)
return;
@@ -601,73 +601,45 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16
Rectangle aRect = Rectangle(Point(nX, 1), Size(pData->aSz.Width(), GetOutputSizePixel().Height() - 2));
rRenderContext.Push(PushFlags::CLIPREGION);
rRenderContext.IntersectClipRegion(aRect);
- bool bRollover = bHighlight && nPos != nHighlightedItem;
- if (bHighlight)
+ bool bRollover = nPos != nHighlightedItem;
+ if (rRenderContext.IsNativeControlSupported(CTRL_MENUBAR, PART_MENU_ITEM) &&
+ rRenderContext.IsNativeControlSupported(CTRL_MENUBAR, PART_ENTIRE_CONTROL))
{
- if (rRenderContext.IsNativeControlSupported(CTRL_MENUBAR, PART_MENU_ITEM) &&
- rRenderContext.IsNativeControlSupported(CTRL_MENUBAR, PART_ENTIRE_CONTROL))
- {
- // draw background (transparency)
- MenubarValue aControlValue;
- aControlValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( this );
-
- if (!Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty() )
- Erase(rRenderContext);
- else
- {
- Rectangle aBgRegion(Point(), GetOutputSizePixel());
- rRenderContext.DrawNativeControl(CTRL_MENUBAR, PART_ENTIRE_CONTROL, aBgRegion,
- ControlState::ENABLED, aControlValue, OUString());
- }
-
- ImplAddNWFSeparator(rRenderContext, GetOutputSizePixel(), aControlValue);
-
- // draw selected item
- ControlState nState = ControlState::ENABLED;
- if (bRollover)
- nState |= ControlState::ROLLOVER;
- else
- nState |= ControlState::SELECTED;
- rRenderContext.DrawNativeControl(CTRL_MENUBAR, PART_MENU_ITEM,
- aRect, nState, aControlValue, OUString() );
- }
+ // draw background (transparency)
+ MenubarValue aControlValue;
+ aControlValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( this );
+
+ if (!Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty() )
+ Erase(rRenderContext);
else
{
- if (bRollover)
- rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuBarRolloverColor());
- else
- rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuHighlightColor());
- rRenderContext.SetLineColor();
- rRenderContext.DrawRect(aRect);
+ Rectangle aBgRegion(Point(), GetOutputSizePixel());
+ rRenderContext.DrawNativeControl(CTRL_MENUBAR, PART_ENTIRE_CONTROL, aBgRegion,
+ ControlState::ENABLED, aControlValue, OUString());
}
+
+ ImplAddNWFSeparator(rRenderContext, GetOutputSizePixel(), aControlValue);
+
+ // draw selected item
+ ControlState nState = ControlState::ENABLED;
+ if (bRollover)
+ nState |= ControlState::ROLLOVER;
+ else
+ nState |= ControlState::SELECTED;
+ rRenderContext.DrawNativeControl(CTRL_MENUBAR, PART_MENU_ITEM,
+ aRect, nState, aControlValue, OUString() );
}
else
{
- if (rRenderContext.IsNativeControlSupported(CTRL_MENUBAR, PART_ENTIRE_CONTROL))
- {
- MenubarValue aMenubarValue;
- aMenubarValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( this );
-
- if (!Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty())
- rRenderContext.Erase(aRect);
- else
- {
- // use full window size to get proper gradient
- // but clip accordingly
- Point aPt;
- Rectangle aCtrlRect(aPt, GetOutputSizePixel());
-
- rRenderContext.DrawNativeControl(CTRL_MENUBAR, PART_ENTIRE_CONTROL,
- aCtrlRect, ControlState::ENABLED, aMenubarValue, OUString());
- }
-
- ImplAddNWFSeparator(rRenderContext, GetOutputSizePixel(), aMenubarValue);
- }
+ if (bRollover)
+ rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuBarRolloverColor());
else
- rRenderContext.Erase(aRect);
+ rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuHighlightColor());
+ rRenderContext.SetLineColor();
+ rRenderContext.DrawRect(aRect);
}
rRenderContext.Pop();
- pMenu->ImplPaint(rRenderContext, 0, 0, pData, bHighlight, false, bRollover);
+ pMenu->ImplPaint(rRenderContext, 0, 0, pData, true/*bHighlight*/, false, bRollover);
}
return;
}
@@ -902,7 +874,7 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
pMenu->ImplPaint(rRenderContext, 0);
if (nHighlightedItem != ITEMPOS_INVALID)
- HighlightItem(rRenderContext, nHighlightedItem, true);
+ HighlightItem(rRenderContext, nHighlightedItem);
// in high contrast mode draw a separating line on the lower edge
if (!rRenderContext.IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL) &&
diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx
index 9abc478a7764..79147edf9344 100644
--- a/vcl/source/window/menubarwindow.hxx
+++ b/vcl/source/window/menubarwindow.hxx
@@ -41,7 +41,7 @@ class DecoToolBox : public ToolBox
using Window::ImplInit;
public:
- DecoToolBox( vcl::Window* pParent, WinBits nStyle = 0 );
+ DecoToolBox( vcl::Window* pParent );
virtual ~DecoToolBox() {}
void ImplInit();
@@ -91,7 +91,7 @@ private:
std::map< sal_uInt16, AddButtonEntry > m_aAddButtons;
- void HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHighlight);
+ void HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos);
void ChangeHighlightItem(sal_uInt16 n, bool bSelectPopupEntry, bool bAllowRestoreFocus = true, bool bDefaultToDocument = true);
sal_uInt16 ImplFindEntry( const Point& rMousePos ) const;
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 2620b0d97aa5..50c8f23db69d 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -758,7 +758,7 @@ void MenuFloatingWindow::InvalidateItem(sal_uInt16 nPos)
}
}
-void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHighlight)
+void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos)
{
if (!pMenu)
return;
@@ -803,8 +803,7 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
MenupopupValue aVal(pMenu->nTextPos-GUTTERBORDER, aItemRect);
rRenderContext.DrawNativeControl(CTRL_MENU_POPUP, PART_ENTIRE_CONTROL,
aCtrlRect, ControlState::ENABLED, aVal, OUString());
- if (bHighlight &&
- rRenderContext.IsNativeControlSupported(CTRL_MENU_POPUP, PART_MENU_ITEM))
+ if (rRenderContext.IsNativeControlSupported(CTRL_MENU_POPUP, PART_MENU_ITEM))
{
bDrawItemRect = false;
if (!rRenderContext.DrawNativeControl(CTRL_MENU_POPUP, PART_MENU_ITEM, aItemRect,
@@ -813,33 +812,28 @@ void MenuFloatingWindow::RenderHighlightItem(vcl::RenderContext& rRenderContext,
: ControlState::NONE),
aVal, OUString()))
{
- bDrawItemRect = bHighlight;
+ bDrawItemRect = true;
}
}
else
- bDrawItemRect = bHighlight;
+ bDrawItemRect = true;
rRenderContext.Pop();
}
if (bDrawItemRect)
{
- if (bHighlight)
+ if (pData->bEnabled)
+ rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuHighlightColor());
+ else
{
- if (pData->bEnabled)
- rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuHighlightColor());
- else
- {
- rRenderContext.SetFillColor();
- oldLineColor = rRenderContext.GetLineColor();
- rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuHighlightColor());
- bRestoreLineColor = true;
- }
+ rRenderContext.SetFillColor();
+ oldLineColor = rRenderContext.GetLineColor();
+ rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuHighlightColor());
+ bRestoreLineColor = true;
}
- else
- rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuColor());
rRenderContext.DrawRect(aItemRect);
}
- pMenu->ImplPaint(rRenderContext, nScrollerHeight, nStartY, pData, bHighlight);
+ pMenu->ImplPaint(rRenderContext, nScrollerHeight, nStartY, pData, true/*bHighlight*/);
if (bRestoreLineColor)
rRenderContext.SetLineColor(oldLineColor);
}
@@ -1164,7 +1158,7 @@ void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang
rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuColor());
pMenu->ImplPaint(rRenderContext, nScrollerHeight, ImplGetStartY());
if (nHighlightedItem != ITEMPOS_INVALID)
- RenderHighlightItem(rRenderContext, nHighlightedItem, true);
+ RenderHighlightItem(rRenderContext, nHighlightedItem);
rRenderContext.Pop();
}
diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx
index 8545fb061a97..07e5c083d0ff 100644
--- a/vcl/source/window/menufloatingwindow.hxx
+++ b/vcl/source/window/menufloatingwindow.hxx
@@ -78,7 +78,7 @@ protected:
void ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDown );
long ImplGetStartY() const;
Rectangle ImplGetItemRect( sal_uInt16 nPos );
- void RenderHighlightItem( vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHighlight );
+ void RenderHighlightItem( vcl::RenderContext& rRenderContext, sal_uInt16 nPos );
long GetInitialItemY( long *pOptStartY = nullptr ) const;
void InvalidateItem( sal_uInt16 nPos );
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 08ce4e43703f..1e5b936e3527 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -564,7 +564,7 @@ PaintHelper::~PaintHelper()
// #98943# draw toolbox selection
if( !m_aSelectionRect.IsEmpty() )
- m_pWindow->DrawSelectionBackground( m_aSelectionRect, 3, false, true, false );
+ m_pWindow->DrawSelectionBackground( m_aSelectionRect, 3, false, true );
delete m_pChildRegion;
}
@@ -945,18 +945,15 @@ void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, ValidateFlags
}
}
-void Window::ImplValidate( ValidateFlags nFlags )
+void Window::ImplValidate()
{
// assemble region
bool bValidateAll = true;
- ValidateFlags nOrgFlags = nFlags;
- if ( !(nFlags & (ValidateFlags::Children | ValidateFlags::NoChildren)) )
- {
- if ( GetStyle() & WB_CLIPCHILDREN )
- nFlags |= ValidateFlags::NoChildren;
- else
- nFlags |= ValidateFlags::Children;
- }
+ ValidateFlags nFlags = ValidateFlags::NONE;
+ if ( GetStyle() & WB_CLIPCHILDREN )
+ nFlags |= ValidateFlags::NoChildren;
+ else
+ nFlags |= ValidateFlags::Children;
if ( (nFlags & ValidateFlags::NoChildren) && mpWindowImpl->mpFirstChild )
bValidateAll = false;
if ( bValidateAll )
@@ -969,13 +966,8 @@ void Window::ImplValidate( ValidateFlags nFlags )
if ( nFlags & ValidateFlags::NoChildren )
{
nFlags &= ~ValidateFlags::Children;
- if ( nOrgFlags & ValidateFlags::NoChildren )
- ImplClipAllChildren( aRegion );
- else
- {
- if ( ImplClipChildren( aRegion ) )
- nFlags |= ValidateFlags::Children;
- }
+ if ( ImplClipChildren( aRegion ) )
+ nFlags |= ValidateFlags::Children;
}
if ( !aRegion.IsEmpty() )
ImplValidateFrameRegion( &aRegion, nFlags );
@@ -1223,7 +1215,7 @@ void Window::Validate()
if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )
return;
- ImplValidate( ValidateFlags::NONE );
+ ImplValidate();
}
bool Window::HasPaintEvent() const
@@ -1565,7 +1557,7 @@ void Window::ImplScroll( const Rectangle& rRect,
if ( !(nFlags & ScrollFlags::NoInvalidate) )
{
- ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChildren, true, false );
+ ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChildren, false );
// --- RTL ---
// if the scrolling on the device is performed in the opposite direction
@@ -1646,7 +1638,7 @@ void Window::ImplScroll( const Rectangle& rRect,
pGraphics->CopyArea( rRect.Left()+nHorzScroll, rRect.Top()+nVertScroll,
rRect.Left(), rRect.Top(),
rRect.GetWidth(), rRect.GetHeight(),
- SAL_COPYAREA_WINDOWINVALIDATE, this );
+ this );
}
#endif
if ( mpWindowImpl->mpWinData )
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 2d88d511453f..be145fab7cf6 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1801,16 +1801,13 @@ void SplitWindow::ImplDrawButtonRect(vcl::RenderContext& rRenderContext, const R
}
}
-void SplitWindow::ImplDrawAutoHide(vcl::RenderContext& rRenderContext, bool bInPaint)
+void SplitWindow::ImplDrawAutoHide(vcl::RenderContext& rRenderContext)
{
if (mbAutoHide)
{
Rectangle aTempRect;
ImplGetAutoHideRect( aTempRect );
- if (!bInPaint)
- rRenderContext.Erase( aTempRect );
-
// load ImageListe, if not available
ImplSVData* pSVData = ImplGetSVData();
ImageList* pImageList;
@@ -1960,7 +1957,7 @@ void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const Rectang
rRenderContext.SetAntialiasing(nAA);
}
-void SplitWindow::ImplDrawFadeIn(vcl::RenderContext& rRenderContext, bool bInPaint)
+void SplitWindow::ImplDrawFadeIn(vcl::RenderContext& rRenderContext)
{
if (mbFadeIn)
{
@@ -1981,14 +1978,11 @@ void SplitWindow::ImplDrawFadeIn(vcl::RenderContext& rRenderContext, bool bInPai
break;
}
- if (!bInPaint)
- rRenderContext.Erase(aTempRect);
-
ImplDrawGrip(rRenderContext, aTempRect, (meAlign == WindowAlign::Top) || (meAlign == WindowAlign::Bottom), bLeft);
}
}
-void SplitWindow::ImplDrawFadeOut(vcl::RenderContext& rRenderContext, bool bInPaint)
+void SplitWindow::ImplDrawFadeOut(vcl::RenderContext& rRenderContext)
{
if (mbFadeOut)
{
@@ -2009,9 +2003,6 @@ void SplitWindow::ImplDrawFadeOut(vcl::RenderContext& rRenderContext, bool bInPa
break;
}
- if (!bInPaint)
- rRenderContext.Erase(aTempRect);
-
ImplDrawGrip(rRenderContext, aTempRect, (meAlign == WindowAlign::Top) || (meAlign == WindowAlign::Bottom), bLeft);
}
}
@@ -2534,9 +2525,9 @@ void SplitWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
ImplDrawBorder(rRenderContext);
ImplDrawBorderLine(rRenderContext);
- ImplDrawFadeOut(rRenderContext, true);
- ImplDrawFadeIn(rRenderContext, true);
- ImplDrawAutoHide(rRenderContext, true);
+ ImplDrawFadeOut(rRenderContext);
+ ImplDrawFadeIn(rRenderContext);
+ ImplDrawAutoHide(rRenderContext);
// draw FrameSet-backgrounds
ImplDrawBack(rRenderContext, mpMainSet);
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index db6c61739224..671afb6ff50c 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -330,7 +330,7 @@ sal_uInt16 StatusBar::ImplGetFirstVisiblePos() const
return SAL_MAX_UINT16;
}
-void StatusBar::ImplDrawText(vcl::RenderContext& rRenderContext, bool bOffScreen, long nOldTextWidth)
+void StatusBar::ImplDrawText(vcl::RenderContext& rRenderContext)
{
// prevent item box from being overwritten
Rectangle aTextRect;
@@ -350,24 +350,11 @@ void StatusBar::ImplDrawText(vcl::RenderContext& rRenderContext, bool bOffScreen
aTextRect.Bottom() = aTextRect.Top()+GetTextHeight()+1;
- if (bOffScreen)
- {
- long nMaxWidth = std::max(nOldTextWidth, GetTextWidth(aStr));
- Size aVirDevSize(nMaxWidth, aTextRect.GetHeight());
- mpImplData->mpVirDev->SetOutputSizePixel( aVirDevSize );
- Rectangle aTempRect = aTextRect;
- aTempRect.SetPos(Point(0, 0));
- mpImplData->mpVirDev->DrawText( aTempRect, aStr, DrawTextFlags::Left | DrawTextFlags::Top | DrawTextFlags::Clip | DrawTextFlags::EndEllipsis );
- rRenderContext.DrawOutDev(aTextRect.TopLeft(), aVirDevSize, Point(), aVirDevSize, *mpImplData->mpVirDev);
- }
- else
- {
- rRenderContext.DrawText(aTextRect, aStr, DrawTextFlags::Left | DrawTextFlags::Top | DrawTextFlags::Clip | DrawTextFlags::EndEllipsis);
- }
+ rRenderContext.DrawText(aTextRect, aStr, DrawTextFlags::Left | DrawTextFlags::Top | DrawTextFlags::Clip | DrawTextFlags::EndEllipsis);
}
}
-void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen, sal_uInt16 nPos, bool bDrawText, bool bDrawFrame)
+void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen, sal_uInt16 nPos)
{
Rectangle aRect = ImplGetItemRectPos(nPos);
@@ -393,20 +380,17 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
}
// print text
- if (bDrawText)
+ Size aTextSize(rRenderContext.GetTextWidth(pItem->maText), rRenderContext.GetTextHeight());
+ Point aTextPos = ImplGetItemTextPos(aTextRectSize, aTextSize, pItem->mnBits);
+ if (bOffScreen)
{
- Size aTextSize(rRenderContext.GetTextWidth(pItem->maText), rRenderContext.GetTextHeight());
- Point aTextPos = ImplGetItemTextPos(aTextRectSize, aTextSize, pItem->mnBits);
- if (bOffScreen)
- {
- mpImplData->mpVirDev->DrawText(aTextPos, pItem->maText);
- }
- else
- {
- aTextPos.X() += aTextRect.Left();
- aTextPos.Y() += aTextRect.Top();
- rRenderContext.DrawText(aTextPos, pItem->maText);
- }
+ mpImplData->mpVirDev->DrawText(aTextPos, pItem->maText);
+ }
+ else
+ {
+ aTextPos.X() += aTextRect.Left();
+ aTextPos.Y() += aTextRect.Top();
+ rRenderContext.DrawText(aTextPos, pItem->maText);
}
// call DrawItem if necessary
@@ -434,37 +418,34 @@ void StatusBar::ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen
rRenderContext.SetClipRegion();
// show frame
- if (bDrawFrame)
+ if (mpImplData->mbDrawItemFrames)
{
- if (mpImplData->mbDrawItemFrames)
+ if (!(pItem->mnBits & SIB_FLAT))
{
- if (!(pItem->mnBits & SIB_FLAT))
- {
- DrawFrameStyle nStyle;
-
- if (pItem->mnBits & SIB_IN)
- nStyle = DrawFrameStyle::In;
- else
- nStyle = DrawFrameStyle::Out;
+ DrawFrameStyle nStyle;
- DecorationView aDecoView(&rRenderContext);
- aDecoView.DrawFrame(aRect, nStyle);
- }
- }
- else if (nPos != ImplGetFirstVisiblePos())
- {
- // draw separator
- Point aFrom(aRect.TopLeft());
- aFrom.X() -= 4;
- aFrom.Y()++;
- Point aTo(aRect.BottomLeft());
- aTo.X() -= 4;
- aTo.Y()--;
+ if (pItem->mnBits & SIB_IN)
+ nStyle = DrawFrameStyle::In;
+ else
+ nStyle = DrawFrameStyle::Out;
DecorationView aDecoView(&rRenderContext);
- aDecoView.DrawSeparator(aFrom, aTo);
+ aDecoView.DrawFrame(aRect, nStyle);
}
}
+ else if (nPos != ImplGetFirstVisiblePos())
+ {
+ // draw separator
+ Point aFrom(aRect.TopLeft());
+ aFrom.X() -= 4;
+ aFrom.Y()++;
+ Point aTo(aRect.BottomLeft());
+ aTo.X() -= 4;
+ aTo.Y()--;
+
+ DecorationView aDecoView(&rRenderContext);
+ aDecoView.DrawSeparator(aFrom, aTo);
+ }
if (!rRenderContext.ImplIsRecordLayout())
CallEventListeners(VCLEVENT_STATUSBAR_DRAWITEM, reinterpret_cast<void*>(pItem->mnId));
@@ -582,19 +563,15 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
}
}
-void StatusBar::ImplDrawProgress(vcl::RenderContext& rRenderContext, bool bPaint,
- sal_uInt16 nPercent1, sal_uInt16 nPercent2)
+void StatusBar::ImplDrawProgress(vcl::RenderContext& rRenderContext, sal_uInt16 nPercent2)
{
bool bNative = rRenderContext.IsNativeControlSupported(CTRL_PROGRESS, PART_ENTIRE_CONTROL);
// bPaint: draw text also, else only update progress
- if (bPaint)
+ rRenderContext.DrawText(maPrgsTxtPos, maPrgsTxt);
+ if (!bNative)
{
- rRenderContext.DrawText(maPrgsTxtPos, maPrgsTxt);
- if (!bNative)
- {
- DecorationView aDecoView(&rRenderContext);
- aDecoView.DrawFrame(maPrgsFrameRect, DrawFrameStyle::In);
- }
+ DecorationView aDecoView(&rRenderContext);
+ aDecoView.DrawFrame(maPrgsFrameRect, DrawFrameStyle::In);
}
Point aPos(maPrgsFrameRect.Left() + STATUSBAR_PRGS_OFFSET,
@@ -606,7 +583,7 @@ void StatusBar::ImplDrawProgress(vcl::RenderContext& rRenderContext, bool bPaint
nPrgsHeight = maPrgsFrameRect.GetHeight();
}
DrawProgress(this, rRenderContext, aPos, mnPrgsSize / 2, mnPrgsSize, nPrgsHeight,
- nPercent1 * 100, nPercent2 * 100, mnPercentCount, maPrgsFrameRect);
+ 0, nPercent2 * 100, mnPercentCount, maPrgsFrameRect);
}
void StatusBar::ImplCalcProgressRect()
@@ -716,7 +693,7 @@ void StatusBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
rRenderContext.SetLineColor();
rRenderContext.SetFillColor(aProgressColor);
- ImplDrawProgress(rRenderContext, true, 0, mnPercent);
+ ImplDrawProgress(rRenderContext, mnPercent);
rRenderContext.Pop();
}
@@ -724,7 +701,7 @@ void StatusBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
{
// draw text
if (!mbVisibleItems || (GetStyle() & WB_RIGHT))
- ImplDrawText(rRenderContext, false, 0);
+ ImplDrawText(rRenderContext);
// draw items
if (mbVisibleItems)
@@ -741,7 +718,7 @@ void StatusBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
rRenderContext.Erase(rRect);
for (sal_uInt16 i = 0; i < nItemCount; i++)
- ImplDrawItem(rRenderContext, bOffscreen, i, true, true);
+ ImplDrawItem(rRenderContext, bOffscreen, i);
}
}
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 1feffa97d80c..cc9dd1f22bf2 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -144,7 +144,7 @@ bool SystemWindow::Notify( NotifyEvent& rNEvt )
if (rNEvt.GetType() == MouseNotifyEvent::COMMAND)
bDone = pMBar->ImplHandleCmdEvent(*rNEvt.GetCommandEvent());
else
- bDone = pMBar->ImplHandleKeyEvent(*rNEvt.GetKeyEvent(), false);
+ bDone = pMBar->ImplHandleKeyEvent(*rNEvt.GetKeyEvent());
}
if (bDone)
return true;
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index b638fc75bcc0..f05dbb2d7a7b 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2917,7 +2917,7 @@ void ToolBox::ImplDrawMenuButton(vcl::RenderContext& rRenderContext, bool bHighl
}
}
-void ToolBox::ImplDrawSpin(vcl::RenderContext& rRenderContext, bool bUpperIn, bool bLowerIn)
+void ToolBox::ImplDrawSpin(vcl::RenderContext& rRenderContext)
{
bool bTmpUpper;
bool bTmpLower;
@@ -2942,7 +2942,7 @@ void ToolBox::ImplDrawSpin(vcl::RenderContext& rRenderContext, bool bUpperIn, bo
}
ImplDrawUpDownButtons(rRenderContext, maUpperRect, maLowerRect,
- bUpperIn, bLowerIn, bTmpUpper, bTmpLower, !mbHorz);
+ false/*bUpperIn*/, false/*bLowerIn*/, bTmpUpper, bTmpLower, !mbHorz);
}
void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, const Rectangle& rRect)
@@ -3018,7 +3018,7 @@ void ToolBox::ImplDrawButton(vcl::RenderContext& rRenderContext, const Rectangle
bChecked, true, bIsWindow, nullptr, 2);
}
-void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint, bool bLayout)
+void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, sal_uInt16 nHighlight)
{
if (nPos >= mpData->m_aItems.size())
return;
@@ -3031,8 +3031,6 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
rRenderContext.SetFillColor();
ImplToolItem* pItem = &mpData->m_aItems[nPos];
- MetricVector* pVector = bLayout ? &mpData->m_pLayoutData->m_aUnicodeBoundRects : nullptr;
- OUString* pDisplayText = bLayout ? &mpData->m_pLayoutData->m_aDisplayText : nullptr;
if (!pItem->mbEnabled)
nHighlight = 0;
@@ -3078,8 +3076,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
DrawButtonFlags nStyle = DrawButtonFlags::NONE;
// draw separators in flat style only
- if ( !bLayout &&
- (mnOutStyle & TOOLBOX_STYLE_FLAT) &&
+ if ( (mnOutStyle & TOOLBOX_STYLE_FLAT) &&
(pItem->meType == ToolBoxItemType::SEPARATOR) &&
nPos > 0
)
@@ -3112,8 +3109,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
rRenderContext.SetLineColor(Color(COL_BLACK));
rRenderContext.SetFillColor(rStyleSettings.GetFieldColor());
rRenderContext.SetTextColor(rStyleSettings.GetFieldTextColor());
- if (!bLayout)
- rRenderContext.DrawRect(pItem->maRect);
+ rRenderContext.DrawRect(pItem->maRect);
Size aSize( GetCtrlTextWidth( pItem->maText ), GetTextHeight() );
Point aPos( pItem->maRect.Left()+2, pItem->maRect.Top() );
@@ -3130,21 +3126,15 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
}
else
bClip = false;
- if (bLayout)
- {
- mpData->m_pLayoutData->m_aLineIndices.push_back( mpData->m_pLayoutData->m_aDisplayText.getLength() );
- mpData->m_pLayoutData->m_aLineItemIds.push_back( pItem->mnId );
- mpData->m_pLayoutData->m_aLineItemPositions.push_back( nPos );
- }
rRenderContext.DrawCtrlText( aPos, pItem->maText, 0, pItem->maText.getLength(), DrawTextFlags::Mnemonic,
- pVector, pDisplayText );
+ nullptr, nullptr );
if (bClip)
rRenderContext.SetClipRegion();
rRenderContext.SetFont(aOldFont);
rRenderContext.SetTextColor(aOldTextColor);
// draw Config-Frame if required
- if (pMgr && !bLayout)
+ if (pMgr)
pMgr->UpdateDragRect();
return;
}
@@ -3162,20 +3152,14 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
nStyle |= DrawButtonFlags::Pressed;
}
- if( ! bLayout )
+ if ( mnOutStyle & TOOLBOX_STYLE_FLAT )
{
- if ( mnOutStyle & TOOLBOX_STYLE_FLAT )
- {
- if ( (pItem->meState != TRISTATE_FALSE) || !bPaint )
- {
- ImplErase(rRenderContext, pItem->maRect, nHighlight != 0, bHasOpenPopup );
- }
- }
- else
- {
- DecorationView aDecoView(&rRenderContext);
- aDecoView.DrawButton(aButtonRect, nStyle);
- }
+ ImplErase(rRenderContext, pItem->maRect, nHighlight != 0, bHasOpenPopup );
+ }
+ else
+ {
+ DecorationView aDecoView(&rRenderContext);
+ aDecoView.DrawButton(aButtonRect, nStyle);
}
nOffX += pItem->maRect.Left();
@@ -3199,7 +3183,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
aTxtSize.Height() = GetTextHeight();
}
- if ( bImage && ! bLayout )
+ if ( bImage )
{
const Image* pImage = &(pItem->maImage);
aImageSize = pImage->GetSizePixel();
@@ -3284,7 +3268,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
}
// draw selection only if not already drawn during image output (see above)
- if ( !bLayout && !bImage && (nHighlight != 0 || (pItem->meState == TRISTATE_TRUE) ) )
+ if ( !bImage && (nHighlight != 0 || (pItem->meState == TRISTATE_TRUE) ) )
{
if( bHasOpenPopup )
ImplDrawFloatwinBorder(rRenderContext, pItem);
@@ -3296,21 +3280,12 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
DrawTextFlags nTextStyle = DrawTextFlags::NONE;
if ( !pItem->mbEnabled )
nTextStyle |= DrawTextFlags::Disable;
- if( bLayout )
- {
- mpData->m_pLayoutData->m_aLineIndices.push_back( mpData->m_pLayoutData->m_aDisplayText.getLength() );
- mpData->m_pLayoutData->m_aLineItemIds.push_back( pItem->mnId );
- mpData->m_pLayoutData->m_aLineItemPositions.push_back( nPos );
- }
rRenderContext.DrawCtrlText( Point( nTextOffX, nTextOffY ), pItem->maText,
- 0, pItem->maText.getLength(), nTextStyle, pVector, pDisplayText );
+ 0, pItem->maText.getLength(), nTextStyle, nullptr, nullptr );
if ( bRotate )
SetFont( aOldFont );
}
- if( bLayout )
- return;
-
// paint optional drop down arrow
if ( pItem->mnBits & ToolBoxItemBits::DROPDOWN )
{
@@ -4141,7 +4116,7 @@ void ToolBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rPaintR
if (mnWinStyle & WB_SCROLL)
{
if (mnCurLines > mnLines)
- ImplDrawSpin(rRenderContext, false, false);
+ ImplDrawSpin(rRenderContext);
}
// draw buttons
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 4e9a161bf6b6..6ff708118a9e 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1254,7 +1254,7 @@ void Window::CopyDeviceArea( SalTwoRect& aPosAry, bool bWindowInvalidate )
mpGraphics->CopyArea(aPosAry.mnDestX, aPosAry.mnDestY,
aPosAry.mnSrcX, aPosAry.mnSrcY,
aPosAry.mnSrcWidth, aPosAry.mnSrcHeight,
- SAL_COPYAREA_WINDOWINVALIDATE, this);
+ this);
return;
}
@@ -1558,7 +1558,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
pOverlapRegion = new vcl::Region();
ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ),
- *pOverlapRegion, false, true, true );
+ *pOverlapRegion, false, true );
}
mpWindowImpl->mnX = nX;
mpWindowImpl->maPos.X() = nOrgX;
@@ -1576,7 +1576,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
pOverlapRegion = new vcl::Region();
ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) ),
- *pOverlapRegion, false, true, true );
+ *pOverlapRegion, false, true );
}
mpWindowImpl->mnY = nY;
mpWindowImpl->maPos.Y() = nY;
@@ -1688,7 +1688,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
pGraphics->CopyArea( mnOutOffX, mnOutOffY,
nOldOutOffX, nOldOutOffY,
nOldOutWidth, nOldOutHeight,
- SAL_COPYAREA_WINDOWINVALIDATE, this );
+ this );
}
else
bInvalidate = true;
@@ -2580,66 +2580,62 @@ void Window::EnableInput( bool bEnable, bool bChild )
}
}
-void Window::EnableInput( bool bEnable, bool bChild, bool bSysWin,
- const vcl::Window* pExcludeWindow )
+void Window::EnableInput( bool bEnable, const vcl::Window* pExcludeWindow )
{
+ EnableInput( bEnable, true/*bChild*/ );
- EnableInput( bEnable, bChild );
- if ( bSysWin )
+ // pExecuteWindow is the first Overlap-Frame --> if this
+ // shouldn't be the case, than this must be changed in dialog.cxx
+ if( pExcludeWindow )
+ pExcludeWindow = pExcludeWindow->ImplGetFirstOverlapWindow();
+ vcl::Window* pSysWin = mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrameData->mpFirstOverlap;
+ while ( pSysWin )
{
- // pExcuteWindow is the first Overlap-Frame --> if this
- // shouldn't be the case, than this must be changed in dialog.cxx
- if( pExcludeWindow )
- pExcludeWindow = pExcludeWindow->ImplGetFirstOverlapWindow();
- vcl::Window* pSysWin = mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrameData->mpFirstOverlap;
- while ( pSysWin )
+ // Is Window in the path from this window
+ if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pSysWin, true ) )
{
- // Is Window in the path from this window
- if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pSysWin, true ) )
- {
- // Is Window not in the exclude window path or not the
- // exclude window, than change the status
- if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, true ) )
- pSysWin->EnableInput( bEnable, bChild );
- }
- pSysWin = pSysWin->mpWindowImpl->mpNextOverlap;
+ // Is Window not in the exclude window path or not the
+ // exclude window, than change the status
+ if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, true ) )
+ pSysWin->EnableInput( bEnable, true/*bChild*/ );
}
+ pSysWin = pSysWin->mpWindowImpl->mpNextOverlap;
+ }
- // enable/disable floating system windows as well
- vcl::Window* pFrameWin = ImplGetSVData()->maWinData.mpFirstFrame;
- while ( pFrameWin )
+ // enable/disable floating system windows as well
+ vcl::Window* pFrameWin = ImplGetSVData()->maWinData.mpFirstFrame;
+ while ( pFrameWin )
+ {
+ if( pFrameWin->ImplIsFloatingWindow() )
{
- if( pFrameWin->ImplIsFloatingWindow() )
+ // Is Window in the path from this window
+ if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pFrameWin, true ) )
{
- // Is Window in the path from this window
- if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pFrameWin, true ) )
- {
- // Is Window not in the exclude window path or not the
- // exclude window, than change the status
- if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, true ) )
- pFrameWin->EnableInput( bEnable, bChild );
- }
+ // Is Window not in the exclude window path or not the
+ // exclude window, than change the status
+ if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, true ) )
+ pFrameWin->EnableInput( bEnable, true/*bChild*/ );
}
- pFrameWin = pFrameWin->mpWindowImpl->mpFrameData->mpNextFrame;
}
+ pFrameWin = pFrameWin->mpWindowImpl->mpFrameData->mpNextFrame;
+ }
- // the same for ownerdraw floating windows
- if( mpWindowImpl->mbFrame )
+ // the same for ownerdraw floating windows
+ if( mpWindowImpl->mbFrame )
+ {
+ ::std::vector< VclPtr<vcl::Window> >& rList = mpWindowImpl->mpFrameData->maOwnerDrawList;
+ auto p = rList.begin();
+ while( p != rList.end() )
{
- ::std::vector< VclPtr<vcl::Window> >& rList = mpWindowImpl->mpFrameData->maOwnerDrawList;
- auto p = rList.begin();
- while( p != rList.end() )
+ // Is Window in the path from this window
+ if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( (*p), true ) )
{
- // Is Window in the path from this window
- if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( (*p), true ) )
- {
- // Is Window not in the exclude window path or not the
- // exclude window, than change the status
- if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), true ) )
- (*p)->EnableInput( bEnable, bChild );
- }
- ++p;
+ // Is Window not in the exclude window path or not the
+ // exclude window, than change the status
+ if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), true ) )
+ (*p)->EnableInput( bEnable, true/*bChild*/ );
}
+ ++p;
}
}
}
@@ -3185,7 +3181,7 @@ Reference< css::awt::XWindowPeer > Window::GetComponentInterface( bool bCreate )
{
UnoWrapperBase* pWrapper = Application::GetUnoWrapper();
if ( pWrapper )
- mpWindowImpl->mxWindowPeer = pWrapper->GetWindowInterface( this, true );
+ mpWindowImpl->mxWindowPeer = pWrapper->GetWindowInterface( this );
}
return mpWindowImpl->mxWindowPeer;
}
@@ -3320,9 +3316,9 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle&
mpOutDevData->mpRecordLayout = nullptr;
}
-void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly )
+void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder )
{
- DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, nullptr, nullptr );
+ DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, false/*bDrawExtBorderOnly*/, nullptr, nullptr );
}
void Window::DrawSelectionBackground( const Rectangle& rRect,
@@ -3330,7 +3326,6 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
bool bChecked,
bool bDrawBorder,
bool bDrawExtBorderOnly,
- long nCornerRadius,
Color* pSelectionTextColor,
Color* pPaintColor
)
@@ -3338,8 +3333,6 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
if( rRect.IsEmpty() )
return;
- bool bRoundEdges = nCornerRadius > 0;
-
const StyleSettings& rStyles = GetSettings().GetStyleSettings();
// colors used for item highlighting
@@ -3363,14 +3356,6 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
aSelectionBorderCol = aSelectionFillCol;
}
- if( bRoundEdges )
- {
- if( aSelectionBorderCol.IsDark() )
- aSelectionBorderCol.IncreaseLuminance( 128 );
- else
- aSelectionBorderCol.DecreaseLuminance( 128 );
- }
-
Rectangle aRect( rRect );
if( bDrawExtBorderOnly )
{
@@ -3408,7 +3393,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
nPercent = 0;
}
else
- nPercent = bRoundEdges ? 40 : 20; // selected, pressed or checked ( very dark )
+ nPercent = 20; // selected, pressed or checked ( very dark )
}
else if( bChecked || highlight == 1 )
{
@@ -3421,7 +3406,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
nPercent = 0;
}
else
- nPercent = bRoundEdges ? 60 : 35; // selected, pressed or checked ( very dark )
+ nPercent = 35; // selected, pressed or checked ( very dark )
}
else
{
@@ -3466,18 +3451,9 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
}
else
{
- if( bRoundEdges )
- {
- tools::Polygon aPoly( aRect, nCornerRadius, nCornerRadius );
- tools::PolyPolygon aPolyPoly( aPoly );
- DrawTransparent( aPolyPoly, nPercent );
- }
- else
- {
- tools::Polygon aPoly( aRect );
- tools::PolyPolygon aPolyPoly( aPoly );
- DrawTransparent( aPolyPoly, nPercent );
- }
+ tools::Polygon aPoly( aRect );
+ tools::PolyPolygon aPolyPoly( aPoly );
+ DrawTransparent( aPolyPoly, nPercent );
}
SetFillColor( oldFillCol );
@@ -3629,9 +3605,7 @@ bool Window::IsNativeWidgetEnabled() const
return ImplGetWinData()->mbEnableNativeWidget;
}
-Reference< css::rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSize,
- bool bFullscreen,
- bool bSpriteCanvas ) const
+Reference< css::rendering::XCanvas > Window::ImplGetCanvas( bool bSpriteCanvas ) const
{
// try to retrieve hard reference from weak member
Reference< css::rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas );
@@ -3664,13 +3638,7 @@ Reference< css::rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscr
aArg[ 5 ] = GetSystemGfxDataAny();
}
- if( bFullscreen )
- aArg[ 2 ] = makeAny( css::awt::Rectangle( 0, 0,
- rFullscreenSize.Width(),
- rFullscreenSize.Height() ) );
- else
- aArg[ 2 ] = makeAny( css::awt::Rectangle( mnOutOffX, mnOutOffY, mnOutWidth, mnOutHeight ) );
-
+ aArg[ 2 ] = makeAny( css::awt::Rectangle( mnOutOffX, mnOutOffY, mnOutWidth, mnOutHeight ) );
aArg[ 3 ] = makeAny( mpWindowImpl->mbAlwaysOnTop );
aArg[ 4 ] = makeAny( Reference< css::awt::XWindow >(
const_cast<vcl::Window*>(this)->GetComponentInterface(),
@@ -3727,13 +3695,13 @@ Reference< css::rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscr
Reference< css::rendering::XCanvas > Window::GetCanvas() const
{
- return ImplGetCanvas( Size(), false, false );
+ return ImplGetCanvas( false );
}
Reference< css::rendering::XSpriteCanvas > Window::GetSpriteCanvas() const
{
Reference< css::rendering::XSpriteCanvas > xSpriteCanvas(
- ImplGetCanvas( Size(), false, true ), UNO_QUERY );
+ ImplGetCanvas( true ), UNO_QUERY );
return xSpriteCanvas;
}
diff --git a/vcl/unx/generic/app/gensys.cxx b/vcl/unx/generic/app/gensys.cxx
index f58328d60898..c5ab3db09b88 100644
--- a/vcl/unx/generic/app/gensys.cxx
+++ b/vcl/unx/generic/app/gensys.cxx
@@ -90,9 +90,7 @@ SalGenericSystem::~SalGenericSystem()
{
}
-int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUString& rMessage,
- int nButtonCombination, int nDefaultButton,
- bool bUseResources )
+int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUString& rMessage )
{
int nDefButton = 0;
std::list< OUString > aButtons;
@@ -100,51 +98,8 @@ int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUStri
ImplHideSplash();
- if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK ||
- nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL )
- {
- aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::OK, bUseResources ) );
- nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK;
- }
- if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL ||
- nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO )
- {
- aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::Yes, bUseResources ) );
- nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES;
- aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::No, bUseResources ) );
- nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO;
- if( nDefaultButton == SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO )
- nDefButton = 1;
- }
- if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL ||
- nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL ||
- nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL )
- {
- if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL )
- {
- aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::Retry, bUseResources ) );
- nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY;
- }
- aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::Cancel, bUseResources ) );
- nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL;
- if( nDefaultButton == SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL )
- nDefButton = aButtons.size()-1;
- }
- if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE )
- {
- aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::Abort, bUseResources ) );
- nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT;
- aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::Retry, bUseResources ) );
- nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY;
- aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::Ignore, bUseResources ) );
- nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE;
- switch( nDefaultButton )
- {
- case SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY: nDefButton = 1;break;
- case SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE: nDefButton = 2;break;
- }
- }
-
+ aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::OK, false/*bUseResources*/ ) );
+ nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK;
int nResult = ShowNativeDialog( rTitle, rMessage, aButtons, nDefButton );
return nResult != -1 ? nButtonIds[ nResult ] : 0;
diff --git a/vcl/win/app/salinfo.cxx b/vcl/win/app/salinfo.cxx
index 2e2e22144a02..ae80798cf6c2 100644
--- a/vcl/win/app/salinfo.cxx
+++ b/vcl/win/app/salinfo.cxx
@@ -169,36 +169,9 @@ Rectangle WinSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
return (nScreen < m_aMonitors.size()) ? m_aMonitors[nScreen].m_aArea : Rectangle();
}
-/* We have to map the button identifier to the identifier used by the Win32
- Platform SDK to specify the default button for the MessageBox API.
- The first dimension is the button combination, the second dimension
- is the button identifier.
-*/
-static const int DEFAULT_BTN_MAPPING_TABLE[][8] =
+int WinSalSystem::ShowNativeMessageBox(const OUString& rTitle, const OUString& rMessage)
{
- // Undefined OK CANCEL ABORT RETRY IGNORE YES NO
- { MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1 }, //OK
- { MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1 }, //OK_CANCEL
- { MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3, MB_DEFBUTTON1, MB_DEFBUTTON1 }, //ABORT_RETRY_IGNO
- { MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON3, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON2 }, //YES_NO_CANCEL
- { MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON2 }, //YES_NO
- { MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1 } //RETRY_CANCEL
-};
-
-int WinSalSystem::ShowNativeMessageBox(const OUString& rTitle, const OUString& rMessage, int nButtonCombination, int nDefaultButton, SAL_UNUSED_PARAMETER bool)
-{
- DBG_ASSERT( nButtonCombination >= SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK &&
- nButtonCombination <= SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL &&
- nDefaultButton >= SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK &&
- nDefaultButton <= SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO, "Invalid arguments!" );
-
- int nFlags = MB_TASKMODAL | MB_SETFOREGROUND | MB_ICONWARNING | nButtonCombination;
-
- if (nButtonCombination >= SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK &&
- nButtonCombination <= SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL &&
- nDefaultButton >= SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK &&
- nDefaultButton <= SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO)
- nFlags |= DEFAULT_BTN_MAPPING_TABLE[nButtonCombination][nDefaultButton];
+ int nFlags = MB_TASKMODAL | MB_SETFOREGROUND | MB_ICONWARNING | MB_DEFBUTTON1;
ImplHideSplash();
return MessageBoxW(
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 617cbe20df4b..63b96caf63f1 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -5682,7 +5682,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
ImplHideSplash();
if( pWin )
{
- pWin->EnableInput( FALSE, TRUE, TRUE, NULL );
+ pWin->EnableInput( FALSE, nullptr );
pWin->ImplIncModalCount(); // #106303# support frame based modal count
}
}
@@ -5691,7 +5691,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
ImplGetSVData()->maAppData.mnModalMode--;
if( pWin )
{
- pWin->EnableInput( TRUE, TRUE, TRUE, NULL );
+ pWin->EnableInput( TRUE, nullptr );
pWin->ImplDecModalCount(); // #106303# support frame based modal count
}
}