diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2023-03-22 22:10:21 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2023-03-30 22:43:09 +0000 |
commit | cb3b8b0aaa9d53bd4b4a74d22b87d46e77835206 (patch) | |
tree | 97cc0b9482d1027e58685718741691bd2fc14e30 /svx | |
parent | 4ceb287c6d42940adf887f36c4f88abae44e0022 (diff) |
sc drawstyles: Add a default style and make use of it
The style is empty, similar to the default cell style,
thus fall backs to the pool defaults for everything. This
ensures compatibility with existing documents, despite the
fact that the default style is applied to all shapes upon
import. In addition, people who will ignore styles and just
continue to use DF, will have their spreadsheets look the
same in older versions that don't support styles. For this
reason I also opted to not set a dedicated style for images
and OLE objects via
SdrModel::SetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj,
unlike Impress/Draw, and continue setting the "no fill and
no line" override as DF.
Change-Id: I11554044a1aaf386dc6c4acdbab798fc5a231adc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149359
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/properties/graphicproperties.cxx | 1 | ||||
-rw-r--r-- | svx/source/sdr/properties/oleproperties.cxx | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/svx/source/sdr/properties/graphicproperties.cxx b/svx/source/sdr/properties/graphicproperties.cxx index be9b87800a0e..85509f79c6a7 100644 --- a/svx/source/sdr/properties/graphicproperties.cxx +++ b/svx/source/sdr/properties/graphicproperties.cxx @@ -49,6 +49,7 @@ namespace sdr::properties } else { + RectangleProperties::applyDefaultStyleSheetFromSdrModel(); SetMergedItem(XFillStyleItem(com::sun::star::drawing::FillStyle_NONE)); SetMergedItem(XLineStyleItem(com::sun::star::drawing::LineStyle_NONE)); } diff --git a/svx/source/sdr/properties/oleproperties.cxx b/svx/source/sdr/properties/oleproperties.cxx index 587ff1d3f880..da599428c97b 100644 --- a/svx/source/sdr/properties/oleproperties.cxx +++ b/svx/source/sdr/properties/oleproperties.cxx @@ -36,6 +36,7 @@ namespace sdr::properties } else { + RectangleProperties::applyDefaultStyleSheetFromSdrModel(); SetMergedItem(XFillStyleItem(com::sun::star::drawing::FillStyle_NONE)); SetMergedItem(XLineStyleItem(com::sun::star::drawing::LineStyle_NONE)); } |