[dev] Re: Delete table in cursor position

2011-07-10 Thread Andrew Douglas Pitonyak

On 07/09/2011 01:52 AM, Shameera Rathnayaka wrote:

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.


I believe that the view cursor has a text table property that you can 
check to see if the cursor is in a text table. This is how I do it in Basic


  Dim oVC : oVC = ThisComponent.getCurrentController().getViewCursor()
  If Not IsNull(oVC.TextTable) Then
Print In TextTable   oVC.TextTable.Name
  End If



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


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php

--
-
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help


[dev] Re: Delete table in cursor position

2011-07-10 Thread Andrew Douglas Pitonyak

You should reply to the list, not to me directly.

I did look at this, and there are problems with any solution that I 
tried. For example, first, I tried walking the text table anchor, but I 
repeatedly crashed LO when I tried that. I also found that performing a 
few sneaky things (such as looking at the anchor's text object and then 
creating a cursor at that text object failed when I had a cell that 
contained ONLY a text table (because creating a cursor in that cell did 
not leave any place for that cursor to be except for in the containing 
text table).


Next, I tried another sneaky thing such as simply disposing the text 
table and then checking to see if the view cursor was still in a text 
table. it looks like that approach may work, but I did not pursue it 
past a few very basic tests.


sub MainTable
  Dim oTable
  Dim oVC
  Dim sName$
  ovc = ThisComponent.getCurrentController().getViewCursor()
  Do While NOT IsNull (ovc.TextTable) AND NOT IsEmpty(ovc.TextTable)
oTable = ovc.TextTable
sName = oTable.Name
oTable.dispose()
'Print removed   sName
  Loop
End Sub


On 07/10/2011 11:25 AM, Shameera Rathnayaka wrote:

thanks Andrew,

this is the code in java its worked

  // get text view cursor from the text document
XController xController = 
xTextDocument.getCurrentController();
XTextViewCursorSupplier xCursorSup = 
(XTextViewCursorSupplier) 
UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController);

XTextViewCursor xViewCursor = xCursorSup.getViewCursor();
XPropertySet xCursorPropertySet = (XPropertySet) 
UnoRuntime.queryInterface(XPropertySet.class, xViewCursor);

Object tab = xCursorPropertySet.getPropertyValue(TextTable);
XTextTable table = (XTextTable) 
UnoRuntime.queryInterface(XTextTable.class, tab);

table.dispose();  // delete the table
and now i want to duplicate the complex table, complex table mean it 
has several tables inside it, even if the cursor inside the one of 
it's child table, i want to duplicate the full complex table. for this 
i want to select most outer table.

can anybody help me with this

*Thanks*

On Sun, Jul 10, 2011 at 7:28 PM, Andrew Douglas Pitonyak 
and...@pitonyak.org mailto:and...@pitonyak.org wrote:


On 07/09/2011 01:52 AM, Shameera Rathnayaka wrote:

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.


I believe that the view cursor has a text table property that you
can check to see if the cursor is in a text table. This is how I
do it in Basic

  Dim oVC : oVC = ThisComponent.getCurrentController().getViewCursor()
  If Not IsNull(oVC.TextTable) Then
Print In TextTable   oVC.TextTable.Name
http://oVC.TextTable.Name
  End If




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


-- 
Andrew Pitonyak

My Macro Document:http://www.pitonyak.org/AndrewMacro.odt
Info:http://www.pitonyak.org/oo.php




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


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php

[dev] Cells command no longer functions

2011-04-17 Thread Andrew Douglas Pitonyak
Юрий Брумштейн, I am sending this to the dev mailing list to see if they 
can shed some light on this.


List,

Have VBA compatibility items been removed from OOo in version 3.3?

I do not have 3.2 to test, but, I do see that this does not function in 3.3.


On 04/17/2011 02:46 AM, Юрий Брумштейн wrote:

I have a problem when migrate from version 3.2 to 3.3.
Earlier the operators


OPTION VBASUPPORT 1

k=cells(5,4)
.
cells (6,4)= 5
.
work correctly.

But in 3.3 they don't work
(The 3.3 have installed not I, but the engeneers in our university).
I need the most simple solution to that problem,
because many of my students have wroute macros is 3.2 style operators.
May be I have to connect  dditional library instead of correction
for program texts.
U.Brumshteyn (Astrakhan State University, Russia)


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php

--
-
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help


Re: [dev] Security

2011-02-07 Thread Andrew Douglas Pitonyak
Off hand, this is just as likely to be a problem with the virus software 
simply failing on a valid file. My recommendation is that you take the 
file in question and upload it to an online virus scanning site... I 
have not tested or used any of them in a while, but, here are two 
possibilities (that I found using Google but did not test in any way so 
I cannot speak to them)


http://virusscan.jotti.org/en
http://www.kaspersky.com/scanforvirus



On 02/07/2011 11:11 AM, mk...@netzero.net wrote:

February 7, 20117:52 AM Hello:  I downloaded your program a few months ago and 
I love it. I am still learning how to use it fully.  However, recentlyI had 
cause to wonder about it I have Avira Antivirus. I also have XP Professional 
and Netzero.  A few days ago, I had looked at a video about something and since 
it was an interview with several tapes Isaved it on my favorites and thought 
nothing more of it. Several days later,  my Avira said I had 3 warnings and 2 
hidden objects and an error message. This is what it said: [1] archivetype:TAR 
(tape archriver) gnu/123/123/123/123/123/123/123/123long 
name[Warning internal error!] c:\Program files\Open 
Office.org\3\Basis\program\python-core . 2.6.1\lib\test\testtar.tar 
--
 I don't know how to solve the problem or even know what it is. I also have 
SuperAntispyware, System Care Free, and finally Microsoft's anti root kit 
remover.I have tried everything except the root kit remover - it is really a 
pain.Also since it said internal error - I was not sure what to think. If you 
could shed some light on the problem I would really appreciate it. Thanks, Mary

$65/Hr Job - 25 Openings
Part-Time job ($20-$65/hr). Requirements: Home Internet Access
http://thirdpartyoffers.netzero.net/TGL3241/4d5019f4e74de140119st03vuc


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php



[dev] Disappearing images... not a regression

2010-11-21 Thread Andrew Douglas Pitonyak


OOo Authors are not able to release the getting started user guide 
because of a bug (that I incorrectly thought was introduced with 3.3 
that also exists in the development build that I installed last week).


Download a zipped copy of the master document and sub-files from here:

http://www.oooauthors.org/english/userguide3/gs3/V3_3_revisions/OOo3.3-drafts.zip/view

If you choose to update all or generate a PDF, many of the images are 
not included. Oddly, for me, the images appear to be present in the 
initial load. On my computer, I see this strong in chapter 3 (I noticed 
in others but did not really go looking for them).


I noticed a pattern on the images that did not display:

They are all embedded as a character in a frame.
If you right click on the image you can NOT choose to anchor the image 
to the frame (that option is not available).


Looks like I can make the problem go away by changing the size mode so 
that it is not relative or auto (set a specific size). I make the size 
just a wee bit smaller so that the image does not fill the frame 
horizontally.


I also set the paragraph style for the paragraph containing the image to 
OOoFigure.


When this is done, the frame is a bit larger than the image and the 
image appears in the master and the generated PDF


***

Jean, I carbon copied you since I doubt that you read the dev mailing 
list. Have you opened a bug against this? I was not able to find one. I 
see the same incorrect behavior in the previous release. Unclear what 
the internal problem is. I am careful when I manipulate the file because 
it causes my development build to core dump if I mess with the frames 
too much.





--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


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



Re: [dev] Disappearing images... not a regression

2010-11-21 Thread Andrew Douglas Pitonyak


http://www.openoffice.org/issues/show_bug.cgi?id=115708



On 11/21/2010 03:10 PM, Andrew Douglas Pitonyak wrote:


OOo Authors are not able to release the getting started user guide 
because of a bug (that I incorrectly thought was introduced with 3.3 
that also exists in the development build that I installed last week).


Download a zipped copy of the master document and sub-files from here:

http://www.oooauthors.org/english/userguide3/gs3/V3_3_revisions/OOo3.3-drafts.zip/view 



If you choose to update all or generate a PDF, many of the images 
are not included. Oddly, for me, the images appear to be present in 
the initial load. On my computer, I see this strong in chapter 3 (I 
noticed in others but did not really go looking for them).


I noticed a pattern on the images that did not display:

They are all embedded as a character in a frame.
If you right click on the image you can NOT choose to anchor the image 
to the frame (that option is not available).


Looks like I can make the problem go away by changing the size mode 
so that it is not relative or auto (set a specific size). I make the 
size just a wee bit smaller so that the image does not fill the frame 
horizontally.


I also set the paragraph style for the paragraph containing the image 
to OOoFigure.


When this is done, the frame is a bit larger than the image and the 
image appears in the master and the generated PDF


***

Jean, I carbon copied you since I doubt that you read the dev mailing 
list. Have you opened a bug against this? I was not able to find one. 
I see the same incorrect behavior in the previous release. Unclear 
what the internal problem is. I am careful when I manipulate the file 
because it causes my development build to core dump if I mess with the 
frames too much.







--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


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



Re: [dev] Question about OOo saving file

2010-11-03 Thread Andrew Douglas Pitonyak

On 11/03/2010 05:31 AM, Lin CHENG wrote:

When OOo saving an existed file, I found ZipOutputStream in package module
write directly the original file. What if OOo or System crash when saving
the existed file. It's impossible to recover the file after OOo or system
restart.

My question is why not write to a temp file at first, then overwriting the
existed file by copying the temp file.

Best regards!
My guess (note, just a guess) is that it has to do with file permissions 
(and similar issues).


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


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



Re: [dev] Re: SfxItemPool::Store(): some advice needed

2010-10-14 Thread Andrew Douglas Pitonyak



On 10/13/2010 12:43 PM, Malte Timmermann wrote:

Does it really make sense to store anything larger than USHORT, while
the SfxItemPool API is still USHORT?

I don't think so.


Feeling evil today :-)

Save all your OOo documents, better yet, close them Then Open this!

http://www.pitonyak.org/AndrewMacro.odt

Looking good, feeling safe Now, close the document. Are you glad 
that I told you to close all your other documents first?


--
Andrew Pitonyak



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



Re: [dev] Suppressing Future Version and Recovery Dialog Boxes

2010-10-04 Thread Andrew Douglas Pitonyak
 can you start soffice with -norestore

On 10/04/2010 12:25 PM, Wei Min Teo wrote:
 Hi all,

 I'm trying to read some files programmatically with OO v2.4.x. However, as it 
 runs silently in the background without user input, it sometimes hangs at 
 some dialog boxes. 

 1) I can't seem to get rid of the recovery dialog box that appears to prompt 
 users on whether to recover files. 
 2) Also, if there's a file from a later OO version, there's also a dialog box 
 that pops up to asks if you want to upgrade or postpone to later. I would 
 like to know how to suppress these. 

 I've tried running soffice.exe with the -norestore and -headless switch 
 and it doesn't seem to work. I'll really appreciate any advice to solve any 
 of the 2 problems. 

 Thanks.



 Cheers,

 Wei Min
 

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



[dev] Trying to document New unknown commands in StarBasic

2010-09-15 Thread Andrew Douglas Pitonyak


I am updating my documentation for StarBasic, and, I found a few methods 
that have me stumped for a good explanation:



 RTL
I must use CompatibilityMode(True) before calling RTL.
Defined in methods.cxx. The implementaiton code is very simple:

rPar.Get( 0 )-PutObject( pBasic-getRTL() );

My guess is that RTL stands for run time library, but, I am a bit 
stumped. I did find an example that does something similar (see 
http://openoffice.org.sourcearchive.com/documentation/1:2.4.1-6/vbaapplication_8cxx-source.html), 
but, I really can only make a wild guess.


 EnableReschedule
Defined in methods1.cxx


 Me
Defined in methods1.cxx
Is this used in Base for forms or something similar?
Supported by VB 
http://msdn.microsoft.com/en-us/library/7e58sbke%28VS.71%29.aspx


 GetDialogZoomFactorX/Y
This seems to be used to obtain a scale factor for a dialog so that a 
preview image can be properly sized and display correctly.





I think that I have properly documented the rest of the new statements 
and functions.



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Request for advice on programming for OpenOffice

2010-07-29 Thread Andrew Douglas Pitonyak

 You can

work with the documentation project to review and help with documentation

Work with the QA group to help verify bugs and similar





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



Re: [dev] empty MS Word text fields not empty in Writer

2010-07-07 Thread Andrew Douglas Pitonyak

On 07/07/2010 05:48 AM, Joerg Reschke wrote:

Hi,

we have to migrate a lot of MS Word documents (.doc) to OOo and we have a 
problem with the empty MS Word text fields. The Writer imports these text 
fields, but the value is not empty:
- MS Word displays empty text fields as ° and prints these values as 
space.
- The Writer displays imported empty text fields with @ and prints also the value 
as @.

We've testet with win32 version 3.2.1 and a current development snapshot. The first idea was to replace the 
string @ with   doesn't work, because the search and replace function doesn't 
find the @ value. So, our plan is now to change the import filter and build a own OOo. Can 
anyone help to find the relevant place in the source of the import filter?

Many thanks for your help.
Jörg Reschke
   

Just saw this and wanted to throw out an idea

You are able to enumerate through your text fields and change the values 
in those fields. That would be easier than modifying OOo. That said, 
this sounds like it may be a bug so you should probably file a bug 
report as well.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Support: Cannot get questions answered

2010-06-19 Thread Andrew Douglas Pitonyak

On 06/17/2010 08:04 PM, George Meier wrote:

Open Folks...

I have scoured your support website and written to one of the tech people
who is available.  The site doesn't come close to answering my questions and
I have gotten no response from the tech.


Here's the issue:  Based on your database templates, there appears to be no
one who has built a CRM database that I can use as a starting point.  I have
built one, but it has run into a structural problem that seems to be
purposely built into the program that makes no sense to me.


I have successfully pulled together the initial data I need in an Excel
file, which I saved as a CSV file and have uploaded to an OpenOffice
database table. I then built a form to overlay the table that is supposed to
give me two important functions; one is to put all relevant data on one
screen to support a call center function and the second is for the form to
be an easy way to enter added data as is comes in when an operator is
talking to a customer.  I do all this only to find that the form is
'read-only'.  That there is no way around it. That's the part that seems
purposeful and, I must say, nonsensical.  Why would one build a form into
which nothing can be added?


I have gone round and round on this.  Am I missing something?


By the way, one cannot paste a properly prepared Excel file into the table.
Why?  And once I got data into the table, it was read-only.  These seem to
be un necessary traps that make your product unusable.


Can you help with work arounds?

Thank you. George

George B. Meier
Business Development Consultant
Venture Road
908-591-3243
This sounds correct to me, not because it makes sense, but, because I 
believe that using a spreadsheet as a datasource is a read-only source 
(or has this changed)?


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Re: BigPointerArray, SvPointerArray vs STL containers

2010-06-15 Thread Andrew Douglas Pitonyak



On 06/15/2010 02:55 AM, Mathias Bauer wrote:

On 14.06.2010 12:01, Caolán McNamara wrote:

A code replacement like this creates the question what shall be the goal:

- reduce memory footprint
- improve performance
- remove code duplication
- improve code quality


My primary interest is in code quality. I am sure you are aware of the 
few people with large documents that cause OOo to crash because of the 
limitation in array size. That said, if there is noticeable degradation 
in the memory footprint or performance then the other 99% of the users 
may be upset.


If you want to see first hand what happens, close all other documents, 
then load AndrewMacro.odt and then close it. Boom!


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Re: BigPointerArray, SvPointerArray vs STL containers

2010-06-14 Thread Andrew Douglas Pitonyak

On 06/14/2010 07:05 AM, Bartosz wrote:

I thought I had a patch somewhere to do some of the conversion, but I
can't find it now. I remember that I didn't go ahead with it at the time
because my first cut at it left OOo larger than it was before hand,
which was an annoying result.
 

Great. If you could find this patch, it will be very useful.

Should we create the new class which replace the SvArray (it will be used STL)
or just replace all SvArray to STL directly?

I think the first idea is better to maintenance (but it is a little bit harder 
to implement),
the second idea is a little bit harder to implement, and it will be difficult 
to add some new features to all new arrays.

Best Regards
Bartosz
   


Changing out SvArray, will fix this long standing bug, which will bring 
great joy and happiness to my life.


http://www.openoffice.org/issues/show_bug.cgi?id=84159



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



[dev] StarBasic new behavior on CLng

2010-06-08 Thread Andrew Douglas Pitonyak
I do not know when the change was made, but, CLng used to be able to 
convert negative values represented as Hex, but, not in 3.20. I last 
tested in version 2.x. Here is my latest code to show this:



Sub ExampleCLngWithHex
  On Error Resume Next
  Dim s$, i%
  Dim v()
  v() = Array(HF, HFF, HFFF, H,_
  HF, HFF, HFFF, H,_
  HF,_
  HE,  HFE, HFFE, HFFFE,_
  HE,  HFE, HFFE, HFFFE,_
  HE)
  For i = LBound(v()) To UBound(v())
s = s  i   CLng(  v(i)  ) = 
s = s  CLng(v(i))
s = s  CHR$(10)
  Next
  MsgBox s
End Sub


This fails on CLng(H) rather than returning -1.  Add an extra 
F and it quietly fails internally and returns 0.


Should I open a bug on this or simply document this and move on. yeah, I 
am writing again.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] BASIC Variants, VarType(), and arrays

2010-04-20 Thread Andrew Douglas Pitonyak

On 04/09/2010 08:49 PM, TJ Frazier wrote:
Can I get a little help from someone who knows the code, to confirm my 
experimental observations? Then I can get the documentation updated, 
and fix the BASIC code.


The VarType function can be used on a variant to return the type of 
data therein, as documented. However, when the variant contains an 
array, VarType apparently returns the value x'2000' (decimal 8192) 
plus the simple type of the array variables, which is not documented.


What I'm seeing: If a variant is set with the Array function, VarType 
returns a 200C (8204) code, indicating type variant, which is more 
or less useless. If the variant is set to an existing array:


Dim ai(2) as Integer : ai(0) = 1 : v = ai()

then the VarType returns 2002 (8194), where 2 is the type code for 
integer. Similarly, explicit string arrays return 2008 (8200). 
Values like these occur in property sets.


This affects the OLH and wiki documentation, and BASIC code on the 
wiki and in the released macro libraries. I'll update the wiki, and 
file issues for the rest, once I'm sure what to say.


This agrees with my observations when I last checked the code Bit 14 
is set for Array types. It can return many different types. I have not 
checked the code in a while, but, last I checked... These types were 
returned.


BASIC VarType TypeName Len Description
yes 0 Empty 0 Variant variable is not initialized
yes 1 Null 0 No valid data in an Object variable
yes 2 Integer 2 Integer variable
yes 3 Long 4 Long Integer variable
yes 4 Single 4 Single floating-point variable
yes 5 Double 8 Double floating-point variable
yes 6 Currency 8 Currency variable
yes 7 Date 8 Date variable
yes 8 String strlen String variable
yes 9 Object 0 Object variable
no 10 Error 2 Internal OOo type
yes 11 Boolean 1 Boolean variable
yes 12 Variant 0 Variant variables act like any type
no 13 DataObject 0 Internal OOo type
no 14 Unknown Type 0 Internal OOo type
no 15 Unknown Type 0 Internal OOo type
no 16 Char 1 Internal OOo type, a single text character
yes 17 Byte 1 Internal OOo type, but you can use CByte to create one
no 18 UShort 2 Internal OOo type, unsigned short integer (16 bits)
no 19 ULong 4 Internal OOo type, unsigned long (32 bits)
no 20 Long64 8 Internal OOo type, long (64 bits)
no 21 ULong64 8 Internal OOo type, unsigned long (64 bits)
no 22 Int 2 Internal OOo type, integer (16 bits)
no 23 UInt 2 Internal OOo type, unsigned integer (16 bits)
no 24 Void 0 Internal OOo type, no value
no 25 HResult 0 Internal OOo type
no 26 Pointer 0 Internal OOo type, pointer to something
no 27 DimArray 0 Internal OOo type
no 28 CArray 0 Internal OOo type
no 29 Userdef 0 Internal OOo type, user-defined
no 30 Lpstr strlen Internal OOo type, long pointer to a string
no 31 Lpwstr strlen Internal OOo type, long pointer to a “Wide” Unicode 
string

no 32 Unknown Type 0 Internal core string type
no 33 WString strlen Internal OOo type, “Wide” Unicode string
no 34 WChar 2 Internal OOo type, “Wide” Unicode character
no 35 Int64 8 Internal OOo type, integer (64 bits)
no 36 UInt64 8 Internal OOo type, unsigned integer (64 bits)

Sorry, I don't have time to verify these at the moment, however :-(

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Long file names

2009-10-03 Thread Andrew Douglas Pitonyak
On 09/30/2009 11:38 PM, Wei Min Teo wrote:


 Hi all,
  
 It seems that openoffice has a maximum path name of 260 chars? 

 However, I think the maximum path name for windows is 32,767 and file name is 
 260 in unicode. 

  

 Is it possible to pass in to the loadComponentFromUrl function using a 
 relative path instead of an absolute path?

 Are there any other workarounds? I can only think of making a copying to a 
 temp file, do your work and copy back. 
  
 Thanks.
   
Most of the windows API limits the maximum path to 260 chars. I have
bumped into this limit many times.

There are some unicode extensions that allow for longer path names, as
discussed here:

http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx

I have never bothered to pursue them, because although I have created
path/filename combinations that exceed this, most of the other tools
start failing in very bad ways (Windows explorer, command line tools, etc. )

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



[dev] Debug version to help diagnose a crash from AndrewMacro.odt

2009-09-08 Thread Andrew Douglas Pitonyak


I am the author of a popular macro document for OOo. The document has 
become large, and now, although I can open, edit, and save the document, 
as soon as I close AndrewMacro.odt, OOo crashes.


http://qa.openoffice.org/issues/show_bug.cgi?id=104896

With Windows, there is no error text, it simply crashes. On Fedora, an 
error email is sent. Is there any way that I can use that information, 
or some other information, to attempt to diagnose the precise issue?


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Debug version to help diagnose a crash from AndrewMacro.odt

2009-09-08 Thread Andrew Douglas Pitonyak

On 09/08/2009 10:30 PM, Ariel Constenla-Haile wrote:

Hello Andrew,

On Tuesday 08 September 2009, 22:24, Andrew Douglas Pitonyak wrote:
   

I am the author of a popular macro document for OOo. The document has
become large, and now, although I can open, edit, and save the document,
as soon as I close AndrewMacro.odt, OOo crashes.

http://qa.openoffice.org/issues/show_bug.cgi?id=104896

With Windows, there is no error text, it simply crashes. On Fedora, an
error email is sent. Is there any way that I can use that information,
or some other information, to attempt to diagnose the precise issue?
 

if you are looking for a Debug version, OOo does not build one. But as you
are running Fedora, see if you can reproduce the problem in their version, and
if so, download the debuginfo packages from their repositories (if you
reproduce the crash from within gdb, it will tell the packages you need to
install).
Other option is to build OOo by yourself.

By the way, I could reproduce your issue on Fedora 11 x86_64 with OOo
DEV300_m57, so this can be confirmed and sure some OOo engineer will take a
look soon.

Regards
   
Thank you very much for the information. I must sleep now, but I will 
try a Fedora distribution of OOo tomorrow (I use the standard version 
whenever possible).


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] how to get image position in writer

2009-04-24 Thread Andrew Douglas Pitonyak

First, it is late and I am tired, so I may not be thinking clearly

Pedro wrote:


   XTextViewCursor vc = xViewCursorSupplier.getViewCursor();
   for (short i = 0; i  150; i++) {
   vc.goRight(i, false);
   Point p = (Point) vc.getPosition();
   System.out.println( Position x: + p.X
   +  y: + p.Y);
   }


snip


After execute my code I obtain strange data:
Position x:0 y:0 Position x:185 y:0 Position x:572 y:0 Position x:965 
y:0 Position x:1702 y:0 Position x:2401 y:0 Position x:3239 y:0 
Position x:4311 y:0
Position x:5877 y:0 Position x:7389 y:0 Position x:7682 y:0 Position 
x:7682 y:0 Position x:7682 y:0 Position x:901 y:9682  Position x:3133 
y:9682
Position x:5385 y:9682 Position x:8119 y:9682 Position x:8119 y:9682 
Position x:8119 y:9682 Position x:8119 y:9682 Position x:8119 y:9682
Position x:8119 y:9682 Position x:8119 y:9682 Position x:8119 y:9682 
Position x:8119 y:9682 Position x:8119 y:9682 Position x:8119 y:9682

. . .
I can't understand the meaning of X and Y coordinates, and i don't 
know if this coordinates contain image values or not.

Thanks.


snip


The cursor seems that goRight method move a random distance.
The random amounts are probably because you move the cursor one 
character at a time, and you do not know how wide a character is. Take a 
look at AndrewMacro.odt and read section 7.17  Where is the Display 
Cursor? This is a very short section (page or two). I have not verified 
that this works in 3.x, but it should...


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Simplify Reference Casts by template constructors

2009-03-12 Thread Andrew Douglas Pitonyak

Rainman Lee wrote:

Hi Andrew
I know that implicit conversions usually bring more side effects than
convenience. But it is not the reason that we should give all them up
I think ;)
There is no implicit conversion from std::string to const char*,
because if a string is destroyed, the pointer to its content will be
invalid.
Fortunately, we don't have to consider during reference conversions.
The only thing I am not very sure is whether there are some
ambiguities that may be introduced by this implicit reference
conversion.
Would be grateful to know all problems about it ;)
Thank you!
  


Not able to enumerate all possible problems, because there have been so 
many specific problems.


For example, what happens when you define a conversion from a pointer to 
a boolean? Comparing two pointers might convert to a boolean, which are 
then compared. (see 
http://www.open-std.org/JTC1/sc22/wg21/docs/papers/2004/n1592.pdf)


I have seen methods that require a type as an argument. An argument of 
the wrong type is then automatically converted to match the argument. 
This might be what you desire, and perhaps not.



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Simplify Reference Casts by template constructors

2009-03-11 Thread Andrew Douglas Pitonyak

Frank Schönheit - Sun Microsystems Germany wrote:

Hi Rainman,

  

I have another ideal, it is better and safer than the last one I mentioned.
I add a conversion operator to Reference, instead of a constructor, here is it:

template  class base_interface_type 
inline SAL_CALL operator const Reference base_interface_type  ()
const SAL_THROW( () )
{ return Reference base_interface_type ( get() );   }

I tested some cases, and it works well.
How do you think it? I am not very sure it will work for all situation.



Uhm - implicit conversion operators are Evil (TM) :)

This is a place where my gut feeling says we should sacrifice the little
convenience we could gain (xA = xB instead of xA = xB.get()) for
clarity. At least clarity in reading code, but also clarity in reading
the error messages which the compiler would raise for incompatible xA
and xB :)

Admittedly, this feeling is not backed up by strong arguments, but I am
sure others could come up with some. Stephan
You must be very careful before introducing an implicit conversion. By 
careful, I mean, you should understand the consequences.


Although conversion operators are nice for your intended purpose, they 
compromise type safety and disable the compiler's type-safety checks. 
For this reason, library designers usually do not include conversion 
operators, even though is it inconvenient for the user; for example, 
there is not a conversion operator from (const char *) to std::string 
(and that feels like an obvious one to include if you ignore the side 
effects).


This is a reason that it is recommended that you use the explicit 
keyword before constructors that accept only one argument (because it is 
used as an implicit conversion operator).


Do you need or desire examples of where this can go awry?

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] How get the caller cell

2009-01-31 Thread Andrew Douglas Pitonyak

Let me repeat back my understanding of your problem.

You have a function.

The value that the function will return changes over time based on some 
external cause.


You want the function to track every cell that calls the function and 
then update the value in the cell that called the function.




Well, you can not simply write a new value into the cell, because that 
will overwrite the formula that caused your function to be called. 
instead, you need to cause the cell to call the function again.




Gianpiero Napoli wrote:

Hi Eike,

I need the position to update the cell.

Let say that I have a thread that get some data from somewhere
(socket/file/etc...) and I have a function TakeMyData(int Id).
I want to updtate this cell (the caller) every time i have a new data sample.

So I need:
-  to store the position of the cell somewhere.
- every time I get a new data with Identifier == id i want to update
this cell maybe calline

xSpreadsheet.getCellByPosition(positionStored).setFormun(TakeMyData(id));

so I have two different issues: get the position of the caller cell
and force the update of the cell, in other words force the computation
of the TakeMyData function.

Can you help me?

Thanks a lot,
 Gianpiero

On Sat, Jan 31, 2009 at 1:02 PM, Eike Rathke o...@erack.de wrote:
  

Hi,

On Wednesday, 2009-01-28 10:08:21 +0100, Daniel Rentz wrote:



I want to know the name or the position of the cell that has called this
function. Is it possibile? How I can do that?


It is not possible, because there may not be a caller cell. Caller of a
function could be:

- a cell formula
- a matrix formula (based on a cell range)
- a defined name (a.k.a. named range)
- a condition of a conditional formatting
- and in the near/far future also the condition of a data validation.
  

All these formula expressions, at the time of being interpreted, do have
some cell position associated though. However, the Add-In interface
doesn't pass a position, and I'm not sure it should.

Gianpiero, what would you need the cell position for?

 Eike

--
 PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication.
 Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD




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

  


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] How get the caller cell

2009-01-27 Thread Andrew Douglas Pitonyak

Gianpiero Napoli wrote:

Hi,
in an AddIn I want to store the cell position that call the function of the
addIn.

Let say that I have an AddIn in Java with the function int foo(int par0).
I want to know the name or the position of the cell that has called this
function. Is it possibile? How I can do that?
  
Unless there is something special about an AddIn, no, you can not do 
that. all you know is the data that is sent with the call.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Filter List for OOo 3?

2009-01-27 Thread Andrew Douglas Pitonyak

Albert Law wrote:

Hi,

I'm looking for an OOo3 filter list similar to this one:
http://wiki.services.openoffice.org/wiki/Framework/Article/Filter/FilterList_OOo_2_1

Any ideas where I can find such a list


 Dim oFilterFactory
 Dim oNames

 oFilterFactory = CreateUnoService(com.sun.star.document.FilterFactory)
 oNames = oFilterFactory.getElementNames()

On my computer, oNames is an array with over 200 filter names

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] CALC BUG: fill bitmap lost in Flat XML

2009-01-22 Thread Andrew Douglas Pitonyak
Han Bo wrote:
 Hi all,

 I find a bug by an accident. That is when I filled a chat's background with a 
 bitmap in a CALC document, the bitmap gone after I reload the document. I 
 also find the bitmap which I selected in Chart Wall dialog disappeared. This 
 situation just happens when saved the document as a Flat XML. Yet, I've no 
 idea about where to find the reason.

 Anybody is interested in this bug or has some advice for me to fix it? I 
 appreciate for any help.

 Best Regards,
 hanbo
   
If I understand you correctly, the bug is:

* Create a chart
* Set the background to a bitmap
* Save the document
* Load the document

the bitmap is gone.



-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Re: can not

2008-12-14 Thread Andrew Douglas Pitonyak

Nguyen Vu Hung wrote:

On Sat, Dec 13, 2008 at 12:45 AM, Michael Stahl michael.st...@sun.com wrote:
  

On 12/12/2008 14:43, Nguyen Vu Hung wrote:


FYI,

I see a lot of can not in the file connectivity/source/resource.po.
As far as I can tell, it should be cannot.
  

hmm, interesting question :)


It is not a question but a proposal :D
And I said, it *SHOULD* be cannot while
both cannot and can not are understandable.

FYI,

cannot on google: 514M hit.
can not on google 78M hit.
  


According to George Bernard Shaw, The single biggest problem with 
communication is the illusion that it has taken place.


Most authorities consider both forms to be standard and considered 
acceptable for general use. By most, I have never seen any authority 
that claimed that one form was wrong. I have, however, seen slightly 
different meanings assigned to the two constructs. Although there may be 
differences in meaning between can not and cannot, my opinion is 
that the general readership will not understand the difference; and in 
all likelihood, neither will the writer.


The more common usage appears to be cannot, and, as such, I typically 
use cannot rather than can not.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] UserFields Does not Update in the Document Content

2008-12-04 Thread Andrew Douglas Pitonyak



[EMAIL PROTECTED] wrote:
Hello , 


You have helped me many times and now i need help again..I tried in the
previous posts to find it but i had no lack..
What i tried to do is change through java the value of a userfield..
That i have managed to do it..What is impossible is to update the field in
the document..
I have tried 2 ways but none of them works..

//The first method finds the name of userfield in the list and changes its
content.. Though nothing goes wrong and when i open the fields i can see the
new value , i don't see its value on the document..There i see the old value
not the new one..
  


Do they update (display properly) if you use Tools  Update  Update All


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] In what programming language is Open Office written....

2008-12-01 Thread Andrew Douglas Pitonyak

Primarily in C++.


Tony Glans wrote:

Hi  2008-12-01

 

 


I would like to know in what programming language(s) Open Office is written.

 


Why doesn't it show anywhere on techspec at www.openoffice.org
http://www.openoffice.org/  ?  - PLS  - let this info be visible on the
site but also pls 

Do not publish my email address under QA. 

 

 


Best regards

 

Tony Glans 

 

 



  


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Re: Adding an Instant Messenger to open office as a component or extension into the installer

2008-11-20 Thread Andrew Douglas Pitonyak



Michael Schmidt wrote:

Furthermore we want that OOo components allow to send other users on the
messeger OOo Component features.
  


I do not understand this statement. Do you mean ability to send a 
document to someone?


Is the vision that this will support one protocol, or many? At work, I 
communicate with other developers on the team using Jabber. I would not 
be likely to use a messenger that did not use what ever my favorite 
protocol of the moment (or the one dictated by my employer). I want to 
understand the scope of the project.


A frequent question that I see on the list is: Does OOo contain 
outlook? When I think of the email software and messenger software 
included with Windows, I notice that they work independently of their 
office product. In this case, independently means that I can use them 
without installing MS Office.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



[dev] Differences between release candidate, development build, and final

2008-08-12 Thread Andrew Douglas Pitonyak


Neither the development builds, nor the beta builds, have GUI 
integration for Linux.


Will the release candidate have GUI integration?

I would like some better screen shots and instructions for an 
installation article, and I would like to report an expected timeline to 
the publisher.


Based on the Wiki, I expect a release candidate around August 25.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Re: .odt Files Print From UI, Not From API Using Java

2008-07-09 Thread Andrew Douglas Pitonyak

So the problem is with one, and only one, computer

The problem is with .odt files and Not with .sxw files...

Is there anything special about her printer?

- Is the printer local or networked?

- Are you printing to the default printer, or a named printer?

- Multiple output bins?

- Can you install a PDF or a text printer that routes the text to a file 
and then look at the file?


- Can you simply route that printer to a file and take a look at what 
happens?



I vaguely remember something about printing to one printer when 
something else is set as default in the file...


After she prints a particular .odt file to that printer and then saves 
the file, what happens if the program prints the file to the same printer?




Hal Vaughan wrote:

Andrew Douglas Pitonyak wrote:

  

What happens if you do not load the document as hidden?



That would create a serious problem on my clients' systems, since I've
noticed that dramatically slows down the process (I don't use the GUI at
all and open a hidden instance of OOo from my program -- forgot the specs
that do that.)  I can test it on my own system when I get XP up and running
again, though.  It might be difficult to make that change for my client's
system since their boss is quite tight about the computers.  He has no
computer background so any change I make is met with suspicion about what
I'm trying to get past him.

What's odd is it only happens on this one computer -- but we all know if one
client has an issue, it could happen to others at some point.

I'll see what I can find on this and if I can get him to let me upload a
patched version and check it out.

Thanks!

Hal

  

Hal Vaughan wrote:


I have a client who is using OOo 2.0 on Winodws XP as part of a Java
program
I've written.  I'd like to upgrade, but since my software has to install
my program and OOo -- and know where OOo is being installed to, it's
quite
difficult to upgrade my software every time OOo upgrades.  In other
words, using a later version is not a desirable solution, since it takes
me a day or two whenever I have to use the new OOo installer and make
sure everything works on both Linux and Windows.

When she runs my program on her computer, it generates a number of .odt
or .sxw files.  Once generated these files could sit for a while or could
be used immediately for printing.  In this case, it turns out that when
we generate .sxw files, they're printing just fine, but any .odt files
are not
printing -- they show up as blank sheets of paper.  (In call cases the
files are only 1 page long so I have no way of checking the length of the
documents when they print.)  As if that weren't odd enough, if she runs
OOo and uses the GUI and loads them on her own and then prints them, they
print fine!

In other words, when I load files through the Java API, if they're .sxw
they print, if they're .odt, a blank page prints instead, but loading any
of the files through the GUI allows them to print fine.

This version of my program has worked on other XP systems previously. 
I'd test it myself, but my XP system is temporarily down and likely won't

be up until I can transfer data from the other partitions and put in a
new hard drive.

I've included my Java code to open and print the OOo files below.

I'm hoping someone will recognize this as something simple that I'm
overlooking or that there's an issue or bug that I just haven't been able
to find.  Whatever it is, any help is appreciated!

Thanks!

Hal

Open file:

private void openDoc() {
boolean bError = false;
if (oooDoc != null) {
sysConfig.log(warning, attempting to open a second
document:  +
fileName + , current document:  + docURL);
return;
}
docURL = makeURL(fileName);
PropertyValue[] oProps = new PropertyValue[1];
oProps[0] = new PropertyValue();
oProps[0].Name = Hidden;
oProps[0].Value = new Boolean(true);
try {
oooDoc = oLoader.loadComponentFromURL(docURL, _blank,
0, oProps);
} catch (Exception  e) {
sysConfig.log(error, Error: \ + e + \ in opening
document:  +
fileName);
bError = true;
}
if (!bError) docOpen = true;
return;
}

MakeURL:

private String makeURL(String sFile) {
if (sFile.startsWith(private:factory/s)) {return sFile;}
if (sFile.startsWith(file:)) {return sFile;}
while (sFile.startsWith()) {sFile = sFile.substring(1);}
while (!sFile.startsWith(///)) {sFile = / + sFile;}
if (sysConfig.getMode(ostype).toLowerCase().indexOf(windows)
= 0) {
sFile = sFile.replace('\\', '/');
}
sFile = file: + sFile;
return sFile;
}

Print a document:

private void docPrinter () {
int i = 0;
if (sysConfig.getMode

Re: [dev] current cursor position in XTable

2008-07-09 Thread Andrew Douglas Pitonyak
If only one cell is selected, then you can simply obtain the 
CurrentSelection property from the document. Things are more complicated 
if you must worry about multiple things being selected... it looks like 
you can also grab the selection property from the current controller.


If you want only the cell that contains the cursor, and you want to 
ignore the rest, you can tell the controller to select an empty range 
that was created by the document. The following subroutine does the 
following:
1.Save the current selection. This is useful if more than a single cell 
is active.
2.Select an empty range so that only the cell with the cursor is 
selected. The cell is selected with an outline around the cell, but it 
is not completely blacked out. If you use the controller to select a 
range, this method can also be used to change the selection from a 
completely selected cell, to merely an active cell.
3.Use the CellAddressConversion service to obtain the address of the 
active cell. This is new to 1.1.1, part of the linked controls 
implementation.

Listing 2.12: Find the active cell.
REM Author: Paolo Mantovani
REM email: [EMAIL PROTECTED]
Sub RetrieveTheActiveCell()
 Dim oOldSelection 'The original selection of cell ranges
 Dim oRanges'A blank range created by the document
 Dim oActiveCell   'The current active cell
 Dim oConv  'The cell addres conversion service
 REM store the current selection
 oOldSelection = ThisComponent.CurrentSelection

 oRanges = 
ThisComponent.createInstance(com.sun.star.sheet.SheetCellRanges)

 ThisComponent.CurrentController.Select(oRanges)
 'get the active cell!
 oActiveCell = ThisComponent.CurrentSelection

 REM a nice service I've just found!! :-)
 oConv = 
ThisComponent.createInstance(com.sun.star.table.CellAddressConversion)

 oConv.Address = oActiveCell.getCellAddress
 Print oConv.UserInterfaceRepresentation
 Print oConv.PersistentRepresentation

 'restore the old selection (but loosing the previous active cell)
 ThisComponent.CurrentController.Select(oOldSelection)
End Sub




Dinesh Chothe wrote:

XTextViewCursorSupplier xViewCursorSupplier =
( XTextViewCursorSupplier )UnoRuntime.queryInterface (
XTextViewCursorSupplier.class, xTextDocument );
 For getting current position from current document I did as above.
Now while doing this same for spreadsheet it doesnt work by passing
xSpreadsheet instead of   xTextDocument.
How would I access current active cell in spreadsheet?

On Tue, Jul 8, 2008 at 5:26 PM, Andrew Douglas Pitonyak [EMAIL PROTECTED]
wrote:

  

Dinesh Chothe wrote:



Hello,
 I want to get current position of cursor from documents XTable or
XTextDocument
   also for calc I want to get current cells position. How do I?
 I am using OoSDK2.3 and java...


  

I believe that the view cursor has a property TextTable and a property
Cell. The cell has a property CellName.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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






  


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] current cursor position in XTable

2008-07-08 Thread Andrew Douglas Pitonyak

Dinesh Chothe wrote:

Hello,
  I want to get current position of cursor from documents XTable or
XTextDocument
also for calc I want to get current cells position. How do I?
  I am using OoSDK2.3 and java...
  
I believe that the view cursor has a property TextTable and a property 
Cell. The cell has a property CellName.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] .odt Files Print From UI, Not From API Using Java

2008-07-08 Thread Andrew Douglas Pitonyak

What happens if you do not load the document as hidden?

Hal Vaughan wrote:

I have a client who is using OOo 2.0 on Winodws XP as part of a Java program
I've written.  I'd like to upgrade, but since my software has to install my
program and OOo -- and know where OOo is being installed to, it's quite
difficult to upgrade my software every time OOo upgrades.  In other words,
using a later version is not a desirable solution, since it takes me a day
or two whenever I have to use the new OOo installer and make sure
everything works on both Linux and Windows.

When she runs my program on her computer, it generates a number of .odt
or .sxw files.  Once generated these files could sit for a while or could
be used immediately for printing.  In this case, it turns out that when we
generate .sxw files, they're printing just fine, but any .odt files are not
printing -- they show up as blank sheets of paper.  (In call cases the
files are only 1 page long so I have no way of checking the length of the
documents when they print.)  As if that weren't odd enough, if she runs OOo
and uses the GUI and loads them on her own and then prints them, they print
fine!

In other words, when I load files through the Java API, if they're .sxw they
print, if they're .odt, a blank page prints instead, but loading any of the
files through the GUI allows them to print fine.

This version of my program has worked on other XP systems previously.  I'd
test it myself, but my XP system is temporarily down and likely won't be up
until I can transfer data from the other partitions and put in a new hard
drive.

I've included my Java code to open and print the OOo files below.

I'm hoping someone will recognize this as something simple that I'm
overlooking or that there's an issue or bug that I just haven't been able
to find.  Whatever it is, any help is appreciated!

Thanks!

Hal

Open file:

private void openDoc() {
boolean bError = false;
if (oooDoc != null) {
sysConfig.log(warning, attempting to open a second document: 
 +
fileName + , current document:  + docURL);
return;
}
docURL = makeURL(fileName);
PropertyValue[] oProps = new PropertyValue[1];
oProps[0] = new PropertyValue();
oProps[0].Name = Hidden;
oProps[0].Value = new Boolean(true);
try {
oooDoc = oLoader.loadComponentFromURL(docURL, _blank, 0, 
oProps);
} catch (Exception  e) {
sysConfig.log(error, Error: \ + e + \ in opening document: 
 +
fileName);
bError = true;
}
if (!bError) docOpen = true;
return;
}

MakeURL:

private String makeURL(String sFile) {
if (sFile.startsWith(private:factory/s)) {return sFile;}
if (sFile.startsWith(file:)) {return sFile;}
while (sFile.startsWith()) {sFile = sFile.substring(1);}
while (!sFile.startsWith(///)) {sFile = / + sFile;}
if (sysConfig.getMode(ostype).toLowerCase().indexOf(windows) = 0) {
sFile = sFile.replace('\\', '/');
}
sFile = file: + sFile;
return sFile;
}

Print a document:

private void docPrinter () {
int i = 0;
if (sysConfig.getMode(printstate).equals(false)) {
return;
}
if (oooDoc == null) {
sysConfig.log(warning, null doc, could not print:  + 
docURL);
return;
}
String sPrinter = sysConfig.getMode(printer);
XPrintable oPrint = (XPrintable)
UnoRuntime.queryInterface(XPrintable.class, oooDoc);
PropertyValue[] printOpts = new PropertyValue[2];
PropertyValue[] checkOpts = null;
printOpts[0] = new PropertyValue();
printOpts[0].Name = Name;
printOpts[0].Value = sPrinter;
printOpts[1] = new PropertyValue();
printOpts[1].Name = Wait;
printOpts[1].Value = new Boolean(true);
try {oPrint.setPrinter(printOpts);} catch (Exception e) {
sysConfig.log(error, cannot print document:  + 
docURL);
return;
}
checkOpts = oPrint.getPrinter();
for (i = 0; i  checkOpts.length; i++) {
if (checkOpts[i].Name.equals(Name)) {
if (!checkOpts[i].Value.equals(sPrinter)) {
sPrinter = +sPrinter+;
printOpts[i].Value = sPrinter;
try {
oPrint.setPrinter(printOpts);
} catch (Exception e) {
sysConfig.log(error, cannot print 
document:  + docURL);
return;
}
}
break;
}
}
   

Re: [dev] Re: OOo crash for documents with heavy formatting

2008-05-20 Thread Andrew Douglas Pitonyak


Andriy Rysin wrote:
I am working on a dictionary (actually about a dozen of them) and I 
have only 4 main styles, e.g. MyBold, MyItalic, MyAux and MyNormal. 
What I have a lot is uses of those styles: let's say I have 2 
positions in one dictionary and each position may contain several 
words in each style. That'll make at least 80K of style instances, 
which breaks OOo.
I think that I just got it. The problem is not too many styles, but 
rather, too many INSTANCES of a style.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Re: OOo crash for documents with heavy formatting

2008-05-19 Thread Andrew Douglas Pitonyak

Andriy Rysin wrote:

Andrew Douglas Pitonyak wrote:

Andriy Rysin wrote:

Hi all,

I was just wandering if necessary level of attention is given to the 
OOo crash problem (84159) - it was reported before 2.4 with target 
3.x but it seems after the bug was confirmed the interest in it was 
lost. The bug basically renders OOo unusable for documents with 
heavy formatting. It affects all patforms and crash-producing 
document is very easy to create - just have more than 2^16 text 
styles. If such document is opened it will crash the program on 
close and often on some formatting operations, like style change.


I'd appreciate if somebody can provide any information on when this 
problem may be taken care of.


Thanks,
Andriy

This is very interesting

What happens if a master document is used, does this limitation cover 
only the individual documents, or the combined total of all documents 
in the master?


That was interesting idea. I've just tried to split one of my 
documents which produce a crash into two smaller ones which don't 
crash separately. If I create the master the problem is still there, 
it produces effect I've seen occasionly before with my documents - OOo 
does not crash but hangs instead - usually no CPU usage (sometimes CPU 
is loaded), no window refresh, I've waited for a while (once I left it 
for an hour just to make sure) but in the end I always have to kill 
soffice.bin
Thanks for checking on this for me... I must admit that I do have 
another question. Why do you have so many styles? Are these internal 
styles, or are these specifically created styles? I am curious as to the 
mechanism used to create these styles?


Using OOo 3.0 beta, I created a small text document. I then chose three 
random words and made them bold.


OOo created a single internal style named T1 (see below).

office:automatic-styles
 style:style style:name=T1 style:family=text
   style:text-properties fo:font-weight=bold 
style:font-weight-asian=bold style:font-weight-complex=bold/

 /style:style
/office:automatic-styles

The same internal style was used for all three words.

I find it difficult to fathom how there can be so many different 
combinations of styles if you create and use them yourself unless the 
styles are created automatically. If these styles are created 
automatically, is there a possibility to programatically combine styles 
with the same attributes?


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Helping.......

2008-05-19 Thread Andrew Douglas Pitonyak

Pat McBride wrote:

I have experience in writing databases in dBase III and IV, and in writing
user manuals for dBase and Oracle.  It's been some time since I did this
(1985 to 1991); I was also a Novell CNE from 1996 to 1998, and wrote the
MCSE exam for Windows 95 (which I failed by about 5 points).  I've been an
instructor in Electrical subjects, and served in other instructional fields.
I have 5 years experience in the QA field, although it was in mechanical
devices there was a fair amount of electrical, electronics, and computer
topics that arose.

I can also assist users in a help desk format, I have experience on
Handymanwire as a moderator, running a panel on electrical subjects.

I'm finally retired, and will have time to help out with the project;
actually I'm looking forward to it.  I'll be unavailable for the last week
of June and the first 2 weeks of July as my wife and I will be travelling to
the Yukon.

My home phone number is (250) 296-3501, my e-mail address is
[EMAIL PROTECTED]

Pat McBride
  
You may also be able to help in the documentation project with respect 
to database access.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Cannot read document

2008-05-11 Thread Andrew Douglas Pitonyak

Peter,

Although you can NOT send the document, can you create a document with 
similar structure in WORD that behaves the same way, and then attach it 
to a bug report?


Peter Nabbefeld wrote:

Hello!

I've got a strange word document, which I cannot correctly open 
with OO.org 2.4. It has a structure like this:


paragraph
   picture/
   text/
/paragraph
...
(more paragraphs)
...
table
   tr
  td!-- empty --/td
  tdreference to a paragraph//td
  td!-- empty --/td
   /tr
   ...
   (more rows like above)
   ...
   (some other rows)
/table

Of course, this is only some kind of pseudo-code ;-)

The document itself is shown in OO, the table is only shown without the rows
containing the references. Sorry, but cannot send You the document :-(


Kind regards

Peter Nabbefeld


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

  


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Oo writer's problem

2008-05-11 Thread Andrew Douglas Pitonyak

Dinesh Chothe wrote:

  Hello,
   I am developing writer based application using
java,oo sdk and netbeans.
 In this application object has to travels from starting of
document up to end  of document.
 While moving it may come across different txt
contents,images,tables,graphs etc...
 Now this object has to access only text contents  its
properties(like font,bold,size etc),it may
   from tables or graphs etc.
 After getting I am replacing it with some other text then
it should be replace with at exact positions with
as per its previous properties.
Can anybody guide me for how to do this?
  

This is a very big question.

Download my free macro document and then start reading from section 7.16 
Traverse paragraphs (text cursor behavior). My expectation is that this 
is not of much use to you, but, if you skim a few sub-sections, you will 
eventually come to 7.16.3  What does it mean to enumerate text content? 
This section gets you started on enumerating paragraphs. Consider the 
following macro:


Sub EnumerateContent
 REM Author: Andrew Pitonyak
 Dim oParEnum 'Enumerator used to enumerate the paragraphs
 Dim oPar 'The enumerated paragraph
 Dim oSectionEnum 'Enumerator used to enumerate the text sections
 Dim oSection 'The enumerated text section
 Dim s As String  'Contains the enumeration
 Dim i As Integer 'Count the paragraphs

 REM Enumerate the paragraphs.
 REM Tables are enumerated along with paragraphs
 oParEnum = ThisComponent.getText().createEnumeration()
 Do While oParEnum.hasMoreElements()
   oPar = oParEnum.nextElement()

   REM This avoids the tables. Add an else statement if you want to
   REM process the tables.
   If oPar.supportsService(com.sun.star.text.Paragraph) Then

 i = i + 1 : s = 
 REM Now, enumerate the text sections and look for graphics that
 REM are anchored to a character, or as a character.
 oSectionEnum = oPar.createEnumeration()
 Do While oSectionEnum.hasMoreElements()
   oSection = oSectionEnum.nextElement()

   If oSection.TextPortionType = Text Then
 REM This is a simply text object!
 s = s  oSection.TextPortionType   : 
 s = s  oSection.getString()  CHR$(10)
   Else
 s = s  oSection.TextPortionType   :   CHR$(10)
   End If
 Loop
 MsgBox s, 0, Paragraph   i
   End If
 Loop
End Sub

This enumerates sections based on common formatting. The problem, 
however, is that you can not do something simple like 
oSection.setString(I am replacement text) and have it use the same 
properties. What happens, is that properties are messed up. I created 
a simple test, and then set every text section to some simple text like 
XyzzyX, and I watched the effects ripple through. It was horrifying..


Perhaps you can do something similar to the following:

 Dim oStart : oStart = oSection.getStart()
 Dim oEnd   : oEnd = oSection.getEnd()
 Dim oText  : oText  = oStart.getText()
 Dim oCurs
 oText.insertString ( oEnd, XyzzyX, False)

Now, remove text from oStart to oEnd.

I was going to finish the solution, but my daughter needs attention.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] OOo crash for documents with heavy formatting

2008-05-11 Thread Andrew Douglas Pitonyak


Andriy Rysin wrote:

Hi all,

I was just wandering if necessary level of attention is given to the 
OOo crash problem (84159) - it was reported before 2.4 with target 3.x 
but it seems after the bug was confirmed the interest in it was lost. 
The bug basically renders OOo unusable for documents with heavy 
formatting. It affects all patforms and crash-producing document is 
very easy to create - just have more than 2^16 text styles. If such 
document is opened it will crash the program on close and often on 
some formatting operations, like style change.


I'd appreciate if somebody can provide any information on when this 
problem may be taken care of.


Thanks,
Andriy

This is very interesting

What happens if a master document is used, does this limitation cover 
only the individual documents, or the combined total of all documents in 
the master?


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Calc question

2008-02-12 Thread Andrew Douglas Pitonyak

Download AndrewBase.odt

Listing 49 has a macro that demonstrates obtaining outlook addresses.

It does not, however, access the outlook object. So, it will not help 
you if you wanted to manipulate outlook rather than just look at the 
address book.


Geri Igou wrote:

I am trying to move a macro from Excel to Calc.  It accesses the Outlook
Application object.  In Excel I click on Tools in VBA, click on
reference and click on the Microsoft/Office/Office12 to set this up.   I
need to know how to set up this reference in CALC.  Where can I go for
an answer?   I posed the question in on the Forum, but got no response.

 


I am trying to execute:

 


Dim  objOL As Outlook.Application

 


I get the response:   Unknown data type.

 


Can you help me?

 

 

 


Geri Igou

ECS Network Solutions

[EMAIL PROTECTED]

940-230-1550

 



  


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Re: About the OOo dialog layouting patches

2007-12-02 Thread Andrew Douglas Pitonyak

If I understand correctly...

We start with an undesirable current state of things.

Christian Lippka - Sun Microsystems GmbH - Hamburg wrote:
in OOo you select some content, then you fire up a dialog, make 
changes to 50+ settings

and hope for the best ( working undo ).

Next, a quote of working better solutions in OOo

When you look at the competition, or when you
even look at what IBM has done to their private OOo clone, or what 
RedOffice has done.
All those mostly needed settings in a nice non modal panel. You choose 
something, you instantly

see the changes in your document.
Is it sufficiently good that we can use what has already been done? We 
have limited resources; ok, everyone has limited resources.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] start contributing

2007-11-15 Thread Andrew Douglas Pitonyak

[EMAIL PROTECTED] wrote:
Hello OpenOffice.org Participants! My name is Jennifer. I'm a graphic design student that would love to get involved with your quest in helping thousands by writing HOW-Tos and Tutorials. Please let me know what I should do next now that I've introduced myself. 
 
Sincerely, 
 
Jennifer
  
Jennifer, if you have trouble subscribing to the authors mailing list 
(you posted to the dev@openoffice.org list), send me a personal email to 
[EMAIL PROTECTED] We can really use your help.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Basic Calling a DLL on windows with character array argument

2007-10-27 Thread Andrew Douglas Pitonyak
Because I received no answer, I assume that either no one knows, or no 
one cares. Just in case someone does care, however...


I wrote a DLL that accepts a string.

I can create a string in OOo containing null characters. For example: 
ABC\0\0D


The DLL receives only ABC and on return, the string has been changed to 
only be ABC. Thats life, deal with it.


OK, so I did deal with it. I now encode my strings in HEX as:

41424344

In my DLL, which acts as a wrapper, I convert it back to the desired 
string and call the destination DLL. I then encode the returned string 
back into HEX, and send that back to OOo... Life is good!


OOo accepts Dim x As String*3, but this declares a normal string, not 
a string with fixed length.


Andrew Douglas Pitonyak wrote:

Using OOo 2.3 on Windows, I need to call a DLL from StarBasic.

The argument to the DLL is a simple array of characters. Consider a 
super simple example:


Type FOO1TYPE
 Dim name1 As String * 10
 Dim rank1  As String * 10
End Type

Type FOO2TYPE
 Dim name2 As String * 10
 Dim rank2  As String * 10
 Dim foo As FOO1TYPE
End Type

Normally, I would declare my DLL call similar to

Declare Sub MethodName Lib wow.dll (arg As FOO2TYPE)

Although I can do this from VB, I have many problems with this in 
StarBasic. To avoid the issues, I created a string with 40 characters 
in to, and tried to make a call using a string. I did not use this 
code, it is simple and not efficient.


Declare Sub MethodName Lib wow.dll (arg As String)

Dim i As Integer
Dim s As String
For i = 1 To 40
 s = s  Chr(0)
Next
Mid(s, 1, 5, 12345)
Mid(s, 10, 3, 123)

If I inspect my string, things look as I expect, but as soon as I make 
a call, things change.


MethodName s

Now, if I inspect the string, the string length is 5 rather than 40. I 
assume that this is related to the way that the string is converted 
and sent around. I do not know what string value makes it to the DLL.


My next thought was that I could avoid this problem all together by 
creating an array of type Byte.


Declare Sub MethodName Lib wow.dll (arg(0 To 39) As Byte)

This does not seem to work.

I am considering writing a Calc-Addon so that I can hide the DLL call 
in C++. Any help is appreciated.




--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



[dev] Basic Calling a DLL on windows with character array argument

2007-10-23 Thread Andrew Douglas Pitonyak

Using OOo 2.3 on Windows, I need to call a DLL from StarBasic.

The argument to the DLL is a simple array of characters. Consider a 
super simple example:


Type FOO1TYPE
 Dim name1 As String * 10
 Dim rank1  As String * 10
End Type

Type FOO2TYPE
 Dim name2 As String * 10
 Dim rank2  As String * 10
 Dim foo As FOO1TYPE
End Type

Normally, I would declare my DLL call similar to

Declare Sub MethodName Lib wow.dll (arg As FOO2TYPE)

Although I can do this from VB, I have many problems with this in 
StarBasic. To avoid the issues, I created a string with 40 characters in 
to, and tried to make a call using a string. I did not use this code, it 
is simple and not efficient.


Declare Sub MethodName Lib wow.dll (arg As String)

Dim i As Integer
Dim s As String
For i = 1 To 40
 s = s  Chr(0)
Next
Mid(s, 1, 5, 12345)
Mid(s, 10, 3, 123)

If I inspect my string, things look as I expect, but as soon as I make a 
call, things change.


MethodName s

Now, if I inspect the string, the string length is 5 rather than 40. I 
assume that this is related to the way that the string is converted and 
sent around. I do not know what string value makes it to the DLL.


My next thought was that I could avoid this problem all together by 
creating an array of type Byte.


Declare Sub MethodName Lib wow.dll (arg(0 To 39) As Byte)

This does not seem to work.

I am considering writing a Calc-Addon so that I can hide the DLL call in 
C++. Any help is appreciated.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] commercial use of oo api (license issue)

2007-09-18 Thread Andrew Douglas Pitonyak

I am not a lawyer and I am not officially related to OOo.

But... Let me point out that people are able to sell OOo, which might 
imply that you can include it with your product.



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: Vá: Re: [dev] Disabled Reco rd macro menu in Impress and Draw

2007-08-21 Thread Andrew Douglas Pitonyak
Even better, will a new and improved macro recorder be implemented? I do 
not remember seeing one in any road map, but I might have missed it.


Kálmán Szalai wrote:

Thank you for the information.
Are you planning to reimplement this part and make it available under 
Draw/Impress?
 
 
KAMI


  

Dátum: H, aug. 20, 2007, idő:  8:44 de., a(z) [EMAIL PROTECTED] üzenetben, Mathias 
Bauer [EMAIL PROTECTED] írta:


KAMI wrote:

  

Hi!

Few minutes ago someone said on IRC channel the Record Macro menu 
elements in the Tools are disabled in Impress and Draw. I can confirm it 
hoewer it works well in Writer and Calc. What is the problem with it? 
Why is it disabled?


..
Because it is not implemented. The macro recorder builds upon some
functionality of the old sfx2 framework. This part was never implemented
reliably in Draw/Impress and the residues have been removed after we
moved to the new UNO based API. Writer and Calc where a bit more lazy
removing that parts and so it was possible to use it again.

Ciao,
Mathias

  


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] what's the difference between paste and paste special when I paste somthing into OOo application

2007-07-18 Thread Andrew Douglas Pitonyak
gaopeng wrote:
 Hi , all

 Would anybody tell me what's the difference between paste and paste 
 special when I paste somthing into OOo application ? and 
 why do we set the copy option(paste special and paste)

 the paste special and paste  option are shown , when you click Edit  
 menue item in the ooo writer or other ooo application 


 Best Regards
 Gao Peng
When you copy something to the clipboard, it is usually copied to the
clipboard in more than one format. For example, if you copy something
from Writer to the clipboard, it might copy the object in an

OOo Text format including all associated styles and such. This format is
only usable by OOo, but allows you to paste into an OOo document and
have all the required styles and lose no formatting.

It probably also includes a Rich Text Format, which is available to
applications other than OOo and still includes formatting information.

A normal text version without certain formatting is also usually present.

If you use Paste Special, it lets you choose the version that you should
paste. I am very inclined to use this to paste text copied from a web
page rather than let OOo try to recreate the formatting information from
the HTML. (for example).

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] cannot seem to find info on base macros

2007-07-01 Thread Andrew Douglas Pitonyak

http://www.pitonyak.org/database/

download AndrewBase.odt

Also, check out the Base forum at the OOoForum.
bram wrote:

Hi list,

I don't know where to ask these things so forgive if this is not the 
right place.


I am going to use openoffice as a filemaker alternative and have some 
questions.
Is there good getting started documentation on openoffice base and 
macros ?
Is there a way to program in basic and use autocompletion so you don't 
have to know extactly what to type ?
Is there good documentation on all the objects in base and what they 
do, I find it rather hard to find what methods are available for an 
object.

I know some python, would this be easier for macro programming ?


Where can I find these kind of things ?

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



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Suggestion

2007-06-21 Thread Andrew Douglas Pitonyak

http://www.openoffice.org/issues/show_bug.cgi?id=1761

Do I understand correctly that this will be fixed in 2.3?

Brooks Golden wrote:

I am a big fan of OpenOffice and I think it is a great cause and all but
there's just one thing that really annoys me.  When I'm making a text
document, I like to view what I am typing at 100% zoom like every 
other text
editor I have ever used.  Although, when you zoom to 100% in 
OpenOffice (as
opposed to the page width which is 109%), the page aligns the left 
side of
the the screen instead of the center anymore.  Granted, it is just a 
minor

peeve of mine, but I really wish there was a way to align the page in the
center of the screen.  Microsoft Word centers the page at any 
magnification
you zoom to and that would be fine with me as well, just as long as 
there is
some way to center the page.  Perhaps you have never really thought 
about a
small difference like that but maybe you could incorporate a way to 
change
that in a future update, that would be excellent of you.  I appreciate 
your

time, thank you.



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



[dev] Re: Query: consultancy for building OOo

2007-05-31 Thread Andrew Douglas Pitonyak

Ian,

I have never done this in either windows or Linux.

I know one person who has done this in a VMWare environment with Linux.

I copied the dev mailing list in case someone there knows of someone who 
might have the required abilities and/or knowledge.


I can make some more queries when I return, which will hopefully be by 
Sunday.



ian mcritchie wrote:

Hi Andrew,

Thanks for your previous help.

Given your extensive experience with OOo, I was hoping you might be 
able to point us in the direction of an individual or company who may 
be willing to act as a paid OOo developer/consultant.


We have a emerging requirement to build OOo from src on the Windows 
platform for the next generation of our product. However, as I'm sure 
you are aware, the build process (particularly for Windows) is not 
straightforward.


The main task for an external consultant is to provide a Windows build 
environment for OOo. We would also need support in integrating OOo 
components into our product. We would then be able to contribute to 
the OOo overall open source project by bug fixing OOo core components 
etc. (The alternative is that we spend time in house attempting to 
build OOo from the source - which is our second option.)


Any advice or suggestions would be much appreciated.

Best regards,

Ian


Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center. 
http://us.rd.yahoo.com/evt=48246/*http://autos.yahoo.com/green_center/;_ylc=X3oDMTE5cDF2bXZzBF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDZ3JlZW4tY2VudGVy 



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Number of Lines

2007-04-10 Thread Andrew Douglas Pitonyak

Lívio Cipriano wrote:
On 10 April 2007 03:50, Andrew Douglas Pitonyak wrote: 

 CharacterCount, ParagraphCount, and WordCount you can get directly from

 the document.



Hi Andrew,

But in Writer File-Properties-Statistics, it gives the TOTAL Number of Lines 
in a documents - after you Update - so, must exist a variable that holds this 
data.
  

As I state above, you must get it from the current controller:

ThisComponent.currentController.LineCount


The model contains the data. You can identify characters, words, and 
paragraphs from the data model. You can not know the line number at a 
point, page number at a point, number of lines, or number of pages 
without rendering. Therefore, to ask these questions, you must ask the 
view, not the model. Similar for current selection or cursor position, 
the model can not know this, only the view knows this.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Number of Lines

2007-04-09 Thread Andrew Douglas Pitonyak

Lívio Cipriano wrote:

Hi all,

What's the name of the variable in Writer that gives the total number of lines 
in a document; like in Properties, Statistics?
  
CharacterCount, ParagraphCount, and WordCount you can get directly from 
the document. Line count, however, you need to get from the document 
view (or in this case, the current controller)


ThisComponent.currentController.LineCount

I do not know if you must update fields or anything to get this...

Makes sense about the lines because ONLY the view can know how many 
lines are required.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Write seems not to recognize a section break from work

2007-03-20 Thread Andrew Douglas Pitonyak

Hello Gabriel,

I was surprised to see this post in the dev list (I expected the user 
list) and that you did not start a new thread, but rather chose to reply 
to an existing thread.


Gabriel Plana i Gavaldà wrote:

I've created a Microsoft Word 2000 document with a headline which I don't
want to appear in page one, so I made a section break for having a different
headline on page 1. The .doc document preview seems right.

The problem is when I import that .doc document into OpenOffice Writer
version 2.1, where the headline is shown on all its pages (including in page
one). Is this a detected bug ?

Gabriel.
  
Is it possible for you to post an example document that demonstrates 
this error? If you can find no method to do this, then please create a 
bug report and post a sample document, which demonstrates the error. 
When I say sample document, I mean create the Word document that 
displays differently after importing into Write. If the document is 
significantly different after import into Write, this sounds like a bug.


Note: You can add your test document to the created bug.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Find the name of a bookmark while iterating through text

2007-03-13 Thread Andrew Douglas Pitonyak



ianmcr wrote:

Hi,

I am working on an export filter for producing accessible HTML. I first
iterate through the document and insert bookmarks at the start of each page
to indicate an automatic page break. I then iterate through the document
creating a new HTML page at each page break.

I need to compare the names of the names of the bookmarks as a iterate
trhough the text.
In the following example, I need to differentiate between PageBreakMarker
and _1118825921.

- text:p text:style-name=P4
  text:bookmark text:name=PageBreakMarker / 
  text:bookmark-start text:name=_1118825921 / 
  text:bookmark-end text:name=_1118825921 / 
- draw:frame ... / 
  /draw:frame

  /text:p

I can detect a bookmark by the following:

ReferenceXPropertySet xPropertySet(currentXTextRange, UNO_QUERY);
Any aPortionType =
xPropertySet-getPropertyValue(rtl::OUString::createFromAscii(TextPortionType));
rtl::OUString oPortionType;
if (aPortionType = oPortionType)
{
return (portionType == Bookmark);
}

How do I find the name of the programatic name of the bookmark (ie. the
strings PageBreakMarker or _1118825921 )?
  
Note that I do not bother iterating over text in tables and such, but if 
you had one, it would find the name...


Sub IteratePortions()
 Dim oText
 Dim oEnum
 Dim oPara
 Dim oParaEnum
 Dim oPortion
 Dim oPortionCursor
 Dim sPortionString$

 oText = ThisComponent.getText()
 oEnum = oText.createEnumeration ()

 Do While oEnum.hasMoreElements
   oPara = oEnum.nextElement
   If oPara.supportsService(com.sun.star.text.Paragraph) Then
 oParaEnum = oPara.createEnumeration ()   


 Do While oParaEnum.hasMoreElements ()
   oPortion = oParaEnum.nextElement

   Select Case oPortion.TextPortionType
 Case Text
   'oPortionCursor = oText.createTextCursorByRange (oPortion, 0)
   oPortionCursor = oText.createTextCursorByRange (oPortion)
   sPortionString = oPortionCursor.getString ()
 Case Bookmark
   Print FindBookmarkName(oPortion)
 Case Else
 'Print oPortion.TextPortionType()
   End Select
 Loop
   End If
 Loop
End Sub

Function FindBookmarkName(oPortion) As String
 Dim oText
 Dim oMarks
 Dim oMark
 Dim oCurs
 Dim i As Integer

 oText = oPortion.getText()
 oMarks = ThisComponent.getBookmarks()

 For i = 0 To oMarks.getCount() - 1
   oMark = oMarks.getByIndex(i)
   If EqualUNOObjects(oMark.getAnchor().getText(), oText) Then
 'Inspect(oMark.getAnchor().getStart())
 If (oText.compareRegionEnds (oPortion, oMark.getAnchor()) = 0 AND _
 oText.compareRegionStarts (oPortion, oMark.getAnchor()) = 0) Then
   FindBookmarkName = oMark.getName()
 End If
   End If
 Next
End Function


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Need some help

2007-03-12 Thread Andrew Douglas Pitonyak

Help with what?

shen zhao wrote:

Hi:

My name is zhaosheng, I am software developer from Beijing redflag 
chinese
2000 software company, and I wanna join you guys, I need some initial 
help

from you experts.

thank you very much

sincere  zhaosheng



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Distributing data sources to multiple machines

2006-12-19 Thread Andrew Douglas Pitonyak

Matthias B. wrote:

Does anyone have a suggestion for a good way to distribute data
sources to all user accounts on several machines. I want certain data
sources to be available to all users on several computers, without the
users having to do any manual registration of the data source.
The method should be scriptable, i.e. not require that an admin do
anything interactive or even be physically present at the machine. I'm
sure that I'm not the first to have this problem. Is there a
ready-made solution (like UNO packages which can be installed from the
command line with unopkg)?

You say Data Source, and I think Base Document.
You no longer need to register a data source to use it. You simply need 
to point at the Base Document.
If you desire the data source to be a registered data source, well, 
then you must run a script to register each base document. The primary 
advantage for this, however, is that they are displayed when the user 
presses F4 (I think it is F4).


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] base

2006-12-14 Thread Andrew Douglas Pitonyak

Glen Hinckley wrote:

I was looking to work on base. I would like to do forms and reports.
  

Not a lot to go on for the question...
Perhaps this will get you started:

http://www.pitonyak.org/database/AndrewBase.odt

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Listener in Document

2006-12-13 Thread Andrew Douglas Pitonyak

Dyego Souza Dantas Leal wrote:
I wave a Listener in my Document return a EventObject.. i want to 
intercept the event and stop the event if the user type f , it is 
possible ?
In Java the listener returns the KEY typed in JTextArea , i compare 
with f and call event.consume()... exists way in OpenOffice SDK to 
do this ?
Do I understand that you have a keyboard listener? I thought that the 
listener returned a boolean value that could be used to indicate that 
the listener handled the event.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Bounty for performance improvements

2006-11-03 Thread Andrew Douglas Pitonyak
Utomo, I like your statments because you clearly state the objective 
Load a doc file faster. It is, therefore, easy to quantify!


Utomo wrote:
Thanks for the suggestions. 

My original idea was. 
To make Ooo faster opening the Microsoft Office files. (but without adding
memory usage by OOo)  
Especially for user with old computer, such as PIII with around 128 memory

(which now mostly suffer from the huge memory usage by Ooo, and they feel
very long time opening the Microsoft office files). I hear many PIII user
complain about this, and this make them stop using Ooo. And I think it need
to be improved, so it can make them happy and use Ooo.

(I will provide some test file when the bounty start.) 

Example: 
Original Ooo without patch open the file in 60 second 
Ooo with patch open the file in 30 second 
In My opinion this is a 50% Improvements.  

But sometimes it is not easy to measure how long opening a files is. 
( I think judges will help decide it)


What do you think ? 


Best Regards,


Utomo

 


-Original Message-
From: Andrew Douglas Pitonyak [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 02, 2006 10:35 AM

To: dev@openoffice.org
Subject: Re: [dev] Bounty for performance improvements

Utomo wrote:
  
I am waiting and open for suggestions. 
Is there somebody can help me to determine how is the performance 
improvements measured ?


Utomo


I have a few comments:

Performance should be quantified and explained by the submitter. In 
other words, the submitter should indicate how to test and demonstrate a 
speed improvement.


Memory and runtime both sounds like improvements to me.

Broader impact should carry more weight. For example, a 100% improvement 
in sort speed is probably not as important as a 10% improvement in 
screen redraw time because the screen is almost always updated. By the 
same token, a 10% improvement in screen redraw may also beat a 20% 
improvement in macro run-time.


I would probably use imprecise statements as those, and then after some 
prioritizing, leave the final decision to public voting if it is not 
obvious as to the final winner, or simply decide up front, that public 
voting will be done.


  


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Bounty for performance improvements

2006-11-01 Thread Andrew Douglas Pitonyak

Utomo wrote:
I am waiting and open for suggestions. 
Is there somebody can help me to determine how is the performance
improvements measured ? 

Utomo 

I have a few comments:

Performance should be quantified and explained by the submitter. In 
other words, the submitter should indicate how to test and demonstrate a 
speed improvement.


Memory and runtime both sounds like improvements to me.

Broader impact should carry more weight. For example, a 100% improvement 
in sort speed is probably not as important as a 10% improvement in 
screen redraw time because the screen is almost always updated. By the 
same token, a 10% improvement in screen redraw may also beat a 20% 
improvement in macro run-time.


I would probably use imprecise statements as those, and then after some 
prioritizing, leave the final decision to public voting if it is not 
obvious as to the final winner, or simply decide up front, that public 
voting will be done.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



[dev] Re: Integrating VBA support into the general OOo

2006-10-30 Thread Andrew Douglas Pitonyak
A new book relating to macros and Calc is in process and I am a 
technical editor for this book. The book references Novell's code that 
provides some level of support for VBA in OOo. Issues exist to integrate 
Novell's code into the normal build (see 
http://www.openoffice.org/issues/show_bug.cgi?id=68883).


It would be nice if the book could say something like: Sun is 
evaluating Novell's code and is likely to integrate... for the next 
major release.
It would be nice to be able to make informed statements that set 
reasonable expectations.


I asked Daniel Rentz, but he was unable to offer anything concrete.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Re: Integrating VBA support into the general OOo

2006-10-30 Thread Andrew Douglas Pitonyak

Andrew Douglas Pitonyak wrote:
A new book relating to macros and Calc is in process and I am a 
technical editor for this book. The book references Novell's code that 
provides some level of support for VBA in OOo. Issues exist to 
integrate Novell's code into the normal build (see 
http://www.openoffice.org/issues/show_bug.cgi?id=68883).


It would be nice if the book could say something like: Sun is 
evaluating Novell's code and is likely to integrate... for the next 
major release.
It would be nice to be able to make informed statements that set 
reasonable expectations.


I asked Daniel Rentz, but he was unable to offer anything concrete.

I see that I should have read ALL of my email messages before creating 
this one. I will go with the following statement:


Oh right, these patches contain some preparations for VBA support 
...snip... there is no decision yet about when to add the VBA stuff.


Thank you for the quick reply Daniel.



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] About OOo Math / looking for developers

2006-09-30 Thread Andrew Douglas Pitonyak

Hi Cor,

I read hundreds of messages every day. I expect to see the important 
stuff close enough to the top that I do not have to scroll.


Click the spacebar ...


Is this standard functionality on most email programs? It certainly 
works with Thunderbird. I had never heard of such a thing being used to 
quickly scroll down without focusing the message outside of the view panel.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] About OOo Math / looking for developers

2006-09-29 Thread Andrew Douglas Pitonyak
I read hundreds of messages every day. I expect to see the important 
stuff close enough to the top that I do not have to scroll.


I read this from top to bottom and was highly amused; no, I laughed and 
laughed and laughed...


Marco Pratesi wrote:


A: Because it messes up the order in which people normally read text.
Q: Why is top-quoting such a bad thing?
A: Top-quoting.
Q: What is the most annoying thing on a mailing list?

Marco Pratesi
 


So Marco, why can you not handle bottom quoting?

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Online Update for Extension

2006-09-13 Thread Andrew Douglas Pitonyak

Joachim Lingner,

Please note that although I am subscribed to the dev list, I am not 
currently subscribed to the extensions list...



-we show multiple versions of one extension or
-only show the latest version of the extension.


I think that the eclipse extension editor allows you to view all 
versions of an extension. There is a check box to limit the display to 
only the latest version of the extension.
Although I can envision a desire or need for a version that is not the 
latest, it is almost always the case that the latest version is desired. 
I feel that the ability to download any available version is preferred, 
depending on complexity, perhaps you only offer the latest. If any 
version can be chosen, the default should be to only show the latest 
version.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Question

2006-07-24 Thread Andrew Douglas Pitonyak

Hugo Pérez Bruno wrote:


Hi

How can I export data from a recordset in Visual Basic 6.0 to OOoCalc?

Thanks
Hugo


I see that you have had no answers..

First, you can not easily do this from VB. Your primary options are as 
follows:


* Export to a format supported by Calc (such as CSV)
* Write VB code to connect to OOo and then manually write the data into 
a Calc document.

* Export the data to an Excel file and then open it with Calc.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Re: paragraph number

2006-07-20 Thread Andrew Douglas Pitonyak
I would have said no, it is not easily done. Are text tables counted as 
a paragraph?


Gloops wrote:


Hello,

I have read somewhere that version 2.0.3 does that easily.
___
On 18th of July 2006 02:40, Mohammad Alhammouri wrote :


Hello there,

is there a similar function to the page number function  
xPageCursor.getPage(),

that finds the paragraph number  within the text document.
if not is there any way to find that number in JAVA ?

thanks in advance.

Regards,
Mohammad.



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



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

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



Re: [dev] Incubator for vba macros

2005-12-10 Thread Andrew Douglas Pitonyak

Noel Power wrote:


 Hi All,

I've contacted Louis and he's reviewed my proposal for a new incubator 
project. So now I'm asking you, the community to have a look, voice 
your opinion and help get this off the ground. For a long time now its 
been recognised that lack of interoperability with vba macros can be a 
major stumbling block to OpenOffice  adoption. With that in mind at 
go-oo.org we've been experimenting a bit with vba interoperability, so 
far we've made some strides in making OOo support Excel macros. We 
feel it's time now to expose this work to the greater OOo community 
and get more people involved about this. I believe this is a great 
opportunity to create some new excitement around OOo and really 
improve the interoperability of the product.


some more info

o blog 
http://noelpower.blogs.ie/2005/12/09/proposed-incubator-project-for-vba-interop/ 


o wiki page http://wiki.services.openoffice.org/wiki/VBA


please give your support :-) ( and votes )

Thnx,
Noel


Very nice indeed!

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Re: Setting the file name of an new, unnamed document?

2005-12-10 Thread Andrew Douglas Pitonyak

Felix E. Klee wrote:


Uh, I forgot to mention a couple of things:

1. We're employing OO 1.1.3, soon perhaps OO 1.1.4.


I recommend the latest version



2. I do not want to store the document to disk automatically.  This
  should only be done manually by the user.


then you can not give it the file name.


3. The issue is only about text documents (OO Writer).



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Calc, VLOOKUP 1.1 - 2.0: Changing of default behaviour?

2005-11-13 Thread Andrew Douglas Pitonyak

Til Schubbe wrote:


* On 13.11. Andrew Douglas Pitonyak ([EMAIL PROTECTED]) muttered:

 


Til Schubbe wrote:
   



 


the last parameter of VLOOKUP tells Calc if the referenced table
is sorted.

I have a Calc document (OOo 1.1.4) which contains some VLOOKUP (in
the German version SVERWEIS) functions passing 3 parameters to it.
The referenced table is unsorted. The default behaviour of VLOOKUP
for omitting the 4th parameter is to asume an unsorted table. 

 


Huh? No it is not.
   



Probably you got me wrong. I meant that asuming an unsorted table is
the default behaviour in Calc 1.1.x.

 


http://www.pitonyak.org/database/Calc_As_A_Simple_Database.odt
   



 

The final column, sort_order, is optional. The default value for 
sort_order is 1, which specifies that the first column is sorted in 
ascending order;
   



The document you stated referes to Calc 2.x.

 


The beahavior changed, I think, in version 2.0.
   



Yes, that's what I noticed.
 

When I created the document. I think that I noticed a behavior change 
NOT a specification change. In other words, I thought (correctly, or 
incorrectly) that it always assumed sorted, but the behavior changed 
when an unsorted list was incorrectly referenced as sorted.




To illustrate the problem:

In

http://schubbe.org/test/OOo/vlookup-test.sxc

(created with OOo 1.1.4) you can see an unsorted table (A6:D16) -
you have to open it with OOo 1.1 of course. The cells D1 and E1 are
refering to the unsorted table. Both VLOOKUPs are only called with 3
parameters and the results are correct: D1 shows c2 and E1 shows
d11.


In contrast to the 1.1.4 spreadsheet

http://schubbe.org/test/OOo/vlookup-test.ods

(created with OOo 2.0.0) contains the same data and formulars. But D1
shows c4 and E1 shows d8. Both results differ (and are wrong)
from the results in the 1.1.4 spreadsheet.


The same formular used in different program versions should either
result in the same outcome. Or the newer program version must
convert the formular (in an older spreadsheet opened with the newer
program version) so that the formular shows the same result as the
spreadsheet in the original (old) version does. Doing neither is a
bug.

Regards
Til

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

 



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Calc, VLOOKUP 1.1 - 2.0: Changing of default behaviour?

2005-11-12 Thread Andrew Douglas Pitonyak

Til Schubbe wrote:


Hello,

the last parameter of VLOOKUP tells Calc if the referenced table
is sorted.

I have a Calc document (OOo 1.1.4) which contains some VLOOKUP (in
the German version SVERWEIS) functions passing 3 parameters to it.
The referenced table is unsorted. The default behaviour of VLOOKUP
for omitting the 4th parameter is to asume an unsorted table. 

Huh? No it is not. The default behavior is 1, sorted. How do I know 
this? Ummm, well, ummm, I do not remember how I know this. I might have 
read the source code, but I do not remember. I documented the behavior here:

http://www.pitonyak.org/database/Calc_As_A_Simple_Database.odt

Search for VLOOKUP. I state the following:

The final column, sort_order, is optional. The default value for 
sort_order is 1, which specifies that the first column is sorted in 
ascending order; a value of 0 specifies that the data is not sorted. If 
the data is sorted in ascending order, a more efficient search routine 
is used. A non-sorted search requires an exact match, but a sorted 
search always returns a value if the searched text lies between the 
first and last values. Table 8 contains examples using the VLOOKUP function.


The beahavior changed, I think, in version 2.0. I had a discussion with 
the developers about this. The bottom line is that if the data is NOT 
sorted, then the returned value is arbitrary and potentially wrong. I 
think that they changed the sorting algorithm in 2.0 to be more 
efficient but less tolerant of out of order data. I would elaborate, but 
it is late and I musts get to bed!





This
works fine in 1.1.4. Opening the same document with 2.0 (Debian
unstable 2.0.0-1) leads to weird results.

I added a 0 as 4th parameter to VLOOKUP for testing and got the
correct results.


In 2.0 the default behaviour of VLOOKUP (with 3 parameters)
to asume an (un)sorted table seems to have changed. Can someone
confirm this?

If the default behaviour has changed, the function in 2.0 which
converts v1.1 documents into v2.0 documents for initial opening must
add a 0 as 4th parameter to every VLOOKUP function only containing 3
parameters.

Shall I report a bug?

Regards
Til

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

 



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev]Access Database

2005-11-04 Thread Andrew Douglas Pitonyak
王彬 wrote:

Hi,all
I want to access a database,but I meet with some problems.

For example:
The SQL string is:SELECT * FROM test
When I executeQuery this SQL,a SQLException will happen -- Table not 
found in statement [SELECT * FROM test]
But the table test does exist.

Then I check another SQL: INSERT INTO test VALUES(...,...,...)
And this time,it works.
  

The problem is that your tables are NOT in upper case. You need to quote
table and field names that are not in upper case. If you are using the
query tools, I think that you can usually quote with a double quote. If
you are writing SQL in macros, then you should get the quote character
from the connection. In this case, download this document:
http://www.pitonyak.org/database/OOoBaseBinaryFields.odt

And search for the text DBQuoteName, at least I think that is the name
of the function that I wrote to do this Either way, I probably added
it into the DBUtilities at the end of the document if you need to search
for it.

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Programmierhandbuch für Basic

2005-11-01 Thread Andrew Douglas Pitonyak

Jürgen Schmidt wrote:


Christian Junker wrote:


Hey Jürgen,

2005/10/28, Jürgen Schmidt [EMAIL PROTECTED]:


Aber nichtsdestotrotz danke für den Hinweis. Das scheint ein
Übersetungsproblem zu sein und wir werden das überprüfen und 
korrigieren.




gibt es die Möglichkeit das Dokument (engl. + deutsch) umzustellen auf
eine freie Lizenz? Sun könnte ja immer noch den StarOffice 8
Programmer's Guide anbieten auf ihren Servern, aber auf openoffice.org
könnte man doch ein kollaboratives Dokument erstellen und es einfach
OpenOffice.org 2.0 Programmer's Guide nennen, wobei ich mit dem Namen
auch nicht so zufrieden bin weil es schon einen Developer's Guide gibt
und durch die Tatsache, dass UNO nun so viele Sprachen unterstützt,
der Interessent leicht davon ausgehen kann, dass es nicht nur um
Starbasic/OpenOffice.org Basic geht.



That's the reason why the name is StarOffice XX Software Basic 
Programmer's Guide
But related to your question, that would maybe possible but have you 
asked all the others who have written books and guides to contribute 
there stuff back to the OpenOffice project? The answer is probably not 
and they have probably a lot of content from the existing guides and 
the mailing list. People take the stuff and of course the product from 
OpenOffice but what is their contribution back? It's fine if people 
make money with support and services around the project but they 
should think about any contribution back to the project.


This is one reason that I donated a portion of the profits from my book 
to the database effort! :-)


See the Developer's Guide, we Sun make it available for OpenOffice but 
we did the work. Ok we got some minor bugfixes but where for example 
is the Python language binding chapter or where are the missing 
chapter of a specific functionality?


Nervetheless I will check it.

Juergen






Es gibt aber mittlererweile auch andere Bücher für Basic, eine
Google-Suche sollte hier weiterhelfen.




Schön und gut, aber es fehlt *die Referenz*.

--
Best Regards
Christian Junker

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



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



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Visual Basic Open Office

2005-11-01 Thread Andrew Douglas Pitonyak

Jim Barrington wrote:


Hi all

I am developing an application for the OSCommerce/Zencart community which
sorts data and builds their database using Excel then Access. Now I know
Access works with Open Office but do you have any examples of porting VB6
code which works with Excel so it works with OpenOffice too?

This is quite an extensive spreadsheet system so I would hate to rewrite
every line of code in the VB6 application, however I would like to include
functionality for OpenOffice too. I am also fairly new to programming so am
not advanced enough to code in C++

Hope to hear your thoughts soon

Kind regards

Jim
 


For now, I have lots of Calc examples here:
http://www.pitonyak.org/database/Calc_As_A_Simple_Database.odt

I also have Calc examples in my free macro document and my book.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Example of use of the configuration

2005-10-10 Thread Andrew Douglas Pitonyak

Michele Zarri wrote:


Hi,

I hope this is the right list, if not, apologies.
I have written a macro that relies on a configuration file where I store
some parameters. I would like to avoid to re-open the file every time the
macro is executed so I would like writer to remember whether the file has
been opened or not for a given session. I cannot use global constants
because from time to time I need to change the configuration parameters (I
have also created the macros to do it).
Although the file is quite small and it takes no time to open it and parse
it, I would still like to use a more generic approac.
Not knowing the Java language I gave up on the developer's guide paragraph
on configuration, so my questions are:
1) is there a place where the developers guide examples are translated in
OOoBasic?
2) is there somewhere an example of storing configuration parameters?

Cheers,

Michele
 


I have some old examples in section 5.5 and 5.7 of my free macro document.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


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



Re: [dev] Strange Bug in StarBasic? Function returning null instead of empty

2005-09-06 Thread Andrew Douglas Pitonyak

Matthias Benkmann wrote:

I have a problem with a recursive function in one of my macros. The function 
is supposed to either return an array of strings or Empty (in case there's 
not enough input data). However, under some circumstances the function 
mysteriously returns Object/Null instead of Variant/Empty. I'd like to know 
if this is a bug in OOo (I tested 1.9.122 and 1.9.125) or some 
misunderstanding on my part. The following is a chopped down version of my 
code:


Sub Main
Dim n(1) as String
n(0) =  
n(1) =  
Dim a as Variant

f(Array(60,10,1,12,20,10,25,30), n(), 0, 76)

End Sub

Function f(splitInfo() as Variant, daten() as String, i as Long, j as Long) 
as Variant

If i  UBound(daten) Then
Exit Function
End If

Dim ret() as String

for k = 0 to UBound(splitInfo)
restLen = Len(daten(i)) - j
Dim splitPos as Long
splitPos = splitInfo(k)
If splitPos = restLen Then
j = j + splitPos
Else
st = Right(daten(i), restLen)
i = i + 1
j = 0
sta = f(Array(splitPos - restLen), daten, i, j)

If IsNull(sta) Then
MsgBox(This is impossible!)
Exit Function
End if

End If
next k

f = ret()
End Function

As you can see there are only 2 ways out of the function f(). The first one 
is an Exit Function that is called without an assignment to the function's 
return value. On this code path the function is supposed to return 
Variant/Empty. The 2nd way out of the function is after the assignment f = 
ret() which sets the return value to an array of string. There should be no 
way for the function to return Variant/Null, so the condition IsNull(sta) 
should never be true. But strangely it is at some point. If I call the 
function directly from Main with the exact same parameters as the recursive 
call that returns Null, I get Empty as it should be. So it seems that Null 
is returned only in the recursive case.


Can someone give me a clue what's going on? Is this a bug? Should I file a 
bug report?


Matthias
 



I don't suppose that you can provide an example that causes the 
problem... I tried to use the supplied example and there are issues. I 
added some error handling and found out that errors were generated and 
variables are not defined. This is likely to affect the results. In the 
following code, in which I tried to NOT change the meaning of the 
variables, I added some error handling that is called.


Option Explicit

Sub Main
 Dim n(1) as String
 n(0) =  
 n(1) =  
 Dim a as Variant

 f(Array(60,10,1,12,20,10,25,30), n(), 0, 76)
End Sub

Function f(splitInfo() As Variant, daten() As String, i As Long, j As 
Long) As Variant

 Dim ret() As String
 Dim k As Long
 Dim splitPos As Long
 Dim restLen As Long
 Dim st As String
 Dim sta

 On Error Goto BadError

 If i  UBound(daten()) Then
   Print Exit at point 1
   Exit Function
 End If

 For k = 0 To UBound(splitInfo())
   REM dataen(i) is always of length 1 in this example.
   REM j starts off as length 76, so restLen is likely to spend some
   REM time with a negative value.
   restLen = Len(daten(i)) - j
   splitPos = splitInfo(k)
   If splitPos = restLen Then
 j = j + splitPos
   Else
 REM We generate an error when restLen = -75.
 st = Right(daten(i), restLen)
 i = i + 1
 j = 0
 sta = f(Array(splitPos - restLen), daten, i, j)

 If IsNull(sta) Then
   Print Exit at impossible point 2
   Exit Function
 End if
   End If
 Next k

 'Print Exit at point 3
 f = ret()
 Exit Function

BadError:
 Print There was a bad error
 On Error Goto 0
 Print LB =   LBound(daten())   UB =   UBound(daten())
 Print i =   i   restLen =   restLen
End Function

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php


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



Re: [dev] Basic Libraries and security

2005-08-13 Thread Andrew Douglas Pitonyak

Peter Eberlein wrote:


Hi,

is there a way to move the standard library from the userprofile to 
the shared folder?

The reason (please correct me, if I'm wrong):
I've written some global macros as calc functions, and calc functions 
must be located in the standard library.

But I want to encrypt the code or make it readonly.
Is there a way to do so?

Regards

Peter


If you can not move standard, you could always place stubs in the 
standard library that call a non-standard library that is encrypted.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php


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



Re: [dev] asking to work

2005-08-13 Thread Andrew Douglas Pitonyak

Sandah Aung wrote:


Dear Sir/Madam,

I am writing this letter to ask you to contribute something to the
OpenOffice.Org project. 


I would like to introduce myself first. I am a full-time self-employed
English teacher from Myanmar (more well-known as Burma). I help my
students prepare for international English exams such as SAT (I also
teach maths), TOEFL and IELTS and my students have acheived great
results. Therefore I am quite good at English and mathematics. 


Before I started teaching seriously, I had worked in a local bilingual
newspaper for a year and got quite a celebrity status. My articles and
reports were well received.

I have written a few books on Java, JavaScript and HTML in Myanmar and
got one of them published. Another is waiting for its launch date. My
first book has been successful and is still in demand. I am also good at
SQL language and have some knowledge of programming languages and
operating systems. I am also interested in reading news about computers.

Because I am working full-time and my profession requires me to keep
studying, I will not be able to spend a lot of time for your project. I
also dislike working under pressure. However, I would very much like to
do something for the open source cause and I would like you to advise me
on how I can be of service to your community.

Yours faithfully,
Sandah Aung 



span id=m2wTlpfont face=Arial, Helvetica, sans-serif size=2 
style=font-size:13.5px___BRGet the FREE email that has everyone talking at a href=http://www.mail2world.com 
target=newhttp://www.mail2world.com/abr  font color=#99Unlimited Email Storage #150; POP3 #150; Calendar #150; SMS #150; Translator #150; 
Much More!/font/font/span
 

As a published author, you obviously know how to write. Perhaps you can 
help with documentation. They always can use help...


http://www.oooauthors.org/

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php


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



Re: [dev] createUnoService problem in 1.9.x on windows

2005-08-01 Thread Andrew Douglas Pitonyak

James Black wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Christian Andersson wrote:
 


Thats what I do also, I have created a message system that I can call
from basic that will open a dialog that holds all debug information for
me, unfourtunally this does not cover everything..
what wil happen with all those uncaught RuntimeExceptions? like
NullpointerException? as you have not done any try catch for those (I
said uncaught above) , you will never see them, and what if there is an
exeption when calling createUnoService, ie the class could not be
created because it threw an exception? those you can't catch either,
since you don't have any try catch around this.

it is for those kind of uncaught exceptions that I would like to get a
hold of stdout/stderr and see what is going on...
   



 I do my programming in Java, so it may be simpler for me to just catch
all exceptions where there is something going on, and find out what is
happening.

 Being able to write to stderr/stdout would be nice.

 Good luck.
 

Write it all out to a log file... Remove the logging code when you are 
finished.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php


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



Re: [dev] Changing cell values from custom sheet function

2005-07-27 Thread Andrew Douglas Pitonyak

Matthias Benkmann wrote:


It seems that when I use a custom Basic function in a cell formula,
during the executing of this function, I can't write to any cells.
Statements such as

ThisComponent.Sheets.getByIndex(0).getCellByPosition(4,1).setValue(33)

are silently ignored. Why does this happen? Is there a way around it?
I'm looking for an easy way to trigger a function whenever a cell is
changed. The function is supposed to have full access to the sheet.
What's the most simple way to do this (if I can't just use a Basic
function in the cell formula) ?

Matthias

 

I thought that this was only true for the sheet that contained the cell 
that called the function..


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php


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



[dev] Re: macros emulation poor man's database

2005-07-06 Thread Andrew Douglas Pitonyak

Interesting questions so I copied them back to the Dev list
I am adding answers in-line.

Uwe Brauer wrote:

Hello 


The OO database is unfortunately no as comfortable as the scalc.
Do you know about a macro which could do protect rows in a scalc
document against partial sorting.

Original table 
This  1

Book  2
Cesar 3

Now I mark the first column and order it alphabetically I obtain

Book  1
Cesar 2
This  3

But what I want is this: although I only marked the first column I obtain

Book  2
Cesar 3
This  1


Now you point out  that in order to achieve  this, I should hightlight
all the   relevant columns.  Thats  right.  But I   want to have  some
protecting. That  is also I  only mark one  column and sort the column
all the others get sorted as well.
 

My guess is that you need to use a listener that intercepts the sort 
command. You would then need to verify that the selected range included 
the first and last used column. This is, however, just a guess.



2. Do you know about a macro  for generating numbered backups, no
  just a single one.
 

Do you mean that you call a macro to create the backups, or do you want 
to hook into the existing backup functionality?
The functionality sounds familiar, but I can not remember. If you simply 
wanted to write a macro to do this, it would not be that difficult I 
would think. Hmm, then again, it might be complicated by the fact that 
on Winodws, the file is always locked while it is open (at least it is 
for me).



3. A macro which would  split the screen  in the same way F4 does
  it for the database window.
 

Is it the datasource that you want to see? I am only aware of using a 
dispatch for this. If you want to know the current state, you probably 
need to register a listener and see the return codes, but this is just a 
guess.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php


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



Re: [dev] Problems with XTextTable

2005-06-26 Thread Andrew Douglas Pitonyak
I added a section in my free macro documnet, if you have not already 
seen it, titled



 You can not move a cursor to a TextTable anchor.


This directly answers your question with a working example in Basic


Andre B Derraik wrote:


Hi,

I'm having problems with the XTextTable.
I'm trying to replace a table with a new one at the same position. 
Because I'm working with dynamics datas which came from Data Bases.


The table creation:

 // Get the hole Document
 XTextDocument mxDoc = getTextDocument();
 if (mxDoc == null) return;

// Get the Factory
XMultiServiceFactory mxDocFactory = QI.XMultiServiceFactory(mxDoc);
if (mxDocFactory == null) return;

// Get the Text interface
XText mxDocText = getXText();
if (mxDocText == null) return;

// Get current position
XTextRange mxDocCursor = queryCurrentPosition();
if (mxDocCursor == null) return;

// Create a new table from the document's factory
XTextTable xTable = QI.XTextTable(
mxDocFactory.createInstance(com.sun.star.text.TextTable));
if (xTable == null) return;

   // Specify that we want the table to have 4 rows and 4 columns
   xTable.initialize(4, 4);

   // Set table name
   XNamed xNamed = QI.XNamed(xTable);
   xNamed.setName(DataTable + id);

   // Insert the table into the document
   mxDocText.insertTextContent(mxDocCursor, xTable, false);

obs: the QI class is a sintax sugar for the UUnoRuntime.queryInterface.

at this point, works fine. He create the table perfectly.
But when I try to remove this table...

   // Get current document
   XTextDocument mxDoc = getTextDocument();
   if (mxDoc == null) return;

   // Get the Text Cursor
   XText mxDocText = mxDoc.getText();
   if (mxDocText == null) return;

   // first query the XTextTablesSupplier interface from our document
   XTextTablesSupplier xTablesSupplier = QI.XTextTablesSupplier( mxDoc );
   if (xTablesSupplier == null) return;

   // get the tables collection
   XNameAccess xNamedTables = xTablesSupplier.getTextTables();
   if (xNamedTables == null) return;

   // now query the XIndexAccess from the tables collection
   XIndexAccess xIndexedTables = QI.XIndexAccess(xNamedTables);
   if (xIndexedTables == null) return;

   // we need properties
   String name = null;

   // Find all Data tables in document
   for (int i = 0; i  xIndexedTables.getCount(); i++)
   {
  XTextTable table;
  try
  {
 // Get table name
 table = QI.XTextTable(xIndexedTables.getByIndex(i));
 if (table == null) continue;

 // check if it is an Data table
 name = QI.XNamed(table).getName();
 if (!name.startsWith(DataTable))
continue;

// Get the current table position

XTextContent xTableContent = QI.XTextContent(table);
XTextRange xTablePos = xTableContent.getAnchor();
xTablePos.setString(.\n);
table.dispose();
  }

  }

Nothings happing!!!
The table continue exist and the new string don't appear.

Anyone, any idea?

Thanks!
Best regards.
---
André B. Derraik
Consultor
Tecgraf/PUC-Rio   http://www.tecgraf.puc-rio.br
[EMAIL PROTECTED]  Tel.: +55-21-2512-8428

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



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php


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



Re: [dev] How to integrate Javamail for MailMerge.

2005-05-27 Thread Andrew Douglas Pitonyak


PETER EBERLEIN wrote:



On the German list we were also told that because of license reasons 
this feature was not implemented into OpenOffice (contact Elizabeth 
about that).



In general, if a feature exists in StarOffice and NOT in OpenOffice, it 
is because another product was purchased/licensed for use in StarOffice. 
A licensed/purchased product can in general not be released with 
OpenOffice. Another excellent example of this is the regular 
expressions. Initially, OpenOffice did not support regular expressions 
until an open solution was created. The most likely reason that an off 
the shelf solution is used has to do with time. There was not time for 
Sun to develop and release the required components, so they laid the 
infrastructure and then purchased a product to fill in the gaps. In 
time, I anticipate that the gaps will be filled with an open source 
solution, which will probalby then be integrated back into StarOffice as 
well. Just a prediction.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php


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



Re: [dev] How to make OO update table list

2005-05-19 Thread Andrew Douglas Pitonyak
Department LinuxOffice Migration wrote:
How can I script this from a Java or Basic program that knows only the
name under which the database is registered?
 

So, do not register the database. I know that you do not have to if you 
are using the new development version. Use the URL to the database 
rather than a registered name. This may not solve your problem, of course...

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [dev] How to format the number of columns in Writer with OpenOffice.org 1.1.4 BASIC macros?

2005-05-19 Thread Andrew Douglas Pitonyak
I thought that columns were usually set using a page style... Something 
to consider anyway.

Ulf Lamping wrote:
Hi List!
I posted the following mail at the users list but couldn't get any real help, 
so trying here (sorry if this is a known problem) ...

To format columns, I use Format/Columns from the Writer menu and that's
working well.
Then I've tried to record a macro to set the number of columns in Writer
that way.
Unfortunately, all I got (beside the usual start/end parts of the macro)
was just a commented line:
rem --
rem dispatcher.executeDispatch(document, .uno:FormatColumns, , 0,
Array())
I've tried to find the FormatColumns function in the API documentation at:
http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html
but didn't found this function there.
In the format tables at:
http://ext.openoffice.org.nz/doku.php?id=uno_dispatch
is FormatColumns listed, but that's only a list of the available API functions 
but no further info...
A general search at OpenOffice.org and also Google didn't gave me any
other useful info :-(
Is this function currently not available?
Could someone tell me how to call this function or point me to the right
place in the API docs?
What I'm really missing is the parameter profile to use and a code
snippet would be really useful ...
(Please CC me as I'm not on the list)
Regards, ULFL

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

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [dev] How to implement Exchange Databases function

2005-05-18 Thread Andrew Douglas Pitonyak
Search the OOo Forum. This should get you started anyway.
http://www.oooforum.org/forum/viewtopic.phtml?p=76328
I think that I have an example somewhere, if I can only find it.
Matthias Benkmann wrote:
I'm writing an application that creates CSV-files and automatically
loads a text template for the mail merge function. The mail merge
fields in the template are connected with a text database that refers
to the directory where the CSV files are created.
Because it must be possible to open multiple mail merge documents at
the same time with different data sets, every CSV-file gets a unique
generated name.  Obviously this generated name is different from the
table name the mail merge fields in the template refer to. So what I
need to do is  to make the mail merge fields refer to the proper
database table. Manually I can do this easily with the Edit -
Exchange Database... dialog.
But how do I  script this?  To make this clear, I'm *not* looking for
a way to call the Exchange Database... dialog from a macro.  I want to
get the effect of Exchange Database... from a script without user
intervention, i.e. given the name of a database and/or table, modify
the mail merge fields to refer to the new database/table.
I'm working with OO 2.0 Beta in Java but example code in other
languages is welcome, as are pointers to UNO
services/interfaces/properties that may help me. I also have the OO
sources lying around, so if that could be helpful I'd take a look at
the C++ implementation of Exchange Database... if someone tells me
where I can find it.
Matthias Benkmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [dev] How to traverse paras on a page?

2005-05-18 Thread Andrew Douglas Pitonyak
Download my free macro document (see link below), or get my book. If you 
have my free macro document, check out the section discussing how to 
traverse paragraphs (Andrew learns to ...). Also, read the section on 
the selected text framework, which demonstrates how to know when to end.

It would probably suffice to traverse while moving the display cursor 
with you until you leave the page. The thing is that ONLY the display 
cursor can act as a page cursor if I remember correctly (I discuss this 
in my book, but probably not the free macro document).

Aditya Pandey wrote:
Hi
I have been trying to write a simple page traverser since half a day 
unsuccessfully. Here is little code:

bool blnJump = xPageCursor-jumpToNextPage();
printf (Jump Page: %d\n, blnJump);
	Reference XTextViewCursor xViewCursor2  (xPageCursor,  
UNO_QUERY);

	if (xViewCursor2  == NULL) 
	{
		ShowMessageBox( xToolkit, m_ooxFrame,
			OUString( RTL_CONSTASCII_USTRINGPARAM( 
Test App )),
			OUString( RTL_CONSTASCII_USTRINGPARAM( 
xViewCursor not found )) );
		return false;
	}

	Reference XTextRange xTextRange2 (xViewCursor2, UNO_QUERY);
   Reference XTextCursor xModelCursor2 = xDocumentText-
		createTextCursorByRange(xTextRange2);
	Reference XParagraphCursor	xPrCursor2 (xModelCursor2, 
UNO_QUERY);

	if (xPrCursor2 == NULL) 
	{
		ShowMessageBox( xToolkit, m_ooxFrame,
			OUString( RTL_CONSTASCII_USTRINGPARAM( Test App )),
			OUString( RTL_CONSTASCII_USTRINGPARAM( 
xPrCursor is not found )) );
		return false;
	}

	int paraCount = 0;
	while (xPrCursor2-gotoNextParagraph(false) ) 
		//  xPrCursor-getText() != xPrCursor2-getText())
	{
		paraCount ++;	
	}	
	printf (%d\n, paraCount );

This code has a flaw -- It gives all paras starting from the current page
till last page of document.
While I want all paras of current page. Could somebody please help with 
this? It doesnt appear to be as easy as I thought it to be.


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

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[dev] Re: [users] Re: [Scripting] possible to modify a database form field?

2005-04-20 Thread Andrew Douglas Pitonyak
Jens Ansorg wrote:
Andrew Douglas Pitonyak wrote:
The following code works for me... I have a form called Standard, 
which contains a form called Catalog, which contains a form called 
Country, which contains a control called TextBox_Country. The 
second example, returns the Dealer form, which is contained in the 
Standard form.

Sub Main
 Dim x
 x = getFromForm(ThisComponent, _
 Array(Standard, Catalog, Country, TextBox_Country))
 x = getFromForm(ThisComponent, Array(Standard, Dealer))
End Sub

Yes, that works here too. I get the desired textbox. Now I need to 
figure out whether it is possible to get the selected text inside that 
textbox.

something like
oDoc.getCurrentSelection()
unfortunately only works on the writer page behind the form
thank you for all the sample code
Jens
You get that from the view
 Dim oController
 Dim oControlView
 GlobalScope.BasicLibraries.LoadLibrary(Tools)
 oController = ThisComponent.getCurrentController()
 REM Look in the tools library, the ModulesControl module.
 oControlView = GetControlView(ThisComponent, oController, TextBox1)
 MsgBox oControlView.getSelectedText()
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [dev] execute macros in OO2.0 documents

2005-03-27 Thread Andrew Douglas Pitonyak
I made some changes to your macro
 Dim oProps(2) as New com.sun.star.beans.PropertyValue
 Dim sUrl As String
 Dim oDoc
 'oDesktop = createUnoService(com.sun.star.frame.Desktop)
 'sUrl = file:///somewhat.sxw
 sUrl = 
file:///andrew0/home/andy/My%20Documents/OpenOffice/AndrewFontMacro.odt
 oProps(0).name = ReadOnly
 oProps(0).value = True
 oProps(1).name = MacroExecutionMode
 oProps(1).value = 
com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN
 oDoc = StarDesktop.LoadComponentFromURL(sUrl, _default, 0, oProps())

* Place Option Explicit at the top of your module so that you must 
declare every variable.
* I placed quotes around ReadOnly.
* I used the fullname for the macro execution mode in case they 
renumbered them (not likely, but just in case)
* I used StarDesktop rather than obtaining a desktop service (it should 
not make a difference).

I verified that this work using 1.9.87
Helmut Seidel wrote:
hello everybody,
in OO1.1.4 i used the following code to load (database) documents:
...
oDesktop = createUnoService(com.sun.star.frame.Desktop)
sUrl = file:///somewhat.sxw
mFileProperties(0).name = ReadOnly
mFileProperties(0).value = True
mFileProperties(1).name = MacroExecutionMode
mFileProperties(1).value = 4
oDoc = oDesktop.LoadComponentFromURL(sUrl, _default, 0, 
mFileProperties())
...

with this code i am able to load my document AND execute my 
Basic-Macros which are incorporated in my code.

now i started to port my app to OO2.0 - with this new version it is 
not possible to execute my macros within the loaded document.

can anybody tell me what to do?
thank you and appologies for my clumpsy english
helmut
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[dev] How to pass a NULL as an array argument

2005-03-09 Thread Andrew Douglas Pitonyak
Note: I am using OOo 2.0 Beta on Windows and Linux.
Some interfaces accept an array as the argument. In two of these 
interfaces, for example XDatabaseMetaData.getTables(), it is specified 
that the argument should be NULL in some cases.

http://api.openoffice.org/docs/common/ref/com/sun/star/sdbc/XDatabaseMetaData.html#getTables
Well, under windows, I simply use
Dim oNull As Object
oMeta.getTables(oNull, %, %, oNull)
And things work as expected... On Linux, however, there is an error when 
the target argument is an array. The error is Can not coerce argument 
type during coreflection. Should I use a different method to pass a 
NULL, or did I find a bug that exists only on Linux.

I am assuming, a bug, but if this is really a problem on my end, then I 
should remove the case that I opened...

http://qa.openoffice.org/issues/show_bug.cgi?id=44541
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [dev] Definitely interested

2005-03-07 Thread Andrew Douglas Pitonyak
Hello Stephen, I have added comments inline...
Stephen Gassner wrote:
I am a California family law attorney.  Before that I was a systems
engineering consultant, 

snipped impressive computer background and a little bit more...
I would like to help you.  But I do not 
have the immediate resources around me, to help you in a very significant
manner.  The assistants that I do have, are either paralegals or
secretaries.  They are not programmers, mathematicians, or engineers, such
as I assembled at DEC.
 

Excellent!
For right now, I would like access to an individual with detailed knowledge
to help me develop a competent Legal Pleading template.  Technically it's
trivial, but marketingwise, it's critical.  I found a couple such templates
and downloaded them.  Neither really solves the problem quite correctly.
There might be underlying source code problems that made it difficult for
the developers to implement.  With adquate access to detailed knowledge of
the underlying software platform, that problem should be solvable very
readily.  I would anticipate that OpenOffice would serve the Legal Community
very well.  We have been frustrated with Correl and Microsoft for years.
They have been nonresponsive to our needs.  Contribute, and we will
contribute back.
 

In general, I consider a template to be a collection of styles with a 
base document to use. Understanding how to use styles is in general 
critical. The user list is a great place to ask about templates.
the ooauthors web site has a lot of information concerning this:
http://www.oooauthors.org/
I think that the user's guide may be at:

http://documentation.openoffice.org/
I am just not certain which repository is the best for a new 
template. but hopefully at least some of my information is useful... 
The authors site is collaborative, but it is primarily concerned with 
documentation, not extras, as is found at the OOo extras site.

From there (Legal Pleading Template) I will propose integrating into varios
PIMs, particularly incuding Abacus Law, and PIMs linked thereto through a
product they call the Companion Link.
Now, this is starting to become interesting. Are you looking to 
integrate this with your template, or do you see these as different 
things? it looks like you want to exchange data between OpenOffice.org 
and a PIM. I am not aware of a current project dealing with this at the 
moment. If there is, you can search the projects from the OpenOffice.org 
projects page. http://www.openoffice.org/servlets/ProjectList

A good solution is needed for
printing from a wireless device.
I assume that your proposed solution involves moving data to OOo and 
then printing from there

For what it's worth, you can see my website at http://www.gassner-law.com/.
It wouldn't show much software engineering, since my family markets Family
Law Legal Services there.
Stephen Gassner
 

Nice web site!
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [dev] OpenOffice password lost

2005-02-22 Thread Andrew Douglas Pitonyak
M Vandenhoeke wrote:
I have written a OpenOffice writer document and I have lost the 
password.  Since the Save with password encrypt the document, it is 
impossible to decrypt it like the Microsoft Word document.  The only 
way is to apply the force brut which mean that you try every 
possible password to open the document.  Since the number of password 
is really big, the only way is to do it with a computer.  Can someone 
help me to recover the password by indicating to me the method I have 
to follow ?
I suppose that someone will be chocked about this problem, but I place 
me in the spirit of the Free/Libre Software, which mean that I hope 
that my problem will serve all the community.
Unfortunately for you at this moment, the encryption used by 
OpenOffice.org is very good. Your only alternative is to attempt to 
guess the password. You could probably write a macro to do this. If this 
is YOUR document, then perhaps you have an idea of the length or type of 
password, so you can more easily narrow your search.

Best of luck!
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info:  http://www.pitonyak.org/oo.php
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]