View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017168 | Scribus | Scripter | public | 2024-02-26 20:33 | 2024-03-03 07:12 |
Reporter | ale | Assigned To | cbradney | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 1.7.0.svn | ||||
Fixed in Version | 1.6.2.svn | ||||
Summary | 0017168: Scripter: get the current text selection | ||||
Description | with the scripter it seems to only be possible to set the current text selection, but not retrieve it. (i mean: the indexes with the start and end of the selection, not the content of the selection!) | ||||
Tags | No tags attached. | ||||
Patch | No | ||||
|
So the reverse of selectText()? ie.. you want to get start and end (or start and count?) of the selection itself? |
|
exactly! i'm working on a script for sorting alphabetically the paragraphs in a given selection and i think that i need to know where the selection starts and ends. i have now created a python function that approximates it and if it indeed i need this function i will try to ,create a patch. if anybody has a good candidate for the name, suggestions are welcome. |
|
Try what I have committed in r26037. Its not quite right yet... as in we might want to refine how the indexes are returned, or +/-1 on them.. but we have the basics getSelectedTextIndexes("TextFrameName") |
|
nice, thanks! i have not compiled it yet, but had a look at the commit. i have three suggestions: - since selectFrameText() and selectText() are using start and length, i would return the same values here (instead of start and end) - what about naming it getSelectedTextRange() ? - this function is the also the companion of getAllText() and getFrameText(): i guess that we also need getSelectedFrameTextRange() returning the part of the selection in the current frame, with 0 being the start of the current frame. |
|
ok, r26038 has getSelectedTextRange that returns start and length now. |
|
r26039 has getFrameSelectedTextRange. |
|
thanks, it looks good! |
|
Backported to 1.6.2.svn, closing bug |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-02-26 20:33 | ale | New Issue | |
2024-02-26 20:56 | ale | Description Updated | |
2024-02-27 21:35 | cbradney | Note Added: 0051011 | |
2024-02-28 12:12 | ale | Note Added: 0051013 | |
2024-02-28 21:21 | cbradney | Note Added: 0051015 | |
2024-02-28 21:23 | cbradney | Note Edited: 0051015 | |
2024-02-29 07:26 | ale | Note Added: 0051016 | |
2024-02-29 20:29 | cbradney | Note Added: 0051020 | |
2024-02-29 20:51 | cbradney | Note Added: 0051021 | |
2024-03-02 06:59 | ale | Note Added: 0051022 | |
2024-03-02 21:04 | cbradney | Assigned To | => cbradney |
2024-03-02 21:04 | cbradney | Status | new => resolved |
2024-03-02 21:04 | cbradney | Resolution | open => fixed |
2024-03-02 21:04 | cbradney | Fixed in Version | => 1.6.2.svn |
2024-03-02 21:04 | cbradney | Note Added: 0051023 | |
2024-03-03 07:12 | ale | Status | resolved => closed |