Beiträge von aozmez

    We are now using v5.40. It appears you have implemented a fix that eliminates the firing of the OnChange event when no change is made to the TWPPagePropDlg.

    But now, our system does not save changes that we do make to the TWPPagePropDlg, so that the document would use the updated settings upon future openings.

    I do not see any properties, methods , or events that we can access from our code that would force the saving of these updated settings. Do we have to modifiy the WPTools code to persist the dialog changes? I would rather not be making modifications to your code if it is not necessary.

    Julian,

    This output is from a TWPCustomRichText engine which got content by appending 3 sections by calling the AppendAsSection method with a TWPCustomRtfEdit editor as parameter. I used the SaveToFile method with WPTOOLS format to produce it. I don't understand why it does not contain any sections...

    Thanks

    Alright Julian, here is a file with three sections. The first section is setup to print portrait, the next two landscape. However, the last section appears as portrait as the first section when saved to RTF.

    Thanks,

    Hi,

    We are utilizing sections in our WPTools editors which may have different page layouts. That works fine when we directly print to a printer or PDF writer. However, when we save the document to a file in RTF format we have a problem: The page layout of the last section in the document is overwritten by the page layout of the first section. All sections upto the last one are just fine.

    We are still using WPTools version 5.30.1.

    Any help on this issue will be appreciated.

    Thanks,

    Julian,

    I found that procedure, but still couldn't locate the code you mentioned. I am providing below the code snippets from that procedure which has FixedHeight in the condition of if-then blocks:

    Code
    if (pos_in_par = 0) and (InputValue.InputValues.IsSuperOrSub) and (FixedHeight <= 0) then          begin            InputValue.InputValues.IsSuperOrSub := FALSE;            UpdateFontWidthHeight;            par._DefaultHeight := CachedAttr.OutputValues.Height;            par._DefaultBase := CachedAttr.OutputValues.Base;            InputValue.InputValues.IsSuperOrSub := TRUE;          end;
    Code
    if FixedHeight <= 0 then       begin          if par._DefaultHeight <= 0 then          begin            par._DefaultHeight := CachedAttr.OutputValues.Height;            par._DefaultBase := CachedAttr.OutputValues.Base;          end;       end else       begin          par._DefaultHeight := FixedHeight;          par._DefaultBase := FixedHeight;       end;
    Code
    if FixedHeight <= 0 then                begin                  par.CharPos[pos_in_par].Height := CachedAttr.OutputValues.Height;                  par.CharPos[pos_in_par].Base := CachedAttr.OutputValues.Base;                end;
    Code
    if FixedHeight > 0 then            begin              par.CharPos[pos_in_par].Height := FixedHeight;              par.CharPos[pos_in_par].Base := FixedHeight;            end;

    This might give you a clue.

    Thanks,

    Hi Julian,

    The following is a sample string content that we experienced the problem with:

    Code
    'Dear Robert Henson:'#$D#$A#$D#$A'You have successfully updated your profile form for our online employment system.  '#$D#$A#$D#$A'Thank you for your interest in employment with our agency. We are looking forward to receiving your applications.'#$D#$A#$D#$A#$D#$A'Sincerely,'#$D#$A'Human Resources'#$D#$A#$D#$A#$D#$A'**PLEASE NOTE: DO NOT REPLY TO THIS EMAIL!  IT IS AUTOMATICALLY GENERATED.**'

    We don't anticipate to upgrade WPTools at this point. Is there a way to fix it in our version (5.30.1).

    Thanks,

    Hi,

    We are using WPTools version 5.30.1 and we encounter some side effects with the TWPPagePropDlg. When we open the dialog, the OnChange event is fired on the Editor even if the user does not make any changes on the page layout (just hits the OK button, Cancel button, or the X button to close the dialog). This triggers our code to take some actions which should not happen if there is no change in the editor. Is there a way to fix this behavior?

    Thanks,

    Hi,

    We have a code similar to following for loading ANSI text into the editor:

    Code
    Editor.TextLoadFormat := 'ANSI';
    Editor.AsString := aString;

    Before we upgraded to WPTools version 5.30.1, everything worked fine. However, after the upgrade the editor stripped all the extra line breaks (any line breaks after the first) and displayed text without any empty lines.

    How can we fix this behavior?

    Thanks,

    Hi,

    We have a nested tables problem with WPTools. This happens only in some occasions. The editor content looks fine during Preview and when printed to paper. However, it appears distorted when saved as RTF and opened with Word.

    We are using WPTools version 5.30.1.

    Here is the problem RTF content:

    Code
    {\rtf1\ansi\deff0\uc1\ansicpg1252\deftab360{\fonttbl{\f0\fnil\fcharset1 Arial;}{\f1\fnil\fcharset1 Wingdings;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;}\landscape\wpprheadfoot1\paperw15840\paperh12240\margl720\margr720\margt432\margb432\headery254\footery254\endnhere\sectdefaultcl{\*\generator WPTools_5.202;}{{\header{\qc\plain\f0\fs24\b CITY OF TUCSON\par
    \plain\f0\fs24\b PERSONNEL ACTION REQUEST\par
    }}
    \tblstart1{\trowd\trleft0\trftsWidth3\trwWidth10773\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth10757\clvertalt\cellx10757\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\qc\plain\fs20\b I. GENERAL INFORMATION\cell\row}{\trowd\trleft0\trrh525\trftsWidth3\trwWidth10773\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth3182\clvertalt\cellx3182\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth10295\clvertalt\cellx13477\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\ql\pard\intbl\itap1\plain\plain\fs20 Employee Name\par
    \pard\intbl\itap1\plain
    \cell\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\ql\tblstart2{\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 Last\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 First\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 Middle\nestcell{\*\nesttableprops\trowd\trleft15\trftsWidth3\trwWidth8028\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth3224\clvertalt\cellx3239\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth3240\clvertalt\cellx6479\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth2026\clvertalt\cellx8505\nestrow}}{\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\nestcell{\*\nesttableprops\trowd\trleft15\trrh270\trftsWidth3\trwWidth8028\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth3224\clvertalt\cellx3239\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth3240\clvertalt\cellx6479\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth2026\clvertalt\cellx8505\nestrow}}\tblend2\cell\row}{\trowd\trleft0\trftsWidth3\trwWidth10773\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth10757\clvertalt\cellx10757\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\ql\tblstart2{\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20 Social Security #\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 Employee #\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 Effective Date\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20\nestcell{\*\nesttableprops\trowd\trleft0\trftsWidth3\trwWidth10743\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth2\clwWidth833\clvertalt\cellx1793\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth2\clwWidth833\clvertalt\cellx3586\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth2\clwWidth833\clvertalt\cellx5379\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth2\clwWidth833\clvertalt\cellx7172\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth2\clwWidth833\clvertalt\cellx8965\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth2\clwWidth835\clvertalt\cellx10760\nestrow}}\tblend2\cell\row}{\trowd\trleft0\trftsWidth3\trwWidth10773\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth10757\clvertalt\cellx10757\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\ql\tblstart2{\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20 Dept. Contact\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 Title\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 Phone #\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20\nestcell{\*\nesttableprops\trowd\trleft0\trftsWidth3\trwWidth10742\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth1519\clvertalt\cellx1519\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth2060\clvertalt\cellx3579\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth814\clvertalt\cellx4393\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth2765\clvertalt\cellx7158\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth1356\clvertalt\cellx8514\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth2230\clvertalt\cellx10744\nestrow}}\tblend2\cell\row}\tblend1\tblstart1{\trowd\trleft0\trftsWidth3\trwWidth10766\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth10750\clvertalt\cellx10750\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\qc\plain\fs20\ul II. ACTION REQUESTED\cell\row}{\trowd\trleft0\trrh270\trftsWidth3\trwWidth10766\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth10750\clvertalt\cellx10750\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\ql\tblstart2{\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20\b 1st Action\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20\b 3rd Action\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20\b Downtown Allowance\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20\b Disciplinary Action\nestcell{\*\nesttableprops\trowd\trleft0\trftsWidth2\trwWidth5000\clftsWidth2\clwWidth1250\clvertalt\cellx2688\clftsWidth2\clwWidth1250\clvertalt\cellx5376\clftsWidth2\clwWidth1250\clvertalt\cellx8064\clftsWidth2\clwWidth1250\clvertalt\cellx10750\nestrow}}{\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 DQ\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 Disqualified/Rejected\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 Disqualified/Rejected\nestcell{\*\nesttableprops\trowd\trleft0\trftsWidth2\trwWidth5000\clftsWidth2\clwWidth1250\clvertalt\cellx2688\clftsWidth2\clwWidth1250\clvertalt\cellx5376\clftsWidth2\clwWidth1250\clvertalt\cellx8064\clftsWidth2\clwWidth1250\clvertalt\cellx10750\nestrow}}{\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20\b 2nd Action\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20\b\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20\b\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20\b\nestcell{\*\nesttableprops\trowd\trleft0\trftsWidth2\trwWidth5000\clftsWidth2\clwWidth1250\clvertalt\cellx2688\clftsWidth2\clwWidth1250\clvertalt\cellx5376\clftsWidth2\clwWidth1250\clvertalt\cellx8064\clftsWidth2\clwWidth1250\clvertalt\cellx10750\nestrow}}{\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 Disqualified/Rejected\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20\nestcell\pard\intbl\itap2\li0\fi0\ri0\sb0\sa0\ql\plain\fs20\nestcell{\*\nesttableprops\trowd\trleft0\trftsWidth2\trwWidth5000\clftsWidth2\clwWidth1250\clvertalt\cellx2688\clftsWidth2\clwWidth1250\clvertalt\cellx5376\clftsWidth2\clwWidth1250\clvertalt\cellx8064\clftsWidth2\clwWidth1250\clvertalt\cellx10750\nestrow}}\tblend2\cell\row}{\trowd\trleft0\trftsWidth3\trwWidth10766\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth10750\clvertalt\cellx10750\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 BLAH BLAH BLAH\cell\row}{\trowd\trleft0\trftsWidth3\trwWidth10766\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth10750\clvertalt\cellx10750\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\ql\cell\row}\tblend1\pard\plain\par
    \pard\plain\par
    \pard\plain\par
    \tblstart1{\trowd\trleft0\trftsWidth3\trwWidth10760\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth1925\clvertalt\cellx1925\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth4056\clvertalt\cellx5981\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth3620\clvertalt\cellx9601\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth1160\clvertalt\cellx10761\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\ql\plain\fs20 Employee Name\cell\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 Last\cell\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 First\cell\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\qc\plain\fs20 Middle\cell\row}{\trowd\trleft0\trftsWidth3\trwWidth10760\clbrdrb\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth1925\clvertalt\cellx1925\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth4056\clvertalt\cellx5981\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth3620\clvertalt\cellx9601\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clftsWidth3\clwWidth1160\clvertalt\cellx10761\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\ql\cell\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\ql\cell\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\ql\cell\pard\intbl\itap1\li0\fi0\ri0\sb0\sa0\ql\cell\row}\tblend1\pard\plain\par
    }}

    Any help will be appreciated.

    Thanks,

    Hi,

    We upgraded from WPTools4 to 5 some time ago. We have code similar to the following which works fine for any editor content generated after the upgrade:

    Code
    procedure Dialog.Editor_ActivateHotStyle(Sender: TObject;
      par: TParagraph; posinpar: Integer);
    var
      lField: TWPTextObj;
    begin
      lField := Editor.FieldGetInpar(par, posinpar);
      ...
    end;

    However, when we load the editor with any content generated and saved before the upgrade, lField gets a Nil and the rest of the code does not work.

    Any suggestions?

    Thanks,

    Hi Julian,

    We are noticing odd behavior when pressing the Tab key in centered bullets in a WPTools editor. Replication steps:

    1) Click the icon to center justify text,
    2) Click the "Bullets" icon,
    3) Begin typing text,
    4) Press the Tab key,
    5) Note the text jumps to the left margin,
    6) Type another character, other than a Tab character,
    7) Note the text jumps back to centered text.

    Is this a bug, or is there a property we need to change on the editor?

    We are using WPTools version 5.30.1.

    Thanks,

    Hi,

    We are having a problem when we select and copy some text from a WPTools editor and paste it to an outside application like Word, Notepad, or anything else. If the copied text includes the last character of a paragraph, a linefeed is automatically appended at the end when pasted. I modified the ClipboardOptions to prevent this, but it didn't help. Is there a way to avoid the appended linefeed?

    We are using WPToools version 5.30.1.

    Thanks,

    Hi Julian,

    In addition to what was originally reported in this post, the same behavior can be observed for the code:

    Code
    Editor.InputTextField(wpoTime); Editor.ReformatAll();


    Likewise, the Underline attribute does not take effect for a code like:

    Code
    paragraph.InsertNewObject(index, wpobjTextObject, false, false).Name := WPTextFieldNames[wpoTime];


    or

    Code
    paragraph.InsertNewObject(index, wpobjTextObject, false, false).Name := WPTextFieldNames[wpoNumPages];


    I see this problem even though I have WPTools version 5.30.1.

    There is an odd interaction between bullet lists and set tabs in a WPTools editor. If a line has a tab set to one inch or less, and a bullet list is clicked on that line, the indent jumps to the tab setting instead of the standard bullet indent. This only occurs if the tab is set to one inch or less. The bullet list shouldn't care about any tab settings on the line, it should use its standard indent when bullets are clicked.

    Replication:
    1) In a new or existing document, place the cursor on a blank line
    2) Set a tab in the line at one inch or less
    3) Click the bullet icon
    4) Note the indent jumps to the tab setting

    We are currently using WPTools version 5.30.