summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)AuthorFilesLines
2020-07-02Upcoming improved loplugin:staticanonymous -> redundantstatic: salStephan Bergmann55-2389/+2389
Change-Id: I022f5ed37d25f2c8a8870033bab32ff59d4d8da6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97648 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-05Upcoming loplugin:elidestringvar: salStephan Bergmann2-48/+21
Change-Id: Ia277fc825d9687fc70d35bc7db92df5cd5d9b2bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95529 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-04Remove useless Result variableStephan Bergmann1-9/+5
It always had a statically known value ever since 9399c662f36c385b0c705eb34e636a9aec450282 "initial import". The always-true check for Result == osl_cond_result_ok in the SAL_INFO invocation was apparently a glitch introduced with a883b6b13b67898accdc1ffe3fd9e770612352b1 "Improve logging". Change-Id: I83ebb3fb02c8f080d560fdff86a98ee5f6a9c204 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95513 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-29loplugin:simplifybool in oox..sdNoel Grandin2-4/+4
Change-Id: I76cbd5d3e65f0b392d713a51607f5c88dae79593 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95101 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-25createSocketImpl is always called with the same argumentStephan Bergmann1-4/+4
Change-Id: I15d442a36407ebfecefe7adf594bffbf1204443e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94796 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-24Revert "Try to blind-solve cppunittester hangs on Windows"Mike Kaganski2-10/+4
This reverts commit 1126515226b60630b3a0fd72c45258b230dfe8fd. Reason for revert: it only took one run after merging the patch to see it still hangs... Change-Id: I9235004d0568462b112da7f23bc615f3647f4755 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94677 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-24Try to blind-solve cppunittester hangs on WindowsMike Kaganski2-4/+10
... calling OleInitialize early in sal_main to initialize COM and concurrency. Seeing intermittent hangs in main thread in CAPNDataObject::GetData calling m_rIDataObjectOrg->GetData, and the inner stack waiting objects in the code doing apartment switching (I forgot to save a stack to paste unfortunately), I suspect that being related to incorrect concurrency model. OleInitialize docs [1] mention: Applications that use the following functionality must call OleInitialize before calling any other function in the COM library: * Clipboard * Drag and Drop * Object linking and embedding (OLE) * In-place activation ... Because OLE operations are not thread-safe, OleInitialize specifies the concurrency model as single-thread apartment. CoInitializeEx sets COINIT_MULTITHREADED by default, so possibly that might get called somewhere before clipboard/OLE code is called. I hope that this change would fix those hangs. [1] https://docs.microsoft.com/en-us/windows/win32/api/ole2/nf-ole2-oleinitialize Change-Id: I7213c9d6cb4bd0691a3ce355995157797d7db93f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94675 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-10compact namespace in sal..svgioNoel Grandin8-16/+16
Change-Id: I7e70614ea5a1cb1a1dc0ef8e9fb6fd48e85c3562 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93904 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-29Fix problems when running a sandboxed LO as instdir/.../soffice on macOSTor Lillqvist1-0/+12
The argv[0] passed to osl_setCommandArgs will then be the relative path and osl::realpath() will fail. Instead, use bootstrap_getExecutableFile() which calls _NSGetExecutablePath() to get the executable's pathname for g_command_args. Change-Id: I1345afe158d7b64871f6340733fb5490d5ca6bd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93123 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-17Just use __builtin_ffs on GCC and ClangStephan Bergmann1-9/+2
GCC appears to support it at least since <https://gcc.gnu.org/git/ ?p=gcc.git;a=commit;h=51e2940139d5e3e86590f6e6802ffc3f3010be5b> "Initial revision" in 1992, and Clang appears to support it since <https://github.com/ llvm/llvm-project/commit/d93abc3bb0acdd430839abdd67bd3920fee87bbc> "Implement ffs, parity, and popcount builtins" in Clang 2.4. (And if a build used a compiler that does not support it, there would be no guarantee that it would support strings.h function ffs from X/Open System Interfaces, either.) Introducing HAVE_GCC_BUILTIN_FFS in 334a9f16cd1d1f9694f885c759903a41aa3d4833 "tdf#113211: fix calculations with big integers" appears to be due to a misguided recommendation at <https://gerrit.libreoffice.org/c/core/+/43477/4# message-899806c724fbdcece0ea9438514a6a5db6a2e645>. Change-Id: Ib6ee6de548172b3aae25483d03efb86620133933 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92421 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-15loplugin:buriedassign in salNoel Grandin4-20/+34
Change-Id: I5a7bc9378ceacb9116c03e3a9fc01c5675c40908 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92243 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-06Nah, let's revert that shiteTor Lillqvist5-295/+40
This reverts commit 533f0094df9a591116b73dca63bc34ddab683bdd. This reverts commit 96ae6bc47414194a477bf95a1f5a360b555884b3. This reverts commit 0050759cb9cf8ac337c0ecec48c009501de9fb0f. This reverts commit 70de006670880df7931fb1c39966d181e2893a61.
2020-04-04Let's put some verbosity in #if 0, thoughTor Lillqvist1-1/+1
Change-Id: I862c6277b4ef8d80bd6352fe27fed96a262cd02e
2020-04-04Show what pathname a fd was opened from in the SAL_INFO("sal.file") callsTor Lillqvist4-38/+137
The pathname is logged in abbreviated form. This, like the two preceding commits, is not claimed to be perfect, MT-safe, etc. It is for debugging output, for SAL_LOG=+INFO.sal.file. If you don't like it, don't use it. Or improve it. Or revert it, I promise not to bother again. Just don't start bike-shedding. Change-Id: Ie8fcea5f5f2373671eebf9ee54d32143e7ed68e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91679 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-04Add SAL_INFO with "sal.file" also for the pread, read, pwrite, and write callsTor Lillqvist1-5/+39
Change-Id: Ib8fe62614a87d7350bec195ff22ae5701558d967 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91678 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-04Show flags and modes symbolically in the SAL_INFO() for open() and access()Tor Lillqvist3-6/+128
Change-Id: I0d3f7f7216d35bb6f636797894832a4714bcc388 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91677 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-02loplugin:flatten in salNoel Grandin10-332/+333
Change-Id: Icc30c79d599486203c8f763cd5ff43059f0bb910 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91556 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-16Avoid stack overflow in testTdf124815 on WindowsMike Kaganski1-0/+8
Regression from commit 2af67c35d283abefe6030a5b90b831b0b797dd62. It happens in row 217, in a recursive calculation of cell values, starting on row 454 down to 0, with 237 repeated patterns on stack: ======================= ucrtbased.dll!__acrt_FlsGetValue(unsigned long fls_index) Line 472 ucrtbased.dll!__crt_state_management::get_current_state_index() Line 101 ucrtbased.dll!__crt_state_management::dual_state_global<long>::value() Line 147 ucrtbased.dll!_query_new_mode() Line 30 ucrtbased.dll!heap_alloc_dbg(const unsigned __int64 size, const int block_use, const char * const file_name, const int line_number) Line 447 ucrtbased.dll!_malloc_dbg(unsigned __int64 size, int block_use, const char * file_name, int line_number) Line 496 ucrtbased.dll!malloc(unsigned __int64 size) Line 27 sclo.dll!operator new(unsigned __int64 size) Line 35 sclo.dll!std::_Default_allocate_traits::_Allocate(const unsigned __int64 _Bytes) Line 52 sclo.dll!std::_Allocate<16,std::_Default_allocate_traits,0>(const unsigned __int64 _Bytes) Line 180 sclo.dll!std::allocator<std::_Container_proxy>::allocate(const unsigned __int64 _Count) Line 785 sclo.dll!std::_Container_base12::_Alloc_proxy<std::allocator<std::_Container_proxy>>(std::allocator<std::_Container_proxy> && _Al) Line 1098 sclo.dll!std::vector<rtl::OUString,std::allocator<rtl::OUString>>::vector<rtl::OUString,std::allocator<rtl::OUString>>() Line 445 sclo.dll!sc::TokenStringContext::TokenStringContext(const ScDocument * pDoc, formula::FormulaGrammar::Grammar eGram) Line 38 sclo.dll!sc::FormulaLogger::GroupScope::Impl::Impl(sc::FormulaLogger & rLogger, const rtl::OUString & rPrefix, const ScDocument & rDoc, const ScFormulaCell & rCell, bool bOutputEnabled) Line 80 sclo.dll!std::make_unique<sc::FormulaLogger::GroupScope::Impl,sc::FormulaLogger &,rtl::OUString const &,ScDocument const &,ScFormulaCell const &,bool &,0>(sc::FormulaLogger & <_Args_0>, const rtl::OUString & <_Args_1>, const ScDocument & <_Args_2>, const ScFormulaCell & <_Args_3>, bool & <_Args_4>) Line 2055 sclo.dll!sc::FormulaLogger::GroupScope::GroupScope(sc::FormulaLogger & rLogger, const rtl::OUString & rPrefix, const ScDocument & rDoc, const ScFormulaCell & rCell, bool bOutputEnabled) Line 127 sclo.dll!sc::FormulaLogger::enterGroup(const ScDocument & rDoc, const ScFormulaCell & rCell) Line 352 sclo.dll!ScFormulaCell::InterpretFormulaGroup(long nStartOffset, long nEndOffset) Line 4573 sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1606 sclo.dll!ScFormulaCell::MaybeInterpret() Line 446 sclo.dll!ScFormulaCell::GetErrCode() Line 2956 sclo.dll!ScInterpreter::GetCellValueOrZero(const ScAddress & rPos, ScRefCellValue & rCell) Line 202 sclo.dll!ScInterpreter::GetCellValue(const ScAddress & rPos, ScRefCellValue & rCell) Line 186 sclo.dll!ScInterpreter::GetDouble() Line 2088 sclo.dll!ScInterpreter::CalculateAddSub(bool _bSub) Line 1277 sclo.dll!ScInterpreter::ScAdd() Line 1261 sclo.dll!ScInterpreter::Interpret() Line 4032 sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1939 sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1632 ....................... <SKIP repeated pattern> ....................... sclo.dll!ScFormulaCell::MaybeInterpret() Line 446 sclo.dll!ScFormulaCell::GetErrCode() Line 2956 sclo.dll!ScInterpreter::GetCellValueOrZero(const ScAddress & rPos, ScRefCellValue & rCell) Line 202 sclo.dll!ScInterpreter::GetCellValue(const ScAddress & rPos, ScRefCellValue & rCell) Line 186 sclo.dll!ScInterpreter::GetDouble() Line 2088 sclo.dll!ScInterpreter::CalculateAddSub(bool _bSub) Line 1300 sclo.dll!ScInterpreter::ScAdd() Line 1261 sclo.dll!ScInterpreter::Interpret() Line 4032 sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1939 sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1632 sclo.dll!ScFormulaCell::MaybeInterpret() Line 446 sclo.dll!ScFormulaCell::GetErrCode() Line 2956 sclo.dll!ScInterpreter::GetCellValueOrZero(const ScAddress & rPos, ScRefCellValue & rCell) Line 202 sclo.dll!ScInterpreter::GetCellValue(const ScAddress & rPos, ScRefCellValue & rCell) Line 186 sclo.dll!ScInterpreter::GetDouble() Line 2088 sclo.dll!ScInterpreter::CalculateAddSub(bool _bSub) Line 1300 sclo.dll!ScInterpreter::ScAdd() Line 1261 sclo.dll!ScInterpreter::Interpret() Line 4032 sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1939 sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1632 sclo.dll!ScFormulaCell::MaybeInterpret() Line 446 sclo.dll!ScFormulaCell::GetErrCode() Line 2956 sclo.dll!ScInterpreter::GetCellValueOrZero(const ScAddress & rPos, ScRefCellValue & rCell) Line 202 sclo.dll!ScInterpreter::GetCellValue(const ScAddress & rPos, ScRefCellValue & rCell) Line 186 sclo.dll!ScInterpreter::GetDouble() Line 2088 sclo.dll!ScInterpreter::CalculateAddSub(bool _bSub) Line 1300 sclo.dll!ScInterpreter::ScAdd() Line 1261 sclo.dll!ScInterpreter::Interpret() Line 4032 sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1939 sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1632 sclo.dll!ScFormulaCell::MaybeInterpret() Line 446 sclo.dll!ScFormulaCell::GetErrCode() Line 2956 sclo.dll!ScInterpreter::PushCellResultToken(bool bDisplayEmptyAsString, const ScAddress & rAddress, SvNumFormatType * pRetTypeExpr, unsigned long * pRetIndexExpr, bool bFinalResult) Line 703 sclo.dll!ScInterpreter::CalculateLookup(bool bHLookup) Line 7451 sclo.dll!ScInterpreter::ScVLookup() Line 7519 sclo.dll!ScInterpreter::Interpret() Line 4254 sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1939 sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1632 sclo.dll!ScFormulaCell::MaybeInterpret() Line 446 sclo.dll!ScFormulaCell::IsEmpty() Line 2733 sclo.dll!ScRefCellValue::hasEmptyValue() Line 681 sclo.dll!ScInterpreter::Compare(ScQueryOp eOp) Line 916 sclo.dll!ScInterpreter::ScLess() Line 1214 sclo.dll!ScInterpreter::Interpret() Line 4040 sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1939 sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1632 sclo.dll!ScFormulaCell::MaybeInterpret() Line 446 sclo.dll!ScFormulaCell::IsValue() Line 2745 sclo.dll!`anonymous namespace'::hasNumericImpl(CellType eType, ScFormulaCell * pFormula) Line 155 sclo.dll!ScRefCellValue::hasNumeric() Line 625 sclo.dll!ScInterpreter::FillEntry(ScQueryEntry & rEntry) Line 7484 sclo.dll!ScInterpreter::CalculateLookup(bool bHLookup) Line 7301 sclo.dll!ScInterpreter::ScVLookup() Line 7519 sclo.dll!ScInterpreter::Interpret() Line 4254 sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1939 sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1632 sclo.dll!ScFormulaCell::MaybeInterpret() Line 446 sclo.dll!ScFormulaCell::IsEmpty() Line 2733 sclo.dll!ScRefCellValue::hasEmptyValue() Line 681 sclo.dll!ScInterpreter::Compare(ScQueryOp eOp) Line 916 sclo.dll!ScInterpreter::ScLess() Line 1214 sclo.dll!ScInterpreter::Interpret() Line 4040 sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1939 sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1632 sclo.dll!lcl_InterpretSpan(std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<ScFormulaCell *>>> & rSpanIter, long nStartOffset, long nEndOffset, const boost::intrusive_ptr<ScFormulaCellGroup> & mxParentGroup, bool & bAllowThreading, ScDocument & rDoc) Line 1669 sclo.dll!lcl_EvalDirty(mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,svl::SharedString>,mdds::mtv::noncopyable_managed_element_block<53,EditTextObject>,mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell>>,sc::CellStoreEvent> & rCells, long nRow1, long nRow2, ScDocument & rDoc, const boost::intrusive_ptr<ScFormulaCellGroup> & mxGroup, bool bThreadingDepEval, bool bSkipRunning, bool & bIsDirty, bool & bAllowThreading) Line 1779 sclo.dll!ScColumn::HandleRefArrayForParallelism(long nRow1, long nRow2, const boost::intrusive_ptr<ScFormulaCellGroup> & mxGroup) Line 1854 sclo.dll!ScTable::HandleRefArrayForParallelism(short nCol, long nRow1, long nRow2, const boost::intrusive_ptr<ScFormulaCellGroup> & mxGroup) Line 2458 sclo.dll!ScDocument::HandleRefArrayForParallelism(const ScAddress & rPos, long nLength, const boost::intrusive_ptr<ScFormulaCellGroup> & mxGroup) Line 1828 sclo.dll!`anonymous namespace'::ScDependantsCalculator::DoIt() Line 4553 sclo.dll!ScFormulaCell::CheckComputeDependencies(sc::FormulaLogger::GroupScope & rScope, bool fromFirstRow, long nStartOffset, long nEndOffset, bool bCalcDependencyOnly) Line 4683 sclo.dll!ScFormulaCell::InterpretFormulaGroupOpenCL(sc::FormulaLogger::GroupScope & aScope, bool & bDependencyComputed, bool & bDependencyCheckFailed) Line 4988 sclo.dll!ScFormulaCell::InterpretFormulaGroup(long nStartOffset, long nEndOffset) Line 4644 sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1606 sclo.dll!ScFormulaCell::MaybeInterpret() Line 446 sclo.dll!ScFormulaCell::IsEmpty() Line 2733 sclo.dll!ScRefCellValue::hasEmptyValue() Line 681 sclo.dll!ScInterpreter::PushCellResultToken(bool bDisplayEmptyAsString, const ScAddress & rAddress, SvNumFormatType * pRetTypeExpr, unsigned long * pRetIndexExpr, bool bFinalResult) Line 692 sclo.dll!ScInterpreter::Interpret() Line 4633 sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1939 sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) Line 1632 sclo.dll!`anonymous namespace'::DirtyCellInterpreter::operator()(unsigned __int64 __formal, ScFormulaCell * p) Line 104 sclo.dll!sc::EachElem<mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell>,std::_Vector_iterator<std::_Vector_val<std::_Simple_types<ScFormulaCell *>>>,mdds::detail::mtv::iterator_value_node<unsigned __int64,mdds::mtv::base_element_block>,`anonymous namespace'::DirtyCellInterpreter>(mdds::detail::mtv::iterator_value_node<unsigned __int64,mdds::mtv::base_element_block> & rNode, unsigned __int64 nOffset, unsigned __int64 nDataSize, `anonymous-namespace'::DirtyCellInterpreter & rFuncElem) Line 110 sclo.dll!sc::ProcessElements1<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,svl::SharedString>,mdds::mtv::noncopyable_managed_element_block<53,EditTextObject>,mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell>>,sc::CellStoreEvent>,mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell>,`anonymous namespace'::DirtyCellInterpreter,sc::FuncElseNoOp<unsigned __int64,bool>>(const mdds::detail::mtv::iterator_base<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,svl::SharedString>,mdds::mtv::noncopyable_managed_element_block<53,EditTextObject>,mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell>>,sc::CellStoreEvent>::iterator_trait,mdds::detail::mtv::private_data_forward_update<mdds::detail::mtv::iterator_value_node<unsigned __int64,mdds::mtv::base_element_block>>> & itPos, mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,svl::SharedString>,mdds::mtv::noncopyable_managed_element_block<53,EditTextObject>,mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell>>,sc::CellStoreEvent> & rStore, unsigned __int64 nStart, unsigned __int64 nEnd, `anonymous-namespace'::DirtyCellInterpreter & rFuncElem, sc::FuncElseNoOp<unsigned __int64,bool> & rFuncElse) Line 354 sclo.dll!sc::ProcessFormula<`anonymous namespace'::DirtyCellInterpreter>(const mdds::detail::mtv::iterator_base<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,svl::SharedString>,mdds::mtv::noncopyable_managed_element_block<53,EditTextObject>,mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell>>,sc::CellStoreEvent>::iterator_trait,mdds::detail::mtv::private_data_forward_update<mdds::detail::mtv::iterator_value_node<unsigned __int64,mdds::mtv::base_element_block>>> & it, mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,svl::SharedString>,mdds::mtv::noncopyable_managed_element_block<53,EditTextObject>,mdds::mtv::noncopyable_managed_element_block<54,ScFormulaCell>>,sc::CellStoreEvent> & rStore, long nRow1, long nRow2, `anonymous-namespace'::DirtyCellInterpreter & rFuncElem) Line 33 sclo.dll!ScColumn::InterpretDirtyCells(long nRow1, long nRow2) Line 115 sclo.dll!ScTable::InterpretDirtyCells(short nCol1, long nRow1, short nCol2, long nRow2) Line 2504 sclo.dll!ScDocument::InterpretDirtyCells(const ScRangeList & rRanges) Line 3908 sclo.dll!ScMyOLEFixer::CreateChartListener(ScDocument * pDoc, const rtl::OUString & rName, const rtl::OUString & rRangeList) Line 101 sclo.dll!ScMyOLEFixer::FixupOLEs() Line 141 sclo.dll!ScMyTables::FixupOLEs() Line 77 sclo.dll!ScXMLImport::endDocument() Line 1700 expwraplo.dll!sax_fastparser::FastSaxParserImpl::parseStream(const com::sun::star::xml::sax::InputSource & rStructSource) Line 875 expwraplo.dll!sax_fastparser::FastSaxParser::parseStream(const com::sun::star::xml::sax::InputSource & aInputSource) Line 1373 mergedlo.dll!SvXMLImport::parseStream(const com::sun::star::xml::sax::InputSource & aInputSource) Line 488 sclo.dll!ScXMLImportWrapper::ImportFromComponent(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> & xContext, const com::sun::star::uno::Reference<com::sun::star::frame::XModel> & xModel, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XParser> & xParser, com::sun::star::xml::sax::InputSource & aParserInput, const rtl::OUString & sComponentName, const rtl::OUString & sDocName, const rtl::OUString & sOldDocName, const com::sun::star::uno::Sequence<com::sun::star::uno::Any> & aArgs, bool bMustBeSuccessfull) Line 189 sclo.dll!ScXMLImportWrapper::Import(ImportFlags nMode, ErrCode & rError) Line 513 sclo.dll!ScDocShell::LoadXML(SfxMedium * pLoadMedium, const com::sun::star::uno::Reference<com::sun::star::embed::XStorage> & xStor) Line 481 sclo.dll!ScDocShell::Load(SfxMedium & rMedium) Line 628 mergedlo.dll!SfxObjectShell::LoadOwnFormat(SfxMedium & rMedium) Line 3033 mergedlo.dll!SfxObjectShell::DoLoad(SfxMedium * pMed) Line 674 mergedlo.dll!SfxBaseModel::load(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & seqArguments) Line 1879 mergedlo.dll!`anonymous namespace'::SfxFrameLoader_Impl::load(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & rArgs, const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> & _rTargetFrame) Line 680 mergedlo.dll!framework::LoadEnv::impl_loadContent() Line 1157 mergedlo.dll!framework::LoadEnv::start() Line 395 mergedlo.dll!framework::LoadEnv::startLoading(const rtl::OUString & sURL, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & lMediaDescriptor, const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> & xBaseFrame, const rtl::OUString & sTarget, long nSearchFlags, LoadEnvFeatures eFeature) Line 300 mergedlo.dll!framework::LoadEnv::loadComponentFromURL(const com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> & xLoader, const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> & xContext, const rtl::OUString & sURL, const rtl::OUString & sTarget, long nSearchFlags, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & lArgs) Line 169 mergedlo.dll!framework::Desktop::loadComponentFromURL(const rtl::OUString & sURL, const rtl::OUString & sTargetFrameName, long nSearchFlags, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & lArguments) Line 613 unotest.dll!unotest::MacrosTest::loadFromDesktop(const rtl::OUString & rURL, const rtl::OUString & rDocService, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & rExtraArgs) Line 57 test_sc_uicalc.dll!ScUiCalcTest::createDoc(const char * pName) Line 64 test_sc_uicalc.dll!testTdf124815::TestBody() Line 138 test_sc_uicalc.dll!std::_Invoker_pmf_pointer::_Call<void (__cdecl testTdf124815::*)(void),testTdf124815 * &>(void(testTdf124815::*)() _Pmf, testTdf124815 * & _Arg1) Line 1579 test_sc_uicalc.dll!std::invoke<void (__cdecl testTdf124815::*&)(void),testTdf124815 * &>(void(testTdf124815::*)() & _Obj, testTdf124815 * & <_Args_0>) Line 1579 test_sc_uicalc.dll!std::_Invoker_ret<std::_Unforced,0>::_Call<void (__cdecl testTdf124815::*&)(void),testTdf124815 * &>(void(testTdf124815::*)() & <_Vals_0>, testTdf124815 * & <_Vals_1>) Line 1615 test_sc_uicalc.dll!std::_Call_binder<std::_Unforced,0,void (__cdecl testTdf124815::*)(void),std::tuple<testTdf124815 *>,std::tuple<>>(std::_Invoker_ret<std::_Unforced,0> __formal, std::integer_sequence<unsigned __int64,0> __formal, void(testTdf124815::*)() & _Obj, std::tuple<testTdf124815 *> & _Tpl, std::tuple<> && _Ut) Line 1402 test_sc_uicalc.dll!std::_Binder<std::_Unforced,void (__cdecl testTdf124815::*&)(void),testTdf124815 * &>::operator()<>() Line 1442 test_sc_uicalc.dll!std::_Invoker_functor::_Call<std::_Binder<std::_Unforced,void (__cdecl testTdf124815::*&)(void),testTdf124815 * &> &>(std::_Binder<std::_Unforced,void (__cdecl testTdf124815::*&)(void),testTdf124815 * &> & _Obj) Line 1579 test_sc_uicalc.dll!std::invoke<std::_Binder<std::_Unforced,void (__cdecl testTdf124815::*&)(void),testTdf124815 * &> &>(std::_Binder<std::_Unforced,void (__cdecl testTdf124815::*&)(void),testTdf124815 * &> & _Obj) Line 1579 test_sc_uicalc.dll!std::_Invoker_ret<void,1>::_Call<std::_Binder<std::_Unforced,void (__cdecl testTdf124815::*&)(void),testTdf124815 * &> &>(std::_Binder<std::_Unforced,void (__cdecl testTdf124815::*&)(void),testTdf124815 * &> & <_Vals_0>) Line 1598 test_sc_uicalc.dll!std::_Func_impl_no_alloc<std::_Binder<std::_Unforced,void (__cdecl testTdf124815::*&)(void),testTdf124815 * &>,void>::_Do_call() Line 927 test_sc_uicalc.dll!std::_Func_class<void>::operator()() Line 970 test_sc_uicalc.dll!CppUnit::TestCaller<testTdf124815>::runTest() Line 176 cppunitd_dll.dll!CppUnit::TestCaseMethodFunctor::operator()() Line 33 vclbootstrapprotector.dll!`anonymous namespace'::Protector::protect(const CppUnit::Functor & functor, const CppUnit::ProtectorContext & __formal) Line 46 cppunitd_dll.dll!CppUnit::ProtectorChain::ProtectFunctor::operator()() Line 21 unobootstrapprotector.dll!`anonymous namespace'::Prot::protect(const CppUnit::Functor & functor, const CppUnit::ProtectorContext & __formal) Line 79 cppunitd_dll.dll!CppUnit::ProtectorChain::ProtectFunctor::operator()() Line 21 unoexceptionprotector.dll!`anonymous namespace'::Prot::protect(const CppUnit::Functor & functor, const CppUnit::ProtectorContext & context) Line 61 cppunitd_dll.dll!CppUnit::ProtectorChain::ProtectFunctor::operator()() Line 21 cppunitd_dll.dll!CppUnit::DefaultProtector::protect(const CppUnit::Functor & functor, const CppUnit::ProtectorContext & context) Line 15 cppunitd_dll.dll!CppUnit::ProtectorChain::ProtectFunctor::operator()() Line 21 cppunitd_dll.dll!CppUnit::ProtectorChain::protect(const CppUnit::Functor & functor, const CppUnit::ProtectorContext & context) Line 86 cppunitd_dll.dll!CppUnit::TestResult::protect(const CppUnit::Functor & functor, CppUnit::Test * test, const std::string & shortDescription) Line 182 cppunitd_dll.dll!CppUnit::TestCase::run(CppUnit::TestResult * result) Line 91 cppunitd_dll.dll!CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult * controller) Line 65 cppunitd_dll.dll!CppUnit::TestComposite::run(CppUnit::TestResult * result) Line 24 cppunitd_dll.dll!CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult * controller) Line 65 cppunitd_dll.dll!CppUnit::TestComposite::run(CppUnit::TestResult * result) Line 24 cppunitd_dll.dll!CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult * result) Line 47 cppunitd_dll.dll!CppUnit::TestResult::runTest(CppUnit::Test * test) Line 150 cppunitd_dll.dll!CppUnit::TestRunner::run(CppUnit::TestResult & controller, const std::string & testPath) Line 96 cppunittester.exe!`anonymous namespace'::ProtectedFixtureFunctor::run() Line 316 cppunittester.exe!sal_main() Line 466 cppunittester.exe!main(int argc, char * * argv) Line 373 cppunittester.exe!invoke_main() Line 79 cppunittester.exe!__scrt_common_main_seh() Line 288 cppunittester.exe!__scrt_common_main() Line 331 cppunittester.exe!mainCRTStartup() Line 17 kernel32.dll!BaseThreadInitThunk() ntdll.dll!RtlUserThreadStart() ======================= It doesn't happen on Linux; opening the test file in Calc succeeds on Windows. We set stack size of soffice.bin to 10000 in desktop/Executable_soffice_bin.mk; let's do the same for cppunittester, that had the default stack of 1 M [1], which is obviously too small and does not match existing recursion control values in the code (see ScFormulaCell::Interpret). [1] https://docs.microsoft.com/en-us/windows/win32/procthread/thread-stack-size Change-Id: I30e6abaea120d6ed5bafb798628e7fc26a8dac59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90556 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-03-14tdf#130975 replace `rtl::math::isNan` with `std::isnan`.Yukio Siraichi2-14/+14
Change-Id: I5d53e6369d35093445b2efd8936bbf8c6775ff47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90451 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-03-14tdf#130974 replace `rtl::math::isSignBitSet` with `std::signbit`.Yukio Siraichi2-14/+14
Change-Id: I91235eee8c6a9d4a59c1933527b49141f64cd91b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90478 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-03-12tdf#130976 replace `rtl::math::isInf` with `std::inf`.Yukio Siraichi2-11/+11
Change-Id: Id0f0e07b324230d2d69cbf4ab07b0fff5b24474d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90377 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-03-12tdf#130977 replace `rtl::math::isFinite` with `std::isfinite`.Yukio Siraichi1-5/+5
- make all calls look like `std::isfinite`. - change the comments referring `rtl::math::isFinite`. Change-Id: I0cde9ceb9f20150467b454cddde5e62003cfde1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90234 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-03-12Revert "loplugin:constfields in reportdesign,sal,sax"Noel Grandin19-89/+89
This reverts commit d4d37662b090cb237585156a47cd8e1f1cbe2656. Now that we know that making fields has negative side effects like disabling assignment operator generation. Change-Id: Idef4937b89a83d2efbfaf0ab87d059a0143c0164 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90364 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-11Get rid of some SAL_MATH_FINITE useStephan Bergmann1-4/+2
Change-Id: I850efb6215c95d356d42e19e639c578c377d1507 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90316 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-04ofz#21036: Avoid UBSan signed-integer-overflow in external/dtoaStephan Bergmann1-0/+5
> workdir/UnpackedTarball/dtoa/src/dtoa.c:3624:12: runtime error: signed integer overflow: 10 * 858993459 cannot be represented in type 'int' > #0 in strtod_nolocale at workdir/UnpackedTarball/dtoa/src/dtoa.c:3624:12 (instdir/program/libuno_sal.so.3 +0x55286d) > #1 in double (anonymous namespace)::stringToDouble<char16_t>(char16_t const*, char16_t const*, char16_t, char16_t, rtl_math_ConversionStatus*, char16_t const**) at sal/rtl/math.cxx:976:20 (instdir/program/libuno_sal.so.3 +0x3b5f0e) > #2 in rtl_math_uStringToDouble at sal/rtl/math.cxx:1028:12 (instdir/program/libuno_sal.so.3 +0x3b1714) [...] Change-Id: If24fca1fb4829ddd763c9920a1af9a90dc2b138c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89966 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-27avoid memory leak in win32 sal::backtrace_get()Luboš Luňák2-63/+14
Running a presentation with OpenGL transitions with Skia+Vulkan as the VCL drawing very quickly runs out of memory in dbgutil builds. The trigger is svl/source/notify/lstner.cxx calling sal::backtrace_get() quite often. And that function calls SymInitialize() repeatedly even though its docs say not to do it, and that is also actually not necessary for CaptureStackBackTrace(), only for the symbol resolving Sym* functions. It actually still eventually aborts if called often enough, but this way it is triggered only by printing the backtrace and not just getting it. I have no idea why the problem is triggered only in these rather specific circumstances, e.g. Skia+raster seems to be fine. Also avoid the needless copy&paste while I'm at it. Change-Id: I50f9e0689b9b9b10bf54308db654aed6433085db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89626 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-02-27Related: tdf#130725: use strtod also in rtl::math::stringToDoubleMike Kaganski3-132/+105
Size of buffer on stack is 256 characters. Logging function usage in make check, of >1 100 000 invocations, the longest string was 80 characters, average being 4.6 characters. So heap allocation is unlikely in scenarios with intensive function usage. Several existing unit tests had to be fixed. Usually, the change is either minimal or getting closer to what Excel returns (for Calc tests). But in case of AMORDEGRC, I had to change rate value passed to the function from 0.3 to 0.31. It's because the closest double value for 0.3 is 0.29999999999999999, which is a bit less than 0.3; multiplied by 1.5, this gives 0.44999999999999996, and then rounding the result of multiplication of the latter by cost gave the result 1 less than before, when 0.3 was imported as 0.30000000000000004. Now the function returns a value 1 less than Excel for that set of arguments. I don't see how to fix that. Having rate slightly different gives consistent result between Calc and Excel. Change-Id: Icae5ce374fe0c31a1aa10cee815e65ef0014f382 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89422 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-02-12clang-analyzer-deadcode.DeadStoresNoel Grandin1-1/+1
Change-Id: Ifa384933569b27d0d08eb479bb95b799163ae386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88450 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-03loplugin:unsignedcompare (clang-cl)Stephan Bergmann1-1/+2
Change-Id: I69cc1b352221ca053ccd0c5b78e926480a8c9ccd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87884 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-03Remove unnecessary castStephan Bergmann1-1/+1
Change-Id: I675d9e0a87a54eb08abfca114864369b326fb128 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87882 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-01make update_pch also consider files in <module>/src/**/incLuboš Luňák1-1/+2
With --enable-pch=full there's not much difference between a "public" header in <module>/inc and a private one in <module>/src/somewhere/inc . And since the script searches recursively, this apparently helps to find even more headers for lower pch levels. Change-Id: I8483d0aa5b4fea5a59107c20a8aa5f1ef694af0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87799 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-31clang-tidy modernize-concat-nested-namespaceNoel Grandin13-27/+25
Change-Id: Iab35a8b85b3ba1df791c774f40b037f9420a071a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-28loplugin:unsignedcompare (--enable-cipher-openssl-backend)Stephan Bergmann1-4/+5
Change-Id: Iab5ab11059437a595596e8ba3ec7aa45cec15f0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87617 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-28tdf#96505: Get rid of cargo cult long integer literalsOnur Yilmaz2-4/+4
I checked return values. Long variables didn't affect the calculation. Change-Id: Ia3713eedf275de71b1096d1fe7e22da012a7f94e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87493 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-28New loplugin:unsignedcompareStephan Bergmann5-9/+14
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-27Use Linux gettid as available since glibc 2.30Stephan Bergmann1-3/+14
Change-Id: I793f91a1fe601cff367be7c178f4e712f0f97117 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87488 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-26tdf#124176: Use pragma once instead of include guardsBurak Bala1-4/+1
Change-Id: Ib2465f040f12413560b2cec1c742cf3558461309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87404 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-26cppcheck: shadowFunction in sal/file_urlJulien Nabet1-6/+6
Change-Id: I7454640278f4af0f71f429b45c9f1e40f7be0545 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87433 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2020-01-26cppcheck: shadowFunction in sal/osl_FileJulien Nabet1-4/+4
Change-Id: I7d264faad080428459e499c786f25b3e06a6700b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-25tdf#124176: Use pragma once instead of include guardsiakarsu1-5/+1
Change-Id: Ibf31d5b97017f875e62b609beef0ecdebd559502 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87391 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-25Change some #define to constexprStephan Bergmann1-7/+7
...plus loplugin:unnecessaryparen fallout in sw/source/uibase/docvw/edtwin.cxx. Each of the files contained at least one #define that would have caused warnings with upcoming loplugin:unsignedcompare. For consistency, I changed all #defines in those files (using a variable of a specific type if the original #define used a cast to that type, otherwise using 'auto'). Change-Id: I66f71b2d83394c9dc6952ae19df774cdd4d0b76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87374 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-18Removed redundant semicolonAndrea Gelmini1-1/+1
Change-Id: Ice0c5f413f176ce6eb832dc8b06010595f214857 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86582 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-15Clean up safeRead/WriteStephan Bergmann2-15/+27
...using more appropriate parameter types, replacing cheesy OSL_ASSERT overflow checks with cap_ssize_t, and replacing one remaining good OSL_ASSERT in safeWrite with assert. Change-Id: I6105ba5135216333e68003458be7ca28f1715a51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86807 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-08Grammar fixesAndrea Gelmini1-1/+1
Change-Id: I6ac6f6abb601aa254e94612e6826488393de8e3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86383 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-01-03android: file-cache to improve performance.Michael Meeks1-33/+120
The transition to java - interestingly to free the passed buffer was showing on profiles. Also cleanup the /assets// handling a little. Change-Id: Id1f4f6e60896c3f42fcbf761e535b68318e0a0a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86169 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-27Fix typoAndrea Gelmini1-1/+1
Change-Id: Ibd3ece30c6cbb9582904adc5e329f54d41cff33b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85872 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-27sal_osl_security: Windows: Handle cases with same hostname and usernameMike Kaganski1-1/+13
... as seen in [build CUT] sal_osl_security #Initializing ... # #logonUser function need root/Administrator account to test. #You can test by login with root/Administrator, and execute: #testshl2 -forward "username password" ../../../wntmsci9/bin/Security.dll # where username and password are forwarded account info. #if no text forwarded, this function will be skipped. # #Retrieved system information is below: Computer Name: SOMENAME Current User Name: Somename Current User Home Directory:file:///C:/Users/Somename/Documents Current Config Directory: file:///C:/Users/Somename/AppData/Roaming Current UserID: S-1-5-21-1234567890-123456789-123456789 Current User is: NOT Administrator. # #Initialization Done. osl_Security::ctors::ctors_001 finished in: 0ms osl_Security::UserProfile::loadUserProfile finished in: 0ms osl_Security::UserProfile::unloadUserProfile finished in: 0ms osl_Security::getHandle::getHandle_001 finished in: 0ms osl_Security::loginUserOnFileServer::loginUserOnFileServer_001 finished in: 3ms osl_Security::getConfigDir::getConfigDir_001 finished in: 1ms C:/cygwin/home/Somename/lode/dev/core/sal/qa/osl/security/osl_Security.cxx:139:osl_Security::getUserIdent::getUserIdent_001 equality assertion failed - Expected: S-1-5-21-1234567890-123456789-123456789 - Actual : S-1-5-21-1234567890-123456789-123456789-1001 - strUserID: S-1-5-21-1234567890-123456789-123456789, strID: S-1-5-21-1234567890-123456789-123456789-1001, bRes: true osl_Security::getUserIdent::getUserIdent_001 finished in: 0ms osl_Security::getUserName::getUserName_001 finished in: 1ms osl_Security::isAdministrator::isAdministrator_001 finished in: 0ms C:/cygwin/home/Somename/lode/dev/core/sal/qa/osl/security/osl_Security.cxx(139) : error : Assertion Test name: osl_Security::getUserIdent::getUserIdent_001 equality assertion failed - Expected: S-1-5-21-1234567890-123456789-123456789 - Actual : S-1-5-21-1234567890-123456789-123456789-1001 - strUserID: S-1-5-21-1234567890-123456789-123456789, strID: S-1-5-21-1234567890-123456789-123456789-1001, bRes: true Failures !!! Run: 9 Failure total: 1 Failures: 1 Errors: 0 The problem here is that passing a string equal to hostname (case-insensitive) to LookupAccountNameW without domain qualifier returns data for local system domain, not for user with the same name. So let's try again, this time with fully-qualified user name including local domain part. Change-Id: I15f69c01dddf15782bd11a6ed6678f0a02d79786 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85859 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-19sal_Char->char in remotebridges..saxNoel Grandin42-540/+540
Change-Id: I6d32942960a5e997f16eb1301c45495661cd4cea Reviewed-on: https://gerrit.libreoffice.org/85514 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-11Fix typoAndrea Gelmini1-1/+1
Change-Id: Idbcf73ea3034b62e283537e052c17a9fb3988a8b Reviewed-on: https://gerrit.libreoffice.org/84918 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-10use scoped enumStephan Bergmann1-30/+38
Change-Id: I70831ca727dbfca2ea77109e119aac9a110ccf45 Reviewed-on: https://gerrit.libreoffice.org/84858 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>