Currently just sections can have a conditional to show or hide them. But these just work on full span lines. As a workaround our WollMux extensions uses bookmarks to to show or hide freeform text snippets inside of paragraphs. Obviously this way we have to manipulate each document per record set to get the correct output and can't rely on LO mail merge. This enhancement proposes to add the same type of condition to bookmarks, so mail merge can expand or collapse them based on DB values. This will also need a new UI to edit the condition.
Sounds good -> NEW.
Created attachment 137327 [details] Example glade bookmarks dialog
Bernhard Widl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7a586a9c6bf28088c72f163d724d1cb3259e7920 tdf#101856 create bookmarks w/ new hidden/cond attrs, save as odt It will be available in 6.2.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.
Serge Krot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=412b1f8d2b03687a13784e3055c5b0f2507dfef2 tdf#101856 Backport parsing of bookmark properties It will be available in 6.2.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.
Serge Krot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8c2545153572b32ecba202e52aade84b188dac73 tdf#101856 odt: write/read new bookmark attributes: unit test It will be available in 6.2.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.
Serge Krot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=97de51107824b5b3452e5343672c838da4b04b84 tdf#101856: Use bookmark attributes at load It will be available in 6.2.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.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=bf4d4a9cad6664bd5772618e31e998942caef77e tdf#101856 sw: hidden bookmark portions in SwTextFormatter::NewTextPortion() It will be available in 6.2.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.
A polite ping to Jan-Marek Glogowski: Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing? Thanks
Serge Krot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3559daee24ea1224d3d40e6a86b10cf37e18443f tdf#101856 Handle properties of nested bookmarks It will be available in 6.2.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.
Should this enhancement be added to the 6.2 release notes ? -> https://wiki.documentfoundation.org/ReleaseNotes/6.2
(In reply to Xisco Faulí from comment #10) > Should this enhancement be added to the 6.2 release notes ? -> > https://wiki.documentfoundation.org/ReleaseNotes/6.2 I think so..
Bump comment 8
I just opened this bug for someone else in Munich at that time. I wasn't either involved in the development, nor in the review and verification, if there was any... So I can't even tell if it's working as requested. I'll ping them, but AFAIK WollMux in the end didn't even use that feature. Now I'm just wondering, what exactly is missing from the description of the feature request to update the documentation.
the feature sort-of works in the intended use-case, but there are still open issues with it: * bookmark flags are lost when the bookmark is copy-pasted * hiding doesn't work when the bookmark spans across multiple paragraphs
Created attachment 156126 [details] Screencast trying to use hidden bookmarks (In reply to Jan-Marek Glogowski from comment #13) > I just opened this bug for someone else in Munich at that time. I wasn't > either involved in the development, nor in the review and verification, if > there was any... So I can't even tell if it's working as requested. I'll > ping them, but AFAIK WollMux in the end didn't even use that feature. I was told that WollMux actually makes use of the feature. (In reply to Michael Stahl (CIB) from comment #14) > the feature sort-of works in the intended use-case, but there are still open > issues with it: > * bookmark flags are lost when the bookmark is copy-pasted > * hiding doesn't work when the bookmark spans across multiple paragraphs Quickly looking at the feature from a user perspective, I didn't understand at once how that's supposed to work exactly, e.g. when the content of the bookmarks is actually hidden. I found that the following steps do in the end lead to the content being hidden (s.a. attached screencast), but that seems a bit weird: 1) open new Writer doc 2) type text "foo bar baz" 3) select "bar", insert hidden bookmark 4) go to end of line, type "Enter" to insert a line break 5) press backspace to remove the line break again After step 5, the text "bar" is actually hidden, which was a bit confusing for me, but maybe I'm just missing something... Other idea for a potential improvement: make changing the "Hidden" flag and condition possible from the "Edit bookmark" dialog (doesn't seem to be possible right now) Maybe showing the UI elements only in experimental mode as suggested in https://gerrit.libreoffice.org/#/c/83509/ may be a way to go until it's been improved and made less confusing? (WollMux uses the functionality via UNO API, so shouldn't be affected by that.)
Bookmarks to hide parts of the text? Would never do nor expect this. Simply use a special character style with font effect attribute hidden.
(In reply to Michael Weghorn from comment #15) > After step 5, the text "bar" is actually hidden, which was a bit confusing > for me, but maybe I'm just missing something... mst mentioned on IRC that "some invalidation of the layout was also missing when the flags change". Actually, saving and reopening the file also works.
(In reply to Michael Stahl (CIB) from comment #14) > there are still open issues with it: > * bookmark flags are lost when the bookmark is copy-pasted Is this bug #56117?
(In reply to sdc.blanco from comment #18) > (In reply to Michael Stahl (CIB) from comment #14) > > there are still open issues with it: > > * bookmark flags are lost when the bookmark is copy-pasted > Is this bug #56117? no, that must be a different problem, since the properties that aren't copied didn't exist yet when it was filed
Created attachment 158984 [details] template with bookmarks that have a condition
Created attachment 158985 [details] mail merge data source for trac30220_bookmarkVisibility
WollMux doesn't use the feature yet. But there's a commit (https://github.com/sikelerd/WollMux/commit/634a7772787857bf3b1534fb35d042393bce0dad) to change that. It looks like LibreOffice mail merge doesn't respect the conditional. Steps to reproduce: 1) open trac30220_bookmarkVisibility.odt 2) connect it with trac30220_datasource.ods 3) Start mail merge as a single document. In the document produced by mail merge all the conditions are removed and all bookmarks are visible.
Serge Krot committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3a371da71ab738a99e81e75c736fa5e384ebd9d3 tdf#101856 correct Insert bookmark dialog It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Serge Krot committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/ce8087a61350f1f51cf0a75a1a5698183b3e17db tdf#101856 correct Insert bookmark dialog It will be available in 6.4.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Serge Krot committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/dadba793c107cbf2ccadfbd7b41b6187ff06d4b8 tdf#101856 evaluate condition to expand / collapse bookmarks It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Serge Krot committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/280c56db840b5822d0b4560f02fcd1b8ced74f90 tdf#101856 correct Insert bookmark dialog It will be available in 7.0.0.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Serge Krot committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/4b3f9c6a06650532df34af6388fa62d659eabd90 tdf#101856 evaluate condition to expand / collapse bookmarks It will be available in 6.4.6. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Serge Krot committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/b5e2b9d11d0a32a10709049835cc00b23542d869 tdf#101856 copy missing bookmark properties It will be available in 6.4.6. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Serge Krot committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ddd9b1bccd87c6913ba4576da8af2d59daf106e9 tdf#101856 copy missing bookmark properties It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.