You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/11/23 18:55:30 UTC

[Bug 121391] New: Extension to XSmartTagRecognizer interface

https://issues.apache.org/ooo/show_bug.cgi?id=121391

            Bug ID: 121391
        Issue Type: DEFECT
           Summary: Extension to XSmartTagRecognizer interface
    Classification: Code
           Product: api
           Version: AOO350-dev
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: code
          Assignee: issues@openoffice.apache.org
          Reporter: robert.barbey@acrolinx.com
                CC: issues@openoffice.apache.org

Created attachment 79945
  --> https://issues.apache.org/ooo/attachment.cgi?id=79945&action=edit
This patch contains the extensions mentioned in the description.

For a Writer extension, we're traversing a document using the Java text
iteration API. The text is extracted and sent to a server backend for
linguistic analysis. This server returns a report containing corrections for
the current document which the extension needs to map back into the document.
All of this is based on XTextRange objects. 

In order to highlight these corrections within document, we are using smart
tags. But with the existing XSmartTagRecognizer interface it's not possible to
determine reliably the absolute position of  the text that is to be processed
in the recognize method of the interface. To be able to do that we would need
an XTextRange object as argument. This, of course, would require a change of
the XTextMarkup interface so that it also supports committing markup for
XTextRanges.

In the attached file, you find a patch that adds this functionality. It would
be really great if you could review these changes and provide feedback for
improvements or if you think that we have missed something essential. WE think
that this addition could be beneficial to other extensions as well.

Thank you very much and have a nice weekend.

Best,
Robert

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121391] Extension to XSmartTagRecognizer interface

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121391

--- Comment #5 from jsc@apache.org ---
I added the other related issue as dependencies to this one and take this one
as meta issue to cover all related changes

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121391] Extension to XSmartTagRecognizer interface

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121391

--- Comment #3 from Rob Weir <ro...@apache.org> ---
I'm adding this comment to all open issues with Issue Type == PATCH.  We have
220 such issues, many of them quite old.  I apologize for that.  

We need your help in prioritizing which patches should be integrated into our
next release, Apache OpenOffice 4.0.

If you have submitted a patch and think it is applicable for AOO 4.0, please
respond with a comment to let us know.

On the other hand, if the patch is no longer relevant, please let us know that
as well.

If you have any general questions or want to discuss this further, please send
a note to our dev mailing list:  dev@openoffice.apache.org

Thanks!

-Rob

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121391] Extension to XSmartTagRecognizer interface

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121391

--- Comment #1 from Ariel Constenla-Haile <ar...@apache.org> ---
Concerning the new IDL methods, it may make more sense to rename them:

XSmartTagRecognizer

void recognizeString( [in] string aText,
                      [in] long nStart,
                      [in] long nLength,
                      [in] SmartTagRecognizerMode eDataType,
                      [in] com::sun::star::lang::Locale aLocale,
                      [in] com::sun::star::text::XTextMarkup xTextMarkup,
                      [in] string aApplicationName,
                      [in] com::sun::star::frame::XController xController,
                      [in] com::sun::star::i18n::XBreakIterator xTokenizer );


void recognizeTextRange( [in] com::sun::star::text::XTextRange xRange,
                         [in] SmartTagRecognizerMode eDataType,
                         [in] com::sun::star::text::XTextMarkup xTextMarkup,
                         [in] string aApplicationName,
                         [in] com::sun::star::frame::XController xController);

XTextMarkup

void commitStringMarkup( [in] long nType,
                         [in] string aIdentifier,
                         [in] long nStart,
                         [in] long nLength,
                         [in] com::sun::star::container::XStringKeyMap
xMarkupInfoContainer );

void commitTextRangeMarkupRange( [in] long nType,
                                 [in] string aIdentifier,
                                 [in] com::sun::star::text::XTextRange xRange,
                                 [in] com::sun::star::container::XStringKeyMap
xMarkupInfoContainer );

And it may make sense to specify both start and end as text ranges withing the
original text range.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121391] Extension to XSmartTagRecognizer interface

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121391

Ariel Constenla-Haile <ar...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arielch@apache.org
         Issue Type|DEFECT                      |PATCH

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121391] Extension to XSmartTagRecognizer interface

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121391

Bug 121391 depends on bug 121730, which changed state.

Bug 121730 Summary: new interface XRangeBasedSmartTagRecognizer
https://issues.apache.org/ooo/show_bug.cgi?id=121730

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121391] Extension to XSmartTagRecognizer interface

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121391

jsc@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsc@apache.org
         Depends on|                            |121730, 121731, 121732,
                   |                            |121733, 121734

--- Comment #4 from jsc@apache.org ---
add dependencies

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121391] Extension to XSmartTagRecognizer interface

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121391

Bug 121391 depends on bug 121731, which changed state.

Bug 121731 Summary: modify XSmartTagAction->getCount
https://issues.apache.org/ooo/show_bug.cgi?id=121731

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121391] Extension to XSmartTagRecognizer interface

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121391

Bug 121391 depends on bug 121732, which changed state.

Bug 121732 Summary: new interface XMarkingAccess
https://issues.apache.org/ooo/show_bug.cgi?id=121732

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121391] Extension to XSmartTagRecognizer interface

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121391

Bug 121391 depends on bug 121733, which changed state.

Bug 121733 Summary: make colored smart tags possible
https://issues.apache.org/ooo/show_bug.cgi?id=121733

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121391] Extension to XSmartTagRecognizer interface

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121391

jsc@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from jsc@apache.org ---
the related dependency issues are all reviewed and fixed. 

I have tested a trunk build with a sample SmartTag and everything worked after
I made a minor change to adapt the change of the  not yet published interface.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121391] Extension to XSmartTagRecognizer interface

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121391

--- Comment #2 from Ariel Constenla-Haile <ar...@apache.org> ---
(In reply to comment #1)
> void commitTextRangeMarkupRange

this should read commitTextRangeMarkup

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[Bug 121391] Extension to XSmartTagRecognizer interface

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121391

Bug 121391 depends on bug 121734, which changed state.

Bug 121734 Summary: extend XTextMarkup interface
https://issues.apache.org/ooo/show_bug.cgi?id=121734

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.