include/svx/svx3ditems.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ff197bf1a9a8a6cd73fe0e1cc03c4424d9e1dc2e
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sun Feb 25 11:18:14 2024 +0100
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Sun Feb 25 13:34:04 2024 +0100

    tdf#159874: Inspection of 3D object in Development Tools crashes LibreOffice
    
    See bt:
    https://bugs.documentfoundation.org/attachment.cgi?id=192752
    
    2 remarks here:
    - there are TextureKind.idl and TextureKind2.idl but first one is indicated 
as deprecated since 2000!
    (see 4f9e6d84feb36ab3072dafbab0ba4ae46d264f9b #80594# added a new 
TextureKind2 enum because of missing value in TextureKind)
    => should we only use TextureKind2.idl now?
    
    - in svx/source/sdr/primitive3d/sdrattributecreator3d.cxx, we can read this 
comment:
    // TextureKind: 1 == Base3DTextureLuminance, 2 == Base3DTextureIntensity, 3 
== Base3DTextureColor
    See 
https://opengrok.libreoffice.org/xref/core/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx?r=05416682#88
    but TextureKind2.idl defines LUMINANCE, INTENSITY and COLOR with no number,
    so I expect they take by default values 0, 1 and 2
    See 
https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/drawing/TextureKind2.idl?r=5687eba4
    
    BTW, same pb with this line:
    // TextureMode: 1 == Base3DTextureReplace, 2 == Base3DTextureModulate, 3 == 
Base3DTextureBlend
    TextureMode.idl just indicates: REPLACE, MODULATE and BLEND
    
    => should we change comments and related code?
    
    Change-Id: Ia514890c131ab9f6fb239c7451335503c9b0e3cb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163903
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/include/svx/svx3ditems.hxx b/include/svx/svx3ditems.hxx
index 7cb5eae6e399..a7da4b1e861f 100644
--- a/include/svx/svx3ditems.hxx
+++ b/include/svx/svx3ditems.hxx
@@ -119,7 +119,7 @@ inline SfxUInt16Item 
makeSvx3DMaterialSpecularIntensityItem(sal_uInt16 nVal) {
 
 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureKindItem final : public 
SfxUInt16Item {
 public:
-    Svx3DTextureKindItem(sal_uInt16 nVal = 3);
+    Svx3DTextureKindItem(sal_uInt16 nVal = 0);
 
     // use drawing::TextureKind
     SVX_DLLPRIVATE virtual  bool QueryValue( css::uno::Any& rVal, sal_uInt8 
nMemberId = 0 ) const override;

Reply via email to