Bug Hunting Session
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)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2016-03-18 14:57 UTC by Björn Michaelsen
Modified: 2017-02-14 08:58 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

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:

 https://github.com/LibreOffice/core/blob/eef1d712c409878678b4ffbf33e44cac6d564cc2/sw/source/core/unocore/unostyle.cxx#L2529

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.