[dev] Problem in extension development

2008-06-03 Thread Dinesh Chothe
 I have been working with search and replaceall
functions using java and OoSDK as following,

 XReplaceable xReplaceable = (XReplaceable)
UnoRuntime.queryInterface(XReplaceable.class,xTextDocument);
 XReplaceDescriptor xRepDesc =
xReplaceable.createReplaceDescriptor();
 xRepDesc.setPropertyValue(SearchWords, new
Boolean(true));  //for only replacement of exact complete words
 xRepDesc.setSearchString(¢›¸);   //here I am
giving only one char for replacement
 xRepDesc.setReplaceString(**); //replacing
that char with another char
 long nResult = xReplaceable.replaceAll(xRepDesc);
//here my all chars get replaced with specified above string

 But  now  problem  is  my  all  strings  which  has  as
setSearchString  get  replaces  and  also  other  strings  which
  contains setSearchString as* sub string also gets
replaced.*
   for eg.   I wanted to replace this string - ¢›¸
   replaces all this strings- 1. **£ú(R)¸µ¸  .. substring
at start position also gets replaced.
2.  **
   .. this is only perfect replace.
3. ú‡œ¸ú‡**
  .. substring
at end position also gets replaced.

1. how do achieve only perfect replace as search string?

2.  Is  there  replaceFirst()  method  so that  only
first  found  string  get replaced?

3.  XReplaceable xReplaceable = (XReplaceable)
UnoRuntime.queryInterface(XReplaceable.class,*xTextDocument*);

 Here can we use for  only  xTextContent  or
xTextRange or xTextPortion instead of *xTextDocument ?*

*
*














-- 
Thanks and Regards,



Dinesh


Re: [dev] Building OOo: swext not found

2008-06-03 Thread Giuseppe Castagno

Hi Matthias,

Matthias B. wrote:

I am trying to build OOo_3.0.0beta from the official sources. I've
tried it with the same build script that can successfully build OOo
2.4 and which essentially does the same as described here

http://wiki.services.openoffice.org/wiki/Building_OpenOffice.org

Now for 3.0.0beta the build fails with this:

make copied to /ooo/src-3.0-beta/BEA300_m2/solenv/unxlngi6/bin/dmake
Checking module list
build -- version: 1.166

Fetching dependencies for module swext from solver... failed...
Fetching from CVS...  failed


WARNING! Project(s):
swext

not found and couldn't be built. Dependencies on that module(s)
ignored. Maybe you should correct build

dmake:  Error code 1, while making 'check_modules'


I've googled and found a message saying that one can ignore this error
and continue with the build anyway, but I have a bad feeling about
doing this. Can someone give me more information about what this swext
module is and why it isn't part of the  sources if the build expects
it.


swext is the Wiki publisher extension. You can build the main OOo 
without it.


If you'd like to check it out, you have to set CVSROOT to whatever value 
is right for you and then (for DEV300_m15 tag):


cvs co -r DEV300_m15 swext

--
Kind Regards,

Giuseppe Castagno
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Acca Esse http://www.acca-esse.eu


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] [Fwd: New feature - overlined text (Issue #5991)]

2008-06-03 Thread Martin Whitaker
I tried posting this to [EMAIL PROTECTED], but it has not appeared, 
so I'll repost it here.


 Original Message 
Subject: New feature - overlined text (Issue #5991)
Date: Mon, 26 May 2008 18:03:11 +0100
To: [EMAIL PROTECTED]

The draft specification is available here:

http://specs.openoffice.org/appwide/formatting/Overlined_Text.odt

Comments welcome.

Martin Whitaker

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] relative hyperlinks become absolute when document is saved

2008-06-03 Thread Andreas Harnack


Hi,

It seems impossible in OpenOffice to assign a relative URL to a 
hypertext link; the link is transformed into an absolute URL 
while saving or loading the document. I came across the problem 
while working on a little project that uses OpenOffice Basic 
macros which try to read the hyperlink URL from a text portion. 
I expected to get the URL as I typed it into the input formed 
but I did not. To reproduce the problem


- create a new empty Writer document,
- insert a hypertext link (Insert  Hyperlink from the menu bar 
or Hyperlink from the Toolbar)
- enter as target a relative URL starting with the current 
directory (like ./file.txt),

- Apply and Close the dialogue,
- open the Navigator and check the target URL of the link just 
created, it should be as entered,

- save and close the file (any name will do)
- reopen the file, open the Navigator and check the URL of the 
link you entered above: The URL as changed to something like 
file://C://file.txt


The same absolute URL is seen in from within a macro.

The 'Save URLs relative to' 'File system' and 'Internet' options 
have both been set. I'm currently using 2.4 under Windows XP and 
2.3 under Suse 10.3 but previous versions showed the same 
behaviour.


There are several issues reporting similar behaviour in other 
circumstances:

- 56629 (also duplicate 61484) for exporting documents to PDF
- 31267 for exporting Writer documents to .doc format
- 22050 and 22107 for saving hyperlinks in spreadsheets

A slightly different yet probably related issues might be 43369 
(also duplicates 68250, 80560) for importing .doc file in Writer.


Issue 56629 is reported to be fixed by a new feature in 2.4, 
issues 31267 and 43369 are still open.


To me it looks like all these issues are related. My guess is, 
that at some point while storing and/or loading a document any 
hyperlink URL is transformed to be absolute one, thereby losing 
the information, how it originally has been entered by the user. 
Instead, OpenOffice controls the format of a URL by several 
options.


Now finally my questions:
Does anybody know whether my assumptions are correct?
Assuming they are, why is done the way it is?

If it in deed turns out to be the root cause of the problems 
above: is there a chance to revise it and how expensive would 
that be?


Should I log an issue for it and if yes, what would be the best 
way to bundle all the related issues?


Thanks for your help,
Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]