[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks 'number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 Dieter changed: What|Removed |Added See Also||https://bugs.documentfounda ||tion.org/show_bug.cgi?id=14 ||6841 CC||brian.the2brit2@virginmedia ||.com --- Comment #20 from Dieter --- *** Bug 146841 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks 'number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 Heiko Tietze changed: What|Removed |Added Keywords|difficultyInteresting, | |easyHack, needsDevEval, | |skillCpp| -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 --- Comment #19 from Paul --- Ok, I fixed it by taking the "iNumColumns As Integer," out of the Sub definition: Sub Writer_SelectionToColumns( ByRef Optional sSeparator ) -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 --- Comment #18 from Paul --- Ok, I asked and received a really nice macro reply. I slightly altered it by adding an Input box to spec the number of columns on the fly, and to exit if the input box was left blank. The Ask thread is at http://bit.ly/2ETWnbD. I will print the finished macro below. But there is one strange problem. Though the macro works fine when invoked from the Basic editor, it errors out when I use a custom Menu entry for it. The error is: A Scripting Framework error occurred while running the Basic script Standard.Module1.Writer_SelectionToColumns. Message: wrong number of parameters! Also errors out via hotkey. Here's the macro. I would like to see something like this incorporated into Core somehow. :) Sub Writer_SelectionToColumns( ByRef iNumColumns As Integer, Optional sSeparator ) REM Courtesy of librebel, 2/19/18; http://bit.ly/2ETWnbD. My input box added REM Convert selected Text into a specified number of Table Columns. REM : The number of columns for the Table to be created. REM : String pattern separating the Text portions to be inserted into the Table Cells. REM NB. This method does not preserve the existing text format of the selection. REM TODO: Format text; AutoFormat Table. Dim oDocument As Object : oDocument = ThisComponent If oDocument.supportsService( "com.sun.star.text.TextDocument" ) Then Dim iNumColumns As Integer iNumColumns = InputBox("Enter desired number of columns (blank = 0)") If iNumColumns <= 0 Then Exit Sub If IsMissing( sSeparator ) Or sSeparator = "" Then sSeparator = chr(10) Dim oSelection As Object : oSelection = oDocument.CurrentController.Selection.getByIndex( 0 ) Dim aParts() As String : aParts = Split( oSelection.getString(), sSeparator ) Dim iNumRows As Integer : iNumRows = ( 1 + uBound( aParts ) ) \ iNumColumns If ( 1 + uBound( aParts ) ) Mod iNumColumns > 0 Then iNumRows = iNumRows + 1REM Ceiling()... If iNumRows = 0 Then Exit Sub Dim oTable As Object : oTable = oDocument.createInstance( "com.sun.star.text.TextTable" ) oTable.initialize( iNumRows, iNumColumns ) oDocument.Text.insertTextContent( oSelection, oTable, True )REM Replace selection with Table. Dim i As Integer For i = 0 To uBound( aParts ) oTable.getCellByPosition( i Mod iNumColumns, i \ iNumColumns ).setString( aParts( i ) ) Next i End If End Sub -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 Heiko Tietze changed: What|Removed |Added CC|libreoffice-ux-advise@lists |tietze.he...@gmail.com |.freedesktop.org| --- Comment #17 from Heiko Tietze --- (In reply to Paul from comment #16) > I suppose a macro converting linefeeds to > delimiters within a selection, while leaving every Nth feed untouched, would > be the solution, applied before table conversion. True. If you start with an extension please share the result so that we can close this ticket eventually. But I could imagine that more users benefit from the change and would keep it as easyhack as long no solution is available. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 --- Comment #16 from Paul --- Revisiting this, after quite a while (sorry, wasn't feeling too well back then). I tried the trick of adding tabs to the first line, and indeed, this creates a table with a corresponding number of columns, which is pretty neat. But the data is not filled into those extra columns, they remain empty. The data continues to be populated, each line into a new row. IOW, if the original text is: word tab tab word2 word3 word4 word5 word6 It converts to: word col2 col3 word2 word3 word4 word5 word6 Whereas I would like it to be: word word2 word3 word4 word5 word6 I format a lot of older public-domain documents, and I run into this frequently. My personal take is that this functionality is pretty basic. I'm surprised there hasn't been more call for it. Since I seem to be the only one desiring this function, I think asking over at the Ask is a good idea. I suppose a macro converting linefeeds to delimiters within a selection, while leaving every Nth feed untouched, would be the solution, applied before table conversion. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 Heiko Tietze changed: What|Removed |Added Keywords|needsUXEval |difficultyInteresting, ||easyHack, needsDevEval, ||skillCpp Status|NEW |NEEDINFO --- Comment #14 from Heiko Tietze --- EASYHACK, please add the code pointer (=> NEEDINFO). The UI needs only small changes with the addition of a (by default marked) checkbox "auto split" and a numerical stepper below that is enabled when this checkbox is switched off (all below the "separate text at" options). Auto split means every break counts, while the numerical input defines how many columns the result will have. See also comment 11. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 --- Comment #13 from Paul --- In retrospect, I can see how the request would seem somewhat esoteric. It's been a while now, and I don't recall the nature of the file I was up against, but I do know it was a massive problem, and that I felt it was one I would encounter fairly often (I format a lot of scanned documents - or at least, was, before taking a new job). I guess that by macro I could replace every !Nth linefeed with a tab. That seems a remote solution for the typical user, but it may be the best solution unless I can recall the original problem in greater detail and it proves to be common enough to warrant a GUI solution (as I thought it was at the time). -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 --- Comment #12 from Tomaz Vajngerl --- I'm sure it is not difficult - should be a nice non-trivial EasyHack. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 --- Comment #11 from Heiko Tietze --- (In reply to Tomaz Vajngerl from comment #10) > He wants to make from text (oriented in one column) a two column table - > there is no extra column. Without manually changing the data I don't think > it is easily possible to do it in Calc, or am I mistaken. Depends on the actual values. You can split text into multiple columns and create a pivot table with the running numbers as row criteria. But back to Writer: Another example could be P1 #9 D1 #9 P2 #9 D2 P3 #9 D3 #9 P4 #9 D4 (#9 as tab, could be any other delimiter) again with the goal to get P1|D1 P2|D2 The request is to have an option to limit the number of columns. E.g. [ ] auto split split into [2]+/- That means to ignore line wraps (#10#13), or rather virtually replace by a delimiter, if the number of columns is not reached. And to add a line break otherwise even when there are more delimiters if the specified number of columns is reached. Perhaps it's not so difficult to implement, and from the UI POV I changed my mind and guess user will understand the solution (OTOH undo is always possible). -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 --- Comment #10 from Tomaz Vajngerl --- He wants to make from text (oriented in one column) a two column table - there is no extra column. Without manually changing the data I don't think it is easily possible to do it in Calc, or am I mistaken. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 Cor Nouws changed: What|Removed |Added Version|5.1.1.3 release |Inherited From OOo --- Comment #9 from Cor Nouws --- @paul: please consider to ask questions too at one of our great community support options http://www.libreoffice.org/get-help/community-support/ -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 Cor Nouws changed: What|Removed |Added CC||c...@nouenoff.nl --- Comment #8 from Cor Nouws --- Hi Paul, (In reply to Paul from comment #0) > I currently have some text, > all separated by paragraph returns, that I would like to make into a > two-column table. I do have a very simple trick for that: I add one Tab (for every extra column) on one line, before selecting and hitting Ctrl+F12. So personally I would not dare to ask extra UI stuff for that. Would that work for you too? -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 --- Comment #7 from Buovjaga --- One developer on IRC would rather see this made as an extension or simply a macro. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 --- Comment #6 from Paul --- (In reply to Buovjaga from comment #4) > Looking at the history we can see you assigned it to yourself: > https://bugs.documentfoundation.org/show_activity.cgi?id=99035 My apologies. I'm new at this and must have hit the wrong button. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks ' number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 Heiko Tietze changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #5 from Heiko Tietze --- Yes, sometimes data are not well organized (=> NEW). Example in the attachment is Parameter 1 data 1 Parameter 2 data 2 with the goal to get Parameter 1 | data 1 Parameter 2 | data 2 But I would rather not add this complexity to the text-to-table conversion of _Writer_. If you regularly have to organize data like this you can do the trick with Calc. And eventually an extension/macro could also become handy. WONTFIX in my opinion. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks 'number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 Buovjaga changed: What|Removed |Added Status|NEEDINFO|UNCONFIRMED Ever confirmed|1 |0 -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks 'number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 Buovjaga changed: What|Removed |Added Status|ASSIGNED|NEEDINFO Assignee|pbpub...@gmail.com |libreoffice-b...@lists.free ||desktop.org --- Comment #4 from Buovjaga --- Looking at the history we can see you assigned it to yourself: https://bugs.documentfoundation.org/show_activity.cgi?id=99035 -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks 'number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 Paul changed: What|Removed |Added Status|NEEDINFO|UNCONFIRMED Assignee|libreoffice-b...@lists.free |pbpub...@gmail.com |desktop.org | Ever confirmed|1 |0 --- Comment #2 from Paul --- Created attachment 124231 --> https://bugs.documentfoundation.org/attachment.cgi?id=124231&action=edit text that I want to end up in a 2-column table -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 99035] [Feature Request] "Convert text to table" lacks 'number of columns' option
https://bugs.documentfoundation.org/show_bug.cgi?id=99035 Buovjaga changed: What|Removed |Added Status|UNCONFIRMED |NEEDINFO CC||todven...@suomi24.fi Ever confirmed|0 |1 Severity|normal |enhancement --- Comment #1 from Buovjaga --- Can you attach a minimal example document with the starting point text and the desired end result table? Set to NEEDINFO. Change back to UNCONFIRMED after you have provided the document. -- You are receiving this mail because: You are the assignee for the bug. ___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs