|
| 1 | +/************************************************************************************************* |
| 2 | + Required Notice: Copyright (C) EPPlus Software AB. |
| 3 | + This software is licensed under PolyForm Noncommercial License 1.0.0 |
| 4 | + and may only be used for noncommercial purposes |
| 5 | + https://polyformproject.org/licenses/noncommercial/1.0.0/ |
| 6 | +
|
| 7 | + A commercial license to use this software can be purchased at https://epplussoftware.com |
| 8 | + ************************************************************************************************* |
| 9 | + Date Author Change |
| 10 | + ************************************************************************************************* |
| 11 | + 1/4/2021 EPPlus Software AB Added wrapped text autofit mode |
| 12 | + *************************************************************************************************/ |
| 13 | +namespace OfficeOpenXml.Interfaces.Drawing.Text |
| 14 | +{ |
| 15 | + /// <summary> |
| 16 | + /// Determines how cells with WrapText enabled are measured when calculating |
| 17 | + /// column width in AutoFitColumns. |
| 18 | + /// </summary> |
| 19 | + public enum eWrappedTextAutofitMode |
| 20 | + { |
| 21 | + /// <summary> |
| 22 | + /// Cells with WrapText enabled are ignored when calculating column width. |
| 23 | + /// This is the default and matches the behaviour of earlier versions. |
| 24 | + /// </summary> |
| 25 | + Skip = 0, |
| 26 | + /// <summary> |
| 27 | + /// The entire cell text is measured as a single line, ignoring wrapping. |
| 28 | + /// </summary> |
| 29 | + FullText = 1, |
| 30 | + /// <summary> |
| 31 | + /// The text is split on explicit line breaks (CR, LF, CRLF) and the width |
| 32 | + /// of the widest resulting line determines the cell's contribution to the |
| 33 | + /// column width. |
| 34 | + /// </summary> |
| 35 | + SplitNewLine = 2, |
| 36 | + /// <summary> |
| 37 | + /// The text is split on whitespace (space, tab, and line breaks) and on |
| 38 | + /// hyphen characters (U+002D hyphen-minus and U+2010 hyphen). The width of |
| 39 | + /// the widest resulting segment determines the cell's contribution to the |
| 40 | + /// column width. Hyphens are visible and their width is included in the |
| 41 | + /// segment they terminate; whitespace is not. Note: this yields the minimum |
| 42 | + /// column width at which no single word overflows, and is not a simulation |
| 43 | + /// of Excel's line wrapping. |
| 44 | + /// </summary> |
| 45 | + SplitWord = 3 |
| 46 | + } |
| 47 | +} |
0 commit comments