[dev] Delete table in cursor position

2011-07-08 Thread Shameera Rathnayaka
hi dev,

This is my problem i could delete all table in doc , but how can i delete
table in cursor position which i dont know the name and index of that table.

here my code to delete all table in textRange but it delete all table in my
doc, if you know please give me a help or point out some helpful links

XTextTable table=null;
XText text = xTextDocument.getText();
XTextRange textRange= text.getStart();

XEnumerationAccess xParaAccess = (XEnumerationAccess)
UnoRuntime.queryInterface(XEnumerationAccess.class, textRange.getText());
XEnumeration xParaEnum = xParaAccess.createEnumeration();
while (xParaEnum.hasMoreElements()) {
try {
Object objElement = xParaEnum.nextElement();
XServiceInfo xInfo = (XServiceInfo)
UnoRuntime.queryInterface(XServiceInfo.class, objElement);
if (xInfo.supportsService(com.sun.star.text.TextTable)) {
table = (XTextTable) UnoRuntime.queryInterface(
   XTextTable.class,objElement);
table.dispose();
}
} catch (com.sun.star.container.NoSuchElementException ex) {

java.util.logging.Logger.getLogger(TableOparater.class.getName()).log(Level.SEVERE,
null, ex);
} catch (WrappedTargetException ex) {

java.util.logging.Logger.getLogger(TableOparater.class.getName()).log(Level.SEVERE,
null, ex);
}
}

*thanks *
-- 
Shameera Rathnayaka
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa.
Sri Lanka.
T.P.  0719221454
-- 
-
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help


[dev] Re: HELP REQUIRED

2011-06-07 Thread Shameera Rathnayaka
hi shashanka sharma

first try with the examples in the developer guide to perform some basic
things something like add a string to the writer doc if you are willing to
 work with writer. With that try to familiar with the java api.

On Tue, Jun 7, 2011 at 1:07 PM, Shashank Sharma shashan...@iitrpr.ac.inwrote:

 hello,
 I am a undergraduate student of third year (INDIAN INSTITTE OF
 TECHNOLOGY-IIT) and wants to develop new functionality in open office.before
 trying on the features of to do list , i want to add small
 functionality.However i am not clear how to start and how to proceed
 further.Also i started reading developers guide and it was not much clear to
 me
 Can u please provide me with some guidance and help on how to *start from
 scratch

 *Regards

 Shashank Sharma




-- 
Shameera Rathnayaka
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa.
Sri Lanka.
T.P.  0719221454
-- 
-
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help


Re: [dev] Beta version of XVisualNavigator (XVN)

2011-01-31 Thread Shameera Rathnayaka
Thanks a lot for the feedback,

Actually what i wanted to say is that i want to make it support to other
operating systems also such as linux etc..As i think what you suggest is the
most suitable method to integrate it to Openoffice. i too hope to implement
it that way in my future efforts.

  I appreciate for making time to try XVN and giving a feedback.This
will help me to implement XVN far better.



-- 
Shameera Rathnayaka
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa.
Sri Lanka.
T.P.  0719221454
 time: අවස්ථාව, ඉඩපාඩු, කණසම, කල, කාල, කාලය, තුර, තෙන, දශාව, නියම වේලාව,
ප්‍රස්තාව, යාමය, ලය, වංගිය, වක, වකවානුව, විට, විටි, විඩ, වෙලාව, වේලා, වේලාව,
සඳ, සමය, සමයම, සැරය, සුදුසු වේලාව, සෘතුව
 #


[dev] Beta version of XVisualNavigator (XVN)

2011-01-28 Thread Shameera Rathnayaka
hi all ,



  I have implemented a visual navigation
extension for Openoffice writer. As a solution for the issue on
http://qa.openoffice.org/issues/show_bug.cgi?id=41087 i came up with XVN -
XVisualNavigator(beta version) which can be used to overcome the issue of
Reading Layout view. XVN shows a window by left side of the top-window which
contains small thumbnails of all pages of the current document. Thumbnails
are clear and user could see the contents of the pages to identify the
particular page. This will help for every OO writer user and specially the
users who work with large documents.


*Functions of XVN *


1. User can see each page separately with clear thumbnail view.

2. There are four navigation buttons Next, Previous, Home, End .

3. Refresh button to refresh the XVN.

4. The selected page is in highlighted mode.

5. Navigation by just clicking on the relevant page.

6. Automatically resizing with top-window.


*To Do List*

*
*

1. Auto refresh when add or delete pages action happens to the document.

2. Auto refresh modified or edited page when the user moves to another page.

3. Make XVN platform independent.

*Link to the extensions repository*

http://extensions.services.openoffice.org/en/project/XVN#comment-3432



*Google code link*

http://code.google.com/p/x-visual-navigator/



*Trial video of XVN*

http://www.youtube.com/watch?v=qqZVU-cDkl4





All your new suggestions and comments are mostly welcome for my further
implementations to the XVN.



E-mail : shameerai...@gmail.com



Thank you.


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


[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


[dev] Thumbnail view

2010-11-04 Thread Shameera Rathnayaka
hi,
   Is there way to show .ODT file as thumbnails without converting other
formats like PDF or doc?

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


[dev] New Project for OO writer

2010-10-17 Thread Shameera Rathnayaka
Hi,

I am expecting to develop an extension to provide a simple visual navigator
for OO Writer. This is like the one we see in PDF readers and also Microsoft
Word 2010, where users can see the previews of the pages in the opened
document.

Please tell me whether it is possible to make this without interfering with
the OO API. Is this a deep and time taking project to develop?

Thank you in advance.

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