Hi Canghua,
welcome to the team.
For legacy reasons there is a difference between presentation outline
text boxes and presentation title boxes. Outline and subtitle text
boxes start with a numbering depth of 1-9 where 1 is the first level.
In normal text boxes 0 would be first.
The text inside a presentation title text box is always at depth 0.
This has been done so they can be merged easily for the outliner view
in impress. There all slide titles are at the first depth level and
all outline and title boxes start at level 1.
The edit engine does not know about those different boxes so impress
configures them to behave like they should. One aspect is setting
SetMinDepth() and SetMaxDepth() at the outliner but also setting the
outliner mode to either OUTLINERMODE_TEXTOBJECT,
OUTLINERMODE_TITLEOBJECT or OUTLINERMODE_OUTLINEOBJECT.
I suspect that this bug occurs because the bullets you set in the
outliner view in step 2 do not change level 0 of the numbering bullet
item. This numbering bullet item holds different bullet information
for all possible 10 levels.
Tip of the day, under windows non product build enter into text edit
mode and press strg+alt+f2. Now a message box will tell you that you
find the file d:\debug.log that contains interesting debug information
about the edited text.
There you can see that after step 4 you have a numbering item with
Level0=(0,0,Number) and Level1(-900,1200,Bitmap). So this is obviously
wrong. But looking at the debug of the original outliner text box
you see that there is level0=level1=(-900,1200). So either this
numbering item must be converted somewhere or (my current favorite clue)
for some reasons someone change the bullet of level0 later.
But then the wrong bullet is not the only problem, the next problem
is that the text inside the title box seems to be misconfigured. if
you try to change the bullet or even enable/disable the bullet you
get strange results. One idea is that while text import on the binary
level we somehow change the outliner mode on the text inside the title
box.
This is all very legacy and very confusing code, I would suggest not to
dig deeper into this and change the clipboard code so it will transfer
the text not in binary but do an xml import and export. Most of the
legacy differences are hidden behind the UNO text api of the outliner/
editengine and the file format nearly knows nothing about it. So this
would be the best solutions to get rid of these problems.
Another step would be to replace those legacy formatings once and for
all, but that would require a complete rewrite of the outliner view
in impress. Which is planed but not scheduled yet.
Regards,
Christian
Canghua Qu wrote:
> Hi,Dear all,
>
> I am a developer of Beijing Redflag CH2000 Software Co.Ltd, China. Xiuzhi
> Cheng is my department Manager. My full name is Canghua Qu, and you can call
> me Canghua for short.
> I have studied SD module for several monthes, and think the project graphics
> is very intereting.
> By the way, I am glad to know there are so many intellegent people work on
> this project, and I want to join you, and contribute to the project.
>
> Now , I have a problem when I am tracing a bug.
> The bug's description is as follows:
>
> *********************************
> The bullets display incorrectly after the words (with customed bullets)
> copied from text field to title editing field.
> 1. Create a new presentation with "Title,Text" layout;
> 2. Input several words in the text editing field, and set another kind of
> bullets to them;
> 3. Select all of the words and copy them to the title editing field;
> 4. We find that the bullet displays "A" in the editing field, which is not
> the same as what we have set.
> [PS]: If we copy the words with the default bullets to the title editing
> field, then it goes well.
>
> ***********************************
>
> After tracing the issue, I found: in the Title Field, there is only one level
> set for the paragraphs , and users can't set the bullet's type here.
>
> I analysised the issue , and have two points:
>
> 1) It is right when a paragraph with bullet are copied from the Title field
> to another empty Title Field.
> the relation source "SvxNumberType::nNumType =6 "is right;
>
> *********************************************
> SvxNumberFormat::SvxNumberFormat(SvStream &rStream)
> {
> USHORT nVersion;
> rStream >> nVersion;
>
> USHORT nUSHORT;
> rStream >> nUSHORT;
> SetNumberingType((sal_Int16)nUSHORT); // nUSHORT = 6
> .
> .
> .
> }
> ************************************************
>
> 2).when a bullet or NumberingType (not default setting) is copied from the
> Text Field to an empty Title Field, "SvxNumberType::nNumType" will be 4 all
> the time ,so "A" come out.
>
> **********************************************
>
> SvxNumberFormat::SvxNumberFormat(SvStream &rStream)
> {
> USHORT nVersion;
> rStream >> nVersion;
>
> USHORT nUSHORT;
> rStream >> nUSHORT;
> SetNumberingType((sal_Int16)nUSHORT); // nUSHORT = 4
> .
> .
> .
> }
> *************************************************
>
> And, the parameter "SvStream &rStream " gets data by the following way:
>
> *************************************************
> EditSelection ImpEditEngine::InsertText( uno::Reference<
> datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const
> EditPaM& rPaM, BOOL bUseSpecial )
> {
> EditSelection aNewSelection( rPaM );
>
> if ( rxDataObj.is() )
> {
> datatransfer::DataFlavor aFlavor;
> BOOL bDone = FALSE;
>
> if ( bUseSpecial )
> {
> // BIN
> SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_EDITENGINE, aFlavor );
> if ( rxDataObj->isDataFlavorSupported( aFlavor ) )
> {
> try
> {
> uno::Any aData = rxDataObj->getTransferData( aFlavor );
> uno::Sequence< sal_Int8 > aSeq;
> aData >>= aSeq;
> {
> SvMemoryStream aBinStream( aSeq.getArray(), aSeq.getLength(),
> STREAM_READ ); // SvStream &rStream from SvMemoryStream aBinStream
> aNewSelection = Read( aBinStream, rBaseURL, EE_FORMAT_BIN, rPaM );
>
> }
> bDone = TRUE;
> }
> .
> .
> .
> }
>
> *************************************************
>
> Think about point 2 , I want to know when the Number type
> (SvxNumberType::nNumType) is changed.
> Whether it has been changed before the data are putting into the clipboard,
> or not?
>
> Any one can give me some suggestion,please?
>
> Best Wishes
>
>
> Yours sincerely,
> Canghua Qu
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]