Re: [sc-dev] Statistical tool used within Sun

2005-04-05 Thread Niklas Nebel
Kohei Yoshida wrote:
In this blog entry by well-respected Mr. Tenhumberg
http://blogs.sun.com/roller/page/dancer/20050404#just_switch_staroffice_add_in
near the end of the article, there is a mention of a statistical tool 
that is used within Sun.  I hope I'm not being too nosy, but is this 
something Sun is planning to make available to the masses, or is this 
for internal use only?  The reason I'm asking this is I need to know if 
there is still a need for the community to come up with a statistical 
tool for Calc, or Sun has decided to develop it themselves because no 
one in the community has ever steped up for the task for an admittedly 
very long time.
If that's the StarSigma package, that one has been around for a while. 
It's used only internally and is not available as a product. There is 
some overlap with what one would expect in a collection of 
general-purpose statistical data analysis tools, but it's not the same, 
and it doesn't remove the need to have such tools in OOo.

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


Re: [sc-dev] inputing infinity into a calc cell?

2005-05-25 Thread Niklas Nebel

Sander Vesik wrote:

how do I get the value of a cell to be +INF / -INF? the obvious way doesn't 
work :(


Infinity isn't supposed to be in a cell. An infinite result from a 
formula is considered an error, and the error message (Err:503) is 
shown. Issue 47724 exists to distinguish between different errors, but 
it would still be an error flag, not infinity value.


That said, you can sneak in infinity through API calls that expect a 
value, but it's certainly not recommended - don't rely on any further 
operations on such a cell to still work.


What are you trying to achieve?

Niklas

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



Re: [sc-dev] Optional argument in Calc Add-in function

2005-07-25 Thread Niklas Nebel

Kohei Yoshida wrote:

All went well, but now I need to make some arguments in some functions
optional, by providing a default value for them.  How do I do that? 
Do I do it in the IDL definition, or in one of those overloaded member

functions of com.sun.star.sheet.XAddIn ?


In the IDL. Among an add-in function's allowed types are any for a 
single optional parameter, or sequenceany for varying number of 
parameters. Since any is stated instead of the parameter's type, your 
add-in function must be able to deal with double, string or 
sequence sequence any   parameters passed in that any.


Niklas

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



Re: [sc-dev] Calc File Loading Compared to Excel

2005-08-29 Thread Niklas Nebel

Lakin Wecker wrote:

I assume these discrepancies are the result of caching formula results.
The assumption is that Excel stores the previously calculated results of
the formulae in the spreadsheet and uses these values at load time,
while OO.o ignores these and fully recalculates the formulae on each
load?  I haven't been able to find concrete proof of this, can anyone
confirm this is the case? I tried looking for an option to force OO.o to
use more disk-space and save on load times. I found: Size Optimization
for XML Format and un-checked that option, but did not notice much of a
difference(9k in file size, nothing for load times).


According to someone on the dev@openoffice.org mailing list, OO.o does
indeed cache the formula results.   If this is the case, then something
else is going on.


Excel files are recalculated after loading because we can't guarantee 
our results will be exactly the same in all cases.


Our own files are recalculated to allow external editing of the files. 
Someone can change a formula in the file, not caring about the stored 
result, and be sure the changed formula's result is shown.



I'm curious to know if there are plans to address this for the 2.0
release? If not, I am willing to put in some work on this, but would
need some direction as to where the relevant processing takes place.


To clarify this point: I'm more interested in whether this is a known
issue.  If not, I don't mind doing some profiling and digging to find
out what is the problem.  I just don't want to waste any time on
something which is already being worked on, and/or finished.


Generally, load/save performance is an area that is being worked on. But 
there are many different possible causes for slow loading of files. It 
depends on the content of the files. Also, loading of our own files and 
Excel files is quite different. Recalculating the formulas might be the 
problem in your case, but it doesn't have to be. Most performance 
problems with Excel files are currently due to charts. Are there any 
charts in your files?


Niklas

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



Re: [sc-dev] Any news on: How to standardize Spreadsheet formulas?

2005-08-29 Thread Niklas Nebel

M. Fioretti wrote:

a couple of months ago I asked about this:

http://www.mail-archive.com/dev@sc.openoffice.org/msg00139.html

I just wanted to ask is there has been any news about this (especially
openformula adoption) and where I could read it. Any comment is
obviously appreciated.


I haven't heard any recent news on OpenFormula. Anyone else?

Niklas

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



Re: [sc-dev] Validation of Functions. Progress for last week

2005-08-31 Thread Niklas Nebel

Daniel Miller wrote:
As I close out the last week of the summer of code, I have finished the 
test cases, deployed them in the code and rendered results. I am 
finishing up the final documentation to hand in to my mentor Niklas by 
Tuesday. If you have any comments or questions on this project please 
contact me.


For anyone who's interested: Daniel's files are in the Function 
Validation folder at http://sc.openoffice.org/servlets/ProjectDocumentList.


Niklas

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



[sc-dev] List of possible Calc performance improvements

2005-09-19 Thread Niklas Nebel

Hi everybody,

I have put a file possible performance improvements.sxw into the 
Performance folder under 
http://sc.openoffice.org/servlets/ProjectDocumentList.


It lists a few improvement ideas for loading and saving files in Excel 
XLS as well as our own format. This was collected last year, so it's not 
all completely up-to-date.


Niklas

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



Re: [sc-dev] Article: OpenDocument office suites lack formula compatibility

2005-09-21 Thread Niklas Nebel

Eike Rathke wrote:

Not sure if this is related to this formula standardization issue, but
would such a standardization address the argument separator
inconsistency i.e. ',' vs ';' ?


Note that OpenFormula is about the file format, no the representation in
the UI.


The draft does have a section on User Input/Output.

Niklas

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



Re: [sc-dev] Article: OpenDocument office suites lack formula compatibility

2005-09-22 Thread Niklas Nebel

Jody Goldberg wrote:

What is the goal of an open-formula specification ?  I'd assume it is
to improve interoperability between versions and implementors of the
standard.  If that is the case then there is already a standard, MS
Excel.  Given the complexity and prevalence of it's evaluation
engine it seems wasteful for us to produce a standard that does
anything that is not a superset of Excel's conventions.


If cases show up later where an Excel superset specification differs 
from Excel itself, it would be the spec that's wrong. That would turn it 
from a specification into a mere description. Useful, no question, but 
probably not what the OpenFormula proponents had in mind.


So what's the goal seems to be a very good question here.

Niklas

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



Re: [sc-dev] FWD: Re: [discuss] OO.o bloat seen from KOffice side

2005-11-03 Thread Niklas Nebel

Kohei Yoshida wrote:

Also, refer to Niklas's comment on this list a while ago:

http://sc.openoffice.org/servlets/ReadMsg?list=devmsgNo=1598


So I might as well give a little update on some items from that list:
- Access to simple (non-formatted) cell content has been changed to 
direct calls, bypassing the UNO API. This will be in OOo 2.0.1.
- Use of default namespaces doesn't give enough improvement to justify 
the change.


Much of the time for loading simple documents (like that Ou example) is 
spent in the layers between the parser and the application (the SAX 
interface, the common xmloff stuff with SvXMLImportContext and the 
like), especially in string handling. This is what motivated Kay's 
string performance investigation 
(http://udk.openoffice.org/common/man/concept/string_invest.html), and 
we're also looking into bypassing the SAX interface altogether (no, 
we're not using DOM).


Niklas

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



Re: [sc-dev] Natural sort

2005-11-08 Thread Niklas Nebel

Kohei Yoshida wrote:

What's the latest word on natural sort?  Will this feature ever stand
a chance for integration?

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


With UI changes and file format extension, that seems to be something 
for the next major version (3.0, or whatever it will be, not 2.0.1 or 
2.0.2).


Niklas

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



Re: [sc-dev] Issue 55735

2005-11-09 Thread Niklas Nebel

Kohei Yoshida wrote:

Thanks for letting me know.  Would, myself creating a CWS and having
someone QA it help take some load off your shoulder, or not really? 
Just a hypothetical scenario, as I don't know if I could find an

appropriate QA personnel...  But just a thought.


Last 2.0.1 CWS integration is scheduled for tomorrow 
(http://wiki.services.openoffice.org/twiki/bin/view/Main/OOoRelease201), 
so even that wouldn't help.


For 2.0.2, we'll put it into a CWS together with other things for that 
release, so all the CWS handling stuff won't have to be done for the one 
patch alone.


Niklas

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



Re: [sc-dev] Spreadsheet functions

2005-11-14 Thread Niklas Nebel

Norm Byers wrote:

Dear Sirs,
Long ago, in a galaxy far away... I was the developer of the Saturn-Calc
Spreadsheet application for the PDP-11 (RT-11,TSX,RSX,RSTS O/S), VAX (VMS),
and PC (DOS only). Though a couple of $million worth were sold it met its
demise with the demise of DEC and the rise of Excel, it nonetheless had some
computing capabilities I long for today. 


The most significant of these capabilities were provided by several
spreadsheet functions. I do not know if your parser and execute engine would
be capable of providing these but I'd like to mention them to you:

1) PUTR(expression, range,range...)
This function allowed you to evaluate the provided 'expression' once for
each cell in the ranges, with the result being put in the cell being
evaluated.  The result was the sum of all evaluated results.


Changing other cells from the calculation (execution) of a function 
doesn't fit well with the current implementation. It could be done 
asynchronously (similar to the STYLE function), but that would of course 
create its own problems.


The closest thing we have is array formulas with multiple-cell results, 
where one cell's recalculation computes the complete result, and the 
other cells just reference it. But the whole array layout is created 
once, when the formula is entered, and not modified automatically 
afterwards.



2) ADDVAL( expression, range,range)
Similar to the above, but simply returned the sum of the individual
expression evaluations.


Array formulas can work in a similar way, as in =SUM(A2:A4*B2:B4), 
entered as an array formula (shift-ctrl-enter).



3) EROW() and ECOL() - these were the key to the above functions. With each
cell evaluated, these would change to represent the cell reference being
evaluated from the ranges in PUTR and ADDVAL. You could then use these for
additional computed cell references.


Unless you want to do strange tricks, the possibilities of array 
formulas may again be sufficient.



I also had extremely easy to create and use user defined function capability
that allowed simply defining a parameterized function within any (usually
named) cell (generally hidden), that didn't require going into a separate
macro language. I also allowed the specification of a user library that was
simply a separate user defined spreadsheet that held these functions within
named cells. Local Functions were referenced as: $A$1(parameters), or name:
$MyFunction(...), and library functions were referenced as
$$MyFunction(...). 


That sounds somewhat easier, but a bit arcane from a user interface 
point of view. Perhaps it would be better to extend named ranges (which 
are in fact named expressions), so they can pe parametrized.



Anyhow, just my two cents worth for something to consider. If I ever have
the time I might myself investigate if its possible to add such to the
OpenOffice calc product.


I don't think that we will find the time to add such features in the 
near future. If you want to look into them and have further questions, 
just ask on the list.


Niklas

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



Re: [sc-dev] OpenOffice.org Calc: WB3 File Import

2005-12-06 Thread Niklas Nebel

Pablo Rodríguez Rey wrote:

We hope if your team have any time you can make a WQ1/WB3 Quattro Pro
file format importer from Corel WordPerfect Suite v6,7,8. We have a
lot of documents in this format and we are trying to upgrade to
OpenOffice 2.0, but this characteristic is basic for us.


A Quattro Pro 6.0 (wb2) import filter is under development on the child 
workspace qpro03, see issue 41688 and the specification at 
http://specs.openoffice.org/calc/filters/qpro/qpro6.sxw. It didn't make 
it though QA in time for 2.0.1, but it's planned to have it in 2.0.2.


I don't know how different the newer formats are and how much effort it 
would be to extend the filter for them.


Niklas

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



Re: [sc-dev] oo 2.0.1 file format: text:span text:style-name=T1/ removed ?

2006-01-02 Thread Niklas Nebel

Oliver Brinzing wrote:

it seems, the text:span text:style-name=T1/ has been removed, T1 was:

style:style style:name=T1 style:family=text
style:text-properties fo:language=de 
fo:country=DE/
/style:style

is it a change or is it my fault, mybe i used a different cell formatting ?


A text style is used only if you applied some formatting (here: language 
attribute) to the text. Once there, it shouldn't be lost after loading 
and saving again.


Niklas

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



Re: [sc-dev] Import from Excel: link updating or not ???

2006-01-02 Thread Niklas Nebel

JC Helary wrote:
Neither in Excel nor in Calc are the linked files/sheets originally  
displayed. I am only translating the displayed information in the  
files, I am not the creator so I don't know what was the purpose of  
linking the tables in the first place.


It's a hidden sheet. You can show it with Format/Sheet/Show.

I see that if I update the links, OOo removes all the sheet data  and 
only leaves what looks like an address in the xml. Does that  mean 
that when updating it considers that the original data is not  present 
on the machine and thus removes it ? That is not exactly what  one could 
expect from an update function. :)


Updating a link replaces its content with the current data from the 
source file. Of course this only works if the source file is available. 
Otherwise, an error message is put into the linked sheet.


I can edit the book, save it to xls and when I open it in Excel I see  
that the original file is here, and just as it were before editing,  the 
linked data is not displayed.


Now, to check what is there, I re-open the xls file in OOo and check  
the content.xml file. What I see is that the addresses are still  
there and that the related data is not.


Does this mean that the person who'll use the file in the end will be  
able to re-link to the contents of the original tables -if present on  
his machine- or not ?


If the source file can be found at the original location, the link can 
just be updated. If it's elsewhere, you can use Edit/Links to change the 
link.


Are those addresses of any use on his side if the whole data has  been 
removed ?


And last but not least, what is the point of this update the links  
function ? Is it considered that the linked data may not be useful  and 
thus is ok to be erased ?


It's for refreshing the values, assuming the source file is available.

Niklas

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



Re: [sc-dev] line break in a text box attached to a cell

2006-01-02 Thread Niklas Nebel

JC Helary wrote:
You mean that OOo considers a line break to be a paragraph in any  
context ?


 
|You mean that   |
|OOo considers   |
|a line break to |
|be a paragraph  |
|in any context ?|
 

Here my whole box uses the same style for each of the line break  
separated segments. Ain't there a br equivalent in OOo that would  
reflect the _visual_ line break better than putting text:p which  
seems to indicate a logical structure rather than a visual formatting ?


If this is about drawing objects (shapes) with text, then you can create 
a line break within a paragraph by pressing Shift-Enter. In cells, this 
is not supported.


Niklas

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



Re: [sc-dev] line break in a text box attached to a cell

2006-01-03 Thread Niklas Nebel

JC Helary wrote:

 
|You mean that   |
|OOo considers   |
|a line break to |
|be a paragraph  |
|in any context ?|
 


I was wondering why OOo considers the necessity to convert a line  break 
to a series of paragraphs in the context of a shape (is that  what text 
boxes are called ?) attached to a cell.


I already found a number of instances in other files where the  structure:

text:p style1text:span style2text1/text:span/text:p
text:p style1text:span style2text2/text:span/text:p
text:p style1text:span style2text3/text:span/text:p

was used by OOo to implement an MS file line break. For a number of  
reasons (not related to OOo but to tools that access the xml OOo  
generates) this is not a practical and logical way to represent a  line 
break since the paragraph should encompass the whole set of  strings 
and the line break should be implemented as an inline part  of the 
paragraph. I may be wrong in my interpretation of what a  paragraph is 
though.


Looks perfectly natural to me: A text box contains a number of 
paragraphs, each with some amount of text. Line breaks as shown in your 
example, to fit the text into the box, are usually automatic. Manual 
line breaks are the exception.


Niklas

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



Re: [sc-dev] Formula Compatibility

2006-01-26 Thread Niklas Nebel

Terry North wrote:

I'm not a programmer but I've been using spreadsheets
for a long time, including Lotus, which went through a
number of changes.  I hope that reading this does not
take too long, if my suggestion has no merit.


Sorry for the late reply. It's good to see some suggestions, instead of 
the usual declaration that the problem is impossible to solve.



Rather than loading the program with various
alternative formula expressions, formula conversion or
translator utilities could be considered.  In support
of that suggestion I offer the following:

1. Autocorrect and similar functions already exist. 
How about a function that recognises obsolete formula

expressions and offers the new expressions in their
place?


Something like deprecated functions? Sounds possible, and perhaps less 
confusing to the user than just having numerous ways to express similar 
things. But from an implementation point of view, supporting such 
deprecated functions would still require the same effort as normal ones.



2. File conversion already exists.  When I converted
my main Lotus spreadsheet to MS Excel (using Save As
in Lotus) so that I could open it in OpenOffice, a lot
of formulas were translated into language I had never
used or even encountered.
   Some formulas were not translated.  They stood out,
of course, because they were converted to text.


Were only the function names changed, or the structure of the formulas? 
For Excel import, the FLOOR and CEILING functions make a good example. 
We added an extra parameter to these functions, and the Excel import 
changes formulas to include this parameter (a small change to the 
formula). Instead, I guess it would be possible to change all occurences 
of these functions to some construct containing IF(...0;...;-...). 
That would probably surprise a user, but at least it seems like a 
possible option for such cases.



3. I know a specific translator is possible because
when Lotus changed a lot of their old macro
programming language (way before LotusScript was
adopted, I'm talking about macro commands written into
the spreadsheet itself), the new program version came
with a macro translator.  It  translated, at the
user's request, macro commands in the spreadsheet into
commands using the new expressions.
   A log could be provided showing the location of
formulas which could not be translated.


But would a user know they have to run such a command? When they load a 
file, and see some results, I think only few users would bother to try 
if converting the formulas would give a different result.



Hope this may be worthwhile even though it's from a layman.


This is certainly worthwhile and contains some ideas to keep in mind.

Thanks
Niklas

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



Re: [sc-dev] extending Number of rows

2006-02-06 Thread Niklas Nebel

Laurent Godard wrote:
reading some press article, it is claimed that the next xls monster will 
 handle 1 000 000 of lines and thousands of columns


i think it is ridiculous but for a end-user point of view it will be a 
difference. And communication by microsoft seems to oriented in this 
direction


would it be possible to propose to handle 1 000 001 lines, and even make 
it optional - just to laugh ?
Calc team did a great job extending to 65000 lines. is it now a 
parameter ? what about perf ? if not used, the unused lines won't hurt


If it's just for a laugh, change MAXROWCOUNT_DEFINE in 
sc/inc/address.hxx, only make it a multiple of 128.


To really increase the limit, some more changes are needed. Drawing 
layer coordinates, Excel export and some performance-related items come 
to mind (without further changes, raising the limit so much would affect 
performance even if the rows aren't used).


Niklas

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



Re: [sc-dev] extending Number of rows

2006-02-07 Thread Niklas Nebel

Laurent Godard wrote:
MAXCOLCOUNT_DEFINE, but I'm not sure if all code that deals with 
column names can handle more than two letters.


yes i found it (was not so hard ;-) )
i'll try and see for the letter support
a pointer on the source where to do handle it ? (well, optional)


The code in address.cxx is prepared for larger column numbers and should 
generally be used. I'm just not sure.


Niklas

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



Re: [sc-dev] Re: Syncronize SW and SC statusbar behavior

2006-03-08 Thread Niklas Nebel

Kohei Yoshida wrote:

On 3/6/06, KamiHír [EMAIL PROTECTED] wrote:

As you probably know I am not a programmer, but I would like to add one
small functionality to SC.
If you click twice on first field ofWriter's statusbar the Navigator
shows up. You can not start the navigator same way in Calc. I would like
to syncronize the behavior of Calc and Writer.

Affected files in Calc:

/sc/source/ui/view/cellsh3.cxx
and
/sc/source/ui/view/tabvwsh3.cxx
has a remmarked lines to do this trick:
(starting with)
case SID_STATUS_DOCPOS:

I removed the comments. tabvwsh3.cxx is compiled without error, but
cellsh3.cxx has error like:


If you look through the sdi files in sc/sdi, you'll see that 
SID_STATUS_DOCPOS is used in ScCellShell (cellsh) and ScPreviewShell 
(prevwsh), so the changes in ScTabViewShell::Execute won't have any 
effect (it's debatable if this is correct - one might argue that the 
sheet number display belongs to the whole view, not only the selection 
of cells).


About the compiler error in cellsh3.cxx: ScFormatShell (base class of 
ScCellShell) has a protected method GetViewData(), which you can use 
instead of the pViewData member.


Niklas

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



Re: [sc-dev] Drag or copy over filtered rows

2006-03-09 Thread Niklas Nebel

jim wrote:

(e) What is the solution?

This is a matter of opinion. My view is that an improvement for one type of
case is a step forward, and it does not matter if other cases remain as they
are now. 


We know about the case when drag or copy is done from a single row, onto a
range of filtered rows below. If that one case is fixed, so that the
filtered (hidden) rows are not changed, then I believe most of the user
needs will be met. 


sc-dev might not be the right place to discuss if this is what users 
want (as evidenced by the lack of replies so far). If there is agreement 
that this is the right solution, and someone wants to actually develop a 
patch for it, then this will be the place to ask for help. But to see if 
there is such agreement, users or discuss seems more suitable.


Niklas

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



Re: [sc-dev] Making Live Spreadsheets: Can OOo connect to an XML feed

2006-04-11 Thread Niklas Nebel

Alexandro Colorado wrote:
Is it possible to make a live spreadsheet, meaning that the content of 
the cells are provided by a live XML feed from an APi. The  idea is to 
have stock charts/currency exchange/ and/or pricing of products directly 
inserted into a Calc spreadsheet and users can add calculation to this 
live objects such as graph a yield or update their price to their local 
currency automatically.


Internet -- XML Feed --- OOoMacro -- Live Spread Sheet

My first question will be if the XML can be register as a DataSource, 
which protocol to use so OOo can identify it as a datasource, second 
will be how to use the XML parser that OOo includes (SAX?) from the 
Macro API and finally can this connection be mantain as permanent or 
should it be required every x seconds.


You can make an XSLT transformation from your source format to 
OpenDocument spreadsheet format, and then use Insert / Link to External 
Data to create a link into a spreadsheet. The source file can be at an 
http location. Update of the data can't be triggered from the outside, 
but you can specify an interval at which the link is refreshed.


Or you can write a component that uses any means to parse the data and 
get notified of updates, and implements an add-in function with volatile 
results to get the value into the spreadsheet. See the service 
description of com.sun.star.sheet.AddIn for details on this.


You could also write a database driver, but for use in spreadsheets, 
this doesn't seem to add any advantage.


Niklas

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



Re: [sc-dev] troubleshoot calc addin load

2006-04-18 Thread Niklas Nebel

eric ehlers wrote:

how do i troubleshoot problems with OOo calc loading a custom addin
(DLL) from the program directory?

on my old windows machine i have an addin which successfully compiles
under VC6 and loads into calc version 1.1.

on my new windows machine i take the same source code and compile it
under VC7, it builds successfully with no errors.  then i try to load
it into calc version 2.0.2 in the usual way - i copy the DLL and RDB
file to the program directory, and update the UNO.INI file - but calc
starts without loading the addin.

how do i troubleshoot the problem?  does calc have some command line
options, logging facility, or whatever which will tell me why it's not
loading the addin?


No, Calc doesn't do much in terms of diagnostics when loading an add-in. 
Can you load your component (by its service name) from a Basic macro? If 
not, it looks like a general UNO problem better handled on api-dev or 
udk-dev.


Niklas

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



Re: [sc-dev] using cut paste on pw protected sheets causes problems ...

2006-04-20 Thread Niklas Nebel

Oliver Brinzing wrote:

I have a problem using cut  paste on non protected cells (input area) on 
password protected sheets:

Example:

A user insert values into non protected cells to do some calculations.
The sheet is password protected, the user can not change the formulas.

Now the user uses cut (strg x) on a non protected cell and paste the content
via (strg v) into another non protected cell ...

This will change the referenced cells of the formulas  and the formular 
results are wrong ...

This is a general problem and seems to affect all documents...

Would'nt it make sense to disable cut on password protected sheets ?


Disabling it only on the protected sheet wouldn't be enough, a protected 
formula might as well depend on cells on non-protected sheets. Also, 
it's not only cut  paste, but also stuff like drag  drop and 
inserting/deleting cells.


Niklas

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



Re: [sc-dev] Re: Google Summer of Code 2006 : Working for Calc -Show formula syntax in tip help

2006-04-20 Thread Niklas Nebel

Niklas Nebel wrote:

less than an hour after the suggestions were published


Er, forget about that part (times listed in too many different time 
zones)...


Niklas


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



Re: [sc-dev] how to stop cell editing ?

2006-05-02 Thread Niklas Nebel

Oliver Brinzing wrote:

maybe i am blind, but i am looking for a simple way to stop the cell editing,
if a user presses a control element (for example an ok button)

background:

the users has to insert values into some spreadsheet cells.
after that he has to press a button to do some calculation ...

many users enter the last value and do not use (return),
so the input mode is still active, and the last value is not
written into the cell  instead they just press the ok button ...


Edit mode isn't directly available in the API (see issue 20210).
What you can do right now is change the selection (select a different 
cell, then the original one again). This will always end the edit mode.


Niklas

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



Re: [sc-dev] Solver type of component for Open Office

2006-05-03 Thread Niklas Nebel

Vagmi Mudumbai wrote:
I have recently moved my laptop into the all unix world with Ubuntu. I 
am now participating in a Management course. Lot of the quantitative 
techniques demostrated use the solver addin for Excel. I was surprised 
that I could not find a relevant component in Calc. Alhough Goal Seek is 
present, it is hardly as functional as the actual solver. I would like 
to know if there is any progress being made on this feature. If yes, 
where can I play with it. I had downloaded the SC Solver but it is 
hardly used for any practical purpose.


What have you downloaded? Kohei's stuff 
(http://kohei.us/ooo/solver/index.html)?

What are you missing specifically?

Niklas

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



Re: [sc-dev] how to stop cell editing ?

2006-05-04 Thread Niklas Nebel

Oliver Brinzing wrote:

yes, i can do so, but i think it's just a workaround ...
what about an interface with the following methods

isCellEditable()
isEditing()
startCellEditing()
stopCellEditing()
cancelEditing()


Is there any deeper meaning to the inclusion of Cell into only some of 
the method names?


Niklas

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



Re: [sc-dev] how to stop cell editing ?

2006-05-05 Thread Niklas Nebel

Oliver Brinzing wrote:

No, i had a look at some java classes (javax.swing.AbstractCellEditor,
javax.swing.plaf.TreeUI,...) and found a mixture of names  indeed
i would prefer the method names without Cell ...


Which might lead to the expectation that editing of text in shapes is 
included, too.


Niklas

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



Re: [sc-dev] Calc Solver snapshot 2006-06-16

2006-06-19 Thread Niklas Nebel

Kohei Yoshida wrote:

I've uploaded a new snapshot of Calc Solver to my website.  The
difference from the previous snapshot is mainly to combine the two
separate UNO packages into one, by statically linking to lp_solve, and
removing some preprocessing of models which prevented lp_solve from
solving certain types of models.


I'm not sure if direct linking will play well with the legal review for 
external libraries. In past cases, they preferred separate binaries 
(shared object / DLL).


Niklas

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



Re: [sc-dev] Calc Solver snapshot 2006-06-16

2006-06-19 Thread Niklas Nebel

Kohei Yoshida wrote:

The static linking is done only for the standalone UNO package that is
to be distributed outside OO.o (i.e. via my personal website).  I
would think this should pose no problem since my UNO package is
distributed separately from the main OO.o build.

As far as integration goes, we will have scsolver dynamically link to
lp_solve to abide by the licensing requirement of lp_solve (LGPL).
So, I don't foresee any legal issues (/me thinks).


I was referring to eventual integration into OOo. A separate download as 
available now shouldn't be a problem.


Niklas

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



Re: [sc-dev] Disabling cell updates

2006-06-20 Thread Niklas Nebel

Kohei Yoshida wrote:

My question is, is it possible to disable repainting of cells while
their data are being modified?  Something like:

disableCellUpdates();

convert models

enableCellUpdates();

would be the most desirable, but I'm not sure if such API exists.


You can use lockControllers / unlockControllers from the document's 
XModel interface.


Niklas

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



Re: [sc-dev] Contribution to OpenOffice

2006-06-23 Thread Niklas Nebel

Gerrow, Darryl wrote:

I am looking to contribute to the projects of:

*- OpenOffice.org Calc: Validation of spreadsheet functions*
*- OpenOffice.org Platform Technology: Layout Manager Widget*

Please let me know how I can join and help in these projects.  Thanks.


Validation of spreadsheet functions has seen some very good work by 
Daniel Miller in last year's Google Summer of Code. You can find his 
results at http://sc.openoffice.org/servlets/ProjectDocumentList under 
Function Validation. I'd suggest to continue from there (look at the 
differences, see which ones are serious and how they differ, making it 
easier to correct the important ones).


Niklas

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



Re: [sc-dev] how can I reference a cell containing text with linebreaks ?

2006-06-23 Thread Niklas Nebel

Oliver Brinzing wrote:

IMHO this should be treated as a bug, cause the linebreak char is
changed into a space (code 32) ...


The first cell doesn't contain a line break character. It contains two 
paragraphs.


Niklas

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



Re: [sc-dev] how can I reference a cell containing text with linebreaks ?

2006-06-23 Thread Niklas Nebel

Oliver Brinzing wrote:

this is true, if one acesses the cell via basic getString() method ...
' result: 10 - ok

but if one uses a formula
=CODE(TEIL(A1;6;1))
the result is 32 ... :-(


Sure, different interfaces for different uses. This by itself is not a 
problem and was done on purpose.



so i cannot use formulas to split the string and put every part in a own cell 
...


What are you trying to do? You have multiple-paragraph content in one 
cell and want to use each paragraph in a separate formula? How does the 
content get into the first cell?



in excel the code() formula returns 10 and i can format the result cell to show 
the linebreak ...


There certainly is a compatibility issue here, but so far we've 
considered it a minor one.


Niklas

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



Re: [sc-dev] Solver Component

2006-06-27 Thread Niklas Nebel

Leandro Silveira Monteiro da Silva wrote:

My name's Leandro Silveira and I'm a Brazilian computer programmer just
trying to find something nice to do.
While visiting OpenOffice.org website, I got interested in doing some
contributing work.


That's great.


Actually, the task below interested me because I just love Optimization,
Mathematics, Operations Research, and Engineering. Besides, some time ago I
did some research about GRG (Generalized Reduced Gradient), the former
computer algorithm used by Microsoft Excel to solve and optimize the 
results

of a set of Linear Independent Equations.
So... I'm writing for further information on this task...


Kohei Yoshida is working on a solver component, see 
http://wiki.services.openoffice.org/wiki/Optimization_Solver and 
http://kohei.us/ooo/solver/. It's probably better to help him with that 
one instead of starting something new.


Note that dev@sc.openoffice.org is a mailing list, see 
http://sc.openoffice.org/servlets/ProjectMailingListList for archives 
and subscription instructions.


Niklas

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



Re: [sc-dev] Nice ideas

2006-07-19 Thread Niklas Nebel

Sven Verleyen wrote:
1. I have a little table with 2 collumns and 8 rows, in that table is 
the legend of something in my spreadsheet. So I want to so that legend 
when I scroll down the page.

So the idea is: the ability to block a few cells.


You mean something like Window/Freeze, but not for whole columns or 
rows, just a cell range? Column/row headers wouldn't match that range, 
and you could have parts of rows with different height next to each 
other, leading to partial rows just below the fixed area (same for columns).


A floating window that displays a cell range would probably be more 
useful. Something like the watch window suggested in 
http://www.openoffice.org/issues/show_bug.cgi?id=28386, but showing a 
range in its original table layout.


2. This idea follows on idea 1: I have my legend in a few cells and I 
need to get something out that legend to fill in a cell of my spreadsheet.
So it would be nice if you could just put it in a cell from the legend 
that you get by a right-mouse-click. So there will be a legend to the 
right/left of the functions that you get by right-clicking on a cell.


You can define cell validity from a cell range, showing a drop-down 
selection list next to the cell cursor. Unless I misunderstand your 
idea, this seems quite similar.


Niklas

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



Re: [sc-dev] Plots with Multiple Data Sets

2006-09-15 Thread Niklas Nebel

Morgan Stefik wrote:

I am writing to request an OO.org Calc feature.  There is no ability
to plot multiple data sets in an XY plot.  In order to do this
currently one would have to merge the X lists and space the Y values
in the appropriate columns.  There should be an ability to select
multiple XY data sets and have them plotted.


This will be possible with the new chart module, see 
http://graphics.openoffice.org/chart/chart.html.
The specification for the source range selection is at 
http://specs.openoffice.org/chart/dataselection/FlexibleSourceRangeSelection.odt.


Niklas

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



Re: [sc-dev] interface com.sun.star.util.XSortable, restrictions

2006-09-29 Thread Niklas Nebel

Peter Eberlein wrote:

is the method sort on a xRange restricted to max 3 columns (as in the GUI)?
If I specify 6 TableSortFields and run the method, it seems, that 
MaxFieldCount is always 3 and a readOnly property.


Yes, it's the same limitation.

Niklas

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



Re: [sc-dev] interface com.sun.star.util.XSortable, restrictions

2006-09-29 Thread Niklas Nebel

Peter Eberlein wrote:
is there an issue about that? At least a note in the DevGuide would be 
useful.


For more sort fields, there's issue 10933.

The IDL description for MaxFieldCount in the sort descriptor says 
contains the maximum number of sort fields the descriptor can hold.



By contrast the FilterDescriptor hasn't the limitation the UI has.


More than 8 filter conditions aren't stored in the database range, which 
is also indicated by the MaxFieldCount property of the filter descriptor.


Niklas

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



Re: [sc-dev] accessing cipher api for sheet/document protection possible ?

2006-10-18 Thread Niklas Nebel

Oliver Brinzing wrote:

is it possible to access the cipher api for en-/decrypting calc password
protected sheets/documents ?


No, not directly (you could create a hidden document, protect a sheet, 
save the file and extract the hash, or something like that).


Niklas

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



Re: [sc-dev] Statistical Functions Implementation

2006-10-23 Thread Niklas Nebel

Leonard Mada wrote:
I was wondering what coding algorithm does Calc use when implementing 
the various statistical functions?


REASON
===
Although different formulas are mathematically identical, they give 
different *error estimates* when coded on a computer.


EXAMPLE

The variance can be calculated using any of 2 formulas: (using either n 
or n-1 won't affect the final result I wish to point at):

(1) sigma^2 = (1/n) * SUM(Xi^2) - mean^2,   OR
(2) sigma^2 = (1/n) * SUM(Xi - mean)^2,  where i = 1 to n;


Variance and related functions were changed for OOo 2.0, see issue 
22811. There is probably still room for similar improvement in other 
functions (issue 18704 has some starting points, and we have the results 
of the Function Validation Summer of Code project at 
http://sc.openoffice.org/servlets/ProjectDocumentList). As far as I 
know, nobody is currently working on that subject, help is welcome.


Niklas

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



[sc-dev] Status of ooo-build patches

2006-10-23 Thread Niklas Nebel

Hi,

Some people complain that a large number of Calc patches is piling up at 
ooo-build and we at Sun are ignoring or delaying them. To counter this 
impression, we (the core Calc team at Sun) went through the Calc section 
of the list at http://go-oo.org/ooo-build/patches/src680/apply, and 
sorted them by their state. Here's the grouped list:


*A solution is already in a child workspace*

Issue 64968 - sc-without-stlport.diff
- A different solution is in CWS dr50.

Issue 47442 - sc-insert-note-on-right-click.diff
- The feature is in CWS notecontext (issue 8101, for 2.2).

Issue 32269 - sc-seriessum.diff
- This is in CWS dr50.

Issue 20857 - sc-r1c1.diff
- The first part (issue 69883) is in CWS scr1c1.

*A solution can be expected soon*

Issue 15509 - sc-paste-dialog.diff, sc-paste-redraw.diff
- This didn't make it before 2.1 UI freeze, will go into 2.2.

Issue 47233 - sc-iteration.diff
- We'll try to get this into 2.2.

Issue 49351 - warning-uninitialized-variables-sc.diff
- A big solution for warnings in planned for 2.2 (issue 69284).

Issue 70041 - sc-optional.diff, sc-optional-addins.diff
- We'll try to get this into 2.2.

*Depending on file format changes*
For these issues we need file format extensions, so it will take a while 
before they can be integrated.


Issue 35579 - sc-standard-filter-options.diff

Issue 26565 - sc-natural-sort.diff

*Changed error codes in formulas*
Somewhat related to the file format changes, this should wait until we 
have an OpenDocument formula specification, instead of implementing such 
changes one-by-one.


Issue 47724 - sc-div.diff

Issue 47724 - sc-div-errs.diff

Issue 47644 - sc-xl-errors.diff

*Need definition of desired behavior*
I'll have to mention the s-word a few times here. Sometimes a less 
formal agreement on desired behavior may be enough, but without even 
that, we won't get far. Also note that this section does not contain the 
majority of the patches.


Issue 35578 - sc-autofilter-empty-nonempty.diff
- UI change that needs a specification.

Issue 33851 - sc-no-delete-filteredrows.diff
- The desired behavior with filtered cells is still unclear. Deleting of 
cells was changed for 2.0 (issue 33438).


Issue 23658 - sc-datapilot-dynamic-range.diff
- The dialog change needs a specification. The non-working 
implementation is secondary.


Issue 21923 - sc-save-password-minlength.diff
- Dialog change that needs a specification.

Issue 38108 - calc-new-acceleration.diff
- UI change that needs a specification.

Issue 20496 - sc-startformulawplus.diff
- The details of the desired behavior have to be agreed upon.

Issue 3687 - sc-preserve-imp-opts.diff
- Again, details of the desired behavior have to be agreed upon.

Issue 56202 - sc-toggle-formula.diff
- UI change that needs a specification, problems with other keyboard 
layouts.


Issue 67243 - sc-toggle-merge-center.diff
- Current behavior is as intended, change has to be agreed upon.

*Incomplete implementation*

Issue 63686 - sc-xls-pivot-optimization.diff
- operator== doesn't work, order isn't preserved.

Issue 45843 - sc-get-pivot-data.diff
- This probably needs a different approach, see comments in issue.

Issue 59082 - vba-sc-handleautoshapemacro-import.diff
- This must be adjusted to the new specification.

Issue 66550 - vba-sc-autoshapes-hyperlinks.diff
- This depends on issue 59082.

*Rejected*
Note that the patches that were rejected for technical reasons all had 
seen no activity for some time,


Issue 17965 - gui-sc-delete.diff
- This was rejected after consultation with User Experience.

Issue 45245 - sc-sheet-double-click-rename.diff
- The patch doesn't implement the feature as suggested by User Experience.

Issue 35581 - sc-filter-hide-filteredrows.diff
- This takes a wrong approach to implementation.

Issue 37388 - sc-datapilot-autoformat.diff
- Table AutoFormats don't work well with DataPilot tables. DataPilot 
AutoFormats should be separate.


Issue 44982 - sc-change-record-dnd.diff
- Uses a wrong action type, rejection isn't handled.

Issue 49011 (?) - sc-datapilot-cut-paste-disable.diff
- This takes a wrong approach to implementation.

Issue 47811 - sc-string-arg.diff
- The patch handles only some cases.

*No problem in plain OOo build*
These are primarily fixes to problems with other patches. They can't be 
integrated alone.


Issue 53261 - gcc4-visibility-sc.diff
Issue 47145 - sc-pv-crasher.diff
sc-datapilot-crash-fix.diff
sc-dp-database-crash.diff

*No issue submitted*
Some of these seem to be work in progress. Anyway, if they aren't 
submitted to us, we can't integrate them.


zoom-combobox.diff
sc-filters-fill-fix.diff
sc-autofilter-autotrim-choices.diff
sc-xls-builtin-name-scope.diff
sc-dp-hash-items.diff
sc-read-only-colrow-resize.diff

I hope this list helps to make clear that we do care about patches, we 
just can't integrate everything right away as it comes in.


Niklas

-
To unsubscribe, e-mail: [EMAIL 

Re: [sc-dev] Re: Calc cell justification

2006-10-25 Thread Niklas Nebel

Alan Yaniger wrote:
Thanks for your suggestion. I added a function in output2.cxx to extend 
the default alignment handling, call it when necessary, and it works 
great. There's still a problem, though. When I edit a field by pressing 
F2 or clicking on the string in the input window, the alignment of the 
cell temporarily reverts to the old default alignment. Alignment of the 
input window is OK, the only problem is the alignment of the cell. When 
the editing is done, the cell is refreshed properly, but during the 
editing the text suddenly gets realigned. How can I prevent this?


That is handled in ScInputHandler::UpdateAdjust in 
sc/source/ui/app/inputhdl.cxx.


Another related question: I still have a problem when I import Excel 
documents with text direction set as Context. Here also I have to make 
the setting based on the text content, but this time it's the text 
direction setting, and it's only with imported Excel documents. How 
could I handle that problem?


There's more to that, see issue 37905. We don't have a setting depend 
on content (which is what Excel's Context does). Adding that choice 
to the text direction requires quite a lot of changes. If it's just for 
imported Excel files, one might go through the file after importing and 
apply Right-to-left attributes where needed. Not a perfect solution, 
but maybe good enough.


Niklas

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



Re: [sc-dev] Re: Calc cell justification

2006-10-26 Thread Niklas Nebel

Alan Yaniger wrote:

Is this the way to get the text direction value if I want to change it ?

To change the value, I've been trying to use the function, for example:
   pItem.PutValue( FRMDIR_ENVIRONMENT, ATTR_WRITINGDIR );

but I'm getting the compiler error:
cannot convert 'this' pointer from 'const SvxFrameDirectionItem' to 
'SvxFrameDirectionItem '


How do change I the text direction  value?


Just modifying an item on the stack doesn't much effect anyway. Use 
something like


pDocument-ApplyAttr( nCol, nRow, nTab,
  SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, ATTR_WRITINGDIR ) )

This will take care of properly updating the ScAttrArray structure.

Niklas

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



Re: [sc-dev] Status of ooo-build patches

2006-10-26 Thread Niklas Nebel

Kohei Yoshida wrote:

Issue 35579 - sc-standard-filter-options.diff

Issue 26565 - sc-natural-sort.diff


I'm fully aware that the reason why the file format needs to be
extended in order for these patches to be included is because the
state of their corresponding UI control (i.e. checkbox, combo box
etc.) needs to be stored per named range etc.

But considering the immediate benefit of these two patches that a
large number of users will enjoy, perhaps a slight breakage in
functionality (not saving the state in the document) which the
majority of users will not even notice may be warranted?


Silently leaving out the new flags would mean that incomplete or even 
wrong information (in the case of filters) is stored. But I could 
imagine adding an extra check, so when the new features are used, no 
sort/filter criteria are saved at all.



Or we can perhaps choose a middle-ground; we put the patches in with
the UI bits hidden (by use of #ifdef ...#endif), which may be unlocked
with the right compiler switch (-D) or a environment variable.  That
way the patches get included, but the functionality is absent in the
default build (easier for ooo-build and good for the users).


Too much #ifdef always makes it easy to break the case you're not using, 
especially with warnings as errors, which is coming to sc soon.


Niklas

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



Re: [sc-dev] String Operations in Calc and Advanced Utilities

2006-10-31 Thread Niklas Nebel

Leonard Mada wrote:
Exactly this is the problem. It returns an *ERROR*, so searching for 
string 1 OR string 2 will fail grandiosely. Actually, it is 
impossible to perform this search in calc. This is a *BUG*. (the full 
comments can be found for issue 66590)


It's possible using ISERROR. One day, for compatibility, we'll need an 
IFERROR-like function, which will also make such cases easier to handle.


Niklas

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



Re: [sc-dev] Statistical Functions Implementation

2006-11-10 Thread Niklas Nebel

Leonard Mada wrote:
I entered in column B(1): =A1 + 1, that is I added the value 1 for 
every element in column A. That said, data values in columns A and B 
should be totally correlated. The NIST accepts a value of -0.999, but:


They don't accept a value of -0.999 instead of 1, they just calculated 
something different (autocorrelation).



- Calc gives only a value of -0.882.
- R gives an absolute precise value of +1 (it reports positive values ) 
both with the cor(x,y) function and with the cor.test(x, y) function


Not even the slightest deviation from this value. This should be 
definitely improved in Calc.


NOTE: sorting the values in Calc, breaks CORREL() [it gives an #VALUE 
error, NO idea why]. Well, if I pair the non-ordered data in A with an 
ordered (A+1), I see a very strange result: CORREL() gives -1.01, BUT 
this coefficient CAN BE only between -1 and +1!!! SOME SERIOUS ERROR.


I will try to make more tests during the weekend.


I'm not sure what you're trying to achieve here. A single look at the 
source would show you how CORREL is implemented using sums and square 
sums, which limits the values for which it works. There's no need for 
more example guesswork.


Niklas

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



Re: [sc-dev] Statistical Functions Implementation

2006-11-10 Thread Niklas Nebel

Leonard Mada wrote:

Mind if I ask, in which file is the CORREL function defined?
Tests are still useful to see where the algorithm fails (and 
purportedly, the new algorithm should be correct). Extensive test cases 
are always welcome.


sc/source/core/tool/interpr3.cxx, method ScInterpreter::ScCorrel.

I also suggest that one of the developers sits down for half an hour and 
writes a TEXT file containing:

- statistical function name
- source file where it is defined
- it would be of great help for others not knowing the OOo source code 
well, where to look for


Find the function name in sc/source/core/src/compiler.src, the 
corresponding OpCode value in sc/inc/opcode.hxx, and look in 
ScInterpreter::Interpret (sc/source/core/tool/interpr4.cxx) which method 
is called for the OpCode. Add-In functions are separate, but that's how 
you can find any built-in function's implementation.


Niklas

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



Re: [sc-dev] Text Direction in formula dialog

2006-12-20 Thread Niklas Nebel

Alan Yaniger wrote:

Question 1:
To align the names in the function list, I added following to  
ScFuncPage::UpdateFunctionList() :


if (ScGlobal::IsSystemRTL())
   aLbFunction.EnableMirroring( );

Is this the best way to do it?


That would mean double mirroring, the flag wasn't intended to be used 
that way. The intended way to prevent mirroring is EnableRTL, but it 
would have to be called for the children of the list box, so maybe the 
ListBox should have an extra method.


If you do use EnableMirroring, you should use 
GetSettings().GetLayoutRTL() instead of ScGlobal::IsSystemRTL(), to 
match VCL's configuration handling.


But above all: Is there general consensus about mirroring a single 
control, including its scroll bar? What would you do with other list 
boxes that can contain English entries, or even mixed ones? Somehow, 
this doesn't seem right.


Niklas

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



Re: [sc-dev] about bugs

2007-02-06 Thread Niklas Nebel
blueeagle wrote:
 We are RedOffice team.there is some bugs that we found in the OOo2.1.

If you find bugs, please file them in IssueTracker, see
http://qa.openoffice.org/issue_handling/index.html. On the mailing
lists, there may be some discussion, but unless a bug is filed, it will
be forgotten eventually.

 The default size of Chinese and English words in the Spreadsheet is different.
 1.Create a new Spreadsheet;
 2.Insert a picture from file;
 3.Double click the picture and input some English words and Chinese words;
 Result:The default size is different.(The defult size of Chinese is much 
 larger than the defult size of English)  

The larger size is the common default for drawing objects across the
applications, the smaller one is the spreadsheet-specific one for
western text. It was never specified explicitly, but, yes, they should
probably be the same.

 Can't delete the attribute of hyperlink in Spreadsheet. 
   1. Create a new Spreadsheet and input some words;
   2. Select part of the words, Insert - Hyperlink ,Take Internet for 
 example, input a website in the Target textbox ,Apply-Close;
   3. Select the words with the hyperlink attribute, Insert - Hyperlink, 
 delete the website in the Target textbox, Apply - Close;
   Result:The attribute of hyperlink are still there.  

After removing the target, there is no hyperlink to insert, so Apply
doesn't do anything. Formally correct, but perhaps unexpected. You can
remove all hyperlinks in a cell, along with cell formats, using Default
Formatting in the Format menu.

Niklas

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



Re: [sc-dev] Using text in calculation fails to raise error

2007-03-01 Thread Niklas Nebel

Guido Ostkamp wrote:
(*) This is _not_ one of the typical we want numbers erroneously 
formatted as text to be still treated as numbers as in Excel questions 
as handled in many issues like #5658 etc.


It's related. The error that others show is from failure to convert to a 
number. Our approach is at least consistent between single values and 
cell ranges (for SUM etc). Sometime, we'll have to do something about 
it, but there's no need for another issue.


Niklas

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



Re: [sc-dev] Issue 51564 - clicking Sum with several cells selected produces unexpected result

2007-03-19 Thread Niklas Nebel

Kirill S. Palagin wrote:

Issue http://www.openoffice.org/issues/show_bug.cgi?id=51564 describes
important functionality that is missing in our product - competing
product has this functionality and it is widely used by users. The issue
has generated a significant interest among our users - currently it has
44 votes. Fixing the issue does not seem to require UI changes.

Please consider this issue for version 2.3.


Target milestone is 2.x, which is the value for changes we want to have 
in the not-too-distant future. Of course, if anyone wanats to help, it 
may come even faster.


Niklas

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



[sc-dev] Rough sketch of formula API

2007-03-19 Thread Niklas Nebel

Hi everyone (including those who bring this up on wrong irc channels),

Here's a quick overview on what I have in mind for the API to allow the 
OOX import component to handle formulas:


1. The cell will have a new interface XFormulaTokens or something, 
with methods

* sequenceany getTokenArray()
* void setTokenArray([in] sequenceany aTokens)
There will be UNO structs for the different token types we have, and 
each any will contain one of them.


2. From the document, a new service like FormulaParser can be 
instantiated, which has an interface with methods

* sequenceany parseFormula([in] string aFormula)
* string printFormula([in] sequenceany aTokens)
and properties to control things like reference style, parameter 
separators, or possibly a function name replacement list. This is 
basically a wrapper around ScCompiler::CompileString and 
CreateStringFromTokenArray.


I'll try to flesh this out and make a basic implementation (without 
settings beyond what ScCompiler has today) this week, on CWS 
xmlfilter02, so it can be used and extended with what's needed for the 
filter.


To share formula handling code between xls and xlsx import, I think of 
something like this:

xls:
1. Read tokens into API structs
2. Reorder tokens from RPN into normal order
3. Do some magic processing
4. Apply the tokens to the cell

xlsx:
1. Read the formula string
2. Use new service to parse into tokens
3. Do some magic processing
4. Apply the tokens to the cell

This would allow step 3 to be shared.

Niklas

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



Re: [sc-dev] First draft for margins in Page Preview, please

2007-03-23 Thread Niklas Nebel
zhaosheng wrote:
 I have sent a email to you with the file, did you receive it?

No, I only got the mail from the mailing list (don't know why).

Niklas

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



[sc-dev] Formula API on CWS xmlfilter02

2007-03-23 Thread Niklas Nebel

Hi,

A first version of the formula API is now in the cvs for the 
xmlfilter02 CWS.


Because much of ScToken's functionality is needed only within the 
context of the RPN code used for calculation, and this new API only 
deals with the non-RPN code, it can be simpler than in the previous 
mail. Instead of having different token structs and a sequenceany, we 
now use sequenceFormulaToken, where FormulaToken is a struct 
consisting of just an integer for the OpCode and an any for extra data. 
The extra data can have the following types:

- double: Only with ocPush, for numeric constants.
- string:
-- With ocPush for string constants.
-- With ocExternal or ocMacro for function names.
-- With ocBad for text that couln't be parsed.
- long:
-- With ocName or ocDBArea for named ranges or database ranges.
-- With ocSpaces for the count of spaces.
- struct SingleReference:
-- With ocPush for a single cell reference.
-- With ocColRowName for an automatic cell reference.
- struct ComplexReference: Only with ocPush for a range reference.
When array constants are finished, that will be another type 
(sequencesequenceany, probably) with ocPush.


The following is available now:
- The cell supports the interface XFormulaTokens, with getTokenArray and 
setTokenArray.
- The new parser object 
(createInstance(com.sun.star.sheet.FormulaParser) from the document) 
supports XFormulaParser (parseFormula, printFormula) and XPropertySet 
for options. Currently the only option property is ReferencePosition, 
a CellAddress struct with the position used for parsing. This will have 
to be extended, to select things like the reference style. The 
implementation is in sc/source/ui/unoobj/tokenuno.cxx.


This little Basic macro shows the steps to parse and apply a formula:

Sub Main
dim aCellPos as new com.sun.star.table.CellAddress
aCellPos.Row = 3

oDoc = ThisComponent
oParser = oDoc.createInstance(com.sun.star.sheet.FormulaParser)
oParser.ReferencePosition = aCellPos

' TODO: set parser options (separator, reference style etc)

aCode = oParser.parseFormula(SUM(A1:A3))

' TODO: manipulate the token sequence if needed

oSheet = oDoc.Sheets(aCellPos.Sheet)
oCell = oSheet.getCellByPosition(aCellPos.Column, aCellPos.Row)
oCell.TokenArray = aCode
End Sub

I'll be on vacation next week, but I hope this helps to get started with 
the formula import.


Niklas

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



Re: [sc-dev] First draft for margins in Page Preview, please

2007-03-23 Thread Niklas Nebel
zhaosheng wrote:
 I have sent a email to you with the file, did you receive it?

I got it now, and I see it's also attached to issue 75673.

Keep in mind that the header has a Height and a Spacing setting. The
line in your screenshot seems to be at the sum of both. Which one is
supposed to be modified, and what about the AutoFit height flag?

Accessibility shouldn't be an issue because the settings are already
available in the page format dialog.

For the text of error messages, you should contact the User Experience
project.

Have you already implemented something? If so, can that be seen anywhere?

Niklas

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



Re: [sc-dev] Once again, the thing I am missing most in OpenOffice

2007-04-05 Thread Niklas Nebel

Erich Neuwirth wrote:

I checked, and it is much better now!
But still not the full functionality.
While the scrollbar button is grabbed with the mouse,
the linked cell value does not change,
it only changes after the scrollbar button is released.
So some animation is possible by clicking and not releasing
the arrows at the end of the scrollbar, but
this gives fixed speed.

Since the cell value is not updated, this is probably a Calc problem
and not a Chart problem.


In fact, a ScrollBar can do live updating, there just is no UI to 
enable it, see issue 67667.



A minor pro blem is that there is a noticeable flicker
while the chart is being updated.


It's planned to do fully buffered repainting soon (CWS aw046).

Niklas

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



Re: [sc-dev] ScInterpreter::ScPropper() Optimization?

2007-04-12 Thread Niklas Nebel

Leonard Mada wrote:
I found some interesting code inside the function 
ScInterpreter::ScPropper() [in interpr1.cxx]. namely, there is a while 
loop and an unnecessary subtraction is nested inside this while loop:


see   pStr[nPos - 1]


   while( nPos  nLen )
   {
   aTmpStr.SetChar( 0, pStr[nPos-1] );// --HERE
   if ( !ScGlobal::pCharClass-isLetter( aTmpStr, 0 ) )
   pStr[nPos] = pUpr[nPos];
   else
   pStr[nPos] = pLwr[nPos];
   nPos++;
   }

This could be easily rewritten to:

   xub_StrLen nPos = 0;   //  - MODIFIED
   const xub_StrLen nLen = aStr.Len() - 1; //  - MODIFIED
  // NEED TO TEST (aStr.Len() == 0) ???
   while( nPos  nLen )
   {
   aTmpStr.SetChar( 0, pStr[nPos] );//  - MODIFIED
   nPos++; //   MOVED HERE
   if ( !ScGlobal::pCharClass-isLetter( aTmpStr, 0 ) )
   pStr[nPos] = pUpr[nPos];
   else
   pStr[nPos] = pLwr[nPos];
   // nPos++; //   -- MOVED  BEFORE  IF
   }
   aStr.ReleaseBufferAccess( nLen + 1);  // - MODIFIED
   PushString( aStr );

Is this optimization feasible?


That wouldn't give any noticeable performance gain (probably not even 
measurable), so let's keep the old code. Having a variable nLen contain 
the string length, as the name suggests, is also easier to read and 
understand.


Niklas

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



Re: [sc-dev] regression analysis tool for openoffice calc

2007-04-17 Thread Niklas Nebel

bernie hunter wrote:
I'm a new developer in grad school, and want to make a regression tool 
for CALC which it doesnt have (at least my version of Open Office Calc 
doesnt)..and just wanted to make contact and say I'm going to try and 
learn about that and do it. I'd hope someone would write and tell me if 
they are already working on it.


What exactly do you have in mind? Note that there are already 
spreadsheet functions LINEST and LOGEST.


Niklas

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



Re: [sc-dev] There is a new bug

2007-04-18 Thread Niklas Nebel
gaozm wrote:
   Thank you very much for your help during these weeks, now,there is a new 
 bug that we found in the OOo2.1.
 The bug can be described as follows:
   Save the document when the content of the note show Fontwork, withdraw 
 from the process.
   1, Open a new Calc document.
   2, Select anyone cell, insert-note, input some characters in the notebox, 
 then click another cell. 
   3, View-Show all notes, select the notebox, Right Key mouse click, select 
 Fontwork, the Fontwork dialog is activated in the left corner of the page.
   4, Choose anyone format, Ctrl+s, save the document.
 
   Result: The process exits accidentally.
 I would like to know whether this bug is needed to be fixed, and look forward 
 to your suggestions.

The crash can easily be fixed by adding a null pointer check to
ScDetectiveFunc::GetDetectiveObjectType, but the note will then be lost
while saving, because FontWork turns the note shape (caption) into a
different object, which is no longer recognized as a note. So FontWork
should already be disabled for note objects.

Niklas

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



Re: [sc-dev] R + Calc Update

2007-05-02 Thread Niklas Nebel

Kohei Yoshida wrote:

You may have already seen it, but there is also the scaddins module
where you can add new functions.  This module was there originally to
ease addition of new cell functions without touching the Calc core, but
I don't know if this module is actively used today (Niklas?).  I
wouldn't bother with this scaddins module though.  I'd go with the UNO
add-in component approach.


The scaddins module is still used and contains functions that are 
included in the default installation. But, as mentioned, the R 
integration probably doesn't need any functions.


Niklas

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



Re: [sc-dev] Re: [?? Probable Spam] Re: [sc-dev] There is a new crash bug!

2007-05-02 Thread Niklas Nebel
毛勇岗 wrote:
 Thank you for your suggestions.
  As you said  I analyzed the call stack. And in the SfxMedium* 
 SfxApplication::InsertDocumentDialog(sfx2\source\appl\appopen.cxx), 
   sal_uInt32 nError = pMatcher-DetectFilter( *pMedium, pFilter, FALSE );
   if ( nError == ERRCODE_NONE  pFilter )
 pMedium-SetFilter( pFilter );
   else
DELETEZ( pMedium );
 when insert a *.mpeg, the nError == ERRCODE_NONE  pFilter  always is 
 true.Then the program crash. 
 If I change
 sRealType = ::rtl::OUString::createFromAscii(calc_Text_txt_csv_StarCalc);
 To:
 sRealType = ::rtl::OUString::createFromAscii(writer_Text_encoded);
 in TypeDetection::impl_checkResultsAndAddBestFilter(...) 
 (filter\source\config\cache\typedetection.cxx), The bug will be fixed.
 I'm looking forward to your advice!

So Calc tries to load the the MPEG file as CSV (text) file. As far as I
can see, the problems are from the display of the resulting strings in
the filter options dialog.

Your change would probably break the use of valid CSV files with unknown
extensions in the same situation again (issue 60158).

Calc's filter detection service already contains logic to reject CSV
files that have null bytes in unexpected positions,  but in this
workaround case, the filter is selected without calling its detection
service. Maybe that can be changed, but generally, the filter detection
code can be quite fragile. I'm cc'ing the framework list.

Niklas

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



Re: [sc-dev] Calc and R through UNO

2007-05-07 Thread Niklas Nebel

Wojciech Gryc wrote:

In general, I think it would be best to continue with the UNO add-in
development using Rserve. While working on this, I realized that no matter
what happens, users of this tool will need to install R and possibly an R
package. As such, I don't mind making the entire thing external to the OO
source code and just build an installer or tutorial that contains 
everything

on one site.


Now let's not mix up things with regards to external. From an 
implementation point of view, this should be a UNO component, not part 
of the Calc module.


But still I would strongly prefer a component that's available from the 
OOo site, under LGPL. Even if users have to install R separately, having 
the component on the OOo website would greatly improve its visibility to 
OOo users.


If you want to use the connection via Rserve as a prototype to get the 
rest of the component implemented, make sure that the dependencies on 
Rserve remain limited, so it's possible to replace it later.


Regarding the use of add-in functions, one of the original ideas was to 
also allow graph images as results. Cell formulas can't handle that.


Niklas

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



Re: [sc-dev] About the bug of Fontwork

2007-05-15 Thread Niklas Nebel
maoyg wrote:
   FontWork should be disabled for note objects,because it will be caused 
 crash.
 I analyzed the call stack, and in the void ScDrawShell::GetState() 
 (sc\source\ui\drawfunc\drawsh2.cxx ),
if( pObj  pObj- GetObjIdentifier() == OBJ_CAPTION   pObj- GetLayer() 
 == SC_LAYER_INTERN)
{
bDisableAnchor = true;
rSet.DisableItem( SID_ANCHOR_PAGE );
rSet.DisableItem( SID_ANCHOR_CELL );
 + rSet.DisableItem( SID_FONTWORK );   //add
}
 The bug will be fixed.
 l'm looking forward to your advice!

SID_FONTWORK is the slot to open/close the Fontwork window. With that
change, you could still select a normal object, open the Fontwork
window, select the note, and apply Fontwork operations to the note. You
should look at the GetFormTextState methods of ScDrawShell and
ScDrawTextObjectBar.

Niklas

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



Re: [sc-dev] Can't insert rows/columns when contains cells merged !

2007-05-16 Thread Niklas Nebel
maoyg wrote:
 Thank you very much for your help and relpy.I have a new problem now.
 In Calc,select only the range B3:D5 on an empty sheet,click toolbar -merge 
 cells.Then I want to insert a row/column where contains the merged cells. 
 The result : Can't insert rows/columns when contains cells merged.
 I want to know the feature allows us to insert row/column when it 
 contains the merged cells, whether will be add in sc project or not.

Inserting into a merged cell range would be useful, but there are no
plans to change this at the moment.

If you want to give it a try, the internal structure of merged cells is
this:
- The top left cell has a ScMergeAttr attribute (ATTR_MERGE), containing
the horizontal and vertical number of merged cells.
- The overlapped cells have a ScMergeFlagAttr attribute
(ATTR_MERGE_FLAG) with the flags SC_MF_HOR and/or SC_MF_VER, depending
on the position.
This structure has to be updated when inserting into a merged cell range.

Niklas

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



Re: [sc-dev] About the Top-10 dialog

2007-05-16 Thread Niklas Nebel
gaozm wrote:
 Thank you very much for your help, we have accomplished a Top-10
 dialog for our users, because we thought it is necessary to bring
 more convenience to users.Do you think it feasible?I'm looking
 forward to your suggestions, thank you.

So you have something finished? What does it look like? Can it be seen
somewhere?

Niklas

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



Re: [sc-dev] About the Top-10 dialog

2007-05-16 Thread Niklas Nebel
gaozm wrote:
 We have finished the Top-10 dialog, it looks like the Top-10
 dialog when you select the Top-10 in MSoffice, do you think it is
 feasible? Thank you.

It seems a bit redundant with the Standard Filter dialog. You should
bring it up on the ux-discuss list.

Niklas

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



Re: [sc-dev] About the Cells Hold high-default Value

2007-05-21 Thread Niklas Nebel
gaozm wrote:
 Hello all:
 Here is a new question that because the cells hold high-default value is 
 too small(0.45cm), so our team changed the cells hold high-default value to 
 0.53cm, the changed code like this:
 
 // ppPoolDefaults[ ATTR_FONT_HEIGHT  - ATTR_STARTINDEX ] = new 
 SvxFontHeightItem( 200 );  
  ppPoolDefaults[ ATTR_FONT_HEIGHT  - ATTR_STARTINDEX ] = new 
 SvxFontHeightItem( 250 );
 
 and
 
 // ppPoolDefaults[ ATTR_CTL_FONT_HEIGHT - ATTR_STARTINDEX ] = new 
 SvxFontHeightItem( 200, 100, ATTR_CTL_FONT_HEIGHT ); 
   ppPoolDefaults[ ATTR_CTL_FONT_HEIGHT - ATTR_STARTINDEX ] = new 
 SvxFontHeightItem( 240, 100, ATTR_CTL_FONT_HEIGHT );
 
 the file path is: sc/source/core/data/docpool.cxx
 
 Howerer,these corrections may cause some graph drawing problems at the 
 bottom of the table.
 I hope you can give us some suggestions telling where can we  change to 
 obtain the cell's high-default value rightly, I'm looking forward to your 
 reply.

That would change the default font height for Latin and CTL text. When
you say the row height is too small, do you mean CJK text doesn't fit
into the cell? Maybe ScGlobal::InitTextHeight has to be changed, but in
a way that doesn't affect Latin-only users, for whom the current height
is good.

Niklas

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



Re: [sc-dev] Whom should I assign i56202 to (for QA)?

2007-05-29 Thread Niklas Nebel

Muthu Subramanian wrote:

  I fixed i56202 in msba01.
[http://www.openoffice.org/issues/show_bug.cgi?id=56202]

Whom should I 'assign to', in EIS, for QA?


It's on the wrong branch. OOF680 was used for 2.2.1. The CWS has to be 
resynced to a current SRC680 version first.


Niklas

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



Re: [sc-dev] queryEmptyCells()

2007-06-05 Thread Niklas Nebel

Jahn, Ray (R.) wrote:

The symptoms can be divided into two types:

* a brand new spreadsheet file
  a brand new and empty spreadsheet
  no content in any cell

  aXCellRange.queryEmptyCells() always returns nothing
  regardless what the range is set to.

* a brand new spreadsheet file
  a brand new spreadsheet
  one single cell filled with content

  aXCellRange.queryEmptyCells() returns a correct result
  only if the range includes the cell with content.
  It returns nothing for all other settings of spreadsheet ranges,
  be it a row range, a column range, a block range,
  as long as the range excludes the cell with content.


See issue 20044.

Niklas

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



Re: [sc-dev] SDK Java Examples Windows XP

2007-06-05 Thread Niklas Nebel

Wojciech Gryc wrote:

But they're Java add-ins...? So shouldn't they work?

I'm specifically referring to the java/Spreadsheet examples in the SDK.


The Java examples, compiled on Linux, also work on Windows. Did you 
close the application, including the quickstarter?


Niklas

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



Re: [sc-dev] Something about Filter function

2007-06-05 Thread Niklas Nebel

Kohei Yoshida wrote:

I've also started some work on Excel 2007 style multi-string matching
filter (or whatever people like to call it).  It's basically an
autofilter extension where you can select multiple items to display;
rather than just one.

The detail is in here:

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

For now, it's just an interal data structure change with no UI.  But I'd
like to expand on this as time permits, to make it visible at UI level.


With such changes, don't forget the file format. Filter settings are 
saved, and we have to adhere to the specification about how they are stored.


Niklas

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



Re: [sc-dev] SDK Java Examples Windows XP

2007-06-05 Thread Niklas Nebel

Wojciech Gryc wrote:

However, when I install RAddon.uno.pkg it does add menus and everything
else, just no functions... That would mean the installation itself works on
XP, right? Or is there a separate issue to consider with adding functions?


Calc keeps a list of all add-in functions. If an add-in uses 
configuration entries for the function descriptions (like the add-ins 
created with the NetBeans integration), then Calc gets notified when 
it's installed and rebuilds the list. But for old add-ins, which are 
only registered as service implementations, there is no such 
notification, and you have to restart the application so the list is 
updated.


Niklas

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



Re: [sc-dev] Some simple tasks

2007-06-15 Thread Niklas Nebel

Kohei Yoshida wrote:

I can see that #i27745# and #i33851# have the highest votes casted among
all autofilter related issues.
http://www.openoffice.org/issues/show_bug.cgi?id=27745
http://www.openoffice.org/issues/show_bug.cgi?id=33851

So, I personally would recommend looking into those issues.


In terms of something easy to start with, issue 23299 might also be 
worth a look.


Niklas

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



Re: [sc-dev] Rubber/Pencil function for Calc

2007-06-20 Thread Niklas Nebel

Max Giesbert wrote:

Thanks for pointing to XEnhancedMouseClickBroadcaster . I register a
XEnhancedMouseClickHandler to it. But I only have an EnhancedMouseEvent
in the mousePressed method. How can i find out the cell clicked with
that? I didn't find any suiting methods.


It's in the Target member of the EnhancedMouseEvent.

Niklas

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



Re: [sc-dev] Increasing maximum worksheet size

2007-06-21 Thread Niklas Nebel

Alan Yaniger wrote:
A number of our users have asked if there's a way we could increase the 
maximum worksheet size. One said that for this reason alone he's 
planning to move to Excel 2007, which allows over a million rows. What 
is involved in implementing this feature in Calc? I'd like to look 
into working on this, if it's manageable.


Points 5 and 6 under Strategy at 
http://sc.openoffice.org/row-limit.html are still open, and there are 
still some loops over all rows, which would have to be changed. Then, 
there's the Excel export and minor stuff like display of row headers.


Ignoring most of that, it has been done before, see 
http://blogs.nuxeo.com/sections/blogs/laurent_godard/2006_02_08_the-spreadsheet-next.


Niklas

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



Re: [sc-dev] About issue 63144#,please review patch file!

2007-06-22 Thread Niklas Nebel
maoyg wrote:
 I have made some changes about Issue 63144# on the version 
 SRC680_m215.The attachment is patch file of the issue 63144#.
 Would you give me some suggestion and help about the patch file?

The attachment was removed from your mail by the mailing list server, so
we can't see it. Can you attach the patch to the issue?

Niklas

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



Re: [sc-dev] About issue 63144#,please review patch file!

2007-06-22 Thread Niklas Nebel
maoyg wrote:
 I have just attached the patch to the issue. Please check it.

It's the right direction, but the patch disables editing of any notes on
a protected sheet. You should look if the note's cell is protected, so
notes of non-protected cells can still be edited.

Niklas

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



Re: [sc-dev] Re: [!! SPAM] Re: [sc-dev] About issue 63144#,please review patch file!

2007-06-25 Thread Niklas Nebel
maoyg wrote:
 The current sheet has been protected, so all of the cells in it are
 protected. So that there is no non-protected cells in this protected
 sheet. Then there is no need to look if the note's cell is protected.
 All the notes in it should not be edited then. I find the all the
 objects such as the pictures can not be edited after the sheet being
 protected. I think the notes should be realized the same to the them.
 I'm looking forward to your advice :)

Cells can be excluded from protection by removing the Protected flag
in Format/Cells/Cell Protection (before protecting the sheet). Normal
shapes are all protected with their sheet, but notes for a non-protected
cell can be created, or edited if they're not shown, so we should allow
editing of them also when they are shown.

Niklas

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



[sc-dev] ScRange::Parse return values

2007-06-25 Thread Niklas Nebel

Hi everyone who's involved with reference parsing,

When parsing references with CONV_XL_A1 convention, the return values 
from ScRange::Parse are different from those for CONV_OOO and don't 
match what ScCompiler::IsReference expects.


- For a single reference (Sheet1!A1), the bit SCA_VALID is set, which 
causes a ScDoubleRefToken to be generated.


- For a range reference like Sheet1!A1:A2 (with only one sheet name), 
SCA_VALID_TAB2 isn't set, which leads to an invalid reference.


Is there any specific reason for this difference? Is it needed somewhere 
(some code not using ScCompiler, or some private changes to it)? 
Otherwise, I'm going to change it, returning no SCA_VALID bit in the 
first case, and SCA_VALID_TAB2 (but not SCA_TAB2_3D) in the second case.


Niklas

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



Re: [sc-dev] ScRange::Parse return values

2007-06-26 Thread Niklas Nebel

Noel Power wrote:

While not involved with reference parsing, I do know that for say the
example range like Sheet1!A1 currently code that Jody popped into the
vba interop api to help me ( for various range XL/R1C1 support )
expects SCA_VALID to be set on return


From your comments below it would seem you imply SC_VALID getting set

for a single reference is not VALID ( pardon the pun ), and that causes
subsequent problems correct? 


Yes, it causes an incomplete double reference when compiling a formula.


The parsing code ( or at least the call to the parse code ) that Jody
added for me always seems to expect SCA_VALID to be set ( and indeed
it's also passed as the mask ) 

e.g. 
		USHORT nMask = SCA_VALID;

rResFlags = rCellRanges.Parse( sAddress, pDoc, nMask, eConv, 0 
);
if ( rResFlags  SCA_VALID )
return true;
return false;

So with respect to the SCA_VALID flag, I can live with a different
return value that can indicate success. But I would worry though that
SC_VALID is indeed required in a non obvious way ( there are many
strange xl addressing edge cases ), care would be required I think
changing this. 


ScRangeList::Parse does its own handling of single-cell ranges anyway 
(but doesn't take different conventions into account). To parse single 
or double reference into a ScRange, there's ScRange::ParseAny, which 
should probably also be used in ScRangeList::Parse. Anyway, if you only 
use ScRangeList, the change shouldn't hurt you.



I could test any changes against my current ( not exhaustive but better
than nothing ) addressing tests ( that at least exercise this code a
little )  p.s. this week is not good though 
For the other scenario you mention nothing immediately comes to mind. 


I'll do the change on the xmlfilter02 CWS.

Niklas

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



Re: [sc-dev] About issue 63144#,please review patch file!

2007-06-27 Thread Niklas Nebel
maoyg wrote:
 About issue 63144# has been fixed. I have attached the patch to the 
 issue63144#, please check it.
 I'm looking forward to your advice :).

Using the cursor position isn't right. The cell cursor can be anywhere,
it doesn't have to be at the note's cell when a user selects the note.
You have to take the position from the shape's object data. For an
example how to get the position, see FuText::StopEditMode.

Niklas

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



Re: [sc-dev] Some simple tasks

2007-06-27 Thread Niklas Nebel
gaozm wrote:
 I have looked at issue 23299, but the code in my version  is a little
 different from m215 about formula, because we have added some code in
 that files, and I don't understand the concrete steps of issue 23299
 fully, so I had a choice issue 27745. I hope you can give me some
 suggestion. Thank you very much!

Issue 23299 is just about which formulas have to be recalculated after
filtering. Did you make any changes in that area?

Niklas

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



Re: [sc-dev] ScRange::Parse return values

2007-06-27 Thread Niklas Nebel

Noel Power wrote:

If you can let me know when you commit the change ( and to what
file(s) ) I will at least run some tests against that as a sanity check.


It's in sc/source/core/tool/address.cxx 1.9.18.1.
I also made a small change to compiler.cxx (1.68.18.1) to correct the 
output of such references.


Niklas

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



Re: [sc-dev] Setting default character set for DBase files

2007-06-28 Thread Niklas Nebel

Alan Yaniger wrote:
When openeing a DBF file in Calc, OOo asks the user which character set 
to use. Is there a way to set a default charset for all files with a 
given extension, like *.dbf?


If such a feature is not built-in, could it be done in an OOo BASIC 
macro? If so, how?


The initial value for the dialog is hard-coded (in 
ScFilterOptionsObj::execute). Using a macro, you can load or save 
without the dialog, specifying the filter options yourself. Perhaps that 
helps.


Niklas

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



Re: [sc-dev] About issue 63144#,please review patch file!

2007-07-02 Thread Niklas Nebel
maoyg wrote:
 Thanks very much your advice. I have attached the patch file to the issue 
 63144#,please check it.
 When I fixed the issue, I found some problems about Notes. On a protected 
 sheet,
 the note's cell is protected,the other note's cell is non-protected. 
 I want to edit the non-protected note,when moving mouse become CROSS to 
 protected note,
 the protected note also can be edited. I'm tracking this problem,in 
 FuText::MouseButtonDown.
 I'm looking forward to your suggestion :) .

It looks like the layer has to be locked again, possibly in
FuText::StopEditMode.

Niklas

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



Re: [sc-dev] About issue18704

2007-07-04 Thread Niklas Nebel
Xu dehua wrote:
 I am fixing issue18704 and reading the function TRIMMEAN. But the
 problem is: I don't know which statistics function has problem, so I
 just look through the functions without any purpers. It is difficult
 to find out the function which is needed to be modified.
 Could you guys give me some suggestions about the issue?

Have you looked at issue 78250?

Niklas

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



Re: [sc-dev] stable algorithm for statistic functions issue 78250

2007-07-05 Thread Niklas Nebel

Regina Henschel wrote:
I had a look at the source in interpr3.cxx and have made the proposed 
changes for the COVAR function. Although I'm a very beginner I think, 
that I'm able to change some of the other such functions too.


The changes need to calculate the mean in a first loop and than 
calculating the other results in a second loop. My question is, whether 
you want, that the functions are changed in that way. If yes, I would be 
glad, to do that job.


For COVAR it looks like this (based on OOF680_m18):


Yes, this looks very good and should be changed that way. Which other 
functions do you plan to modify?


Niklas

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



Re: [sc-dev] Table Highlighting

2007-07-05 Thread Niklas Nebel

Leonard Mada wrote:
I posted some time back a feature-request to implement a special 
spreadsheet-view in which rows get *highlighted* (see 
http://www.openoffice.org/issues/show_bug.cgi?id=78181).


Virtually every table on the net is displayed this way. Also, most web 
applications have implemented it (see e.g. phpMyAdmin for one, but there 
are countless others). The code for the net applications is a mere  
20-line java-script (I used it, too).


Would it be possible to implement this in Calc?


Actually exchanging a highlight color for the cell background would 
require changes to the output (rendering) code. Instead, current fashion 
calls for an overlay object, which could highlight the row by painting a 
transparent color over it.


Niklas

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



Re: [sc-dev] Finance Functions

2007-07-05 Thread Niklas Nebel

gcavalcanti wrote:

Anybody knows where are the finance functions (ex. TIR,PV,RATE...) in the
OpenOffice sources? 

I looked in the directory OOF680_m14\sc\source\core\tool\interpr*.cxx, but 
without success...


Those that aren't add-in function are just there, but some have 
non-obvious names (ScZins for RATE, ScBW for PV, ScIKV for IRR).


Niklas

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



Re: [sc-dev] Table Highlighting

2007-07-05 Thread Niklas Nebel

Kohei Yoshida wrote:

Along the same line, I would also like to see the possibility of
overlaying (or underlaying) a background image to enhance the visual
effect of Calc's (rather boring) sheet.  Note that such background image
is not printable, so it's only for display.  And it wouldn't scroll with
the sheet; it stays at the fixed position, or may be aligned with the
frame so that it moves when the app's frame gets resized.

I think this would be a nice PR feature, don't ya think ? ;-)

http://idea.opensuse.org/content/ideas/oo.o-calc-with-background-sheet-picture


Not scrolling the image would mean that Window::Scroll can't be used. 
Other than that, it seems possible.


Niklas

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



Re: [sc-dev] External cell reference implementation

2007-07-06 Thread Niklas Nebel

Kohei Yoshida wrote:

I realize that Calc's external cell reference (a cell reference that
refers to a cell in another document) is implemented by creating an
invisible external link sheet first, then setting reference to it.

Can this be done purely via existing UNO API?


Create a linked sheet? Sure, interface XSheetLinkable.

Niklas

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



Re: [sc-dev] OpenOffice.org Calc: Validation of spreadsheet functions

2007-07-11 Thread Niklas Nebel

Steve Griffiths wrote:
I am interested in helping with Validating spreadsheet functions. What 
do I need to do?


Some work has already been done, see the folder Function Validation at 
http://sc.openoffice.org/servlets/ProjectDocumentList. A possible next 
step would be to single out significant differences and perhaps make 
suggestions for better implementations. See also issue 18704 
(http://www.openoffice.org/issues/show_bug.cgi?id=18704).


Note that dev@sc.openoffice.org is a mailing list, you should subscribe 
to see replies (see 
http://sc.openoffice.org/servlets/ProjectMailingListList).


Niklas

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



Re: [sc-dev] About issue 63144#,please review patch file!

2007-07-18 Thread Niklas Nebel
Niklas Nebel wrote:
 It looks like the layer has to be locked again, possibly in
 FuText::StopEditMode.

And for right-click selection, ScGridWindow::SelectForContextMenu calls
lcl_UnLockComment (in gridwin.cxx), which has to be changed in a similar
way to FuSelection::TestComment, or preferably merged with it.

Niklas

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



Re: [sc-dev] why add '_'before 'c'when creating names

2007-07-19 Thread Niklas Nebel
开源技术部-云惊涛 wrote:
 please follow these procedures
 1.create a new calc.
 2.input some date into cells,make sure 'c' in one cell 
 for instance 'c' in A1 and 'b' in A2,choose the two cells
 3.on the tool bar,click insert-name-create,choose 
 top row,click ok.
 4.and then click insert-name-define,in 
 the define name dialog,it shows _c.
 
 In file sc\source\core\tool\rangenam.cxx,I think line576 rName.Insert('_',0) 
 leads to 
 the phenomenon;
 I can't understand it.Can you tell me the reason?

As the comment says, Ensure that the proposed name is not an address
under any convention, in preparation of R1C1-style reference support.

Niklas

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



Re: [sc-dev] A compatible problem

2007-07-19 Thread Niklas Nebel
gaozm wrote:
 I found that it was related to the default row height of Calc, I
 suggest to change the default row height to 0.52cm, but how to
 achieve it, I hope you can give me some help, thank you very much!

Default row height isn't a fixed value, it's determined from text height
of the default font, see ScGlobal::InitTextHeight.

Niklas

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



Re: [sc-dev] UNO API for extended sheet filters

2007-07-20 Thread Niklas Nebel

Kohei Yoshida wrote:

I'd like get your input on the new UNO API that I have introduced as
part of implementing the multi-string filter.  The relevant issue page
is here:

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

Currently, Calc only has one type of sheet filter, which is represented
by com.sun.star.sheet.TableFilterField.  And it is read from  written
to the document model all at once via getFilterFields and
setFilterFields in the XSheetFilterDescriptor interface.  Multiple
instances of this data are contained in css::uno::Sequence.

Because I needed to allow reading and writing of filters of different
types, which the current API doesn't allow, I created a new set of API
just for this.  Let me summarize the new API below.


TableFilterField and TableFilterFieldNormal would then be two structs 
for basically the same thing. Also, First/Next-style iteration is 
usually done through a createEnumeration method, where it's clear that 
each call returns a new object with separate enumeration state. Why 
don't we keep the new interface similar to the old one, with get/set for 
a sequence of fields, either with a new struct containing all field 
options, or with an any containing the old or new struct?


I also don't think we should integrate this without having UI for it. 
That would result in hidden state, where a filter behaves in an 
unexpected way and the user can't see why.


Niklas

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



  1   2   3   >