From cc725643fded8c9237403f12bb6eed9d964e55c9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 9 Apr 2014 10:11:46 +0200 Subject: Clean up function declarations and some unused functions Change-Id: I63c4c61847fea4500b667a5ea9f2b32207692033 --- basic/inc/sb.hxx | 3 + basic/source/basmgr/basmgr.cxx | 2 - basic/source/classes/eventatt.cxx | 2 +- basic/source/classes/propacc.cxx | 10 - basic/source/classes/sb.cxx | 2 - basic/source/classes/sbunoobj.cxx | 4 +- basic/source/classes/sbxmod.cxx | 11 +- basic/source/inc/eventatt.hxx | 35 ++++ basic/source/inc/rtlproto.hxx | 375 ++++++++++++++++++++++++++++++++++++++ basic/source/inc/runtime.hxx | 2 + basic/source/inc/sbunoobj.hxx | 7 + basic/source/runtime/methods1.cxx | 7 +- basic/source/runtime/rtlproto.hxx | 375 -------------------------------------- basic/source/runtime/runtime.cxx | 5 +- basic/source/sbx/sbxvalue.cxx | 4 +- basic/source/sbx/sbxvar.cxx | 6 +- basic/source/uno/dlgcont.cxx | 1 + basic/source/uno/sbservices.cxx | 8 +- basic/source/uno/sbservices.hxx | 35 ++++ basic/source/uno/scriptcont.cxx | 1 + 20 files changed, 473 insertions(+), 422 deletions(-) create mode 100644 basic/source/inc/eventatt.hxx create mode 100644 basic/source/inc/rtlproto.hxx delete mode 100644 basic/source/runtime/rtlproto.hxx create mode 100644 basic/source/uno/sbservices.hxx (limited to 'basic') diff --git a/basic/inc/sb.hxx b/basic/inc/sb.hxx index 6a3c2f7e06a3..cd028f7985dc 100644 --- a/basic/inc/sb.hxx +++ b/basic/inc/sb.hxx @@ -28,6 +28,9 @@ #include "sbprop.hxx" +// create object from user-type (+StringID+StringID) +SbxObject* createUserTypeImpl( const OUString& rClassName ); + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index b8cc7cfb2255..09486cf594da 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -393,7 +393,6 @@ private: public: BasicLibInfo(); - bool IsReference() const { return bReference; } bool& IsReference() { return bReference; } bool IsExtern() const { return ! aStorageName.equalsAscii(szImbedded); } @@ -424,7 +423,6 @@ public: const OUString& GetPassword() const { return aPassword; } void SetPassword( const OUString& rNewPassword ) { aPassword = rNewPassword; } - bool IsPasswordVerified() const { return bPasswordVerified; } void SetPasswordVerified() { bPasswordVerified = true; } static BasicLibInfo* Create( SotStorageStream& rSStream ); diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index ff1d60cb37c1..16fc4bd351ec 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -56,7 +56,7 @@ #include #include #include - +#include #include using namespace ::com::sun::star; diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx index 41781f7a5d34..913237ca2439 100644 --- a/basic/source/classes/propacc.cxx +++ b/basic/source/classes/propacc.cxx @@ -34,20 +34,10 @@ using namespace cppu; struct SbCompare_UString_PropertyValue_Impl { - bool operator() (const OUString& lhs, PropertyValue const & rhs) - { - return lhs.compareTo(rhs.Name) < 0; - } bool operator() (PropertyValue const & lhs, const OUString& rhs) { return lhs.Name.compareTo(rhs) < 0; } -#ifdef DBG_UTIL - bool operator() (PropertyValue const & lhs, const PropertyValue& rhs) - { - return lhs.Name.compareTo(rhs.Name) < 0; - } -#endif }; extern "C" int SAL_CALL SbCompare_UString_Property_Impl( const void *arg1, const void *arg2 ) diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 526a01337c97..0acfc92a7c1d 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -459,8 +459,6 @@ SbxBase* SbOLEFactory::Create( sal_uInt16, sal_uInt32 ) return NULL; } -SbUnoObject* createOLEObject_Impl( const OUString& aType ); // sbunoobj.cxx - SbxObject* SbOLEFactory::CreateObject( const OUString& rClassName ) { SbxObject* pRet = createOLEObject_Impl( rClassName ); diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 9a0d83ccb824..74f5fec8ec69 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -70,6 +70,8 @@ #include #include +#include + using com::sun::star::uno::Reference; using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -468,8 +470,6 @@ struct ObjectItem { SbxObjectRef m_xNativeObj; - ObjectItem( void ) - {} ObjectItem( SbxObject* pNativeObj ) : m_xNativeObj( pNativeObj ) {} diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 616b1a1bbc30..668c2529c787 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -20,6 +20,7 @@ #include +#include #include #include #include @@ -455,10 +456,10 @@ bool getDefaultVBAMode( StarBASIC* pb ) return xVBACompat.is() && xVBACompat->getVBACompatibilityMode(); } -class AsyncQuitHandler +class AsyncQuitHandler: private boost::noncopyable { AsyncQuitHandler() {} - AsyncQuitHandler( const AsyncQuitHandler&); + public: static AsyncQuitHandler& instance() { @@ -2265,7 +2266,8 @@ typedef ::cppu::WeakImplHelper3< awt::XWindowListener, document::XEventListener > FormObjEventListener_BASE; -class FormObjEventListenerImpl : public FormObjEventListener_BASE +class FormObjEventListenerImpl: + public FormObjEventListener_BASE, private boost::noncopyable { SbUserFormModule* mpUserForm; uno::Reference< lang::XComponent > mxComponent; @@ -2275,9 +2277,6 @@ class FormObjEventListenerImpl : public FormObjEventListener_BASE bool mbActivated; bool mbShowing; - FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined - FormObjEventListenerImpl& operator=(const FormObjEventListenerImpl&); // not defined - public: FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent, const uno::Reference< frame::XModel >& xModel ) : mpUserForm( pUserForm ), mxComponent( xComponent), mxModel( xModel ), diff --git a/basic/source/inc/eventatt.hxx b/basic/source/inc/eventatt.hxx new file mode 100644 index 000000000000..881290814787 --- /dev/null +++ b/basic/source/inc/eventatt.hxx @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_BASIC_SOURCE_INC_EVENTATT_HXX +#define INCLUDED_BASIC_SOURCE_INC_EVENTATT_HXX + +#include + +class SbxArray; +class StarBASIC; + +// Instantiate "com.sun.star.awt.UnoControlDialog" on basis +// of a DialogLibrary entry: Convert from XML-ByteSequence +// and attach events. +void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ); + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/inc/rtlproto.hxx b/basic/source/inc/rtlproto.hxx new file mode 100644 index 000000000000..0fab192ae196 --- /dev/null +++ b/basic/source/inc/rtlproto.hxx @@ -0,0 +1,375 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_BASIC_SOURCE_RUNTIME_RTLPROTO_HXX +#define INCLUDED_BASIC_SOURCE_RUNTIME_RTLPROTO_HXX + +#include +#include "sbtrace.hxx" + +#define RTLFUNC( name ) void SbRtl_##name( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) +#define RTLNAME( name ) &SbRtl_##name + +typedef void( *RtlCall ) ( StarBASIC* p, SbxArray& rArgs, bool bWrite ); + +// Properties + +extern RTLFUNC(Date); +extern RTLFUNC(Err); +extern RTLFUNC(Erl); +extern RTLFUNC(False); +extern RTLFUNC(Empty); +extern RTLFUNC(Nothing); +extern RTLFUNC(Null); +extern RTLFUNC(True); + +extern RTLFUNC(ATTR_NORMAL); +extern RTLFUNC(ATTR_READONLY); +extern RTLFUNC(ATTR_HIDDEN); +extern RTLFUNC(ATTR_SYSTEM); +extern RTLFUNC(ATTR_VOLUME); +extern RTLFUNC(ATTR_DIRECTORY); +extern RTLFUNC(ATTR_ARCHIVE); + +extern RTLFUNC(V_EMPTY); +extern RTLFUNC(V_NULL); +extern RTLFUNC(V_INTEGER); +extern RTLFUNC(V_LONG); +extern RTLFUNC(V_SINGLE); +extern RTLFUNC(V_DOUBLE); +extern RTLFUNC(V_CURRENCY); +extern RTLFUNC(V_DATE); +extern RTLFUNC(V_STRING); + +extern RTLFUNC(MB_OK); +extern RTLFUNC(MB_OKCANCEL); +extern RTLFUNC(MB_ABORTRETRYIGNORE); +extern RTLFUNC(MB_YESNOCANCEL); +extern RTLFUNC(MB_YESNO); +extern RTLFUNC(MB_RETRYCANCEL); +extern RTLFUNC(MB_ICONSTOP); +extern RTLFUNC(MB_ICONQUESTION); +extern RTLFUNC(MB_ICONEXCLAMATION); +extern RTLFUNC(MB_ICONINFORMATION); +extern RTLFUNC(MB_DEFBUTTON1); +extern RTLFUNC(MB_DEFBUTTON2); +extern RTLFUNC(MB_DEFBUTTON3); +extern RTLFUNC(MB_APPLMODAL); +extern RTLFUNC(MB_SYSTEMMODAL); + +extern RTLFUNC(IDOK); +extern RTLFUNC(IDCANCEL); +extern RTLFUNC(IDABORT); +extern RTLFUNC(IDRETRY); +extern RTLFUNC(IDYES); +extern RTLFUNC(IDNO); + +extern RTLFUNC(CF_TEXT); +extern RTLFUNC(CF_BITMAP); +extern RTLFUNC(CF_METAFILEPICT); + +extern RTLFUNC(PI); + +extern RTLFUNC(SET_OFF); +extern RTLFUNC(SET_ON); +extern RTLFUNC(TOGGLE); + +extern RTLFUNC(TYP_AUTHORFLD); +extern RTLFUNC(TYP_CHAPTERFLD); +extern RTLFUNC(TYP_CONDTXTFLD); +extern RTLFUNC(TYP_DATEFLD); +extern RTLFUNC(TYP_DBFLD); +extern RTLFUNC(TYP_DBNAMEFLD); +extern RTLFUNC(TYP_DBNEXTSETFLD); +extern RTLFUNC(TYP_DBNUMSETFLD); +extern RTLFUNC(TYP_DBSETNUMBERFLD); +extern RTLFUNC(TYP_DDEFLD); +extern RTLFUNC(TYP_DOCINFOFLD); +extern RTLFUNC(TYP_DOCSTATFLD); +extern RTLFUNC(TYP_EXTUSERFLD); +extern RTLFUNC(TYP_FILENAMEFLD); +extern RTLFUNC(TYP_FIXDATEFLD); +extern RTLFUNC(TYP_FIXTIMEFLD); +extern RTLFUNC(TYP_FORMELFLD); +extern RTLFUNC(TYP_GETFLD); +extern RTLFUNC(TYP_GETREFFLD); +extern RTLFUNC(TYP_HIDDENPARAFLD); +extern RTLFUNC(TYP_HIDDENTXTFLD); +extern RTLFUNC(TYP_INPUTFLD); +extern RTLFUNC(TYP_MACROFLD); +extern RTLFUNC(TYP_NEXTPAGEFLD); +extern RTLFUNC(TYP_PAGENUMBERFLD); +extern RTLFUNC(TYP_POSTITFLD); +extern RTLFUNC(TYP_PREVPAGEFLD); +extern RTLFUNC(TYP_SEQFLD); +extern RTLFUNC(TYP_SETFLD); +extern RTLFUNC(TYP_SETINPFLD); +extern RTLFUNC(TYP_SETREFFLD); +extern RTLFUNC(TYP_TEMPLNAMEFLD); +extern RTLFUNC(TYP_TIMEFLD); +extern RTLFUNC(TYP_USERFLD); +extern RTLFUNC(TYP_USRINPFLD); +extern RTLFUNC(TYP_SETREFPAGEFLD); +extern RTLFUNC(TYP_GETREFPAGEFLD); +extern RTLFUNC(TYP_INTERNETFLD); +extern RTLFUNC(TYP_JUMPEDITFLD); + +extern RTLFUNC(FRAMEANCHORPAGE); +extern RTLFUNC(FRAMEANCHORPARA); +extern RTLFUNC(FRAMEANCHORCHAR); + +extern RTLFUNC(CLEAR_ALLTABS); +extern RTLFUNC(CLEAR_TAB); +extern RTLFUNC(SET_TAB); + +extern RTLFUNC(LINEPROP); +extern RTLFUNC(LINE_1); +extern RTLFUNC(LINE_15); +extern RTLFUNC(LINE_2); + +// Methoden + +extern RTLFUNC(CreateObject); +extern RTLFUNC(Error); +extern RTLFUNC(Sin); +extern RTLFUNC(Abs); +extern RTLFUNC(Asc); +extern RTLFUNC(Atn); +extern RTLFUNC(Chr); +extern RTLFUNC(ChrW); +extern RTLFUNC(Cos); +extern RTLFUNC(CurDir); +extern RTLFUNC(ChDir); // JSM +extern RTLFUNC(ChDrive); // JSM +extern RTLFUNC(FileCopy); // JSM +extern RTLFUNC(Kill); // JSM +extern RTLFUNC(MkDir); // JSM +extern RTLFUNC(RmDir); // JSM +extern RTLFUNC(SendKeys); // JSM +extern RTLFUNC(DDB); +extern RTLFUNC(DimArray); +extern RTLFUNC(Dir); +extern RTLFUNC(DoEvents); +extern RTLFUNC(Exp); +extern RTLFUNC(FileLen); +extern RTLFUNC(Fix); +extern RTLFUNC(FV); +extern RTLFUNC(Hex); +extern RTLFUNC(Input); +extern RTLFUNC(InStr); +extern RTLFUNC(InStrRev); +extern RTLFUNC(Int); +extern RTLFUNC(IPmt); +extern RTLFUNC(IRR); +extern RTLFUNC(Join); +extern RTLFUNC(LCase); +extern RTLFUNC(Left); +extern RTLFUNC(Log); +extern RTLFUNC(LTrim); +extern RTLFUNC(Mid); +extern RTLFUNC(MIRR); +extern RTLFUNC(NPer); +extern RTLFUNC(NPV); +extern RTLFUNC(Oct); +extern RTLFUNC(Pmt); +extern RTLFUNC(PPmt); +extern RTLFUNC(PV); +extern RTLFUNC(Rate); +extern RTLFUNC(Replace); +extern RTLFUNC(Right); +extern RTLFUNC(RTrim); +extern RTLFUNC(RTL); +extern RTLFUNC(Sgn); +extern RTLFUNC(SLN); +extern RTLFUNC(Space); +extern RTLFUNC(Split); +extern RTLFUNC(Sqr); +extern RTLFUNC(Str); +extern RTLFUNC(StrComp); +extern RTLFUNC(String); +extern RTLFUNC(StrReverse); +extern RTLFUNC(SYD); +extern RTLFUNC(Tan); +extern RTLFUNC(UCase); +extern RTLFUNC(Val); +extern RTLFUNC(Len); +extern RTLFUNC(Spc); +extern RTLFUNC(DateSerial); +extern RTLFUNC(TimeSerial); +extern RTLFUNC(DateValue); +extern RTLFUNC(TimeValue); +extern RTLFUNC(Day); +extern RTLFUNC(Hour); +extern RTLFUNC(Minute); +extern RTLFUNC(Month); +extern RTLFUNC(MonthName); +extern RTLFUNC(Now); +extern RTLFUNC(Second); +extern RTLFUNC(Time); +extern RTLFUNC(Timer); +extern RTLFUNC(Weekday); +extern RTLFUNC(WeekdayName); +extern RTLFUNC(Year); +extern RTLFUNC(Date); +extern RTLFUNC(InputBox); +extern RTLFUNC(Me); +extern RTLFUNC(MsgBox); +extern RTLFUNC(IsArray); +extern RTLFUNC(IsDate); +extern RTLFUNC(IsEmpty); +extern RTLFUNC(IsError); +extern RTLFUNC(IsNull); +extern RTLFUNC(IsNumeric); +extern RTLFUNC(IsObject); +extern RTLFUNC(IsUnoStruct); + +extern RTLFUNC(FileDateTime); +extern RTLFUNC(Format); +extern RTLFUNC(GetAttr); +extern RTLFUNC(Randomize); // JSM +extern RTLFUNC(Round); +extern RTLFUNC(Frac); +extern RTLFUNC(Rnd); +extern RTLFUNC(Shell); +extern RTLFUNC(VarType); +extern RTLFUNC(TypeName); +extern RTLFUNC(TypeLen); + +extern RTLFUNC(EOF); +extern RTLFUNC(FileAttr); +extern RTLFUNC(Loc); +extern RTLFUNC(Lof); +extern RTLFUNC(Seek); +extern RTLFUNC(SetAttr); // JSM +extern RTLFUNC(Reset); // JSM + +extern RTLFUNC(DDEInitiate); +extern RTLFUNC(DDETerminate); +extern RTLFUNC(DDETerminateAll); +extern RTLFUNC(DDERequest); +extern RTLFUNC(DDEExecute); +extern RTLFUNC(DDEPoke); + +extern RTLFUNC(FreeFile); +extern RTLFUNC(IsMissing); +extern RTLFUNC(LBound); +extern RTLFUNC(UBound); +extern RTLFUNC(RGB); +extern RTLFUNC(QBColor); +extern RTLFUNC(StrConv); + +extern RTLFUNC(Beep); + +extern RTLFUNC(Load); +extern RTLFUNC(Unload); +extern RTLFUNC(LoadPicture); +extern RTLFUNC(SavePicture); + +extern RTLFUNC(CallByName); +extern RTLFUNC(CBool); // JSM +extern RTLFUNC(CByte); // JSM +extern RTLFUNC(CCur); // JSM +extern RTLFUNC(CDate); // JSM +extern RTLFUNC(CDbl); // JSM +extern RTLFUNC(CInt); // JSM +extern RTLFUNC(CLng); // JSM +extern RTLFUNC(CSng); // JSM +extern RTLFUNC(CStr); // JSM +extern RTLFUNC(CVar); // JSM +extern RTLFUNC(CVErr); // JSM + +extern RTLFUNC(Iif); // JSM + +extern RTLFUNC(DumpAllObjects); + +extern RTLFUNC(GetSystemType); +extern RTLFUNC(GetGUIType); +extern RTLFUNC(Red); +extern RTLFUNC(Green); +extern RTLFUNC(Blue); + +extern RTLFUNC(Switch); +extern RTLFUNC(Wait); +//i#64882# add new WaitUntil +extern RTLFUNC(WaitUntil); +extern RTLFUNC(FuncCaller); + +extern RTLFUNC(GetGUIVersion); +extern RTLFUNC(Choose); +extern RTLFUNC(Trim); + +extern RTLFUNC(DateAdd); +extern RTLFUNC(DateDiff); +extern RTLFUNC(DatePart); +extern RTLFUNC(FormatDateTime); +extern RTLFUNC(GetSolarVersion); +extern RTLFUNC(TwipsPerPixelX); +extern RTLFUNC(TwipsPerPixelY); +extern RTLFUNC(FreeLibrary); +extern RTLFUNC(Array); +extern RTLFUNC(FindObject); +extern RTLFUNC(FindPropertyObject); +extern RTLFUNC(EnableReschedule); + +extern RTLFUNC(Put); +extern RTLFUNC(Get); +extern RTLFUNC(Environ); +extern RTLFUNC(GetDialogZoomFactorX); +extern RTLFUNC(GetDialogZoomFactorY); +extern RTLFUNC(GetSystemTicks); +extern RTLFUNC(GetPathSeparator); +extern RTLFUNC(ResolvePath); +extern RTLFUNC(CreateUnoStruct); +extern RTLFUNC(CreateUnoService); +extern RTLFUNC(CreateUnoServiceWithArguments); +extern RTLFUNC(CreateUnoValue); +extern RTLFUNC(GetProcessServiceManager); +extern RTLFUNC(GetDefaultContext); +extern RTLFUNC(CreatePropertySet); +extern RTLFUNC(CreateUnoListener); +extern RTLFUNC(HasUnoInterfaces); +extern RTLFUNC(EqualUnoObjects); +extern RTLFUNC(CreateUnoDialog); +extern RTLFUNC(GlobalScope); +extern RTLFUNC(FileExists); +extern RTLFUNC(ConvertToUrl); +extern RTLFUNC(ConvertFromUrl); +extern RTLFUNC(CDateToUnoDate); +extern RTLFUNC(CDateFromUnoDate); +extern RTLFUNC(CDateToUnoTime); +extern RTLFUNC(CDateFromUnoTime); +extern RTLFUNC(CDateToUnoDateTime); +extern RTLFUNC(CDateFromUnoDateTime); +extern RTLFUNC(CDateToIso); +extern RTLFUNC(CDateFromIso); +extern RTLFUNC(CompatibilityMode); +extern RTLFUNC(CDec); + +extern RTLFUNC(Partition); // Fong + +#ifdef DBG_TRACE_BASIC +extern RTLFUNC(TraceCommand); +#endif + +extern double Now_Impl(); +extern void Wait_Impl( bool bDurationBased, SbxArray& rPar ); + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index fac4613d1fb0..cbbe3ff95c60 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -460,6 +460,8 @@ void implStepRenameUCB( const OUString& aSource, const OUString& aDest ); void implStepRenameOSL( const OUString& aSource, const OUString& aDest ); bool IsBaseIndexOne(); +void removeDimAsNewRecoverItem( SbxVariable* pVar ); + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index bb0eade36bba..b805ec751b40 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -420,6 +420,13 @@ SbxVariable* getDefaultProp( SbxVariable* pRef ); bool checkUnoObjectType( SbUnoObject* refVal, const OUString& aClass ); +SbUnoObject* createOLEObject_Impl( const OUString& aType ); + +// #55226 ship additional information +bool handleToStringForCOMObjects( SbxObject* pObj, SbxValue* pVal ); + +void registerComListenerVariableForBasic( SbxVariable* pVar, StarBASIC* pBasic ); + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 6d36037dae38..d9b2a298b60a 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -46,7 +46,7 @@ #include "sbunoobj.hxx" #include "propacc.hxx" #include - +#include #include #include @@ -1607,11 +1607,6 @@ RTLFUNC(EqualUnoObjects) RTL_Impl_EqualUnoObjects( pBasic, rPar, bWrite ); } -// Instantiate "com.sun.star.awt.UnoControlDialog" on basis -// of a DialogLibrary entry: Convert from XML-ByteSequence -// and attach events. Implemented in classes\eventatt.cxx -void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ); - RTLFUNC(CreateUnoDialog) { (void)pBasic; diff --git a/basic/source/runtime/rtlproto.hxx b/basic/source/runtime/rtlproto.hxx deleted file mode 100644 index 0fab192ae196..000000000000 --- a/basic/source/runtime/rtlproto.hxx +++ /dev/null @@ -1,375 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_BASIC_SOURCE_RUNTIME_RTLPROTO_HXX -#define INCLUDED_BASIC_SOURCE_RUNTIME_RTLPROTO_HXX - -#include -#include "sbtrace.hxx" - -#define RTLFUNC( name ) void SbRtl_##name( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) -#define RTLNAME( name ) &SbRtl_##name - -typedef void( *RtlCall ) ( StarBASIC* p, SbxArray& rArgs, bool bWrite ); - -// Properties - -extern RTLFUNC(Date); -extern RTLFUNC(Err); -extern RTLFUNC(Erl); -extern RTLFUNC(False); -extern RTLFUNC(Empty); -extern RTLFUNC(Nothing); -extern RTLFUNC(Null); -extern RTLFUNC(True); - -extern RTLFUNC(ATTR_NORMAL); -extern RTLFUNC(ATTR_READONLY); -extern RTLFUNC(ATTR_HIDDEN); -extern RTLFUNC(ATTR_SYSTEM); -extern RTLFUNC(ATTR_VOLUME); -extern RTLFUNC(ATTR_DIRECTORY); -extern RTLFUNC(ATTR_ARCHIVE); - -extern RTLFUNC(V_EMPTY); -extern RTLFUNC(V_NULL); -extern RTLFUNC(V_INTEGER); -extern RTLFUNC(V_LONG); -extern RTLFUNC(V_SINGLE); -extern RTLFUNC(V_DOUBLE); -extern RTLFUNC(V_CURRENCY); -extern RTLFUNC(V_DATE); -extern RTLFUNC(V_STRING); - -extern RTLFUNC(MB_OK); -extern RTLFUNC(MB_OKCANCEL); -extern RTLFUNC(MB_ABORTRETRYIGNORE); -extern RTLFUNC(MB_YESNOCANCEL); -extern RTLFUNC(MB_YESNO); -extern RTLFUNC(MB_RETRYCANCEL); -extern RTLFUNC(MB_ICONSTOP); -extern RTLFUNC(MB_ICONQUESTION); -extern RTLFUNC(MB_ICONEXCLAMATION); -extern RTLFUNC(MB_ICONINFORMATION); -extern RTLFUNC(MB_DEFBUTTON1); -extern RTLFUNC(MB_DEFBUTTON2); -extern RTLFUNC(MB_DEFBUTTON3); -extern RTLFUNC(MB_APPLMODAL); -extern RTLFUNC(MB_SYSTEMMODAL); - -extern RTLFUNC(IDOK); -extern RTLFUNC(IDCANCEL); -extern RTLFUNC(IDABORT); -extern RTLFUNC(IDRETRY); -extern RTLFUNC(IDYES); -extern RTLFUNC(IDNO); - -extern RTLFUNC(CF_TEXT); -extern RTLFUNC(CF_BITMAP); -extern RTLFUNC(CF_METAFILEPICT); - -extern RTLFUNC(PI); - -extern RTLFUNC(SET_OFF); -extern RTLFUNC(SET_ON); -extern RTLFUNC(TOGGLE); - -extern RTLFUNC(TYP_AUTHORFLD); -extern RTLFUNC(TYP_CHAPTERFLD); -extern RTLFUNC(TYP_CONDTXTFLD); -extern RTLFUNC(TYP_DATEFLD); -extern RTLFUNC(TYP_DBFLD); -extern RTLFUNC(TYP_DBNAMEFLD); -extern RTLFUNC(TYP_DBNEXTSETFLD); -extern RTLFUNC(TYP_DBNUMSETFLD); -extern RTLFUNC(TYP_DBSETNUMBERFLD); -extern RTLFUNC(TYP_DDEFLD); -extern RTLFUNC(TYP_DOCINFOFLD); -extern RTLFUNC(TYP_DOCSTATFLD); -extern RTLFUNC(TYP_EXTUSERFLD); -extern RTLFUNC(TYP_FILENAMEFLD); -extern RTLFUNC(TYP_FIXDATEFLD); -extern RTLFUNC(TYP_FIXTIMEFLD); -extern RTLFUNC(TYP_FORMELFLD); -extern RTLFUNC(TYP_GETFLD); -extern RTLFUNC(TYP_GETREFFLD); -extern RTLFUNC(TYP_HIDDENPARAFLD); -extern RTLFUNC(TYP_HIDDENTXTFLD); -extern RTLFUNC(TYP_INPUTFLD); -extern RTLFUNC(TYP_MACROFLD); -extern RTLFUNC(TYP_NEXTPAGEFLD); -extern RTLFUNC(TYP_PAGENUMBERFLD); -extern RTLFUNC(TYP_POSTITFLD); -extern RTLFUNC(TYP_PREVPAGEFLD); -extern RTLFUNC(TYP_SEQFLD); -extern RTLFUNC(TYP_SETFLD); -extern RTLFUNC(TYP_SETINPFLD); -extern RTLFUNC(TYP_SETREFFLD); -extern RTLFUNC(TYP_TEMPLNAMEFLD); -extern RTLFUNC(TYP_TIMEFLD); -extern RTLFUNC(TYP_USERFLD); -extern RTLFUNC(TYP_USRINPFLD); -extern RTLFUNC(TYP_SETREFPAGEFLD); -extern RTLFUNC(TYP_GETREFPAGEFLD); -extern RTLFUNC(TYP_INTERNETFLD); -extern RTLFUNC(TYP_JUMPEDITFLD); - -extern RTLFUNC(FRAMEANCHORPAGE); -extern RTLFUNC(FRAMEANCHORPARA); -extern RTLFUNC(FRAMEANCHORCHAR); - -extern RTLFUNC(CLEAR_ALLTABS); -extern RTLFUNC(CLEAR_TAB); -extern RTLFUNC(SET_TAB); - -extern RTLFUNC(LINEPROP); -extern RTLFUNC(LINE_1); -extern RTLFUNC(LINE_15); -extern RTLFUNC(LINE_2); - -// Methoden - -extern RTLFUNC(CreateObject); -extern RTLFUNC(Error); -extern RTLFUNC(Sin); -extern RTLFUNC(Abs); -extern RTLFUNC(Asc); -extern RTLFUNC(Atn); -extern RTLFUNC(Chr); -extern RTLFUNC(ChrW); -extern RTLFUNC(Cos); -extern RTLFUNC(CurDir); -extern RTLFUNC(ChDir); // JSM -extern RTLFUNC(ChDrive); // JSM -extern RTLFUNC(FileCopy); // JSM -extern RTLFUNC(Kill); // JSM -extern RTLFUNC(MkDir); // JSM -extern RTLFUNC(RmDir); // JSM -extern RTLFUNC(SendKeys); // JSM -extern RTLFUNC(DDB); -extern RTLFUNC(DimArray); -extern RTLFUNC(Dir); -extern RTLFUNC(DoEvents); -extern RTLFUNC(Exp); -extern RTLFUNC(FileLen); -extern RTLFUNC(Fix); -extern RTLFUNC(FV); -extern RTLFUNC(Hex); -extern RTLFUNC(Input); -extern RTLFUNC(InStr); -extern RTLFUNC(InStrRev); -extern RTLFUNC(Int); -extern RTLFUNC(IPmt); -extern RTLFUNC(IRR); -extern RTLFUNC(Join); -extern RTLFUNC(LCase); -extern RTLFUNC(Left); -extern RTLFUNC(Log); -extern RTLFUNC(LTrim); -extern RTLFUNC(Mid); -extern RTLFUNC(MIRR); -extern RTLFUNC(NPer); -extern RTLFUNC(NPV); -extern RTLFUNC(Oct); -extern RTLFUNC(Pmt); -extern RTLFUNC(PPmt); -extern RTLFUNC(PV); -extern RTLFUNC(Rate); -extern RTLFUNC(Replace); -extern RTLFUNC(Right); -extern RTLFUNC(RTrim); -extern RTLFUNC(RTL); -extern RTLFUNC(Sgn); -extern RTLFUNC(SLN); -extern RTLFUNC(Space); -extern RTLFUNC(Split); -extern RTLFUNC(Sqr); -extern RTLFUNC(Str); -extern RTLFUNC(StrComp); -extern RTLFUNC(String); -extern RTLFUNC(StrReverse); -extern RTLFUNC(SYD); -extern RTLFUNC(Tan); -extern RTLFUNC(UCase); -extern RTLFUNC(Val); -extern RTLFUNC(Len); -extern RTLFUNC(Spc); -extern RTLFUNC(DateSerial); -extern RTLFUNC(TimeSerial); -extern RTLFUNC(DateValue); -extern RTLFUNC(TimeValue); -extern RTLFUNC(Day); -extern RTLFUNC(Hour); -extern RTLFUNC(Minute); -extern RTLFUNC(Month); -extern RTLFUNC(MonthName); -extern RTLFUNC(Now); -extern RTLFUNC(Second); -extern RTLFUNC(Time); -extern RTLFUNC(Timer); -extern RTLFUNC(Weekday); -extern RTLFUNC(WeekdayName); -extern RTLFUNC(Year); -extern RTLFUNC(Date); -extern RTLFUNC(InputBox); -extern RTLFUNC(Me); -extern RTLFUNC(MsgBox); -extern RTLFUNC(IsArray); -extern RTLFUNC(IsDate); -extern RTLFUNC(IsEmpty); -extern RTLFUNC(IsError); -extern RTLFUNC(IsNull); -extern RTLFUNC(IsNumeric); -extern RTLFUNC(IsObject); -extern RTLFUNC(IsUnoStruct); - -extern RTLFUNC(FileDateTime); -extern RTLFUNC(Format); -extern RTLFUNC(GetAttr); -extern RTLFUNC(Randomize); // JSM -extern RTLFUNC(Round); -extern RTLFUNC(Frac); -extern RTLFUNC(Rnd); -extern RTLFUNC(Shell); -extern RTLFUNC(VarType); -extern RTLFUNC(TypeName); -extern RTLFUNC(TypeLen); - -extern RTLFUNC(EOF); -extern RTLFUNC(FileAttr); -extern RTLFUNC(Loc); -extern RTLFUNC(Lof); -extern RTLFUNC(Seek); -extern RTLFUNC(SetAttr); // JSM -extern RTLFUNC(Reset); // JSM - -extern RTLFUNC(DDEInitiate); -extern RTLFUNC(DDETerminate); -extern RTLFUNC(DDETerminateAll); -extern RTLFUNC(DDERequest); -extern RTLFUNC(DDEExecute); -extern RTLFUNC(DDEPoke); - -extern RTLFUNC(FreeFile); -extern RTLFUNC(IsMissing); -extern RTLFUNC(LBound); -extern RTLFUNC(UBound); -extern RTLFUNC(RGB); -extern RTLFUNC(QBColor); -extern RTLFUNC(StrConv); - -extern RTLFUNC(Beep); - -extern RTLFUNC(Load); -extern RTLFUNC(Unload); -extern RTLFUNC(LoadPicture); -extern RTLFUNC(SavePicture); - -extern RTLFUNC(CallByName); -extern RTLFUNC(CBool); // JSM -extern RTLFUNC(CByte); // JSM -extern RTLFUNC(CCur); // JSM -extern RTLFUNC(CDate); // JSM -extern RTLFUNC(CDbl); // JSM -extern RTLFUNC(CInt); // JSM -extern RTLFUNC(CLng); // JSM -extern RTLFUNC(CSng); // JSM -extern RTLFUNC(CStr); // JSM -extern RTLFUNC(CVar); // JSM -extern RTLFUNC(CVErr); // JSM - -extern RTLFUNC(Iif); // JSM - -extern RTLFUNC(DumpAllObjects); - -extern RTLFUNC(GetSystemType); -extern RTLFUNC(GetGUIType); -extern RTLFUNC(Red); -extern RTLFUNC(Green); -extern RTLFUNC(Blue); - -extern RTLFUNC(Switch); -extern RTLFUNC(Wait); -//i#64882# add new WaitUntil -extern RTLFUNC(WaitUntil); -extern RTLFUNC(FuncCaller); - -extern RTLFUNC(GetGUIVersion); -extern RTLFUNC(Choose); -extern RTLFUNC(Trim); - -extern RTLFUNC(DateAdd); -extern RTLFUNC(DateDiff); -extern RTLFUNC(DatePart); -extern RTLFUNC(FormatDateTime); -extern RTLFUNC(GetSolarVersion); -extern RTLFUNC(TwipsPerPixelX); -extern RTLFUNC(TwipsPerPixelY); -extern RTLFUNC(FreeLibrary); -extern RTLFUNC(Array); -extern RTLFUNC(FindObject); -extern RTLFUNC(FindPropertyObject); -extern RTLFUNC(EnableReschedule); - -extern RTLFUNC(Put); -extern RTLFUNC(Get); -extern RTLFUNC(Environ); -extern RTLFUNC(GetDialogZoomFactorX); -extern RTLFUNC(GetDialogZoomFactorY); -extern RTLFUNC(GetSystemTicks); -extern RTLFUNC(GetPathSeparator); -extern RTLFUNC(ResolvePath); -extern RTLFUNC(CreateUnoStruct); -extern RTLFUNC(CreateUnoService); -extern RTLFUNC(CreateUnoServiceWithArguments); -extern RTLFUNC(CreateUnoValue); -extern RTLFUNC(GetProcessServiceManager); -extern RTLFUNC(GetDefaultContext); -extern RTLFUNC(CreatePropertySet); -extern RTLFUNC(CreateUnoListener); -extern RTLFUNC(HasUnoInterfaces); -extern RTLFUNC(EqualUnoObjects); -extern RTLFUNC(CreateUnoDialog); -extern RTLFUNC(GlobalScope); -extern RTLFUNC(FileExists); -extern RTLFUNC(ConvertToUrl); -extern RTLFUNC(ConvertFromUrl); -extern RTLFUNC(CDateToUnoDate); -extern RTLFUNC(CDateFromUnoDate); -extern RTLFUNC(CDateToUnoTime); -extern RTLFUNC(CDateFromUnoTime); -extern RTLFUNC(CDateToUnoDateTime); -extern RTLFUNC(CDateFromUnoDateTime); -extern RTLFUNC(CDateToIso); -extern RTLFUNC(CDateFromIso); -extern RTLFUNC(CompatibilityMode); -extern RTLFUNC(CDec); - -extern RTLFUNC(Partition); // Fong - -#ifdef DBG_TRACE_BASIC -extern RTLFUNC(TraceCommand); -#endif - -extern double Now_Impl(); -extern void Wait_Impl( bool bDurationBased, SbxArray& rPar ); - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 261d01f2af45..42e1110b156e 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -63,6 +63,7 @@ #include "opcodes.hxx" #include "runtime.hxx" #include "sb.hrc" +#include "sb.hxx" #include "sbintern.hxx" #include "sbunoobj.hxx" #include @@ -4495,10 +4496,6 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) } } -// create object from user-type (+StringID+StringID) - -SbxObject* createUserTypeImpl( const OUString& rClassName ); // sb.cxx - void SbiRuntime::StepTCREATE( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { OUString aName( pImg->GetString( static_cast( nOp1 ) ) ); diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 8b222e9e086f..4d65e4170698 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -22,6 +22,7 @@ #include #include +#include "sbunoobj.hxx" #include "sbxconv.hxx" #include "runtime.hxx" @@ -232,9 +233,6 @@ SbxValue* SbxValue::TheRealValue() const return TheRealValue( true ); } -// #55226 ship additional information -bool handleToStringForCOMObjects( SbxObject* pObj, SbxValue* pVal ); // sbunoobj.cxx - SbxValue* SbxValue::TheRealValue( bool bObjInObjError ) const { SbxValue* p = (SbxValue*) this; diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index c49ad3914abb..c0de91f74e40 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -21,8 +21,10 @@ #include #include +#include "runtime.hxx" #include "sbxres.hxx" #include "sbxconv.hxx" +#include "sbunoobj.hxx" #include #include @@ -66,8 +68,6 @@ SbxVariable::SbxVariable() : SbxValue() nHash = 0; } -void registerComListenerVariableForBasic( SbxVariable* pVar, StarBASIC* pBasic ); - SbxVariable::SbxVariable( const SbxVariable& r ) : SvRefBase( r ), SbxValue( r ), @@ -110,8 +110,6 @@ SbxVariable::SbxVariable( SbxDataType t, void* p ) : SbxValue( t, p ) nHash = 0; } -void removeDimAsNewRecoverItem( SbxVariable* pVar ); - SbxVariable::~SbxVariable() { #ifndef DISABLE_SCRIPTING diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index 15415c251109..a759eea503da 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -33,6 +33,7 @@ #include #include "dlgcont.hxx" #include "sbmodule.hxx" +#include "sbservices.hxx" #include #include #include diff --git a/basic/source/uno/sbservices.cxx b/basic/source/uno/sbservices.cxx index bc4dcb5f1862..e3eafb958ea4 100644 --- a/basic/source/uno/sbservices.cxx +++ b/basic/source/uno/sbservices.cxx @@ -18,16 +18,10 @@ */ #include "sbmodule.hxx" - +#include "sbservices.hxx" namespace basic { - - - - extern void createRegistryInfo_SfxDialogLibraryContainer(); - extern void createRegistryInfo_SfxScriptLibraryContainer(); - static void initializeModule() { static bool bInitialized( false ); diff --git a/basic/source/uno/sbservices.hxx b/basic/source/uno/sbservices.hxx new file mode 100644 index 000000000000..a344b27f734a --- /dev/null +++ b/basic/source/uno/sbservices.hxx @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_BASIC_SOURCE_UNO_SBSERVICES_HXX +#define INCLUDED_BASIC_SOURCE_UNO_SBSERVICES_HXX + +#include + +namespace basic { + +void createRegistryInfo_SfxDialogLibraryContainer(); + +void createRegistryInfo_SfxScriptLibraryContainer(); + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index c7117ef41824..486eb96652c1 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -19,6 +19,7 @@ #include "scriptcont.hxx" #include "sbmodule.hxx" +#include "sbservices.hxx" #include #include #include -- cgit