summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compilerplugins/clang/constantparam.cxx115
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.cxx2
-rw-r--r--cui/source/dialogs/SpellDialog.cxx8
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx2
-rw-r--r--filter/source/flash/swfwriter1.cxx2
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx2
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx2
-rw-r--r--filter/source/pdf/pdfexport.cxx3
-rw-r--r--include/vcl/animate.hxx4
-rw-r--r--include/vcl/button.hxx4
-rw-r--r--include/vcl/decoview.hxx2
-rw-r--r--include/vcl/event.hxx3
-rw-r--r--include/vcl/gfxlink.hxx2
-rw-r--r--include/vcl/graph.hxx5
-rw-r--r--include/vcl/implimagetree.hxx2
-rw-r--r--include/vcl/layout.hxx8
-rw-r--r--include/vcl/lstbox.hxx2
-rw-r--r--include/vcl/menu.hxx2
-rw-r--r--include/vcl/metaact.hxx2
-rw-r--r--include/vcl/outdev.hxx6
-rw-r--r--include/vcl/pdfextoutdevdata.hxx5
-rw-r--r--include/vcl/pdfwriter.hxx4
-rw-r--r--include/vcl/print.hxx7
-rw-r--r--include/vcl/salbtype.hxx5
-rw-r--r--include/vcl/salnativewidgets.hxx22
-rw-r--r--include/vcl/splitwin.hxx6
-rw-r--r--include/vcl/status.hxx8
-rw-r--r--include/vcl/tabctrl.hxx2
-rw-r--r--include/vcl/texteng.hxx2
-rw-r--r--include/vcl/textview.hxx2
-rw-r--r--include/vcl/throbber.hxx2
-rw-r--r--include/vcl/toolbox.hxx4
-rw-r--r--include/vcl/unowrap.hxx2
-rw-r--r--include/vcl/window.hxx15
-rw-r--r--sc/source/ui/view/hdrcont.cxx2
-rw-r--r--sd/source/ui/animations/CategoryListBox.cxx2
-rw-r--r--svtools/source/brwbox/datwin.cxx2
-rw-r--r--svtools/source/contnr/imivctl1.cxx2
-rw-r--r--svtools/source/control/ctrlbox.cxx6
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx4
-rw-r--r--toolkit/inc/helper/unowrapper.hxx2
-rw-r--r--toolkit/source/helper/unowrapper.cxx4
-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
96 files changed, 494 insertions, 909 deletions
diff --git a/compilerplugins/clang/constantparam.cxx b/compilerplugins/clang/constantparam.cxx
index 3385265a877a..570cb96ca9f5 100644
--- a/compilerplugins/clang/constantparam.cxx
+++ b/compilerplugins/clang/constantparam.cxx
@@ -32,6 +32,7 @@ struct MyCallSiteInfo
std::string returnType;
std::string nameAndParams;
std::string paramName;
+ int paramIndex; // because in some declarations the names are empty
std::string callValue;
std::string sourceLocation;
};
@@ -41,6 +42,10 @@ bool operator < (const MyCallSiteInfo &lhs, const MyCallSiteInfo &rhs)
return true;
else if (lhs.sourceLocation > rhs.sourceLocation)
return false;
+ else if (lhs.paramIndex < rhs.paramIndex)
+ return true;
+ else if (lhs.paramIndex > rhs.paramIndex)
+ return false;
else return lhs.callValue < rhs.callValue;
}
@@ -59,7 +64,21 @@ public:
// there is a crash here that I can't seem to workaround
// clang-3.8: /home/noel/clang/src/tools/clang/lib/AST/Type.cpp:1878: bool clang::Type::isConstantSizeType() const: Assertion `!isDependentType() && "This doesn't make sense for dependent types"' failed.
FileID mainFileID = compiler.getSourceManager().getMainFileID();
- if (strstr(compiler.getSourceManager().getFileEntryForID(mainFileID)->getDir()->getName(), "oox/source/dump") != 0) {
+ static const char* prefix = SRCDIR "/oox/source";
+ const FileEntry * fe = compiler.getSourceManager().getFileEntryForID(mainFileID);
+ if (strncmp(prefix, fe->getDir()->getName(), strlen(prefix)) == 0) {
+ return;
+ }
+ if (strcmp(fe->getDir()->getName(), SRCDIR "/sw/source/filter/ww8") == 0)
+ {
+ return;
+ }
+ if (strcmp(fe->getDir()->getName(), SRCDIR "/sc/source/filter/oox") == 0)
+ {
+ return;
+ }
+ if (strcmp(fe->getDir()->getName(), SRCDIR "/sd/source/filter/eppt") == 0)
+ {
return;
}
@@ -79,14 +98,17 @@ public:
}
bool shouldVisitTemplateInstantiations () const { return true; }
+ bool shouldVisitImplicitCode () const { return true; }
- bool VisitCallExpr(CallExpr * callExpr);
- bool VisitDeclRefExpr( const DeclRefExpr* declRefExpr );
+ bool VisitCallExpr( const CallExpr* );
+ bool VisitDeclRefExpr( const DeclRefExpr* );
+ bool VisitCXXConstructExpr( const CXXConstructExpr* );
private:
- MyCallSiteInfo niceName(const FunctionDecl* functionDecl, const ParmVarDecl* parmVarDecl, const std::string& callValue);
+ MyCallSiteInfo niceName(const FunctionDecl* functionDecl, int paramIndex, const ParmVarDecl* parmVarDecl, const std::string& callValue);
+ std::string getCallValue(const Expr* arg);
};
-MyCallSiteInfo ConstantParam::niceName(const FunctionDecl* functionDecl, const ParmVarDecl* parmVarDecl, const std::string& callValue)
+MyCallSiteInfo ConstantParam::niceName(const FunctionDecl* functionDecl, int paramIndex, const ParmVarDecl* parmVarDecl, const std::string& callValue)
{
if (functionDecl->getInstantiatedFromMemberFunction())
functionDecl = functionDecl->getInstantiatedFromMemberFunction();
@@ -120,6 +142,7 @@ MyCallSiteInfo ConstantParam::niceName(const FunctionDecl* functionDecl, const P
aInfo.nameAndParams += " const";
}
aInfo.paramName = parmVarDecl->getName();
+ aInfo.paramIndex = paramIndex;
aInfo.callValue = callValue;
SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( functionDecl->getLocation() );
@@ -129,7 +152,22 @@ MyCallSiteInfo ConstantParam::niceName(const FunctionDecl* functionDecl, const P
return aInfo;
}
-bool ConstantParam::VisitCallExpr(CallExpr * callExpr) {
+std::string ConstantParam::getCallValue(const Expr* arg)
+{
+ arg = arg->IgnoreParenCasts();
+ // ignore this, it seems to trigger an infinite recursion
+ if (isa<UnaryExprOrTypeTraitExpr>(arg)) {
+ return "unknown";
+ }
+ APSInt x1;
+ if (arg->EvaluateAsInt(x1, compiler.getASTContext()))
+ {
+ return x1.toString(10);
+ }
+ return "unknown";
+}
+
+bool ConstantParam::VisitCallExpr(const CallExpr * callExpr) {
if (ignoreLocation(callExpr)) {
return true;
}
@@ -175,29 +213,11 @@ bool ConstantParam::VisitCallExpr(CallExpr * callExpr) {
for (unsigned i = 0; i < callExpr->getNumArgs(); ++i) {
if (i >= functionDecl->getNumParams()) // can happen in template code
break;
- Expr* arg = callExpr->getArg(i);
- bool found = false;
- std::string callValue;
- // ignore this, it seems to trigger an infinite recursion
- if (isa<UnaryExprOrTypeTraitExpr>(arg->IgnoreParenCasts())) {
- found = true;
- callValue = "unknown";
- }
- if (!found)
- {
- APSInt x1;
- if (arg->EvaluateAsInt(x1, compiler.getASTContext()))
- {
- found = true;
- callValue = x1.toString(10);
- }
- }
- if (!found)
- callValue = "unknown";
+ const Expr* arg = callExpr->getArg(i);
+ std::string callValue = getCallValue(arg);
const ParmVarDecl* parmVarDecl = functionDecl->getParamDecl(i);
- MyCallSiteInfo funcInfo = niceName(functionDecl, parmVarDecl, callValue);
+ MyCallSiteInfo funcInfo = niceName(functionDecl, i, parmVarDecl, callValue);
callSet.insert(funcInfo);
- break;
}
return true;
}
@@ -205,16 +225,47 @@ bool ConstantParam::VisitCallExpr(CallExpr * callExpr) {
// this catches places that take the address of a method
bool ConstantParam::VisitDeclRefExpr( const DeclRefExpr* declRefExpr )
{
- const Decl* functionDecl = declRefExpr->getDecl();
- if (!isa<FunctionDecl>(functionDecl)) {
+ const Decl* decl = declRefExpr->getDecl();
+ if (!isa<FunctionDecl>(decl)) {
return true;
}
-// TODO
-// MyCallSiteInfo funcInfo = niceName(dyn_cast<FunctionDecl>(functionDecl));
-// callSet.insert(funcInfo);
+ const FunctionDecl* functionDecl = dyn_cast<FunctionDecl>(decl);
+ for (unsigned i = 0; i < functionDecl->getNumParams(); ++i)
+ {
+ MyCallSiteInfo funcInfo = niceName(functionDecl, i, functionDecl->getParamDecl(i), "unknown");
+ callSet.insert(funcInfo);
+ }
+ return true;
+}
+
+bool ConstantParam::VisitCXXConstructExpr( const CXXConstructExpr* constructExpr )
+{
+ const CXXConstructorDecl* constructorDecl = constructExpr->getConstructor();
+ constructorDecl = constructorDecl->getCanonicalDecl();
+
+ // ignore stuff that forms part of the stable URE interface
+ if (isInUnoIncludeFile(compiler.getSourceManager().getSpellingLoc(
+ constructorDecl->getNameInfo().getLoc()))) {
+ return true;
+ }
+ if (constructorDecl->getNameInfo().getLoc().isValid() && ignoreLocation(constructorDecl)) {
+ return true;
+ }
+
+ for (unsigned i = 0; i < constructExpr->getNumArgs(); ++i)
+ {
+ if (i >= constructorDecl->getNumParams()) // can happen in template code
+ break;
+ const Expr* arg = constructExpr->getArg(i);
+ std::string callValue = getCallValue(arg);
+ const ParmVarDecl* parmVarDecl = constructorDecl->getParamDecl(i);
+ MyCallSiteInfo funcInfo = niceName(constructorDecl, i, parmVarDecl, callValue);
+ callSet.insert(funcInfo);
+ }
return true;
}
+
loplugin::Plugin::Registration< ConstantParam > X("constantparam", false);
}
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index bc15b42328bc..b29e7def6f83 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -1934,7 +1934,7 @@ namespace cppcanvas
static_cast<sal_uInt16>(nStartPos),
static_cast<sal_uInt16>(nStartPos),
static_cast<sal_uInt16>(nLen),
- true, 0, pDXArray ) );
+ 0, pDXArray ) );
rVDev.SetFont(aOrigFont);
if( !bHaveOutlines )
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index a114d4ab4de4..0a5815f6135d 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1675,8 +1675,8 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError, css::uno:
void SentenceEditWindow_Impl::MoveErrorMarkTo(sal_uInt16 nStart, sal_uInt16 nEnd, bool bGrammarError)
{
TextEngine* pTextEngine = GetTextEngine();
- pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTCOLOR, true );
- pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTWEIGHT, true );
+ pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTCOLOR );
+ pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTWEIGHT );
pTextEngine->SetAttrib( TextAttribFontWeight(WEIGHT_BOLD), 0, nStart, nEnd );
pTextEngine->SetAttrib( TextAttribFontColor(bGrammarError ? COL_LIGHTBLUE : COL_LIGHTRED), 0, nStart, nEnd );
m_nErrorStart = nStart;
@@ -2045,8 +2045,8 @@ void SentenceEditWindow_Impl::SetUndoEditMode(bool bSet)
//remove error marks
TextEngine* pTextEngine = GetTextEngine();
- pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTCOLOR, true );
- pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTWEIGHT, true );
+ pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTCOLOR );
+ pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTWEIGHT );
//put the appropriate action on the Undo-stack
SpellUndoAction_Impl* pAction = new SpellUndoAction_Impl(
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 4f0cea071c4d..58aa725e4754 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -504,7 +504,7 @@ Graphic GraphicFilterPoster::GetFilteredGraphic( const Graphic& rGraphic, double
{
Animation aAnim( rGraphic.GetAnimation() );
- if( aAnim.ReduceColors( nPosterCount, BMP_REDUCE_POPULAR ) )
+ if( aAnim.ReduceColors( nPosterCount ) )
aRet = aAnim;
}
else
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 48ff5612dd5b..2379fe71f861 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -498,7 +498,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
{
// todo: optimize me as this will generate a huge amount of duplicate polygons
tools::PolyPolygon aPolyPoygon;
- mpVDev->GetTextOutline( aPolyPoygon, rText, 0, 0, (sal_uInt16)nLen, true, nWidth, pDXArray );
+ mpVDev->GetTextOutline( aPolyPoygon, rText, (sal_uInt16)nLen, nWidth, pDXArray );
aPolyPoygon.Translate( rPos );
Impl_writePolyPolygon( aPolyPoygon, true, aTextColor, aTextColor );
}
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index ab24328b7742..57859e55e830 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -2042,7 +2042,7 @@ void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const lo
bool bOldLineColor = bLineColor;
bLineColor = false;
std::vector<tools::PolyPolygon> aPolyPolyVec;
- if ( pVirDev->GetTextOutlines( aPolyPolyVec, rUniString, 0, 0, -1, true, nWidth, pDXArry ) )
+ if ( pVirDev->GetTextOutlines( aPolyPolyVec, rUniString, 0, 0, -1, nWidth, pDXArry ) )
{
// always adjust text position to match baseline alignment
ImplWriteLine( "pum" );
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 72d93e704481..08b6795c2b2e 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -729,7 +729,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
aGraphic);
}
- GfxLink aGfxLink( pBuf.get(), nPSSize, GFX_LINK_TYPE_EPS_BUFFER, true ) ;
+ GfxLink aGfxLink( pBuf.get(), nPSSize, GFX_LINK_TYPE_EPS_BUFFER ) ;
pBuf.release();
aMtf.AddAction( static_cast<MetaAction*>( new MetaEPSAction( Point(), Size( nWidth, nHeight ),
aGfxLink, aGraphic.GetGDIMetaFile() ) ) );
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 000bcb3deed4..5bd3f8ffa66d 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -797,8 +797,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
// get mimetype
OUString aSrcMimetype = getMimetypeForDocument( mxContext, mxSrcDoc );
pPDFWriter->AddStream( aSrcMimetype,
- new PDFExportStreamDoc( mxSrcDoc, aPreparedPermissionPassword ),
- false
+ new PDFExportStreamDoc( mxSrcDoc, aPreparedPermissionPassword )
);
}
diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx
index 9b3856aec6e8..bedb8364b1b7 100644
--- a/include/vcl/animate.hxx
+++ b/include/vcl/animate.hxx
@@ -149,9 +149,7 @@ public:
public:
bool Convert( BmpConversion eConversion );
- bool ReduceColors(
- sal_uInt16 nNewColorCount,
- BmpReduce eReduce = BMP_REDUCE_SIMPLE );
+ bool ReduceColors( sal_uInt16 nNewColorCount );
bool Invert();
bool Mirror( BmpMirrorFlags nMirrorFlags );
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index bf19a6a9e953..e6eb44625805 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -126,7 +126,7 @@ protected:
SAL_DLLPRIVATE WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle );
SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
SAL_DLLPRIVATE void ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFlags,
- const Rectangle& rRect, bool bLayout, bool bMenuBtnSep);
+ const Rectangle& rRect, bool bMenuBtnSep);
SAL_DLLPRIVATE void ImplDrawPushButton(vcl::RenderContext& rRenderContext);
using Button::ImplGetTextStyle;
SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( DrawFlags nDrawFlags ) const;
@@ -419,7 +419,7 @@ private:
SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
const Point& rPos, const Size& rSize,
const Size& rImageSize, Rectangle& rStateRect,
- Rectangle& rMouseRect, bool bLayout );
+ Rectangle& rMouseRect );
SAL_DLLPRIVATE void ImplDrawCheckBox(vcl::RenderContext& rRenderContext );
SAL_DLLPRIVATE long ImplGetImageToTextDistance() const;
SAL_DLLPRIVATE Size ImplGetCheckImageSize() const;
diff --git a/include/vcl/decoview.hxx b/include/vcl/decoview.hxx
index 1b11d91f753f..ac640ef35e0d 100644
--- a/include/vcl/decoview.hxx
+++ b/include/vcl/decoview.hxx
@@ -111,7 +111,7 @@ public:
const Color& rLeftTopColor,
const Color& rRightBottomColor );
void DrawHighlightFrame( const Rectangle& rRect,
- DrawHighlightFrameStyle nStyle = DrawHighlightFrameStyle::Out, bool bTestBackground = false );
+ DrawHighlightFrameStyle nStyle = DrawHighlightFrameStyle::Out );
Rectangle DrawFrame( const Rectangle& rRect, DrawFrameStyle nStyle = DrawFrameStyle::Out, DrawFrameFlags nFlags = DrawFrameFlags::NONE );
Rectangle DrawButton( const Rectangle& rRect, DrawButtonFlags nStyle );
void DrawSeparator( const Point& rStart, const Point& rStop, bool bVertical = true );
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index da551edfeb66..562ab4c46950 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -396,8 +396,7 @@ private:
public:
NotifyEvent( MouseNotifyEvent nEventType,
vcl::Window* pWindow,
- const void* pEvent = nullptr,
- long nRet = 0 );
+ const void* pEvent = nullptr );
MouseNotifyEvent GetType() const { return mnEventType; }
vcl::Window* GetWindow() const { return mpWindow; }
diff --git a/include/vcl/gfxlink.hxx b/include/vcl/gfxlink.hxx
index 3e1c8cbf9f17..9be44e989ab3 100644
--- a/include/vcl/gfxlink.hxx
+++ b/include/vcl/gfxlink.hxx
@@ -125,7 +125,7 @@ public:
GfxLink();
GfxLink( const GfxLink& );
GfxLink( const OUString& rPath, GfxLinkType nType );
- GfxLink( sal_uInt8* pBuf, sal_uInt32 nBufSize, GfxLinkType nType, bool bOwns );
+ GfxLink( sal_uInt8* pBuf, sal_uInt32 nBufSize, GfxLinkType nType );
~GfxLink();
GfxLink& operator=( const GfxLink& );
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 0c10149c30a8..6f71d24924f9 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -89,13 +89,12 @@ public:
const Size& rSizePixel = Size(),
bool bUnlimitedSize = false,
bool bAntiAliase = false,
- bool bSnapHorVerLines = false,
- bool bScaleHighQuality = false)
+ bool bSnapHorVerLines = false)
: maSizePixel(rSizePixel),
mbUnlimitedSize(bUnlimitedSize),
mbAntiAliase(bAntiAliase),
mbSnapHorVerLines(bSnapHorVerLines),
- mbScaleHighQuality(bScaleHighQuality)
+ mbScaleHighQuality(false)
{
}
diff --git a/include/vcl/implimagetree.hxx b/include/vcl/implimagetree.hxx
index f0e1b576b3dd..154b56ac7007 100644
--- a/include/vcl/implimagetree.hxx
+++ b/include/vcl/implimagetree.hxx
@@ -45,7 +45,7 @@ public:
bool loadImage(
OUString const & name, OUString const & style,
- BitmapEx & bitmap, bool localized = false, bool loadMissing = false );
+ BitmapEx & bitmap, bool localized = false );
bool loadDefaultImage(
OUString const & style,
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 6bdef038d016..a968040b9c29 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -226,8 +226,8 @@ private:
class VCL_DLLPUBLIC VclVButtonBox : public VclButtonBox
{
public:
- VclVButtonBox(vcl::Window *pParent, int nSpacing = 0)
- : VclButtonBox(pParent, nSpacing)
+ VclVButtonBox(vcl::Window *pParent)
+ : VclButtonBox(pParent, 0)
{
m_bVerticalContainer = true;
}
@@ -265,8 +265,8 @@ protected:
class VCL_DLLPUBLIC VclHButtonBox : public VclButtonBox
{
public:
- VclHButtonBox(vcl::Window *pParent, int nSpacing = 0)
- : VclButtonBox(pParent, nSpacing)
+ VclHButtonBox(vcl::Window *pParent)
+ : VclButtonBox(pParent, 0)
{
m_bVerticalContainer = false;
}
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 5a5bc4dadd2c..09067d26b712 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -226,7 +226,7 @@ public:
void EnableUserDraw( bool bUserDraw );
- void DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos = false );
+ void DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawTextAtImagePos );
void SetSelectHdl( const Link<ListBox&,void>& rLink ) { maSelectHdl = rLink; }
const Link<ListBox&,void>& GetSelectHdl() const { return maSelectHdl; }
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 73e5c4dae4d8..277819960347 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -422,7 +422,7 @@ class VCL_DLLPUBLIC MenuBar : public Menu
SAL_DLLPRIVATE static vcl::Window* ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, MenuBar* pMenu);
SAL_DLLPRIVATE static void ImplDestroy(MenuBar* pMenu, bool bDelete);
- SAL_DLLPRIVATE bool ImplHandleKeyEvent(const KeyEvent& rKEvent, bool bFromMenu = true);
+ SAL_DLLPRIVATE bool ImplHandleKeyEvent(const KeyEvent& rKEvent);
SAL_DLLPRIVATE bool ImplHandleCmdEvent(const CommandEvent& rCEvent);
protected:
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 044cb5072ede..9f3457c370ed 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1439,7 +1439,7 @@ protected:
virtual ~MetaCommentAction();
public:
- explicit MetaCommentAction( sal_Int32 nValue = 0L );
+ explicit MetaCommentAction();
explicit MetaCommentAction( const MetaCommentAction& rAct );
explicit MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0L, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0UL );
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index fc0f765e2e26..f31eab287d17 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1112,13 +1112,13 @@ public:
Rectangle ImplGetTextBoundRect( const SalLayout& );
bool GetTextOutline( tools::PolyPolygon&,
- const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
- sal_Int32 nLen = -1, bool bOptimize = true,
+ const OUString& rStr,
+ sal_Int32 nLen = -1,
sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
bool GetTextOutlines( PolyPolyVector&,
const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
- sal_Int32 nLen = -1, bool bOptimize = true,
+ sal_Int32 nLen = -1,
sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
bool GetTextOutlines( basegfx::B2DPolyPolygonVector &rVector,
diff --git a/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx
index 6fcb45eed90c..9ba411e5acde 100644
--- a/include/vcl/pdfextoutdevdata.hxx
+++ b/include/vcl/pdfextoutdevdata.hxx
@@ -207,14 +207,11 @@ public:
number of page the dest is on (as returned by NewPage)
or -1 in which case the current page is used
- @param eType
- what dest type to use
-
@returns
the destination id (to be used in SetLinkDest) or
-1 if page id does not exist
*/
- sal_Int32 CreateNamedDest( const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr = -1, PDFWriter::DestAreaType eType = PDFWriter::XYZ );
+ sal_Int32 CreateNamedDest( const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr = -1 );
/** registers a destination for which a destinatin ID needs to be known immediately, instead of later on setting it via
SetLinkDest.
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 6f859bdf095c..8a95b6a4707e 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -1256,10 +1256,8 @@ The following structure describes the permissions used in PDF security
@param pStream
the interface to the additional stream
- @param bCompress
- specifies whether the stream should be flat encoded by PDFWriter or not
*/
- void AddStream( const OUString& rMimeType, PDFOutputStream* pStream, bool bCompress );
+ void AddStream( const OUString& rMimeType, PDFOutputStream* pStream );
};
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 7664bc47c237..55784a37d380 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -636,14 +636,13 @@ public:
UIControlOptions( const OUString& i_rDependsOnName = OUString(),
sal_Int32 i_nDependsOnEntry = -1, bool i_bAttachToDependency = false,
- const OUString& i_rGroupHint = OUString(), bool i_bInternalOnly = false,
- bool i_bEnabled = true)
+ const OUString& i_rGroupHint = OUString())
: maDependsOnName( i_rDependsOnName )
, mnDependsOnEntry( i_nDependsOnEntry )
, mbAttachToDependency( i_bAttachToDependency )
, maGroupHint( i_rGroupHint )
- , mbInternalOnly( i_bInternalOnly )
- , mbEnabled( i_bEnabled ) {}
+ , mbInternalOnly( false )
+ , mbEnabled( true ) {}
};
// note: in the following helper functions HelpIds are expected as an OUString
diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx
index 9476c031a27f..36da41db3593 100644
--- a/include/vcl/salbtype.hxx
+++ b/include/vcl/salbtype.hxx
@@ -226,12 +226,11 @@ public:
ColorMask(const ColorMaskElement& rRedMask = ColorMaskElement(),
const ColorMaskElement& rGreenMask = ColorMaskElement(),
- const ColorMaskElement& rBlueMask = ColorMaskElement(),
- sal_uInt32 nAlphaChannel = 0)
+ const ColorMaskElement& rBlueMask = ColorMaskElement())
: maR(rRedMask)
, maG(rGreenMask)
, maB(rBlueMask)
- , mnAlphaChannel(nAlphaChannel)
+ , mnAlphaChannel(0)
{
}
diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index 0b60312df0e2..8dc05a223ec0 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -333,9 +333,9 @@ class VCL_DLLPUBLIC ImplControlValue
ButtonValue mTristate; // Tristate value: on, off, mixed
long mNumber; // numeric value
protected:
- ImplControlValue( ControlType i_eType, ButtonValue i_eTriState, long i_nNumber )
+ ImplControlValue( ControlType i_eType, long i_nNumber )
: mType( i_eType )
- , mTristate( i_eTriState )
+ , mTristate( BUTTONVALUE_DONTKNOW )
, mNumber( i_nNumber )
{}
@@ -381,7 +381,7 @@ class VCL_DLLPUBLIC ScrollbarValue : public ImplControlValue
ControlState mnPage2State;
inline ScrollbarValue()
- : ImplControlValue( CTRL_SCROLLBAR, BUTTONVALUE_DONTKNOW, 0 )
+ : ImplControlValue( CTRL_SCROLLBAR, 0 )
{
mnMin = 0; mnMax = 0; mnCur = 0; mnVisibleSize = 0;
mnButton1State = ControlState::NONE; mnButton2State = ControlState::NONE;
@@ -401,7 +401,7 @@ class VCL_DLLPUBLIC SliderValue : public ImplControlValue
ControlState mnThumbState;
SliderValue()
- : ImplControlValue( CTRL_SLIDER, BUTTONVALUE_DONTKNOW, 0 )
+ : ImplControlValue( CTRL_SLIDER, 0 )
, mnMin( 0 ), mnMax( 0 ), mnCur( 0 ), mnThumbState( ControlState::NONE )
{}
virtual ~SliderValue();
@@ -434,7 +434,7 @@ class VCL_DLLPUBLIC TabitemValue : public ImplControlValue
Rectangle maContentRect;
TabitemValue(const Rectangle &rContentRect)
- : ImplControlValue( CTRL_TAB_ITEM, BUTTONVALUE_DONTKNOW, 0 )
+ : ImplControlValue( CTRL_TAB_ITEM, 0 )
, mnAlignment(TabitemFlags::NONE)
, maContentRect(rContentRect)
{
@@ -468,7 +468,7 @@ class VCL_DLLPUBLIC SpinbuttonValue : public ImplControlValue
int mnLowerPart;
SpinbuttonValue()
- : ImplControlValue( CTRL_SPINBUTTONS, BUTTONVALUE_DONTKNOW, 0 )
+ : ImplControlValue( CTRL_SPINBUTTONS, 0 )
, mnUpperState(ControlState::NONE)
, mnLowerState(ControlState::NONE)
, mnUpperPart(0)
@@ -487,7 +487,7 @@ class VCL_DLLPUBLIC SpinbuttonValue : public ImplControlValue
class VCL_DLLPUBLIC ToolbarValue : public ImplControlValue
{
public:
- ToolbarValue() : ImplControlValue( CTRL_TOOLBAR, BUTTONVALUE_DONTKNOW, 0 )
+ ToolbarValue() : ImplControlValue( CTRL_TOOLBAR, 0 )
{ mbIsTopDockingArea = false; }
virtual ~ToolbarValue();
virtual ToolbarValue* clone() const override;
@@ -503,7 +503,7 @@ public:
class VCL_DLLPUBLIC MenubarValue : public ImplControlValue
{
public:
- MenubarValue() : ImplControlValue( CTRL_MENUBAR, BUTTONVALUE_DONTKNOW, 0 )
+ MenubarValue() : ImplControlValue( CTRL_MENUBAR, 0 )
{ maTopDockingAreaHeight=0; }
virtual ~MenubarValue();
virtual MenubarValue* clone() const override;
@@ -518,10 +518,10 @@ public:
class VCL_DLLPUBLIC MenupopupValue : public ImplControlValue
{
public:
- MenupopupValue() : ImplControlValue( CTRL_MENU_POPUP, BUTTONVALUE_DONTKNOW, 0 )
+ MenupopupValue() : ImplControlValue( CTRL_MENU_POPUP, 0 )
{}
MenupopupValue( long i_nGutterWidth, const Rectangle& i_rItemRect )
- : ImplControlValue( CTRL_MENU_POPUP, BUTTONVALUE_DONTKNOW, i_nGutterWidth )
+ : ImplControlValue( CTRL_MENU_POPUP, i_nGutterWidth )
, maItemRect( i_rItemRect )
{}
virtual ~MenupopupValue();
@@ -537,7 +537,7 @@ class VCL_DLLPUBLIC PushButtonValue : public ImplControlValue
{
public:
PushButtonValue()
- : ImplControlValue( CTRL_PUSHBUTTON, BUTTONVALUE_DONTKNOW, 0 )
+ : ImplControlValue( CTRL_PUSHBUTTON, 0 )
, mbBevelButton( false ), mbSingleLine( true ) {}
virtual ~PushButtonValue();
virtual PushButtonValue* clone() const override;
diff --git a/include/vcl/splitwin.hxx b/include/vcl/splitwin.hxx
index 5bb540b86c9d..fc9b23e4adce 100644
--- a/include/vcl/splitwin.hxx
+++ b/include/vcl/splitwin.hxx
@@ -99,9 +99,9 @@ private:
SAL_DLLPRIVATE void ImplGetFadeInRect( Rectangle& rRect, bool bTest = false ) const;
SAL_DLLPRIVATE void ImplGetFadeOutRect( Rectangle& rRect, bool bTest = false ) const;
SAL_DLLPRIVATE void ImplDrawButtonRect(vcl::RenderContext& rRenderContext, const Rectangle& rRect, long nSize);
- SAL_DLLPRIVATE void ImplDrawAutoHide(vcl::RenderContext& rRenderContext, bool bInPaint);
- SAL_DLLPRIVATE void ImplDrawFadeIn(vcl::RenderContext& rRenderContext, bool bInPaint);
- SAL_DLLPRIVATE void ImplDrawFadeOut(vcl::RenderContext& rRenderContext, bool bInPaint);
+ SAL_DLLPRIVATE void ImplDrawAutoHide(vcl::RenderContext& rRenderContext);
+ SAL_DLLPRIVATE void ImplDrawFadeIn(vcl::RenderContext& rRenderContext);
+ SAL_DLLPRIVATE void ImplDrawFadeOut(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void ImplNewAlign();
SAL_DLLPRIVATE void ImplDrawGrip(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bHorz, bool bLeft);
SAL_DLLPRIVATE void ImplStartSplit( const MouseEvent& rMEvt );
diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx
index 9c04e0df0117..7bb969d898de 100644
--- a/include/vcl/status.hxx
+++ b/include/vcl/status.hxx
@@ -86,12 +86,10 @@ private:
SAL_DLLPRIVATE void ImplFormat();
SAL_DLLPRIVATE bool ImplIsItemUpdate();
- SAL_DLLPRIVATE void ImplDrawText(vcl::RenderContext& rRenderContext, bool bOffScreen,
- long nOldTextWidth);
+ SAL_DLLPRIVATE void ImplDrawText(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, bool bOffScreen,
- sal_uInt16 nPos, bool bDrawText, bool bDrawFrame);
- SAL_DLLPRIVATE void ImplDrawProgress(vcl::RenderContext& rRenderContext, bool bPaint,
- sal_uInt16 nOldPerc, sal_uInt16 nNewPerc);
+ sal_uInt16 nPos);
+ SAL_DLLPRIVATE void ImplDrawProgress(vcl::RenderContext& rRenderContext, sal_uInt16 nNewPerc);
SAL_DLLPRIVATE void ImplCalcProgressRect();
SAL_DLLPRIVATE Rectangle ImplGetItemRectPos( sal_uInt16 nPos ) const;
SAL_DLLPRIVATE sal_uInt16 ImplGetFirstVisiblePos() const;
diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx
index 314477ed6149..2f0b1d9dd6d1 100644
--- a/include/vcl/tabctrl.hxx
+++ b/include/vcl/tabctrl.hxx
@@ -71,7 +71,7 @@ private:
SAL_DLLPRIVATE void ImplActivateTabPage( bool bNext );
SAL_DLLPRIVATE void ImplShowFocus();
SAL_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* pItem,
- const Rectangle& rCurRect, bool bLayout = false, bool bFirstInGroup = false,
+ const Rectangle& rCurRect, bool bFirstInGroup = false,
bool bLastInGroup = false, bool bIsCurrentItem = false);
SAL_DLLPRIVATE void ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect);
SAL_DLLPRIVATE void ImplFreeLayoutData();
diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx
index eaaa6213d8fd..988bd3c35988 100644
--- a/include/vcl/texteng.hxx
+++ b/include/vcl/texteng.hxx
@@ -297,7 +297,7 @@ public:
const TextAttrib* FindAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const;
const TextCharAttrib* FindCharAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const;
- void RemoveAttribs( sal_uInt32 nPara, sal_uInt16 nWhich, bool bIdleFormatAndUpdate );
+ void RemoveAttribs( sal_uInt32 nPara, sal_uInt16 nWhich );
void RemoveAttrib( sal_uInt32 nPara, const TextCharAttrib& rAttrib );
void RemoveAttribs( sal_uInt32 nPara );
void SetAttrib( const TextAttrib& rAttr, sal_uInt32 nPara, sal_Int32 nStart, sal_Int32 nEnd, bool bIdleFormatAndUpdate = true );
diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx
index e4507d439868..8b398e6b65df 100644
--- a/include/vcl/textview.hxx
+++ b/include/vcl/textview.hxx
@@ -70,7 +70,7 @@ protected:
bool IsInSelection( const TextPaM& rPaM );
void ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = nullptr, TextSelection const* pSelection = nullptr);
- void ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bUseVirtDev);
+ void ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect);
void ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bEndKey );
void ImpHighlight( const TextSelection& rSel );
void ImpSetSelection( const TextSelection& rSelection );
diff --git a/include/vcl/throbber.hxx b/include/vcl/throbber.hxx
index be9ee33654c3..898fee4e3ba8 100644
--- a/include/vcl/throbber.hxx
+++ b/include/vcl/throbber.hxx
@@ -46,7 +46,7 @@ public:
};
public:
- Throbber(vcl::Window* i_parentWindow, WinBits i_style, const ImageSet i_imageSet = IMAGES_AUTO);
+ Throbber(vcl::Window* i_parentWindow, WinBits i_style);
virtual ~Throbber();
virtual void dispose() override;
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index b0a686f36f02..d559c59c7d9e 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -168,9 +168,9 @@ private:
SAL_DLLPRIVATE bool ImplCalcItem();
SAL_DLLPRIVATE sal_uInt16 ImplCalcBreaks( long nWidth, long* pMaxLineWidth, bool bCalcHorz );
SAL_DLLPRIVATE void ImplFormat( bool bResize = false );
- SAL_DLLPRIVATE void ImplDrawSpin(vcl::RenderContext& rRenderContext, bool bUpperIn, bool bLowerIn);
+ SAL_DLLPRIVATE void ImplDrawSpin(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void ImplDrawSeparator(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, const Rectangle& rRect);
- SAL_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, sal_uInt16 nHighlight = 0, bool bPaint = false, bool bLayout = false );
+ SAL_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, sal_uInt16 nHighlight = 0 );
using Window::ImplInvalidate;
SAL_DLLPRIVATE void ImplInvalidate( bool bNewCalc = false, bool bFullPaint = false );
SAL_DLLPRIVATE void ImplUpdateItem( sal_uInt16 nIndex = 0xFFFF );
diff --git a/include/vcl/unowrap.hxx b/include/vcl/unowrap.hxx
index 066c700d518f..44c86f2cc041 100644
--- a/include/vcl/unowrap.hxx
+++ b/include/vcl/unowrap.hxx
@@ -67,7 +67,7 @@ public:
virtual void ReleaseAllGraphics( OutputDevice* pOutDev ) = 0;
// Window
- virtual css::uno::Reference< css::awt::XWindowPeer> GetWindowInterface( vcl::Window* pWindow, bool bCreate ) = 0;
+ virtual css::uno::Reference< css::awt::XWindowPeer> GetWindowInterface( vcl::Window* pWindow ) = 0;
virtual void SetWindowInterface( vcl::Window* pWindow, css::uno::Reference< css::awt::XWindowPeer > xIFace ) = 0;
virtual void WindowDestroyed( vcl::Window* pWindow ) = 0;
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 3e61c779a3f0..2cb6701b792d 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -603,7 +603,7 @@ protected:
SAL_DLLPRIVATE void ImplInvalidateParentFrameRegion( vcl::Region& rRegion );
SAL_DLLPRIVATE void ImplValidateFrameRegion( const vcl::Region* rRegion, ValidateFlags nFlags );
- SAL_DLLPRIVATE void ImplValidate( ValidateFlags nFlags );
+ SAL_DLLPRIVATE void ImplValidate();
SAL_DLLPRIVATE void ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren );
SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren );
@@ -680,7 +680,7 @@ private:
SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows2( const vcl::Region& rInterRegion, vcl::Region& rRegion );
SAL_DLLPRIVATE void ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl::Region& rRegion );
SAL_DLLPRIVATE void ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& rRegion,
- bool bChildren, bool bParent, bool bSiblings );
+ bool bChildren, bool bSiblings );
/** Invoke the actual painting.
@@ -744,7 +744,7 @@ private:
SAL_DLLPRIVATE void ImplPaintToDevice( ::OutputDevice* pTargetOutDev, const Point& rPos );
SAL_DLLPRIVATE css::uno::Reference< css::rendering::XCanvas >
- ImplGetCanvas( const Size& rFullscreenSize, bool bFullscreen, bool bSpriteCanvas ) const;
+ ImplGetCanvas( bool bSpriteCanvas ) const;
public:
virtual vcl::Region GetActiveClipRegion() const override;
@@ -974,8 +974,7 @@ public:
bool IsEnabled() const;
void EnableInput( bool bEnable = true, bool bChild = true );
- void EnableInput( bool bEnable, bool bChild, bool bSysWin,
- const vcl::Window* pExcludeWindow = nullptr );
+ void EnableInput( bool bEnable, const vcl::Window* pExcludeWindow );
bool IsInputEnabled() const;
/** Override <code>EnableInput</code>. This can be necessary due to other people
@@ -1186,9 +1185,9 @@ public:
void HideFocus();
// transparent background for selected or checked items in toolboxes etc.
- void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly );
+ void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder );
// support rounded edges in the selection rect
- void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly, long nCornerRadius, Color* pSelectionTextColor, Color* pPaintColor );
+ void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly, Color* pSelectionTextColor, Color* pPaintColor );
void ShowTracking( const Rectangle& rRect,
sal_uInt16 nFlags = SHOWTRACK_SMALL );
@@ -1297,8 +1296,6 @@ private:
SAL_DLLPRIVATE bool ImplIsAccessibleCandidate() const;
SAL_DLLPRIVATE bool ImplIsAccessibleNativeFrame() const;
- SAL_DLLPRIVATE sal_uInt16 ImplGetAccessibleCandidateChildWindowCount( GetWindowType nFirstWindowType ) const;
- SAL_DLLPRIVATE vcl::Window* ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, GetWindowType nFirstWindowType, bool bTopLevel = true ) const;
///@}
/*
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index 1efe6ea6925e..2e60997c74ae 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -456,7 +456,7 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta
else
aTransRect = Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 );
SetBackground( Color( rStyleSettings.GetFaceColor() ) );
- DrawSelectionBackground( aTransRect, 0, true, false, false );
+ DrawSelectionBackground( aTransRect, 0, true, false );
SetBackground();
}
break;
diff --git a/sd/source/ui/animations/CategoryListBox.cxx b/sd/source/ui/animations/CategoryListBox.cxx
index 41a3d6b81556..769f47646f7b 100644
--- a/sd/source/ui/animations/CategoryListBox.cxx
+++ b/sd/source/ui/animations/CategoryListBox.cxx
@@ -71,7 +71,7 @@ void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt )
}
else
{
- DrawEntry( rUDEvt, true, true );
+ DrawEntry( rUDEvt, true, false );
}
}
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index d1fee6b3b100..12068e0d4e8d 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -47,7 +47,7 @@ void ButtonFrame::Draw( OutputDevice& rDev )
{
vcl::Window *pWin = static_cast<vcl::Window*>( &rDev );
if( bPressed )
- pWin->DrawSelectionBackground( aRect, 0, true, false, false );
+ pWin->DrawSelectionBackground( aRect, 0, true, false );
}
else
{
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index f0755ebecee4..819ac2d13154 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -3495,7 +3495,7 @@ void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(vcl::RenderContext& rRenderConte
nDecoFlags = DrawHighlightFrameStyle::In;
else
nDecoFlags = DrawHighlightFrameStyle::Out;
- aDecoView.DrawHighlightFrame(aBmpRect, nDecoFlags, true/*bTestBackground*/);
+ aDecoView.DrawHighlightFrame(aBmpRect, nDecoFlags);
}
}
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 48f3fb72c047..e9810ad14b09 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -280,13 +280,13 @@ void ColorListBox::UserDraw( const UserDrawEvent& rUDEvt )
}
}
- ListBox::DrawEntry( rUDEvt, false, true );
+ ListBox::DrawEntry( rUDEvt, false, false );
}
else
- ListBox::DrawEntry( rUDEvt, false, true, true );
+ ListBox::DrawEntry( rUDEvt, false, true );
}
else
- ListBox::DrawEntry( rUDEvt, true, true );
+ ListBox::DrawEntry( rUDEvt, true, false );
}
BorderWidthImpl::BorderWidthImpl( BorderWidthImplFlags nFlags, double nRate1, double nRate2, double nRateGap ):
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index dde0b1b38c50..20c817992abf 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -283,7 +283,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
{
FWCharacterData aCharacterData;
OUString aCharText( (sal_Unicode)rText[ i ] );
- if ( pVirDev->GetTextOutlines( aCharacterData.vOutlines, aCharText, 0, 0, -1, true, nWidth, pDXArry.get() ) )
+ if ( pVirDev->GetTextOutlines( aCharacterData.vOutlines, aCharText, 0, 0, -1, nWidth, pDXArry.get() ) )
{
sal_Int32 nTextWidth = pVirDev->GetTextWidth( aCharText);
std::vector< tools::PolyPolygon >::iterator aOutlineIter = aCharacterData.vOutlines.begin();
@@ -341,7 +341,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
pVirDev->SetFont( aFont );
}
FWCharacterData aCharacterData;
- if ( pVirDev->GetTextOutlines( aCharacterData.vOutlines, rText, 0, 0, -1, true, nWidth, pDXArry.get() ) )
+ if ( pVirDev->GetTextOutlines( aCharacterData.vOutlines, rText, 0, 0, -1, nWidth, pDXArry.get() ) )
{
aParagraphIter->vCharacters.push_back( aCharacterData );
}
diff --git a/toolkit/inc/helper/unowrapper.hxx b/toolkit/inc/helper/unowrapper.hxx
index f110e3c81138..0600d0a6d4dd 100644
--- a/toolkit/inc/helper/unowrapper.hxx
+++ b/toolkit/inc/helper/unowrapper.hxx
@@ -52,7 +52,7 @@ public:
virtual void ReleaseAllGraphics( OutputDevice* pOutDev ) override;
// Window
- virtual css::uno::Reference< css::awt::XWindowPeer> GetWindowInterface( vcl::Window* pWindow, bool bCreate ) override;
+ virtual css::uno::Reference< css::awt::XWindowPeer> GetWindowInterface( vcl::Window* pWindow ) override;
virtual void SetWindowInterface( vcl::Window* pWindow, css::uno::Reference< css::awt::XWindowPeer> xIFace ) override;
void WindowDestroyed( vcl::Window* pWindow ) override;
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index 6f21a3c60843..cc217b7fd390 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -152,10 +152,10 @@ css::uno::Reference< css::awt::XToolkit> UnoWrapper::GetVCLToolkit()
return mxToolkit.get();
}
-css::uno::Reference< css::awt::XWindowPeer> UnoWrapper::GetWindowInterface( vcl::Window* pWindow, bool bCreate )
+css::uno::Reference< css::awt::XWindowPeer> UnoWrapper::GetWindowInterface( vcl::Window* pWindow )
{
css::uno::Reference< css::awt::XWindowPeer> xPeer = pWindow->GetWindowPeer();
- if ( !xPeer.is() && bCreate )
+ if ( !xPeer.is() )
{
xPeer = CreateXWindow( pWindow );
SetWindowInterface( pWindow, xPeer );
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
}
}