Description: When one creates custom page styles in Calc and saves the file (ods/ots), all unused custom page styles are removed automatically. They seem not to be saved at all unless used. The first version of LibreOffice affected by this bug is 7.3.4.1 (it is not in the list of versions to pick from). I looked at the log regarding this release and it might have been caused either by ticket #108188 or #131190. Starting from version 7.3.4.1, templating with Calc is unusable. Steps to Reproduce: 1. Open a new Calc sheet 2. Add a custom page style 3. Keep the default page style chosen 4. Save the sheet as ods or ots (it does not matter) 5. Re-open the file Actual Results: All custom page styles are removed, except for the one currently used (if it is a custom one). Expected Results: All custom page styles should be saved. Reproducible: Always User Profile Reset: Yes Additional Info: Version: 7.3.4.1 (x64) / LibreOffice Community Build ID: 13668373362b52f6e3ebcaaecb031bd59a3ac66b CPU threads: 12; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win Locale: cs-CZ (cs_CZ); UI: cs-CZ Calc: CL
That could indeed be due to https://git.libreoffice.org/core/+/10c07e001da992cff4078c1cb1f49fdb16673ac3%5E%21 tdf#108188, tdf#131190 - Verify that the page style is actually used Andreas on Cc.
So a page style should be saved in any case, regardless if it is in use or not?
At this point one cannot even create an *.ots file with multiple page styles to be used in regular *.ods files. Once you save the template file, all page styles except for the stock and currently used one are gone. Basically templating cannot be really used with this patch implemented. In Writer all styles stay, meaning all page styles, whether you save an *.ott or *.odt. So I wonder whether Calc should work the same or have a different approach.
Confirmed in: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 98cf5157d69d9f1692be7f2cac958b1dfb387ca9 CPU threads: 6; OS: Windows 10.0 Build 19044; UI render: default; VCL: win Locale: de-DE (de_DE); UI: en-US Calc: CL threaded
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/8085a68be7604e7bd00004e0d9445be5e266ffbb tdf#154445 - Export all page styles even if they are not in use It will be available in 7.6.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.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/0aa559589035d496a5b80d0986b4cddf02437bab tdf#154445 - Export all page styles even if they are not in use It will be available in 7.5.3. 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.
*** Bug 156281 has been marked as a duplicate of this bug. ***