[dev] help with dialog boxes

2010-11-04 Thread kushal likhi
hi,
.
its my first time developing the dialog boxes, hence need some help.
i have a dialog box to be implemented, for reference it can be seen here:
http://wiki.services.openoffice.org/wiki/OpenOffice.org_Internship/Projects/2010/Customizable_html_export_for_Impress#Option_8
.
the code i am using to put a fixedtext(label) on the dialog is:
WindowDescriptor windowDescriptor;
windowDescriptor.Type = WindowClass_SIMPLE;
windowDescriptor.WindowServiceName = OUString(
RTL_CONSTASCII_USTRINGPARAM(fixedtext) );
windowDescriptor.Bounds = Rectangle( 6, 46, 59, 13 );
windowDescriptor.WindowAttributes = VclWindowPeerAttribute::CLIPCHILDREN;
windowDescriptor.ParentIndex = -1;
windowDescriptor.Parent = Reference XWindowPeer ( mxDialogWindow,
UNO_QUERY_THROW );
Reference XWindow  xLabel( mxToolkit-createWindow( windowDescriptor ),
UNO_QUERY_THROW );
Reference XFixedText  xFixedText( xLabel, UNO_QUERY_THROW );
xFixedText-setText(OUString( RTL_CONSTASCII_USTRINGPARAM(Template) ));
xFixedText-setAlignment(0);
xLabel-setVisible( sal_True );
.
the question is,,, how can i set the font properties??? like bold,font size
etc, i.e FontDescriptor
.
another question is how can i add images to mxDialogWindow, such that i can
set its source URL at runtime along with other properties like stretch to
fit???
.
I am not sure about this,, but i observed the services regarding UNOControls
which really interests me, ex:
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/UnoControlImageControl.html,,
is there a way to use them in my DialogWindow , i.e mxDialogWindow???
.
.
regards and thanks
Kushal Likhi


[dev] Thumbnail view

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

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


Re: [dev] Improve MS Office Calc compatibility - easy2fix patch

2010-11-04 Thread Niklas Nebel

On 11/04/10 00:53, Bartosz wrote:

MS Office Calc could handle sheets in a workbook limited by available memory:
http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP005199291.aspx

OpenOffice could handle only 256 sheets.

To improve compatibility I suggest to increase max number of sheets to 512.

There is already submitted issue:
http://www.openoffice.org/issues/show_bug.cgi?id=35901

I checked it and it could be done without problems (All variables are defined as SCTAB or 
long type).
It is easy2fix issue.

What do you think about this idea?


There are some fixed-size arrays and loops, so we would have to look for 
performance implications first.


Niklas

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



Re: [dev] help with dialog boxes

2010-11-04 Thread Frank Schönheit
Hello Kushal,

 its my first time developing the dialog boxes, hence need some help.
 i have a dialog box to be implemented, for reference it can be seen here:
 http://wiki.services.openoffice.org/wiki/OpenOffice.org_Internship/Projects/2010/Customizable_html_export_for_Impress#Option_8
 .
 the code i am using to put a fixedtext(label) on the dialog is:
 WindowDescriptor windowDescriptor;

ehm ...

What you do here is to create a mere window peer, without an associated
control, or even control model.
While this is possible, some things you'll want to achieve will become
more difficult by this (admittedly, some will become easier ...)

The correct way to do this would be
- obtain the dialog model (I suppose you have one, yes?)
- let it create a control model
- insert this control model into the dialog model

In pseudo-code, this would look like this
  XMultiServiceFactory controlModelFactory =
(XMultiServiceFactory)dialogModel;
  XPropertySet controlModel = (XPropertySet)
controlModelFactory.createInstance(
  com.sun.star.awt.UnoControlFixedTexModel )
  controlModel.setPropertyValue( PositionX, ... );
  controlModel.setPropertyValue( ... );
  XNameContainer modelContainer =
(XNameContainer)dialogModel;
  modelContainer.insertByName( MyControl, controlModel );

After the insertion, your dialog window (mxDialogWindow) will
automatically have a new child window, which corresponds to the control
model you just inserted.

 windowDescriptor.Type = WindowClass_SIMPLE;
 windowDescriptor.WindowServiceName = OUString(
 RTL_CONSTASCII_USTRINGPARAM(fixedtext) );
 windowDescriptor.Bounds = Rectangle( 6, 46, 59, 13 );

Note that you're using fixed pixel coordinates here. This will work for
your particular system/desktop/theme, but is likely to break on other
desktops. The problem is that as soon as, for instance, the font size
changes, your pixel coordinates will be wrong.

Model properties (PositionX, PositionY, Width, Height), on the other
hand, use AppFont coordinates: 1 means 1/8 of the average
height/width of a character of the application's UI font. So, when you
work with models instead of windows, your dialog will automatically
adjust itself to different desktops.

 the question is,,, how can i set the font properties??? like bold,font size
 etc, i.e FontDescriptor

At the model (controlModel in the above example code), you'd find a
property FontDescriptor, being a css.awt.FontDescriptor structure,
which has all the members you need.

 another question is how can i add images to mxDialogWindow, such that i can
 set its source URL at runtime along with other properties like stretch to
 fit???

Use the same code as above, but let the dialog's factory create an
css.awt.UnoControlImageControlModel, and set its ImageURL and ScaleMode
properties
(http://api.openoffice.org/docs/common/ref/com/sun/star/awt/UnoControlImageControlModel.html)

Ciao
Frank

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



[dev] cannot open old binary autocorr.dat

2010-11-04 Thread Oliver Brinzing
Hi,

sorry for asking such old stuff, but we have several users with autocorr.dat's
(originally created with SO 5.2/4.0). These files worked in SO 7.0 without 
problems.

But in OO 3.2 these files will not open anymore :-(

I noticed, in that case the file format is not zip (as newly created
acor.dat's in SO 7.0 are).
so i guess, SO 7.0 was able to read and write this old binary *.dat's.

Any hints how we can convert these files or extract the data ?

Regards

Oliver

-- 

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45





signature.asc
Description: OpenPGP digital signature