[Libreoffice-bugs] [Bug 95697] Assertion editeng/source/items/frmitems.cxx:478: unknown MemberId

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Dec 29 10:33:57 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=95697

--- Comment #9 from Buovjaga <ilmari.lauhakangas at libreoffice.org> ---
Whoops, my previous comment was for the function that was supposed to be used
as reference for a fix. Here is the one Oliver meant:

git blame -L 321,378 editeng/source/items/frmitems.cxx

e65c0fe553a9d editeng/source/items/frmitems.cxx (Thorsten Behrens    
2011-03-12 02:42:58 +0100 321) bool SvxLRSpaceItem::QueryValue( uno::Any& rVal,
sal_uInt8 nMemberId ) const
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 322) {
45169c93d57ac editeng/source/items/frmitems.cxx (Norbert Thiebaud    
2010-10-04 15:23:49 +0100 323)     bool bRet = true;
3edb4611b2314 editeng/source/items/frmitems.cxx (Noel Grandin        
2014-04-09 11:03:42 +0200 324)     bool bConvert =
0!=(nMemberId&CONVERT_TWIPS);
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 325)     nMemberId &= ~CONVERT_TWIPS;
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 326)     switch( nMemberId )
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 327)     {
65d891652fd5d editeng/source/items/frmitems.cxx (Albert Thuswaldner  
2011-02-16 16:34:02 -0500 328)         // now all signed
723467bd88a50 editeng/source/items/frmitems.cxx (Szymon Kłos         
2016-05-31 16:57:13 +0200 329)         case 0:
723467bd88a50 editeng/source/items/frmitems.cxx (Szymon Kłos         
2016-05-31 16:57:13 +0200 330)         {
723467bd88a50 editeng/source/items/frmitems.cxx (Szymon Kłos         
2016-05-31 16:57:13 +0200 331)            
css::frame::status::LeftRightMarginScale aLRSpace;
54a8e708b4822 editeng/source/items/frmitems.cxx (Stephan Bergmann    
2018-01-12 20:25:09 +0100 332)             aLRSpace.Left =
static_cast<sal_Int32>(bConvert ? convertTwipToMm100(nLeftMargin) :
nLeftMargin);
54a8e708b4822 editeng/source/items/frmitems.cxx (Stephan Bergmann    
2018-01-12 20:25:09 +0100 333)             aLRSpace.TextLeft =
static_cast<sal_Int32>(bConvert ? convertTwipToMm100(nTxtLeft) : nTxtLeft);
54a8e708b4822 editeng/source/items/frmitems.cxx (Stephan Bergmann    
2018-01-12 20:25:09 +0100 334)             aLRSpace.Right =
static_cast<sal_Int32>(bConvert ? convertTwipToMm100(nRightMargin) :
nRightMargin);
54a8e708b4822 editeng/source/items/frmitems.cxx (Stephan Bergmann    
2018-01-12 20:25:09 +0100 335)             aLRSpace.ScaleLeft =
static_cast<sal_Int16>(nPropLeftMargin);
54a8e708b4822 editeng/source/items/frmitems.cxx (Stephan Bergmann    
2018-01-12 20:25:09 +0100 336)             aLRSpace.ScaleRight =
static_cast<sal_Int16>(nPropRightMargin);
3eba9b6819941 editeng/source/items/frmitems.cxx (Noel Grandin        
2020-02-05 15:22:43 +0200 337)             aLRSpace.FirstLine =
static_cast<sal_Int32>(bConvert ? convertTwipToMm100(nFirstLineOffset) :
nFirstLineOffset);
fa2389e3f5cbb editeng/source/items/frmitems.cxx (Noel Grandin        
2020-02-05 15:21:41 +0200 338)             aLRSpace.ScaleFirstLine =
static_cast<sal_Int16>(nPropFirstLineOffset);
723467bd88a50 editeng/source/items/frmitems.cxx (Szymon Kłos         
2016-05-31 16:57:13 +0200 339)             aLRSpace.AutoFirstLine =
IsAutoFirst();
723467bd88a50 editeng/source/items/frmitems.cxx (Szymon Kłos         
2016-05-31 16:57:13 +0200 340)             rVal <<= aLRSpace;
723467bd88a50 editeng/source/items/frmitems.cxx (Szymon Kłos         
2016-05-31 16:57:13 +0200 341)             break;
723467bd88a50 editeng/source/items/frmitems.cxx (Szymon Kłos         
2016-05-31 16:57:13 +0200 342)         }
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 343)         case MID_L_MARGIN:
54a8e708b4822 editeng/source/items/frmitems.cxx (Stephan Bergmann    
2018-01-12 20:25:09 +0100 344)             rVal <<=
static_cast<sal_Int32>(bConvert ? convertTwipToMm100(nLeftMargin) :
nLeftMargin);
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 345)             break;
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 346) 
1bbb78e822803 svx/source/items/frmitems.cxx     (Oliver Specht       
2000-11-01 15:09:10 +0000 347)         case MID_TXT_LMARGIN :
54a8e708b4822 editeng/source/items/frmitems.cxx (Stephan Bergmann    
2018-01-12 20:25:09 +0100 348)             rVal <<=
static_cast<sal_Int32>(bConvert ? convertTwipToMm100(nTxtLeft) : nTxtLeft);
1bbb78e822803 svx/source/items/frmitems.cxx     (Oliver Specht       
2000-11-01 15:09:10 +0000 349)         break;
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 350)         case MID_R_MARGIN:
54a8e708b4822 editeng/source/items/frmitems.cxx (Stephan Bergmann    
2018-01-12 20:25:09 +0100 351)             rVal <<=
static_cast<sal_Int32>(bConvert ? convertTwipToMm100(nRightMargin) :
nRightMargin);
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 352)             break;
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 353)         case MID_L_REL_MARGIN:
54a8e708b4822 editeng/source/items/frmitems.cxx (Stephan Bergmann    
2018-01-12 20:25:09 +0100 354)             rVal <<=
static_cast<sal_Int16>(nPropLeftMargin);
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 355)         break;
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 356)         case MID_R_REL_MARGIN:
54a8e708b4822 editeng/source/items/frmitems.cxx (Stephan Bergmann    
2018-01-12 20:25:09 +0100 357)             rVal <<=
static_cast<sal_Int16>(nPropRightMargin);
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 358)         break;
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 359) 
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 360)         case MID_FIRST_LINE_INDENT:
3eba9b6819941 editeng/source/items/frmitems.cxx (Noel Grandin        
2020-02-05 15:22:43 +0200 361)             rVal <<=
static_cast<sal_Int32>(bConvert ? convertTwipToMm100(nFirstLineOffset) :
nFirstLineOffset);
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 362)             break;
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 363) 
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 364)         case MID_FIRST_LINE_REL_INDENT:
fa2389e3f5cbb editeng/source/items/frmitems.cxx (Noel Grandin        
2020-02-05 15:21:41 +0200 365)             rVal <<=
static_cast<sal_Int16>(nPropFirstLineOffset);
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 366)             break;
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 367) 
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 368)         case MID_FIRST_AUTO:
572e9cde744e2 editeng/source/items/frmitems.cxx (Noel Grandin        
2017-04-05 12:26:29 +0200 369)             rVal <<= IsAutoFirst();
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 370)             break;
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 371) 
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 372)         default:
45169c93d57ac editeng/source/items/frmitems.cxx (Norbert Thiebaud    
2010-10-04 15:23:49 +0100 373)             bRet = false;
3585cfe5f55f3 editeng/source/items/frmitems.cxx (Michael Stahl       
2016-04-22 18:12:03 +0200 374)             //
SfxDispatchController_Impl::StateChanged calls this with hardcoded 0 triggering
this; there used to be a MID_LR_MARGIN 0 but what type would it have?
65c053ca1a5a8 editeng/source/items/frmitems.cxx (Thomas Arnhold      
2011-03-01 19:07:44 +0100 375)             OSL_FAIL("unknown MemberId");
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 376)     }
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 377)     return bRet;
fd069bee7e57a svx/source/items/frmitems.cxx     (Jens-Heiner Rechtien
2000-09-18 16:07:07 +0000 378) }

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201229/a789ef85/attachment.htm>


More information about the Libreoffice-bugs mailing list