Bug 98749 - Move hardcoded/duplicated PageDesc defaults from UNO wrappers to writer core
Summary: Move hardcoded/duplicated PageDesc defaults from UNO wrappers to writer core
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:7.2.0
Keywords: difficultyInteresting, easyHack, skillCpp, topicCleanup
Depends on:
Reported: 2016-03-18 14:57 UTC by Björn Michaelsen
Modified: 2021-03-29 20:38 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2016-03-18 14:57:07 UTC
In SwXStyle::setAllPropertiesToDefault() at:


there are quite some defaults for PageDescs hardcoded in the UNO wrapper layer (including e.g. the 2 cm borders etc.). A cleaner approach would be to have the core objects have a functions that sets up default on initialisation or when reset and have the UNO wrapper just trigger that instead of duplicating hardcoded defaults.
Comment 1 Panos Korovesis 2021-03-23 15:10:50 UTC
I can give it a try
Comment 2 Panos Korovesis 2021-03-25 18:21:21 UTC
I submited a pathc to gerrit with a function (https://gerrit.libreoffice.org/c/core/+/113104) for some hardcoded defaults.
Feedback about whether the patch is relative with the bug objective is greatly appreciated.
Comment 3 Commit Notification 2021-03-29 20:38:31 UTC
Panos committed a patch related to this issue.
It has been pushed to "master":


tdf#98749 Move initialization of page defaults to writer core

It will be available in 7.2.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:

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