Bug 100460 - Can not query sheet cells with annotations
Summary: Can not query sheet cells with annotations
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.3.2 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.3.0 target:5.2.0.2 target:5.1.5
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2016-06-17 15:56 UTC by Andreas Säger
Modified: 2016-10-25 18:54 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Some annotated cells and Basic macro (17.39 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-06-17 16:00 UTC, Andreas Säger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Säger 2016-06-17 15:56:44 UTC
oCellRange.queryContentCells(com.sun.star.sheet.CellFlags.ANNOTATION)always reports zero. 
Works with OpenOffice.
Comment 1 Andreas Säger 2016-06-17 16:00:38 UTC
Created attachment 125713 [details]
Some annotated cells and Basic macro

When you hit the push button, a message box reports
"Cell Ranges with Annotations ueried from A1:A20: 0"

AOO reports
"Cell Ranges with Annotations ueried from A1:A20: 4"
since there are 4 blocks of annotated cells.
Comment 2 Buovjaga 2016-06-18 20:04:03 UTC
I get

BASIC runtime error.
An exception occurred 
Type: com.sun.star.container.NoSuchElementException
Message: .

64-bit, KDE Plasma 5
Build ID: 5.1.3.2 Arch Linux build-1
CPU Threads: 8; OS Version: Linux 4.5; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: c13f60e7cd18df6b0ab70289f5b91ee01e4ae126
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on June 18th 2016
Comment 3 Andreas Säger 2016-06-18 21:56:19 UTC
(In reply to Buovjaga from comment #2)
> I get
> 
> BASIC runtime error.
> An exception occurred 
> Type: com.sun.star.container.NoSuchElementException
> Message: .
> 

Oh sorry. Delete the line which raises the error and try again.
Comment 4 Buovjaga 2016-06-19 06:43:22 UTC
Ok now I got it after deleting globalscope.basiclibraries.loadlibrary("myTools").

Cell Ranges with Annotations ueried from A1:A20: 0
Comment 5 Caolán McNamara 2016-06-23 09:16:57 UTC
while I can't bibisect this the change has to be...

commit c06dbbe7594c2a0b5a5b19f8e183d9c421e6e094
Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date:   Thu Feb 23 23:36:49 2012 +0100

    remove mpNote from ScBaseCell

which removed the sheet::CellFlags::ANNOTATION check
Comment 6 Commit Notification 2016-06-23 14:25:10 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=84dc0157df9cb173ec74da2bd27507329efc3816

Related: tdf#100460 GetNotesInRange doesn't count last cell in range

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Caolán McNamara 2016-06-23 14:29:26 UTC
yoink this to me cause I think I can fix it
Comment 8 Commit Notification 2016-06-23 14:43:32 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=83f977c7f40d1a5fb975b8ce7c9958c992dba3f1

Resolves: tdf#100460 queryContentCells doesn't count annotations...

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2016-06-23 20:13:24 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b8b51fc4b253b3468396addd3bf72766d6d82710&h=libreoffice-5-2

Resolves: tdf#100460 queryContentCells doesn't count annotations...

It will be available in 5.2.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2016-06-23 20:16:00 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=28e3843433c3dfa04aae70c3c0516911ee80bf69&h=libreoffice-5-1

Resolves: tdf#100460 queryContentCells doesn't count annotations...

It will be available in 5.1.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.