[dev] XScrollBar getScrollValue and setScrollValue

2011-01-10 Thread Shameera Rathnayaka
Hi,

 I have being implemented A Visual Navigator for Open Office write as my
induvidual project under CS 3200 course module. I want to set  and get
scroolbar value of the currently viewing writer document. Referring
developer guide i found that i need to get
com.sun.star.awt.UnoControlScrollBarModel of the document but i don't know
hove to get this :( .As my project dead line also coming close please let me
know how to do this. my code sample is mentioned below


i am using Netbeans to implement Open Office add on with Open Office SDK


private final XComponentContext m_xContext;
private XDesktop xDesktop;
private Object desktop;
private XMultiComponentFactory xmcf;
private XComponent xDoc;
private XModel xModel;

xmcf = m_xContext.getServiceManager();

desktop =
xmcf.createInstanceWithContext(com.sun.star.frame.Desktop, m_xContext);
   xDesktop = (XDesktop)
UnoRuntime.queryInterface(com.sun.star.frame.XDesktop.class, desktop);
   xDoc = xDesktop.getCurrentComponent();

 xModel =
(XModel)UnoRuntime.queryInterface(XModel.class, xDoc);
 xController = xModel.getCurrentController();

  // trying to get ScrollBar
 xScrollBar = (XScrollBar)
UnoRuntime.queryInterface(XScrollBar.class, xController);

  // try to control Scrollbar
 System.out.println(ScrollValue id
+xScrollBar.getValue());  // this gives null pointer exception when i
run this code

xScrollBar.setOrientation(xScrollBar.getMaximum());




-- 
Shameera Rathnayaka
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa.
Sri Lanka.
T.P.  0719221454


Re: [dev] Insert Pdf file into Text Document

2011-01-10 Thread Mathias Bauer

On 01/10/2011 07:39 AM, Meenakshi Kanaujia wrote:

Hi,

I am using Open-Office on Ununtu 10.04.

From last one day i am trying to insert pdf document in writer doc but can

not get success.
I want to embed pdf file as icon similar to embed doc in MS-Word.
I was able to do that using open-office 3.2.0 on Windows Vista by following
-
insert -  object -  ole object -  further object -  create from file
but *further object
* option is missing *on open-office 3.2.0 on ubuntu 10.04.
I have also searched forum for that but did not find any solution.
Please help.

Thanks,
rise_mini
*



Further object means inserting a COM based OLE object. This object 
type is available only on Windows.


Regards,
Mathias

--
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Oracle: http://blogs.sun.com/GullFOSS
Please don't reply to nospamfor...@gmx.de.
I use it for the OOo lists and only rarely read other mails sent to it.

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org