VBA Macros - The Fun Bits

From WorkOutWiki2008

Jump to: navigation, search


Contents

Proposer

  Rajesh Sola

Purpose

Macros are fun bits as well as powerful in any office suite,This session will make participants comfortable towards implementing missing vba stuff in OpenOffice.org

Abstract

When MS-Office documents are opened in OpenOffice.org any VBA macros present in them are just unusable earlier ,migrating whole VBA code to OOBasic or StarBasic is a tedious task, many business units are suffering from this issue,which can be one of the typical barriers for migrating to OOo.But with the help of VBA Interoperability project jointly organized by Sun & Novell lead by Noel Power,Novell Inc.,documents with VBA can be directly opened in OOo without any extra efforts.But the VBA support for OOo is under heavy development by Sun & Novell as the project is in incubator stage.A huge amount of contributions is expected to overcome the issue. This workout is intended to involve participants in implementation of missing objects/ properties required for VBA support in OpenOffice.org product. The main idea is to add missing vba bits either to start from scratch or migrate from helperapi(rapid way).

Pre-requisites

Languages, tools to be known

   C++, VBA coding
   Basic idea on OOo Architecture,
   Build & hack process (Feel free to contact to get these things comfortable)
   

Getting and compiling the code

   http://wiki.services.openoffice.org/wiki/Building_with_ooobuild (updated one)
   http://go-oo.org/developers/hackers-guide.html 
   In Brief:
   1.checkout ooo-build 
     svn co svn://svn.gnome.org/svn/ooo-build/trunk ooo-build
   2.Configure with following options
      --with-distro=xxx
      --with-gcc-sppedup=ccache,icecream
      --disable-kde , --disable-gnome (as you desire)
   3. ./download (will download around 200-300 MB sources, contact us for alternative in case slow/no direct net connection)
   4. make (this will take long time, ~6 hours with high end conf, ~8-12 hours with typical conf)
   5. bin/ooinstall -l <path to install>
   6. cd <path to install>/program
   7. source ./ooenv
   8. ./soffice.bin & (OOo build is ready & running)
   Participants are adviced to come with build,even if no build you can come with some linux distro where you can update 
   packages as in ur usual way,on installing required packages can do a copy of already built code(10 GB free space expected 
   apart from distro)
   Few precompiled instances will be availble at desktop m/c s of hall, u can ssh and work on...but preferably come with prebuilt ooo 
   or atleast with linux distro to copy build,as working on too many instances may slow down the m/c & network...

Links to overall design/architecture

   http://wiki.services.openoffice.org/wiki/Architecture
   http://wiki.services.openoffice.org/wiki/VBA
   http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide (not exactly related,but still useful)
   http://wiki.services.openoffice.org/wiki/Helperapi
   http://api.openoffice.org/source/browse/api/helperapi/
   Helperapi helps a lot in rapid implementation of properties & objects as it avoids starting from scratch.


Pre-event planning

Tasks

   ooo-build/test/macro/missing_vbafeatures.ods reflects missing bits left for implementation,cross checking this
   with corresponding idl file in oovbaapi is always suggestible.
   some sort of processed info available at
   http://wiki.services.openoffice.org/wiki/Porting_notes#Calc_Objects_to_port 
   Some suitable properties,objects planned for this session are
   1.Application.Sheets
   2.PageSetup.PaperSize
   3.PageSetup.PrintTitleRows
   4.PageSetip.PrintTitleColumns
   5.VPageBreak object


Existing work

Getting in touch

  Email:- rajesh@lisor.org
  IRC Nick : sola
  #go-oo channel on irc.freenode.net
  Project Lead : Noel Power
  IRC Nick : noelp
  Email:- noel.power@novell.com


Participants

  1.Rajesh Sola
  2.Gourav
  3.Lawrence

Workout Progress & Tips

to congfigure ./autogen.sh --with-distro=UbuntuHardy --with-gcc-speedup=ccache icecream --with-lang=en-US --disable-kde --with-icecream-bindir=/usr/bin

Gourav implemented Application.Sheets,Application.InchesToPoints and working on PageSetup.PaperSize


Post Workout Status

Personal tools