summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2011-02-11 17:29:28 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2011-02-11 17:29:28 -0600
commit67c7d15e4027c6fde7f5a1fbd11c581a244ab583 (patch)
tree918f0ea69a4027d216b0e2484670a3811bf1372c
parenta763c1a8e32bcb03424aab1fe59be1c42538c5b0 (diff)
merge non-conflicting changes to formula
-rw-r--r--formula/inc/AddressConvention.hxx3
-rw-r--r--formula/inc/formula/ExternalReferenceHelper.hxx2
-rw-r--r--formula/inc/formula/FormulaCompiler.hxx14
-rw-r--r--formula/inc/formula/IControlReferenceHandler.hxx3
-rw-r--r--formula/inc/formula/IFunctionDescription.hxx3
-rw-r--r--formula/inc/formula/errorcodes.hxx3
-rw-r--r--formula/inc/formula/formdata.hxx2
-rw-r--r--formula/inc/formula/formula.hxx3
-rw-r--r--formula/inc/formula/formuladllapi.h2
-rw-r--r--formula/inc/formula/formulahelper.hxx3
-rw-r--r--formula/inc/formula/funcutl.hxx18
-rw-r--r--formula/inc/formula/grammar.hxx15
-rw-r--r--formula/inc/formula/opcode.hxx3
-rw-r--r--formula/inc/formula/token.hxx24
-rw-r--r--formula/inc/formula/tokenarray.hxx4
-rw-r--r--formula/inc/pch/precompiled_formula.cxx2
-rw-r--r--formula/inc/pch/precompiled_formula.hxx3
-rw-r--r--formula/prj/d.lst1
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx195
-rw-r--r--formula/source/core/api/FormulaOpCodeMapperObj.cxx3
-rw-r--r--formula/source/core/api/services.cxx3
-rw-r--r--formula/source/core/api/token.cxx46
-rw-r--r--formula/source/core/inc/core_resource.hxx4
-rw-r--r--formula/source/core/resource/core_resource.cxx2
-rw-r--r--formula/source/core/resource/makefile.mk3
-rw-r--r--formula/source/ui/dlg/ControlHelper.hxx3
-rw-r--r--formula/source/ui/dlg/FormulaHelper.cxx23
-rw-r--r--formula/source/ui/dlg/formdlgs.hrc4
-rw-r--r--formula/source/ui/dlg/formdlgs.src61
-rw-r--r--formula/source/ui/dlg/formula.cxx124
-rw-r--r--formula/source/ui/dlg/funcpage.cxx8
-rw-r--r--formula/source/ui/dlg/funcpage.hxx2
-rw-r--r--formula/source/ui/dlg/funcutl.cxx228
-rw-r--r--formula/source/ui/dlg/parawin.cxx17
-rw-r--r--formula/source/ui/dlg/parawin.hrc1
-rw-r--r--formula/source/ui/dlg/parawin.hxx2
-rw-r--r--formula/source/ui/dlg/parawin.src25
-rw-r--r--formula/source/ui/dlg/structpg.cxx18
-rw-r--r--formula/source/ui/dlg/structpg.hxx5
-rw-r--r--formula/source/ui/inc/ForResId.hrc4
-rw-r--r--formula/source/ui/inc/ModuleHelper.hxx2
-rw-r--r--formula/source/ui/resource/ModuleHelper.cxx2
42 files changed, 465 insertions, 428 deletions
diff --git a/formula/inc/AddressConvention.hxx b/formula/inc/AddressConvention.hxx
index 942573fa48..7ad743ac11 100644
--- a/formula/inc/AddressConvention.hxx
+++ b/formula/inc/AddressConvention.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,3 +38,5 @@ namespace formula
// =============================================================================
#endif // FORMULA_ADDRESSCONVENTION_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/ExternalReferenceHelper.hxx b/formula/inc/formula/ExternalReferenceHelper.hxx
index e933f6d341..20cf2568e4 100644
--- a/formula/inc/formula/ExternalReferenceHelper.hxx
+++ b/formula/inc/formula/ExternalReferenceHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,4 @@ namespace formula
// =============================================================================
#endif //FORMULA_EXTERNALREFERENCEHELPER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/FormulaCompiler.hxx b/formula/inc/formula/FormulaCompiler.hxx
index b67d78abd1..75a00f3fb7 100644
--- a/formula/inc/formula/FormulaCompiler.hxx
+++ b/formula/inc/formula/FormulaCompiler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -121,7 +122,8 @@ public:
mbEnglish = FormulaGrammar::isEnglish( meGrammar);
}
virtual ~OpCodeMap();
-
+
+ void copyFrom( const OpCodeMap& r );
/// Get the symbol String -> OpCode hash map for finds.
inline const OpCodeHashMap* getHashMap() const { return mpHashMap; }
@@ -219,6 +221,8 @@ public:
void SetCompileForFAP( BOOL bVal )
{ bCompileForFAP = bVal; bIgnoreErrors = bVal; }
+ static bool IsOpCodeVolatile( OpCode eOp );
+
static BOOL DeQuote( String& rStr );
static const String& GetNativeSymbol( OpCode eOp );
@@ -242,6 +246,9 @@ public:
including an address reference convention. */
inline FormulaGrammar::Grammar GetGrammar() const { return meGrammar; }
+ static void UpdateSeparatorsNative( const rtl::OUString& rSep, const rtl::OUString& rArrayColSep, const rtl::OUString& rArrayRowSep );
+ static void ResetNativeSymbols();
+ static void SetNativeSymbols( const OpCodeMapPtr& xMap );
protected:
virtual String FindAddInFunction( const String& rUpperName, BOOL bLocalFirst ) const;
virtual void fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr xMap ) const;
@@ -318,12 +325,13 @@ private:
void InitSymbolsEnglish() const; /// only SymbolsEnglish, maybe later
void InitSymbolsPODF() const; /// only SymbolsPODF, on demand
void InitSymbolsODFF() const; /// only SymbolsODFF, on demand
+ void InitSymbolsEnglishXL() const; /// only SymbolsEnglishXL, on demand
void loadSymbols(USHORT _nSymbols,FormulaGrammar::Grammar _eGrammar,NonConstOpCodeMapPtr& _xMap) const;
static inline void ForceArrayOperator( FormulaTokenRef& rCurr, const FormulaTokenRef& rPrev )
{
- if ( rPrev.Is() && rPrev->HasForceArray() &&
+ if ( rPrev && rPrev->HasForceArray() &&
rCurr->GetType() == svByte && rCurr->GetOpCode() != ocPush
&& !rCurr->HasForceArray() )
rCurr->SetForceArray( true);
@@ -371,6 +379,7 @@ private:
mutable NonConstOpCodeMapPtr mxSymbolsPODF; // ODF 1.1 symbols
mutable NonConstOpCodeMapPtr mxSymbolsNative; // native symbols
mutable NonConstOpCodeMapPtr mxSymbolsEnglish; // English symbols
+ mutable NonConstOpCodeMapPtr mxSymbolsEnglishXL; // English Excel symbols (for VBA formula parsing)
};
// =============================================================================
} // formula
@@ -379,3 +388,4 @@ private:
#endif // FORMULA_COMPILER_HXX_INCLUDED
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/IControlReferenceHandler.hxx b/formula/inc/formula/IControlReferenceHandler.hxx
index d6574cb5aa..84fd125061 100644
--- a/formula/inc/formula/IControlReferenceHandler.hxx
+++ b/formula/inc/formula/IControlReferenceHandler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,5 @@ namespace formula
};
} // formula
#endif // FORMULA_ICONTROL_REFERENCE_HANDLER_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/IFunctionDescription.hxx b/formula/inc/formula/IFunctionDescription.hxx
index 9ecdff4263..49e9595c40 100644
--- a/formula/inc/formula/IFunctionDescription.hxx
+++ b/formula/inc/formula/IFunctionDescription.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -161,3 +162,5 @@ namespace formula
}
#endif //INCLUDE_FUNCTION_DESCRIPTION
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/errorcodes.hxx b/formula/inc/formula/errorcodes.hxx
index 1593f710b4..54fd243dba 100644
--- a/formula/inc/formula/errorcodes.hxx
+++ b/formula/inc/formula/errorcodes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120,3 +121,5 @@ inline USHORT GetDoubleErrorValue( double fVal )
using namespace ScErrorCodes;
#endif // SC_ERRORCODES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/formdata.hxx b/formula/inc/formula/formdata.hxx
index e9d9f06b37..035cb0ca86 100644
--- a/formula/inc/formula/formdata.hxx
+++ b/formula/inc/formula/formdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,4 @@ private:
} // formula
#endif // FORMULA_FORMDATA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/formula.hxx b/formula/inc/formula/formula.hxx
index 2f59807a34..7ae44931bf 100644
--- a/formula/inc/formula/formula.hxx
+++ b/formula/inc/formula/formula.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#define FORMULA_FORMULA_HXX
#include <sfx2/basedlgs.hxx>
-// #include "formula/funcutl.hxx"
#include <memory>
#include "formula/formuladllapi.h"
@@ -155,3 +155,4 @@ protected:
#endif // FORMULA_FORMULA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/formuladllapi.h b/formula/inc/formula/formuladllapi.h
index cc04767419..c412c25cf8 100644
--- a/formula/inc/formula/formuladllapi.h
+++ b/formula/inc/formula/formuladllapi.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,3 +40,4 @@
#endif /* INCLUDED_FORMULADLLAPI_H */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/formulahelper.hxx b/formula/inc/formula/formulahelper.hxx
index 063b7b0cc0..e8ab24f03b 100644
--- a/formula/inc/formula/formulahelper.hxx
+++ b/formula/inc/formula/formulahelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ namespace formula
// =============================================================================
#endif //FORMULA_FORMULA_HELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/funcutl.hxx b/formula/inc/formula/funcutl.hxx
index a659609600..41e12e03f1 100644
--- a/formula/inc/formula/funcutl.hxx
+++ b/formula/inc/formula/funcutl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,16 +29,14 @@
#ifndef FORMULA_FUNCUTL_HXX
#define FORMULA_FUNCUTL_HXX
-// #include <vcl/scrbar.hxx>
#include <vcl/fixed.hxx>
#include <vcl/button.hxx>
#include <vcl/edit.hxx>
#include "formula/formuladllapi.h"
+namespace formula {
-namespace formula
-{
- class IControlReferenceHandler;
+class IControlReferenceHandler;
class FORMULA_DLLPUBLIC RefEdit : public Edit
{
@@ -59,6 +58,13 @@ public:
virtual ~RefEdit();
void SetRefString( const XubString& rStr );
+
+ /**
+ * Flag reference valid or invalid, which in turn changes the visual
+ * appearance of the control accordingly.
+ */
+ void SetRefValid(bool bValid);
+
using Edit::SetText;
virtual void SetText( const XubString& rStr );
virtual void Modify();
@@ -78,9 +84,7 @@ class FORMULA_DLLPUBLIC RefButton : public ImageButton
{
private:
Image aImgRefStart; /// Start reference input
- Image aImgRefStartHC; /// Start reference input (high contrast)
Image aImgRefDone; /// Stop reference input
- Image aImgRefDoneHC; /// Stop reference input (high contrast)
IControlReferenceHandler* pAnyRefDlg; // parent dialog
RefEdit* pRefEdit; // zugeordnetes Edit-Control
@@ -102,5 +106,7 @@ public:
};
} // formula
+
#endif // FORMULA_FUNCUTL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/grammar.hxx b/formula/inc/formula/grammar.hxx
index 691dbcb715..1b95f108cc 100644
--- a/formula/inc/formula/grammar.hxx
+++ b/formula/inc/formula/grammar.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -127,6 +128,16 @@ public:
GRAM_NATIVE_XL_R1C1 = ::com::sun::star::sheet::FormulaLanguage::NATIVE |
((CONV_XL_R1C1 +
kConventionOffset) << kConventionShift),
+ /// English with Excel A1 reference style.
+ GRAM_ENGLISH_XL_A1 = ::com::sun::star::sheet::FormulaLanguage::XL_ENGLISH |
+ ((CONV_XL_A1 +
+ kConventionOffset) << kConventionShift) |
+ kEnglishBit,
+ /// English with Excel R1C1 reference style.
+ GRAM_ENGLISH_XL_R1C1 = ::com::sun::star::sheet::FormulaLanguage::XL_ENGLISH |
+ ((CONV_XL_R1C1 +
+ kConventionOffset) << kConventionShift) |
+ kEnglishBit,
/// Central definition of the default grammar to be used.
GRAM_DEFAULT = GRAM_NATIVE_UI,
@@ -177,6 +188,8 @@ public:
case GRAM_NATIVE_ODF :
case GRAM_NATIVE_XL_A1 :
case GRAM_NATIVE_XL_R1C1 :
+ case GRAM_ENGLISH_XL_A1 :
+ case GRAM_ENGLISH_XL_R1C1:
return true;
default:
return extractFormulaLanguage( eGrammar) == GRAM_EXTERNAL;
@@ -234,3 +247,5 @@ public:
// =============================================================================
#endif // FORMULA_GRAMMAR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/opcode.hxx b/formula/inc/formula/opcode.hxx
index 53f387ae76..e13cb6dc72 100644
--- a/formula/inc/formula/opcode.hxx
+++ b/formula/inc/formula/opcode.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -403,3 +404,5 @@ typedef OpCodeEnum OpCode;
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/token.hxx b/formula/inc/formula/token.hxx
index be1b2f6acd..8937f844ae 100644
--- a/formula/inc/formula/token.hxx
+++ b/formula/inc/formula/token.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,13 +33,12 @@
#include <string.h>
#include <vector>
#include "formula/opcode.hxx"
-//#include "refdata.hxx"
-//#include "scmatrix.hxx"
-#include "formula/intruref.hxx"
#include <tools/mempool.hxx>
#include "formula/IFunctionDescription.hxx"
#include "formula/formuladllapi.h"
+#include <boost/intrusive_ptr.hpp>
+
namespace formula
{
@@ -86,9 +86,8 @@ typedef StackVarEnum StackVar;
class FormulaToken;
-typedef SimpleIntrusiveReference< class FormulaToken > FormulaTokenRef;
-typedef SimpleIntrusiveReference< const class FormulaToken > FormulaConstTokenRef;
-
+typedef ::boost::intrusive_ptr<FormulaToken> FormulaTokenRef;
+typedef ::boost::intrusive_ptr<const FormulaToken> FormulaConstTokenRef;
class FORMULA_DLLPUBLIC FormulaToken : public IFormulaToken
{
@@ -113,6 +112,7 @@ public:
inline StackVar GetType() const { return eType; }
BOOL IsFunction() const; // pure functions, no operators
BOOL IsMatrixFunction() const; // if a function _always_ returns a Matrix
+ bool IsExternalRef() const;
BYTE GetParamCount() const;
inline void IncRef() const { nRefCnt++; }
inline void DecRef() const
@@ -179,6 +179,16 @@ public:
{ return GetStrLenBytes( rStr.Len() ); }
};
+inline void intrusive_ptr_add_ref(const FormulaToken* p)
+{
+ p->IncRef();
+}
+
+inline void intrusive_ptr_release(const FormulaToken* p)
+{
+ p->DecRef();
+}
+
class FORMULA_DLLPUBLIC FormulaByteToken : public FormulaToken
{
private:
@@ -397,3 +407,5 @@ public:
// =============================================================================
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/formula/tokenarray.hxx b/formula/inc/formula/tokenarray.hxx
index 54e8179c3f..02d725a9bc 100644
--- a/formula/inc/formula/tokenarray.hxx
+++ b/formula/inc/formula/tokenarray.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,6 +29,7 @@
#ifndef FORMULA_TOKENARRAY_HXX
#define FORMULA_TOKENARRAY_HXX
+#include <limits.h>
#include "formula/token.hxx"
#include "formula/ExternalReferenceHelper.hxx"
#include <tools/solar.h>
@@ -125,6 +127,7 @@ public:
FormulaToken* LastRPN() { nIndex = nRPN; return PrevRPN(); }
FormulaToken* PrevRPN();
+ bool HasExternalRef() const;
BOOL HasOpCode( OpCode ) const;
BOOL HasOpCodeRPN( OpCode ) const;
/// Token of type svIndex or opcode ocColRowName
@@ -284,3 +287,4 @@ public:
#endif // FORMULA_TOKENARRAY_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/pch/precompiled_formula.cxx b/formula/inc/pch/precompiled_formula.cxx
index 9a56cf658e..d38b937c3f 100644
--- a/formula/inc/pch/precompiled_formula.cxx
+++ b/formula/inc/pch/precompiled_formula.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,3 +28,4 @@
#include "precompiled_formula.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/inc/pch/precompiled_formula.hxx b/formula/inc/pch/precompiled_formula.hxx
index 7dd6970f7b..10833d9bab 100644
--- a/formula/inc/pch/precompiled_formula.hxx
+++ b/formula/inc/pch/precompiled_formula.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,3 +35,5 @@
#include "comphelper/sequenceashashmap.hxx"
#include "comphelper/documentconstants.hxx"
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/prj/d.lst b/formula/prj/d.lst
index d2afebacf4..0fe5a1fe71 100644
--- a/formula/prj/d.lst
+++ b/formula/prj/d.lst
@@ -29,7 +29,6 @@ mkdir: %_DEST%\inc%_EXT%\formula
..\inc\formula\token.hxx %_DEST%\inc%_EXT%\formula\token.hxx
..\inc\formula\tokenarray.hxx %_DEST%\inc%_EXT%\formula\tokenarray.hxx
..\inc\formula\errorcodes.hxx %_DEST%\inc%_EXT%\formula\errorcodes.hxx
-..\inc\formula\intruref.hxx %_DEST%\inc%_EXT%\formula\intruref.hxx
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 51e2ca99f1..d1c8cc124d 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,6 +26,7 @@
*
************************************************************************/
#include "precompiled_formula.hxx"
+#include <sal/macros.h>
#include "formula/FormulaCompiler.hxx"
#include "formula/errorcodes.hxx"
#include "formula/token.hxx"
@@ -345,7 +347,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
{ FormulaMapGroupSpecialOffset::MACRO , ocMacro } ,
{ FormulaMapGroupSpecialOffset::COL_ROW_NAME , ocColRowName }
};
- const size_t nCount = sizeof(aMap)/sizeof(aMap[0]);
+ const size_t nCount = SAL_N_ELEMENTS(aMap);
// Preallocate vector elements.
if (aVec.size() < nCount)
{
@@ -385,7 +387,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
SC_OPCODE_CLOSE,
SC_OPCODE_SEP,
};
- lclPushOpCodeMapEntries( aVec, mpTable, aOpCodes, sizeof(aOpCodes)/sizeof(aOpCodes[0]) );
+ lclPushOpCodeMapEntries( aVec, mpTable, aOpCodes, SAL_N_ELEMENTS(aOpCodes) );
}
if ((nGroups & FormulaMapGroup::ARRAY_SEPARATORS) != 0)
{
@@ -395,7 +397,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
SC_OPCODE_ARRAY_ROW_SEP,
SC_OPCODE_ARRAY_COL_SEP
};
- lclPushOpCodeMapEntries( aVec, mpTable, aOpCodes, sizeof(aOpCodes)/sizeof(aOpCodes[0]) );
+ lclPushOpCodeMapEntries( aVec, mpTable, aOpCodes, SAL_N_ELEMENTS(aOpCodes) );
}
if ((nGroups & FormulaMapGroup::UNARY_OPERATORS) != 0)
{
@@ -451,7 +453,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
SC_OPCODE_NOT,
SC_OPCODE_NEG
};
- lclPushOpCodeMapEntries( aVec, mpTable, aOpCodes, sizeof(aOpCodes)/sizeof(aOpCodes[0]) );
+ lclPushOpCodeMapEntries( aVec, mpTable, aOpCodes, SAL_N_ELEMENTS(aOpCodes) );
// functions with 2 or more parameters.
for (USHORT nOp = SC_OPCODE_START_2_PAR; nOp < SC_OPCODE_STOP_2_PAR && nOp < mnSymbols; ++nOp)
{
@@ -568,6 +570,11 @@ FormulaCompiler::OpCodeMapPtr FormulaCompiler::GetOpCodeMap( const sal_Int32 nLa
InitSymbolsNative();
xMap = mxSymbolsNative;
break;
+ case FormulaLanguage::XL_ENGLISH:
+ if (!mxSymbolsEnglishXL)
+ InitSymbolsEnglishXL();
+ xMap = mxSymbolsEnglishXL;
+ break;
default:
; // nothing, NULL map returned
}
@@ -637,24 +644,7 @@ const String& FormulaCompiler::GetNativeSymbol( OpCode eOp )
// -----------------------------------------------------------------------------
void FormulaCompiler::InitSymbolsNative() const
{
- if (mxSymbolsNative.get())
- return;
- //! Experimental!
- // Use English function names and separators instead of native in UI.
- static const sal_Char aEnvVarName[] = "OOO_CALC_USE_ENGLISH_FORMULAS";
- const char* pEnv = getenv( aEnvVarName);
- if (pEnv && (*pEnv == 'Y' || *pEnv == 'y' || *pEnv == '1') )
- {
- fprintf( stderr, "%s=%s => UI uses English function names and separators in formulas.\n",
- aEnvVarName, pEnv);
- InitSymbolsEnglish();
- mxSymbolsNative = mxSymbolsEnglish;
- return;
- }
- static NonConstOpCodeMapPtr s_sSymbol;
- if ( !s_sSymbol.get() )
- lcl_fillNativeSymbols(s_sSymbol);
- mxSymbolsNative = s_sSymbol;
+ lcl_fillNativeSymbols(mxSymbolsNative);
}
// -----------------------------------------------------------------------------
void FormulaCompiler::InitSymbolsEnglish() const
@@ -681,6 +671,22 @@ void FormulaCompiler::InitSymbolsODFF() const
mxSymbolsODFF = s_sSymbol;
}
// -----------------------------------------------------------------------------
+void FormulaCompiler::InitSymbolsEnglishXL() const
+{
+ static NonConstOpCodeMapPtr s_sSymbol;
+ if ( !s_sSymbol.get() )
+ loadSymbols(RID_STRLIST_FUNCTION_NAMES_ENGLISH,FormulaGrammar::GRAM_ENGLISH,s_sSymbol);
+ mxSymbolsEnglishXL = s_sSymbol;
+
+ // TODO: For now, just replace the separators to the Excel English
+ // variants. Later, if we want to properly map Excel functions with Calc
+ // functions, we'll need to do a little more work here.
+ mxSymbolsEnglishXL->putOpCode(sal_Unicode(','), ocSep);
+ mxSymbolsEnglishXL->putOpCode(sal_Unicode(','), ocArrayColSep);
+ mxSymbolsEnglishXL->putOpCode(sal_Unicode(';'), ocArrayRowSep);
+}
+
+// -----------------------------------------------------------------------------
void FormulaCompiler::loadSymbols(USHORT _nSymbols,FormulaGrammar::Grammar _eGrammar,NonConstOpCodeMapPtr& _xMap) const
{
if ( !_xMap.get() )
@@ -720,6 +726,30 @@ OpCode FormulaCompiler::GetEnglishOpCode( const String& rName ) const
return bFound ? (*iLook).second : OpCode(ocNone);
}
+bool FormulaCompiler::IsOpCodeVolatile( OpCode eOp )
+{
+ switch (eOp)
+ {
+ // no parameters:
+ case ocRandom:
+ case ocGetActDate:
+ case ocGetActTime:
+ // one parameter:
+ case ocFormula:
+ case ocInfo:
+ // more than one parameters:
+ // ocIndirect/ocIndirectXL otherwise would have to do
+ // StopListening and StartListening on a reference for every
+ // interpreted value.
+ case ocIndirect:
+ case ocIndirectXL:
+ // ocOffset results in indirect references.
+ case ocOffset:
+ return true;
+ }
+ return false;
+}
+
// Remove quotes, escaped quotes are unescaped.
BOOL FormulaCompiler::DeQuote( String& rStr )
{
@@ -775,6 +805,22 @@ FormulaCompiler::OpCodeMap::~OpCodeMap()
delete mpHashMap;
}
// -----------------------------------------------------------------------------
+void FormulaCompiler::OpCodeMap::copyFrom( const OpCodeMap& r )
+{
+ delete mpHashMap;
+ mpHashMap = new OpCodeHashMap(mnSymbols);
+
+ USHORT n = r.getSymbolCount();
+ for (USHORT i = 0; i < n; ++i)
+ {
+ OpCode eOp = OpCode(i);
+ const String& rSymbol = r.getSymbol(eOp);
+ putOpCode(rSymbol, eOp);
+ }
+
+ // TODO: maybe copy the external maps too?
+}
+// -----------------------------------------------------------------------------
sal_Int32 FormulaCompiler::OpCodeMap::getOpCodeUnknown()
{
static const sal_Int32 kOpCodeUnknown = -1;
@@ -813,11 +859,11 @@ BOOL FormulaCompiler::GetToken()
if ( nWasColRowName )
nWasColRowName++;
if ( bAutoCorrect && !pStack )
- CreateStringFromToken( aCorrectedFormula, pToken, FALSE );
+ CreateStringFromToken( aCorrectedFormula, pToken.get(), FALSE );
pToken = pArr->Next();
}
if ( bAutoCorrect && !pStack && pToken )
- CreateStringFromToken( aCorrectedSymbol, pToken, FALSE );
+ CreateStringFromToken( aCorrectedSymbol, pToken.get(), FALSE );
if( !pToken )
{
if( pStack )
@@ -844,7 +890,7 @@ BOOL FormulaCompiler::GetToken()
}
if( pToken->GetOpCode() == ocSubTotal )
glSubTotal = TRUE;
- else if ( pToken->GetOpCode() == ocExternalRef )
+ else if ( pToken->IsExternalRef() )
{
return HandleExternalReference(*pToken);
}
@@ -936,44 +982,32 @@ void FormulaCompiler::Factor()
{
if( nNumFmt == NUMBERFORMAT_UNDEFINED )
nNumFmt = lcl_GetRetFormat( eOp );
- // Functions that have to be always recalculated
- switch( eOp )
+
+ if ( IsOpCodeVolatile(eOp) )
+ pArr->SetRecalcModeAlways();
+ else
{
- // no parameters:
- case ocRandom:
- case ocGetActDate:
- case ocGetActTime:
- // one parameter:
- case ocFormula:
- case ocInfo:
- // more than one parameters:
- // ocIndirect/ocIndirectXL otherwise would have to do
- // StopListening and StartListening on a reference for every
- // interpreted value.
- case ocIndirect:
- case ocIndirectXL:
- // ocOffset results in indirect references.
- case ocOffset:
- pArr->SetRecalcModeAlways();
- break;
- // Functions recalculated on every document load.
- // Don't use SetRecalcModeOnLoad() which would override
- // ModeAlways.
- case ocConvert :
- pArr->AddRecalcMode( RECALCMODE_ONLOAD );
- break;
- // If the referred cell is moved the value changes.
- case ocColumn :
- case ocRow :
- // ocCell needs recalc on move for some possible type values.
- case ocCell :
- pArr->SetRecalcModeOnRefMove();
- break;
- case ocHyperLink :
- pArr->SetHyperLink(TRUE);
- break;
- default:
- ; // nothing
+ switch( eOp )
+ {
+ // Functions recalculated on every document load.
+ // Don't use SetRecalcModeOnLoad() which would override
+ // ModeAlways.
+ case ocConvert :
+ pArr->AddRecalcMode( RECALCMODE_ONLOAD );
+ break;
+ // If the referred cell is moved the value changes.
+ case ocColumn :
+ case ocRow :
+ // ocCell needs recalc on move for some possible type values.
+ case ocCell :
+ pArr->SetRecalcModeOnRefMove();
+ break;
+ case ocHyperLink :
+ pArr->SetHyperLink(TRUE);
+ break;
+ default:
+ ; // nothing
+ }
}
if (SC_OPCODE_START_NO_PAR <= eOp && eOp < SC_OPCODE_STOP_NO_PAR)
{
@@ -1138,7 +1172,7 @@ void FormulaCompiler::Factor()
bCorrected = TRUE;
}
}
- else if ( eOp == ocExternalRef )
+ else if ( pToken->IsExternalRef() )
{
PutCode(pToken);
eOp = NextToken();
@@ -1367,7 +1401,7 @@ bool FormulaCompiler::MergeRangeReference(FormulaToken * * const pCode1, Formula
p->IncRef();
p1->DecRef();
p2->DecRef();
- *pCode1 = p;
+ *pCode1 = p.get();
--pCode, --pc;
pArr->nRefs--;
@@ -1558,7 +1592,7 @@ FormulaToken* FormulaCompiler::CreateStringFromToken( rtl::OUStringBuffer& rBuff
}
if( bNext )
{
- if (eOp == ocExternalRef)
+ if (t->IsExternalRef())
{
CreateStringFromExternal(rBuffer, pTokenP);
}
@@ -1678,6 +1712,31 @@ void FormulaCompiler::AppendString( rtl::OUStringBuffer& rBuffer, const String &
rBuffer.append(sal_Unicode('"'));
}
}
+
+void FormulaCompiler::UpdateSeparatorsNative(
+ const rtl::OUString& rSep, const rtl::OUString& rArrayColSep, const rtl::OUString& rArrayRowSep )
+{
+ NonConstOpCodeMapPtr xSymbolsNative;
+ lcl_fillNativeSymbols(xSymbolsNative);
+ xSymbolsNative->putOpCode(rSep, ocSep);
+ xSymbolsNative->putOpCode(rArrayColSep, ocArrayColSep);
+ xSymbolsNative->putOpCode(rArrayRowSep, ocArrayRowSep);
+}
+
+void FormulaCompiler::ResetNativeSymbols()
+{
+ NonConstOpCodeMapPtr xSymbolsNative;
+ lcl_fillNativeSymbols(xSymbolsNative, true);
+ lcl_fillNativeSymbols(xSymbolsNative);
+}
+
+void FormulaCompiler::SetNativeSymbols( const OpCodeMapPtr& xMap )
+{
+ NonConstOpCodeMapPtr xSymbolsNative;
+ lcl_fillNativeSymbols(xSymbolsNative);
+ xSymbolsNative->copyFrom(*xMap);
+}
+
// -----------------------------------------------------------------------------
OpCode FormulaCompiler::NextToken()
{
@@ -1781,7 +1840,7 @@ void FormulaCompiler::PutCode( FormulaTokenRef& p )
{
p = new FormulaByteToken( ocStop );
p->IncRef();
- *pCode++ = p;
+ *pCode++ = p.get();
++pc;
}
SetError(errCodeOverflow);
@@ -1791,7 +1850,7 @@ void FormulaCompiler::PutCode( FormulaTokenRef& p )
return;
ForceArrayOperator( p, pCurrentFactorToken);
p->IncRef();
- *pCode++ = p;
+ *pCode++ = p.get();
pc++;
}
@@ -1857,3 +1916,5 @@ void FormulaCompiler::PushTokenArray( FormulaTokenArray* pa, BOOL bTemp )
// =============================================================================
} // formula
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/core/api/FormulaOpCodeMapperObj.cxx b/formula/source/core/api/FormulaOpCodeMapperObj.cxx
index c16be9acd1..28e9675e2d 100644
--- a/formula/source/core/api/FormulaOpCodeMapperObj.cxx
+++ b/formula/source/core/api/FormulaOpCodeMapperObj.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124,3 +125,5 @@ uno::Reference< uno::XInterface > SAL_CALL FormulaOpCodeMapperObj::create(
// =============================================================================
} // formula
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/core/api/services.cxx b/formula/source/core/api/services.cxx
index b828953ac2..0d1df59c76 100644
--- a/formula/source/core/api/services.cxx
+++ b/formula/source/core/api/services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
}
} // extern "C"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index ccc740633c..edf3d5d400 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,10 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_formula.hxx"
-
-
-// INCLUDE ---------------------------------------------------------------
-
#if STLPORT_VERSION<321
#include <stddef.h>
#else
@@ -47,9 +44,6 @@
#include "formula/tokenarray.hxx"
#include "formula/FormulaCompiler.hxx"
#include <formula/compiler.hrc>
-//#include "rechead.hxx"
-//#include "parclass.hxx"
-//#include "jumpmatrix.hxx"
#define MAXJUMPCOUNT 32 /* maximum number of jumps (ocChose) */
namespace formula
@@ -145,6 +139,18 @@ BOOL FormulaToken::IsMatrixFunction() const
return formula::FormulaCompiler::IsMatrixFunction(GetOpCode());
}
+bool FormulaToken::IsExternalRef() const
+{
+ switch (eType)
+ {
+ case svExternalSingleRef:
+ case svExternalDoubleRef:
+ case svExternalName:
+ return true;
+ }
+ return false;
+}
+
BOOL FormulaToken::operator==( const FormulaToken& rToken ) const
{
// don't compare reference count!
@@ -257,7 +263,7 @@ BOOL FormulaByteToken::operator==( const FormulaToken& r ) const
}
-FormulaToken* FormulaFAPToken::GetFAPOrigToken() const { return pOrigToken; }
+FormulaToken* FormulaFAPToken::GetFAPOrigToken() const { return pOrigToken.get(); }
BOOL FormulaFAPToken::operator==( const FormulaToken& r ) const
{
return FormulaByteToken::operator==( r ) && pOrigToken == r.GetFAPOrigToken();
@@ -550,6 +556,16 @@ FormulaToken* FormulaTokenArray::PeekPrevNoSpaces()
return NULL;
}
+bool FormulaTokenArray::HasExternalRef() const
+{
+ for ( USHORT j=0; j < nLen; j++ )
+ {
+ if (pCode[j]->IsExternalRef())
+ return true;
+ }
+ return false;
+}
+
BOOL FormulaTokenArray::HasOpCode( OpCode eOp ) const
{
for ( USHORT j=0; j < nLen; j++ )
@@ -877,19 +893,6 @@ BOOL FormulaTokenArray::HasMatrixDoubleRefOps()
// --- POF (plain old formula) rewrite of a token array ---------------------
-#if 0
-// static function can't be compiled if not used (warning)
-//#if OSL_DEBUG_LEVEL > 0
-static void DumpTokArr( FormulaTokenArray *pCode )
-{
- fprintf (stderr, "TokenArr: ");
- for ( FormulaToken *pCur = pCode->First(); pCur; pCur = pCode->Next() )
- fprintf( stderr, "t%d,o%d ",
- pCur->GetType(), pCur->GetOpCode() );
- fprintf (stderr, "\n");
-}
-#endif
-
inline bool MissingConvention::isRewriteNeeded( OpCode eOp ) const
{
switch (eOp)
@@ -1376,3 +1379,4 @@ BOOL FormulaUnknownToken::operator==( const FormulaToken& r ) const
} // formula
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/core/inc/core_resource.hxx b/formula/source/core/inc/core_resource.hxx
index c38c158e0a..20a8f9b97c 100644
--- a/formula/source/core/inc/core_resource.hxx
+++ b/formula/source/core/inc/core_resource.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef _FORMULA_CORE_RESOURCE_HXX_
#define _FORMULA_CORE_RESOURCE_HXX_
-#ifndef _RTL_USTRING_HXX_
#include <rtl/ustring.hxx>
-#endif
#include <osl/mutex.hxx>
class ResMgr;
@@ -109,3 +108,4 @@ namespace formula
#endif // _FORMULA_CORE_RESOURCE_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/core/resource/core_resource.cxx b/formula/source/core/resource/core_resource.cxx
index 15ed492b5b..f3f6d31ab4 100644
--- a/formula/source/core/resource/core_resource.cxx
+++ b/formula/source/core/resource/core_resource.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,3 +107,4 @@ namespace formula
} // formula
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/core/resource/makefile.mk b/formula/source/core/resource/makefile.mk
index 874d05078d..7efbdea778 100644
--- a/formula/source/core/resource/makefile.mk
+++ b/formula/source/core/resource/makefile.mk
@@ -41,7 +41,8 @@ SRS1NAME=core_strings
SRC1FILES= \
core_resource.src
-SLOFILES= $(SLO)$/core_resource.obj
+SLOFILES= $(EXCEPTIONSFILES)
+EXCEPTIONSFILES= $(SLO)$/core_resource.obj
# --- Targets ----------------------------------
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx
index e0472000d1..346f2c7295 100644
--- a/formula/source/ui/dlg/ControlHelper.hxx
+++ b/formula/source/ui/dlg/ControlHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -191,3 +192,5 @@ public:
}
#endif // FORMULA_FORMULA_HELPER_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx
index 5f5f2b8623..331aa938a5 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,7 +59,7 @@ namespace formula
};
}
//===================================================================
-// class FormulaHelper - statische Methoden
+// class FormulaHelper - static Method
//===================================================================
#define FUNC_NOTFOUND 0xffff
@@ -76,7 +77,7 @@ FormulaHelper::FormulaHelper(const IFunctionManager* _pFunctionManager)
}
BOOL FormulaHelper::GetNextFunc( const String& rFormula,
BOOL bBack,
- xub_StrLen& rFStart, // Ein- und Ausgabe
+ xub_StrLen& rFStart, // Input and output
xub_StrLen* pFEnd, // = NULL
const IFunctionDescription** ppFDesc, // = NULL
::std::vector< ::rtl::OUString>* pArgs ) const // = NULL
@@ -110,7 +111,7 @@ BOOL FormulaHelper::GetNextFunc( const String& rFormula,
*ppFDesc = pCurrent;
break;
}
- } // for(sal_uInt32 i = 0 ; i < nCount; ++i)
+ }// for(sal_uInt32 i = 0 ; i < nCount; ++i)
}
if ( *ppFDesc && pArgs )
{
@@ -145,7 +146,7 @@ void FormulaHelper::FillArgStrings( const String& rFormula,
{
nStart = GetArgStart( rFormula, nFuncPos, i );
- if ( i+1<nArgs ) // letztes Argument?
+ if ( i+1<nArgs ) // last argument?
{
nEnd = GetArgStart( rFormula, nFuncPos, i+1 );
@@ -262,11 +263,11 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
{
if ( IsFormulaText( m_pCharClass,rFormula, nFStart ) )
{
- // Funktion gefunden
+ // Function found
if ( pFuncName )
*pFuncName = rFormula.Copy( nFStart, nParPos-nFStart );
}
- else // Klammern ohne Funktion -> weitersuchen
+ else // Brackets without function -> keep searching
{
bRepeat = TRUE;
if ( !bBack )
@@ -277,7 +278,7 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
bRepeat = FALSE;
}
}
- else // keine Klammern gefunden
+ else // No brackets found
{
nFStart = FUNC_NOTFOUND;
if ( pFuncName )
@@ -322,7 +323,7 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart
else if ( nParCount < 0 )
{
bFound = TRUE;
- nStart--; // einen zu weit gelesen
+ nStart--; // read one too far
}
}
else if ( c == arrayOpen )
@@ -338,10 +339,10 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart
if ( !bInArray && nParCount == 0 )
{
bFound = TRUE;
- nStart--; // einen zu weit gelesen
+ nStart--; // read one too far
}
}
- nStart++; // hinter gefundene Position stellen
+ nStart++; // Set behind found position
}
return nStart;
@@ -404,3 +405,5 @@ xub_StrLen FormulaHelper::GetArgStart( const String& rStr, xub_StrLen nStart, US
// =============================================================================
} // formula
// =============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/dlg/formdlgs.hrc b/formula/source/ui/dlg/formdlgs.hrc
index bb9e2a5a2a..5589c1068d 100644
--- a/formula/source/ui/dlg/formdlgs.hrc
+++ b/formula/source/ui/dlg/formdlgs.hrc
@@ -68,10 +68,6 @@
#define BMP_STR_OPEN 2
#define BMP_STR_END 3
#define BMP_STR_ERROR 4
-#define BMP_STR_CLOSE_H 11
-#define BMP_STR_OPEN_H 12
-#define BMP_STR_END_H 13
-#define BMP_STR_ERROR_H 14
// Texte
#define STR_STRUCT_ERR1 1
diff --git a/formula/source/ui/dlg/formdlgs.src b/formula/source/ui/dlg/formdlgs.src
index 40a87e3b23..9b2852cc0c 100644
--- a/formula/source/ui/dlg/formdlgs.src
+++ b/formula/source/ui/dlg/formdlgs.src
@@ -111,41 +111,21 @@ TabPage RID_FORMULATAB_STRUCT
ImageBitmap = Bitmap { File = "fapclose.bmp"; };
MaskColor = STD_MASKCOLOR;
};
- Image BMP_STR_CLOSE_H
- {
- ImageBitmap = Bitmap { File = "fapclose_h.bmp"; };
- MaskColor = STD_MASKCOLOR;
- };
Image BMP_STR_OPEN
{
ImageBitmap = Bitmap { File = "fapopen.bmp"; };
MaskColor = STD_MASKCOLOR;
};
- Image BMP_STR_OPEN_H
- {
- ImageBitmap = Bitmap { File = "fapopen_h.bmp"; };
- MaskColor = STD_MASKCOLOR;
- };
Image BMP_STR_END
{
ImageBitmap = Bitmap { File = "fapok.bmp"; };
MaskColor = STD_MASKCOLOR;
};
- Image BMP_STR_END_H
- {
- ImageBitmap = Bitmap { File = "fapok_h.bmp"; };
- MaskColor = STD_MASKCOLOR;
- };
Image BMP_STR_ERROR
{
ImageBitmap = Bitmap { File = "faperror.bmp"; };
MaskColor = STD_MASKCOLOR;
};
- Image BMP_STR_ERROR_H
- {
- ImageBitmap = Bitmap { File = "faperror_h.bmp"; };
- MaskColor = STD_MASKCOLOR;
- };
String STR_STRUCT_ERR1
{
Text [ en-US ] = "=?" ;
@@ -497,15 +477,6 @@ Image RID_BMP_REFBTN1
MaskColor = STD_MASKCOLOR;
};
-Image RID_BMP_REFBTN1_H
-{
- ImageBitmap = Bitmap
- {
- File = "refinp1_h.bmp";
- };
- MaskColor = STD_MASKCOLOR;
-};
-
Image RID_BMP_REFBTN2
{
ImageBitmap = Bitmap
@@ -514,35 +485,3 @@ Image RID_BMP_REFBTN2
};
MaskColor = STD_MASKCOLOR;
};
-
-Image RID_BMP_REFBTN2_H
-{
- ImageBitmap = Bitmap
- {
- File = "refinp2_h.bmp";
- };
- MaskColor = STD_MASKCOLOR;
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index eaca92a81d..11a35a372c 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -222,7 +223,7 @@ namespace formula
const String aTitle1;
const String aTitle2;
const String aTxtEnd;
- const String aTxtOk; // hinter aBtnEnd
+ const String aTxtOk; // behind aBtnEnd
FormulaHelper
m_aFormulaHelper;
@@ -294,9 +295,9 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
pMEdit (NULL),
bUserMatrixFlag (FALSE),
//
- aTitle1 ( ModuleRes( STR_TITLE1 ) ), // lokale Resource
- aTitle2 ( ModuleRes( STR_TITLE2 ) ), // lokale Resource
- aTxtEnd ( ModuleRes( STR_END ) ), // lokale Resource
+ aTitle1 ( ModuleRes( STR_TITLE1 ) ), // local resource
+ aTitle2 ( ModuleRes( STR_TITLE2 ) ), // local resource
+ aTxtEnd ( ModuleRes( STR_END ) ), // local resource
aTxtOk ( aBtnEnd.GetText() ),
m_aFormulaHelper(_pFunctionMgr),
//
@@ -374,10 +375,10 @@ FormulaDlg_Impl::~FormulaDlg_Impl()
{
aTimer.SetTimeoutHdl(Link());
aTimer.Stop();
- } // if(aTimer.IsActive())
- bIsShutDown=TRUE;// Setzen, damit PreNotify keinen GetFocus speichert.
+ }// if(aTimer.IsActive())
+ bIsShutDown=TRUE;// Set it in order to PreNotify not to save GetFocus.
FormEditData* pData = m_pHelper->getFormEditData();
- if (pData) // wird nicht ueber Close zerstoert;
+ if (pData) // it won't be destroyed over Close;
{
pData->SetFStart((xub_StrLen)pMEdit->GetSelection().Min());
pData->SetSelection(pMEdit->GetSelection());
@@ -425,7 +426,7 @@ void FormulaDlg_Impl::PreNotify( NotifyEvent& rNEvt )
FormEditData* pData = m_pHelper->getFormEditData();
- if (pData && !aTimer.IsActive()) // wird nicht ueber Close zerstoert;
+ if (pData && !aTimer.IsActive()) // it won't be destroyed over Close;
{
pData->SetUniqueId(aActivWinId);
}
@@ -482,7 +483,7 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
xub_StrLen nTokPos=1;
xub_StrLen nOldTokPos=1;
- xub_StrLen nFuncPos=STRING_NOTFOUND; //@ Testweise
+ xub_StrLen nFuncPos=STRING_NOTFOUND; //@ Testwise
xub_StrLen nPrevFuncPos=1;
short nBracketCount=0;
BOOL bFlag=FALSE;
@@ -496,8 +497,6 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
const sheet::FormulaToken* pIter = m_aTokenList.getConstArray();
const sheet::FormulaToken* pEnd = pIter + m_aTokenList.getLength();
- //if ( pIter != pEnd && aFormString.GetChar(0) == '=' )
- // ++pIter;
try
{
while ( pIter != pEnd )
@@ -594,7 +593,7 @@ BOOL FormulaDlg_Impl::CalcValue( const String& rStrExp, String& rStrResult )
if ( rStrExp.Len() > 0 )
{
- // nur, wenn keine Tastatureingabe mehr anliegt, den Wert berechnen:
+ // Only calculate the value when there isn't any more keyboard input:
if ( !Application::AnyInput( INPUT_KEYBOARD ) )
{
@@ -632,7 +631,7 @@ BOOL FormulaDlg_Impl::CalcStruct( const String& rStrExp)
if ( rStrExp.Len() > 0 && aOldFormula!=rStrExp && bStructUpdate)
{
- // nur, wenn keine Tastatureingabe mehr anliegt, den Wert berechnen:
+ // Only calculate the value when there isn't any more keyboard input:
if ( !Application::AnyInput( INPUT_KEYBOARD ) )
{
@@ -796,10 +795,10 @@ void FormulaDlg_Impl::FillDialog(BOOL nFlag)
// -----------------------------------------------------------------------------
void FormulaDlg_Impl::FillListboxes()
{
- // Umschalten zwischen den "Seiten"
+ // Switch between the "Pages"
FormEditData* pData = m_pHelper->getFormEditData();
String aNewTitle;
- // 1. Seite: Funktion auswaehlen
+ // 1. Page: select function
if ( pFuncDesc && pFuncDesc->getCategory() )
{
if( pFuncPage->GetCategory() != pFuncDesc->getCategory()->getNumber() + 1 )
@@ -816,10 +815,10 @@ void FormulaDlg_Impl::FillListboxes()
}
FuncSelHdl(NULL);
- // ResizeArgArr jetzt schon in UpdateFunctionDesc
+ // ResizeArgArr is now already in UpdateFunctionDesc
- m_pHelper->setDispatcherLock( TRUE);// Modal-Modus einschalten
+ m_pHelper->setDispatcherLock( TRUE);// Activate Modal-Mode
aNewTitle = aTitle1;
@@ -830,13 +829,13 @@ void FormulaDlg_Impl::FillListboxes()
// -----------------------------------------------------------------------------
void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev)
{
- // Umschalten zwischen den "Seiten"
+ // Switch between the "Pages"
FormEditData* pData = m_pHelper->getFormEditData();
if (!pData )
return;
String aNewTitle;
- // 2. Seite oder Editieren: ausgewaehlte Funktion anzeigen
+ // 2. Page or Edit: show selected function
xub_StrLen nFStart = pData->GetFStart();
String aFormula = m_pHelper->getCurrentFormula();
@@ -886,7 +885,7 @@ void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev)
USHORT nOffset = pData->GetOffset();
nEdFocus = pData->GetEdFocus();
- // Verkettung der Edit's fuer Focus-Kontrolle
+ // Concatenate the Edit's for Focus-Control
if(bTestFlag)
pParaWin->SetArgumentOffset(nOffset);
@@ -978,10 +977,10 @@ String FormulaDlg_Impl::RepairFormula(const String& aFormula)
void FormulaDlg_Impl::DoEnter(BOOL bOk)
{
- // Eingabe ins Dokument uebernehmen oder abbrechen
+ // Accept input to the document or cancel
if ( bOk)
{
- // ggf. Dummy-Argumente entfernen
+ // remove dummy arguments
String aInputFormula = m_pHelper->getCurrentFormula();
String aString = RepairFormula(pMEdit->GetText());
m_pHelper->setSelection(0, aInputFormula.Len());
@@ -991,10 +990,10 @@ void FormulaDlg_Impl::DoEnter(BOOL bOk)
m_pHelper->switchBack();
m_pHelper->dispatch(bOk,aBtnMatrix.IsChecked());
- // Daten loeschen
+ // Clear data
m_pHelper->deleteFormData();
- // Dialog schliessen
+ // Close dialog
m_pHelper->doClose(bOk);
}
// -----------------------------------------------------------------------------
@@ -1003,15 +1002,15 @@ IMPL_LINK( FormulaDlg_Impl, BtnHdl, PushButton*, pBtn )
{
if ( pBtn == &aBtnCancel )
{
- DoEnter(FALSE); // schliesst den Dialog
+ DoEnter(FALSE); // closes the Dialog
}
else if ( pBtn == &aBtnEnd )
{
- DoEnter(TRUE); // schliesst den Dialog
+ DoEnter(TRUE); // closes the Dialog
}
else if ( pBtn == &aBtnForward )
{
- //@pMEdit->GrabFocus(); // Damit die Selektion auch angezeigt wird.
+ //@pMEdit->GrabFocus(); // In order to show the selection too
const IFunctionDescription* pDesc =pFuncPage->GetFuncDesc( pFuncPage->GetFunction() );
if(pDesc==pFuncDesc || !pFuncPage->IsVisible())
@@ -1039,7 +1038,7 @@ IMPL_LINK( FormulaDlg_Impl, BtnHdl, PushButton*, pBtn )
// --------------------------------------------------------------------------
-// Funktionen fuer 1. Seite
+// Functions for 1. Page
// --------------------------------------------------------------------------
void FormulaDlg_Impl::ResizeArgArr( const IFunctionDescription* pNewFunc )
@@ -1084,8 +1083,8 @@ void FormulaDlg_Impl::UpdateFunctionDesc()
aFtFuncDesc.SetText( pDesc->getDescription() );
ResizeArgArr( pDesc );
- if ( !m_aArguments.empty() ) // noch Argumente da?
- aSig = pDesc->getFormula( m_aArguments ); // fuer Eingabezeile
+ if ( !m_aArguments.empty() ) // still arguments there?
+ aSig = pDesc->getFormula( m_aArguments ); // for input line
//@ m_pHelper->setCurrentFormula( aSig );
}
}
@@ -1100,7 +1099,7 @@ void FormulaDlg_Impl::UpdateFunctionDesc()
}
// -----------------------------------------------------------------------------
-// Handler fuer Listboxen
+// Handler for Listboxes
IMPL_LINK( FormulaDlg_Impl, DblClkHdl, FuncPage*, EMPTYARG )
{
@@ -1137,13 +1136,13 @@ IMPL_LINK( FormulaDlg_Impl, DblClkHdl, FuncPage*, EMPTYARG )
// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------
-// Funktionen fuer rechte Seite
+// Functions for right Page
// --------------------------------------------------------------------------
void FormulaDlg_Impl::SetData(xub_StrLen nFStart,xub_StrLen nNextFStart,xub_StrLen nNextFEnd,xub_StrLen& PrivStart,xub_StrLen& PrivEnd)
{
xub_StrLen nFEnd;
- // Selektion merken und neue setzen
+ // Notice and set new selection
m_pHelper->getSelection( nFStart, nFEnd );
m_pHelper->setSelection( nNextFStart, nNextFEnd );
if(!bEditFlag)
@@ -1321,10 +1320,10 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr )
{
if(pPtr==pParaWin)
{
- aBtnForward.Enable(TRUE); //@ Damit eine neue Fkt eingegeben werden kann.
+ aBtnForward.Enable(TRUE); //@ In order to be able to input another function.
aTabCtrl.SetCurPageId(TP_FUNCTION);
- String aUndoStr = m_pHelper->getCurrentFormula(); // bevor unten ein ";" eingefuegt wird
+ String aUndoStr = m_pHelper->getCurrentFormula(); // it will be added before a ";"
FormEditData* pData = m_pHelper->getFormEditData();
if (!pData) return 0;
@@ -1347,7 +1346,7 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr )
ClearAllParas();
FillDialog(FALSE);
- pFuncPage->SetFocus(); //Da Parawin nicht mehr sichtbar
+ pFuncPage->SetFocus(); //There Parawin is not visible anymore
}
return 0;
}
@@ -1378,7 +1377,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaHdl, MultiLineEdit*, EMPTYARG )
Selection aSel =pMEdit->GetSelection();
xub_StrLen nTest=0;
- if(aString.Len()==0) //falls alles geloescht wurde
+ if(aString.Len()==0) //in case everything was cleared
{
aString +='=';
pMEdit->SetText(aString);
@@ -1386,7 +1385,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaHdl, MultiLineEdit*, EMPTYARG )
aSel .Max()=1;
pMEdit->SetSelection(aSel);
}
- else if(aString.GetChar(nTest)!='=') //falls ersetzt wurde;
+ else if(aString.GetChar(nTest)!='=') //in case it's replaced;
{
aString.Insert( (sal_Unicode)'=', 0 );
pMEdit->SetText(aString);
@@ -1650,7 +1649,7 @@ BOOL FormulaDlg_Impl::CheckMatrix(String& aFormula)
{
pMEdit->GrabFocus();
xub_StrLen nLen = aFormula.Len();
- BOOL bMatrix = nLen > 3 // Matrix-Formel ?
+ BOOL bMatrix = nLen > 3 // Matrix-Formula ?
&& aFormula.GetChar(0) == '{'
&& aFormula.GetChar(1) == '='
&& aFormula.GetChar(nLen-1) == '}';
@@ -1665,46 +1664,11 @@ BOOL FormulaDlg_Impl::CheckMatrix(String& aFormula)
aTabCtrl.SetCurPageId(TP_STRUCT);
return bMatrix;
}
-IMPL_LINK( FormulaDlg_Impl, StructSelHdl, StructPage*, pStruP )
+IMPL_LINK( FormulaDlg_Impl, StructSelHdl, StructPage*, EMPTYARG )
{
bStructUpdate=FALSE;
if(pStructPage->IsVisible()) aBtnForward.Enable(FALSE); //@New
- if(pStructPage==pStruP)
- {
- /// TODO
- //ScToken* pSelToken = pStructPage->GetSelectedToken();
- // ScToken* pOrigToken = ((pSelToken && pSelToken->GetType() == svFAP) ?
- // pSelToken->GetFAPOrigToken() : pSelToken);
- //xub_StrLen nTokPos=1;
-
- //if(pScTokA!=NULL)
- //{
- // ScToken* pToken = pScTokA->First();
-
- // while(pToken!=NULL)
- // {
- // String aString;
- // if ( pToken == pOrigToken )
- // break;
- // pComp->CreateStringFromToken( aString,pToken);
- // nTokPos = sal::static_int_cast<xub_StrLen>( nTokPos + aString.Len() );
- // pToken=pScTokA->Next();
- // }
- // EditThisFunc(nTokPos);
- //}
-
- //if( pOrigToken )
- //{
- // String aStr;
- // pComp->CreateStringFromToken( aStr, pOrigToken );
- // String aEntryTxt=pStructPage->GetSelectedEntryText();
-
- // if(aEntryTxt!=aStr)
- // ShowReference(aEntryTxt);
- //}
-
- }
bStructUpdate=TRUE;
return 0;
}
@@ -1755,7 +1719,7 @@ void FormulaDlg_Impl::UpdateParaWin(const Selection& _rSelection,const String& _
aEdRef.SetSelection( theSel );
//-------------------------------------
- // Manuelles Update der Ergebnisfelder:
+ // Manual Update of the results' fields:
//-------------------------------------
USHORT nPrivActiv = pParaWin->GetActiveLine();
pParaWin->SetArgument(nPrivActiv,aEdRef.GetText());
@@ -1991,7 +1955,7 @@ void FormulaModalDialog::SetEdSelection()
}
// --------------------------------------------------------------------------
-// Initialisierung / gemeinsaME Funktionen fuer Dialog
+// Initialisation / General functions for Dialog
// --------------------------------------------------------------------------
FormulaDlg::FormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
Window* pParent
@@ -2152,7 +2116,7 @@ IMPL_LINK( FormulaDlg, UpdateFocusHdl, Timer*, EMPTYARG )
{
FormEditData* pData = m_pImpl->m_pHelper->getFormEditData();
- if (pData) // wird nicht ueber Close zerstoert;
+ if (pData) // won't be destroyed over Close;
{
m_pImpl->m_pHelper->setReferenceInput(pData);
rtl::OString nUniqueId(pData->GetUniqueId());
@@ -2194,7 +2158,7 @@ void FormEditData::RestoreValues()
if (pTemp)
{
*this = *pTemp;
- pTemp->pParent = NULL; // sonst wird der auch geloescht!
+ pTemp->pParent = NULL; // otherwise it would be cleared too!
delete pTemp;
}
}
@@ -2233,3 +2197,5 @@ FormEditData::FormEditData( const FormEditData& r )
// -----------------------------------------------------------------------------
} // formula
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index cd06ea99ce..cd5c40b22b 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,7 +84,7 @@ long FormulaListBox::PreNotify( NotifyEvent& rNEvt )
inline USHORT Lb2Cat( USHORT nLbPos )
{
- // Kategorie 0 == LRU, sonst Categories == LbPos-1
+ // Category 0 == LRU, otherwise Categories == LbPos-1
if ( nLbPos > 0 )
nLbPos -= 1;
@@ -160,7 +161,7 @@ void FuncPage::UpdateFunctionList()
impl_addFunctions(pCategory);
}
}
- else // LRU-Liste
+ else // LRU-List
{
::std::vector< TFunctionDesc >::iterator aIter = aLRUList.begin();
::std::vector< TFunctionDesc >::iterator aEnd = aLRUList.end();
@@ -250,7 +251,7 @@ String FuncPage::GetSelFunctionName() const
}
const IFunctionDescription* FuncPage::GetFuncDesc( USHORT nPos ) const
{
- // nicht schoen, aber hoffentlich selten
+ // not pretty, but hopefully rare
return (const IFunctionDescription*) aLbFunction.GetEntryData(nPos);
}
@@ -263,3 +264,4 @@ void FuncPage::InitLRUList()
} // formula
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/dlg/funcpage.hxx b/formula/source/ui/dlg/funcpage.hxx
index 51e3609351..a80abe9a1a 100644
--- a/formula/source/ui/dlg/funcpage.hxx
+++ b/formula/source/ui/dlg/funcpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -121,3 +122,4 @@ public:
} // formula
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index d41a051e47..0a16ac6143 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,7 +78,7 @@ ValWnd::ValWnd( Window* pParent, const ResId& rId ) : Window( pParent, rId )
//----------------------------------------------------------------------------
-void __EXPORT ValWnd::Paint( const Rectangle& )
+void ValWnd::Paint( const Rectangle& )
{
DrawText( aRectOut.TopLeft(), aStrValue );
}
@@ -90,7 +91,7 @@ void ValWnd::SetValue( const String& rStrVal )
{
aStrValue = rStrVal;
DrawRect( aRectOut ); // alten Text loeschen
- Paint( aRectOut ); // und neu malen
+ Paint( aRectOut ); // and neu malen
}
}
@@ -120,9 +121,9 @@ void ArgEdit::Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
//----------------------------------------------------------------------------
-// Cursorsteuerung fuer EditFelder im Argument-Dialog
+// Cursor control for Edit Fields in Argument Dialog
-void __EXPORT ArgEdit::KeyInput( const KeyEvent& rKEvt )
+void ArgEdit::KeyInput( const KeyEvent& rKEvt )
{
KeyCode aCode = rKEvt.GetKeyCode();
BOOL bUp = (aCode.GetCode() == KEY_UP);
@@ -205,12 +206,12 @@ void __EXPORT ArgEdit::KeyInput( const KeyEvent& rKEvt )
/*************************************************************************
-#* Member: ArgInput Datum:13.01.97
+#* Member: ArgInput Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Konstruktor der Klasse ArgInput
+#* Function: ArgInput class constructor
#*
#* Input: ---
#*
@@ -227,12 +228,12 @@ ArgInput::ArgInput()
}
/*************************************************************************
-#* Member: InitArgInput Datum:13.01.97
+#* Member: InitArgInput Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Initialisiert die Pointer der Klasse
+#* Function: Initializes the class' Pointer
#*
#* Input: ---
#*
@@ -269,12 +270,12 @@ void ArgInput::InitArgInput(FixedText* pftArg,
}
/*************************************************************************
-#* Member: SetArgName Datum:13.01.97
+#* Member: SetArgName Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Setzt den Namen fuer das Argument
+#* Function: Sets the Name for the Argument
#*
#* Input: String
#*
@@ -287,12 +288,12 @@ void ArgInput::SetArgName(const String &aArg)
}
/*************************************************************************
-#* Member: GetArgName Datum:06.02.97
+#* Member: GetArgName Date:06.02.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Liefert den Namen fuer das Argument zurueck
+#* Function: Returns the Name for the Argument
#*
#* Input: String
#*
@@ -310,12 +311,12 @@ String ArgInput::GetArgName()
/*************************************************************************
-#* Member: SetArgName Datum:13.01.97
+#* Member: SetArgName Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Setzt den Namen fuer das Argument
+#* Function: Sets the Name for the Argument
#*
#* Input: String
#*
@@ -328,12 +329,12 @@ void ArgInput::SetArgNameFont (const Font &aFont)
}
/*************************************************************************
-#* Member: SetArgSelection Datum:13.01.97
+#* Member: SetArgSelection Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Stellt die Selection fuer die EditBox ein.
+#* Function: Sets up the Selection for the EditBox.
#*
#* Input: String
#*
@@ -346,12 +347,12 @@ void ArgInput::SetArgSelection (const Selection& rSel )
}
/*************************************************************************
-#* Member: SetArgSelection Datum:13.01.97
+#* Member: SetArgSelection Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Liefert die Selection fuer die EditBox zurueck.
+#* Function: Returns the Selection for the EditBox.
#*
#* Input: String
#*
@@ -366,12 +367,12 @@ Selection ArgInput::GetArgSelection ()
}
/*************************************************************************
-#* Member: SetArgSelection Datum:13.01.97
+#* Member: SetArgSelection Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Ersetzt die Selection in der EditBox.
+#* Function: Replaces the Selection in the EditBox.
#*
#* Input: String
#*
@@ -386,12 +387,12 @@ void ArgInput::ReplaceSelOfArg(const String& rStr )
/*************************************************************************
-#* Member: SetArgVal Datum:13.01.97
+#* Member: SetArgVal Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Setzt den Wert fuer das Argument
+#* Function: Sets the Value for the Argument
#*
#* Input: String
#*
@@ -407,12 +408,12 @@ void ArgInput::SetArgVal(const String &aVal)
}
/*************************************************************************
-#* Member: SetArgName Datum:13.01.97
+#* Member: SetArgName Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Liefert den Wert fuer das Argument
+#* Function: Returns the Value for the Argument
#*
#* Input: ---
#*
@@ -430,12 +431,12 @@ String ArgInput::GetArgVal()
}
/*************************************************************************
-#* Member: SetArgName Datum:13.01.97
+#* Member: SetArgName Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Versteckt die Controls
+#* Function: Hides the Controls
#*
#* Input: ---
#*
@@ -454,12 +455,12 @@ void ArgInput::Hide()
}
/*************************************************************************
-#* Member: SetArgName Datum:13.01.97
+#* Member: SetArgName Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Zaubert die Controls wieder hervor.
+#* Function: Casts the Controls again.
#*
#* Input: ---
#*
@@ -478,12 +479,12 @@ void ArgInput::Show()
}
/*************************************************************************
-#* Member: FxClick Datum:13.01.97
+#* Member: FxClick Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Gibt den Event weiter.
+#* Function: Forwards the Event.
#*
#* Input: ---
#*
@@ -496,12 +497,12 @@ void ArgInput::FxClick()
}
/*************************************************************************
-#* Member: RefClick Datum:13.01.97
+#* Member: RefClick Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Gibt den Event weiter.
+#* Function: Forwards the Event.
#*
#* Input: ---
#*
@@ -514,12 +515,12 @@ void ArgInput::RefClick()
}
/*************************************************************************
-#* Member: FxFocus Datum:13.01.97
+#* Member: FxFocus Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Gibt den Event weiter.
+#* Function: Forwards the Event.
#*
#* Input: ---
#*
@@ -532,12 +533,12 @@ void ArgInput::FxFocus()
}
/*************************************************************************
-#* Member: RefFocus Datum:13.01.97
+#* Member: RefFocus Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Gibt den Event weiter.
+#* Function: Forwards the Event.
#*
#* Input: ---
#*
@@ -550,12 +551,12 @@ void ArgInput::RefFocus()
}
/*************************************************************************
-#* Member: EdFocus Datum:13.01.97
+#* Member: EdFocus Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Gibt den Event weiter.
+#* Function: Forwards the Event.
#*
#* Input: ---
#*
@@ -568,12 +569,12 @@ void ArgInput::EdFocus()
}
/*************************************************************************
-#* Member: EdModify Datum:13.01.97
+#* Member: EdModify Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Gibt den Event weiter.
+#* Function: Forwards the Event.
#*
#* Input: ---
#*
@@ -586,12 +587,12 @@ void ArgInput::EdModify()
}
/*************************************************************************
-#* Handle: FxBtnHdl Datum:13.01.97
+#* Handle: FxBtnHdl Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Handle fuer Fx-Button Click-Event.
+#* Function: Handle for Fx-Button Click-Event.
#*
#* Input: ---
#*
@@ -606,12 +607,12 @@ IMPL_LINK( ArgInput, FxBtnClickHdl, ImageButton*, pBtn )
}
/*************************************************************************
-#* Handle: RefBtnClickHdl Datum:13.01.97
+#* Handle: RefBtnClickHdl Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Handle fuer Fx-Button Click-Event.
+#* Function: Handle for Fx-Button Click-Event.
#*
#* Input: ---
#*
@@ -626,12 +627,12 @@ IMPL_LINK( ArgInput, RefBtnClickHdl,RefButton*, pBtn )
}
/*************************************************************************
-#* Handle: FxBtnFocusHdl Datum:13.01.97
+#* Handle: FxBtnFocusHdl Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Handle fuer Fx-Button Focus-Event.
+#* Function: Handle for Fx-Button Focus-Event.
#*
#* Input: ---
#*
@@ -646,12 +647,12 @@ IMPL_LINK( ArgInput, FxBtnFocusHdl, ImageButton*, pBtn )
}
/*************************************************************************
-#* Handle: RefBtnFocusHdl Datum:13.01.97
+#* Handle: RefBtnFocusHdl Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Handle fuer Fx-Button Focus-Event.
+#* Function: Handle for Fx-Button Focus-Event.
#*
#* Input: ---
#*
@@ -666,12 +667,12 @@ IMPL_LINK( ArgInput, RefBtnFocusHdl,RefButton*, pBtn )
}
/*************************************************************************
-#* Handle: EdFocusHdl Datum:13.01.97
+#* Handle: EdFocusHdl Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Handle fuer Fx-Button Focus-Event.
+#* Function: Handle for Fx-Button Focus-Event.
#*
#* Input: ---
#*
@@ -686,12 +687,12 @@ IMPL_LINK( ArgInput, EdFocusHdl, ArgEdit*, pEd )
}
/*************************************************************************
-#* Handle: RefBtnClickHdl Datum:13.01.97
+#* Handle: RefBtnClickHdl Date:13.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: ArgInput
+#* Class: ArgInput
#*
-#* Funktion: Handle fuer Fx-Button Focus-Event.
+#* Function: Handle for Fx-Button Focus-Event.
#*
#* Input: ---
#*
@@ -706,12 +707,12 @@ IMPL_LINK( ArgInput, EdModifyHdl,ArgEdit*, pEd )
}
/*************************************************************************
-#* Member: EditBox Datum:20.01.97
+#* Member: EditBox Date:20.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: EditBox
+#* Class: EditBox
#*
-#* Funktion: Konstruktor der Klasse ArgInput
+#* Function: Constructor from Class ArgInput
#*
#* Input: Parent, Window-Style
#*
@@ -729,12 +730,12 @@ EditBox::EditBox( Window* pParent,WinBits nWinStyle)
}
/*************************************************************************
-#* Member: EditBox Datum:20.01.97
+#* Member: EditBox Date:20.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: EditBox
+#* Class: EditBox
#*
-#* Funktion: Konstruktor der Klasse ArgInput
+#* Function: Constructor from Class ArgInput
#*
#* Input: Parent, Resource
#*
@@ -770,13 +771,12 @@ EditBox::~EditBox()
delete pTheEdit;
}
/*************************************************************************
-#* Member: EditBox Datum:20.01.97
+#* Member: EditBox Date:20.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: EditBox
+#* Class: EditBox
#*
-#* Funktion: Wenn sich die Selektion geaendert hat, so wird
-#* diese Funktion aufgerufen.
+#* Function: When the seleccion is changed this function will be called
#*
#* Input: ---
#*
@@ -789,13 +789,13 @@ void EditBox::SelectionChanged()
}
/*************************************************************************
-#* Member: EditBox Datum:20.05.98
+#* Member: EditBox Date:20.05.98
#*------------------------------------------------------------------------
#*
-#* Klasse: EditBox
+#* Class: EditBox
#*
-#* Funktion: Wenn sich die Groesse geaendert hat, so muss
-#* auch der MultiLineEdit angepasst werden..
+#* Function: When the size is changed, MultiLineEdit must
+#* be adapted..
#*
#* Input: ---
#*
@@ -809,14 +809,14 @@ void EditBox::Resize()
}
/*************************************************************************
-#* Member: GetFocus Datum:26.05.98
+#* Member: GetFocus Date:26.05.98
#*------------------------------------------------------------------------
#*
-#* Klasse: EditBox
+#* Class: EditBox
#*
-#* Funktion: Wenn der Control aktiviert wird, so wird
-#* die Selection aufgehoben und der Cursor ans
-#* Ende gesetzt.
+#* Function: When the Control is activated,
+#* the Selection is repealed and the Cursor set
+#* at the end.
#*
#* Input: ---
#*
@@ -834,13 +834,13 @@ void EditBox::GetFocus()
/*************************************************************************
-#* Member: EditBox Datum:20.01.97
+#* Member: EditBox Date:20.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: EditBox
+#* Class: EditBox
#*
-#* Funktion: Wenn ein Event ausgeloest wird, so wird diese Routine
-#* zuerst aufgerufen und ein PostUserEvent verschickt.
+#* Function: When an Event is cleared, this Routine is
+#* first called and a PostUserEvent is sent.
#*
#* Input: Notify-Event
#*
@@ -883,13 +883,13 @@ long EditBox::PreNotify( NotifyEvent& rNEvt )
}
/*************************************************************************
-#* Member: EditBox Datum:21.01.97
+#* Member: EditBox Date:21.01.97
#*------------------------------------------------------------------------
#*
-#* Klasse: EditBox
+#* Class: EditBox
#*
-#* Funktion: Wenn ein Event ausgeloest wurde, so wird diese Routine
-#* zuerst aufgerufen.
+#* Function: When an Event cleared wurde, this routine is
+#* first called.
#*
#* Input: Key-Event
#*
@@ -954,6 +954,20 @@ void RefEdit::SetRefString( const XubString& rStr )
Edit::SetText( rStr );
}
+void RefEdit::SetRefValid(bool bValid)
+{
+ if (bValid)
+ {
+ SetControlForeground();
+ SetControlBackground();
+ }
+ else
+ {
+ SetControlForeground(COL_WHITE);
+ SetControlBackground(0xff6563);
+ }
+}
+
void RefEdit::SetText( const XubString& rStr )
{
Edit::SetText( rStr );
@@ -1032,9 +1046,7 @@ IMPL_LINK( RefEdit, UpdateHdl, Timer*, EMPTYARG )
RefButton::RefButton( Window* _pParent, const ResId& rResId) :
ImageButton( _pParent, rResId ),
aImgRefStart( ModuleRes( RID_BMP_REFBTN1 ) ),
- aImgRefStartHC( ModuleRes( RID_BMP_REFBTN1_H ) ),
aImgRefDone( ModuleRes( RID_BMP_REFBTN2 ) ),
- aImgRefDoneHC( ModuleRes( RID_BMP_REFBTN2_H ) ),
pAnyRefDlg( NULL ),
pRefEdit( NULL )
{
@@ -1044,9 +1056,7 @@ RefButton::RefButton( Window* _pParent, const ResId& rResId) :
RefButton::RefButton( Window* _pParent, const ResId& rResId, RefEdit* pEdit, IControlReferenceHandler* _pDlg ) :
ImageButton( _pParent, rResId ),
aImgRefStart( ModuleRes( RID_BMP_REFBTN1 ) ),
- aImgRefStartHC( ModuleRes( RID_BMP_REFBTN1_H ) ),
aImgRefDone( ModuleRes( RID_BMP_REFBTN2 ) ),
- aImgRefDoneHC( ModuleRes( RID_BMP_REFBTN2_H ) ),
pAnyRefDlg( _pDlg ),
pRefEdit( pEdit )
{
@@ -1056,13 +1066,11 @@ RefButton::RefButton( Window* _pParent, const ResId& rResId, RefEdit* pEdit, ICo
void RefButton::SetStartImage()
{
SetModeImage( aImgRefStart );
- SetModeImage( aImgRefStartHC, BMP_COLOR_HIGHCONTRAST );
}
void RefButton::SetEndImage()
{
SetModeImage( aImgRefDone );
- SetModeImage( aImgRefDoneHC, BMP_COLOR_HIGHCONTRAST );
}
void RefButton::SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit )
@@ -1104,3 +1112,5 @@ void RefButton::LoseFocus()
} // formula
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index adb3681345..84c4af811e 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,7 @@
#include "helpids.hrc"
#include "formula/formdata.hxx"
#include "formula/IFunctionDescription.hxx"
-#include "ModuleHelper.hxx"
+#include "ModuleHelper.hxx"
#include "ForResId.hrc"
#define VAR_ARGS 30
@@ -70,21 +71,20 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos):
aEdArg2 ( this, ModuleRes( ED_ARG2 ) ),
aEdArg3 ( this, ModuleRes( ED_ARG3 ) ),
aEdArg4 ( this, ModuleRes( ED_ARG4 ) ),
-
+
aRefBtn1 ( this, ModuleRes( RB_ARG1 ) ),
aRefBtn2 ( this, ModuleRes( RB_ARG2 ) ),
aRefBtn3 ( this, ModuleRes( RB_ARG3 ) ),
aRefBtn4 ( this, ModuleRes( RB_ARG4 ) ),
-
+
aSlider ( this, ModuleRes( WND_SLIDER ) ),
m_sOptional ( ModuleRes( STR_OPTIONAL ) ),
m_sRequired ( ModuleRes( STR_REQUIRED ) ),
bRefMode (FALSE)
{
- Image aFxHC( ModuleRes( IMG_FX_H ) );
FreeResource();
aDefaultString=aFtEditDesc.GetText();
-
+
SetPosPixel(aPos);
nEdFocus=NOT_FOUND;
nActiveLine=0;
@@ -94,11 +94,6 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos):
aSlider.SetEndScrollHdl( LINK( this, ParaWin, ScrollHdl ) );
aSlider.SetScrollHdl( LINK( this, ParaWin, ScrollHdl ) );
- aBtnFx1.SetModeImage( aFxHC, BMP_COLOR_HIGHCONTRAST );
- aBtnFx2.SetModeImage( aFxHC, BMP_COLOR_HIGHCONTRAST );
- aBtnFx3.SetModeImage( aFxHC, BMP_COLOR_HIGHCONTRAST );
- aBtnFx4.SetModeImage( aFxHC, BMP_COLOR_HIGHCONTRAST );
-
InitArgInput( 0, aFtArg1, aBtnFx1, aEdArg1, aRefBtn1);
InitArgInput( 1, aFtArg2, aBtnFx2, aEdArg2, aRefBtn2);
InitArgInput( 2, aFtArg3, aBtnFx3, aEdArg3, aRefBtn3);
@@ -598,3 +593,5 @@ IMPL_LINK( ParaWin, ModifyHdl, ArgInput*, pPtr )
} // formula
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/dlg/parawin.hrc b/formula/source/ui/dlg/parawin.hrc
index 484ca53937..04c7e61000 100644
--- a/formula/source/ui/dlg/parawin.hrc
+++ b/formula/source/ui/dlg/parawin.hrc
@@ -47,7 +47,6 @@
#define RB_ARG3 18
#define RB_ARG4 19
#define WND_SLIDER 20
-#define IMG_FX_H 30
#define STR_OPTIONAL 1
#define STR_REQUIRED 2
diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx
index 8f128e5ad4..5aedaa367c 100644
--- a/formula/source/ui/dlg/parawin.hxx
+++ b/formula/source/ui/dlg/parawin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -172,3 +173,4 @@ public:
#endif // FORMULA_PARAWIN_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/dlg/parawin.src b/formula/source/ui/dlg/parawin.src
index eec5237ced..08d92551b6 100644
--- a/formula/source/ui/dlg/parawin.src
+++ b/formula/source/ui/dlg/parawin.src
@@ -170,29 +170,4 @@ TabPage RID_FORMULATAB_PARAMETER
{
Text [ en-US ] = "(required)" ;
};
-
- Image IMG_FX_H
- {
- ImageBitmap = Bitmap { File = "fx_h.bmp" ; };
- MaskColor = STD_MASKCOLOR;
- };
-
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index 95b8b59442..07271cd6cb 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,14 +61,10 @@ StructListBox::StructListBox(Window* pParent, const ResId& rResId ):
SvLBoxEntry* StructListBox::InsertStaticEntry(
const XubString& rText,
- const Image& rEntryImg, const Image& rEntryImgHC,
+ const Image& rEntryImg,
SvLBoxEntry* pParent, ULONG nPos, IFormulaToken* pToken )
{
SvLBoxEntry* pEntry = InsertEntry( rText, rEntryImg, rEntryImg, pParent, FALSE, nPos, pToken );
- SvLBoxContextBmp* pBmpItem = static_cast< SvLBoxContextBmp* >( pEntry->GetFirstItem( SV_ITEM_ID_LBOXCONTEXTBMP ) );
- DBG_ASSERT( pBmpItem, "StructListBox::InsertStaticEntry - missing item" );
- pBmpItem->SetBitmap1( rEntryImgHC, BMP_COLOR_HIGHCONTRAST );
- pBmpItem->SetBitmap2( rEntryImgHC, BMP_COLOR_HIGHCONTRAST );
return pEntry;
}
@@ -108,18 +105,14 @@ StructPage::StructPage(Window* pParent):
aTlbStruct ( this, ModuleRes( TLB_STRUCT ) ),
maImgEnd ( ModuleRes( BMP_STR_END ) ),
maImgError ( ModuleRes( BMP_STR_ERROR ) ),
- maImgEndHC ( ModuleRes( BMP_STR_END_H ) ),
- maImgErrorHC ( ModuleRes( BMP_STR_ERROR_H ) ),
pSelectedToken ( NULL )
{
aTlbStruct.SetStyle(aTlbStruct.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|
WB_HASBUTTONS|WB_HSCROLL|WB_NOINITIALSELECTION);
aTlbStruct.SetNodeDefaultImages();
- aTlbStruct.SetDefaultExpandedEntryBmp( Image( ModuleRes( BMP_STR_OPEN ) ) );
+ aTlbStruct.SetDefaultExpandedEntryBmp( Image( ModuleRes( BMP_STR_OPEN ) ) );
aTlbStruct.SetDefaultCollapsedEntryBmp( Image( ModuleRes( BMP_STR_CLOSE ) ) );
- aTlbStruct.SetDefaultExpandedEntryBmp( Image( ModuleRes( BMP_STR_OPEN_H ) ), BMP_COLOR_HIGHCONTRAST );
- aTlbStruct.SetDefaultCollapsedEntryBmp( Image( ModuleRes( BMP_STR_CLOSE_H ) ), BMP_COLOR_HIGHCONTRAST );
FreeResource();
@@ -144,10 +137,10 @@ SvLBoxEntry* StructPage::InsertEntry( const XubString& rText, SvLBoxEntry* pPare
pEntry = aTlbStruct.InsertEntry( rText, pParent, FALSE, nPos, pIFormulaToken );
break;
case STRUCT_END:
- pEntry = aTlbStruct.InsertStaticEntry( rText, maImgEnd, maImgEndHC, pParent, nPos, pIFormulaToken );
+ pEntry = aTlbStruct.InsertStaticEntry( rText, maImgEnd, pParent, nPos, pIFormulaToken );
break;
case STRUCT_ERROR:
- pEntry = aTlbStruct.InsertStaticEntry( rText, maImgError, maImgErrorHC, pParent, nPos, pIFormulaToken );
+ pEntry = aTlbStruct.InsertStaticEntry( rText, maImgError, pParent, nPos, pIFormulaToken );
break;
}
@@ -225,3 +218,4 @@ String StructPage::GetSelectedEntryText()
} // formula
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx
index a71ca68008..2aadec072b 100644
--- a/formula/source/ui/dlg/structpg.hxx
+++ b/formula/source/ui/dlg/structpg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,7 +63,6 @@ public:
SvLBoxEntry* InsertStaticEntry(
const XubString& rText,
const Image& rEntryImg,
- const Image& rEntryImgHC,
SvLBoxEntry* pParent = NULL,
ULONG nPos = LIST_APPEND,
IFormulaToken* pToken = NULL );
@@ -86,8 +86,6 @@ private:
StructListBox aTlbStruct;
Image maImgEnd;
Image maImgError;
- Image maImgEndHC;
- Image maImgErrorHC;
IFormulaToken* pSelectedToken;
@@ -121,3 +119,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/inc/ForResId.hrc b/formula/source/ui/inc/ForResId.hrc
index a09e3fd03d..f3f59888ce 100644
--- a/formula/source/ui/inc/ForResId.hrc
+++ b/formula/source/ui/inc/ForResId.hrc
@@ -55,9 +55,7 @@
// bitmap
#define RID_BMP_REFBTN1 (RID_BITMAP_START + 0)
-#define RID_BMP_REFBTN1_H (RID_BITMAP_START + 1)
#define RID_BMP_REFBTN2 (RID_BITMAP_START + 2)
-#define RID_BMP_REFBTN2_H (RID_BITMAP_START + 3)
// pages
@@ -67,8 +65,6 @@
#define RID_FORMULATAB_PARAMETER (RID_PAGE_START + 3)
#define RID_FORMULADLG_FORMULA_MODAL (RID_PAGE_START + 4)
-// misc
-
// -----------------------------------------------------------------------
#endif // FORMULA_FORRESID_HRC
diff --git a/formula/source/ui/inc/ModuleHelper.hxx b/formula/source/ui/inc/ModuleHelper.hxx
index de80a167a1..9eddf04eb9 100644
--- a/formula/source/ui/inc/ModuleHelper.hxx
+++ b/formula/source/ui/inc/ModuleHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,3 +98,4 @@ namespace formula
#endif // FORMULA_MODULE_HELPER_RPT_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/formula/source/ui/resource/ModuleHelper.cxx b/formula/source/ui/resource/ModuleHelper.cxx
index b13419b701..7284ac38eb 100644
--- a/formula/source/ui/resource/ModuleHelper.cxx
+++ b/formula/source/ui/resource/ModuleHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -140,3 +141,4 @@ void OModule::ensureImpl()
} // namespace formula
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */