But with the same PropertyAttribute.hdl i had built c++ sample
DocumentLoader.cxx,and it works .
How can i disable this feature of pre-processor

-Brick

On Sun, Mar 29, 2015 at 11:56 PM, Dennis E. Hamilton <
dennis.hamil...@acm.org> wrote:

> 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 [mailto:brickman...@gmail.com]
> Sent: Sunday, March 29, 2015 07:09
> To: dev
> Subject: ruby uno to control openoffice
>
> Hi,All
> There is a runo on github developed by hanya.
>  Ruby-UNO (Ruby-OpenOffice) native bridge.
>
> http://wiki.github.com/hanya/RUNO/
>
> 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
> comes.
>
> require 'uno'
> data = {'type' => 'socket', 'host' => 'localhost',
>         'port' => 2083, 'protocol' => 'urp'}
> ctx = Uno::Connector.connect(data)
> smgr = ctx.getServiceManager
> desktop = smgr.createInstanceWithContext(
>                    "com.sun.star.frame.Desktop",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: dev-unsubscr...@openoffice.apache.org
> For additional commands, e-mail: dev-h...@openoffice.apache.org
>
>

Reply via email to