GikoSystem, GikoUtil, ImgList, Clipbrd, BoardGroup,
IdAntiFreezeBase, IdAntiFreeze, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdHTTP, ActnList, StdActns, IdIntercept,
- IdLogBase, IdLogDebug, IdException, DateUtils;
+ IdLogBase, IdLogDebug, IdException, DateUtils, MojuUtils, bmRegExp;
type
// TSetLayeredWindowAttributes = function(wnd: HWND; crKey: DWORD; bAlpha: BYTE; dwFlag: DWORD): Boolean; stdcall;
posTrip : Integer;
tripOrigin : string;
+ regexp : TAWKStr;
begin
if FThreadItem = nil then begin
No := '1';
Title := RepHtml(FThreadItem.Title);
end;
+ body := BodyEdit.Text;
+ if GikoSys.Setting.SpaceToNBSP then begin
+ body := CustomStringReplace( body, #09, ' ' );
+ body := CustomStringReplace( body, ' ', ' ' );
+ body := CustomStringReplace( body, ' ', ' ' );
+ regexp := TAWKStr.Create( nil );
+ try
+ regexp.RegExp := '^ ';
+ regexp.GSub( '\ ', body );
+ finally
+ regexp.Free;
+ end;
+ end;
+
Namae := RepHtml(NameComboBox.Text);
Mail := RepHtml(MailComboBox.Text);
- Body := RepHtml(BodyEdit.Text);
+ Body := RepHtml(body);
Body := StringReplace(Body, #13#10, '<br>', [rfReplaceAll]);
DateTime := FormatDateTime('yyyy/mm/dd(aaa) hh:nn', now);
SendTime: Integer;
Adjust: Integer;
Board: TBoard;
+ body : string;
+ regexp : TAWKStr;
begin
if FThreadItem = nil then
Board := FBoard
else
SendTime := GikoSys.DateTimeToInt(Board.LastGetTime);
end;
+
+ body := BodyEdit.Text;
+ if GikoSys.Setting.SpaceToNBSP then begin
+ body := CustomStringReplace( body, #09, ' ' );
+ body := CustomStringReplace( body, ' ', ' ' );
+ body := CustomStringReplace( body, ' ', ' ' );
+ regexp := TAWKStr.Create( nil );
+ try
+ regexp.RegExp := '^ ';
+ regexp.GSub( '\ ', body );
+ finally
+ regexp.Free;
+ end;
+ end;
+
SessionID := GikoSys.Dolib.SessionID;
if SessionID <> '' then
s := 'sid=' + HttpEncode(SessionID) + '&'
s := s + 'subject=&'
+ 'FROM=' + HttpEncode(NameComboBox.Text) + '&'
+ 'mail=' + HttpEncode(MailComboBox.Text) + '&'
- + 'MESSAGE=' + HttpEncode(BodyEdit.Text) + '&'
+ + 'MESSAGE=' + HttpEncode(body) + '&'
+ 'bbs=' + Board.BBSID + '&'
+ 'time=' + IntToStr(SendTime) + '&';
if FThreadItem = nil then begin
Board: TBoard;
rc: Integer;
state : TGikoDownloadState;
+ body : string;
+ regexp : TAWKStr;
begin
if FWork then
Exit;
end;
if Board.IsBoardPlugInAvailable then begin
+ body := BodyEdit.Text;
+ if GikoSys.Setting.SpaceToNBSP then begin
+ body := CustomStringReplace( body, #09, ' ' );
+ body := CustomStringReplace( body, ' ', ' ' );
+ body := CustomStringReplace( body, ' ', ' ' );
+ regexp := TAWKStr.Create( nil );
+ try
+ regexp.RegExp := '^ ';
+ regexp.GSub( '\ ', body );
+ finally
+ regexp.Free;
+ end;
+ end;
+
if FThreadItem = nil then begin
// \83X\83\8c\97§\82Ä
state := TGikoDownloadState( Board.BoardPlugIn.CreateThread(
- DWORD( Board ), TitleEdit.Text, NameComboBox.Text, MailComboBox.Text, BodyEdit.Text ) );
+ DWORD( Board ), TitleEdit.Text, NameComboBox.Text, MailComboBox.Text, body ) );
if state = gdsComplete then begin
GikoForm.PlaySound('ResEnd');
end else begin
// \83\8c\83X
state := TGikoDownloadState( FThreadItem.BoardPlugIn.WriteThread(
- DWORD( FThreadItem ), NameComboBox.Text, MailComboBox.Text, BodyEdit.Text ) );
+ DWORD( FThreadItem ), NameComboBox.Text, MailComboBox.Text, body ) );
if state = gdsComplete then begin
GikoForm.PlaySound('ResEnd');
//\83\8c\83X\83A\83\93\83J\81[\82ð\83N\83\8a\83b\83N\82µ\82Ä\83W\83\83\83\93\83v\82·\82é\82©
FResAnchorJamp: Boolean;
+ // \83G\83f\83B\83^
+ FSpaceToNBSP : Boolean;
+
function GetMainCoolSet(Index: Integer): TCoolSet;
function GetBoardCoolSet(Index: Integer): TCoolSet;
function GetBrowserCoolSet(Index: Integer): TCoolSet;
property OddColor: TColor read FOddColor write FOddColor;
property UseSamba: Boolean read FUseSamba write FUseSamba;
property ResAnchorJamp: Boolean read FResAnchorJamp write FResAnchorJamp;
- end;
+
+ // \83G\83f\83B\83^
+ property SpaceToNBSP : Boolean read FSpaceToNBSP write FSpaceToNBSP;
+end;
FShowNGLinesNum := ini.ReadBool('Abon','ShowNGLines',false);
FAddResAnchor := ini.ReadBool('Abon','AddResAnchor',false);
FDeleteSyria := ini.ReadBool('Abon','DeleteSyria',false);
+
+ // \83G\83f\83B\83^
+ FSpaceToNBSP := ini.ReadBool( 'Editor', 'SpaceToNBSP', True );
finally
ini.Free;
end;
ini.WriteBool('Abon','Popup',FPopUpAbon);
ini.WriteBool('Abon','ShowNGLines',FShowNGLinesNum);
ini.WriteBool('Abon','AddResAnchor',FAddResAnchor);
- ini.WriteBool('Abon','DeleteSyria',FDeleteSyria);
+ ini.WriteBool('Abon','DeleteSyria',FDeleteSyria);
+
+ // \83G\83f\83B\83^
+ ini.WriteBool( 'Editor', 'SpaceToNBSP', FSpaceToNBSP );
ini.UpdateFile;
finally