summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Rentz <dr@openoffice.org>2010-01-15 12:00:39 +0100
committerDaniel Rentz <dr@openoffice.org>2010-01-15 12:00:39 +0100
commite0bff7cc71affce1166c09d7c95958dd1e2c4687 (patch)
tree63876a226dd912ae17b52cbb50e04548960d6cfe
parenta02a44429145de0a67f3b75656f10b146490feec (diff)
dr74: migrate changes to hg
-rw-r--r--sc/inc/rangelst.hxx2
-rw-r--r--sc/inc/sc.hrc2
-rw-r--r--sc/source/core/tool/rangelst.cxx5
-rw-r--r--sc/source/filter/excel/xistyle.cxx67
-rw-r--r--sc/source/filter/excel/xlformula.cxx184
-rw-r--r--sc/source/filter/excel/xltools.cxx10
-rw-r--r--sc/source/filter/inc/xistyle.hxx5
-rw-r--r--sc/source/ui/miscdlgs/scuiautofmt.cxx2
-rw-r--r--sc/source/ui/miscdlgs/strindlg.cxx10
-rw-r--r--sc/source/ui/src/globstr.src2
-rw-r--r--sc/source/ui/src/miscdlgs.src8
-rw-r--r--sc/source/ui/view/cellsh.cxx24
-rw-r--r--sc/source/ui/view/spelldialog.cxx7
-rw-r--r--sc/util/hidother.src1
14 files changed, 210 insertions, 119 deletions
diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx
index e2ceba32b2f1..39926ad262f0 100644
--- a/sc/inc/rangelst.hxx
+++ b/sc/inc/rangelst.hxx
@@ -43,6 +43,7 @@ class SC_DLLPUBLIC ScRangeList : public ScRangeListBase, public SvRefBase
{
private:
using ScRangeListBase::operator==;
+ using ScRangeListBase::operator!=;
public:
ScRangeList() {}
@@ -68,6 +69,7 @@ public:
SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
ScRange* Find( const ScAddress& ) const;
BOOL operator==( const ScRangeList& ) const;
+ BOOL operator!=( const ScRangeList& r ) const;
BOOL Intersects( const ScRange& ) const;
BOOL In( const ScRange& ) const;
ULONG GetCellCount() const;
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 375eebe30964..37668fec72c8 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -265,6 +265,8 @@
#define HID_SC_RENAME_OBJECT ( HID_SC_TOOLBOX_START + 9 )
+#define HID_SC_REN_AFMT_DLG ( HID_SC_TOOLBOX_START + 10 )
+
// Hilfe IDs fuer Submenus (max.50) ------------------------------------------
#define HID_SCMENU_EDIT ( HID_SC_MENU_START )
#define HID_SCMENU_FILL ( HID_SC_MENU_START + 1 )
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 775b0207be59..af988d37e3df 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -249,6 +249,11 @@ BOOL ScRangeList::operator==( const ScRangeList& r ) const
return TRUE;
}
+BOOL ScRangeList::operator!=( const ScRangeList& r ) const
+{
+ return !operator==( r );
+}
+
BOOL ScRangeList::UpdateReference( UpdateRefMode eUpdateRefMode,
ScDocument* pDoc, const ScRange& rWhere,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index 07368f6db680..83a02f4d0464 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -704,7 +704,6 @@ void XclImpCellAlign::FillToItemSet( SfxItemSet& rItemSet, const XclImpFont* pFo
sal_uInt8 nXclRot = (mnOrient == EXC_ORIENT_NONE) ? mnRotation : XclTools::GetXclRotFromOrient( mnOrient );
bool bStacked = (nXclRot == EXC_ROT_STACKED);
ScfTools::PutItem( rItemSet, SfxBoolItem( ATTR_STACKED, bStacked ), bSkipPoolDefs );
- ScfTools::PutItem( rItemSet, SvxRotateModeItem( SVX_ROTATE_MODE_STANDARD, ATTR_ROTATE_MODE ), bSkipPoolDefs );
// set an angle in the range from -90 to 90 degrees
sal_Int32 nAngle = XclTools::GetScRotation( nXclRot, 0 );
ScfTools::PutItem( rItemSet, SfxInt32Item( ATTR_ROTATE_VALUE, nAngle ), bSkipPoolDefs );
@@ -802,6 +801,15 @@ void XclImpCellBorder::FillFromCF8( sal_uInt16 nLineStyle, sal_uInt32 nLineColor
mbDiagUsed = false;
}
+bool XclImpCellBorder::HasAnyOuterBorder() const
+{
+ return
+ (mbLeftUsed && (mnLeftLine != EXC_LINE_NONE)) ||
+ (mbRightUsed && (mnRightLine != EXC_LINE_NONE)) ||
+ (mbTopUsed && (mnTopLine != EXC_LINE_NONE)) ||
+ (mbBottomUsed && (mnBottomLine != EXC_LINE_NONE));
+}
+
namespace {
/** Converts the passed line style to a SvxBorderLine, or returns false, if style is "no line". */
@@ -1094,13 +1102,32 @@ const ScPatternAttr& XclImpXF::CreatePattern( bool bSkipPoolDefs )
// create new pattern attribute set
mpPattern.reset( new ScPatternAttr( GetDoc().GetPool() ) );
SfxItemSet& rItemSet = mpPattern->GetItemSet();
+ XclImpXF* pParentXF = IsCellXF() ? GetXFBuffer().GetXF( mnParent ) : 0;
// parent cell style
if( IsCellXF() && !mpStyleSheet )
{
mpStyleSheet = GetXFBuffer().CreateStyleSheet( mnParent );
- if( XclImpXF* pParentXF = GetXFBuffer().GetXF( mnParent ) )
- UpdateUsedFlags( *pParentXF );
+
+ /* Enables mb***Used flags, if the formatting attributes differ from
+ the passed XF record. In cell XFs Excel uses the cell attributes,
+ if they differ from the parent style XF.
+ #109899# ...or if the respective flag is not set in parent style XF. */
+ if( pParentXF )
+ {
+ if( !mbProtUsed )
+ mbProtUsed = !pParentXF->mbProtUsed || !(maProtection == pParentXF->maProtection);
+ if( !mbFontUsed )
+ mbFontUsed = !pParentXF->mbFontUsed || (mnXclFont != pParentXF->mnXclFont);
+ if( !mbFmtUsed )
+ mbFmtUsed = !pParentXF->mbFmtUsed || (mnXclNumFmt != pParentXF->mnXclNumFmt);
+ if( !mbAlignUsed )
+ mbAlignUsed = !pParentXF->mbAlignUsed || !(maAlignment == pParentXF->maAlignment);
+ if( !mbBorderUsed )
+ mbBorderUsed = !pParentXF->mbBorderUsed || !(maBorder == pParentXF->maBorder);
+ if( !mbAreaUsed )
+ mbAreaUsed = !pParentXF->mbAreaUsed || !(maArea == pParentXF->maArea);
+ }
}
// cell protection
@@ -1140,6 +1167,20 @@ const ScPatternAttr& XclImpXF::CreatePattern( bool bSkipPoolDefs )
maArea.mnPattern != EXC_PATT_SOLID);
}
+ /* #i38709# Decide which rotation reference mode to use. If any outer
+ border line of the cell is set (either explicitly or via cell style),
+ and the cell contents are rotated, set rotation reference to bottom of
+ cell. This causes the borders to be painted rotated with the text. */
+ if( mbAlignUsed || mbBorderUsed )
+ {
+ SvxRotateMode eRotateMode = SVX_ROTATE_MODE_STANDARD;
+ const XclImpCellAlign* pAlign = mbAlignUsed ? &maAlignment : (pParentXF ? &pParentXF->maAlignment : 0);
+ const XclImpCellBorder* pBorder = mbBorderUsed ? &maBorder : (pParentXF ? &pParentXF->maBorder : 0);
+ if( pAlign && pBorder && (0 < pAlign->mnRotation) && (pAlign->mnRotation <= 180) && pBorder->HasAnyOuterBorder() )
+ eRotateMode = SVX_ROTATE_MODE_BOTTOM;
+ ScfTools::PutItem( rItemSet, SvxRotateModeItem( eRotateMode, ATTR_ROTATE_MODE ), bSkipPoolDefs );
+ }
+
return *mpPattern;
}
@@ -1183,26 +1224,6 @@ void XclImpXF::SetUsedFlags( sal_uInt8 nUsedFlags )
mbAreaUsed = (mbCellXF == ::get_flag( nUsedFlags, EXC_XF_DIFF_AREA ));
}
-void XclImpXF::UpdateUsedFlags( const XclImpXF& rParentXF )
-{
- /* Enables mb***Used flags, if the formatting attributes differ from
- the passed XF record. In cell XFs Excel uses the cell attributes,
- if they differ from the parent style XF.
- #109899# ...or if the respective flag is not set in parent style XF. */
- if( !mbProtUsed )
- mbProtUsed = !rParentXF.mbProtUsed || !(maProtection == rParentXF.maProtection);
- if( !mbFontUsed )
- mbFontUsed = !rParentXF.mbFontUsed || (mnXclFont != rParentXF.mnXclFont);
- if( !mbFmtUsed )
- mbFmtUsed = !rParentXF.mbFmtUsed || (mnXclNumFmt != rParentXF.mnXclNumFmt);
- if( !mbAlignUsed )
- mbAlignUsed = !rParentXF.mbAlignUsed || !(maAlignment == rParentXF.maAlignment);
- if( !mbBorderUsed )
- mbBorderUsed = !rParentXF.mbBorderUsed || !(maBorder == rParentXF.maBorder);
- if( !mbAreaUsed )
- mbAreaUsed = !rParentXF.mbAreaUsed || !(maArea == rParentXF.maArea);
-}
-
// ----------------------------------------------------------------------------
XclImpStyle::XclImpStyle( const XclImpRoot& rRoot ) :
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index b8c18eb3e7c0..94e7b0cecfaa 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -71,22 +71,28 @@ const sal_uInt8 A = EXC_TOKCLASS_ARR;
#define VR_E { EXC_PARAM_EXCELONLY, EXC_PARAMCONV_RPT, true }
#define C { EXC_PARAM_CALCONLY, EXC_PARAMCONV_ORG, false }
+const sal_uInt16 NOID = SAL_MAX_UINT16; /// No BIFF/OOBIN function identifier available.
+const sal_uInt8 MX = 30; /// Maximum parameter count.
+
+#define EXC_FUNCNAME( ascii ) "_xlfn." ascii
+#define EXC_FUNCNAME_ODF( ascii ) "_xlfnodf." ascii
+
/** Functions new in BIFF2. */
static const XclFunctionInfo saFuncTable_2[] =
{
- { ocCount, 0, 0, 30, V, { RX }, 0, 0 },
+ { ocCount, 0, 0, MX, V, { RX }, 0, 0 },
{ ocIf, 1, 2, 3, R, { VO, RO }, 0, 0 },
{ ocIsNA, 2, 1, 1, V, { VR }, 0, 0 },
{ ocIsError, 3, 1, 1, V, { VR }, 0, 0 },
- { ocSum, 4, 0, 30, V, { RX }, 0, 0 },
- { ocAverage, 5, 1, 30, V, { RX }, 0, 0 },
- { ocMin, 6, 1, 30, V, { RX }, 0, 0 },
- { ocMax, 7, 1, 30, V, { RX }, 0, 0 },
+ { ocSum, 4, 0, MX, V, { RX }, 0, 0 },
+ { ocAverage, 5, 1, MX, V, { RX }, 0, 0 },
+ { ocMin, 6, 1, MX, V, { RX }, 0, 0 },
+ { ocMax, 7, 1, MX, V, { RX }, 0, 0 },
{ ocRow, 8, 0, 1, V, { RO }, 0, 0 },
{ ocColumn, 9, 0, 1, V, { RO }, 0, 0 },
{ ocNotAvail, 10, 0, 0, V, {}, 0, 0 },
- { ocNPV, 11, 2, 30, V, { VR, RX }, 0, 0 },
- { ocStDev, 12, 1, 30, V, { RX }, 0, 0 },
+ { ocNPV, 11, 2, MX, V, { VR, RX }, 0, 0 },
+ { ocStDev, 12, 1, MX, V, { RX }, 0, 0 },
{ ocCurrency, 13, 1, 2, V, { VR }, 0, 0 },
{ ocFixed, 14, 1, 2, V, { VR, VR, C }, 0, 0 },
{ ocSin, 15, 1, 1, V, { VR }, 0, 0 },
@@ -112,8 +118,8 @@ static const XclFunctionInfo saFuncTable_2[] =
{ ocValue, 33, 1, 1, V, { VR }, 0, 0 },
{ ocTrue, 34, 0, 0, V, {}, 0, 0 },
{ ocFalse, 35, 0, 0, V, {}, 0, 0 },
- { ocAnd, 36, 1, 30, V, { RX }, 0, 0 },
- { ocOr, 37, 1, 30, V, { RX }, 0, 0 },
+ { ocAnd, 36, 1, MX, V, { RX }, 0, 0 },
+ { ocOr, 37, 1, MX, V, { RX }, 0, 0 },
{ ocNot, 38, 1, 1, V, { VR }, 0, 0 },
{ ocMod, 39, 2, 2, V, { VR }, 0, 0 },
{ ocDBCount, 40, 3, 3, V, { RO, RR }, 0, 0 },
@@ -122,7 +128,7 @@ static const XclFunctionInfo saFuncTable_2[] =
{ ocDBMin, 43, 3, 3, V, { RO, RR }, 0, 0 },
{ ocDBMax, 44, 3, 3, V, { RO, RR }, 0, 0 },
{ ocDBStdDev, 45, 3, 3, V, { RO, RR }, 0, 0 },
- { ocVar, 46, 1, 30, V, { RX }, 0, 0 },
+ { ocVar, 46, 1, MX, V, { RX }, 0, 0 },
{ ocDBVar, 47, 3, 3, V, { RO, RR }, 0, 0 },
{ ocText, 48, 2, 2, V, { VR }, 0, 0 },
{ ocRGP, 49, 1, 2, A, { RA, RA, C, C }, 0, 0 },
@@ -158,7 +164,7 @@ static const XclFunctionInfo saFuncTable_2[] =
{ ocArcTan2, 97, 2, 2, V, { VR }, 0, 0 },
{ ocArcSin, 98, 1, 1, V, { VR }, 0, 0 },
{ ocArcCos, 99, 1, 1, V, { VR }, 0, 0 },
- { ocChose, 100, 2, 30, R, { VO, RO }, 0, 0 },
+ { ocChose, 100, 2, MX, R, { VO, RO }, 0, 0 },
{ ocHLookup, 101, 3, 3, V, { VV, RO, RO, C }, 0, 0 },
{ ocVLookup, 102, 3, 3, V, { VV, RO, RO, C }, 0, 0 },
{ ocIsRef, 105, 1, 1, V, { RX }, 0, 0 },
@@ -194,13 +200,13 @@ static const XclFunctionInfo saFuncTable_2[] =
{ ocMatMult, 165, 2, 2, A, { VA }, 0, 0 },
{ ocZinsZ, 167, 4, 6, V, { VR }, 0, 0 },
{ ocKapz, 168, 4, 6, V, { VR }, 0, 0 },
- { ocCount2, 169, 0, 30, V, { RX }, 0, 0 },
- { ocProduct, 183, 0, 30, V, { RX }, 0, 0 },
+ { ocCount2, 169, 0, MX, V, { RX }, 0, 0 },
+ { ocProduct, 183, 0, MX, V, { RX }, 0, 0 },
{ ocFact, 184, 1, 1, V, { VR }, 0, 0 },
{ ocDBProduct, 189, 3, 3, V, { RO, RR }, 0, 0 },
{ ocIsNonString, 190, 1, 1, V, { VR }, 0, 0 },
- { ocStDevP, 193, 1, 30, V, { RX }, 0, 0 },
- { ocVarP, 194, 1, 30, V, { RX }, 0, 0 },
+ { ocStDevP, 193, 1, MX, V, { RX }, 0, 0 },
+ { ocVarP, 194, 1, MX, V, { RX }, 0, 0 },
{ ocDBStdDevP, 195, 3, 3, V, { RO, RR }, 0, 0 },
{ ocDBVarP, 196, 3, 3, V, { RO, RR }, 0, 0 },
{ ocTrunc, 197, 1, 1, V, { VR, C }, 0, 0 },
@@ -209,7 +215,7 @@ static const XclFunctionInfo saFuncTable_2[] =
{ ocCurrency, 204, 1, 2, V, { VR }, EXC_FUNCFLAG_IMPORTONLY, 0 },
{ ocRoundUp, 212, 2, 2, V, { VR }, 0, 0 },
{ ocRoundDown, 213, 2, 2, V, { VR }, 0, 0 },
- { ocExternal, 255, 1, 30, R, { RO_E, RO }, EXC_FUNCFLAG_IMPORTONLY, 0 }
+ { ocExternal, 255, 1, MX, R, { RO_E, RO }, EXC_FUNCFLAG_IMPORTONLY, 0 }
};
/** Functions new in BIFF3. */
@@ -224,8 +230,8 @@ static const XclFunctionInfo saFuncTable_3[] =
{ ocGetDiffDate360, 220, 2, 2, V, { VR, VR, C }, 0, 0 },
{ ocGetActDate, 221, 0, 0, V, {}, EXC_FUNCFLAG_VOLATILE, 0 },
{ ocVBD, 222, 5, 7, V, { VR }, 0, 0 },
- { ocMedian, 227, 1, 30, V, { RX }, 0, 0 },
- { ocSumProduct, 228, 1, 30, V, { VA }, 0, 0 },
+ { ocMedian, 227, 1, MX, V, { RX }, 0, 0 },
+ { ocSumProduct, 228, 1, MX, V, { VA }, 0, 0 },
{ ocSinHyp, 229, 1, 1, V, { VR }, 0, 0 },
{ ocCosHyp, 230, 1, 1, V, { VR }, 0, 0 },
{ ocTanHyp, 231, 1, 1, V, { VR }, 0, 0 },
@@ -248,7 +254,7 @@ static const XclFunctionInfo saFuncTable_4[] =
{ ocGDA2, 247, 4, 5, V, { VR }, 0, 0 },
{ ocFrequency, 252, 2, 2, A, { RA }, 0, 0 },
{ ocErrorType, 261, 1, 1, V, { VR }, 0, 0 },
- { ocAveDev, 269, 1, 30, V, { RX }, 0, 0 },
+ { ocAveDev, 269, 1, MX, V, { RX }, 0, 0 },
{ ocBetaDist, 270, 3, 5, V, { VR }, 0, 0 },
{ ocGammaLn, 271, 1, 1, V, { VR }, 0, 0 },
{ ocBetaInv, 272, 3, 5, V, { VR }, 0, 0 },
@@ -297,19 +303,19 @@ static const XclFunctionInfo saFuncTable_4[] =
{ ocSlope, 315, 2, 2, V, { VA }, 0, 0 },
{ ocTTest, 316, 4, 4, V, { VA, VA, VR }, 0, 0 },
{ ocProb, 317, 3, 4, V, { VA, VA, VR }, 0, 0 },
- { ocDevSq, 318, 1, 30, V, { RX }, 0, 0 },
- { ocGeoMean, 319, 1, 30, V, { RX }, 0, 0 },
- { ocHarMean, 320, 1, 30, V, { RX }, 0, 0 },
- { ocSumSQ, 321, 0, 30, V, { RX }, 0, 0 },
- { ocKurt, 322, 1, 30, V, { RX }, 0, 0 },
- { ocSchiefe, 323, 1, 30, V, { RX }, 0, 0 },
+ { ocDevSq, 318, 1, MX, V, { RX }, 0, 0 },
+ { ocGeoMean, 319, 1, MX, V, { RX }, 0, 0 },
+ { ocHarMean, 320, 1, MX, V, { RX }, 0, 0 },
+ { ocSumSQ, 321, 0, MX, V, { RX }, 0, 0 },
+ { ocKurt, 322, 1, MX, V, { RX }, 0, 0 },
+ { ocSchiefe, 323, 1, MX, V, { RX }, 0, 0 },
{ ocZTest, 324, 2, 3, V, { RX, VR }, 0, 0 },
{ ocLarge, 325, 2, 2, V, { RX, VR }, 0, 0 },
{ ocSmall, 326, 2, 2, V, { RX, VR }, 0, 0 },
{ ocQuartile, 327, 2, 2, V, { RX, VR }, 0, 0 },
{ ocPercentile, 328, 2, 2, V, { RX, VR }, 0, 0 },
{ ocPercentrank, 329, 2, 3, V, { RX, VR, VR_E }, 0, 0 },
- { ocModalValue, 330, 1, 30, V, { VA }, 0, 0 },
+ { ocModalValue, 330, 1, MX, V, { VA }, 0, 0 },
{ ocTrimMean, 331, 2, 2, V, { RX, VR }, 0, 0 },
{ ocTInv, 332, 2, 2, V, { VR }, 0, 0 }
};
@@ -321,13 +327,13 @@ static const XclFunctionInfo saFuncTable_5[] =
{ ocHLookup, 101, 3, 4, V, { VV, RO, RO, VV }, 0, 0 }, // BIFF2-4: 3, BIFF5: 3-4
{ ocVLookup, 102, 3, 4, V, { VV, RO, RO, VV }, 0, 0 }, // BIFF2-4: 3, BIFF5: 3-4
{ ocGetDiffDate360, 220, 2, 3, V, { VR }, 0, 0 }, // BIFF3-4: 2, BIFF5: 2-3
- { ocMacro, 255, 1, 30, R, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, 0 },
- { ocExternal, 255, 1, 30, R, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, 0 },
- { ocConcat, 336, 0, 30, V, { VR }, 0, 0 },
+ { ocMacro, 255, 1, MX, R, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, 0 },
+ { ocExternal, 255, 1, MX, R, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, 0 },
+ { ocConcat, 336, 0, MX, V, { VR }, 0, 0 },
{ ocPower, 337, 2, 2, V, { VR }, 0, 0 },
{ ocRad, 342, 1, 1, V, { VR }, 0, 0 },
{ ocDeg, 343, 1, 1, V, { VR }, 0, 0 },
- { ocSubTotal, 344, 2, 30, V, { VR, RO }, 0, 0 },
+ { ocSubTotal, 344, 2, MX, V, { VR, RO }, 0, 0 },
{ ocSumIf, 345, 2, 3, V, { RO, VR, RO }, 0, 0 },
{ ocCountIf, 346, 2, 2, V, { RO, VR }, 0, 0 },
{ ocCountEmptyCells, 347, 1, 1, V, { RO }, 0, 0 },
@@ -338,66 +344,90 @@ static const XclFunctionInfo saFuncTable_5[] =
{ ocRoman, 354, 1, 2, V, { VR }, 0, 0 }
};
-#define EXC_FUNCNAME_PREFIX "_xlfn."
-
-const sal_Char* const EXC_FUNCNAME_BAHTTEXT = EXC_FUNCNAME_PREFIX "BAHTTEXT";
-
/** Functions new in BIFF8. Unsupported functions: PHONETIC. */
static const XclFunctionInfo saFuncTable_8[] =
{
- { ocGetPivotData, 358, 2, 30, V, { RR, RR, VR }, 0, 0 },
+ { ocGetPivotData, 358, 2, MX, V, { RR, RR, VR }, 0, 0 },
{ ocHyperLink, 359, 1, 2, V, { VV, VO }, 0, 0 },
{ ocNoName, 360, 1, 1, V, { RO }, EXC_FUNCFLAG_IMPORTONLY, 0 }, // PHONETIC
- { ocAverageA, 361, 1, 30, V, { RX }, 0, 0 },
- { ocMaxA, 362, 1, 30, V, { RX }, 0, 0 },
- { ocMinA, 363, 1, 30, V, { RX }, 0, 0 },
- { ocStDevPA, 364, 1, 30, V, { RX }, 0, 0 },
- { ocVarPA, 365, 1, 30, V, { RX }, 0, 0 },
- { ocStDevA, 366, 1, 30, V, { RX }, 0, 0 },
- { ocVarA, 367, 1, 30, V, { RX }, 0, 0 },
- { ocBahtText, 368, 1, 1, V, { VR }, EXC_FUNCFLAG_IMPORTONLY, EXC_FUNCNAME_BAHTTEXT },
- { ocBahtText, 255, 2, 2, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, EXC_FUNCNAME_BAHTTEXT },
+ { ocAverageA, 361, 1, MX, V, { RX }, 0, 0 },
+ { ocMaxA, 362, 1, MX, V, { RX }, 0, 0 },
+ { ocMinA, 363, 1, MX, V, { RX }, 0, 0 },
+ { ocStDevPA, 364, 1, MX, V, { RX }, 0, 0 },
+ { ocVarPA, 365, 1, MX, V, { RX }, 0, 0 },
+ { ocStDevA, 366, 1, MX, V, { RX }, 0, 0 },
+ { ocVarA, 367, 1, MX, V, { RX }, 0, 0 },
+ { ocBahtText, 368, 1, 1, V, { VR }, EXC_FUNCFLAG_IMPORTONLY, EXC_FUNCNAME( "BAHTTEXT" ) },
+ { ocBahtText, 255, 2, 2, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, EXC_FUNCNAME( "BAHTTEXT" ) },
{ ocEuroConvert, 255, 4, 6, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, "EUROCONVERT" }
};
+#define EXC_FUNCENTRY_ODF( opcode, minparam, maxparam, flags, asciiname ) \
+ { opcode, NOID, minparam, maxparam, V, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME_ODF( asciiname ) }, \
+ { opcode, 255, (minparam)+1, (maxparam)+1, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME_ODF( asciiname ) }
+
+/** Functions defined by OpenFormula, but not supported by Calc (ocNoName) or by Excel (defined op-code). */
+static const XclFunctionInfo saFuncTable_Odf[] =
+{
+ EXC_FUNCENTRY_ODF( ocArabic, 1, 1, 0, "ARABIC" ),
+ EXC_FUNCENTRY_ODF( ocB, 3, 4, 0, "B" ),
+ EXC_FUNCENTRY_ODF( ocBase, 2, 3, 0, "BASE" ),
+ EXC_FUNCENTRY_ODF( ocNoName, 2, 2, 0, "BITAND" ),
+ EXC_FUNCENTRY_ODF( ocNoName, 2, 2, 0, "BITLSHIFT" ),
+ EXC_FUNCENTRY_ODF( ocNoName, 2, 2, 0, "BITOR" ),
+ EXC_FUNCENTRY_ODF( ocNoName, 2, 2, 0, "BITRSHIFT" ),
+ EXC_FUNCENTRY_ODF( ocNoName, 2, 2, 0, "BITXOR" ),
+ EXC_FUNCENTRY_ODF( ocChiSqDist, 2, 3, 0, "CHISQDIST" ),
+ EXC_FUNCENTRY_ODF( ocChiSqInv, 2, 2, 0, "CHISQINV" ),
+ EXC_FUNCENTRY_ODF( ocKombin2, 2, 2, 0, "COMBINA" ),
+ EXC_FUNCENTRY_ODF( ocGetDiffDate, 2, 2, 0, "DAYS" ),
+ EXC_FUNCENTRY_ODF( ocDecimal, 2, 2, 0, "DECIMAL" ),
+ EXC_FUNCENTRY_ODF( ocFDist, 3, 4, 0, "FDIST" ),
+ EXC_FUNCENTRY_ODF( ocFInv, 3, 3, 0, "FINV" ),
+ EXC_FUNCENTRY_ODF( ocFormula, 1, 1, 0, "FORMULA" ),
+ EXC_FUNCENTRY_ODF( ocGamma, 1, 1, 0, "GAMMA" ),
+ EXC_FUNCENTRY_ODF( ocGauss, 1, 1, 0, "GAUSS" ),
+ EXC_FUNCENTRY_ODF( ocNoName, 2, 2, 0, "IFNA" ),
+ EXC_FUNCENTRY_ODF( ocIsFormula, 1, 1, 0, "ISFORMULA" ),
+ EXC_FUNCENTRY_ODF( ocWeek, 1, 2, 0, "ISOWEEKNUM" ),
+ EXC_FUNCENTRY_ODF( ocMatrixUnit, 1, 1, 0, "MUNIT" ),
+ EXC_FUNCENTRY_ODF( ocNumberValue, 2, 2, 0, "NUMBERVALUE" ),
+ EXC_FUNCENTRY_ODF( ocLaufz, 3, 3, 0, "PDURATION" ),
+ EXC_FUNCENTRY_ODF( ocVariationen2, 2, 2, 0, "PERMUTATIONA" ),
+ EXC_FUNCENTRY_ODF( ocPhi, 1, 1, 0, "PHI" ),
+ EXC_FUNCENTRY_ODF( ocZGZ, 3, 3, 0, "RRI" ),
+ EXC_FUNCENTRY_ODF( ocTable, 1, 1, 0, "SHEET" ),
+ EXC_FUNCENTRY_ODF( ocTables, 0, 1, 0, "SHEETS" ),
+ EXC_FUNCENTRY_ODF( ocNoName, 1, MX, 0, "SKEWP" ),
+ EXC_FUNCENTRY_ODF( ocUnichar, 1, 1, 0, "UNICHAR" ),
+ EXC_FUNCENTRY_ODF( ocUnicode, 1, 1, 0, "UNICODE" ),
+ EXC_FUNCENTRY_ODF( ocNoName, 1, MX, 0, "XOR" )
+};
+
+#undef EXC_FUNCENTRY_ODF
+
// ----------------------------------------------------------------------------
XclFunctionProvider::XclFunctionProvider( const XclRoot& rRoot )
{
- XclBiff eBiff = rRoot.GetBiff();
+ void (XclFunctionProvider::*pFillFunc)( const XclFunctionInfo*, const XclFunctionInfo* ) =
+ rRoot.IsImport() ? &XclFunctionProvider::FillXclFuncMap : &XclFunctionProvider::FillScFuncMap;
- if( rRoot.IsImport() )
- {
- /* Import: only read functions supported in the current BIFF version.
- Function tables from later BIFF versions may overwrite single
- functions from earlier tables. */
- if( eBiff >= EXC_BIFF2 )
- FillXclFuncMap( saFuncTable_2, STATIC_TABLE_END( saFuncTable_2 ) );
- if( eBiff >= EXC_BIFF3 )
- FillXclFuncMap( saFuncTable_3, STATIC_TABLE_END( saFuncTable_3 ) );
- if( eBiff >= EXC_BIFF4 )
- FillXclFuncMap( saFuncTable_4, STATIC_TABLE_END( saFuncTable_4 ) );
- if( eBiff >= EXC_BIFF5 )
- FillXclFuncMap( saFuncTable_5, STATIC_TABLE_END( saFuncTable_5 ) );
- if( eBiff >= EXC_BIFF8 )
- FillXclFuncMap( saFuncTable_8, STATIC_TABLE_END( saFuncTable_8 ) );
- }
- else
- {
- /* Export: only write functions supported in the current BIFF version.
- Function tables from later BIFF versions may overwrite single
- functions from earlier tables. */
- if( eBiff >= EXC_BIFF2 )
- FillScFuncMap( saFuncTable_2, STATIC_TABLE_END( saFuncTable_2 ) );
- if( eBiff >= EXC_BIFF3 )
- FillScFuncMap( saFuncTable_3, STATIC_TABLE_END( saFuncTable_3 ) );
- if( eBiff >= EXC_BIFF4 )
- FillScFuncMap( saFuncTable_4, STATIC_TABLE_END( saFuncTable_4 ) );
- if( eBiff >= EXC_BIFF5 )
- FillScFuncMap( saFuncTable_5, STATIC_TABLE_END( saFuncTable_5 ) );
- if( eBiff >= EXC_BIFF8 )
- FillScFuncMap( saFuncTable_8, STATIC_TABLE_END( saFuncTable_8 ) );
- }
+ /* Only read/write functions supported in the current BIFF version.
+ Function tables from later BIFF versions may overwrite single functions
+ from earlier tables. */
+ XclBiff eBiff = rRoot.GetBiff();
+ if( eBiff >= EXC_BIFF2 )
+ (this->*pFillFunc)( saFuncTable_2, STATIC_TABLE_END( saFuncTable_2 ) );
+ if( eBiff >= EXC_BIFF3 )
+ (this->*pFillFunc)( saFuncTable_3, STATIC_TABLE_END( saFuncTable_3 ) );
+ if( eBiff >= EXC_BIFF4 )
+ (this->*pFillFunc)( saFuncTable_4, STATIC_TABLE_END( saFuncTable_4 ) );
+ if( eBiff >= EXC_BIFF5 )
+ (this->*pFillFunc)( saFuncTable_5, STATIC_TABLE_END( saFuncTable_5 ) );
+ if( eBiff >= EXC_BIFF8 )
+ (this->*pFillFunc)( saFuncTable_8, STATIC_TABLE_END( saFuncTable_8 ) );
+ (this->*pFillFunc)( saFuncTable_Odf, STATIC_TABLE_END( saFuncTable_Odf ) );
}
const XclFunctionInfo* XclFunctionProvider::GetFuncInfoFromXclFunc( sal_uInt16 nXclFunc ) const
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index 6398e25b9be7..9abb26c8e925 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -116,7 +116,12 @@ const XclGuid XclTools::maGuidFileMoniker(
double XclTools::GetDoubleFromRK( sal_Int32 nRKValue )
{
- double fVal = 0.0;
+ union
+ {
+ double fVal;
+ sal_math_Double smD;
+ };
+ fVal = 0.0;
if( ::get_flag( nRKValue, EXC_RK_INTFLAG ) )
{
@@ -126,8 +131,7 @@ double XclTools::GetDoubleFromRK( sal_Int32 nRKValue )
}
else
{
- sal_math_Double* pDouble = reinterpret_cast< sal_math_Double* >( &fVal );
- pDouble->w32_parts.msw = nRKValue & EXC_RK_VALUEMASK;
+ smD.w32_parts.msw = nRKValue & EXC_RK_VALUEMASK;
}
if( ::get_flag( nRKValue, EXC_RK_100FLAG ) )
diff --git a/sc/source/filter/inc/xistyle.hxx b/sc/source/filter/inc/xistyle.hxx
index a67458366057..f03a233515ba 100644
--- a/sc/source/filter/inc/xistyle.hxx
+++ b/sc/source/filter/inc/xistyle.hxx
@@ -319,6 +319,9 @@ struct XclImpCellBorder : public XclCellBorder
/** Fills this struct with BIFF8 CF (conditional format) record data. */
void FillFromCF8( sal_uInt16 nLineStyle, sal_uInt32 nLineColor, sal_uInt32 nFlags );
+ /** Returns true, if any of the outer border lines is visible. */
+ bool HasAnyOuterBorder() const;
+
/** Inserts a box item representing this border style into the item set.
@param bSkipPoolDefs true = Do not put items equal to pool default; false = Put all items. */
void FillToItemSet(
@@ -426,8 +429,6 @@ private:
@descr In cell XFs, a set bit represents "used", in style XFs it is a cleared bit.
Therefore mbCellXF must be set correctly before calling this method. */
void SetUsedFlags( sal_uInt8 nUsedFlags );
- /** Sets own "attribute used" flags, if attributes are different from passed parent XF. */
- void UpdateUsedFlags( const XclImpXF& rParentXF );
private:
typedef ::std::auto_ptr< ScPatternAttr > ScPatternAttrPtr;
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index e1ec71344034..51082dbc68f8 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -372,7 +372,7 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG )
aStrRename,
aStrLabel,
aFormatName,
- HID_SC_RENAME_AUTOFMT );
+ HID_SC_REN_AFMT_DLG );
if( pDlg->Execute() == RET_OK )
{
BOOL bFmtRenamed = FALSE;
diff --git a/sc/source/ui/miscdlgs/strindlg.cxx b/sc/source/ui/miscdlgs/strindlg.cxx
index 92630493d32f..761342b2cec3 100644
--- a/sc/source/ui/miscdlgs/strindlg.cxx
+++ b/sc/source/ui/miscdlgs/strindlg.cxx
@@ -75,25 +75,21 @@ ScStringInputDlg::ScStringInputDlg( Window* pParent,
// HelpId for Edit different for different uses
- DBG_ASSERT( nHelpId == FID_TAB_APPEND || nHelpId == FID_TAB_RENAME ||
- nHelpId == HID_SC_ADD_AUTOFMT || nHelpId == HID_SC_RENAME_AUTOFMT ||
- nHelpId == SID_RENAME_OBJECT ||
- // #i68101#
- nHelpId == SID_TITLE_DESCRIPTION_OBJECT,
- "unknown ID" );
if ( nHelpId == FID_TAB_APPEND )
aEdInput.SetHelpId( HID_SC_APPEND_NAME );
else if ( nHelpId == FID_TAB_RENAME )
aEdInput.SetHelpId( HID_SC_RENAME_NAME );
else if ( nHelpId == HID_SC_ADD_AUTOFMT )
aEdInput.SetHelpId( HID_SC_AUTOFMT_NAME );
- else if ( nHelpId == HID_SC_RENAME_AUTOFMT )
+ else if ( nHelpId == HID_SC_REN_AFMT_DLG )
aEdInput.SetHelpId( HID_SC_REN_AFMT_NAME );
else if ( nHelpId == SID_RENAME_OBJECT )
aEdInput.SetHelpId( HID_SC_RENAME_OBJECT );
// #i68101#
else if ( nHelpId == SID_TITLE_DESCRIPTION_OBJECT )
aEdInput.SetHelpId( HID_SC_TITLE_DESCRIPTION_OBJECT );
+ else
+ DBG_ERRORFILE( "unknown ID" );
//-------------
FreeResource();
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index fb3890616aa0..b94802778e8f 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -1024,7 +1024,7 @@ Resource RID_GLOBSTR
};
String STR_QUERY_DELTAB
{
- Text [ en-US ] = "Are you sure you want to permanently delete the current sheet(s)?" ;
+ Text [ en-US ] = "Are you sure you want to delete the selected sheet(s)?" ;
};
String STR_QUERY_DELSCENARIO
{
diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src
index d9ce050f1cd0..98093adf573e 100644
--- a/sc/source/ui/src/miscdlgs.src
+++ b/sc/source/ui/src/miscdlgs.src
@@ -236,7 +236,7 @@ ModalDialog RID_SCDLG_DELCONT
{
Pos = MAP_APPFONT ( 12 , 86 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
- Text [ en-US ] = "Not~es" ;
+ Text [ en-US ] = "~Comments" ;
TabStop = TRUE ;
};
CheckBox BTN_DELOBJECTS
@@ -329,14 +329,14 @@ ModalDialog RID_SCDLG_INSCONT
{
Pos = MAP_APPFONT ( 12 , 114 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
- Text [ en-US ] = "O~bjects" ;
+ Text [ en-US ] = "~Objects" ;
TabStop = TRUE ;
};
CheckBox BTN_INSNOTES
{
Pos = MAP_APPFONT ( 12 , 86 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
- Text [ en-US ] = "N~otes" ;
+ Text [ en-US ] = "~Comments" ;
TabStop = TRUE ;
};
FixedLine FL_FRAME
@@ -361,7 +361,7 @@ ModalDialog RID_SCDLG_INSCONT
{
Pos = MAP_APPFONT ( 111 , 44 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
- Text [ en-US ] = "S~ubtract" ;
+ Text [ en-US ] = "~Subtract" ;
};
RadioButton BTN_OP_MUL
{
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index c2d0f68fc6ef..924dbce19a6c 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -45,6 +45,7 @@
#include <svx/hlnkitem.hxx>
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
+#include <sfx2/childwin.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
@@ -973,6 +974,29 @@ void ScCellShell::GetState(SfxItemSet &rSet)
}
break;
+ case SID_SPELL_DIALOG:
+ {
+ if ( pDoc && pData && pDoc->IsTabProtected( pData->GetTabNo() ) )
+ {
+ bool bVisible = false;
+ SfxViewFrame* pViewFrame = ( pTabViewShell ? pTabViewShell->GetViewFrame() : NULL );
+ if ( pViewFrame && pViewFrame->HasChildWindow( nWhich ) )
+ {
+ SfxChildWindow* pChild = pViewFrame->GetChildWindow( nWhich );
+ Window* pWin = ( pChild ? pChild->GetWindow() : NULL );
+ if ( pWin && pWin->IsVisible() )
+ {
+ bVisible = true;
+ }
+ }
+ if ( !bVisible )
+ {
+ rSet.DisableItem( nWhich );
+ }
+ }
+ }
+ break;
+
} // switch ( nWitch )
nWhich = aIter.NextWhich();
} // while ( nWitch )
diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx
index e2d02348fbcb..9c686e071f2d 100644
--- a/sc/source/ui/view/spelldialog.cxx
+++ b/sc/source/ui/view/spelldialog.cxx
@@ -203,7 +203,12 @@ void ScSpellDialogChildWindow::Init()
ScEditableTester aTester( mpDoc, rMarkData );
if( !aTester.IsEditable() )
{
- mpViewShell->ErrorMessage( aTester.GetMessageId() );
+ // #i85751# Don't show a ErrorMessage here, because the vcl
+ // parent of the InfoBox is not fully initialized yet.
+ // This leads to problems in the modality behaviour of the
+ // ScSpellDialogChildWindow.
+
+ //mpViewShell->ErrorMessage( aTester.GetMessageId() );
return;
}
}
diff --git a/sc/util/hidother.src b/sc/util/hidother.src
index 230bf06e1fbb..7e183a3e95a2 100644
--- a/sc/util/hidother.src
+++ b/sc/util/hidother.src
@@ -84,6 +84,7 @@ hidspecial HID_SC_APPEND_NAME { HelpID = HID_SC_APPEND_NAME; };
hidspecial HID_SC_AUTOFMT_NAME { HelpID = HID_SC_AUTOFMT_NAME; };
hidspecial HID_SC_ADD_AUTOFMT { HelpID = HID_SC_ADD_AUTOFMT; };
hidspecial HID_SC_REN_AFMT_NAME { HelpID = HID_SC_REN_AFMT_NAME; };
+hidspecial HID_SC_REN_AFMT_DLG { HelpID = HID_SC_REN_AFMT_DLG; };
hidspecial HID_SC_RENAME_AUTOFMT { HelpID = HID_SC_RENAME_AUTOFMT; };
hidspecial HID_PASSWD_TABLE { HelpID = HID_PASSWD_TABLE; };
hidspecial HID_PASSWD_DOC { HelpID = HID_PASSWD_DOC; };