mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 17:17:52 +02:00
ide: use RemoveAmpersands
This commit is contained in:
parent
85dd5c0743
commit
5661bb7120
@ -713,9 +713,7 @@ resourcestring
|
||||
lisReplacementFuncs = 'Replacement functions';
|
||||
lisFilesHaveRightEncoding = '*** All found files already have the right encoding ***';
|
||||
lisEncodingNumberOfFilesFailed = 'Number of files failed to convert: %d';
|
||||
|
||||
//
|
||||
lisnoname = 'noname';
|
||||
lisnoname = 'noname'; // default unit name, must be a valid identifier
|
||||
lisTheDestinationDirectoryDoesNotExist = 'The destination directory%s"%s" does not exist.';
|
||||
lisRenameFile = 'Rename file?';
|
||||
lisThisLooksLikeAPascalFileItIsRecommendedToUseLowerC = 'This looks like a Pascal file.'
|
||||
|
@ -4930,7 +4930,7 @@ begin
|
||||
OldUnitName:='';
|
||||
//debugln('ShowSaveFileAsDialog sourceunitname=',OldUnitName);
|
||||
if sfskipReferences in Flags then
|
||||
SaveAsFilename:=LowerCase(StringReplace(OldUnitName,'&','',[rfReplaceAll]))
|
||||
SaveAsFilename:=LowerCase(RemoveAmpersands(OldUnitName))
|
||||
else
|
||||
SaveAsFilename:=OldUnitName;
|
||||
if SaveAsFilename='' then
|
||||
@ -8221,17 +8221,17 @@ begin
|
||||
if Assigned(Project1.MainUnitInfo) then begin
|
||||
NewProgramName := Project1.MainUnitInfo.ReadUnitNameFromSource(false);
|
||||
ANewPath := ExtractFilePath(Project1.MainUnitInfo.Filename);
|
||||
AFileName := StringReplace(NewProgramName,'&','',[rfReplaceAll]);
|
||||
AFileName := RemoveAmpersands(NewProgramName);
|
||||
end;
|
||||
if AFilename = '' then begin
|
||||
NewProgramName := ExtractFileName(Project1.ProjectInfoFile);
|
||||
ANewPath := ExtractFilePath(Project1.ProjectInfoFile);
|
||||
AFilename := StringReplace(NewProgramName,'&','',[rfReplaceAll]);
|
||||
AFilename := RemoveAmpersands(NewProgramName);
|
||||
end;
|
||||
if AFilename = '' then begin
|
||||
NewProgramName := Trim(Project1.GetTitle);
|
||||
ANewPath := Project1.Directory;
|
||||
AFilename := StringReplace(NewProgramName,'&','',[rfReplaceAll]);
|
||||
AFilename := RemoveAmpersands(NewProgramName);
|
||||
end;
|
||||
if AFilename = '' then begin
|
||||
NewProgramName := 'Project1';
|
||||
|
Loading…
Reference in New Issue
Block a user