Re: Help finding word count bug in source
Hi Erik, On Mon, Mar 23, 2015 at 10:55:00PM -0400, Erik Engstrom wrote: Hey developers, I'd like to work on a fix for issue #121672, but I'm not sure where to look in the source code for the word count function. Could anyone give me a hint as to where to look? I only know a little about application framework, not Writer code; but this is what I'd do to find the code. There are different approaches, but I will search the UNO command (you could also search the dialog title in src files): - Start from the UI. The menu that triggers the Word Count dialog has the text Word Count. All commands in toolbars and menus are identified by a single string named the UNO command; this command is bound to a string describing the feature in the UI, this binding is made in configuration files under main/officecfg/registry/data/org/openoffice/Office/UI/ Let's find the UNO command for this string: http://opengrok.adfinis-sygroup.org/source/search Full Search: Word Count File Path: xcu In Project(s): aoo-trunk http://opengrok.adfinis-sygroup.org/source/search?q=%22Word+Count%22defs=refs=path=xcuhist=project=aoo-trunk The string is here: http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu#1668 The command is .uno:WordCountDialog - the UNO command represents a feature that has states (can be enabled/disabled, checked/unchecked, etc.) and can be executed (dispatched). Every item in a toolbar/menu/statusbar is managed in the application framework by a controller that listens for status updates at a dispatch object, which is also responsible of execute the feature. Once you have the UNO command, find where is the code that dispatches the command and/or provides its state. In applications based on the application framework (chart2, dbaccess, reportdesign), this would be rather straight-forward. The other applications are based on the old SFX2 framework, and is more complicated to understand. You can find a technical explanation here https://wiki.openoffice.org/wiki/Framework/Article/Implementation_of_the_Dispatch_API_In_SFX2 and some examples in this message http://markmail.org/message/w2hhxnectkeehdvg In the sfx2 world you need to find the slot definition and the shell interface(s) that has(have) the methods that provide the state and execution. We search the UNO command without the protocol part: Full Search: WordCountDialog File Path: sdi http://opengrok.adfinis-sygroup.org/source/search?q=WordCountDialogdefs=refs=path=sdihist=project=aoo-trunk The slot is defined in main/sw/sdi/swriter.sdi SfxVoidItem WordCountDialog FN_WORDCOUNT_DIALOG With the ID, FN_WORDCOUNT_DIALOG you can search the shell interfaces: http://opengrok.adfinis-sygroup.org/source/search?q=FN_WORDCOUNT_DIALOGdefs=refs=path=sdihist=project=aoo-trunk and the implementation: http://opengrok.adfinis-sygroup.org/source/search?q=FN_WORDCOUNT_DIALOGdefs=refs=path=cxxhist=project=aoo-trunk The code does basically the same in the different shells: http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/ui/shells/textsh1.cxx#1357 http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/ui/shells/annotsh.cxx#452 http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/ui/shells/frmsh.cxx#273 http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/ui/shells/drwtxtex.cxx#416 http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/ui/shells/drawsh.cxx#338 You can set a break point in any of them, they lead you to: void SwDoc::CountWords( const SwPaM rPaM, SwDocStat rStat ) const http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/core/doc/docedt.cxx#2787 void SwTxtNode::CountWords( SwDocStat rStat, xub_StrLen nStt, xub_StrLen nEnd ) const http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/core/txtnode/txtedt.cxx#1939 It seams that a) word counting is done on a text node basis; this information is cached on the text node, that is, when you insert a new word the whole document isn't counted again and again (look for SetWordCountDirty, it will tell you when this information is invalidated) b) in the end, Writer uses the break iterator API. I do the same in this extension: http://extensions.openoffice.org/en/project/word-count-statusbar-controller I get the word count for the whole document from the document statistics, so the bug is there too. But for the selection I use the break iterator manually, and you'll see that the bug isn't reproducible in the statusbar control (unfortunately there is no way to cache word count using the API, so the selection word count is limited to a certain amount of text). In short, I guess that the bug is not in the break iterator code but in Writer. -- If you wanted to take the other approach, search the dialog title: - dialogs are
Re: Help finding word count bug in source
Ariel, Wow, I really appreciate your thoughtful reply! Thank you, Erik On Thu, Mar 26, 2015 at 5:58 AM, Ariel Constenla-Haile arie...@apache.org wrote: Hi Erik, On Mon, Mar 23, 2015 at 10:55:00PM -0400, Erik Engstrom wrote: Hey developers, I'd like to work on a fix for issue #121672, but I'm not sure where to look in the source code for the word count function. Could anyone give me a hint as to where to look? I only know a little about application framework, not Writer code; but this is what I'd do to find the code. There are different approaches, but I will search the UNO command (you could also search the dialog title in src files): - Start from the UI. The menu that triggers the Word Count dialog has the text Word Count. All commands in toolbars and menus are identified by a single string named the UNO command; this command is bound to a string describing the feature in the UI, this binding is made in configuration files under main/officecfg/registry/data/org/openoffice/Office/UI/ Let's find the UNO command for this string: http://opengrok.adfinis-sygroup.org/source/search Full Search: Word Count File Path: xcu In Project(s): aoo-trunk http://opengrok.adfinis-sygroup.org/source/search?q=%22Word+Count%22defs=refs=path=xcuhist=project=aoo-trunk The string is here: http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu#1668 The command is .uno:WordCountDialog - the UNO command represents a feature that has states (can be enabled/disabled, checked/unchecked, etc.) and can be executed (dispatched). Every item in a toolbar/menu/statusbar is managed in the application framework by a controller that listens for status updates at a dispatch object, which is also responsible of execute the feature. Once you have the UNO command, find where is the code that dispatches the command and/or provides its state. In applications based on the application framework (chart2, dbaccess, reportdesign), this would be rather straight-forward. The other applications are based on the old SFX2 framework, and is more complicated to understand. You can find a technical explanation here https://wiki.openoffice.org/wiki/Framework/Article/Implementation_of_the_Dispatch_API_In_SFX2 and some examples in this message http://markmail.org/message/w2hhxnectkeehdvg In the sfx2 world you need to find the slot definition and the shell interface(s) that has(have) the methods that provide the state and execution. We search the UNO command without the protocol part: Full Search: WordCountDialog File Path: sdi http://opengrok.adfinis-sygroup.org/source/search?q=WordCountDialogdefs=refs=path=sdihist=project=aoo-trunk The slot is defined in main/sw/sdi/swriter.sdi SfxVoidItem WordCountDialog FN_WORDCOUNT_DIALOG With the ID, FN_WORDCOUNT_DIALOG you can search the shell interfaces: http://opengrok.adfinis-sygroup.org/source/search?q=FN_WORDCOUNT_DIALOGdefs=refs=path=sdihist=project=aoo-trunk and the implementation: http://opengrok.adfinis-sygroup.org/source/search?q=FN_WORDCOUNT_DIALOGdefs=refs=path=cxxhist=project=aoo-trunk The code does basically the same in the different shells: http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/ui/shells/textsh1.cxx#1357 http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/ui/shells/annotsh.cxx#452 http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/ui/shells/frmsh.cxx#273 http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/ui/shells/drwtxtex.cxx#416 http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/ui/shells/drawsh.cxx#338 You can set a break point in any of them, they lead you to: void SwDoc::CountWords( const SwPaM rPaM, SwDocStat rStat ) const http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/core/doc/docedt.cxx#2787 void SwTxtNode::CountWords( SwDocStat rStat, xub_StrLen nStt, xub_StrLen nEnd ) const http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/sw/source/core/txtnode/txtedt.cxx#1939 It seams that a) word counting is done on a text node basis; this information is cached on the text node, that is, when you insert a new word the whole document isn't counted again and again (look for SetWordCountDirty, it will tell you when this information is invalidated) b) in the end, Writer uses the break iterator API. I do the same in this extension: http://extensions.openoffice.org/en/project/word-count-statusbar-controller I get the word count for the whole document from the document statistics, so the bug is there too. But for the selection I use the break iterator manually, and you'll see that the bug isn't reproducible in the statusbar control (unfortunately there is no way to cache word count using the API, so the
Re: Proposal: Bump CentOS reference distribution from 5 to 6
On 03/26/2015 12:03 AM, jan i wrote: On 26 March 2015 at 03:36, Pedro Giffuni p...@apache.org wrote: Hello; Not that I care too much, but while CentOS 5 hasn't reached it EOL, it doesn't make much sense to force ourselves to ship AOO there. I think we should move to CentOS 6 which is likely to remain very popular since it's the last version without systemd. +1 This sounds reasonable to me. This would put up less pressure on infra for the buildbot and let us use by default a newer toolchain. To be fair, even has pretty much given up on AOO and buildbots, we can get VMs if we want to and manage them ourself. I don't understand this last sentence. What does this mean really? rgds jan i. Regards, Pedro. - To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org -- - MzK “What is the point of being alive if you don't at least try to do something remarkable?” -- John Green, An Abundance of Katherines - To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org
Re: CMS FAQ
My concern is that with the proposal the GUI is going away. On Mar 26, 2015, at 12:09 AM, jan i wrote: Hi All In the ongoing discussion (apache wide) Infra has now made a FAQ, which is worth reading. https://cwiki.apache.org/confluence/display/INFRA/CMS+Decommissioning+RFC+-+Frequently+Asked+Questions Remark, due to some disussions, Infra made this disclaimer: This is ONLY a request for commentary from the community on a proposal by Infra to work towards decommissioning the CMS. It is NOT an express statement by the infra group that we will be taking any specific action(s). We seek input from the community on this proposal so that we can make more informed decisions on the future direction of CMS support, whether that be via replacement, via resources applied to bring the existing CMS to acceptable support standards, or some other option TBD. If the CMS were to be decommissioned in the way currently suggested, we would have a couple of challenges: - Find a replacement online edtitor for our translators (who are also committers) - Find a way to keep the templates active in pure HTML - Decide not to use markdown but only html (BAD for our translators). Or alternatively (something that currently seems less work): - Get a VM, install CMS and run it for us. rgds jan I. - To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org
Sorting Data Resulting in Corrupt Results
Hello There Developers: I came across a problem that I want to bring to your attention. I was using the Spreadsheet program “calcs”. When I sorted the data based the date order it did the sorting, but kept the formulae with “Absolute” values of cell references in formulae, thus resulting in the sorted data making reference to irrelevant fields not related to “set” of data that it applies to. Thus the set of data after sorting contains unrelated data from other sets not that belongs to family in the “set”. In other words the formulae make references to unrelated fields from other “sets” or “rows”. Please looking to this matter as many users use the spreadsheets and sort the data as and when needed. You do not want them to make presentations with sorted data containing unrelated elements of data in the sets. Thank you. I am glad for having to this opportunity to give you this feed back. Best regards. K. Easwara Chandran Sent from Windows Mail
Re: Building Guide AOO for example under debian
On 26 March 2015 at 22:05, Kay Schenk kay.sch...@gmail.com wrote: On 03/26/2015 01:35 PM, Driss Ben Zoubeir wrote: Hi All, is the step by step building guide for AOO under Ubuntu the same as under Debian? Or is it better to have Ubuntu to contribute to the open office development? the guide is under the following https://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO/Step_by_step#Ubuntu_14.04 Regards Driss The general Building Guide -- https://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO along with the Linux building guide -- https://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO/Building_on_Linux is what I've used. I am on openSUSE which is not a Debian derivative, but I would think you would not need Ubuntu. I had 4.0 running under Debian, and used the Ubuntu instructions, I do remember there was 1 package I had to download by expending the package catalog. Debian is basically a more raw distribution than Ubuntu. Bear in min I am not judging here, every distribution has its right and users. rgds jan i. - MzK “What is the point of being alive if you don't at least try to do something remarkable?” -- John Green, An Abundance of Katherines - To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org
Re: Building Guide AOO for example under debian
On 03/26/2015 01:35 PM, Driss Ben Zoubeir wrote: Hi All, is the step by step building guide for AOO under Ubuntu the same as under Debian? Or is it better to have Ubuntu to contribute to the open office development? the guide is under the following https://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO/Step_by_step#Ubuntu_14.04 Regards Driss The general Building Guide -- https://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO along with the Linux building guide -- https://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO/Building_on_Linux is what I've used. I am on openSUSE which is not a Debian derivative, but I would think you would not need Ubuntu. - MzK “What is the point of being alive if you don't at least try to do something remarkable?” -- John Green, An Abundance of Katherines - To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org
CMS FAQ
Hi All In the ongoing discussion (apache wide) Infra has now made a FAQ, which is worth reading. https://cwiki.apache.org/confluence/display/INFRA/CMS+Decommissioning+RFC+-+Frequently+Asked+Questions Remark, due to some disussions, Infra made this disclaimer: This is ONLY a request for commentary from the community on a proposal by Infra to work towards decommissioning the CMS. It is NOT an express statement by the infra group that we will be taking any specific action(s). We seek input from the community on this proposal so that we can make more informed decisions on the future direction of CMS support, whether that be via replacement, via resources applied to bring the existing CMS to acceptable support standards, or some other option TBD. If the CMS were to be decommissioned in the way currently suggested, we would have a couple of challenges: - Find a replacement online edtitor for our translators (who are also committers) - Find a way to keep the templates active in pure HTML - Decide not to use markdown but only html (BAD for our translators). Or alternatively (something that currently seems less work): - Get a VM, install CMS and run it for us. rgds jan I.
Re: database problem
Hello Mary Lou! Hi Folks, I have created 2 tables in design view: Basic Table and Dues Table. Please read the attachment to see the tables. My previous e-mail was not so easy to read. There is a relationship between Basic.ID and Dues.ID I can enter data into the Basic table but cannot enter data intothe Dues table. Yes it is better to ask such questions in a user forum. In your second table you need also a unique primary key (simply an autoincrement). Without such a column your table will stay readonly. Regards, Mathias - To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org