Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


This patch is for fixing the crash and generate an "inadmissible data type"
dialog.

Thorsten, I checked again and it seems to me that the code now "follows"
CharUnderlineColor everywhere.
But I have no idea about the other name CharUnderlineColor is mapped to.



On Thu, Jul 10, 2014 at 2:20 PM, Miklos Vajna <vmiklos@collabora.co.uk>
wrote:

Hi Matteo,

I noticed a crash that's probably related to your (otherwise great :-)
), text background editeng work -- care to take a look?

1) Start Writer, enable form controls toolbar (View -> Toolbars -> Form
controls)
2) Click the more controls button, pick the Date Field
3) Draw a rectangle in the body text area to create an instance
4) Try to query its background color via UNO: Tools -> Macros ->
Organize macros -> Basic -> Edit, then type:

print ThisComponent.DrawPage(0).CharBackColor

and Press F5 to run, it crashes with:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3b4d9fc in SfxItemSet::Get (this=0x1dfaa00, nWhich=0,
bSrchInParent=true) at
/home/vmiklos/git/libreoffice/master/svl/source/items/itemset.cxx:1002
1002        DBG_ASSERT( !pItem->ISA(SfxSetItem) ||
(gdb) bt 10
#0  0x00007ffff3b4d9fc in SfxItemSet::Get (this=0x1dfaa00, nWhich=0,
bSrchInParent=true) at
/home/vmiklos/git/libreoffice/master/svl/source/items/itemset.cxx:1002
#1  0x00007fffd2cc9de6 in SdrObject::GetMergedItem (this=0x226b140,
nWhich=0) at
/home/vmiklos/git/libreoffice/master/svx/source/svdraw/svdobj.cxx:2113
#2  0x00007fffd2ea856e in SvxShape::_getPropertyValue (this=0x21c1f38,
PropertyName="CharBackColor") at
/home/vmiklos/git/libreoffice/master/svx/source/unodraw/unoshape.cxx:1797

nWhich = 0 sounds buggy, maybe you advertise your new UNO property in a
generic property map, but in case of form controls, the underlying
implementation doesn't handle that?

Thanks,

Miklos

From 92ff792570b1b56c5fa135d3635f169f084cd887 Mon Sep 17 00:00:00 2001
From: matteocam <matteo.campanelli@gmail.com>
Date: Fri, 11 Jul 2014 14:58:55 +0200
Subject: [PATCH] CharBackColor advertised in unoshap2.cxx
To: libreoffice@lists.freedesktop.org

Change-Id: I0111ab571e23e37f5986301366836623476ed214
---
 svx/source/unodraw/unoshap2.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index b732526..1f45dbe 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -680,7 +680,7 @@ SvxShapeControlPropertyMapping[] =
     { RTL_CONSTASCII_STRINGPARAM("CharKerning"), RTL_CONSTASCII_STRINGPARAM("FontKerning") },
     { RTL_CONSTASCII_STRINGPARAM("CharWordMode"), RTL_CONSTASCII_STRINGPARAM("FontWordLineMode" ) 
},
     { RTL_CONSTASCII_STRINGPARAM(UNO_NAME_EDIT_CHAR_COLOR),   
RTL_CONSTASCII_STRINGPARAM("TextColor") },
-   // { RTL_CONSTASCII_STRINGPARAM("CharBackColor") }, // FIXME(matteocam)
+    { RTL_CONSTASCII_STRINGPARAM("CharBackColor"),   RTL_CONSTASCII_STRINGPARAM("CharBackColor") },
     { RTL_CONSTASCII_STRINGPARAM("CharRelief"),   RTL_CONSTASCII_STRINGPARAM("FontRelief") },
     { RTL_CONSTASCII_STRINGPARAM("CharUnderlineColor"),   
RTL_CONSTASCII_STRINGPARAM("TextLineColor") },
     { RTL_CONSTASCII_STRINGPARAM(UNO_NAME_EDIT_PARA_ADJUST), RTL_CONSTASCII_STRINGPARAM("Align") },
-- 
1.8.3.2


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.