From c857dff7fc4b180c1d405ea5584e06c0581427ae Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Tue, 24 Jan 2012 15:48:30 -0600 Subject: switch to include-based build rather than sourced-based build --- oovbaapi/Makefile | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) (limited to 'oovbaapi') diff --git a/oovbaapi/Makefile b/oovbaapi/Makefile index 7bbbe6c703e6..ccb1c85a04da 100644 --- a/oovbaapi/Makefile +++ b/oovbaapi/Makefile @@ -1,40 +1,7 @@ # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -gb_PARTIALBUILD := T -ifeq ($(strip $(SOLARENV)),) -include $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/../solenv/gbuild/source_and_rerun.mk -else +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) -gb_SourceEnvAndRecurse_STAGE=gbuild -include $(SOLARENV)/gbuild/gbuild.mk +include $(module_directory)/../solenv/gbuild/partial_build.mk -$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) - -endif # vim: set noet sw=4 ts=4: -- cgit v1.2.3 From 64e1ae0f5581bcf8eafecc6c22bcdcb76ac7ba5d Mon Sep 17 00:00:00 2001 From: Josh Heidenreich Date: Tue, 7 Feb 2012 14:17:29 +1030 Subject: Added READMEs for modules which used to be in libs-core --- avmedia/README | 4 ++++ basic/README | 4 ++++ configmgr/README | 1 + connectivity/README | 1 + desktop/README | 1 + editeng/README | 6 ++++++ eventattacher/README | 1 + fileaccess/README | 1 + formula/README | 3 +++ fpicker/README | 1 + framework/README | 7 +++++++ idl/README | 3 +++ linguistic/README | 1 + officecfg/README | 4 ++++ oovbaapi/README | 5 +++++ readlicense_oo/README | 1 + scripting/README | 15 ++++++++------- sfx2/README | 6 ++++-- shell/README | 1 + svx/README | 9 +++++++++ sysui/README | 1 + ucb/README | 1 + uui/README | 1 + xmlhelp/README | 1 + xmloff/README | 1 + xmlscript/README | 1 + 26 files changed, 72 insertions(+), 9 deletions(-) create mode 100644 avmedia/README create mode 100644 basic/README create mode 100644 configmgr/README create mode 100644 connectivity/README create mode 100644 desktop/README create mode 100644 editeng/README create mode 100644 eventattacher/README create mode 100644 fileaccess/README create mode 100644 formula/README create mode 100644 fpicker/README create mode 100644 framework/README create mode 100644 idl/README create mode 100644 linguistic/README create mode 100644 officecfg/README create mode 100644 oovbaapi/README create mode 100644 readlicense_oo/README create mode 100644 shell/README create mode 100644 svx/README create mode 100644 sysui/README create mode 100644 ucb/README create mode 100644 uui/README create mode 100644 xmlhelp/README create mode 100644 xmloff/README create mode 100644 xmlscript/README (limited to 'oovbaapi') diff --git a/avmedia/README b/avmedia/README new file mode 100644 index 000000000000..b33f70c9d8f1 --- /dev/null +++ b/avmedia/README @@ -0,0 +1,4 @@ +Audio/Video media implementation. + +Needs a Java Media Framework (JMF). +Not currently usable for streams but only for URIs in the file system. diff --git a/basic/README b/basic/README new file mode 100644 index 000000000000..bed2870e83e8 --- /dev/null +++ b/basic/README @@ -0,0 +1,4 @@ +Contains the StarBASIC Interpreter and in addition the GUI of VCLTestTool. + +See also: +[http://wiki.services.openoffice.org/wiki/Basic] diff --git a/configmgr/README b/configmgr/README new file mode 100644 index 000000000000..e63f37c21caa --- /dev/null +++ b/configmgr/README @@ -0,0 +1 @@ +The configuration database - UNO services and some tools. diff --git a/connectivity/README b/connectivity/README new file mode 100644 index 000000000000..852d4f8c4fd6 --- /dev/null +++ b/connectivity/README @@ -0,0 +1 @@ +Contains database pieces, drivers, etc. diff --git a/desktop/README b/desktop/README new file mode 100644 index 000000000000..75a189aca354 --- /dev/null +++ b/desktop/README @@ -0,0 +1 @@ +What used to be the desktop in StarOffice 5 - now the binary. diff --git a/editeng/README b/editeng/README new file mode 100644 index 000000000000..d2a1a1383506 --- /dev/null +++ b/editeng/README @@ -0,0 +1,6 @@ +Edit engine. + +In OO.o build DEV300m72 this module was split off from svx but it +has no dependencies on [[svx]] (nor on [[sfx2]]) while in turn svx depends on editeng +Read more in the mailing list post: +[http://www.mail-archive.com/dev@openoffice.org/msg13237.html] diff --git a/eventattacher/README b/eventattacher/README new file mode 100644 index 000000000000..ecfdcf75ace5 --- /dev/null +++ b/eventattacher/README @@ -0,0 +1 @@ +How [[basic]] handles events diff --git a/fileaccess/README b/fileaccess/README new file mode 100644 index 000000000000..113465afdcb9 --- /dev/null +++ b/fileaccess/README @@ -0,0 +1 @@ +Implements XSimpleFileAccess interface that makes the UCB interfaces actually usable (via UNO) and more intuitive. diff --git a/formula/README b/formula/README new file mode 100644 index 000000000000..da0d528c1cad --- /dev/null +++ b/formula/README @@ -0,0 +1,3 @@ +Contains parts of the formula parser used outside Calc code. + +Has been pulled out from Calc's formula parser code. diff --git a/fpicker/README b/fpicker/README new file mode 100644 index 000000000000..8c0948724e96 --- /dev/null +++ b/fpicker/README @@ -0,0 +1 @@ +Native file pickers for Unix and Windows (file open dialog) GTK+, KDE, Windows. diff --git a/framework/README b/framework/README new file mode 100644 index 000000000000..200c2afce49b --- /dev/null +++ b/framework/README @@ -0,0 +1,7 @@ +UI rewrite, toolbars, menus, UNO stuff, including accelerators and interaction, etc. + +See also: +[http://wiki.services.openoffice.org/wiki/Framework] + +Notable files: +[git:framework/source/services/backingwindow.hxx] Layout of the Startcenter buttons and the corresponding event handler. diff --git a/idl/README b/idl/README new file mode 100644 index 000000000000..38d46bd9e28b --- /dev/null +++ b/idl/README @@ -0,0 +1,3 @@ +SvIDL Compiler. + +(CH: Where is the difference to [[idlc]]???) diff --git a/linguistic/README b/linguistic/README new file mode 100644 index 000000000000..39f447ce1121 --- /dev/null +++ b/linguistic/README @@ -0,0 +1 @@ +Handles registered modules for spellchecker, hyphenator and thesaurus. diff --git a/officecfg/README b/officecfg/README new file mode 100644 index 000000000000..3a39d28eec4c --- /dev/null +++ b/officecfg/README @@ -0,0 +1,4 @@ +The schema and default settings for the OpenOffice.org configuration database. + +See also: +[[configmgr]] diff --git a/oovbaapi/README b/oovbaapi/README new file mode 100644 index 000000000000..c9d37eadeb3b --- /dev/null +++ b/oovbaapi/README @@ -0,0 +1,5 @@ +Module for OpenOffice - VisualBasic interoperability. + +See also: +[http://wiki.services.openoffice.org/wiki/VBA] +[http://wiki.services.openoffice.org/wiki/Oovbaapi] diff --git a/readlicense_oo/README b/readlicense_oo/README new file mode 100644 index 000000000000..436a3b79b436 --- /dev/null +++ b/readlicense_oo/README @@ -0,0 +1 @@ +Read the LibreOffice license when starting up. diff --git a/scripting/README b/scripting/README index 686e4ad30f25..0a664ececb92 100755 --- a/scripting/README +++ b/scripting/README @@ -1,9 +1,10 @@ -This module provides the source code for the Scripting Framework. For -more information on the Scripting Framework, see the project web page: -http://framework.openoffice.org/scripting/ +This module provides the source code for the Scripting Framework. -Source Code Structure -===================== +For more information on the Scripting Framework, see the project web page: +[http://framework.openoffice.org/scripting/] + + +== Source Code Structure == The following directories contain the source code currently used by the Scripting Framework: @@ -50,8 +51,8 @@ Classes for performing script IO Example scripts in BeanShell, JavaScript, Java and Python -Deprecated Code -=============== + +== Deprecated Code == - java/org/openoffice/* diff --git a/sfx2/README b/sfx2/README index 1182cc2c8800..948346d37925 100755 --- a/sfx2/README +++ b/sfx2/README @@ -1,4 +1,6 @@ This is the gui code, much of which is now deprecated. -List of documents open would be traceked, -raw C__ code; gutsy core of document management and loading. +List of documents open would be tracked - raw C__ code. +Gutsy core of document management and loading. + +[git:sfx2/source/applappl/sfxhelp.cxx] Start procedure for the online help viewer top level window; handling of help URL creation and dispatch. diff --git a/shell/README b/shell/README new file mode 100644 index 000000000000..e8bf311a2eb6 --- /dev/null +++ b/shell/README @@ -0,0 +1 @@ +System helpers - launching URI, recently used files, system integration, external mailer support, gconf integration etc. diff --git a/svx/README b/svx/README new file mode 100644 index 000000000000..a7fd2e2f833d --- /dev/null +++ b/svx/README @@ -0,0 +1,9 @@ +Contains graphics related helper code. Lots of the draw and impress code is in this shared library. + +xoutdev +this is where a lot of wht work would happen to move to the canvas. + +svdraw +transparent gradient stuff. + +Lots of the draw and impress code is in this shared library. diff --git a/sysui/README b/sysui/README new file mode 100644 index 000000000000..72728d80ff17 --- /dev/null +++ b/sysui/README @@ -0,0 +1 @@ +.desktop files for different distros. diff --git a/ucb/README b/ucb/README new file mode 100644 index 000000000000..d3d1ed003e87 --- /dev/null +++ b/ucb/README @@ -0,0 +1 @@ +Universal Content Broker (has ucp) which do things like convert files to strings in content broker world. diff --git a/uui/README b/uui/README new file mode 100644 index 000000000000..43a582a44bbc --- /dev/null +++ b/uui/README @@ -0,0 +1 @@ +Contains an Interaction Handler for the [[ucb]] and other uses. Works via VCL. diff --git a/xmlhelp/README b/xmlhelp/README new file mode 100644 index 000000000000..b4c1f05107d7 --- /dev/null +++ b/xmlhelp/README @@ -0,0 +1 @@ +Help reader and viewer for online help. diff --git a/xmloff/README b/xmloff/README new file mode 100644 index 000000000000..baf7c366adae --- /dev/null +++ b/xmloff/README @@ -0,0 +1 @@ +Contains common xml import and export filter logic. diff --git a/xmlscript/README b/xmlscript/README new file mode 100644 index 000000000000..24faaa433b63 --- /dev/null +++ b/xmlscript/README @@ -0,0 +1 @@ +XML dialogs. -- cgit v1.2.3 From 75fbed472cd689c8cc0b89e13a97969d77a0ea7c Mon Sep 17 00:00:00 2001 From: Noel Power Date: Mon, 5 Mar 2012 14:54:04 +0000 Subject: vba implementation for Application.OnKey --- filter/inc/filter/msfilter/msvbahelper.hxx | 4 +- filter/source/msfilter/msvbahelper.cxx | 128 ++++++++++++++++++++++ oovbaapi/ooo/vba/XApplicationBase.idl | 2 +- vbahelper/inc/vbahelper/vbaapplicationbase.hxx | 1 + vbahelper/source/vbahelper/vbaapplicationbase.cxx | 49 +++++++++ 5 files changed, 181 insertions(+), 3 deletions(-) (limited to 'oovbaapi') diff --git a/filter/inc/filter/msfilter/msvbahelper.hxx b/filter/inc/filter/msfilter/msvbahelper.hxx index affc8b227346..99b20c152400 100644 --- a/filter/inc/filter/msfilter/msvbahelper.hxx +++ b/filter/inc/filter/msfilter/msvbahelper.hxx @@ -33,8 +33,8 @@ #include #include #include +#include #include "filter/msfilter/msfilterdllapi.h" - namespace ooo { namespace vba { @@ -55,7 +55,7 @@ MSFILTER_DLLPUBLIC ::rtl::OUString getDefaultProjectName( SfxObjectShell* pShell MSFILTER_DLLPUBLIC ::rtl::OUString resolveVBAMacro( SfxObjectShell* pShell, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModuleName, const ::rtl::OUString& rMacroName ); MSFILTER_DLLPUBLIC MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const ::rtl::OUString& rMacroName, bool bSearchGlobalTemplates = false ); MSFILTER_DLLPUBLIC sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArgs, com::sun::star::uno::Any& aRet, const com::sun::star::uno::Any& aCaller ); - +MSFILTER_DLLPUBLIC ::com::sun::star::awt::KeyEvent parseKeyEvent( const ::rtl::OUString& sKey ) throw (::com::sun::star::uno::RuntimeException); // ============================================================================ typedef ::cppu::WeakImplHelper3< diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index 07a40c05092b..fb4fd3d40939 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -42,6 +42,10 @@ #include #include +#include +#include +#include + using namespace ::com::sun::star; namespace ooo { @@ -580,6 +584,130 @@ void SAL_CALL VBAMacroResolver::initialize( const uno::Sequence< uno::Any >& rAr OSL_ENSURE( false, "VBAMacroResolver::resolveScriptURLtoVBAMacro - not implemented" ); throw uno::RuntimeException(); } +bool getModifier( char c, sal_uInt16& mod ) +{ + static const char modifiers[] = "+^%"; + static const sal_uInt16 KEY_MODS[] = {KEY_SHIFT, KEY_MOD1, KEY_MOD2}; + + for ( unsigned int i=0; i MSKeyCodeMap; + +sal_uInt16 parseChar( char c ) throw ( uno::RuntimeException ) +{ + sal_uInt16 nVclKey = 0; + // do we care about locale here for isupper etc. ? probably not + if ( isalpha( c ) ) + nVclKey |= ( toupper( c ) - 'A' ) + KEY_A; + else if ( isdigit( c ) ) + nVclKey |= ( c - '0' ) + KEY_0; + else if ( c == '~' ) // special case + nVclKey = KEY_RETURN; + else // I guess we have a problem ( but not sure if locale specific keys might come into play here ) + throw uno::RuntimeException(); + return nVclKey; +} + +struct KeyCodeEntry +{ + const char* sName; + sal_uInt16 nCode; +}; + +KeyCodeEntry aMSKeyCodesData[] = { + { "BACKSPACE", KEY_BACKSPACE }, + { "BS", KEY_BACKSPACE }, + { "DELETE", KEY_DELETE }, + { "DEL", KEY_DELETE }, + { "DOWN", KEY_DOWN }, + { "UP", KEY_UP }, + { "LEFT", KEY_LEFT }, + { "RIGHT", KEY_RIGHT }, + { "END", KEY_END }, + { "ESCAPE", KEY_ESCAPE }, + { "ESC", KEY_ESCAPE }, + { "HELP", KEY_HELP }, + { "HOME", KEY_HOME }, + { "PGDN", KEY_PAGEDOWN }, + { "PGUP", KEY_PAGEUP }, + { "INSERT", KEY_INSERT }, + { "F1", KEY_F1 }, + { "F2", KEY_F2 }, + { "F3", KEY_F3 }, + { "F4", KEY_F4 }, + { "F5", KEY_F5 }, + { "F6", KEY_F6 }, + { "F7", KEY_F7 }, + { "F8", KEY_F8 }, + { "F9", KEY_F1 }, + { "F10", KEY_F10 }, + { "F11", KEY_F11 }, + { "F12", KEY_F12 }, + { "F13", KEY_F13 }, + { "F14", KEY_F14 }, + { "F15", KEY_F15 }, +}; + +awt::KeyEvent parseKeyEvent( const ::rtl::OUString& Key ) throw ( uno::RuntimeException ) +{ + static MSKeyCodeMap msKeyCodes; + if ( msKeyCodes.empty() ) + { + for ( unsigned int i = 0; i < SAL_N_ELEMENTS( aMSKeyCodesData ); ++i ) + { + msKeyCodes[ rtl::OUString::createFromAscii( aMSKeyCodesData[ i ].sName ) ] = aMSKeyCodesData[ i ].nCode; + } + } + rtl::OUString sKeyCode; + sal_uInt16 nVclKey = 0; + + // parse the modifier if any + for ( int i=0; isecond; + } + } + + awt::KeyEvent aKeyEvent = svt::AcceleratorExecute::st_VCLKey2AWTKey( KeyCode( nVclKey ) ); + return aKeyEvent; +} // ============================================================================ diff --git a/oovbaapi/ooo/vba/XApplicationBase.idl b/oovbaapi/ooo/vba/XApplicationBase.idl index d46eb2446e31..93f39aed3ff7 100644 --- a/oovbaapi/ooo/vba/XApplicationBase.idl +++ b/oovbaapi/ooo/vba/XApplicationBase.idl @@ -47,7 +47,7 @@ interface XApplicationBase [attribute, readonly] any VBE; void Quit(); - + void OnKey( [in] string Key, [in] any Procedure ); any CommandBars( [in] any Index ); any Run([in] string MacroName, [in] /*Optional*/ any varg1, [in] /*Optional*/ any varg2, [in] /*Optional*/ any varg3, [in] /*Optional*/ any varg4, [in] /*Optional*/ any varg5, [in] /*Optional*/ any varg6, [in] /*Optional*/ any varg7, [in] /*Optional*/ any varg8, [in] /*Optional*/ any varg9, [in] /*Optional*/ any varg10, [in] /*Optional*/ any varg11, [in] /*Optional*/ any varg12, [in] /*Optional*/ any varg13, [in] /*Optional*/ any varg14, [in] /*Optional*/ any varg15, [in] /*Optional*/ any varg16, [in] /*Optional*/ any varg17, [in] /*Optional*/ any varg18, [in] /*Optional*/ any varg19, [in] /*Optional*/ any varg20, [in] /*Optional*/ any varg21, [in] /*Optional*/ any varg22, [in] /*Optional*/ any varg23, [in] /*Optional*/ any varg24, [in] /*Optional*/ any varg25, [in] /*Optional*/ any varg26, [in] /*Optional*/ any varg27, [in] /*Optional*/ any varg28, [in] /*Optional*/ any varg29, [in] /*Optional*/ any varg30); void OnTime( [in] any EarliestTime, [in] string Procedure, [in] any LatestTime, [in] any Schedule ); diff --git a/vbahelper/inc/vbahelper/vbaapplicationbase.hxx b/vbahelper/inc/vbahelper/vbaapplicationbase.hxx index 7d21d3ed453b..a27afa5d5b01 100644 --- a/vbahelper/inc/vbahelper/vbaapplicationbase.hxx +++ b/vbahelper/inc/vbahelper/vbaapplicationbase.hxx @@ -58,6 +58,7 @@ public: virtual void SAL_CALL setInteractive( ::sal_Bool bInteractive ) throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException); virtual void SAL_CALL setVisible( ::sal_Bool bVisible ) throw (css::uno::RuntimeException); + virtual void SAL_CALL OnKey( const ::rtl::OUString& Key, const ::com::sun::star::uno::Any& Procedure ) throw (::com::sun::star::uno::RuntimeException); virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getVersion() throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getVBE() throw (css::uno::RuntimeException); diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index 293d6b0eaaf6..f1ec673e8270 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -42,7 +42,10 @@ #include #include #include +#include +#include +#include #include #include #include @@ -277,6 +280,52 @@ void SAL_CALL VbaApplicationBase::setVisible( sal_Bool bVisible ) throw (uno::Ru m_pImpl->mbVisible = bVisible; // dummy implementation } + +void SAL_CALL +VbaApplicationBase::OnKey( const ::rtl::OUString& Key, const uno::Any& Procedure ) throw (uno::RuntimeException) +{ + // parse the Key & modifiers + awt::KeyEvent aKeyEvent = parseKeyEvent( Key ); + rtl::OUString MacroName; + Procedure >>= MacroName; + uno::Reference< frame::XModel > xModel; + SbMethod* pMeth = StarBASIC::GetActiveMethod(); + if ( pMeth ) + { + SbModule* pMod = dynamic_cast< SbModule* >( pMeth->GetParent() ); + if ( pMod ) + xModel = StarBASIC::GetModelFromBasic( pMod ); + } + + if ( !xModel.is() ) + xModel = getCurrentDocument(); + + if ( !MacroName.isEmpty() ) + { + ::rtl::OUString sSeparator(RTL_CONSTASCII_USTRINGPARAM("/")); + ::rtl::OUString sMacroSeparator(RTL_CONSTASCII_USTRINGPARAM("!")); + ::rtl::OUString aMacroName = MacroName.trim(); + if (0 == aMacroName.indexOf('!')) + MacroName = aMacroName.copy(1).trim(); + + MacroResolvedInfo aMacroInfo = resolveVBAMacro( getSfxObjShell( xModel ), aMacroName ); + if( !aMacroInfo.mbFound ) + throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("The procedure doesn't exist") ), uno::Reference< uno::XInterface >() ); + MacroName = aMacroInfo.msResolvedMacro; + } + uno::Reference< ui::XUIConfigurationManagerSupplier > xCfgSupplier(xModel, uno::UNO_QUERY_THROW); + uno::Reference< ui::XUIConfigurationManager > xCfgMgr = xCfgSupplier->getUIConfigurationManager(); + + uno::Reference< ui::XAcceleratorConfiguration > xAcc( xCfgMgr->getShortCutManager(), uno::UNO_QUERY_THROW ); + if ( MacroName.isEmpty() ) + // I believe this should really restore the [application] default. Since + // afaik we don't actually setup application default bindings on import + // we don't even know what the 'default' would be for this key + xAcc->removeKeyEvent( aKeyEvent ); + else + xAcc->setKeyEvent( aKeyEvent, ooo::vba::makeMacroURL( MacroName ) ); +} + uno::Any SAL_CALL VbaApplicationBase::CommandBars( const uno::Any& aIndex ) throw (uno::RuntimeException) { -- cgit v1.2.3 From 092d6d9d6f9e6d79dd99d5f502ff39398622c2e1 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Tue, 20 Mar 2012 15:35:30 +0000 Subject: add vba support for BackColor, AutoSize, Locked attributes bnc#749960 --- oovbaapi/UnoApi_oovbaapi.mk | 1 + oovbaapi/ooo/vba/SystemColorConstants.idl | 31 ++++++++++++++++++++ oovbaapi/ooo/vba/msforms/XCheckBox.idl | 3 ++ oovbaapi/ooo/vba/msforms/XComboBox.idl | 3 ++ oovbaapi/ooo/vba/msforms/XCommandButton.idl | 3 +- oovbaapi/ooo/vba/msforms/XImage.idl | 1 + oovbaapi/ooo/vba/msforms/XLabel.idl | 2 ++ oovbaapi/ooo/vba/msforms/XTextBox.idl | 3 ++ vbahelper/source/msforms/vbabutton.cxx | 21 ++++++++++---- vbahelper/source/msforms/vbabutton.hxx | 2 ++ vbahelper/source/msforms/vbacheckbox.cxx | 29 +++++++++++++++++++ vbahelper/source/msforms/vbacheckbox.hxx | 6 ++++ vbahelper/source/msforms/vbacombobox.cxx | 29 +++++++++++++++++++ vbahelper/source/msforms/vbacombobox.hxx | 6 ++++ vbahelper/source/msforms/vbacontrol.cxx | 42 ++++++++++++++++++++++++++++ vbahelper/source/msforms/vbacontrol.hxx | 8 ++++++ vbahelper/source/msforms/vbaimage.cxx | 10 +++++++ vbahelper/source/msforms/vbaimage.hxx | 2 ++ vbahelper/source/msforms/vbalabel.cxx | 20 +++++++++++++ vbahelper/source/msforms/vbalabel.hxx | 4 +++ vbahelper/source/msforms/vbatextbox.cxx | 30 ++++++++++++++++++++ vbahelper/source/msforms/vbatextbox.hxx | 7 +++++ vbahelper/source/msforms/vbatogglebutton.cxx | 20 ++++++++++--- vbahelper/source/msforms/vbatogglebutton.hxx | 2 ++ 24 files changed, 275 insertions(+), 10 deletions(-) create mode 100644 oovbaapi/ooo/vba/SystemColorConstants.idl (limited to 'oovbaapi') diff --git a/oovbaapi/UnoApi_oovbaapi.mk b/oovbaapi/UnoApi_oovbaapi.mk index 57a0c1161497..00eeb8890360 100644 --- a/oovbaapi/UnoApi_oovbaapi.mk +++ b/oovbaapi/UnoApi_oovbaapi.mk @@ -75,6 +75,7 @@ $(eval $(call gb_UnoApiTarget_add_idlfiles,oovbaapi,oovbaapi/ooo/vba,\ VbMsgBoxStyle \ VbQueryClose \ VbStrConv \ + SystemColorConstants \ VbTriState \ VbVarType \ XApplicationBase \ diff --git a/oovbaapi/ooo/vba/SystemColorConstants.idl b/oovbaapi/ooo/vba/SystemColorConstants.idl new file mode 100644 index 000000000000..e0760f1d6a87 --- /dev/null +++ b/oovbaapi/ooo/vba/SystemColorConstants.idl @@ -0,0 +1,31 @@ +module ooo { module vba { + constants SystemColorConstants { + + const long vbScrollBars = -2147483648;// 0x80000000; + const long vbDesktop = -2147483647; //0x80000001; + const long vbActiveTitleBar = -2147483646; //0x80000002; + const long vbInactiveTitleBar = -2147483645; //0x80000003; + const long vbMenuBar = -2147483644; //0x80000004; + const long vbWindowBackground = -2147483643; //0x80000005; + const long vbWindowFrame = -2147483642; //0x80000006; + const long vbMenuText = -2147483641; //0x80000007; + const long vbWindowText = -2147483640; //0x80000008; + const long vbTitleBarText = -2147483639; //0x80000009; + const long vbActiveBorder = -2147483638; //0x8000000A; + const long vbInactiveBorder = -2147483637; //0x8000000B; + const long vbApplicationWorkspace = -2147483636; //0x8000000C; + const long vbHighlight = -2147483635; //0x8000000D; + const long vbHighlightText = -2147483634; //0x8000000E; + const long vbButtonFace = -2147483633; //0x8000000F; + const long vbButtonShadow = -2147483632; //0x80000010; + const long vbGrayText = -2147483631; //0x80000011; + const long vbButtonText = -2147483630; //0x80000012; + const long vbInactiveCaptionText = -2147483629; //0x80000013; + const long vb3DHighlight = -2147483628; //0x80000014; + const long vb3DDKShadow = -2147483627; //0x80000015; + const long vb3DLight = -2147483626; //0x80000016; + const long vbInfoText = -2147483625; //0x80000017; + const long vbInfoBackground = -2147483624; //0x80000018; + + }; +}; }; diff --git a/oovbaapi/ooo/vba/msforms/XCheckBox.idl b/oovbaapi/ooo/vba/msforms/XCheckBox.idl index ec2c7136383e..fc58d3e286f0 100644 --- a/oovbaapi/ooo/vba/msforms/XCheckBox.idl +++ b/oovbaapi/ooo/vba/msforms/XCheckBox.idl @@ -39,6 +39,9 @@ interface XCheckBox: com::sun::star::uno::XInterface { [attribute] string Caption; [attribute] any Value; + [attribute] long BackColor; + [attribute] boolean AutoSize; + [attribute] boolean Locked; [attribute, readonly] XNewFont Font; }; diff --git a/oovbaapi/ooo/vba/msforms/XComboBox.idl b/oovbaapi/ooo/vba/msforms/XComboBox.idl index 77b5e950d938..7eacf254456c 100644 --- a/oovbaapi/ooo/vba/msforms/XComboBox.idl +++ b/oovbaapi/ooo/vba/msforms/XComboBox.idl @@ -49,6 +49,9 @@ interface XComboBox [attribute] long EnterFieldBehavior; [attribute] long ListStyle; [attribute] long TextAlign; + [attribute] long BackColor; + [attribute] boolean AutoSize; + [attribute] boolean Locked; [attribute, readonly] long TextLength; [attribute, readonly] XNewFont Font; diff --git a/oovbaapi/ooo/vba/msforms/XCommandButton.idl b/oovbaapi/ooo/vba/msforms/XCommandButton.idl index 0e7697cbd162..d71472e2744f 100644 --- a/oovbaapi/ooo/vba/msforms/XCommandButton.idl +++ b/oovbaapi/ooo/vba/msforms/XCommandButton.idl @@ -39,11 +39,12 @@ module ooo { module vba { module msforms { interface XCommandButton { [attribute] string Caption; - [attribute] boolean AutoSize; [attribute] boolean Cancel; [attribute] boolean Default; [attribute] long BackColor; [attribute] long ForeColor; + [attribute] boolean AutoSize; + [attribute] boolean Locked; [attribute, readonly] XNewFont Font; }; diff --git a/oovbaapi/ooo/vba/msforms/XImage.idl b/oovbaapi/ooo/vba/msforms/XImage.idl index 2c77aace76e5..ec40c4a32892 100644 --- a/oovbaapi/ooo/vba/msforms/XImage.idl +++ b/oovbaapi/ooo/vba/msforms/XImage.idl @@ -35,6 +35,7 @@ module ooo { module vba { module msforms { //============================================================================= interface XImage: com::sun::star::uno::XInterface { + [attribute] long BackColor; }; //============================================================================= diff --git a/oovbaapi/ooo/vba/msforms/XLabel.idl b/oovbaapi/ooo/vba/msforms/XLabel.idl index 10a92dc20184..c0ed739312d5 100644 --- a/oovbaapi/ooo/vba/msforms/XLabel.idl +++ b/oovbaapi/ooo/vba/msforms/XLabel.idl @@ -42,6 +42,8 @@ interface XLabel [attribute] string Caption; [attribute] any Value; [attribute] string Accelerator; + [attribute] long BackColor; + [attribute] boolean AutoSize; [attribute, readonly] XNewFont Font; }; diff --git a/oovbaapi/ooo/vba/msforms/XTextBox.idl b/oovbaapi/ooo/vba/msforms/XTextBox.idl index 75aaf836817f..1dceb861bdf2 100644 --- a/oovbaapi/ooo/vba/msforms/XTextBox.idl +++ b/oovbaapi/ooo/vba/msforms/XTextBox.idl @@ -45,6 +45,9 @@ interface XTextBox [attribute] boolean Multiline; [attribute] long SpecialEffect; [attribute] long BorderStyle; + [attribute] long BackColor; + [attribute] boolean AutoSize; + [attribute] boolean Locked; [attribute, readonly] long TextLength; [attribute, readonly] XNewFont Font; }; diff --git a/vbahelper/source/msforms/vbabutton.cxx b/vbahelper/source/msforms/vbabutton.cxx index f0763330c8e2..8912b6d0ff9d 100644 --- a/vbahelper/source/msforms/vbabutton.cxx +++ b/vbahelper/source/msforms/vbabutton.cxx @@ -55,11 +55,22 @@ ScVbaButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star sal_Bool SAL_CALL ScVbaButton::getAutoSize() throw (uno::RuntimeException) { - return sal_False; + return ScVbaControl::getAutoSize(); +} + +void SAL_CALL ScVbaButton::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException) +{ + ScVbaControl::setAutoSize( bAutoSize ); +} + +sal_Bool SAL_CALL ScVbaButton::getLocked() throw (uno::RuntimeException) +{ + return ScVbaControl::getLocked(); } -void SAL_CALL ScVbaButton::setAutoSize( sal_Bool /*bAutoSize*/ ) throw (uno::RuntimeException) +void SAL_CALL ScVbaButton::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException) { + ScVbaControl::setLocked( bLocked ); } sal_Bool SAL_CALL ScVbaButton::getCancel() throw (uno::RuntimeException) @@ -82,16 +93,16 @@ void SAL_CALL ScVbaButton::setDefault( sal_Bool /*bDefault*/ ) throw (uno::Runti sal_Int32 SAL_CALL ScVbaButton::getBackColor() throw (uno::RuntimeException) { - return 0; + return ScVbaControl::getBackColor(); } -void SAL_CALL ScVbaButton::setBackColor( sal_Int32 /*nBackColor*/ ) throw (uno::RuntimeException) +void SAL_CALL ScVbaButton::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException) { + ScVbaControl::setBackColor( nBackColor ); } sal_Int32 SAL_CALL ScVbaButton::getForeColor() throw (uno::RuntimeException) { - return 0; } void SAL_CALL ScVbaButton::setForeColor( sal_Int32 /*nForeColor*/ ) throw (uno::RuntimeException) diff --git a/vbahelper/source/msforms/vbabutton.hxx b/vbahelper/source/msforms/vbabutton.hxx index e999acf26ed4..48bd0994c6d2 100644 --- a/vbahelper/source/msforms/vbabutton.hxx +++ b/vbahelper/source/msforms/vbabutton.hxx @@ -52,6 +52,8 @@ public: virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getForeColor() throw (css::uno::RuntimeException); virtual void SAL_CALL setForeColor( sal_Int32 nForeColor ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getLocked() throw (css::uno::RuntimeException); + virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); //XHelperInterface virtual rtl::OUString& getServiceImplName(); diff --git a/vbahelper/source/msforms/vbacheckbox.cxx b/vbahelper/source/msforms/vbacheckbox.cxx index 290cdd1a7e33..3d9194360235 100644 --- a/vbahelper/source/msforms/vbacheckbox.cxx +++ b/vbahelper/source/msforms/vbacheckbox.cxx @@ -114,4 +114,33 @@ ScVbaCheckbox::getServiceNames() return aServiceNames; } +sal_Int32 SAL_CALL ScVbaCheckbox::getBackColor() throw (uno::RuntimeException) +{ + return ScVbaControl::getBackColor(); +} + +void SAL_CALL ScVbaCheckbox::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException) +{ + ScVbaControl::setBackColor( nBackColor ); +} + +sal_Bool SAL_CALL ScVbaCheckbox::getAutoSize() throw (uno::RuntimeException) +{ + return ScVbaControl::getAutoSize(); +} + +void SAL_CALL ScVbaCheckbox::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException) +{ + ScVbaControl::setAutoSize( bAutoSize ); +} + +sal_Bool SAL_CALL ScVbaCheckbox::getLocked() throw (uno::RuntimeException) +{ + return ScVbaControl::getLocked(); +} + +void SAL_CALL ScVbaCheckbox::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException) +{ + ScVbaControl::setLocked( bLocked ); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vbahelper/source/msforms/vbacheckbox.hxx b/vbahelper/source/msforms/vbacheckbox.hxx index e6cc4fe47453..acddeb340ce9 100644 --- a/vbahelper/source/msforms/vbacheckbox.hxx +++ b/vbahelper/source/msforms/vbacheckbox.hxx @@ -45,6 +45,12 @@ public: virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException); virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); + virtual sal_Int32 getBackColor() throw (css::uno::RuntimeException); + virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException); + virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getLocked() throw (css::uno::RuntimeException); + virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); // XDefaultProperty rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); } //XHelperInterface diff --git a/vbahelper/source/msforms/vbacombobox.cxx b/vbahelper/source/msforms/vbacombobox.cxx index d9e95277f278..083b2d34d427 100644 --- a/vbahelper/source/msforms/vbacombobox.cxx +++ b/vbahelper/source/msforms/vbacombobox.cxx @@ -278,6 +278,35 @@ ScVbaComboBox::getServiceImplName() static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaComboBox") ); return sImplName; } +sal_Int32 SAL_CALL ScVbaComboBox::getBackColor() throw (uno::RuntimeException) +{ + return ScVbaControl::getBackColor(); +} + +void SAL_CALL ScVbaComboBox::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException) +{ + ScVbaControl::setBackColor( nBackColor ); +} + +sal_Bool SAL_CALL ScVbaComboBox::getAutoSize() throw (uno::RuntimeException) +{ + return ScVbaControl::getAutoSize(); +} + +void SAL_CALL ScVbaComboBox::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException) +{ + ScVbaControl::setAutoSize( bAutoSize ); +} + +sal_Bool SAL_CALL ScVbaComboBox::getLocked() throw (uno::RuntimeException) +{ + return ScVbaControl::getLocked(); +} + +void SAL_CALL ScVbaComboBox::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException) +{ + ScVbaControl::setLocked( bLocked ); +} uno::Sequence< rtl::OUString > ScVbaComboBox::getServiceNames() diff --git a/vbahelper/source/msforms/vbacombobox.hxx b/vbahelper/source/msforms/vbacombobox.hxx index e2b1716e4685..ca5c170975cf 100644 --- a/vbahelper/source/msforms/vbacombobox.hxx +++ b/vbahelper/source/msforms/vbacombobox.hxx @@ -73,6 +73,12 @@ public: virtual void SAL_CALL setTextAlign( sal_Int32 nTextAlign ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getTextLength() throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); + virtual sal_Int32 getBackColor() throw (css::uno::RuntimeException); + virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException); + virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getLocked() throw (css::uno::RuntimeException); + virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); // Methods virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException); diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx index 195e34e21a05..4a0fdf5c6ad8 100644 --- a/vbahelper/source/msforms/vbacontrol.cxx +++ b/vbahelper/source/msforms/vbacontrol.cxx @@ -534,6 +534,8 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R return new ScVbaSpinButton( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() ); case form::FormComponentType::IMAGECONTROL: return new ScVbaImage( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() ); + case form::FormComponentType::SCROLLBAR: + return new ScVbaScrollBar( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() ); } throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unsupported control.")), uno::Reference< uno::XInterface >() ); } @@ -619,6 +621,46 @@ ScVbaControl::getServiceNames() return aServiceNames; } +sal_Int32 nSysCols[] = { 0xC8D0D4, 0x0, 0x6A240A, 0x808080, 0xE4E4E4, 0xFFFFFF, 0x0, 0x0, 0x0, 0xFFFFFF, 0xE4E4E4, 0xE4E4E4, 0x808080, 0x6A240A, 0xFFFFFF, 0xE4E4E4, 0x808080, 0x808080, 0x0, 0xC8D0D4, 0xFFFFFF, 0x404040, 0xE4E4E4, 0x0, 0xE1FFFF }; + +sal_Int32 ScVbaControl::getBackColor() throw (uno::RuntimeException) +{ + sal_Int32 nBackColor = 0; + m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= nBackColor; + return nBackColor; +} + +void ScVbaControl::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException) +{ + if ( ( nBackColor >= (sal_Int32)0x80000000 ) && ( nBackColor <= (sal_Int32)0x80000018 ) ) + { + nBackColor = nSysCols[ nBackColor - 0x80000000 ]; + } + m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ), uno::makeAny( XLRGBToOORGB( nBackColor ) ) ); +} + +sal_Bool ScVbaControl::getAutoSize() throw (uno::RuntimeException) +{ + return sal_False; +} + +// currently no implementation for this +void ScVbaControl::setAutoSize( sal_Bool /*bAutoSize*/ ) throw (uno::RuntimeException) +{ +} + +sal_Bool ScVbaControl::getLocked() throw (uno::RuntimeException) +{ + sal_Bool bRes( sal_False ); + m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ) ) >>= bRes; + return bRes; +} + +void ScVbaControl::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException) +{ + m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ), uno::makeAny( bLocked ) ); +} + typedef cppu::WeakImplHelper1< XControlProvider > ControlProvider_BASE; class ControlProviderImpl : public ControlProvider_BASE { diff --git a/vbahelper/source/msforms/vbacontrol.hxx b/vbahelper/source/msforms/vbacontrol.hxx index 9076a3e38071..06d61c518b0e 100644 --- a/vbahelper/source/msforms/vbacontrol.hxx +++ b/vbahelper/source/msforms/vbacontrol.hxx @@ -114,6 +114,14 @@ public: //XHelperInterface virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence getServiceNames(); + //General helper methods for properties ( may or maynot be relevant for all + //controls + sal_Int32 getBackColor() throw (css::uno::RuntimeException); + void setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException); + sal_Bool getAutoSize() throw (css::uno::RuntimeException); + void setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); + sal_Bool getLocked() throw (css::uno::RuntimeException); + void setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); }; diff --git a/vbahelper/source/msforms/vbaimage.cxx b/vbahelper/source/msforms/vbaimage.cxx index 08a3007d5714..7dfc64f1ef44 100644 --- a/vbahelper/source/msforms/vbaimage.cxx +++ b/vbahelper/source/msforms/vbaimage.cxx @@ -56,4 +56,14 @@ ScVbaImage::getServiceNames() return aServiceNames; } +sal_Int32 SAL_CALL ScVbaImage::getBackColor() throw (uno::RuntimeException) +{ + return ScVbaControl::getBackColor(); +} + +void SAL_CALL ScVbaImage::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException) +{ + ScVbaControl::setBackColor( nBackColor ); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vbahelper/source/msforms/vbaimage.hxx b/vbahelper/source/msforms/vbaimage.hxx index e360fe4f67b1..cd5e1bb8b9c4 100644 --- a/vbahelper/source/msforms/vbaimage.hxx +++ b/vbahelper/source/msforms/vbaimage.hxx @@ -39,6 +39,8 @@ class ScVbaImage : public ImageImpl_BASE { public: ScVbaImage( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ); + virtual sal_Int32 getBackColor() throw (css::uno::RuntimeException); + virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException); //XHelperInterface virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence getServiceNames(); diff --git a/vbahelper/source/msforms/vbalabel.cxx b/vbahelper/source/msforms/vbalabel.cxx index 4795a25be78c..860c09092a83 100644 --- a/vbahelper/source/msforms/vbalabel.cxx +++ b/vbahelper/source/msforms/vbalabel.cxx @@ -90,6 +90,26 @@ rtl::OUString& ScVbaLabel::getServiceImplName() return sImplName; } +sal_Int32 SAL_CALL ScVbaLabel::getBackColor() throw (uno::RuntimeException) +{ + return ScVbaControl::getBackColor(); +} + +void SAL_CALL ScVbaLabel::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException) +{ + ScVbaControl::setBackColor( nBackColor ); +} + +sal_Bool SAL_CALL ScVbaLabel::getAutoSize() throw (uno::RuntimeException) +{ + return ScVbaControl::getAutoSize(); +} + +void SAL_CALL ScVbaLabel::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException) +{ + ScVbaControl::setAutoSize( bAutoSize ); +} + uno::Sequence< rtl::OUString > ScVbaLabel::getServiceNames() { diff --git a/vbahelper/source/msforms/vbalabel.hxx b/vbahelper/source/msforms/vbalabel.hxx index 1166f045e6ac..611ae0eb6273 100644 --- a/vbahelper/source/msforms/vbalabel.hxx +++ b/vbahelper/source/msforms/vbalabel.hxx @@ -48,6 +48,10 @@ public: virtual rtl::OUString SAL_CALL getAccelerator() throw (css::uno::RuntimeException); virtual void SAL_CALL setAccelerator( const rtl::OUString& _accelerator ) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); + virtual sal_Int32 getBackColor() throw (css::uno::RuntimeException); + virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException); + virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); //XHelperInterface virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence getServiceNames(); diff --git a/vbahelper/source/msforms/vbatextbox.cxx b/vbahelper/source/msforms/vbatextbox.cxx index 39861b9a75b6..8ba140719f88 100644 --- a/vbahelper/source/msforms/vbatextbox.cxx +++ b/vbahelper/source/msforms/vbatextbox.cxx @@ -152,6 +152,36 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaTextBox::getFont() throw (uno: return new VbaNewFont( this, mxContext, m_xProps ); } +sal_Int32 SAL_CALL ScVbaTextBox::getBackColor() throw (uno::RuntimeException) +{ + return ScVbaControl::getBackColor(); +} + +void SAL_CALL ScVbaTextBox::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException) +{ + ScVbaControl::setBackColor( nBackColor ); +} + +sal_Bool SAL_CALL ScVbaTextBox::getAutoSize() throw (uno::RuntimeException) +{ + return ScVbaControl::getAutoSize(); +} + +void SAL_CALL ScVbaTextBox::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException) +{ + ScVbaControl::setAutoSize( bAutoSize ); +} + +sal_Bool SAL_CALL ScVbaTextBox::getLocked() throw (uno::RuntimeException) +{ + return ScVbaControl::getLocked(); +} + +void SAL_CALL ScVbaTextBox::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException) +{ + ScVbaControl::setLocked( bLocked ); +} + rtl::OUString& ScVbaTextBox::getServiceImplName() { diff --git a/vbahelper/source/msforms/vbatextbox.hxx b/vbahelper/source/msforms/vbatextbox.hxx index bdbff16439ea..25b3a047c0ac 100644 --- a/vbahelper/source/msforms/vbatextbox.hxx +++ b/vbahelper/source/msforms/vbatextbox.hxx @@ -54,6 +54,13 @@ public: virtual void SAL_CALL setBorderStyle( sal_Int32 nBorderStyle ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getTextLength() throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); + virtual sal_Int32 getBackColor() throw (css::uno::RuntimeException); + virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException); + virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getLocked() throw (css::uno::RuntimeException); + virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); + // XDefaultProperty rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); } //XHelperInterface diff --git a/vbahelper/source/msforms/vbatogglebutton.cxx b/vbahelper/source/msforms/vbatogglebutton.cxx index b989616a8574..0e2b056259b9 100644 --- a/vbahelper/source/msforms/vbatogglebutton.cxx +++ b/vbahelper/source/msforms/vbatogglebutton.cxx @@ -99,11 +99,12 @@ ScVbaToggleButton::setValue( const uno::Any& _value ) throw (uno::RuntimeExcepti sal_Bool SAL_CALL ScVbaToggleButton::getAutoSize() throw (uno::RuntimeException) { - return sal_False; + return ScVbaControl::getAutoSize(); } -void SAL_CALL ScVbaToggleButton::setAutoSize( sal_Bool /*bAutoSize*/ ) throw (uno::RuntimeException) +void SAL_CALL ScVbaToggleButton::setAutoSize( sal_Bool bAutoSize ) throw (uno::RuntimeException) { + ScVbaControl::setAutoSize( bAutoSize ); } sal_Bool SAL_CALL ScVbaToggleButton::getCancel() throw (uno::RuntimeException) @@ -126,11 +127,12 @@ void SAL_CALL ScVbaToggleButton::setDefault( sal_Bool /*bDefault*/ ) throw (uno: sal_Int32 SAL_CALL ScVbaToggleButton::getBackColor() throw (uno::RuntimeException) { - return 0; + return ScVbaControl::getBackColor(); } -void SAL_CALL ScVbaToggleButton::setBackColor( sal_Int32 /*nBackColor*/ ) throw (uno::RuntimeException) +void SAL_CALL ScVbaToggleButton::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException) { + ScVbaControl::setBackColor( nBackColor ); } sal_Int32 SAL_CALL ScVbaToggleButton::getForeColor() throw (uno::RuntimeException) @@ -147,6 +149,16 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaToggleButton::getFont() throw return new VbaNewFont( this, mxContext, m_xProps ); } +sal_Bool SAL_CALL ScVbaToggleButton::getLocked() throw (uno::RuntimeException) +{ + return ScVbaControl::getLocked(); +} + +void SAL_CALL ScVbaToggleButton::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException) +{ + ScVbaControl::setLocked( bLocked ); +} + rtl::OUString& ScVbaToggleButton::getServiceImplName() { diff --git a/vbahelper/source/msforms/vbatogglebutton.hxx b/vbahelper/source/msforms/vbatogglebutton.hxx index 6e8a0cb28e18..7394bea6fa25 100644 --- a/vbahelper/source/msforms/vbatogglebutton.hxx +++ b/vbahelper/source/msforms/vbatogglebutton.hxx @@ -56,6 +56,8 @@ public: virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getForeColor() throw (css::uno::RuntimeException); virtual void SAL_CALL setForeColor( sal_Int32 nForeColor ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getLocked() throw (css::uno::RuntimeException); + virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) throw (css::uno::RuntimeException); virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() throw (css::uno::RuntimeException); //XHelperInterface virtual rtl::OUString& getServiceImplName(); -- cgit v1.2.3