Kaydet (Commit) c5f72002 authored tarafından Matteo Casalin's avatar Matteo Casalin

Remove misleading comment and simplify boundary check

Change-Id: I115bb1cd1be9c7c544508d1328248ebf3ad0d225
üst 8229d5af
...@@ -118,11 +118,9 @@ void DocxTableStyleExport::TableStyles(sal_Int32 nCountStylesToWrite) ...@@ -118,11 +118,9 @@ void DocxTableStyleExport::TableStyles(sal_Int32 nCountStylesToWrite)
} }
if (!aTableStyles.getLength()) if (!aTableStyles.getLength())
return; return;
// HACK
// Ms Office seems to have an internal limitation of 4091 styles if (nCountStylesToWrite > aTableStyles.getLength())
// and refuses to load .docx with more, even though the spec seems to allow that; nCountStylesToWrite = aTableStyles.getLength();
// so simply if there are more styles, don't export those
nCountStylesToWrite = (nCountStylesToWrite > aTableStyles.getLength()) ? aTableStyles.getLength(): nCountStylesToWrite;
for (sal_Int32 i = 0; i < nCountStylesToWrite; ++i) for (sal_Int32 i = 0; i < nCountStylesToWrite; ++i)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment