[Libreoffice-commits] core.git: 2 commits - basctl/source compilerplugins/clang cui/source include/sfx2 sal/osl sfx2/source svx/source sw/source ucb/source vcl/inc vcl/source
basctl/source/basicide/basobj2.cxx |2 basctl/source/basicide/macrodlg.cxx |5 basctl/source/basicide/macrodlg.hxx |2 compilerplugins/clang/constantparam.bitmask.results | 12 compilerplugins/clang/constantparam.booleans.results | 1268 ++-- compilerplugins/clang/constantparam.constructors.results | 306 +-- compilerplugins/clang/constantparam.cxx |5 compilerplugins/clang/constantparam.numbers.results | 1524 ++- cui/source/customize/SvxMenuConfigPage.cxx |2 cui/source/customize/SvxToolbarConfigPage.cxx|2 cui/source/customize/cfg.cxx |4 cui/source/inc/cfg.hxx |5 include/sfx2/templatelocalview.hxx |2 sal/osl/unx/mutex.cxx| 20 sfx2/source/control/templatedefaultview.cxx |2 sfx2/source/control/templatelocalview.cxx|4 svx/source/tbxctrls/tbcontrl.cxx |6 sw/source/filter/basflt/fltshell.cxx | 10 sw/source/filter/inc/fltshell.hxx|9 sw/source/filter/ww8/writerhelper.cxx|9 ucb/source/ucp/file/filrset.cxx |3 ucb/source/ucp/file/filtask.cxx |5 ucb/source/ucp/file/filtask.hxx |3 vcl/inc/bitmap/Octree.hxx|2 vcl/source/bitmap/Octree.cxx |9 25 files changed, 1533 insertions(+), 1688 deletions(-) New commits: commit 8a08eaedfb2c9a6c002220a61c5b1f8ce1130f54 Author: Noel Grandin AuthorDate: Thu Jul 18 12:08:29 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 09:06:12 2019 +0200 coverity concurrency annotation attempt Let us see what happens if we annotate our mutex code, https://scan.coverity.com/models Change-Id: I7baf44d1a252f19b4ae47f3a6b318f7ccd9629d7 Reviewed-on: https://gerrit.libreoffice.org/75851 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sal/osl/unx/mutex.cxx b/sal/osl/unx/mutex.cxx index 72bcc370eebb..8cdc2a071376 100644 --- a/sal/osl/unx/mutex.cxx +++ b/sal/osl/unx/mutex.cxx @@ -85,6 +85,12 @@ void SAL_CALL osl_destroyMutex(oslMutex pMutex) } } +#ifdef __COVERITY__ +extern void __coverity_recursive_lock_acquire__(void*); +extern void __coverity_recursive_lock_release__(void*); +extern void __coverity_assert_locked__(void*); +#endif + sal_Bool SAL_CALL osl_acquireMutex(oslMutex pMutex) { SAL_WARN_IF(!pMutex, "sal.osl.mutex", "null pMutex"); @@ -97,6 +103,9 @@ sal_Bool SAL_CALL osl_acquireMutex(oslMutex pMutex) SAL_WARN("sal.osl.mutex", "pthread_mutex_lock failed: " << UnixErrnoString(nRet)); return false; } +#ifdef __COVERITY__ +__coverity_recursive_lock_acquire__(pMutex); +#endif return true; } @@ -114,7 +123,12 @@ sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex pMutex) { int nRet = pthread_mutex_trylock(&(pMutex->mutex)); if ( nRet == 0 ) +{ +#ifdef __COVERITY__ +__coverity_recursive_lock_acquire__(pMutex); +#endif result = true; +} } return result; @@ -122,6 +136,9 @@ sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex pMutex) sal_Bool SAL_CALL osl_releaseMutex(oslMutex pMutex) { +#ifdef __COVERITY__ +__coverity_assert_locked__(pMutex); +#endif SAL_WARN_IF(!pMutex, "sal.osl.mutex", "null pMutex"); if ( pMutex ) @@ -133,6 +150,9 @@ sal_Bool SAL_CALL osl_releaseMutex(oslMutex pMutex) return false; } +#ifdef __COVERITY__ +__coverity_recursive_lock_release__(pMutex); +#endif return true; } commit cdbe8a8700d5460e41d80b00310c6ff8977bc492 Author: Noel Grandin AuthorDate: Thu Jul 18 11:34:32 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 09:05:58 2019 +0200 loplugin:constantparam and tweak the plugin to handle a crash seen with clang-9 Change-Id: Ie1ccf80c16a20dbca58e5bd081af13f75cf5ac8f Reviewed-on: https://gerrit.libreoffice.org/75850 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 29c1ff6d5598..4131f7a6453d 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -249,7 +249,7 @@ OUString ChooseMacro(weld::Window* pParent, OUString aScriptURL; SbMethod* pMethod = nullptr; -MacroChooser aChooser(pParent, xDocFrame, true); +MacroChooser aChooser(pParent, xDocFrame); if ( bChooseOnly || !SvtModuleOptions::IsBasicIDE() ) aChooser.SetMode(MacroChooser::ChooseOnly); diff --git a/bas
[Libreoffice-commits] core.git: compilerplugins/clang
compilerplugins/clang/cppunitassertequals.cxx | 18 +- compilerplugins/clang/sharedvisitor/sharedvisitor.cxx | 15 +++ 2 files changed, 28 insertions(+), 5 deletions(-) New commits: commit cc3d75e14c840ed7c026fcdba5ca027ba516940a Author: Noel Grandin AuthorDate: Thu Jul 18 11:02:49 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 09:06:25 2019 +0200 make cppunitassertequals a shared plugin Change-Id: Ied9c26248cb72f2146fbe1a985f825f7525fa17c Reviewed-on: https://gerrit.libreoffice.org/75836 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/cppunitassertequals.cxx b/compilerplugins/clang/cppunitassertequals.cxx index 135a7e5c829a..930ecdd74e13 100644 --- a/compilerplugins/clang/cppunitassertequals.cxx +++ b/compilerplugins/clang/cppunitassertequals.cxx @@ -6,6 +6,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifndef LO_CLANG_SHARED_PLUGINS #include "plugin.hxx" #include "check.hxx" @@ -27,9 +28,14 @@ public: explicit CppunitAssertEquals(loplugin::InstantiationData const & data): FilteringPlugin(data) {} +virtual bool preRun() override +{ +return compiler.getLangOpts().CPlusPlus; +} + virtual void run() override { -if (compiler.getLangOpts().CPlusPlus) { +if (preRun()) { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } } @@ -129,7 +135,7 @@ bool CppunitAssertEquals::VisitCallExpr(const CallExpr* callExpr) } // copied from stringconcat.cxx -Expr const * stripCtor(Expr const * expr) { +Expr const * stripConstructor(Expr const * expr) { auto e0 = expr; auto const e1 = dyn_cast(e0); if (e1 != nullptr) { @@ -164,7 +170,7 @@ bool CppunitAssertEquals::isCompileTimeConstant(Expr const * expr) return true; // is string literal ? expr = expr->IgnoreParenImpCasts(); -expr = stripCtor(expr); +expr = stripConstructor(expr); return isa(expr); } @@ -220,8 +226,10 @@ void CppunitAssertEquals::reportEquals( << (name == "CPPUNIT_ASSERT_MESSAGE") << negative << range; } -loplugin::Plugin::Registration< CppunitAssertEquals > X("cppunitassertequals"); +loplugin::Plugin::Registration< CppunitAssertEquals > cppunitassertequals("cppunitassertequals"); -} +} // namespace + +#endif // LO_CLANG_SHARED_PLUGINS /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx b/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx index 1552f2661f32..0b95aeb711f0 100644 --- a/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx +++ b/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx @@ -14,6 +14,7 @@ #include "../badstatics.cxx" #include "../blockblock.cxx" #include "../charrightshift.cxx" +#include "../cppunitassertequals.cxx" #include "../data.cxx" #include "../datamembershadow.cxx" #include "../dbgunhandledexception.cxx" @@ -84,6 +85,7 @@ public: , badStatics( nullptr ) , blockBlock( nullptr ) , charRightShift( nullptr ) +, cppunitAssertEquals( nullptr ) , data( nullptr ) , dataMemberShadow( nullptr ) , dbgUnhandledException( nullptr ) @@ -143,6 +145,8 @@ public: blockBlock = nullptr; if( charRightShift && !charRightShift->preRun()) charRightShift = nullptr; +if( cppunitAssertEquals && !cppunitAssertEquals->preRun()) +cppunitAssertEquals = nullptr; if( data && !data->preRun()) data = nullptr; if( dataMemberShadow && !dataMemberShadow->preRun()) @@ -253,6 +257,8 @@ public: blockBlock->postRun(); if( charRightShift ) charRightShift->postRun(); +if( cppunitAssertEquals ) +cppunitAssertEquals->postRun(); if( data ) data->postRun(); if( dataMemberShadow ) @@ -369,6 +375,8 @@ public: blockBlock = static_cast< BlockBlock* >( plugin ); else if( strcmp( name, "charrightshift" ) == 0 ) charRightShift = static_cast< CharRightShift* >( plugin ); +else if( strcmp( name, "cppunitassertequals" ) == 0 ) +cppunitAssertEquals = static_cast< CppunitAssertEquals* >( plugin ); else if( strcmp( name, "data" ) == 0 ) data = static_cast< Data* >( plugin ); else if( strcmp( name, "datamembershadow" ) == 0 ) @@ -773,6 +781,11 @@ public: { if( ignoreLocation( arg )) return true; +if( cppunitAssertEquals != nullptr ) +{ +if( !cppunitAssertEquals->VisitCallExpr( arg )) +cppunitAssertEquals = nullptr; +} if( dbgUnhandledException != nullptr ) { if( !dbgUnhandledException->VisitCallExp
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |4 - sw/source/filter/ww8/docxsdrexport.cxx | 67 --- sw/source/filter/ww8/docxsdrexport.hxx |2 3 files changed, 2 insertions(+), 71 deletions(-) New commits: commit ab0df471915c5d54e8a3e8556de12afdfa541b3c Author: Miklos Vajna AuthorDate: Thu Jul 18 21:27:51 2019 +0200 Commit: Miklos Vajna CommitDate: Fri Jul 19 09:09:17 2019 +0200 sw btlr writing mode: remove not needed checkFrameBtlr() in the DOCX export Now that the DOCX import doesn't create this and instead uses the proper writing mode (neither VML nor drawingmL). Change-Id: I560c710866de8fb2f90d681e8cfc2d82afb1a327 Reviewed-on: https://gerrit.libreoffice.org/75930 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 1410fe3308cb..d53d51d5d51f 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7055,8 +7055,8 @@ void DocxAttributeOutput::CharIdctHint( const SfxPoolItem& ) void DocxAttributeOutput::CharRotate( const SvxCharRotateItem& rRotate) { -// Not rotated or we the rotation already handled? -if ( !rRotate.GetValue() || m_rExport.SdrExporter().getFrameBtLr()) +// Not rotated? +if ( !rRotate.GetValue()) return; AddToAttrList( m_pEastAsianLayoutAttrList, FSNS( XML_w, XML_vert ), "true" ); diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 725ceaaa7cd9..8b6fa63342c2 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -138,7 +138,6 @@ private: rtl::Reference m_pFlyAttrList; rtl::Reference m_pTextboxAttrList; OStringBuffer m_aTextFrameStyle; -bool m_bFrameBtLr; bool m_bDrawingOpen; bool m_bParagraphSdtOpen; bool m_bParagraphHasDrawing; ///Flag for checking drawing in a paragraph. @@ -161,7 +160,6 @@ public: , m_pFlyFrameSize(nullptr) , m_bTextFrameSyntax(false) , m_bDMLTextFrameSyntax(false) -, m_bFrameBtLr(false) , m_bDrawingOpen(false) , m_bParagraphSdtOpen(false) , m_bParagraphHasDrawing(false) @@ -177,8 +175,6 @@ public: void textFrameShadow(const SwFrameFormat& rFrameFormat); static bool isSupportedDMLShape(const uno::Reference& xShape); -/// Undo the text direction mangling done by the frame btLr handler in writerfilter::dmapper::DomainMapper::lcl_startCharacterGroup() -bool checkFrameBtlr(SwNode* pStartNode, bool bDML); void setSerializer(const sax_fastparser::FSHelperPtr& pSerializer) { @@ -222,10 +218,6 @@ public: OStringBuffer& getTextFrameStyle() { return m_aTextFrameStyle; } -void setFrameBtLr(bool bFrameBtLr) { m_bFrameBtLr = bFrameBtLr; } - -bool getFrameBtLr() { return m_bFrameBtLr; } - void setDrawingOpen(bool bDrawingOpen) { m_bDrawingOpen = bDrawingOpen; } bool getDrawingOpen() { return m_bDrawingOpen; } @@ -319,8 +311,6 @@ rtl::Reference& DocxSdrExport::getTextboxAttr OStringBuffer& DocxSdrExport::getTextFrameStyle() { return m_pImpl->getTextFrameStyle(); } -bool DocxSdrExport::getFrameBtLr() { return m_pImpl->getFrameBtLr(); } - bool DocxSdrExport::IsDrawingOpen() { return m_pImpl->getDrawingOpen(); } void DocxSdrExport::setParagraphSdtOpen(bool bParagraphSdtOpen) @@ -1128,7 +1118,6 @@ void DocxSdrExport::writeOnlyTextOfFrame(ww8::Frame const* pParentFrame) m_pImpl->setFlyFrameGraphic(true); m_pImpl->getExport().WriteText(); m_pImpl->setFlyFrameGraphic(false); -m_pImpl->setFrameBtLr(false); } void DocxSdrExport::writeBoxItemLine(const SvxBoxItem& rBox) @@ -1379,8 +1368,6 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho if (rDirection.GetValue() == SvxFrameDirection::Vertical_RL_TB) m_pImpl->getBodyPrAttrList()->add(XML_vert, "vert"); -m_pImpl->setFrameBtLr( - m_pImpl->checkFrameBtlr(m_pImpl->getExport().m_pDoc->GetNodes()[nStt], /*bDML=*/true)); m_pImpl->setFlyFrameGraphic(true); m_pImpl->getExport().WriteText(); if (m_pImpl->getParagraphSdtOpen()) @@ -1389,7 +1376,6 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho m_pImpl->setParagraphSdtOpen(false); } m_pImpl->setFlyFrameGraphic(false); -m_pImpl->setFrameBtLr(false); pFS->endElementNS(XML_w, XML_txbxContent); pFS->endElementNS(XML_wps, XML_txbx); @@ -1499,8 +1485,6 @@ void DocxSdrExport::writeVMLTextFrame(ww8::Frame const* pParentFrame, bool bText } sax_fastparser::XFastAttributeListRef xFlyAttrList(m_pImpl->getFlyAttrList().get()); m_pImpl->getFlyAttrList().clear(); -m_pImpl->setFrameBtLr( -m_pImpl->checkFrameBtlr(m_pImpl-
[Libreoffice-commits] core.git: dbaccess/source include/dbaccess
dbaccess/source/ui/misc/dbaundomanager.cxx|1 + include/dbaccess/IController.hxx |1 - include/dbaccess/dbaundomanager.hxx |9 - include/dbaccess/dbsubcomponentcontroller.hxx |3 --- include/dbaccess/genericcontroller.hxx|4 5 files changed, 1 insertion(+), 17 deletions(-) New commits: commit 8634bbde836c15db7e8e88372a1d5329e08a1406 Author: Gabor Kelemen AuthorDate: Sun Jul 7 16:47:44 2019 +0200 Commit: Miklos Vajna CommitDate: Fri Jul 19 09:11:07 2019 +0200 tdf#42949 Fix IWYU warnings in include/dbaccess Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie537e44054c0d1735f42e74385cc1bd8c8000c16 Reviewed-on: https://gerrit.libreoffice.org/75180 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/dbaccess/source/ui/misc/dbaundomanager.cxx b/dbaccess/source/ui/misc/dbaundomanager.cxx index 76f6e7508b06..0ee8e9985590 100644 --- a/dbaccess/source/ui/misc/dbaundomanager.cxx +++ b/dbaccess/source/ui/misc/dbaundomanager.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include diff --git a/include/dbaccess/IController.hxx b/include/dbaccess/IController.hxx index 5890489da5e7..754667afd4c0 100644 --- a/include/dbaccess/IController.hxx +++ b/include/dbaccess/IController.hxx @@ -21,7 +21,6 @@ #define INCLUDED_DBACCESS_ICONTROLLER_HXX #include -#include #include #include #include diff --git a/include/dbaccess/dbaundomanager.hxx b/include/dbaccess/dbaundomanager.hxx index 421a01ec28ab..c7d86c7b84df 100644 --- a/include/dbaccess/dbaundomanager.hxx +++ b/include/dbaccess/dbaundomanager.hxx @@ -20,20 +20,11 @@ #ifndef INCLUDED_DBACCESS_DBAUNDOMANAGER_HXX #define INCLUDED_DBACCESS_DBAUNDOMANAGER_HXX -#include #include -#include -#include -#include #include -#include -#include #include -#include #include -#include -#include #include #include #include diff --git a/include/dbaccess/dbsubcomponentcontroller.hxx b/include/dbaccess/dbsubcomponentcontroller.hxx index 2044e1ab6b91..01da13c9f8ff 100644 --- a/include/dbaccess/dbsubcomponentcontroller.hxx +++ b/include/dbaccess/dbsubcomponentcontroller.hxx @@ -20,15 +20,12 @@ #ifndef INCLUDED_DBACCESS_DBSUBCOMPONENTCONTROLLER_HXX #define INCLUDED_DBACCESS_DBSUBCOMPONENTCONTROLLER_HXX -#include #include -#include #include #include #include #include -#include #include #include #include diff --git a/include/dbaccess/genericcontroller.hxx b/include/dbaccess/genericcontroller.hxx index f9aa378b0d99..0d4d460ad886 100644 --- a/include/dbaccess/genericcontroller.hxx +++ b/include/dbaccess/genericcontroller.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -44,9 +43,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -60,7 +57,6 @@ #include #include #include -#include #include #include #include ___ 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 vcl/source
sw/source/core/doc/docbm.cxx |6 ++- vcl/source/bitmap/BitmapScaleSuperFilter.cxx | 52 +-- 2 files changed, 30 insertions(+), 28 deletions(-) New commits: commit 1692c206e582c42b50308b72509bf86874afaf73 Author: Caolán McNamara AuthorDate: Thu Jul 18 12:16:30 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:37:41 2019 +0200 cid#704863 Dereference after null check Change-Id: I472f48c64a6f2d13b124ede28a83dab3b46f759f Reviewed-on: https://gerrit.libreoffice.org/75915 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index ef7812c6cb8e..883be228142e 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -681,7 +681,8 @@ namespace sw { namespace mark if (bUndoIsEnabled) { m_pDoc->GetIDocumentUndoRedo().DoUndo(bUndoIsEnabled); - m_pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique(*pFieldMark)); +if (pFieldMark) + m_pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique(*pFieldMark)); } return pFieldMark; @@ -726,7 +727,8 @@ namespace sw { namespace mark if (bUndoIsEnabled) { m_pDoc->GetIDocumentUndoRedo().DoUndo(bUndoIsEnabled); - m_pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique(*pFieldMark)); +if (pFieldMark) + m_pDoc->GetIDocumentUndoRedo().AppendUndo(std::make_unique(*pFieldMark)); } m_pDoc->getIDocumentState().SetEnableSetModified(bEnableSetModified); commit abd13678a02a39110c6eef5ad55dcb97fce62ade Author: Caolán McNamara AuthorDate: Thu Jul 18 11:44:28 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:37:29 2019 +0200 cid#1448308 Unintended sign extension Change-Id: I3d89afa66dc42144f0717c34593d48c4869aeec4 Reviewed-on: https://gerrit.libreoffice.org/75923 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx index b621ebe95fa7..7f7d5bffdd3c 100644 --- a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx +++ b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx @@ -395,10 +395,10 @@ void scaleDown32bit(ScaleContext &rCtx, long nStartY, long nEndY) 1 : (rCtx.maMapIX[nRight] - rCtx.maMapIX[nLeft]); } -long nSum1 = 0; -long nSum2 = 0; -long nSum3 = 0; -long nSum4 = 0; +int nSum1 = 0; +int nSum2 = 0; +int nSum3 = 0; +int nSum4 = 0; BilinearWeightType nTotalWeightY = 0; for (long i = 0; i<= nLineRange; i++) @@ -406,10 +406,10 @@ void scaleDown32bit(ScaleContext &rCtx, long nStartY, long nEndY) Scanline pTmpY = rCtx.mpSrc->GetScanline(nLineStart + i); Scanline pTmpX = pTmpY + constColorComponents * nRowStart; -long nSumRow1 = 0; -long nSumRow2 = 0; -long nSumRow3 = 0; -long nSumRow4 = 0; +int nSumRow1 = 0; +int nSumRow2 = 0; +int nSumRow3 = 0; +int nSumRow4 = 0; BilinearWeightType nTotalWeightX = 0; for (long j = 0; j <= nRowRange; j++) @@ -531,17 +531,17 @@ void scaleDownPalette8bit(ScaleContext &rCtx, long nStartY, long nEndY) nRowRange = ( rCtx.maMapIX[ nRight ] == rCtx.maMapIX[ nLeft ] )? 1 : ( rCtx.maMapIX[ nRight ] - rCtx.maMapIX[ nLeft ] ); } -long nSumR = 0; -long nSumG = 0; -long nSumB = 0; +int nSumR = 0; +int nSumG = 0; +int nSumB = 0; BilinearWeightType nTotalWeightY = 0; for(long i = 0; i<= nLineRange; i++) { Scanline pTmpY = rCtx.mpSrc->GetScanline( nLineStart + i ); -long nSumRowR = 0; -long nSumRowG = 0; -long nSumRowB = 0; +int nSumRowR = 0; +int nSumRowG = 0; +int nSumRowB = 0; BilinearWeightType nTotalWeightX = 0; for(long j = 0; j <= nRowRange; j++) @@ -655,16 +655,16 @@ void scaleDownPaletteGeneral(ScaleContext &rCtx, long nStartY, long nEndY) nRowRange = ( rCtx.maMapIX[ nRight ] == rCtx.maMapIX[ nLeft ] )? 1 : ( rCtx.maMapIX[ nRight ] - rCtx.maMapIX[ nLeft ] ); } -long nSumR = 0; -long nSumG = 0; -long nSumB = 0; +int nSumR = 0; +int nSumG = 0; +int nSumB = 0; BilinearWeightType nTotalWeightY = 0; for(long i = 0; i<= n
[Libreoffice-commits] core.git: 2 commits - qadevOOo/tests sal/osl
qadevOOo/tests/java/ifc/view/_XMultiSelectionSupplier.java |2 +- sal/osl/unx/pipe.cxx |3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) New commits: commit 5b52057a64ba9e78cf16c682e15f827d12a0e62e Author: Caolán McNamara AuthorDate: Thu Jul 18 12:37:12 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:38:09 2019 +0200 cid#1448293 Copy into fixed size buffer Change-Id: I0ff36c58bf2448bdccc239582ba24b69c7431c6d Reviewed-on: https://gerrit.libreoffice.org/75921 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx index e9888e577ec5..c56c7a3c3d17 100644 --- a/sal/osl/unx/pipe.cxx +++ b/sal/osl/unx/pipe.cxx @@ -208,7 +208,8 @@ static oslPipe osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions Op SAL_INFO("sal.osl.pipe", "new pipe on fd " << pPipe->m_Socket << " '" << name << "'"); addr.sun_family = AF_UNIX; -strcpy(addr.sun_path, name.getStr()); // safe, see check above +// coverity[fixed_size_dest : FALSE] - safe, see check above +strcpy(addr.sun_path, name.getStr()); #if defined(FREEBSD) len = SUN_LEN(&addr); #else commit baf0502fe915365c09dabb9dc9eb08956ec4bcdc Author: Caolán McNamara AuthorDate: Thu Jul 18 12:38:22 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:37:55 2019 +0200 cid#1448215 RV: Bad use of return value Change-Id: Ie974436b9d639a676336a95d5fef6545869e1ca8 Reviewed-on: https://gerrit.libreoffice.org/75922 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/qadevOOo/tests/java/ifc/view/_XMultiSelectionSupplier.java b/qadevOOo/tests/java/ifc/view/_XMultiSelectionSupplier.java index fa875234cbda..e262a15c8a33 100644 --- a/qadevOOo/tests/java/ifc/view/_XMultiSelectionSupplier.java +++ b/qadevOOo/tests/java/ifc/view/_XMultiSelectionSupplier.java @@ -390,7 +390,7 @@ public class _XMultiSelectionSupplier extends MultiMethodTest { i--; if (ObjCompare != null) { -ObjCompare.compare(shouldElement, nextElement); +compRes = ObjCompare.compare(shouldElement, nextElement) == 0; } else { compRes = util.ValueComparer.equalValue(shouldElement, nextElement); } ___ 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/core/doc/docbm.cxx|6 +++--- sw/source/uibase/shells/textsh1.cxx |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 6d86d5ff4a3a90462980eb5b2d392af7ee78bfc4 Author: Caolán McNamara AuthorDate: Thu Jul 18 12:33:58 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:38:40 2019 +0200 cid#1451638 Unchecked dynamic_cast Change-Id: Ia0fc1ffdd5dbed4b7c32587741d59dcf2782ed61 Reviewed-on: https://gerrit.libreoffice.org/75920 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 883be228142e..ecd9b2774937 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1348,9 +1348,9 @@ namespace sw { namespace mark { if (m_pLastActiveFieldmark != pFieldBM) { -auto pFormField = dynamic_cast(pFieldBM); -pFormField->ShowButton(&rEditWin); -pNewActiveFieldmark = pFormField; +FieldmarkWithDropDownButton& rFormField = dynamic_cast(*pFieldBM); +rFormField.ShowButton(&rEditWin); +pNewActiveFieldmark = &rFormField; } else { commit 0628e615f0c2471d58f3e61ca868eaff6f95711f Author: Caolán McNamara AuthorDate: Thu Jul 18 12:26:15 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:38:25 2019 +0200 cid#1448363 Unchecked dynamic_cast Change-Id: Ibfa31b291f58c90f052f1d052b6294e8c544965c Reviewed-on: https://gerrit.libreoffice.org/75918 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 3cc3be15ed9e..b5acb1ee9ce2 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1371,7 +1371,7 @@ void SwTextShell::Execute(SfxRequest &rReq) rWrtSh.InvalidateWindows( rWrtSh.GetView().GetVisArea() ); rWrtSh.UpdateCursor(); // cursor position might be invalid // Hide the button here and make it visible later, to make transparent background work with SAL_USE_VCLPLUGIN=gen - dynamic_cast<::sw::mark::DropDownFieldmark*>(pFieldBM)->HideButton(); + dynamic_cast<::sw::mark::DropDownFieldmark&>(*pFieldBM).HideButton(); } } else if ( pFieldBM && pFieldBM->GetFieldname() == ODF_FORMDATE ) ___ 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/filter/ww8/docxattributeoutput.cxx |8 sw/source/ui/index/cnttab.cxx|2 +- 2 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 9a7e98a1c61667a406eaf7aabe1bf60323877d37 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:50:19 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:39:05 2019 +0200 cid#1448358 Improper use of negative value Change-Id: Ife6a57484734cab759c31ca4ded688a03400e9b7 Reviewed-on: https://gerrit.libreoffice.org/75909 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 3f39e6f9a22c..5b1f6c53d099 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -2150,7 +2150,7 @@ IMPL_LINK(SwTOXEntryTabPage, RemoveInsertAuthHdl, weld::Button&, rButton, void) sal_Int32 nSelPos = m_xAuthFieldsLB->get_active(); const OUString sToInsert(m_xAuthFieldsLB->get_active_text()); SwFormToken aInsert(TOKEN_AUTHORITY); -aInsert.nAuthorityField = m_xAuthFieldsLB->get_id(nSelPos).toInt32(); +aInsert.nAuthorityField = m_xAuthFieldsLB->get_id(nSelPos).toUInt32(); m_xTokenWIN->InsertAtSelection(aInsert); m_xAuthFieldsLB->remove_text(sToInsert); m_xAuthFieldsLB->set_active(nSelPos ? nSelPos - 1 : 0); commit 81831152df74f9b097992d9924f25f93872c41f8 Author: Caolán McNamara AuthorDate: Thu Jul 18 12:31:07 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:38:52 2019 +0200 cid#14561625 Unchecked dynamic_cast Change-Id: Ibe350b00633ae55434da6aafc5829682cead35af Reviewed-on: https://gerrit.libreoffice.org/75919 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index d53d51d5d51f..1e5b7ccc9a9c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1921,8 +1921,8 @@ void DocxAttributeOutput::StartField_Impl( const SwTextNode* pNode, sal_Int32 nP } else if ( rInfos.eType == ww::eFORMDATE ) { -const sw::mark::IDateFieldmark* const pFieldmark = dynamic_cast(rInfos.pFieldmark); -FieldMarkParamsHelper params( *pFieldmark ); +const sw::mark::IDateFieldmark& rFieldmark = dynamic_cast(*rInfos.pFieldmark); +FieldMarkParamsHelper params(rFieldmark); OUString sFullDate; OUString sCurrentDate; @@ -1933,10 +1933,10 @@ void DocxAttributeOutput::StartField_Impl( const SwTextNode* pNode, sal_Int32 nP } else { -std::pair aResult = pFieldmark->GetCurrentDate(); +std::pair aResult = rFieldmark.GetCurrentDate(); if(aResult.first) { -sFullDate = pFieldmark->GetDateInStandardDateFormat(aResult.second) + "T00:00:00Z"; +sFullDate = rFieldmark.GetDateInStandardDateFormat(aResult.second) + "T00:00:00Z"; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svditer.cxx |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit 04d661cfa2794cd4d7e1833dd795b3755c8b2d60 Author: Caolán McNamara AuthorDate: Thu Jul 18 12:22:26 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:39:18 2019 +0200 cid#1448251 Unchecked dynamic_cast Change-Id: I96b87d05d6633849d7a32a40e87b9fb4ee48b15d Reviewed-on: https://gerrit.libreoffice.org/75916 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx index 45134a7fb86e..874f1caac9d4 100644 --- a/svx/source/svdraw/svditer.cxx +++ b/svx/source/svdraw/svditer.cxx @@ -74,11 +74,8 @@ SdrObjListIter::SdrObjListIter(const SdrPage* pSdrPage, SdrIterMode eMode, bool mbReverse(bReverse), mbUseZOrder(true) { -if(nullptr != pSdrPage) -{ -ImpProcessObjectList(*dynamic_cast< const SdrObjList* >(pSdrPage), eMode); -} - +if (const SdrObjList* pList = dynamic_cast(pSdrPage)) +ImpProcessObjectList(*pList, eMode); Reset(); } ___ 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 sd/source
sc/source/ui/view/tabview3.cxx |2 ++ sd/source/ui/view/sdview4.cxx |7 --- 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit 00ece34fb7916b18053273e54fbe746170570d34 Author: Caolán McNamara AuthorDate: Thu Jul 18 12:04:21 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:39:55 2019 +0200 cid#1448319 Use after free Change-Id: I45a4ea5c21707606b8853bb775a7d9eec595b88c Reviewed-on: https://gerrit.libreoffice.org/75912 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index cb50639b2593..93d88afb7028 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -270,9 +270,10 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, } else { -InsertObjectAtView(pNewGrafObj, *pPV, nOptions); - -if( pImageMap ) +bool bSuccess = InsertObjectAtView(pNewGrafObj, *pPV, nOptions); +if (!bSuccess) +pNewGrafObj = nullptr; +else if (pImageMap) pNewGrafObj->AppendUserData(std::unique_ptr(new SdIMapInfo(*pImageMap))); } } commit 7ec75e04da4b7ada7ba120fbc5a30f6d5152cc85 Author: Caolán McNamara AuthorDate: Thu Jul 18 12:23:51 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:39:40 2019 +0200 cid#1448311 Dereference null return value Change-Id: Ie0ad350d48441dc6012dddc9fa3989acc4d4aab8 Reviewed-on: https://gerrit.libreoffice.org/75917 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index dd67d915e674..a40eb9374ee9 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2557,6 +2557,8 @@ void ScTabView::DoDPFieldPopup(OUString const & rPivotTableName, sal_Int32 nDime ScDPCollection* pDPCollection = rDocument.GetDPCollection(); ScDPObject* pDPObject = pDPCollection->GetByName(rPivotTableName); +if (!pDPObject) +return; pDPObject->BuildAllDimensionMembers(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - comphelper/source desktop/source
comphelper/source/streaming/oslfile2streamwrap.cxx | 11 --- desktop/source/app/opencl.cxx |2 +- 2 files changed, 5 insertions(+), 8 deletions(-) New commits: commit d0feba06767cfa3adce2db8d6bc87bc969418d28 Author: Caolán McNamara AuthorDate: Thu Jul 18 10:58:05 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:40:59 2019 +0200 cid#1448429 Unchecked return value Change-Id: Iddbd6bc2126943752e2057b749fd6f9943261be7 Reviewed-on: https://gerrit.libreoffice.org/75888 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx index c69473a60943..14441d61f76f 100644 --- a/comphelper/source/streaming/oslfile2streamwrap.cxx +++ b/comphelper/source/streaming/oslfile2streamwrap.cxx @@ -66,7 +66,6 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8 return sal::static_int_cast< sal_Int32 >(nRead); } - sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead) { if (!m_pFile) @@ -78,7 +77,6 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(css::uno::Sequence< sal_ return readBytes(aData, nMaxBytesToRead); } - void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -86,17 +84,16 @@ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) throw css::io::NotConnectedException(OUString(), static_cast(this)); sal_uInt64 nCurrentPos; -m_pFile->getPos(nCurrentPos); +FileBase::RC eError = m_pFile->getPos(nCurrentPos); +if (eError != FileBase::E_None) +throw css::io::NotConnectedException(OUString(), static_cast(this)); sal_uInt64 nNewPos = nCurrentPos + nBytesToSkip; -FileBase::RC eError = m_pFile->setPos(osl_Pos_Absolut, nNewPos); +eError = m_pFile->setPos(osl_Pos_Absolut, nNewPos); if (eError != FileBase::E_None) -{ throw css::io::NotConnectedException(OUString(), static_cast(this)); -} } - sal_Int32 SAL_CALL OSLInputStreamWrapper::available() { ::osl::MutexGuard aGuard( m_aMutex ); commit 5419243c06b12d04af765f92121a5cae7d4305fd Author: Caolán McNamara AuthorDate: Thu Jul 18 10:33:12 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:40:43 2019 +0200 cid#1448295 Unchecked return value Change-Id: I4b0dd4fc9051f04448a651cb87b449a58d2a5349 Reviewed-on: https://gerrit.libreoffice.org/75874 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/desktop/source/app/opencl.cxx b/desktop/source/app/opencl.cxx index c421a3ab66da..6e90d6b71282 100644 --- a/desktop/source/app/opencl.cxx +++ b/desktop/source/app/opencl.cxx @@ -217,7 +217,7 @@ void Desktop::CheckOpenCLCompute(const Reference< XDesktop2 > &xDesktop) rtl::Bootstrap::expandMacros(aURL); DirectoryItem aItem; -DirectoryItem::get( aURL, aItem ); +(void)DirectoryItem::get( aURL, aItem ); FileStatus aFileStatus( osl_FileStatus_Mask_ModifyTime ); (void)aItem.getFileStatus( aFileStatus ); TimeValue aTimeVal = aFileStatus.getModifyTime(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - canvas/workben svx/source
canvas/workben/canvasdemo.cxx|2 +- svx/source/gallery2/galtheme.cxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit d5019f7cacfcb7f2becdf1fadc2015be70f751c9 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:15:01 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:40:26 2019 +0200 cid#1448484 Unchecked return value Change-Id: I4e06228665c90820e88c72bfe4e462af9a0074e9 Reviewed-on: https://gerrit.libreoffice.org/75897 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 5875abd76bbd..62b84c6a05e0 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -932,8 +932,8 @@ bool GalleryTheme::InsertModel(const FmFormModel& rModel, sal_uInt32 nInsertPos) { uno::Reference< io::XOutputStream > xDocOut( new utl::OOutputStreamWrapper( aMemStm ) ); -if( xDocOut.is() ) -SvxDrawingLayerExport( pFormModel, xDocOut ); +if (xDocOut.is()) +(void)SvxDrawingLayerExport( pFormModel, xDocOut ); } aMemStm.Seek( 0 ); commit 7864ab4ec3a164f299a71dcf6298213e4e4d46f6 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:25:56 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:40:10 2019 +0200 cid#1448246 Result is not floating-point Change-Id: I96fb06ffec6f8196dfa01ff13d45c1f618e671fc Reviewed-on: https://gerrit.libreoffice.org/75905 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx index 23df7d4c437c..788d76e3dfcf 100644 --- a/canvas/workben/canvasdemo.cxx +++ b/canvas/workben/canvasdemo.cxx @@ -131,7 +131,7 @@ class DemoRenderer void drawGrid() { -double d, dIncr = maSize.Width() / 3; +long d, dIncr = maSize.Width() / 3; for ( d = 0; d <= maSize.Width(); d += dIncr ) mxCanvas->drawLine( geometry::RealPoint2D( d, 0 ), geometry::RealPoint2D( d, maSize.Height() ), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - filter/source vcl/source
filter/source/xsltfilter/LibXSLTTransformer.cxx |2 +- vcl/source/gdi/virdev.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 3a6424888642d716234bcac520996f01ace62a22 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:20:07 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:41:24 2019 +0200 cid#1448509 Unchecked return value from library Change-Id: Idda609ca8f1cad0e2a703b0b6ba3b0a2b661874b Reviewed-on: https://gerrit.libreoffice.org/75901 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx index c2b9e9dd65fb..1f4eed7ad1f0 100644 --- a/filter/source/xsltfilter/LibXSLTTransformer.cxx +++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx @@ -316,7 +316,7 @@ namespace XSLT outBuf->writecallback = &ParserOutputBufferCallback::on_write; outBuf->closecallback = &ParserOutputBufferCallback::on_close; xsltSaveResultTo(outBuf, result, styleSheet); -xmlOutputBufferClose(outBuf); +(void)xmlOutputBufferClose(outBuf); } else { commit a4d7ad970122e0877f895021a83d8692fbd2967c Author: Caolán McNamara AuthorDate: Thu Jul 18 11:23:52 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:41:11 2019 +0200 cid#1451641 Unchecked return value Change-Id: Ifc9a6d3e268af27515cdf3b2b1da471368d50e87 Reviewed-on: https://gerrit.libreoffice.org/75904 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index ed6123ce2055..196ed44871cb 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -479,7 +479,7 @@ void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32 mxFontCache.reset(); // get font list with scalable fonts only -AcquireGraphics(); +(void)AcquireGraphics(); mxFontCollection = pSVData->maGDIData.mxScreenFontList->Clone(); // prepare to use new font lists ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: soltools/mkdepend
soltools/mkdepend/main.c |1 - 1 file changed, 1 deletion(-) New commits: commit 37afe1443ef35987e289d2419b78b200e6007fd5 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:27:35 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:42:00 2019 +0200 cid#1448249 Identical code for different branches Change-Id: Ie34ff807eae5b058f2c234f42010931263859b35 Reviewed-on: https://gerrit.libreoffice.org/75906 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c index 51b6c8606cc9..7ee27c439f7d 100644 --- a/soltools/mkdepend/main.c +++ b/soltools/mkdepend/main.c @@ -272,7 +272,6 @@ int main(int argc, char**argv) break; /* do not use if endmarker processing */ case 'a': -if (endmarker) break; break; case 'w': if (endmarker) break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: qadevOOo/runner
qadevOOo/runner/util/ValueComparer.java |2 -- 1 file changed, 2 deletions(-) New commits: commit 14161f5e32441870a87031367218c24408e8cdc5 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:31:13 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:41:38 2019 +0200 cid#1448399 Useless call Change-Id: I5047aa583cbe2f96ea59434311463c91117a9266 Reviewed-on: https://gerrit.libreoffice.org/75907 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/qadevOOo/runner/util/ValueComparer.java b/qadevOOo/runner/util/ValueComparer.java index fce61bcd1d4a..a581ad3cbb01 100644 --- a/qadevOOo/runner/util/ValueComparer.java +++ b/qadevOOo/runner/util/ValueComparer.java @@ -98,8 +98,6 @@ public class ValueComparer { if((op1.getClass().getComponentType() == op2.getClass().getComponentType()) && (Array.getLength(op1) == Array.getLength(op2))) { -op1.getClass().getComponentType(); - for(int i = 0; i < Array.getLength(op1); ++ i) result = result & compareObjects(Array.get(op1, i), Array.get(op2, i)); } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/source
sd/source/filter/eppt/epptso.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 21ac405d723448d4f725715d27b58015f4bb5764 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:41:12 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:42:23 2019 +0200 cid#1448229 Division or modulo by zero Change-Id: I8d1d7415c82c7d48f8d4bdf7b86e397fce01c015 Reviewed-on: https://gerrit.libreoffice.org/75908 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index bcd4d1cf9711..d477bb2655c4 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -1790,7 +1790,12 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( nRadius >= nLength ) nRadius = 0x2a30; // 0x2a30 is PPTs maximum radius else -nRadius = ( 0x2a30 * nRadius ) / nLength; +{ +if (nLength != 0) +nRadius = ( 0x2a30 * nRadius ) / nLength; +else +nRadius = 0x2a30; // 0x2a30 is PPTs maximum radius +} aPropOpt.AddOpt( ESCHER_Prop_adjustValue, nRadius ); } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - basic/source vcl/unx
basic/source/runtime/methods.cxx|2 +- vcl/unx/generic/fontmanager/fontmanager.cxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit ff17310476041ab44cd312731f83fa7891bac599 Author: Caolán McNamara AuthorDate: Thu Jul 18 10:24:52 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:43:27 2019 +0200 cid#1448256 Unchecked return value Change-Id: I13c95bdbfc3161cca3b136266c5fd2e57b34a093 Reviewed-on: https://gerrit.libreoffice.org/75870 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index de9b5f91badd..1119adf3d9e1 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -777,7 +777,7 @@ void SbRtl_FileLen(StarBASIC *, SbxArray & rPar, bool) else { DirectoryItem aItem; -DirectoryItem::get( getFullPath( aStr ), aItem ); +(void)DirectoryItem::get( getFullPath( aStr ), aItem ); FileStatus aFileStatus( osl_FileStatus_Mask_FileSize ); aItem.getFileStatus( aFileStatus ); nLen = static_cast(aFileStatus.getFileSize()); commit ba9c0b8565428f600b443fd4c2a5876892a91d77 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:09:32 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:43:14 2019 +0200 cid#1448455 Unchecked return value Change-Id: I4526fbd939934fc4233279d9839f72c781a588b5 Reviewed-on: https://gerrit.libreoffice.org/75894 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx index 8af7d1a53b67..8389ba279ba1 100644 --- a/vcl/unx/generic/fontmanager/fontmanager.cxx +++ b/vcl/unx/generic/fontmanager/fontmanager.cxx @@ -239,8 +239,8 @@ std::vector> PrintFontManager::anal if (osl::DirectoryItem::get(aURL, aItem) == osl::File::E_None) { osl::FileStatus aFileStatus( osl_FileStatus_Mask_FileSize ); -aItem.getFileStatus( aFileStatus ); -fileSize = aFileStatus.getFileSize(); +if (aItem.getFileStatus(aFileStatus) == osl::File::E_None) +fileSize = aFileStatus.getFileSize(); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - helpcompiler/inc vcl/source
helpcompiler/inc/HelpCompiler.hxx |2 +- vcl/source/gdi/pdfwriter_impl.cxx |4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) New commits: commit 3c479f6569dc079f5fb85006bbfd9e09e43d712d Author: Caolán McNamara AuthorDate: Thu Jul 18 11:19:25 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:43:02 2019 +0200 cid#1448495 Unchecked return value Change-Id: I8a7f347d8f3ff6195b10e5559ff0682734c54eaf Reviewed-on: https://gerrit.libreoffice.org/75900 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx index 91c1b2f59e65..2b4a6bad049d 100644 --- a/helpcompiler/inc/HelpCompiler.hxx +++ b/helpcompiler/inc/HelpCompiler.hxx @@ -63,7 +63,7 @@ namespace fs OString tmp(in.c_str()); OUString ustrSystemPath(OStringToOUString(tmp, getThreadTextEncoding())); osl::File::getFileURLFromSystemPath(ustrSystemPath, data); -osl::File::getAbsoluteFileURL(sWorkingDir, data, data); +(void)osl::File::getAbsoluteFileURL(sWorkingDir, data, data); } path(const std::string &FileURL) { commit aab3c9be2234049cf848ddce57ccd507edd26e0e Author: Caolán McNamara AuthorDate: Thu Jul 18 11:21:22 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:42:48 2019 +0200 cid#1448527 Unchecked return value Change-Id: I024b2cc088027cfb74dc009220e75e24b7228ea2 Reviewed-on: https://gerrit.libreoffice.org/75902 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index f7a619b6f3be..4e054f673ca0 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -5181,8 +5181,10 @@ sal_Int32 PDFWriterImpl::emitOutputIntent() bool written = writeBuffer( aBuffer.data(), static_cast(aBuffer.size()) ); disableStreamEncryption(); endCompression(); + sal_uInt64 nEndStreamPos = 0; -m_aFile.getPos(nEndStreamPos); +if (m_aFile.getPos(nEndStreamPos) != osl::File::E_None) +return 0; if( !written ) return 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sdext/source svtools/source
sdext/source/presenter/PresenterTextView.cxx |2 +- svtools/source/misc/filechangedchecker.cxx |5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) New commits: commit 1cbca8b27e6e175631190a50a3a363e9d9b07c86 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:18:05 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:43:58 2019 +0200 cid#1448489 Uncaught exception Change-Id: Id0c55bdf3a51d21f4d0e9cc407dbff1db5eb55f4 Reviewed-on: https://gerrit.libreoffice.org/75899 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx index a11bc4f193e3..3aa30753bc4b 100644 --- a/sdext/source/presenter/PresenterTextView.cxx +++ b/sdext/source/presenter/PresenterTextView.cxx @@ -1062,7 +1062,7 @@ PresenterTextCaret::~PresenterTextCaret() } catch (uno::Exception const&) { -css::uno::Any ex( cppu::getCaughtException() ); +css::uno::Any ex(DbgGetCaughtException()); SAL_WARN("sdext.presenter", "unexpected exception in ~PresenterTextCaret " << exceptionToString(ex)); } } commit 311d835a4a02782284bcdaa6c7334f6a76bb86f5 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:16:11 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:43:43 2019 +0200 cid#1448488 Unchecked return value Change-Id: If42c4f2215057120774b4ad7e2755e4e861bd828 Reviewed-on: https://gerrit.libreoffice.org/75898 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svtools/source/misc/filechangedchecker.cxx b/svtools/source/misc/filechangedchecker.cxx index c1e67a0fe1f0..09e24c3fafb1 100644 --- a/svtools/source/misc/filechangedchecker.cxx +++ b/svtools/source/misc/filechangedchecker.cxx @@ -45,12 +45,13 @@ bool FileChangedChecker::getCurrentModTime(TimeValue& o_rValue) const { // Need a Directory item to fetch file status osl::DirectoryItem aItem; -osl::DirectoryItem::get(mFileName, aItem); +if (osl::FileBase::E_None != osl::DirectoryItem::get(mFileName, aItem)) +return false; // Retrieve the status - we are only interested in last File // Modified time osl::FileStatus aStatus( osl_FileStatus_Mask_ModifyTime ); -if( osl::FileBase::E_None != aItem.getFileStatus(aStatus) ) +if (osl::FileBase::E_None != aItem.getFileStatus(aStatus)) return false; o_rValue = aStatus.getModifyTime(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: connectivity/source
connectivity/source/cpool/ZPoolCollection.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit d3c04f1a49ebc83c9e362c8144404207825e8792 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:14:06 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 09:44:12 2019 +0200 cid#1448480 Uncaught exception Change-Id: Ied9ff9ea5d8b40c52e20c10f709836a193d5e940 Reviewed-on: https://gerrit.libreoffice.org/75896 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx index f5d029738780..ba07e52962e8 100644 --- a/connectivity/source/cpool/ZPoolCollection.cxx +++ b/connectivity/source/cpool/ZPoolCollection.cxx @@ -358,9 +358,9 @@ Reference OPoolCollection::openNode(const OUString& _rPath,const Ref SAL_WARN("connectivity.cpool", "::openNode: there is no element named " << _rPath << "!"); } -catch(Exception&) +catch(const Exception&) { -css::uno::Any ex( cppu::getCaughtException() ); +css::uno::Any ex(DbgGetCaughtException()); SAL_WARN("connectivity.cpool", "OConfigurationNode::openNode: caught an exception while retrieving the node! " << exceptionToString(ex)); } return xNode; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/sal
include/sal/types.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 607902dbcdf1761f6f2fafe2124c3a9c7df3c094 Author: Andrea Gelmini AuthorDate: Thu Jul 11 22:24:57 2019 + Commit: Julien Nabet CommitDate: Fri Jul 19 10:00:31 2019 +0200 Fix typo Change-Id: I9840c48adae1f01f08e3dedebf93444aa49f8a97 Reviewed-on: https://gerrit.libreoffice.org/75929 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/include/sal/types.h b/include/sal/types.h index e2442ea6c998..1a8ba255b4b7 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -398,7 +398,7 @@ namespace css = ::com::sun::star; /** C++11 "override" feature. -For LIBO_INTERNAL_ONLY, force the method to override a existing method in +For LIBO_INTERNAL_ONLY, force the method to override an existing method in parent, error out if the method with the correct signature does not exist. @since LibreOffice 4.1 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: lingucomponent/source
lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit cb99b4429142511d0520ad3b5bc89c83bc451657 Author: Andrea Gelmini AuthorDate: Thu Jul 11 22:22:52 2019 + Commit: Julien Nabet CommitDate: Fri Jul 19 10:01:14 2019 +0200 Fix typo Change-Id: I542d694bbab6ce8d07bee9345db70a64a2fc0963 Reviewed-on: https://gerrit.libreoffice.org/75924 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index bc4d91038a25..87cb8583f8e6 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -299,7 +299,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo return nullptr; } -// other wise hyphenate the word with that dictionary +// otherwise hyphenate the word with that dictionary dict = mvDicts[k].aPtr; eEnc = mvDicts[k].eEnc; CharClass * pCC = mvDicts[k].apCC.get(); @@ -539,7 +539,7 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const return nullptr; } -// other wise hyphenate the word with that dictionary +// otherwise hyphenate the word with that dictionary dict = mvDicts[k].aPtr; rtl_TextEncoding eEnc = mvDicts[k].eEnc; CharClass* pCC = mvDicts[k].apCC.get(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/sal
include/sal/macros.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7315d8b96be6ff1644d3421cb20695f5167c3cbd Author: Andrea Gelmini AuthorDate: Thu Jul 11 22:24:58 2019 + Commit: Julien Nabet CommitDate: Fri Jul 19 10:01:42 2019 +0200 Fix typo Change-Id: Id35aaf69535385f99513acd80a2a1e4a4cdae861 Reviewed-on: https://gerrit.libreoffice.org/75928 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/include/sal/macros.h b/include/sal/macros.h index 2337de92b0f8..9adb60bfbcdd 100644 --- a/include/sal/macros.h +++ b/include/sal/macros.h @@ -26,7 +26,7 @@ #if defined(__cplusplus) && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L ) /* * Magic template to calculate at compile time the number of elements - * in an array. Enforcing that the argument must be a array and not + * in an array. Enforcing that the argument must be an array and not * a pointer, e.g. * char *pFoo="foo"; * SAL_N_ELEMENTS(pFoo); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/rtl
include/rtl/ustring.hxx | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit e03d0d56ef0edcb7836e4eeea2c3de2f16bf6fd5 Author: Andrea Gelmini AuthorDate: Thu Jul 18 18:13:32 2019 + Commit: Julien Nabet CommitDate: Fri Jul 19 10:03:43 2019 +0200 Fix typos Change-Id: I1b566ef38eaef3d6b20555e20b8353976fbdca5d Reviewed-on: https://gerrit.libreoffice.org/75927 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index ecb4958761af..8050e0af9c41 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -142,7 +142,7 @@ public: /** New string from OUString. - @paramstr a OUString. + @paramstr an OUString. */ OUString( const OUString & str ) { @@ -155,7 +155,7 @@ public: /** Move constructor. - @paramstr a OUString. + @paramstr an OUString. @since LibreOffice 5.2 */ OUString( OUString && str ) @@ -170,7 +170,7 @@ public: /** New string from OUString data. - @paramstr a OUString data. + @paramstr an OUString data. */ OUString( rtl_uString * str ) { @@ -446,7 +446,7 @@ public: /** Assign a new string. - @paramstr a OUString. + @paramstr an OUString. */ OUString & operator=( const OUString & str ) { @@ -546,7 +546,7 @@ public: /** Append a string to this string. - @paramstr a OUString. + @paramstr an OUString. @exception std::bad_alloc is thrown if an out-of-memory condition occurs */ @@ -804,7 +804,7 @@ public: } /** - Perform a ASCII lowercase comparison of two strings. + Perform an ASCII lowercase comparison of two strings. The result is true if and only if second string represents the same sequence of characters as the first string, @@ -828,7 +828,7 @@ public: } /** - Perform a ASCII lowercase comparison of two strings. + Perform an ASCII lowercase comparison of two strings. Compare the two strings with uppercase ASCII character values between 65 and 90 (ASCII A-Z) interpreted as @@ -1154,7 +1154,7 @@ public: } /** - Perform a ASCII lowercase comparison of two strings. + Perform an ASCII lowercase comparison of two strings. The result is true if and only if second string represents the same sequence of characters as the first string, @@ -3539,7 +3539,7 @@ public: } /** - Returns a OUString copied without conversion from an ASCII + Returns an OUString copied without conversion from an ASCII character string. Since this method is optimized for performance, the ASCII character ___ 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/core/layout/fly.cxx |2 ++ sw/source/core/layout/ssfrm.cxx |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) New commits: commit dea72ef111ee8a0b1b178f8cd48757514d5ca831 Author: Michael Stahl AuthorDate: Thu Jul 18 14:07:06 2019 +0200 Commit: Michael Stahl CommitDate: Fri Jul 19 10:14:02 2019 +0200 sw: fix use after free on tdf117215-1.odt Move the fix from 6d0ea082889c89eb8b408779f2de08da7441ff54 to SwFlyFrame::DestroyImpl() so we unregister every SwFlyFrame. ==1550==ERROR: AddressSanitizer: heap-use-after-free on address 0x615000383f56 at pc 0x7efcd70d5ab9 bp 0x7ffeb7ac7c40 sp 0x7ffeb7ac7c38 WRITE of size 1 at 0x615000383f56 thread T0 0 SwAnchoredObject::SetTmpConsiderWrapInfluence(bool) sw/source/core/layout/anchoredobject.cxx:743:32 1 SwObjsMarkedAsTmpConsiderWrapInfluence::Clear() sw/source/core/layout/objstmpconsiderwrapinfl.cxx:53:23 2 SwLayouter::ClearObjsTmpConsiderWrapInfluence(SwDoc const&) sw/source/core/layout/layouter.cxx:387:84 3 sw::DocumentLayoutManager::ClearSwLayouterEntries() sw/source/core/doc/DocumentLayoutManager.cxx:497:5 4 sw::DocumentStateManager::SetModified() sw/source/core/doc/DocumentStateManager.cxx:45:39 5 sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&) sw/source/core/doc/DocumentContentOperationsManager.cxx:3942:36 0x615000383f56 is located 342 bytes inside of 504-byte region [0x615000383e00,0x615000383ff8) freed by thread T0 here: 1 SwFlyAtContentFrame::~SwFlyAtContentFrame() sw/source/core/inc/flyfrms.hxx:159:7 2 SwFrame::DestroyFrame(SwFrame*) sw/source/core/layout/ssfrm.cxx:389:9 3 SwFrameFormat::DelFrames() sw/source/core/layout/atrfrm.cxx:2624:17 4 SwUndoFlyBase::DelFly(SwDoc*) sw/source/core/undo/undobj1.cxx:161:19 5 SwUndoDelLayFormat::SwUndoDelLayFormat(SwFrameFormat*) sw/source/core/undo/undobj1.cxx:403:5 6 SwHistoryTextFlyCnt::SwHistoryTextFlyCnt(SwFrameFormat*) sw/source/core/undo/rolbck.cxx:538:20 7 SwHistory::Add(SwFlyFrameFormat&, unsigned short&) sw/source/core/undo/rolbck.cxx:1083:50 8 SwUndoSaveContent::DelContentIndex(SwPosition const&, SwPosition const&, DelContentType) sw/source/core/undo/undobj.cxx:1020:39 9 SwUndoDelete::SwUndoDelete(SwPaM&, bool, bool) sw/source/core/undo/undel.cxx:229:9 11 sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&) sw/source/core/doc/DocumentContentOperationsManager.cxx:3939:55 Change-Id: Ia0c28c9d5792615cbb566e502374efd0f4056daf Reviewed-on: https://gerrit.libreoffice.org/75857 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index b02b911090f7..a2193f24d654 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -280,6 +280,8 @@ void SwFlyFrame::DestroyImpl() if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() ) { +ClearTmpConsiderWrapInfluence(); // remove this from SwLayouter + // OD 2004-01-19 #110582# Unchain(); diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 55b9dfe32e4e..8ff47322e0c0 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -523,7 +523,6 @@ void SwLayoutFrame::DestroyImpl() const size_t nCnt = pFrame->GetDrawObjs()->size(); // #i28701# SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[0]; -pAnchoredObj->ClearTmpConsiderWrapInfluence(); if (SwFlyFrame* pFlyFrame = dynamic_cast(pAnchoredObj)) { SwFrame::DestroyFrame(pFlyFrame); @@ -531,6 +530,7 @@ void SwLayoutFrame::DestroyImpl() } else { +pAnchoredObj->ClearTmpConsiderWrapInfluence(); SdrObject* pSdrObj = pAnchoredObj->DrawObj(); SwDrawContact* pContact = static_cast(pSdrObj->GetUserCall()); ___ 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/inc/drawview.hxx |2 +- sc/source/ui/view/drawview.cxx |4 ++-- sc/source/ui/view/viewfun7.cxx |6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 416e9ecac90447581825355b772fe722d012b282 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:59:49 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 11:01:39 2019 +0200 cid#1448217 Use after free Change-Id: Icb7700c701dd8e9b23bfe29bbedf27ddd9c8f0a1 Reviewed-on: https://gerrit.libreoffice.org/75911 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx index 5a79b95cc60a..46f5598705f2 100644 --- a/sc/source/ui/inc/drawview.hxx +++ b/sc/source/ui/inc/drawview.hxx @@ -117,7 +117,7 @@ public: boolHasMarkedControl() const; boolHasMarkedInternal() const; -voidInsertObjectSafe(SdrObject* pObj, SdrPageView& rPV); +boolInsertObjectSafe(SdrObject* pObj, SdrPageView& rPV); /** Returns the selected object, if it is the caption object of a cell note. @param ppCaptData (out-param) If not null, returns the pointer to the caption object data. */ diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 273431ef0bf5..c2a4dfe58144 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -804,7 +804,7 @@ bool ScDrawView::GetObjectIsMarked( const SdrObject* pObject ) return bisMarked; } -void ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV) +bool ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV) { SdrInsertFlags nOptions=SdrInsertFlags::NONE; // Do not change marks when the ole object is active @@ -817,7 +817,7 @@ void ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV) nOptions |= SdrInsertFlags::DONTMARK; } -InsertObjectAtView( pObj, rPV, nOptions ); +return InsertObjectAtView(pObj, rPV, nOptions); } SdrObject* ScDrawView::GetMarkedNoteCaption( ScDrawObjData** ppCaptData ) diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index b128516379ff..21ccfc3848a9 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -447,15 +447,15 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, pGrafObj->SetName(aName); // don't mark if OLE -pScDrawView->InsertObjectSafe(pGrafObj, *pScDrawView->GetSdrPageView()); +bool bSuccess = pScDrawView->InsertObjectSafe(pGrafObj, *pScDrawView->GetSdrPageView()); // SetGraphicLink has to be used after inserting the object, // otherwise an empty graphic is swapped in and the contact stuff crashes. // See #i37444#. -if (!rFile.isEmpty()) +if (bSuccess && !rFile.isEmpty()) pGrafObj->SetGraphicLink( rFile, ""/*TODO?*/, rFilter ); -return true; +return bSuccess; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ 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/drawfunc/fuins2.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 4959b71cbc91dbe2c454d1d7bf2092c01c4f0cae Author: Caolán McNamara AuthorDate: Thu Jul 18 12:06:20 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 11:14:26 2019 +0200 cid#1448351 Use after free Change-Id: I5591303096a495565e4e3638ca8db8196fa26092 Reviewed-on: https://gerrit.libreoffice.org/75913 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index c062c0c8f936..21a541285cc1 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -347,9 +347,9 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* aName, aRect); SdrPageView* pPV = pView->GetSdrPageView(); -pView->InsertObjectAtView(pObj, *pPV); +bool bSuccess = pView->InsertObjectAtView(pObj, *pPV); -if ( nAspect != embed::Aspects::MSOLE_ICON ) +if (bSuccess && nAspect != embed::Aspects::MSOLE_ICON) { // Math objects change their object size during InsertObject. // New size must be set in SdrObject, or a wrong scale will be set at @@ -380,7 +380,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* // Object selected, activate Draw-Shell rViewShell.SetDrawShell( true ); } -else +else if (bSuccess) { rViewShell.ActivateObject(pObj, embed::EmbedVerbs::MS_OLEVERB_SHOW); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - basctl/source basic/source
basctl/source/dlged/dlged.cxx| 11 +-- basic/source/runtime/methods.cxx |2 +- 2 files changed, 6 insertions(+), 7 deletions(-) New commits: commit 7988e38a1b627b92a69dd11eabc495ff180df34d Author: Caolán McNamara AuthorDate: Thu Jul 18 12:11:04 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 11:14:12 2019 +0200 cid#1448451 Use after free Change-Id: I6df7a2d117be1c8f7a3e00387006c69857a98b1c Reviewed-on: https://gerrit.libreoffice.org/75914 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index c318ba8739d7..33d10a9ed7df 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -635,21 +635,20 @@ void DlgEditor::CreateDefaultObject() // insert object into drawing page SdrPageView* pPageView = pDlgEdView->GetSdrPageView(); -pDlgEdView->InsertObjectAtView( pDlgEdObj, *pPageView); - -// start listening -pDlgEdObj->StartListening(); +if (pDlgEdView->InsertObjectAtView(pDlgEdObj, *pPageView)) +{ +// start listening +pDlgEdObj->StartListening(); +} } } - void DlgEditor::Cut() { Copy(); Delete(); } - static void implCopyStreamToByteSequence( const Reference< XInputStream >& xStream, Sequence< sal_Int8 >& bytes ) { commit 7201db417cfdb115d7dc84f844c0966a82014cbd Author: Caolán McNamara AuthorDate: Thu Jul 18 11:22:46 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 11:14:00 2019 +0200 cid#1448547 Unchecked return value Change-Id: If0b19a53bba10064a81a22856cd3796dcefd1f68 Reviewed-on: https://gerrit.libreoffice.org/75903 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 1119adf3d9e1..fe266fdc009c 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -779,7 +779,7 @@ void SbRtl_FileLen(StarBASIC *, SbxArray & rPar, bool) DirectoryItem aItem; (void)DirectoryItem::get( getFullPath( aStr ), aItem ); FileStatus aFileStatus( osl_FileStatus_Mask_FileSize ); -aItem.getFileStatus( aFileStatus ); +(void)aItem.getFileStatus( aFileStatus ); nLen = static_cast(aFileStatus.getFileSize()); } rPar.Get(0)->PutLong( static_cast(nLen) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: canvas/source canvas/workben chart2/qa chart2/source
canvas/source/opengl/ogl_spritedevicehelper.cxx |4 - canvas/source/simplecanvas/simplecanvasimpl.cxx |5 - canvas/source/vcl/devicehelper.cxx |2 canvas/workben/canvasdemo.cxx | 18 + chart2/qa/extras/chart2dump/chart2dump.cxx |7 - chart2/qa/extras/chart2import.cxx | 11 +-- chart2/source/controller/accessibility/AccessibleBase.cxx |6 - chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx |6 - chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx | 24 +++--- chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx |4 - chart2/source/controller/chartapiwrapper/LegendWrapper.cxx |4 - chart2/source/controller/chartapiwrapper/TitleWrapper.cxx |6 - chart2/source/controller/dialogs/ChartTypeDialogController.cxx |8 -- chart2/source/controller/dialogs/DataBrowserModel.cxx |8 +- chart2/source/controller/dialogs/DialogModel.cxx| 13 +-- chart2/source/controller/dialogs/ObjectNameProvider.cxx | 16 ++-- chart2/source/controller/dialogs/RangeSelectionHelper.cxx |4 - chart2/source/controller/dialogs/tp_ChartType.cxx |5 - chart2/source/controller/drawinglayer/ViewElementListProvider.cxx |3 chart2/source/controller/main/ChartController.cxx |9 -- chart2/source/controller/main/ChartController_Insert.cxx| 36 +- chart2/source/controller/main/ChartController_Properties.cxx|2 chart2/source/controller/main/ChartController_Tools.cxx |2 chart2/source/controller/main/ControllerCommandDispatch.cxx |4 - chart2/source/controller/main/StatusBarCommandDispatch.cxx |5 - chart2/source/controller/sidebar/ChartAxisPanel.cxx |8 +- chart2/source/controller/sidebar/ChartSeriesPanel.cxx | 24 +++--- chart2/source/model/filter/XMLFilter.cxx|7 - chart2/source/model/main/ChartModel.cxx |2 chart2/source/tools/AxisHelper.cxx |2 chart2/source/tools/DiagramHelper.cxx | 14 +-- chart2/source/tools/InternalDataProvider.cxx|2 chart2/source/tools/OPropertySet.cxx|3 chart2/source/tools/ObjectIdentifier.cxx|4 - chart2/source/tools/ReferenceSizeProvider.cxx |4 - chart2/source/tools/TitleHelper.cxx |2 chart2/source/view/main/ShapeFactory.cxx|7 - 37 files changed, 132 insertions(+), 159 deletions(-) New commits: commit 836c40904f4424a5b7ae708171a7aab53141761a Author: Noel Grandin AuthorDate: Fri Jul 19 09:50:11 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 11:31:51 2019 +0200 loplugin:referencecasting in canvas..chart2 Change-Id: I3a3671b5c44d1a7e5ca320d3d76dd5d902382cbc Reviewed-on: https://gerrit.libreoffice.org/75935 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/canvas/source/opengl/ogl_spritedevicehelper.cxx b/canvas/source/opengl/ogl_spritedevicehelper.cxx index 304414bfeea1..285afa973574 100644 --- a/canvas/source/opengl/ogl_spritedevicehelper.cxx +++ b/canvas/source/opengl/ogl_spritedevicehelper.cxx @@ -361,9 +361,7 @@ namespace oglcanvas uno::Reference SpriteDeviceHelper::getColorSpace() const { // always the same -return uno::Reference( -::canvas::tools::getStdColorSpace(), -uno::UNO_QUERY); +return ::canvas::tools::getStdColorSpace(); } void SpriteDeviceHelper::notifySizeUpdate( const awt::Rectangle& rBounds ) diff --git a/canvas/source/simplecanvas/simplecanvasimpl.cxx b/canvas/source/simplecanvas/simplecanvasimpl.cxx index 9e209b5cf3e5..724e4dbb5372 100644 --- a/canvas/source/simplecanvas/simplecanvasimpl.cxx +++ b/canvas/source/simplecanvas/simplecanvasimpl.cxx @@ -72,9 +72,8 @@ namespace uno::Sequence< uno::Sequence< geometry::RealPoint2D > > sequenceSequence( 1 ); sequenceSequence[0] = rectSequence; -uno::Reference< rendering::XPolyPolygon2D > xRes( -xDevice->createCompatibleLinePolyPolygon( sequenceSequence ), -uno::UNO_QUERY ); +uno::Reference< rendering::XPolyPolygon2D > xRes = +xDevice->createCompatibleLinePolyPolygon( sequenceSequence ); if( xRes.is() ) xRes->setClosed( 0, true ); return xRes; diff --git a/canvas/source/vcl/devicehelper.cxx b/canvas/source/vcl/devicehelper.cxx index d5961df2b777..904b565af80e 100644 --- a/canvas/sour
[Libreoffice-commits] core.git: oox/source xmloff/source
oox/source/export/ColorPropertySet.cxx |3 ++- xmloff/source/chart/ColorPropertySet.cxx |3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) New commits: commit 6dfc659c5e468ad969291ad39085b9c3ec53bcac Author: Caolán McNamara AuthorDate: Thu Jul 18 11:55:08 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 11:41:24 2019 +0200 cid#1448264 silence Out-of-bounds access Change-Id: I12267e8709d8f36acbbd6c70bfdb80a2a500e5d3 Reviewed-on: https://gerrit.libreoffice.org/75910 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/oox/source/export/ColorPropertySet.cxx b/oox/source/export/ColorPropertySet.cxx index 8c48022c4288..e1a861d52ff6 100644 --- a/oox/source/export/ColorPropertySet.cxx +++ b/oox/source/export/ColorPropertySet.cxx @@ -158,7 +158,8 @@ PropertyState SAL_CALL ColorPropertySet::getPropertyState( const OUString& /* Pr Sequence< PropertyState > SAL_CALL ColorPropertySet::getPropertyStates( const Sequence< OUString >& /* aPropertyName */ ) { PropertyState aState = PropertyState_DIRECT_VALUE; -return Sequence< PropertyState >( & aState, 1 ); +// coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence +return Sequence(&aState, 1); } void SAL_CALL ColorPropertySet::setPropertyToDefault( const OUString& PropertyName ) diff --git a/xmloff/source/chart/ColorPropertySet.cxx b/xmloff/source/chart/ColorPropertySet.cxx index 10f62e9aa81d..388e33d60e01 100644 --- a/xmloff/source/chart/ColorPropertySet.cxx +++ b/xmloff/source/chart/ColorPropertySet.cxx @@ -137,7 +137,8 @@ PropertyState SAL_CALL ColorPropertySet::getPropertyState( const OUString& /* Pr Sequence< PropertyState > SAL_CALL ColorPropertySet::getPropertyStates( const Sequence< OUString >& /* aPropertyName */ ) { PropertyState aState = PropertyState_DIRECT_VALUE; -return Sequence< PropertyState >( & aState, 1 ); +// coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence +return Sequence(&aState, 1); } void SAL_CALL ColorPropertySet::setPropertyToDefault( const OUString& PropertyName ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - cppcanvas/source cppuhelper/source cui/source framework/source include/framework officecfg/registry
cppcanvas/source/wrapper/implbitmapcanvas.cxx |3 cppcanvas/source/wrapper/implcustomsprite.cxx |3 cppcanvas/source/wrapper/implspritecanvas.cxx |3 cppcanvas/source/wrapper/vclfactory.cxx|4 cppuhelper/source/propshlp.cxx |2 cui/source/customize/CommandCategoryListBox.cxx|2 cui/source/customize/acccfg.cxx| 13 cui/source/customize/cfg.cxx | 27 cui/source/customize/cfgutil.cxx |2 cui/source/dialogs/SpellDialog.cxx | 10 cui/source/dialogs/hlmarkwn.cxx|5 cui/source/options/optdict.cxx |6 cui/source/options/optlingu.cxx|2 cui/source/options/treeopt.cxx | 18 cui/source/options/webconninfo.cxx | 10 framework/source/fwe/classes/addonsoptions.cxx | 352 - include/framework/addonsoptions.hxx| 47 + officecfg/registry/schema/org/openoffice/Office/Addons.xcs | 105 +++ 18 files changed, 546 insertions(+), 68 deletions(-) New commits: commit 147e820cc1bd7110331a6ea73db678a4a6c324e0 Author: Sumit Chauhan AuthorDate: Fri Jul 5 17:13:26 2019 +0530 Commit: Szymon Kłos CommitDate: Fri Jul 19 11:47:56 2019 +0200 Addons(extension) support is extended for NotebookBar This patch adds the schema for the extensions to be available in Notebookbar. We will adding items in addons.xcs in future if needed. Change-Id: I0a3831983b9758fac0a6fa32213ad6da20d6a97f Reviewed-on: https://gerrit.libreoffice.org/75134 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 8bd00646294c..d0e5ece16c7f 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -75,7 +75,8 @@ using namespace ::com::sun::star; #define INDEX_AUTOSIZE 9 #define INDEX_OWNERDRAW 10 #define INDEX_MANDATORY 11 -#define PROPERTYCOUNT_INDEX 12 +#define INDEX_STYLE 12 +#define PROPERTYCOUNT_INDEX 13 // The following order is mandatory. Please add properties at the end! #define PROPERTYCOUNT_MENUITEM 6 @@ -104,6 +105,17 @@ using namespace ::com::sun::star; #define OFFSET_TOOLBARITEM_WIDTH6 // The following order is mandatory. Please add properties at the end! +#define PROPERTYCOUNT_NOTEBOOKBARITEM 8 +#define OFFSET_NOTEBOOKBARITEM_URL 0 +#define OFFSET_NOTEBOOKBARITEM_TITLE1 +#define OFFSET_NOTEBOOKBARITEM_IMAGEIDENTIFIER 2 +#define OFFSET_NOTEBOOKBARITEM_TARGET 3 +#define OFFSET_NOTEBOOKBARITEM_CONTEXT 4 +#define OFFSET_NOTEBOOKBARITEM_CONTROLTYPE 5 +#define OFFSET_NOTEBOOKBARITEM_WIDTH6 +#define OFFSET_NOTEBOOKBARITEM_STYLE7 + +// The following order is mandatory. Please add properties at the end! #define PROPERTYCOUNT_STATUSBARITEM 8 #define OFFSET_STATUSBARITEM_URL0 #define OFFSET_STATUSBARITEM_TITLE 1 @@ -143,6 +155,15 @@ using namespace ::com::sun::star; #define OFFSET_MERGETOOLBAR_MERGECONTEXT5 #define OFFSET_MERGETOOLBAR_TOOLBARITEMS6 +#define PROPERTYCOUNT_MERGE_NOTEBOOKBAR 7 +#define OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBAR 0 +#define OFFSET_MERGENOTEBOOKBAR_MERGEPOINT 1 +#define OFFSET_MERGENOTEBOOKBAR_MERGECOMMAND2 +#define OFFSET_MERGENOTEBOOKBAR_MERGECOMMANDPARAMETER 3 +#define OFFSET_MERGENOTEBOOKBAR_MERGEFALLBACK 4 +#define OFFSET_MERGENOTEBOOKBAR_MERGECONTEXT5 +#define OFFSET_MERGENOTEBOOKBAR_NOTEBOOKBARITEMS6 + #define PROPERTYCOUNT_MERGE_STATUSBAR 6 #define OFFSET_MERGESTATUSBAR_MERGEPOINT0 #define OFFSET_MERGESTATUSBAR_MERGECOMMAND 1 @@ -197,14 +218,18 @@ class AddonsOptions_Impl : public ConfigItem boolHasAddonsMenu () const; sal_Int32 GetAddonsToolBarCount() const; +sal_Int32 GetAddonsNotebookBarCount() const; const Sequence< Sequence< PropertyValue > >&GetAddonsMenu () const { return m_aCachedMenuProperties;} const Sequence< Sequence< PropertyValue > >&GetAddonsMenuBarPart () const { return m_aCachedMenuBarPartProperties;} const Sequence< Sequence< PropertyValue > >&GetAddonsToolBarPart ( sa
[Libreoffice-commits] core.git: include/vcl sfx2/source vcl/inc vcl/Library_vcl.mk vcl/source
include/vcl/NotebookBarAddonsMerger.hxx | 72 ++ include/vcl/builder.hxx | 17 ++-- include/vcl/notebookbar.hxx |5 + include/vcl/syswin.hxx|2 sfx2/source/notebookbar/SfxNotebookBar.cxx| 46 +++ vcl/Library_vcl.mk|1 vcl/inc/brdwin.hxx|7 + vcl/source/control/notebookbar.cxx| 12 +-- vcl/source/window/NotebookBarAddonsMerger.cxx | 101 ++ vcl/source/window/brdwin.cxx |7 + vcl/source/window/builder.cxx | 11 ++ vcl/source/window/syswin.cxx |4 - 12 files changed, 261 insertions(+), 24 deletions(-) New commits: commit fbcd5f074ca3dc105f4fe45b6975c6de2bf60f35 Author: Sumit Chauhan AuthorDate: Mon Jul 15 22:19:00 2019 +0530 Commit: Szymon Kłos CommitDate: Fri Jul 19 11:51:36 2019 +0200 Engine to add Extension inside extension tab in NotebookBar The patch provides backend for adding the extension.Schema for the adding extension in notebookbar can be seen here https://gerrit.libreoffice.org/#/c/75134/ Change-Id: I10f0e83d1aaec5330c80b3b53cf59a21b93be015 Reviewed-on: https://gerrit.libreoffice.org/75650 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/include/vcl/NotebookBarAddonsMerger.hxx b/include/vcl/NotebookBarAddonsMerger.hxx new file mode 100644 index ..c3b9998c7750 --- /dev/null +++ b/include/vcl/NotebookBarAddonsMerger.hxx @@ -0,0 +1,72 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_VCL_NOTEBOOKBARADDONSMERGER_HXX +#define INCLUDED_VCL_NOTEBOOKBARADDONSMERGER_HXX + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct NotebookBarAddonsItem +{ +Image aImage; +std::vector aImageValues; + std::vector>> aAddonValues; +}; + +struct AddonsParams +{ +OUString sImageId; +OUString sControlType; +sal_uInt16 nWidth; +}; + +struct AddonNotebookBarItem +{ +OUString sCommandURL; +OUString sLabel; +OUString sImageIdentifier; +OUString sTarget; +OUString sContext; +OUString sControlType; +sal_uInt16 nWidth; +OUString sStyle; +}; + +class NotebookBarAddonsMerger +{ +public: +NotebookBarAddonsMerger(vcl::Window* pParent, +const css::uno::Reference& rFrame, +const NotebookBarAddonsItem& aNotebookBarAddonsItem); +static void MergeNotebookBarAddons(vcl::Window* pParent, + const css::uno::Reference& rFrame, + const NotebookBarAddonsItem& aNotebookBarAddonsItem); +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index 2fa8f445199f..adefc6d39713 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -67,18 +68,16 @@ public: typedef void (*customMakeWidget)(VclPtr &rRet, VclPtr &pParent, stringmap &rVec); public: -VclBuilder( -vcl::Window *pParent, -const OUString& sUIRootDir, -const OUString& sUIFile, -const OString& sID = OString(), -const css::uno::Reference &rFrame = css::uno::Reference(), -bool bLegacy = true); +VclBuilder(vcl::Window* pParent, const OUString& sUIRootDir, const OUString& sUIFile, + const OString& sID = OString(), + const css::uno::Reference& rFrame + = css::uno::Reference(), + bool bLegacy = true, + const NotebookBarAddonsItem& aNotebookBarAddonsItem = NotebookBarAddonsItem()); ~VclBuilder(); - ///releases references and disposes all children. void disposeBuilder(); - +NotebookBarAddonsItem m_pNotebookBarAddonsItem; //sID must exist and be of type T templat
[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source
dbaccess/qa/extras/rowsetclones.cxx |2 +- dbaccess/source/core/api/KeySet.cxx |2 +- dbaccess/source/core/api/tablecontainer.cxx |2 +- dbaccess/source/core/dataaccess/databasedocument.cxx |3 +-- dbaccess/source/core/dataaccess/documentcontainer.cxx |2 +- dbaccess/source/core/dataaccess/documentdefinition.cxx| 14 +- dbaccess/source/core/dataaccess/documenteventexecutor.cxx |2 +- dbaccess/source/ext/macromigration/docinteraction.cxx |2 +- dbaccess/source/filter/xml/dbloader2.cxx |2 +- dbaccess/source/ui/app/AppController.cxx |6 +++--- dbaccess/source/ui/app/AppControllerDnD.cxx |2 +- dbaccess/source/ui/app/AppView.cxx|4 ++-- dbaccess/source/ui/browser/brwctrlr.cxx |6 +++--- dbaccess/source/ui/browser/brwview.cxx|4 ++-- dbaccess/source/ui/browser/dataview.cxx |2 +- dbaccess/source/ui/browser/genericcontroller.cxx |2 +- dbaccess/source/ui/browser/sbagrid.cxx| 12 ++-- dbaccess/source/ui/browser/unodatbr.cxx |7 +++ dbaccess/source/ui/dlg/ConnectionHelper.cxx |4 ++-- dbaccess/source/ui/dlg/DbAdminImpl.cxx|2 +- dbaccess/source/ui/misc/UITools.cxx |2 +- dbaccess/source/ui/misc/WCopyTable.cxx|2 +- dbaccess/source/ui/misc/datasourceconnector.cxx |8 +++- dbaccess/source/ui/querydesign/querycontroller.cxx|2 +- dbaccess/source/ui/tabledesign/TableController.cxx|2 +- dbaccess/source/ui/uno/copytablewizard.cxx|2 +- 26 files changed, 46 insertions(+), 54 deletions(-) New commits: commit 1003f9f14d83eac9c08a219fa7d8140550de02c7 Author: Noel Grandin AuthorDate: Fri Jul 19 09:52:48 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 11:53:24 2019 +0200 loplugin:referencecasting in dbaccess Change-Id: If44176f85f460afca92cfa77b3cc1f7107a41690 Reviewed-on: https://gerrit.libreoffice.org/75938 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/dbaccess/qa/extras/rowsetclones.cxx b/dbaccess/qa/extras/rowsetclones.cxx index 433bf328864b..aabb80acc0fa 100644 --- a/dbaccess/qa/extras/rowsetclones.cxx +++ b/dbaccess/qa/extras/rowsetclones.cxx @@ -82,7 +82,7 @@ void RowSetClones::test() rowSetProperties->setPropertyValue("ActiveConnection", Any(xConnection)); xRowSet->execute(); -uno::Reference< XResultSet > xResultSet(xRowSet, UNO_QUERY); +uno::Reference< XResultSet > xResultSet = xRowSet; CPPUNIT_ASSERT(xResultSet.is()); // always starts at BeforeFirst position CPPUNIT_ASSERT(xResultSet->isBeforeFirst()); diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 80771e48b76f..137f1e3b4104 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -291,7 +291,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet, const OUStrin Reference xAnalyzer(xFactory->createInstance(SERVICE_NAME_SINGLESELECTQUERYCOMPOSER),UNO_QUERY); xAnalyzer->setElementaryQuery(xSourceComposer->getElementaryQuery()); Reference xTabSup(xAnalyzer,uno::UNO_QUERY); -Reference xSelectTables(xTabSup->getTables(),uno::UNO_QUERY); +Reference xSelectTables = xTabSup->getTables(); const Sequence< OUString> aSeq = xSelectTables->getElementNames(); if ( aSeq.getLength() > 1 ) // special handling for join { diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index 01336a5e3327..f0adf088281f 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -147,7 +147,7 @@ void lcl_createDefintionObject(const OUString& _rName else { // set as folder -_xTableDefinition.set( TableDefinition::createWithName( ::comphelper::getProcessComponentContext(), _rName ), UNO_QUERY); +_xTableDefinition = TableDefinition::createWithName( ::comphelper::getProcessComponentContext(), _rName ); _xTableDefinitions->insertByName(_rName,makeAny(_xTableDefinition)); } Reference xColumnsSupplier(_xTableDefinition,UNO_QUERY); diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 24db02fc6be0..b0904f969b58 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -1598,9 +1598,8 @@ void ODatabaseDocument::WriteThroughComponent( const Reference< XOutputStream >& xSaxWriter->setOutputStream( xOutputStream ); // prepare arguments (prepend doc ha
[Libreoffice-commits] core.git: config_host.mk.in extensions/Library_ldapbe2.mk extensions/source
config_host.mk.in |1 + extensions/Library_ldapbe2.mk |1 + extensions/source/config/ldap/ldapuserprofilebe.cxx |6 -- 3 files changed, 6 insertions(+), 2 deletions(-) New commits: commit abcb546269ab842fe701eed29be47e58d6c06601 Author: Caolán McNamara AuthorDate: Thu Jul 18 15:50:12 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 12:05:19 2019 +0200 missing LDAP since... Make LDAP support optional commit 6776c53b7ce2e431d8636f4e5a755f50f787ec8f Date: Tue Jan 8 04:53:51 2019 -0500 Change-Id: I4268169809b0dc68b347b28523500453394937de Reviewed-on: https://gerrit.libreoffice.org/75865 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/config_host.mk.in b/config_host.mk.in index 9bde2ff2a214..28d3ae3d2626 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -147,6 +147,7 @@ export DISABLE_GUI=@DISABLE_GUI@ export ENABLE_HTMLHELP=@ENABLE_HTMLHELP@ export ENABLE_IOS_LIBREOFFICELIGHT_APP=@ENABLE_IOS_LIBREOFFICELIGHT_APP@ export ENABLE_JAVA=@ENABLE_JAVA@ +export ENABLE_LDAP=@ENABLE_LDAP@ export ENABLE_LPSOLVE=@ENABLE_LPSOLVE@ export ENABLE_LTO=@ENABLE_LTO@ export ENABLE_LWP=@ENABLE_LWP@ diff --git a/extensions/Library_ldapbe2.mk b/extensions/Library_ldapbe2.mk index 5ea5a9597101..e76dcc21a5dd 100644 --- a/extensions/Library_ldapbe2.mk +++ b/extensions/Library_ldapbe2.mk @@ -33,6 +33,7 @@ $(eval $(call gb_Library_use_libraries,ldapbe2,\ cppu \ salhelper \ sal \ + tl \ )) ifeq ($(OS),WNT) diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx index cbf04fd6b027..9e5460b7b5fd 100644 --- a/extensions/source/config/ldap/ldapuserprofilebe.cxx +++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -138,9 +139,10 @@ bool LdapUserProfileBe::readLdapConfiguration( getLdapStringParam(xAccess, kUser, definition->mAnonUser); getLdapStringParam(xAccess, kPassword, definition->mAnonCredentials); } -catch (const uno::Exception & e) +catch (const uno::Exception&) { -SAL_WARN("extensions.config", "LdapUserProfileBackend: access to configuration data failed: " << e); +css::uno::Any ex(DbgGetCaughtException()); +SAL_WARN("extensions.config", "LdapUserProfileBackend: access to configuration data failed: " << exceptionToString(ex)); return false; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/source
sd/source/ui/dlg/BulletAndPositionDlg.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit 1f6c4328bfa00da5cf351dd050a80b75e0f1acde Author: Gülşah Köse AuthorDate: Wed Jul 17 13:57:58 2019 +0300 Commit: Gülşah Köse CommitDate: Fri Jul 19 12:13:30 2019 +0200 tdf#126334 Fix number format array in init controls. Customization changings need only selected number format object but Position changings on bullet need all existing number format array. After merge the customization and position keeping all numbering format objects (10 item) make sense. Change-Id: Iade1e154243deaed43b9d243f2ebd0c5298b42a4 Reviewed-on: https://gerrit.libreoffice.org/75784 Tested-by: Jenkins Reviewed-by: Gülşah Köse diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx b/sd/source/ui/dlg/BulletAndPositionDlg.cxx index 659833829517..38c7b7e00094 100644 --- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx +++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx @@ -469,9 +469,10 @@ void SvxBulletAndPositionDlg::InitControls() bool bBullRelSize = pActNum->IsFeatureSupported(SvxNumRuleFlags::BULLET_REL_SIZE); for (sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { +aNumFmtArr[i] = &pActNum->GetLevel(i); + if (nActNumLvl & nMask) { -aNumFmtArr[i] = &pActNum->GetLevel(i); bShowBullet &= aNumFmtArr[i]->GetNumberingType() == SVX_NUM_CHAR_SPECIAL; bShowBitmap &= (aNumFmtArr[i]->GetNumberingType() & (~LINK_TOKEN)) == SVX_NUM_BITMAP; eFirstAdjust = aNumFmtArr[i]->GetNumAdjust(); @@ -508,8 +509,6 @@ void SvxBulletAndPositionDlg::InitControls() } nHighestLevel = i; } -else -aNumFmtArr[i] = nullptr; nMask <<= 1; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: avmedia/source basctl/source basegfx/source basic/source
avmedia/source/viewer/mediawindow_impl.cxx |8 -- basctl/source/accessibility/accessibledialogcontrolshape.cxx |2 basctl/source/basicide/baside3.cxx |6 - basctl/source/basicide/bastype2.cxx | 40 --- basctl/source/basicide/bastype3.cxx |4 - basctl/source/basicide/iderdll.cxx |2 basctl/source/basicide/moduldl2.cxx | 23 ++ basctl/source/basicide/moduldlg.cxx |3 basctl/source/dlged/dlged.cxx| 37 +++--- basctl/source/dlged/dlgedobj.cxx |6 - basegfx/source/tools/canvastools.cxx | 16 +--- basic/source/classes/eventatt.cxx|6 - basic/source/uno/dlgcont.cxx |3 basic/source/uno/modsizeexceeded.cxx |4 - 14 files changed, 62 insertions(+), 98 deletions(-) New commits: commit ee2bb231036b1d9d954dec369855948e6ea1f53a Author: Noel Grandin AuthorDate: Fri Jul 19 09:49:23 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 12:22:43 2019 +0200 loplugin:referencecasting in avmedia..basic Change-Id: I6790b2e3902d64fb6f714f031affa221dbaba014 Reviewed-on: https://gerrit.libreoffice.org/75934 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index a7e053cb911a..4aae993d5541 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.cxx @@ -152,11 +152,7 @@ void MediaWindowImpl::dispose() mxPlayerWindow->removeKeyListener( uno::Reference< awt::XKeyListener >( pEventsIf, uno::UNO_QUERY ) ); mxPlayerWindow->removeMouseListener( uno::Reference< awt::XMouseListener >( pEventsIf, uno::UNO_QUERY ) ); mxPlayerWindow->removeMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( pEventsIf, uno::UNO_QUERY ) ); - -uno::Reference< lang::XComponent > xComponent( mxPlayerWindow, uno::UNO_QUERY ); -if (xComponent.is()) -xComponent->dispose(); - +mxPlayerWindow->dispose(); mxPlayerWindow.clear(); } @@ -222,7 +218,7 @@ uno::Reference< media::XPlayer > MediaWindowImpl::createPlayer( xContext->getServiceManager()->createInstanceWithContext(rManagerServName, xContext), uno::UNO_QUERY ); if( xManager.is() ) -xPlayer.set( xManager->createPlayer( rURL ), uno::UNO_QUERY ); +xPlayer = xManager->createPlayer( rURL ); else SAL_INFO( "avmedia", "failed to create media player service " << rManagerServName ); } catch ( const uno::Exception & ) diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx index 0eac8917ed00..11b9610375b7 100644 --- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx +++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx @@ -169,7 +169,7 @@ vcl::Window* AccessibleDialogControlShape::GetWindow() const vcl::Window* pWindow = nullptr; if ( m_pDlgEdObj ) { -Reference< awt::XControl > xControl( m_pDlgEdObj->GetControl(), UNO_QUERY ); +Reference< awt::XControl > xControl = m_pDlgEdObj->GetControl(); if ( xControl.is() ) pWindow = VCLUnoHelper::GetWindow( xControl->getPeer() ).get(); } diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index eda571040c6b..ab9bbe06f544 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1034,16 +1034,14 @@ bool implImportDialog(weld::Window* pWin, const OUString& rCurPath, const Script } else if( !bLibLocalized ) { -Reference< resource::XStringResourceManager > xImportStringResourceManager( xImportStringResource, UNO_QUERY ); -LocalizationMgr::resetResourceForDialog( xDialogModel, xImportStringResourceManager ); +LocalizationMgr::resetResourceForDialog( xDialogModel, xImportStringResource ); bCopyResourcesForDialog = false; } if( bCopyResourcesForDialog ) { -Reference< resource::XStringResourceResolver > xImportStringResourceResolver( xImportStringResource, UNO_QUERY ); LocalizationMgr::copyResourceForDroppedDialog( xDialogModel, aXmlDlgName, -xLibStringResourceManager, xImportStringResourceResolver ); +xLibStringResourceManager, xImportStringResource ); } } else if( bLibLocalized ) dif
[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sw/source
sw/source/core/layout/fly.cxx |2 ++ sw/source/core/layout/ssfrm.cxx |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) New commits: commit 1b0aa6b85edb621d1ccfaed5e3b256d640b92ce6 Author: Michael Stahl AuthorDate: Thu Jul 18 14:07:06 2019 +0200 Commit: Caolán McNamara CommitDate: Fri Jul 19 12:48:40 2019 +0200 sw: fix use after free on tdf117215-1.odt Move the fix from 6d0ea082889c89eb8b408779f2de08da7441ff54 to SwFlyFrame::DestroyImpl() so we unregister every SwFlyFrame. ==1550==ERROR: AddressSanitizer: heap-use-after-free on address 0x615000383f56 at pc 0x7efcd70d5ab9 bp 0x7ffeb7ac7c40 sp 0x7ffeb7ac7c38 WRITE of size 1 at 0x615000383f56 thread T0 0 SwAnchoredObject::SetTmpConsiderWrapInfluence(bool) sw/source/core/layout/anchoredobject.cxx:743:32 1 SwObjsMarkedAsTmpConsiderWrapInfluence::Clear() sw/source/core/layout/objstmpconsiderwrapinfl.cxx:53:23 2 SwLayouter::ClearObjsTmpConsiderWrapInfluence(SwDoc const&) sw/source/core/layout/layouter.cxx:387:84 3 sw::DocumentLayoutManager::ClearSwLayouterEntries() sw/source/core/doc/DocumentLayoutManager.cxx:497:5 4 sw::DocumentStateManager::SetModified() sw/source/core/doc/DocumentStateManager.cxx:45:39 5 sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&) sw/source/core/doc/DocumentContentOperationsManager.cxx:3942:36 0x615000383f56 is located 342 bytes inside of 504-byte region [0x615000383e00,0x615000383ff8) freed by thread T0 here: 1 SwFlyAtContentFrame::~SwFlyAtContentFrame() sw/source/core/inc/flyfrms.hxx:159:7 2 SwFrame::DestroyFrame(SwFrame*) sw/source/core/layout/ssfrm.cxx:389:9 3 SwFrameFormat::DelFrames() sw/source/core/layout/atrfrm.cxx:2624:17 4 SwUndoFlyBase::DelFly(SwDoc*) sw/source/core/undo/undobj1.cxx:161:19 5 SwUndoDelLayFormat::SwUndoDelLayFormat(SwFrameFormat*) sw/source/core/undo/undobj1.cxx:403:5 6 SwHistoryTextFlyCnt::SwHistoryTextFlyCnt(SwFrameFormat*) sw/source/core/undo/rolbck.cxx:538:20 7 SwHistory::Add(SwFlyFrameFormat&, unsigned short&) sw/source/core/undo/rolbck.cxx:1083:50 8 SwUndoSaveContent::DelContentIndex(SwPosition const&, SwPosition const&, DelContentType) sw/source/core/undo/undobj.cxx:1020:39 9 SwUndoDelete::SwUndoDelete(SwPaM&, bool, bool) sw/source/core/undo/undel.cxx:229:9 11 sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&) sw/source/core/doc/DocumentContentOperationsManager.cxx:3939:55 Change-Id: Ia0c28c9d5792615cbb566e502374efd0f4056daf Reviewed-on: https://gerrit.libreoffice.org/75857 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit dea72ef111ee8a0b1b178f8cd48757514d5ca831) Reviewed-on: https://gerrit.libreoffice.org/75940 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index b02b911090f7..a2193f24d654 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -280,6 +280,8 @@ void SwFlyFrame::DestroyImpl() if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() ) { +ClearTmpConsiderWrapInfluence(); // remove this from SwLayouter + // OD 2004-01-19 #110582# Unchain(); diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 55b9dfe32e4e..8ff47322e0c0 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -523,7 +523,6 @@ void SwLayoutFrame::DestroyImpl() const size_t nCnt = pFrame->GetDrawObjs()->size(); // #i28701# SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[0]; -pAnchoredObj->ClearTmpConsiderWrapInfluence(); if (SwFlyFrame* pFlyFrame = dynamic_cast(pAnchoredObj)) { SwFrame::DestroyFrame(pFlyFrame); @@ -531,6 +530,7 @@ void SwLayoutFrame::DestroyImpl() } else { +pAnchoredObj->ClearTmpConsiderWrapInfluence(); SdrObject* pSdrObj = pAnchoredObj->DrawObj(); SwDrawContact* pContact = static_cast(pSdrObj->GetUserCall()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/source
sw/source/core/unocore/unoframe.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 922aacddc86a5ae6cc3eeab9d47219bcb45ef1bc Author: Michael Stahl AuthorDate: Wed Jul 17 17:40:50 2019 +0200 Commit: Caolán McNamara CommitDate: Fri Jul 19 12:48:57 2019 +0200 sw: missing SolarMutexGuard in SwXFrame::attach() Causes assert in a test i'm adding... Change-Id: I5be24aa9683ec0d31494c0c97270d1d58692f764 Reviewed-on: https://gerrit.libreoffice.org/75796 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 8dfe166a879a17bd8c2e0859d027ff923258a9d8) Reviewed-on: https://gerrit.libreoffice.org/75827 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index a7eede4e14e6..831d9dc7e41b 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -3042,6 +3042,8 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan void SwXFrame::attach(const uno::Reference< text::XTextRange > & xTextRange) { +SolarMutexGuard g; + SwFrameFormat* pFormat; if(IsDescriptor()) attachToRange(xTextRange); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/source
sw/source/core/layout/fly.cxx |2 ++ sw/source/core/layout/ssfrm.cxx |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) New commits: commit 4b9324b93dcbd72c8c8949309d45790dd8f7d5fd Author: Michael Stahl AuthorDate: Thu Jul 18 14:07:06 2019 +0200 Commit: Caolán McNamara CommitDate: Fri Jul 19 13:01:55 2019 +0200 sw: fix use after free on tdf117215-1.odt Move the fix from 6d0ea082889c89eb8b408779f2de08da7441ff54 to SwFlyFrame::DestroyImpl() so we unregister every SwFlyFrame. ==1550==ERROR: AddressSanitizer: heap-use-after-free on address 0x615000383f56 at pc 0x7efcd70d5ab9 bp 0x7ffeb7ac7c40 sp 0x7ffeb7ac7c38 WRITE of size 1 at 0x615000383f56 thread T0 0 SwAnchoredObject::SetTmpConsiderWrapInfluence(bool) sw/source/core/layout/anchoredobject.cxx:743:32 1 SwObjsMarkedAsTmpConsiderWrapInfluence::Clear() sw/source/core/layout/objstmpconsiderwrapinfl.cxx:53:23 2 SwLayouter::ClearObjsTmpConsiderWrapInfluence(SwDoc const&) sw/source/core/layout/layouter.cxx:387:84 3 sw::DocumentLayoutManager::ClearSwLayouterEntries() sw/source/core/doc/DocumentLayoutManager.cxx:497:5 4 sw::DocumentStateManager::SetModified() sw/source/core/doc/DocumentStateManager.cxx:45:39 5 sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&) sw/source/core/doc/DocumentContentOperationsManager.cxx:3942:36 0x615000383f56 is located 342 bytes inside of 504-byte region [0x615000383e00,0x615000383ff8) freed by thread T0 here: 1 SwFlyAtContentFrame::~SwFlyAtContentFrame() sw/source/core/inc/flyfrms.hxx:159:7 2 SwFrame::DestroyFrame(SwFrame*) sw/source/core/layout/ssfrm.cxx:389:9 3 SwFrameFormat::DelFrames() sw/source/core/layout/atrfrm.cxx:2624:17 4 SwUndoFlyBase::DelFly(SwDoc*) sw/source/core/undo/undobj1.cxx:161:19 5 SwUndoDelLayFormat::SwUndoDelLayFormat(SwFrameFormat*) sw/source/core/undo/undobj1.cxx:403:5 6 SwHistoryTextFlyCnt::SwHistoryTextFlyCnt(SwFrameFormat*) sw/source/core/undo/rolbck.cxx:538:20 7 SwHistory::Add(SwFlyFrameFormat&, unsigned short&) sw/source/core/undo/rolbck.cxx:1083:50 8 SwUndoSaveContent::DelContentIndex(SwPosition const&, SwPosition const&, DelContentType) sw/source/core/undo/undobj.cxx:1020:39 9 SwUndoDelete::SwUndoDelete(SwPaM&, bool, bool) sw/source/core/undo/undel.cxx:229:9 11 sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&) sw/source/core/doc/DocumentContentOperationsManager.cxx:3939:55 Change-Id: Ia0c28c9d5792615cbb566e502374efd0f4056daf Reviewed-on: https://gerrit.libreoffice.org/75857 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit dea72ef111ee8a0b1b178f8cd48757514d5ca831) Reviewed-on: https://gerrit.libreoffice.org/75941 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index f81a62266a5e..8486f211f341 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -266,6 +266,8 @@ void SwFlyFrame::DestroyImpl() if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() ) { +ClearTmpConsiderWrapInfluence(); // remove this from SwLayouter + // OD 2004-01-19 #110582# Unchain(); diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index f309693befc2..cdc941732c88 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -493,7 +493,6 @@ void SwLayoutFrame::DestroyImpl() const size_t nCnt = pFrame->GetDrawObjs()->size(); // #i28701# SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[0]; -pAnchoredObj->ClearTmpConsiderWrapInfluence(); if (SwFlyFrame* pFlyFrame = dynamic_cast(pAnchoredObj)) { SwFrame::DestroyFrame(pFlyFrame); @@ -501,6 +500,7 @@ void SwLayoutFrame::DestroyImpl() } else { +pAnchoredObj->ClearTmpConsiderWrapInfluence(); SdrObject* pSdrObj = pAnchoredObj->DrawObj(); SwDrawContact* pContact = static_cast(pSdrObj->GetUserCall()); ___ 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/control/Control.Toolbar.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ec56d52f61009ab11b4e026534094109f003fdbf Author: Samuel Mehrbrodt AuthorDate: Thu Jul 18 17:03:16 2019 +0200 Commit: Samuel Mehrbrodt CommitDate: Fri Jul 19 13:06:18 2019 +0200 Fix tooltip for "BackColor" Change-Id: Ic7c41851e79bb74e6080795fe4823cc637047bfe Reviewed-on: https://gerrit.libreoffice.org/75868 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js index 8839f259b..6931c48e2 100644 --- a/loleaflet/src/control/Control.Toolbar.js +++ b/loleaflet/src/control/Control.Toolbar.js @@ -742,7 +742,7 @@ function initNormalToolbar() { {type: 'button', id: 'strikeout', img: 'strikeout', hint: _UNO('.uno:Strikeout'), uno: 'Strikeout'}, {type: 'break', id: 'breakformatting'}, {type: 'text-color', id: 'fontcolor', img: 'textcolor', hint: _UNO('.uno:FontColor')}, - {type: 'color', id: 'backcolor', img: 'backcolor', hint: _UNO('.uno:BackColor'), hidden: true}, + {type: 'color', id: 'backcolor', img: 'backcolor', hint: _UNO('.uno:BackColor', 'text'), hidden: true}, {type: 'color', id: 'backgroundcolor', img: 'backgroundcolor', hint: _UNO('.uno:BackgroundColor'), hidden: true}, {type: 'break' , id: 'breakcolor', mobile:false}, {type: 'button', id: 'leftpara', img: 'alignleft', hint: _UNO('.uno:LeftPara', '', true), uno: 'LeftPara', hidden: true, unosheet: 'AlignLeft', disabled: true}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: comphelper/source connectivity/source
comphelper/source/container/embeddedobjectcontainer.cxx |8 ++--- comphelper/source/misc/backupfilehelper.cxx | 16 +-- comphelper/source/misc/dispatchcommand.cxx |2 - comphelper/source/misc/proxyaggregation.cxx |8 ++--- connectivity/source/commontools/TColumnsHelper.cxx |4 +- connectivity/source/commontools/dbtools.cxx |4 +- connectivity/source/drivers/firebird/Connection.cxx | 15 -- connectivity/source/drivers/firebird/Driver.cxx |2 - connectivity/source/drivers/firebird/StatementCommonBase.cxx |2 - connectivity/source/drivers/flat/ETable.cxx |2 - connectivity/source/drivers/hsqldb/HDriver.cxx |4 +- connectivity/source/drivers/mysql_jdbc/YDriver.cxx |4 +- connectivity/source/drivers/postgresql/pq_xtable.cxx |2 - connectivity/source/drivers/writer/WTable.cxx|4 +- 14 files changed, 35 insertions(+), 42 deletions(-) New commits: commit 242e1c42d975b2d8729cd150cf104b177033760a Author: Noel Grandin AuthorDate: Fri Jul 19 09:51:02 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 13:28:41 2019 +0200 loplugin:referencecasting in comphelper..connectivity Change-Id: I21896885c29e9ab58ebab17b59f1480c6a06fb38 Reviewed-on: https://gerrit.libreoffice.org/75936 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx index ba71089dc402..aa818d78ce5e 100644 --- a/comphelper/source/container/embeddedobjectcontainer.cxx +++ b/comphelper/source/container/embeddedobjectcontainer.cxx @@ -238,10 +238,9 @@ bool EmbeddedObjectContainer::HasEmbeddedObject( const OUString& rName ) auto aIt = pImpl->maNameToObjectMap.find( rName ); if (aIt != pImpl->maNameToObjectMap.end()) return true; -uno::Reference xAccess(pImpl->mxStorage, uno::UNO_QUERY); -if (!xAccess.is()) +if (!pImpl->mxStorage.is()) return false; -return xAccess->hasByName(rName); +return pImpl->mxStorage->hasByName(rName); } bool EmbeddedObjectContainer::HasEmbeddedObject( const uno::Reference < embed::XEmbeddedObject >& xObj ) const @@ -999,10 +998,9 @@ void EmbeddedObjectContainer::CloseEmbeddedObject( const uno::Reference < embed: pImpl->maObjectToNameMap.erase( aIter->second ); pImpl->maNameToObjectMap.erase( aIter ); -uno::Reference < ::util::XCloseable > xClose( xObj, uno::UNO_QUERY ); try { -xClose->close( true ); +xObj->close( true ); } catch (const uno::Exception&) { diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index aa81039ad89c..c60f9fa6e75e 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -819,12 +819,12 @@ namespace { // create a SAXWriter uno::Reference< xml::sax::XWriter > const xSaxWriter = xml::sax::Writer::create(xContext); -uno::Reference< io::XStream > xTempFile(io::TempFile::create(xContext), uno::UNO_QUERY); -uno::Reference< io::XOutputStream > xOutStrm(xTempFile->getOutputStream(), uno::UNO_QUERY); +uno::Reference< io::XStream > xTempFile = io::TempFile::create(xContext); +uno::Reference< io::XOutputStream > xOutStrm = xTempFile->getOutputStream(); // set output stream and do the serialization -xSaxWriter->setOutputStream(uno::Reference< css::io::XOutputStream >(xOutStrm, uno::UNO_QUERY)); -xSerializer->serialize(uno::Reference< xml::sax::XDocumentHandler >(xSaxWriter, uno::UNO_QUERY), uno::Sequence< beans::StringPair >()); +xSaxWriter->setOutputStream(xOutStrm); +xSerializer->serialize(xSaxWriter, uno::Sequence< beans::StringPair >()); // get URL from temp file uno::Reference < beans::XPropertySet > xTempFileProps(xTempFile, uno::UNO_QUERY); @@ -2115,12 +2115,12 @@ namespace comphelper // create a SAXWriter uno::Reference< xml::sax::XWriter > const xSaxWriter = xml::sax::Writer::create(xContext); -uno::Reference< io::XStream > xTempFile(io::TempFile::create(xContext), uno::UNO_QUERY); -uno::Reference< io::XOutputStream > xOutStrm(xTempFile->getOutputStream(), uno::UNO_QUERY); +uno::Reference< io::XStream > xTempFile = io::TempFile::create(xContext); +uno::Reference< io::XOutputStream > xOutStrm = xTempFile->getOutput
[Libreoffice-commits] core.git: Branch 'distro/vector/vector-5.4' - 3 commits - embeddedobj/source sfx2/source sw/qa sw/source
embeddedobj/source/commonembedding/embedobj.cxx| 34 ++ sfx2/source/view/viewsh.cxx|4 +- sw/qa/extras/uiwriter/data/ole-save-while-edit.odt |binary sw/qa/extras/uiwriter/uiwriter.cxx | 38 + sw/source/uibase/app/docsh.cxx |8 5 files changed, 68 insertions(+), 16 deletions(-) New commits: commit db175f7b0114fce67b2ae403b572e53fd8aa9f25 Author: Miklos Vajna AuthorDate: Thu Jul 18 18:03:54 2019 +0200 Commit: Miklos Vajna CommitDate: Fri Jul 19 12:10:51 2019 +0200 sw: fix missing OLE preview for actively edited OLE object on save Regression from commit 74844277cc2194c9e43f5bd7a6f78a9603da32f3 (disable generation of ole previews in ODF format until after load, 2016-09-13), if the user started an OLE edit in a Writer document, and saved without ending the OLE edit, then svt::EmbeddedObjectRef::UpdateReplacementOnDemand() removed the old replacement image, but no new one was created. Given that save is always an explicit user action (auto-save does not kick in for unmodified documents), restore the permission to update OLE replacement images during save. Do this check in SwDocShell::CalcLayoutForOLEObjects(), as that's OLE-related and is called from all the relevant save code paths (save, save-as, convert to alien formats). Reviewed-on: https://gerrit.libreoffice.org/75867 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit d33cc4f7edc2ce21a9c5a01a7f5e85cfd324c6d9) Conflicts: sw/qa/extras/uiwriter/uiwriter2.cxx sw/source/uibase/app/docsh.cxx Change-Id: Idaad43909cd744a379e713efd70ffd000e2692bc diff --git a/sw/qa/extras/uiwriter/data/ole-save-while-edit.odt b/sw/qa/extras/uiwriter/data/ole-save-while-edit.odt new file mode 100644 index ..33a2284dd314 Binary files /dev/null and b/sw/qa/extras/uiwriter/data/ole-save-while-edit.odt differ diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 66886a70fa05..735ab11d4518 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -108,6 +108,7 @@ #include #include #include +#include #include namespace @@ -279,6 +280,7 @@ public: void testHtmlCopyImages(); void testTdf116789(); void testTdf117225(); +void testOleSaveWhileEdit(); CPPUNIT_TEST_SUITE(SwUiWriterTest); CPPUNIT_TEST(testReplaceForward); @@ -420,6 +422,7 @@ public: CPPUNIT_TEST(testHtmlCopyImages); CPPUNIT_TEST(testTdf116789); CPPUNIT_TEST(testTdf117225); +CPPUNIT_TEST(testOleSaveWhileEdit); CPPUNIT_TEST_SUITE_END(); private: @@ -5083,6 +5086,41 @@ void SwUiWriterTest::testTdf117225() CPPUNIT_ASSERT_EQUAL(nExpected, nActual); } +void SwUiWriterTest::testOleSaveWhileEdit() +{ +// Enable LOK mode, otherwise OCommonEmbeddedObject::SwitchStateTo_Impl() will throw when it +// finds out that the test runs headless. +comphelper::LibreOfficeKit::setActive(); + +// Load a document with a Draw doc in it. +SwDoc* pDoc = createDoc("ole-save-while-edit.odt"); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +pWrtShell->GotoObj(/*bNext=*/true, GotoObjFlags::Any); + +// Select the frame and switch to the frame shell. +SwView* pView = pDoc->GetDocShell()->GetView(); +pView->StopShellTimer(); + +// Start editing the OLE object. +pWrtShell->LaunchOLEObj(); + +// Save the document without existing the OLE edit. +uno::Reference xStorable(mxComponent, uno::UNO_QUERY); +xStorable->storeToURL(maTempFile.GetURL(), {}); + +uno::Reference xNameAccess += packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), + maTempFile.GetURL()); +// Without the accompanying fix in place, this test would have failed: the OLE object lost its +// replacement on save if the edit was active while saving. +CPPUNIT_ASSERT(xNameAccess->hasByName("ObjectReplacements/Object 1")); + +// Dispose the document while LOK is still active to avoid leaks. +mxComponent->dispose(); +mxComponent.clear(); +comphelper::LibreOfficeKit::setActive(false); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 2f1815ab6598..18a079835957 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -1211,6 +1211,14 @@ void SwDocShell::CalcLayoutForOLEObjects() if (!m_pWrtShell) return; +if (m_pView && m_pView->GetIPClient()) +{ +// We have an active OLE edit: allow link updates, so an up to date replacement graphic can +// be created. +comphelper::EmbeddedObje
[Libreoffice-commits] core.git: cui/source
cui/source/factory/cuiexp.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 9987bb6ee096afada1dac848db95b3c311f723f7 Author: Mike Kaganski AuthorDate: Fri Jul 19 10:10:48 2019 +0200 Commit: Mike Kaganski CommitDate: Fri Jul 19 13:50:23 2019 +0200 Move static into the getter function Change-Id: I6a4ed20cc8f208fa59f12d65d3ff8287726db594 Reviewed-on: https://gerrit.libreoffice.org/75939 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/cui/source/factory/cuiexp.cxx b/cui/source/factory/cuiexp.cxx index 3c8f89be234d..1ee11a656c75 100644 --- a/cui/source/factory/cuiexp.cxx +++ b/cui/source/factory/cuiexp.cxx @@ -57,11 +57,9 @@ namespace cui { -static AbstractDialogFactory_Impl* pFactory=nullptr; static AbstractDialogFactory_Impl* GetFactory() { -if ( !pFactory ) -pFactory = new AbstractDialogFactory_Impl; +static AbstractDialogFactory_Impl* pFactory = new AbstractDialogFactory_Impl; return pFactory; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: editeng/source
editeng/source/editeng/editview.cxx |2 +- editeng/source/editeng/impedit.cxx |5 ++--- editeng/source/misc/hangulhanja.cxx |5 ++--- editeng/source/misc/splwrap.cxx |6 +++--- editeng/source/misc/svxacorr.cxx|3 +-- editeng/source/misc/unolingu.cxx| 17 +++-- 6 files changed, 16 insertions(+), 22 deletions(-) New commits: commit 0a4e138d3ac3609f2e1465c8a949d07eb89bccf0 Author: Noel Grandin AuthorDate: Fri Jul 19 14:04:30 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 14:52:09 2019 +0200 loplugin:referencecasting in editeng Change-Id: I584266ba58e55e6435e76180227c0a5756aa0c23 Reviewed-on: https://gerrit.libreoffice.org/75950 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 637f36a73cba..53b6820a0cdf 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -975,7 +975,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link(aDics.getLength()); for (sal_uInt16 i = 0; i < nDicCount; i++) { -uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY ); +uno::Reference< linguistic2::XDictionary > xDicTmp = pDic[i]; if (!xDicTmp.is() || LinguMgr::GetIgnoreAllList() == xDicTmp) continue; diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 15a25c4cdd68..a30d658ba492 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1438,7 +1438,7 @@ OUString ImpEditView::SpellIgnoreWord() if ( !aWord.isEmpty() ) { -Reference< XDictionary > xDic( LinguMgr::GetIgnoreAllList(), UNO_QUERY ); +Reference< XDictionary > xDic = LinguMgr::GetIgnoreAllList(); if (xDic.is()) xDic->add( aWord, false, OUString() ); EditDoc& rDoc = pEditEngine->GetEditDoc(); @@ -2325,8 +2325,7 @@ void ImpEditView::RemoveDragAndDropListeners() if ( mxDnDListener.is() ) { -uno::Reference< lang::XEventListener> xEL( mxDnDListener, uno::UNO_QUERY ); -xEL->disposing( lang::EventObject() ); // #95154# Empty Source means it's the Client +mxDnDListener->disposing( lang::EventObject() ); // #95154# Empty Source means it's the Client mxDnDListener.clear(); } diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx index 0bdbb50d33ee..da40ec6c103a 100644 --- a/editeng/source/misc/hangulhanja.cxx +++ b/editeng/source/misc/hangulhanja.cxx @@ -749,12 +749,11 @@ namespace editeng // exactly which characters are really changed in order to keep as much // from attributation for the text as possible. Sequence< sal_Int32 > aOffsets; -Reference< XExtendedTextConversion > xExtConverter( m_xConverter, UNO_QUERY ); -if (m_eConvType == HHC::eConvSimplifiedTraditional && xExtConverter.is()) +if (m_eConvType == HHC::eConvSimplifiedTraditional && m_xConverter.is()) { try { -xExtConverter->getConversionWithOffset( +m_xConverter->getConversionWithOffset( m_sCurrentPortion, m_nCurrentStartIndex, m_nCurrentEndIndex - m_nCurrentStartIndex, diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 0d657c9009f6..5e9cddc5d841 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -401,7 +401,7 @@ Reference< XDictionary > SvxSpellWrapper::GetAllRightDic() sal_Int32 i = 0; while (!xDic.is() && i < nCount) { -Reference< XDictionary > xTmp( pDic[i], UNO_QUERY ); +Reference< XDictionary > xTmp = pDic[i]; if (xTmp.is()) { if ( xTmp->isActive() && @@ -457,8 +457,8 @@ bool SvxSpellWrapper::FindSpellError() else { // look up in ChangeAllList for misspelled word -Reference< XDictionary >xChangeAllList( -LinguMgr::GetChangeAllList(), UNO_QUERY ); +Reference< XDictionary >xChangeAllList = +LinguMgr::GetChangeAllList(); Reference< XDictionaryEntry > xEntry; if (xChangeAllList.is()) xEntry = xChangeAllList->getEntry( xAlt->getWord() ); diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 3fa9fa1dcb7c..6b9e6dfc 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -2444,8 +2444,7 @@ bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SotStorage& rStg ) uno::Reference < io::XOut
[Libreoffice-commits] core.git: desktop/qa desktop/source
desktop/qa/desktop_lib/test_desktop_lib.cxx |2 - desktop/source/app/app.cxx |2 - desktop/source/app/dispatchwatcher.cxx |4 +- desktop/source/deployment/gui/dp_gui_updatedialog.cxx |5 +-- desktop/source/lib/init.cxx | 17 desktop/source/migration/migration.cxx | 14 +++-- desktop/source/migration/services/oo3extensionmigration.cxx |3 -- 7 files changed, 19 insertions(+), 28 deletions(-) New commits: commit 2ec1c7a69917ce39850addc49ea3eb8618869aac Author: Noel Grandin AuthorDate: Fri Jul 19 14:03:53 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 14:52:24 2019 +0200 loplugin:referencecasting in desktop Change-Id: I9ba4243bc3d6b14e66694728deb270ed74a70d01 Reviewed-on: https://gerrit.libreoffice.org/75949 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index a3db0fd57b1f..e590b0a7f974 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -878,7 +878,7 @@ void DesktopLOKTest::testWriterComments() LibLODocument_Impl* pDocument = loadDoc("blank_text.odt"); pDocument->pClass->registerCallback(pDocument, &DesktopLOKTest::callback, this); -uno::Reference xToolkit(com::sun::star::awt::Toolkit::create(comphelper::getProcessComponentContext()), uno::UNO_QUERY); +uno::Reference xToolkit = com::sun::star::awt::Toolkit::create(comphelper::getProcessComponentContext()); // Insert a comment at the beginning of the document and wait till the main // loop grabs the focus, so characters end up in the annotation window. diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 0867f6b5e82d..4feef4a7c27b 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2291,7 +2291,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) if ( !xTask.is() ) { // get any task if there is no active one -Reference< css::container::XIndexAccess > xList( xDesktop->getFrames(), css::uno::UNO_QUERY ); +Reference< css::container::XIndexAccess > xList = xDesktop->getFrames(); if ( xList->getCount() > 0 ) xList->getByIndex(0) >>= xTask; } diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index 96f0a7f69168..af0a6d9ffd93 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -771,7 +771,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector xList( xDesktop->getFrames(), UNO_QUERY ); +Reference< XElementAccess > xList = xDesktop->getFrames(); if ( !xList->hasElements() ) { @@ -799,7 +799,7 @@ void SAL_CALL DispatchWatcher::dispatchFinished( const DispatchResultEvent& ) { // We have to check if we have an open task otherwise we have to shutdown the office. Reference< XDesktop2 > xDesktop = css::frame::Desktop::create( ::comphelper::getProcessComponentContext() ); -Reference< XElementAccess > xList( xDesktop->getFrames(), UNO_QUERY ); +Reference< XElementAccess > xList = xDesktop->getFrames(); if ( !xList->hasElements() ) { diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 3cff34b814ce..e55a7ea717eb 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -228,9 +228,8 @@ UpdateDialog::Thread::Thread( { if( m_context.is() ) { -m_xInteractionHdl.set( -task::InteractionHandler::createWithParent(m_context, dialog.getDialog()->GetXWindow()), -uno::UNO_QUERY ); +m_xInteractionHdl = +task::InteractionHandler::createWithParent(m_context, dialog.getDialog()->GetXWindow()); m_updateInformation->setInteractionHandler( m_xInteractionHdl ); } } diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index f48f9846d063..1a18e296a092 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3484,11 +3484,9 @@ static char* getLanguages(const char* pCommand) css::uno::Reference xLangSrv = css::linguistic2::LinguServiceManager::create(xContext); if (xLangSrv.is()) { -css::uno::Reference xSpell(xLangSrv->getSpellChecker(), css::uno::UNO_QUERY); -css::uno::Reference xLocales(xSpell, css::uno::UNO_QUERY); - -if (xLocales.is()) -aLocales = xLocales->getLocales(); +css::uno::Reference xSpell = xLangSrv->getSpellChecker(); +if (xSp
[Libreoffice-commits] core.git: sw/qa writerfilter/source
sw/qa/extras/ooxmlexport/data/tdf125546.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|7 sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 35 +++--- sw/qa/extras/uiwriter/uiwriter2.cxx |4 -- writerfilter/source/dmapper/DomainMapper_Impl.cxx |7 +++- 5 files changed, 39 insertions(+), 14 deletions(-) New commits: commit a5abe0fc4d435d3a7a7de8bf55ec74087fdd299a Author: László Németh AuthorDate: Thu Jul 18 19:44:05 2019 +0200 Commit: László Németh CommitDate: Fri Jul 19 15:32:50 2019 +0200 tdf#125546 DOCX import: fix overgrowth of change tracking entries The same text portion could get double redlines including ParagraphFormat. This broke redline compression, sometimes resulting huge amount of redundant change tracking entries based on rsId, or losing paragraph styles after deletion. Change-Id: I5930eab2ef0bc7eb9c93a10cdd30b96cd41c9098 Reviewed-on: https://gerrit.libreoffice.org/75926 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/extras/ooxmlexport/data/tdf125546.docx b/sw/qa/extras/ooxmlexport/data/tdf125546.docx new file mode 100644 index ..92e3bdcd1586 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf125546.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index c542a7b4394b..e4c60af21ea9 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -891,6 +891,13 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125894, "tdf125894.docx") assertXPath(pXmlDoc, "//w:ins"); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125546, "tdf125546.docx") +{ +xmlDocPtr pXmlDoc = parseExport("word/document.xml"); +// compress redlines (it was 15) +assertXPath(pXmlDoc, "//w:rPrChange", 2); +} + DECLARE_OOXMLEXPORT_TEST(testTdf118691, "tdf118691.docx") { uno::Reference xTablesSupplier(mxComponent, uno::UNO_QUERY); diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index b49583b3b4d0..e9901a72cba7 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -942,6 +942,7 @@ DECLARE_OOXMLIMPORT_TEST(testBnc821804, "bnc821804.docx") CPPUNIT_ASSERT_EQUAL(OUString(" (1st run of an insert) (2nd run of an insert)"), getRun(getParagraph(1),3)->getString()); CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(1), 3), "RedlineType")); // And the end SwXRedlinePortion of the redline. +CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 4), "RedlineType")); CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty(getRun(getParagraph(1), 4), "RedlineType")); CPPUNIT_ASSERT_EQUAL(OUString("unknown1"),getProperty(getRun(getParagraph(1), 4), "RedlineAuthor")); CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:46:00Z"),dateTimeToString(getProperty(getRun(getParagraph(1), 4), "RedlineDateTime"))); @@ -950,6 +951,7 @@ DECLARE_OOXMLIMPORT_TEST(testBnc821804, "bnc821804.docx") CPPUNIT_ASSERT_EQUAL(OUString("Normal text"), getRun(getParagraph(2),1)->getString()); CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(2), 1), "RedlineType")); +CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(3), 1), "RedlineType")); CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty(getRun(getParagraph(3), 1), "RedlineType")); CPPUNIT_ASSERT_EQUAL(OUString("unknown2"),getProperty(getRun(getParagraph(3), 1), "RedlineAuthor")); CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:47:00Z"),dateTimeToString(getProperty(getRun(getParagraph(3), 1), "RedlineDateTime"))); @@ -957,34 +959,40 @@ DECLARE_OOXMLIMPORT_TEST(testBnc821804, "bnc821804.docx") // This is both inserted and formatted, so there are two SwXRedlinePortion "runs". Given that the redlines overlap and Writer core // doesn't officially expect that (even though it copes, the redline info will be split depending on how Writer deal with it). +CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(4), 1), "RedlineType")); CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty(getRun(getParagraph(4), 1), "RedlineType")); CPPUNIT_ASSERT_EQUAL(true,getProperty(getRun(getParagraph(4), 1), "IsStart")); - CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty(getRun(getParagraph(4), 2), "RedlineType")); -CPPUNIT_ASSERT_EQUAL(true,getProperty(getRun(getParagraph(4), 2), "IsStart")); -CPPUNIT_ASSERT_EQUAL(OUString("Inserted and formatted"), getRun(getParagraph(4),3)->getString()); - CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty(getRun(getParagraph(4), 4), "RedlineType")); -CPPUNIT_ASSERT_EQUAL(false,getProperty(getRun(getParagraph(4), 4), "IsStart")); +CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(4), 2), "RedlineType")); +CPPUNIT_ASSERT_EQUAL(OUString("Inserted and formatted"), getRun(getParagraph(4),2)-
[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - sfx2/source
sfx2/source/sidebar/SidebarController.cxx |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) New commits: commit 520dd8a0d5b02bfaf20c728d25e11282e2844aab Author: Samuel Mehrbrodt AuthorDate: Tue Jul 16 14:19:25 2019 +0200 Commit: Thorsten Behrens CommitDate: Fri Jul 19 15:53:17 2019 +0200 tdf#126427 Fix deck highlighting after activating via UNO API Reviewed-on: https://gerrit.libreoffice.org/75723 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit 5a6671e8d8dc65f2bbb0880f19fd8c8c8e426b6d) Change-Id: I4ff7dfa156905abcba0df8e6bfbddc9e7d37cbbb Reviewed-on: https://gerrit.libreoffice.org/75751 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 14b40e58a6f8..75c2055e41c3 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -538,8 +538,6 @@ void SidebarController::OpenThenToggleDeck ( } RequestOpenDeck(); SwitchToDeck(rsDeckId); -mpTabBar->Invalidate(); -mpTabBar->HighlightDeck(rsDeckId); } void SidebarController::OpenThenSwitchToDeck ( @@ -551,8 +549,7 @@ void SidebarController::OpenThenSwitchToDeck ( pSplitWindow->FadeIn(); RequestOpenDeck(); SwitchToDeck(rsDeckId); -mpTabBar->Invalidate(); -mpTabBar->HighlightDeck(rsDeckId); + } void SidebarController::SwitchToDefaultDeck() @@ -692,6 +689,7 @@ void SidebarController::SwitchToDeck ( msCurrentDeckId = rDeckDescriptor.msId; } +mpTabBar->Invalidate(); mpTabBar->HighlightDeck(msCurrentDeckId); // Determine the panels to display in the deck. ___ 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/ppt/timenodelistcontext.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8e907dcf11d4e5b941bc5dc6e427485673ea4487 Author: Caolán McNamara AuthorDate: Thu Jul 18 11:10:40 2019 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 19 16:18:28 2019 +0200 cid#1448460 Unchecked return value Change-Id: I5984923062338b54e016e46a8f12be72deff6822 Reviewed-on: https://gerrit.libreoffice.org/75895 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index 455c008dc16e..151adbcdf725 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -602,7 +602,7 @@ namespace oox { namespace ppt { if (!tav.msFormula.isEmpty()) { OUString sFormula = tav.msFormula; -convertMeasure(sFormula); +(void)convertMeasure(sFormula); aProps[NP_FORMULA] <<= sFormula; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/cib/libreoffice-6-2' - loleaflet/js
loleaflet/js/toolbar.js | 114 ++-- 1 file changed, 34 insertions(+), 80 deletions(-) New commits: commit 6d4f1056dfd19a7e4f6551ea2934cd020d92e6fb Author: Samuel Mehrbrodt AuthorDate: Fri Jul 19 16:10:28 2019 +0200 Commit: Samuel Mehrbrodt CommitDate: Fri Jul 19 16:35:34 2019 +0200 Font list empty in some cases The list of font sizes was taken from the font info. This causes problems when the document uses a font which is not available on the system. As there is no obvious reason, why the list of font sizes should depend on the font (and update with every font change), remove this dependency and just populate the list of fonts once. If the document uses a font size which is not in the list, it still will be added to the font size list. Change-Id: I4d434244b341c8e782138e5a6df85a50ddad3df5 diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js index dab0b5d4d..162949a1d 100644 --- a/loleaflet/js/toolbar.js +++ b/loleaflet/js/toolbar.js @@ -627,7 +627,6 @@ function hideTooltip(toolbar, id) { var stylesSelectValue; var fontsSelectValue; -var fontsizesSelectValue; function createToolbar() { var toolItems = [ @@ -639,7 +638,17 @@ function createToolbar() { {type: 'break', id: 'breakundo', mobile: false}, {type: 'html', id: 'styles', html: '', mobile: false}, {type: 'html', id: 'fonts', html: '', mobile: false}, - {type: 'html', id: 'fontsizes', html: '', mobile: false}, + {type: 'html', id: 'fontsizes', html: '', + onRefresh: function (edata) { + if (!edata.item.html) { + edata.isCancelled = true; + } else { + $.extend(edata, { onComplete: function (e) { + $('.fontsizes-select').select2({ dropdownAutoWidth: true, width: 'auto'}); + e.item.html = undefined; + }}); + } + }, mobile: false}, {type: 'break', id: 'breakstyles', mobile: false}, {type: 'button', id: 'bold', img: 'bold', hint: _UNO('.uno:Bold'), uno: 'Bold', disabled: true}, {type: 'button', id: 'italic', img: 'italic', hint: _UNO('.uno:Italic'), uno: 'Italic', disabled: true}, @@ -1220,23 +1229,6 @@ function onDocumentNameFocus() { map._onLostFocus(); } -function sortFontSizes() { - var oldVal = $('.fontsizes-select').val(); - var selectList = $('.fontsizes-select option'); - selectList.sort(function (a, b) { - a = parseFloat($(a).text() * 1); - b = parseFloat($(b).text() * 1); - if (a > b) { - return 1; - } else if (a < b) { - return -1; - } - return 0; - }); - $('.fontsizes-select').html(selectList); - $('.fontsizes-select').val(oldVal).trigger('change'); -} - function onStyleSelect(e) { var style = e.target.value; if (style.startsWith('.uno:')) { @@ -1254,56 +1246,14 @@ function onStyleSelect(e) { map.focus(); } -function updateFontSizeList(font) { - var oldSize = $('.fontsizes-select').val(); - var found = false; - $('.fontsizes-select').find('option').remove(); - var data = ['']; - data = data.concat(map.getToolbarCommandValues('.uno:CharFontName')[font]); - $('.fontsizes-select').select2({ - data: data, - placeholder: ' ', - //Allow manually entered font size. - createTag: function(query) { - return { - id: query.term, - text: query.term, - tag: true - }; - }, - tags: true - }); - $('.fontsizes-select option').each(function (i, e) { - if ($(e).text() === oldSize) { - $('.fontsizes-select').val(oldSize).trigger('change'); - found = true; - return; - } - }); - if (!found) { - // we need to add the size - $('.fontsizes-select') - .append($('') - .text(oldSize)); - } - $('.fontsizes-select').val(oldSize).trigger('change'); - sortFontSizes(); -} - function onFontSelect(e) { var font = e.target.value; - updateFontSizeList(font); map.applyFont(font); map.focus(); } function onFontSizeSelect(e) { - var size = e.target.value; - var command = {}; - $(e.target).find('option[data-select2-tag]').rem
Re: Crash test update
On Tue, 2019-07-16 at 18:07 +, Crashtest VM wrote: > New crashtest update available at > http://dev-builds.libreoffice.org/crashtest/f926de93c455f7cede505ad8cf849fe81eb514cf/ FWIW three or four of the failures here I think are since integration of the MSForms work, i.e. tdf99236-1.docx and tdf99002-2.docx on import and tdf100679-1.docx on reexport to docx ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: include/svtools include/svx include/toolkit sd/source
include/svtools/ctrlbox.hxx |2 +- include/svtools/imageresourceaccess.hxx |2 +- include/svtools/valueset.hxx |2 +- include/svtools/wizdlg.hxx |2 +- include/svx/AccessibleShape.hxx |4 ++-- include/svx/optgenrl.hxx |2 +- include/svx/sdr/contact/viewcontactofe3dscene.hxx|2 +- include/svx/sdr/contact/viewcontactofsdrmediaobj.hxx |2 +- include/svx/sdrobjectuser.hxx|4 ++-- include/toolkit/helper/accessiblefactory.hxx |2 +- sd/source/ui/inc/AccessiblePageShape.hxx |2 +- 11 files changed, 13 insertions(+), 13 deletions(-) New commits: commit c7ed73e52f01fd71eaf85ecc1faddfb9cf700d3a Author: Andrea Gelmini AuthorDate: Fri Jul 19 13:46:28 2019 + Commit: Andrea Gelmini CommitDate: Fri Jul 19 17:36:13 2019 +0200 Fix typos Change-Id: Ia7486fe6c110a4a7f53f1dac82dbff3a15405fd7 Reviewed-on: https://gerrit.libreoffice.org/75947 Tested-by: Jenkins Reviewed-by: Andrea Gelmini diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index b11dc4cbff60..4263ff807978 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -180,7 +180,7 @@ percentage values. This, eg., can be useful for template dialogs. This mode can only be enabled, but not disabled again. For DontKnow the FontSizeBox should be filled FontMetric(), so it will -contain an list with the standard sizes. Th currently shown size +contain a list with the standard sizes. Th currently shown size probably needs to be reset by the application. See also diff --git a/include/svtools/imageresourceaccess.hxx b/include/svtools/imageresourceaccess.hxx index 782091cf2cc3..65806566936d 100644 --- a/include/svtools/imageresourceaccess.hxx +++ b/include/svtools/imageresourceaccess.hxx @@ -55,7 +55,7 @@ SVT_DLLPUBLIC SvStream* getImageStream( OUString const & rImageResourceURL); /** for a given URL of an image within a resource, this method retrieves -an css::io::XInputStream for this image. +a css::io::XInputStream for this image. */ SVT_DLLPUBLIC css::uno::Reference getImageXStream( css::uno::Reference const & rxContext, diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 5ebc98267b72..ec8daf986478 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -137,7 +137,7 @@ an item could be calculated (for this the free space defined by SetExtraSpacing() will not be included). The background color could be specified by SetColor(), with which the image -or UserDraw items will be underlayed. If no color is specified the color +or UserDraw items will be underlaid. If no color is specified the color of other windows (WindowColor) will be used for the background. -- diff --git a/include/svtools/wizdlg.hxx b/include/svtools/wizdlg.hxx index dac116d371ea..d31869acb047 100644 --- a/include/svtools/wizdlg.hxx +++ b/include/svtools/wizdlg.hxx @@ -87,7 +87,7 @@ handler can be set as a Link. GetCurLevel() returns the current level and Level 0 is the first page. The DeactivatePage()-Handler is called if a new TabPage should be shown. -In that handler has a optional error check and returns sal_False, if the +In that handler has an optional error check and returns sal_False, if the switch should not be done. Also the Handler can be set as a Link. The default implementation calls the Link and returns the Links value or returns sal_True if no Link is set. diff --git a/include/svx/AccessibleShape.hxx b/include/svx/AccessibleShape.hxx index 9a2f206dfb8a..7d182e58b4c8 100644 --- a/include/svx/AccessibleShape.hxx +++ b/include/svx/AccessibleShape.hxx @@ -76,7 +76,7 @@ class IAccessibleParent; The children of a shape can stem from two sources which, in case of SVX and SD shapes, are mutually exclusive. This implementation, -however, handles both simultaniously to cope with future extensions or +however, handles both simultaneously to cope with future extensions or shapes from other projects. If this shape is a group shape, i.e. a @@ -112,7 +112,7 @@ public: and the accessible object that will become the parent of the new object. @param rShapeTreeInfo -Bundel of information passed to this shape and all of its desendants. +Bundle of information passed to this shape and all of its descendants. @attention Always call the init method after creating a new accessible shape. This is one way to overcome the potential diff --git a/include/svx/optgenrl.hxx b/include/svx/optgenrl.hxx index 102cd18ef334..2ee463d9d8d2 100644 --- a/include/svx/optgenrl.hxx +++ b/include/svx/optgenrl.hx
[Libreoffice-commits] core.git: include/sfx2 include/svx include/typelib include/unotools include/vcl include/xmloff
include/sfx2/sidebar/Context.hxx |2 +- include/svx/SpellDialogChildWindow.hxx |2 +- include/svx/dbaexchange.hxx |4 ++-- include/typelib/typedescription.h|2 +- include/unotools/accessiblerelationsethelper.hxx |2 +- include/unotools/textsearch.hxx |2 +- include/vcl/EnumContext.hxx |2 +- include/vcl/dockwin.hxx |2 +- include/xmloff/xmlnumfe.hxx |2 +- include/xmloff/xmlstyle.hxx |2 +- 10 files changed, 11 insertions(+), 11 deletions(-) New commits: commit 07fb0664fa81040cdb110d7d8848b937f1facc33 Author: Andrea Gelmini AuthorDate: Fri Jul 19 09:58:06 2019 + Commit: Andrea Gelmini CommitDate: Fri Jul 19 17:35:39 2019 +0200 Fix typos Change-Id: I8222cf7aae977f0e26645dea6e4cfaee94446a2c Reviewed-on: https://gerrit.libreoffice.org/75946 Tested-by: Jenkins Reviewed-by: Andrea Gelmini diff --git a/include/sfx2/sidebar/Context.hxx b/include/sfx2/sidebar/Context.hxx index 05cdf84e938e..001a70e26b90 100644 --- a/include/sfx2/sidebar/Context.hxx +++ b/include/sfx2/sidebar/Context.hxx @@ -37,7 +37,7 @@ public: /** When two contexts are matched against each other, then application or context name may have the wildcard value 'any'. In order to prefer matches without wildcards over matches with -wildcards we introduce a integer evaluation for matches. +wildcards we introduce an integer evaluation for matches. */ const static sal_Int32 NoMatch; const static sal_Int32 OptimalMatch; diff --git a/include/svx/SpellDialogChildWindow.hxx b/include/svx/SpellDialogChildWindow.hxx index 1f66a828ea07..4b6df6e997c8 100644 --- a/include/svx/SpellDialogChildWindow.hxx +++ b/include/svx/SpellDialogChildWindow.hxx @@ -67,7 +67,7 @@ protected: can rely on the fact that the methods ApplyChangedSentence() is called for the position that the last GetNextWrongSentence() returned. If 'bRecheck' is set to true then the same sentence should be rechecked once from - the start. This should be used too find errors that the user has introduced by + the start. This should be used to find errors that the user has introduced by manual changes in the edit field, and in order to not miss the still following errors in that sentence. */ diff --git a/include/svx/dbaexchange.hxx b/include/svx/dbaexchange.hxx index bd084661b2d7..d831dc4e2ed0 100644 --- a/include/svx/dbaexchange.hxx +++ b/include/svx/dbaexchange.hxx @@ -202,7 +202,7 @@ namespace svx */ static bool canExtractObjectDescriptor(const DataFlavorExVector& _rFlavors); -/** extracts a object descriptor from the transferable given +/** extracts an object descriptor from the transferable given */ static ODataAccessDescriptor extractObjectDescriptor(const TransferableDataHelper& _rData); @@ -251,7 +251,7 @@ namespace svx */ static bool canExtractDescriptor(const DataFlavorExVector& _rFlavors); -/** extracts a object descriptor from the transferable given +/** extracts an object descriptor from the transferable given */ static css::uno::Sequence< css::beans::PropertyValue > extractDescriptor(const TransferableDataHelper& _rData); diff --git a/include/typelib/typedescription.h b/include/typelib/typedescription.h index 51b13af29d57..d3e18b8fee42 100644 --- a/include/typelib/typedescription.h +++ b/include/typelib/typedescription.h @@ -404,7 +404,7 @@ typedef struct SAL_DLLPUBLIC_RTTI _typelib_InterfaceTypeDescription /** number of members plus number of read-write attributes */ sal_Int32 nMapFunctionIndexToMemberIndex; -/** array mapping function index to member index; size of arry is nMapFunctionIndexToMemberIndex +/** array mapping function index to member index; size of array is nMapFunctionIndexToMemberIndex */ sal_Int32 * pMapFunctionIndexToMemberIndex; /** number of base types diff --git a/include/unotools/accessiblerelationsethelper.hxx b/include/unotools/accessiblerelationsethelper.hxx index ea2fc9e8bef6..05d169230adc 100644 --- a/include/unotools/accessiblerelationsethelper.hxx +++ b/include/unotools/accessiblerelationsethelper.hxx @@ -114,7 +114,7 @@ public: virtual css::uno::Sequence< css::uno::Type> SAL_CALL getTypes() override; -/** Returns a implementation id. +/** Returns an implementation id. */ virtual css::uno::Sequence SAL_CALL getImplementationId() override; diff --git a/include/unotools/textsearch.hxx b/include/unotools/textsearch.hxx index 396ecf294b38..14a9558f237e 100644 --- a/include/unotools/textsearch.hxx +++ b/include/unotools/textsearch.hx
[Libreoffice-commits] online.git: 3 commits - android/lib
android/lib/src/main/cpp/androidapp.cpp | 57 ++--- android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java | 58 -- android/lib/src/main/res/values/strings.xml |4 3 files changed, 89 insertions(+), 30 deletions(-) New commits: commit 2f7fac7547d1895fc317003d04017c468f4af179 Author: Jan Holesovsky AuthorDate: Fri Jul 19 17:38:31 2019 +0200 Commit: Jan Holesovsky CommitDate: Fri Jul 19 17:59:06 2019 +0200 android: Fix the LOActivity lifecycle in several ways. First of all, we shouldn't destroy the document in onStop(), instead do that in onDestroy(). onStop() should only (auto-)save the document, but otherwise keep it open, so that when we return from the file picker Activity, the caret is at the same position as it was before. In addition to that, we should close any open document before we try to open the new one (in createLOOLWSD). And finally, when closing the document, we should wait until after the LOOLWSD is completely torn down, so that we avoid the risk that the user tries to load another document too quickly, and the messages from the JS go into the old, still running LOOLWSD. Change-Id: Ib775021bccc5d5bc69aae392a88dc62a7c05a8fa diff --git a/android/lib/src/main/cpp/androidapp.cpp b/android/lib/src/main/cpp/androidapp.cpp index 32610fbf5..f15ebc6a6 100644 --- a/android/lib/src/main/cpp/androidapp.cpp +++ b/android/lib/src/main/cpp/androidapp.cpp @@ -31,9 +31,10 @@ int loolwsd_server_socket_fd = -1; static std::string fileURL; static int fakeClientFd; -static int closeNotificationPipeForForwardingThread[2]; +static int closeNotificationPipeForForwardingThread[2] = {-1, -1}; static JavaVM* javaVM = nullptr; static bool lokInitialized = false; +static std::mutex loolwsdRunningMutex; extern "C" JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) { @@ -142,6 +143,18 @@ static void send2JS(jclass loActivityClz, jobject loActivityObj, const std::vect javaVM->DetachCurrentThread(); } +/// Close the document. +void closeDocument() +{ +// Close one end of the socket pair, that will wake up the forwarding thread that was contstructed in HULLO +if (fakeSocketClose(closeNotificationPipeForForwardingThread[0]) == 0) +{ +LOG_DBG("Waiting for LOOLWSD to finish..."); +std::unique_lock lock(loolwsdRunningMutex); +LOG_DBG("LOOLWSD has finished."); +} +} + /// Handle a message from JavaScript. extern "C" JNIEXPORT void JNICALL Java_org_libreoffice_androidlib_LOActivity_postMobileMessageNative(JNIEnv *env, jobject instance, jstring message) @@ -239,8 +252,7 @@ Java_org_libreoffice_androidlib_LOActivity_postMobileMessageNative(JNIEnv *env, { LOG_DBG("Document window terminating on JavaScript side. Closing our end of the socket."); -// Close one end of the socket pair, that will wake up the forwarding thread above -fakeSocketClose(closeNotificationPipeForForwardingThread[0]); +closeDocument(); } else { @@ -270,7 +282,11 @@ Java_org_libreoffice_androidlib_LOActivity_createLOOLWSD(JNIEnv *env, jobject, j // already initialized? if (lokInitialized) +{ +// close the previous document so that we can wait for the new HULLO +closeDocument(); return; +} lokInitialized = true; libreofficekit_initialize(env, dataDir, cacheDir, apkFile, assetManager); @@ -292,6 +308,7 @@ Java_org_libreoffice_androidlib_LOActivity_createLOOLWSD(JNIEnv *env, jobject, j { LOG_DBG("Creating LOOLWSD"); { +std::unique_lock lock(loolwsdRunningMutex); fakeClientFd = fakeSocketSocket(); LOG_DBG("createLOOLWSD created fakeClientFd: " << fakeClientFd); std::unique_ptr loolwsd(new LOOLWSD()); diff --git a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java index c6cebd5e3..7bd40af27 100644 --- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java +++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java @@ -396,7 +396,16 @@ public class LOActivity extends AppCompatActivity { @Override protected void onPause() { super.onPause(); -Log.d(TAG, "onPause() - unload the document"); +Log.d(TAG, "onPause() - hinting to save, we might need to return to the doc"); + +// A Save similar to an autosave +postMobileMessageNative("save dontTerminateEdit=true dontSaveIfUnmodified=true"); +} + +@Override +protected void onDestroy() { +super.onDestroy(); +Log.i(TAG, "onDestroy() - we know we are leaving the docu
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/FmtFilter.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit 9b122d23e3e983bd8ea96460cc7910b19b7f7d5c Author: Andrea Gelmini AuthorDate: Tue May 14 21:25:41 2019 + Commit: Michael Meeks CommitDate: Fri Jul 19 18:15:41 2019 +0200 Fix typo Change-Id: Ifdb5ca9a9f7b6ee2c1549675da28af35c695e354 Reviewed-on: https://gerrit.libreoffice.org/72574 Tested-by: Jenkins Reviewed-by: Michael Meeks diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index 0b60cb51c109..007d04ac08c5 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -48,7 +48,7 @@ struct METAFILEHEADER }; #pragma pack() -// convert a windows metafile picture to a openoffice metafile picture +// convert a windows metafile picture to a LibreOffice metafile picture Sequence< sal_Int8 > WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFilePict ) { @@ -118,7 +118,7 @@ Sequence< sal_Int8 > WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFilePict ) return mfpictStream; } -// convert a windows enhanced metafile to a openoffice metafile +// convert a windows enhanced metafile to a LibreOffice metafile Sequence< sal_Int8 > WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile ) { @@ -137,7 +137,7 @@ Sequence< sal_Int8 > WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile ) return aRet; } -// convert a openoffice metafile picture to a windows metafile picture +// convert a LibreOffice metafile picture to a windows metafile picture HMETAFILEPICT OOMFPictToWinMFPict( Sequence< sal_Int8 > const & aOOMetaFilePict ) { @@ -159,7 +159,7 @@ HMETAFILEPICT OOMFPictToWinMFPict( Sequence< sal_Int8 > const & aOOMetaFilePict return hPict; } -// convert a openoffice metafile picture to a windows enhanced metafile picture +// convert a LibreOffice metafile picture to a windows enhanced metafile picture HENHMETAFILE OOMFPictToWinENHMFPict( Sequence< sal_Int8 > const & aOOMetaFilePict ) { @@ -168,7 +168,7 @@ HENHMETAFILE OOMFPictToWinENHMFPict( Sequence< sal_Int8 > const & aOOMetaFilePic return hEnhMtf; } -// convert a windows device independent bitmap into a openoffice bitmap +// convert a windows device independent bitmap into a LibreOffice bitmap Sequence< sal_Int8 > WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB ) { @@ -201,7 +201,7 @@ Sequence< sal_Int8 > WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB ) return ooBmpStream; } -// convert a openoffice bitmap into a windows device independent bitmap +// convert a LibreOffice bitmap into a windows device independent bitmap Sequence< sal_Int8 > OOBmpToWinDIB( Sequence< sal_Int8 >& aOOBmp ) { @@ -387,7 +387,7 @@ css::uno::Sequence CF_HDROPToFileList(HGLOBAL hGlobal) return FileListToByteSequence(files); } -// convert a windows bitmap handle into a openoffice bitmap +// convert a windows bitmap handle into a LibreOffice bitmap Sequence< sal_Int8 > WinBITMAPToOOBMP( HBITMAP aHBMP ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - filter/source forms/source fpicker/source
filter/source/config/cache/filtercache.cxx |3 - filter/source/flash/swfexporter.cxx |9 +-- filter/source/flash/swffilter.cxx |2 filter/source/graphicfilter/icgm/actimpr.cxx|4 - filter/source/msfilter/eschesdo.cxx |6 +- filter/source/msfilter/msocximex.cxx|4 - filter/source/msfilter/mstoolbar.cxx|2 filter/source/storagefilterdetect/filterdetect.cxx |2 filter/source/svg/svgexport.cxx |6 +- filter/source/svg/svgfilter.cxx |6 +- filter/source/xsltfilter/OleHandler.cxx |2 filter/source/xsltfilter/XSLTFilter.cxx | 23 +++-- forms/source/component/ComboBox.cxx |9 +-- forms/source/component/FormComponent.cxx|4 - forms/source/component/RadioButton.cxx |6 -- forms/source/helper/commandimageprovider.cxx|2 forms/source/helper/controlfeatureinterception.cxx |5 -- forms/source/runtime/formoperations.cxx | 28 forms/source/xforms/binding.cxx |8 +-- forms/source/xforms/model.cxx |2 forms/source/xforms/model_ui.cxx|8 +-- forms/source/xforms/submission.cxx |2 forms/source/xforms/submission/serialization_app_xml.cxx|2 forms/source/xforms/submission/serialization_urlencoded.cxx |2 fpicker/source/office/RemoteFilesDialog.cxx | 15 ++ fpicker/source/office/commonpicker.cxx | 14 ++ 26 files changed, 72 insertions(+), 104 deletions(-) New commits: commit 6595240f39c34fa9ae5cd1bb319f6287206e4b92 Author: Noel Grandin AuthorDate: Fri Jul 19 15:32:58 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 18:29:34 2019 +0200 loplugin:referencecasting in forms..fpicker Change-Id: I0aa040b6d3264d2efde5797f79994d3d65ceaddf Reviewed-on: https://gerrit.libreoffice.org/75957 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 06f5f4234c0d..03d46288a6bf 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -474,10 +474,9 @@ void OComboBoxModel::loadData( bool _bForce ) return; // Get Connection -Reference xForm(m_xCursor, UNO_QUERY); -if (!xForm.is()) +if (!m_xCursor.is()) return; -Reference xConnection = getConnection(xForm); +Reference xConnection = getConnection(m_xCursor); if (!xConnection.is()) return; @@ -518,7 +517,7 @@ void OComboBoxModel::loadData( bool _bForce ) else { // otherwise look for the alias -Reference xFormProp(xForm,UNO_QUERY); +Reference xFormProp(m_xCursor,UNO_QUERY); Reference< XColumnsSupplier > xSupplyFields; xFormProp->getPropertyValue("SingleSelectQueryComposer") >>= xSupplyFields; @@ -627,7 +626,7 @@ void OComboBoxModel::loadData( bool _bForce ) if ( !xDataField.is() ) return; -::dbtools::FormattedColumnValue aValueFormatter( getContext(), xForm, xDataField ); +::dbtools::FormattedColumnValue aValueFormatter( getContext(), m_xCursor, xDataField ); // Fill Lists sal_Int16 i = 0; diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 6d46f3a9825e..eb4cbf3f9598 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -259,7 +259,7 @@ void OControl::impl_resetStateGuard_nothrow() try { xWindow.set( getPeer(), UNO_QUERY ); -xModel.set( getModel(), UNO_QUERY ); +xModel = getModel(); } catch( const Exception& ) { @@ -1920,7 +1920,7 @@ void OBoundControlModel::connectToField(const Reference& rForm) DBG_ASSERT(xColumnsSupplier.is(), "OBoundControlModel::connectToField : the row set should support the css::sdb::ResultSet service !"); if (xColumnsSupplier.is()) { -Reference xColumns(xColumnsSupplier->getColumns(), UNO_QUERY); +Reference xColumns = xColumnsSupplier->getColumns(); if (xColumns.is() && xColumns->hasByName(m_aControlSource)) { OSL_VERIFY( xColumns->getByName(m_aControlSource) >>= xFieldCandidate ); diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx index 0fac875bb2a
[Libreoffice-commits] core.git: 2 commits - extensions/source scripting/java
extensions/source/abpilot/datasourcehandling.cxx |4 - extensions/source/bibliography/datman.cxx |2 extensions/source/bibliography/general.cxx |3 - extensions/source/dbpilots/commonpagesdbp.cxx |4 - extensions/source/dbpilots/controlwizard.cxx |2 extensions/source/dbpilots/optiongrouplayouter.cxx |2 extensions/source/propctrlr/formlinkdialog.cxx | 28 -- extensions/source/propctrlr/propcontroller.cxx | 10 +-- extensions/source/propctrlr/xsddatatypes.cxx |4 - extensions/source/propctrlr/xsdvalidationhelper.cxx |6 +- scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java |9 +++ scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java |2 12 files changed, 39 insertions(+), 37 deletions(-) New commits: commit 1223bede826d9b237a6015bfcfb8df08913a02e8 Author: Andreas Heinisch AuthorDate: Thu Jul 18 17:07:58 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 18:30:06 2019 +0200 tdf#123587 Beanshell editor: Show current file name as window title Change-Id: I7a817d19cfadc46b1f35a4e42e5a6177c1910a4b Reviewed-on: https://gerrit.libreoffice.org/75869 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java index 6341b51d4e4a..de51b1247af5 100644 --- a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java +++ b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java @@ -102,6 +102,15 @@ public class ScriptMetaData extends ScriptEntry { private static final String UNO_SHARED_PACKAGES2 = SHARE + "/uno_packages"; +public static String getFileName(URL url) { +String fileName = url.toExternalForm(); +if (fileName.lastIndexOf(UCBStreamHandler.separator) != -1) { +fileName = fileName.substring(0, fileName.lastIndexOf(UCBStreamHandler.separator)); +fileName = fileName.substring(fileName.lastIndexOf("/") + 1); +} +return fileName; +} + public static String getLocationPlaceHolder(String url, String pkgname) { String result = "Unknown"; diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java index 279e75fb3584..9ba128b42669 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java @@ -228,7 +228,7 @@ public class ScriptEditorForBeanShell implements ScriptEditor, ActionListener { this.context = context; this.scriptURL = url; this.model = new ScriptSourceModel(url); -this.filename = url.getFile(); +this.filename = ScriptMetaData.getFileName(url); this.cl = cl; try { commit 8c26800ff823525df46d2bdc42af52ab75285cda Author: Noel Grandin AuthorDate: Fri Jul 19 15:31:54 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 18:29:48 2019 +0200 loplugin:referencecasting in extensions Change-Id: Ib03be019b2fedc67b3114c107162722eabce0218 Reviewed-on: https://gerrit.libreoffice.org/75955 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index 8371d97b61b0..fdcf218f4826 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -521,9 +521,7 @@ namespace abp Reference< XInteractionHandler > xInteractions; try { -xInteractions.set( -InteractionHandler::createWithParent(m_pImpl->xORB, nullptr), -UNO_QUERY); +xInteractions = InteractionHandler::createWithParent(m_pImpl->xORB, nullptr); } catch(const Exception&) { diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 0345049a9238..aaaff07f1b6e 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -901,7 +901,7 @@ void BibDataManager::setActiveDataSource(const OUString& rURL)
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/ui/dbui/mmresultdialogs.cxx |5 + 1 file changed, 1 insertion(+), 4 deletions(-) New commits: commit 0f0adc34889ff68da584cea97a9de649174b0333 Author: Michael Weghorn AuthorDate: Fri Jul 19 08:16:54 2019 +0200 Commit: Michael Weghorn CommitDate: Fri Jul 19 19:08:43 2019 +0200 tdf#126471 Apply selected MM printer on dialog open Calling 'PrinterChangeHdl_Impl' in 'SwMMResultPrintDialog::FillInPrinterSettings' makes sure that a preselected printer is actually taken into account (i.e. 'm_pTempPrinter' set accordingly etc.) as soon as the dialog is created, not only when explicitly selecting another printer. Since 'PrinterChangeHdl_Impl' is now called initially and every time another printer is selected, there's no more need to do so in 'PrinterSetupHdl_Impl' any more. This fixes the issue that printout would always happen on default printer instead of the preselected one when SwMMResultPrintDialog was opened a second time. Change-Id: I5c930ed56d1025a7e94cc98fb70c01612bda0d22 Reviewed-on: https://gerrit.libreoffice.org/75933 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 741cd9baab49..8a4201d904c8 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -342,6 +342,7 @@ void SwMMResultPrintDialog::FillInPrinterSettings() { m_xPrinterLB->set_active_text(xConfigItem->GetSelectedPrinter()); } +PrinterChangeHdl_Impl(*m_xPrinterLB); sal_Int32 count = xConfigItem->GetMergedDocumentCount(); m_xToNF->set_value(count); @@ -782,8 +783,6 @@ IMPL_LINK_NOARG(SwMMResultPrintDialog, PrintHdl_Impl, weld::Button&, void) IMPL_LINK_NOARG(SwMMResultPrintDialog, PrinterSetupHdl_Impl, weld::Button&, void) { -if (!m_pTempPrinter) -PrinterChangeHdl_Impl(*m_xPrinterLB); if (m_pTempPrinter) m_pTempPrinter->Setup(m_xDialog.get()); } commit 3bc1f99d3a792cdba037bcc757e8611d7e187b73 Author: Michael Weghorn AuthorDate: Fri Jul 19 08:27:57 2019 +0200 Commit: Michael Weghorn CommitDate: Fri Jul 19 19:08:33 2019 +0200 Mail merge: Preselect proper printer The proper printer has already been set a few lines above depending on the value of 'bMergePrinterExists', so it shouldn't be unconditionally overwritten here with a potentially invalid printer (using the same statement as already used 7 lines above for the 'else' case). This e.g. makes sure that the default printer is selected when no printer has been set, e.g. just after running Mail Merge Wizard on a new Writer doc, in which case no printer was selected previously. Change-Id: I922b8234be9c80536b6b0a9ba0dd19bdc39246e8 Reviewed-on: https://gerrit.libreoffice.org/75932 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 21c9588d71d8..741cd9baab49 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -346,8 +346,6 @@ void SwMMResultPrintDialog::FillInPrinterSettings() sal_Int32 count = xConfigItem->GetMergedDocumentCount(); m_xToNF->set_value(count); m_xToNF->set_max(count); - -m_xPrinterLB->set_active_text(xConfigItem->GetSelectedPrinter()); } void SwMMResultEmailDialog::FillInEmailSettings() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/item_refactor2' - chart2/Library_chartcontroller.mk chart2/Library_chartcore.mk chart2/source cui/source editeng/CppunitTest_editeng_core.mk editeng/Lib
chart2/Library_chartcontroller.mk |1 chart2/Library_chartcore.mk|1 chart2/source/controller/dialogs/res_DataLabel.cxx | 15 + chart2/source/controller/dialogs/tp_AxisLabel.cxx | 15 + chart2/source/controller/dialogs/tp_LegendPosition.cxx | 17 + chart2/source/controller/dialogs/tp_TitleRotation.cxx | 15 + chart2/source/view/main/ChartView.cxx | 17 + cui/source/tabpages/align.cxx | 68 +-- cui/source/tabpages/page.cxx | 31 ++- cui/source/tabpages/paragrph.cxx | 50 +++-- editeng/CppunitTest_editeng_core.mk|1 editeng/Library_editeng.mk |1 editeng/source/items/frmitems.cxx | 148 +++-- include/editeng/frmdiritem.hxx | 27 +++ include/item/base/ItemSet.hxx | 12 + include/item/simple/CntEnum.hxx| 103 +++ include/item/simple/CntInt16.hxx |2 include/svl/itempool.hxx |5 item/Library_item.mk |1 item/source/base/ItemBase.cxx | 81 + item/source/simple/CntEnum.cxx | 78 solenv/clang-format/blacklist |2 svl/source/items/itempool.cxx | 17 + 23 files changed, 619 insertions(+), 89 deletions(-) New commits: commit c3ddc678ae5e9d5624d2c45aeb98bd17f64c6ddb Author: Armin Le Grand AuthorDate: Tue Jun 25 18:53:20 2019 +0200 Commit: Armin Le Grand CommitDate: Fri Jul 19 20:40:32 2019 +0200 WIP: SvxFrameDirectionItem->Item::FrameDirection Start of op Now done initial Item, chart2 and cui Change-Id: I9125ec609e6a93808bc0c2877fa965c2dffa4820 diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk index 02c8bcb75774..142ee73b8a73 100644 --- a/chart2/Library_chartcontroller.mk +++ b/chart2/Library_chartcontroller.mk @@ -44,6 +44,7 @@ $(eval $(call gb_Library_use_libraries,chartcontroller,\ ucbhelper \ utl \ vcl \ +item \ )) $(eval $(call gb_Library_set_componentfile,chartcontroller,chart2/source/controller/chartcontroller)) diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk index 4f98fc121251..e1a01bd8dd06 100644 --- a/chart2/Library_chartcore.mk +++ b/chart2/Library_chartcore.mk @@ -60,6 +60,7 @@ $(eval $(call gb_Library_use_libraries,chartcore,\ ucbhelper \ utl \ vcl \ +item \ )) $(eval $(call gb_Library_set_componentfile,chartcore,chart2/source/chartcore)) diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 2889bdb74f13..45caab6d94cc 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -291,7 +291,11 @@ void DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const } if (m_xLB_TextDirection->get_active() != -1) -rOutAttrs->Put( SvxFrameDirectionItem( m_xLB_TextDirection->get_active_id(), EE_PARA_WRITINGDIR ) ); +{ +// I2TM + rOutAttrs->itemSet().setItem(Item::FrameDirection(m_xLB_TextDirection->get_active_id())); +// rOutAttrs->Put( SvxFrameDirectionItem( m_xLB_TextDirection->get_active_id(), EE_PARA_WRITINGDIR ) ); +} if( m_aDC_Dial.IsVisible() ) { @@ -339,8 +343,13 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs) else m_xLB_LabelPlacement->set_active(-1); -if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET ) -m_xLB_TextDirection->set_active_id( static_cast(pPoolItem)->GetValue() ); +// I2TM +if(const auto Item(rInAttrs.itemSet().getStateAndItem()); Item.isSet()) +{ +m_xLB_TextDirection->set_active_id(Item.getItem().getValue()); +} +// if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET ) +// m_xLB_TextDirection->set_active_id( static_cast(pPoolItem)->GetValue() ); if( rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, true, &pPoolItem ) == SfxItemState::SET ) { diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index 36062526cdd4..ba999de9e63f 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -129,7 +129,11 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs ) rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, m_xCbShowDescription->get_active() ) ); if (m_xLbTextDirection->get_active() != -1) -rOutAttrs->Put( SvxFrameDirectionItem( m_xLbTextDirection->get_active_id(),
[Libreoffice-commits] core.git: embeddedobj/source
embeddedobj/source/commonembedding/embedobj.cxx| 31 ++--- embeddedobj/source/commonembedding/miscobj.cxx | 14 + embeddedobj/source/commonembedding/persistence.cxx | 50 +++-- embeddedobj/source/commonembedding/xfactory.cxx|5 -- embeddedobj/source/general/docholder.cxx | 36 +-- embeddedobj/source/general/xcreator.cxx|5 -- embeddedobj/source/msole/oleembed.cxx | 15 ++ embeddedobj/source/msole/olemisc.cxx | 10 +--- 8 files changed, 56 insertions(+), 110 deletions(-) New commits: commit 5043421fdc527d18d18121ec5fe2d4e009c8191a Author: Noel Grandin AuthorDate: Fri Jul 19 14:05:10 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 21:49:20 2019 +0200 loplugin:referencecasting in embeddedobj Change-Id: I11a80e540b2a7da8d8037ba45e176d5c4d85374c Reviewed-on: https://gerrit.libreoffice.org/75951 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index 8c888df48a9e..a34020d354e1 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -174,32 +174,13 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } else { -uno::Reference < embed::XEmbedPersist > xPersist( static_cast < embed::XClassifiedObject* > (this), uno::UNO_QUERY ); -if ( xPersist.is() ) -{ -// in case embedded object is in loaded state the contents must -// be stored in the related storage and the storage -// must be created already -if ( !m_xObjectStorage.is() ) -throw io::IOException(); //TODO: access denied +// in case embedded object is in loaded state the contents must +// be stored in the related storage and the storage +// must be created already +if ( !m_xObjectStorage.is() ) + throw io::IOException(); //TODO: access denied -m_xDocHolder->SetComponent( LoadDocumentFromStorage_Impl(), m_bReadOnly ); -} -else -{ -// objects without persistence will be initialized internally -uno::Sequence < uno::Any > aArgs(1); -aArgs[0] <<= uno::Reference < embed::XEmbeddedObject >( this ); -uno::Reference< util::XCloseable > xDocument( - m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( GetDocumentServiceName(), aArgs, m_xContext), -uno::UNO_QUERY ); - -uno::Reference < container::XChild > xChild( xDocument, uno::UNO_QUERY ); -if ( xChild.is() ) -xChild->setParent( m_xParent ); - -m_xDocHolder->SetComponent( xDocument, m_bReadOnly ); -} +m_xDocHolder->SetComponent( LoadDocumentFromStorage_Impl(), m_bReadOnly ); } if ( !m_xDocHolder->GetComponent().is() ) diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index 48da9abdeaf7..557e21e2646a 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -439,7 +439,7 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent( static_cast< ::cppu::OWeakObject* >(this) ); } -return uno::Reference< util::XCloseable >( m_xDocHolder->GetComponent(), uno::UNO_QUERY ); +return m_xDocHolder->GetComponent(); } @@ -550,15 +550,9 @@ void SAL_CALL OCommonEmbeddedObject::close( sal_Bool bDeliverOwnership ) // will use the storage, the storage will be disposed by the document and recreated by the object if ( m_xObjectStorage.is() ) { -uno::Reference< lang::XComponent > xComp( m_xObjectStorage, uno::UNO_QUERY ); -OSL_ENSURE( xComp.is(), "Storage does not support XComponent!" ); - -if ( xComp.is() ) -{ -try { -xComp->dispose(); -} catch ( const uno::Exception& ) {} -} +try { +m_xObjectStorage->dispose(); +} catch ( const uno::Exception& ) {} m_xObjectStorage.clear(); m_xRecoveryStorage.clear(); diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index cba1be7c4d19..b4a4de81f3c5 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -149,10 +149,8 @@ static uno::Refer
[Libreoffice-commits] core.git: framework/Library_fwk.mk framework/source
framework/Library_fwk.mk|2 framework/source/uiconfiguration/ImageArrayData.cxx | 91 --- framework/source/uiconfiguration/ImageList.cxx | 157 ++-- framework/source/uiconfiguration/ImageList.hxx | 27 ++- framework/source/uiconfiguration/ImplImageList.cxx | 71 - framework/source/uiconfiguration/image.h| 67 6 files changed, 101 insertions(+), 314 deletions(-) New commits: commit 825e3f66497c673dd7ac11a8fce830874288977d Author: Noel Grandin AuthorDate: Fri Jul 19 16:31:37 2019 +0200 Commit: Noel Grandin CommitDate: Fri Jul 19 21:49:35 2019 +0200 simplify ImageList we don't need an Impl pattern here Change-Id: I93d0c5904a3aee8844987c7e36c19319d071d2f4 Reviewed-on: https://gerrit.libreoffice.org/75960 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk index 3957a5ace0ff..7a433735ce43 100644 --- a/framework/Library_fwk.mk +++ b/framework/Library_fwk.mk @@ -112,9 +112,7 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/services/taskcreatorsrv \ framework/source/services/urltransformer \ framework/source/uiconfiguration/CommandImageResolver \ -framework/source/uiconfiguration/ImageArrayData \ framework/source/uiconfiguration/ImageList \ -framework/source/uiconfiguration/ImplImageList \ framework/source/uiconfiguration/globalsettings \ framework/source/uiconfiguration/graphicnameaccess \ framework/source/uiconfiguration/imagemanager \ diff --git a/framework/source/uiconfiguration/ImageArrayData.cxx b/framework/source/uiconfiguration/ImageArrayData.cxx deleted file mode 100644 index 570d2846ff77.. --- a/framework/source/uiconfiguration/ImageArrayData.cxx +++ /dev/null @@ -1,91 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "image.h" -#include -#include - -#if OSL_DEBUG_LEVEL > 0 -#include -#endif - -ImageAryData::ImageAryData( const ImageAryData& rData ) : -maName( rData.maName ), -mnId( rData.mnId ), -maBitmapEx( rData.maBitmapEx ) -{ -} - -ImageAryData::ImageAryData( const OUString &aName, -sal_uInt16 nId, const BitmapEx &aBitmap ) -: maName( aName ), mnId( nId ), maBitmapEx( aBitmap ) -{ -} - -ImageAryData::~ImageAryData() -{ -} - -ImageAryData& ImageAryData::operator=( const ImageAryData& rData ) -{ -maName = rData.maName; -mnId = rData.mnId; -maBitmapEx = rData.maBitmapEx; - -return *this; -} - -void ImageAryData::Load(const OUString &rPrefix) -{ -OUString aIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme(); - -OUString aFileName = rPrefix; -aFileName += maName; - -bool bSuccess = ImageTree::get().loadImage(aFileName, aIconTheme, maBitmapEx, true); - -/* If the uno command has parameters, passed in from a toolbar, - * recover from failure by removing the parameters from the file name - */ -if (!bSuccess && aFileName.indexOf("%3f") > 0) -{ -sal_Int32 nStart = aFileName.indexOf("%3f"); -sal_Int32 nEnd = aFileName.lastIndexOf("."); - -aFileName = aFileName.replaceAt(nStart, nEnd - nStart, ""); -bSuccess = ImageTree::get().loadImage(aFileName, aIconTheme, maBitmapEx, true); -} - -SAL_WARN_IF(!bSuccess, "fwk.uiconfiguration", "Failed to load image '" << aFileName - << "' from icon theme '" << aIconTheme << "'"); -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/framework/source/uiconfiguration/ImageList.cxx b/framework/source/uiconfiguration/ImageList.cxx index 0bb10d3d2bdb..100e152b17fc 100644 --- a/framework/source/uiconfiguration/ImageList.cxx +++ b/framework/source/uiconfiguration/ImageList.cxx @@ -29,7 +29,6 @@ #include #include #include -#include "image.h" #include "ImageList.hxx" ImageList::ImageList() @@ -41,48 +40,40
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - sw/source
sw/source/ui/dbui/mmresultdialogs.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 199f06b783898b48c703fe86c58b8e8d17cd7124 Author: Michael Weghorn AuthorDate: Fri Jul 19 08:27:57 2019 +0200 Commit: Michael Weghorn CommitDate: Fri Jul 19 22:11:15 2019 +0200 Mail merge: Preselect proper printer The proper printer has already been set a few lines above depending on the value of 'bMergePrinterExists', so it shouldn't be unconditionally overwritten here with a potentially invalid printer (using the same statement as already used 7 lines above for the 'else' case). This e.g. makes sure that the default printer is selected when no printer has been set, e.g. just after running Mail Merge Wizard on a new Writer doc, in which case no printer was selected previously. Change-Id: I922b8234be9c80536b6b0a9ba0dd19bdc39246e8 Reviewed-on: https://gerrit.libreoffice.org/75932 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 3bc1f99d3a792cdba037bcc757e8611d7e187b73) Reviewed-on: https://gerrit.libreoffice.org/75969 Tested-by: Michael Weghorn diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index dba2a288d21e..eb7a75ab7a98 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -367,8 +367,6 @@ void SwMMResultPrintDialog::FillInPrinterSettings() sal_Int32 count = xConfigItem->GetMergedDocumentCount(); m_xToNF->set_value(count); m_xToNF->set_max(count); - -m_xPrinterLB->set_active_text(xConfigItem->GetSelectedPrinter()); } void SwMMResultEmailDialog::FillInEmailSettings() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - sw/source
sw/source/ui/dbui/mmresultdialogs.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit bbf354b702797f916df032aab4b64229293e1d92 Author: Michael Weghorn AuthorDate: Fri Jul 19 08:16:54 2019 +0200 Commit: Michael Weghorn CommitDate: Fri Jul 19 22:11:32 2019 +0200 tdf#126471 Apply selected MM printer on dialog open Calling 'PrinterChangeHdl_Impl' in 'SwMMResultPrintDialog::FillInPrinterSettings' makes sure that a preselected printer is actually taken into account (i.e. 'm_pTempPrinter' set accordingly etc.) as soon as the dialog is created, not only when explicitly selecting another printer. Since 'PrinterChangeHdl_Impl' is now called initially and every time another printer is selected, there's no more need to do so in 'PrinterSetupHdl_Impl' any more. This fixes the issue that printout would always happen on default printer instead of the preselected one when SwMMResultPrintDialog was opened a second time. Change-Id: I5c930ed56d1025a7e94cc98fb70c01612bda0d22 Reviewed-on: https://gerrit.libreoffice.org/75933 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 0f0adc34889ff68da584cea97a9de649174b0333) Reviewed-on: https://gerrit.libreoffice.org/75970 Tested-by: Michael Weghorn diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index eb7a75ab7a98..0c4952f68d76 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -363,6 +363,7 @@ void SwMMResultPrintDialog::FillInPrinterSettings() { m_xPrinterLB->set_active_text(xConfigItem->GetSelectedPrinter()); } +PrinterChangeHdl_Impl(*m_xPrinterLB); sal_Int32 count = xConfigItem->GetMergedDocumentCount(); m_xToNF->set_value(count); @@ -814,8 +815,6 @@ IMPL_LINK_NOARG(SwMMResultPrintDialog, PrintHdl_Impl, weld::Button&, void) IMPL_LINK_NOARG(SwMMResultPrintDialog, PrinterSetupHdl_Impl, weld::Button&, void) { -if (!m_pTempPrinter) -PrinterChangeHdl_Impl(*m_xPrinterLB); if (m_pTempPrinter) m_pTempPrinter->Setup(m_xDialog.get()); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/admin scripts/unocommands.py wsd/Admin.cpp wsd/AdminModel.cpp wsd/AdminModel.hpp wsd/LOOLWSD.cpp wsd/LOOLWSD.hpp
loleaflet/admin/admin.html |4 loleaflet/admin/admin.strings.js |1 + loleaflet/admin/src/AdminSocketOverview.js |7 ++- scripts/unocommands.py |2 +- wsd/Admin.cpp |3 +++ wsd/AdminModel.cpp |8 wsd/AdminModel.hpp |2 ++ wsd/LOOLWSD.cpp|4 wsd/LOOLWSD.hpp|2 ++ 9 files changed, 31 insertions(+), 2 deletions(-) New commits: commit 360d5a0956c39e696cc4fbab89ec6cdd2cf106d3 Author: George AuthorDate: Fri Jul 19 11:39:59 2019 +0100 Commit: Michael Meeks CommitDate: Fri Jul 19 21:14:01 2019 +0100 added server uptime field to admin console Change-Id: Id23fee1299b87095f186ce7aaa8c2d2e0f3cef52 Signed-off-by: Michael Meeks diff --git a/loleaflet/admin/admin.html b/loleaflet/admin/admin.html index ecd67cdb9..342d6ea80 100644 --- a/loleaflet/admin/admin.html +++ b/loleaflet/admin/admin.html @@ -85,6 +85,10 @@ 0 document.write(l10nstrings.strRecvBytes) + + 0 + document.write(l10nstrings.strServerUptime) + diff --git a/loleaflet/admin/admin.strings.js b/loleaflet/admin/admin.strings.js index 29713a8df..7dea1cdd3 100644 --- a/loleaflet/admin/admin.strings.js +++ b/loleaflet/admin/admin.strings.js @@ -40,6 +40,7 @@ l10nstrings.strDocuments = _('Documents:'); l10nstrings.strExpired = _('Expired:'); l10nstrings.strRefresh = _('Refresh'); l10nstrings.strShutdown = _('Shutdown Server'); +l10nstrings.strServerUptime = _('Server uptime') if (module) { module.exports = l10nstrings; diff --git a/loleaflet/admin/src/AdminSocketOverview.js b/loleaflet/admin/src/AdminSocketOverview.js index 15444e9a6..9c61089cc 100644 --- a/loleaflet/admin/src/AdminSocketOverview.js +++ b/loleaflet/admin/src/AdminSocketOverview.js @@ -51,6 +51,7 @@ var AdminSocketOverview = AdminSocketBase.extend({ this.socket.send('active_users_count'); this.socket.send('sent_bytes'); this.socket.send('recv_bytes'); + this.socket.send('uptime') }, onSocketOpen: function() { @@ -311,7 +312,8 @@ var AdminSocketOverview = AdminSocketBase.extend({ textMsg.startsWith('active_docs_count') || textMsg.startsWith('active_users_count') || textMsg.startsWith('sent_bytes') || - textMsg.startsWith('recv_bytes')) + textMsg.startsWith('recv_bytes') || + textMsg.startsWith('uptime')) { textMsg = textMsg.split(' '); var sCommand = textMsg[0]; @@ -322,6 +324,9 @@ var AdminSocketOverview = AdminSocketBase.extend({ sCommand === 'recv_bytes') { nData = Util.humanizeMem(nData); } + else if (sCommand === 'uptime') { + nData = Util.humanizeSecs(nData) + } $(document.getElementById(sCommand)).text(nData); } else if (textMsg.startsWith('rmdoc')) { diff --git a/scripts/unocommands.py b/scripts/unocommands.py index 3e5ec6bb8..a28c3ab5d 100755 --- a/scripts/unocommands.py +++ b/scripts/unocommands.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- # # This file is part of the LibreOffice project. diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp index ea3d5b5be..9d9fc2548 100644 --- a/wsd/Admin.cpp +++ b/wsd/Admin.cpp @@ -152,6 +152,9 @@ void AdminSocketHandler::handleMessage(bool /* fin */, WSOpCode /* code */, else if (tokens[0] == "recv_bytes") sendTextFrame("recv_bytes " + std::to_string(model.getRecvBytesTotal() / 1024)); +else if (tokens[0] == "uptime") +sendTextFrame("uptime " + std::to_string(model.getServerUptime())); + else if (tokens[0] == "kill" && tokens.count() == 2) { try diff --git a/wsd/AdminModel.cpp b/wsd/AdminModel.cpp index df1529724..e0074ce5f 100644 --- a/wsd/AdminModel.cpp +++ b/wsd/AdminModel.cpp @@ -11,6 +11,7 @@ #include "AdminModel.hpp" +#include #include #include #include @@ -733,4 +734,11 @@ void AdminModel::updateMemoryDirty(const std::string& docKey, int dirty) } } +double AdminModel::getServerUptime() +{ +auto currentTime = std::chrono::system_clock::now(); +std::chrono::duration uptime = currentTime - LOOLWSD::StartTime; +return uptime.count(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/wsd/AdminModel.hpp b/wsd/AdminModel.hpp index 2b69f900b..57e7193e1 100644 --- a/wsd/AdminModel.hpp +++ b/wsd/Admi
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - loleaflet/admin scripts/unocommands.py wsd/Admin.cpp wsd/AdminModel.cpp wsd/AdminModel.hpp wsd/LOOLWSD.cpp wsd/LOOLWS
loleaflet/admin/admin.html |4 loleaflet/admin/admin.strings.js |1 + loleaflet/admin/src/AdminSocketOverview.js |7 ++- scripts/unocommands.py |2 +- wsd/Admin.cpp |3 +++ wsd/AdminModel.cpp |8 wsd/AdminModel.hpp |2 ++ wsd/LOOLWSD.cpp|4 wsd/LOOLWSD.hpp|2 ++ 9 files changed, 31 insertions(+), 2 deletions(-) New commits: commit c81dd0265507e9fbf8b468c766d1d9709ec0d7ec Author: George AuthorDate: Fri Jul 19 11:39:59 2019 +0100 Commit: Michael Meeks CommitDate: Fri Jul 19 22:21:55 2019 +0200 added server uptime field to admin console Change-Id: Id23fee1299b87095f186ce7aaa8c2d2e0f3cef52 Reviewed-on: https://gerrit.libreoffice.org/75962 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/loleaflet/admin/admin.html b/loleaflet/admin/admin.html index a076a1749..23423f2ea 100644 --- a/loleaflet/admin/admin.html +++ b/loleaflet/admin/admin.html @@ -85,6 +85,10 @@ 0 document.write(l10nstrings.strRecvBytes) + + 0 + document.write(l10nstrings.strServerUptime) + diff --git a/loleaflet/admin/admin.strings.js b/loleaflet/admin/admin.strings.js index 5dabb9702..1d10257a5 100644 --- a/loleaflet/admin/admin.strings.js +++ b/loleaflet/admin/admin.strings.js @@ -39,6 +39,7 @@ l10nstrings.strLimitFileSizeMb = _('Maximum file size allowed to write to disk ( l10nstrings.strDocuments = _('Documents:'); l10nstrings.strExpired = _('Expired:'); l10nstrings.strRefresh = _('Refresh'); +l10nstrings.strServerUptime = _('Server uptime') if (module) { module.exports = l10nstrings; diff --git a/loleaflet/admin/src/AdminSocketOverview.js b/loleaflet/admin/src/AdminSocketOverview.js index 15444e9a6..9c61089cc 100644 --- a/loleaflet/admin/src/AdminSocketOverview.js +++ b/loleaflet/admin/src/AdminSocketOverview.js @@ -51,6 +51,7 @@ var AdminSocketOverview = AdminSocketBase.extend({ this.socket.send('active_users_count'); this.socket.send('sent_bytes'); this.socket.send('recv_bytes'); + this.socket.send('uptime') }, onSocketOpen: function() { @@ -311,7 +312,8 @@ var AdminSocketOverview = AdminSocketBase.extend({ textMsg.startsWith('active_docs_count') || textMsg.startsWith('active_users_count') || textMsg.startsWith('sent_bytes') || - textMsg.startsWith('recv_bytes')) + textMsg.startsWith('recv_bytes') || + textMsg.startsWith('uptime')) { textMsg = textMsg.split(' '); var sCommand = textMsg[0]; @@ -322,6 +324,9 @@ var AdminSocketOverview = AdminSocketBase.extend({ sCommand === 'recv_bytes') { nData = Util.humanizeMem(nData); } + else if (sCommand === 'uptime') { + nData = Util.humanizeSecs(nData) + } $(document.getElementById(sCommand)).text(nData); } else if (textMsg.startsWith('rmdoc')) { diff --git a/scripts/unocommands.py b/scripts/unocommands.py index 27fca0d84..e08037395 100755 --- a/scripts/unocommands.py +++ b/scripts/unocommands.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- # # This file is part of the LibreOffice project. diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp index 414427027..498053604 100644 --- a/wsd/Admin.cpp +++ b/wsd/Admin.cpp @@ -157,6 +157,9 @@ void AdminSocketHandler::handleMessage(bool /* fin */, WSOpCode /* code */, else if (tokens[0] == "recv_bytes") sendTextFrame("recv_bytes " + std::to_string(model.getRecvBytesTotal() / 1024)); +else if (tokens[0] == "uptime") +sendTextFrame("uptime " + std::to_string(model.getServerUptime())); + else if (tokens[0] == "kill" && tokens.count() == 2) { try diff --git a/wsd/AdminModel.cpp b/wsd/AdminModel.cpp index e25c08bf5..d6629ebaa 100644 --- a/wsd/AdminModel.cpp +++ b/wsd/AdminModel.cpp @@ -11,6 +11,7 @@ #include "AdminModel.hpp" +#include #include #include #include @@ -733,4 +734,11 @@ void AdminModel::updateMemoryDirty(const std::string& docKey, int dirty) } } +double AdminModel::getServerUptime() +{ +auto currentTime = std::chrono::system_clock::now(); +std::chrono::duration uptime = currentTime - LOOLWSD::StartTime; +return uptime.count(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git
[Libreoffice-commits] core.git: Changes to 'feature/clipboard'
New branch 'feature/clipboard' available with the following commits: commit 29dbd65318e4f8d98c0e366f10e5d30266ca846d Author: Andras Timar Date: Mon Jun 24 10:33:51 2019 +0200 build fix: missing #include Change-Id: I72caa16d3c5b5698226cc7d3f07d3d32820032d8 commit c40b7747ad4379bf3e21dbdacbc0714957ca0b96 Author: Szymon Kłos Date: Mon Jun 24 09:24:59 2019 +0200 Fix build: unused argument Change-Id: Id79d9c093da21b9f68bb38a51ac5f142a69364ed commit 3587add4346e78f718582afae696479e56fce756 Author: Ashod Nakashian Date: Fri Jul 19 23:51:16 2019 +0100 LOK: Support detecting complex selections Includes unit-test, but is otherwise not complete implementation. Change-Id: I5fdcd543358caab1858f6351238c21312665839c commit f4b7d0d4775eea40f223556b45742f4e8bfe2901 Author: Michael Meeks Date: Sat Jun 22 12:48:49 2019 +0100 lok: use utf-8 for text/plain always. Change-Id: Ie91f89b3dc6ba3eddcf8383948dddc7878eae4d8 commit 51662dfaf63890a18e7efdfe1522286d9349898d Author: Michael Meeks Date: Fri Jul 19 23:44:20 2019 +0100 Add more powerful selection fetch & clipboard set methods. Change-Id: I6633356d13480377a83a006588ec69ebcb56a93f commit 6046fa96db320821421fa3074689ba1a649ee92b Author: Michael Meeks Date: Fri May 31 14:38:34 2019 +0100 Avoid odd crash where OLE object can't generate an image preview. Change-Id: Ib77eca6907aa09383a96f3c9de6f7a7c4799c3bc commit 819aa52235e64ea87cf5cfe714420062eecd2efb Author: Michael Meeks Date: Wed May 29 17:53:35 2019 +0100 lok: disable calc char-set dialog for HTML when pasting. Change-Id: I3ec9e98549d06ae3e6b4ede89215a5137d01ccab commit 519739c4ad84dd3b9edda5369585a68b98570ffc Author: Michael Meeks Date: Wed May 29 15:20:32 2019 +0100 lok: don't be prejudiced against a single missing mime-type. Change-Id: Ic5004c306cbd01071c397ed1a61ef094b439a48f ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'feature/lok-clipboard'
New branch 'feature/lok-clipboard' available with the following commits: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/TestHelpers.mk |2 ++ 1 file changed, 2 insertions(+) New commits: commit 7a98a2c69d0fc747e6d7f813c591b5bf79aa8d7d Author: Jan-Marek Glogowski AuthorDate: Tue Jul 16 20:02:52 2019 + Commit: Thorsten Behrens CommitDate: Sat Jul 20 01:05:12 2019 +0200 Don't error more_fonts on the clean target Regression from commit 368c996b24e0 ("Make font-based unit test depend on instdir fonts") Change-Id: Ie106894803b84430f9b7d9bfd97c420d6eb29506 Reviewed-on: https://gerrit.libreoffice.org/75747 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/solenv/gbuild/TestHelpers.mk b/solenv/gbuild/TestHelpers.mk index d2628a09b6c8..1cbe308dd0c9 100644 --- a/solenv/gbuild/TestHelpers.mk +++ b/solenv/gbuild/TestHelpers.mk @@ -10,6 +10,7 @@ # This makes sure that more_fonts, opensymbol and fontconfig is installed define gb_TestHelpers_use_more_fonts +ifneq ($(MAKECMDGOALS),clean) ifneq (,$$(filter MORE_FONTS,$$(BUILD_TYPE))) ifeq (,$$(filter more_fonts,$$(gb_Module_ALLMODULES))) @@ -39,6 +40,7 @@ $(1): \ $$(call gb_Package_get_files,extras_fontconfig)) endif endif +endif endef ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: connectivity/source include/svtools include/uno include/vcl include/xmloff javaunohelper/com lotuswordpro/inc lotuswordpro/source qadevOOo/tests
connectivity/source/drivers/postgresql/pq_databasemetadata.cxx |2 +- connectivity/source/drivers/postgresql/pq_xcolumns.cxx |2 +- include/svtools/table/tablemodel.hxx |2 +- include/uno/threadpool.h |2 +- include/vcl/treelistbox.hxx|2 +- include/vcl/window.hxx |2 +- include/xmloff/XMLConstantsPropertyHandler.hxx |4 ++-- include/xmloff/xmlictxt.hxx|4 ++-- javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java |2 +- lotuswordpro/inc/xfilter/xfborders.hxx |6 +++--- lotuswordpro/inc/xfilter/xfconfigmanager.hxx |2 +- lotuswordpro/inc/xfilter/xfindex.hxx |4 ++-- lotuswordpro/inc/xfilter/xftimestyle.hxx |2 +- lotuswordpro/source/filter/lwpdivopts.hxx |2 +- lotuswordpro/source/filter/lwprowlayout.cxx|2 +- lotuswordpro/source/filter/lwptblformula.cxx |2 +- lotuswordpro/source/filter/lwptoc.cxx |2 +- lotuswordpro/source/filter/xfilter/xfglobal.cxx|4 ++-- qadevOOo/tests/java/ifc/style/_PageProperties.java |2 +- 19 files changed, 25 insertions(+), 25 deletions(-) New commits: commit 85b1d47450fa33f772d06353c4dad8da4d22f114 Author: Andrea Gelmini AuthorDate: Fri Jul 19 23:03:15 2019 +0200 Commit: Andrea Gelmini CommitDate: Sat Jul 20 04:17:41 2019 +0200 Fix typos Change-Id: Icefd5a9e2a8bd929caa486c4cf3283925237d707 Reviewed-on: https://gerrit.libreoffice.org/75980 Tested-by: Jenkins Reviewed-by: Andrea Gelmini diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index 10c8546025f2..6f0d99f7fba9 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -1475,7 +1475,7 @@ css::uno::Reference< XResultSet > DatabaseMetaData::getColumns( // 3. TABLE_NAME string => table name // => pg_class.relname // 4. COLUMN_NAME string => column name -// => pg_attribure.attname +// => pg_attribute.attname // 5. DATA_TYPE short => SQL type from java.sql.Types // => pg_type.typname => sdbc.DataType // 6. TYPE_NAME string => Data source dependent type name, for a UDT the diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx index 695bb861e4a5..b5fcd1d0261a 100644 --- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx @@ -127,7 +127,7 @@ OUString columnMetaData2SDBCX( // 3. TABLE_NAME string => table name // => pg_class.relname // 4. COLUMN_NAME string => column name -// => pg_attribure.attname +// => pg_attribute.attname // 5. DATA_TYPE short => SQL type from java.sql.Types // => pg_type.typname => sdbc.DataType // 6. TYPE_NAME string => Data source dependent type name, for a UDT the diff --git a/include/svtools/table/tablemodel.hxx b/include/svtools/table/tablemodel.hxx index 7962900e597d..907e2d2971eb 100644 --- a/include/svtools/table/tablemodel.hxx +++ b/include/svtools/table/tablemodel.hxx @@ -114,7 +114,7 @@ namespace svt { namespace table */ virtual voidcolumnRemoved() = 0; -/** notifies the listener that all columns have been removed form the model +/** notifies the listener that all columns have been removed from the model */ virtual voidallColumnsRemoved() = 0; diff --git a/include/uno/threadpool.h b/include/uno/threadpool.h index bd5e42d83911..52bac0a4a08b 100644 --- a/include/uno/threadpool.h +++ b/include/uno/threadpool.h @@ -130,7 +130,7 @@ uno_threadpool_detach( uno_ThreadPool hPool ) SAL_THROW_EXTERN_C(); If the request is asynchronous, it is put into the queue of asynchronous requests for the current threadid. The requests are always executed in a new thread, even if the thread with the given id is waiting in the pool. No id is bound - to the newly created thread. The responsibilty is left to the bridge ( if it + to the newly created thread. The responsibility is left to the bridge (if it wishes to bind a name). If pJob is a reply, there MUST be a thread with the given threadId waiting diff --git a/include/vcl/treelistbox.hxx b/include/vcl/treelistbox.hxx index a19376f108fc..c6a13397ba80 100644 --- a/include/vcl/treelistbox.hxx +++ b/include/vcl/treelistbox.hxx @@ -400,7 +400,7 @@ public: t
[Libreoffice-commits] core.git: 2 commits - framework/inc framework/source linguistic/source
framework/inc/dispatch/interceptionhelper.hxx |3 framework/source/accelerators/presethandler.cxx | 16 +--- framework/source/dispatch/closedispatcher.cxx |2 framework/source/dispatch/dispatchprovider.cxx|6 - framework/source/dispatch/interceptionhelper.cxx |6 - framework/source/dispatch/startmoduledispatcher.cxx |4 - framework/source/fwe/classes/framelistanalyzer.cxx|2 framework/source/fwe/classes/rootactiontriggercontainer.cxx |3 framework/source/fwe/helper/titlehelper.cxx |8 +- framework/source/fwi/helper/mischelper.cxx|2 framework/source/helper/ocomponentaccess.cxx |8 +- framework/source/helper/oframes.cxx |4 - framework/source/jobs/helponstartup.cxx |5 - framework/source/layoutmanager/helpers.cxx|4 - framework/source/layoutmanager/layoutmanager.cxx | 16 ++-- framework/source/layoutmanager/toolbarlayoutmanager.cxx | 11 +-- framework/source/loadenv/loadenv.cxx | 16 ++-- framework/source/services/autorecovery.cxx|6 - framework/source/services/desktop.cxx | 17 ++-- framework/source/services/dispatchhelper.cxx |2 framework/source/services/frame.cxx | 28 +++- framework/source/tabwin/tabwindow.cxx | 17 ++-- framework/source/uiconfiguration/moduleuicfgsupplier.cxx |3 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | 25 ++- framework/source/uiconfiguration/uiconfigurationmanager.cxx | 25 ++- framework/source/uielement/buttontoolbarcontroller.cxx|2 framework/source/uielement/menubarmanager.cxx | 14 ++-- framework/source/uielement/menubarwrapper.cxx |2 framework/source/uielement/newmenucontroller.cxx |2 framework/source/uielement/popuptoolbarcontroller.cxx |2 framework/source/uielement/progressbarwrapper.cxx | 10 +- framework/source/uielement/statusbarmanager.cxx |3 framework/source/uielement/toolbarmanager.cxx |2 linguistic/source/convdic.cxx |3 linguistic/source/convdiclist.cxx |8 +- linguistic/source/dlistimp.cxx|7 -- linguistic/source/gciterator.cxx |4 - linguistic/source/lngsvcmgr.cxx | 35 ++ linguistic/source/misc.cxx|2 linguistic/source/spelldta.cxx|2 40 files changed, 142 insertions(+), 195 deletions(-) New commits: commit defdd8bebe40b48d8abc4d893ac9a82b550c5d19 Author: Noel Grandin AuthorDate: Fri Jul 19 20:07:42 2019 +0200 Commit: Noel Grandin CommitDate: Sat Jul 20 07:55:53 2019 +0200 loplugin:referencecasting in linguistic Change-Id: Iff53942bebb1481666ae4469e16089d54669954f Reviewed-on: https://gerrit.libreoffice.org/75973 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index 7c2c602a79fa..482ae2f2c880 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -257,8 +257,7 @@ void ConvDic::Save() xSaxWriter->setOutputStream( xStream->getOutputStream() ); // prepare arguments (prepend doc handler to given arguments) -uno::Reference< xml::sax::XDocumentHandler > xDocHandler( xSaxWriter, UNO_QUERY ); -rtl::Reference pExport = new ConvDicXMLExport( *this, aMainURL, xDocHandler ); +rtl::Reference pExport = new ConvDicXMLExport( *this, aMainURL, xSaxWriter ); bool bRet = pExport->Export(); // write entries to file DBG_ASSERT( !pStream->GetError(), "I/O error while writing to stream" ); if (bRet) diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 50f1799423d2..da4236dc610c 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -391,10 +391,10 @@ ConvDicNameContainer & ConvDicList::GetNameContainer() // since there is no UI to active/deactivate the dictionaries // for chinese text conversion they should be activated by default -uno::Reference< XConversionDictionary > xS2TDic( -mxNameContainer->GetByName( "ChineseS2T" ), UNO_QUERY ); -uno::Reference< XConversionDictionary > xT2SDic( -
[Libreoffice-commits] core.git: oox/source package/qa package/source pyuno/source
oox/source/crypto/DocumentDecryption.cxx |6 ++-- oox/source/drawingml/chart/seriesconverter.cxx |2 - oox/source/drawingml/shape.cxx |2 - oox/source/drawingml/textparagraphproperties.cxx |5 +-- oox/source/drawingml/textrun.cxx |2 - oox/source/export/chartexport.cxx| 34 +++ oox/source/export/drawingml.cxx |2 - oox/source/export/shapes.cxx |3 -- oox/source/ole/vbaproject.cxx|2 - oox/source/ppt/presentationfragmenthandler.cxx |2 - oox/source/ppt/timenode.cxx |2 - oox/source/shape/ShapeContextHandler.cxx |2 - package/qa/cppunit/test_package.cxx |2 - package/source/xstor/owriteablestream.cxx| 13 ++-- pyuno/source/module/pyuno.cxx|6 ++-- pyuno/source/module/pyuno_module.cxx |2 - 16 files changed, 40 insertions(+), 47 deletions(-) New commits: commit 84abf28e05fc55be867028f3d3a59220ca2669f0 Author: Noel Grandin AuthorDate: Fri Jul 19 20:08:45 2019 +0200 Commit: Noel Grandin CommitDate: Sat Jul 20 07:56:19 2019 +0200 loplugin:referencecasting in oox..pyuno Change-Id: Ie920c154aef3074016704c632b15d99110b219aa Reviewed-on: https://gerrit.libreoffice.org/75974 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx index 88f2a7287d71..6ccbfc18d225 100644 --- a/oox/source/crypto/DocumentDecryption.cxx +++ b/oox/source/crypto/DocumentDecryption.cxx @@ -44,7 +44,7 @@ bool DocumentDecryption::readEncryptionInfo() if (!mrOleStorage.isStorage()) return false; -uno::Reference xEncryptionInfo(mrOleStorage.openInputStream("EncryptionInfo"), uno::UNO_QUERY); +uno::Reference xEncryptionInfo = mrOleStorage.openInputStream("EncryptionInfo"); BinaryXInputStream aBinaryInputStream(xEncryptionInfo, true); sal_uInt32 aVersion = aBinaryInputStream.readuInt32(); @@ -93,10 +93,10 @@ bool DocumentDecryption::decrypt(const uno::Reference& xDocumentStr return false; // open the required input streams in the encrypted package -uno::Reference xEncryptedPackage(mrOleStorage.openInputStream("EncryptedPackage"), uno::UNO_QUERY); +uno::Reference xEncryptedPackage = mrOleStorage.openInputStream("EncryptedPackage"); // create temporary file for unencrypted package -uno::Reference xDecryptedPackage(xDocumentStream->getOutputStream(), uno::UNO_QUERY); +uno::Reference xDecryptedPackage = xDocumentStream->getOutputStream(); BinaryXOutputStream aDecryptedPackage(xDecryptedPackage, true); BinaryXInputStream aEncryptedPackage(xEncryptedPackage, true); diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 01e1d72562c5..a310549e0535 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -114,7 +114,7 @@ Reference< XLabeledDataSequence > lclCreateLabeledDataSequence( Reference< XLabeledDataSequence > xLabeledSeq; if( xValueSeq.is() || xTitleSeq.is() ) { -xLabeledSeq.set( LabeledDataSequence::create(rParent.getComponentContext()), UNO_QUERY ); +xLabeledSeq = LabeledDataSequence::create(rParent.getComponentContext()); if( xLabeledSeq.is() ) { xLabeledSeq->setValues( xValueSeq ); diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 9431a71f46a5..41b264c16a8e 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1703,7 +1703,7 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& if( !xChartDoc->hasInternalDataProvider() ) { Reference< chart2::data::XDataReceiver > xDataRec( xChartDoc, UNO_QUERY ); -Reference< chart2::data::XDataSource > xData( xDataRec->getUsedData(), UNO_QUERY ); +Reference< chart2::data::XDataSource > xData = xDataRec->getUsedData(); if( !xData->getDataSequences().hasElements() || !xData->getDataSequences()[0]->getValues().is() || !xData->getDataSequences()[0]->getValues()->getData().hasElements() ) { diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index 48e3b486e8b8..f1c966deeaa4 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -515,10 +515,9 @@ void TextParagraphProperties::dump() const const OUString sText = "debug"; xText->setString( sText ); -Reference< css::text::XTextCursor > xStart( xText->createTex
[Libreoffice-commits] core.git: sc/qa sc/source
sc/qa/extras/scpdfexport.cxx |7 +--- sc/qa/unit/copy_paste_test.cxx|9 ++--- sc/source/core/data/documen5.cxx |5 +-- sc/source/core/tool/address.cxx |2 - sc/source/core/tool/charthelper.cxx |7 +--- sc/source/core/tool/webservicelink.cxx|5 +-- sc/source/filter/excel/xeescher.cxx |3 - sc/source/filter/excel/xichart.cxx|4 +- sc/source/filter/excel/xltoolbar.cxx |2 - sc/source/filter/oox/excelfilter.cxx |2 - sc/source/filter/oox/pagesettings.cxx |2 - sc/source/filter/oox/richstring.cxx |2 - sc/source/filter/xml/XMLTrackedChangesContext.cxx |4 -- sc/source/filter/xml/xmlcelli.cxx | 13 +++ sc/source/filter/xml/xmlexprt.cxx | 18 --- sc/source/filter/xml/xmlsubti.cxx |6 +-- sc/source/filter/xml/xmlwrap.cxx | 11 ++ sc/source/ui/Accessibility/AccessibleDocument.cxx | 21 +--- sc/source/ui/dataprovider/dataprovider.cxx|2 - sc/source/ui/docshell/docsh8.cxx |3 - sc/source/ui/drawfunc/fuins2.cxx | 10 ++ sc/source/ui/unoobj/TablePivotCharts.cxx |5 +-- sc/source/ui/unoobj/chartuno.cxx |5 +-- sc/source/ui/unoobj/docuno.cxx| 36 +- sc/source/ui/unoobj/fielduno.cxx |3 - sc/source/ui/unoobj/textuno.cxx |9 + sc/source/ui/vba/vbaapplication.cxx |8 ++-- sc/source/ui/vba/vbarange.cxx |5 +-- sc/source/ui/vba/vbaworkbook.cxx |2 - sc/source/ui/vba/vbaworksheet.cxx |9 + sc/source/ui/view/drawvie4.cxx|8 +--- 31 files changed, 94 insertions(+), 134 deletions(-) New commits: commit 8239e13dac39741003dfbce7099c3197080aafa8 Author: Noel Grandin AuthorDate: Fri Jul 19 20:09:55 2019 +0200 Commit: Noel Grandin CommitDate: Sat Jul 20 07:56:54 2019 +0200 loplugin:referencecasting in sc Change-Id: Ife30500d1ff67e06afc4d64634febfb4c161c702 Reviewed-on: https://gerrit.libreoffice.org/75976 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx index c21cdaa2dde7..059401f86340 100644 --- a/sc/qa/extras/scpdfexport.cxx +++ b/sc/qa/extras/scpdfexport.cxx @@ -88,8 +88,8 @@ void ScPDFExportTest::setUp() uno::Reference xModel2(xModel, UNO_QUERY); CPPUNIT_ASSERT(xModel2.is()); -Reference xController( -xModel2->createDefaultViewController(xTargetFrame), UNO_QUERY); +Reference xController += xModel2->createDefaultViewController(xTargetFrame); CPPUNIT_ASSERT(xController.is()); // introduce model/view/controller to each other @@ -161,8 +161,7 @@ std::shared_ptr ScPDFExportTest::exportToPdf(uno::Reference rCellRange(rSheet, UNO_QUERY); -uno::Reference xCellRange = rCellRange->getCellRangeByPosition( +uno::Reference xCellRange = rSheet->getCellRangeByPosition( range.aStart.Col(), range.aStart.Row(), range.aEnd.Col(), range.aEnd.Row()); { uno::Reference xController = xModel->getCurrentController(); diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx index 6d4e0fb3f6bf..4087b9d48946 100644 --- a/sc/qa/unit/copy_paste_test.cxx +++ b/sc/qa/unit/copy_paste_test.cxx @@ -64,7 +64,7 @@ void ScCopyPasteTest::testCopyPasteXLS() uno::Reference< frame::XModel2 > xModel2 ( xDocSh->GetModel(), UNO_QUERY ); CPPUNIT_ASSERT( xModel2.is() ); -Reference< frame::XController2 > xController ( xModel2->createDefaultViewController( xTargetFrame ), UNO_QUERY ); +Reference< frame::XController2 > xController = xModel2->createDefaultViewController( xTargetFrame ); CPPUNIT_ASSERT( xController.is() ); // introduce model/view/controller to each other @@ -187,7 +187,7 @@ void ScCopyPasteTest::testTdf84411() uno::Reference< frame::XModel2 > xModel2 ( xDocSh->GetModel(), UNO_QUERY ); CPPUNIT_ASSERT( xModel2.is() ); -Reference< frame::XController2 > xController ( xModel2->createDefaultViewController( xTargetFrame ), UNO_QUERY ); +Reference< frame::XController2 > xController = xModel2->createDefaultViewController( xTargetFrame ); CPPUNIT_ASSERT( xController.is() ); // introduce model/view/controller to each other @@ -256,7 +256,7 @@ void ScCopyPasteTest::testTdf124565() uno::Reference< frame::XModel2 > xModel2 ( xDocSh->GetModel(), UNO_QUERY ); CPPUNIT_ASSERT( xModel2.is() ); -Reference< frame::XController2 > xController ( xModel2->createDefaultViewController( xTargetFrame ), UNO_QUERY ); +Reference< frame::XController2 > xCo
[Libreoffice-commits] core.git: sdext/source
sdext/source/minimizer/impoptimizer.cxx |3 -- sdext/source/presenter/PresenterAccessibility.cxx | 10 +++- sdext/source/presenter/PresenterBitmapContainer.cxx |4 +-- sdext/source/presenter/PresenterButton.cxx|2 - sdext/source/presenter/PresenterCanvasHelper.cxx |4 +-- sdext/source/presenter/PresenterController.cxx|6 ++--- sdext/source/presenter/PresenterGeometryHelper.cxx| 21 +++--- sdext/source/presenter/PresenterHelpView.cxx |2 - sdext/source/presenter/PresenterNotesView.cxx | 13 +-- sdext/source/presenter/PresenterPane.cxx |4 +-- sdext/source/presenter/PresenterPaneBase.cxx |4 +-- sdext/source/presenter/PresenterPaneBorderPainter.cxx |2 - sdext/source/presenter/PresenterScreen.cxx|5 +--- sdext/source/presenter/PresenterScrollBar.cxx |2 - sdext/source/presenter/PresenterSlidePreview.cxx |2 - sdext/source/presenter/PresenterSlideShowView.cxx |2 - sdext/source/presenter/PresenterSlideSorter.cxx |4 +-- sdext/source/presenter/PresenterTextView.cxx |8 +++--- sdext/source/presenter/PresenterTimer.cxx |4 +-- sdext/source/presenter/PresenterViewFactory.cxx |7 +- sdext/source/presenter/PresenterWindowManager.cxx |2 - 21 files changed, 50 insertions(+), 61 deletions(-) New commits: commit e1983485a83bb81d3675c429a2525f7969cc6169 Author: Noel Grandin AuthorDate: Fri Jul 19 20:10:45 2019 +0200 Commit: Noel Grandin CommitDate: Sat Jul 20 07:57:54 2019 +0200 loplugin:referencecasting in sdext Change-Id: I4599375fae2516da20df0bdfc09f391e0189fc46 Reviewed-on: https://gerrit.libreoffice.org/75978 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx index 3c7e0561c960..1105c027cb44 100644 --- a/sdext/source/minimizer/impoptimizer.cxx +++ b/sdext/source/minimizer/impoptimizer.cxx @@ -709,8 +709,7 @@ void ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) } else { -Reference< XComponent > xComponent( mxModel, UNO_QUERY ); -xComponent->dispose(); +mxModel->dispose(); } } if ( nSourceSize && nDestSize ) diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx index 8eccf5ff63e3..bf2ed293cac5 100644 --- a/sdext/source/presenter/PresenterAccessibility.cxx +++ b/sdext/source/presenter/PresenterAccessibility.cxx @@ -660,7 +660,7 @@ Reference SAL_CALL PresenterAccessible::getAccessibleContext Reference xMainPane (mxMainPane, UNO_QUERY); if (xMainPane.is()) { -mxMainWindow.set(xMainPane->getWindow(), UNO_QUERY); +mxMainWindow = xMainPane->getWindow(); mxMainWindow->addFocusListener(this); } mpAccessibleConsole = AccessibleConsole::Create( @@ -1606,8 +1606,8 @@ awt::Point PresenterAccessible::AccessibleParagraph::GetAbsoluteParentLocation() { if (mxParentAccessible.is()) { -Reference xParentContext( -mxParentAccessible->getAccessibleContext(), UNO_QUERY); +Reference xParentContext = +mxParentAccessible->getAccessibleContext(); if (xParentContext.is()) { Reference xGrandParentComponent( @@ -1703,9 +1703,7 @@ void AccessibleNotes::SetTextView ( rpTextView->GetParagraph(nIndex), nIndex)); pParagraph->LateInitialization(); -pParagraph->SetWindow( -Reference(mxContentWindow, UNO_QUERY), -Reference(mxBorderWindow, UNO_QUERY)); +pParagraph->SetWindow(mxContentWindow, mxBorderWindow); pParagraph->SetAccessibleParent(this); aChildren.emplace_back(pParagraph.get()); } diff --git a/sdext/source/presenter/PresenterBitmapContainer.cxx b/sdext/source/presenter/PresenterBitmapContainer.cxx index 148bf24131ea..fde12ceb0919 100644 --- a/sdext/source/presenter/PresenterBitmapContainer.cxx +++ b/sdext/source/presenter/PresenterBitmapContainer.cxx @@ -84,8 +84,8 @@ void PresenterBitmapContainer::Initialize ( // Create an object that is able to load the bitmaps in a format that is // supported by the canvas. -Reference xFactory ( -rxComponentContext->getServiceManager(), UNO_QUERY); +Reference xFactory = +rxComponentContext->getServiceManager(); if ( ! xFactory.is()) return; mxPresenterHelper.set( diff --git a/sdext/source/presenter/PresenterButton.cxx b/sdext/source/presenter/PresenterButton.cxx index 26206dbc28ec..961e4ff5b425 100644 --- a/sdext/source/presenter/PresenterButton.cxx +++ b/sdext/source/presenter/PresenterButton.cxx @
[Libreoffice-commits] core.git: sd/qa sd/source
sd/qa/unit/export-tests-ooxml1.cxx|4 - sd/qa/unit/export-tests-ooxml2.cxx|2 sd/qa/unit/export-tests.cxx | 18 +++ sd/qa/unit/import-tests-smartart.cxx | 15 ++--- sd/qa/unit/import-tests.cxx |5 - sd/qa/unit/misc-tests.cxx |2 sd/qa/unit/tiledrendering/tiledrendering.cxx |6 +- sd/source/core/CustomAnimationEffect.cxx | 36 ++ sd/source/core/sdpage.cxx |2 sd/source/filter/eppt/pptexanimations.cxx |6 +- sd/source/filter/eppt/pptx-animations.cxx |4 - sd/source/filter/eppt/pptx-epptbase.cxx |4 - sd/source/filter/eppt/pptx-epptooxml.cxx | 17 ++ sd/source/filter/ppt/pptinanimations.cxx |2 sd/source/filter/xml/sdxmlwrp.cxx |9 +-- sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |2 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx | 10 +-- sd/source/ui/dlg/PhotoAlbumDialog.cxx |5 - sd/source/ui/dlg/sdtreelb.cxx |5 - sd/source/ui/dlg/tpaction.cxx |7 +- sd/source/ui/dlg/tpoption.cxx |4 - sd/source/ui/framework/factories/BasicViewFactory.cxx |5 - sd/source/ui/framework/factories/ViewShellWrapper.cxx |2 sd/source/ui/func/fuinsert.cxx| 12 +--- sd/source/ui/presenter/PresenterCanvas.cxx|2 sd/source/ui/presenter/PresenterHelper.cxx|3 - sd/source/ui/remotecontrol/Communicator.cxx |2 sd/source/ui/remotecontrol/ImagePreparer.cxx | 11 +--- sd/source/ui/sidebar/DocumentHelper.cxx |4 - sd/source/ui/sidebar/MasterPageContainer.cxx |4 - sd/source/ui/sidebar/SlideBackground.cxx |6 +- sd/source/ui/slideshow/slideshowimpl.cxx |2 sd/source/ui/slidesorter/controller/SlsListener.cxx | 10 +-- sd/source/ui/slidesorter/model/SlideSorterModel.cxx |4 - sd/source/ui/tools/EventMultiplexer.cxx | 15 ++--- sd/source/ui/unoidl/SdUnoDrawView.cxx |4 - sd/source/ui/unoidl/UnoDocumentSettings.cxx |3 - sd/source/ui/unoidl/randomnode.cxx|2 sd/source/ui/unoidl/unomodel.cxx | 12 +--- sd/source/ui/unoidl/unosrch.cxx |9 +-- sd/source/ui/view/outlview.cxx|2 sd/source/ui/view/sdview3.cxx |2 42 files changed, 125 insertions(+), 156 deletions(-) New commits: commit 775c8a76d61f5692c54f524725b369cfd2a91539 Author: Noel Grandin AuthorDate: Fri Jul 19 20:10:21 2019 +0200 Commit: Noel Grandin CommitDate: Sat Jul 20 07:57:28 2019 +0200 loplugin:referencecasting in sd Change-Id: Ief0d02006afd6cb9cd6da1da9208e374df644a42 Reviewed-on: https://gerrit.libreoffice.org/75977 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index a3df821e1bf0..de21002e9796 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -465,7 +465,7 @@ void SdOOXMLExportTest1::testFdo83751() CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr ); uno::Reference xDocumentPropertiesSupplier( xDocShRef->GetModel(), uno::UNO_QUERY ); -uno::Reference xProps( xDocumentPropertiesSupplier->getDocumentProperties(), uno::UNO_QUERY ); +uno::Reference xProps = xDocumentPropertiesSupplier->getDocumentProperties(); uno::Reference xUDProps( xProps->getUserDefinedProperties(), uno::UNO_QUERY ); OUString propValue; xUDProps->getPropertyValue("Testing") >>= propValue; @@ -492,7 +492,7 @@ void SdOOXMLExportTest1::testTableCellFillProperties() ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/Table_with_Cell_Fill.odp"), ODP); // Export the document and import again for a check -uno::Reference< lang::XComponent > xComponent(xDocShRef->GetModel(), uno::UNO_QUERY); +uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel(); uno::Reference xStorable(xComponent, uno::UNO_QUERY); utl::MediaDescriptor aMediaDescriptor; aMediaDescriptor["FilterName"] <<= OStringToOUString(OString(aFileFormats[PPTX].pFilterName), RTL_TEXTENCODING_UTF8); diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index ea41ec84a47a..ac274d631a2a 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-oo