This change stops the creation of empty Configurations2/accelerator dirs on new documents that do not have anything that needs to be stored there. Previously, LibreOffice would always create this directory. Whenever an XStorage is opened readwrite on a path, it will immediately create that path. LibreOffice was opening all of these paths readwrite. So, the solution is to always open these paths as readonly, and then when we need to write data to them we close them and re-open them as readwrite. If we never need to write data to a path, then it won't be created. This patch specifically stops the creation of subdirectories that were being created by DocumentAcceleratorConfiguration. Other patches in the relation chain handle paths created by UIConfigurationManager and ImageManager. Test coverage was added inb9054fed37$ CPPUNIT_TEST_NAME="Test testTdf60700_accelerators" make CppunitTest_sw_odfexport As far as I can tell, there is no way to actually attach custom accelerators to a document at this time using the UI, so I did not do any manual testing for this change. (The closest thing to storing accelerators in the document is the work from65d2c9ca4d, but the macros don't yet continue to work when you save the document in ODF) With this change, a fresh document looks like this: $ unzip -l Untitled\ 1.odt Archive: Untitled 1.odt Length Date Time Name --------- ---------- ----- ---- 39 2025-05-17 15:57 mimetype 0 2025-05-17 15:57 Configurations2/ 12645 2025-05-17 15:57 styles.xml 899 2025-05-17 15:57 manifest.rdf 3563 2025-05-17 15:57 content.xml 866 2025-05-17 15:57 meta.xml 14745 2025-05-17 15:57 settings.xml 318 2025-05-17 15:57 Thumbnails/thumbnail.png 1061 2025-05-17 15:57 META-INF/manifest.xml --------- ------- 34136 9 files Change-Id: I5e032d55e94114333ea7778afcc3df0fefe0a30f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185451 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
UNO Framework
Toolbars, menus, UNO stuff, including accelerators and interaction, etc.