| Revision | 9 (tree) |
|---|---|
| Time | 2018-12-21 18:35:01 |
| Author | kentamaken |
検索文字を全角化
| @@ -1,11 +1,11 @@ | ||
| 1 | 1 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 2 | 2 | <PropertyGroup> |
| 3 | 3 | <ProjectGuid>{820901DB-44AF-472B-9EA6-3ED43D388D71}</ProjectGuid> |
| 4 | - <ProjectVersion>18.4</ProjectVersion> | |
| 4 | + <ProjectVersion>18.5</ProjectVersion> | |
| 5 | 5 | <FrameworkType>VCL</FrameworkType> |
| 6 | 6 | <MainSource>textdefind.dpr</MainSource> |
| 7 | 7 | <Base>True</Base> |
| 8 | - <Config Condition="'$(Config)'==''">Release</Config> | |
| 8 | + <Config Condition="'$(Config)'==''">Debug</Config> | |
| 9 | 9 | <Platform Condition="'$(Platform)'==''">Win32</Platform> |
| 10 | 10 | <TargetedPlatforms>1</TargetedPlatforms> |
| 11 | 11 | <AppType>Application</AppType> |
| @@ -74,10 +74,10 @@ | ||
| 74 | 74 | <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''"> |
| 75 | 75 | <Debugger_RunParams>/IUV3</Debugger_RunParams> |
| 76 | 76 | <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> |
| 77 | - <DCC_DebugDCUs>false</DCC_DebugDCUs> | |
| 78 | - <AppEnableHighDPI>true</AppEnableHighDPI> | |
| 79 | 77 | <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes> |
| 80 | 78 | <DCC_RemoteDebug>false</DCC_RemoteDebug> |
| 79 | + <BT_BuildType>Debug</BT_BuildType> | |
| 80 | + <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode> | |
| 81 | 81 | </PropertyGroup> |
| 82 | 82 | <PropertyGroup Condition="'$(Cfg_2)'!=''"> |
| 83 | 83 | <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols> |
| @@ -86,10 +86,10 @@ | ||
| 86 | 86 | <DCC_DebugInformation>0</DCC_DebugInformation> |
| 87 | 87 | </PropertyGroup> |
| 88 | 88 | <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''"> |
| 89 | - <AppEnableHighDPI>true</AppEnableHighDPI> | |
| 90 | 89 | <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes> |
| 91 | 90 | <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> |
| 92 | 91 | <VerInfo_Locale>1033</VerInfo_Locale> |
| 92 | + <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode> | |
| 93 | 93 | </PropertyGroup> |
| 94 | 94 | <ItemGroup> |
| 95 | 95 | <DelphiCompile Include="$(MainSource)"> |
| @@ -120,16 +120,8 @@ | ||
| 120 | 120 | <Source Name="MainSource">textdefind.dpr</Source> |
| 121 | 121 | </Source> |
| 122 | 122 | <Excluded_Packages> |
| 123 | - <Excluded_Packages Name="$(BDSBIN)\dclDBXDrivers250.bpl">Embarcadero ドライバ コンポーネント</Excluded_Packages> | |
| 124 | - <Excluded_Packages Name="$(BDSBIN)\dclDBXDriversInt250.bpl">Embarcadero Intro ドライバ コンポーネント</Excluded_Packages> | |
| 125 | - <Excluded_Packages Name="$(BDSBIN)\dcldbx250.bpl">Embarcadero dbExpress コンポーネント</Excluded_Packages> | |
| 126 | - <Excluded_Packages Name="$(BDSBIN)\dcldbxcds250.bpl">Embarcadero SimpleDataSet コンポーネント (DBX)</Excluded_Packages> | |
| 127 | - <Excluded_Packages Name="$(BDSBIN)\DataExplorerDBXPlugin250.bpl">dbExpress とデータ エクスプローラのインテグレーション</Excluded_Packages> | |
| 128 | - <Excluded_Packages Name="$(BDSBIN)\DataExplorerDBXPluginInt250.bpl">dbExpress InterBase とデータ エクスプローラのインテグレーション</Excluded_Packages> | |
| 129 | - <Excluded_Packages Name="$(BDSBIN)\dclbindcompdbx250.bpl">LiveBinding 式コンポーネント DbExpress</Excluded_Packages> | |
| 130 | - <Excluded_Packages Name="$(BDSBIN)\dclnetdb250.bpl">Embarcadero インターネット DB コンポーネント</Excluded_Packages> | |
| 131 | - <Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 オートメーション サーバー ラッパー コンポーネントのサンプル</Excluded_Packages> | |
| 132 | - <Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP オートメーション サーバー ラッパー コンポーネントのサンプル</Excluded_Packages> | |
| 123 | + <Excluded_Packages Name="$(BDSBIN)\dcloffice2k260.bpl">Microsoft Office 2000 オートメーション サーバー ラッパー コンポーネントのサンプル</Excluded_Packages> | |
| 124 | + <Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP オートメーション サーバー ラッパー コンポーネントのサンプル</Excluded_Packages> | |
| 133 | 125 | </Excluded_Packages> |
| 134 | 126 | </Delphi.Personality> |
| 135 | 127 | <Deployment Version="3"> |
| @@ -148,7 +140,6 @@ | ||
| 148 | 140 | <Operation>1</Operation> |
| 149 | 141 | </Platform> |
| 150 | 142 | <Platform Name="Win32"> |
| 151 | - <RemoteDir>Contents\MacOS</RemoteDir> | |
| 152 | 143 | <Operation>0</Operation> |
| 153 | 144 | </Platform> |
| 154 | 145 | </DeployClass> |
| @@ -158,6 +149,12 @@ | ||
| 158 | 149 | <Operation>1</Operation> |
| 159 | 150 | </Platform> |
| 160 | 151 | </DeployClass> |
| 152 | + <DeployClass Name="AndroidFileProvider"> | |
| 153 | + <Platform Name="Android"> | |
| 154 | + <RemoteDir>res\xml</RemoteDir> | |
| 155 | + <Operation>1</Operation> | |
| 156 | + </Platform> | |
| 157 | + </DeployClass> | |
| 161 | 158 | <DeployClass Name="AndroidGDBServer"> |
| 162 | 159 | <Platform Name="Android"> |
| 163 | 160 | <RemoteDir>library\lib\armeabi-v7a</RemoteDir> |
| @@ -194,6 +191,12 @@ | ||
| 194 | 191 | <Operation>1</Operation> |
| 195 | 192 | </Platform> |
| 196 | 193 | </DeployClass> |
| 194 | + <DeployClass Name="AndroidSplashStylesV21"> | |
| 195 | + <Platform Name="Android"> | |
| 196 | + <RemoteDir>res\values-v21</RemoteDir> | |
| 197 | + <Operation>1</Operation> | |
| 198 | + </Platform> | |
| 199 | + </DeployClass> | |
| 197 | 200 | <DeployClass Name="Android_DefaultAppIcon"> |
| 198 | 201 | <Platform Name="Android"> |
| 199 | 202 | <RemoteDir>res\drawable</RemoteDir> |
| @@ -272,6 +275,11 @@ | ||
| 272 | 275 | <Operation>1</Operation> |
| 273 | 276 | <Extensions>.framework</Extensions> |
| 274 | 277 | </Platform> |
| 278 | + <Platform Name="OSX64"> | |
| 279 | + <RemoteDir>Contents\MacOS</RemoteDir> | |
| 280 | + <Operation>1</Operation> | |
| 281 | + <Extensions>.framework</Extensions> | |
| 282 | + </Platform> | |
| 275 | 283 | <Platform Name="Win32"> |
| 276 | 284 | <Operation>0</Operation> |
| 277 | 285 | </Platform> |
| @@ -294,6 +302,11 @@ | ||
| 294 | 302 | <Operation>1</Operation> |
| 295 | 303 | <Extensions>.dylib</Extensions> |
| 296 | 304 | </Platform> |
| 305 | + <Platform Name="OSX64"> | |
| 306 | + <RemoteDir>Contents\MacOS</RemoteDir> | |
| 307 | + <Operation>1</Operation> | |
| 308 | + <Extensions>.dylib</Extensions> | |
| 309 | + </Platform> | |
| 297 | 310 | <Platform Name="Win32"> |
| 298 | 311 | <Operation>0</Operation> |
| 299 | 312 | <Extensions>.dll;.bpl</Extensions> |
| @@ -317,6 +330,11 @@ | ||
| 317 | 330 | <Operation>1</Operation> |
| 318 | 331 | <Extensions>.dylib</Extensions> |
| 319 | 332 | </Platform> |
| 333 | + <Platform Name="OSX64"> | |
| 334 | + <RemoteDir>Contents\MacOS</RemoteDir> | |
| 335 | + <Operation>1</Operation> | |
| 336 | + <Extensions>.dylib</Extensions> | |
| 337 | + </Platform> | |
| 320 | 338 | <Platform Name="Win32"> |
| 321 | 339 | <Operation>0</Operation> |
| 322 | 340 | <Extensions>.bpl</Extensions> |
| @@ -339,6 +357,10 @@ | ||
| 339 | 357 | <RemoteDir>Contents\Resources\StartUp\</RemoteDir> |
| 340 | 358 | <Operation>0</Operation> |
| 341 | 359 | </Platform> |
| 360 | + <Platform Name="OSX64"> | |
| 361 | + <RemoteDir>Contents\Resources\StartUp\</RemoteDir> | |
| 362 | + <Operation>0</Operation> | |
| 363 | + </Platform> | |
| 342 | 364 | <Platform Name="Win32"> |
| 343 | 365 | <Operation>0</Operation> |
| 344 | 366 | </Platform> |
| @@ -475,11 +497,21 @@ | ||
| 475 | 497 | <Operation>1</Operation> |
| 476 | 498 | </Platform> |
| 477 | 499 | </DeployClass> |
| 500 | + <DeployClass Name="ProjectOSXDebug"> | |
| 501 | + <Platform Name="OSX64"> | |
| 502 | + <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir> | |
| 503 | + <Operation>1</Operation> | |
| 504 | + </Platform> | |
| 505 | + </DeployClass> | |
| 478 | 506 | <DeployClass Name="ProjectOSXEntitlements"> |
| 479 | 507 | <Platform Name="OSX32"> |
| 480 | 508 | <RemoteDir>..\</RemoteDir> |
| 481 | 509 | <Operation>1</Operation> |
| 482 | 510 | </Platform> |
| 511 | + <Platform Name="OSX64"> | |
| 512 | + <RemoteDir>..\</RemoteDir> | |
| 513 | + <Operation>1</Operation> | |
| 514 | + </Platform> | |
| 483 | 515 | </DeployClass> |
| 484 | 516 | <DeployClass Name="ProjectOSXInfoPList"> |
| 485 | 517 | <Platform Name="OSX32"> |
| @@ -486,6 +518,10 @@ | ||
| 486 | 518 | <RemoteDir>Contents</RemoteDir> |
| 487 | 519 | <Operation>1</Operation> |
| 488 | 520 | </Platform> |
| 521 | + <Platform Name="OSX64"> | |
| 522 | + <RemoteDir>Contents</RemoteDir> | |
| 523 | + <Operation>1</Operation> | |
| 524 | + </Platform> | |
| 489 | 525 | </DeployClass> |
| 490 | 526 | <DeployClass Name="ProjectOSXResource"> |
| 491 | 527 | <Platform Name="OSX32"> |
| @@ -492,6 +528,10 @@ | ||
| 492 | 528 | <RemoteDir>Contents\Resources</RemoteDir> |
| 493 | 529 | <Operation>1</Operation> |
| 494 | 530 | </Platform> |
| 531 | + <Platform Name="OSX64"> | |
| 532 | + <RemoteDir>Contents\Resources</RemoteDir> | |
| 533 | + <Operation>1</Operation> | |
| 534 | + </Platform> | |
| 495 | 535 | </DeployClass> |
| 496 | 536 | <DeployClass Required="true" Name="ProjectOutput"> |
| 497 | 537 | <Platform Name="Android"> |
| @@ -514,6 +554,10 @@ | ||
| 514 | 554 | <RemoteDir>Contents\MacOS</RemoteDir> |
| 515 | 555 | <Operation>1</Operation> |
| 516 | 556 | </Platform> |
| 557 | + <Platform Name="OSX64"> | |
| 558 | + <RemoteDir>Contents\MacOS</RemoteDir> | |
| 559 | + <Operation>1</Operation> | |
| 560 | + </Platform> | |
| 517 | 561 | <Platform Name="Win32"> |
| 518 | 562 | <Operation>0</Operation> |
| 519 | 563 | </Platform> |
| @@ -553,11 +597,13 @@ | ||
| 553 | 597 | <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/> |
| 554 | 598 | <ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/> |
| 555 | 599 | <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/> |
| 600 | + <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/> | |
| 556 | 601 | <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/> |
| 557 | 602 | </Deployment> |
| 558 | 603 | <Platforms> |
| 559 | 604 | <Platform value="Win32">True</Platform> |
| 560 | 605 | </Platforms> |
| 606 | + <ModelSupport>False</ModelSupport> | |
| 561 | 607 | </BorlandProject> |
| 562 | 608 | <ProjectFileVersion>12</ProjectFileVersion> |
| 563 | 609 | </ProjectExtensions> |
| @@ -173,7 +173,7 @@ | ||
| 173 | 173 | |
| 174 | 174 | implementation |
| 175 | 175 | |
| 176 | -uses strutils,IOUtils,masks,clipbrd,SHELLAPI,Vcl.FileCtrl; | |
| 176 | +uses strutils,IOUtils,masks,clipbrd,SHELLAPI,Vcl.FileCtrl,IdGlobal,IdURI; | |
| 177 | 177 | |
| 178 | 178 | var |
| 179 | 179 | Malloc :IMalloc; |
| @@ -212,9 +212,33 @@ | ||
| 212 | 212 | if IsPathDelimiter(Result,Length(Result)) then SetLength(Result,Length(Result)-1); |
| 213 | 213 | end; |
| 214 | 214 | |
| 215 | +function zenkaku(Str : String) : String;//半角全角 | |
| 216 | +var | |
| 217 | + Buf:array [0 .. 1023] of Char; | |
| 218 | +begin | |
| 219 | + LCMapString(GetUserDefaultLCID, LCMAP_FULLWIDTH, PChar(Str), Length(Str)+1, Buf, 1024); | |
| 220 | + Result:=String(Buf); | |
| 221 | +end; | |
| 215 | 222 | |
| 223 | +function hankaku(Str : String) : String;//全角半角 | |
| 224 | +var | |
| 225 | + Buf:array [0 .. 1023] of Char; | |
| 226 | +begin | |
| 227 | + LCMapString(GetUserDefaultLCID, LCMAP_HALFWIDTH, PChar(Str), Length(Str)+1, Buf, 1024); | |
| 228 | + Result:=String(Buf); | |
| 229 | +end; | |
| 230 | +function hira(Str : String) : String; //カタカナひらがな | |
| 231 | +var | |
| 232 | + Buf:array [0 .. 1023] of Char; | |
| 233 | +begin | |
| 234 | + LCMapString(GetUserDefaultLCID, LCMAP_FULLWIDTH, PChar(Str), Length(Str)+1, Buf, 1024); | |
| 235 | + Str:=String(Buf); | |
| 236 | + LCMapString(GetUserDefaultLCID, LCMAP_HIRAGANA, PChar(Str), Length(Str)+1, Buf, 1024); | |
| 237 | + Result:=String(Buf); | |
| 238 | +end; | |
| 216 | 239 | |
| 217 | 240 | |
| 241 | + | |
| 218 | 242 | procedure TTextDeFindForm.FormCreate(Sender:TObject); |
| 219 | 243 | begin |
| 220 | 244 | Ini:=TMemIniFile.Create(ChangeFileExt(Application.ExeName,'.ini')); |
| @@ -314,6 +338,16 @@ | ||
| 314 | 338 | var |
| 315 | 339 | s,ss:string; |
| 316 | 340 | ls,le,i,count:integer; |
| 341 | + function escape(url: String): String; | |
| 342 | + var | |
| 343 | + c,cc:Char; | |
| 344 | + begin | |
| 345 | + for c in ':/?#[]@!$&''()*+,;=' do begin | |
| 346 | + url:=url.Replace(c,format('%%%x',[(Ord(c))])); | |
| 347 | + end; | |
| 348 | + result:=url; | |
| 349 | + end; | |
| 350 | + | |
| 317 | 351 | begin |
| 318 | 352 | urlrun:=not urlrun; |
| 319 | 353 | // with GridFiles do begin |
| @@ -329,8 +363,8 @@ | ||
| 329 | 363 | Application.ProcessMessages; |
| 330 | 364 | s:=Url.text; |
| 331 | 365 | if s='' then continue; |
| 332 | - s:=s.Replace('%リスト名%',Name.text); | |
| 333 | - s:=s.Replace('%検索文字%',ss); | |
| 366 | + s:=s.Replace('%リスト名%',zenkaku(Name.text)); | |
| 367 | + s:=s.Replace('%検索文字%',zenkaku(ss)); | |
| 334 | 368 | ShellExecute(Handle,'open',Pchar(s),'','',1); |
| 335 | 369 | sleep(3000); |
| 336 | 370 | end; |
| @@ -626,32 +660,6 @@ | ||
| 626 | 660 | ls,le,i,j,count:integer; |
| 627 | 661 | pathtext:string; |
| 628 | 662 | |
| 629 | - | |
| 630 | - function zenkaku(Str : String) : String;//半角全角 | |
| 631 | - var | |
| 632 | - Buf:array [0 .. 1023] of Char; | |
| 633 | - begin | |
| 634 | - LCMapString(GetUserDefaultLCID, LCMAP_FULLWIDTH, PChar(Str), Length(Str)+1, Buf, 1024); | |
| 635 | - Result:=String(Buf); | |
| 636 | - end; | |
| 637 | - | |
| 638 | - function hankaku(Str : String) : String;//全角半角 | |
| 639 | - var | |
| 640 | - Buf:array [0 .. 1023] of Char; | |
| 641 | - begin | |
| 642 | - LCMapString(GetUserDefaultLCID, LCMAP_HALFWIDTH, PChar(Str), Length(Str)+1, Buf, 1024); | |
| 643 | - Result:=String(Buf); | |
| 644 | - end; | |
| 645 | - function hira(Str : String) : String; //カタカナひらがな | |
| 646 | - var | |
| 647 | - Buf:array [0 .. 1023] of Char; | |
| 648 | - begin | |
| 649 | - LCMapString(GetUserDefaultLCID, LCMAP_FULLWIDTH, PChar(Str), Length(Str)+1, Buf, 1024); | |
| 650 | - Str:=String(Buf); | |
| 651 | - LCMapString(GetUserDefaultLCID, LCMAP_HIRAGANA, PChar(Str), Length(Str)+1, Buf, 1024); | |
| 652 | - Result:=String(Buf); | |
| 653 | - end; | |
| 654 | - | |
| 655 | 663 | function findr(s:string):string; |
| 656 | 664 | begin |
| 657 | 665 | s:=s.ToUpper; |