Skip to content

Commit

Permalink
1.9.1
Browse files Browse the repository at this point in the history
・Microsoft Publisher 2013 のテキストボックスでの不具合を修正しました。
 ・確定入力で入力開始直後のローマ字1字目が表示されるようにしました。
 ・確定入力でローマ字が1字の仮名が入力されるようにしました。
 ・NAKANO Takeoさん、情報ありがとうございます。
  • Loading branch information
nathancorvussolis committed Sep 5, 2015
1 parent 3f57480 commit f02bc80
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 43 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# CorvusSKK ver. 1.9.0
# CorvusSKK ver. 1.9.1

Windowsで動作するSKK風のIMEです。

Expand Down
6 changes: 3 additions & 3 deletions common/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define VERSION_H

#define TEXTSERVICE_NAME L"CorvusSKK"
#define TEXTSERVICE_VER L"1.9.0"
#define TEXTSERVICE_VER L"1.9.1"

#ifndef _DEBUG
#define TEXTSERVICE_DESC TEXTSERVICE_NAME
Expand All @@ -14,7 +14,7 @@
//for resource
#define RC_AUTHOR "nathancorvussolis"
#define RC_PRODUCT "CorvusSKK"
#define RC_VERSION "1.9.0"
#define RC_VERSION_D 1,9,0,0
#define RC_VERSION "1.9.1"
#define RC_VERSION_D 1,9,1,0

#endif
18 changes: 12 additions & 6 deletions imcrvtip/KeyHandlerChar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,25 +174,27 @@ HRESULT CTextService::_HandleChar(TfEditCookie ec, ITfContext *pContext, WPARAM
}
else
{
_HandleCharShift(ec, pContext);
if(rkc.soku)
{
_HandleCharShift(ec, pContext);
roman.push_back(ch);
_Update(ec, pContext);
}
else
{
cursoridx = kana.size();
_Update(ec, pContext, TRUE);
_HandleCharReturn(ec, pContext);
}
}
}
break;

case E_PENDING: //途中まで一致
_HandleCharShift(ec, pContext);

if(rkc.roman[0] != L'\0' && rkc.wait) //待機
{
_HandleCharShift(ec, pContext);

switch(inputmode)
{
case im_hiragana:
Expand All @@ -207,15 +209,17 @@ HRESULT CTextService::_HandleChar(TfEditCookie ec, ITfContext *pContext, WPARAM
default:
break;
}

_Update(ec, pContext);
}
else
{
_HandleCharShift(ec, pContext);
roman.push_back(ch);
}

if(pContext != NULL)
{
_Update(ec, pContext);
}
_Update(ec, pContext);
break;

case E_ABORT: //不一致
Expand Down Expand Up @@ -248,6 +252,7 @@ HRESULT CTextService::_HandleChar(TfEditCookie ec, ITfContext *pContext, WPARAM
case S_OK: //一致
kana.assign(ajc.jlatin);
cursoridx = kana.size();
_Update(ec, pContext, TRUE);
_HandleCharReturn(ec, pContext);
break;
case E_PENDING: //途中まで一致
Expand All @@ -265,6 +270,7 @@ HRESULT CTextService::_HandleChar(TfEditCookie ec, ITfContext *pContext, WPARAM
ajc.ascii[1] = L'\0';
kana.assign(ajc.ascii);
cursoridx = kana.size();
_Update(ec, pContext, TRUE);
_HandleCharReturn(ec, pContext);
break;

Expand Down
50 changes: 29 additions & 21 deletions imcrvtip/KeyHandlerComposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,27 +346,6 @@ HRESULT CTextService::_SetText(TfEditCookie ec, ITfContext *pContext, const std:
{
return S_FALSE;
}

_Vertical = FALSE;

ITfRange *pRange;
if(_pComposition->GetRange(&pRange) == S_OK)
{
ITfReadOnlyProperty *pReadOnlyProperty;
if(pContext->GetAppProperty(TSATTRID_Text_VerticalWriting, &pReadOnlyProperty) == S_OK)
{
VARIANT var;
if(pReadOnlyProperty->GetValue(ec, pRange, &var) == S_OK)
{
if(var.vt == VT_BOOL)
{
_Vertical = var.boolVal;
}
}
SafeRelease(&pReadOnlyProperty);
}
SafeRelease(&pRange);
}
}

if(pContext->GetSelection(ec, TF_DEFAULT_SELECTION, 1, &tfSelection, &cFetched) != S_OK)
Expand Down Expand Up @@ -607,3 +586,32 @@ void CTextService::_EndCompletionList(TfEditCookie ec, ITfContext *pContext)
_EndCandidateList();
}
}

BOOL CTextService::_GetVertical(TfEditCookie ec, ITfContext *pContext)
{
BOOL ret = FALSE;

if(_IsComposing())
{
ITfRange *pRange;
if(_pComposition->GetRange(&pRange) == S_OK)
{
ITfReadOnlyProperty *pReadOnlyProperty;
if(pContext->GetAppProperty(TSATTRID_Text_VerticalWriting, &pReadOnlyProperty) == S_OK)
{
VARIANT var;
if(pReadOnlyProperty->GetValue(ec, pRange, &var) == S_OK)
{
if(var.vt == VT_BOOL)
{
ret = var.boolVal;
}
}
SafeRelease(&pReadOnlyProperty);
}
SafeRelease(&pRange);
}
}

return ret;
}
12 changes: 8 additions & 4 deletions imcrvtip/KeyHandlerControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,16 @@ HRESULT CTextService::_HandleControl(TfEditCookie ec, ITfContext *pContext, BYTE

_NextComp();

BOOL vertical = _GetVertical(ec, pContext);

if(complement && cx_compuserdic)
{
if(candidx == 0)
{
_UserDicComp();
}

if((!cx_stacompmulti && !cx_dyncompmulti) || !_Vertical || pContext == NULL)
if((!cx_stacompmulti && !cx_dyncompmulti) || !vertical || pContext == NULL)
{
okuriidx = kana.size();
if(candidx < candidates.size() && !candidates[candidx].first.second.empty())
Expand All @@ -391,7 +393,7 @@ HRESULT CTextService::_HandleControl(TfEditCookie ec, ITfContext *pContext, BYTE
_EndCompletionList(ec, pContext);
}

if((!cx_stacompmulti && !cx_dyncompmulti) || !_Vertical || pContext == NULL)
if((!cx_stacompmulti && !cx_dyncompmulti) || !vertical || pContext == NULL)
{
_Update(ec, pContext);
}
Expand Down Expand Up @@ -426,9 +428,11 @@ HRESULT CTextService::_HandleControl(TfEditCookie ec, ITfContext *pContext, BYTE
{
_PrevComp();

BOOL vertical = _GetVertical(ec, pContext);

if(complement && cx_compuserdic)
{
if((!cx_stacompmulti && !cx_dyncompmulti) || !_Vertical || pContext == NULL)
if((!cx_stacompmulti && !cx_dyncompmulti) || !vertical || pContext == NULL)
{
okuriidx = kana.size();
if(candidx < candidates.size() && !candidates[candidx].first.second.empty())
Expand All @@ -454,7 +458,7 @@ HRESULT CTextService::_HandleControl(TfEditCookie ec, ITfContext *pContext, BYTE
_EndCompletionList(ec, pContext);
}

if((!cx_stacompmulti && !cx_dyncompmulti) || !_Vertical || pContext == NULL)
if((!cx_stacompmulti && !cx_dyncompmulti) || !vertical || pContext == NULL)
{
_Update(ec, pContext);
}
Expand Down
4 changes: 3 additions & 1 deletion imcrvtip/KeyHandlerConv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,9 @@ void CTextService::_DynamicComp(TfEditCookie ec, ITfContext *pContext, BOOL sel)

okuriidx = kana_bak.size();

if(cx_dynamiccomp && (!cx_dyncompmulti || !_Vertical || pContext == NULL))
BOOL vertical = _GetVertical(ec, pContext);

if(cx_dynamiccomp && (!cx_dyncompmulti || !vertical || pContext == NULL))
{
kana.insert(okuriidx, 1, CHAR_SKK_OKURI);

Expand Down
1 change: 0 additions & 1 deletion imcrvtip/TextService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ CTextService::CTextService()
_ImmersiveMode = FALSE;
_UILessMode = FALSE;
_ShowInputMode = FALSE;
_Vertical = FALSE;

hPipe = INVALID_HANDLE_VALUE;

Expand Down
2 changes: 1 addition & 1 deletion imcrvtip/TextService.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class CTextService :
HRESULT _ShowCandidateList(TfEditCookie ec, ITfContext *pContext, BOOL reg, BOOL comp);
void _EndCandidateList();
void _EndCompletionList(TfEditCookie ec, ITfContext *pContext);
BOOL _GetVertical(TfEditCookie ec, ITfContext *pContext);

// KeyHandlerControl
HRESULT _HandleControl(TfEditCookie ec, ITfContext *pContext, BYTE sf, WCHAR ch);
Expand Down Expand Up @@ -306,7 +307,6 @@ class CTextService :
BOOL _ImmersiveMode; //Immersive Mode
BOOL _UILessMode; //UILess Mode
BOOL _ShowInputMode; //InputModeWindow
BOOL _Vertical; //Vertical Writing

//状態
int inputmode; //入力モード (無し/ひらがな/カタカナ/半角カタカナ/全英/アスキー)
Expand Down
4 changes: 2 additions & 2 deletions installer/README.TXT
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

==============================================================================

CorvusSKK ver. 1.9.0
CorvusSKK ver. 1.9.1

https://nathancorvussolis.github.io/
[email protected]
Expand All @@ -23,6 +23,6 @@

マニュアル

https://github.com/nathancorvussolis/corvusskk/blob/1.9.0/README.md
https://github.com/nathancorvussolis/corvusskk/blob/1.9.1/README.md

==============================================================================
2 changes: 1 addition & 1 deletion installer/_version.cmd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

set VERSION=1.9.0
set VERSION=1.9.1
2 changes: 1 addition & 1 deletion installer/corvusskk-x64.wxs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

<?define version="1.9.0" ?>
<?define version="1.9.1" ?>

<Product Id="*" Name="CorvusSKK" Version="$(var.version)" Manufacturer="nathancorvussolis"
Language="1033" UpgradeCode="DBDB315C-1F74-4051-8A67-705D0FD16497">
Expand Down
2 changes: 1 addition & 1 deletion installer/corvusskk-x86.wxs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

<?define version="1.9.0" ?>
<?define version="1.9.1" ?>

<Product Id="*" Name="CorvusSKK" Version="$(var.version)" Manufacturer="nathancorvussolis"
Language="1033" UpgradeCode="3F1244EC-9A5C-4041-9A33-E26B03C63C9B">
Expand Down

0 comments on commit f02bc80

Please sign in to comment.