diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/inc/swmodeltestbase.hxx | 4 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/trvlfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/view/pagepreviewlayout.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltexti.cxx | 9 | ||||
-rw-r--r-- | sw/source/ui/envelp/envlop1.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/misc/glosdoc.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/misc/glshell.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/utlui/navipi.cxx | 2 |
17 files changed, 29 insertions, 37 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index 2475c5edcf71..fac758a30ccf 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -477,8 +477,8 @@ protected: pXpathStrResult); } - OUString aRet = OUString(reinterpret_cast<char*>(pXpathStrResult), - xmlStrlen(pXpathStrResult), RTL_TEXTENCODING_UTF8); + OUString aRet(reinterpret_cast<char*>(pXpathStrResult), + xmlStrlen(pXpathStrResult), RTL_TEXTENCODING_UTF8); xmlFree(pXpathStrResult); xmlFree(pXmlXpathObj); xmlFree(pXmlXpathCtx); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index df83dab157fb..3fd1ae58f84b 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -441,7 +441,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf49073, "tdf49073.docx") { // test case for Asian phontic guide (ruby text.) sal_Unicode aRuby[3] = {0x304D,0x3082,0x3093}; - OUString sRuby = OUString(aRuby, SAL_N_ELEMENTS(aRuby)); + OUString sRuby(aRuby, SAL_N_ELEMENTS(aRuby)); CPPUNIT_ASSERT_EQUAL(sRuby,getProperty<OUString>(getParagraph(1)->getStart(), "RubyText")); OUString sStyle = getProperty<OUString>( getParagraph(1)->getStart(), "RubyCharStyleName"); uno::Reference<beans::XPropertySet> xPropertySet(getStyles("CharacterStyles")->getByName(sStyle), uno::UNO_QUERY ); diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 08aa8eecefcc..3793a13a4028 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -360,7 +360,7 @@ DECLARE_RTFEXPORT_TEST(testTdf49073, "tdf49073.rtf") { // test case for Asian phontic guide (ruby text.) sal_Unicode aRuby[3] = { 0x304D, 0x3082, 0x3093 }; - OUString sRuby = OUString(aRuby, SAL_N_ELEMENTS(aRuby)); + OUString sRuby(aRuby, SAL_N_ELEMENTS(aRuby)); CPPUNIT_ASSERT_EQUAL(sRuby, getProperty<OUString>(getParagraph(1)->getStart(), "RubyText")); OUString sStyle = getProperty<OUString>(getParagraph(1)->getStart(), "RubyCharStyleName"); uno::Reference<beans::XPropertySet> xPropertySet( diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 468827925a78..2a318026c14f 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -6522,12 +6522,12 @@ void SwUiWriterTest::testTdf115065() pWrtShell->GotoTable("Table2"); SwRect aRect = pWrtShell->GetCurrFrame()->getFrameArea(); // Destination point is the middle of the first cell of second table - Point ptTo = Point(aRect.Left() + aRect.Width() / 2, aRect.Top() + aRect.Height() / 2); + Point ptTo(aRect.Left() + aRect.Width() / 2, aRect.Top() + aRect.Height() / 2); pWrtShell->GotoTable("Table1"); aRect = pWrtShell->GetCurrFrame()->getFrameArea(); // Source point is the middle of the first cell of first table - Point ptFrom = Point(aRect.Left() + aRect.Width() / 2, aRect.Top() + aRect.Height() / 2); + Point ptFrom(aRect.Left() + aRect.Width() / 2, aRect.Top() + aRect.Height() / 2); pWrtShell->SelTableCol(); // The copy operation (or closing document after that) segfaulted diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 5d6d89a7a70c..a179b7642b1e 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -5716,7 +5716,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin long iterX = eArea != RIGHT && eArea != LEFT ? BORDER_TILE_SIZE : 0; long iterY = eArea == RIGHT || eArea == LEFT ? BORDER_TILE_SIZE : 0; - for (tools::Rectangle aTile = tools::Rectangle(aPoint, aTileSize); true; aTile.Move(iterX, iterY)) + for (tools::Rectangle aTile(aPoint, aTileSize); true; aTile.Move(iterX, iterY)) { tools::Rectangle aRender = aComplete.GetIntersection(aTile); if (aRender.IsEmpty()) diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 24b9f6b588f3..5606210afb20 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2388,7 +2388,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor) } } - SwRect aTmp = SwRect( aTmpSt, aTmpEnd ); + SwRect aTmp( aTmpSt, aTmpEnd ); // Bug 34888: If content is selected which doesn't take space // away (i.e. PostIts, RefMarks, TOXMarks), then at // least set the width of the Cursor. diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index b6536f0397e1..58fdfa68d696 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -2193,9 +2193,7 @@ awt::Point SAL_CALL SwXShape::getPosition() { // #i34750# - get attribute position of top group // shape and add offset between top group object and group member - uno::Reference< drawing::XShape > xGroupShape = - uno::Reference< drawing::XShape >( pTopGroupObj->getUnoShape(), - uno::UNO_QUERY ); + uno::Reference< drawing::XShape > xGroupShape( pTopGroupObj->getUnoShape(), uno::UNO_QUERY ); aPos = xGroupShape->getPosition(); // add offset between top group object and group member // to the determined attribute position @@ -2275,9 +2273,7 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition ) } // Convert given absolute position in horizontal left-to-right // layout into relative position in horizontal left-to-right layout. - uno::Reference< drawing::XShape > xGroupShape = - uno::Reference< drawing::XShape >( pTopGroupObj->getUnoShape(), - uno::UNO_QUERY ); + uno::Reference< drawing::XShape > xGroupShape( pTopGroupObj->getUnoShape(), uno::UNO_QUERY ); { // #i34750# // use method <xGroupShape->getPosition()> to get the correct diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 3a3ba81eb601..07fe504f9b9a 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -823,7 +823,7 @@ void SwPagePreviewLayout::CalcStartValuesForSelectedPageMove( } sal_uInt16 nNewStartPage = mnPaintPhyStartPageNum; - Point aNewStartPos = Point(0,0); + Point aNewStartPos(0,0); const sal_uInt16 nNewAbsSelectedPageNum = ConvertRelativeToAbsolutePageNum( nNewRelSelectedPageNum ); if ( !IsPageVisible( nNewAbsSelectedPageNum ) ) diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 66775b933a8d..23978cdac54a 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1930,8 +1930,8 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex GetWin()->EnableMapMode(false); } - tools::Rectangle aOutRect = tools::Rectangle(Point(tilePosX, tilePosY), - rDevice.PixelToLogic(Size(contextWidth, contextHeight))); + tools::Rectangle aOutRect(Point(tilePosX, tilePosY), + rDevice.PixelToLogic(Size(contextWidth, contextHeight))); // Make the requested area visible -- we can't use MakeVisible as that will // only scroll the contents, but won't zoom/resize if needed. diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index dc7e4e18c6e8..b1da5bc210e2 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -581,7 +581,7 @@ FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos) xPropertySetInfo = xPropertySet->getPropertySetInfo(); if( xPropertySetInfo.is() ) { - MSWordExportBase::LinkedTextboxInfo aLinkedTextboxInfo = MSWordExportBase::LinkedTextboxInfo(); + MSWordExportBase::LinkedTextboxInfo aLinkedTextboxInfo; if( xPropertySetInfo->hasPropertyByName("LinkDisplayName") ) xPropertySet->getPropertyValue("LinkDisplayName") >>= sLinkChainName; diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 8fccbd2471f4..c9ec0f43fc27 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1790,9 +1790,9 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj, { SwFormatFrameSize aSize = rFlySet.Get(RES_FRM_SIZE); - SwFormatFrameSize aNewSize = SwFormatFrameSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, - aSize.GetWidth() + 2*nOutside, - aSize.GetHeight() + 2*nOutside); + SwFormatFrameSize aNewSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, + aSize.GetWidth() + 2*nOutside, + aSize.GetHeight() + 2*nOutside); aNewSize.SetWidthSizeType(aSize.GetWidthSizeType()); rFlySet.Put( aNewSize ); } diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index f28a076da3b1..3f618e6dc99e 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2533,8 +2533,7 @@ bool SwMSConvertControls::InsertControl( if( !xCreate.is() ) return false; - uno::Reference< drawing::XShape > xShape = - uno::Reference< drawing::XShape >(xCreate, uno::UNO_QUERY); + uno::Reference< drawing::XShape > xShape(xCreate, uno::UNO_QUERY); OSL_ENSURE(xShape.is(), "Did not get XShape"); xShape->setSize(rSize); diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 1b41ef693097..71a35ddbcc8b 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -279,8 +279,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( uno::Sequence<beans::PropertyValue> aObjArgs( comphelper::InitPropertySequence({ { "DefaultParentBaseURL", Any(GetXMLImport().GetBaseURL()) } })); - uno::Reference < embed::XEmbeddedObject > xObj = - uno::Reference < embed::XEmbeddedObject >( xFactory->createInstanceInitNew( + uno::Reference < embed::XEmbeddedObject > xObj( xFactory->createInstanceInitNew( aClass, OUString(), xStorage, "DummyName", aObjArgs), uno::UNO_QUERY ); if ( xObj.is() ) { @@ -709,8 +708,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( // create object with desired ClassId uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_PLUGIN_CLASSID ).GetByteSequence() ); uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() ); - uno::Reference < embed::XEmbeddedObject > xObj = - uno::Reference < embed::XEmbeddedObject >( xFactory->createInstanceInitNew( + uno::Reference < embed::XEmbeddedObject > xObj( xFactory->createInstanceInitNew( aClass, OUString(), xStorage, "DummyName", uno::Sequence < beans::PropertyValue >() ), uno::UNO_QUERY ); @@ -841,8 +839,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra // create object with desired ClassId uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_IFRAME_CLASSID ).GetByteSequence() ); uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() ); - uno::Reference < embed::XEmbeddedObject > xObj = - uno::Reference < embed::XEmbeddedObject >( xFactory->createInstanceInitNew( + uno::Reference < embed::XEmbeddedObject > xObj( xFactory->createInstanceInitNew( aClass, OUString(), xStorage, "DummyName", uno::Sequence < beans::PropertyValue >() ), uno::UNO_QUERY ); diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index e42662d3c65d..cd9923701bad 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -75,9 +75,9 @@ void SwEnvPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan Color aBack = rSettings.GetWindowColor(); Color aFront = SwViewOption::GetFontColor(); - Color aMedium = Color((aBack.GetRed() + aFront.GetRed()) / 2, - (aBack.GetGreen() + aFront.GetGreen()) / 2, - (aBack.GetBlue() + aFront.GetBlue()) / 2); + Color aMedium((aBack.GetRed() + aFront.GetRed()) / 2, + (aBack.GetGreen() + aFront.GetGreen()) / 2, + (aBack.GetBlue() + aFront.GetBlue()) / 2); rRenderContext.SetLineColor(aFront); diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx index 08cab28a4304..20807a0c6337 100644 --- a/sw/source/uibase/misc/glosdoc.cxx +++ b/sw/source/uibase/misc/glosdoc.cxx @@ -512,7 +512,7 @@ void SwGlossaries::InvalidateUNOOjects() if ( xGroup.is() ) static_cast< SwXAutoTextGroup* >( xGroup.get() )->Invalidate(); } - UnoAutoTextGroups aTmpg = UnoAutoTextGroups(); + UnoAutoTextGroups aTmpg; m_aGlossaryGroups.swap( aTmpg ); // invalidate all the AutoTextEntry-objects @@ -527,7 +527,7 @@ void SwGlossaries::InvalidateUNOOjects() if ( pEntry ) pEntry->Invalidate(); } - UnoAutoTextEntries aTmpe = UnoAutoTextEntries(); + UnoAutoTextEntries aTmpe; m_aGlossaryEntries.swap( aTmpe ); } diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx index 70353ab227ed..174913cfddc2 100644 --- a/sw/source/uibase/misc/glshell.cxx +++ b/sw/source/uibase/misc/glshell.cxx @@ -105,8 +105,8 @@ static bool lcl_Save( SwWrtShell& rSh, const OUString& rGroupName, const SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get(); std::unique_ptr<SwTextBlocks> pBlock(::GetGlossaries()->GetGroupDoc( rGroupName )); - SvxMacro aStart = SvxMacro(OUString(), OUString()); - SvxMacro aEnd = SvxMacro(OUString(), OUString()); + SvxMacro aStart { OUString(), OUString() }; + SvxMacro aEnd { OUString(), OUString() }; SwGlossaryHdl* pGlosHdl; pGlosHdl = rSh.GetView().GetGlosHdl(); diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index e946ab09e5b6..d3d1d96445c2 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -1058,7 +1058,7 @@ OUString SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData ) rData.HasFormat( nFormat = SotClipboardFormatId::FILEGRPDESCRIPTOR ) || rData.HasFormat( nFormat = SotClipboardFormatId::UNIFORMRESOURCELOCATOR )) { - INetBookmark aBkmk = INetBookmark(OUString(), OUString()); + INetBookmark aBkmk { OUString(), OUString() }; if (rData.GetINetBookmark(nFormat, aBkmk)) sFileName = aBkmk.GetURL(); } |