Format Options

<< Click to Display Table of Contents >>

Navigation:  Programming > User Interface > Modify the look and feel of the editor >

Format Options

WPTools uses the properties

 

FormatOptions

FormatOptionsEx

and FormatOptionsEx2

 

to change, how the text is formatted. If changed for one RTF-Engine all other RTF-Engines which use the same RTFData object will be affected, too.

 

You need to call ReformatAll(true,true) to update the text.

 

TWPFormatOptions = set of (

  // This flags change the display of tables

   wpDisableAutosizeTables, // - we suggest to enable this flag. Otherwise tables importaed form RTF can look wrong

   wpNoMinimumCellPadding, // Do not add a one pixel padding to all cells

   wpfDontBreakTables, // do not break tables at all. Also see wpKeepTogetherAdjacentTables in FormatOptionsEx

   wpfDontBreakTableRows, // do not break table rows

   wpDontClipCells, // do not clip cells if absolute row heights are used

   wpfIgnoreMinimumRowheight, // Do not use the row height property

   wpfIgnoreMaximumRowheight, // Do not use the row maximum height property

  wpTableRowIndicator, // must be combined with EditOptionsEx : AllowCursorInRow

  // -------------------------------------------------------------------------

  // This flags conmtrol the layout

   wpfIgnoreKeep, // The WPAT_ParKeep property is ignored (do not break par)

   wpfIgnoreKeepN, // The WPAT_ParKeepN property is ignored (do not break adjacent par). Also see FormatOptionEx  wpfDontIgnoreKeepNInTable

   wpfKeepOutlineWithNext, // Text which uses the WPAT_ParIsOutline property is kept with the next text

   wpfAvoidWidows, // Avoid single lines on old page

   wpfAvoidOrphans, // Avoid single lines on new page

   wpfCenterOnPageVert, // Center text on all pages

   wpfHangingIndentWithTab, // V5: first tab in paragraph jumps to indent first (this always happens if no tabs are set!)

  // the left indent will be handled as first tabstop not only if the tab is the

  // first character but also if the text before the tab fits into the first indent. (="Word" like)

   wpfDontTabToIndentFirst, // V5: The oposite to wpfHangingIndentWithTab

   wpJustifySoftLinebreaks, // Justify \n

   wpJustifyHardLinebreaks, // Justify \r

   wpUseHyphenation, // Use soft hyphens in the text (inserted with Ctrl + '-')

   wpFooterMinimumDistanceToText, // The footer texts start after the body text (WPTools 4 and <5.14 did it so)

  // -------------------------------------------------------------------------

  // This flags control the display of codes.

  // IMPORTANT: You need to call ReformatAll(true,true) after you have changed this flags:

   wpShowBookmarkCodes, // display bookmark tags

   wpShowHyperlinkCodes, // display hyperlinks tags

   wpShowSPANCodes, // display SPAN tags

   wpShowInvisibleText, // show text which would be otherwise hidden

  // -------------------------------------------------------------------------

  // Experimental flags

   wpfHideEmptyParElements, // reserved: Can be used when editing HTML files with nested DIV elements

   wpfXMLOutlineMode, // Debugging mode: Show paragraph tree similar XML in IE

   wpWriteRightToLeft, // activate RTL writing

   wpAutoWriteRightToLeft, // reserved for future

  // -------------------------------------------------------------------------

  // Troubleshooting flags

   wpUseAbsoluteFontHeight, // Calculate the height of the text using the font size alone

   wpfAlwaysFormatWithScreenRes, // .. even if RM600 is defined in WPCtrMemo

   wpDisableSpeedReformat, // format only the current page and the next page on regular input

   wpDontAdjustFloatingImagePosition // do not adjust image position to keep it on the page

  // note that it is not possible to click on an image which is outside of the page!

   );

 

 TWPFormatOptionsEx = set of (

  // -------------------------------------------------------------------------

   wpDontAddExternalFontLeading, // When measuring the font height don't add the

  // value defined for a font: Metrics.tmExternalLeading. This improves compatibility to WPTools 4

  // Alternatively set global variable WPDoNotAddExternalFontLeading := TRUE to

  // activate this mode for all editors!

  // -------------------------------------------------------------------------

  // Layout flags

   wpfKeepTablesInTextArea, // If defined avoid that table go into right margin

   wpKeepTogetherAlwaysNewPage, // if wpfDontBreakTables is used a table which is too large will also create a new page

   wpKeepTogetherAdjacentTables, // When tables are not seperated by paragraphs they are

  // kept together as well (requires also wpfDontBreakTables!)

   wpDontUseTablePadding, // Do not read the padding of cells from table

   wpfIgnoreVertAlignment, // Switches off the vertical alignment

   wpfKeepNUsesParImages, // When using KeepN paragraph aligned images will be

  // kept on same page as their anchor paragraph. (changes the value calculated by TParagraph.Height!)

  // Note: Images which use the wrap mode wpwrUseWholeLine will always be checked!

   wpDontIgnoreSpacebeforeOnTopOfPage, // switch "Word" mode off

  // -------------------------------------------------------------------------

  // Limit the use of inherited attributes

   wpDontUseRowPadding, // Do not read the padding of cells from table row

   wpDontUseBorderPadding, // Do not use the border width to calculate padding

   wpDontInheritCellAttr, // Dont inherit cell attributes from table row and table

   wpDontUseSPANStyles, // Do not use the stalyes of hyperlink and SPAN objects . Speeds up reformat a lot!

  // -------------------------------------------------------------------------

  // modify the way the editor works

   wpAlwaysContinueBorderAfterCR, // Paragraph.SplitAt (= ENTER key in editor) will also copy border attributes to

  // the new paragraph if the split position is at the end

   wpNoDefaultParStyles, // Disable default paragraph style handling (So you can handle

  // it yoursel in the OnInitializePar event)!

   wpfAutoRestartSimpleNumbering, // Reset a numbering level after a line which was not numbered.

   wpfNestedNumberingInTableCells, // Each table cell uses its individual NumberLevel

  // this only affects numbering which does not use outlines

   wpfSimpleNumberingPriorityOverOutlines, // When outlines (numberlevel>0) are used within simple

  // numbered paragraphs the simple numbering will continue AFTER the outlines. (Default: Restart at 1)

   wpfNoAutoDecTabInTable, // Do not automatically align to only decimal tabstop in table cells

   wpfNoTableHeaderRows, // Ignore table header

   wpfNoTableFooterRows, // Ignore table footer

   wpfDisableJustifiedText, // Format Justified text as if it was Left Aligned

  // -------------------------------------------------------------------------

  // Experimental Flags

   wpAllow_WPAT_NoWrap, // If active don't wrap par marked with WPAT_NoWrap

   wpfMixRTLText, // If a paragraph which uses the paprRightToLeft attribute the

  // western text is not reordered

   wpfStoreWPObjectsInRTFDataProps, // unless this flag is used the TWPObjects will

  // be stored in the TWPRTFDataCollection and not in the TWPRTFDataProps

  // -------------------------------------------------------------------------

  // Activate User CharStyle

   wpCharEffectIsUserAttribute, // Currently the character attribute WPAT_CharEffect is not used.

  // It can be used to store custom information. If the flag wpCharEffectIsUserAttribute is used

  // the RTF engine will ignore this property.

   wpfIgnoreTrailingEmptyParAtFooter, // Empty paragraphs are ignored at´the footer end

   wpfDontHideParAboveNestedTable, // allow empty paragraph before a nested table

   wpfDontCombineDifferentStylePars, // DeleteParagraphEnd will not merge paragraphs which use different paragraph styles

  // Can be selectively set for certain paragarphs using WPAT_ParFlags flag WPFLG_NOJOINPARA

   wpfNumberingControlledByStyles, // Only supported by WPT format!

   wpfSectionsRestartFootnoteNumbers,

   wpfDontIgnoreKeepNInTable, // unless this flag is set the KeepN in table rows is always ignored

   wpfDontIgnoreEmptyHeader// If header is empty we still reserve space for it

   );

 

//:: New HTML formatting routine implemnted in unit WPTRTEFormatB

 TWPWebPageFormat = set of (

      wpFormatAsWebpage,

      wpNoMinimumWidth,

       wpNoMinimumHeight); // + formats

 

 

  TWPFormatOptionsEx2 = set of (

    wpfSectionsRestartPageNumbers

   // All pages restart their numbering

   , wpfUseKerning

   // initialize the text and also adjust kerning according to font information (causes more evenly spaced characters with Times font)

   , wpfCodeObjectAsXMLTags // visualize the code objects as XML tags

   , wpDisableBalancedColumns // dont use the new column balancing

   , wpfCodeObjectCheckParStyles

   // code objects format the contained text according to styles with the same name

   , wpfNewKeepNSupport

   // (Default =on) better Keep N Support which also handles tables. Disables the old KeepN support

   , wpfHideParagraphWithHiddenText

   // (Default =off) If a paragraph contains nothing but hidden text, it will be also hidden

   // this is also true, if it is empty and its default attribute contains the text attribute  "afsHidden"

   , wpAllowFullWidthImagesInHeaderFooter

   // allow images in header and footer which are as wide as the page

   // even if they are not full page size

   , wpMarginMirrorBookPrint // makes V6 work like V5

   , wpIgnboreAllTabsInPageMargin

   // WPTools 6, 7 and 8 will ignore all tabs after the right margin (like V5 does)

   , wpAlwaysContinueShadingAfterCR // changes behaviour of the Carriage-Return key

   // If true, an enter at first position will not remove the shading of the inserted paragrapg

   // also see wpAlwaysContinueBorderAfterCR in FormatOptionsEx

   , wpUseDIVTree // Requires WPTools 7 PRO or Premium

   , wpfShowProtectionObjects // Show objects which mark protected text <p>

   , wpfLabelAllowSoftPagebreak  // Like wpfIgnoreSoftPagebreaks but only when label layout was used

   , wpfIgnoreHardPagebreaks // Ignore hard page breaks

   , wpfIgnoreSoftPagebreaks // text which does not fit on a page will be ignored

   , wpfRestartOutlineNumbersAfterRegularText // For compatibility with HTML browsers

   , wpfIgnorePropertyNumberStart // Ignore the WPAT_NumberStart

   , wpfSectionsWithPagesizeStartNewPage // For compatibility to MS Word, auto new page if Page Size CHANGES

   , wpfDontHideOverflowLinesInTableCells // If a table cell has a fixed height, don't hide the overflow

   // features for tables

   , wpfHideFirstTableHeaderRowAtStart // Hide the first header row at the start of the table

   , wpfHideSecondTableHeaderRowAtStart      // To implement overflow sum rows in reports all header

   // rows except for the first are NOT printed at the start of the table

   , wpfHideTableFooterRowAtEnd // Do not print the footer table rows at the end of the table

   , wpfUseFloatingImagesOfHiddenParagraph // If a paragraph is hidden print its embedded images anyway.

   , wpfAlwaysGenerateParBetweenTables // There must always be an empty paragraph between tables. Generate a hidden paragraph

   , wpfAlignTableFootersAtBottom  // If there is a page breaks in a table, align the footer row to the end of the current page (for invoices)

   , wpfNoSecondTableHeaderRows  // do not show a second table header

   , wpfIgnoreSoftParagraphbreaks // do not wrap paragraph text (new in WPTools 8)

 

   , wpfKeepFootnotesOnPage // alway create a new page if a footnote does not fit to current page

   , wpHideReporterBands // Show wpreporter bands only as fine line

   , wpfAutomaticHeaderOnEachPage // Create a header of Range  wpraOnGivenPageNr on each page

   , wpfAutomaticFooterOnEachPage // Create a footer of Range  wpraOnGivenPageNr on each page

 );