Open (create) any Calc document. Run macros. Sub Test1 Dim oUDR oUDR=ThisComponent.getPropertyValue("UnnamedDatabaseRanges") Msgbox oUDR.hasByTable(0) End Sub Sub Test2 Dim oUDR oUDR=ThisComponent.UnnamedDatabaseRanges Msgbox oUDR.hasByTable(0) End Sub Test1 shows "False". Result of Test2: BASIC runtime error. Property or method not found: UnnamedDatabaseRanges.
See https://git.libreoffice.org/core/+/75c3b913d8c78a980294f4e7085aec8cf507bd43 that had introduced the property. It didn't extend SpreadsheetDocument service public attributes, nor made that through XPropertySet -> hence no introspection-based access. Given the implementation, extending SpreadsheetDocument service looks proper in this case.
Mike, thank you very much!
This could be an easyhack requiring to modify offapi/com/sun/star/sheet/SpreadsheetDocument.idl and lcl_GetDocOptPropertyMap in sc/source/ui/unoobj/docuno.cxx. However, the question is: do we also publish XUnnamedDatabaseRanges interface, or do we expose the property as 'any'? Or maybe there is a reason to not publish the property at all? Eike, could you please help?
Dear Vladimir Sokolinskiy, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Got this on sight again due to the new ping.. (In reply to Mike Kaganski from comment #3) > However, the > question is: do we also publish XUnnamedDatabaseRanges interface, or do we > expose the property as 'any'? Or maybe there is a reason to not publish the > property at all? Eike, could you please help? XUnnamedDatabaseRanges probably wasn't marked as published because we refrain from publishing internal interfaces (and those unnamed ranges are internal features) as that would freeze the interface to not be modifiable. Comment 0 Test1 using the property UnnamedDatabaseRanges is working (and displays True if there actually is such range). Adding it as an optional read-only property to the service might do, though I don't see much benefit. What is actually expected here?
Hello Eike! We often use the following function to determine the range of cells included in a worksheet's autofilter. We would like to legitimize it. :) ' Returns the DataBaseRange for the worksheet autofilter or Nothing. ' - oDoc document Calc. ' - oSheet document sheet. Function GetSheetFilterDBRange(oDoc, oSheet) as Object Dim i as Long GetSheetFilterDBRange=Nothing i=oSheet.RangeAddress.Sheet With oDoc.getPropertyValue("UnnamedDatabaseRanges") If .hasByTable(i) Then GetSheetFilterDBRange=.getByTable(i) End With End Function