[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - formula/source
formula/source/ui/dlg/FormulaHelper.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 2c398d1b669551352d8916e792447ec6e495e9c1 Author: Eike Rathke er...@redhat.com Date: Mon Mar 30 21:29:46 2015 +0200 Resolves: tdf#90301 string access out of bounds Apparently yet another leftover of UniString to OUString conversion where with UniString out-of-bounds accesses didn't harm and returned NIL. (cherry picked from commit eed393039a9067f7a1a318934ff1c5ff90bfe443) Include algorithm for std::min() (cherry picked from commit 3394ac816a573030feda145dbdabd2a1eabd78c4) Change-Id: Id88456a52df3fc8cdaf90d9d509e327b96269808 13ed47d23ed4b94501d944d99ce08af94698 Reviewed-on: https://gerrit.libreoffice.org/15075 Tested-by: David Tardon dtar...@redhat.com Reviewed-by: David Tardon dtar...@redhat.com diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx index 6c999bd..9d9bda1 100644 --- a/formula/source/ui/dlg/FormulaHelper.cxx +++ b/formula/source/ui/dlg/FormulaHelper.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include algorithm + #include formula/formulahelper.hxx #include unotools/charclass.hxx #include unotools/syslocale.hxx @@ -201,7 +203,7 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString rFormula, return nStart; sal_Int32 nFStart = FUNC_NOTFOUND; -sal_Int32 nParPos = nStart; +sal_Int32 nParPos = bBack ? ::std::min( nStart, nStrLen - 1) : nStart; bool bRepeat, bFound; do ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - formula/source
formula/source/core/api/FormulaCompiler.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 8e89b2673af9e135b74ad93b08737962d6fee3d8 Author: Winfried Donkers winfrieddonk...@libreoffice.org Date: Thu Jan 15 10:35:32 2015 +0100 fdo#87534 fix HYPERLINK behaviour when used in names When using HYPERLINK() in names, the hyperlink was set to disabled on copying token. After fix, behaviour is consistent. Note: reducing the fix to 1 line does not work, a set hyperlink is only to be copied when applicable. Change-Id: I27ad24ed8912afa548f08d249ad51d18a792c275 Reviewed-on: https://gerrit.libreoffice.org/13920 Reviewed-by: Eike Rathke er...@redhat.com Tested-by: Eike Rathke er...@redhat.com (cherry picked from commit 944886f6d96843ca4f5833ecca48a693c81abc3b) Reviewed-on: https://gerrit.libreoffice.org/14449 diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 2e066af..d41de27 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1714,6 +1714,8 @@ void FormulaCompiler::PopTokenArray() else if ( !pArr-IsRecalcModeNormal() p-pArr-IsRecalcModeNormal() ) p-pArr-SetMaskedRecalcMode( pArr-GetRecalcMode() ); p-pArr-SetCombinedBitsRecalcMode( pArr-GetRecalcMode() ); +if ( pArr-IsHyperLink() ) // fdo 87534 +p-pArr-SetHyperLink( true ); if( p-bTemp ) delete pArr; pArr = p-pArr; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - formula/source sc/source
formula/source/core/resource/core_resource.src |3 ++- sc/source/core/tool/compiler.cxx |1 + sc/source/filter/excel/xlformula.cxx |3 ++- sc/source/filter/oox/formulabase.cxx |3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) New commits: commit ad592d8fbc7797641c4ca9c967aad47ab22e6f9c Author: Eike Rathke er...@redhat.com Date: Thu Aug 21 15:06:46 2014 +0200 write COLOR function with extension namespace and add to Excel import/export maps so it survives saving in that format Change-Id: I3a8e07fdd1bded77d4bad60eefffeb0b1dbdd734 (cherry picked from commit 7c6a82d66ebe55fa5ce106bf60f841dd7758d2bc) Reviewed-on: https://gerrit.libreoffice.org/11059 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src index 259eda0..6f7f8d5 100644 --- a/formula/source/core/resource/core_resource.src +++ b/formula/source/core/resource/core_resource.src @@ -423,7 +423,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF /* END defined ERROR.TYPE() values. */ String SC_OPCODE_FILTERXML { Text = COM.MICROSOFT.FILTERXML;}; String SC_OPCODE_WEBSERVICE{ Text = COM.MICROSOFT.WEBSERVICE; }; -String SC_OPCODE_COLOR { Text = COLOR; }; +String SC_OPCODE_COLOR { Text = ORG.LIBREOFFICE.COLOR; }; String SC_OPCODE_ERF_MS { Text = COM.MICROSOFT.ERF.PRECISE ; }; String SC_OPCODE_ERFC_MS { Text = COM.MICROSOFT.ERFC.PRECISE ; }; }; @@ -830,6 +830,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML /* END defined ERROR.TYPE() values. */ String SC_OPCODE_FILTERXML { Text = _xlfn.FILTERXML;}; String SC_OPCODE_WEBSERVICE{ Text = _xlfn.WEBSERVICE; }; +String SC_OPCODE_COLOR { Text = _xlfn.ORG.LIBREOFFICE.COLOR; }; String SC_OPCODE_ERF_MS { Text = _xlfn.ERF.PRECISE ; }; String SC_OPCODE_ERFC_MS { Text = _xlfn.ERFC.PRECISE ; }; }; diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 0af9ad3..cd9bc4d 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2372,6 +2372,7 @@ bool ScCompiler::IsOpCode( const OUString rName, bool bInArray ) { TDIST, ocTDist }, // TDIST - LEGACY.TDIST { EASTERSUNDAY, ocEasterSunday }, // EASTERSUNDAY - ORG.OPENOFFICE.EASTERSUNDAY { ZGZ,ocZGZ },// ZGZ - RRI +{ COLOR, ocColor }, // COLOR - ORG.LIBREOFFICE.COLOR // Renamed new names, prepare to read future names: { ORG.OPENOFFICE.GOALSEEK, ocBackSolver } // GOALSEEK - ORG.OPENOFFICE.GOALSEEK }; diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx index ff3d1c7..675cee4 100644 --- a/sc/source/filter/excel/xlformula.cxx +++ b/sc/source/filter/excel/xlformula.cxx @@ -593,7 +593,8 @@ static const XclFunctionInfo saFuncTable_Odf[] = /** Functions defined by Calc, but not in OpenFormula nor supported by Excel. */ static const XclFunctionInfo saFuncTable_OOoLO[] = { -EXC_FUNCENTRY_OOO( ocConvert, 3, 3, 0, ORG.OPENOFFICE.CONVERT ) +EXC_FUNCENTRY_OOO( ocConvert, 3, 3, 0, ORG.OPENOFFICE.CONVERT ), +EXC_FUNCENTRY_OOO( ocColor, 3, 4, 0, ORG.LIBREOFFICE.COLOR ) }; #undef EXC_FUNCENTRY_OOO diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index 590384c..7a1e78c 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -918,7 +918,8 @@ static const FunctionData saFuncTableOOoLO[] = { ORG.OPENOFFICE.WEEKSINYEAR, COM.SUN.STAR.SHEET.ADDIN.DATEFUNCTIONS.GETWEEKSINYEAR, NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_IMPORTONLY | FUNCFLAG_EXTERNAL }, { ORG.OPENOFFICE.ROT13, COM.SUN.STAR.SHEET.ADDIN.DATEFUNCTIONS.GETROT13, NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_IMPORTONLY | FUNCFLAG_EXTERNAL }, // Other functions. -{ ORG.OPENOFFICE.CONVERT, ORG.OPENOFFICE.CONVERT, NOID, NOID, 3, 3, V, { VR }, FUNCFLAG_MACROCALL_NEW } +{ ORG.OPENOFFICE.CONVERT, ORG.OPENOFFICE.CONVERT, NOID, NOID, 3, 3, V, { VR }, FUNCFLAG_MACROCALL_NEW }, +{ ORG.LIBREOFFICE.COLOR, ORG.LIBREOFFICE.COLOR,NOID, NOID, 3, 4, V, { VR }, FUNCFLAG_MACROCALL_NEW } }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - formula/source include/formula
formula/source/ui/dlg/FormulaHelper.cxx |4 +++- include/formula/IFunctionDescription.hxx |5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) New commits: commit 9f149784501b6c867f6136d94d438ad926964efd Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu Jul 31 21:43:59 2014 +0200 fix memory leak around function descriptions Found by Lsan. Change-Id: Ia443ed6eb2a20854998a615f3c2bd9fdac156a8c (cherry picked from commit 3d6521280929ecacc53b7c358d29d0b5d31b3462) Reviewed-on: https://gerrit.libreoffice.org/10740 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx index 5805778..6c999bd 100644 --- a/formula/source/ui/dlg/FormulaHelper.cxx +++ b/formula/source/ui/dlg/FormulaHelper.cxx @@ -21,6 +21,8 @@ #include unotools/charclass.hxx #include unotools/syslocale.hxx +#include boost/scoped_ptr.hpp + namespace formula { @@ -91,7 +93,7 @@ bool FormulaHelper::GetNextFunc( const OUString rFormula, const sal_uInt32 nCategoryCount = m_pFunctionManager-getCount(); for(sal_uInt32 j= 0; j nCategoryCount !*ppFDesc; ++j) { -const IFunctionCategory* pCategory = m_pFunctionManager-getCategory(j); +boost::scoped_ptrconst IFunctionCategory pCategory(m_pFunctionManager-getCategory(j)); const sal_uInt32 nCount = pCategory-getCount(); for(sal_uInt32 i = 0 ; i nCount; ++i) { diff --git a/include/formula/IFunctionDescription.hxx b/include/formula/IFunctionDescription.hxx index 7f75d64..aceac35 100644 --- a/include/formula/IFunctionDescription.hxx +++ b/include/formula/IFunctionDescription.hxx @@ -60,7 +60,7 @@ namespace formula ~IFunctionManager() {} }; -class SAL_NO_VTABLE IFunctionCategory +class IFunctionCategory { public: IFunctionCategory(){} @@ -70,8 +70,7 @@ namespace formula virtual sal_uInt32 getNumber() const = 0; virtual OUString getName() const = 0; -protected: -~IFunctionCategory() {} +virtual ~IFunctionCategory() {} }; class SAL_NO_VTABLE IFunctionDescription ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits