Skip to content

Commit

Permalink
◇バグ修正
Browse files Browse the repository at this point in the history
・「英数字記号を半角、カタカナを全角に変換」で文字の先頭が「'」のセルに実行すると「'」が消えてしまう不具合を修正。
◇機能改善
・「スネーク区切リ→アッパーキャメル区切リ」等でのスネーク区切りの判定を改善。
  • Loading branch information
RelaxTools committed Aug 28, 2017
1 parent e61d0fb commit 9f30d0a
Show file tree
Hide file tree
Showing 47 changed files with 263 additions and 59 deletions.
Binary file modified RelaxTools.xlam
Binary file not shown.
Binary file modified Source/RelaxTools.xlsm
Binary file not shown.
3 changes: 3 additions & 0 deletions Source/customUI/customUI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
<button id="replaceEx" image="searchShape" getLabel="getLabel" getSupertip="getSupertip" getDescription="getDescription" onAction="ribbonOnAction" />
<menuSeparator id="searchSep02" title="指定フォルダ以下のExcelファイルをGrepする"/>
<button id="excelGrep" image="grep32" getLabel="getLabel" getSupertip="getSupertip" getDescription="getDescription" onAction="ribbonOnAction" />
<!--
<button id="excelGrepMulti" image="grep32" getLabel="getLabel" getSupertip="getSupertip" getDescription="getDescription" onAction="ribbonOnAction" />
-->
</menu>
</splitButton>
<splitButton id="printSplit" getEnabled="getRibbonEnabled">
Expand Down
8 changes: 6 additions & 2 deletions Source/src/Class/SelectionCheckCellColor.cls
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can

On Error GoTo e

r.Value = "&H" & Right("00000000" & Hex(r.Interior.Color), 8)

If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & "&H" & Right("00000000" & Hex(r.Interior.Color), 8)
Else
r.Value = "&H" & Right("00000000" & Hex(r.Interior.Color), 8)
End If

Exit Sub
e:
Call rlxErrMsg(err)
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionDelete1Char.cls
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
If Not (NotHoldFormat) And VarType(r.Value) = vbString Then
r.Characters(1, 1).Delete
Else
r.Value = Mid$(r.Value, 2)
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & Mid$(r.Value, 2)
Else
r.Value = Mid$(r.Value, 2)
End If
End If
End If

Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionDelete1RightChar.cls
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
If Not (NotHoldFormat) And VarType(r.Value) = vbString Then
r.Characters(r.Characters.count, 1).Delete
Else
r.Value = Mid$(r.Value, 1, Len(r.Value) - 1)
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & Mid$(r.Value, 1, Len(r.Value) - 1)
Else
r.Value = Mid$(r.Value, 1, Len(r.Value) - 1)
End If
End If
End If

Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionFormatSql.cls
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
strBuf = rlxFormatSql(r.Value)

If Len(strBuf) <> 0 Then
r.Value = strBuf
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & strBuf
Else
r.Value = strBuf
End If
End If

Exit Sub
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionFormatXML.cls
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
strBuf = FormatXML(r.Value)

If Len(strBuf) <> 0 Then
r.Value = strBuf
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & strBuf
Else
r.Value = strBuf
End If
End If

Exit Sub
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionInsertBottom.cls
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
If Not (NotHoldFormat) And VarType(r.Value) = vbString Then
r.Characters(r.Characters.count + 1, 0).Insert mstrIns
Else
r.Value = r.Value & mstrIns
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & r.Value & mstrIns
Else
r.Value = r.Value & mstrIns
End If
End If

Exit Sub
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionInsertHead.cls
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
If Not (NotHoldFormat) And VarType(r.Value) = vbString Then
r.Characters(1, 0).Insert mstrIns
Else
r.Value = mstrIns & r.Value
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & mstrIns & r.Value
Else
r.Value = mstrIns & r.Value
End If
End If

Exit Sub
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionInsertMiddle.cls
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
f = Mid$(r.Value, 1, lngPos - 1)
b = Mid$(r.Value, lngPos)

r.Value = f & mstrIns & b
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & f & mstrIns & b
Else
r.Value = f & mstrIns & b
End If
End If

Exit Sub
Expand Down
8 changes: 6 additions & 2 deletions Source/src/Class/SelectionInsertStrInCell.cls
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,12 @@ Private Sub SFWork_SelectionMain(r As Range, Cancel As Boolean)

s = r.Value

r.Value = InsertStr

If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & InsertStr
Else
r.Value = InsertStr
End If

Exit Sub
e:
Call rlxErrMsg(err)
Expand Down
7 changes: 6 additions & 1 deletion Source/src/Class/SelectionLineFeedDelete.cls
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
Exit For
End Select
Next
r.Value = s
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & s
Else
r.Value = s
End If

End If

Exit Sub
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionLineFeedInsert.cls
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
Select Case Right$(s, 1)
Case vbCr, vbLf, vbCrLf
Case Else
r.Value = s & vbLf
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & s & vbLf
Else
r.Value = s & vbLf
End If
End Select
End If

Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionRemoveCrLf.cls
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
s = Replace(s, vbCr, "")
s = Replace(s, vbLf, "")

r.Value = s
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & s
Else
r.Value = s
End If
End If

Exit Sub
Expand Down
8 changes: 6 additions & 2 deletions Source/src/Class/SelectionRemoveExt.cls
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can

On Error GoTo e

r.Value = rlxGetFullpathFromExt(r.Value)

If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & rlxGetFullpathFromExt(r.Value)
Else
r.Value = rlxGetFullpathFromExt(r.Value)
End If

Exit Sub
e:
Call rlxErrMsg(err)
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionRemoveFilename.cls
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can

On Error GoTo e

r.Value = rlxGetFullpathFromPathName(r.Value)
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & rlxGetFullpathFromPathName(r.Value)
Else
r.Value = rlxGetFullpathFromPathName(r.Value)
End If

Exit Sub
e:
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionRemoveLeftString.cls
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
If Not (NotHoldFormat) And VarType(r.Value) = vbString Then
r.Characters(1, lngPos).Delete
Else
r.Value = Mid(r.Value, lngPos + 1)
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & Mid(r.Value, lngPos + 1)
Else
r.Value = Mid(r.Value, lngPos + 1)
End If
End If

Exit Sub
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionRemoveLeftToChar.cls
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
If Not (NotHoldFormat) And VarType(r.Value) = vbString Then
r.Characters(1, lngPos + Len(mstrIns) - 1).Delete
Else
r.Value = Mid(r.Value, lngPos + Len(mstrIns))
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & Mid(r.Value, lngPos + Len(mstrIns))
Else
r.Value = Mid(r.Value, lngPos + Len(mstrIns))
End If
End If

Exit Sub
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionRemoveParenthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can

On Error GoTo e

r.Value = removeKakko(r.Value)
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & removeKakko(r.Value)
Else
r.Value = removeKakko(r.Value)
End If

Exit Sub
e:
Expand Down
8 changes: 6 additions & 2 deletions Source/src/Class/SelectionRemovePath.cls
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can

On Error GoTo e

r.Value = rlxGetFullpathFromFileName(r.Value)

If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & rlxGetFullpathFromFileName(r.Value)
Else
r.Value = rlxGetFullpathFromFileName(r.Value)
End If

Exit Sub
e:
Call rlxErrMsg(err)
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionRemoveRightString.cls
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
lngPos = 0
End If

r.Value = Left(r.Value, lngPos)
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & Left(r.Value, lngPos)
Else
r.Value = Left(r.Value, lngPos)
End If
End If

Exit Sub
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionRemoveRightToChar.cls
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
If Not (NotHoldFormat) And VarType(r.Value) = vbString Then
r.Characters(lngPos, r.Characters.count - lngPos + 1).Delete
Else
r.Value = Mid(r.Value, 1, lngPos - 1)
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & Mid(r.Value, 1, lngPos - 1)
Else
r.Value = Mid(r.Value, 1, lngPos - 1)
End If
End If

Exit Sub
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionRemoveRightToString.cls
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
If Not (NotHoldFormat) And VarType(r.Value) = vbString Then
r.Characters(1, lngPos).Delete
Else
r.Value = Mid(r.Value, lngPos + 1)
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & Mid(r.Value, lngPos + 1)
Else
r.Value = Mid(r.Value, lngPos + 1)
End If
End If

Exit Sub
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionRowMergeCol.cls
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal Row As Long, Cancel As Boolea
Else
strBuf = strBuf & mstrSep & rr.Value
End If
rr.Value = Empty
If Len(r.PrefixCharacter) > 0 Then
rr.Value = r.PrefixCharacter & Empty
Else
rr.Value = Empty
End If
End If
Next

Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionSetParenthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can

On Error GoTo e

r.Value = strLeft & r.Value & strRight
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & strLeft & r.Value & strRight
Else
r.Value = strLeft & r.Value & strRight
End If

Exit Sub
e:
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionStringZeroPadding.cls
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can

'現在選択されたいる場所と使用箇所で重なっている場所について
'指数表記を数字に更新する。
r.Value = Right(String$(mlngSize, "0") & r.Value, mlngSize)
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & Right(String$(mlngSize, "0") & r.Value, mlngSize)
Else
r.Value = Right(String$(mlngSize, "0") & r.Value, mlngSize)
End If

Exit Sub
e:
Expand Down
8 changes: 6 additions & 2 deletions Source/src/Class/SelectionToDBString.cls
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can

On Error GoTo e

r.Value = rlxToDBFieldNm(r.Value)

If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & rlxToDBFieldNm(r.Value)
Else
r.Value = rlxToDBFieldNm(r.Value)
End If

Exit Sub
e:
Call rlxErrMsg(err)
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionToElectoric.cls
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
strDest = strDest & StrConvU(strBuf, vbWide)
End If

r.Value = strDest
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & strDest
Else
r.Value = strDest
End If

Exit Sub
e:
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionToFormula.cls
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can

On Error GoTo e

r.Formula = r.Formula
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & r.Value
Else
r.Formula = r.Formula
End If

Exit Sub
e:
Expand Down
6 changes: 5 additions & 1 deletion Source/src/Class/SelectionToHankaku.cls
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can

On Error GoTo e

r.Value = StrConvU(r.Value, vbNarrow)
If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & StrConvU(r.Value, vbNarrow)
Else
r.Value = StrConvU(r.Value, vbNarrow)
End If

Exit Sub
e:
Expand Down
8 changes: 6 additions & 2 deletions Source/src/Class/SelectionToHiragana.cls
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ Private Sub SFWork_SelectionMain(r As Range, ByVal NotHoldFormat As Boolean, Can
On Error GoTo e

' r.Value = StrConvU(r.Value, vbHiragana)
r.Value = ToHiragana(r.Value, blnKake)

If Len(r.PrefixCharacter) > 0 Then
r.Value = r.PrefixCharacter & ToHiragana(r.Value, blnKake)
Else
r.Value = ToHiragana(r.Value, blnKake)
End If

Exit Sub
e:
Call rlxErrMsg(err)
Expand Down
Loading

0 comments on commit 9f30d0a

Please sign in to comment.