openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis E. Hamilton" <>
Subject RE: ruby uno to control openoffice
Date Sun, 29 Mar 2015 14:56:27 GMT
It appears that OPTIONAL is defined to empty string in a pre-processor definition.  

This is probably a conflict with use of OPTIONAL as a way of controlling code inclusion and
not as name of a feature in a bit flag [;<).

 - Dennis

-----Original Message-----
From: Brick Ma [] 
Sent: Sunday, March 29, 2015 07:09
To: dev
Subject: ruby uno to control openoffice

There is a runo on github developed by hanya.
 Ruby-UNO (Ruby-OpenOffice) native bridge.

I spend days to build the runo on window 7

with ActiveScriptRuby2.2, openoffice 3.4 and vs2010.

i got this error which i dont understand why .

E:\RUNO-master\include\com/sun/star/beans/PropertyAttribute.hdl(20) : error
C2513: 'const short' : no variable declared before '='

but  in PropertyAttribute.hdl the line 20 is as the same style as other line

static const ::sal_Int16 MAYBEVOID = (sal_Int16)1;
static const ::sal_Int16 BOUND = (sal_Int16)2;
static const ::sal_Int16 CONSTRAINED = (sal_Int16)4;
static const ::sal_Int16 TRANSIENT = (sal_Int16)8;
static const ::sal_Int16 READONLY = (sal_Int16)16;
static const ::sal_Int16 MAYBEAMBIGUOUS = (sal_Int16)32;
static const ::sal_Int16 MAYBEDEFAULT = (sal_Int16)64;
static const ::sal_Int16 REMOVEABLE = (sal_Int16)128;
static const ::sal_Int16 REMOVABLE = (sal_Int16)128;
static const ::sal_Int16 OPTIONAL = (sal_Int16)256;//line 20 error1

I commented line 20 ,build is OK.Then i try to open a docment.But error

require 'uno'
data = {'type' => 'socket', 'host' => 'localhost',
        'port' => 2083, 'protocol' => 'urp'}
ctx = Uno::Connector.connect(data)
smgr = ctx.getServiceManager
desktop = smgr.createInstanceWithContext(
                   "",ctx)//here error2 comes out
doc = desktop.loadComponentFromURL("private:factory/swriter", "_blank", 0,
doc.getText.setString("Hello Ruby!")

I really want to make it work.Buy it seems kind of hard for me now.

Did error1 yield error2 or something else wrong.

Any help would be appreciated.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message