[Libreoffice-commits] core.git: include/tools tools/source vcl/source
include/tools/debug.hxx |4 ++-- tools/source/debug/debug.cxx |2 +- vcl/source/app/svmain.cxx|2 +- 3 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 9cceba9a928cf3b3447f293020be2fe76c035ed5 Author: Noel Grandin AuthorDate: Fri Jul 27 10:13:19 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:58:59 2018 +0200 make DBG_TESTSOLARMUTEX available in assert builds where our QA people are more likely to trigger it Change-Id: I4ce7c8c72e7e21f2296c0f9cc9f019aaef32ed0b Reviewed-on: https://gerrit.libreoffice.org/58170 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/tools/debug.hxx b/include/tools/debug.hxx index 3f5d68a670e4..3fa2d5f9460a 100644 --- a/include/tools/debug.hxx +++ b/include/tools/debug.hxx @@ -35,7 +35,8 @@ standard assert. */ -#ifdef DBG_UTIL +#ifndef NDEBUG +// we want the solar mutex checking to be enabled in the assert-enabled builds that the QA people use typedef void (*DbgTestSolarMutexProc)(); @@ -49,7 +50,6 @@ do \ } while(false) #else -// NO DBG_UTIL #define DBG_TESTSOLARMUTEX() ((void)0) diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx index 220d577be52d..9f32eab3267c 100644 --- a/tools/source/debug/debug.cxx +++ b/tools/source/debug/debug.cxx @@ -45,7 +45,7 @@ #include #endif -#ifdef DBG_UTIL +#ifndef NDEBUG struct DebugData { diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index c2de4819b541..471abc951ffc 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -367,7 +367,7 @@ bool InitVCL() // Set exception handler pExceptionHandler = osl_addSignalHandler(VCLExceptionSignal_impl, nullptr); -#ifdef DBG_UTIL +#ifndef NDEBUG DbgGUIInitSolarMutexCheck(); #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/ooxmlexport/ooxmlexport3.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b3d28822a650166bb7ff5759499cd5ce0124f746 Author: Justin Luth AuthorDate: Mon Jul 30 09:39:53 2018 +0300 Commit: Justin Luth CommitDate: Mon Jul 30 08:42:42 2018 +0200 related tdf#72560 ooxmlexport3: fix tinderbox long -> sal_Int32 Change-Id: Ifb522c5488aeadc327116bef8a21adef16e3e711 Reviewed-on: https://gerrit.libreoffice.org/58300 Reviewed-by: Justin Luth Tested-by: Justin Luth diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx index b83bab3e136d..2a494a46e10d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx @@ -344,7 +344,7 @@ DECLARE_OOXMLEXPORT_TEST(testCalendar3, "calendar3.docx") // TableStyle:firstRow (for header rows 1 and 2) color and size overrides document rPrDefault uno::Reference xTable(getParagraphOrTable(1), uno::UNO_QUERY); uno::Reference xCell(xTable->getCellByName("A2"), uno::UNO_QUERY); -CPPUNIT_ASSERT_EQUAL(0x5B9BD5, getProperty(getRun(xCell,1), "CharColor")); +CPPUNIT_ASSERT_EQUAL(sal_Int32(0x5B9BD5), getProperty(getRun(xCell,1), "CharColor")); CPPUNIT_ASSERT_EQUAL(16.f, getProperty(getRun(xCell,1), "CharHeight")); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/ui/dbui/mmlayoutpage.cxx |6 +++--- sw/source/ui/dbui/mmlayoutpage.hxx |2 +- sw/source/ui/index/cnttab.cxx |4 ++-- sw/source/uibase/inc/swuicnttab.hxx |2 +- 4 files changed, 7 insertions(+), 7 deletions(-) New commits: commit 077b746be045a3918a55f21a687ba47dcb77702e Author: Noel Grandin AuthorDate: Fri Jul 27 09:27:36 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:22:53 2018 +0200 loplugin:useuniqueptr in SwTOXStylesTabPage Change-Id: I566ac5f9c334cfdfe879cdb0eef921fcc9a7be8d Reviewed-on: https://gerrit.libreoffice.org/58243 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 5680a394e160..a791bf0d341d 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -3649,7 +3649,7 @@ SwTOXStylesTabPage::~SwTOXStylesTabPage() void SwTOXStylesTabPage::dispose() { -delete m_pCurrentForm; +m_pCurrentForm.reset(); m_pLevelLB.clear(); m_pAssignBT.clear(); m_pParaLayLB.clear(); @@ -3670,7 +3670,7 @@ void SwTOXStylesTabPage::Reset( const SfxItemSet* rSet ) void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) { -m_pCurrentForm = new SwForm(GetForm()); +m_pCurrentForm.reset(new SwForm(GetForm())); m_pParaLayLB->Clear(); m_pLevelLB->Clear(); diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 522a0a1298c4..32bbdec0c218 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -453,7 +453,7 @@ class SwTOXStylesTabPage : public SfxTabPage VclPtr m_pStdBT; VclPtr m_pEditStyleBT; -SwForm* m_pCurrentForm; +std::unique_ptr m_pCurrentForm; DECL_LINK( EditStyleHdl, Button *, void ); DECL_LINK( StdHdl, Button*, void ); commit 7234541a7832c03ebd617a93d080e6cf8628a138 Author: Noel Grandin AuthorDate: Fri Jul 27 09:39:38 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:22:45 2018 +0200 loplugin:useuniqueptr in SwMailMergeLayoutPage Change-Id: Ia8411b8efa792fe06f25765a2aa4d479c66f1ec5 Reviewed-on: https://gerrit.libreoffice.org/58249 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 4fb050c0096d..23e6d7b845a2 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -123,8 +123,8 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) : xStore->storeToURL( m_sExampleURL, aValues ); Link aLink(LINK(this, SwMailMergeLayoutPage, PreviewLoadedHdl_Impl)); -m_pExampleFrame = new SwOneExampleFrame( *m_pExampleContainerWIN, -EX_SHOW_DEFAULT_PAGE, &aLink, &m_sExampleURL ); +m_pExampleFrame.reset( new SwOneExampleFrame( *m_pExampleContainerWIN, +EX_SHOW_DEFAULT_PAGE, &aLink, &m_sExampleURL ) ); m_pExampleContainerWIN->Show(false); @@ -165,7 +165,7 @@ SwMailMergeLayoutPage::~SwMailMergeLayoutPage() void SwMailMergeLayoutPage::dispose() { -delete m_pExampleFrame; +m_pExampleFrame.reset(); File::remove( m_sExampleURL ); m_pPosition.clear(); m_pAlignToBodyCB.clear(); diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx index c2e453fbab57..56be9e26f996 100644 --- a/sw/source/ui/dbui/mmlayoutpage.hxx +++ b/sw/source/ui/dbui/mmlayoutpage.hxx @@ -52,7 +52,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage VclPtrm_pZoomLB; -SwOneExampleFrame* m_pExampleFrame; +std::unique_ptr m_pExampleFrame; SwWrtShell* m_pExampleWrtShell; OUStringm_sExampleURL; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/ui/dbui/createaddresslistdialog.cxx|5 ++--- sw/source/ui/dbui/createaddresslistdialog.hxx|2 +- sw/source/ui/dbui/customizeaddresslistdialog.hxx |4 ++-- sw/source/ui/misc/titlepage.cxx |9 +++-- sw/source/uibase/inc/titlepage.hxx |2 +- 5 files changed, 9 insertions(+), 13 deletions(-) New commits: commit 15e7509e6781957bc82bc7ce7d0619179b126256 Author: Noel Grandin AuthorDate: Fri Jul 27 09:35:03 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:22:16 2018 +0200 loplugin:useuniqueptr in SwCreateAddressListDialog Change-Id: I4d118e6f4db66beb3553eeead2a36cbb8bec45be Reviewed-on: https://gerrit.libreoffice.org/58246 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index a43be61db108..0e3d04664e5a 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -497,7 +497,7 @@ SwCreateAddressListDialog::~SwCreateAddressListDialog() void SwCreateAddressListDialog::dispose() { -delete m_pCSVData; +m_pCSVData.reset(); m_pAddressControl.clear(); m_pNewPB.clear(); m_pDeletePB.clear(); @@ -570,8 +570,7 @@ IMPL_LINK(SwCreateAddressListDialog, CustomizeHdl_Impl, Button*, pButton, void) VclPtrInstance< SwCustomizeAddressListDialog > pDlg(pButton, *m_pCSVData); if(RET_OK == pDlg->Execute()) { -delete m_pCSVData; -m_pCSVData = pDlg->GetNewData(); +m_pCSVData = pDlg->ReleaseNewData(); m_pAddressControl->SetData(*m_pCSVData); m_pAddressControl->SetCurrentDataSet(m_pAddressControl->GetCurrentDataSet()); } diff --git a/sw/source/ui/dbui/createaddresslistdialog.hxx b/sw/source/ui/dbui/createaddresslistdialog.hxx index 81ecad7cb8ec..8961898dcb0d 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.hxx +++ b/sw/source/ui/dbui/createaddresslistdialog.hxx @@ -59,7 +59,7 @@ class SwCreateAddressListDialog : public SfxModalDialog OUStringm_sAddressListFilterName; OUStringm_sURL; -SwCSVData* m_pCSVData; +std::unique_ptr m_pCSVData; VclPtr m_pFindDlg; DECL_LINK(NewHdl_Impl, Button*, void); diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hxx b/sw/source/ui/dbui/customizeaddresslistdialog.hxx index aaf120f71c4f..a138d83ddf94 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.hxx +++ b/sw/source/ui/dbui/customizeaddresslistdialog.hxx @@ -37,7 +37,7 @@ class SwCustomizeAddressListDialog : public SfxModalDialog VclPtr m_pUpPB; VclPtr m_pDownPB; -SwCSVData* m_pNewData; +std::unique_ptr m_pNewData; DECL_LINK(AddRenameHdl_Impl, Button*, void); DECL_LINK(DeleteHdl_Impl, Button*, void); @@ -50,7 +50,7 @@ public: virtual ~SwCustomizeAddressListDialog() override; virtual void dispose() override; -SwCSVData*GetNewData() { return m_pNewData;} +std::unique_ptr ReleaseNewData() { return std::move(m_pNewData);} }; class SwAddRenameEntryDialog : public SfxModalDialog commit 951cf8e6cf2d5e5fc2c3c760ef5df2cadb04aea4 Author: Noel Grandin AuthorDate: Fri Jul 27 09:31:48 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:22:07 2018 +0200 loplugin:useuniqueptr in SwTitlePageDlg Change-Id: I8e68950b311e78dd7bb71d282728a92f98bcccbb Reviewed-on: https://gerrit.libreoffice.org/58245 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index 36034678463b..7415b6be78c3 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -28,7 +28,7 @@ namespace { -bool lcl_GetPageDesc(SwWrtShell *pSh, sal_uInt16 &rPageNo, const SwFormatPageDesc **ppPageFormatDesc) +bool lcl_GetPageDesc(SwWrtShell *pSh, sal_uInt16 &rPageNo, std::unique_ptr* ppPageFormatDesc) { bool bRet = false; SfxItemSet aSet( pSh->GetAttrPool(), svl::Items{} ); @@ -41,7 +41,7 @@ namespace if (oNumOffset) rPageNo = oNumOffset.get(); if (ppPageFormatDesc) -(*ppPageFormatDesc) = static_cast(pItem->Clone()); +ppPageFormatDesc->reset(static_cast(pItem->Clone())); bRet = true; } } @@ -54,7 +54,7 @@ namespace const size_t nCurIdx = pSh->GetCurPageDesc(); const SwPageDesc &rCurrentDesc = pSh->GetPageDesc( nCurIdx ); -const SwFormatPageDesc *pPageFormatDesc(nullptr); +std::unique_ptr pPageFormatDesc; sal_uInt16 nDontCare; lcl_GetPageDesc(pSh, nDontCare, &pPageFormatDesc); @@ -97,8 +97,6 @@ namespace if (nPgNo) aPageFormatDesc.SetNumOffset(nPgNo); pSh->SetAttrItem(aPageFormatDesc); } -
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/ui/dbui/dbinsdlg.cxx | 23 ++- sw/source/ui/dbui/mmoutputtypepage.cxx |2 +- sw/source/ui/inc/mmresultdialogs.hxx |2 +- sw/source/uibase/inc/dbinsdlg.hxx |4 ++-- 4 files changed, 14 insertions(+), 17 deletions(-) New commits: commit fe7bea05bb5ddcb0eacddc72fdb0f8689d01ed75 Author: Noel Grandin AuthorDate: Fri Jul 27 09:38:24 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:22:30 2018 +0200 loplugin:useuniqueptr in SwSendMailDialog Change-Id: I653066c25fd627d98e63f7ae94a56954c9c01583 Reviewed-on: https://gerrit.libreoffice.org/58248 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index d66ba8126a94..9bf6e97400f8 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -309,7 +309,7 @@ void SwSendMailDialog::dispose() { } } -delete m_pImpl; +m_pImpl.reset(); m_pStatus.disposeAndClear(); m_pTransferStatus.clear(); m_pPaused.clear(); diff --git a/sw/source/ui/inc/mmresultdialogs.hxx b/sw/source/ui/inc/mmresultdialogs.hxx index d391f34a50f9..b23705100f41 100644 --- a/sw/source/ui/inc/mmresultdialogs.hxx +++ b/sw/source/ui/inc/mmresultdialogs.hxx @@ -179,7 +179,7 @@ class SwSendMailDialog : public Dialog boolm_bCancel; boolm_bDestructionEnabled; -SwSendMailDialog_Impl* m_pImpl; +std::unique_ptr m_pImpl; SwMailMergeConfigItem* m_pConfigItem; sal_Int32 m_nExpectedCount; sal_Int32 m_nSendCount; commit 818b837790c0807e508fc1246df3d2e07520529f Author: Noel Grandin AuthorDate: Fri Jul 27 09:37:11 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:22:26 2018 +0200 loplugin:useuniqueptr in SwInsertDBColAutoPilot Change-Id: Ida2be4abdeb6788ec9074a81c927e99e633ce394 Reviewed-on: https://gerrit.libreoffice.org/58247 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 42d6728c880c..33ab1ede2128 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -416,8 +416,8 @@ SwInsertDBColAutoPilot::~SwInsertDBColAutoPilot() void SwInsertDBColAutoPilot::dispose() { -delete pTableSet; -delete pRep; +pTableSet.reset(); +pRep.reset(); m_xTAutoFormat.reset(); m_pRbAsTable.clear(); @@ -659,7 +659,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TableFormatHdl, Button*, pButton, void ) if( !pTableSet ) { bNewSet = true; -pTableSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() ); +pTableSet.reset(new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() )); // At first acquire the simple attributes pTableSet->Put( SfxStringItem( FN_PARAM_TABLE_NAME, rSh.GetUniqueTableName() )); @@ -721,12 +721,12 @@ IMPL_LINK( SwInsertDBColAutoPilot, TableFormatHdl, Button*, pButton, void ) SwTabCols aTabCols; aTabCols.SetRight( nWidth ); aTabCols.SetRightMax( nWidth ); -pRep = new SwTableRep( aTabCols ); +pRep.reset(new SwTableRep( aTabCols )); pRep->SetAlign( text::HoriOrientation::NONE ); pRep->SetSpace( nWidth ); pRep->SetWidth( nWidth ); pRep->SetWidthPercent( 100 ); -pTableSet->Put( SwPtrItem( FN_TABLE_REP, pRep )); +pTableSet->Put( SwPtrItem( FN_TABLE_REP, pRep.get() )); pTableSet->Put( SfxUInt16Item( SID_HTML_MODE, ::GetHtmlMode( pView->GetDocShell() ))); @@ -749,27 +749,24 @@ IMPL_LINK( SwInsertDBColAutoPilot, TableFormatHdl, Button*, pButton, void ) aTabCols.Insert( nStep*(n+1), false, n ); } } -delete pRep; -pRep = new SwTableRep( aTabCols ); +pRep.reset(new SwTableRep( aTabCols )); pRep->SetAlign( text::HoriOrientation::NONE ); pRep->SetSpace( nWidth ); pRep->SetWidth( nWidth ); pRep->SetWidthPercent( 100 ); -pTableSet->Put( SwPtrItem( FN_TABLE_REP, pRep )); +pTableSet->Put( SwPtrItem( FN_TABLE_REP, pRep.get() )); } SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); -ScopedVclPtr pDlg(pFact->CreateSwTableTabDlg(pButton, pTableSet, &rSh)); +ScopedVclPtr pDlg(pFact->CreateSwTableTabDlg(pButton, pTableSet.get(), &rSh)); if( RET_OK == pDlg->Execute() ) pTableSet->Put( *pDlg->GetOutputItemSet() ); else if( bNewSet ) { -delete pTableSet; -pTableSet = nullptr; -delete pRep; -pRep = nullptr; +pTableSet.reset(); +pRep.reset(); } } diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx index 2
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/ui/misc/num.cxx|6 +++--- sw/source/ui/misc/swmodalredlineacceptdlg.cxx|4 ++-- sw/source/uibase/inc/num.hxx |2 +- sw/source/uibase/inc/swmodalredlineacceptdlg.hxx |2 +- 4 files changed, 7 insertions(+), 7 deletions(-) New commits: commit 133a6a877ed48f1ef778a9ff387dda1f0dbcaa7f Author: Noel Grandin AuthorDate: Fri Jul 27 09:28:46 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:21:58 2018 +0200 loplugin:useuniqueptr in SwModalRedlineAcceptDlg Change-Id: I3c22604a838406d88a324381affbf72d6608235d Reviewed-on: https://gerrit.libreoffice.org/58244 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx index 10a02b05cd9c..a3f336dc5a30 100644 --- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx +++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx @@ -43,7 +43,7 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(vcl::Window *pParent) : SfxModalDialog(pParent, "AcceptRejectChangesDialog", "svx/ui/acceptrejectchangesdialog.ui") { -pImplDlg = new SwRedlineAcceptDlg(this, this, get_content_area(), true); +pImplDlg.reset( new SwRedlineAcceptDlg(this, this, get_content_area(), true) ); pImplDlg->Initialize(GetExtraData()); pImplDlg->Activate(); // for data's initialisation @@ -59,7 +59,7 @@ void SwModalRedlineAcceptDlg::dispose() AcceptAll(false); // refuse everything remaining pImplDlg->FillInfo(GetExtraData()); -delete pImplDlg; +pImplDlg.reset(); SfxModalDialog::dispose(); } diff --git a/sw/source/uibase/inc/swmodalredlineacceptdlg.hxx b/sw/source/uibase/inc/swmodalredlineacceptdlg.hxx index ca64cf0ba40b..6fc6032c538e 100644 --- a/sw/source/uibase/inc/swmodalredlineacceptdlg.hxx +++ b/sw/source/uibase/inc/swmodalredlineacceptdlg.hxx @@ -25,7 +25,7 @@ class SwRedlineAcceptDlg; class SwModalRedlineAcceptDlg : public SfxModalDialog { -SwRedlineAcceptDlg* pImplDlg; +std::unique_ptr pImplDlg; public: SwModalRedlineAcceptDlg(vcl::Window *pParent); commit c5adc20d4017d12172d861e7c1165e79c2ce93bf Author: Noel Grandin AuthorDate: Fri Jul 27 09:25:42 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:21:49 2018 +0200 loplugin:useuniqueptr in SwNumPositionTabPage Change-Id: Ie0ad1694df7429080f2a296bb72370c6e70c97d4 Reviewed-on: https://gerrit.libreoffice.org/58242 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 69e0261c494f..89d748a826ef 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -141,7 +141,7 @@ SwNumPositionTabPage::~SwNumPositionTabPage() void SwNumPositionTabPage::dispose() { -delete pActNum; +pActNum.reset(); pOutlineDlg = nullptr; SfxTabPage::dispose(); } @@ -434,10 +434,10 @@ void SwNumPositionTabPage::Reset( const SfxItemSet* rSet ) } if(!pActNum) -pActNum = new SwNumRule(*pSaveNum); +pActNum.reset(new SwNumRule(*pSaveNum)); else if(*pSaveNum != *pActNum) *pActNum = *pSaveNum; -m_aPreviewWIN.SetNumRule(pActNum); +m_aPreviewWIN.SetNumRule(pActNum.get()); InitPosAndSpaceMode(); ShowControlsDependingOnPosAndSpaceMode(); InitControls(); diff --git a/sw/source/uibase/inc/num.hxx b/sw/source/uibase/inc/num.hxx index d17a6894647e..f1849b17f2c5 100644 --- a/sw/source/uibase/inc/num.hxx +++ b/sw/source/uibase/inc/num.hxx @@ -37,7 +37,7 @@ class SwOutlineTabDialog; class SwNumPositionTabPage : public SfxTabPage { -SwNumRule* pActNum; +std::unique_ptr pActNum; SwNumRule* pSaveNum; SwWrtShell* pWrtSh; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/ui/index/cnttab.cxx |8 sw/source/uibase/inc/swuicnttab.hxx |4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 466d6d77f08a46f7801ba3b9771c25c2eb2a7902 Author: Noel Grandin AuthorDate: Fri Jul 27 08:57:34 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:21:27 2018 +0200 loplugin:useuniqueptr in SwTOXSelectTabPage Change-Id: Idfc3298ef74a3bdde55f2091dc035c5133413dd2 Reviewed-on: https://gerrit.libreoffice.org/58241 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 48517308463e..5680a394e160 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -816,7 +816,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r get(m_pLanguageLB, "lang"); get(m_pSortAlgorithmLB, "keytype"); -pIndexEntryWrapper = new IndexEntrySupplierWrapper(); +pIndexEntryWrapper.reset(new IndexEntrySupplierWrapper()); m_pLanguageLB->SetLanguageList( SvxLanguageListFlags::ALL | SvxLanguageListFlags::ONLY_KNOWN, false ); @@ -877,8 +877,8 @@ SwTOXSelectTabPage::~SwTOXSelectTabPage() void SwTOXSelectTabPage::dispose() { -delete pIndexRes; -delete pIndexEntryWrapper; +pIndexRes.reset(); +pIndexEntryWrapper.reset(); m_pTitleED.clear(); m_pTypeFT.clear(); m_pTypeLB.clear(); @@ -1416,7 +1416,7 @@ void SwTOXSelectTabPage::LanguageHdl( ListBox const * pBox ) Sequence< OUString > aSeq = pIndexEntryWrapper->GetAlgorithmList( aLcl ); if( !pIndexRes ) -pIndexRes = new IndexEntryResource(); +pIndexRes.reset(new IndexEntryResource()); OUString sOldString; void* pUserData; diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 0941e1bab00c..522a0a1298c4 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -190,7 +190,7 @@ class SwTOXSelectTabPage : public SfxTabPage VclPtr m_pLanguageLB; VclPtrm_pSortAlgorithmLB; -IndexEntryResource* pIndexRes; +std::unique_ptr pIndexRes; OUStringaStyleArr[MAXLEVEL]; OUStringsAutoMarkURL; @@ -198,7 +198,7 @@ class SwTOXSelectTabPage : public SfxTabPage OUStringsAddStyleUser; OUStringsAddStyleContent; -const IndexEntrySupplierWrapper* pIndexEntryWrapper; +std::unique_ptr pIndexEntryWrapper; boolm_bWaitingInitialSettings; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/ui/index/cntex.cxx| 22 +- sw/source/ui/index/cnttab.cxx | 76 ++-- sw/source/ui/misc/glossary.cxx |6 +- sw/source/uibase/inc/glossary.hxx |2 sw/source/uibase/inc/swuicnttab.hxx | 17 5 files changed, 56 insertions(+), 67 deletions(-) New commits: commit 47220de23b44aacf2bf3a1eff592972c3d1da2fc Author: Noel Grandin AuthorDate: Thu Jul 26 16:39:41 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:21:19 2018 +0200 loplugin:useuniqueptr in SwGlossaryDlg Change-Id: I46df74af9eae2cedc7121d6454e92faf03321c63 Reviewed-on: https://gerrit.libreoffice.org/58240 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index a7badfffdfea..386377e6c476 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -247,7 +247,7 @@ SwGlossaryDlg::~SwGlossaryDlg() void SwGlossaryDlg::dispose() { m_pCategoryBox->Clear(); -delete pExampleFrame; +pExampleFrame.reset(); m_pInsertTipCB.clear(); m_pNameED.clear(); m_pShortNameLbl.clear(); @@ -1067,8 +1067,8 @@ void SwGlossaryDlg::ShowPreview() if (!pExampleFrame) { Link aLink(LINK(this, SwGlossaryDlg, PreviewLoadedHdl)); -pExampleFrame = new SwOneExampleFrame( *m_pExampleWIN, -EX_SHOW_ONLINE_LAYOUT, &aLink ); +pExampleFrame.reset(new SwOneExampleFrame( *m_pExampleWIN, +EX_SHOW_ONLINE_LAYOUT, &aLink )); } ShowAutoText(::GetCurrGlosGroup(), m_pShortNameEdit->GetText()); diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx index d6bf120c5290..9b6e0b17dc28 100644 --- a/sw/source/uibase/inc/glossary.hxx +++ b/sw/source/uibase/inc/glossary.hxx @@ -106,7 +106,7 @@ class SwGlossaryDlg : public SvxStandardDialog OUStringsReadonlyPath; css::uno::Reference< css::text::XAutoTextContainer2 > m_xAutoText; -SwOneExampleFrame* pExampleFrame; +std::unique_ptr pExampleFrame; SwGlossaryHdl* pGlossaryHdl; commit c14b9ccc3d274644a721398edc7e336b5463cf81 Author: Noel Grandin AuthorDate: Thu Jul 26 16:37:13 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:21:10 2018 +0200 loplugin:useuniqueptr in SwMultiTOXTabDialog and use a std::vector and a custom struct for storing stuff instead of a rrays and a separate count field Change-Id: Ic1063ed0bfdc06f83a01d18503ccf6f9503f5b9d Reviewed-on: https://gerrit.libreoffice.org/58239 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 358bfb6e0094..5d796bcbda59 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -114,7 +114,7 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl, SwOneExampleFrame&, void { OUString sTmp = "IndexSection_" + OUString::number(i); uno::Any aSection = xSections->getByName( sTmp ); -aSection >>= m_pxIndexSectionsArray[i]->xContainerSection; +aSection >>= m_vTypeData[i].m_pxIndexSections->xContainerSection; } uno::Reference< text::XDocumentIndexesSupplier > xIdxSupp(xModel, uno::UNO_QUERY); uno::Reference< container::XIndexAccess > xIdxs = xIdxSupp->getDocumentIndexes(); @@ -154,17 +154,17 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( "com.sun.star.text.Bibliography" }; - OSL_ENSURE(m_pxIndexSectionsArray[nTOXIndex] && - m_pxIndexSectionsArray[nTOXIndex]->xContainerSection.is(), + OSL_ENSURE(m_vTypeData[nTOXIndex].m_pxIndexSections && + m_vTypeData[nTOXIndex].m_pxIndexSections->xContainerSection.is(), "Section not created"); uno::Reference< frame::XModel > & xModel = m_pExampleFrame->GetModel(); bool bInitialCreate = true; - if(!m_pxIndexSectionsArray[nTOXIndex]->xDocumentIndex.is()) + if(!m_vTypeData[nTOXIndex].m_pxIndexSections->xDocumentIndex.is()) { bInitialCreate = true; - if(!m_pxIndexSectionsArray[nTOXIndex]->xContainerSection.is()) + if(!m_vTypeData[nTOXIndex].m_pxIndexSections->xContainerSection.is()) throw uno::RuntimeException(); - uno::Reference< text::XTextRange > xAnchor = m_pxIndexSectionsArray[nTOXIndex]->xContainerSection->getAnchor(); + uno::Reference< text::XTextRange > xAnchor = m_vTypeData[nTOXIndex].m_pxIndexSections->xContainerSection->getAnchor(); xAnchor = xAnchor->getStart(); uno::Reference< text::XTextCursor > xCursor = xAnchor->getText()->createTextCursorByRange(xAnchor); @@ -172,21 +172,21 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang sw/source
compilerplugins/clang/useuniqueptr.cxx |6 ++ sw/source/ui/frmdlg/cption.cxx |2 +- sw/source/ui/frmdlg/frmpage.cxx|6 +++--- sw/source/uibase/inc/cption.hxx|2 +- sw/source/uibase/inc/frmpage.hxx |2 +- 5 files changed, 12 insertions(+), 6 deletions(-) New commits: commit cfe896e7b811d4c2777531efcca8065a0d2fbf54 Author: Noel Grandin AuthorDate: Thu Jul 26 16:22:07 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:21:01 2018 +0200 loplugin:useuniqueptr in SwGrfExtPage Change-Id: Ic71cf09b6a443f6918b074010fe53ea0843bf246 Reviewed-on: https://gerrit.libreoffice.org/58238 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/useuniqueptr.cxx b/compilerplugins/clang/useuniqueptr.cxx index ab254920b6c9..d93c40205a8d 100644 --- a/compilerplugins/clang/useuniqueptr.cxx +++ b/compilerplugins/clang/useuniqueptr.cxx @@ -110,6 +110,12 @@ public: // SfxObjectShell::pMedium if (fn == SRCDIR "/sfx2/source/doc/objxtor.cxx") return; +// various +if (fn == SRCDIR "/sw/source/filter/ww8/wrtww8.cxx") +return; +// WW8TabBandDesc +if (fn == SRCDIR "/sw/source/filter/ww8/ww8par2.cxx") +return; TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index a0d58c8a34d9..8925187a4a7a 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2406,7 +2406,7 @@ SwGrfExtPage::~SwGrfExtPage() void SwGrfExtPage::dispose() { -delete pGrfDlg; +pGrfDlg.reset(); m_pMirror.clear(); m_pMirrorVertBox.clear(); m_pMirrorHorzBox.clear(); @@ -2603,9 +2603,9 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl, Button*, void) { if(!pGrfDlg) { -pGrfDlg = new FileDialogHelper( +pGrfDlg.reset(new FileDialogHelper( ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW, -FileDialogFlags::Graphic, GetFrameWeld()); +FileDialogFlags::Graphic, GetFrameWeld())); pGrfDlg->SetTitle(get("linkframe")->get_label()); } pGrfDlg->SetDisplayDirectory( m_pConnectED->GetText() ); diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx index 1b191e0e2279..6196cb3409da 100644 --- a/sw/source/uibase/inc/frmpage.hxx +++ b/sw/source/uibase/inc/frmpage.hxx @@ -222,7 +222,7 @@ class SwGrfExtPage: public SfxTabPage OUStringaFilterName; OUStringaGrfName, aNewGrfName; -::sfx2::FileDialogHelper* pGrfDlg; +std::unique_ptr<::sfx2::FileDialogHelper> pGrfDlg; boolbHtmlMode; commit 95d7dc537e8979b67ed0928237404fd552880095 Author: Noel Grandin AuthorDate: Thu Jul 26 16:18:04 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:20:53 2018 +0200 loplugin:useuniqueptr in SwCaptionDialog Change-Id: Ibf49f18ed43bb24a3ef79a0c7862b0dbd2698f3d Reviewed-on: https://gerrit.libreoffice.org/58237 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 1d62d1277e20..cc42c9a993f3 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -418,7 +418,7 @@ SwCaptionDialog::~SwCaptionDialog() void SwCaptionDialog::dispose() { -delete pMgr; +pMgr.reset(); m_pTextEdit.clear(); m_pCategoryBox.clear(); m_pFormatText.clear(); diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx index 037debb11369..abf3855c52e1 100644 --- a/sw/source/uibase/inc/cption.hxx +++ b/sw/source/uibase/inc/cption.hxx @@ -58,7 +58,7 @@ class SwCaptionDialog : public SvxStandardDialog VclPtr m_pPreview; SwView &rView; // search per active, avoid View -SwFieldMgr *pMgr; // pointer to save the include +std::unique_ptr pMgr; // pointer to save the include OUString sCharacterStyle; bool bCopyAttributes; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/ui/fldui/javaedit.cxx | 10 +- sw/source/uibase/inc/javaedit.hxx |4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) New commits: commit dbaad8f46631e0e294d487bd215c5fb89ec1b962 Author: Noel Grandin AuthorDate: Thu Jul 26 15:21:58 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:20:10 2018 +0200 loplugin:useuniqueptr in SwJavaEditDialog Change-Id: Iccd0cafdc6ac454f125da0f5a1df214d2463a2c5 Reviewed-on: https://gerrit.libreoffice.org/58234 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index 1088cb693d17..02c649984936 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -63,7 +63,7 @@ SwJavaEditDialog::SwJavaEditDialog(weld::Window* pParent, SwWrtShell* pWrtSh) m_xEditRB->connect_clicked(aLk); m_xUrlPB->connect_clicked(LINK(this, SwJavaEditDialog, InsertFileHdl)); -m_pMgr = new SwFieldMgr(m_pSh); +m_pMgr.reset(new SwFieldMgr(m_pSh)); m_pField = static_cast(m_pMgr->GetCurField()); m_bNew = !(m_pField && m_pField->GetTyp()->Which() == SwFieldIds::Script); @@ -79,8 +79,8 @@ SwJavaEditDialog::SwJavaEditDialog(weld::Window* pParent, SwWrtShell* pWrtSh) SwJavaEditDialog::~SwJavaEditDialog() { m_pSh->EnterStdMode(); -delete m_pMgr; -delete m_pFileDlg; +m_pMgr.reset(); +m_pFileDlg.reset(); } IMPL_LINK_NOARG(SwJavaEditDialog, PrevHdl, weld::Button&, void) @@ -225,9 +225,9 @@ IMPL_LINK_NOARG( SwJavaEditDialog, InsertFileHdl, weld::Button&, void ) { if (!m_pFileDlg) { -m_pFileDlg = new ::sfx2::FileDialogHelper( +m_pFileDlg.reset(new ::sfx2::FileDialogHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, -FileDialogFlags::Insert, "swriter", SfxFilterFlags::NONE, SfxFilterFlags::NONE, m_xDialog.get()); +FileDialogFlags::Insert, "swriter", SfxFilterFlags::NONE, SfxFilterFlags::NONE, m_xDialog.get())); } m_pFileDlg->StartExecuteModal( LINK( this, SwJavaEditDialog, DlgClosedHdl ) ); diff --git a/sw/source/uibase/inc/javaedit.hxx b/sw/source/uibase/inc/javaedit.hxx index ccd83e3ecb9f..2a801ee1f770 100644 --- a/sw/source/uibase/inc/javaedit.hxx +++ b/sw/source/uibase/inc/javaedit.hxx @@ -37,9 +37,9 @@ private: bool m_bIsUrl; SwScriptField* m_pField; -SwFieldMgr* m_pMgr; +std::unique_ptr m_pMgr; SwWrtShell* m_pSh; -sfx2::FileDialogHelper* m_pFileDlg; +std::unique_ptr m_pFileDlg; std::unique_ptrm_xTypeED; std::unique_ptr m_xUrlRB; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/ui/frmdlg/column.cxx | 47 +++- sw/source/uibase/inc/column.hxx |8 +++--- 2 files changed, 27 insertions(+), 28 deletions(-) New commits: commit aa8182383eaf25e296c4c104c63feb164f90e426 Author: Noel Grandin AuthorDate: Thu Jul 26 16:16:37 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:20:43 2018 +0200 loplugin:useuniqueptr in SwColumnPage Change-Id: I36cd9ba0c64073ae09d8ab8e2119d1404cbb02f1 Reviewed-on: https://gerrit.libreoffice.org/58236 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 16aa1ed8420c..8232edfca584 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -382,7 +382,7 @@ void SwColumnPage::ResetColWidth() { if( m_nCols ) { -const sal_uInt16 nWidth = GetMaxWidth( m_pColMgr, m_nCols ) / m_nCols; +const sal_uInt16 nWidth = GetMaxWidth( m_pColMgr.get(), m_nCols ) / m_nCols; for(sal_uInt16 i = 0; i < m_nCols; ++i) m_nColWidth[i] = static_cast(nWidth); @@ -523,7 +523,7 @@ SwColumnPage::~SwColumnPage() void SwColumnPage::dispose() { -delete m_pColMgr; +m_pColMgr.reset(); m_pCLNrEdt.clear(); m_pDefaultVS.clear(); m_pBalanceColsCB.clear(); @@ -589,8 +589,7 @@ void SwColumnPage::Reset(const SfxItemSet *rSet) m_aDistEd1.SetPrcntValue(50, FUNIT_CM); m_aDistEd2.SetPrcntValue(50, FUNIT_CM); -delete m_pColMgr; -m_pColMgr = new SwColMgr(*rSet); +m_pColMgr.reset(new SwColMgr(*rSet)); m_nCols = m_pColMgr->GetCount() ; m_pCLNrEdt->SetMax(std::max(static_cast(m_pCLNrEdt->GetMax()), m_nCols)); m_pCLNrEdt->SetLast(std::max(m_nCols,static_cast(m_pCLNrEdt->GetMax(; @@ -1244,7 +1243,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) } } m_pFrameExampleWN->Hide(); -m_pPgeExampleWN->UpdateExample( rSet, m_pColMgr ); +m_pPgeExampleWN->UpdateExample( rSet, m_pColMgr.get() ); m_pPgeExampleWN->Show(); } diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx index 2f1b911ac35a..b72bc00180d6 100644 --- a/sw/source/uibase/inc/column.hxx +++ b/sw/source/uibase/inc/column.hxx @@ -121,7 +121,7 @@ class SwColumnPage : public SfxTabPage VclPtr m_pPgeExampleWN; VclPtr m_pFrameExampleWN; -SwColMgr* m_pColMgr; +std::unique_ptr m_pColMgr; sal_uInt16 m_nFirstVis; sal_uInt16 m_nCols; commit 6645a78104da18e23e476218343161c62dbc6a40 Author: Noel Grandin AuthorDate: Thu Jul 26 16:14:16 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:20:36 2018 +0200 loplugin:useuniqueptr in SwColumnDlg Change-Id: I115ee37ce3fffa26bbaf011ae2c5aa3427059b5e Reviewed-on: https://gerrit.libreoffice.org/58235 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 37736e641ab7..16aa1ed8420c 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -115,17 +115,17 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh) m_nSelectionWidth = rSh.GetSectionWidth(*pCurrSection->GetFormat()); if ( !m_nSelectionWidth ) m_nSelectionWidth = USHRT_MAX; -m_pSectionSet = new SfxItemSet( m_rWrtShell.GetAttrPool(), aSectIds ); +m_pSectionSet.reset( new SfxItemSet( m_rWrtShell.GetAttrPool(), aSectIds ) ); m_pSectionSet->Put( pCurrSection->GetFormat()->GetAttrSet() ); -pColPgSet = m_pSectionSet; +pColPgSet = m_pSectionSet.get(); } if( m_rWrtShell.HasSelection() && m_rWrtShell.IsInsRegionAvailable() && ( !pCurrSection || ( 1 != nFullSectCnt && IsMarkInSameSection( m_rWrtShell, pCurrSection ) ))) { -m_pSelectionSet = new SfxItemSet( m_rWrtShell.GetAttrPool(), aSectIds ); -pColPgSet = m_pSelectionSet; +m_pSelectionSet.reset( new SfxItemSet( m_rWrtShell.GetAttrPool(), aSectIds ) ); +pColPgSet = m_pSelectionSet.get(); } if( m_rWrtShell.GetFlyFrameFormat() ) @@ -140,12 +140,12 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh) const SwPageDesc* pPageDesc = m_rWrtShell.GetSelectedPageDescs(); if( pPageDesc ) { -m_pPageSet = new SfxItemSet( +m_pPageSet.reset( new SfxItemSet( m_rWrtShell.GetAttrPool(), svl::Items< RES_FRM_SIZE, RES_FRM_SIZE, RES_LR_SPACE, RES_LR_SPACE, -RES_COL, RES_COL>{}); +RES_COL, RES_COL>{}) ); const SwFrameFormat &rFormat = pPageDesc->GetMaster(); m_nPageWidth = rFormat.GetFrameSize().GetSize().Width(); @@ -156,7 +156,7 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh) m_pPageSet->Put(
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/ui/dialog/uiregionsw.cxx |5 ++--- sw/source/ui/envelp/label1.cxx |2 +- sw/source/uibase/inc/label.hxx |2 +- sw/source/uibase/inc/regionsw.hxx |2 +- 4 files changed, 5 insertions(+), 6 deletions(-) New commits: commit 9b7c875440d473aa914962d3a602b652722d30e8 Author: Noel Grandin AuthorDate: Thu Jul 26 15:20:02 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:20:02 2018 +0200 loplugin:useuniqueptr in SwLabDlg Change-Id: Ie2a54b88e821041ecea6c84ea402486a76ba1f31 Reviewed-on: https://gerrit.libreoffice.org/58233 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index b4e8de82bac9..d7eadfdce5c1 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -163,7 +163,7 @@ SwLabDlg::SwLabDlg(weld::Window* pParent, const SfxItemSet& rSet, SwLabDlg::~SwLabDlg() { -delete m_pRecs; +m_pRecs.reset(); } void SwLabDlg::GetLabItem(SwLabItem &rItem) diff --git a/sw/source/uibase/inc/label.hxx b/sw/source/uibase/inc/label.hxx index fdb099cc24e6..a0471ceaafc9 100644 --- a/sw/source/uibase/inc/label.hxx +++ b/sw/source/uibase/inc/label.hxx @@ -38,7 +38,7 @@ class SwLabDlg : public SfxTabDialogController std::vector aTypeIds; std::vector aMakes; -SwLabRecs* m_pRecs; +std::unique_ptr m_pRecs; OUString aLstGroup; OUString m_sBusinessCardDlg; bool m_bLabel; commit c6b23dbf3deec12a5da71b2e310b80ccb8ef0ff9 Author: Noel Grandin AuthorDate: Thu Jul 26 15:18:07 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:19:52 2018 +0200 loplugin:useuniqueptr in SwInsertSectionTabPage Change-Id: I22ffd16c26c837c8989d9c1875e5f809695ea27c Reviewed-on: https://gerrit.libreoffice.org/58232 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index a97185831b97..bbf7f3c6838a 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1555,7 +1555,7 @@ SwInsertSectionTabPage::~SwInsertSectionTabPage() void SwInsertSectionTabPage::dispose() { -delete m_pDocInserter; +m_pDocInserter.reset(); m_pCurName.clear(); m_pFileCB.clear(); m_pDDECB.clear(); @@ -1771,8 +1771,7 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void ) IMPL_LINK_NOARG(SwInsertSectionTabPage, FileSearchHdl, Button*, void) { -delete m_pDocInserter; -m_pDocInserter = new ::sfx2::DocumentInserter(GetFrameWeld(), "swriter"); +m_pDocInserter.reset(new ::sfx2::DocumentInserter(GetFrameWeld(), "swriter")); m_pDocInserter->StartExecuteModal( LINK( this, SwInsertSectionTabPage, DlgClosedHdl ) ); } diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx index 7e9b9deaefb2..8f44ea17fbd3 100644 --- a/sw/source/uibase/inc/regionsw.hxx +++ b/sw/source/uibase/inc/regionsw.hxx @@ -163,7 +163,7 @@ class SwInsertSectionTabPage : public SfxTabPage css::uno::Sequence m_aNewPasswd; SwWrtShell* m_pWrtSh; -sfx2::DocumentInserter* m_pDocInserter; +std::unique_ptr m_pDocInserter; DECL_LINK( ChangeHideHdl, Button *, void ); DECL_LINK( ChangeProtectHdl, Button *, void ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/ui/chrdlg/chardlg.cxx |4 ++-- sw/source/ui/config/mailconfigpage.cxx |2 +- sw/source/ui/dialog/macassgn.cxx|4 ++-- sw/source/uibase/inc/chrdlg.hxx |2 +- sw/source/uibase/inc/macassgn.hxx |2 +- sw/source/uibase/inc/mailconfigpage.hxx |2 +- 6 files changed, 8 insertions(+), 8 deletions(-) New commits: commit cecb480b91688567f5f0f91568ceecd53835f46a Author: Noel Grandin AuthorDate: Thu Jul 26 15:08:26 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:19:09 2018 +0200 loplugin:useuniqueptr in SwMailConfigPage Change-Id: I3fad75babc11a6fec0d94c1cf0380277a43f0fdb Reviewed-on: https://gerrit.libreoffice.org/58227 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index 1038a54c6358..b7752e853e7d 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -137,7 +137,7 @@ SwMailConfigPage::~SwMailConfigPage() void SwMailConfigPage::dispose() { -delete m_pConfigItem; +m_pConfigItem.reset(); m_pDisplayNameED.clear(); m_pAddressED.clear(); m_pReplyToCB.clear(); diff --git a/sw/source/uibase/inc/mailconfigpage.hxx b/sw/source/uibase/inc/mailconfigpage.hxx index 85466b507282..697bebb26827 100644 --- a/sw/source/uibase/inc/mailconfigpage.hxx +++ b/sw/source/uibase/inc/mailconfigpage.hxx @@ -48,7 +48,7 @@ class SwMailConfigPage : public SfxTabPage VclPtr m_pServerAuthenticationPB; VclPtr m_pTestPB; -SwMailMergeConfigItem* m_pConfigItem; +std::unique_ptr m_pConfigItem; DECL_LINK(ReplyToHdl, Button*, void); DECL_LINK(AuthenticationHdl, Button*, void); commit df7adbfc158f182e9111ade5cde45fc860f0275e Author: Noel Grandin AuthorDate: Thu Jul 26 14:35:03 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:19:02 2018 +0200 loplugin:useuniqueptr in SwCharURLPage Change-Id: I19cb7ba6ce32fef43691db2c994fd79fee76fb46 Reviewed-on: https://gerrit.libreoffice.org/58226 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index ce27eae7dcfa..716d88528121 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -185,7 +185,7 @@ SwCharURLPage::~SwCharURLPage() void SwCharURLPage::dispose() { -delete pINetItem; +pINetItem.reset(); SfxTabPage::dispose(); } @@ -221,7 +221,7 @@ void SwCharURLPage::Reset(const SfxItemSet* rSet) m_xVisitedLB->save_value(); m_xNotVisitedLB->save_value(); m_xTargetFrameLB->save_value(); -pINetItem = new SvxMacroItem(FN_INET_FIELD_MACRO); +pINetItem.reset( new SvxMacroItem(FN_INET_FIELD_MACRO) ); if( pINetFormat->GetMacroTable() ) pINetItem->SetMacroTable(*pINetFormat->GetMacroTable()); diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 7b192f89c2cb..ec1c51062a99 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -105,13 +105,13 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType ) } bool SwMacroAssignDlg::INetFormatDlg( vcl::Window* pParent, SwWrtShell& rSh, -SvxMacroItem*& rpINetItem ) +std::unique_ptr& rpINetItem ) { bool bRet = false; SfxItemSet aSet( rSh.GetAttrPool(), svl::Items{} ); SvxMacroItem aItem( RES_FRMMACRO ); if( !rpINetItem ) -rpINetItem = new SvxMacroItem( RES_FRMMACRO ); +rpINetItem.reset(new SvxMacroItem( RES_FRMMACRO )); else aItem.SetMacroTable( rpINetItem->GetMacroTable() ); diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx index 10d00c645105..0f8ec43d9296 100644 --- a/sw/source/uibase/inc/chrdlg.hxx +++ b/sw/source/uibase/inc/chrdlg.hxx @@ -55,7 +55,7 @@ public: class SwCharURLPage : public SfxTabPage { -SvxMacroItem* pINetItem; +std::unique_ptr pINetItem; boolbModified; std::unique_ptr m_xURLED; diff --git a/sw/source/uibase/inc/macassgn.hxx b/sw/source/uibase/inc/macassgn.hxx index 1bb1800c295d..7437f094c9d2 100644 --- a/sw/source/uibase/inc/macassgn.hxx +++ b/sw/source/uibase/inc/macassgn.hxx @@ -39,7 +39,7 @@ class SwMacroAssignDlg public: static SfxEventNamesItem AddEvents( DlgEventType eType ); static bool INetFormatDlg( vcl::Window* pParent, SwWrtShell& rSh, -SvxMacroItem*& rpINetItem ); +std::unique_ptr& rpINetItem ); }; #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/ui/dialog/uiregionsw.cxx |5 ++--- sw/source/ui/envelp/envfmt.cxx | 12 ++-- sw/source/ui/envelp/envlop1.cxx|4 ++-- sw/source/uibase/inc/envlop.hxx|4 ++-- sw/source/uibase/inc/regionsw.hxx |2 +- 5 files changed, 13 insertions(+), 14 deletions(-) New commits: commit c695c3ca47338fa28428ea507a44713c0f3616ba Author: Noel Grandin AuthorDate: Thu Jul 26 15:16:51 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:19:44 2018 +0200 loplugin:useuniqueptr in SwEditRegionDlg Change-Id: I59137a86744db372c9067a1b88b76654016a1823 Reviewed-on: https://gerrit.libreoffice.org/58231 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 2a7a95027dac..a97185831b97 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -535,7 +535,7 @@ void SwEditRegionDlg::dispose() pEntry = m_pTree->Next( pEntry ); } -delete m_pDocInserter; +m_pDocInserter.reset(); m_pCurName.clear(); m_pTree.clear(); m_pFileCB.clear(); @@ -1040,8 +1040,7 @@ IMPL_LINK_NOARG(SwEditRegionDlg, FileSearchHdl, Button*, void) { if(!CheckPasswd()) return; -delete m_pDocInserter; -m_pDocInserter = new ::sfx2::DocumentInserter(GetFrameWeld(), "swriter"); +m_pDocInserter.reset(new ::sfx2::DocumentInserter(GetFrameWeld(), "swriter")); m_pDocInserter->StartExecuteModal( LINK( this, SwEditRegionDlg, DlgClosedHdl ) ); } diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx index 70f1e5b5e12c..7e9b9deaefb2 100644 --- a/sw/source/uibase/inc/regionsw.hxx +++ b/sw/source/uibase/inc/regionsw.hxx @@ -93,7 +93,7 @@ class SwEditRegionDlg : public SfxModalDialog SwWrtShell& rSh; SectReprs_t m_SectReprs; const SwSection*pCurrSect; -sfx2::DocumentInserter* m_pDocInserter; +std::unique_ptr m_pDocInserter; boolbDontCheckPasswd :1; commit 7fc64583c82f1ca545140fbde903a5cb19a97a06 Author: Noel Grandin AuthorDate: Thu Jul 26 15:15:20 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:19:33 2018 +0200 loplugin:useuniqueptr in SwEnvDlg Change-Id: Ie907974dcdeb6f7f30801fc502d919afdab734f3 Reviewed-on: https://gerrit.libreoffice.org/58230 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index 98834e3d443c..f44b0c00f108 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -321,7 +321,7 @@ void SwEnvFormatPage::Edit(const OString& rIdent, bool bSender) // A temporary Itemset that gets discarded at abort SfxItemSet *SwEnvFormatPage::GetCollItemSet(SwTextFormatColl const * pColl, bool bSender) { -SfxItemSet *&pAddrSet = bSender ? GetParentSwEnvDlg()->pSenderSet : GetParentSwEnvDlg()->pAddresseeSet; +std::unique_ptr& pAddrSet = bSender ? GetParentSwEnvDlg()->pSenderSet : GetParentSwEnvDlg()->pAddresseeSet; if (!pAddrSet) { // determine range (merge both Itemsets' ranges) @@ -346,12 +346,12 @@ SfxItemSet *SwEnvFormatPage::GetCollItemSet(SwTextFormatColl const * pColl, bool aVec2.insert(aVec2.end(), aVec.begin(), aVec.end()); std::unique_ptr pNewRanges(::lcl_convertListToRanges(aVec2)); -pAddrSet = new SfxItemSet(GetParentSwEnvDlg()->pSh->GetView().GetCurShell()->GetPool(), - pNewRanges.get()); +pAddrSet.reset(new SfxItemSet(GetParentSwEnvDlg()->pSh->GetView().GetCurShell()->GetPool(), + pNewRanges.get())); pAddrSet->Put(pColl->GetAttrSet()); } -return pAddrSet; +return pAddrSet.get(); } IMPL_LINK_NOARG(SwEnvFormatPage, FormatHdl, weld::ComboBoxText&, void) @@ -484,8 +484,8 @@ void SwEnvFormatPage::Reset(const SfxItemSet* rSet) setfieldval(*m_xSizeHeightField , std::min(rItem.m_nWidth, rItem.m_nHeight)); SetMinMax(); -DELETEZ(GetParentSwEnvDlg()->pSenderSet); -DELETEZ(GetParentSwEnvDlg()->pAddresseeSet); +GetParentSwEnvDlg()->pSenderSet.reset(); +GetParentSwEnvDlg()->pAddresseeSet.reset(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 756a61a6465d..730351caeca3 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -141,8 +141,8 @@ SwEnvDlg::SwEnvDlg(weld::Window* pParent, const SfxItemSet& rSet, SwEnvDlg::~SwEnvDlg() { -delete pAddresseeSet; -delete pSenderSet; +pAddresseeSet.reset(); +pSenderSet.reset(); } void SwEnvDlg::PageCreated(const OString& rId, SfxTabPage &rPage) diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx index 89ba397ed987..22a34fb997fa 100644 --- a/sw/source/uibase/inc
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/ui/config/optload.cxx |2 +- sw/source/ui/config/optpage.cxx | 18 -- sw/source/uibase/inc/optload.hxx |2 +- sw/source/uibase/inc/optpage.hxx |2 +- 4 files changed, 11 insertions(+), 13 deletions(-) New commits: commit 2d8634d236a1bc528ae5a3838556ff1b51e9deb7 Author: Noel Grandin AuthorDate: Thu Jul 26 15:12:18 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:19:25 2018 +0200 loplugin:useuniqueptr in SwStdFontTabPage Change-Id: I9ae756cfbdb1cd1f8a257d34b4e7045143bb92b9 Reviewed-on: https://gerrit.libreoffice.org/58229 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index a60459508964..6b9e7f86468e 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -522,7 +522,6 @@ SwStdFontTabPage::SwStdFontTabPage( vcl::Window* pParent, const SfxItemSet& rSet ) : SfxTabPage( pParent, "OptFontTabPage" , "modules/swriter/ui/optfonttabpage.ui" , &rSet), m_pPrt(nullptr), -m_pFontList(nullptr), m_pFontConfig(nullptr), m_pWrtShell(nullptr), m_eLanguage( GetAppLanguage() ), @@ -593,7 +592,7 @@ SwStdFontTabPage::~SwStdFontTabPage() void SwStdFontTabPage::dispose() { -delete m_pFontList; +m_pFontList.reset(); m_pLabelFT.clear(); m_pStandardBox.clear(); m_pStandardHeightLB.clear(); @@ -795,8 +794,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>{} ); m_pPrt = VclPtr::Create(std::move(pPrinterSet)); } -delete m_pFontList; -m_pFontList = new FontList( m_pPrt ); +m_pFontList.reset(new FontList( m_pPrt )); // #i94536# prevent duplication of font entries when 'reset' button is pressed if( !m_pStandardBox->GetEntryCount() ) { @@ -922,15 +920,15 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) m_pIdxBox->SetText(sIdxBackup ); FontMetric aFontMetric( m_pFontList->Get(sStdBackup, sStdBackup) ); -m_pStandardHeightLB->Fill( &aFontMetric, m_pFontList ); +m_pStandardHeightLB->Fill( &aFontMetric, m_pFontList.get() ); aFontMetric = m_pFontList->Get(sOutBackup, sOutBackup ); -m_pTitleHeightLB->Fill( &aFontMetric, m_pFontList ); +m_pTitleHeightLB->Fill( &aFontMetric, m_pFontList.get() ); aFontMetric = m_pFontList->Get(sListBackup,sListBackup); -m_pListHeightLB->Fill( &aFontMetric, m_pFontList ); +m_pListHeightLB->Fill( &aFontMetric, m_pFontList.get() ); aFontMetric = m_pFontList->Get(sCapBackup, sCapBackup ); -m_pLabelHeightLB->Fill( &aFontMetric, m_pFontList ); +m_pLabelHeightLB->Fill( &aFontMetric, m_pFontList.get() ); aFontMetric = m_pFontList->Get(sIdxBackup, sIdxBackup ); -m_pIndexHeightLB->Fill( &aFontMetric, m_pFontList ); +m_pIndexHeightLB->Fill( &aFontMetric, m_pFontList.get() ); m_pStandardHeightLB->SetValue( CalcToPoint( nStandardHeight, MapUnit::MapTwip, 10 ) ); m_pTitleHeightLB-> SetValue( CalcToPoint( nTitleHeight , MapUnit::MapTwip, 10 ) ); @@ -1061,7 +1059,7 @@ IMPL_LINK( SwStdFontTabPage, LoseFocusHdl, Control&, rControl, void ) pHeightLB = m_pIndexHeightLB; } FontMetric aFontMetric( m_pFontList->Get(sEntry, sEntry) ); -pHeightLB->Fill( &aFontMetric, m_pFontList ); +pHeightLB->Fill( &aFontMetric, m_pFontList.get() ); } void SwStdFontTabPage::PageCreated( const SfxAllItemSet& aSet) diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 05b0efb4d671..6557d6a010ee 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -144,7 +144,7 @@ class SwStdFontTabPage : public SfxTabPage OUString m_sShellIndex; VclPtr m_pPrt; -FontList* m_pFontList; +std::unique_ptr m_pFontList; SwStdFontConfig* m_pFontConfig; SwWrtShell* m_pWrtShell; LanguageType m_eLanguage; commit bf3421c5942639b5dd3c82b35108384ef6b9f392 Author: Noel Grandin AuthorDate: Thu Jul 26 15:10:43 2018 +0200 Commit: Noel Grandin CommitDate: Mon Jul 30 08:19:16 2018 +0200 loplugin:useuniqueptr in SwCaptionOptPage Change-Id: I6e3391be26e6442ab13cc3d6d9da6e6909d68707 Reviewed-on: https://gerrit.libreoffice.org/58228 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index dc05b9f35417..faec48efbde8 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -562,7 +562,7 @@ SwCaptionOptPage::~SwCaptionOptPage() void SwCaptionOptPage::dispose() { DelUserData(); -delete pMgr; +pMgr.reset(); m_pCheckLB.clear(); m_pLbCaptionOrder.clear(); m_pPreview.clear(); diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index ef6f828b67e9..e8a8169abe8e 100644 --- a/s
[Libreoffice-commits] core.git: sw/qa writerfilter/source
sw/qa/extras/ooxmlexport/data/calendar3.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport3.cxx |9 + writerfilter/source/dmapper/DomainMapper_Impl.cxx |7 +++ 3 files changed, 16 insertions(+) New commits: commit 3f1eaebcbb39aeff0558218f0ce77f7e91424fa2 Author: Justin Luth AuthorDate: Sat Jul 28 19:36:40 2018 +0300 Commit: Justin Luth CommitDate: Mon Jul 30 08:00:40 2018 +0200 related tdf#72560 writerfilter: also check rPrDefaults So far I've been fixated on paragraph properties, but styles (both character and paragraph) also inherit the rPrDefaults. One enhancement could be to check the styleType and skip the paragraph stuff for character styles, but that doesn't seem necessary or valuable at this point. The unit test is pre-emptive. Change-Id: I4e898f5fa573b62be4dc70512b02cdeb7b21e7c6 Reviewed-on: https://gerrit.libreoffice.org/58257 Reviewed-by: Justin Luth Tested-by: Justin Luth diff --git a/sw/qa/extras/ooxmlexport/data/calendar3.docx b/sw/qa/extras/ooxmlexport/data/calendar3.docx new file mode 100644 index ..6c720aff9ce1 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/calendar3.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx index 954528239dd3..b83bab3e136d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx @@ -339,6 +339,15 @@ DECLARE_OOXMLEXPORT_TEST(testCalendar2, "calendar2.docx") assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar2']/w:tblPr/w:tblBorders/w:insideV", "themeTint", "99"); } +DECLARE_OOXMLEXPORT_TEST(testCalendar3, "calendar3.docx") +{ +// TableStyle:firstRow (for header rows 1 and 2) color and size overrides document rPrDefault +uno::Reference xTable(getParagraphOrTable(1), uno::UNO_QUERY); +uno::Reference xCell(xTable->getCellByName("A2"), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(0x5B9BD5, getProperty(getRun(xCell,1), "CharColor")); +CPPUNIT_ASSERT_EQUAL(16.f, getProperty(getRun(xCell,1), "CharHeight")); +} + DECLARE_OOXMLEXPORT_TEST(testTcBorders, "testTcBorders.docx") { //fdo#76635 : Table borders are not getting preserved. diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 469d8d0ce1fd..3a71b395acb7 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -731,6 +731,13 @@ uno::Any DomainMapper_Impl::GetPropertyFromStyleSheet(PropertyIds eId) if ( aProperty ) return aProperty->second; } +const PropertyMapPtr& pDefaultCharProps = GetStyleSheetTable()->GetDefaultCharProps(); +if ( pDefaultCharProps ) +{ +boost::optional aProperty = pDefaultCharProps->getProperty(eId); +if ( aProperty ) +return aProperty->second; +} } return uno::Any(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - default_images/res
default_images/res/commandimagelist/nb/lc_italic.png |binary default_images/res/commandimagelist/nb/lc_numberformatdecimal.png |binary default_images/res/commandimagelist/nb/lc_underline.png|binary default_images/res/commandimagelist/nb/lc_underlinedouble.png |binary default_images/res/commandimagelist/nb/lch_italic.png |binary default_images/res/commandimagelist/nb/lch_numberformatdecimal.png |binary default_images/res/commandimagelist/nb/lch_underline.png |binary default_images/res/commandimagelist/nb/lch_underlinedouble.png |binary default_images/res/commandimagelist/nb/sc_italic.png |binary default_images/res/commandimagelist/nb/sc_label.png|binary default_images/res/commandimagelist/nb/sc_numberformatdecimal.png |binary default_images/res/commandimagelist/nb/sc_underline.png|binary default_images/res/commandimagelist/nb/sc_underlinedouble.png |binary default_images/res/commandimagelist/nb/sch_italic.png |binary default_images/res/commandimagelist/nb/sch_numberformatdecimal.png |binary default_images/res/commandimagelist/nb/sch_underline.png |binary default_images/res/commandimagelist/nb/sch_underlinedouble.png |binary default_images/res/helpimg/ast/calcein.png |binary default_images/res/helpimg/ast/feldalle.png|binary default_images/res/helpimg/ast/feldbrei.png|binary default_images/res/helpimg/ast/feldcolo.png|binary default_images/res/helpimg/ast/names_as_addressing.png |binary default_images/res/helpimg/ast/rechenlt.png|binary default_images/res/helpimg/ast/sheettabs.png |binary default_images/res/helpimg/ast/swh00055.png|binary default_images/res/helpimg/ast/swh00056.png|binary default_images/res/helpimg/ast/swh00117.png|binary default_images/res/helpimg/ast/zellvor.png |binary default_images/res/helpimg/nb/calcein.png |binary default_images/res/helpimg/nb/feldalle.png |binary default_images/res/helpimg/nb/feldbrei.png |binary default_images/res/helpimg/nb/feldcolo.png |binary default_images/res/helpimg/nb/names_as_addressing.png |binary default_images/res/helpimg/nb/rechenlt.png |binary default_images/res/helpimg/nb/sheettabs.png|binary default_images/res/helpimg/nb/swh00055.png |binary default_images/res/helpimg/nb/swh00056.png |binary default_images/res/helpimg/nb/swh00117.png |binary default_images/res/helpimg/nb/zellvor.png |binary 39 files changed New commits: commit 2d81edd69b5fc06ecedb969f81c9dee4af780001 Author: Matthias Seidel AuthorDate: Sun Jul 29 23:14:13 2018 + Commit: Matthias Seidel CommitDate: Sun Jul 29 23:14:13 2018 + Added graphics for Norwegian diff --git a/default_images/res/helpimg/nb/calcein.png b/default_images/res/helpimg/nb/calcein.png new file mode 100644 index ..092e8fad8b77 Binary files /dev/null and b/default_images/res/helpimg/nb/calcein.png differ diff --git a/default_images/res/helpimg/nb/feldalle.png b/default_images/res/helpimg/nb/feldalle.png new file mode 100644 index ..3c2597ac5449 Binary files /dev/null and b/default_images/res/helpimg/nb/feldalle.png differ diff --git a/default_images/res/helpimg/nb/feldbrei.png b/default_images/res/helpimg/nb/feldbrei.png new file mode 100644 index ..53e58fc15da1 Binary files /dev/null and b/default_images/res/helpimg/nb/feldbrei.png differ diff --git a/default_images/res/helpimg/nb/feldcolo.png b/default_images/res/helpimg/nb/feldcolo.png new file mode 100644 index ..81479624ca70 Binary files /dev/null and b/default_images/res/helpimg/nb/feldcolo.png differ diff --git a/default_images/res/helpimg/nb/names_as_addressing.png b/default_images/res/helpimg/nb/names_as_addressing.png new file mode 100644 index ..60cfbe11ebb5 Binary files /dev/null and b/default_images/res/helpimg/nb/names_as_addressing.png differ diff --git a/default_images/res/helpimg/nb/rechenlt.png b/default_images/res/helpimg/nb/rechenlt.png new file mode 100644 index ..ef322de9cc47 Binary files /dev/null and b/default_images/res/helpimg/nb/rechenlt.png differ diff --git a/default_images/res/helpimg/nb/sheettabs.png b/default_images/res/helpimg/nb/sheettabs.png new file mode 100644 index ..22fb684bb69c Binary files /dev/null and b/default_images/res/helpimg/nb/sheettabs.png differ diff --git a/default_images/res/helpimg/nb/swh00055.png b/default_images/res/helpimg/nb/swh00055
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/tile/TileLayer.js |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 3e3857e1c74f7d2def6c7b69289151ac5b2812d0 Author: Henry Castro AuthorDate: Sun Jul 29 19:45:21 2018 -0400 Commit: Henry Castro CommitDate: Sun Jul 29 19:48:07 2018 -0400 loleaflet: fix tile debugging mode Change-Id: I73a9d9c449a89540a057f68d2a5536f18b0ee931 diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index b53b9b472..e90459e43 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -2413,7 +2413,7 @@ L.TileLayer = L.GridLayer.extend({ rect.setStyle({fillOpacity: opac - 0.04}); } } - this._debugTimeoutId = setTimeout(function () { this._map._docLayer._debugTimeout(); }, 50); + this._debugTimeoutId = setTimeout(L.bind(this._debugTimeout, this), 50); } }, @@ -2426,7 +2426,7 @@ L.TileLayer = L.GridLayer.extend({ this._postKeyboardEvent('input', this._debugLorem.charCodeAt(this._debugLoremPos % this._debugLorem.length), 0); } this._debugLoremPos++; - this._debugTypeTimeoutId = setTimeout(function () { this._map._docLayer._debugTypeTimeout(); }, 50); + this._debugTypeTimeoutId = setTimeout(L.bind(this._debugTypeTimeout, this), 50); } }); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/CppunitTest_sc_documentconfigurationobj.mk
sc/CppunitTest_sc_documentconfigurationobj.mk | 31 -- 1 file changed, 1 insertion(+), 30 deletions(-) New commits: commit 1b21ff86effe58ae368457de8fec654ba4c8edd9 Author: Jens Carl AuthorDate: Sun Jul 29 21:41:47 2018 + Commit: Jens Carl CommitDate: Mon Jul 30 01:01:57 2018 +0200 Remove obsolete (cargo-cult copied) dependencies Change-Id: I6cb34763798dbc2a4c0b3fa04e1e3bfe8ef514be Reviewed-on: https://gerrit.libreoffice.org/58294 Tested-by: Jenkins Reviewed-by: Jens Carl diff --git a/sc/CppunitTest_sc_documentconfigurationobj.mk b/sc/CppunitTest_sc_documentconfigurationobj.mk index 418d3a0cba67..307ec66e8713 100644 --- a/sc/CppunitTest_sc_documentconfigurationobj.mk +++ b/sc/CppunitTest_sc_documentconfigurationobj.mk @@ -18,43 +18,14 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sc_documentconfigurationobj, )) $(eval $(call gb_CppunitTest_use_libraries,sc_documentconfigurationobj, \ - basegfx \ - comphelper \ cppu \ - cppuhelper \ - drawinglayer \ - editeng \ - for \ - forui \ - i18nlangtag \ - msfilter \ - oox \ sal \ - salhelper \ - sax \ - sb \ - sc \ - sfx \ - sot \ subsequenttest \ - svl \ - svt \ - svx \ - svxcore \ test \ - tk \ - tl \ - ucbhelper \ unotest \ - utl \ - vbahelper \ - vcl \ - xo \ )) $(eval $(call gb_CppunitTest_set_include,sc_documentconfigurationobj,\ - -I$(SRCDIR)/sc/source/ui/inc \ - -I$(SRCDIR)/sc/inc \ $$(INCLUDE) \ )) @@ -64,7 +35,7 @@ $(eval $(call gb_CppunitTest_use_ure,sc_documentconfigurationobj)) $(eval $(call gb_CppunitTest_use_vcl,sc_documentconfigurationobj)) $(eval $(call gb_CppunitTest_use_components,sc_documentconfigurationobj,\ -$(sc_unoapi_common_components) \ + $(sc_unoapi_common_components) \ )) $(eval $(call gb_CppunitTest_use_configuration,sc_documentconfigurationobj)) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
ODF specification for border around text portions
Hi all, you can draw borders on portions of text in Writer. This is currently in loext namespace. I'm working to get this feature to ODF. I have noticed the problems described below, when looking what would be needed for interoperability with Word and what would be needed for EPUB export. I would be happy to hear some suggestions from you. Problem line height --- EPUB: EPUB uses XHTML and CSS3. Border, margin and padding does not influence the line-height calculation in CSS. Therefore the margin-, border- and padding-box might overlap previous or next lines. But the text inside the box is always regularly visible. Overlapping happens in document order. The border will be painted on top of the previous line and the next line will be painted on top of the border. MS Word: Word acts different. If the line-height is proportional (e.g. 1.5 lines) the distance between lines is increased, so that the entire box fits into the line. The additional space is distributed so that the text in the box has the same baseline as the text outside the box. If the line-height is fixed (e.g. 24pt), the height of the box is reduced (not the border width) so that the border might overlap the text inside the box. The border is drawn on top of the text. LibreOffice's line height implementation has currently bug https://bugs.documentfoundation.org/show_bug.cgi?id=69647 Problem line break -- EPUB: If the text portion, which has got border, margin, padding is split so that the start of the text portion is in line A and the end is in the next line B, then the border box is split in CSS. That means, that the box in line A has no right border and the box in line B has not left border (in ltr script). MS Word: Word acts different. It enclosed the text porting in line A with a complete box and encloses the text porting in line B with a complete box too. Currently LibreOffice follows the way Word does it. Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: 64-bit Windows build failure: 'this' pointer for member, may not be aligned 8 as expected by the constructor
I can confirm reverting: https://cgit.freedesktop.org/libreoffice/core/commit/?id=8b8fb4ac Fixes this issue, allowing the build to succeed. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: 2 commits - sc/CppunitTest_sc_editfieldobj_cell.mk sc/CppunitTest_sc_editfieldobj_header.mk
sc/CppunitTest_sc_editfieldobj_cell.mk | 45 +-- sc/CppunitTest_sc_editfieldobj_header.mk | 45 +-- 2 files changed, 16 insertions(+), 74 deletions(-) New commits: commit 77d5e577c71718539785a65cb9633d429bd030e4 Author: Jens Carl AuthorDate: Sun Jul 29 20:12:43 2018 + Commit: Jens Carl CommitDate: Sun Jul 29 23:39:02 2018 +0200 Remove obsolete (cargo-cult copied) dependencies Change-Id: Ie58b3ab1563afa4d223ca0ff92315e7da6b15e06 Reviewed-on: https://gerrit.libreoffice.org/58293 Tested-by: Jenkins Reviewed-by: Jens Carl diff --git a/sc/CppunitTest_sc_editfieldobj_header.mk b/sc/CppunitTest_sc_editfieldobj_header.mk index 4efc81d48463..f492c7184c36 100644 --- a/sc/CppunitTest_sc_editfieldobj_header.mk +++ b/sc/CppunitTest_sc_editfieldobj_header.mk @@ -14,48 +14,19 @@ $(eval $(call gb_CppunitTest_CppunitTest,sc_editfieldobj_header)) $(eval $(call gb_CppunitTest_use_external,sc_editfieldobj_header,boost_headers)) $(eval $(call gb_CppunitTest_add_exception_objects,sc_editfieldobj_header, \ -sc/qa/extras/sceditfieldobj-header \ + sc/qa/extras/sceditfieldobj-header \ )) $(eval $(call gb_CppunitTest_use_libraries,sc_editfieldobj_header, \ -basegfx \ -comphelper \ -cppu \ -cppuhelper \ -drawinglayer \ -editeng \ -for \ -forui \ -i18nlangtag \ -msfilter \ -oox \ -sal \ -salhelper \ -sax \ -sb \ -sc \ -sfx \ -sot \ -subsequenttest \ -svl \ -svt \ -svx \ -svxcore \ -test \ -tk \ -tl \ -ucbhelper \ -unotest \ -utl \ -vbahelper \ -vcl \ -xo \ + cppu \ + sal \ + subsequenttest \ + test \ + unotest \ )) $(eval $(call gb_CppunitTest_set_include,sc_editfieldobj_header,\ --I$(SRCDIR)/sc/source/ui/inc \ --I$(SRCDIR)/sc/inc \ -$$(INCLUDE) \ + $$(INCLUDE) \ )) $(eval $(call gb_CppunitTest_use_sdk_api,sc_editfieldobj_header)) @@ -64,7 +35,7 @@ $(eval $(call gb_CppunitTest_use_ure,sc_editfieldobj_header)) $(eval $(call gb_CppunitTest_use_vcl,sc_editfieldobj_header)) $(eval $(call gb_CppunitTest_use_components,sc_editfieldobj_header,\ -$(sc_unoapi_common_components) \ + $(sc_unoapi_common_components) \ )) $(eval $(call gb_CppunitTest_use_configuration,sc_editfieldobj_header)) commit 0dac94abdacb3d4bc6cfc74a2411bbe83024fae1 Author: Jens Carl AuthorDate: Sun Jul 29 20:15:10 2018 + Commit: Jens Carl CommitDate: Sun Jul 29 23:38:52 2018 +0200 Remove obsolete (cargo-cult copied) dependencies Change-Id: I828bf75fef031758b354149945f719f61a9caf91 Reviewed-on: https://gerrit.libreoffice.org/58292 Tested-by: Jenkins Reviewed-by: Jens Carl diff --git a/sc/CppunitTest_sc_editfieldobj_cell.mk b/sc/CppunitTest_sc_editfieldobj_cell.mk index 5188429cc2b9..278f6c8897b1 100644 --- a/sc/CppunitTest_sc_editfieldobj_cell.mk +++ b/sc/CppunitTest_sc_editfieldobj_cell.mk @@ -14,48 +14,19 @@ $(eval $(call gb_CppunitTest_CppunitTest,sc_editfieldobj_cell)) $(eval $(call gb_CppunitTest_use_external,sc_editfieldobj_cell,boost_headers)) $(eval $(call gb_CppunitTest_add_exception_objects,sc_editfieldobj_cell, \ -sc/qa/extras/sceditfieldobj-cell \ + sc/qa/extras/sceditfieldobj-cell \ )) $(eval $(call gb_CppunitTest_use_libraries,sc_editfieldobj_cell, \ -basegfx \ -comphelper \ -cppu \ -cppuhelper \ -drawinglayer \ -editeng \ -for \ -forui \ -i18nlangtag \ -msfilter \ -oox \ -sal \ -salhelper \ -sax \ -sb \ -sc \ -sfx \ -sot \ -subsequenttest \ -svl \ -svt \ -svx \ -svxcore \ -test \ -tk \ -tl \ -ucbhelper \ -unotest \ -utl \ -vbahelper \ -vcl \ -xo \ + cppu \ + sal \ + subsequenttest \ + test \ + unotest \ )) $(eval $(call gb_CppunitTest_set_include,sc_editfieldobj_cell,\ --I$(SRCDIR)/sc/source/ui/inc \ --I$(SRCDIR)/sc/inc \ -$$(INCLUDE) \ + $$(INCLUDE) \ )) $(eval $(call gb_CppunitTest_use_sdk_api,sc_editfieldobj_cell)) @@ -64,7 +35,7 @@ $(eval $(call gb_CppunitTest_use_ure,sc_editfieldobj_cell)) $(eval $(call gb_CppunitTest_use_vcl,sc_editfieldobj_cell)) $(eval $(call gb_CppunitTest_use_components,sc_editfieldobj_cell,\ -$(sc_unoapi_common_components) \ + $(sc_unoapi_common_components) \ )) $(eval $(call gb_CppunitTest_use_configuration,sc_editfieldobj_cell)) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sd/source
sd/source/ui/unoidl/unopage.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f8e408f03039e8bbaa70158a8fae200927bc4b67 Author: Noel Grandin AuthorDate: Fri Jul 27 21:20:13 2018 +0200 Commit: Noel Grandin CommitDate: Sun Jul 29 23:07:07 2018 +0200 tdf#118948 - Date format in Impress header/footer is lost when saving regression from commit 7d14555ef7e867c5b1a0e195e3ef056885697c59 convert SvxDateFormat to scoped enum Change-Id: I9d365c710a20054e249433f54635068f713afa72 Reviewed-on: https://gerrit.libreoffice.org/58202 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 93baa280670367ef6246d837080706f2c80eab0b) Reviewed-on: https://gerrit.libreoffice.org/58289 diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 657a23ddc7ce..2e9f5dd128d1 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -1280,7 +1280,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) case WID_PAGE_DATETIMEFORMAT: { auto const & rSettings = GetPage()->getHeaderFooterSettings(); -sal_Int32 x = static_cast(rSettings.meDateFormat) & (static_cast(rSettings.meTimeFormat) << 4); +sal_Int32 x = static_cast(rSettings.meDateFormat) | (static_cast(rSettings.meTimeFormat) << 4); aAny <<= x; } break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sd/source
sd/source/ui/unoidl/unopage.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 34f6ad89ed195c45f4cb5e26b4129bb0087d5452 Author: Noel Grandin AuthorDate: Fri Jul 27 21:20:13 2018 +0200 Commit: Noel Grandin CommitDate: Sun Jul 29 23:06:54 2018 +0200 tdf#118948 - Date format in Impress header/footer is lost when saving regression from commit 7d14555ef7e867c5b1a0e195e3ef056885697c59 convert SvxDateFormat to scoped enum Change-Id: I9d365c710a20054e249433f54635068f713afa72 Reviewed-on: https://gerrit.libreoffice.org/58202 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 93baa280670367ef6246d837080706f2c80eab0b) Reviewed-on: https://gerrit.libreoffice.org/58291 diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 10f25204c810..eb465e719671 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -1292,7 +1292,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) case WID_PAGE_DATETIMEFORMAT: { auto const & rSettings = GetPage()->getHeaderFooterSettings(); -sal_Int32 x = static_cast(rSettings.meDateFormat) & (static_cast(rSettings.meTimeFormat) << 4); +sal_Int32 x = static_cast(rSettings.meDateFormat) | (static_cast(rSettings.meTimeFormat) << 4); aAny <<= x; } break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cppuhelper/source cppu/source
cppu/source/uno/lbmap.cxx | 15 --- cppuhelper/source/component.cxx | 22 +++--- 2 files changed, 11 insertions(+), 26 deletions(-) New commits: commit c9697dc2abb2d23ffbb8253ce8b0ff0314d86984 Author: Jochen Nitschke AuthorDate: Sun Jul 29 18:22:48 2018 +0200 Commit: Noel Grandin CommitDate: Sun Jul 29 23:06:39 2018 +0200 replace double checked locking patterns with thread safe static initialization Change-Id: I4c751a47e3bdf52bbfb67d4f3aabd6f442e30118 Reviewed-on: https://gerrit.libreoffice.org/58287 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx index e1c606bf5c67..c5ce6709991f 100644 --- a/cppu/source/uno/lbmap.cxx +++ b/cppu/source/uno/lbmap.cxx @@ -158,17 +158,10 @@ struct MappingsData static MappingsData & getMappingsData() { -static MappingsData * s_p = nullptr; -if (! s_p) -{ -MutexGuard aGuard( Mutex::getGlobalMutex() ); -if (! s_p) -{ -//TODO This memory is leaked; see #i63473# for when this should be -// changed again: -s_p = new MappingsData; -} -} +//TODO This memory is leaked; see #i63473# for when this should be +// changed again: +static MappingsData * s_p(new MappingsData); + return *s_p; } diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx index 1c3585ee17d4..c9bd6a4a9b28 100644 --- a/cppuhelper/source/component.cxx +++ b/cppuhelper/source/component.cxx @@ -112,21 +112,13 @@ void OComponentHelper::release() throw() Sequence< Type > OComponentHelper::getTypes() { -static OTypeCollection * s_pTypes = nullptr; -if (! s_pTypes) -{ -MutexGuard aGuard( Mutex::getGlobalMutex() ); -if (! s_pTypes) -{ -static OTypeCollection s_aTypes( -cppu::UnoType::get(), -cppu::UnoType::get(), -cppu::UnoType::get(), -cppu::UnoType::get() ); -s_pTypes = &s_aTypes; -} -} -return s_pTypes->getTypes(); +static OTypeCollection s_aTypes( +cppu::UnoType::get(), +cppu::UnoType::get(), +cppu::UnoType::get(), +cppu::UnoType::get() ); + +return s_aTypes.getTypes(); } // XComponent ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: connectivity/source dbaccess/source
connectivity/source/drivers/file/FTable.cxx | 14 +++--- dbaccess/source/core/api/RowSet.cxx | 14 +++--- dbaccess/source/core/api/table.cxx | 14 +++--- 3 files changed, 9 insertions(+), 33 deletions(-) New commits: commit 1eeb8d34760e63c0ab2b52a27f43141bcde84297 Author: Jochen Nitschke AuthorDate: Sun Jul 29 18:22:19 2018 +0200 Commit: Noel Grandin CommitDate: Sun Jul 29 23:05:31 2018 +0200 replace double checked locking patterns with thread safe static initialization Change-Id: I7b102e8a6aec64b0795f5fa915276ffc1f568d0a Reviewed-on: https://gerrit.libreoffice.org/58288 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index e583e20db9af..0c805dbae645 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -124,17 +124,9 @@ void SAL_CALL OFileTable::disposing() Sequence< sal_Int8 > OFileTable::getUnoTunnelImplementationId() { -static ::cppu::OImplementationId * pId = nullptr; -if (! pId) -{ -::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); -if (! pId) -{ -static ::cppu::OImplementationId aId; -pId = &aId; -} -} -return pId->getImplementationId(); +static ::cppu::OImplementationId s_Id; + +return s_Id.getImplementationId(); } // css::lang::XUnoTunnel diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 0ce715ed1a8a..69414a73b34f 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -456,17 +456,9 @@ sal_Int64 SAL_CALL ORowSet::getSomething( const Sequence< sal_Int8 >& rId ) Sequence< sal_Int8 > ORowSet::getUnoTunnelImplementationId() { -static ::cppu::OImplementationId * pId = nullptr; -if (! pId) -{ -::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); -if (! pId) -{ -static ::cppu::OImplementationId aId; -pId = &aId; -} -} -return pId->getImplementationId(); +static ::cppu::OImplementationId s_Id; + +return s_Id.getImplementationId(); } // css::XAggregation diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx index 3590e93613aa..348c61ded3ac 100644 --- a/dbaccess/source/core/api/table.cxx +++ b/dbaccess/source/core/api/table.cxx @@ -312,17 +312,9 @@ sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId ) Sequence< sal_Int8 > ODBTable::getUnoTunnelImplementationId() { -static ::cppu::OImplementationId * pId = nullptr; -if (! pId) -{ -::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); -if (! pId) -{ -static ::cppu::OImplementationId aId; -pId = &aId; -} -} -return pId->getImplementationId(); +static ::cppu::OImplementationId s_Id; + +return s_Id.getImplementationId(); } Reference< XPropertySet > ODBTable::createColumnDescriptor() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/map/handler/Map.Keyboard.js | 108 +- 1 file changed, 49 insertions(+), 59 deletions(-) New commits: commit 42823fcafb89bb854036fe09bbc6281ac50189c9 Author: Henry Castro AuthorDate: Sun Jul 29 15:01:10 2018 -0400 Commit: Henry Castro CommitDate: Sun Jul 29 15:03:57 2018 -0400 loleaflet: mobile: fix delete with backspace Change-Id: I36eddf8b81849592982d01f3a4c7f3be0f0c0ee3 diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index 16d31528f..9e1bad2ca 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -173,13 +173,13 @@ L.Map.Keyboard = L.Handler.extend({ this._map.on('mousedown', this._onMouseDown, this); this._map.on('keydown keyup keypress', this._onKeyDown, this); - this._map.on('compositionstart compositionupdate compositionend textInput', this._onKeyDown, this); + this._map.on('compositionstart compositionupdate compositionend textInput', this._onIME, this); }, removeHooks: function () { this._map.off('mousedown', this._onMouseDown, this); this._map.off('keydown keyup keypress', this._onKeyDown, this); - this._map.off('compositionstart compositionupdate compositionend textInput', this._onKeyDown, this); + this._map.off('compositionstart compositionupdate compositionend textInput', this._onIME, this); }, _ignoreKeyEvent: function(e) { @@ -296,25 +296,6 @@ L.Map.Keyboard = L.Handler.extend({ var charCode = e.originalEvent.charCode; var keyCode = e.originalEvent.keyCode; - if (e.type === 'compositionstart' || e.type === 'compositionupdate') { - this._isComposing = true; // we are starting composing with IME - var txt = ''; - for (var i = 0; i < e.originalEvent.data.length; i++) { - txt += e.originalEvent.data[i]; - } - if (txt) { - compEventFn('input', txt); - } - } - - if (e.type === 'compositionend') { - this._isComposing = false; // stop of composing with IME - // get the composited char codes - // clear the input now - best to do this ASAP so the input - // is clear for the next word - inputEle.value = ''; - } - if (!this._isComposing && e.type === 'keyup') { // not compositing and keyup, clear the input so it is ready // for next word (or char only) @@ -340,14 +321,12 @@ L.Map.Keyboard = L.Handler.extend({ } else if (e.type === 'keydown') { this._keyHandled = false; - this._bufferedTextInputEvent = null; if (this.handleOnKeyDownKeys[keyCode] && charCode === 0) { keyEventFn('input', charCode, unoKeyCode); } } - else if ((e.type === 'keypress' || e.type === 'compositionend') && -(!this.handleOnKeyDownKeys[keyCode] || charCode !== 0)) { + else if ((e.type === 'keypress') && (!this.handleOnKeyDownKeys[keyCode] || charCode !== 0)) { if (charCode === keyCode && charCode !== 13) { // Chrome sets keyCode = charCode for printable keys // while LO requires it to be 0 @@ -358,47 +337,13 @@ L.Map.Keyboard = L.Handler.extend({ // key press times will be paired with the invalidation messages docLayer._debugKeypressQueue.push(+new Date()); } - if (e.type === 'compositionend') { - // Set all keycodes to zero - compEventFn('end', ''); - } else { - keyEventFn('input', charCode, unoKeyCode); - } + keyEventFn('input', charCode, unoKeyCode); this._keyHandled = true; } - else if (e.type === 'textInput') { - // Store the textInput event - this._bufferedTextInputEvent = e; - } else if (e.type =
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/map/handler/Map.Tap.js |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 57940acb06846ab8b96104b8bcf7c41f92d7cae8 Author: Henry Castro AuthorDate: Sun Jul 29 14:46:51 2018 -0400 Commit: Henry Castro CommitDate: Sun Jul 29 14:50:24 2018 -0400 loleaflet: mobile: check tolerance when the move event occurs Change-Id: I9e1d28e1b198e81f876a323c978478e4ccea7474 diff --git a/loleaflet/src/map/handler/Map.Tap.js b/loleaflet/src/map/handler/Map.Tap.js index b8a4e96a5..02730a7e2 100644 --- a/loleaflet/src/map/handler/Map.Tap.js +++ b/loleaflet/src/map/handler/Map.Tap.js @@ -71,8 +71,11 @@ L.Map.Tap = L.Handler.extend({ _onMove: function (e) { var first = e.touches[0]; - this._newPos = new L.Point(first.clientX, first.clientY); - this._simulateEvent('mousemove', first); + var newPos = new L.Point(first.clientX, first.clientY); + if (newPos.distanceTo(this._startPos) > this._map.options.tapTolerance) { + this._newPos = newPos; + this._simulateEvent('mousemove', first); + } }, _simulateEvent: function (type, e) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
64-bit Windows build failure: 'this' pointer for member, may not be aligned 8 as expected by the constructor
Both my own builds and the 64-bit Win tinderbox @42 are now failing with the following error: [build CXX] sw/source/filter/ww8/ww8scan.cxx C:/core/sw/source/filter/ww8/ww8scan.cxx(8445): error C2220: warning treated as error - no 'object' file generated C:/core/sw/source/filter/ww8/ww8scan.cxx(8445): note: This diagnostic occurred in the compiler generated function 'WW8_FFN::WW8_FFN(const WW8_FFN &)' C:/core/sw/source/filter/ww8/ww8scan.cxx(8445): warning C4315: 'WW8_FFN': 'this' pointer for member 'WW8_FFN::sFontname' may not be aligned 8 as expected by the constructor C:/core/sw/source/filter/ww8/ww8scan.cxx(8445): note: This diagnostic occurred in the compiler generated function 'WW8_FFN::WW8_FFN(const WW8_FFN &)' make[1]: Makefile:286: recipe for target 'build' failed make: *** [build] Error 2 Tinderbox 42: https://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&brief-log=1532832601.8628 32-bit builds are successfully completing. It looks like the error was caused by: https://cgit.freedesktop.org/libreoffice/core/commit/?id=8b8fb4ac654c8f847c35b93d701ba3475662ea69 convert pFontA to std::vector ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: framework/source sc/source
framework/source/loadenv/loadenv.cxx |4 ++-- sc/source/filter/inc/fapihelper.hxx |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 3c28c44a7acc42e89b4012557ca7e51a870043c8 Author: Andrea Gelmini AuthorDate: Sun Jul 29 19:03:48 2018 +0200 Commit: Jens Carl CommitDate: Sun Jul 29 20:11:35 2018 +0200 Fix typos Change-Id: I246d2f1681a7d833fc5f201bfdbacbe4fc3ae084 Reviewed-on: https://gerrit.libreoffice.org/58286 Tested-by: Jenkins Reviewed-by: Jens Carl diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 26f51f775049..33d4233cd441 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -601,14 +601,14 @@ LoadEnv::EContentType LoadEnv::classifyContent(const OUString& // a Filter) can be found, which supports // this URL - it must be a loadable content. // Because both items are registered for types -// its enough to check for frame loaders only. +// it's enough to check for frame loaders only. // Mos of our filters are handled by our global // default loader. But there exist some specialized // loader, which does not work on top of filters! // So it's not enough to search on the filter configuration. // Further it's not enough to search for types! // Because there exist some types, which are referenced by -// other objects ... but not by filters nor frame loaders! +// other objects... but not by filters nor frame loaders! OUString sPROP_TYPES(PROP_TYPES); diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx index c4d14a5b9aa2..f94fe6d525cc 100644 --- a/sc/source/filter/inc/fapihelper.hxx +++ b/sc/source/filter/inc/fapihelper.hxx @@ -112,7 +112,7 @@ public: explicit ScfPropertySet( const css::uno::Reference< InterfaceType >& xInterface ) { Set( xInterface ); } ~ScfPropertySet(); -//TOOD: +//TODO: ScfPropertySet(ScfPropertySet const &) = default; ScfPropertySet(ScfPropertySet &&) = default; ScfPropertySet & operator =(ScfPropertySet const &) = default; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/CppunitTest_sc_functionlistobj.mk
sc/CppunitTest_sc_functionlistobj.mk | 31 +-- 1 file changed, 1 insertion(+), 30 deletions(-) New commits: commit e0c190b9d4281acdb1892afa9807b778aa7ff14f Author: Jens Carl AuthorDate: Sat Jul 28 17:18:33 2018 + Commit: Jens Carl CommitDate: Sun Jul 29 20:10:18 2018 +0200 Remove obsolete (cargo-cult copied) dependencies Change-Id: I4dc2ed73df1648c0c6ba45c4c31fc8e16716633a Reviewed-on: https://gerrit.libreoffice.org/58255 Tested-by: Jenkins Reviewed-by: Jens Carl diff --git a/sc/CppunitTest_sc_functionlistobj.mk b/sc/CppunitTest_sc_functionlistobj.mk index be262aa020a8..c472b8fe93c6 100644 --- a/sc/CppunitTest_sc_functionlistobj.mk +++ b/sc/CppunitTest_sc_functionlistobj.mk @@ -18,43 +18,14 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sc_functionlistobj, \ )) $(eval $(call gb_CppunitTest_use_libraries,sc_functionlistobj, \ - basegfx \ - comphelper \ cppu \ - cppuhelper \ - drawinglayer \ - editeng \ - for \ - forui \ - i18nlangtag \ - msfilter \ - oox \ sal \ - salhelper \ - sax \ - sb \ - sc \ - sfx \ - sot \ subsequenttest \ - svl \ - svt \ - svx \ - svxcore \ test \ - tk \ - tl \ - ucbhelper \ unotest \ - utl \ - vbahelper \ - vcl \ - xo \ )) $(eval $(call gb_CppunitTest_set_include,sc_functionlistobj,\ - -I$(SRCDIR)/sc/source/ui/inc \ - -I$(SRCDIR)/sc/inc \ $$(INCLUDE) \ )) @@ -64,7 +35,7 @@ $(eval $(call gb_CppunitTest_use_ure,sc_functionlistobj)) $(eval $(call gb_CppunitTest_use_vcl,sc_functionlistobj)) $(eval $(call gb_CppunitTest_use_components,sc_functionlistobj,\ -$(sc_unoapi_common_components) \ + $(sc_unoapi_common_components) \ )) $(eval $(call gb_CppunitTest_use_configuration,sc_functionlistobj)) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/CppunitTest_sc_filterdescriptorbaseobj.mk
sc/CppunitTest_sc_filterdescriptorbaseobj.mk | 32 --- 1 file changed, 1 insertion(+), 31 deletions(-) New commits: commit a8de08e198bb02fd6bfc683efd6816edc9e5d59c Author: Jens Carl AuthorDate: Sat Jul 28 17:22:05 2018 + Commit: Jens Carl CommitDate: Sun Jul 29 20:10:45 2018 +0200 Remove obsolete (cargo-cult copied) dependencies Change-Id: I7e50331f3332b8a3d18ab4f208d5225fa0cd3416 Reviewed-on: https://gerrit.libreoffice.org/58256 Tested-by: Jenkins Reviewed-by: Jens Carl diff --git a/sc/CppunitTest_sc_filterdescriptorbaseobj.mk b/sc/CppunitTest_sc_filterdescriptorbaseobj.mk index b7ae08665402..2f67b429859c 100644 --- a/sc/CppunitTest_sc_filterdescriptorbaseobj.mk +++ b/sc/CppunitTest_sc_filterdescriptorbaseobj.mk @@ -18,43 +18,14 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sc_filterdescriptorbaseobj, \ )) $(eval $(call gb_CppunitTest_use_libraries,sc_filterdescriptorbaseobj, \ - basegfx \ - comphelper \ cppu \ - cppuhelper \ - drawinglayer \ - editeng \ - for \ - forui \ - i18nlangtag \ - msfilter \ - oox \ sal \ - salhelper \ - sax \ - sb \ - sc \ - sfx \ - sot \ subsequenttest \ - svl \ - svt \ - svx \ - svxcore \ test \ - tk \ - tl \ - ucbhelper \ unotest \ - utl \ - vbahelper \ - vcl \ - xo \ )) $(eval $(call gb_CppunitTest_set_include,sc_filterdescriptorbaseobj,\ - -I$(SRCDIR)/sc/source/ui/inc \ - -I$(SRCDIR)/sc/inc \ $$(INCLUDE) \ )) @@ -64,8 +35,7 @@ $(eval $(call gb_CppunitTest_use_ure,sc_filterdescriptorbaseobj)) $(eval $(call gb_CppunitTest_use_vcl,sc_filterdescriptorbaseobj)) $(eval $(call gb_CppunitTest_use_components,sc_filterdescriptorbaseobj,\ -$(sc_unoapi_common_components) \ -i18npool/source/search/i18nsearch \ + $(sc_unoapi_common_components) \ )) $(eval $(call gb_CppunitTest_use_configuration,sc_filterdescriptorbaseobj)) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sal/rtl
sal/rtl/strtmpl.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 72b099d279e7096d41a04fe8c0dd493a5fc18a33 Author: Noel Grandin AuthorDate: Sun Jul 29 13:42:32 2018 +0200 Commit: Noel Grandin CommitDate: Sun Jul 29 19:11:23 2018 +0200 bChanged can be bool Change-Id: I7d3f6af5410d93537b6b7a704615f43860160320 Reviewed-on: https://gerrit.libreoffice.org/58278 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx index af3a28cbfec2..341a84d01052 100644 --- a/sal/rtl/strtmpl.cxx +++ b/sal/rtl/strtmpl.cxx @@ -1618,7 +1618,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newReplace )( IMPL_RTL_STRINGDATA** ppThis, assert(ppThis); assert(pStr); IMPL_RTL_STRINGDATA*pOrg= *ppThis; -int bChanged= 0; +boolbChanged= false; sal_Int32 nLen= pStr->length; const IMPL_RTL_STRCODE* pCharStr= pStr->buffer; @@ -1650,7 +1650,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newReplace )( IMPL_RTL_STRINGDATA** ppThis, } } -bChanged = 1; +bChanged = true; break; } @@ -1679,7 +1679,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newToAsciiLowerCase )( IMPL_RTL_STRINGDATA** assert(ppThis); assert(pStr); IMPL_RTL_STRINGDATA*pOrg= *ppThis; -int bChanged= 0; +boolbChanged= false; sal_Int32 nLen= pStr->length; const IMPL_RTL_STRCODE* pCharStr= pStr->buffer; @@ -1708,7 +1708,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newToAsciiLowerCase )( IMPL_RTL_STRINGDATA** } } -bChanged = 1; +bChanged = true; break; } @@ -1737,7 +1737,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newToAsciiUpperCase )( IMPL_RTL_STRINGDATA** assert(ppThis); assert(pStr); IMPL_RTL_STRINGDATA*pOrg= *ppThis; -int bChanged= 0; +boolbChanged= false; sal_Int32 nLen= pStr->length; const IMPL_RTL_STRCODE* pCharStr= pStr->buffer; @@ -1766,7 +1766,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newToAsciiUpperCase )( IMPL_RTL_STRINGDATA** } } -bChanged = 1; +bChanged = true; break; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sal/rtl
sal/rtl/strtmpl.cxx | 29 - 1 file changed, 4 insertions(+), 25 deletions(-) New commits: commit 0955eb65b6302a072fd9b55b9cd09b62ab5dcd43 Author: Noel Grandin AuthorDate: Sun Jul 29 13:15:36 2018 +0200 Commit: Noel Grandin CommitDate: Sun Jul 29 19:11:13 2018 +0200 Use memmove in trim_WithLength Change-Id: If75ac1968b8b0b3314ae36c2a7f163cb5428e9c6 Reviewed-on: https://gerrit.libreoffice.org/58277 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx index 421a615b7574..af3a28cbfec2 100644 --- a/sal/rtl/strtmpl.cxx +++ b/sal/rtl/strtmpl.cxx @@ -744,18 +744,9 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( trim_WithLength )( IMPL_RTL_STRCODE* pStr, if ( nPreSpaces ) { -IMPL_RTL_STRCODE* pNewStr = pStr+nPreSpaces; - nLen -= nPreSpaces; -nIndex = nLen; - -while ( nIndex ) -{ -*pStr = *pNewStr; -pStr++; -pNewStr++; -nIndex--; -} +memmove(pStr, pStr + nPreSpaces, nLen * sizeof(IMPL_RTL_STRCODE)); +pStr += nLen; *pStr = 0; } commit 034203742d43045df1a6a733a81fb929ee840aac Author: Noel Grandin AuthorDate: Sun Jul 29 13:08:26 2018 +0200 Commit: Noel Grandin CommitDate: Sun Jul 29 19:11:01 2018 +0200 optimise newFromStr functions use the other functions in this module so we get the compiler builtins if available Change-Id: Idbd9df44e057e573dd3fb243c50c5186e8edd8d8 Reviewed-on: https://gerrit.libreoffice.org/58276 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx index b477e50216c0..421a615b7574 100644 --- a/sal/rtl/strtmpl.cxx +++ b/sal/rtl/strtmpl.cxx @@ -1313,16 +1313,12 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newFromStr )( IMPL_RTL_STRINGDATA** ppThis, SAL_THROW_EXTERN_C() { assert(ppThis); -IMPL_RTL_STRCODE* pBuffer; IMPL_RTL_STRINGDATA*pOrg; sal_Int32 nLen; if ( pCharStr ) { -const IMPL_RTL_STRCODE* pTempStr = pCharStr; -while( *pTempStr ) -pTempStr++; -nLen = pTempStr-pCharStr; +nLen = IMPL_RTL_STRNAME( getLength )( pCharStr ); } else nLen = 0; @@ -1336,15 +1332,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newFromStr )( IMPL_RTL_STRINGDATA** ppThis, pOrg = *ppThis; *ppThis = IMPL_RTL_STRINGNAME( ImplAlloc )( nLen ); OSL_ASSERT(*ppThis != nullptr); -pBuffer = (*ppThis)->buffer; -do -{ -*pBuffer = *pCharStr; -pBuffer++; -pCharStr++; -} -while ( *pCharStr ); - +rtl_str_ImplCopy( (*ppThis)->buffer, pCharStr, nLen ); RTL_LOG_STRING_NEW( *ppThis ); /* must be done last, if pCharStr == *ppThis */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/docshell/impex.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit b41b150f2e671d2cd7a0f78102029bf433e7b65a Author: Caolán McNamara AuthorDate: Sun Jul 29 15:24:21 2018 +0100 Commit: Caolán McNamara CommitDate: Sun Jul 29 17:38:29 2018 +0200 ofz#7790 reduce row limit further for fuzzing Change-Id: I9ab4831635ffb316c4295f23fa078e96e48a384e Reviewed-on: https://gerrit.libreoffice.org/58282 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 854bc92b9635..68789940b77b 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -96,7 +96,7 @@ enum class SylkVersion // Whole document without Undo ScImportExport::ScImportExport( ScDocument* p ) : pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ), - nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : SCROWS32K), + nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : 16000), cSep( '\t' ), cStr( '"' ), bFormulas( false ), bIncludeFiltered( true ), bAll( true ), bSingle( true ), bUndo( false ), @@ -112,7 +112,7 @@ ScImportExport::ScImportExport( ScDocument* p ) ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt ) : pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ), aRange( rPt ), - nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : SCROWS32K), + nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? MAXROW : 16000), cSep( '\t' ), cStr( '"' ), bFormulas( false ), bIncludeFiltered( true ), bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: lotuswordpro/source sw/source xmloff/source
lotuswordpro/source/filter/lwpnumericfmt.cxx |2 +- sw/source/core/doc/tblcpy.cxx|2 +- xmloff/source/text/XMLRedlineExport.cxx |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit e9112e17efa0e59078a5f921a22855db317a Author: Andrea Gelmini AuthorDate: Thu Jul 26 16:09:23 2018 +0200 Commit: Julien Nabet CommitDate: Sun Jul 29 17:32:09 2018 +0200 Fix typos Change-Id: I483680622a75affb9822bbf5fc4d14512961493f Reviewed-on: https://gerrit.libreoffice.org/58130 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/lotuswordpro/source/filter/lwpnumericfmt.cxx b/lotuswordpro/source/filter/lwpnumericfmt.cxx index 2d41599f798f..313c3c3d275e 100644 --- a/lotuswordpro/source/filter/lwpnumericfmt.cxx +++ b/lotuswordpro/source/filter/lwpnumericfmt.cxx @@ -353,7 +353,7 @@ XFStyle* LwpNumericFormat::Convert() static_cast(aColor.GetGreen()), static_cast(aColor.GetBlue())) ); } -{//Negtive +{//Negative pStyle->SetNegativeStyle( aNegPrefix, aNegSuffix, XFColor(static_cast(aNegativeColor.GetRed()), static_cast(aNegativeColor.GetGreen()), static_cast(aNegativeColor.GetBlue())) ); diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index fa0b16627fc0..bd63396d6340 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -601,7 +601,7 @@ static void lcl_CpyBox( const SwTable& rCpyTable, const SwTableBox* pCpyBox, if( bReplaceColl && (( 1 < rDstTable.GetTabLines().size() && pLine == rDstTable.GetTabLines().front() ) -// Is the Table's content sill valid? +// Is the Table's content still valid? ? RES_POOLCOLL_TABLE == nPoolId : RES_POOLCOLL_TABLE_HDLN == nPoolId ) ) { diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx index 6e23cd2d4743..fa494e86396a 100644 --- a/xmloff/source/text/XMLRedlineExport.cxx +++ b/xmloff/source/text/XMLRedlineExport.cxx @@ -368,7 +368,7 @@ void XMLRedlineExport::ExportChangedRegion( // be exported there } -// changed change? Hierarchical changes can onl be two levels +// changed change? Hierarchical changes can only be two levels // deep. Here we check for the second level. aAny = rPropSet->getPropertyValue("RedlineSuccessorData"); Sequence aSuccessorData; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: framework/source
framework/source/services/frame.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 836efb78798397be216b82475cd7581b1ee52622 Author: Andrea Gelmini AuthorDate: Thu Jul 26 16:02:23 2018 +0200 Commit: Julien Nabet CommitDate: Sun Jul 29 17:31:51 2018 +0200 Fix typo Change-Id: I5daaf19dab60a07033fd28499ba8ad2560d9 Reviewed-on: https://gerrit.libreoffice.org/58127 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index cc2987a32a27..4647f0e81b2b 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -1290,8 +1290,8 @@ void SAL_CALL Frame::activate() /*- @short deactivate frame in hierarchy -@descr This feature is used to deactive paths in our frame hierarchy. -You can be a listener for this event to react for it ... change some internal states or something else. +@descr This feature is used to deactivate paths in our frame hierarchy. +You can be a listener for this event to react for it... change some internal states or something else. @seealsomethod activate() @seealsomethod isActivate() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: download.lst external/harfbuzz
download.lst |4 ++-- external/harfbuzz/ExternalProject_harfbuzz.mk |2 +- external/harfbuzz/clang-cl.patch |6 +++--- external/harfbuzz/ubsan.patch | 10 +- 4 files changed, 11 insertions(+), 11 deletions(-) New commits: commit b96bbb1ff391036cbba832bc22100792880f0fe6 Author: Tomaž Vajngerl AuthorDate: Thu Jul 19 19:28:55 2018 +0200 Commit: Caolán McNamara CommitDate: Sun Jul 29 16:52:59 2018 +0200 upgrade the internal harfbuzz to 1.8.4 Change-Id: I127cf3fa3ae00e91c73114e1a1915ea614924819 Reviewed-on: https://gerrit.libreoffice.org/57771 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/download.lst b/download.lst index 9b1f4324408a..4ca0f5399c8a 100644 --- a/download.lst +++ b/download.lst @@ -94,8 +94,8 @@ export GPGME_SHA256SUM := 1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e64 export GPGME_TARBALL := gpgme-1.9.0.tar.bz2 export GRAPHITE_SHA256SUM := aa5e58356cd084000609ebbd93fef456a1bc0ab9e46fea20e81552fb286232a9 export GRAPHITE_TARBALL := graphite2-minimal-1.3.10.tgz -export HARFBUZZ_SHA256SUM := b5d6ac8415f97f3540d73f3f91c41c5c10f8a4d76350f11a7184062aae88ac0b -export HARFBUZZ_TARBALL := harfbuzz-1.7.4.tar.bz2 +export HARFBUZZ_SHA256SUM := 3c592f86fa0da69e2e0e98cae9f5d5b61def3bb7948aa00ca45748f27fa545fd +export HARFBUZZ_TARBALL := harfbuzz-1.8.4.tar.bz2 export HSQLDB_SHA256SUM := d30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370 export HSQLDB_TARBALL := 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip export HUNSPELL_SHA256SUM := 3cd9ceb062fe5814f668e4f22b2fa6e3ba0b339b921739541ce180cac4d6f4c4 diff --git a/external/harfbuzz/ExternalProject_harfbuzz.mk b/external/harfbuzz/ExternalProject_harfbuzz.mk index adc3e4c1bf59..55caa5ae0f6c 100644 --- a/external/harfbuzz/ExternalProject_harfbuzz.mk +++ b/external/harfbuzz/ExternalProject_harfbuzz.mk @@ -47,7 +47,7 @@ $(call gb_ExternalProject_get_state_target,harfbuzz,build) : $(if $(ENABLE_OPTIMIZED), \ $(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \ $(if $(debug),$(gb_DEBUG_CFLAGS) $(gb_DEBUG_CXXFLAGS)) \ - $(CXXFLAGS) \ + $(CXXFLAGS) $(CXXFLAGS_CXX11) \ $(ICU_UCHAR_TYPE) \ $(if $(filter LINUX,$(OS)),-fvisibility=hidden)' \ && (cd $(EXTERNAL_WORKDIR)/src && $(MAKE) lib) \ diff --git a/external/harfbuzz/clang-cl.patch b/external/harfbuzz/clang-cl.patch index 5ba470637601..9fbeee4114d8 100644 --- a/external/harfbuzz/clang-cl.patch +++ b/external/harfbuzz/clang-cl.patch @@ -1,12 +1,12 @@ --- src/hb-common.h +++ src/hb-common.h -@@ -331,7 +331,9 @@ +@@ -346,7 +346,9 @@ * -* http://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html +* https://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html */ +#if !defined _MSC_VER /* avoid clang-cl -Wmicrosoft-enum-value */ _HB_SCRIPT_MAX_VALUE= HB_TAG_MAX, /*< skip >*/ +#endif _HB_SCRIPT_MAX_VALUE_SIGNED = HB_TAG_MAX_SIGNED /*< skip >*/ - + } hb_script_t; diff --git a/external/harfbuzz/ubsan.patch b/external/harfbuzz/ubsan.patch index c2247ef84d3e..fb299316af9d 100644 --- a/external/harfbuzz/ubsan.patch +++ b/external/harfbuzz/ubsan.patch @@ -1,11 +1,11 @@ --- src/hb-ot-hmtx-table.hh +++ src/hb-ot-hmtx-table.hh -@@ -143,7 +143,7 @@ - return default_advance; +@@ -263,7 +263,7 @@ struct hmtxvmtx + return default_advance; } -- return table->longMetric[MIN (glyph, (uint32_t) num_advances - 1)].advance -+ return static_cast(table->longMetric)[MIN (glyph, (uint32_t) num_advances - 1)].advance - + var_table->get_advance_var (glyph, font->coords, font->num_coords); // TODO Optimize?! +- return table->longMetric[MIN (glyph, (uint32_t) num_advances - 1)].advance; ++ return static_cast(table->longMetric)[MIN (glyph, (uint32_t) num_advances - 1)].advance; } + inline unsigned int get_advance (hb_codepoint_t glyph, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/filter/xml/xmltransformationi.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 7b61374d5274d7413380f15795c8ce4c437d512f Author: Caolán McNamara AuthorDate: Sun Jul 29 11:52:27 2018 +0100 Commit: Caolán McNamara CommitDate: Sun Jul 29 16:52:38 2018 +0200 coverity#1438138 Uninitialized scalar field Change-Id: I484e00503cc3db5e5d394bc0432532fb1d0fc987 Reviewed-on: https://gerrit.libreoffice.org/58272 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/filter/xml/xmltransformationi.cxx b/sc/source/filter/xml/xmltransformationi.cxx index d07e0a124f9b..857895149bf5 100644 --- a/sc/source/filter/xml/xmltransformationi.cxx +++ b/sc/source/filter/xml/xmltransformationi.cxx @@ -336,6 +336,7 @@ uno::Reference ScXMLColumnAggregateContext::ScXMLColumnAggregateContext( ScXMLImport& rImport, const rtl::Reference& rAttrList) : ScXMLImportContext(rImport) +, maType(sc::AGGREGATE_FUNCTION::SUM) { OUString aType = OUString(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sc/source sw/source
sc/source/filter/xml/xmltransformationi.cxx |1 + sw/source/filter/html/swhtml.cxx| 16 2 files changed, 5 insertions(+), 12 deletions(-) New commits: commit 726038bf16c3657b45395570646a173ae310572f Author: Caolán McNamara AuthorDate: Sun Jul 29 11:54:04 2018 +0100 Commit: Caolán McNamara CommitDate: Sun Jul 29 16:25:40 2018 +0200 coverity#1438139 Uninitialized scalar field Change-Id: I7443003bb457a1cfb2e7df4225e94748ab09b5e9 Reviewed-on: https://gerrit.libreoffice.org/58273 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/filter/xml/xmltransformationi.cxx b/sc/source/filter/xml/xmltransformationi.cxx index 4eaa77bf7ff7..d07e0a124f9b 100644 --- a/sc/source/filter/xml/xmltransformationi.cxx +++ b/sc/source/filter/xml/xmltransformationi.cxx @@ -257,6 +257,7 @@ uno::Reference ScXMLColumnTextContext::ScXMLColumnTextContext( ScXMLImport& rImport, const rtl::Reference& rAttrList) : ScXMLImportContext(rImport) +, maType(sc::TEXT_TRANSFORM_TYPE::TO_LOWER) { OUString aType = OUString(); commit c6a890317fc82abec0cd9acb77d0a8d41252bf3b Author: Jochen Nitschke AuthorDate: Sun Jul 29 13:54:20 2018 +0200 Commit: Jochen Nitschke CommitDate: Sun Jul 29 16:25:30 2018 +0200 remove unused parameter rFont Change-Id: Iaccae5a81e555e27924452b87489e33629988b5d Reviewed-on: https://gerrit.libreoffice.org/58280 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Jochen Nitschke diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index e48b55471639..991251d62adb 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -2106,14 +2106,12 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken ) } static void lcl_swhtml_getItemInfo( const HTMLAttr& rAttr, - bool& rScriptDependent, bool& rFont, + bool& rScriptDependent, sal_uInt16& rScriptType ) { switch( rAttr.GetItem().Which() ) { case RES_CHRATR_FONT: -rFont = true; -SAL_FALLTHROUGH; case RES_CHRATR_FONTSIZE: case RES_CHRATR_LANGUAGE: case RES_CHRATR_POSTURE: @@ -2122,8 +2120,6 @@ static void lcl_swhtml_getItemInfo( const HTMLAttr& rAttr, rScriptDependent = true; break; case RES_CHRATR_CJK_FONT: -rFont = true; -SAL_FALLTHROUGH; case RES_CHRATR_CJK_FONTSIZE: case RES_CHRATR_CJK_LANGUAGE: case RES_CHRATR_CJK_POSTURE: @@ -2132,8 +2128,6 @@ static void lcl_swhtml_getItemInfo( const HTMLAttr& rAttr, rScriptDependent = true; break; case RES_CHRATR_CTL_FONT: -rFont = true; -SAL_FALLTHROUGH; case RES_CHRATR_CTL_FONTSIZE: case RES_CHRATR_CTL_LANGUAGE: case RES_CHRATR_CTL_POSTURE: @@ -2143,7 +2137,6 @@ static void lcl_swhtml_getItemInfo( const HTMLAttr& rAttr, break; default: rScriptDependent = false; -rFont = false; break; } } @@ -2225,10 +2218,10 @@ bool SwHTMLParser::AppendTextNode( SwHTMLAppendMode eMode, bool bUpdateNum ) pAttr->GetSttCnt() == 0; sal_Int32 nStt = pAttr->nSttContent; -bool bScript = false, bFont = false; +bool bScript = false; sal_uInt16 nScriptItem; bool bInsert = true; - lcl_swhtml_getItemInfo( *pAttr, bScript, bFont, + lcl_swhtml_getItemInfo( *pAttr, bScript, nScriptItem ); // set previous part if( bScript ) @@ -3099,8 +3092,7 @@ bool SwHTMLParser::EndAttr( HTMLAttr* pAttr, bool bChkEmpty ) // We do some optimization for script dependent attributes here. if( *pEndIdx == pAttr->GetSttPara() ) { -bool bFont = false; -lcl_swhtml_getItemInfo( *pAttr, bScript, bFont, nScriptItem ); +lcl_swhtml_getItemInfo( *pAttr, bScript, nScriptItem ); } } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source sw/source
sc/source/ui/docshell/docfunc.cxx |8 sw/source/filter/html/swhtml.cxx |2 +- 2 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 465084267d99fb7f38296609dbb7c46460fe2144 Author: Jochen Nitschke AuthorDate: Sun Jul 29 13:51:47 2018 +0200 Commit: Jochen Nitschke CommitDate: Sun Jul 29 16:25:13 2018 +0200 cppcheck: knownConditionTrueFalse Change-Id: I531667ef580bfa81126cdb3a8d227c9e8783e02c Reviewed-on: https://gerrit.libreoffice.org/58279 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Jochen Nitschke diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 3570f4730ed2..d364a03fead4 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -709,7 +709,7 @@ bool ScDocFunc::TransliterateText( const ScMarkData& rMark, TransliterationFlags ScDocument& rDoc = rDocShell.GetDocument(); bool bRecord = true; -if (bRecord && !rDoc.IsUndoEnabled()) +if (!rDoc.IsUndoEnabled()) bRecord = false; ScEditableTester aTester( &rDoc, rMark ); @@ -1310,7 +1310,7 @@ bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r { ScDocument& rDoc = rDocShell.GetDocument(); bool bRecord = true; -if ( bRecord && !rDoc.IsUndoEnabled() ) +if ( !rDoc.IsUndoEnabled() ) bRecord = false; bool bImportingXML = rDoc.IsImportingXML(); @@ -1379,7 +1379,7 @@ bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName, { ScDocument& rDoc = rDocShell.GetDocument(); bool bRecord = true; -if ( bRecord && !rDoc.IsUndoEnabled() ) +if ( !rDoc.IsUndoEnabled() ) bRecord = false; bool bImportingXML = rDoc.IsImportingXML(); @@ -2187,7 +2187,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, PaintPartFlags nPaintFlags = PaintPartFlags::Grid; bool bRecord = true; -if (bRecord && !rDoc.IsUndoEnabled()) +if (!rDoc.IsUndoEnabled()) bRecord = false; ScMarkData aMark; diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index f8543d6f601c..e48b55471639 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -2231,7 +2231,7 @@ bool SwHTMLParser::AppendTextNode( SwHTMLAppendMode eMode, bool bUpdateNum ) lcl_swhtml_getItemInfo( *pAttr, bScript, bFont, nScriptItem ); // set previous part -if( bInsert && bScript ) +if( bScript ) { const SwTextNode *pTextNd = pAttr->GetSttPara().GetNode().GetTextNode(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/inc/swdtflvr.hxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 072f5f01b2d089ddeb763c2dd62febe926935a71 Author: Caolán McNamara AuthorDate: Sun Jul 29 11:56:10 2018 +0100 Commit: Caolán McNamara CommitDate: Sun Jul 29 15:33:57 2018 +0200 coverity#1401328 Uncaught exception Change-Id: I9855d38d095ab726cd4c63573b71313f6bcb2ef8 Reviewed-on: https://gerrit.libreoffice.org/58274 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx index d230f6f21387..4fef3bd1e6c4 100644 --- a/sw/source/uibase/inc/swdtflvr.hxx +++ b/sw/source/uibase/inc/swdtflvr.hxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -68,7 +69,7 @@ class SW_DLLPUBLIC SwTransferable : public TransferableHelper /* #96392# Added pCreatorView to distinguish SwFrameShell from SwWrtShell. */ const SwFrameShell *m_pCreatorView; -std::unique_ptr m_pClpDocFac; +std::unique_ptr> m_pClpDocFac; std::unique_ptrm_pClpGraphic; std::unique_ptrm_pClpBitmap; Graphic *m_pOrigGraphic; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/filter/xml/xmltransformationi.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 06e1b26e2ae3f761f2643057c3d085335bb70b82 Author: Caolán McNamara AuthorDate: Sun Jul 29 11:50:45 2018 +0100 Commit: Caolán McNamara CommitDate: Sun Jul 29 15:25:44 2018 +0200 coverity#1438137 Uninitialized scalar field Change-Id: Iea93be89e5b62fb34a71ebbf4446fe8af9db516c Reviewed-on: https://gerrit.libreoffice.org/58271 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/filter/xml/xmltransformationi.cxx b/sc/source/filter/xml/xmltransformationi.cxx index 287485f69e91..4eaa77bf7ff7 100644 --- a/sc/source/filter/xml/xmltransformationi.cxx +++ b/sc/source/filter/xml/xmltransformationi.cxx @@ -412,6 +412,8 @@ uno::Reference ScXMLColumnNumberContext::ScXMLColumnNumberContext( ScXMLImport& rImport, const rtl::Reference& rAttrList) : ScXMLImportContext(rImport) +, maType(sc::NUMBER_TRANSFORM_TYPE::ROUND) +, maPrecision(0) { if (rAttrList.is()) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cui/source
cui/source/tabpages/labdlg.cxx | 10 -- 1 file changed, 10 deletions(-) New commits: commit 5c9a860dd219603af4e6b3de25ce9d07366fb63d Author: Muhammet Kara AuthorDate: Sun Jul 29 13:03:26 2018 +0300 Commit: Noel Grandin CommitDate: Sun Jul 29 13:47:56 2018 +0200 Merge identical switch cases in SvxCaptionTabPage Change-Id: I515c64191d7a9defc3e175c18d8be1f198e03160 Reviewed-on: https://gerrit.libreoffice.org/58267 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index 2425b08b68af..946528e44ae5 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -461,11 +461,6 @@ void SvxCaptionTabPage::SetupType_Impl( SdrCaptionType nType ) switch( nType ) { case SdrCaptionType::Type1: -m_pFT_LAENGE->Disable(); -m_pCB_LAENGE->Disable(); -LineOptHdl_Impl( m_pCB_LAENGE ); -break; - case SdrCaptionType::Type2: m_pFT_LAENGE->Disable(); m_pCB_LAENGE->Disable(); @@ -473,11 +468,6 @@ void SvxCaptionTabPage::SetupType_Impl( SdrCaptionType nType ) break; case SdrCaptionType::Type3: -m_pFT_LAENGE->Enable(); -m_pCB_LAENGE->Enable(); -LineOptHdl_Impl( m_pCB_LAENGE ); -break; - case SdrCaptionType::Type4: m_pFT_LAENGE->Enable(); m_pCB_LAENGE->Enable(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cui/source
cui/source/tabpages/tptrans.cxx |8 1 file changed, 8 deletions(-) New commits: commit d4f1942c1e4740e538fa332925e52a8b94492dfa Author: Muhammet Kara AuthorDate: Sun Jul 29 13:12:48 2018 +0300 Commit: Noel Grandin CommitDate: Sun Jul 29 13:47:27 2018 +0200 Merge identical switch cases in SvxTransparenceTabPage Change-Id: I463a947de16fee3b361a429c7dc3ef69bd507617 Reviewed-on: https://gerrit.libreoffice.org/58268 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx index f75416c0c94b..d0799155c98a 100644 --- a/cui/source/tabpages/tptrans.cxx +++ b/cui/source/tabpages/tptrans.cxx @@ -186,14 +186,6 @@ void SvxTransparenceTabPage::SetControlState_Impl(css::awt::GradientStyle eXGS) break; case css::awt::GradientStyle_ELLIPTICAL: -m_xFtTrgrCenterX->set_sensitive(true); -m_xMtrTrgrCenterX->set_sensitive(true); -m_xFtTrgrCenterY->set_sensitive(true); -m_xMtrTrgrCenterY->set_sensitive(true); -m_xFtTrgrAngle->set_sensitive(true); -m_xMtrTrgrAngle->set_sensitive(true); -break; - case css::awt::GradientStyle_SQUARE: case css::awt::GradientStyle_RECT: m_xFtTrgrCenterX->set_sensitive(true); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/core/dataaccess/ContentHelper.cxx | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) New commits: commit 0b4b16b572470039d5a4c0661a226f1d852c8a3e Author: Muhammet Kara AuthorDate: Sun Jul 29 13:22:26 2018 +0300 Commit: Noel Grandin CommitDate: Sun Jul 29 13:47:03 2018 +0200 Merge identical conditional branches in OContentHelper Change-Id: Ifaf72d1151f32dc99dbe76838f88090ee2fd7b15 Reviewed-on: https://gerrit.libreoffice.org/58269 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index 39f341ddb901..5f8bb59e0b59 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -332,19 +332,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue { const PropertyValue& rValue = pValues[ n ]; -if ( rValue.Name == "ContentType" ) -{ -// Read-only property! -aRet[ n ] <<= IllegalAccessException("Property is read-only!", -static_cast< cppu::OWeakObject * >( this ) ); -} -else if ( rValue.Name == "IsDocument" ) -{ -// Read-only property! -aRet[ n ] <<= IllegalAccessException("Property is read-only!", -static_cast< cppu::OWeakObject * >( this ) ); -} -else if ( rValue.Name == "IsFolder" ) +if ( rValue.Name == "ContentType" || rValue.Name == "IsDocument" || rValue.Name == "IsFolder" ) { // Read-only property! aRet[ n ] <<= IllegalAccessException("Property is read-only!", ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: oox/source
oox/source/export/drawingml.cxx | 63 ++-- 1 file changed, 42 insertions(+), 21 deletions(-) New commits: commit 22ab116a9cad1390c20fd6a0a3a6ddbccb2f760b Author: Caolán McNamara AuthorDate: Sat Jul 28 21:24:28 2018 +0100 Commit: Caolán McNamara CommitDate: Sun Jul 29 12:46:37 2018 +0200 crashtesting: additional crash on export to pptx Change-Id: I4fb2b69aaf53ecef7aae325108bc6a78f62336d4 Reviewed-on: https://gerrit.libreoffice.org/58264 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 039e41217ae2..9d42b41fd14c 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2741,41 +2741,57 @@ bool DrawingML::WriteCustomGeometry( int nPairIndex = 0; -for( int j = 0; j < aSegments.getLength(); ++j ) +bool bOK = true; +for (int j = 0; j < aSegments.getLength() && bOK; ++j) { if ( aSegments[ j ].Command == drawing::EnhancedCustomShapeSegmentCommand::CLOSESUBPATH ) { mpFS->singleElementNS( XML_a, XML_close, FSEND ); } -for ( int k = 0; k < aSegments[j].Count; ++k ) +for (int k = 0; k < aSegments[j].Count && bOK; ++k) { switch( aSegments[ j ].Command ) { case drawing::EnhancedCustomShapeSegmentCommand::MOVETO : { -mpFS->startElementNS( XML_a, XML_moveTo, FSEND ); -WriteCustomGeometryPoint(aPairs[nPairIndex], rSdrObjCustomShape); -mpFS->endElementNS( XML_a, XML_moveTo ); -nPairIndex++; +if (nPairIndex >= aPairs.getLength()) +bOK = false; +else +{ +mpFS->startElementNS( XML_a, XML_moveTo, FSEND ); + WriteCustomGeometryPoint(aPairs[nPairIndex], rSdrObjCustomShape); +mpFS->endElementNS( XML_a, XML_moveTo ); +nPairIndex++; +} break; } case drawing::EnhancedCustomShapeSegmentCommand::LINETO : { -mpFS->startElementNS( XML_a, XML_lnTo, FSEND ); -WriteCustomGeometryPoint(aPairs[nPairIndex], rSdrObjCustomShape); -mpFS->endElementNS( XML_a, XML_lnTo ); -nPairIndex++; +if (nPairIndex >= aPairs.getLength()) +bOK = false; +else +{ +mpFS->startElementNS( XML_a, XML_lnTo, FSEND ); + WriteCustomGeometryPoint(aPairs[nPairIndex], rSdrObjCustomShape); +mpFS->endElementNS( XML_a, XML_lnTo ); +nPairIndex++; +} break; } case drawing::EnhancedCustomShapeSegmentCommand::CURVETO : { -mpFS->startElementNS( XML_a, XML_cubicBezTo, FSEND ); -for( sal_uInt8 l = 0; l <= 2; ++l ) +if (nPairIndex + 2 >= aPairs.getLength()) +bOK = false; +else { - WriteCustomGeometryPoint(aPairs[nPairIndex+l], rSdrObjCustomShape); +mpFS->startElementNS( XML_a, XML_cubicBezTo, FSEND ); +for( sal_uInt8 l = 0; l <= 2; ++l ) +{ + WriteCustomGeometryPoint(aPairs[nPairIndex+l], rSdrObjCustomShape); +} +mpFS->endElementNS( XML_a, XML_cubicBezTo ); +nPairIndex += 3; } -mpFS->endElementNS( XML_a, XML_cubicBezTo ); -nPairIndex += 3; break; } case drawing::E
[Libreoffice-commits] core.git: wizards/source
wizards/source/access2base/Database.xba|7 +-- wizards/source/access2base/acConstants.xba |2 +- 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit 7a7eb2c270d598cb15ce38cefceeecba149fe467 Author: Jean-Pierre Ledure AuthorDate: Sun Jul 29 12:22:17 2018 +0200 Commit: Jean-Pierre Ledure CommitDate: Sun Jul 29 12:22:17 2018 +0200 Access2Base - FIX: flush external connections Connections opened with DoCmd.OpenDatabase were not flushed when closed explicitly. Risk of data loss. diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba index 3bd3bced482b..2a61d7e3c73a 100644 --- a/wizards/source/access2base/Database.xba +++ b/wizards/source/access2base/Database.xba @@ -227,8 +227,11 @@ Const cstThisSub = "Database.Close" mClose = False If _DbConnect <> DBCONNECTANY Then Goto Error_NotApplicable - Connection.close() - Connection.dispose() + With Connection + .flush + .close() + .dispose() + End With Set Connection = Nothing mClose = True diff --git a/wizards/source/access2base/acConstants.xba b/wizards/source/access2base/acConstants.xba index ae969182433f..e7961f5af4b0 100644 --- a/wizards/source/access2base/acConstants.xba +++ b/wizards/source/access2base/acConstants.xba @@ -9,7 +9,7 @@ REM Option Explicit REM Access2Base - -Global Const Access2Base_Version = "1.9.0" +Global Const Access2Base_Version = "6.2.0" ' Alignment on LibreOffice versions REM AcCloseSave REM - ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source drawinglayer/source dtrans/source extensions/source hwpfilter/source i18npool/source test/source vbahelper/source writerfilter/source
desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 10 ++--- drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx |9 ++-- dtrans/source/cnttype/mcnttype.cxx| 19 +- extensions/source/abpilot/datasourcehandling.cxx |3 - extensions/source/propctrlr/standardcontrol.cxx |8 ++-- extensions/source/propctrlr/stringrepresentation.cxx |9 ++-- hwpfilter/source/hwpreader.cxx| 17 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx | 10 ++--- test/source/mtfxmldump.cxx|8 ++-- vbahelper/source/msforms/vbacontrols.cxx |3 - writerfilter/source/dmapper/FormControlHelper.cxx |3 - 11 files changed, 50 insertions(+), 49 deletions(-) New commits: commit e593b623dad9456d3452c4c537479596bcd0b00b Author: Noel Grandin AuthorDate: Sat Jul 28 18:01:28 2018 +0200 Commit: Noel Grandin CommitDate: Sun Jul 29 12:14:22 2018 +0200 loplugin:stringloop in various Change-Id: Ic2436c6d94729211cd5bc72fee18af228381e4a3 Reviewed-on: https://gerrit.libreoffice.org/58250 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 5df9f5574093..e8442a20f8a1 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -140,14 +140,14 @@ void Entry_Impl::checkDependencies() deployment::DependencyException depExc; if ( e.Cause >>= depExc ) { -OUString aMissingDep( DpResId( RID_STR_ERROR_MISSING_DEPENDENCIES ) ); +OUStringBuffer aMissingDep( DpResId( RID_STR_ERROR_MISSING_DEPENDENCIES ) ); for ( sal_Int32 i = 0; i < depExc.UnsatisfiedDependencies.getLength(); ++i ) { -aMissingDep += "\n"; -aMissingDep += dp_misc::Dependencies::getErrorText( depExc.UnsatisfiedDependencies[i]); +aMissingDep.append("\n"); +aMissingDep.append(dp_misc::Dependencies::getErrorText( depExc.UnsatisfiedDependencies[i])); } -aMissingDep += "\n"; -m_sErrorText = aMissingDep; +aMissingDep.append("\n"); +m_sErrorText = aMissingDep.makeStringAndClear(); m_bMissingDeps = true; } } diff --git a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx index 952ef92284ae..e63728c48023 100644 --- a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx @@ -87,20 +87,21 @@ namespace drawinglayer const double fStrikeCharCount(fabs(getWidth()/fStrikeCharWidth)); const sal_uInt32 nStrikeCharCount(static_cast< sal_uInt32 >(fStrikeCharCount + 0.5)); std::vector aDXArray(nStrikeCharCount); -OUString aStrikeoutString; +OUStringBuffer aStrikeoutString; for(sal_uInt32 a(0); a < nStrikeCharCount; a++) { -aStrikeoutString += aSingleCharString; +aStrikeoutString.append(aSingleCharString); aDXArray[a] = (a + 1) * fStrikeCharWidth; } +auto len = aStrikeoutString.getLength(); rContainer.push_back( new TextSimplePortionPrimitive2D( getObjectTransformation(), -aStrikeoutString, +aStrikeoutString.makeStringAndClear(), 0, -aStrikeoutString.getLength(), +len, aDXArray, getFontAttribute(), getLocale(), diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx index 3f982dd8a62c..f844c7998dd7 100644 --- a/dtrans/source/cnttype/mcnttype.cxx +++ b/dtrans/source/cnttype/mcnttype.cxx @@ -20,6 +20,7 @@ #include #include +#include #include "mcnttype.hxx" @@ -223,13 +224,13 @@ void CMimeContentType::trailer() OUString CMimeContentType::pName( ) { -OUString pname; +OUStringBuffer pname; OUString sToken(TOKEN); while( !m_nxtSym.isEmpty( ) ) { if ( isInRange( m_nxtSym, sToken ) ) -pname += m_nxtSym; +pname.append(m_nxtSym); else if ( isInRange( m_nxtSym, "= " ) ) break; else @@ -237,7 +238,7 @@ OUString CMimeContentType::pName( ) getSym( ); } -return pname; +return pname.makeStringAndClear(); } OUString CMimeContentType::pValue( ) @@ -276,7 +277,7 @@ OUString
[Libreoffice-commits] core.git: 2 commits - reportdesign/source sdext/source sd/source vcl/qa
reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |5 - sd/source/core/drawdoc3.cxx | 17 --- sd/source/filter/eppt/eppt.cxx |6 - sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx | 52 +--- sd/source/ui/annotations/annotationtag.cxx |6 - sd/source/ui/framework/configuration/Configuration.cxx | 14 +-- sd/source/ui/framework/tools/FrameworkHelper.cxx| 10 +- sd/source/ui/func/fuinsfil.cxx |8 - sd/source/ui/func/fulinend.cxx |4 sd/source/ui/unoidl/unolayer.cxx|3 sd/source/ui/view/DocumentRenderer.cxx |3 sdext/source/pdfimport/pdfparse/pdfentries.cxx | 18 ++-- sdext/source/pdfimport/pdfparse/pdfparse.cxx| 11 +- vcl/qa/cppunit/complextext.cxx |6 - 14 files changed, 68 insertions(+), 95 deletions(-) New commits: commit a612d738a8c909e18ed89675432ca42b376ef624 Author: Noel Grandin AuthorDate: Sat Jul 28 18:07:44 2018 +0200 Commit: Noel Grandin CommitDate: Sun Jul 29 12:14:02 2018 +0200 loplugin:stringloop in sd Change-Id: I5b0cd65b6e69490c79e0ac37c137283d19711787 Reviewed-on: https://gerrit.libreoffice.org/58252 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx index cee792543ef1..3d78ed662161 100644 --- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx @@ -370,7 +370,6 @@ void ExportDocumentHandler::exportTableRows() pCellAtt->AddAttribute(sValueType, "string"); bool bRemoveString = true; -OUString sFormula; const sal_Int32 nCount = m_aColumns.getLength(); if ( m_nColumnCount > nCount ) { @@ -391,9 +390,7 @@ void ExportDocumentHandler::exportTableRows() } for(sal_Int32 i = 0; i < nCount ; ++i) { -sFormula = "field:["; -sFormula += m_aColumns[i]; -sFormula += "]"; +OUString sFormula = "field:[" + m_aColumns[i] + "]"; SvXMLAttributeList* pList = new SvXMLAttributeList(); uno::Reference< xml::sax::XAttributeList > xAttribs = pList; pList->AddAttribute(sFormulaAttrib,sFormula); diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 5cd4c61cd185..aa72ae612206 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1368,27 +1368,18 @@ bool isMasterPageLayoutNameUnique(const SdDrawDocument& rDoc, const OUString& rC OUString createNewMasterPageLayoutName(const SdDrawDocument& rDoc) { const OUString aBaseName(SdResId(STR_LAYOUT_DEFAULT_NAME)); -OUString aRetval; sal_uInt16 nCount(0); - -while (aRetval.isEmpty()) +for (;;) { -aRetval = aBaseName; - +OUString aRetval = aBaseName; if(nCount) { aRetval += OUString::number(nCount); } - +if (isMasterPageLayoutNameUnique(rDoc, aRetval)) +return aRetval; nCount++; - -if(!isMasterPageLayoutNameUnique(rDoc, aRetval)) -{ -aRetval.clear(); -} } - -return aRetval; } void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 395fb50b2677..28edf2321323 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -1046,7 +1046,7 @@ bool PPTWriter::ImplCreateMainNotes() static OUString getInitials( const OUString& rName ) { -OUString sInitials; +OUStringBuffer sInitials; const sal_Unicode * pStr = rName.getStr(); sal_Int32 nLength = rName.getLength(); @@ -1062,7 +1062,7 @@ static OUString getInitials( const OUString& rName ) // take letter if( nLength ) { -sInitials += OUStringLiteral1( *pStr ); +sInitials.append( *pStr ); nLength--; pStr++; } @@ -1073,7 +1073,7 @@ static OUString getInitials( const OUString& rName ) } } -return sInitials; +return sInitials.makeStringAndClear(); } void ImplExportComments( const uno::Reference< drawing::XDrawPage >& xPage, SvMemoryStream& rBinaryTagData10Atom ) diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx index b3f570c1193d..f4cc1a71b0b6 100644 --- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx +++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx @@ -683,7 +683,7 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes() ::osl::MutexGuard aGuard (maMutex); uno::Any anyAtrribute; -OUString sValue;
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - officecfg/registry
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7f5e0afd81f6ddd751309725c0e398d2e9fe96b9 Author: Matthias Seidel AuthorDate: Sun Jul 29 08:47:48 2018 + Commit: Matthias Seidel CommitDate: Sun Jul 29 08:47:48 2018 + Removing extra spaces diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index d4b350f2524b..c6509b2a2ad2 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -934,7 +934,7 @@ -Center ( vertical ) +Center (vertical) 1 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/ui/browser/brwctrlr.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 5a9726ab6ce4cdc5ae7fdedf7fb74bc5a99aa36e Author: Muhammet Kara AuthorDate: Sat Jul 28 18:09:45 2018 +0200 Commit: Muhammet Kara CommitDate: Sun Jul 29 11:47:36 2018 +0200 Remove unused local variable aError Leftover from 529e7619c5258aec91c33dd57b9fa12c3e85cfeb Change-Id: Ifdfe0f0c75d4d0d2ce90310dcb9c3fbfff5775e1 Reviewed-on: https://gerrit.libreoffice.org/58253 Tested-by: Jenkins Reviewed-by: Muhammet Kara diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 075418222a09..2aba6826d7dc 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -615,7 +615,6 @@ void SbaXDataBrowserController::onStartLoading( const Reference< XLoadable >& _r void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLExceptionInfo& _rError ) { -::connectivity::SQLError aError; ::connectivity::ErrorCode nErrorCode( connectivity::SQLError::getErrorCode( sdb::ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED ) ); if ( static_cast(_rError)->ErrorCode == nErrorCode ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Equivalent of std::mktime in LO
Hey Vikas, On Sun, Jul 29, 2018 at 8:49 AM, Vikas Mahato wrote: > Hello All, > > I have a patch here, https://gerrit.libreoffice.org/#/c/58152/ and I am > trying to replace > > std::tm getDateTime(double nDateTime) > { > long nDays = std::trunc(nDateTime); > std::tm aDate = {}; > aDate.tm_year = 0; > aDate.tm_mon = 0; > aDate.tm_mday = 0; > aDate.tm_sec = getSecond(nDateTime); > aDate.tm_min = getMinute(nDateTime); > aDate.tm_hour = getHour(nDateTime); > aDate.tm_wday = 0; > aDate.tm_yday = 0; > // Add number of days > aDate.tm_mday += nDays; > std::mktime(&aDate); > return aDate; > } > > with css::util:DateTIme. I am having trouble finding out what is the > equivalent for std::mktime in LO. > The correct class is tools' DateTime which has a constructor explicit DateTime( DateTimeInitSystem );. Regards, Markus > > Thanks, > Vikas Mahato > > ___ > LibreOffice mailing list > LibreOffice@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/libreoffice > > ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice