Hello Frank,

[mail to your personal address due to attachments]

Frank Schönheit - Sun Microsystems Germany escribió:
Hello Ariel,

I thought *you* forgot to read the mail, but then *I* remembered you were on holidays. Hope you had fun!

nothing to complain about ;), thanks

  Done, Issue 80940
I was too lazy, so I copied my previous email.

Thanks. You might have seen that I already dispatched it.

Unfortunately my poor knowledge of the source won't help you here. I've read only a few files, and every time I'm looking for something, I miss the "Leitfaden" in this labyrinth.

Hmm, I think this one is relatively easy (finally, as far as I saw, it's
am uninitialized only), and the fact that you already could mention that
many places of the involved code lets me assume you could do it.


yes, I thought it was more complex. Reading the sources it seems we have
only to call EnableEntryEditing( FALSE )

If so, look the "fix" at the end of this mail. If it works, I can not
tell you: I read the source in my IDE, but haven't even try to set my
environment to compile, and as for I heard, it takes a lot to make
things work; and I'm now just working on Java with NetBeans IDE: I'm
following the advice on Dev's Guide chap 4
<http://api.openoffice.org/docs/DevelopersGuide/Components/Components.xhtml#1_Writing_UNO_Components>:

"Last but not least, this is not the only way to add features to the
office. Learning how to write components and how to use the
OpenOffice.org API *at the same time teaches you* the techniques used in
the OpenOffice.org code base, thus enabling you to work with the
existing OpenOffice.org source code, extend it or introduce bug fixes."

I started with OOoBasic, now I'm into Java writing UNO Components /
Add-on, my next step will be C++ source code ...


I'll probably leave the issue unfixed for a while, since I think it's
really an easy start (that's why the "easy2dev" keyword) for OOo beginners.

Right now I'm working on a database extension, but using Java and the API, that is less "labyrinthic" than the source code.

Looking forward to read your announcement - the more extensions we get,
the better.

And by the way, it seems like the developer's developed the API, but they don't use it in OOo source as often as we should expect (this at least in the area we're talking about: AWT module vs. VCL).

That's sad but tree. Too many API has been defined and implemented, but
never used. (I am allowed to say this: databases and forms - the things
our team is responsible for - are implemented on the top of our own UNO
API since there is an UNO API).

And my VCL knowledge is very poor (I read a few files trying to understand how to make a custom tree control using AWT for my extension - as I'm trying to use ALL OOo AWT API instead of Java Swing ).

Do you know that 2.3 will have an AWT tree control?

Yes, I heard about it on the api mailing list, but couldn't find the
specification, so couldn't know if the implementation will be just what
I'm looking for: a tree control full customizable (a JTree-like control
will be too much to ask for) just like OOo Navigators. I'm developing
FOR MY PERSONAL USE (== I find it useful for me) a kind of "OOoBase
launcher": from every application module, a menu entry on the Tools -
Add-on menu opens a dialog with an ODB History list and a Favorites
list. Every ODB is a node in the tree list box, when the node is
expanded, just like the data source browser, shows the tables, queries,
*but* *also* the forms and reports. Form here, I can choose to open the
whole ODB, or just a form or report.

I said "FOR MY PERSONAL USE (== I find it useful for me)", because I
still have to think if it will be really useful, and if it will consume
too much resources (contra: every time I expand a node, I have to call
DatabaseContext:getByName(ODB URL); pro: I don't need to create a
connection to get the data needed, just use XFormDocumentsSupplier,
XReportDocumentsSupplier, XQueryDefinitionsSupplier, XTablesSupplier.

TO ME, it's really useful: the modules I use the most are Writer and
Base, and every time I have to check some ODB, it's tedious to browse
the file system with the file picker, so a Favorites list and a History
list saves me a lot of time



In the future, I'm planning to study "systematically" the source code (where to start is the problem),

where to start is something every core developer will gladly give an
answer to - if you come with a halfway specific question, I'm pretty
sure you will get answers in the lists, if you just ask.

I will have to think in what I would really like to work. Right now, I'm
  in a state of "joy and pleasure" when reading OOo source code:
everything is amazing (some people may think I'm crazy, finding pleasure
in reading source code, but I'm sure you understand: just like a kid
opening the Christmas gifts, a computer science student stays "erstaunt
/ überrascht / verwundert" when you give him the gift to see how it
really works - my words are always: "Ahhhhhhhh!!!!!!!, so that how it's
done!!!!!!!! )

but now I'm training myself on writing
UNO components in Java + 100% OOo API.

Which is also important (and sometimes challenging). Have fun :)

Ciao
Frank


As you said, a missing initialization of bEntryEditingEnabled:

Source: svtools/source/contnr/imivctl*

Class: SvxIconChoiceCtrl_Impl

Member: BOOL bEntryEditingEnabled

Uses:
void EnableEntryEditing( BOOL bEnable ) { bEntryEditingEnabled = bEnable; }
BOOL IsEntryEditingEnabled() const { return bEntryEditingEnabled; }
BOOL IsEntryEditing() const { return (BOOL)(pCurEditedEntry!=0); }
void EditEntry( SvxIconChoiceCtrlEntry* pEntry );
void StopEntryEditing( BOOL bCancel );


To fix the bug, just initialize the member with EnableEntryEditing( BOOL bEnable ) and pass to the parameter bEnable a
FALSE argument:

EnableEntryEditing( FALSE );

Was this be so simple to fix ??!!!

============================================================================================

BUG FIX: dbaccess/source/ui/app/AppIconControl.cxx:



OApplicationIconControl::OApplicationIconControl(Window* _pParent)
        : SvtIconChoiceCtrl(_pParent,WB_ICON | WB_NOCOLUMNHEADER |
WB_HIGHLIGHTFRAME | /*!WB_NOSELECTION |*/
                                                                WB_TABSTOP | 
WB_CLIPCHILDREN | WB_NOVSCROLL | WB_SMART_ARRANGE |
WB_NOHSCROLL | WB_CENTER)
        ,DropTargetHelper(this)
        ,m_pActionListener(NULL)
{
      DBG_CTOR(OApplicationIconControl,NULL);

        typedef ::std::pair< USHORT,USHORT> TUSHORTPair;
        typedef ::std::pair< ElementType,TUSHORTPair> TUSHORT2Pair;
        typedef ::std::pair< String,TUSHORT2Pair> TPair;
        static const TPair pTypes[] = {
                
TPair(String(ModuleRes(RID_STR_TABLES_CONTAINER)),TUSHORT2Pair(E_TABLE,TUSHORTPair(IMG_TABLEFOLDER_TREE_L,IMG_TABLEFOLDER_TREE_LHC)

))
                ,
TPair(String(ModuleRes(RID_STR_QUERIES_CONTAINER)),TUSHORT2Pair(E_QUERY,TUSHORTPair(IMG_QUERYFOLDER_TREE_L,IMG_QUERYFOLDER_TREE_LHC))

)
                ,
TPair(String(ModuleRes(RID_STR_FORMS_CONTAINER)),TUSHORT2Pair(E_FORM,TUSHORTPair(IMG_FORMFOLDER_TREE_L,IMG_FORMFOLDER_TREE_LHC))

)
                ,
TPair(String(ModuleRes(RID_STR_REPORTS_CONTAINER)),TUSHORT2Pair(E_REPORT,TUSHORTPair(IMG_REPORTFOLDER_TREE_L,IMG_REPORTFOLDER_TREE_LHC))

)
                };

        for (size_t i=0; i < sizeof(pTypes)/sizeof(pTypes[0]); ++i)
        {
                SvxIconChoiceCtrlEntry* pEntry =
InsertEntry(pTypes[i].first,Image(ModuleRes(pTypes[i].second.second.first)),Image(ModuleRes(pTypes[i].second.second.second)));
                if ( pEntry )
                        pEntry->SetUserData(new 
ElementType(pTypes[i].second.first));
        }

        SetChoiceWithCursor( TRUE );
        SetSelectionMode(SINGLE_SELECTION);
        // Can this be so simple to fix??!!
        EnableEntryEditing( FALSE );
}

===============================================================================================



It seems you people from dbaccess were not the only one who forgot to
initialize this member: look the pictures I send you.
In these cases the label becomes editable also:



******************************************************************************************
Dialog dispatched by the menu entry "File" -> "New" -> "Templates and
Documents"

Source code: svtools/source/contnr/templwin.*

Class: SvtIconWindow_Impl

**********************************************************************************************
Dialog dispatched by the menu "Insert" -> "Hyperlink"

Source code:  svx/source/dialog/cuihyperdlg.*

Class: SvxHpLinkDlg



Bye and thanks


--
Ariel Constenla-Haile
La Plata, Argentina

[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://www.arielconstenlahaile.com.ar/ooo/



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

Reply via email to