Re: [dev] text grid enhancement

2007-04-12 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi Fong Lin,

On 11.04.2007 11:44, Pei Feng Lin wrote:

It is my pleasure to announce that the prototype of text grid enhancement for better CJK support has implemented. The internal test is ongoing now. 


A new issue was created to describe this feature. 
http://qa.openoffice.org/issues/show_bug.cgi?id=76247

You could get some knowledge about text grid from my blog: 
http://linpeifeng.blogspot.com/

A new CWS named cjksp1 based on SRC680_m208 is created to maintain all the CJK 
enhancment and features from our oo team. The codes wrt. text grid will be 
upstreamed after the internal test is passed.

Any question, suggestion and comment are welcome.


this is really good news. I had a first look at your spec and wondered 
if Tools - Options - Writer - General is the best place for the grid 
mode setting. What about Tools - Options - LanguageSettings - AsianLayout?


Best regards,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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



Re: [dev] Open Office Table Split

2007-03-27 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi Palash Basak,

On 03/27/07 15:53, Palash Basak wrote:


I am using Open Office first time. I want to split a table of word 
document. 
The code, that i am using is :---


  xDispatchHelper.executeDispatch( 
xDispatchProvider,.uno:SplitTable,, 0, new PropertyValue[0] );


It is not working properly.


did you make sure that the current view cursor is located inside a 
non-headline row of the table?


Hope this helps,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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



Re: [dev] Fwd: doc doesn't render properly

2007-03-23 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi Laurent,

On 03/22/07 18:50, Laurent Denoue wrote:


On 3/22/07, Frank Meies - Sun Germany - Development - Software Engineer 
[EMAIL PROTECTED] wrote:


Hi Laurent,

On 21.03.2007 18:25, Laurent Denoue wrote:

 It looks like some tables from the second page end up on the first 
page.

 Maybe a problem with margins?
 If you figure out a solution, please let me know.

The table seems to be located inside a text frame. The frame of course
does not allow for automatic page breaks.



According to you, is this a bug? If so, I'm happy to add it.
In any case, MS Office renders it properly, have you tried to see the
difference?


the table in Word has the 'text wrapping around' attribute set. 
Currently Writer cannot wrap text around tables, therefore these tables 
are imported inside frames. There already exists an issue for the 
Feature: i7911.


Hope that helps,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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



Re: [dev] Fwd: doc doesn't render properly

2007-03-22 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi Laurent,

On 21.03.2007 18:25, Laurent Denoue wrote:


It looks like some tables from the second page end up on the first page.
Maybe a problem with margins?
If you figure out a solution, please let me know.


The table seems to be located inside a text frame. The frame of course
does not allow for automatic page breaks.


Is there a place to report these problems of unexpected rendering?


If you suspect a bug to be the cause of unexpected rendering you can
file a new issue:

http://qa.openoffice.org/ooQAReloaded/ooQA-ReportBugs.html

Hope this helps,

Frank

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



Re: [dev] Finding automatic page breaks

2007-03-12 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi Ian,

On 03/12/07 10:43, ianmcr wrote:


I now need to differentiate the pagebreak bookmarks from other bookmarks
in the document. (At the minute I insert a pagebreak at every bookmark which
isn't good).

Is there a means of finding the programmatic name of the bookmark (I set the
name of each page break bookmark to PAGEBREAKMARKER? How can I compare
bookmarks? 
I was wondering if the following was possible:


if (currentBookMarkName ==PAGEBREAKMARKER) 

then found a pagebreak bookmark; 


else ignore pagebreak;


yes, comparing the name of the bookmark to your special string should work.

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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



Re: [dev] writer: export pages as bitmaps (e.g. PNG)

2007-03-09 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi Laurent,

On 03/08/07 07:54, Laurent Denoue wrote:


Is there an API to export each page of a Writer document as a picture?
It's possible under Impress, as shown here:
http://www.oesf.org/forums/lofiversion/index.php/t7790.html


I don't see a way to do this directly. What about using the pdf export 
filter and use some external tools to convert the pages to graphic files?


Best regards,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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



Re: [dev] writer: export pages as bitmaps (e.g. PNG)

2007-03-09 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi Laurent,

On 09.03.2007 20:02, Laurent Denoue wrote:


Yes, pdf export is what I'm doing now, using either ghostscript or xpdf to
image each PDF page into a PNG.
But it is slower than being able to directly grab the rendered page from
Writer.
Can somebody point me to the PDF export functions?
Maybe I could hack a PNG export function instead.


the pdf filter is implemented in filter/source/pdf. Have a look at 
pdfexport.cxx, I think it should be possible to grab the bitmap from the 
OutputDevice pOut after rendering each page.


Hope this helps,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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



Re: [dev] Adding support for overlined text in Writer

2007-03-08 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi Martin,

On 03/07/07 22:01, Martin Whitaker wrote:


Finally, I am currently developing my patches against the 680_m6
(version 2.1.0) snapshot. What tag point should I be using?


I would suggest to move to a more current SRC680 milestone (205 is the
latest right now) to avoid conflicts during integration. I can also 
offer to create a cws for you.



I was expecting to submit the patches via IssueZilla as this will be
my first contribution. If you would prefer me to work in a cws, let me
know, otherwise I will continue developing against the latest stable
milestone.


I just created a new cws (including the projects svx and sw so far) for
you, its name is 'overline'. You can start developing on this cws and
send the patches via issuezilla or by email to me. I'll review the
patches and commit them to the cws for you. This way we can easily keep
your code in sync with the current master workspace.

Best regards,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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



Re: [dev] Finding automatic page breaks

2007-03-06 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi Ian,

On 03/06/07 10:14, ianmcr wrote:


I translated the macro to C++ and the approach seems to work quite well. I
first iterate from the end to the start of the  document inserting pagebreak
markers (ie. pagebreak bookmarks) with paragraphs. Then I iterate forwards
checking the properties of the paragraph to find the start of a new page. 


This works well for paragraphs. However, there is a problem with tables. If
a paragraph is a table and I insert a book mark is the bookmark a property
of the table paragraph or the table cell containing a paragraph? 


This is an issue since a table can span the page break (ie. a table accross
mutiple pages.)


I don't think this bookmark solution is suitable for documents with 
tables. If there is a table with an automatic page break, each cell in 
the split line would have an automatic page break (if the line is 
allowed to split). In this case you would have to add the bookmark to 
the correct position inside each of these cells. I don't know if this is 
possible using the API, I guess it's not.


Best regards,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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



Re: [dev] Adding support for overlined text in Writer

2007-03-06 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi Martin,

On 03/06/07 02:11, Martin Whitaker wrote:


This is a longstanding RFE (issue #5991) and one I would like to see
implemented. I am prepared to develop the necessary patches, but would
like some guidance.


thank you for your interest in OpenOffice.org. Implementing this feature
involves quite some changes to the code. Let's try.


The obvious way to present this to the user is via a new list box in the
Format-Character-Font Effects form that provides the same options as
the Underlining list box. This is easy enough to implement (I've already
patched the code to do it). The problem comes in adding the infrastructure
to attach the new attributes to selected text. Again, the obvious solution
is to simply duplicate the code that supports underlined text. However,
having started down this route, I soon realised this was going to be a
major change to the code base, modifying many class declarations across
several modules.

A way of significantly reducing the quantity of changes required would
be to change the definition of the enumeration type FontUnderline so
that it could represent all possible combinations of underline and
overline style (i.e. store the underline and overline styles as two
separate bit fields within a FontUnderline value). So the question is,
which would be more acceptable - a patch that changed many files and
classes, or a patch that contains fewer changes, but is a bit of a
kludge?


I think the patch that changes many files and classes is the way to go
here. You would have to start creating a new SvxOverlineItem, analogous
to the SvxUnderlineItem.


Finally, I am currently developing my patches against the 680_m6
(version 2.1.0) snapshot. What tag point should I be using?


I would suggest to move to a more current SRC680 milestone (205 is the
latest right now) to avoid conflicts during integration. I can also 
offer to create a cws for you.


Please sent any further questions to the Writer mailing list
(dev@sw.openoffice.org).

Best regards,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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



Re: [dev] Finding automatic page breaks

2007-03-05 Thread Frank Meies - Sun Germany - Development - Software Engineer
On 03/05/07 08:44, Frank Meies - Sun Germany - Development - Software 
Engineer wrote:



On 03/02/07 13:45, ianmcr wrote:

I'm fairly new to OOo. I'm working on an export filter to produce 
accessible

html. I'm iterating over the text and identifying paragraphs, tables etc.
However, I need a reliable method of identifing soft page breaks.
(At the minute I use the page cursor to insert a marker string at the 
end of

each page. However, this causes problems with renumbering lists, headings
etc). 


maybe you should use bookmarks instead of strings to mark the end of 
each page.


This little macro inserts bookmarks at the positions of the automatic 
page breaks. This way, the automatic page break can be identified in the 
content.xml file. Note that the document needs to have a layout, 
otherwise the page cursor cannot work correctly.


Sub MarkPageBreaks
xDoc = thiscomponent
xText = xDoc.getText
xController = xDoc.getcurrentcontroller
xViewCursor = xController.getViewCursor
xViewCursor.jumpToFirstPage
xViewCursor.jumpToEndOfPage
Dim args2() as new com.sun.star.beans.PropertyValue
pages = xdoc.getrenderercount( xDoc, args2() )

for j = 0 to pages - 1
xbookmark = 
xdoc.createinstance(com.sun.star.text.Bookmark)
xbookmark.Name = PageBreakMark
xText.inserttextcontent(xViewCursor, xbookmark,true)
xViewCursor.jumpToNextPage
xViewCursor.jumpToEndOfPage

next j
End Sub

Best regards,

Frank



Best regards,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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




--
Sun Microsystems GmbH  Frank Meies
Nagelsweg 55   Software Engineer
20097 Hamburg, Germany Phone: (+49 40)23646 671
http://www.sun.de  mailto:[EMAIL PROTECTED]

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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



Re: [dev] Finding automatic page breaks

2007-03-04 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi,

On 03/02/07 13:45, ianmcr wrote:


I'm fairly new to OOo. I'm working on an export filter to produce accessible
html. I'm iterating over the text and identifying paragraphs, tables etc.
However, I need a reliable method of identifing soft page breaks. 


(At the minute I use the page cursor to insert a marker string at the end of
each page. However, this causes problems with renumbering lists, headings
etc). 


maybe you should use bookmarks instead of strings to mark the end of 
each page.


Best regards,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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



Re: [dev] RE:[dev] [sw-dev]question about table border line

2007-02-02 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi chensuchun,

On 02/02/07 02:52, [EMAIL PROTECTED] wrote:
 
When a table is formated with thick lines around the table and thin lines insidethe table, if you ask OO.o to add a row at the end of the table it's createdwith a thick line between it and the rest of the table instead of respecting thethick lines around the table, thin lines inside rule. 
I want to fix it as thick lines around the table ,thin lines insideafter insert rows at the end of the table,but I find it is difficult to get SvxBoxInfoItem of the table in function BOOL lcl_CopyCol( const _FndBox* rpFndBox, void* pPara ).

so I modify the insert-operation source code (in file 
sw/source/ui/shells/tabsh.cxx) as following:
 
case FN_TABLE_INSERT_COL:
case FN_TABLE_INSERT_ROW:
{ 
///--get the SvxBoxInfoItem of the table before insert 
SfxItemSet aCoreSet( GetPool(), aUITableAttrRange); 
::lcl_TableParamToItemSet( aCoreSet, rSh ); 
SvxBoxInfoItem aBoxInfo((const SvxBoxInfoItem) 
 aCoreSet.Get(SID_ATTR_BORDER_INNER)); 
///--End 
///do the insert operation 
BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL; 
USHORT nCount = 0; 
BOOL bAfter = TRUE; 
if (pItem) 
{
  nCount = ((const SfxInt16Item* )pItem)-GetValue();
  if(SFX_ITEM_SET == pArgs-GetItemState(FN_PARAM_INSERT_AFTER, TRUE,
 pItem))   
  bAfter = ((const SfxBoolItem* )pItem)-GetValue();  
}  
else if( !rReq.IsAPI() )   
++nCount;  
if( nCount )  
{  
if( bColumn ) 
   rSh.InsertCol( nCount, bAfter );  
else if ( !rSh.IsInRepeatedHeadline() ) 
   rSh.InsertRow( nCount, bAfter );  
bCallDone = TRUE;  
   ///--after inserting,reset the table border according to the SvxBoxInfoItem  
   ///   get before   
   SfxItemSet aSet( GetPool(), RES_BOX, RES_BOX,

SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
0); 
   aSet.Put( aBoxInfo );  
   ItemSetToTableParam( aSet, rSh );  
   ///--  
   break; 
  }
 nSlot = bColumn ? FN_TABLE_INSERT_COL_DLG : FN_TABLE_INSERT_ROW_DLG;
} 
Is this modification right,or it would cause other problem or affect other operation?How to solve this problem if the modification is wrong ? 
Thanks for help or advices!


cool, your code already looks quite good. I made some little 
modifications in order to generate only one undo event for this action:



case FN_TABLE_INSERT_COL:
case FN_TABLE_INSERT_ROW:
{
BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL;
USHORT nCount = 0;
BOOL bAfter = TRUE;
if (pItem)
{
nCount = ((const SfxInt16Item* )pItem)-GetValue();
if(SFX_ITEM_SET ==  
   pArgs-GetItemState(FN_PARAM_INSERT_AFTER, TRUE, pItem))
bAfter = ((const SfxBoolItem* )pItem)-GetValue();
}
else if( !rReq.IsAPI() )
++nCount;

if( nCount )
{
///--get the SvxBoxInfoItem of the table before insert
SfxItemSet aCoreSet( GetPool(), aUITableAttrRange);
::lcl_TableParamToItemSet( aCoreSet, rSh );
bool bSetInnerBorders = false;
sal_uInt16 nUndoId = 0;
///--End

if( bColumn )
{
rSh.StartUndo( UNDO_TABLE_INSCOL );
rSh.InsertCol( nCount, bAfter );
bSetInnerBorders = true;
nUndoId = UNDO_TABLE_INSCOL;
}
else if ( !rSh.IsInRepeatedHeadline() )
{
rSh.StartUndo( UNDO_TABLE_INSROW );
rSh.InsertRow( nCount, bAfter );
bSetInnerBorders = true;
nUndoId = UNDO_TABLE_INSROW;
}

bCallDone = TRUE;

   ///--after inserting,reset the inner table borders
   if ( bSetInnerBorders )
   {
SvxBoxInfoItem aBoxInfo((const SvxBoxInfoItem)
aCoreSet.Get(SID_ATTR_BORDER_INNER));
SfxItemSet aSet( GetPool(), SID_ATTR_BORDER_INNER,  
SID_ATTR_BORDER_INNER, 0);
aSet.Put( aBoxInfo );
ItemSetToTableParam( aSet, rSh );
rSh.EndUndo( nUndoId );
   }
   ///--

   break;
}

nSlot = bColumn ? FN_TABLE_INSERT_COL_DLG : 

Re: [dev] Joins in sw

2007-02-02 Thread Frank Meies - Sun Germany - Development - Software Engineer

Hi Li Jian,

On 02/02/07 12:34, lijian wrote:


I am Li Jian, a developer from Beijing Redflag CH2000 Software Co.,Ltd. I am in 
the Redoffice team and working with ChengXiuzhi, Liyuan and Liutao.
I'm interested in the SW project and intend to do some contributions here. In 
this community, I hope somebody can give me some suggestions and do help
to my work. Thank you!


thank you for your interest. Please have a look at

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

This is a good starting point for developers who want to start 
contributing to Writer. Of course you may also start with some small 
bugfixes or make some own suggestions. Please feel free to contact us 
again (dev@sw.openoffice.org) if you have found something interesting or 
if you need some more concrete suggestions.


Regards,

Frank

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