diff options
Diffstat (limited to 'vcl')
30 files changed, 58 insertions, 65 deletions
diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx index 7f93666c4715..a3cfb8cb9ba1 100644 --- a/vcl/backendtest/VisualBackendTest.cxx +++ b/vcl/backendtest/VisualBackendTest.cxx @@ -528,7 +528,7 @@ protected: try { uno::Reference<uno::XComponentContext> xComponentContext = ::cppu::defaultBootstrap_InitialComponentContext(); - uno::Reference<lang::XMultiServiceFactory> xMSF = uno::Reference<lang::XMultiServiceFactory>(xComponentContext->getServiceManager(), uno::UNO_QUERY); + uno::Reference<lang::XMultiServiceFactory> xMSF(xComponentContext->getServiceManager(), uno::UNO_QUERY); if (!xMSF.is()) Application::Abort("Bootstrap failure - no service manager"); diff --git a/vcl/inc/bitmap/ScanlineTools.hxx b/vcl/inc/bitmap/ScanlineTools.hxx index 17925e9687b9..e469e29df233 100644 --- a/vcl/inc/bitmap/ScanlineTools.hxx +++ b/vcl/inc/bitmap/ScanlineTools.hxx @@ -39,7 +39,7 @@ public: virtual Color readPixel() override { - const Color aColor = Color(pData[4], pData[1], pData[2], pData[3]); + const Color aColor(pData[4], pData[1], pData[2], pData[3]); pData += 4; return aColor; } @@ -65,7 +65,7 @@ public: virtual Color readPixel() override { - const Color aColor = Color(pData[2], pData[1], pData[0]); + const Color aColor(pData[2], pData[1], pData[0]); pData += 3; return aColor; } @@ -93,8 +93,7 @@ public: virtual Color readPixel() override { - const Color nColor - = Color((*pData & 0xf800) >> 8, (*pData & 0x07e0) >> 3, (*pData & 0x001f) << 3); + const Color nColor((*pData & 0xf800) >> 8, (*pData & 0x07e0) >> 3, (*pData & 0x001f) << 3); pData++; return nColor; } diff --git a/vcl/opengl/LineRenderUtils.cxx b/vcl/opengl/LineRenderUtils.cxx index 61d0dc38457c..e130fb93bb22 100644 --- a/vcl/opengl/LineRenderUtils.cxx +++ b/vcl/opengl/LineRenderUtils.cxx @@ -121,8 +121,8 @@ void LineBuilder::appendBevelJoint(glm::vec2 const& point, const glm::vec2& prev // All the magic is done by the fact that we draw triangle strips, so we // cover the joins correctly. - glm::vec2 prevNormal = glm::vec2(-prevLineVector.y, prevLineVector.x); - glm::vec2 nextNormal = glm::vec2(-nextLineVector.y, nextLineVector.x); + glm::vec2 prevNormal(-prevLineVector.y, prevLineVector.x); + glm::vec2 nextNormal(-nextLineVector.y, nextLineVector.x); appendAndConnectLinePoint(point, prevNormal, 1.0f); appendAndConnectLinePoint(point, nextNormal, 1.0f); @@ -139,8 +139,8 @@ void LineBuilder::appendRoundJoint(glm::vec2 const& point, const glm::vec2& prev // line joins look round. Ideally the number of vectors could be // calculated. - glm::vec2 prevNormal = glm::vec2(-prevLineVector.y, prevLineVector.x); - glm::vec2 nextNormal = glm::vec2(-nextLineVector.y, nextLineVector.x); + glm::vec2 prevNormal(-prevLineVector.y, prevLineVector.x); + glm::vec2 nextNormal(-nextLineVector.y, nextLineVector.x); glm::vec2 middle = vcl::vertex::normalize(prevNormal + nextNormal); glm::vec2 middleLeft = vcl::vertex::normalize(prevNormal + middle); @@ -158,7 +158,7 @@ void LineBuilder::appendRoundLineCapVertices(const glm::vec2& rPoint1, const glm constexpr int nRoundCapIteration = 12; glm::vec2 lineVector = vcl::vertex::normalize(rPoint2 - rPoint1); - glm::vec2 normal = glm::vec2(-lineVector.y, lineVector.x); + glm::vec2 normal(-lineVector.y, lineVector.x); glm::vec2 previousRoundNormal = normal; for (int nFactor = 1; nFactor <= nRoundCapIteration; nFactor++) @@ -176,7 +176,7 @@ void LineBuilder::appendRoundLineCapVertices(const glm::vec2& rPoint1, const glm void LineBuilder::appendSquareLineCapVertices(const glm::vec2& rPoint1, const glm::vec2& rPoint2) { glm::vec2 lineVector = vcl::vertex::normalize(rPoint2 - rPoint1); - glm::vec2 normal = glm::vec2(-lineVector.y, lineVector.x); + glm::vec2 normal(-lineVector.y, lineVector.x); glm::vec2 extrudedPoint = rPoint1 + -lineVector * (mfLineWidth / 2.0f); diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 1914a4f6f60a..1924d46f268b 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -548,7 +548,7 @@ void OpenGLSalGraphicsImpl::CheckOffscreenTexture() SalTwoRect aPosAry(0, 0, fWidth, fHeight, 0,0, fWidth, fHeight); // TODO: lfrb: User GL_ARB_copy_image? - OpenGLTexture aNewTex = OpenGLTexture( GetWidth(), GetHeight() ); + OpenGLTexture aNewTex( GetWidth(), GetHeight() ); mpContext->state().scissor().disable(); mpContext->state().stencil().disable(); @@ -670,7 +670,7 @@ void OpenGLSalGraphicsImpl::DrawLineSegment(float x1, float y1, float x2, float glm::vec2 aPoint2(x2, y2); glm::vec2 aLineVector = vcl::vertex::normalize(aPoint2 - aPoint1); - glm::vec2 aNormal = glm::vec2(-aLineVector.y, aLineVector.x); + glm::vec2 aNormal(-aLineVector.y, aLineVector.x); vcl::vertex::addLineSegmentVertices(aVertices, aExtrusionVectors, aPoint1, aNormal, 1.0f, diff --git a/vcl/opengl/program.cxx b/vcl/opengl/program.cxx index 4de2c5decac0..6557eccf8f42 100644 --- a/vcl/opengl/program.cxx +++ b/vcl/opengl/program.cxx @@ -326,7 +326,7 @@ void OpenGLProgram::SetTransform( void OpenGLProgram::SetIdentityTransform(const OString& rName) { GLuint nUniform = GetUniformLocation(rName); - glm::mat4 aMatrix = glm::mat4(); + glm::mat4 aMatrix {}; glUniformMatrix4fv(nUniform, 1, GL_FALSE, glm::value_ptr( aMatrix ) ); CHECK_GL_ERROR(); } diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 27d2e19e2734..4de793ea6797 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -684,7 +684,7 @@ bool OpenGLSalBitmap::calcChecksumGL(OpenGLTexture& rInputTexture, BitmapChecksu int nNewWidth = ceil( nWidth / 4.0 ); int nNewHeight = ceil( nHeight / 4.0 ); - OpenGLTexture aFirstPassTexture = OpenGLTexture(nNewWidth, nNewHeight); + OpenGLTexture aFirstPassTexture(nNewWidth, nNewHeight); OpenGLFramebuffer* pFramebuffer = xContext->AcquireFramebuffer(aFirstPassTexture); pProgram->SetUniform1f( "xstep", 1.0 / mnWidth ); @@ -711,7 +711,7 @@ bool OpenGLSalBitmap::calcChecksumGL(OpenGLTexture& rInputTexture, BitmapChecksu nNewWidth = ceil( nWidth / 4.0 ); nNewHeight = ceil( nHeight / 4.0 ); - OpenGLTexture aSecondPassTexture = OpenGLTexture(nNewWidth, nNewHeight); + OpenGLTexture aSecondPassTexture(nNewWidth, nNewHeight); pFramebuffer = xContext->AcquireFramebuffer(aSecondPassTexture); pProgram->SetUniform1f( "xstep", 1.0 / mnWidth ); @@ -912,7 +912,7 @@ bool OpenGLSalBitmap::Replace( const Color& rSearchColor, const Color& rReplaceC if( !pProgram ) return false; - OpenGLTexture aNewTex = OpenGLTexture( mnWidth, mnHeight ); + OpenGLTexture aNewTex( mnWidth, mnHeight ); pFramebuffer = xContext->AcquireFramebuffer( aNewTex ); pProgram->SetTexture( "sampler", maTexture ); diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 4c954b4fe6d1..8c7de771f1b0 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -264,7 +264,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size aMax; Point aImagePos = rPos; Point aTextPos = rPos; - tools::Rectangle aUnion = tools::Rectangle(aImagePos, aImageSize); + tools::Rectangle aUnion(aImagePos, aImageSize); tools::Rectangle aSymbol; long nSymbolHeight = 0; @@ -273,7 +273,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, // Get the size of the text output area ( the symbol will be drawn in // this area as well, so the symbol rectangle will be calculated here, too ) - tools::Rectangle aRect = tools::Rectangle(Point(), rSize); + tools::Rectangle aRect(Point(), rSize); Size aTSSize; if (bHasSymbol) @@ -442,7 +442,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, { if (mpButtonData->meSymbolAlign == SymbolAlign::RIGHT) { - Point aRightPos = Point(aTextPos.X() + aTextSize.Width() + aSymbolSize.Width() / 2, aTextPos.Y()); + Point aRightPos(aTextPos.X() + aTextSize.Width() + aSymbolSize.Width() / 2, aTextPos.Y()); *pSymbolRect = tools::Rectangle(aRightPos, aSymbolSize); } else @@ -484,7 +484,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, void Button::ImplSetFocusRect(const tools::Rectangle &rFocusRect) { tools::Rectangle aFocusRect = rFocusRect; - tools::Rectangle aOutputRect = tools::Rectangle(Point(), GetOutputSizePixel()); + tools::Rectangle aOutputRect(Point(), GetOutputSizePixel()); if (!aFocusRect.IsEmpty()) { diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 8c01f8302535..ff8c07d2bbc1 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -815,7 +815,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) const double fAngle = F_PI1800 * nAngle10; const double fSin = sin( fAngle ); const double fCos = cos( fAngle ); - tools::Rectangle aRect=tools::Rectangle( Point(), GetPrefSize() ); + tools::Rectangle aRect( Point(), GetPrefSize() ); tools::Polygon aPoly( aRect ); aPoly.Rotate( Point(), fSin, fCos ); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 79289ba8b39a..9116984def55 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6513,7 +6513,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool } writeBuffer( aLine.getStr(), aLine.getLength() ); - Point aOffset = Point(0,0); + Point aOffset(0,0); if ( nEmphMark & FontEmphasisMark::PosBelow ) aOffset.AdjustY(GetFontInstance()->mxFontMetric->GetDescent() + nEmphYOff ); diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 31cc27a572cc..d73d987a56d7 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -1267,7 +1267,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout ) SetFillColor( GetTextColor() ); } - Point aOffset = Point(0,0); + Point aOffset(0,0); if ( nEmphasisMark & FontEmphasisMark::PosBelow ) aOffset.AdjustY(mpFontInstance->mxFontMetric->GetDescent() + nEmphasisYOff ); diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx index c0df51f62a67..71cd67017bcd 100644 --- a/vcl/source/outdev/wallpaper.cxx +++ b/vcl/source/outdev/wallpaper.cxx @@ -291,7 +291,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, const tools::Rectangle aOutRect( aTmpPoint, GetOutputSizePixel() ); const tools::Rectangle aColRect( Point( nX, nY ), Size( nWidth, nHeight ) ); - tools::Rectangle aWorkRect = tools::Rectangle( 0, 0, aOutRect.Right(), aPos.Y() - 1 ); + tools::Rectangle aWorkRect( 0, 0, aOutRect.Right(), aPos.Y() - 1 ); aWorkRect.Justify(); aWorkRect.Intersection( aColRect ); if( !aWorkRect.IsEmpty() ) diff --git a/vcl/source/uipreviewer/previewer.cxx b/vcl/source/uipreviewer/previewer.cxx index 63f7ae51e066..47fe2099e9fc 100644 --- a/vcl/source/uipreviewer/previewer.cxx +++ b/vcl/source/uipreviewer/previewer.cxx @@ -35,8 +35,7 @@ void UIPreviewApp::Init() cppu::defaultBootstrap_InitialComponentContext(); uno::Reference<lang::XMultiComponentFactory> xFactory = xContext->getServiceManager(); - uno::Reference<lang::XMultiServiceFactory> xSFactory = - uno::Reference<lang::XMultiServiceFactory> (xFactory, uno::UNO_QUERY_THROW); + uno::Reference<lang::XMultiServiceFactory> xSFactory(xFactory, uno::UNO_QUERY_THROW); comphelper::setProcessServiceFactory(xSFactory); // Create UCB (for backwards compatibility, in case some code still uses diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index ef3bf456e7a9..6355f1f6d5e4 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -652,8 +652,7 @@ FindFocusedEditableText(uno::Reference<accessibility::XAccessibleContext> const& { if (xState->contains(accessibility::AccessibleStateType::FOCUSED)) { - uno::Reference<accessibility::XAccessibleEditableText> xText - = uno::Reference<accessibility::XAccessibleEditableText>(xContext, uno::UNO_QUERY); + uno::Reference<accessibility::XAccessibleEditableText> xText(xContext, uno::UNO_QUERY); if (xText.is()) return xText; if (xState->contains(accessibility::AccessibleStateType::MANAGES_DESCENDANTS)) diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 344a22469aec..95d91f129213 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -3075,7 +3075,7 @@ void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID) reader.nextItem( xmlreader::XmlReader::Text::Raw, &name, &nsId); - OString sValue = OString(name.begin, name.length); + OString sValue(name.begin, name.length); OUString sFinalValue; if (bTranslated) { @@ -3236,7 +3236,7 @@ std::vector<ComboBoxTextItem> VclBuilder::handleItems(xmlreader::XmlReader &read reader.nextItem( xmlreader::XmlReader::Text::Raw, &name, &nsId); - OString sValue = OString(name.begin, name.length); + OString sValue(name.begin, name.length); OUString sFinalValue; if (bTranslated) { @@ -3448,7 +3448,7 @@ void VclBuilder::handleSizeGroup(xmlreader::XmlReader &reader) if (name.equals("name")) { name = reader.getAttributeValue(false); - OString sWidget = OString(name.begin, name.length); + OString sWidget(name.begin, name.length); sal_Int32 nDelim = sWidget.indexOf(':'); if (nDelim != -1) sWidget = sWidget.copy(0, nDelim); @@ -3914,13 +3914,13 @@ std::vector<vcl::EnumContext::Context> VclBuilder::handleStyle(xmlreader::XmlRea if (classStyle.startsWith("context-")) { OString sContext = classStyle.copy(classStyle.indexOf('-') + 1); - OUString sContext2 = OUString(sContext.getStr(), sContext.getLength(), RTL_TEXTENCODING_UTF8); + OUString sContext2(sContext.getStr(), sContext.getLength(), RTL_TEXTENCODING_UTF8); aContext.push_back(vcl::EnumContext::GetContextEnum(sContext2)); } else if (classStyle.startsWith("priority-")) { OString aPriority = classStyle.copy(classStyle.indexOf('-') + 1); - OUString aPriority2 = OUString(aPriority.getStr(), aPriority.getLength(), RTL_TEXTENCODING_UTF8); + OUString aPriority2(aPriority.getStr(), aPriority.getLength(), RTL_TEXTENCODING_UTF8); nPriority = aPriority2.toInt32(); } else @@ -3988,7 +3988,7 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, stringmap &rMap) } reader.nextItem(xmlreader::XmlReader::Text::Raw, &name, &nsId); - OString sValue = OString(name.begin, name.length); + OString sValue(name.begin, name.length); OUString sFinalValue; if (bTranslated) { @@ -4025,7 +4025,7 @@ void VclBuilder::handleActionWidget(xmlreader::XmlReader &reader) } reader.nextItem(xmlreader::XmlReader::Text::Raw, &name, &nsId); - OString sID = OString(name.begin, name.length); + OString sID(name.begin, name.length); sal_Int32 nDelim = sID.indexOf(':'); if (nDelim != -1) sID = sID.copy(0, nDelim); diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 81e7cbe573c6..fdfa26bd70b4 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -630,7 +630,7 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16 if (pData->eType != MenuItemType::SEPARATOR) { // #107747# give menuitems the height of the menubar - tools::Rectangle aRect = tools::Rectangle(Point(nX, 1), Size(pData->aSz.Width(), aOutputSize.Height() - 2)); + tools::Rectangle aRect(Point(nX, 1), Size(pData->aSz.Width(), aOutputSize.Height() - 2)); rRenderContext.Push(PushFlags::CLIPREGION); rRenderContext.IntersectClipRegion(aRect); bool bRollover, bHighlight; diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 78b43cf8b576..415f6996d7ec 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -687,8 +687,8 @@ Reference< css::datatransfer::dnd::XDropTarget > Window::GetDropTarget() mpWindowImpl->mpFrameData->mxDropTarget->addDropTargetListener( mpWindowImpl->mpFrameData->mxDropTargetListener ); // register also as drag gesture listener if directly supported by drag source - Reference< css::datatransfer::dnd::XDragGestureRecognizer > xDragGestureRecognizer = - Reference< css::datatransfer::dnd::XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY); + Reference< css::datatransfer::dnd::XDragGestureRecognizer > xDragGestureRecognizer( + mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY); if( xDragGestureRecognizer.is() ) { diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index fca72f214022..34e76fa6c316 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1387,7 +1387,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP pDevice->SetTextAlign(GetTextAlign()); pDevice->SetRasterOp(GetRasterOp()); - tools::Rectangle aPaintRect = tools::Rectangle(Point(), GetOutputSizePixel()); + tools::Rectangle aPaintRect(Point(), GetOutputSizePixel()); vcl::Region aClipRegion(GetClipRegion()); pDevice->SetClipRegion(); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 942c34150c24..827d833df60b 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1984,7 +1984,7 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox&, rBox, void ) else aPrt->SetPaper( mePaper ); - Size aPaperSize = Size( aInfo.getWidth(), aInfo.getHeight() ); + Size aPaperSize( aInfo.getWidth(), aInfo.getHeight() ); checkPaperSize( aPaperSize ); maPController->setPaperSizeFromUser( aPaperSize ); diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index facd6fdd7603..f16710ae171f 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -511,7 +511,7 @@ void Splitter::ImplRestoreSplitter() // set splitter in the center of the ref window StartSplit(); Size aSize = mpRefWin->GetOutputSize(); - Point aPos = Point( aSize.Width()/2 , aSize.Height()/2); + Point aPos( aSize.Width()/2 , aSize.Height()/2); if ( mnLastSplitPos != mnSplitPos && mnLastSplitPos > 5 ) { // restore last pos if it was a useful position (>5) diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 824d020b97c0..15c05f455be8 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -2005,9 +2005,9 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) // We need a mouseevent with a position inside the button for the // ImplStartSplit function! MouseEvent aOrgMEvt = rTEvt.GetMouseEvent(); - MouseEvent aNewMEvt = MouseEvent( aTestRect.Center(), aOrgMEvt.GetClicks(), - aOrgMEvt.GetMode(), aOrgMEvt.GetButtons(), - aOrgMEvt.GetModifier() ); + MouseEvent aNewMEvt( aTestRect.Center(), aOrgMEvt.GetClicks(), + aOrgMEvt.GetMode(), aOrgMEvt.GetButtons(), + aOrgMEvt.GetModifier() ); ImplStartSplit( aNewMEvt ); mbFadeOutDown = false; diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 9981da0ada76..421e1c903815 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -628,7 +628,7 @@ ImageType ToolBox::GetImageSize() const OutputDevice *pDefault = Application::GetDefaultDevice(); float fScaleFactor = pDefault ? pDefault->GetDPIScaleFactor() : 1.0; - Size aUnscaledSize = Size(16, 16); + Size aUnscaledSize(16, 16); if (eToolBoxButtonSize == ToolBoxButtonSize::Large) { diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index c9c4a93da413..826ba0cbadbe 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -200,8 +200,7 @@ void Window::dispose() // deregister drop target listener if( mpWindowImpl->mpFrameData->mxDropTargetListener.is() ) { - Reference< XDragGestureRecognizer > xDragGestureRecognizer = - Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY); + Reference< XDragGestureRecognizer > xDragGestureRecognizer(mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY); if( xDragGestureRecognizer.is() ) { xDragGestureRecognizer->removeDragGestureListener( diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index e3d81e6aa62d..3bda1c6c68d4 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -471,8 +471,8 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent if( pMouseDownWin->ImplGetFrameData()->mbInternalDragGestureRecognizer ) { // query DropTarget from child window - css::uno::Reference< css::datatransfer::dnd::XDragGestureRecognizer > xDragGestureRecognizer = - css::uno::Reference< css::datatransfer::dnd::XDragGestureRecognizer > ( pMouseDownWin->ImplGetWindowImpl()->mxDNDListenerContainer, + css::uno::Reference< css::datatransfer::dnd::XDragGestureRecognizer > xDragGestureRecognizer( + pMouseDownWin->ImplGetWindowImpl()->mxDNDListenerContainer, css::uno::UNO_QUERY ); if( xDragGestureRecognizer.is() ) diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx index 217ffdbb72cc..2c453e051b5c 100644 --- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx +++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx @@ -164,7 +164,7 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment() const char *pDesktop = getenv( "XDG_CURRENT_DESKTOP" ); if ( pDesktop ) { - OString aCurrentDesktop = OString( pDesktop, strlen( pDesktop ) ); + OString aCurrentDesktop( pDesktop, strlen( pDesktop ) ); //it may be separated by colon ( e.g. unity:unity7:ubuntu ) std::vector<OUString> aSplitCurrentDesktop = comphelper::string::split( diff --git a/vcl/unx/generic/print/text_gfx.cxx b/vcl/unx/generic/print/text_gfx.cxx index 7099d0a5f57d..156f801cb8c9 100644 --- a/vcl/unx/generic/print/text_gfx.cxx +++ b/vcl/unx/generic/print/text_gfx.cxx @@ -111,7 +111,7 @@ void PrinterGfx::DrawGlyph(const Point& rPoint, nDescend = nDescend * nTextHeight / 1000; nAscend = nAscend * nTextHeight / 1000; - Point aRotPoint = Point( -nDescend*nTextWidth/nTextHeight, nAscend*nTextWidth/nTextHeight ); + Point aRotPoint( -nDescend*nTextWidth/nTextHeight, nAscend*nTextWidth/nTextHeight ); // transform matrix to new individual direction PSGSave (); diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index e76cf990228a..cac3ac6e4805 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -314,8 +314,7 @@ void DocumentFocusListener::attachRecursive( if( xStateSet->contains(accessibility::AccessibleStateType::FOCUSED ) ) atk_wrapper_focus_tracker_notify_when_idle( xAccessible ); - uno::Reference< accessibility::XAccessibleEventBroadcaster > xBroadcaster = - uno::Reference< accessibility::XAccessibleEventBroadcaster >(xContext, uno::UNO_QUERY); + uno::Reference< accessibility::XAccessibleEventBroadcaster > xBroadcaster(xContext, uno::UNO_QUERY); if (!xBroadcaster.is()) return; @@ -373,8 +372,7 @@ void DocumentFocusListener::detachRecursive( const uno::Reference< accessibility::XAccessibleStateSet >& xStateSet ) { - uno::Reference< accessibility::XAccessibleEventBroadcaster > xBroadcaster = - uno::Reference< accessibility::XAccessibleEventBroadcaster >(xContext, uno::UNO_QUERY); + uno::Reference< accessibility::XAccessibleEventBroadcaster > xBroadcaster(xContext, uno::UNO_QUERY); if( xBroadcaster.is() && 0 < m_aRefList.erase(xBroadcaster) ) { diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 50ebb17367c1..41504bf55c65 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -6750,7 +6750,7 @@ private: gtk_tree_model_get_iter(pModel, &aGtkIter.iter, tree_path); gtk_tree_path_free(tree_path); - OUString sText = OUString(pNewText, pNewText ? strlen(pNewText) : 0, RTL_TEXTENCODING_UTF8); + OUString sText(pNewText, pNewText ? strlen(pNewText) : 0, RTL_TEXTENCODING_UTF8); if (signal_editing_done(std::pair<const weld::TreeIter&, OUString>(aGtkIter, sText))) { void* pData = g_object_get_data(G_OBJECT(pCell), "g-lo-CellIndex"); @@ -6939,7 +6939,7 @@ public: GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(g_list_nth_data(m_pColumns, nColumn)); assert(pColumn && "wrong count"); const gchar* pTitle = gtk_tree_view_column_get_title(pColumn); - OUString sRet = OUString(pTitle, pTitle ? strlen(pTitle) : 0, RTL_TEXTENCODING_UTF8); + OUString sRet(pTitle, pTitle ? strlen(pTitle) : 0, RTL_TEXTENCODING_UTF8); return sRet; } @@ -8675,7 +8675,7 @@ public: GtkTextIter start, end; gtk_text_buffer_get_bounds(pBuffer, &start, &end); char* pStr = gtk_text_buffer_get_text(pBuffer, &start, &end, true); - OUString sRet = OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8); + OUString sRet(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8); g_free(pStr); return sRet; } @@ -10326,7 +10326,7 @@ private: int nTextLen = pTextStr ? strlen(pTextStr) : 0; if (nTextLen) { - OUString sOldText = OUString(pTextStr, nTextLen, RTL_TEXTENCODING_UTF8); + OUString sOldText(pTextStr, nTextLen, RTL_TEXTENCODING_UTF8); OString sText(OUStringToOString((*m_pStringReplace)(sOldText), RTL_TEXTENCODING_UTF8)); gtk_text_buffer_set_text(pBuffer, sText.getStr(), sText.getLength()); } diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index e7e194e50a62..689e19da83da 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -1193,7 +1193,7 @@ tools::Rectangle GtkSalGraphics::NWGetComboBoxButtonRect(ControlType nType, gint nButtonWidth = nArrowWidth + padding.left + padding.right; if( nPart == ControlPart::ButtonDown ) { - Point aPos = Point(aAreaRect.Left() + aAreaRect.GetWidth() - nButtonWidth, aAreaRect.Top()); + Point aPos(aAreaRect.Left() + aAreaRect.GetWidth() - nButtonWidth, aAreaRect.Top()); if (AllSettings::GetLayoutRTL()) aPos.setX( aAreaRect.Left() ); aButtonRect.SetSize( Size( nButtonWidth, aAreaRect.GetHeight() ) ); diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx index 4d0ef7dbb5e1..28bcee6c85b7 100644 --- a/vcl/workben/icontest.cxx +++ b/vcl/workben/icontest.cxx @@ -155,8 +155,7 @@ void IconTestApp::Init() cppu::defaultBootstrap_InitialComponentContext(); uno::Reference<lang::XMultiComponentFactory> xFactory = xContext->getServiceManager(); - uno::Reference<lang::XMultiServiceFactory> xSFactory = - uno::Reference<lang::XMultiServiceFactory> (xFactory, uno::UNO_QUERY_THROW); + uno::Reference<lang::XMultiServiceFactory> xSFactory(xFactory, uno::UNO_QUERY_THROW); comphelper::setProcessServiceFactory(xSFactory); // Create UCB (for backwards compatibility, in case some code still uses diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 3685e905a1ec..9043672fa179 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -864,9 +864,9 @@ public: aRight.Crop(tools::Rectangle(Point((nSlice * 3) + 3, (nSlice * 2) + 1), Size(nSlice, 1))); AlphaMask aAlphaMask(aRight.GetBitmap()); - Bitmap aBlockColor = Bitmap(aAlphaMask.GetSizePixel(), 24); + Bitmap aBlockColor(aAlphaMask.GetSizePixel(), 24); aBlockColor.Erase(COL_RED); - BitmapEx aShadowStretch = BitmapEx(aBlockColor, aAlphaMask); + BitmapEx aShadowStretch(aBlockColor, aAlphaMask); Point aRenderPt(r.TopLeft()); |