[Libreoffice-commits] core.git: include/formula sc/inc sc/source

2023-02-22 Thread Eike Rathke (via logerrit)
 include/formula/tokenarray.hxx |5 +
 sc/inc/document.hxx|2 +-
 sc/inc/formulacell.hxx |3 ++-
 sc/source/core/data/formulacell.cxx|8 +++-
 sc/source/filter/oox/formulabuffer.cxx |   31 ---
 sc/source/ui/view/output2.cxx  |   13 +++--
 6 files changed, 46 insertions(+), 16 deletions(-)

New commits:
commit 05ac57f85eb622b798719db03bbdd07b79e1703a
Author: Eike Rathke 
AuthorDate: Thu Feb 23 01:22:16 2023 +0100
Commit: Eike Rathke 
CommitDate: Thu Feb 23 01:33:48 2023 +

Resolves: tdf#153767 Try harder to import OOXML bool shared formula result

... by setting the result value or if necessary recalculating even if
AutoCalc is turned off for the document. Similar for other implicitly
recalculating formula types.
Also set a boolean number format if none.

Change-Id: I2f75735707180eccf4b2c525738ac0b763901230
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147425
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index cbff6a3e469d..330543d427dc 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -430,6 +430,11 @@ public:
 example OOXML. */
 boolIsRecalcModeMustAfterImport() const
 { return (nMode & ScRecalcMode::EMask) <= 
ScRecalcMode::ONLOAD_ONCE; }
+voidClearRecalcModeMustAfterImport()
+{
+if (IsRecalcModeMustAfterImport() && 
!IsRecalcModeAlways())
+SetExclusiveRecalcModeNormal();
+}
 
 /** Get OpCode of the most outer function */
 inline OpCode   GetOuterFuncOpCode() const;
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 20e42a999ac8..c6b2f2289ddb 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1224,7 +1224,7 @@ public:
 SC_DLLPUBLIC sal_uInt32   GetNumberFormat( SCCOL nCol, 
SCROW nRow, SCTAB nTab ) const;
 sal_uInt32GetNumberFormat( const ScRange& 
rRange ) const;
 SC_DLLPUBLIC sal_uInt32   GetNumberFormat( const 
ScInterpreterContext& rContext, const ScAddress& ) const;
-void  SetNumberFormat( const 
ScAddress& rPos, sal_uInt32 nNumberFormat );
+SC_DLLPUBLIC void SetNumberFormat( const 
ScAddress& rPos, sal_uInt32 nNumberFormat );
 
 void  GetNumberFormatInfo( const 
ScInterpreterContext& rContext, SvNumFormatType& nType, sal_uInt32& nIndex, 
const ScAddress& rPos ) const;
 SC_DLLPUBLIC const ScFormulaCell* GetFormulaCell( const ScAddress& 
rPos ) const;
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index e4bc41772e0e..42b7f6120149 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -445,7 +445,8 @@ public:
 if (!IsDirtyOrInTableOpDirty())
 return false;
 
-return (rDocument.GetAutoCalc() || (cMatrixFlag != 
ScMatrixMode::NONE));
+return rDocument.GetAutoCalc() || (cMatrixFlag != ScMatrixMode::NONE)
+|| (pCode->IsRecalcModeMustAfterImport() && 
!pCode->IsRecalcModeAlways());
 }
 
 void MaybeInterpret()
diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 143b27579a83..0e2840284ec5 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2331,6 +2331,8 @@ void ScFormulaCell::InterpretTail( ScInterpreterContext& 
rContext, ScInterpretTa
 OSL_ENSURE( pCode->GetCodeError() != FormulaError::NONE, "no RPN code 
and no errors ?!?!" );
 ResetDirty();
 }
+
+pCode->ClearRecalcModeMustAfterImport();
 }
 
 void ScFormulaCell::HandleStuffAfterParallelCalculation(ScInterpreter* 
pInterpreter)
@@ -2546,7 +2548,7 @@ void ScFormulaCell::SetDirty( bool bDirtyFlag )
 // the FormulaTree, once in there it would be assumed that its
 // dependents already had been tracked and it would be skipped on a
 // subsequent notify. Postpone tracking until all listeners are set.
-if (!rDocument.IsImportingXML())
+if (!rDocument.IsImportingXML() && 
!rDocument.IsInsertingFromOtherDoc())
 rDocument.TrackFormulas();
 }
 
@@ -2647,10 +2649,6 @@ void ScFormulaCell::AddRecalcMode( ScRecalcMode nBits )
 {
 if ( (nBits & ScRecalcMode::EMask) != ScRecalcMode::NORMAL )
 SetDirtyVar();
-if ( nBits & ScRecalcMode::ONLOAD_ONCE )
-{   // OnLoadOnce is used only to set Dirty after filter import.
-nBits = (nBits & ~ScRecalcMode::EMask) | ScRecalcMode::NORMAL;
-}
 pCode->AddRecalcMode( nBits );
 }
 
diff --git 

[Libreoffice-commits] core.git: include/formula sc/inc sc/source

2018-07-19 Thread Libreoffice Gerrit user
 include/formula/errorcodes.hxx   |4 
 sc/inc/globstr.hrc   |1 +
 sc/source/core/data/global.cxx   |3 +++
 sc/source/core/tool/interpr7.cxx |   35 ---
 4 files changed, 32 insertions(+), 11 deletions(-)

New commits:
commit da9a6f426b61937d9cda17f5be3f82d2e15e6ecd
Author: Eike Rathke 
AuthorDate: Thu Jul 19 17:39:02 2018 +0200
Commit: Eike Rathke 
CommitDate: Thu Jul 19 20:36:22 2018 +0200

Related: tdf#118735 introduce FormulaError::LinkFormulaNeedingCheck 
(Err:540)

To indicate why the result isn't available ("External content
disabled") and in future maybe signal to the formula cell that it
could keep the hybrid string result, see source code comment.

Change-Id: Ic5d336b8489e8776f7b640b7e46815e71d0a82a4
Reviewed-on: https://gerrit.libreoffice.org/57738
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/include/formula/errorcodes.hxx b/include/formula/errorcodes.hxx
index d4324a998db0..7afce495b6de 100644
--- a/include/formula/errorcodes.hxx
+++ b/include/formula/errorcodes.hxx
@@ -83,6 +83,9 @@ enum class FormulaError : sal_uInt16
 MatrixSize   = 538,
 // Bad inline array content, non-value/non-string.
 BadArrayContent  = 539,
+// Interpreter: signal result not available because updating links is not
+// allowed (yet) and tell to try hybrid string as result.
+LinkFormulaNeedingCheck = 540,
 
 // Interpreter: NA() not available condition, not a real error
 NotAvailable = 0x7fff
@@ -171,6 +174,7 @@ inline bool isPublishedFormulaError( FormulaError nErr )
 return false;
 
 case FormulaError::MatrixSize:
+case FormulaError::LinkFormulaNeedingCheck:
 return true;
 
 case FormulaError::NotAvailable:
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 326c9f01c455..09caaf80423c 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -510,6 +510,7 @@
 #define STR_TEXTNC_("STR_TEXT", "Text")
 #define STR_QUERY_PIVOTTABLE_DELTAB 
NC_("STR_QUERY_PIVOTTABLE_DELTAB", "The selected sheet(s) contain source data 
of related pivot tables that will be lost. Are you sure you want to delete the 
selected sheet(s)?")
 #define STR_ERR_NAME_INVALID_CELL_REF   
NC_("STR_ERR_NAME_INVALID_CELL_REF", "Invalid name. Reference to a cell, or a 
range of cells not allowed.")
+#define STR_ERR_LONG_LINK_FORMULA_NEEDING_CHECK 
NC_("STR_ERR_LONG_LINK_FORMULA_NEEDING_CHECK", "External content disabled.")
 
 #endif
 
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 825278134b43..cf0bd92371da 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -423,6 +423,9 @@ OUString ScGlobal::GetLongErrorString(FormulaError nErr)
 case FormulaError::BadArrayContent:
 pErrNumber = STR_ERR_LONG_BAD_ARRAY_CONTENT;
 break;
+case FormulaError::LinkFormulaNeedingCheck:
+pErrNumber = STR_ERR_LONG_LINK_FORMULA_NEEDING_CHECK;
+break;
 case FormulaError::NoValue:
 pErrNumber = STR_LONG_ERR_NO_VALUE;
 break;
diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
index 108d5f4445ea..e2dd62717fb9 100644
--- a/sc/source/core/tool/interpr7.cxx
+++ b/sc/source/core/tool/interpr7.cxx
@@ -320,7 +320,6 @@ void ScInterpreter::ScWebservice()
 ScWebServiceLink* pLink = lcl_GetWebServiceLink(mpLinkManager, aURI);
 
 bool bWasError = (pMyFormulaCell && pMyFormulaCell->GetRawError() != 
FormulaError::NONE);
-bool bLinkFormulaNeedingCheck = false;
 
 if (!pLink)
 {
@@ -336,8 +335,7 @@ void ScInterpreter::ScWebservice()
 //if the document was just loaded, but the ScDdeLink entry was 
missing, then
 //don't update this link until the links are updated in response 
to the users
 //decision
-bLinkFormulaNeedingCheck = pDok->HasLinkFormulaNeedingCheck();
-if (!bLinkFormulaNeedingCheck)
+if (!pDok->HasLinkFormulaNeedingCheck())
 {
 pLink->Update();
 }
@@ -361,7 +359,7 @@ void ScInterpreter::ScWebservice()
 //  check the value
 if (pLink->HasResult())
 PushString(pLink->GetResult());
-else
+else if (pDok->HasLinkFormulaNeedingCheck())
 {
 // If this formula cell is recalculated just after load and the
 // expression is exactly WEBSERVICE("literal_URI") (i.e. no other
@@ -371,18 +369,33 @@ void ScInterpreter::ScWebservice()
 // external links has been disabled."
 // This will work only once, as the new formula cell result won't
 // be a hybrid anymore.
-if (bLinkFormulaNeedingCheck && pMyFormulaCell && 
pMyFormulaCell->GetCode()->GetCodeLen() == 2 &&
-

[Libreoffice-commits] core.git: include/formula sc/inc sc/source

2018-06-05 Thread Eike Rathke
 include/formula/errorcodes.hxx   |3 +++
 sc/inc/globstr.hrc   |1 +
 sc/source/core/data/global.cxx   |3 +++
 sc/source/core/tool/compiler.cxx |2 +-
 4 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 5870cf6d9b42094dfda3dbf85817003e021d6559
Author: Eike Rathke 
Date:   Tue Jun 5 10:49:07 2018 +0200

Add "Unsupported inline array content." BadArrayContent message, tdf#117879

Change-Id: I176884ea5161c4f12419431a74bfb2c6fbed4e0f
Reviewed-on: https://gerrit.libreoffice.org/55317
Reviewed-by: Eike Rathke 
Tested-by: Jenkins 

diff --git a/include/formula/errorcodes.hxx b/include/formula/errorcodes.hxx
index 41bffa4d9ef9..d4324a998db0 100644
--- a/include/formula/errorcodes.hxx
+++ b/include/formula/errorcodes.hxx
@@ -81,6 +81,8 @@ enum class FormulaError : sal_uInt16
 RetryCircular= 537,
 // If matrix could not be allocated.
 MatrixSize   = 538,
+// Bad inline array content, non-value/non-string.
+BadArrayContent  = 539,
 
 // Interpreter: NA() not available condition, not a real error
 NotAvailable = 0x7fff
@@ -159,6 +161,7 @@ inline bool isPublishedFormulaError( FormulaError nErr )
 case FormulaError::NoMacro:
 case FormulaError::DivisionByZero:
 case FormulaError::NestedArray:
+case FormulaError::BadArrayContent:
 return true;
 
 case FormulaError::NotNumericString:
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 4ca23e111439..d33be62479dd 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -387,6 +387,7 @@
 #define STR_RECALC_MANUAL   NC_("STR_RECALC_MANUAL", 
"Manual")
 #define STR_RECALC_AUTO NC_("STR_RECALC_AUTO", 
"Automatic")
 #define STR_ERR_LONG_NESTED_ARRAY   
NC_("STR_ERR_LONG_NESTED_ARRAY", "Nested arrays are not supported.")
+#define STR_ERR_LONG_BAD_ARRAY_CONTENT  
NC_("STR_ERR_LONG_BAD_ARRAY_CONTENT", "Unsupported inline array content.")
 #define STR_UNDO_TEXTTOCOLUMNS  NC_("STR_UNDO_TEXTTOCOLUMNS", 
"Text to Columns")
 #define STR_DOC_UPDATED NC_("STR_DOC_UPDATED", "Your 
spreadsheet has been updated with changes saved by other users.")
 #define STR_DOC_WILLBESAVED NC_("STR_DOC_WILLBESAVED", 
"The spreadsheet must be saved now to activate sharing mode.\n\nDo you want to 
continue?")
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 46c9870500e7..775db26946fb 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -446,6 +446,9 @@ OUString ScGlobal::GetLongErrorString(FormulaError nErr)
 case FormulaError::NestedArray:
 pErrNumber = STR_ERR_LONG_NESTED_ARRAY;
 break;
+case FormulaError::BadArrayContent:
+pErrNumber = STR_ERR_LONG_BAD_ARRAY_CONTENT;
+break;
 case FormulaError::NoValue:
 pErrNumber = STR_LONG_ERR_NO_VALUE;
 break;
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 93065ddd0326..4ec04d968042 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4584,7 +4584,7 @@ ScTokenArray* ScCompiler::CompileString( const OUString& 
rFormula )
 // Nested inline array or non-value/non-string in array. The
 // original tokens are still in the ScTokenArray and not merged
 // into an ScMatrixToken. Set error but keep on tokenizing.
-SetError( FormulaError::NestedArray);
+SetError( FormulaError::BadArrayContent);
 }
 else if (!pNewToken)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/formula sc/inc sc/source

2016-11-16 Thread Eike Rathke
 include/formula/token.hxx|3 ---
 sc/inc/formulacell.hxx   |1 -
 sc/source/core/data/formulacell.cxx  |9 ++---
 sc/source/core/opencl/formulagroupcl.cxx |1 -
 sc/source/core/tool/cellform.cxx |2 --
 sc/source/core/tool/formularesult.cxx|6 +-
 sc/source/core/tool/token.cxx|1 -
 7 files changed, 3 insertions(+), 20 deletions(-)

New commits:
commit 2a91304bddf3b1a7b788b120e6374cc1fb9ea045
Author: Eike Rathke 
Date:   Wed Nov 16 19:24:01 2016 +0100

remove anything svHybridValueCell related, it's nowhere set anymore

Change-Id: I9887d7ca83ffc012fec1a78ef9ef537d2188a7e3

diff --git a/include/formula/token.hxx b/include/formula/token.hxx
index 767fa21..a2376bc 100644
--- a/include/formula/token.hxx
+++ b/include/formula/token.hxx
@@ -69,9 +69,6 @@ enum StackVarEnum
 // and/or string result and a formula
 // string to be compiled.
 
-svHybridValueCell,  // A temporary formula cell with an 
value
-// and possibily a string 
representation
-
 svExternalSingleRef,
 svExternalDoubleRef,
 svExternalName,
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index d17e1e0..960a753 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -289,7 +289,6 @@ public:
 boolIsValue();  // also true if formula::svEmptyCell
 boolIsValueNoError();
 boolIsValueNoError() const;
-boolIsHybridValueCell(); // for cells after import to deal 
with inherited number formats
 double  GetValue();
 svl::SharedString GetString();
 const ScMatrix* GetMatrix();
diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 1c95096..f59ad09 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2024,7 +2024,7 @@ void ScFormulaCell::InterpretTail( 
ScInterpretTailParameter eTailParam )
 }
 else
 {
-if ( eOld == svHybridCell || eOld == svHybridValueCell )   
  // string result from SetFormulaResultString?
+if ( eOld == svHybridCell ) // string result from 
SetFormulaResultString?
 eOld = svString;// ScHybridCellToken has a 
valid GetString method
 
 // #i106045# use approxEqual to compare with stored value
@@ -2049,7 +2049,7 @@ void ScFormulaCell::InterpretTail( 
ScInterpretTailParameter eTailParam )
 if ( bChanged && !bContentChanged && 
pDocument->IsStreamValid(aPos.Tab()) )
 {
 if ((eOld == svUnknown && (eNew == svError || (eNew == 
svDouble && aNewResult.GetDouble() == 0.0))) ||
-((eOld == svHybridCell || eOld == svHybridValueCell) &&
+((eOld == svHybridCell) &&
  eNew == svString && aResult.GetString() == 
aNewResult.GetString()) ||
 (eOld == svDouble && eNew == svDouble &&
  rtl::math::approxEqual( aResult.GetDouble(), 
aNewResult.GetDouble(
@@ -2598,11 +2598,6 @@ bool ScFormulaCell::IsValueNoError() const
 return aResult.IsValueNoError();
 }
 
-bool ScFormulaCell::IsHybridValueCell()
-{
-return aResult.GetType() == formula::svHybridValueCell;
-}
-
 double ScFormulaCell::GetValue()
 {
 MaybeInterpret();
diff --git a/sc/source/core/opencl/formulagroupcl.cxx 
b/sc/source/core/opencl/formulagroupcl.cxx
index 7701c2c..54ae0d1 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -116,7 +116,6 @@ std::string StackVarEnumToString(StackVar const e)
 case svEmptyCell: return "EmptyCell";
 case svMatrixCell:return "MatrixCell";
 case svHybridCell:return "HybridCell";
-case svHybridValueCell:   return "HybridValueCell";
 case svExternalSingleRef: return "ExternalSingleRef";
 case svExternalDoubleRef: return "ExternalDoubleRef";
 case svExternalName:  return "ExternalName";
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index afa9eea..dab0d2d 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -90,8 +90,6 @@ void ScCellFormat::GetString( ScRefCellValue& rCell, 
sal_uLong nFormat, OUString
 double fValue = pFCell->GetValue();
 if ( !bNullVals && fValue == 0.0 )
 rString.clear();
-else if ( pFCell->IsHybridValueCell() )
-rString = pFCell->GetString().getString();
 else
 rFormatter.GetOutputString( fValue, 

[Libreoffice-commits] core.git: include/formula sc/inc sc/source

2015-01-04 Thread Caolán McNamara
 include/formula/opcode.hxx   |   10 +-
 sc/inc/calcconfig.hxx|2 +-
 sc/inc/formulagroup.hxx  |2 +-
 sc/source/core/tool/calcconfig.cxx   |4 ++--
 sc/source/core/tool/formulagroup.cxx |2 +-
 sc/source/core/tool/token.cxx|4 ++--
 6 files changed, 8 insertions(+), 16 deletions(-)

New commits:
commit c8597274c31ed2ba59b5f2c6f555099aa9928f39
Author: Caolán McNamara caol...@redhat.com
Date:   Sun Jan 4 13:59:58 2015 +

merge OpCodeEnum and OpCode

and replace ifdef hackery with an explicit underlying type

Change-Id: Ibd340cf28d022af545a82e98e623d4c137ff7e53

diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx
index 199d598..0626ed5 100644
--- a/include/formula/opcode.hxx
+++ b/include/formula/opcode.hxx
@@ -23,7 +23,7 @@
 #include formula/compiler.hrc
 #include sal/types.h
 
-enum OpCodeEnum
+enum OpCode : sal_uInt16
 {
 // Special commands
 ocPush  = SC_OPCODE_PUSH,
@@ -475,14 +475,6 @@ enum OpCodeEnum
 ocNone  = SC_OPCODE_NONE
 };
 
-#ifndef DBG_UTIL
-// save memory since compilers tend to int an enum
-typedef sal_uInt16 OpCode;
-#else
-// have enum names in debugger
-typedef OpCodeEnum OpCode;
-#endif
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/calcconfig.hxx b/sc/inc/calcconfig.hxx
index 1477134..7cc8fad 100644
--- a/sc/inc/calcconfig.hxx
+++ b/sc/inc/calcconfig.hxx
@@ -49,7 +49,7 @@ struct SC_DLLPUBLIC ScCalcConfig
 OUString maOpenCLDevice;
 sal_Int32 mnOpenCLMinimumFormulaGroupSize;
 
-typedef std::setOpCodeEnum OpCodeSet;
+typedef std::setOpCode OpCodeSet;
 
 OpCodeSet maOpenCLSubsetOpCodes;
 
diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx
index 191b78e..ba553c6 100644
--- a/sc/inc/formulagroup.hxx
+++ b/sc/inc/formulagroup.hxx
@@ -129,7 +129,7 @@ class SC_DLLPUBLIC FormulaGroupInterpreter
 #if HAVE_FEATURE_OPENCL
 static void fillOpenCLInfo(std::vectorOpenCLPlatformInfo rPlatforms);
 static bool switchOpenCLDevice(const OUString rDeviceId, bool 
bAutoSelect, bool bForceEvaluation = false);
-static void enableOpenCL(bool bEnable, bool bEnableCompletely = false, 
const std::setOpCodeEnum rSubsetToEnable = std::setOpCodeEnum());
+static void enableOpenCL(bool bEnable, bool bEnableCompletely = false, 
const std::setOpCode rSubsetToEnable = std::setOpCode());
 static void getOpenCLDeviceInfo(sal_Int32 rDeviceId, sal_Int32 
rPlatformId);
 #endif
 virtual ScMatrixRef inverseMatrix(const ScMatrix rMat) = 0;
diff --git a/sc/source/core/tool/calcconfig.cxx 
b/sc/source/core/tool/calcconfig.cxx
index 91ae7e5..3e00b05 100644
--- a/sc/source/core/tool/calcconfig.cxx
+++ b/sc/source/core/tool/calcconfig.cxx
@@ -184,12 +184,12 @@ ScCalcConfig::OpCodeSet ScStringToOpCodeSet(const 
OUString rOpCodes)
 OUString element(s.copy(fromIndex, semicolon - fromIndex));
 sal_Int32 n = element.toInt32();
 if (n  0 || (n == 0  element == 0))
-result.insert(static_castOpCodeEnum(n));
+result.insert(static_castOpCode(n));
 else if (pHashMap)
 {
 auto opcode(pHashMap-find(element));
 if (opcode != pHashMap-end())
-result.insert(static_castOpCodeEnum(opcode-second));
+result.insert(static_castOpCode(opcode-second));
 else
 SAL_WARN(sc.opencl, Unrecognized OpCode   element  
 in OpCode set string);
 }
diff --git a/sc/source/core/tool/formulagroup.cxx 
b/sc/source/core/tool/formulagroup.cxx
index 870c06a..68e9881 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -547,7 +547,7 @@ void 
FormulaGroupInterpreter::getOpenCLDeviceInfo(sal_Int32 rDeviceId, sal_Int3
 rPlatformId = aPlatformId;
 }
 
-void FormulaGroupInterpreter::enableOpenCL(bool bEnable, bool 
bEnableCompletely, const std::setOpCodeEnum rSubsetToEnable)
+void FormulaGroupInterpreter::enableOpenCL(bool bEnable, bool 
bEnableCompletely, const std::setOpCode rSubsetToEnable)
 {
 boost::shared_ptrcomphelper::ConfigurationChanges 
batch(comphelper::ConfigurationChanges::create());
 officecfg::Office::Common::Misc::UseOpenCL::set(bEnable, batch);
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index ebfb8ca..cd9e656 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1141,7 +1141,7 @@ void ScTokenArray::CheckToken( const FormulaToken r )
 
 if (SC_OPCODE_START_FUNCTION = eOp  eOp  SC_OPCODE_STOP_FUNCTION)
 {
-if (ScInterpreter::GetGlobalConfig().mbOpenCLSubsetOnly  
ScInterpreter::GetGlobalConfig().maOpenCLSubsetOpCodes.find(static_castOpCodeEnum(eOp))
 == ScInterpreter::GetGlobalConfig().maOpenCLSubsetOpCodes.end())
+if (ScInterpreter::GetGlobalConfig().mbOpenCLSubsetOnly  

[Libreoffice-commits] core.git: include/formula sc/inc sc/source

2014-11-04 Thread Tor Lillqvist
 include/formula/FormulaCompiler.hxx |9 -
 sc/inc/externalrefmgr.hxx   |   10 --
 sc/source/core/inc/parclass.hxx |4 
 sc/source/ui/inc/docsh.hxx  |4 
 4 files changed, 27 deletions(-)

New commits:
commit 5353c6dc9ddf36c810f32d678c13c1815547897a
Author: Tor Lillqvist t...@collabora.com
Date:   Tue Nov 4 10:18:19 2014 +0200

Bin presumably obsolete SUNWS crack

Change-Id: I83038a7160251e59a2178e54859c2ab8e4bffe2e

diff --git a/include/formula/FormulaCompiler.hxx 
b/include/formula/FormulaCompiler.hxx
index a4fd1af..101369d 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -70,11 +70,6 @@ public:
 FormulaCompiler(FormulaTokenArray _rArr);
 virtual ~FormulaCompiler();
 
-// SUNWS8 needs a forward declared friend, otherwise members of the outer
-// class are not accessible.
-class OpCodeMap;
-friend class FormulaCompiler::OpCodeMap;
-
 /** Mappings from strings to OpCodes and vice versa. */
 class FORMULA_DLLPUBLIC OpCodeMap
 {
@@ -362,10 +357,6 @@ private:
 rCurr-SetForceArray( true);
 }
 
-// SUNWS7 needs a forward declared friend, otherwise members of the outer
-// class are not accessible.
-class CurrentFactor;
-friend class FormulaCompiler::CurrentFactor;
 class CurrentFactor
 {
 FormulaTokenRef  pPrevFac;
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index 8a2d3a4..d3f2b1e 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -123,11 +123,6 @@ private:
 typedef ::boost::unordered_mapSCROW, RowDataType RowsDataType;
 
 public:
-// SUNWS needs a forward declared friend, otherwise types and members
-// of the outer class are not accessible.
-class Table;
-friend class ScExternalRefCache::Table;
-
 /**
  * Represents a single cached table in an external document.  It only
  * stores non-empty cells; empty cells should never be stored in the data
@@ -336,11 +331,6 @@ private:
 typedef ::boost::unordered_mapScRange, TokenArrayRef, RangeHash 
RangeArrayMap;
 typedef ::boost::unordered_mapOUString, OUString, OUStringHash 
NamePairMap;
 
-// SUNWS needs a forward declared friend, otherwise types and members
-// of the outer class are not accessible.
-struct DocItem;
-friend struct ScExternalRefCache::DocItem;
-
 /** Represents data cached for a single external document. */
 struct DocItem
 {
diff --git a/sc/source/core/inc/parclass.hxx b/sc/source/core/inc/parclass.hxx
index 881dbc2..aa1b074 100644
--- a/sc/source/core/inc/parclass.hxx
+++ b/sc/source/core/inc/parclass.hxx
@@ -101,10 +101,6 @@ private:
 sal_uInt8   nRepeatLast;
 };
 
-// SUNWS7 needs a forward declared friend, otherwise members of the outer
-// class are not accessible (in this case CommonData).
-struct RawData;
-friend struct ScParameterClassification::RawData;
 struct RawData
 {
 OpCode  eOp;
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 98f7109..fc6bccc 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -121,10 +121,6 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, 
public SfxListener
 SAL_DLLPRIVATE void  InitOptions(bool bForLoading);
 SAL_DLLPRIVATE void  ResetDrawObjectShell();
 
-// SUNWS needs a forward declared friend, otherwise types and members
-// of the outer class are not accessible.
-class PrepareSaveGuard;
-friend class ScDocShell::PrepareSaveGuard;
 /** Do things that need to be done before saving to our own format and
 necessary clean ups in dtor. */
 class PrepareSaveGuard
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits