<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - FILEOPEN: Optimum row height should be recalculated with "style:use-optimal-row-height='true'""
href="https://bugs.documentfoundation.org/show_bug.cgi?id=62268#c20">Comment # 20</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - FILEOPEN: Optimum row height should be recalculated with "style:use-optimal-row-height='true'""
href="https://bugs.documentfoundation.org/show_bug.cgi?id=62268">bug 62268</a>
from <span class="vcard"><a class="email" href="mailto:furun@arcor.de" title="Tester <furun@arcor.de>"> <span class="fn">Tester</span></a>
</span></b>
<pre>Bug is still present in 5.3.2.2.
i tray quick if i can see something in the code. here the result.
i am not a Libre coder, i look in the code the first time and only for minutes.
i have not check the code logic! please a coder should check the conclusion
here carefully, and forgive me in case i searched at the wrong place...
if this is not the bug source, i will try to search a little more, to see how
far i come... but please check the argument here first.
this is the search trace so far
from libreoffice-5.3.2.2.tar.xz
--> use-optimal-row-height
TOKEN( "use-optimal-column-width", XML_USE_OPTIMAL_COLUMN_WIDTH ),
TOKEN( "use-optimal-row-height", XML_USE_OPTIMAL_ROW_HEIGHT ),
--> XML_USE_OPTIMAL_ROW_HEIGHT
!!! This code shows a anomaly. The name mapping seams to be wrong.
libreoffice-5.3.2.2\xmloff\source\table\XMLTableExport.cxx
"XML_MIN_ROW_HEIGHT" is mapped as "OptimalHeight"
"XML_USE_OPTIMAL_ROW_HEIGHT" is mapped as "OptimalWidth"
const XMLPropertyMapEntry* getRowPropertiesMap()
{
static const XMLPropertyMapEntry aXMLRowProperties[] =
{
RMAP( "Height", XML_NAMESPACE_STYLE, XML_ROW_HEIGHT,
XML_TYPE_MEASURE, 0 ),
RMAP( "OptimalHeight", XML_NAMESPACE_STYLE, XML_MIN_ROW_HEIGHT,
XML_TYPE_MEASURE, 0 ),
RMAP( "OptimalWidth", XML_NAMESPACE_STYLE,
XML_USE_OPTIMAL_ROW_HEIGHT, XML_TYPE_BOOL, 0 ),
MAP_END
};
return &aXMLRowProperties[0];
}
--> getRowPropertiesMap
libreoffice-5.3.2.2\xmloff\source\table\XMLTableExport.cxx
mxRowExportPropertySetMapper = new SvXMLExportPropertyMapper( new
XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef.get(), true ) );
libreoffice-5.3.2.2\xmloff\source\table\XMLTableImport.cxx
rtl::Reference < XMLPropertySetMapper > xRowMapper( new
XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef.get(), false ) );
--> Some More... XML_USE_OPTIMAL_ROW_HEIGHT
Here it seams to be correct
"XML_USE_OPTIMAL_ROW_HEIGHT" is mapped as "OptimalHeight"
const XMLPropertyMapEntry aXMLScRowStylesImportProperties[] =
{
// #i57867# Include background color
(CellBackColor/IsCellBackgroundTransparent) for import only.
// Import and export should use the same map, with
MID_FLAG_NO_PROPERTY_EXPORT for the background entries,
// but this doesn't work at the moment because SvXMLImportPropertyMapper
compares MID_FLAG_NO_PROPERTY to 0.
// If this is changed (not for 2.0.x), a single map can be used again.
MAP( "CellBackColor", XML_NAMESPACE_FO, XML_BACKGROUND_COLOR,
XML_TYPE_PROP_TABLE_ROW|XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE,
0 ),
MAP( "Height", XML_NAMESPACE_STYLE, XML_ROW_HEIGHT,
XML_TYPE_PROP_TABLE_ROW|XML_TYPE_MEASURE, CTF_SC_ROWHEIGHT),
MAP( "IsCellBackgroundTransparent", XML_NAMESPACE_FO, XML_BACKGROUND_COLOR,
XML_TYPE_PROP_TABLE_ROW|XML_TYPE_ISTRANSPARENT|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE,
0 ),
MAP( "IsManualPageBreak", XML_NAMESPACE_FO, XML_BREAK_BEFORE,
XML_TYPE_PROP_TABLE_ROW|XML_SC_TYPE_BREAKBEFORE, CTF_SC_ROWBREAKBEFORE),
MAP( "OptimalHeight", XML_NAMESPACE_STYLE, XML_USE_OPTIMAL_ROW_HEIGHT,
XML_TYPE_PROP_TABLE_ROW|XML_TYPE_BOOL, CTF_SC_ROWOPTIMALHEIGHT),
MAP_END()
};
const XMLPropertyMapEntry aXMLScRowStylesProperties[] =
{
MAP( "Height", XML_NAMESPACE_STYLE, XML_ROW_HEIGHT,
XML_TYPE_PROP_TABLE_ROW|XML_TYPE_MEASURE, CTF_SC_ROWHEIGHT),
MAP( "IsManualPageBreak", XML_NAMESPACE_FO, XML_BREAK_BEFORE,
XML_TYPE_PROP_TABLE_ROW|XML_SC_TYPE_BREAKBEFORE, CTF_SC_ROWBREAKBEFORE),
MAP( "OptimalHeight", XML_NAMESPACE_STYLE, XML_USE_OPTIMAL_ROW_HEIGHT,
XML_TYPE_PROP_TABLE_ROW|XML_TYPE_BOOL, CTF_SC_ROWOPTIMALHEIGHT),
MAP_END()
};
const XMLPropertyMapEntry aXMLScFromXLSRowStylesProperties[] =
{
MAP( "Height", XML_NAMESPACE_STYLE, XML_ROW_HEIGHT,
XML_TYPE_PROP_TABLE_ROW|XML_TYPE_MEASURE, CTF_SC_ROWHEIGHT),
MAP( "IsManualPageBreak", XML_NAMESPACE_FO, XML_BREAK_BEFORE,
XML_TYPE_PROP_TABLE_ROW|XML_SC_TYPE_BREAKBEFORE, CTF_SC_ROWBREAKBEFORE),
MAP( "OptimalHeight", XML_NAMESPACE_STYLE, XML_USE_OPTIMAL_ROW_HEIGHT,
XML_TYPE_PROP_TABLE_ROW|XML_TYPE_BOOL_FALSE, CTF_SC_ROWOPTIMALHEIGHT),
MAP_END()
};
Here it seams to be correct
"XML_USE_OPTIMAL_COLUMN_WIDTH" is mapped as "OptimalWidth"
const XMLPropertyMapEntry* getColumnPropertiesMap()
{
static const XMLPropertyMapEntry aXMLColumnProperties[] =
{
CMAP( "Width", XML_NAMESPACE_STYLE, XML_COLUMN_WIDTH,
XML_TYPE_MEASURE, 0 ),
CMAP( "OptimalWidth", XML_NAMESPACE_STYLE,
XML_USE_OPTIMAL_COLUMN_WIDTH, XML_TYPE_BOOL, 0 ),
MAP_END
};
return &aXMLColumnProperties[0];
}
thanks</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>