Kaydet (Commit) 2cb4c646 authored tarafından Jens-Heiner Rechtien's avatar Jens-Heiner Rechtien

CWS-TOOLING: integrate CWS frmdlg

2008-12-18 09:13:09 +0100 oj  r265667 : merge from odff05
2008-12-18 07:58:16 +0100 oj  r265658 : #i94555# patch from <regina>, ODFF:
Add GAMMA, CHISQDIST, CHISQINV.
Make the 'cumulative' parameter of GAMMADIST optional.
Adapt the domain of CHIDIST to allow negative x.
Remove the constraint "degrees of freedom < 1.0E5" from CHIDIST and CHIINV.
Plus a mechanism to write the now optional parameter of GAMMADIST to PODF and
ODFF if omitted, for backwards compatibility.
2008-12-15 14:06:11 +0100 oj  r265490 : CWS-TOOLING: rebase CWS frmdlg to trunk@264807 (milestone: DEV300:m37)
2008-12-15 13:55:28 +0100 oj  r265488 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:55:07 +0100 oj  r265487 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:48 +0100 oj  r265486 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:36 +0100 oj  r265485 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:54:24 +0100 oj  r265484 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:48:11 +0100 oj  r265483 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:31:12 +0100 oj  r265479 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:13:58 +0100 oj  r265477 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:10:09 +0100 oj  r265476 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 13:05:11 +0100 oj  r265475 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:47:17 +0100 oj  r265467 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:46:19 +0100 oj  r265466 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 10:45:47 +0100 oj  r265465 : CWS-TOOLING: do not delete this file, it's needed for 'cws rebase -C'
CWS: frmdlg
New MWS: DEV300
New milestone: m37
2008-12-15 07:35:07 +0100 oj  r265458 : add dependency to formula
2008-12-15 07:34:24 +0100 oj  r265457 : add dependency to formula
2008-12-12 13:22:00 +0100 msc  r265413 : #i97089#
2008-12-12 13:20:25 +0100 msc  r265412 : #i97089#
2008-12-12 12:35:12 +0100 msc  r265406 : #i97089#
2008-12-12 12:34:16 +0100 msc  r265405 : #i97089#
2008-12-12 12:33:05 +0100 msc  r265404 : #i97089#
2008-12-12 12:31:11 +0100 msc  r265403 : #i97089#
2008-12-08 11:59:10 +0100 oj  r264981 : insert RTL_LOG
2008-12-08 11:50:17 +0100 oj  r264980 : some small changes
2008-12-05 12:57:57 +0100 oj  r264902 : eof changed
2008-12-05 12:56:46 +0100 oj  r264901 : eof changed
2008-12-05 12:28:47 +0100 oj  r264899 : wrong var used
2008-12-05 10:08:57 +0100 oj  r264890 : token order reversed
2008-12-04 13:49:22 +0100 oc  r264843 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:45:27 +0100 oc  r264842 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:42:54 +0100 oc  r264841 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:37:41 +0100 oc  r264840 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 13:34:11 +0100 oc  r264839 : #i96688: Adapt autotests because of outsourced functionwizard
2008-12-04 12:35:31 +0100 oj  r264835 : new help ids for struct and function tabpage
2008-12-04 12:00:35 +0100 oj  r264828 : set explicit help id
2008-12-03 14:53:27 +0100 oj  r264786 : #i96845# change ref button
2008-12-03 14:51:49 +0100 oj  r264785 : #i96845# change ref button
2008-12-03 08:51:57 +0100 oj  r264746 : convert dos to unix lineends
2008-12-03 08:50:45 +0100 oj  r264745 : convert dos to unix lineends
2008-12-03 08:50:05 +0100 oj  r264744 : convert dos to unix lineends
2008-12-02 12:28:33 +0100 oj  r264686 : clear help text when new helpid is set
2008-12-02 12:28:02 +0100 oj  r264685 : set help id for listbox category
2008-12-02 07:15:56 +0100 oj  r264655 : remove define to auto generate help ids
2008-12-01 14:36:43 +0100 oj  r264604 : use temp var
2008-12-01 14:18:31 +0100 oj  r264601 : moved ScJumpToken to formula
2008-12-01 14:18:11 +0100 oj  r264600 : moved ScJumpToken to formula
2008-12-01 14:14:35 +0100 oj  r264599 : moved ScJumpToken from sc
2008-12-01 10:48:51 +0100 oj  r264589 : change quickhelptext from Shrink to Select
2008-12-01 10:28:41 +0100 oj  r264588 : fix opcode data, has to be Any.Void
2008-11-28 11:16:48 +0100 oj  r264532 : add help ids
2008-11-28 10:16:56 +0100 oj  r264529 : set help id
2008-11-28 10:16:43 +0100 oj  r264528 : set help id
2008-11-26 13:55:04 +0100 oj  r264381 : #94535# use of optional instead of deleting a string myself and some small changes
2008-11-26 09:53:20 +0100 oj  r264346 : compile error with debug/without debug
2008-11-25 07:41:28 +0100 oj  r264271 : put static into the method which make use of them
2008-11-24 08:16:07 +0100 oj  r264196 : removed not needed classes for op code
2008-11-24 08:13:44 +0100 oj  r264195 : removed not needed classes for op code
2008-11-21 14:05:53 +0100 oj  r264135 : make GetOpCode inline
2008-11-21 12:35:27 +0100 oj  r264124 : hold symbols
2008-11-20 09:27:27 +0100 oj  r264028 : merged code from DEV300_m35 which got lost
2008-11-19 20:42:12 +0100 oj  r264022 : more changes for formula dialog remove
2008-11-19 20:37:41 +0100 oj  r264021 : removed unused var
2008-11-19 20:35:35 +0100 oj  r264020 : some more changes at token
2008-11-19 10:59:47 +0100 oj  r263967 : deleted
2008-11-19 10:58:24 +0100 oj  r263966 : add forui and for res files
2008-11-18 15:27:36 +0100 oj  r263777 : unused para removed
2008-11-18 15:23:23 +0100 oj  r263775 : add insert button to add field dlg
2008-11-18 13:39:53 +0100 oj  r263764 : enable the formula dialog as well for conditional print as for conditional formatting
2008-11-18 12:03:25 +0100 oj  r263760 : rename isRef in IsRef
2008-11-17 11:46:16 +0100 oj  r263711 : patches for function handling
2008-11-17 11:36:22 +0100 oj  r263710 : add new for forui and res file
2008-11-17 09:21:12 +0100 oj  r263704 : patches for some resource for libformula
2008-11-15 12:45:30 +0100 oj  r263701 : changes for formula editor extraction
2008-11-07 08:23:27 +0100 oj  r263416 : merge from DEV300:m35
2008-11-07 08:22:35 +0100 oj  r263415 : merge from DEV300:m35
2008-11-07 08:22:16 +0100 oj  r263414 : merge from DEV300:m35
2008-11-07 08:21:41 +0100 oj  r263413 : merge from DEV300:m35
2008-11-07 08:21:31 +0100 oj  r263412 : merge from DEV300:m35
2008-11-07 08:20:38 +0100 oj  r263411 : merge from DEV300:m35
2008-11-07 08:20:00 +0100 oj  r263410 : merge from DEV300:m35
2008-11-07 08:18:50 +0100 oj  r263409 : merge from DEV300:m35
2008-11-07 08:18:19 +0100 oj  r263408 : merge from DEV300:m35
2008-11-07 08:10:27 +0100 oj  r263407 : merge from DEV300:m35
2008-10-21 07:43:46 +0200 oj  r262560 : some compile errors resolved
2008-10-17 16:40:01 +0200 oj  r262291 : dep for 1st target
2008-10-07 10:08:39 +0200 oj  r262077 : copy
2008-10-07 09:45:31 +0200 oj  r262076 : #i94535# 
2008-10-07 09:44:26 +0200 oj  r262075 : #i94535# new base class
2008-10-07 09:43:21 +0200 oj  r262074 : moved to formula
2008-10-07 09:41:51 +0200 oj  r262073 : new images
2008-10-07 09:03:01 +0200 oj  r262072 : new ids for formula
2008-10-02 08:46:27 +0200 oj  r262024 : #i94535# move the formula compiler to formula
2008-10-02 08:08:54 +0200 oj  r262023 : #i94535#
2008-10-02 08:06:28 +0200 oj  r262022 : #i94535#
2008-10-02 08:05:52 +0200 oj  r262021 : #i94535#
2008-10-01 17:15:29 +0200 oj  r262014 : #i94535#
2008-10-01 17:12:40 +0200 oj  r262013 : new module formula
2008-10-01 17:04:55 +0200 oj  r262012 : #i94535#
2008-10-01 16:49:03 +0200 oj  r262010 : #i94535#
2008-10-01 16:46:59 +0200 oj  r262009 : #i94535#
üst 0c146793
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: tokenuno.hxx,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef FORMULA_ADDRESSCONVENTION_HXX_INCLUDED
#define FORMULA_ADDRESSCONVENTION_HXX_INCLUDED
#include "formula/formuladllapi.h"
namespace formula
{
// =============================================================================
// =============================================================================
} // formula
// =============================================================================
#endif // FORMULA_ADDRESSCONVENTION_HXX_INCLUDED
This diff is collapsed.
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: tokenuno.hxx,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef FORMULA_FORMULAOPCODEMAPPER_HXX_INCLUDED
#define FORMULA_FORMULAOPCODEMAPPER_HXX_INCLUDED
#include "formula/formuladllapi.h"
#include <cppuhelper/implbase2.hxx>
#include <com/sun/star/sheet/XFormulaOpCodeMapper.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <memory>
#include "formula/FormulaCompiler.hxx"
namespace formula
{
class FORMULA_DLLPUBLIC FormulaOpCodeMapperObj : public ::cppu::WeakImplHelper2<
::com::sun::star::sheet::XFormulaOpCodeMapper,
::com::sun::star::lang::XServiceInfo >
{
::std::auto_ptr<FormulaCompiler> m_pCompiler;
public:
static ::rtl::OUString getImplementationName_Static();
static ::com::sun::star::uno::Sequence< ::rtl::OUString> getSupportedServiceNames_Static();
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xContext);
protected:
FormulaOpCodeMapperObj(::std::auto_ptr<FormulaCompiler> _pCompiler);
virtual ~FormulaOpCodeMapperObj();
private:
// XFormulaOpCodeMapper
// Attributes
virtual ::sal_Int32 SAL_CALL getOpCodeExternal() throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getOpCodeUnknown() throw (::com::sun::star::uno::RuntimeException);
// Methods
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > SAL_CALL getMappings(
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames,
sal_Int32 nLanguage )
throw ( ::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaOpCodeMapEntry > SAL_CALL getAvailableMappings(
sal_Int32 nLanguage, sal_Int32 nGroups )
throw ( ::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName()
throw(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
throw(::com::sun::star::uno::RuntimeException);
};
// =============================================================================
} // formula
// =============================================================================
#endif // FORMULA_FORMULAOPCODEMAPPER_HXX_INCLUDED
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: formula.hxx,v $
* $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef FORMULA_ICONTROL_REFERENCE_HANDLER_HXX_INCLUDED
#define FORMULA_ICONTROL_REFERENCE_HANDLER_HXX_INCLUDED
#include "formula/formuladllapi.h"
namespace formula
{
class RefEdit;
class RefButton;
class FORMULA_DLLPUBLIC SAL_NO_VTABLE IControlReferenceHandler
{
public:
virtual void ShowReference(const String& _sRef) = 0;
virtual void HideReference( BOOL bDoneRefMode = TRUE ) = 0;
virtual void ReleaseFocus( RefEdit* pEdit, RefButton* pButton = NULL ) = 0;
virtual void ToggleCollapsed( RefEdit* pEdit, RefButton* pButton = NULL ) = 0;
};
} // formula
#endif // FORMULA_ICONTROL_REFERENCE_HANDLER_HXX_INCLUDED
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: funcpage.hxx,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef INCLUDE_FUNCTION_DESCRIPTION
#define INCLUDE_FUNCTION_DESCRIPTION
#include <vector>
#include <memory>
#include "formula/formuladllapi.h"
#include <rtl/ustring.hxx>
#include <tools/string.hxx>
#include <com/sun/star/sheet/XFormulaParser.hpp>
#include <com/sun/star/sheet/XFormulaOpCodeMapper.hpp>
class SvLBoxEntry;
namespace formula
{
class IFunctionCategory;
class IFunctionDescription;
class FormEditData;
class FormulaTokenArray;
// ScFunctionMgr* pFuncMgr = ScGlobal::GetStarCalcFunctionMgr();
class SAL_NO_VTABLE IFunctionManager
{
public:
IFunctionManager(){}
enum EToken
{
eOk,
eClose,
eSep,
eArrayOpen,
eArrayClose
};
virtual sal_uInt32 getCount() const = 0;
virtual const IFunctionCategory* getCategory(sal_uInt32 nPos) const = 0;
virtual void fillLastRecentlyUsedFunctions(::std::vector< const IFunctionDescription*>& _rLastRUFunctions) const = 0;
virtual const IFunctionDescription* getFunctionByName(const ::rtl::OUString& _sFunctionName) const = 0;
virtual const sal_Unicode getSingleToken(const EToken _eToken) const = 0;
};
class SAL_NO_VTABLE IFunctionCategory
{
public:
IFunctionCategory(){}
virtual const IFunctionManager* getFunctionManager() const = 0;
virtual sal_uInt32 getCount() const = 0;
virtual const IFunctionDescription* getFunction(sal_uInt32 _nPos) const = 0;
virtual sal_uInt32 getNumber() const = 0;
virtual ::rtl::OUString getName() const = 0;
};
class SAL_NO_VTABLE IFunctionDescription
{
public:
IFunctionDescription(){}
virtual ::rtl::OUString getFunctionName() const = 0;
virtual const IFunctionCategory* getCategory() const = 0;
virtual ::rtl::OUString getDescription() const = 0;
// GetSuppressedArgCount
virtual xub_StrLen getSuppressedArgumentCount() const = 0;
// GetFormulaString
virtual ::rtl::OUString getFormula(const ::std::vector< ::rtl::OUString >& _aArguments) const = 0;
// GetVisibleArgMapping
virtual void fillVisibleArgumentMapping(::std::vector<USHORT>& _rArguments) const = 0;
virtual void initArgumentInfo() const = 0;
virtual ::rtl::OUString getSignature() const = 0;
virtual long getHelpId() const = 0;
// parameter
virtual sal_uInt32 getParameterCount() const = 0;
virtual ::rtl::OUString getParameterName(sal_uInt32 _nPos) const = 0;
virtual ::rtl::OUString getParameterDescription(sal_uInt32 _nPos) const = 0;
virtual bool isParameterOptional(sal_uInt32 _nPos) const = 0;
};
class SAL_NO_VTABLE IFormulaToken
{
public:
virtual bool isFunction() const = 0;
/*
OpCode eOp = pToken->GetOpCode();
if(!(pToken->IsFunction()|| ocArcTan2<=eOp))
*/
virtual sal_uInt32 getArgumentCount() const = 0;
};
class SAL_NO_VTABLE IStructHelper
{
public:
IStructHelper(){}
virtual SvLBoxEntry* InsertEntry(const XubString& rText, SvLBoxEntry* pParent,
USHORT nFlag,ULONG nPos=0,IFormulaToken* pScToken=NULL) = 0;
virtual String GetEntryText(SvLBoxEntry* pEntry) const = 0;
virtual SvLBoxEntry* GetParent(SvLBoxEntry* pEntry) const = 0;
};
class SAL_NO_VTABLE IFormulaEditorHelper
{
public:
IFormulaEditorHelper(){}
virtual void notifyChange() = 0;
virtual void fill() = 0;
virtual String getCurrentFormula() const = 0;
virtual void setCurrentFormula(const String& _sReplacement) = 0;
virtual void getSelection(xub_StrLen& _nStart,xub_StrLen& _nEnd) const = 0;
virtual void setSelection(xub_StrLen _nStart,xub_StrLen _nEnd) = 0;
virtual FormEditData* getFormEditData() const = 0;
virtual bool calculateValue(const String& _sExpression,String& _rResult) = 0;
virtual void switchBack() = 0;
virtual void clear() = 0;
virtual void deleteFormData() = 0;
virtual void setReferenceInput(const FormEditData* _pData) = 0;
virtual IFunctionManager* getFunctionManager() = 0;
virtual ::std::auto_ptr<FormulaTokenArray> convertToTokenArray(const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken >& _aTokenList) = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaParser> getFormulaParser() const = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> getFormulaOpCodeMapper() const = 0;
virtual void setDispatcherLock( BOOL bLock ) = 0;
virtual void dispatch(BOOL _bOK,BOOL _bMartixChecked) = 0;
virtual void doClose(BOOL _bOk) = 0;
virtual void insertEntryToLRUList(const IFunctionDescription* pDesc) = 0;
virtual void showReference(const String& _sFormula) = 0;
};
}
#endif //INCLUDE_FUNCTION_DESCRIPTION
This diff is collapsed.
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: errorcodes.hxx,v $
* $Revision: 1.6 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef SC_ERRORCODES_HXX
#define SC_ERRORCODES_HXX
#include <rtl/math.hxx>
#include <tools/solar.h>
namespace ScErrorCodes
{
const USHORT errIllegalChar = 501;
const USHORT errIllegalArgument = 502;
const USHORT errIllegalFPOperation = 503; // #NUM!
const USHORT errIllegalParameter = 504;
const USHORT errIllegalJump = 505;
const USHORT errSeparator = 506;
const USHORT errPair = 507;
const USHORT errPairExpected = 508;
const USHORT errOperatorExpected = 509;
const USHORT errVariableExpected = 510;
const USHORT errParameterExpected = 511;
const USHORT errCodeOverflow = 512;
const USHORT errStringOverflow = 513;
const USHORT errStackOverflow = 514;
const USHORT errUnknownState = 515;
const USHORT errUnknownVariable = 516;
const USHORT errUnknownOpCode = 517;
const USHORT errUnknownStackVariable = 518;
const USHORT errNoValue = 519; // #VALUE!
const USHORT errUnknownToken = 520;
const USHORT errNoCode = 521; // #NULL!
const USHORT errCircularReference = 522;
const USHORT errNoConvergence = 523;
const USHORT errNoRef = 524; // #REF!
const USHORT errNoName = 525; // #NAME?
const USHORT errDoubleRef = 526;
const USHORT errInterpOverflow = 527;
// Not displayed, temporary for TrackFormulas,
// Cell depends on another cell that has errCircularReference
const USHORT errTrackFromCircRef = 528;
// Interpreter internal: existing cell has no value but value queried
const USHORT errCellNoValue = 529;
// Interpreter: needed AddIn not found
const USHORT errNoAddin = 530;
// Interpreter: needed Macro not found
const USHORT errNoMacro = 531;
// Interpreter: Division by zero
const USHORT errDivisionByZero = 532; // #DIV/0!
// Compiler: a non-simple (str,err,val) value was put in an array
const USHORT errNestedArray = 533;
// Interpreter: NA() not available condition, not a real error
const USHORT NOTAVAILABLE = 0x7fff;
/** Unconditionally construct a double value of NAN where the lower bits
represent an interpreter error code. */
inline double CreateDoubleError( USHORT nErr )
{
double fVal;
::rtl::math::setNan( &fVal );
reinterpret_cast< sal_math_Double * >(&fVal)->nan_parts.fraction_lo = nErr;
return fVal;
}
/** Recreate the error code of a coded double error, if any. */
inline USHORT GetDoubleErrorValue( double fVal )
{
if ( ::rtl::math::isFinite( fVal ) )
return 0;
if ( ::rtl::math::isInf( fVal ) )
return errIllegalFPOperation; // normal INF
UINT32 nErr = reinterpret_cast< sal_math_Double * >(
&fVal)->nan_parts.fraction_lo;
if ( nErr & 0xffff0000 )
return errNoValue; // just a normal NAN
return (USHORT)(nErr & 0x0000ffff); // any other error
}
} // namespace ScErrorCodes
// yes, exceptionally we put a "using namespace" in a header file..
using namespace ScErrorCodes;
#endif // SC_ERRORCODES_HXX
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: formdata.hxx,v $
* $Revision: 1.3 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef FORMULA_FORMDATA_HXX
#define FORMULA_FORMDATA_HXX
#include <tools/string.hxx>
#include <tools/gen.hxx>
#include "formula/formuladllapi.h"
//============================================================================
namespace formula
{
class FORMULA_DLLPUBLIC FormEditData
{
public:
FormEditData();
virtual ~FormEditData();
virtual void SaveValues();
void RestoreValues();
BOOL HasParent() const { return pParent != NULL; }
inline USHORT GetMode() const { return nMode; }
inline xub_StrLen GetFStart() const { return nFStart; }
inline USHORT GetCatSel() const { return nCatSel; }
inline USHORT GetFuncSel() const { return nFuncSel; }
inline USHORT GetOffset() const { return nOffset; }
inline USHORT GetEdFocus() const { return nEdFocus; }
inline const String& GetUndoStr() const { return aUndoStr; }
inline BOOL GetMatrixFlag()const{ return bMatrix;}
inline ULONG GetUniqueId()const { return nUniqueId;}
inline const Selection& GetSelection()const { return aSelection;}
inline void SetMode( USHORT nNew ) { nMode = nNew; }
inline void SetFStart( xub_StrLen nNew ) { nFStart = nNew; }
inline void SetCatSel( USHORT nNew ) { nCatSel = nNew; }
inline void SetFuncSel( USHORT nNew ) { nFuncSel = nNew; }
inline void SetOffset( USHORT nNew ) { nOffset = nNew; }
inline void SetEdFocus( USHORT nNew ) { nEdFocus = nNew; }
inline void SetUndoStr( const String& rNew ) { aUndoStr = rNew; }
inline void SetMatrixFlag(BOOL bNew) { bMatrix=bNew;}
inline void SetUniqueId(ULONG nNew) { nUniqueId=nNew;}
inline void SetSelection(const Selection& aSel) { aSelection=aSel;}
protected:
void Reset();
FormEditData( const FormEditData& );
const FormEditData& operator=( const FormEditData& r );
FormEditData* pParent; // fuer Verschachtelung
private:
USHORT nMode; // enum ScFormulaDlgMode
xub_StrLen nFStart;
USHORT nCatSel;
USHORT nFuncSel;
USHORT nOffset;
USHORT nEdFocus;
String aUndoStr;
BOOL bMatrix;
ULONG nUniqueId;
Selection aSelection;
};
} // formula
#endif // FORMULA_FORMDATA_HXX
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: formula.hxx,v $
* $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef FORMULA_FORMULA_HXX
#define FORMULA_FORMULA_HXX
#include <sfx2/basedlgs.hxx>
// #include "formula/funcutl.hxx"
#include <memory>
#include "formula/formuladllapi.h"
namespace formula
{
//============================================================================
#define STRUCT_END 1
#define STRUCT_FOLDER 2
#define STRUCT_ERROR 3
#define STRUCT_ERR_C1 1
#define STRUCT_ERR_C2 2
enum FormulaDlgMode { FORMULA_FORMDLG_FORMULA, FORMULA_FORMDLG_ARGS, FORMULA_FORMDLG_EDIT };
//============================================================================
class IFormulaEditorHelper;
class FormulaDlg_Impl;
class IControlReferenceHandler;
class IFunctionDescription;
class IFunctionManager;
class FormulaHelper;
class RefEdit;
class RefButton;
//============================================================================
class FORMULA_DLLPUBLIC FormulaModalDialog : public ModalDialog
{
friend class FormulaDlg_Impl;
public:
FormulaModalDialog( Window* pParent
, bool _bSupportFunctionResult
, bool _bSupportResult
, bool _bSupportMatrix
,IFormulaEditorHelper* _pHelper
,IFunctionManager* _pFunctionMgr
,IControlReferenceHandler* _pDlg = NULL );
virtual ~FormulaModalDialog();
private:
::std::auto_ptr<FormulaDlg_Impl> m_pImpl;
protected:
void disableOk();
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton = NULL );
void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton = NULL );
void RefInputDoneAfter( BOOL bForced = FALSE );
ULONG FindFocusWin(Window *pWin);
void SetFocusWin(Window *pWin,ULONG nUniqueId);
void HighlightFunctionParas(const String& aFormula);
void SetMeText(const String& _sText);
FormulaDlgMode SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate);
void Update();
BOOL CheckMatrix(String& aFormula /*IN/OUT*/);
String GetMeText() const;
void Update(const String& _sExp);
void CheckMatrix();
void DoEnter(BOOL _bOk);
BOOL isUserMatrix() const;
const IFunctionDescription* getCurrentFunctionDescription() const;
BOOL UpdateParaWin(Selection& _rSelection);
void UpdateParaWin(const Selection& _rSelection,const String& _sRefStr);
RefEdit* GetActiveEdit();
void SetEdSelection();
const FormulaHelper& GetFormulaHelper() const;
};
class FORMULA_DLLPUBLIC FormulaDlg : public SfxModelessDialog
{
friend class FormulaDlg_Impl;
public:
FormulaDlg( SfxBindings* pB
, SfxChildWindow* pCW
, Window* pParent
, bool _bSupportFunctionResult
, bool _bSupportResult
, bool _bSupportMatrix
, IFormulaEditorHelper* _pHelper
, IFunctionManager* _pFunctionMgr
, IControlReferenceHandler* _pDlg = NULL );
virtual ~FormulaDlg();
private:
::std::auto_ptr<FormulaDlg_Impl> m_pImpl;
DECL_LINK( UpdateFocusHdl, Timer*);
protected:
void disableOk();
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton = NULL );
void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton = NULL );
void RefInputDoneAfter( BOOL bForced = FALSE );
ULONG FindFocusWin(Window *pWin);
void SetFocusWin(Window *pWin,ULONG nUniqueId);
void HighlightFunctionParas(const String& aFormula);
void SetMeText(const String& _sText);
FormulaDlgMode SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate);
void Update();
BOOL CheckMatrix(String& aFormula /*IN/OUT*/);
String GetMeText() const;
void Update(const String& _sExp);
void CheckMatrix();
void DoEnter(BOOL _bOk);
BOOL isUserMatrix() const;
const IFunctionDescription* getCurrentFunctionDescription() const;
BOOL UpdateParaWin(Selection& _rSelection);
void UpdateParaWin(const Selection& _rSelection,const String& _sRefStr);
RefEdit* GetActiveEdit();
void SetEdSelection();
const FormulaHelper& GetFormulaHelper() const;
};
} // formula
#endif // FORMULA_FORMULA_HXX
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: dllapi.h,v $
* $Revision: 1.3 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef INCLUDED_FORMULADLLAPI_H
#define INCLUDED_FORMULADLLAPI_H
#include "sal/types.h"
#if defined(FORMULA_DLLIMPLEMENTATION)
#define FORMULA_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
#define FORMULA_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
#define FORMULA_DLLPRIVATE SAL_DLLPRIVATE
#endif /* INCLUDED_FORMULADLLAPI_H */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: formula.hxx,v $
* $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef FORMULA_FORMULA_HELPER_HXX
#define FORMULA_FORMULA_HELPER_HXX
#include "formula/IFunctionDescription.hxx"
#include <vector>
#include <tools/string.hxx>
#include <memory>
#include "formula/formuladllapi.h"
class SvtSysLocale;
class CharClass;
namespace formula
{
class FORMULA_DLLPUBLIC FormulaHelper
{
::std::auto_ptr<SvtSysLocale> m_pSysLocale;
const CharClass* m_pCharClass;
const IFunctionManager* m_pFunctionManager;
const sal_Unicode open;
const sal_Unicode close;
const sal_Unicode sep;
const sal_Unicode arrayOpen;
const sal_Unicode arrayClose;
public:
FormulaHelper(const IFunctionManager* _pFunctionManager);
inline const CharClass* GetCharClass() const { return m_pCharClass; }
BOOL GetNextFunc( const String& rFormula,
BOOL bBack,
xub_StrLen& rFStart, // Ein- und Ausgabe
xub_StrLen* pFEnd = NULL,
const IFunctionDescription** ppFDesc = NULL,
::std::vector< ::rtl::OUString>* pArgs = NULL ) const;
xub_StrLen GetFunctionStart( const String& rFormula, xub_StrLen nStart,
BOOL bBack, String* pFuncName = NULL ) const;
xub_StrLen GetFunctionEnd ( const String& rFormula, xub_StrLen nStart ) const;
xub_StrLen GetArgStart ( const String& rFormula, xub_StrLen nStart,
USHORT nArg ) const;
void GetArgStrings ( ::std::vector< ::rtl::OUString >& _rArgs,
const String& rFormula,
xub_StrLen nFuncPos,
USHORT nArgs ) const;
void FillArgStrings ( const String& rFormula,
xub_StrLen nFuncPos,
USHORT nArgs,
::std::vector< ::rtl::OUString >& _rArgs ) const;
};
// =============================================================================
} // formula
// =============================================================================
#endif //FORMULA_FORMULA_HELPER_HXX
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: funcutl.hxx,v $
* $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#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
{
class IControlReferenceHandler;
class FORMULA_DLLPUBLIC RefEdit : public Edit
{
private:
Timer aTimer;
IControlReferenceHandler* pAnyRefDlg; // parent dialog
BOOL bSilentFocus; // for SilentGrabFocus()
DECL_LINK( UpdateHdl, Timer* );
protected:
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void GetFocus();
virtual void LoseFocus();
public:
RefEdit( Window* _pParent,IControlReferenceHandler* pParent, const ResId& rResId );
RefEdit( Window* pParent, const ResId& rResId );
virtual ~RefEdit();
void SetRefString( const XubString& rStr );
using Edit::SetText;
virtual void SetText( const XubString& rStr );
virtual void Modify();
void StartUpdateData();
void SilentGrabFocus(); // does not update any references
void SetRefDialog( IControlReferenceHandler* pDlg );
inline IControlReferenceHandler* GetRefDialog() { return pAnyRefDlg; }
};
//============================================================================
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
protected:
virtual void Click();
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void GetFocus();
virtual void LoseFocus();
public:
RefButton( Window* _pParent, const ResId& rResId);
RefButton( Window* _pParent, const ResId& rResId, RefEdit* pEdit ,IControlReferenceHandler* pDlg);
void SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit );
void SetStartImage();
void SetEndImage();
inline void DoRef() { Click(); }
};
} // formula
#endif // FORMULA_FUNCUTL_HXX
This diff is collapsed.
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: intruref.hxx,v $
* $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef FORMULA_INTRUREF_HXX
#define FORMULA_INTRUREF_HXX
namespace formula
{
/** A simple intrusive refcounting template, not thread safe, but therefore
also a bit faster than boost's smart_ptr or uno::Reference equivalents, and
the type to be refcounted has full control over its behavior.
Mainly used in formula compiler and interpreter context, e.g. ScTokenRef,
ScMatrixRef.
Type T must implement methods IncRef() and DecRef(), in case typename T is
const they must be const as well and the reference counter be mutable.
*/
template< typename T > class SimpleIntrusiveReference
{
T* p;
public:
inline SimpleIntrusiveReference() : p(0) {}
inline SimpleIntrusiveReference( const SimpleIntrusiveReference& r )
{
p = r.p;
if ( p )
p->IncRef();
}
inline SimpleIntrusiveReference( T *t )
{
p = t;
if ( p )
t->IncRef();
}
inline void Clear()
{
if ( p )
{
p->DecRef();
p = 0;
}
}
inline ~SimpleIntrusiveReference()
{
if ( p )
p->DecRef();
}
inline SimpleIntrusiveReference& operator=( T* t )
{
if ( t )
t->IncRef();
if ( p )
p->DecRef();
p = t;
return *this;
}
inline SimpleIntrusiveReference& operator=( const SimpleIntrusiveReference& r )
{
*this = r.p;
return *this;
}
inline bool Is() const { return p != 0; }
inline bool operator ! () const { return p == 0; }
inline T* operator&() const { return p; }
inline T* operator->() const { return p; }
inline T& operator*() const { return *p; }
inline operator T*() const { return p; }
inline T* get() const { return p; }
};
// =============================================================================
} // formula
// =============================================================================
#endif // SC_INTRUREF_HXX
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: helpids.hrc,v $
* $Revision: 1.7 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef FORMULA_HELPID_HRC
#define FORMULA_HELPID_HRC
#ifndef _SOLAR_HRC
#include <svtools/solar.hrc> // HID_FORMULA_START
#endif
#define HID_FORMULADLG_FORMULA (HID_FORMULA_START + 0)
#define HID_FORMULA_FAP_FORMULA (HID_FORMULA_START + 1)
#define HID_FORMULA_FAP_STRUCT (HID_FORMULA_START + 2)
#define HID_FORMULA_FAP_PAGE (HID_FORMULA_START + 3)
#define HID_FORMULA_FAP_EDIT1 (HID_FORMULA_START + 4)
#define HID_FORMULA_FAP_EDIT2 (HID_FORMULA_START + 5)
#define HID_FORMULA_FAP_EDIT3 (HID_FORMULA_START + 6)
#define HID_FORMULA_FAP_EDIT4 (HID_FORMULA_START + 7)
#define HID_FORMULA_FAP_BTN_FX1 (HID_FORMULA_START + 8)
#define HID_FORMULA_FAP_BTN_FX2 (HID_FORMULA_START + 9)
#define HID_FORMULA_FAP_BTN_FX3 (HID_FORMULA_START +10)
#define HID_FORMULA_FAP_BTN_FX4 (HID_FORMULA_START +11)
#define HID_FORMULA_FAP_BTN_REF1 (HID_FORMULA_START +12)
#define HID_FORMULA_FAP_BTN_REF2 (HID_FORMULA_START +13)
#define HID_FORMULA_FAP_BTN_REF3 (HID_FORMULA_START +14)
#define HID_FORMULA_FAP_BTN_REF4 (HID_FORMULA_START +15)
#define HID_FORMULA_LB_CATEGORY (HID_FORMULA_START +16)
#define HID_FORMULA_LB_FUNCTION (HID_FORMULA_START +17)
#define HID_FORMULATAB_FUNCTION (HID_FORMULA_START +18)
#define HID_FORMULATAB_STRUCT (HID_FORMULA_START +19)
#if HID_FORMULATAB_STRUCT > HID_FORMULA_END
#error Help-Id Ueberlauf in #file, #line
#endif
// don't forget to update the file util/hidother.src
#endif //FORMULA_HELPID_HRC
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.3 $
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=..
PRJNAME=formula
TARGET=inc
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
# --- Files --------------------------------------------------------
# --- Targets -------------------------------------------------------
.INCLUDE : target.mk
.IF "$(ENABLE_PCH)"!=""
ALLTAR : \
$(SLO)$/precompiled.pch \
$(SLO)$/precompiled_ex.pch
.ENDIF # "$(ENABLE_PCH)"!=""
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: precompiled_reportdesign.cxx,v $
* $Revision: 1.3 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "precompiled_formula.hxx"
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: precompiled_reportdesign.hxx,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// MARKER(update_precomp.py): Generated on 2006-09-01 17:49:38.561560
#ifdef PRECOMPILED_HEADERS
#include "com/sun/star/sdb/CommandType.hpp"
#include "com/sun/star/sdb/CommandType.hpp"
#include "comphelper/sequence.hxx"
#include "comphelper/sequenceashashmap.hxx"
#include "comphelper/documentconstants.hxx"
#endif
/build.lst/1.10/Wed Aug 20 14:15:04 2008//Tcws_dev300_frmdlg
/d.lst/1.6/Fri Aug 17 11:27:10 2007//Tcws_dev300_frmdlg
/rpt.xml/1.2/Mon Jul 09 11:56:12 2007//Tcws_dev300_frmdlg
D
:pserver:oj@so-cvs-tunnel.germany.sun.com:/cvs
Issue number:
Submitted by:
Reviewed by:
CVS: ----------------------------------------------------------------------
CVS: Issue number:
CVS: If this change addresses one or more issues,
CVS: then enter the issue number(s) here.
CVS: Submitted by:
CVS: If this code has been contributed to the project by someone else; i.e.,
CVS: they sent us a patch or a set of diffs, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
CVS: ----------------------------------------------------------------------
CVS: Committers,
CVS:
CVS: Please follow these protocols:
CVS:
CVS: * Please include in the log message
CVS: reference(s) by ID / number and/or URL
CVS: to any and all relevant OpenOffice.org issue(s).
CVS:
CVS: * If the code is contributed from outside Sun
CVS: then please verify using the list at the following URL
CVS: http://www.openoffice.org/copyright/copyrightapproved.html
CVS: that Sun has received a signed Copyright Assignment Form
CVS: from the submitter.
CVS:
CVS: Otherwise,
CVS: please send an email TO: the submitter; and CC: OOCRequest@eng.sun.com
CVS: the letter (CopyRightRequest.txt) to request assignment of copyright to Sun
CVS: (http://www.openoffice.org/copyright/assign_copyright.html).
CVS:
CVS: Please do NOT commit code until you have verified (as detailed above) that
CVS: Sun has received a signed Copyright Assignment Form from the submitter.
CVS:
CVS: * Please send an email TO: the submitter
CVS: (particularly, if from outside Sun)
CVS: advising that the code has been committed,
CVS: and gratefully recognizing the contribution.
rd formula : BOOST:boost comphelper svx NULL
rd formula usr1 - all rd_mkout NULL
rd formula\inc nmake - all rd_inc NULL
rd formula\source\core\api nmake - all rd_api rd_inc NULL
rd formula\source\core\resource nmake - all rd_core_res rd_inc NULL
rd formula\source\ui\resource nmake - all rd_ui_res rd_inc NULL
rd formula\source\ui\dlg nmake - all rd_uidlg rd_inc NULL
rd formula\util nmake - all rd_util rd_uidlg rd_core_res rd_ui_res rd_api NULL
..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
dos: sh -c "if test %OS% = MACOSX; then create-bundle %_DEST%\lib%_EXT%\*.dylib; fi"
# Libraries
..\%__SRC%\bin\for*.dll %_DEST%\bin%_EXT%\for*.dll
..\%__SRC%\lib\libfor*.so %_DEST%\lib%_EXT%\libfor*.so
..\%__SRC%\lib\ifor*.lib %_DEST%\lib%_EXT%\ifor*.lib
..\%__SRC%\lib\libfor*.dylib %_DEST%\lib%_EXT%\libfor*.dylib
# Resources
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
mkdir: %_DEST%\inc%_EXT%\formula
..\inc\formula\formdata.hxx %_DEST%\inc%_EXT%\formula\formdata.hxx
..\inc\formula\formula.hxx %_DEST%\inc%_EXT%\formula\formula.hxx
..\inc\formula\formulahelper.hxx %_DEST%\inc%_EXT%\formula\formulahelper.hxx
..\inc\formula\funcutl.hxx %_DEST%\inc%_EXT%\formula\funcutl.hxx
..\inc\formula\IControlReferenceHandler.hxx %_DEST%\inc%_EXT%\formula\IControlReferenceHandler.hxx
..\inc\formula\IFunctionDescription.hxx %_DEST%\inc%_EXT%\formula\IFunctionDescription.hxx
..\inc\formula\formuladllapi.h %_DEST%\inc%_EXT%\formula\formuladllapi.h
..\inc\formula\opcode.hxx %_DEST%\inc%_EXT%\formula\opcode.hxx
..\inc\formula\grammar.hxx %_DEST%\inc%_EXT%\formula\grammar.hxx
..\inc\formula\FormulaCompiler.hxx %_DEST%\inc%_EXT%\formula\FormulaCompiler.hxx
..\inc\formula\FormulaOpCodeMapperObj.hxx %_DEST%\inc%_EXT%\formula\FormulaOpCodeMapperObj.hxx
..\inc\formula\compiler.hrc %_DEST%\inc%_EXT%\formula\compiler.hrc
..\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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
<module-name>formula</module-name>
<component-description>
<author>Ocke Janssen</author>
<name>com.sun.star.sheet.comp.FormulaOpCodeMapper</name>
<description>Represents access to ODFF compiler token.</description>
<loader-name>com.sun.star.loader.SharedLibrary</loader-name>
<language>c++</language>
<status value="alpha"/>
<supported-service>com.sun.star.sheet.FormulaOpCodeMapper</supported-service>
</component-description>
</module-description>
This diff is collapsed.
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: tokenuno.hxx,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "precompiled_formula.hxx"
#include "formula/FormulaOpCodeMapperObj.hxx"
#include "formula/opcode.hxx"
#include <comphelper/sequence.hxx>
// =============================================================================
namespace formula
{
// =============================================================================
using namespace ::com::sun::star;
// -----------------------------------------------------------------------------
// --------------------------------------------------------------------------------
sal_Bool SAL_CALL FormulaOpCodeMapperObj::supportsService( const ::rtl::OUString& _rServiceName ) throw(uno::RuntimeException)
{
return ::comphelper::findValue( getSupportedServiceNames_Static(), _rServiceName, sal_True ).getLength() != 0;
}
//------------------------------------------------------------------------
FormulaOpCodeMapperObj::FormulaOpCodeMapperObj(::std::auto_ptr<FormulaCompiler> _pCompiler)
: m_pCompiler(_pCompiler)
{
}
FormulaOpCodeMapperObj::~FormulaOpCodeMapperObj()
{
}
::sal_Int32 SAL_CALL FormulaOpCodeMapperObj::getOpCodeExternal()
throw (::com::sun::star::uno::RuntimeException)
{
return ocExternal;
}
::sal_Int32 SAL_CALL FormulaOpCodeMapperObj::getOpCodeUnknown()
throw (::com::sun::star::uno::RuntimeException)
{
return FormulaCompiler::OpCodeMap::getOpCodeUnknown();
}
::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken >
SAL_CALL FormulaOpCodeMapperObj::getMappings(
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames,
sal_Int32 nLanguage )
throw ( ::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException)
{
FormulaCompiler::OpCodeMapPtr xMap = m_pCompiler->GetOpCodeMap( nLanguage);
if (!xMap)
throw lang::IllegalArgumentException();
return xMap->createSequenceOfFormulaTokens( *m_pCompiler,rNames);
}
::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaOpCodeMapEntry >
SAL_CALL FormulaOpCodeMapperObj::getAvailableMappings(
sal_Int32 nLanguage, sal_Int32 nGroups )
throw ( ::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException)
{
FormulaCompiler::OpCodeMapPtr xMap = m_pCompiler->GetOpCodeMap( nLanguage);
if (!xMap)
throw lang::IllegalArgumentException();
return xMap->createSequenceOfAvailableMappings( *m_pCompiler,nGroups);
}
//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL FormulaOpCodeMapperObj::getImplementationName( ) throw(uno::RuntimeException)
{
return getImplementationName_Static();
}
// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL FormulaOpCodeMapperObj::getImplementationName_Static()
{
return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "simple.formula.FormulaOpCodeMapperObj" ) );
}
// --------------------------------------------------------------------------------
uno::Sequence< ::rtl::OUString > SAL_CALL FormulaOpCodeMapperObj::getSupportedServiceNames( ) throw(uno::RuntimeException)
{
return getSupportedServiceNames_Static();
}
uno::Sequence< rtl::OUString > SAL_CALL FormulaOpCodeMapperObj::getSupportedServiceNames_Static()
{
uno::Sequence< rtl::OUString > aSeq( 1 );
aSeq[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.FormulaOpCodeMapper" ));
return aSeq;
}
uno::Reference< uno::XInterface > SAL_CALL FormulaOpCodeMapperObj::create(
uno::Reference< uno::XComponentContext > const & /*_xContext*/)
{
return static_cast<sheet::XFormulaOpCodeMapper*>(new FormulaOpCodeMapperObj(::std::auto_ptr<FormulaCompiler>(new FormulaCompiler())));
}
// -----------------------------------------------------------------------------
// =============================================================================
} // formula
// =============================================================================
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.3 $
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=..$/..$/..
PRJINC=$(PRJ)$/source
PRJNAME=formula
TARGET=core_api
ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
SLOFILES= $(SLO)$/FormulaOpCodeMapperObj.obj \
$(SLO)$/FormulaCompiler.obj \
$(SLO)$/token.obj \
$(SLO)$/services.obj
# --- Targets ----------------------------------
.INCLUDE : target.mk
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: services.cxx,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "precompiled_formula.hxx"
#include "sal/types.h"
#include <cppuhelper/factory.hxx>
#include <osl/diagnose.h>
#include <cppuhelper/implementationentry.hxx>
#include "formula/FormulaOpCodeMapperObj.hxx"
/********************************************************************************************/
using namespace ::formula;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::registry;
//***************************************************************************************
//
// registry functions
namespace
{
cppu::ImplementationEntry entries[] = {
{ &FormulaOpCodeMapperObj::create, &FormulaOpCodeMapperObj::getImplementationName_Static, &FormulaOpCodeMapperObj::getSupportedServiceNames_Static,
&cppu::createSingleComponentFactory, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
};
}
extern "C"
{
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
char const * implName, void * serviceManager, void * registryKey)
{
return cppu::component_getFactoryHelper(
implName, serviceManager, registryKey, entries);
}
SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
char const ** envTypeName, uno_Environment **)
{
*envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
void * serviceManager, void * registryKey)
{
return cppu::component_writeInfoHelper(
serviceManager, registryKey, entries);
}
} // extern "C"
This diff is collapsed.
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: core_resource.hrc,v $
* $Revision: 1.16.68.1 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _FORMULA_CORE_RESOURCE_HRC_
#define _FORMULA_CORE_RESOURCE_HRC_
#include <svtools/solar.hrc>
//------------------------------------------------------------------------------
#define RID_CORE_STRINGS_START RID_FORMULA_START
#define RID_CORE_OTHER_START RID_FORMULA_START
//------------------------------------------------------------------------------
//- String-IDs
#define RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF (RID_CORE_OTHER_START + 0)
#define RID_STRLIST_FUNCTION_NAMES_ENGLISH (RID_CORE_OTHER_START + 1)
#define RID_STRLIST_FUNCTION_NAMES (RID_CORE_OTHER_START + 2)
#endif // _FORMULA_CORE_RESOURCE_HRC_
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: core_resource.hxx,v $
* $Revision: 1.5.68.2 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#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;
//.........................................................................
namespace formula
{
#define FORMULA_RES( id ) ResourceManager::loadString( id )
#define FORMULA_RES_PARAM( id, ascii, replace ) ResourceManager::loadString( id, ascii, replace )
#define FORMULACORE_RESSTRING( id ) FORMULA_RES( id )
// (compatibility)
//==================================================================
//= ResourceManager
//= handling ressources within the FORMULA-Core library
//==================================================================
class ResourceManager
{
friend class OModuleClient;
static ::osl::Mutex s_aMutex; /// access safety
static sal_Int32 s_nClients; /// number of registered clients
static ResMgr* m_pImpl;
private:
// no instantiation allowed
ResourceManager() { }
~ResourceManager() { }
protected:
static void ensureImplExists();
/// register a client for the module
static void registerClient();
/// revoke a client for the module
static void revokeClient();
public:
/** loads the string with the specified resource id
*/
static ::rtl::OUString loadString(sal_uInt16 _nResId);
/** loads a string from the resource file, substituting a placeholder with a given string
@param _nResId
the resource ID of the string to loAD
@param _pPlaceholderAscii
the ASCII representation of the placeholder string
@param _rReplace
the string which should substutite the placeholder
*/
static ::rtl::OUString loadString(
sal_uInt16 _nResId,
const sal_Char* _pPlaceholderAscii,
const ::rtl::OUString& _rReplace
);
static ResMgr* getResManager();
};
//=========================================================================
//= OModuleClient
//=========================================================================
/** base class for objects which uses any global module-specific ressources
*/
class OModuleClient
{
public:
OModuleClient() { ResourceManager::registerClient(); }
~OModuleClient() { ResourceManager::revokeClient(); }
};
//.........................................................................
} // formula
//.........................................................................
#endif // _FORMULA_CORE_RESOURCE_HXX_
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: core_resource.cxx,v $
* $Revision: 1.11.68.2 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_formula.hxx"
#include "core_resource.hxx"
#include <tools/resmgr.hxx>
// ---- needed as long as we have no contexts for components ---
#include <vcl/svapp.hxx>
#include <svtools/solar.hrc>
//.........................................................................
namespace formula
{
//==================================================================
//= ResourceManager
//==================================================================
::osl::Mutex ResourceManager::s_aMutex;
sal_Int32 ResourceManager::s_nClients = 0;
ResMgr* ResourceManager::m_pImpl = NULL;
//------------------------------------------------------------------
void ResourceManager::ensureImplExists()
{
if (m_pImpl)
return;
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
ByteString sFileName("for");
m_pImpl = ResMgr::CreateResMgr(sFileName.GetBuffer(), aLocale);
}
//------------------------------------------------------------------
::rtl::OUString ResourceManager::loadString(sal_uInt16 _nResId)
{
::rtl::OUString sReturn;
ensureImplExists();
if (m_pImpl)
sReturn = String(ResId(_nResId,*m_pImpl));
return sReturn;
}
//------------------------------------------------------------------
::rtl::OUString ResourceManager::loadString( sal_uInt16 _nResId, const sal_Char* _pPlaceholderAscii, const ::rtl::OUString& _rReplace )
{
String sString( loadString( _nResId ) );
sString.SearchAndReplaceAscii( _pPlaceholderAscii, _rReplace );
return sString;
}
//-------------------------------------------------------------------------
void ResourceManager::registerClient()
{
::osl::MutexGuard aGuard(s_aMutex);
++s_nClients;
}
//-------------------------------------------------------------------------
void ResourceManager::revokeClient()
{
::osl::MutexGuard aGuard(s_aMutex);
if (!--s_nClients && m_pImpl)
{
delete m_pImpl;
m_pImpl = NULL;
}
}
ResMgr* ResourceManager::getResManager()
{
ensureImplExists();
return m_pImpl;
}
//.........................................................................
} // formula
//.........................................................................
This diff is collapsed.
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.4 $
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=..$/..$/..
PRJINC=$(PRJ)$/source
PRJNAME=formula
TARGET=core_resource
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
SRS1NAME=core_strings
SRC1FILES= \
core_resource.src
SLOFILES= $(SLO)$/core_resource.obj
# --- Targets ----------------------------------
.INCLUDE : target.mk
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: funcutl.hxx,v $
* $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef FORMULA_CONTROL_HELPER_HXX_INCLUDED
#define FORMULA_CONTROL_HELPER_HXX_INCLUDED
#include "formula/funcutl.hxx"
#include <svtools/svmedit.hxx>
namespace formula
{
//============================================================================
// class ValWnd
class ValWnd : public Window
{
public:
ValWnd( Window* pParent, const ResId& rId );
void SetValue( const String& rStrVal );
protected:
virtual void Paint( const Rectangle& rRect );
private:
String aStrValue;
Rectangle aRectOut;
};
//============================================================================
// class EditBox
class EditBox : public Control
{
private:
MultiLineEdit* pMEdit;
Link aSelChangedLink;
Selection aOldSel;
BOOL bMouseFlag;
DECL_LINK( ChangedHdl, EditBox* );
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
virtual void SelectionChanged();
virtual void Resize();
virtual void GetFocus();
public:
EditBox( Window* pParent,
WinBits nWinStyle = WB_LEFT | WB_BORDER );
EditBox( Window* pParent, const ResId& rResId );
virtual ~EditBox();
MultiLineEdit* GetEdit() {return pMEdit;}
void SetSelChangedHdl( const Link& rLink ) { aSelChangedLink = rLink; }
const Link& GetSelChangedHdl() const { return aSelChangedLink; }
void UpdateOldSel();
};
//============================================================================
// class ArgEdit
class ArgEdit : public RefEdit
{
public:
ArgEdit( Window* pParent, const ResId& rResId );
void Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
ScrollBar& rArgSlider, USHORT nArgCount );
protected:
virtual void KeyInput( const KeyEvent& rKEvt );
private:
ArgEdit* pEdPrev;
ArgEdit* pEdNext;
ScrollBar* pSlider;
USHORT nArgs;
};
//============================================================================
// class ArgInput
class ArgInput
{
private:
Link aFxClickLink;
Link aRefClickLink;
Link aFxFocusLink;
Link aRefFocusLink;
Link aEdFocusLink;
Link aEdModifyLink;
FixedText* pFtArg;
ImageButton* pBtnFx;
ArgEdit* pEdArg;
RefButton* pRefBtn;
DECL_LINK( FxBtnClickHdl, ImageButton* );
DECL_LINK( RefBtnClickHdl,RefButton* );
DECL_LINK( FxBtnFocusHdl, ImageButton* );
DECL_LINK( RefBtnFocusHdl,RefButton* );
DECL_LINK( EdFocusHdl, ArgEdit* );
DECL_LINK( EdModifyHdl,ArgEdit* );
protected:
virtual void FxClick();
virtual void RefClick();
virtual void FxFocus();
virtual void RefFocus();
virtual void EdFocus();
virtual void EdModify();
public:
ArgInput();
void InitArgInput ( FixedText* pftArg,
ImageButton* pbtnFx,
ArgEdit* pedArg,
RefButton* prefBtn);
void SetArgName(const String &aArg);
String GetArgName();
void SetArgNameFont(const Font&);
void SetArgVal(const String &aVal);
String GetArgVal();
void SetArgSelection (const Selection& rSel );
void ReplaceSelOfArg (const String& rStr );
Selection GetArgSelection();
ArgEdit* GetArgEdPtr() {return pEdArg;}
void SetFxClickHdl( const Link& rLink ) { aFxClickLink = rLink; }
const Link& GetFxClickHdl() const { return aFxClickLink; }
void SetRefClickHdl( const Link& rLink ) { aRefClickLink = rLink; }
const Link& GetRefClickHdl() const { return aRefClickLink; }
void SetFxFocusHdl( const Link& rLink ) { aFxFocusLink = rLink; }
const Link& GetFxFocusHdl() const { return aFxFocusLink; }
void SetRefFocusHdl( const Link& rLink ) { aRefFocusLink = rLink; }
const Link& GetRefFocusHdl() const { return aRefFocusLink; }
void SetEdFocusHdl( const Link& rLink ) { aEdFocusLink = rLink; }
const Link& GetEdFocusHdl() const { return aEdFocusLink; }
void SetEdModifyHdl( const Link& rLink ) { aEdModifyLink = rLink; }
const Link& GetEdModifyHdl() const { return aEdModifyLink; }
void Hide();
void Show();
};
}
#endif // FORMULA_FORMULA_HELPER_HXX_INCLUDED
This diff is collapsed.
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: formdlgs.hrc,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#define FT_RESULT 1
#define WND_RESULT 2
#define FT_EDITNAME 3
#define STR_TITLE1 4
#define STR_TITLE2 5
#define BTN_HELP 6
#define BTN_CANCEL 7
#define BTN_BACKWARD 8
#define BTN_FORWARD 9
#define BTN_END 10
#define BTN_MATRIX 11
#define FT_FUNCNAME 12
#define FT_FUNCDESC 13
#define FT_HEADLINE 14
#define GB_EDIT 15
#define FT_FORMULA 16
#define ED_FORMULA 17
#define TC_FUNCTION 18
#define ED_REF 19
#define RB_REF 20
#define FT_FORMULA_RESULT 21
#define WND_FORMULA_RESULT 22
#define STR_END 23
// Fuer Tabpage
#define TP_FUNCTION 1
#define TP_STRUCT 2
// Funktions-Tabpage
#define FT_FUNCTION 1
#define FT_CATEGORY 2
#define LB_CATEGORY 3
#define LB_FUNCTION 4
// Struktur-Tabpage
#define FT_STRUCT 1
#define TLB_STRUCT 2
// Bitmaps
#define BMP_STR_CLOSE 1
#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
#define STR_STRUCT_ERR2 2
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: funcpage.hxx,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef FORMULA_FUNCPAGE_HXX
#define FORMULA_FUNCPAGE_HXX
#include <svtools/stdctrl.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/group.hxx>
#include <svtools/svmedit.hxx>
#include <vcl/tabpage.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/button.hxx>
#include <svtools/svtreebx.hxx>
#include <boost/shared_ptr.hpp>
#include <vector>
#include "ModuleHelper.hxx"
//============================================================================
namespace formula
{
class IFunctionDescription;
class IFunctionManager;
class IFunctionCategory;
//============================================================================
class FormulaListBox : public ListBox
{
protected:
virtual void KeyInput( const KeyEvent& rKEvt );
virtual long PreNotify( NotifyEvent& rNEvt );
public:
FormulaListBox( Window* pParent, WinBits nWinStyle = WB_BORDER );
FormulaListBox( Window* pParent, const ResId& rResId );
};
typedef const IFunctionDescription* TFunctionDesc;
//============================================================================
class FuncPage : public TabPage
{
private:
OModuleClient m_aModuleClient;
Link aDoubleClickLink;
Link aSelectionLink;
FixedText aFtCategory;
ListBox aLbCategory;
FixedText aFtFunction;
ListBox aLbFunction;
const IFunctionManager*
m_pFunctionManager;
::std::vector< TFunctionDesc > aLRUList;
SmartId m_aSmartHelpId;
void impl_addFunctions(const IFunctionCategory* _pCategory);
DECL_LINK( SelHdl, ListBox* );
DECL_LINK( DblClkHdl, ListBox* );
protected:
void UpdateFunctionList();
void InitLRUList();
public:
FuncPage( Window* pParent,const IFunctionManager* _pFunctionManager);
void SetCategory(USHORT nCat);
void SetFunction(USHORT nFunc);
void SetFocus();
USHORT GetCategory();
USHORT GetFunction();
USHORT GetFunctionEntryCount();
USHORT GetFuncPos(const IFunctionDescription* _pDesc);
const IFunctionDescription* GetFuncDesc( USHORT nPos ) const;
String GetSelFunctionName() const;
void SetDoubleClickHdl( const Link& rLink ) { aDoubleClickLink = rLink; }
const Link& GetDoubleClickHdl() const { return aDoubleClickLink; }
void SetSelectHdl( const Link& rLink ) { aSelectionLink = rLink; }
const Link& GetSelectHdl() const { return aSelectionLink; }
};
} // formula
#endif
This diff is collapsed.
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.3 $
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=..$/..$/..
PRJNAME=formula
TARGET=uidlg
IMGLST_SRS=$(SRS)$/$(TARGET).srs
BMP_IN=$(PRJ)$/res
# --- Settings ----------------------------------
.INCLUDE : settings.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files -------------------------------------
# ... resource files ............................
SRS1NAME=$(TARGET)
SRC1FILES = \
formdlgs.src \
parawin.src
# ... object files ............................
EXCEPTIONSFILES= \
$(SLO)$/formula.obj \
$(SLO)$/FormulaHelper.obj \
$(SLO)$/parawin.obj \
$(SLO)$/funcutl.obj \
$(SLO)$/funcpage.obj \
$(SLO)$/structpg.obj
SLOFILES= \
$(EXCEPTIONSFILES)
# --- Targets ----------------------------------
.INCLUDE : target.mk
This diff is collapsed.
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: parawin.hrc,v $
* $Revision: 1.4 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// #define RID_SCTAB_PARAMETER 256
#define FT_PARNAME 1
#define FT_PARDESC 2
#define FT_EDITDESC 3
#define FT_ARG1 4
#define FT_ARG2 5
#define FT_ARG3 6
#define FT_ARG4 7
#define BTN_FX1 8
#define BTN_FX2 9
#define BTN_FX3 10
#define BTN_FX4 11
#define ED_ARG1 12
#define ED_ARG2 13
#define ED_ARG3 14
#define ED_ARG4 15
#define RB_ARG1 16
#define RB_ARG2 17
#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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
UDK_3_0_0 {
global:
component_getFactory;
component_getImplementationEnvironment;
component_writeInfo;
local:
*;
};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment